/*!--------------------------------------------------------
 * Copyright (C) Microsoft Corporation. All rights reserved.
 *--------------------------------------------------------*/
/******************************************************************************
Copyright (c) Microsoft Corporation.

Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */
/* global Reflect, Promise, SuppressedError, Symbol */

var extendStatics = function(d, b) {
    extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
    return extendStatics(d, b);
};

export function __extends(d, b) {
    if (typeof b !== "function" && b !== null)
        throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
    extendStatics(d, b);
    function __() { this.constructor = d; }
    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
}

export var __assign = function() {
    __assign = Object.assign || function __assign(t) {
        for (var s, i = 1, n = arguments.length; i < n; i++) {
            s = arguments[i];
            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
        }
        return t;
    }
    return __assign.apply(this, arguments);
}

export function __rest(s, e) {
    var t = {};
    for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
        t[p] = s[p];
    if (s != null && typeof Object.getOwnPropertySymbols === "function")
        for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
            if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
                t[p[i]] = s[p[i]];
        }
    return t;
}

export function __decorate(decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
}

export function __param(paramIndex, decorator) {
    return function (target, key) { decorator(target, key, paramIndex); }
}

export function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
    function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; }
    var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
    var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
    var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
    var _, done = false;
    for (var i = decorators.length - 1; i >= 0; i--) {
        var context = {};
        for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
        for (var p in contextIn.access) context.access[p] = contextIn.access[p];
        context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); };
        var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
        if (kind === "accessor") {
            if (result === void 0) continue;
            if (result === null || typeof result !== "object") throw new TypeError("Object expected");
            if (_ = accept(result.get)) descriptor.get = _;
            if (_ = accept(result.set)) descriptor.set = _;
            if (_ = accept(result.init)) initializers.unshift(_);
        }
        else if (_ = accept(result)) {
            if (kind === "field") initializers.unshift(_);
            else descriptor[key] = _;
        }
    }
    if (target) Object.defineProperty(target, contextIn.name, descriptor);
    done = true;
};

export function __runInitializers(thisArg, initializers, value) {
    var useValue = arguments.length > 2;
    for (var i = 0; i < initializers.length; i++) {
        value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
    }
    return useValue ? value : void 0;
};

export function __propKey(x) {
    return typeof x === "symbol" ? x : "".concat(x);
};

export function __setFunctionName(f, name, prefix) {
    if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : "";
    return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name });
};

export function __metadata(metadataKey, metadataValue) {
    if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue);
}

export function __awaiter(thisArg, _arguments, P, generator) {
    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
}

export function __generator(thisArg, body) {
    var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
    return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
    function verb(n) { return function (v) { return step([n, v]); }; }
    function step(op) {
        if (f) throw new TypeError("Generator is already executing.");
        while (g && (g = 0, op[0] && (_ = 0)), _) try {
            if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
            if (y = 0, t) op = [op[0] & 2, t.value];
            switch (op[0]) {
                case 0: case 1: t = op; break;
                case 4: _.label++; return { value: op[1], done: false };
                case 5: _.label++; y = op[1]; op = [0]; continue;
                case 7: op = _.ops.pop(); _.trys.pop(); continue;
                default:
                    if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
                    if (t[2]) _.ops.pop();
                    _.trys.pop(); continue;
            }
            op = body.call(thisArg, _);
        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
        if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
    }
}

export var __createBinding = Object.create ? (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    var desc = Object.getOwnPropertyDescriptor(m, k);
    if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
        desc = { enumerable: true, get: function() { return m[k]; } };
    }
    Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    o[k2] = m[k];
});

export function __exportStar(m, o) {
    for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);
}

export function __values(o) {
    var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
    if (m) return m.call(o);
    if (o && typeof o.length === "number") return {
        next: function () {
            if (o && i >= o.length) o = void 0;
            return { value: o && o[i++], done: !o };
        }
    };
    throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
}

export function __read(o, n) {
    var m = typeof Symbol === "function" && o[Symbol.iterator];
    if (!m) return o;
    var i = m.call(o), r, ar = [], e;
    try {
        while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
    }
    catch (error) { e = { error: error }; }
    finally {
        try {
            if (r && !r.done && (m = i["return"])) m.call(i);
        }
        finally { if (e) throw e.error; }
    }
    return ar;
}

/** @deprecated */
export function __spread() {
    for (var ar = [], i = 0; i < arguments.length; i++)
        ar = ar.concat(__read(arguments[i]));
    return ar;
}

/** @deprecated */
export function __spreadArrays() {
    for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
    for (var r = Array(s), k = 0, i = 0; i < il; i++)
        for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
            r[k] = a[j];
    return r;
}

export function __spreadArray(to, from, pack) {
    if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
        if (ar || !(i in from)) {
            if (!ar) ar = Array.prototype.slice.call(from, 0, i);
            ar[i] = from[i];
        }
    }
    return to.concat(ar || Array.prototype.slice.call(from));
}

export function __await(v) {
    return this instanceof __await ? (this.v = v, this) : new __await(v);
}

export function __asyncGenerator(thisArg, _arguments, generator) {
    if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
    var g = generator.apply(thisArg, _arguments || []), i, q = [];
    return i = {}, verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;
    function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; }
    function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } }
    function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }
    function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
    function fulfill(value) { resume("next", value); }
    function reject(value) { resume("throw", value); }
    function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }
}

export function __asyncDelegator(o) {
    var i, p;
    return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
    function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }
}

export function __asyncValues(o) {
    if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
    var m = o[Symbol.asyncIterator], i;
    return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
    function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
    function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }
}

export function __makeTemplateObject(cooked, raw) {
    if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
    return cooked;
};

var __setModuleDefault = Object.create ? (function(o, v) {
    Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
    o["default"] = v;
};

export function __importStar(mod) {
    if (mod && mod.__esModule) return mod;
    var result = {};
    if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
    __setModuleDefault(result, mod);
    return result;
}

export function __importDefault(mod) {
    return (mod && mod.__esModule) ? mod : { default: mod };
}

export function __classPrivateFieldGet(receiver, state, kind, f) {
    if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
    if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
    return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
}

export function __classPrivateFieldSet(receiver, state, value, kind, f) {
    if (kind === "m") throw new TypeError("Private method is not writable");
    if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
    if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
    return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
}

export function __classPrivateFieldIn(state, receiver) {
    if (receiver === null || (typeof receiver !== "object" && typeof receiver !== "function")) throw new TypeError("Cannot use 'in' operator on non-object");
    return typeof state === "function" ? receiver === state : state.has(receiver);
}

export function __addDisposableResource(env, value, async) {
    if (value !== null && value !== void 0) {
        if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected.");
        var dispose, inner;
        if (async) {
            if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined.");
            dispose = value[Symbol.asyncDispose];
        }
        if (dispose === void 0) {
            if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined.");
            dispose = value[Symbol.dispose];
            if (async) inner = dispose;
        }
        if (typeof dispose !== "function") throw new TypeError("Object not disposable.");
        if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } };
        env.stack.push({ value: value, dispose: dispose, async: async });
    }
    else if (async) {
        env.stack.push({ async: true });
    }
    return value;

}

var _SuppressedError = typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
    var e = new Error(message);
    return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
};

export function __disposeResources(env) {
    function fail(e) {
        env.error = env.hasError ? new _SuppressedError(e, env.error, "An error was suppressed during disposal.") : e;
        env.hasError = true;
    }
    function next() {
        while (env.stack.length) {
            var rec = env.stack.pop();
            try {
                var result = rec.dispose && rec.dispose.call(rec.value);
                if (rec.async) return Promise.resolve(result).then(next, function(e) { fail(e); return next(); });
            }
            catch (e) {
                fail(e);
            }
        }
        if (env.hasError) throw env.error;
    }
    return next();
}

export default {
    __extends: __extends,
    __assign: __assign,
    __rest: __rest,
    __decorate: __decorate,
    __param: __param,
    __metadata: __metadata,
    __awaiter: __awaiter,
    __generator: __generator,
    __createBinding: __createBinding,
    __exportStar: __exportStar,
    __values: __values,
    __read: __read,
    __spread: __spread,
    __spreadArrays: __spreadArrays,
    __spreadArray: __spreadArray,
    __await: __await,
    __asyncGenerator: __asyncGenerator,
    __asyncDelegator: __asyncDelegator,
    __asyncValues: __asyncValues,
    __makeTemplateObject: __makeTemplateObject,
    __importStar: __importStar,
    __importDefault: __importDefault,
    __classPrivateFieldGet: __classPrivateFieldGet,
    __classPrivateFieldSet: __classPrivateFieldSet,
    __classPrivateFieldIn: __classPrivateFieldIn,
    __addDisposableResource: __addDisposableResource,
    __disposeResources: __disposeResources,
};

var Z3=Object.defineProperty;var e8=Object.getOwnPropertyDescriptor;var s0=r=>{throw TypeError(r)};var L=(r,t,e,n)=>{for(var o=n>1?void 0:n?e8(t,e):t,i=r.length-1,s;i>=0;i--)(s=r[i])&&(o=(n?s(t,e,o):s(o))||o);return n&&o&&Z3(t,e,o),o},P=(r,t)=>(e,n)=>t(e,n,r);var JT=(r,t,e)=>t.has(r)||s0("Cannot "+e);var an=(r,t,e)=>(JT(r,t,"read from private field"),e?e.call(r):t.get(r)),Uc=(r,t,e)=>t.has(r)?s0("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(r):t.set(r,e),cf=(r,t,e,n)=>(JT(r,t,"write to private field"),n?n.call(r,e):t.set(r,e),e),uf=(r,t,e)=>(JT(r,t,"access private method"),e);var xt=class{constructor(t){this.executor=t;this._state=0}get hasValue(){return this._state===2}get value(){if(this._state===0){this._state=1;try{this._value=this.executor()}catch(t){this._error=t}finally{this._state=2}}else if(this._state===1)throw new Error("Cannot read the value of a lazy that is being initialized");if(this._error)throw this._error;return this._value}get rawValue(){return this._value}};var jT=class{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(t){setTimeout(()=>{throw t.stack?dr.isErrorNoTelemetry(t)?new dr(t.message+`

`+t.stack):new Error(t.message+`

`+t.stack):t},0)}}addListener(t){return this.listeners.push(t),()=>{this._removeListener(t)}}emit(t){this.listeners.forEach(e=>{e(t)})}_removeListener(t){this.listeners.splice(this.listeners.indexOf(t),1)}setUnexpectedErrorHandler(t){this.unexpectedErrorHandler=t}getUnexpectedErrorHandler(){return this.unexpectedErrorHandler}onUnexpectedError(t){this.unexpectedErrorHandler(t),this.emit(t)}onUnexpectedExternalError(t){this.unexpectedErrorHandler(t)}},Fc=new jT;function mf(r){Fc.setUnexpectedErrorHandler(r)}function ha(r){Fc.onUnexpectedError(r)}function Ct(r){Fn(r)||Fc.onUnexpectedError(r)}function ff(r){Fn(r)||Fc.onUnexpectedExternalError(r)}function bi(r){if(r instanceof Error){let{name:t,message:e,cause:n}=r,o=r.stacktrace||r.stack;return{$isError:!0,name:t,message:e,stack:o,noTelemetry:dr.isErrorNoTelemetry(r),cause:n?bi(n):void 0,code:r.code}}return r}function QT(r){let t;return r.noTelemetry?t=new dr:(t=new Error,t.name=r.name),t.message=r.message,t.stack=r.stack,r.code&&(t.code=r.code),r.cause&&(t.cause=QT(r.cause)),t}var vv="Canceled";function Fn(r){return r instanceof Bt?!0:r instanceof Error&&r.name===vv&&r.message===vv}var Bt=class extends Error{constructor(){super(vv),this.name=this.message}},pf=class r extends Error{static{this._name="PendingMigrationError"}static is(t){return t instanceof r||t instanceof Error&&t.name===r._name}constructor(t){super(t),this.name=r._name}};function XT(){let r=new Error(vv);return r.name=r.message,r}function Be(r){return r?new Error(`Illegal argument: ${r}`):new Error("Illegal argument")}function Hc(r){return r?new Error(`Illegal state: ${r}`):new Error("Illegal state")}var Nr=class extends TypeError{constructor(t){super(t?`${t} is read-only and cannot be changed`:"Cannot change read-only property")}};function Zl(r){return r?r.message?r.message:r.stack?r.stack.split(`
`)[0]:String(r):"Error"}var bv=class extends Error{constructor(t){super("NotImplemented"),t&&(this.message=t)}},Yl=class extends Error{constructor(t){super("NotSupported"),t&&(this.message=t)}};var dr=class r extends Error{constructor(t){super(t),this.name="CodeExpectedError"}static fromError(t){if(t instanceof r)return t;let e=new r;return e.message=t.message,e.stack=t.stack,e}static isErrorNoTelemetry(t){return t.name==="CodeExpectedError"}},Nt=class r extends Error{constructor(t){super(t||"An unexpected bug occurred."),Object.setPrototypeOf(this,r.prototype)}};function l0(r,t,e=r.length-1){let n=t8(r,t,e);if(n!==-1)return r[n]}function t8(r,t,e=r.length-1){for(let n=e;n>=0;n--){let o=r[n];if(t(o,n))return n}return-1}function n8(r,t,e=0,n=r.length){let o=e,i=n;for(;o<i;){let s=Math.floor((o+i)/2);t(r[s])?o=s+1:i=s}return o-1}var a0=class r{constructor(t){this._array=t;this._findLastMonotonousLastIdx=0}static{this.assertInvariants=!1}findLastMonotonous(t){if(r.assertInvariants){if(this._prevFindLastPredicate){for(let n of this._array)if(this._prevFindLastPredicate(n)&&!t(n))throw new Error("MonotonousArray: current predicate must be weaker than (or equal to) the previous predicate.")}this._prevFindLastPredicate=t}let e=n8(this._array,t,this._findLastMonotonousLastIdx);return this._findLastMonotonousLastIdx=e+1,e===-1?void 0:this._array[e]}};function Zt(r,t,e=(n,o)=>n===o){if(r===t)return!0;if(!r||!t||r.length!==t.length)return!1;for(let n=0,o=r.length;n<o;n++)if(!e(r[n],t[n]))return!1;return!0}function c0(r,t){let e=[],n;for(let o of r.slice(0).sort(t))!n||t(n[0],o)!==0?(n=[o],e.push(n)):n.push(o);return e}function YT(r,t,e){let n=[];function o(a,l,d){if(l===0&&d.length===0)return;let c=n[n.length-1];c&&c.start+c.deleteCount===a?(c.deleteCount+=l,c.toInsert.push(...d)):n.push({start:a,deleteCount:l,toInsert:d})}let i=0,s=0;for(;;){if(i===r.length){o(i,0,t.slice(s));break}if(s===t.length){o(i,r.length-i,[]);break}let a=r[i],l=t[s],d=e(a,l);d===0?(i+=1,s+=1):d<0?(o(i,1,[]),i+=1):d>0&&(o(i,0,[l]),s+=1)}return n}function u0(r,t,e){let n=YT(r,t,e),o=[],i=[];for(let s of n)o.push(...r.slice(s.start,s.start+s.deleteCount)),i.push(...s.toInsert);return{removed:o,added:i}}function pt(r){return r.filter(t=>!!t)}function p0(r){let t=0;for(let e=0;e<r.length;e++)r[e]&&(r[t]=r[e],t+=1);r.length=t}function gf(r){return!Array.isArray(r)||r.length===0}function va(r){return Array.isArray(r)&&r.length>0}function cr(r,t=e=>e){let e=new Set;return r.filter(n=>{let o=t(n);return e.has(o)?!1:(e.add(o),!0)})}function ZT(r,t){let e;if(typeof t=="number"){let n=t;e=()=>{let o=Math.sin(n++)*179426549;return o-Math.floor(o)}}else e=Math.random;for(let n=r.length-1;n>0;n-=1){let o=Math.floor(e()*(n+1)),i=r[n];r[n]=r[o],r[o]=i}}function hf(r,t){return Array.isArray(r)?r.map(t):t(r)}function Rn(r){return Array.isArray(r)?r:[r]}var m0;(a=>{function r(l){return l<0}a.isLessThan=r;function t(l){return l<=0}a.isLessThanOrEqual=t;function e(l){return l>0}a.isGreaterThan=e;function n(l){return l===0}a.isNeitherLessOrGreaterThan=n,a.greaterThan=1,a.lessThan=-1,a.neitherLessOrGreaterThan=0})(m0||={});function f0(r,t){return(e,n)=>t(r(e),r(n))}var g0=(r,t)=>r-t;var d0=class r{constructor(t){this.iterate=t}static{this.empty=new r(t=>{})}forEach(t){this.iterate(e=>(t(e),!0))}toArray(){let t=[];return this.iterate(e=>(t.push(e),!0)),t}filter(t){return new r(e=>this.iterate(n=>t(n)?e(n):!0))}map(t){return new r(e=>this.iterate(n=>e(t(n))))}some(t){let e=!1;return this.iterate(n=>(e=t(n),!e)),e}findFirst(t){let e;return this.iterate(n=>t(n)?(e=n,!1):!0),e}findLast(t){let e;return this.iterate(n=>(t(n)&&(e=n),!0)),e}findLastMaxBy(t){let e,n=!0;return this.iterate(o=>((n||m0.isGreaterThan(t(o,e)))&&(n=!1,e=o),!0)),e}};function Iv(r,t){let e=Object.create(null);for(let n of r){let o=t(n),i=e[o];i||(i=e[o]=[]),i.push(n)}return e}function e_(r,t){let e=[],n=[];for(let o of r)t.has(o)||e.push(o);for(let o of t)r.has(o)||n.push(o);return{removed:e,added:n}}var v0,b0,h0=class{constructor(t,e){this.toKey=e;this._map=new Map;this[v0]="SetWithKey";for(let n of t)this.add(n)}get size(){return this._map.size}add(t){let e=this.toKey(t);return this._map.set(e,t),this}delete(t){return this._map.delete(this.toKey(t))}has(t){return this._map.has(this.toKey(t))}*entries(){for(let t of this._map.values())yield[t,t]}keys(){return this.values()}*values(){for(let t of this._map.values())yield t}clear(){this._map.clear()}forEach(t,e){this._map.forEach(n=>t.call(e,n,n,this))}[(b0=Symbol.iterator,v0=Symbol.toStringTag,b0)](){return this.values()}};function r_(r,t,e){let n=r.get(t);return n===void 0&&(n=e,r.set(t,n)),n}var t_=class{constructor(t,e){this.uri=t;this.value=e}};function r8(r){return Array.isArray(r)}var I0,et=class r{constructor(t,e){this[I0]="ResourceMap";if(t instanceof r)this.map=new Map(t.map),this.toKey=e??r.defaultToKey;else if(r8(t)){this.map=new Map,this.toKey=e??r.defaultToKey;for(let[n,o]of t)this.set(n,o)}else this.map=new Map,this.toKey=t??r.defaultToKey}static{this.defaultToKey=t=>t.toString()}set(t,e){return this.map.set(this.toKey(t),new t_(t,e)),this}get(t){return this.map.get(this.toKey(t))?.value}has(t){return this.map.has(this.toKey(t))}get size(){return this.map.size}clear(){this.map.clear()}delete(t){return this.map.delete(this.toKey(t))}forEach(t,e){typeof e<"u"&&(t=t.bind(e));for(let[n,o]of this.map)t(o.value,o.uri,this)}*values(){for(let t of this.map.values())yield t.value}*keys(){for(let t of this.map.values())yield t.uri}*entries(){for(let t of this.map.values())yield[t.uri,t.value]}*[(I0=Symbol.toStringTag,Symbol.iterator)](){for(let[,t]of this.map)yield[t.uri,t.value]}},y0,ur=class{constructor(t,e){this[y0]="ResourceSet";!t||typeof t=="function"?this._map=new et(t):(this._map=new et(e),t.forEach(this.add,this))}get size(){return this._map.size}add(t){return this._map.set(t,t),this}clear(){this._map.clear()}delete(t){return this._map.delete(t)}forEach(t,e){this._map.forEach((n,o)=>t.call(e,o,o,this))}has(t){return this._map.has(t)}entries(){return this._map.entries()}keys(){return this._map.keys()}values(){return this._map.keys()}[(y0=Symbol.toStringTag,Symbol.iterator)](){return this.keys()}};var E0,n_=class{constructor(){this[E0]="LinkedMap";this._map=new Map,this._head=void 0,this._tail=void 0,this._size=0,this._state=0}clear(){this._map.clear(),this._head=void 0,this._tail=void 0,this._size=0,this._state++}isEmpty(){return!this._head&&!this._tail}get size(){return this._size}get first(){return this._head?.value}get last(){return this._tail?.value}has(t){return this._map.has(t)}get(t,e=0){let n=this._map.get(t);if(n)return e!==0&&this.touch(n,e),n.value}set(t,e,n=0){let o=this._map.get(t);if(o)o.value=e,n!==0&&this.touch(o,n);else{switch(o={key:t,value:e,next:void 0,previous:void 0},n){case 0:this.addItemLast(o);break;case 1:this.addItemFirst(o);break;case 2:this.addItemLast(o);break;default:this.addItemLast(o);break}this._map.set(t,o),this._size++}return this}delete(t){return!!this.remove(t)}remove(t){let e=this._map.get(t);if(e)return this._map.delete(t),this.removeItem(e),this._size--,e.value}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw new Error("Invalid list");let t=this._head;return this._map.delete(t.key),this.removeItem(t),this._size--,t.value}forEach(t,e){let n=this._state,o=this._head;for(;o;){if(e?t.bind(e)(o.value,o.key,this):t(o.value,o.key,this),this._state!==n)throw new Error("LinkedMap got modified during iteration.");o=o.next}}keys(){let t=this,e=this._state,n=this._head,o={[Symbol.iterator](){return o},next(){if(t._state!==e)throw new Error("LinkedMap got modified during iteration.");if(n){let i={value:n.key,done:!1};return n=n.next,i}else return{value:void 0,done:!0}}};return o}values(){let t=this,e=this._state,n=this._head,o={[Symbol.iterator](){return o},next(){if(t._state!==e)throw new Error("LinkedMap got modified during iteration.");if(n){let i={value:n.value,done:!1};return n=n.next,i}else return{value:void 0,done:!0}}};return o}entries(){let t=this,e=this._state,n=this._head,o={[Symbol.iterator](){return o},next(){if(t._state!==e)throw new Error("LinkedMap got modified during iteration.");if(n){let i={value:[n.key,n.value],done:!1};return n=n.next,i}else return{value:void 0,done:!0}}};return o}[(E0=Symbol.toStringTag,Symbol.iterator)](){return this.entries()}trimOld(t){if(t>=this.size)return;if(t===0){this.clear();return}let e=this._head,n=this.size;for(;e&&n>t;)this._map.delete(e.key),e=e.next,n--;this._head=e,this._size=n,e&&(e.previous=void 0),this._state++}trimNew(t){if(t>=this.size)return;if(t===0){this.clear();return}let e=this._tail,n=this.size;for(;e&&n>t;)this._map.delete(e.key),e=e.previous,n--;this._tail=e,this._size=n,e&&(e.next=void 0),this._state++}addItemFirst(t){if(!this._head&&!this._tail)this._tail=t;else if(this._head)t.next=this._head,this._head.previous=t;else throw new Error("Invalid list");this._head=t,this._state++}addItemLast(t){if(!this._head&&!this._tail)this._head=t;else if(this._tail)t.previous=this._tail,this._tail.next=t;else throw new Error("Invalid list");this._tail=t,this._state++}removeItem(t){if(t===this._head&&t===this._tail)this._head=void 0,this._tail=void 0;else if(t===this._head){if(!t.next)throw new Error("Invalid list");t.next.previous=void 0,this._head=t.next}else if(t===this._tail){if(!t.previous)throw new Error("Invalid list");t.previous.next=void 0,this._tail=t.previous}else{let e=t.next,n=t.previous;if(!e||!n)throw new Error("Invalid list");e.previous=n,n.next=e}t.next=void 0,t.previous=void 0,this._state++}touch(t,e){if(!this._head||!this._tail)throw new Error("Invalid list");if(!(e!==1&&e!==2)){if(e===1){if(t===this._head)return;let n=t.next,o=t.previous;t===this._tail?(o.next=void 0,this._tail=o):(n.previous=o,o.next=n),t.previous=void 0,t.next=this._head,this._head.previous=t,this._head=t,this._state++}else if(e===2){if(t===this._tail)return;let n=t.next,o=t.previous;t===this._head?(n.previous=void 0,this._head=n):(n.previous=o,o.next=n),t.next=void 0,t.previous=this._tail,this._tail.next=t,this._tail=t,this._state++}}}toJSON(){let t=[];return this.forEach((e,n)=>{t.push([n,e])}),t}fromJSON(t){this.clear();for(let[e,n]of t)this.set(e,n)}},o_=class extends n_{constructor(t,e=1){super(),this._limit=t,this._ratio=Math.min(Math.max(0,e),1)}get limit(){return this._limit}set limit(t){this._limit=t,this.checkTrim()}get ratio(){return this._ratio}set ratio(t){this._ratio=Math.min(Math.max(0,t),1),this.checkTrim()}get(t,e=2){return super.get(t,e)}peek(t){return super.get(t,0)}set(t,e){return super.set(t,e,2),this}checkTrim(){this.size>this._limit&&this.trim(Math.round(this._limit*this._ratio))}},pr=class extends o_{constructor(t,e=1){super(t,e)}trim(t){this.trimOld(t)}set(t,e){return super.set(t,e),this.checkTrim(),this}};var Vc=class{constructor(){this.map=new Map}add(t,e){let n=this.map.get(t);n||(n=new Set,this.map.set(t,n)),n.add(e)}delete(t,e){let n=this.map.get(t);n&&(n.delete(e),n.size===0&&this.map.delete(t))}forEach(t,e){let n=this.map.get(t);n&&n.forEach(e)}get(t){let e=this.map.get(t);return e||new Set}};function Wc(r,t){let e=this,n=!1,o;return function(){if(n)return o;if(n=!0,t)try{o=r.apply(e,arguments)}finally{t()}else o=r.apply(e,arguments);return o}}function kn(r,t){if(!r)throw new Error(t?`Assertion failed (${t})`:"Assertion Failed")}function $c(r,t="Unreachable"){throw new Error(t)}function Gc(r,t="unexpected state"){if(!r)throw typeof t=="string"?new Nt(`Assertion Failed: ${t}`):t}function vf(r){if(!r()){debugger;r(),Ct(new Nt("Assertion Failed"))}}function Me(r){return typeof r=="string"}function x0(r){return i8(r,Me)}function i8(r,t){return Array.isArray(r)&&r.every(t)}function mt(r){return typeof r=="object"&&r!==null&&!Array.isArray(r)&&!(r instanceof RegExp)&&!(r instanceof Date)}function C0(r){let t=Object.getPrototypeOf(Uint8Array);return typeof r=="object"&&r instanceof t}function jo(r){return typeof r=="number"&&!isNaN(r)}function T0(r){return!!r&&typeof r[Symbol.iterator]=="function"}function zc(r){return typeof r>"u"}function lo(r){return!Ft(r)}function Ft(r){return zc(r)||r===null}function yv(r,t){if(!r)throw new Error(t?`Unexpected type, expected '${t}'`:"Unexpected type")}function Ur(r){return Gc(r!=null,"Argument is `undefined` or `null`."),r}var s8=Object.prototype.hasOwnProperty;function qc(r){if(!mt(r))return!1;for(let t in r)if(s8.call(r,t))return!1;return!0}function i_(r){return typeof r=="function"}function _0(r,t){let e=Math.min(r.length,t.length);for(let n=0;n<e;n++)s_(r[n],t[n])}function s_(r,t){if(Me(t)){if(typeof r!==t)throw new Error(`argument does not match constraint: typeof ${t}`)}else if(i_(t)){try{if(r instanceof t)return}catch{}if(!Ft(r)&&r.constructor===t||t.length===1&&t.call(void 0,r)===!0)return;throw new Error("argument does not match one of these constraints: arg instanceof constraint, arg.constructor === constraint, nor constraint(arg) === true")}}function Ii(r,t){for(let e in t)if(!(e in r))return!1;return!0}var Lt;(Y=>{function r(Z){return!!Z&&typeof Z=="object"&&typeof Z[Symbol.iterator]=="function"}Y.is=r;let t=Object.freeze([]);function e(){return t}Y.empty=e;function*n(Z){yield Z}Y.single=n;function o(Z){return r(Z)?Z:n(Z)}Y.wrap=o;function i(Z){return Z??t}Y.from=i;function*s(Z){for(let ee=Z.length-1;ee>=0;ee--)yield Z[ee]}Y.reverse=s;function a(Z){return!Z||Z[Symbol.iterator]().next().done===!0}Y.isEmpty=a;function l(Z){return Z[Symbol.iterator]().next().value}Y.first=l;function d(Z,ee){let oe=0;for(let ke of Z)if(ee(ke,oe++))return!0;return!1}Y.some=d;function c(Z,ee){let oe=0;for(let ke of Z)if(!ee(ke,oe++))return!1;return!0}Y.every=c;function u(Z,ee){for(let oe of Z)if(ee(oe))return oe}Y.find=u;function*f(Z,ee){for(let oe of Z)ee(oe)&&(yield oe)}Y.filter=f;function*g(Z,ee){let oe=0;for(let ke of Z)yield ee(ke,oe++)}Y.map=g;function*I(Z,ee){let oe=0;for(let ke of Z)yield*ee(ke,oe++)}Y.flatMap=I;function*h(...Z){for(let ee of Z)T0(ee)?yield*ee:yield ee}Y.concat=h;function C(Z,ee,oe){let ke=oe;for(let B of Z)ke=ee(ke,B);return ke}Y.reduce=C;function _(Z){let ee=0;for(let oe of Z)ee++;return ee}Y.length=_;function*R(Z,ee,oe=Z.length){for(ee<-Z.length&&(ee=0),ee<0&&(ee+=Z.length),oe<0?oe+=Z.length:oe>Z.length&&(oe=Z.length);ee<oe;ee++)yield Z[ee]}Y.slice=R;function O(Z,ee=Number.POSITIVE_INFINITY){let oe=[];if(ee===0)return[oe,Z];let ke=Z[Symbol.iterator]();for(let B=0;B<ee;B++){let Xe=ke.next();if(Xe.done)return[oe,Y.empty()];oe.push(Xe.value)}return[oe,{[Symbol.iterator](){return ke}}]}Y.consume=O;async function U(Z){let ee=[];for await(let oe of Z)ee.push(oe);return ee}Y.asyncToArray=U;async function ie(Z){let ee=[];for await(let oe of Z)ee=ee.concat(oe);return ee}Y.asyncToArrayFlat=ie})(Lt||={});var a8=!1,td=null;var P0=class r{constructor(){this.livingDisposables=new Map}static{this.idx=0}getDisposableData(t){let e=this.livingDisposables.get(t);return e||(e={parent:null,source:null,isSingleton:!1,value:t,idx:r.idx++},this.livingDisposables.set(t,e)),e}trackDisposable(t){let e=this.getDisposableData(t);e.source||(e.source=new Error().stack)}setParent(t,e){let n=this.getDisposableData(t);n.parent=e}markAsDisposed(t){this.livingDisposables.delete(t)}markAsSingleton(t){this.getDisposableData(t).isSingleton=!0}getRootParent(t,e){let n=e.get(t);if(n)return n;let o=t.parent?this.getRootParent(this.getDisposableData(t.parent),e):t;return e.set(t,o),o}getTrackedDisposables(){let t=new Map;return[...this.livingDisposables.entries()].filter(([,n])=>n.source!==null&&!this.getRootParent(n,t).isSingleton).flatMap(([n])=>n)}computeLeakingDisposables(t=10,e){let n;if(e)n=e;else{let l=new Map,d=[...this.livingDisposables.values()].filter(u=>u.source!==null&&!this.getRootParent(u,l).isSingleton);if(d.length===0)return;let c=new Set(d.map(u=>u.value));if(n=d.filter(u=>!(u.parent&&c.has(u.parent))),n.length===0)throw new Error("There are cyclic diposable chains!")}if(!n)return;function o(l){function d(u,f){for(;u.length>0&&f.some(g=>typeof g=="string"?g===u[0]:u[0].match(g));)u.shift()}let c=l.source.split(`
`).map(u=>u.trim().replace("at ","")).filter(u=>u!=="");return d(c,["Error",/^trackDisposable \(.*\)$/,/^DisposableTracker.trackDisposable \(.*\)$/]),c.reverse()}let i=new Vc;for(let l of n){let d=o(l);for(let c=0;c<=d.length;c++)i.add(d.slice(0,c).join(`
`),l)}n.sort(f0(l=>l.idx,g0));let s="",a=0;for(let l of n.slice(0,t)){a++;let d=o(l),c=[];for(let u=0;u<d.length;u++){let f=d[u];f=`(shared with ${i.get(d.slice(0,u+1).join(`
`)).size}/${n.length} leaks) at ${f}`;let I=i.get(d.slice(0,u).join(`
`)),h=Iv([...I].map(C=>o(C)[u]),C=>C);delete h[d[u]];for(let[C,_]of Object.entries(h))_&&c.unshift(`    - stacktraces of ${_.length} other leaks continue with ${C}`);c.unshift(f)}s+=`


==================== Leaking disposable ${a}/${n.length}: ${l.value.constructor.name} ====================
${c.join(`
`)}
============================================================

`}return n.length>t&&(s+=`


... and ${n.length-t} more leaking disposables

`),{leaks:n,details:s}}};function l8(r){td=r}if(a8){let r="__is_disposable_tracked__";l8(new class{trackDisposable(t){let e=new Error("Potentially leaked disposable").stack;setTimeout(()=>{t[r]||console.log(e)},3e3)}setParent(t,e){if(t&&t!==K.None)try{t[r]=!0}catch{}}markAsDisposed(t){if(t&&t!==K.None)try{t[r]=!0}catch{}}markAsSingleton(t){}})}function Ia(r){return td?.trackDisposable(r),r}function ya(r){td?.markAsDisposed(r)}function nd(r,t){td?.setParent(r,t)}function d8(r,t){if(td)for(let e of r)td.setParent(e,t)}function bf(r){return td?.markAsSingleton(r),r}function Sv(r){return typeof r=="object"&&r!==null&&typeof r.dispose=="function"&&r.dispose.length===0}function Hn(r){if(Lt.is(r)){let t=[];for(let e of r)if(e)try{e.dispose()}catch(n){t.push(n)}if(t.length===1)throw t[0];if(t.length>1)throw new AggregateError(t,"Encountered errors while disposing of store");return Array.isArray(r)?[]:r}else if(r)return r.dispose(),r}function Kc(...r){let t=ae(()=>Hn(r));return d8(r,t),t}var a_=class{constructor(t){this._isDisposed=!1,this._fn=t,Ia(this)}dispose(){if(!this._isDisposed){if(!this._fn)throw new Error("Unbound disposable context: Need to use an arrow function to preserve the value of this");this._isDisposed=!0,ya(this),this._fn()}}};function ae(r){return new a_(r)}var te=class r{constructor(){this._toDispose=new Set;this._isDisposed=!1;Ia(this)}static{this.DISABLE_DISPOSED_WARNING=!1}dispose(){this._isDisposed||(ya(this),this._isDisposed=!0,this.clear())}get isDisposed(){return this._isDisposed}clear(){if(this._toDispose.size!==0)try{Hn(this._toDispose)}finally{this._toDispose.clear()}}add(t){if(!t||t===K.None)return t;if(t===this)throw new Error("Cannot register a disposable on itself!");return nd(t,this),this._isDisposed?r.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):this._toDispose.add(t),t}delete(t){if(t){if(t===this)throw new Error("Cannot dispose a disposable on itself!");this._toDispose.delete(t),t.dispose()}}deleteAndLeak(t){t&&this._toDispose.delete(t)&&nd(t,null)}assertNotDisposed(){this._isDisposed&&Ct(new Nt("Object disposed"))}},K=class{constructor(){this._store=new te;Ia(this),nd(this._store,this)}static{this.None=Object.freeze({dispose(){}})}dispose(){ya(this),this._store.dispose()}_register(t){if(t===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(t)}},An=class{constructor(){this._isDisposed=!1;Ia(this)}get value(){return this._isDisposed?void 0:this._value}set value(t){this._isDisposed||t===this._value||(this._value?.dispose(),t&&nd(t,this),this._value=t)}clear(){this.value=void 0}dispose(){this._isDisposed=!0,ya(this),this._value?.dispose(),this._value=void 0}clearAndLeak(){let t=this._value;return this._value=void 0,t&&nd(t,null),t}};var Fr=class{constructor(t=new Map){this._isDisposed=!1;this._store=t,Ia(this)}dispose(){ya(this),this._isDisposed=!0,this.clearAndDisposeAll()}clearAndDisposeAll(){if(this._store.size)try{Hn(this._store.values())}finally{this._store.clear()}}has(t){return this._store.has(t)}get size(){return this._store.size}get(t){return this._store.get(t)}set(t,e,n=!1){this._isDisposed&&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),n||this._store.get(t)?.dispose(),this._store.set(t,e),nd(e,this)}deleteAndDispose(t){this._store.get(t)?.dispose(),this._store.delete(t)}deleteAndLeak(t){let e=this._store.get(t);return e&&nd(e,null),this._store.delete(t),e}keys(){return this._store.keys()}values(){return this._store.values()}[Symbol.iterator](){return this._store[Symbol.iterator]()}};var Ev=class extends Fr{constructor(){super(new et)}};function xv(r,t){return new l_(r,t)}var l_=class{constructor(t,e){this.reducer=t;this.options=e;this.state={flowing:!1,ended:!1,destroyed:!1};this.buffer={data:[],error:[]};this.listeners={data:[],error:[],end:[]};this.pendingWritePromises=[]}pause(){this.state.destroyed||(this.state.flowing=!1)}resume(){this.state.destroyed||this.state.flowing||(this.state.flowing=!0,this.flowData(),this.flowErrors(),this.flowEnd())}write(t){if(!this.state.destroyed){if(this.state.flowing)this.emitData(t);else if(this.buffer.data.push(t),typeof this.options?.highWaterMark=="number"&&this.buffer.data.length>this.options.highWaterMark)return new Promise(e=>this.pendingWritePromises.push(e))}}error(t){this.state.destroyed||(this.state.flowing?this.emitError(t):this.buffer.error.push(t))}end(t){this.state.destroyed||(typeof t<"u"&&this.write(t),this.state.flowing?(this.emitEnd(),this.destroy()):this.state.ended=!0)}emitData(t){this.listeners.data.slice(0).forEach(e=>e(t))}emitError(t){this.listeners.error.length===0?Ct(t):this.listeners.error.slice(0).forEach(e=>e(t))}emitEnd(){this.listeners.end.slice(0).forEach(t=>t())}on(t,e){if(!this.state.destroyed)switch(t){case"data":this.listeners.data.push(e),this.resume();break;case"end":this.listeners.end.push(e),this.state.flowing&&this.flowEnd()&&this.destroy();break;case"error":this.listeners.error.push(e),this.state.flowing&&this.flowErrors();break}}removeListener(t,e){if(this.state.destroyed)return;let n;switch(t){case"data":n=this.listeners.data;break;case"end":n=this.listeners.end;break;case"error":n=this.listeners.error;break}if(n){let o=n.indexOf(e);o>=0&&n.splice(o,1)}}flowData(){if(this.buffer.data.length===0)return;if(typeof this.reducer=="function"){let e=this.reducer(this.buffer.data);this.emitData(e)}else for(let e of this.buffer.data)this.emitData(e);this.buffer.data.length=0;let t=[...this.pendingWritePromises];this.pendingWritePromises.length=0,t.forEach(e=>e())}flowErrors(){if(this.listeners.error.length>0){for(let t of this.buffer.error)this.emitError(t);this.buffer.error.length=0}}flowEnd(){return this.state.ended?(this.emitEnd(),this.listeners.end.length>0):!1}destroy(){this.state.destroyed||(this.state.destroyed=!0,this.state.ended=!0,this.buffer.data.length=0,this.buffer.error.length=0,this.listeners.data.length=0,this.listeners.error.length=0,this.listeners.end.length=0,this.pendingWritePromises.length=0)}};function D0(r,t){let e=[],n;for(;(n=r.read())!==null;)e.push(n);return t(e)}function Cv(r,t){return new Promise((e,n)=>{let o=[];d_(r,{onData:i=>{t&&o.push(i)},onError:i=>{t?n(i):e(void 0)},onEnd:()=>{e(t?t(o):void 0)}})})}function d_(r,t,e){r.on("error",n=>{e?.isCancellationRequested||t.onError(n)}),r.on("end",()=>{e?.isCancellationRequested||t.onEnd()}),r.on("data",n=>{e?.isCancellationRequested||t.onData(n)})}function w0(r,t){let e=xv(t);return e.end(r),e}var If=typeof Buffer<"u",u8=new xt(()=>new Uint8Array(256)),c_,u_,ce=class r{static alloc(t){return If?new r(Buffer.allocUnsafe(t)):new r(new Uint8Array(t))}static wrap(t){return If&&!Buffer.isBuffer(t)&&(t=Buffer.from(t.buffer,t.byteOffset,t.byteLength)),new r(t)}static fromString(t,e){return!(e?.dontUseNodeBuffer||!1)&&If?new r(Buffer.from(t)):(c_||(c_=new TextEncoder),new r(c_.encode(t)))}static fromByteArray(t){let e=r.alloc(t.length);for(let n=0,o=t.length;n<o;n++)e.buffer[n]=t[n];return e}static concat(t,e){if(typeof e>"u"){e=0;for(let i=0,s=t.length;i<s;i++)e+=t[i].byteLength}let n=r.alloc(e),o=0;for(let i=0,s=t.length;i<s;i++){let a=t[i];n.set(a,o),o+=a.byteLength}return n}static isNativeBuffer(t){return If&&Buffer.isBuffer(t)}constructor(t){this.buffer=t,this.byteLength=this.buffer.byteLength}clone(){let t=r.alloc(this.byteLength);return t.set(this),t}toString(){return If?this.buffer.toString():(u_||(u_=new TextDecoder(void 0,{ignoreBOM:!0})),u_.decode(this.buffer))}slice(t,e){return new r(this.buffer.subarray(t,e))}set(t,e){if(t instanceof r)this.buffer.set(t.buffer,e);else if(t instanceof Uint8Array)this.buffer.set(t,e);else if(t instanceof ArrayBuffer)this.buffer.set(new Uint8Array(t),e);else if(ArrayBuffer.isView(t))this.buffer.set(new Uint8Array(t.buffer,t.byteOffset,t.byteLength),e);else throw new Error("Unknown argument 'array'")}readUInt32BE(t){return yf(this.buffer,t)}writeUInt32BE(t,e){Ef(this.buffer,t,e)}readUInt32LE(t){return m8(this.buffer,t)}writeUInt32LE(t,e){f8(this.buffer,t,e)}readUInt8(t){return g8(this.buffer,t)}writeUInt8(t,e){h8(this.buffer,t,e)}indexOf(t,e=0){return p8(this.buffer,t instanceof r?t.buffer:t,e)}equals(t){return this===t?!0:this.byteLength!==t.byteLength?!1:this.buffer.every((e,n)=>e===t.buffer[n])}};function p8(r,t,e=0){let n=t.byteLength,o=r.byteLength;if(n===0)return 0;if(n===1)return r.indexOf(t[0],e);if(n>o-e)return-1;let i=u8.value;i.fill(t.length);for(let d=0;d<t.length;d++)i[t[d]]=t.length-d-1;let s=e+t.length-1,a=s,l=-1;for(;s<o;)if(r[s]===t[a]){if(a===0){l=s;break}s--,a--}else s+=Math.max(t.length-a,i[r[s]]),a=t.length-1;return l}function A0(r,t){return r[t+0]<<0>>>0|r[t+1]<<8>>>0}function O0(r,t,e){r[e+0]=t&255,t=t>>>8,r[e+1]=t&255}function yf(r,t){return r[t]*2**24+r[t+1]*2**16+r[t+2]*2**8+r[t+3]}function Ef(r,t,e){r[e+3]=t,t=t>>>8,r[e+2]=t,t=t>>>8,r[e+1]=t,t=t>>>8,r[e]=t}function m8(r,t){return r[t+0]<<0>>>0|r[t+1]<<8>>>0|r[t+2]<<16>>>0|r[t+3]<<24>>>0}function f8(r,t,e){r[e+0]=t&255,t=t>>>8,r[e+1]=t&255,t=t>>>8,r[e+2]=t&255,t=t>>>8,r[e+3]=t&255}function g8(r,t){return r[t]}function h8(r,t,e){r[e]=t}function L0(r){return D0(r,t=>ce.concat(t))}function p_(r){return Cv(r,t=>ce.concat(t))}function M0(r){return w0(r,t=>ce.concat(t))}function Qo(r){let t=0,e=0,n=0,o=new Uint8Array(Math.floor(r.length/4*3)),i=a=>{switch(e){case 3:o[n++]=t|a,e=0;break;case 2:o[n++]=t|a>>>2,t=a<<6,e=3;break;case 1:o[n++]=t|a>>>4,t=a<<4,e=2;break;default:t=a<<2,e=1}};for(let a=0;a<r.length;a++){let l=r.charCodeAt(a);if(l>=65&&l<=90)i(l-65);else if(l>=97&&l<=122)i(l-97+26);else if(l>=48&&l<=57)i(l-48+52);else if(l===43||l===45)i(62);else if(l===47||l===95)i(63);else{if(l===61)break;throw new SyntaxError(`Unexpected base64 character ${r[a]}`)}}let s=n;for(;e>0;)i(0);return ce.wrap(o).slice(0,s)}var v8="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",b8="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_";function mr({buffer:r},t=!0,e=!1){let n=e?b8:v8,o="",i=r.byteLength%3,s=0;for(;s<r.byteLength-i;s+=3){let a=r[s+0],l=r[s+1],d=r[s+2];o+=n[a>>>2],o+=n[(a<<4|l>>>4)&63],o+=n[(l<<2|d>>>6)&63],o+=n[d&63]}if(i===1){let a=r[s+0];o+=n[a>>>2],o+=n[a<<4&63],t&&(o+="==")}else if(i===2){let a=r[s+0],l=r[s+1];o+=n[a>>>2],o+=n[(a<<4|l>>>4)&63],o+=n[l<<2&63],t&&(o+="=")}return o}var R0="0123456789abcdef";function Sf({buffer:r}){let t="";for(let e=0;e<r.length;e++){let n=r[e];t+=R0[n>>>4],t+=R0[n&15]}return t}function N0(r){if(r.length%2!==0)throw new SyntaxError("Hex string must have an even length");let t=new Uint8Array(r.length>>1);for(let e=0;e<r.length;)t[e>>1]=k0(r,e++)<<4|k0(r,e++);return ce.wrap(t)}function k0(r,t){let e=r.charCodeAt(t);if(e>=48&&e<=57)return e-48;if(e>=97&&e<=102)return e-87;if(e>=65&&e<=70)return e-55;throw new SyntaxError(`Invalid hex character at position ${t}`)}var en=class r{static{this.Undefined=new r(void 0)}constructor(t){this.element=t,this.next=r.Undefined,this.prev=r.Undefined}},co=class{constructor(){this._first=en.Undefined;this._last=en.Undefined;this._size=0}get size(){return this._size}isEmpty(){return this._first===en.Undefined}clear(){let t=this._first;for(;t!==en.Undefined;){let e=t.next;t.prev=en.Undefined,t.next=en.Undefined,t=e}this._first=en.Undefined,this._last=en.Undefined,this._size=0}unshift(t){return this._insert(t,!1)}push(t){return this._insert(t,!0)}_insert(t,e){let n=new en(t);if(this._first===en.Undefined)this._first=n,this._last=n;else if(e){let i=this._last;this._last=n,n.prev=i,i.next=n}else{let i=this._first;this._first=n,n.next=i,i.prev=n}this._size+=1;let o=!1;return()=>{o||(o=!0,this._remove(n))}}shift(){if(this._first!==en.Undefined){let t=this._first.element;return this._remove(this._first),t}}pop(){if(this._last!==en.Undefined){let t=this._last.element;return this._remove(this._last),t}}peek(){if(this._last!==en.Undefined)return this._last.element}_remove(t){if(t.prev!==en.Undefined&&t.next!==en.Undefined){let e=t.prev;e.next=t.next,t.next.prev=e}else t.prev===en.Undefined&&t.next===en.Undefined?(this._first=en.Undefined,this._last=en.Undefined):t.next===en.Undefined?(this._last=this._last.prev,this._last.next=en.Undefined):t.prev===en.Undefined&&(this._first=this._first.next,this._first.prev=en.Undefined);this._size-=1}*[Symbol.iterator](){let t=this._first;for(;t!==en.Undefined;)yield t.element,t=t.next}};var I8=globalThis.performance.now.bind(globalThis.performance),uo=class r{static create(t){return new r(t)}constructor(t){this._now=t===!1?Date.now:I8,this._startTime=this._now(),this._stopTime=-1}stop(){this._stopTime=this._now()}reset(){this._startTime=this._now(),this._stopTime=-1}elapsed(){return this._stopTime!==-1?this._stopTime-this._startTime:this._now()-this._startTime}};var F0=!1,y8=!1,He;(Qe=>{Qe.None=()=>K.None;function t(q){if(y8){let{onDidAddListener:z}=q,de=xf.create(),pe=0;q.onDidAddListener=()=>{++pe===2&&(console.warn("snapshotted emitter LIKELY used public and SHOULD HAVE BEEN created with DisposableStore. snapshotted here"),de.print()),z?.()}}}function e(q,z,de){return g(q,()=>{},0,void 0,z??!0,void 0,de)}Qe.defer=e;function n(q){return(z,de=null,pe)=>{let ge=!1,Le;return Le=q(Je=>{if(!ge)return Le?Le.dispose():ge=!0,z.call(de,Je)},null,pe),ge&&Le.dispose(),Le}}Qe.once=n;function o(q,z){return Qe.once(Qe.filter(q,z))}Qe.onceIf=o;function i(q,z,de){return u((pe,ge=null,Le)=>q(Je=>pe.call(ge,z(Je)),null,Le),de)}Qe.map=i;function s(q,z,de){return u((pe,ge=null,Le)=>q(Je=>{z(Je),pe.call(ge,Je)},null,Le),de)}Qe.forEach=s;function a(q,z,de){return u((pe,ge=null,Le)=>q(Je=>z(Je)&&pe.call(ge,Je),null,Le),de)}Qe.filter=a;function l(q){return q}Qe.signal=l;function d(...q){return(z,de=null,pe)=>{let ge=Kc(...q.map(Le=>Le(Je=>z.call(de,Je))));return f(ge,pe)}}Qe.any=d;function c(q,z,de,pe){let ge=de;return i(q,Le=>(ge=z(ge,Le),ge),pe)}Qe.reduce=c;function u(q,z){let de,pe={onWillAddFirstListener(){de=q(ge.fire,ge)},onDidRemoveLastListener(){de?.dispose()}};z||t(pe);let ge=new D(pe);return z?.add(ge),ge.event}function f(q,z){return z instanceof Array?z.push(q):z&&z.add(q),q}function g(q,z,de=100,pe=!1,ge=!1,Le,Je){let Ge,ft,kt,ot=0,rn,vn={leakWarningThreshold:Le,onWillAddFirstListener(){Ge=q(ua=>{ot++,ft=z(ft,ua),pe&&!kt&&(so.fire(ft),ft=void 0),rn=()=>{let pa=ft;ft=void 0,kt=void 0,(!pe||ot>1)&&so.fire(pa),ot=0},typeof de=="number"?(kt&&clearTimeout(kt),kt=setTimeout(rn,de)):kt===void 0&&(kt=null,queueMicrotask(rn))})},onWillRemoveListener(){ge&&ot>0&&rn?.()},onDidRemoveLastListener(){rn=void 0,Ge.dispose()}};Je||t(vn);let so=new D(vn);return Je?.add(so),so.event}Qe.debounce=g;function I(q,z=0,de,pe){return Qe.debounce(q,(ge,Le)=>ge?(ge.push(Le),ge):[Le],z,void 0,de??!0,void 0,pe)}Qe.accumulate=I;function h(q,z,de=100,pe=!0,ge=!0,Le,Je){let Ge,ft,kt,ot=0,rn={leakWarningThreshold:Le,onWillAddFirstListener(){Ge=q(so=>{ot++,ft=z(ft,so),kt===void 0&&(pe&&(vn.fire(ft),ft=void 0,ot=0),typeof de=="number"?kt=setTimeout(()=>{ge&&ot>0&&vn.fire(ft),ft=void 0,kt=void 0,ot=0},de):(kt=0,queueMicrotask(()=>{ge&&ot>0&&vn.fire(ft),ft=void 0,kt=void 0,ot=0})))})},onDidRemoveLastListener(){Ge.dispose()}};Je||t(rn);let vn=new D(rn);return Je?.add(vn),vn.event}Qe.throttle=h;function C(q,z=(pe,ge)=>pe===ge,de){let pe=!0,ge;return a(q,Le=>{let Je=pe||!z(Le,ge);return pe=!1,ge=Le,Je},de)}Qe.latch=C;function _(q,z,de){return[Qe.filter(q,z,de),Qe.filter(q,pe=>!z(pe),de)]}Qe.split=_;function R(q,z=!1,de=[],pe){let ge=de.slice(),Le=q(ft=>{ge?ge.push(ft):Ge.fire(ft)});pe&&pe.add(Le);let Je=()=>{ge?.forEach(ft=>Ge.fire(ft)),ge=null},Ge=new D({onWillAddFirstListener(){Le||(Le=q(ft=>Ge.fire(ft)),pe&&pe.add(Le))},onDidAddFirstListener(){ge&&(z?setTimeout(Je):Je())},onDidRemoveLastListener(){Le&&Le.dispose(),Le=null}});return pe&&pe.add(Ge),Ge.event}Qe.buffer=R;function O(q,z){return(pe,ge,Le)=>{let Je=z(new ie);return q(function(Ge){let ft=Je.evaluate(Ge);ft!==U&&pe.call(ge,ft)},void 0,Le)}}Qe.chain=O;let U=Symbol("HaltChainable");class ie{constructor(){this.steps=[]}map(z){return this.steps.push(z),this}forEach(z){return this.steps.push(de=>(z(de),de)),this}filter(z){return this.steps.push(de=>z(de)?de:U),this}reduce(z,de){let pe=de;return this.steps.push(ge=>(pe=z(pe,ge),pe)),this}latch(z=(de,pe)=>de===pe){let de=!0,pe;return this.steps.push(ge=>{let Le=de||!z(ge,pe);return de=!1,pe=ge,Le?ge:U}),this}evaluate(z){for(let de of this.steps)if(z=de(z),z===U)break;return z}}function Y(q,z,de=pe=>pe){let pe=(...Ge)=>Je.fire(de(...Ge)),ge=()=>q.on(z,pe),Le=()=>q.removeListener(z,pe),Je=new D({onWillAddFirstListener:ge,onDidRemoveLastListener:Le});return Je.event}Qe.fromNodeEventEmitter=Y;function Z(q,z,de=pe=>pe){let pe=(...Ge)=>Je.fire(de(...Ge)),ge=()=>q.addEventListener(z,pe),Le=()=>q.removeEventListener(z,pe),Je=new D({onWillAddFirstListener:ge,onDidRemoveLastListener:Le});return Je.event}Qe.fromDOMEventEmitter=Z;function ee(q,z){let de,pe,ge=new Promise(Le=>{pe=n(q)(Le),b_(pe,z),de=()=>{B0(pe,z)}});return ge.cancel=de,z&&ge.finally(()=>B0(pe,z)),ge}Qe.toPromise=ee;function oe(q,z){return q(de=>z.fire(de))}Qe.forward=oe;function ke(q,z,de){return z(de),q(pe=>z(pe))}Qe.runAndSubscribe=ke;class B{constructor(z,de){this._observable=z;this._counter=0;this._hasChanged=!1;let pe={onWillAddFirstListener:()=>{z.addObserver(this),this._observable.reportChanges()},onDidRemoveLastListener:()=>{z.removeObserver(this)}};de||t(pe),this.emitter=new D(pe),de&&de.add(this.emitter)}beginUpdate(z){this._counter++}handlePossibleChange(z){}handleChange(z,de){this._hasChanged=!0}endUpdate(z){this._counter--,this._counter===0&&(this._observable.reportChanges(),this._hasChanged&&(this._hasChanged=!1,this.emitter.fire(this._observable.get())))}}function Xe(q,z){return new B(q,z).emitter.event}Qe.fromObservable=Xe;function it(q){return(z,de,pe)=>{let ge=0,Le=!1,Je={beginUpdate(){ge++},endUpdate(){ge--,ge===0&&(q.reportChanges(),Le&&(Le=!1,z.call(de)))},handlePossibleChange(){},handleChange(){Le=!0}};q.addObserver(Je),q.reportChanges();let Ge={dispose(){q.removeObserver(Je)}};return b_(Ge,pe),Ge}}Qe.fromObservableLight=it})(He||={});var m_=class r{constructor(t){this.listenerCount=0;this.invocationCount=0;this.elapsedOverall=0;this.durations=[];this.name=`${t}_${r._idPool++}`,r.all.add(this)}static{this.all=new Set}static{this._idPool=0}start(t){this._stopWatch=new uo,this.listenerCount=t}stop(){if(this._stopWatch){let t=this._stopWatch.elapsed();this.durations.push(t),this.elapsedOverall+=t,this.invocationCount+=1,this._stopWatch=void 0}}},H0=-1;var f_=class r{constructor(t,e,n=(r._idPool++).toString(16).padStart(3,"0")){this._errorHandler=t;this.threshold=e;this.name=n;this._warnCountdown=0}static{this._idPool=1}dispose(){this._stacks?.clear()}check(t,e){let n=this.threshold;if(n<=0||e<n)return;this._stacks||(this._stacks=new Map);let o=this._stacks.get(t.value)||0;if(this._stacks.set(t.value,o+1),this._warnCountdown-=1,this._warnCountdown<=0){this._warnCountdown=n*.5;let[i,s]=this.getMostFrequentStack(),a=`[${this.name}] potential listener LEAK detected, having ${e} listeners already. MOST frequent listener (${s}):`;console.warn(a),console.warn(i);let l=new g_(a,i);this._errorHandler(l)}return()=>{let i=this._stacks.get(t.value)||0;this._stacks.set(t.value,i-1)}}getMostFrequentStack(){if(!this._stacks)return;let t,e=0;for(let[n,o]of this._stacks)(!t||e<o)&&(t=[n,o],e=o);return t}},xf=class r{constructor(t){this.value=t}static create(){let t=new Error;return new r(t.stack??"")}print(){console.warn(this.value.split(`
`).slice(2).join(`
`))}},g_=class extends Error{constructor(t,e){super(t),this.name="ListenerLeakError",this.stack=e}},h_=class extends Error{constructor(t,e){super(t),this.name="ListenerRefusalError",this.stack=e}},E8=0,Jc=class{constructor(t){this.value=t;this.id=E8++}},S8=2,V0=(r,t)=>{if(r instanceof Jc)t(r);else for(let e=0;e<r.length;e++){let n=r[e];n&&t(n)}},D=class{constructor(t){this._size=0;this._options=t,this._leakageMon=H0>0||this._options?.leakWarningThreshold?new f_(t?.onListenerError??Ct,this._options?.leakWarningThreshold??H0):void 0,this._perfMon=this._options?._profName?new m_(this._options._profName):void 0,this._deliveryQueue=this._options?.deliveryQueue}dispose(){if(!this._disposed){if(this._disposed=!0,this._deliveryQueue?.current===this&&this._deliveryQueue.reset(),this._listeners){if(F0){let t=this._listeners;queueMicrotask(()=>{V0(t,e=>e.stack?.print())})}this._listeners=void 0,this._size=0}this._options?.onDidRemoveLastListener?.(),this._leakageMon?.dispose()}}get event(){return this._event??=(t,e,n)=>{if(this._leakageMon&&this._size>this._leakageMon.threshold**2){let l=`[${this._leakageMon.name}] REFUSES to accept new listeners because it exceeded its threshold by far (${this._size} vs ${this._leakageMon.threshold})`;console.warn(l);let d=this._leakageMon.getMostFrequentStack()??["UNKNOWN stack",-1],c=new h_(`${l}. HINT: Stack shows most frequent listener (${d[1]}-times)`,d[0]);return(this._options?.onListenerError||Ct)(c),K.None}if(this._disposed)return K.None;e&&(t=t.bind(e));let o=new Jc(t),i,s;this._leakageMon&&this._size>=Math.ceil(this._leakageMon.threshold*.2)&&(o.stack=xf.create(),i=this._leakageMon.check(o.stack,this._size+1)),F0&&(o.stack=s??xf.create()),this._listeners?this._listeners instanceof Jc?(this._deliveryQueue??=new v_,this._listeners=[this._listeners,o]):this._listeners.push(o):(this._options?.onWillAddFirstListener?.(this),this._listeners=o,this._options?.onDidAddFirstListener?.(this)),this._options?.onDidAddListener?.(this),this._size++;let a=ae(()=>{i?.(),this._removeListener(o)});return b_(a,n),a},this._event}_removeListener(t){if(this._options?.onWillRemoveListener?.(this),!this._listeners)return;if(this._size===1){this._listeners=void 0,this._options?.onDidRemoveLastListener?.(this),this._size=0;return}let e=this._listeners,n=e.indexOf(t);if(n===-1)throw console.log("disposed?",this._disposed),console.log("size?",this._size),console.log("arr?",JSON.stringify(this._listeners)),new Error("Attempted to dispose unknown listener");this._size--,e[n]=void 0;let o=this._deliveryQueue.current===this;if(this._size*S8<=e.length){let i=0;for(let s=0;s<e.length;s++)e[s]?e[i++]=e[s]:o&&i<this._deliveryQueue.end&&(this._deliveryQueue.end--,i<this._deliveryQueue.i&&this._deliveryQueue.i--);e.length=i}}_deliver(t,e){if(!t)return;let n=this._options?.onListenerError||Ct;if(!n){t.value(e);return}try{t.value(e)}catch(o){n(o)}}_deliverQueue(t){let e=t.current._listeners;for(;t.i<t.end;)this._deliver(e[t.i++],t.value);t.reset()}fire(t){if(this._deliveryQueue?.current&&(this._deliverQueue(this._deliveryQueue),this._perfMon?.stop()),this._perfMon?.start(this._size),this._listeners)if(this._listeners instanceof Jc)this._deliver(this._listeners,t);else{let e=this._deliveryQueue;e.enqueue(this,t,this._listeners.length),this._deliverQueue(e)}this._perfMon?.stop()}hasListeners(){return this._size>0}};var v_=class{constructor(){this.i=-1;this.end=0}enqueue(t,e,n){this.i=0,this.end=n,this.current=t,this.value=e}reset(){this.i=this.end,this.current=void 0,this.value=void 0}},yi=class extends D{async fireAsync(t,e,n){if(this._listeners)for(this._asyncDeliveryQueue||(this._asyncDeliveryQueue=new co),V0(this._listeners,o=>this._asyncDeliveryQueue.push([o.value,t]));this._asyncDeliveryQueue.size>0&&!e.isCancellationRequested;){let[o,i]=this._asyncDeliveryQueue.shift(),s=[],a={...i,token:e,waitUntil:l=>{if(Object.isFrozen(s))throw new Error("waitUntil can NOT be called asynchronous");n&&(l=n(l,o)),s.push(l)}};try{o(a)}catch(l){Ct(l);continue}Object.freeze(s),await Promise.allSettled(s).then(l=>{for(let d of l)d.status==="rejected"&&Ct(d.reason)})}}},Ea=class extends D{constructor(e){super(e);this._isPaused=0;this._eventQueue=new co;this._mergeFn=e?.merge}get isPaused(){return this._isPaused!==0}pause(){this._isPaused++}resume(){if(this._isPaused!==0&&--this._isPaused===0)if(this._mergeFn){if(this._eventQueue.size>0){let e=Array.from(this._eventQueue);this._eventQueue.clear(),super.fire(this._mergeFn(e))}}else for(;!this._isPaused&&this._eventQueue.size!==0;)super.fire(this._eventQueue.shift())}fire(e){this._size&&(this._isPaused!==0?this._eventQueue.push(e):super.fire(e))}},Tv=class extends Ea{constructor(t){super(t),this._delay=t.delay??100}fire(t){this._handle||(this.pause(),this._handle=setTimeout(()=>{this._handle=void 0,this.resume()},this._delay)),super.fire(t)}},_v=class extends D{constructor(e){super(e);this._queuedEvents=[];this._mergeFn=e?.merge}fire(e){this.hasListeners()&&(this._queuedEvents.push(e),this._queuedEvents.length===1&&queueMicrotask(()=>{this._mergeFn?super.fire(this._mergeFn(this._queuedEvents)):this._queuedEvents.forEach(n=>super.fire(n)),this._queuedEvents=[]}))}};function b_(r,t){t instanceof te?t.add(r):Array.isArray(t)&&t.push(r)}function B0(r,t){if(t instanceof te)t.delete(r);else if(Array.isArray(t)){let e=t.indexOf(r);e!==-1&&t.splice(e,1)}r.dispose()}var Pv=(e=>(e[e.Desktop=1]="Desktop",e[e.Web=2]="Web",e))(Pv||{});function I_(r){let t=ce.alloc(1);switch(r){case 0:t.writeUInt8(1,0);break;case 1:t.writeUInt8(2,0);break;case 2:t.writeUInt8(3,0);break}return t}function W0(r,t){if(r.byteLength!==1)return!1;switch(r.readUInt8(0)){case 1:return t===0;case 2:return t===1;case 3:return t===2;default:return!1}}function y_(r){let t=[];typeof r=="number"&&t.push("code/timeOrigin",r);function e(o,i){t.push(o,i?.startTime??Date.now())}function n(){let o=[];for(let i=0;i<t.length;i+=2)o.push({name:t[i],startTime:t[i+1]});return o}return{mark:e,getMarks:n}}function x8(){if(typeof performance=="object"&&typeof performance.mark=="function"&&!performance.nodeTiming)return typeof performance.timeOrigin!="number"&&!performance.timing?y_():{mark(r,t){performance.mark(r,t)},getMarks(){let r=performance.timeOrigin;typeof r!="number"&&(r=(performance.timing.navigationStart||performance.timing.redirectStart||performance.timing.fetchStart)??0);let t=[{name:"code/timeOrigin",startTime:Math.round(r)}];for(let e of performance.getEntriesByType("mark"))t.push({name:e.name,startTime:Math.round(r+e.startTime)});return t}};if(typeof process=="object"){let r=performance?.timeOrigin;return y_(r)}else return console.trace("perf-util loaded in UNKNOWN environment"),y_()}function C8(r){return r.MonacoPerformanceMarks||(r.MonacoPerformanceMarks=x8()),r.MonacoPerformanceMarks}var $0=C8(globalThis),On=$0.mark,G0=$0.getMarks;function T8(){return globalThis._VSCODE_NLS_MESSAGES}function E_(){return globalThis._VSCODE_NLS_LANGUAGE}var _8=E_()==="pseudo"||typeof document<"u"&&document.location&&typeof document.location.hash=="string"&&document.location.hash.indexOf("pseudo=true")>=0;function wv(r,t){let e;return t.length===0?e=r:e=r.replace(/\{(\d+)\}/g,(n,o)=>{let i=t[parseInt(o)],s=n;return typeof i=="string"?s=i:(typeof i=="number"||typeof i=="boolean"||i===void 0||i===null)&&(s=String(i)),s}),_8&&(e="\uFF3B"+e.replace(/[aouei]/g,"$&$&")+"\uFF3D"),e}function p(r,t,...e){return wv(typeof r=="number"?z0(r,t):t,e)}function z0(r,t){let e=T8()?.[r];if(typeof e!="string"){if(typeof t=="string")return t;throw new Error(`!!! NLS MISSING: ${r} !!!`)}return e}function od(r,t,...e){let n;typeof r=="number"?n=z0(r,t):n=t;let o=wv(n,e);return{value:o,original:t===n?o:wv(t,e)}}var Ei="en",Tf=!1,_f=!1,Cf=!1,P8=!1,j0=!1,x_=!1,D8=!1,C_=!1,Q0=!1,X0=!1,Rv,kv=Ei,q0=Ei,w8,ds,cs=globalThis,No;typeof cs.vscode<"u"&&typeof cs.vscode.process<"u"?No=cs.vscode.process:typeof process<"u"&&typeof process?.versions?.node=="string"&&(No=process);var Y0=typeof No?.versions?.electron=="string",R8=Y0&&No?.type==="renderer";if(typeof No=="object"){Tf=No.platform==="win32",_f=No.platform==="darwin",Cf=No.platform==="linux",P8=Cf&&!!No.env.SNAP&&!!No.env.SNAP_REVISION,D8=Y0,Q0=!!No.env.CI||!!No.env.BUILD_ARTIFACTSTAGINGDIRECTORY||!!No.env.GITHUB_WORKSPACE,Rv=Ei,kv=Ei;let r=No.env.VSCODE_NLS_CONFIG;if(r)try{let t=JSON.parse(r);Rv=t.userLocale,q0=t.osLocale,kv=t.resolvedLanguage||Ei,w8=t.languagePack?.translationsConfigFile}catch{}j0=!0}else typeof navigator=="object"&&!R8?(ds=navigator.userAgent,Tf=ds.indexOf("Windows")>=0,_f=ds.indexOf("Macintosh")>=0,C_=(ds.indexOf("Macintosh")>=0||ds.indexOf("iPad")>=0||ds.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,Cf=ds.indexOf("Linux")>=0,X0=ds?.indexOf("Mobi")>=0,x_=!0,kv=E_()||Ei,Rv=navigator.language.toLowerCase(),q0=Rv):console.error("Unable to resolve platform.");function T_(r){switch(r){case 0:return"Web";case 1:return"Mac";case 2:return"Linux";case 3:return"Windows"}}var S_=0;_f?S_=1:Tf?S_=3:Cf&&(S_=2);var Rt=Tf,hn=_f,zn=Cf;var Av=j0;var Xo=x_,k8=x_&&typeof cs.importScripts=="function",Z0=k8?cs.origin:void 0,eU=C_,tU=X0,xa=Q0;var Si=ds,Sa=kv,A8;(n=>{function r(){return Sa}n.value=r;function t(){return Sa.length===2?Sa==="en":Sa.length>=3?Sa[0]==="e"&&Sa[1]==="n"&&Sa[2]==="-":!1}n.isDefaultVariant=t;function e(){return Sa==="en"}n.isDefault=e})(A8||={});var O8=typeof cs.postMessage=="function"&&!cs.importScripts,Ov=(()=>{if(O8){let r=[];cs.addEventListener("message",e=>{if(e.data&&e.data.vscodeScheduleAsyncWork)for(let n=0,o=r.length;n<o;n++){let i=r[n];if(i.id===e.data.vscodeScheduleAsyncWork){r.splice(n,1),i.callback();return}}});let t=0;return e=>{let n=++t;r.push({id:n,callback:e}),cs.postMessage({vscodeScheduleAsyncWork:n},"*")}}return r=>setTimeout(r)})();var xi=_f||C_?2:Tf?1:3,K0=!0,J0=!1;function Lv(){if(!J0){J0=!0;let r=new Uint8Array(2);r[0]=1,r[1]=2,K0=new Uint16Array(r.buffer)[0]===513}return K0}var Pf=!!(Si&&Si.indexOf("Chrome")>=0),nU=!!(Si&&Si.indexOf("Firefox")>=0),oU=!!(!Pf&&Si&&Si.indexOf("Safari")>=0),Mv=!!(Si&&Si.indexOf("Edg/")>=0),ij=!!(Si&&Si.indexOf("Android")>=0);var id,__=globalThis.vscode;if(typeof __<"u"&&typeof __.process<"u"){let r=__.process;id={get platform(){return r.platform},get arch(){return r.arch},get env(){return r.env},cwd(){return r.cwd()}}}else typeof process<"u"&&typeof process?.versions?.node=="string"?id={get platform(){return process.platform},get arch(){return process.arch},get env(){return process.env},cwd(){return process.env.VSCODE_CWD||process.cwd()}}:id={get platform(){return Rt?"win32":hn?"darwin":"linux"},get arch(){},get env(){return{}},cwd(){return"/"}};var us=id.cwd,Hr=id.env,P_=id.platform,L8=id.arch;var M8=65,N8=97,U8=90,F8=122,sd=46,qn=47,Uo=92,ps=58,H8=63,Nv=class extends Error{constructor(t,e,n){let o;typeof e=="string"&&e.indexOf("not ")===0?(o="must not be",e=e.replace(/^not /,"")):o="must be";let i=t.indexOf(".")!==-1?"property":"argument",s=`The "${t}" ${i} ${o} of type ${e}`;s+=`. Received type ${typeof n}`,super(s),this.code="ERR_INVALID_ARG_TYPE"}};function B8(r,t){if(r===null||typeof r!="object")throw new Nv(t,"Object",r)}function bn(r,t){if(typeof r!="string")throw new Nv(t,"string",r)}var Fo=P_==="win32";function at(r){return r===qn||r===Uo}function w_(r){return r===qn}function ms(r){return r>=M8&&r<=U8||r>=N8&&r<=F8}function Uv(r,t,e,n){let o="",i=0,s=-1,a=0,l=0;for(let d=0;d<=r.length;++d){if(d<r.length)l=r.charCodeAt(d);else{if(n(l))break;l=qn}if(n(l)){if(!(s===d-1||a===1))if(a===2){if(o.length<2||i!==2||o.charCodeAt(o.length-1)!==sd||o.charCodeAt(o.length-2)!==sd){if(o.length>2){let c=o.lastIndexOf(e);c===-1?(o="",i=0):(o=o.slice(0,c),i=o.length-1-o.lastIndexOf(e)),s=d,a=0;continue}else if(o.length!==0){o="",i=0,s=d,a=0;continue}}t&&(o+=o.length>0?`${e}..`:"..",i=2)}else o.length>0?o+=`${e}${r.slice(s+1,d)}`:o=r.slice(s+1,d),i=d-s-1;s=d,a=0}else l===sd&&a!==-1?++a:a=-1}return o}function V8(r){return r?`${r[0]==="."?"":"."}${r}`:""}function rU(r,t){B8(t,"pathObject");let e=t.dir||t.root,n=t.base||`${t.name||""}${V8(t.ext)}`;return e?e===t.root?`${e}${n}`:`${e}${r}${n}`:n}var ln={resolve(...r){let t="",e="",n=!1;for(let o=r.length-1;o>=-1;o--){let i;if(o>=0){if(i=r[o],bn(i,`paths[${o}]`),i.length===0)continue}else t.length===0?i=us():(i=Hr[`=${t}`]||us(),(i===void 0||i.slice(0,2).toLowerCase()!==t.toLowerCase()&&i.charCodeAt(2)===Uo)&&(i=`${t}\\`));let s=i.length,a=0,l="",d=!1,c=i.charCodeAt(0);if(s===1)at(c)&&(a=1,d=!0);else if(at(c))if(d=!0,at(i.charCodeAt(1))){let u=2,f=u;for(;u<s&&!at(i.charCodeAt(u));)u++;if(u<s&&u!==f){let g=i.slice(f,u);for(f=u;u<s&&at(i.charCodeAt(u));)u++;if(u<s&&u!==f){for(f=u;u<s&&!at(i.charCodeAt(u));)u++;(u===s||u!==f)&&(l=`\\\\${g}\\${i.slice(f,u)}`,a=u)}}}else a=1;else ms(c)&&i.charCodeAt(1)===ps&&(l=i.slice(0,2),a=2,s>2&&at(i.charCodeAt(2))&&(d=!0,a=3));if(l.length>0)if(t.length>0){if(l.toLowerCase()!==t.toLowerCase())continue}else t=l;if(n){if(t.length>0)break}else if(e=`${i.slice(a)}\\${e}`,n=d,d&&t.length>0)break}return e=Uv(e,!n,"\\",at),n?`${t}\\${e}`:`${t}${e}`||"."},normalize(r){bn(r,"path");let t=r.length;if(t===0)return".";let e=0,n,o=!1,i=r.charCodeAt(0);if(t===1)return w_(i)?"\\":r;if(at(i))if(o=!0,at(r.charCodeAt(1))){let a=2,l=a;for(;a<t&&!at(r.charCodeAt(a));)a++;if(a<t&&a!==l){let d=r.slice(l,a);for(l=a;a<t&&at(r.charCodeAt(a));)a++;if(a<t&&a!==l){for(l=a;a<t&&!at(r.charCodeAt(a));)a++;if(a===t)return`\\\\${d}\\${r.slice(l)}\\`;a!==l&&(n=`\\\\${d}\\${r.slice(l,a)}`,e=a)}}}else e=1;else ms(i)&&r.charCodeAt(1)===ps&&(n=r.slice(0,2),e=2,t>2&&at(r.charCodeAt(2))&&(o=!0,e=3));let s=e<t?Uv(r.slice(e),!o,"\\",at):"";if(s.length===0&&!o&&(s="."),s.length>0&&at(r.charCodeAt(t-1))&&(s+="\\"),!o&&n===void 0&&r.includes(":")){if(s.length>=2&&ms(s.charCodeAt(0))&&s.charCodeAt(1)===ps)return`.\\${s}`;let a=r.indexOf(":");do if(a===t-1||at(r.charCodeAt(a+1)))return`.\\${s}`;while((a=r.indexOf(":",a+1))!==-1)}return n===void 0?o?`\\${s}`:s:o?`${n}\\${s}`:`${n}${s}`},isAbsolute(r){bn(r,"path");let t=r.length;if(t===0)return!1;let e=r.charCodeAt(0);return at(e)||t>2&&ms(e)&&r.charCodeAt(1)===ps&&at(r.charCodeAt(2))},join(...r){if(r.length===0)return".";let t,e;for(let i=0;i<r.length;++i){let s=r[i];bn(s,"path"),s.length>0&&(t===void 0?t=e=s:t+=`\\${s}`)}if(t===void 0)return".";let n=!0,o=0;if(typeof e=="string"&&at(e.charCodeAt(0))){++o;let i=e.length;i>1&&at(e.charCodeAt(1))&&(++o,i>2&&(at(e.charCodeAt(2))?++o:n=!1))}if(n){for(;o<t.length&&at(t.charCodeAt(o));)o++;o>=2&&(t=`\\${t.slice(o)}`)}return ln.normalize(t)},relative(r,t){if(bn(r,"from"),bn(t,"to"),r===t)return"";let e=ln.resolve(r),n=ln.resolve(t);if(e===n||(r=e.toLowerCase(),t=n.toLowerCase(),r===t))return"";if(e.length!==r.length||n.length!==t.length){let I=e.split("\\"),h=n.split("\\");I[I.length-1]===""&&I.pop(),h[h.length-1]===""&&h.pop();let C=I.length,_=h.length,R=C<_?C:_,O;for(O=0;O<R&&I[O].toLowerCase()===h[O].toLowerCase();O++);return O===0?n:O===R?_>R?h.slice(O).join("\\"):C>R?"..\\".repeat(C-1-O)+"..":"":"..\\".repeat(C-O)+h.slice(O).join("\\")}let o=0;for(;o<r.length&&r.charCodeAt(o)===Uo;)o++;let i=r.length;for(;i-1>o&&r.charCodeAt(i-1)===Uo;)i--;let s=i-o,a=0;for(;a<t.length&&t.charCodeAt(a)===Uo;)a++;let l=t.length;for(;l-1>a&&t.charCodeAt(l-1)===Uo;)l--;let d=l-a,c=s<d?s:d,u=-1,f=0;for(;f<c;f++){let I=r.charCodeAt(o+f);if(I!==t.charCodeAt(a+f))break;I===Uo&&(u=f)}if(f!==c){if(u===-1)return n}else{if(d>c){if(t.charCodeAt(a+f)===Uo)return n.slice(a+f+1);if(f===2)return n.slice(a+f)}s>c&&(r.charCodeAt(o+f)===Uo?u=f:f===2&&(u=3)),u===-1&&(u=0)}let g="";for(f=o+u+1;f<=i;++f)(f===i||r.charCodeAt(f)===Uo)&&(g+=g.length===0?"..":"\\..");return a+=u,g.length>0?`${g}${n.slice(a,l)}`:(n.charCodeAt(a)===Uo&&++a,n.slice(a,l))},toNamespacedPath(r){if(typeof r!="string"||r.length===0)return r;let t=ln.resolve(r);if(t.length<=2)return r;if(t.charCodeAt(0)===Uo){if(t.charCodeAt(1)===Uo){let e=t.charCodeAt(2);if(e!==H8&&e!==sd)return`\\\\?\\UNC\\${t.slice(2)}`}}else if(ms(t.charCodeAt(0))&&t.charCodeAt(1)===ps&&t.charCodeAt(2)===Uo)return`\\\\?\\${t}`;return t},dirname(r){bn(r,"path");let t=r.length;if(t===0)return".";let e=-1,n=0,o=r.charCodeAt(0);if(t===1)return at(o)?r:".";if(at(o)){if(e=n=1,at(r.charCodeAt(1))){let a=2,l=a;for(;a<t&&!at(r.charCodeAt(a));)a++;if(a<t&&a!==l){for(l=a;a<t&&at(r.charCodeAt(a));)a++;if(a<t&&a!==l){for(l=a;a<t&&!at(r.charCodeAt(a));)a++;if(a===t)return r;a!==l&&(e=n=a+1)}}}}else ms(o)&&r.charCodeAt(1)===ps&&(e=t>2&&at(r.charCodeAt(2))?3:2,n=e);let i=-1,s=!0;for(let a=t-1;a>=n;--a)if(at(r.charCodeAt(a))){if(!s){i=a;break}}else s=!1;if(i===-1){if(e===-1)return".";i=e}return r.slice(0,i)},basename(r,t){t!==void 0&&bn(t,"suffix"),bn(r,"path");let e=0,n=-1,o=!0,i;if(r.length>=2&&ms(r.charCodeAt(0))&&r.charCodeAt(1)===ps&&(e=2),t!==void 0&&t.length>0&&t.length<=r.length){if(t===r)return"";let s=t.length-1,a=-1;for(i=r.length-1;i>=e;--i){let l=r.charCodeAt(i);if(at(l)){if(!o){e=i+1;break}}else a===-1&&(o=!1,a=i+1),s>=0&&(l===t.charCodeAt(s)?--s===-1&&(n=i):(s=-1,n=a))}return e===n?n=a:n===-1&&(n=r.length),r.slice(e,n)}for(i=r.length-1;i>=e;--i)if(at(r.charCodeAt(i))){if(!o){e=i+1;break}}else n===-1&&(o=!1,n=i+1);return n===-1?"":r.slice(e,n)},extname(r){bn(r,"path");let t=0,e=-1,n=0,o=-1,i=!0,s=0;r.length>=2&&r.charCodeAt(1)===ps&&ms(r.charCodeAt(0))&&(t=n=2);for(let a=r.length-1;a>=t;--a){let l=r.charCodeAt(a);if(at(l)){if(!i){n=a+1;break}continue}o===-1&&(i=!1,o=a+1),l===sd?e===-1?e=a:s!==1&&(s=1):e!==-1&&(s=-1)}return e===-1||o===-1||s===0||s===1&&e===o-1&&e===n+1?"":r.slice(e,o)},format:rU.bind(null,"\\"),parse(r){bn(r,"path");let t={root:"",dir:"",base:"",ext:"",name:""};if(r.length===0)return t;let e=r.length,n=0,o=r.charCodeAt(0);if(e===1)return at(o)?(t.root=t.dir=r,t):(t.base=t.name=r,t);if(at(o)){if(n=1,at(r.charCodeAt(1))){let u=2,f=u;for(;u<e&&!at(r.charCodeAt(u));)u++;if(u<e&&u!==f){for(f=u;u<e&&at(r.charCodeAt(u));)u++;if(u<e&&u!==f){for(f=u;u<e&&!at(r.charCodeAt(u));)u++;u===e?n=u:u!==f&&(n=u+1)}}}}else if(ms(o)&&r.charCodeAt(1)===ps){if(e<=2)return t.root=t.dir=r,t;if(n=2,at(r.charCodeAt(2))){if(e===3)return t.root=t.dir=r,t;n=3}}n>0&&(t.root=r.slice(0,n));let i=-1,s=n,a=-1,l=!0,d=r.length-1,c=0;for(;d>=n;--d){if(o=r.charCodeAt(d),at(o)){if(!l){s=d+1;break}continue}a===-1&&(l=!1,a=d+1),o===sd?i===-1?i=d:c!==1&&(c=1):i!==-1&&(c=-1)}return a!==-1&&(i===-1||c===0||c===1&&i===a-1&&i===s+1?t.base=t.name=r.slice(s,a):(t.name=r.slice(s,i),t.base=r.slice(s,a),t.ext=r.slice(i,a))),s>0&&s!==n?t.dir=r.slice(0,s-1):t.dir=t.root,t},sep:"\\",delimiter:";",win32:null,posix:null},W8=(()=>{if(Fo){let r=/\\/g;return()=>{let t=us().replace(r,"/");return t.slice(t.indexOf("/"))}}return()=>us()})(),qe={resolve(...r){let t="",e=!1;for(let n=r.length-1;n>=0&&!e;n--){let o=r[n];bn(o,`paths[${n}]`),o.length!==0&&(t=`${o}/${t}`,e=o.charCodeAt(0)===qn)}if(!e){let n=W8();t=`${n}/${t}`,e=n.charCodeAt(0)===qn}return t=Uv(t,!e,"/",w_),e?`/${t}`:t.length>0?t:"."},normalize(r){if(bn(r,"path"),r.length===0)return".";let t=r.charCodeAt(0)===qn,e=r.charCodeAt(r.length-1)===qn;return r=Uv(r,!t,"/",w_),r.length===0?t?"/":e?"./":".":(e&&(r+="/"),t?`/${r}`:r)},isAbsolute(r){return bn(r,"path"),r.length>0&&r.charCodeAt(0)===qn},join(...r){if(r.length===0)return".";let t=[];for(let e=0;e<r.length;++e){let n=r[e];bn(n,"path"),n.length>0&&t.push(n)}return t.length===0?".":qe.normalize(t.join("/"))},relative(r,t){if(bn(r,"from"),bn(t,"to"),r===t||(r=qe.resolve(r),t=qe.resolve(t),r===t))return"";let e=1,n=r.length,o=n-e,i=1,s=t.length-i,a=o<s?o:s,l=-1,d=0;for(;d<a;d++){let u=r.charCodeAt(e+d);if(u!==t.charCodeAt(i+d))break;u===qn&&(l=d)}if(d===a)if(s>a){if(t.charCodeAt(i+d)===qn)return t.slice(i+d+1);if(d===0)return t.slice(i+d)}else o>a&&(r.charCodeAt(e+d)===qn?l=d:d===0&&(l=0));let c="";for(d=e+l+1;d<=n;++d)(d===n||r.charCodeAt(d)===qn)&&(c+=c.length===0?"..":"/..");return`${c}${t.slice(i+l)}`},toNamespacedPath(r){return r},dirname(r){if(bn(r,"path"),r.length===0)return".";let t=r.charCodeAt(0)===qn,e=-1,n=!0;for(let o=r.length-1;o>=1;--o)if(r.charCodeAt(o)===qn){if(!n){e=o;break}}else n=!1;return e===-1?t?"/":".":t&&e===1?"//":r.slice(0,e)},basename(r,t){t!==void 0&&bn(t,"suffix"),bn(r,"path");let e=0,n=-1,o=!0,i;if(t!==void 0&&t.length>0&&t.length<=r.length){if(t===r)return"";let s=t.length-1,a=-1;for(i=r.length-1;i>=0;--i){let l=r.charCodeAt(i);if(l===qn){if(!o){e=i+1;break}}else a===-1&&(o=!1,a=i+1),s>=0&&(l===t.charCodeAt(s)?--s===-1&&(n=i):(s=-1,n=a))}return e===n?n=a:n===-1&&(n=r.length),r.slice(e,n)}for(i=r.length-1;i>=0;--i)if(r.charCodeAt(i)===qn){if(!o){e=i+1;break}}else n===-1&&(o=!1,n=i+1);return n===-1?"":r.slice(e,n)},extname(r){bn(r,"path");let t=-1,e=0,n=-1,o=!0,i=0;for(let s=r.length-1;s>=0;--s){let a=r[s];if(a==="/"){if(!o){e=s+1;break}continue}n===-1&&(o=!1,n=s+1),a==="."?t===-1?t=s:i!==1&&(i=1):t!==-1&&(i=-1)}return t===-1||n===-1||i===0||i===1&&t===n-1&&t===e+1?"":r.slice(t,n)},format:rU.bind(null,"/"),parse(r){bn(r,"path");let t={root:"",dir:"",base:"",ext:"",name:""};if(r.length===0)return t;let e=r.charCodeAt(0)===qn,n;e?(t.root="/",n=1):n=0;let o=-1,i=0,s=-1,a=!0,l=r.length-1,d=0;for(;l>=n;--l){let c=r.charCodeAt(l);if(c===qn){if(!a){i=l+1;break}continue}s===-1&&(a=!1,s=l+1),c===sd?o===-1?o=l:d!==1&&(d=1):o!==-1&&(d=-1)}if(s!==-1){let c=i===0&&e?1:i;o===-1||d===0||d===1&&o===s-1&&o===i+1?t.base=t.name=r.slice(c,s):(t.name=r.slice(c,o),t.base=r.slice(c,s),t.ext=r.slice(o,s))}return i>0?t.dir=r.slice(0,i-1):e&&(t.dir="/"),t},sep:"/",delimiter:":",win32:null,posix:null};qe.win32=ln.win32=ln;qe.posix=ln.posix=qe;var fr=Fo?ln.normalize:qe.normalize,fs=Fo?ln.isAbsolute:qe.isAbsolute,jc=Fo?ln.join:qe.join,iU=Fo?ln.resolve:qe.resolve,gs=Fo?ln.relative:qe.relative,Ci=Fo?ln.dirname:qe.dirname,Cn=Fo?ln.basename:qe.basename,hs=Fo?ln.extname:qe.extname,lj=Fo?ln.format:qe.format,dj=Fo?ln.parse:qe.parse,cj=Fo?ln.toNamespacedPath:qe.toNamespacedPath,Bn=Fo?ln.sep:qe.sep,uj=Fo?ln.delimiter:qe.delimiter;var $8=/^\w[\w\d+.-]*$/,G8=/^\//,z8=/^\/\//;function q8(r,t){if(!r.scheme&&t)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${r.authority}", path: "${r.path}", query: "${r.query}", fragment: "${r.fragment}"}`);if(r.scheme&&!$8.test(r.scheme)){let e=[...r.scheme.matchAll(/[^\w\d+.-]/gu)],n=e.length>0?` Found '${e[0][0]}' at index ${e[0].index} (${e.length} total)`:"";throw new Error(`[UriError]: Scheme contains illegal characters.${n} (len:${r.scheme.length})`)}if(r.path){if(r.authority){if(!G8.test(r.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(z8.test(r.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}}function K8(r,t){return!r&&!t?"file":r}function J8(r,t){switch(r){case"https":case"http":case"file":t?t[0]!==Br&&(t=Br+t):t=Br;break}return t}var jt="",Br="/",j8=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/,E=class r{static isUri(t){return t instanceof r?!0:!t||typeof t!="object"?!1:typeof t.authority=="string"&&typeof t.fragment=="string"&&typeof t.path=="string"&&typeof t.query=="string"&&typeof t.scheme=="string"&&typeof t.fsPath=="string"&&typeof t.with=="function"&&typeof t.toString=="function"}constructor(t,e,n,o,i,s=!1){typeof t=="object"?(this.scheme=t.scheme||jt,this.authority=t.authority||jt,this.path=t.path||jt,this.query=t.query||jt,this.fragment=t.fragment||jt):(this.scheme=K8(t,s),this.authority=e||jt,this.path=J8(this.scheme,n||jt),this.query=o||jt,this.fragment=i||jt,q8(this,s))}get fsPath(){return Df(this,!1)}with(t){if(!t)return this;let{scheme:e,authority:n,path:o,query:i,fragment:s}=t;return e===void 0?e=this.scheme:e===null&&(e=jt),n===void 0?n=this.authority:n===null&&(n=jt),o===void 0?o=this.path:o===null&&(o=jt),i===void 0?i=this.query:i===null&&(i=jt),s===void 0?s=this.fragment:s===null&&(s=jt),e===this.scheme&&n===this.authority&&o===this.path&&i===this.query&&s===this.fragment?this:new Ca(e,n,o,i,s)}static parse(t,e=!1){let n=j8.exec(t);return n?new Ca(n[2]||jt,Fv(n[4]||jt),Fv(n[5]||jt),Fv(n[7]||jt),Fv(n[9]||jt),e):new Ca(jt,jt,jt,jt,jt)}static file(t){let e=jt;if(Rt&&(t=t.replace(/\\/g,Br)),t[0]===Br&&t[1]===Br){let n=t.indexOf(Br,2);n===-1?(e=t.substring(2),t=Br):(e=t.substring(2,n),t=t.substring(n)||Br)}return new Ca("file",e,t,jt,jt)}static from(t,e){return new Ca(t.scheme,t.authority,t.path,t.query,t.fragment,e)}static joinPath(t,...e){if(!t.path)throw new Error("[UriError]: cannot call joinPath on URI without path");let n;return Rt&&t.scheme==="file"?n=r.file(ln.join(Df(t,!0),...e)).path:n=qe.join(t.path,...e),t.with({path:n})}toString(t=!1){return R_(this,t)}toJSON(){return this}static revive(t){if(t){if(t instanceof r)return t;{let e=new Ca(t);return e._formatted=t.external??null,e._fsPath=t._sep===lU?t.fsPath??null:null,e}}else return t}[Symbol.for("debug.description")](){return`URI(${this.toString()})`}};function Ta(r){return!r||typeof r!="object"?!1:typeof r.scheme=="string"&&(typeof r.authority=="string"||typeof r.authority>"u")&&(typeof r.path=="string"||typeof r.path>"u")&&(typeof r.query=="string"||typeof r.query>"u")&&(typeof r.fragment=="string"||typeof r.fragment>"u")}var lU=Rt?1:void 0,Ca=class extends E{constructor(){super(...arguments);this._formatted=null;this._fsPath=null}get fsPath(){return this._fsPath||(this._fsPath=Df(this,!1)),this._fsPath}toString(e=!1){return e?R_(this,!0):(this._formatted||(this._formatted=R_(this,!1)),this._formatted)}toJSON(){let e={$mid:1};return this._fsPath&&(e.fsPath=this._fsPath,e._sep=lU),this._formatted&&(e.external=this._formatted),this.path&&(e.path=this.path),this.scheme&&(e.scheme=this.scheme),this.authority&&(e.authority=this.authority),this.query&&(e.query=this.query),this.fragment&&(e.fragment=this.fragment),e}},dU={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"};function sU(r,t,e){let n,o=-1;for(let i=0;i<r.length;i++){let s=r.charCodeAt(i);if(s>=97&&s<=122||s>=65&&s<=90||s>=48&&s<=57||s===45||s===46||s===95||s===126||t&&s===47||e&&s===91||e&&s===93||e&&s===58)o!==-1&&(n+=encodeURIComponent(r.substring(o,i)),o=-1),n!==void 0&&(n+=r.charAt(i));else{n===void 0&&(n=r.substr(0,i));let a=dU[s];a!==void 0?(o!==-1&&(n+=encodeURIComponent(r.substring(o,i)),o=-1),n+=a):o===-1&&(o=i)}}return o!==-1&&(n+=encodeURIComponent(r.substring(o))),n!==void 0?n:r}function Q8(r){let t;for(let e=0;e<r.length;e++){let n=r.charCodeAt(e);n===35||n===63?(t===void 0&&(t=r.substr(0,e)),t+=dU[n]):t!==void 0&&(t+=r[e])}return t!==void 0?t:r}function Df(r,t){let e;return r.authority&&r.path.length>1&&r.scheme==="file"?e=`//${r.authority}${r.path}`:r.path.charCodeAt(0)===47&&(r.path.charCodeAt(1)>=65&&r.path.charCodeAt(1)<=90||r.path.charCodeAt(1)>=97&&r.path.charCodeAt(1)<=122)&&r.path.charCodeAt(2)===58?t?e=r.path.substr(1):e=r.path[1].toLowerCase()+r.path.substr(2):e=r.path,Rt&&(e=e.replace(/\//g,"\\")),e}function R_(r,t){let e=t?Q8:sU,n="",{scheme:o,authority:i,path:s,query:a,fragment:l}=r;if(o&&(n+=o,n+=":"),(i||o==="file")&&(n+=Br,n+=Br),i){let d=i.indexOf("@");if(d!==-1){let c=i.substr(0,d);i=i.substr(d+1),d=c.lastIndexOf(":"),d===-1?n+=e(c,!1,!1):(n+=e(c.substr(0,d),!1,!1),n+=":",n+=e(c.substr(d+1),!1,!0)),n+="@"}i=i.toLowerCase(),d=i.lastIndexOf(":"),d===-1?n+=e(i,!1,!0):(n+=e(i.substr(0,d),!1,!0),n+=i.substr(d))}if(s){if(s.length>=3&&s.charCodeAt(0)===47&&s.charCodeAt(2)===58){let d=s.charCodeAt(1);d>=65&&d<=90&&(s=`/${String.fromCharCode(d+32)}:${s.substr(3)}`)}else if(s.length>=2&&s.charCodeAt(1)===58){let d=s.charCodeAt(0);d>=65&&d<=90&&(s=`${String.fromCharCode(d+32)}:${s.substr(2)}`)}n+=e(s,!0,!1)}return a&&(n+="?",n+=e(a,!1,!1)),l&&(n+="#",n+=t?l:sU(l,!1,!1)),n}function cU(r){try{return decodeURIComponent(r)}catch{return r.length>3?r.substr(0,3)+cU(r.substr(3)):r}}var aU=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function Fv(r){return r.match(aU)?r.replace(aU,t=>cU(t)):r}var wf=class r{constructor(t){this._proxyIdentifierBrand=void 0;this.sid=t,this.nid=++r.count}static{this.count=0}},uU=[];function $(r){let t=new wf(r);return uU[t.nid]=t,t}function Rf(r){return uU[r].sid}var Wt=class{constructor(t){this.value=t}};var k_=(o=>(o[o.None=0]="None",o[o.Process=1]="Process",o[o.Output=2]="Output",o[o.Hybrid=3]="Hybrid",o))(k_||{}),pU=class r{static{this._n=0}static mixin(t){return t._id=r._n++,t}};var V={MainThreadAuthentication:$("MainThreadAuthentication"),MainThreadBulkEdits:$("MainThreadBulkEdits"),MainThreadLanguageModels:$("MainThreadLanguageModels"),MainThreadEmbeddings:$("MainThreadEmbeddings"),MainThreadChatAgents2:$("MainThreadChatAgents2"),MainThreadCodeMapper:$("MainThreadCodeMapper"),MainThreadLanguageModelTools:$("MainThreadChatSkills"),MainThreadGitExtension:$("MainThreadGitExtension"),MainThreadClipboard:$("MainThreadClipboard"),MainThreadCommands:$("MainThreadCommands"),MainThreadComments:$("MainThreadComments"),MainThreadConfiguration:$("MainThreadConfiguration"),MainThreadConsole:$("MainThreadConsole"),MainThreadDebugService:$("MainThreadDebugService"),MainThreadDecorations:$("MainThreadDecorations"),MainThreadDiagnostics:$("MainThreadDiagnostics"),MainThreadDialogs:$("MainThreadDiaglogs"),MainThreadDocuments:$("MainThreadDocuments"),MainThreadDocumentContentProviders:$("MainThreadDocumentContentProviders"),MainThreadTextEditors:$("MainThreadTextEditors"),MainThreadEditorInsets:$("MainThreadEditorInsets"),MainThreadEditorTabs:$("MainThreadEditorTabs"),MainThreadErrors:$("MainThreadErrors"),MainThreadTreeViews:$("MainThreadTreeViews"),MainThreadDownloadService:$("MainThreadDownloadService"),MainThreadLanguageFeatures:$("MainThreadLanguageFeatures"),MainThreadLanguages:$("MainThreadLanguages"),MainThreadLogger:$("MainThreadLogger"),MainThreadMessageService:$("MainThreadMessageService"),MainThreadOutputService:$("MainThreadOutputService"),MainThreadProgress:$("MainThreadProgress"),MainThreadQuickDiff:$("MainThreadQuickDiff"),MainThreadQuickOpen:$("MainThreadQuickOpen"),MainThreadStatusBar:$("MainThreadStatusBar"),MainThreadSecretState:$("MainThreadSecretState"),MainThreadStorage:$("MainThreadStorage"),MainThreadSpeech:$("MainThreadSpeechProvider"),MainThreadTelemetry:$("MainThreadTelemetry"),MainThreadMeteredConnection:$("MainThreadMeteredConnection"),MainThreadTerminalService:$("MainThreadTerminalService"),MainThreadTerminalShellIntegration:$("MainThreadTerminalShellIntegration"),MainThreadWebviews:$("MainThreadWebviews"),MainThreadWebviewPanels:$("MainThreadWebviewPanels"),MainThreadWebviewViews:$("MainThreadWebviewViews"),MainThreadCustomEditors:$("MainThreadCustomEditors"),MainThreadUrls:$("MainThreadUrls"),MainThreadUriOpeners:$("MainThreadUriOpeners"),MainThreadProfileContentHandlers:$("MainThreadProfileContentHandlers"),MainThreadWorkspace:$("MainThreadWorkspace"),MainThreadFileSystem:$("MainThreadFileSystem"),MainThreadFileSystemEventService:$("MainThreadFileSystemEventService"),MainThreadExtensionService:$("MainThreadExtensionService"),MainThreadSCM:$("MainThreadSCM"),MainThreadSearch:$("MainThreadSearch"),MainThreadShare:$("MainThreadShare"),MainThreadTask:$("MainThreadTask"),MainThreadWindow:$("MainThreadWindow"),MainThreadPower:$("MainThreadPower"),MainThreadLabelService:$("MainThreadLabelService"),MainThreadNotebook:$("MainThreadNotebook"),MainThreadNotebookDocuments:$("MainThreadNotebookDocumentsShape"),MainThreadNotebookEditors:$("MainThreadNotebookEditorsShape"),MainThreadNotebookKernels:$("MainThreadNotebookKernels"),MainThreadNotebookRenderers:$("MainThreadNotebookRenderers"),MainThreadInteractive:$("MainThreadInteractive"),MainThreadTheming:$("MainThreadTheming"),MainThreadTunnelService:$("MainThreadTunnelService"),MainThreadManagedSockets:$("MainThreadManagedSockets"),MainThreadTimeline:$("MainThreadTimeline"),MainThreadTesting:$("MainThreadTesting"),MainThreadLocalization:$("MainThreadLocalizationShape"),MainThreadAiRelatedInformation:$("MainThreadAiRelatedInformation"),MainThreadAiEmbeddingVector:$("MainThreadAiEmbeddingVector"),MainThreadChatStatus:$("MainThreadChatStatus"),MainThreadTerminalCommandPopups:$("MainThreadTerminalCommandPopups"),MainThreadWindsurfAuthService:$("MainThreadWindsurfAuthService"),MainThreadWindsurfProductInfo:$("MainThreadWindsurfProductInfo"),MainThreadWindsurfUndoRedo:$("MainThreadWindsurfUndoRedo"),MainThreadWindsurfCascade:$("MainThreadWindsurfCascade"),MainThreadWindsurfProductEducation:$("MainThreadWindsurfProductEducation"),MainThreadWindsurfSettings:$("MainThreadWindsurfSettings"),MainThreadWindsurfFiles:$("MainThreadWindsurfFiles"),MainThreadWindsurfDevContainers:$("MainThreadWindsurfDevContainers"),MainThreadWindsurfMcp:$("MainThreadWindsurfMcp"),MainThreadWindsurfAcp:$("MainThreadWindsurfAcp"),MainThreadWindsurfAudio:$("MainThreadWindsurfAudio"),MainThreadWindsurfAnnotations:$("MainThreadWindsurfAnnotations"),MainThreadAiSettingsSearch:$("MainThreadAiSettingsSearch"),MainThreadDataChannels:$("MainThreadDataChannels"),MainThreadChatSessions:$("MainThreadChatSessions"),MainThreadChatOutputRenderer:$("MainThreadChatOutputRenderer"),MainThreadChatContext:$("MainThreadChatContext"),MainThreadChatDebug:$("MainThreadChatDebug")},me={ExtHostCodeMapper:$("ExtHostCodeMapper"),ExtHostCommands:$("ExtHostCommands"),ExtHostConfiguration:$("ExtHostConfiguration"),ExtHostDiagnostics:$("ExtHostDiagnostics"),ExtHostDebugService:$("ExtHostDebugService"),ExtHostDecorations:$("ExtHostDecorations"),ExtHostDocumentsAndEditors:$("ExtHostDocumentsAndEditors"),ExtHostDocuments:$("ExtHostDocuments"),ExtHostDocumentContentProviders:$("ExtHostDocumentContentProviders"),ExtHostDocumentSaveParticipant:$("ExtHostDocumentSaveParticipant"),ExtHostEditors:$("ExtHostEditors"),ExtHostTreeViews:$("ExtHostTreeViews"),ExtHostFileSystem:$("ExtHostFileSystem"),ExtHostFileSystemInfo:$("ExtHostFileSystemInfo"),ExtHostFileSystemEventService:$("ExtHostFileSystemEventService"),ExtHostLanguages:$("ExtHostLanguages"),ExtHostLanguageFeatures:$("ExtHostLanguageFeatures"),ExtHostQuickOpen:$("ExtHostQuickOpen"),ExtHostQuickDiff:$("ExtHostQuickDiff"),ExtHostStatusBar:$("ExtHostStatusBar"),ExtHostShare:$("ExtHostShare"),ExtHostExtensionService:$("ExtHostExtensionService"),ExtHostLogLevelServiceShape:$("ExtHostLogLevelServiceShape"),ExtHostTerminalService:$("ExtHostTerminalService"),ExtHostTerminalShellIntegration:$("ExtHostTerminalShellIntegration"),ExtHostSCM:$("ExtHostSCM"),ExtHostSearch:$("ExtHostSearch"),ExtHostTask:$("ExtHostTask"),ExtHostWorkspace:$("ExtHostWorkspace"),ExtHostWindow:$("ExtHostWindow"),ExtHostPower:$("ExtHostPower"),ExtHostWebviews:$("ExtHostWebviews"),ExtHostWebviewPanels:$("ExtHostWebviewPanels"),ExtHostCustomEditors:$("ExtHostCustomEditors"),ExtHostWebviewViews:$("ExtHostWebviewViews"),ExtHostEditorInsets:$("ExtHostEditorInsets"),ExtHostEditorTabs:$("ExtHostEditorTabs"),ExtHostProgress:$("ExtHostProgress"),ExtHostComments:$("ExtHostComments"),ExtHostSecretState:$("ExtHostSecretState"),ExtHostStorage:$("ExtHostStorage"),ExtHostUrls:$("ExtHostUrls"),ExtHostUriOpeners:$("ExtHostUriOpeners"),ExtHostChatOutputRenderer:$("ExtHostChatOutputRenderer"),ExtHostProfileContentHandlers:$("ExtHostProfileContentHandlers"),ExtHostOutputService:$("ExtHostOutputService"),ExtHostLabelService:$("ExtHostLabelService"),ExtHostNotebook:$("ExtHostNotebook"),ExtHostNotebookDocuments:$("ExtHostNotebookDocuments"),ExtHostNotebookEditors:$("ExtHostNotebookEditors"),ExtHostNotebookKernels:$("ExtHostNotebookKernels"),ExtHostNotebookRenderers:$("ExtHostNotebookRenderers"),ExtHostNotebookDocumentSaveParticipant:$("ExtHostNotebookDocumentSaveParticipant"),ExtHostInteractive:$("ExtHostInteractive"),ExtHostChatAgents2:$("ExtHostChatAgents"),ExtHostLanguageModelTools:$("ExtHostChatSkills"),ExtHostChatProvider:$("ExtHostChatProvider"),ExtHostChatContext:$("ExtHostChatContext"),ExtHostChatDebug:$("ExtHostChatDebug"),ExtHostSpeech:$("ExtHostSpeech"),ExtHostEmbeddings:$("ExtHostEmbeddings"),ExtHostAiRelatedInformation:$("ExtHostAiRelatedInformation"),ExtHostAiEmbeddingVector:$("ExtHostAiEmbeddingVector"),ExtHostAiSettingsSearch:$("ExtHostAiSettingsSearch"),ExtHostTheming:$("ExtHostTheming"),ExtHostTunnelService:$("ExtHostTunnelService"),ExtHostManagedSockets:$("ExtHostManagedSockets"),ExtHostAuthentication:$("ExtHostAuthentication"),ExtHostTimeline:$("ExtHostTimeline"),ExtHostTesting:$("ExtHostTesting"),ExtHostTelemetry:$("ExtHostTelemetry"),ExtHostMeteredConnection:$("ExtHostMeteredConnection"),ExtHostLocalization:$("ExtHostLocalization"),ExtHostWindsurfAuthService:$("ExtHostWindsurfAuthService"),ExtHostWindsurfProductInfo:$("ExtHostWindsurfProductInfo"),ExtHostWindsurfUndoRedo:$("ExtHostWindsurfUndoRedo"),ExtHostWindsurfCascade:$("ExtHostWindsurfCascade"),ExtHostWindsurfProductEducation:$("ExtHostWindsurfProductEducation"),ExtHostWindsurfSettings:$("ExtHostWindsurfSettings"),ExtHostWindsurfFiles:$("ExtHostWindsurfFiles"),ExtHostWindsurfDevContainers:$("ExtHostWindsurfDevContainers"),ExtHostWindsurfMcp:$("ExtHostWindsurfMcp"),ExtHostWindsurfAcp:$("ExtHostWindsurfAcp"),ExtHostWindsurfAudio:$("ExtHostWindsurfAudio"),ExtHostWindsurfAnnotations:$("ExtHostWindsurfAnnotations"),ExtHostDataChannels:$("ExtHostDataChannels"),ExtHostChatSessions:$("ExtHostChatSessions"),ExtHostGitExtension:$("ExtHostGitExtension")};var mU=Object.freeze(function(r,t){let e=setTimeout(r.bind(t),0);return{dispose(){clearTimeout(e)}}}),De;(n=>{function r(o){return o===n.None||o===n.Cancelled||o instanceof Qc?!0:!o||typeof o!="object"?!1:typeof o.isCancellationRequested=="boolean"&&typeof o.onCancellationRequested=="function"}n.isCancellationToken=r,n.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:He.None}),n.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:mU})})(De||={});var Qc=class{constructor(){this._isCancelled=!1;this._emitter=null}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?mU:(this._emitter||(this._emitter=new D),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=null)}},We=class{constructor(t){this._token=void 0;this._parentListener=void 0;this._parentListener=t&&t.onCancellationRequested(this.cancel,this)}get token(){return this._token||(this._token=new Qc),this._token}cancel(){this._token?this._token instanceof Qc&&this._token.cancel():this._token=De.Cancelled}dispose(t=!1){t&&this.cancel(),this._parentListener?.dispose(),this._token?this._token instanceof Qc&&this._token.dispose():this._token=De.None}};function X8(r){return r}var Hv=class{constructor(t,e){this.lastCache=void 0;this.lastArgKey=void 0;typeof t=="function"?(this._fn=t,this._computeKey=X8):(this._fn=e,this._computeKey=t.getCacheKey)}get(t){let e=this._computeKey(t);return this.lastArgKey!==e&&(this.lastArgKey=e,this.lastCache=this._fn(t)),this.lastCache}};function A_(r){return r<0?0:r>255?255:r|0}function ad(r){return r<0?0:r>4294967295?4294967295:r|0}function Ti(r){return!r||typeof r!="string"?!0:r.trim().length===0}var Z8=/{(\d+)}/g;function bU(r,...t){return t.length===0?r:r.replace(Z8,function(e,n){let o=parseInt(n,10);return isNaN(o)||o<0||o>=t.length?e:t[o]})}var e9=/{([^}]+)}/g;function N_(r,t){return Object.keys(t).length===0?r:r.replace(e9,(e,n)=>t[n]??e)}function hr(r){return r.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g,"\\$&")}function IU(r,t){let e=0,n=r.indexOf(t);for(;n!==-1;)e++,n=r.indexOf(t,n+t.length);return e}function U_(r,t){if(!r||!t)return r;let e=t.length,n=0;if(e===1){let o=t.charCodeAt(0);for(;n<r.length&&r.charCodeAt(n)===o;)n++}else for(;r.startsWith(t,n);)n+=e;return r.substring(n)}function ld(r,t){if(!r||!t)return r;let e=t.length,n=r.length;if(e===1){let i=n,s=t.charCodeAt(0);for(;i>0&&r.charCodeAt(i-1)===s;)i--;return r.substring(0,i)}let o=n;for(;o>0&&r.endsWith(t,o);)o-=e;return r.substring(0,o)}function yU(r,t,e={}){if(!r)throw new Error("Cannot create regex from empty string");t||(r=hr(r)),e.wholeWord&&(/\B/.test(r.charAt(0))||(r="\\b"+r),/\B/.test(r.charAt(r.length-1))||(r=r+"\\b"));let n="";return e.global&&(n+="g"),e.matchCase||(n+="i"),e.multiline&&(n+="m"),e.unicode&&(n+="u"),new RegExp(r,n)}function Vv(r){return r.source==="^"||r.source==="^$"||r.source==="$"||r.source==="^\\s*$"?!1:!!(r.exec("")&&r.lastIndex===0)}function Wv(r){return r.split(/\r\n|\r|\n/)}function $v(r){for(let t=0,e=r.length;t<e;t++){let n=r.charCodeAt(t);if(n!==32&&n!==9)return t}return-1}function EU(r,t=r.length-1){for(let e=t;e>=0;e--){let n=r.charCodeAt(e);if(n!==32&&n!==9)return e}return-1}function Vr(r,t){return r<t?-1:r>t?1:0}function Gv(r,t,e=0,n=r.length,o=0,i=t.length){for(;e<n&&o<i;e++,o++){let l=r.charCodeAt(e),d=t.charCodeAt(o);if(l<d)return-1;if(l>d)return 1}let s=n-e,a=i-o;return s<a?-1:s>a?1:0}function kf(r,t){return dd(r,t,0,r.length,0,t.length)}function dd(r,t,e=0,n=r.length,o=0,i=t.length){for(;e<n&&o<i;e++,o++){let l=r.charCodeAt(e),d=t.charCodeAt(o);if(l===d)continue;if(l>=128||d>=128)return Gv(r.toLowerCase(),t.toLowerCase(),e,n,o,i);fU(l)&&(l-=32),fU(d)&&(d-=32);let c=l-d;if(c!==0)return c}let s=n-e,a=i-o;return s<a?-1:s>a?1:0}function fU(r){return r>=97&&r<=122}function Jn(r,t){return r.length===t.length&&dd(r,t)===0}function zv(r,t,e){return r===t||!!e&&r!==void 0&&t!==void 0&&Jn(r,t)}function _a(r,t){let e=t.length;return e<=r.length&&dd(r,t,0,e)===0}function SU(r,t){let e=r.length,n=e-t.length;return n>=0&&dd(r,t,n,e)===0}function xU(r,t){let e=Math.min(r.length,t.length),n;for(n=0;n<e;n++)if(r.charCodeAt(n)!==t.charCodeAt(n))return n;return e}function cd(r){return 55296<=r&&r<=56319}function Af(r){return 56320<=r&&r<=57343}function qv(r,t){return(r-55296<<10)+(t-56320)+65536}function F_(r,t,e){let n=r.charCodeAt(e);if(cd(n)&&e+1<t){let o=r.charCodeAt(e+1);if(Af(o))return qv(n,o)}return n}function t9(r,t){let e=r.charCodeAt(t-1);if(Af(e)&&t>1){let n=r.charCodeAt(t-2);if(cd(n))return qv(n,e)}return e}var L_=class{get offset(){return this._offset}constructor(t,e=0){this._str=t,this._len=t.length,this._offset=e}setOffset(t){this._offset=t}prevCodePoint(){let t=t9(this._str,this._offset);return this._offset-=t>=65536?2:1,t}nextCodePoint(){let t=F_(this._str,this._len,this._offset);return this._offset+=t>=65536?2:1,t}eol(){return this._offset>=this._len}},M_=class{get offset(){return this._iterator.offset}constructor(t,e=0){this._iterator=new L_(t,e)}nextGraphemeLength(){let t=Bv.getInstance(),e=this._iterator,n=e.offset,o=t.getGraphemeBreakType(e.nextCodePoint());for(;!e.eol();){let i=e.offset,s=t.getGraphemeBreakType(e.nextCodePoint());if(gU(o,s)){e.setOffset(i);break}o=s}return e.offset-n}prevGraphemeLength(){let t=Bv.getInstance(),e=this._iterator,n=e.offset,o=t.getGraphemeBreakType(e.prevCodePoint());for(;e.offset>0;){let i=e.offset,s=t.getGraphemeBreakType(e.prevCodePoint());if(gU(s,o)){e.setOffset(i);break}o=s}return n-e.offset}eol(){return this._iterator.eol()}};function H_(r,t){return new M_(r,t).nextGraphemeLength()}var O_;function n9(){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 Kv(r){return O_||(O_=n9()),O_.test(r)}var o9=/^[\t\n\r\x20-\x7E]*$/;function CU(r){return o9.test(r)}var r9=/[\u2028\u2029]/;function Jv(r){return r9.test(r)}var i9=/(?:\x1b\[|\x9b)[=?>!]?[\d;:]*["$#'* ]?[a-zA-Z@^`{}|~]/,s9=/(?:\x1b\]|\x9d).*?(?:\x1b\\|\x07|\x9c)/,a9=/\x1b(?:[ #%\(\)\*\+\-\.\/]?[a-zA-Z0-9\|}~@])/,Oj=new RegExp("(?:"+[i9.source,s9.source,a9.source].join("|")+")","g");var TU=String.fromCharCode(65279);function _U(r){return!!(r&&r.length>0&&r.charCodeAt(0)===65279)}function B_(r,t=!1){return r?(t&&(r=r.replace(/\\./g,"")),r.toLowerCase()!==r):!1}function PU(r,t=1){if(t===0)return"";let e=-1;do e=r.indexOf(`
`,e+1),t--;while(t>0&&e>=0);return e===-1?r:(r[e-1]==="\r"&&e--,r.substr(0,e))}function gU(r,t){return r===0?t!==5&&t!==7:r===2&&t===3?!1:r===4||r===2||r===3||t===4||t===2||t===3?!0:!(r===8&&(t===8||t===9||t===11||t===12)||(r===11||r===9)&&(t===9||t===10)||(r===12||r===10)&&t===10||t===5||t===13||t===7||r===1||r===13&&t===14||r===6&&t===6)}var Bv=class r{static{this._INSTANCE=null}static getInstance(){return r._INSTANCE||(r._INSTANCE=new r),r._INSTANCE}constructor(){this._data=l9()}getGraphemeBreakType(t){if(t<32)return t===10?3:t===13?2:4;if(t<127)return 0;let e=this._data,n=e.length/3,o=1;for(;o<=n;)if(t<e[3*o])o=2*o;else if(t>e[3*o+1])o=2*o+1;else return e[3*o+2];return 0}};function l9(){return JSON.parse("[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 hU=class r{constructor(t){this.confusableDictionary=t}static{this.ambiguousCharacterData=new xt(()=>JSON.parse('{"_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,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,1523,96,8242,96,1370,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,118002,50,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,118003,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,118004,52,120786,52,120796,52,120806,52,120816,52,120826,52,130036,52,5070,52,71855,52,118005,53,120787,53,120797,53,120807,53,120817,53,120827,53,130037,53,444,53,71867,53,118006,54,120788,54,120798,54,120808,54,120818,54,120828,54,130038,54,11474,54,5102,54,71893,54,119314,55,118007,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,118008,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,118009,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,117974,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,117975,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,71913,67,71922,67,65315,67,8557,67,8450,67,8493,67,117976,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,117977,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,117978,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,117979,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,117980,71,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,117981,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,117983,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,117984,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,118001,108,120783,73,120793,73,120803,73,120813,73,120823,73,130033,73,65321,73,8544,73,8464,73,8465,73,117982,108,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,117985,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,117986,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,117987,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,118000,79,120782,79,120792,79,120802,79,120812,79,120822,79,130032,79,65327,79,117988,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,117989,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,117990,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,117991,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,117992,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,117993,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,117994,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,117995,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,71910,87,71919,87,117996,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,117997,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,117998,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,71909,90,66293,90,65338,90,8484,90,8488,90,117999,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,65283,35,65284,36,65285,37,65286,38,65290,42,65291,43,65294,46,65295,47,65296,48,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,8218,44,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,65288,40,65289,41,65292,44,65297,49,65307,59,65311,63],"cs":[65374,126,8218,44,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,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41,65292,44,65297,49,65307,59,65311,63],"de":[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,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41,65292,44,65297,49,65307,59,65311,63],"es":[8211,45,65374,126,8218,44,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,65288,40,65289,41,65292,44,65297,49,65307,59,65311,63],"fr":[65374,126,8218,44,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,65288,40,65289,41,65292,44,65297,49,65307,59,65311,63],"it":[160,32,8211,45,65374,126,8218,44,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,65292,44,65297,49,65307,59,65311,63],"ja":[8211,45,8218,44,65281,33,8216,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,65292,44,65297,49,65307,59],"ko":[8211,45,65374,126,8218,44,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,65292,44,65297,49,65307,59,65311,63],"pl":[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,65288,40,65289,41,65292,44,65297,49,65307,59,65311,63],"pt-BR":[65374,126,8218,44,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,65288,40,65289,41,65292,44,65297,49,65307,59,65311,63],"qps-ploc":[160,32,8211,45,65374,126,8218,44,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,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41,65292,44,65297,49,65307,59,65311,63],"ru":[65374,126,8218,44,65306,58,65281,33,8216,96,8245,96,180,96,12494,47,305,105,921,73,1009,112,215,120,65288,40,65289,41,65292,44,65297,49,65307,59,65311,63],"tr":[160,32,8211,45,65374,126,8218,44,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,65288,40,65289,41,65292,44,65297,49,65307,59,65311,63],"zh-hans":[160,32,65374,126,8218,44,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,65297,49],"zh-hant":[8211,45,65374,126,8218,44,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]}'))}static{this.cache=new Hv(t=>{let e=t.split(",");function n(u){let f=new Map;for(let g=0;g<u.length;g+=2)f.set(u[g],u[g+1]);return f}function o(u,f){let g=new Map(u);for(let[I,h]of f)g.set(I,h);return g}function i(u,f){if(!u)return f;let g=new Map;for(let[I,h]of u)f.has(I)&&g.set(I,h);return g}let s=this.ambiguousCharacterData.value,a=e.filter(u=>!u.startsWith("_")&&Object.hasOwn(s,u));a.length===0&&(a=["_default"]);let l;for(let u of a){let f=n(s[u]);l=i(l,f)}let d=n(s._common),c=o(d,l);return new r(c)})}static getInstance(t){return r.cache.get(Array.from(t).join(","))}static{this._locales=new xt(()=>Object.keys(r.ambiguousCharacterData.value).filter(t=>!t.startsWith("_")))}static getLocales(){return r._locales.value}isAmbiguous(t){return this.confusableDictionary.has(t)}containsAmbiguousCharacter(t){for(let e=0;e<t.length;e++){let n=t.codePointAt(e);if(typeof n=="number"&&this.isAmbiguous(n))return!0}return!1}getPrimaryConfusable(t){return this.confusableDictionary.get(t)}getConfusableCodePoints(){return new Set(this.confusableDictionary.keys())}},vU=class r{static getRawData(){return JSON.parse('{"_common":[11,12,13,127,847,1564,4447,4448,6068,6069,6155,6156,6157,6158,7355,7356,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,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,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],"cs":[173,8203,12288],"de":[173,8203,12288],"es":[8203,12288],"fr":[173,8203,12288],"it":[160,173,12288],"ja":[173],"ko":[173,12288],"pl":[173,8203,12288],"pt-BR":[173,8203,12288],"qps-ploc":[160,173,8203,12288],"ru":[173,12288],"tr":[160,173,8203,12288],"zh-hans":[160,173,8203,12288],"zh-hant":[173,12288]}')}static{this._data=void 0}static getData(){return this._data||(this._data=new Set([...Object.values(r.getRawData())].flat())),this._data}static isInvisibleCharacter(t){return r.getData().has(t)}static containsInvisibleCharacter(t){for(let e=0;e<t.length;e++){let n=t.codePointAt(e);if(typeof n=="number"&&(r.isInvisibleCharacter(n)||n===32))return!0}return!1}static get codePoints(){return r.getData()}};function Pa(r){return r===47||r===92}function jv(r){return r.replace(/[\\/]/g,qe.sep)}function DU(r){return r.indexOf("/")===-1&&(r=jv(r)),/^[a-zA-Z]:(\/|$)/.test(r)&&(r="/"+r),r}function V_(r,t=qe.sep){if(!r)return"";let e=r.length,n=r.charCodeAt(0);if(Pa(n)){if(Pa(r.charCodeAt(1))&&!Pa(r.charCodeAt(2))){let i=3,s=i;for(;i<e&&!Pa(r.charCodeAt(i));i++);if(s!==i&&!Pa(r.charCodeAt(i+1))){for(i+=1;i<e;i++)if(Pa(r.charCodeAt(i)))return r.slice(0,i+1).replace(/[\\/]/g,t)}}return t}else if(RU(n)&&r.charCodeAt(1)===58)return Pa(r.charCodeAt(2))?r.slice(0,2)+t:r.slice(0,2);let o=r.indexOf("://");if(o!==-1){for(o+=3;o<e;o++)if(Pa(r.charCodeAt(o)))return r.slice(0,o+1)}return""}var d9=/[\\/:\*\?"<>\|]/g,c9=/[/]/g,u9=/^(con|prn|aux|clock\$|nul|lpt[0-9]|com[0-9])(\.(.*?))?$/i;function wU(r,t=Rt){let e=t?d9:c9;return!(!r||r.length===0||/^\s+$/.test(r)||(e.lastIndex=0,e.test(r))||t&&u9.test(r)||r==="."||r===".."||t&&r[r.length-1]==="."||t&&r.length!==r.trim().length||r.length>255)}function ud(r,t,e,n=Bn){if(r===t)return!0;if(!r||!t||t.length>r.length)return!1;if(e){if(!_a(r,t))return!1;if(t.length===r.length)return!0;let i=t.length;return t.charAt(t.length-1)===n&&i--,r.charAt(i)===n}return t.charAt(t.length-1)!==n&&(t+=n),r.indexOf(t)===0}function RU(r){return r>=65&&r<=90||r>=97&&r<=122}function kU(r,t=Rt){return t?RU(r.charCodeAt(0))&&r.charCodeAt(1)===58:!1}var X;(xe=>(xe.inMemory="inmemory",xe.vscode="vscode",xe.internal="private",xe.walkThrough="walkThrough",xe.walkThroughSnippet="walkThroughSnippet",xe.http="http",xe.https="https",xe.file="file",xe.mailto="mailto",xe.untitled="untitled",xe.data="data",xe.command="command",xe.vscodeRemote="vscode-remote",xe.vscodeRemoteResource="vscode-remote-resource",xe.vscodeManagedRemoteResource="vscode-managed-remote-resource",xe.vscodeUserData="vscode-userdata",xe.vscodeCustomEditor="vscode-custom-editor",xe.vscodeNotebookCell="vscode-notebook-cell",xe.vscodeNotebookCellMetadata="vscode-notebook-cell-metadata",xe.vscodeNotebookCellMetadataDiff="vscode-notebook-cell-metadata-diff",xe.vscodeNotebookCellOutput="vscode-notebook-cell-output",xe.vscodeNotebookCellOutputDiff="vscode-notebook-cell-output-diff",xe.vscodeNotebookMetadata="vscode-notebook-metadata",xe.vscodeInteractiveInput="vscode-interactive-input",xe.vscodeSettings="vscode-settings",xe.vscodeWorkspaceTrust="vscode-workspace-trust",xe.vscodeTerminal="vscode-terminal",xe.vscodeChatCodeBlock="vscode-chat-code-block",xe.vscodeChatCodeCompareBlock="vscode-chat-code-compare-block",xe.vscodeChatEditor="vscode-chat-editor",xe.vscodeChatInput="chatSessionInput",xe.vscodeLocalChatSession="vscode-chat-session",xe.webviewPanel="webview-panel",xe.vscodeWebview="vscode-webview",xe.vscodeBrowser="vscode-browser",xe.extension="extension",xe.vscodeFileResource="vscode-file",xe.tmp="tmp",xe.vsls="vsls",xe.vscodeSourceControl="vscode-scm",xe.commentsInput="comment",xe.codeSetting="code-setting",xe.outputChannel="output",xe.accessibleView="accessible-view",xe.chatEditingSnapshotScheme="chat-editing-snapshot-text-model",xe.chatEditingModel="chat-editing-text-model",xe.copilotPr="copilot-pr"))(X||={});function Qv(r,t){return E.isUri(r)?Jn(r.scheme,t):_a(r,t+":")}function OU(r,...t){return t.some(e=>Qv(r,e))}var p9="tkn",W_=class{constructor(){this._hosts=Object.create(null);this._ports=Object.create(null);this._connectionTokens=Object.create(null);this._preferredWebSchema="http";this._delegate=null;this._serverRootPath="/"}setPreferredWebSchema(t){this._preferredWebSchema=t}setDelegate(t){this._delegate=t}setServerRootPath(t,e){this._serverRootPath=qe.join(e??"/",f9(t))}getServerRootPath(){return this._serverRootPath}get _remoteResourcesPath(){return qe.join(this._serverRootPath,X.vscodeRemoteResource)}set(t,e,n){this._hosts[t]=e,this._ports[t]=n}setConnectionToken(t,e){this._connectionTokens[t]=e}getPreferredWebSchema(){return this._preferredWebSchema}rewrite(t){if(this._delegate)try{return this._delegate(t)}catch(a){return Ct(a),t}let e=t.authority,n=this._hosts[e];n&&n.indexOf(":")!==-1&&n.indexOf("[")===-1&&(n=`[${n}]`);let o=this._ports[e],i=this._connectionTokens[e],s=`path=${encodeURIComponent(t.path)}`;return typeof i=="string"&&(s+=`&${p9}=${encodeURIComponent(i)}`),E.from({scheme:Xo?this._preferredWebSchema:X.vscodeRemoteResource,authority:`${n}:${o}`,path:this._remoteResourcesPath,query:s})}},m9=new W_;function f9(r){return`${r.quality??"oss"}-${r.commit??"dev"}`}var LU="vs/../../node_modules",MU="vs/../../node_modules.asar";var G_="vscode-app",$_=class r{static{this.FALLBACK_AUTHORITY=G_}asBrowserUri(t){let e=this.toUri(t);return this.uriToBrowserUri(e)}uriToBrowserUri(t){return t.scheme===X.vscodeRemote?m9.rewrite(t):t.scheme===X.file&&(Av||Z0===`${X.vscodeFileResource}://${r.FALLBACK_AUTHORITY}`)?t.with({scheme:X.vscodeFileResource,authority:t.authority||r.FALLBACK_AUTHORITY,query:null,fragment:null}):t}asFileUri(t){let e=this.toUri(t);return this.uriToFileUri(e)}uriToFileUri(t){return t.scheme===X.vscodeFileResource?t.with({scheme:X.file,authority:t.authority!==r.FALLBACK_AUTHORITY?t.authority:null,query:null,fragment:null}):t}toUri(t){if(E.isUri(t))return t;if(globalThis._VSCODE_FILE_ROOT){let e=globalThis._VSCODE_FILE_ROOT;if(/^\w[\w\d+.-]*:\/\//.test(e))return E.joinPath(E.parse(e,!0),t);let n=jc(e,t);return E.file(n)}throw new Error("Cannot determine URI for module id!")}},Xv=new $_,Vj=Object.freeze({"Cache-Control":"no-cache, no-store"}),Wj=Object.freeze({"Document-Policy":"include-js-call-stacks-in-crash-reports"}),g9;(i=>{let r=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(r.get("3"));let e="vscode-coi";function n(s){let a;typeof s=="string"?a=new URL(s).searchParams:s instanceof URL?a=s.searchParams:E.isUri(s)&&(a=new URL(s.toString(!0)).searchParams);let l=a?.get(e);if(l)return r.get(l)}i.getHeadersFromQuery=n;function o(s,a,l){if(!globalThis.crossOriginIsolated)return;let d=a&&l?"3":l?"2":"1";s instanceof URLSearchParams?s.set(e,d):s[e]=d}i.addSearchParam=o})(g9||={});function vr(r){return Df(r,!0)}var Pi=class{constructor(t){this._ignorePathCasing=t}compare(t,e,n=!1){return t===e?0:Vr(this.getComparisonKey(t,n),this.getComparisonKey(e,n))}isEqual(t,e,n=!1){return t===e?!0:!t||!e?!1:this.getComparisonKey(t,n)===this.getComparisonKey(e,n)}getComparisonKey(t,e=!1){return t.with({path:this._ignorePathCasing(t)?t.path.toLowerCase():void 0,fragment:e?null:void 0}).toString()}ignorePathCasing(t){return this._ignorePathCasing(t)}isEqualOrParent(t,e,n=!1){if(t.scheme===e.scheme){if(t.scheme===X.file)return ud(vr(t),vr(e),this._ignorePathCasing(t))&&t.query===e.query&&(n||t.fragment===e.fragment);if(NU(t.authority,e.authority))return ud(t.path,e.path,this._ignorePathCasing(t),"/")&&t.query===e.query&&(n||t.fragment===e.fragment)}return!1}joinPath(t,...e){return E.joinPath(t,...e)}basenameOrAuthority(t){return tn(t)||t.authority}basename(t){return qe.basename(t.path)}extname(t){return qe.extname(t.path)}dirname(t){if(t.path.length===0)return t;let e;return t.scheme===X.file?e=E.file(Ci(vr(t))).path:(e=qe.dirname(t.path),t.authority&&e.length&&e.charCodeAt(0)!==47&&(console.error(`dirname("${t.toString})) resulted in a relative path`),e="/")),t.with({path:e})}normalizePath(t){if(!t.path.length)return t;let e;return t.scheme===X.file?e=E.file(fr(vr(t))).path:e=qe.normalize(t.path),t.with({path:e})}relativePath(t,e){if(t.scheme!==e.scheme||!NU(t.authority,e.authority))return;if(t.scheme===X.file){let i=gs(vr(t),vr(e));return Rt?jv(i):i}let n=t.path||"/",o=e.path||"/";if(this._ignorePathCasing(t)){let i=0;for(let s=Math.min(n.length,o.length);i<s&&!(n.charCodeAt(i)!==o.charCodeAt(i)&&n.charAt(i).toLowerCase()!==o.charAt(i).toLowerCase());i++);n=o.substr(0,i)+n.substr(i)}return qe.relative(n,o)}resolvePath(t,e){if(t.scheme===X.file){let n=E.file(iU(vr(t),e));return t.with({authority:n.authority,path:n.path})}return e=DU(e),t.with({path:qe.resolve(t.path,e)})}isAbsolutePath(t){return!!t.path&&t.path[0]==="/"}isEqualAuthority(t,e){return t===e||t!==void 0&&e!==void 0&&Jn(t,e)}hasTrailingPathSeparator(t,e=Bn){if(t.scheme===X.file){let n=vr(t);return n.length>V_(n).length&&n[n.length-1]===e}else{let n=t.path;return n.length>1&&n.charCodeAt(n.length-1)===47&&!/^[a-zA-Z]:(\/$|\\$)/.test(t.fsPath)}}removeTrailingPathSeparator(t,e=Bn){return UU(t,e)?t.with({path:t.path.substr(0,t.path.length-1)}):t}addTrailingPathSeparator(t,e=Bn){let n=!1;if(t.scheme===X.file){let o=vr(t);n=o!==void 0&&o.length===V_(o).length&&o[o.length-1]===e}else{e="/";let o=t.path;n=o.length===1&&o.charCodeAt(o.length-1)===47}return!n&&!UU(t,e)?t.with({path:t.path+"/"}):t}},gt=new Pi(()=>!1),z_=new Pi(r=>r.scheme===X.file?!zn:!0),q_=new Pi(r=>!0),Wr=gt.isEqual.bind(gt),h9=gt.isEqualOrParent.bind(gt),jj=gt.getComparisonKey.bind(gt),Of=gt.basenameOrAuthority.bind(gt),tn=gt.basename.bind(gt),K_=gt.extname.bind(gt),bs=gt.dirname.bind(gt),Qt=gt.joinPath.bind(gt),Qj=gt.normalizePath.bind(gt),Lf=gt.relativePath.bind(gt),Xj=gt.resolvePath.bind(gt),FU=gt.isAbsolutePath.bind(gt),NU=gt.isEqualAuthority.bind(gt),UU=gt.hasTrailingPathSeparator.bind(gt),Yj=gt.removeTrailingPathSeparator.bind(gt),Zj=gt.addTrailingPathSeparator.bind(gt);var v9;(i=>{i.META_DATA_LABEL="label",i.META_DATA_DESCRIPTION="description",i.META_DATA_SIZE="size",i.META_DATA_MIME="mime";function o(s){let a=new Map;s.path.substring(s.path.indexOf(";")+1,s.path.lastIndexOf(";")).split(";").forEach(c=>{let[u,f]=c.split(":");u&&f&&a.set(u,f)});let d=s.path.substring(0,s.path.indexOf(";"));return d&&a.set(i.META_DATA_MIME,d),a}i.parseMetaData=o})(v9||={});var HU=Symbol("MicrotaskDelay");function br(r){return!!r&&typeof r.then=="function"}function b9(r){let t=new We,e=r(t.token),n=!1,o=new Promise((i,s)=>{let a=t.token.onCancellationRequested(()=>{n=!0,a.dispose(),s(new Bt)});Promise.resolve(e).then(l=>{a.dispose(),t.dispose(),n?Sv(l)&&l.dispose():i(l)},l=>{a.dispose(),t.dispose(),s(l)})});return new class{cancel(){t.cancel(),t.dispose()}then(i,s){return o.then(i,s)}catch(i){return this.then(void 0,i)}finally(i){return o.finally(i)}}}function eu(r,t,e){return new Promise((n,o)=>{let i=t.onCancellationRequested(()=>{i.dispose(),n(e)});r.then(n,o).finally(()=>i.dispose())})}function rb(r,t){return new Promise((e,n)=>{let o=t.onCancellationRequested(()=>{o.dispose(),n(new Bt)});r.then(e,n).finally(()=>o.dispose())})}function dn(r){return new Promise((t,e)=>{let n=r();br(n)?n.then(t,e):t(n)})}function eP(){let r,t;return{promise:new Promise((n,o)=>{r=n,t=o}),resolve:r,reject:t}}var J_=class{constructor(){this.activePromise=null,this.queuedPromise=null,this.queuedPromiseFactory=null,this.cancellationTokenSource=new We}queue(t){if(this.cancellationTokenSource.token.isCancellationRequested)return Promise.reject(new Error("Throttler is disposed"));if(this.activePromise){if(this.queuedPromiseFactory=t,!this.queuedPromise){let e=()=>{if(this.queuedPromise=null,this.cancellationTokenSource.token.isCancellationRequested)return;let n=this.queue(this.queuedPromiseFactory);return this.queuedPromiseFactory=null,n};this.queuedPromise=new Promise(n=>{this.activePromise.then(e,e).then(n)})}return new Promise((e,n)=>{this.queuedPromise.then(e,n)})}return this.activePromise=t(this.cancellationTokenSource.token),new Promise((e,n)=>{this.activePromise.then(o=>{this.activePromise=null,e(o)},o=>{this.activePromise=null,n(o)})})}dispose(){this.cancellationTokenSource.cancel()}};var Da=class{constructor(){this.promiseMap=new Map}queue(t,e){let o=(this.promiseMap.get(t)??Promise.resolve()).catch(()=>{}).then(e).finally(()=>{this.promiseMap.get(t)===o&&this.promiseMap.delete(t)});return this.promiseMap.set(t,o),o}peek(t){return this.promiseMap.get(t)||void 0}keys(){return this.promiseMap.keys()}},I9=(r,t)=>{let e=!0,n=setTimeout(()=>{e=!1,t()},r);return{isTriggered:()=>e,dispose:()=>{clearTimeout(n),e=!1}}},y9=r=>{let t=!0;return queueMicrotask(()=>{t&&(t=!1,r())}),{isTriggered:()=>t,dispose:()=>{t=!1}}},j_=class{constructor(t){this.defaultDelay=t;this.deferred=null,this.completionPromise=null,this.doResolve=null,this.doReject=null,this.task=null}trigger(t,e=this.defaultDelay){this.task=t,this.cancelTimeout(),this.completionPromise||(this.completionPromise=new Promise((o,i)=>{this.doResolve=o,this.doReject=i}).then(()=>{if(this.completionPromise=null,this.doResolve=null,this.task){let o=this.task;return this.task=null,o()}}));let n=()=>{this.deferred=null,this.doResolve?.(null)};return this.deferred=e===HU?y9(n):I9(e,n),this.completionPromise}isTriggered(){return!!this.deferred?.isTriggered()}cancel(){this.cancelTimeout(),this.completionPromise&&(this.doReject?.(new Bt),this.completionPromise=null)}cancelTimeout(){this.deferred?.dispose(),this.deferred=null}dispose(){this.cancel()}},Xc=class{constructor(t){this.delayer=new j_(t),this.throttler=new J_}trigger(t,e){return this.delayer.trigger(()=>this.throttler.queue(t),e)}isTriggered(){return this.delayer.isTriggered()}cancel(){this.delayer.cancel()}dispose(){this.delayer.dispose(),this.throttler.dispose()}},Ln=class{constructor(){this._isOpen=!1,this._promise=new Promise((t,e)=>{this._completePromise=t})}isOpen(){return this._isOpen}open(){this._isOpen=!0,this._completePromise(!0)}wait(){return this._promise}};function Qn(r,t){return t?new Promise((e,n)=>{let o=setTimeout(()=>{i.dispose(),e()},r),i=t.onCancellationRequested(()=>{clearTimeout(o),i.dispose(),n(new Bt)})}):b9(e=>Qn(r,e))}function BU(r,t=0,e){let n=setTimeout(()=>{r(),e&&o.dispose()},t),o=ae(()=>{clearTimeout(n),e?.delete(o)});return e?.add(o),o}var Q_=class{constructor(t){this._size=0;this._isDisposed=!1;this.maxDegreeOfParalellism=t,this.outstandingPromises=[],this.runningPromises=0,this._onDrained=new D}whenIdle(){return this.size>0?He.toPromise(this.onDrained):Promise.resolve()}get onDrained(){return this._onDrained.event}get size(){return this._size}queue(t){if(this._isDisposed)throw new Error("Object has been disposed");return this._size++,new Promise((e,n)=>{this.outstandingPromises.push({factory:t,c:e,e:n}),this.consume()})}consume(){for(;this.outstandingPromises.length&&this.runningPromises<this.maxDegreeOfParalellism;){let t=this.outstandingPromises.shift();this.runningPromises++;let e=t.factory();e.then(t.c,t.e),e.then(()=>this.consumed(),()=>this.consumed())}}consumed(){this._isDisposed||(this.runningPromises--,--this._size===0&&this._onDrained.fire(),this.outstandingPromises.length>0&&this.consume())}clear(){if(this._isDisposed)throw new Error("Object has been disposed");this.outstandingPromises.length=0,this._size=this.runningPromises}dispose(){this._isDisposed=!0,this.outstandingPromises.length=0,this._size=0,this._onDrained.dispose()}},X_=class extends Q_{constructor(){super(1)}};var eb=class{constructor(){this.queues=new Map;this.drainers=new Set;this.drainListeners=void 0;this.drainListenerCount=0}async whenDrained(){if(this.isDrained())return;let t=new jn;return this.drainers.add(t),t.p}isDrained(){for(let[,t]of this.queues)if(t.size>0)return!1;return!0}queueSize(t,e=gt){let n=e.getComparisonKey(t);return this.queues.get(n)?.size??0}queueFor(t,e,n=gt){let o=n.getComparisonKey(t),i=this.queues.get(o);if(!i){i=new X_;let s=this.drainListenerCount++,a=He.once(i.onDrained)(()=>{i?.dispose(),this.queues.delete(o),this.onDidQueueDrain(),this.drainListeners?.deleteAndDispose(s),this.drainListeners?.size===0&&(this.drainListeners.dispose(),this.drainListeners=void 0)});this.drainListeners||(this.drainListeners=new Fr),this.drainListeners.set(s,a),this.queues.set(o,i)}return i.queue(e)}onDidQueueDrain(){this.isDrained()&&this.releaseDrainers()}releaseDrainers(){for(let t of this.drainers)t.complete();this.drainers.clear()}dispose(){for(let[,t]of this.queues)t.dispose();this.queues.clear(),this.releaseDrainers(),this.drainListeners?.dispose()}};var tb=class{constructor(){this.disposable=void 0;this.isDisposed=!1}cancel(){this.disposable?.dispose(),this.disposable=void 0}cancelAndSet(t,e,n=globalThis){if(this.isDisposed)throw new Nt("Calling 'cancelAndSet' on a disposed IntervalTimer");this.cancel();let o=n.setInterval(()=>{t()},e);this.disposable=ae(()=>{n.clearInterval(o),this.disposable=void 0})}dispose(){this.cancel(),this.isDisposed=!0}},ho=class{constructor(t,e){this.timeoutToken=void 0,this.runner=t,this.timeout=e,this.timeoutHandler=this.onTimeout.bind(this)}dispose(){this.cancel(),this.runner=null}cancel(){this.isScheduled()&&(clearTimeout(this.timeoutToken),this.timeoutToken=void 0)}schedule(t=this.timeout){this.cancel(),this.timeoutToken=setTimeout(this.timeoutHandler,t)}get delay(){return this.timeout}set delay(t){this.timeout=t}isScheduled(){return this.timeoutToken!==void 0}flush(){this.isScheduled()&&(this.cancel(),this.doRun())}onTimeout(){this.timeoutToken=void 0,this.runner&&this.doRun()}doRun(){this.runner?.()}};var tP,Zv;(function(){let r=globalThis;typeof r.requestIdleCallback!="function"||typeof r.cancelIdleCallback!="function"?Zv=(t,e,n)=>{Ov(()=>{if(o)return;let i=Date.now()+15;e(Object.freeze({didTimeout:!0,timeRemaining(){return Math.max(0,i-Date.now())}}))});let o=!1;return{dispose(){o||(o=!0)}}}:Zv=(t,e,n)=>{let o=t.requestIdleCallback(e,typeof n=="number"?{timeout:n}:void 0),i=!1;return{dispose(){i||(i=!0,t.cancelIdleCallback(o))}}},tP=(t,e)=>Zv(globalThis,t,e)})();var Y_=class{constructor(t,e){this._didRun=!1;this._executor=()=>{try{this._value=e()}catch(n){this._error=n}finally{this._didRun=!0}},this._handle=Zv(t,()=>this._executor())}dispose(){this._handle.dispose()}get value(){if(this._didRun||(this._handle.dispose(),this._executor()),this._error)throw this._error;return this._value}get isInitialized(){return this._didRun}},nb=class extends Y_{constructor(t){super(globalThis,t)}};var jn=class r{static fromPromise(t){let e=new r;return e.settleWith(t),e}get isRejected(){return this.outcome?.outcome===1}get isResolved(){return this.outcome?.outcome===0}get isSettled(){return!!this.outcome}get value(){return this.outcome?.outcome===0?this.outcome?.value:void 0}constructor(){this.p=new Promise((t,e)=>{this.completeCallback=t,this.errorCallback=e})}complete(t){return this.isSettled?Promise.resolve():new Promise(e=>{this.completeCallback(t),this.outcome={outcome:0,value:t},e()})}error(t){return this.isSettled?Promise.resolve():new Promise(e=>{this.errorCallback(t),this.outcome={outcome:1,value:t},e()})}settleWith(t){return t.then(e=>this.complete(e),e=>this.error(e))}cancel(){return this.error(new Bt)}},wa;(e=>{async function r(n){let o,i=await Promise.all(n.map(s=>s.then(a=>a,a=>{o||(o=a)})));if(typeof o<"u")throw o;return i}e.settled=r;function t(n){return new Promise(async(o,i)=>{try{await n(o,i)}catch(s){i(s)}})}e.withAsyncBody=t})(wa||={});var Yc=class r{static fromArray(t){return new r(e=>{e.emitMany(t)})}static fromPromise(t){return new r(async e=>{e.emitMany(await t)})}static fromPromisesResolveOrder(t){return new r(async e=>{await Promise.all(t.map(async n=>e.emitOne(await n)))})}static merge(t){return new r(async e=>{await Promise.all(t.map(async n=>{for await(let o of n)e.emitOne(o)}))})}static{this.EMPTY=r.fromArray([])}constructor(t,e){this._state=0,this._results=[],this._error=null,this._onReturn=e,this._onStateChanged=new D,queueMicrotask(async()=>{let n={emitOne:o=>this.emitOne(o),emitMany:o=>this.emitMany(o),reject:o=>this.reject(o)};try{await Promise.resolve(t(n)),this.resolve()}catch(o){this.reject(o)}finally{n.emitOne=void 0,n.emitMany=void 0,n.reject=void 0}})}[Symbol.asyncIterator](){let t=0;return{next:async()=>{do{if(this._state===2)throw this._error;if(t<this._results.length)return{done:!1,value:this._results[t++]};if(this._state===1)return{done:!0,value:void 0};await He.toPromise(this._onStateChanged.event)}while(!0)},return:async()=>(this._onReturn?.(),{done:!0,value:void 0})}}static map(t,e){return new r(async n=>{for await(let o of t)n.emitOne(e(o))})}map(t){return r.map(this,t)}static filter(t,e){return new r(async n=>{for await(let o of t)e(o)&&n.emitOne(o)})}filter(t){return r.filter(this,t)}static coalesce(t){return r.filter(t,e=>!!e)}coalesce(){return r.coalesce(this)}static async toPromise(t){let e=[];for await(let n of t)e.push(n);return e}toPromise(){return r.toPromise(this)}emitOne(t){this._state===0&&(this._results.push(t),this._onStateChanged.fire())}emitMany(t){this._state===0&&(this._results=this._results.concat(t),this._onStateChanged.fire())}resolve(){this._state===0&&(this._state=1,this._onStateChanged.fire())}reject(t){this._state===0&&(this._state=2,this._error=t,this._onStateChanged.fire())}};var ob=class{constructor(t){this._deferred=new jn;this._asyncIterable=new Yc(o=>{if(e){o.reject(e);return}return n&&o.emitMany(n),this._errorFn=i=>o.reject(i),this._emitOneFn=i=>o.emitOne(i),this._emitManyFn=i=>o.emitMany(i),this._deferred.p},t);let e,n;this._errorFn=o=>{e||(e=o)},this._emitOneFn=o=>{n||(n=[]),n.push(o)},this._emitManyFn=o=>{n?o.forEach(i=>n.push(i)):n=o.slice()}}get asyncIterable(){return this._asyncIterable}resolve(){this._deferred.complete()}reject(t){this._errorFn(t),this._deferred.complete()}emitOne(t){this._emitOneFn(t)}emitMany(t){this._emitManyFn(t)}};var Z_=class{constructor(){this._unsatisfiedConsumers=[];this._unconsumedValues=[]}get hasFinalValue(){return!!this._finalValue}produce(t){if(this._ensureNoFinalValue(),this._unsatisfiedConsumers.length>0){let e=this._unsatisfiedConsumers.shift();this._resolveOrRejectDeferred(e,t)}else this._unconsumedValues.push(t)}produceFinal(t){this._ensureNoFinalValue(),this._finalValue=t;for(let e of this._unsatisfiedConsumers)this._resolveOrRejectDeferred(e,t);this._unsatisfiedConsumers.length=0}_ensureNoFinalValue(){if(this._finalValue)throw new Nt("ProducerConsumer: cannot produce after final value has been set")}_resolveOrRejectDeferred(t,e){e.ok?t.complete(e.value):t.error(e.error)}consume(){if(this._unconsumedValues.length>0||this._finalValue){let t=this._unconsumedValues.length>0?this._unconsumedValues.shift():this._finalValue;return t.ok?Promise.resolve(t.value):Promise.reject(t.error)}else{let t=new jn;return this._unsatisfiedConsumers.push(t),t.p}}},Zc=class r{constructor(t,e){this._onReturn=e;this._producerConsumer=new Z_;this._iterator={next:()=>this._producerConsumer.consume(),return:()=>(this._onReturn?.(),Promise.resolve({done:!0,value:void 0})),throw:async t=>(this._finishError(t),{done:!0,value:void 0})};queueMicrotask(async()=>{let n=t({emitOne:o=>this._producerConsumer.produce({ok:!0,value:{done:!1,value:o}}),emitMany:o=>{for(let i of o)this._producerConsumer.produce({ok:!0,value:{done:!1,value:i}})},reject:o=>this._finishError(o)});if(!this._producerConsumer.hasFinalValue)try{await n,this._finishOk()}catch(o){this._finishError(o)}})}static fromArray(t){return new r(e=>{e.emitMany(t)})}static fromPromise(t){return new r(async e=>{e.emitMany(await t)})}static fromPromisesResolveOrder(t){return new r(async e=>{await Promise.all(t.map(async n=>e.emitOne(await n)))})}static merge(t){return new r(async e=>{await Promise.all(t.map(async n=>{for await(let o of n)e.emitOne(o)}))})}static{this.EMPTY=r.fromArray([])}static map(t,e){return new r(async n=>{for await(let o of t)n.emitOne(e(o))})}static tee(t){let e,n,o=new jn,i=async()=>{if(!(!e||!n))try{for await(let l of t)e.emitOne(l),n.emitOne(l)}catch(l){e.reject(l),n.reject(l)}finally{o.complete()}},s=new r(async l=>(e=l,i(),o.p)),a=new r(async l=>(n=l,i(),o.p));return[s,a]}map(t){return r.map(this,t)}static coalesce(t){return r.filter(t,e=>!!e)}coalesce(){return r.coalesce(this)}static filter(t,e){return new r(async n=>{for await(let o of t)e(o)&&n.emitOne(o)})}filter(t){return r.filter(this,t)}_finishOk(){this._producerConsumer.hasFinalValue||this._producerConsumer.produceFinal({ok:!0,value:{done:!0,value:void 0}})}_finishError(t){this._producerConsumer.hasFinalValue||this._producerConsumer.produceFinal({ok:!1,error:t})}[Symbol.asyncIterator](){return this._iterator}};var IQ=new class{transformIncoming(r){return r}transformOutgoing(r){return r}transformOutgoingURI(r){return r}transformOutgoingScheme(r){return r}};function VU(r,t,e,n){if(!r||n>200)return null;if(typeof r=="object"){if(r.$mid===1)return e?E.revive(t.transformIncoming(r)):t.transformIncoming(r);if(r instanceof ce)return null;for(let o in r)if(Object.hasOwnProperty.call(r,o)){let i=VU(r[o],t,e,n+1);i!==null&&(r[o]=i)}}return null}function tu(r,t){let e=VU(r,t,!1,0);return e===null?r:e}var Mf=class{constructor(){this._actual=null,this._actualOk=null,this._actualErr=null,this._hasValue=!1,this._value=null,this._hasErr=!1,this._err=null}get[Symbol.toStringTag](){return this.toString()}_ensureActual(){return this._actual||(this._actual=new Promise((t,e)=>{this._actualOk=t,this._actualErr=e,this._hasValue&&this._actualOk(this._value),this._hasErr&&this._actualErr(this._err)})),this._actual}resolveOk(t){this._hasValue||this._hasErr||(this._hasValue=!0,this._value=t,this._actual&&this._actualOk(t))}resolveErr(t){this._hasValue||this._hasErr||(this._hasErr=!0,this._err=t,this._actual?this._actualErr(t):Ct(t))}then(t,e){return this._ensureActual().then(t,e)}catch(t){return this._ensureActual().then(void 0,t)}finally(t){return this._ensureActual().finally(t)}},ib=class extends Mf{constructor(){super(),this._hasErr=!0,this._err=new Bt}};function nP(r,t){try{return JSON.stringify(r,t)}catch{return"null"}}var rP="$$ref$$",E9={[rP]:-1};function WU(r,t=null,e=!1){let n=[];return{jsonString:(e?nP:JSON.stringify)(r,(i,s)=>{if(typeof s>"u")return E9;if(typeof s=="object"){if(s instanceof ce){let a=n.push(s)-1;return{[rP]:a}}if(t)return t(i,s)}return s}),referencedBuffers:n}}function qU(r,t,e){return JSON.parse(r,(n,o)=>{if(o){let i=o[rP];if(typeof i=="number")return t[i];if(e&&o.$mid===1)return e.transformIncoming(o)}return o})}function $U(r,t){return JSON.stringify(r,t)}function S9(r){return r?(t,e)=>e&&e.$mid===1?r.transformOutgoing(e):e:null}var x9=()=>{},C9=Symbol.for("rpcProtocol"),T9=Symbol.for("rpcProxy"),GU,zU,sb=class r extends(zU=K,GU=C9,zU){constructor(e,n=null,o=null){super();this[GU]=!0;this._onDidChangeResponsiveState=this._register(new D);this.onDidChangeResponsiveState=this._onDidChangeResponsiveState.event;this._protocol=e,this._logger=n,this._uriTransformer=o,this._uriReplacer=S9(this._uriTransformer),this._isDisposed=!1,this._locals=[],this._proxies=[];for(let i=0,s=wf.count;i<s;i++)this._locals[i]=null,this._proxies[i]=null;this._lastMessageId=0,this._cancelInvokedHandlers=Object.create(null),this._pendingRPCReplies={},this._responsiveState=0,this._unacknowledgedCount=0,this._unresponsiveTime=0,this._asyncCheckUresponsive=this._register(new ho(()=>this._checkUnresponsive(),1e3)),this._register(this._protocol.onMessage(i=>this._receiveOneMessage(i)))}static{this.UNRESPONSIVE_TIME=3*1e3}dispose(){this._isDisposed=!0,Object.keys(this._pendingRPCReplies).forEach(e=>{let n=this._pendingRPCReplies[e];delete this._pendingRPCReplies[e],n.resolveErr(XT())}),super.dispose()}drain(){return typeof this._protocol.drain=="function"?this._protocol.drain():Promise.resolve()}_onWillSendRequest(e){this._unacknowledgedCount===0&&(this._unresponsiveTime=Date.now()+r.UNRESPONSIVE_TIME),this._unacknowledgedCount++,this._asyncCheckUresponsive.isScheduled()||this._asyncCheckUresponsive.schedule()}_onDidReceiveAcknowledge(e){this._unresponsiveTime=Date.now()+r.UNRESPONSIVE_TIME,this._unacknowledgedCount--,this._unacknowledgedCount===0&&this._asyncCheckUresponsive.cancel(),this._setResponsiveState(0)}_checkUnresponsive(){this._unacknowledgedCount!==0&&(Date.now()>this._unresponsiveTime?this._setResponsiveState(1):this._asyncCheckUresponsive.schedule())}_setResponsiveState(e){this._responsiveState!==e&&(this._responsiveState=e,this._onDidChangeResponsiveState.fire(this._responsiveState))}get responsiveState(){return this._responsiveState}transformIncomingURIs(e){return this._uriTransformer?tu(e,this._uriTransformer):e}getProxy(e){let{nid:n,sid:o}=e;return this._proxies[n]||(this._proxies[n]=this._createProxy(n,o)),this._proxies[n]}_createProxy(e,n){let o={get:(i,s)=>(typeof s=="string"&&!i[s]&&s.charCodeAt(0)===36&&(i[s]=(...a)=>this._remoteCall(e,s,a)),s===T9?n:i[s])};return new Proxy(Object.create(null),o)}set(e,n){return this._locals[e.nid]=n,n}assertRegistered(e){for(let n=0,o=e.length;n<o;n++){let i=e[n];if(!this._locals[i.nid])throw new Error(`Missing proxy instance ${i.sid}`)}}_receiveOneMessage(e){if(this._isDisposed)return;let n=e.byteLength,o=cn.read(e,0),i=o.readUInt8(),s=o.readUInt32();switch(i){case 1:case 2:{let{rpcId:a,method:l,args:d}=Ho.deserializeRequestJSONArgs(o);this._uriTransformer&&(d=tu(d,this._uriTransformer)),this._receiveRequest(n,s,a,l,d,i===2);break}case 3:case 4:{let{rpcId:a,method:l,args:d}=Ho.deserializeRequestMixedArgs(o);this._uriTransformer&&(d=tu(d,this._uriTransformer)),this._receiveRequest(n,s,a,l,d,i===4);break}case 5:{this._logger?.logIncoming(n,s,0,"ack"),this._onDidReceiveAcknowledge(s);break}case 6:{this._receiveCancel(n,s);break}case 7:{this._receiveReply(n,s,void 0);break}case 9:{let a=Ho.deserializeReplyOKJSON(o);this._uriTransformer&&(a=tu(a,this._uriTransformer)),this._receiveReply(n,s,a);break}case 10:{let a=Ho.deserializeReplyOKJSONWithBuffers(o,this._uriTransformer);this._receiveReply(n,s,a);break}case 8:{let a=Ho.deserializeReplyOKVSBuffer(o);this._receiveReply(n,s,a);break}case 11:{let a=Ho.deserializeReplyErrError(o);this._uriTransformer&&(a=tu(a,this._uriTransformer)),this._receiveReplyErr(n,s,a);break}case 12:{this._receiveReplyErr(n,s,void 0);break}default:console.error("received unexpected message"),console.error(e)}}_receiveRequest(e,n,o,i,s,a){this._logger?.logIncoming(e,n,1,`receiveRequest ${Rf(o)}.${i}(`,s);let l=String(n),d,c;if(a){let f=new We;s.push(f.token),d=this._invokeHandler(o,i,s),c=()=>f.cancel()}else d=this._invokeHandler(o,i,s),c=x9;this._cancelInvokedHandlers[l]=c;let u=Ho.serializeAcknowledged(n);this._logger?.logOutgoing(u.byteLength,n,1,"ack"),this._protocol.send(u),d.then(f=>{delete this._cancelInvokedHandlers[l];let g=Ho.serializeReplyOK(n,f,this._uriReplacer);this._logger?.logOutgoing(g.byteLength,n,1,"reply:",f),this._protocol.send(g)},f=>{delete this._cancelInvokedHandlers[l];let g=Ho.serializeReplyErr(n,f);this._logger?.logOutgoing(g.byteLength,n,1,"replyErr:",f),this._protocol.send(g)})}_receiveCancel(e,n){this._logger?.logIncoming(e,n,1,"receiveCancel");let o=String(n);this._cancelInvokedHandlers[o]?.()}_receiveReply(e,n,o){this._logger?.logIncoming(e,n,0,"receiveReply:",o);let i=String(n);if(!this._pendingRPCReplies.hasOwnProperty(i))return;let s=this._pendingRPCReplies[i];delete this._pendingRPCReplies[i],s.resolveOk(o)}_receiveReplyErr(e,n,o){this._logger?.logIncoming(e,n,0,"receiveReplyErr:",o);let i=String(n);if(!this._pendingRPCReplies.hasOwnProperty(i))return;let s=this._pendingRPCReplies[i];delete this._pendingRPCReplies[i];let a;o&&(o.$isError?(a=new Error,a.name=o.name,a.message=o.message,a.stack=o.stack):a=o),s.resolveErr(a)}_invokeHandler(e,n,o){try{return Promise.resolve(this._doInvokeHandler(e,n,o))}catch(i){return Promise.reject(i)}}_doInvokeHandler(e,n,o){let i=this._locals[e];if(!i)throw new Error("Unknown actor "+Rf(e));let s=i[n];if(typeof s!="function")throw new Error("Unknown method "+n+" on actor "+Rf(e));return s.apply(i,o)}_remoteCall(e,n,o){if(this._isDisposed)return new ib;let i=null;if(o.length>0&&De.isCancellationToken(o[o.length-1])&&(i=o.pop()),i&&i.isCancellationRequested)return Promise.reject(XT());let s=Ho.serializeRequestArguments(o,this._uriReplacer),a=++this._lastMessageId,l=String(a),d=new Mf,c=new te;i&&c.add(i.onCancellationRequested(()=>{let f=Ho.serializeCancel(a);this._logger?.logOutgoing(f.byteLength,a,0,"cancel"),this._protocol.send(f)})),this._pendingRPCReplies[l]=new oP(d,c),this._onWillSendRequest(a);let u=Ho.serializeRequest(a,e,n,s,!!i);return this._logger?.logOutgoing(u.byteLength,a,0,`request: ${Rf(e)}.${n}(`,o),this._protocol.send(u),d}},oP=class{constructor(t,e){this._promise=t;this._disposable=e}resolveOk(t){this._promise.resolveOk(t),this._disposable.dispose()}resolveErr(t){this._promise.resolveErr(t),this._disposable.dispose()}},cn=class r{static alloc(t,e,n){let o=new r(ce.alloc(n+1+4),0);return o.writeUInt8(t),o.writeUInt32(e),o}static read(t,e){return new r(t,e)}get buffer(){return this._buff}constructor(t,e){this._buff=t,this._offset=e}static sizeUInt8(){return 1}static{this.sizeUInt32=4}writeUInt8(t){this._buff.writeUInt8(t,this._offset),this._offset+=1}readUInt8(){let t=this._buff.readUInt8(this._offset);return this._offset+=1,t}writeUInt32(t){this._buff.writeUInt32BE(t,this._offset),this._offset+=4}readUInt32(){let t=this._buff.readUInt32BE(this._offset);return this._offset+=4,t}static sizeShortString(t){return 1+t.byteLength}writeShortString(t){this._buff.writeUInt8(t.byteLength,this._offset),this._offset+=1,this._buff.set(t,this._offset),this._offset+=t.byteLength}readShortString(){let t=this._buff.readUInt8(this._offset);this._offset+=1;let n=this._buff.slice(this._offset,this._offset+t).toString();return this._offset+=t,n}static sizeLongString(t){return 4+t.byteLength}writeLongString(t){this._buff.writeUInt32BE(t.byteLength,this._offset),this._offset+=4,this._buff.set(t,this._offset),this._offset+=t.byteLength}readLongString(){let t=this._buff.readUInt32BE(this._offset);this._offset+=4;let n=this._buff.slice(this._offset,this._offset+t).toString();return this._offset+=t,n}writeBuffer(t){this._buff.writeUInt32BE(t.byteLength,this._offset),this._offset+=4,this._buff.set(t,this._offset),this._offset+=t.byteLength}static sizeVSBuffer(t){return 4+t.byteLength}writeVSBuffer(t){this._buff.writeUInt32BE(t.byteLength,this._offset),this._offset+=4,this._buff.set(t,this._offset),this._offset+=t.byteLength}readVSBuffer(){let t=this._buff.readUInt32BE(this._offset);this._offset+=4;let e=this._buff.slice(this._offset,this._offset+t);return this._offset+=t,e}static sizeMixedArray(t){let e=0;e+=1;for(let n=0,o=t.length;n<o;n++){let i=t[n];switch(e+=1,i.type){case 1:e+=this.sizeLongString(i.value);break;case 2:e+=this.sizeVSBuffer(i.value);break;case 3:e+=this.sizeUInt32,e+=this.sizeLongString(i.value);for(let s=0;s<i.buffers.length;++s)e+=this.sizeVSBuffer(i.buffers[s]);break;case 4:break}}return e}writeMixedArray(t){this._buff.writeUInt8(t.length,this._offset),this._offset+=1;for(let e=0,n=t.length;e<n;e++){let o=t[e];switch(o.type){case 1:this.writeUInt8(1),this.writeLongString(o.value);break;case 2:this.writeUInt8(2),this.writeVSBuffer(o.value);break;case 3:this.writeUInt8(3),this.writeUInt32(o.buffers.length),this.writeLongString(o.value);for(let i=0;i<o.buffers.length;++i)this.writeBuffer(o.buffers[i]);break;case 4:this.writeUInt8(4);break}}}readMixedArray(){let t=this._buff.readUInt8(this._offset);this._offset+=1;let e=new Array(t);for(let n=0;n<t;n++)switch(this.readUInt8()){case 1:e[n]=this.readLongString();break;case 2:e[n]=this.readVSBuffer();break;case 3:{let i=this.readUInt32(),s=this.readLongString(),a=[];for(let l=0;l<i;++l)a.push(this.readVSBuffer());e[n]=new Wt(qU(s,a,null));break}case 4:e[n]=void 0;break}return e}};var Ho=class{static _useMixedArgSerialization(t){for(let e=0,n=t.length;e<n;e++)if(t[e]instanceof ce||t[e]instanceof Wt||typeof t[e]>"u")return!0;return!1}static serializeRequestArguments(t,e){if(this._useMixedArgSerialization(t)){let n=[];for(let o=0,i=t.length;o<i;o++){let s=t[o];if(s instanceof ce)n[o]={type:2,value:s};else if(typeof s>"u")n[o]={type:4};else if(s instanceof Wt){let{jsonString:a,referencedBuffers:l}=WU(s.value,e);n[o]={type:3,value:ce.fromString(a),buffers:l}}else n[o]={type:1,value:ce.fromString($U(s,e))}}return{type:1,args:n}}return{type:0,args:$U(t,e)}}static serializeRequest(t,e,n,o,i){switch(o.type){case 0:return this._requestJSONArgs(t,e,n,o.args,i);case 1:return this._requestMixedArgs(t,e,n,o.args,i)}}static _requestJSONArgs(t,e,n,o,i){let s=ce.fromString(n),a=ce.fromString(o),l=0;l+=cn.sizeUInt8(),l+=cn.sizeShortString(s),l+=cn.sizeLongString(a);let d=cn.alloc(i?2:1,t,l);return d.writeUInt8(e),d.writeShortString(s),d.writeLongString(a),d.buffer}static deserializeRequestJSONArgs(t){let e=t.readUInt8(),n=t.readShortString(),o=t.readLongString();return{rpcId:e,method:n,args:JSON.parse(o)}}static _requestMixedArgs(t,e,n,o,i){let s=ce.fromString(n),a=0;a+=cn.sizeUInt8(),a+=cn.sizeShortString(s),a+=cn.sizeMixedArray(o);let l=cn.alloc(i?4:3,t,a);return l.writeUInt8(e),l.writeShortString(s),l.writeMixedArray(o),l.buffer}static deserializeRequestMixedArgs(t){let e=t.readUInt8(),n=t.readShortString(),o=t.readMixedArray(),i=new Array(o.length);for(let s=0,a=o.length;s<a;s++){let l=o[s];typeof l=="string"?i[s]=JSON.parse(l):i[s]=l}return{rpcId:e,method:n,args:i}}static serializeAcknowledged(t){return cn.alloc(5,t,0).buffer}static serializeCancel(t){return cn.alloc(6,t,0).buffer}static serializeReplyOK(t,e,n){if(typeof e>"u")return this._serializeReplyOKEmpty(t);if(e instanceof ce)return this._serializeReplyOKVSBuffer(t,e);if(e instanceof Wt){let{jsonString:o,referencedBuffers:i}=WU(e.value,n,!0);return this._serializeReplyOKJSONWithBuffers(t,o,i)}else return this._serializeReplyOKJSON(t,nP(e,n))}static _serializeReplyOKEmpty(t){return cn.alloc(7,t,0).buffer}static _serializeReplyOKVSBuffer(t,e){let n=0;n+=cn.sizeVSBuffer(e);let o=cn.alloc(8,t,n);return o.writeVSBuffer(e),o.buffer}static deserializeReplyOKVSBuffer(t){return t.readVSBuffer()}static _serializeReplyOKJSON(t,e){let n=ce.fromString(e),o=0;o+=cn.sizeLongString(n);let i=cn.alloc(9,t,o);return i.writeLongString(n),i.buffer}static _serializeReplyOKJSONWithBuffers(t,e,n){let o=ce.fromString(e),i=0;i+=cn.sizeUInt32,i+=cn.sizeLongString(o);for(let a of n)i+=cn.sizeVSBuffer(a);let s=cn.alloc(10,t,i);s.writeUInt32(n.length),s.writeLongString(o);for(let a of n)s.writeBuffer(a);return s.buffer}static deserializeReplyOKJSON(t){let e=t.readLongString();return JSON.parse(e)}static deserializeReplyOKJSONWithBuffers(t,e){let n=t.readUInt32(),o=t.readLongString(),i=[];for(let s=0;s<n;++s)i.push(t.readVSBuffer());return new Wt(qU(o,i,e))}static serializeReplyErr(t,e){let n=e?nP(bi(e),null):void 0;if(typeof n!="string")return this._serializeReplyErrEmpty(t);let o=ce.fromString(n),i=0;i+=cn.sizeLongString(o);let s=cn.alloc(11,t,i);return s.writeLongString(o),s.buffer}static deserializeReplyErrError(t){let e=t.readLongString();return JSON.parse(e)}static _serializeReplyErrEmpty(t){return cn.alloc(12,t,0).buffer}};var $r;(o=>{o.serviceIds=new Map,o.DI_TARGET="$di$target",o.DI_DEPENDENCIES="$di$dependencies";function n(i){return i[o.DI_DEPENDENCIES]||[]}o.getServiceDependencies=n})($r||={});var ko=N("instantiationService");function _9(r,t,e){t[$r.DI_TARGET]===t?t[$r.DI_DEPENDENCIES].push({id:r,index:e}):(t[$r.DI_DEPENDENCIES]=[{id:r,index:e}],t[$r.DI_TARGET]=t)}function N(r){if($r.serviceIds.has(r))return $r.serviceIds.get(r);let t=function(e,n,o){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");_9(t,e,o)};return t.toString=()=>r,$r.serviceIds.set(r,t),t}function Nf(r){if(!r)return;let t=r.indexOf("+");return t<0?r:r.substr(0,t)}var ab=["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"];var Ue=class{constructor(t){this.value=t,this._lower=t.toLowerCase()}static equals(t,e){if(typeof t>"u"||t===null)return typeof e>"u"||e===null;if(typeof e>"u"||e===null)return!1;if(typeof t=="string"||typeof e=="string"){let n=typeof t=="string"?t:t.value,o=typeof e=="string"?e:e.value;return Jn(n,o)}return t._lower===e._lower}static toKey(t){return typeof t=="string"?t.toLowerCase():t._lower}},vo=class{constructor(t){this._set=new Set;if(t)for(let e of t)this.add(e)}get size(){return this._set.size}add(t){this._set.add(Ue.toKey(t))}delete(t){return this._set.delete(Ue.toKey(t))}has(t){return this._set.has(Ue.toKey(t))}},Xn=class{constructor(){this._map=new Map}clear(){this._map.clear()}delete(t){this._map.delete(Ue.toKey(t))}get(t){return this._map.get(Ue.toKey(t))}has(t){return this._map.has(Ue.toKey(t))}set(t,e){this._map.set(Ue.toKey(t),e)}values(){return this._map.values()}forEach(t){this._map.forEach(t)}[Symbol.iterator](){return this._map[Symbol.iterator]()}},nu=class extends Error{constructor(t,e,n){super(`Error in extension ${Ue.toKey(t)}: ${n??e.message}`,{cause:e}),this.name="ExtensionError",this.extension=t}};var zQ=N("IBuiltinExtensionsScannerService");function iP(r,t){return t&&(r.stack||r.stacktrace)?p(119,null,JU(r),KU(r.stack)||KU(r.stacktrace)):JU(r)}function KU(r){return Array.isArray(r)?r.join(`
`):r}function JU(r){return r.code==="ERR_UNC_HOST_NOT_ALLOWED"?`${r.message}. Please update the 'security.allowedUNCHosts' setting if you want to allow this host.`:typeof r.code=="string"&&typeof r.errno=="number"&&typeof r.syscall=="string"?p(118,null,r.message):r.message||p(116,null)}function Gr(r=null,t=!1){if(!r)return p(116,null);if(Array.isArray(r)){let e=pt(r),n=Gr(e[0],t);return e.length>1?p(117,null,n,e.length):n}if(Me(r))return r;if(r.detail){let e=r.detail;if(e.error)return iP(e.error,t);if(e.exception)return iP(e.exception,t)}return r.stack?iP(r,t):r.message?r.message:p(116,null)}function zr(r){return aP(r,0)}function aP(r,t){switch(typeof r){case"object":return r===null?Is(349,t):Array.isArray(r)?D9(r,t):w9(r,t);case"string":return lb(r,t);case"boolean":return P9(r,t);case"number":return Is(r,t);case"undefined":return Is(937,t);default:return Is(617,t)}}function Is(r,t){return(t<<5)-t+r|0}function P9(r,t){return Is(r?433:863,t)}function lb(r,t){t=Is(149417,t);for(let e=0,n=r.length;e<n;e++)t=Is(r.charCodeAt(e),t);return t}function D9(r,t){return t=Is(104579,t),r.reduce((e,n)=>aP(n,e),t)}function w9(r,t){return t=Is(181387,t),Object.keys(r).sort().reduce((e,n)=>(e=lb(n,e),aP(r[n],e)),t)}function sP(r,t,e=32){let n=e-t,o=~((1<<n)-1);return(r<<t|(o&r)>>>n)>>>0}function Uf(r,t=32){return r instanceof ArrayBuffer?Sf(ce.wrap(new Uint8Array(r))):(r>>>0).toString(16).padStart(t/4,"0")}var jU=class r{constructor(){this._h0=1732584193;this._h1=4023233417;this._h2=2562383102;this._h3=271733878;this._h4=3285377520;this._buff=new Uint8Array(67),this._buffDV=new DataView(this._buff.buffer),this._buffLen=0,this._totalLen=0,this._leftoverHighSurrogate=0,this._finished=!1}static{this._bigBlock32=new DataView(new ArrayBuffer(320))}update(t){let e=t.length;if(e===0)return;let n=this._buff,o=this._buffLen,i=this._leftoverHighSurrogate,s,a;for(i!==0?(s=i,a=-1,i=0):(s=t.charCodeAt(0),a=0);;){let l=s;if(cd(s))if(a+1<e){let d=t.charCodeAt(a+1);Af(d)?(a++,l=qv(s,d)):l=65533}else{i=s;break}else Af(s)&&(l=65533);if(o=this._push(n,o,l),a++,a<e)s=t.charCodeAt(a);else break}this._buffLen=o,this._leftoverHighSurrogate=i}_push(t,e,n){return n<128?t[e++]=n:n<2048?(t[e++]=192|(n&1984)>>>6,t[e++]=128|(n&63)>>>0):n<65536?(t[e++]=224|(n&61440)>>>12,t[e++]=128|(n&4032)>>>6,t[e++]=128|(n&63)>>>0):(t[e++]=240|(n&1835008)>>>18,t[e++]=128|(n&258048)>>>12,t[e++]=128|(n&4032)>>>6,t[e++]=128|(n&63)>>>0),e>=64&&(this._step(),e-=64,this._totalLen+=64,t[0]=t[64],t[1]=t[65],t[2]=t[66]),e}digest(){return this._finished||(this._finished=!0,this._leftoverHighSurrogate&&(this._leftoverHighSurrogate=0,this._buffLen=this._push(this._buff,this._buffLen,65533)),this._totalLen+=this._buffLen,this._wrapUp()),Uf(this._h0)+Uf(this._h1)+Uf(this._h2)+Uf(this._h3)+Uf(this._h4)}_wrapUp(){this._buff[this._buffLen++]=128,this._buff.subarray(this._buffLen).fill(0),this._buffLen>56&&(this._step(),this._buff.fill(0));let t=8*this._totalLen;this._buffDV.setUint32(56,Math.floor(t/4294967296),!1),this._buffDV.setUint32(60,t%4294967296,!1),this._step()}_step(){let t=r._bigBlock32,e=this._buffDV;for(let u=0;u<64;u+=4)t.setUint32(u,e.getUint32(u,!1),!1);for(let u=64;u<320;u+=4)t.setUint32(u,sP(t.getUint32(u-12,!1)^t.getUint32(u-32,!1)^t.getUint32(u-56,!1)^t.getUint32(u-64,!1),1),!1);let n=this._h0,o=this._h1,i=this._h2,s=this._h3,a=this._h4,l,d,c;for(let u=0;u<80;u++)u<20?(l=o&i|~o&s,d=1518500249):u<40?(l=o^i^s,d=1859775393):u<60?(l=o&i|o&s|i&s,d=2400959708):(l=o^i^s,d=3395469782),c=sP(n,5)+l+a+d+t.getUint32(u*4,!1)&4294967295,a=s,s=i,i=sP(o,30),o=n,n=c;this._h0=this._h0+n&4294967295,this._h1=this._h1+o&4294967295,this._h2=this._h2+i&4294967295,this._h3=this._h3+s&4294967295,this._h4=this._h4+a&4294967295}};function lP(...r){switch(r.length){case 1:return p(1877,null,r[0]);case 2:return p(1878,null,r[0],r[1]);case 3:return p(1879,null,r[0],r[1],r[2]);default:return}}var R9=p(1876,null),k9=p(1875,null),Ra=class r{constructor(){this._input="";this._start=0;this._current=0;this._tokens=[];this._errors=[];this.stringRe=/[a-zA-Z0-9_<>\-\./\\:\*\?\+\[\]\^,#@;"%\$\p{L}-]+/uy}static getLexeme(t){switch(t.type){case 0:return"(";case 1:return")";case 2:return"!";case 3:return t.isTripleEq?"===":"==";case 4:return t.isTripleEq?"!==":"!=";case 5:return"<";case 6:return"<=";case 7:return">=";case 8:return">=";case 9:return"=~";case 10:return t.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 t.lexeme;case 18:return t.lexeme;case 19:return t.lexeme;case 20:return"EOF";default:throw Hc(`unhandled token type: ${JSON.stringify(t)}; have you forgotten to add a case?`)}}static{this._regexFlags=new Set(["i","g","s","m","y","u"].map(t=>t.charCodeAt(0)))}static{this._keywords=new Map([["not",14],["in",13],["false",12],["true",11]])}get errors(){return this._errors}reset(t){return this._input=t,this._start=0,this._current=0,this._tokens=[],this._errors=[],this}scan(){for(;!this._isAtEnd();)switch(this._start=this._current,this._advance()){case 40:this._addToken(0);break;case 41:this._addToken(1);break;case 33:if(this._match(61)){let e=this._match(61);this._tokens.push({type:4,offset:this._start,isTripleEq:e})}else this._addToken(2);break;case 39:this._quotedString();break;case 47:this._regex();break;case 61:if(this._match(61)){let e=this._match(61);this._tokens.push({type:3,offset:this._start,isTripleEq:e})}else this._match(126)?this._addToken(9):this._error(lP("==","=~"));break;case 60:this._addToken(this._match(61)?6:5);break;case 62:this._addToken(this._match(61)?8:7);break;case 38:this._match(38)?this._addToken(15):this._error(lP("&&"));break;case 124:this._match(124)?this._addToken(16):this._error(lP("||"));break;case 32:case 13:case 9:case 10:case 160:break;default:this._string()}return this._start=this._current,this._addToken(20),Array.from(this._tokens)}_match(t){return this._isAtEnd()||this._input.charCodeAt(this._current)!==t?!1:(this._current++,!0)}_advance(){return this._input.charCodeAt(this._current++)}_peek(){return this._isAtEnd()?0:this._input.charCodeAt(this._current)}_addToken(t){this._tokens.push({type:t,offset:this._start})}_error(t){let e=this._start,n=this._input.substring(this._start,this._current),o={type:19,offset:this._start,lexeme:n};this._errors.push({offset:e,lexeme:n,additionalInfo:t}),this._tokens.push(o)}_string(){this.stringRe.lastIndex=this._start;let t=this.stringRe.exec(this._input);if(t){this._current=this._start+t[0].length;let e=this._input.substring(this._start,this._current),n=r._keywords.get(e);n?this._addToken(n):this._tokens.push({type:17,lexeme:e,offset:this._start})}}_quotedString(){for(;this._peek()!==39&&!this._isAtEnd();)this._advance();if(this._isAtEnd()){this._error(R9);return}this._advance(),this._tokens.push({type:18,lexeme:this._input.substring(this._start+1,this._current-1),offset:this._start+1})}_regex(){let t=this._current,e=!1,n=!1;for(;;){if(t>=this._input.length){this._current=t,this._error(k9);return}let i=this._input.charCodeAt(t);if(e)e=!1;else if(i===47&&!n){t++;break}else i===91?n=!0:i===92?e=!0:i===93&&(n=!1);t++}for(;t<this._input.length&&r._regexFlags.has(this._input.charCodeAt(t));)t++;this._current=t;let o=this._input.substring(this._start,this._current);this._tokens.push({type:10,lexeme:o,offset:this._start})}_isAtEnd(){return this._current>=this._input.length}};var Vn=new Map;Vn.set("false",!1);Vn.set("true",!0);Vn.set("isMac",hn);Vn.set("isLinux",zn);Vn.set("isWindows",Rt);Vn.set("isWeb",Xo);Vn.set("isMacNative",hn&&!Xo);Vn.set("isEdge",Mv);Vn.set("isFirefox",nU);Vn.set("isChrome",Pf);Vn.set("isSafari",oU);var A9=Object.prototype.hasOwnProperty;var O9={regexParsingWithErrorRecovery:!0},L9=p(1856,null),M9=p(1857,null),N9=p(1859,null),QU=p(1855,null),U9=p(1862,null),F9=p(1863,null),H9=p(1860,null),B9=p(1861,null),db=class r{constructor(t=O9){this._config=t;this._scanner=new Ra;this._tokens=[];this._current=0;this._parsingErrors=[];this._flagsGYRe=/g|y/g}static{this._parseError=new Error}get lexingErrors(){return this._scanner.errors}get parsingErrors(){return this._parsingErrors}parse(t){if(t===""){this._parsingErrors.push({message:L9,offset:0,lexeme:"",additionalInfo:M9});return}this._tokens=this._scanner.reset(t).scan(),this._current=0,this._parsingErrors=[];try{let e=this._expr();if(!this._isAtEnd()){let n=this._peek(),o=n.type===17?F9:void 0;throw this._parsingErrors.push({message:U9,offset:n.offset,lexeme:Ra.getLexeme(n),additionalInfo:o}),r._parseError}return e}catch(e){if(e!==r._parseError)throw e;return}}_expr(){return this._or()}_or(){let t=[this._and()];for(;this._matchOne(16);){let e=this._and();t.push(e)}return t.length===1?t[0]:Ut.or(...t)}_and(){let t=[this._term()];for(;this._matchOne(15);){let e=this._term();t.push(e)}return t.length===1?t[0]:Ut.and(...t)}_term(){if(this._matchOne(2)){let t=this._peek();switch(t.type){case 11:return this._advance(),mo.INSTANCE;case 12:return this._advance(),bo.INSTANCE;case 0:{this._advance();let e=this._expr();return this._consume(1,QU),e?.negate()}case 17:return this._advance(),md.create(t.lexeme);default:throw this._errExpectedButGot("KEY | true | false | '(' expression ')'",t)}}return this._primary()}_primary(){let t=this._peek();switch(t.type){case 11:return this._advance(),Ut.true();case 12:return this._advance(),Ut.false();case 0:{this._advance();let e=this._expr();return this._consume(1,QU),e}case 17:{let e=t.lexeme;if(this._advance(),this._matchOne(9)){let o=this._peek();if(!this._config.regexParsingWithErrorRecovery){if(this._advance(),o.type!==10)throw this._errExpectedButGot("REGEX",o);let i=o.lexeme,s=i.lastIndexOf("/"),a=s===i.length-1?void 0:this._removeFlagsGY(i.substring(s+1)),l;try{l=new RegExp(i.substring(1,s),a)}catch{throw this._errExpectedButGot("REGEX",o)}return Gf.create(e,l)}switch(o.type){case 10:case 19:{let i=[o.lexeme];this._advance();let s=this._peek(),a=0;for(let f=0;f<o.lexeme.length;f++)o.lexeme.charCodeAt(f)===40?a++:o.lexeme.charCodeAt(f)===41&&a--;for(;!this._isAtEnd()&&s.type!==15&&s.type!==16;){switch(s.type){case 0:a++;break;case 1:a--;break;case 10:case 18:for(let f=0;f<s.lexeme.length;f++)s.lexeme.charCodeAt(f)===40?a++:o.lexeme.charCodeAt(f)===41&&a--}if(a<0)break;i.push(Ra.getLexeme(s)),this._advance(),s=this._peek()}let l=i.join(""),d=l.lastIndexOf("/"),c=d===l.length-1?void 0:this._removeFlagsGY(l.substring(d+1)),u;try{u=new RegExp(l.substring(1,d),c)}catch{throw this._errExpectedButGot("REGEX",o)}return Ut.regex(e,u)}case 18:{let i=o.lexeme;this._advance();let s=null;if(!Ti(i)){let a=i.indexOf("/"),l=i.lastIndexOf("/");if(a!==l&&a>=0){let d=i.slice(a+1,l),c=i[l+1]==="i"?"i":"";try{s=new RegExp(d,c)}catch{throw this._errExpectedButGot("REGEX",o)}}}if(s===null)throw this._errExpectedButGot("REGEX",o);return Gf.create(e,s)}default:throw this._errExpectedButGot("REGEX",this._peek())}}if(this._matchOne(14)){this._consume(13,N9);let o=this._value();return Ut.notIn(e,o)}switch(this._peek().type){case 3:{this._advance();let o=this._value();if(this._previous().type===18)return Ut.equals(e,o);switch(o){case"true":return Ut.has(e);case"false":return Ut.not(e);default:return Ut.equals(e,o)}}case 4:{this._advance();let o=this._value();if(this._previous().type===18)return Ut.notEquals(e,o);switch(o){case"true":return Ut.not(e);case"false":return Ut.has(e);default:return Ut.notEquals(e,o)}}case 5:return this._advance(),Wf.create(e,this._value());case 6:return this._advance(),$f.create(e,this._value());case 7:return this._advance(),ou.create(e,this._value());case 8:return this._advance(),Vf.create(e,this._value());case 13:return this._advance(),Ut.in(e,this._value());default:return Ut.has(e)}}case 20:throw this._parsingErrors.push({message:H9,offset:t.offset,lexeme:"",additionalInfo:B9}),r._parseError;default:throw this._errExpectedButGot(`true | false | KEY 
	| KEY '=~' REGEX 
	| KEY ('==' | '!=' | '<' | '<=' | '>' | '>=' | 'in' | 'not' 'in') value`,this._peek())}}_value(){let t=this._peek();switch(t.type){case 17:case 18:return this._advance(),t.lexeme;case 11:return this._advance(),"true";case 12:return this._advance(),"false";case 13:return this._advance(),"in";default:return""}}_removeFlagsGY(t){return t.replaceAll(this._flagsGYRe,"")}_previous(){return this._tokens[this._current-1]}_matchOne(t){return this._check(t)?(this._advance(),!0):!1}_advance(){return this._isAtEnd()||this._current++,this._previous()}_consume(t,e){if(this._check(t))return this._advance();throw this._errExpectedButGot(e,this._peek())}_errExpectedButGot(t,e,n){let o=p(1858,null,t,Ra.getLexeme(e)),i=e.offset,s=Ra.getLexeme(e);return this._parsingErrors.push({message:o,offset:i,lexeme:s,additionalInfo:n}),r._parseError}_check(t){return this._peek().type===t}_peek(){return this._tokens[this._current]}_isAtEnd(){return this._peek().type===20}},Ut=class{static false(){return mo.INSTANCE}static true(){return bo.INSTANCE}static has(t){return pd.create(t)}static equals(t,e){return Hf.create(t,e)}static notEquals(t,e){return Bf.create(t,e)}static regex(t,e){return Gf.create(t,e)}static in(t,e){return cb.create(t,e)}static notIn(t,e){return ub.create(t,e)}static not(t){return md.create(t)}static and(...t){return pb.create(t,null,!0)}static or(...t){return zf.create(t,null,!0)}static greater(t,e){return ou.create(t,e)}static greaterEquals(t,e){return Vf.create(t,e)}static smaller(t,e){return Wf.create(t,e)}static smallerEquals(t,e){return $f.create(t,e)}static{this._parser=new db({regexParsingWithErrorRecovery:!1})}static deserialize(t){return t==null?void 0:this._parser.parse(t)}};function YU(r){let t=new db({regexParsingWithErrorRecovery:!1});return r.map(e=>(t.parse(e),t.lexingErrors.length>0?t.lexingErrors.map(n=>({errorMessage:n.additionalInfo?p(1865,null,n.additionalInfo):p(1864,null),offset:n.offset,length:n.lexeme.length})):t.parsingErrors.length>0?t.parsingErrors.map(n=>({errorMessage:n.additionalInfo?`${n.message}. ${n.additionalInfo}`:n.message,offset:n.offset,length:n.lexeme.length})):[]))}function Ff(r,t){return r.cmp(t)}var mo=class r{constructor(){this.type=0}static{this.INSTANCE=new r}cmp(t){return this.type-t.type}equals(t){return t.type===this.type}substituteConstants(){return this}evaluate(t){return!1}serialize(){return"false"}keys(){return[]}map(t){return this}negate(){return bo.INSTANCE}},bo=class r{constructor(){this.type=1}static{this.INSTANCE=new r}cmp(t){return this.type-t.type}equals(t){return t.type===this.type}substituteConstants(){return this}evaluate(t){return!0}serialize(){return"true"}keys(){return[]}map(t){return this}negate(){return mo.INSTANCE}},pd=class r{constructor(t,e){this.key=t;this.negated=e;this.type=2}static create(t,e=null){let n=Vn.get(t);return typeof n=="boolean"?n?bo.INSTANCE:mo.INSTANCE:new r(t,e)}cmp(t){return t.type!==this.type?this.type-t.type:eF(this.key,t.key)}equals(t){return t.type===this.type?this.key===t.key:!1}substituteConstants(){let t=Vn.get(this.key);return typeof t=="boolean"?t?bo.INSTANCE:mo.INSTANCE:this}evaluate(t){return!!t.getValue(this.key)}serialize(){return this.key}keys(){return[this.key]}map(t){return t.mapDefined(this.key)}negate(){return this.negated||(this.negated=md.create(this.key,this)),this.negated}},Hf=class r{constructor(t,e,n){this.key=t;this.value=e;this.negated=n;this.type=4}static create(t,e,n=null){if(typeof e=="boolean")return e?pd.create(t,n):md.create(t,n);let o=Vn.get(t);return typeof o=="boolean"?e===(o?"true":"false")?bo.INSTANCE:mo.INSTANCE:new r(t,e,n)}cmp(t){return t.type!==this.type?this.type-t.type:fd(this.key,this.value,t.key,t.value)}equals(t){return t.type===this.type?this.key===t.key&&this.value===t.value:!1}substituteConstants(){let t=Vn.get(this.key);if(typeof t=="boolean"){let e=t?"true":"false";return this.value===e?bo.INSTANCE:mo.INSTANCE}return this}evaluate(t){return t.getValue(this.key)==this.value}serialize(){return`${this.key} == '${this.value}'`}keys(){return[this.key]}map(t){return t.mapEquals(this.key,this.value)}negate(){return this.negated||(this.negated=Bf.create(this.key,this.value,this)),this.negated}},cb=class r{constructor(t,e){this.key=t;this.valueKey=e;this.type=10;this.negated=null}static create(t,e){return new r(t,e)}cmp(t){return t.type!==this.type?this.type-t.type:fd(this.key,this.valueKey,t.key,t.valueKey)}equals(t){return t.type===this.type?this.key===t.key&&this.valueKey===t.valueKey:!1}substituteConstants(){return this}evaluate(t){let e=t.getValue(this.valueKey),n=t.getValue(this.key);if(Array.isArray(e)){if(e.includes(n))return!0;if(Rt&&typeof n=="string"&&n.startsWith("file:///")){let o=n.toLowerCase();return e.some(i=>typeof i=="string"&&i.toLowerCase()===o)}return!1}if(typeof n=="string"&&typeof e=="object"&&e!==null){if(A9.call(e,n))return!0;if(Rt&&n.startsWith("file:///")){let o=n.toLowerCase();return Object.keys(e).some(i=>i.toLowerCase()===o)}return!1}return!1}serialize(){return`${this.key} in '${this.valueKey}'`}keys(){return[this.key,this.valueKey]}map(t){return t.mapIn(this.key,this.valueKey)}negate(){return this.negated||(this.negated=ub.create(this.key,this.valueKey)),this.negated}},ub=class r{constructor(t,e){this.key=t;this.valueKey=e;this.type=11;this._negated=cb.create(t,e)}static create(t,e){return new r(t,e)}cmp(t){return t.type!==this.type?this.type-t.type:this._negated.cmp(t._negated)}equals(t){return t.type===this.type?this._negated.equals(t._negated):!1}substituteConstants(){return this}evaluate(t){return!this._negated.evaluate(t)}serialize(){return`${this.key} not in '${this.valueKey}'`}keys(){return this._negated.keys()}map(t){return t.mapNotIn(this.key,this.valueKey)}negate(){return this._negated}},Bf=class r{constructor(t,e,n){this.key=t;this.value=e;this.negated=n;this.type=5}static create(t,e,n=null){if(typeof e=="boolean")return e?md.create(t,n):pd.create(t,n);let o=Vn.get(t);return typeof o=="boolean"?e===(o?"true":"false")?mo.INSTANCE:bo.INSTANCE:new r(t,e,n)}cmp(t){return t.type!==this.type?this.type-t.type:fd(this.key,this.value,t.key,t.value)}equals(t){return t.type===this.type?this.key===t.key&&this.value===t.value:!1}substituteConstants(){let t=Vn.get(this.key);if(typeof t=="boolean"){let e=t?"true":"false";return this.value===e?mo.INSTANCE:bo.INSTANCE}return this}evaluate(t){return t.getValue(this.key)!=this.value}serialize(){return`${this.key} != '${this.value}'`}keys(){return[this.key]}map(t){return t.mapNotEquals(this.key,this.value)}negate(){return this.negated||(this.negated=Hf.create(this.key,this.value,this)),this.negated}},md=class r{constructor(t,e){this.key=t;this.negated=e;this.type=3}static create(t,e=null){let n=Vn.get(t);return typeof n=="boolean"?n?mo.INSTANCE:bo.INSTANCE:new r(t,e)}cmp(t){return t.type!==this.type?this.type-t.type:eF(this.key,t.key)}equals(t){return t.type===this.type?this.key===t.key:!1}substituteConstants(){let t=Vn.get(this.key);return typeof t=="boolean"?t?mo.INSTANCE:bo.INSTANCE:this}evaluate(t){return!t.getValue(this.key)}serialize(){return`!${this.key}`}keys(){return[this.key]}map(t){return t.mapNot(this.key)}negate(){return this.negated||(this.negated=pd.create(this.key,this)),this.negated}};function mb(r,t){if(typeof r=="string"){let e=parseFloat(r);isNaN(e)||(r=e)}return typeof r=="string"||typeof r=="number"?t(r):mo.INSTANCE}var ou=class r{constructor(t,e,n){this.key=t;this.value=e;this.negated=n;this.type=12}static create(t,e,n=null){return mb(e,o=>new r(t,o,n))}cmp(t){return t.type!==this.type?this.type-t.type:fd(this.key,this.value,t.key,t.value)}equals(t){return t.type===this.type?this.key===t.key&&this.value===t.value:!1}substituteConstants(){return this}evaluate(t){return typeof this.value=="string"?!1:parseFloat(t.getValue(this.key))>this.value}serialize(){return`${this.key} > ${this.value}`}keys(){return[this.key]}map(t){return t.mapGreater(this.key,this.value)}negate(){return this.negated||(this.negated=$f.create(this.key,this.value,this)),this.negated}},Vf=class r{constructor(t,e,n){this.key=t;this.value=e;this.negated=n;this.type=13}static create(t,e,n=null){return mb(e,o=>new r(t,o,n))}cmp(t){return t.type!==this.type?this.type-t.type:fd(this.key,this.value,t.key,t.value)}equals(t){return t.type===this.type?this.key===t.key&&this.value===t.value:!1}substituteConstants(){return this}evaluate(t){return typeof this.value=="string"?!1:parseFloat(t.getValue(this.key))>=this.value}serialize(){return`${this.key} >= ${this.value}`}keys(){return[this.key]}map(t){return t.mapGreaterEquals(this.key,this.value)}negate(){return this.negated||(this.negated=Wf.create(this.key,this.value,this)),this.negated}},Wf=class r{constructor(t,e,n){this.key=t;this.value=e;this.negated=n;this.type=14}static create(t,e,n=null){return mb(e,o=>new r(t,o,n))}cmp(t){return t.type!==this.type?this.type-t.type:fd(this.key,this.value,t.key,t.value)}equals(t){return t.type===this.type?this.key===t.key&&this.value===t.value:!1}substituteConstants(){return this}evaluate(t){return typeof this.value=="string"?!1:parseFloat(t.getValue(this.key))<this.value}serialize(){return`${this.key} < ${this.value}`}keys(){return[this.key]}map(t){return t.mapSmaller(this.key,this.value)}negate(){return this.negated||(this.negated=Vf.create(this.key,this.value,this)),this.negated}},$f=class r{constructor(t,e,n){this.key=t;this.value=e;this.negated=n;this.type=15}static create(t,e,n=null){return mb(e,o=>new r(t,o,n))}cmp(t){return t.type!==this.type?this.type-t.type:fd(this.key,this.value,t.key,t.value)}equals(t){return t.type===this.type?this.key===t.key&&this.value===t.value:!1}substituteConstants(){return this}evaluate(t){return typeof this.value=="string"?!1:parseFloat(t.getValue(this.key))<=this.value}serialize(){return`${this.key} <= ${this.value}`}keys(){return[this.key]}map(t){return t.mapSmallerEquals(this.key,this.value)}negate(){return this.negated||(this.negated=ou.create(this.key,this.value,this)),this.negated}},Gf=class r{constructor(t,e){this.key=t;this.regexp=e;this.type=7;this.negated=null}static create(t,e){return new r(t,e)}cmp(t){if(t.type!==this.type)return this.type-t.type;if(this.key<t.key)return-1;if(this.key>t.key)return 1;let e=this.regexp?this.regexp.source:"",n=t.regexp?t.regexp.source:"";return e<n?-1:e>n?1:0}equals(t){if(t.type===this.type){let e=this.regexp?this.regexp.source:"",n=t.regexp?t.regexp.source:"";return this.key===t.key&&e===n}return!1}substituteConstants(){return this}evaluate(t){let e=t.getValue(this.key);return this.regexp?this.regexp.test(e):!1}serialize(){let t=this.regexp?`/${this.regexp.source}/${this.regexp.flags}`:"/invalid/";return`${this.key} =~ ${t}`}keys(){return[this.key]}map(t){return t.mapRegex(this.key,this.regexp)}negate(){return this.negated||(this.negated=dP.create(this)),this.negated}},dP=class r{constructor(t){this._actual=t;this.type=8}static create(t){return new r(t)}cmp(t){return t.type!==this.type?this.type-t.type:this._actual.cmp(t._actual)}equals(t){return t.type===this.type?this._actual.equals(t._actual):!1}substituteConstants(){return this}evaluate(t){return!this._actual.evaluate(t)}serialize(){return`!(${this._actual.serialize()})`}keys(){return this._actual.keys()}map(t){return new r(this._actual.map(t))}negate(){return this._actual}};function ZU(r){let t=null;for(let e=0,n=r.length;e<n;e++){let o=r[e].substituteConstants();if(r[e]!==o&&t===null){t=[];for(let i=0;i<e;i++)t[i]=r[i]}t!==null&&(t[e]=o)}return t===null?r:t}var pb=class r{constructor(t,e){this.expr=t;this.negated=e;this.type=6}static create(t,e,n){return r._normalizeArr(t,e,n)}cmp(t){if(t.type!==this.type)return this.type-t.type;if(this.expr.length<t.expr.length)return-1;if(this.expr.length>t.expr.length)return 1;for(let e=0,n=this.expr.length;e<n;e++){let o=Ff(this.expr[e],t.expr[e]);if(o!==0)return o}return 0}equals(t){if(t.type===this.type){if(this.expr.length!==t.expr.length)return!1;for(let e=0,n=this.expr.length;e<n;e++)if(!this.expr[e].equals(t.expr[e]))return!1;return!0}return!1}substituteConstants(){let t=ZU(this.expr);return t===this.expr?this:r.create(t,this.negated,!1)}evaluate(t){for(let e=0,n=this.expr.length;e<n;e++)if(!this.expr[e].evaluate(t))return!1;return!0}static _normalizeArr(t,e,n){let o=[],i=!1;for(let s of t)if(s){if(s.type===1){i=!0;continue}if(s.type===0)return mo.INSTANCE;if(s.type===6){o.push(...s.expr);continue}o.push(s)}if(o.length===0&&i)return bo.INSTANCE;if(o.length!==0){if(o.length===1)return o[0];o.sort(Ff);for(let s=1;s<o.length;s++)o[s-1].equals(o[s])&&(o.splice(s,1),s--);if(o.length===1)return o[0];for(;o.length>1;){let s=o[o.length-1];if(s.type!==9)break;o.pop();let a=o.pop(),l=o.length===0,d=zf.create(s.expr.map(c=>r.create([c,a],null,n)),null,l);d&&(o.push(d),o.sort(Ff))}if(o.length===1)return o[0];if(n){for(let s=0;s<o.length;s++)for(let a=s+1;a<o.length;a++)if(o[s].negate().equals(o[a]))return mo.INSTANCE;if(o.length===1)return o[0]}return new r(o,e)}}serialize(){return this.expr.map(t=>t.serialize()).join(" && ")}keys(){let t=[];for(let e of this.expr)t.push(...e.keys());return t}map(t){return new r(this.expr.map(e=>e.map(t)),null)}negate(){if(!this.negated){let t=[];for(let e of this.expr)t.push(e.negate());this.negated=zf.create(t,this,!0)}return this.negated}},zf=class r{constructor(t,e){this.expr=t;this.negated=e;this.type=9}static create(t,e,n){return r._normalizeArr(t,e,n)}cmp(t){if(t.type!==this.type)return this.type-t.type;if(this.expr.length<t.expr.length)return-1;if(this.expr.length>t.expr.length)return 1;for(let e=0,n=this.expr.length;e<n;e++){let o=Ff(this.expr[e],t.expr[e]);if(o!==0)return o}return 0}equals(t){if(t.type===this.type){if(this.expr.length!==t.expr.length)return!1;for(let e=0,n=this.expr.length;e<n;e++)if(!this.expr[e].equals(t.expr[e]))return!1;return!0}return!1}substituteConstants(){let t=ZU(this.expr);return t===this.expr?this:r.create(t,this.negated,!1)}evaluate(t){for(let e=0,n=this.expr.length;e<n;e++)if(this.expr[e].evaluate(t))return!0;return!1}static _normalizeArr(t,e,n){let o=[],i=!1;if(t){for(let s=0,a=t.length;s<a;s++){let l=t[s];if(l){if(l.type===0){i=!0;continue}if(l.type===1)return bo.INSTANCE;if(l.type===9){o=o.concat(l.expr);continue}o.push(l)}}if(o.length===0&&i)return mo.INSTANCE;o.sort(Ff)}if(o.length!==0){if(o.length===1)return o[0];for(let s=1;s<o.length;s++)o[s-1].equals(o[s])&&(o.splice(s,1),s--);if(o.length===1)return o[0];if(n){for(let s=0;s<o.length;s++)for(let a=s+1;a<o.length;a++)if(o[s].negate().equals(o[a]))return bo.INSTANCE;if(o.length===1)return o[0]}return new r(o,e)}}serialize(){return this.expr.map(t=>t.serialize()).join(" || ")}keys(){let t=[];for(let e of this.expr)t.push(...e.keys());return t}map(t){return new r(this.expr.map(e=>e.map(t)),null)}negate(){if(!this.negated){let t=[];for(let e of this.expr)t.push(e.negate());for(;t.length>1;){let e=t.shift(),n=t.shift(),o=[];for(let i of XU(e))for(let s of XU(n))o.push(pb.create([i,s],null,!1));t.unshift(r.create(o,null,!1))}this.negated=r.create(t,this,!0)}return this.negated}},w=class r extends pd{static{this._info=[]}static all(){return r._info.values()}constructor(t,e,n){super(t,null),this._defaultValue=e,typeof n=="object"?r._info.push({...n,key:t}):n!==!0&&r._info.push({key:t,description:n,type:e!=null?typeof e:void 0})}bindTo(t){return t.createKey(this.key,this._defaultValue)}getValue(t){return t.getContextKeyValue(this.key)}toNegated(){return this.negate()}isEqualTo(t){return Hf.create(this.key,t)}notEqualsTo(t){return Bf.create(this.key,t)}greater(t){return ou.create(this.key,t)}},Ir=N("contextKeyService");function eF(r,t){return r<t?-1:r>t?1:0}function fd(r,t,e,n){return r<e?-1:r>e?1:t<n?-1:t>n?1:0}function XU(r){return r.type===9?r.expr:[r]}var be=N("logService"),Zo=N("loggerService");var vb=(s=>(s[s.Off=0]="Off",s[s.Trace=1]="Trace",s[s.Debug=2]="Debug",s[s.Info=3]="Info",s[s.Warning=4]="Warning",s[s.Error=5]="Error",s))(vb||{}),V9=3;function W9(r,t){return r!==0&&r<=t}function tF(r,t,e){switch(t){case 1:r.trace(e);break;case 2:r.debug(e);break;case 3:r.info(e);break;case 4:r.warn(e);break;case 5:r.error(e);break;case 0:break;default:throw new Error(`Invalid log level ${t}`)}}function ru(r,t=!1){let e="";for(let n=0;n<r.length;n++){let o=r[n];if(o instanceof Error&&(o=Gr(o,t)),typeof o=="object")try{o=JSON.stringify(o)}catch{}e+=(n>0?" ":"")+o}return e}var fb=class extends K{constructor(){super(...arguments);this.level=V9;this._onDidChangeLogLevel=this._register(new D)}get onDidChangeLogLevel(){return this._onDidChangeLogLevel.event}setLevel(e){this.level!==e&&(this.level=e,this._onDidChangeLogLevel.fire(this.level))}getLevel(){return this.level}checkLogLevel(e){return W9(this.level,e)}canLog(e){return this._store.isDisposed?!1:this.checkLogLevel(e)}},iu=class extends fb{constructor(e){super();this.logAlways=e}checkLogLevel(e){return this.logAlways||super.checkLogLevel(e)}trace(e,...n){this.canLog(1)&&this.log(1,ru([e,...n],!0))}debug(e,...n){this.canLog(2)&&this.log(2,ru([e,...n]))}info(e,...n){this.canLog(3)&&this.log(3,ru([e,...n]))}warn(e,...n){this.canLog(4)&&this.log(4,ru([e,...n]))}error(e,...n){if(this.canLog(5))if(e instanceof Error){let o=Array.prototype.slice.call(arguments);o[0]=e.stack,this.log(5,ru(o))}else this.log(5,ru([e,...n]))}flush(){}};var gb=class extends fb{constructor(e){super();this.loggers=e;e.length&&this.setLevel(e[0].getLevel())}setLevel(e){for(let n of this.loggers)n.setLevel(e);super.setLevel(e)}trace(e,...n){for(let o of this.loggers)o.trace(e,...n)}debug(e,...n){for(let o of this.loggers)o.debug(e,...n)}info(e,...n){for(let o of this.loggers)o.info(e,...n)}warn(e,...n){for(let o of this.loggers)o.warn(e,...n)}error(e,...n){for(let o of this.loggers)o.error(e,...n)}flush(){for(let e of this.loggers)e.flush()}dispose(){for(let e of this.loggers)e.dispose();super.dispose()}},hb=class extends K{constructor(e,n,o){super();this.logLevel=e;this.logsHome=n;this._loggers=new et;this._onDidChangeLoggers=this._register(new D);this.onDidChangeLoggers=this._onDidChangeLoggers.event;this._onDidChangeLogLevel=this._register(new D);this.onDidChangeLogLevel=this._onDidChangeLogLevel.event;this._onDidChangeVisibility=this._register(new D);this.onDidChangeVisibility=this._onDidChangeVisibility.event;if(o)for(let i of o)this._loggers.set(i.resource,{logger:void 0,info:i})}getLoggerEntry(e){return Me(e)?[...this._loggers.values()].find(n=>n.info.id===e):this._loggers.get(e)}getLogger(e){return this.getLoggerEntry(e)?.logger}createLogger(e,n){let o=this.toResource(e),i=Me(e)?e:n?.id??zr(o.toString()).toString(16),s=this._loggers.get(o)?.logger,a=n?.logLevel==="always"?1:n?.logLevel;s||(s=this.doCreateLogger(o,a??this.getLogLevel(o)??this.logLevel,{...n,id:i}));let l={logger:s,info:{resource:o,id:i,logLevel:a,name:n?.name,hidden:n?.hidden,group:n?.group,extensionId:n?.extensionId,when:n?.when}};return this.registerLogger(l.info),this._loggers.set(o,l),s}toResource(e){return Me(e)?Qt(this.logsHome,`${e.replace(/[\\/:\*\?"<>\|]/g,"")}.log`):e}setLogLevel(e,n){if(E.isUri(e)){let o=e,i=n,s=this._loggers.get(o);s&&i!==s.info.logLevel&&(s.info.logLevel=i===this.logLevel?void 0:i,s.logger?.setLevel(i),this._loggers.set(s.info.resource,s),this._onDidChangeLogLevel.fire([o,i]))}else{this.logLevel=e;for(let[o,i]of this._loggers.entries())this._loggers.get(o)?.info.logLevel===void 0&&i.logger?.setLevel(this.logLevel);this._onDidChangeLogLevel.fire(this.logLevel)}}setVisibility(e,n){let o=this.getLoggerEntry(e);o&&n!==!o.info.hidden&&(o.info.hidden=!n,this._loggers.set(o.info.resource,o),this._onDidChangeVisibility.fire([o.info.resource,n]))}getLogLevel(e){let n;return e&&(n=this._loggers.get(e)?.info.logLevel),n??this.logLevel}registerLogger(e){let n=this._loggers.get(e.resource);n?n.info.hidden!==e.hidden&&this.setVisibility(e.resource,!e.hidden):(this._loggers.set(e.resource,{info:e,logger:void 0}),this._onDidChangeLoggers.fire({added:[e],removed:[]}))}deregisterLogger(e){let n=this.toResource(e),o=this._loggers.get(n);o&&(o.logger&&o.logger.dispose(),this._loggers.delete(n),this._onDidChangeLoggers.fire({added:[],removed:[o.info]}))}*getRegisteredLoggers(){for(let e of this._loggers.values())yield e.info}getRegisteredLogger(e){return this._loggers.get(e)?.info}dispose(){this._loggers.forEach(e=>e.logger?.dispose()),this._loggers.clear(),super.dispose()}};function $9(r){switch(r){case 1:return"trace";case 2:return"debug";case 3:return"info";case 4:return"warn";case 5:return"error";case 0:return"off"}}var TX=new w("logLevel",$9(3));var Ao=class{constructor(t,e=[],n=!1){this.ctor=t,this.staticArguments=e,this.supportsDelayedInstantiation=n}};var nF=[];function rt(r,t,e){t instanceof Ao||(t=new Ao(t,[],!!e)),nF.push([r,t])}function oF(){return nF}var ka=class{constructor(...t){this._entries=new Map;for(let[e,n]of t)this.set(e,n)}set(t,e){let n=this._entries.get(t);return this._entries.set(t,e),n}has(t){return this._entries.has(t)}get(t){return this._entries.get(t)}};var Et=N("IExtHostInitDataService");var cP=class{constructor(t,e){this.key=t;this.data=e;this.incoming=new Map;this.outgoing=new Map}},qf=class{constructor(t){this._hashFn=t;this._nodes=new Map}roots(){let t=[];for(let e of this._nodes.values())e.outgoing.size===0&&t.push(e);return t}insertEdge(t,e){let n=this.lookupOrInsertNode(t),o=this.lookupOrInsertNode(e);n.outgoing.set(o.key,o),o.incoming.set(n.key,n)}removeNode(t){let e=this._hashFn(t);this._nodes.delete(e);for(let n of this._nodes.values())n.outgoing.delete(e),n.incoming.delete(e)}lookupOrInsertNode(t){let e=this._hashFn(t),n=this._nodes.get(e);return n||(n=new cP(e,t),this._nodes.set(e,n)),n}lookup(t){return this._nodes.get(this._hashFn(t))}isEmpty(){return this._nodes.size===0}toString(){let t=[];for(let[e,n]of this._nodes)t.push(`${e}
	(-> incoming)[${[...n.incoming.keys()].join(", ")}]
	(outgoing ->)[${[...n.outgoing.keys()].join(",")}]
`);return t.join(`
`)}findCycleSlow(){for(let[t,e]of this._nodes){let n=new Set([t]),o=this._findCycle(e,n);if(o)return o}}_findCycle(t,e){for(let[n,o]of t.outgoing){if(e.has(n))return[...e,n].join(" -> ");e.add(n);let i=this._findCycle(o,e);if(i)return i;e.delete(n)}}};var G9=!1,bb=class extends Error{constructor(t){super("cyclic dependency between services"),this.message=t.findCycleSlow()??`UNABLE to detect cycle, dumping graph: 
${t.toString()}`}},Ib=class r{constructor(t=new ka,e=!1,n,o=G9){this._services=t;this._strict=e;this._parent=n;this._enableTracing=o;this._isDisposed=!1;this._servicesToMaybeDispose=new Set;this._children=new Set;this._activeInstantiations=new Set;this._services.set(ko,this),this._globalGraph=o?n?._globalGraph??new qf(i=>i):void 0}dispose(){if(!this._isDisposed){this._isDisposed=!0,Hn(this._children),this._children.clear();for(let t of this._servicesToMaybeDispose)Sv(t)&&t.dispose();this._servicesToMaybeDispose.clear()}}_throwIfDisposed(){if(this._isDisposed)throw new Error("InstantiationService has been disposed")}createChild(t,e){this._throwIfDisposed();let n=this,o=new class extends r{dispose(){n._children.delete(o),super.dispose()}}(t,this._strict,this,this._enableTracing);return this._children.add(o),e?.add(o),o}invokeFunction(t,...e){this._throwIfDisposed();let n=Kf.traceInvocation(this._enableTracing,t),o=!1;try{return t({get:s=>{if(o)throw Hc("service accessor is only valid during the invocation of its target method");let a=this._getOrCreateServiceInstance(s,n);return a||this._throwIfStrict(`[invokeFunction] unknown service '${s}'`,!1),a}},...e)}finally{o=!0,n.stop()}}createInstance(t,...e){this._throwIfDisposed();let n,o;return t instanceof Ao?(n=Kf.traceCreation(this._enableTracing,t.ctor),o=this._createInstance(t.ctor,t.staticArguments.concat(e),n)):(n=Kf.traceCreation(this._enableTracing,t),o=this._createInstance(t,e,n)),n.stop(),o}_createInstance(t,e=[],n){let o=$r.getServiceDependencies(t).sort((a,l)=>a.index-l.index),i=[];for(let a of o){let l=this._getOrCreateServiceInstance(a.id,n);l||this._throwIfStrict(`[createInstance] ${t.name} depends on UNKNOWN service ${a.id}.`,!1),i.push(l)}let s=o.length>0?o[0].index:e.length;if(e.length!==s){console.trace(`[createInstance] First service dependency of ${t.name} at position ${s+1} conflicts with ${e.length} static arguments`);let a=s-e.length;a>0?e=e.concat(new Array(a)):e=e.slice(0,s)}return Reflect.construct(t,e.concat(i))}_setCreatedServiceInstance(t,e){if(this._services.get(t)instanceof Ao)this._services.set(t,e);else if(this._parent)this._parent._setCreatedServiceInstance(t,e);else throw new Error("illegalState - setting UNKNOWN service instance")}_getServiceInstanceOrDescriptor(t){let e=this._services.get(t);return!e&&this._parent?this._parent._getServiceInstanceOrDescriptor(t):e}_getOrCreateServiceInstance(t,e){this._globalGraph&&this._globalGraphImplicitDependency&&this._globalGraph.insertEdge(this._globalGraphImplicitDependency,String(t));let n=this._getServiceInstanceOrDescriptor(t);return n instanceof Ao?this._safeCreateAndCacheServiceInstance(t,n,e.branch(t,!0)):(e.branch(t,!1),n)}_safeCreateAndCacheServiceInstance(t,e,n){if(this._activeInstantiations.has(t))throw new Error(`illegal state - RECURSIVELY instantiating service '${t}'`);this._activeInstantiations.add(t);try{return this._createAndCacheServiceInstance(t,e,n)}finally{this._activeInstantiations.delete(t)}}_createAndCacheServiceInstance(t,e,n){let o=new qf(l=>l.id.toString()),i=0,s=[{id:t,desc:e,_trace:n}],a=new Set;for(;s.length;){let l=s.pop();if(!a.has(String(l.id))){if(a.add(String(l.id)),o.lookupOrInsertNode(l),i++>1e3)throw new bb(o);for(let d of $r.getServiceDependencies(l.desc.ctor)){let c=this._getServiceInstanceOrDescriptor(d.id);if(c||this._throwIfStrict(`[createInstance] ${t} depends on ${d.id} which is NOT registered.`,!0),this._globalGraph?.insertEdge(String(l.id),String(d.id)),c instanceof Ao){let u={id:d.id,desc:c,_trace:l._trace.branch(d.id,!0)};o.insertEdge(l,u),s.push(u)}}}}for(;;){let l=o.roots();if(l.length===0){if(!o.isEmpty())throw new bb(o);break}for(let{data:d}of l){if(this._getServiceInstanceOrDescriptor(d.id)instanceof Ao){let u=this._createServiceInstanceWithOwner(d.id,d.desc.ctor,d.desc.staticArguments,d.desc.supportsDelayedInstantiation,d._trace);this._setCreatedServiceInstance(d.id,u)}o.removeNode(d)}}return this._getServiceInstanceOrDescriptor(t)}_createServiceInstanceWithOwner(t,e,n=[],o,i){if(this._services.get(t)instanceof Ao)return this._createServiceInstance(t,e,n,o,i,this._servicesToMaybeDispose);if(this._parent)return this._parent._createServiceInstanceWithOwner(t,e,n,o,i);throw new Error(`illegalState - creating UNKNOWN service instance ${e.name}`)}_createServiceInstance(t,e,n=[],o,i,s){if(o){let a=new r(void 0,this._strict,this,this._enableTracing);a._globalGraphImplicitDependency=String(t);let l=new Map,d=new nb(()=>{let c=a._createInstance(e,n,i);for(let[u,f]of l){let g=c[u];if(typeof g=="function")for(let I of f)I.disposable=g.apply(c,I.listener)}return l.clear(),s.add(c),c});return new Proxy(Object.create(null),{get(c,u){if(!d.isInitialized&&typeof u=="string"&&(u.startsWith("onDid")||u.startsWith("onWill"))){let I=l.get(u);return I||(I=new co,l.set(u,I)),(C,_,R)=>{if(d.isInitialized)return d.value[u](C,_,R);{let O={listener:[C,_,R],disposable:void 0},U=I.push(O);return ae(()=>{U(),O.disposable?.dispose()})}}}if(u in c)return c[u];let f=d.value,g=f[u];return typeof g!="function"||(g=g.bind(f),c[u]=g),g},set(c,u,f){return d.value[u]=f,!0},getPrototypeOf(c){return e.prototype}})}else{let a=this._createInstance(e,n,i);return s.add(a),a}}_throwIfStrict(t,e){if(e&&console.warn(t),this._strict)throw new Error(t)}};var Kf=class r{constructor(t,e){this.type=t;this.name=e;this._start=Date.now();this._dep=[]}static{this.all=new Set}static{this._None=new class extends r{constructor(){super(0,null)}stop(){}branch(){return this}}}static traceInvocation(t,e){return t?new r(2,e.name||new Error().stack.split(`
`).slice(3,4).join(`
`)):r._None}static traceCreation(t,e){return t?new r(1,e.name):r._None}static{this._totals=0}branch(t,e){let n=new r(3,t.toString());return this._dep.push([t,e,n]),n}stop(){let t=Date.now()-this._start;r._totals+=t;let e=!1;function n(i,s){let a=[],l=new Array(i+1).join("	");for(let[d,c,u]of s._dep)if(c&&u){e=!0,a.push(`${l}CREATES -> ${d}`);let f=n(i+1,u);f&&a.push(f)}else a.push(`${l}uses -> ${d}`);return a.join(`
`)}let o=[`${this.type===1?"CREATE":"CALL"} ${this.name}`,`${n(1,this)}`,`DONE, took ${t.toFixed(2)}ms (grand total ${r._totals.toFixed(2)}ms)`];(t>2||e)&&r.all.add(o.join(`
`))}};var Ee=N("IExtHostRpcService"),yb=class{constructor(t){this.getProxy=t.getProxy.bind(t),this.set=t.set.bind(t),this.dispose=t.dispose.bind(t),this.assertRegistered=t.assertRegistered.bind(t),this.drain=t.drain.bind(t)}};var Aa=N("IURITransformerService"),Eb=class{constructor(t){t?(this.transformIncoming=t.transformIncoming.bind(t),this.transformOutgoing=t.transformOutgoing.bind(t),this.transformOutgoingURI=t.transformOutgoingURI.bind(t),this.transformOutgoingScheme=t.transformOutgoingScheme.bind(t)):(this.transformIncoming=e=>e,this.transformOutgoing=e=>e,this.transformOutgoingURI=e=>e,this.transformOutgoingScheme=e=>e)}};var uP=class{constructor(){this._value="";this._pos=0}reset(t){return this._value=t,this._pos=0,this}next(){return this._pos+=1,this}hasNext(){return this._pos<this._value.length-1}cmp(t){let e=t.charCodeAt(0),n=this._value.charCodeAt(this._pos);return e-n}value(){return this._value[this._pos]}},pP=class{constructor(t=!0){this._caseSensitive=t}reset(t){return this._value=t,this._from=0,this._to=0,this.next()}hasNext(){return this._to<this._value.length}next(){this._from=this._to;let t=!0;for(;this._to<this._value.length;this._to++)if(this._value.charCodeAt(this._to)===46)if(t)this._from++;else break;else t=!1;return this}cmp(t){return this._caseSensitive?Gv(t,this._value,0,t.length,this._from,this._to):dd(t,this._value,0,t.length,this._from,this._to)}value(){return this._value.substring(this._from,this._to)}},Sb=class{constructor(t=!0,e=!0){this._splitOnBackslash=t;this._caseSensitive=e}reset(t){this._from=0,this._to=0,this._value=t,this._valueLen=t.length;for(let e=t.length-1;e>=0;e--,this._valueLen--){let n=this._value.charCodeAt(e);if(!(n===47||this._splitOnBackslash&&n===92))break}return this.next()}hasNext(){return this._to<this._valueLen}next(){this._from=this._to;let t=!0;for(;this._to<this._valueLen;this._to++){let e=this._value.charCodeAt(this._to);if(e===47||this._splitOnBackslash&&e===92)if(t)this._from++;else break;else t=!1}return this}cmp(t){return this._caseSensitive?Gv(t,this._value,0,t.length,this._from,this._to):dd(t,this._value,0,t.length,this._from,this._to)}value(){return this._value.substring(this._from,this._to)}};var Jf=class{constructor(t,e){this._ignorePathCasing=t;this._ignoreQueryAndFragment=e;this._states=[];this._stateIdx=0}reset(t){return this._value=t,this._states=[],this._value.scheme&&this._states.push(1),this._value.authority&&this._states.push(2),this._value.path&&(this._pathIterator=new Sb(!1,!this._ignorePathCasing(t)),this._pathIterator.reset(t.path),this._pathIterator.value()&&this._states.push(3)),this._ignoreQueryAndFragment(t)||(this._value.query&&this._states.push(4),this._value.fragment&&this._states.push(5)),this._stateIdx=0,this}next(){return this._states[this._stateIdx]===3&&this._pathIterator.hasNext()?this._pathIterator.next():this._stateIdx+=1,this}hasNext(){return this._states[this._stateIdx]===3&&this._pathIterator.hasNext()||this._stateIdx<this._states.length-1}cmp(t){if(this._states[this._stateIdx]===1)return kf(t,this._value.scheme);if(this._states[this._stateIdx]===2)return kf(t,this._value.authority);if(this._states[this._stateIdx]===3)return this._pathIterator.cmp(t);if(this._states[this._stateIdx]===4)return Vr(t,this._value.query);if(this._states[this._stateIdx]===5)return Vr(t,this._value.fragment);throw new Error}value(){if(this._states[this._stateIdx]===1)return this._value.scheme;if(this._states[this._stateIdx]===2)return this._value.authority;if(this._states[this._stateIdx]===3)return this._pathIterator.value();if(this._states[this._stateIdx]===4)return this._value.query;if(this._states[this._stateIdx]===5)return this._value.fragment;throw new Error}},ys=class r{static{this.Val=Symbol("undefined_placeholder")}static wrap(t){return t===void 0?r.Val:t}static unwrap(t){return t===r.Val?void 0:t}},su=class{constructor(){this.height=1;this.value=void 0;this.key=void 0;this.left=void 0;this.mid=void 0;this.right=void 0}isEmpty(){return!this.left&&!this.mid&&!this.right&&this.value===void 0}rotateLeft(){let t=this.right;return this.right=t.left,t.left=this,this.updateHeight(),t.updateHeight(),t}rotateRight(){let t=this.left;return this.left=t.right,t.right=this,this.updateHeight(),t.updateHeight(),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}};var Oo=class r{static forUris(t=()=>!1,e=()=>!1){return new r(new Jf(t,e))}static forPaths(t=!1){return new r(new Sb(void 0,!t))}static forStrings(){return new r(new uP)}static forConfigKeys(){return new r(new pP)}constructor(t){this._iter=t}clear(){this._root=void 0}fill(t,e){if(e){let n=e.slice(0);ZT(n);for(let o of n)this.set(o,t)}else{let n=t.slice(0);ZT(n);for(let o of n)this.set(o[0],o[1])}}set(t,e){let n=this._iter.reset(t),o;this._root||(this._root=new su,this._root.segment=n.value());let i=[];for(o=this._root;;){let a=n.cmp(o.segment);if(a>0)o.left||(o.left=new su,o.left.segment=n.value()),i.push([-1,o]),o=o.left;else if(a<0)o.right||(o.right=new su,o.right.segment=n.value()),i.push([1,o]),o=o.right;else if(n.hasNext())n.next(),o.mid||(o.mid=new su,o.mid.segment=n.value()),i.push([0,o]),o=o.mid;else break}let s=ys.unwrap(o.value);o.value=ys.wrap(e),o.key=t;for(let a=i.length-1;a>=0;a--){let l=i[a][1];l.updateHeight();let d=l.balanceFactor();if(d<-1||d>1){let c=i[a][0],u=i[a+1][0];if(c===1&&u===1)i[a][1]=l.rotateLeft();else if(c===-1&&u===-1)i[a][1]=l.rotateRight();else if(c===1&&u===-1)l.right=i[a+1][1]=i[a+1][1].rotateRight(),i[a][1]=l.rotateLeft();else if(c===-1&&u===1)l.left=i[a+1][1]=i[a+1][1].rotateLeft(),i[a][1]=l.rotateRight();else throw new Error;if(a>0)switch(i[a-1][0]){case-1:i[a-1][1].left=i[a][1];break;case 1:i[a-1][1].right=i[a][1];break;case 0:i[a-1][1].mid=i[a][1];break}else this._root=i[0][1]}}return s}get(t){return ys.unwrap(this._getNode(t)?.value)}_getNode(t){let e=this._iter.reset(t),n=this._root;for(;n;){let o=e.cmp(n.segment);if(o>0)n=n.left;else if(o<0)n=n.right;else if(e.hasNext())e.next(),n=n.mid;else break}return n}has(t){let e=this._getNode(t);return!(e?.value===void 0&&e?.mid===void 0)}delete(t){return this._delete(t,!1)}deleteSuperstr(t){return this._delete(t,!0)}_delete(t,e){let n=this._iter.reset(t),o=[],i=this._root;for(;i;){let s=n.cmp(i.segment);if(s>0)o.push([-1,i]),i=i.left;else if(s<0)o.push([1,i]),i=i.right;else if(n.hasNext())n.next(),o.push([0,i]),i=i.mid;else break}if(i){if(e?(i.left=void 0,i.mid=void 0,i.right=void 0,i.height=1):(i.key=void 0,i.value=void 0),!i.mid&&!i.value)if(i.left&&i.right){let s=[[1,i]],a=this._min(i.right,s);if(a.key){i.key=a.key,i.value=a.value,i.segment=a.segment;let l=a.right;if(s.length>1){let[c,u]=s[s.length-1];switch(c){case-1:u.left=l;break;case 0:Gc(!1);case 1:Gc(!1)}}else i.right=l;let d=this._balanceByStack(s);if(o.length>0){let[c,u]=o[o.length-1];switch(c){case-1:u.left=d;break;case 0:u.mid=d;break;case 1:u.right=d;break}}else this._root=d}}else{let s=i.left??i.right;if(o.length>0){let[a,l]=o[o.length-1];switch(a){case-1:l.left=s;break;case 0:l.mid=s;break;case 1:l.right=s;break}}else this._root=s}this._root=this._balanceByStack(o)??this._root}}_min(t,e){for(;t.left;)e.push([-1,t]),t=t.left;return t}_balanceByStack(t){for(let e=t.length-1;e>=0;e--){let n=t[e][1];n.updateHeight();let o=n.balanceFactor();if(o>1?(n.right.balanceFactor()>=0||(n.right=n.right.rotateRight()),t[e][1]=n.rotateLeft()):o<-1&&(n.left.balanceFactor()<=0||(n.left=n.left.rotateLeft()),t[e][1]=n.rotateRight()),e>0)switch(t[e-1][0]){case-1:t[e-1][1].left=t[e][1];break;case 1:t[e-1][1].right=t[e][1];break;case 0:t[e-1][1].mid=t[e][1];break}else return t[0][1]}}findSubstr(t){let e=this._iter.reset(t),n=this._root,o;for(;n;){let i=e.cmp(n.segment);if(i>0)n=n.left;else if(i<0)n=n.right;else if(e.hasNext())e.next(),o=ys.unwrap(n.value)||o,n=n.mid;else break}return n&&ys.unwrap(n.value)||o}findSuperstr(t){return this._findSuperstrOrElement(t,!1)}_findSuperstrOrElement(t,e){let n=this._iter.reset(t),o=this._root;for(;o;){let i=n.cmp(o.segment);if(i>0)o=o.left;else if(i<0)o=o.right;else if(n.hasNext())n.next(),o=o.mid;else return o.mid?this._entries(o.mid):e?ys.unwrap(o.value):void 0}}hasElementOrSubtree(t){return this._findSuperstrOrElement(t,!0)!==void 0}forEach(t){for(let[e,n]of this)t(n,e)}*[Symbol.iterator](){yield*this._entries(this._root)}_entries(t){let e=[];return this._dfsEntries(t,e),e[Symbol.iterator]()}_dfsEntries(t,e){t&&(t.left&&this._dfsEntries(t.left,e),t.value!==void 0&&e.push([t.key,ys.unwrap(t.value)]),t.mid&&this._dfsEntries(t.mid,e),t.right&&this._dfsEntries(t.right,e))}_isBalanced(){let t=e=>{if(!e)return!0;let n=e.balanceFactor();return n<-1||n>1?!1:t(e.left)&&t(e.right)};return t(this._root)}};function St(r){if(!r||typeof r!="object"||r instanceof RegExp)return r;let t=Array.isArray(r)?[]:{};return Object.entries(r).forEach(([e,n])=>{t[e]=n&&typeof n=="object"?St(n):n}),t}function jf(r){if(!r||typeof r!="object")return r;let t=[r];for(;t.length>0;){let e=t.shift();Object.freeze(e);for(let n in e)if(rF.call(e,n)){let o=e[n];typeof o=="object"&&!Object.isFrozen(o)&&!C0(o)&&t.push(o)}}return r}var rF=Object.prototype.hasOwnProperty;function Es(r,t){return mP(r,t,new Set)}function mP(r,t,e){if(Ft(r))return r;let n=t(r);if(typeof n<"u")return n;if(Array.isArray(r)){let o=[];for(let i of r)o.push(mP(i,t,e));return o}if(mt(r)){if(e.has(r))throw new Error("Cannot clone recursive data-structure");e.add(r);let o={};for(let i in r)rF.call(r,i)&&(o[i]=mP(r[i],t,e));return e.delete(r),o}return r}function yr(r,t,e=!0){return mt(r)?(mt(t)&&Object.keys(t).forEach(n=>{n in r?e&&(mt(r[n])&&mt(t[n])?yr(r[n],t[n],e):r[n]=t[n]):r[n]=t[n]}),r):t}function Xt(r,t){if(r===t)return!0;if(r==null||t===null||t===void 0||typeof r!=typeof t||typeof r!="object"||Array.isArray(r)!==Array.isArray(t))return!1;let e,n;if(Array.isArray(r)){if(r.length!==t.length)return!1;for(e=0;e<r.length;e++)if(!Xt(r[e],t[e]))return!1}else{let o=[];for(n in r)o.push(n);o.sort();let i=[];for(n in t)i.push(n);if(i.sort(),!Xt(o,i))return!1;for(e=0;e<o.length;e++)if(!Xt(r[o[e]],t[o[e]]))return!1}return!0}function fP(r){let t=new Set;return JSON.stringify(r,(e,n)=>{if(mt(n)||Array.isArray(n)){if(t.has(n))return"[Circular]";t.add(n)}return typeof n=="bigint"?`[BigInt ${n.toString()}]`:n})}function gP(r,t){let e=Object.create(null);for(let[n,o]of Object.entries(r))t(n,o)&&(e[n]=o);return e}var xb=class{constructor(){this._next=0}getNext(){return this._next++}};var hd=N("fileService");var au=(o=>(o[o.Unknown=0]="Unknown",o[o.File=1]="File",o[o.Directory=2]="Directory",o[o.SymbolicLink=64]="SymbolicLink",o))(au||{}),Xf=(n=>(n[n.Readonly=1]="Readonly",n[n.Locked=2]="Locked",n[n.Executable=4]="Executable",n))(Xf||{});var Qf=class r extends Error{constructor(e,n){super(e);this.code=n}static create(e,n){let o=new r(e.toString(),n);return vP(o,n),o}};function vP(r,t){return r.name=t?`${t} (FileSystemError)`:"FileSystemError",r}function lu(r){if(!r)return"Unknown";if(r instanceof Qf)return r.code;let t=/^(.+) \(FileSystemError\)$/.exec(r.name);if(!t)return"Unknown";switch(t[1]){case"EntryExists":return"EntryExists";case"EntryIsADirectory":return"EntryIsADirectory";case"EntryNotADirectory":return"EntryNotADirectory";case"EntryNotFound":return"EntryNotFound";case"EntryTooLarge":return"EntryTooLarge";case"EntryWriteLocked":return"EntryWriteLocked";case"NoPermissions":return"NoPermissions";case"Unavailable":return"Unavailable"}return"Unknown"}function sF(r){if(r instanceof Oa)return r.fileOperationResult;switch(lu(r)){case"EntryNotFound":return 1;case"EntryIsADirectory":return 0;case"EntryNotADirectory":return 9;case"EntryWriteLocked":return 5;case"NoPermissions":return 6;case"EntryExists":return 4;case"EntryTooLarge":return 7;default:return 10}}var iF=class r{constructor(t,e){this.ignorePathCasing=e;this.correlationId=void 0;this.added=new xt(()=>{let t=Oo.forUris(()=>this.ignorePathCasing);return t.fill(this.rawAdded.map(e=>[e,!0])),t});this.updated=new xt(()=>{let t=Oo.forUris(()=>this.ignorePathCasing);return t.fill(this.rawUpdated.map(e=>[e,!0])),t});this.deleted=new xt(()=>{let t=Oo.forUris(()=>this.ignorePathCasing);return t.fill(this.rawDeleted.map(e=>[e,!0])),t});this.rawAdded=[];this.rawUpdated=[];this.rawDeleted=[];for(let n of t){switch(n.type){case 1:this.rawAdded.push(n.resource);break;case 0:this.rawUpdated.push(n.resource);break;case 2:this.rawDeleted.push(n.resource);break}this.correlationId!==r.MIXED_CORRELATION&&(typeof n.cId=="number"?this.correlationId===void 0?this.correlationId=n.cId:this.correlationId!==n.cId&&(this.correlationId=r.MIXED_CORRELATION):this.correlationId!==void 0&&(this.correlationId=r.MIXED_CORRELATION))}}static{this.MIXED_CORRELATION=null}contains(t,...e){return this.doContains(t,{includeChildren:!1},...e)}affects(t,...e){return this.doContains(t,{includeChildren:!0},...e)}doContains(t,e,...n){if(!t)return!1;let o=n.length>0;return!!((!o||n.includes(1))&&(this.added.value.get(t)||e.includeChildren&&this.added.value.findSuperstr(t))||(!o||n.includes(0))&&(this.updated.value.get(t)||e.includeChildren&&this.updated.value.findSuperstr(t))||(!o||n.includes(2))&&(this.deleted.value.findSubstr(t)||e.includeChildren&&this.deleted.value.findSuperstr(t)))}gotAdded(){return this.rawAdded.length>0}gotDeleted(){return this.rawDeleted.length>0}gotUpdated(){return this.rawUpdated.length>0}correlates(t){return this.correlationId===t}hasCorrelation(){return typeof this.correlationId=="number"}};var Oa=class extends Error{constructor(e,n,o){super(e);this.fileOperationResult=n;this.options=o}};var aF="";function bP(r){if(!(typeof r.size!="number"||typeof r.mtime!="number"))return r.mtime.toString(29)+r.size.toString(31)}var hP=class r{static{this.KB=1024}static{this.MB=r.KB*r.KB}static{this.GB=r.MB*r.KB}static{this.TB=r.GB*r.KB}static formatSize(t){return jo(t)||(t=0),t<r.KB?p(2064,null,t.toFixed(0)):t<r.MB?p(2066,null,(t/r.KB).toFixed(2)):t<r.GB?p(2067,null,(t/r.MB).toFixed(2)):t<r.TB?p(2065,null,(t/r.GB).toFixed(2)):p(2068,null,(t/r.TB).toFixed(2))}};var Tb=(o=>(o[o.Ignore=0]="Ignore",o[o.Info=1]="Info",o[o.Warning=2]="Warning",o[o.Error=3]="Error",o))(Tb||{});(a=>{let r="error",t="warning",e="warn",n="info",o="ignore";function i(l){return l?Jn(r,l)?3:Jn(t,l)||Jn(e,l)?2:Jn(n,l)?1:0:0}a.fromValue=i;function s(l){switch(l){case 3:return r;case 2:return t;case 1:return n;default:return o}}a.toString=s})(Tb||={});var tt=Tb;var lF=tt,CY=N("notificationService");var Di=N("contextService");function dF(r){let t=r;return typeof t?.id=="string"&&E.isUri(t.uri)}function cF(r){let t=r;return typeof t?.id=="string"&&E.isUri(t.configPath)}var _b=class{constructor(t,e,n,o,i){this._id=t;this._transient=n;this._configuration=o;this.ignorePathCasing=i;this.foldersMap=Oo.forUris(this.ignorePathCasing,()=>!0),this.folders=e}get folders(){return this._folders}set folders(t){this._folders=t,this.updateFoldersMap()}update(t){this._id=t.id,this._configuration=t.configuration,this._transient=t.transient,this.ignorePathCasing=t.ignorePathCasing,this.folders=t.folders}get id(){return this._id}get transient(){return this._transient}get configuration(){return this._configuration}set configuration(t){this._configuration=t}getFolder(t){return t&&this.foldersMap.findSubstr(t)||null}updateFoldersMap(){this.foldersMap=Oo.forUris(this.ignorePathCasing,()=>!0);for(let t of this.folders)this.foldersMap.set(t.uri,t)}toJSON(){return{id:this.id,folders:this.folders,transient:this.transient,configuration:this.configuration}}},Yf=class{constructor(t,e){this.raw=e;this.uri=t.uri,this.index=t.index,this.name=t.name}toResource(t){return Qt(this.uri,t)}toJSON(){return{uri:this.uri,name:this.name,index:this.index}}};function Zf(r){return new Yf({uri:r,index:0,name:Of(r)},{uri:r.toString()})}var uF="code-workspace",LY=`.${uF}`,MY=[{name:p(2755,null),extensions:[uF]}];var Pb=class{constructor(){this._systemSchemes=new Set(Object.keys(X));this._providerInfo=new Map;this.extUri=new Pi(t=>{let e=this._providerInfo.get(t.scheme);return!(e===void 0||e&1024)})}$acceptProviderInfos(t,e){e===null?this._providerInfo.delete(t.scheme):this._providerInfo.set(t.scheme,e)}isFreeScheme(t){return!this._providerInfo.has(t)&&!this._systemSchemes.has(t)}getCapabilities(t){return this._providerInfo.get(t)}},Er=N("IExtHostFileSystemInfo");var ct=(function(){if(typeof crypto.randomUUID=="function")return crypto.randomUUID.bind(crypto);let r=new Uint8Array(16),t=[];for(let e=0;e<256;e++)t.push(e.toString(16).padStart(2,"0"));return function(){crypto.getRandomValues(r),r[6]=r[6]&15|64,r[8]=r[8]&63|128;let n=0,o="";return o+=t[r[n++]],o+=t[r[n++]],o+=t[r[n++]],o+=t[r[n++]],o+="-",o+=t[r[n++]],o+=t[r[n++]],o+="-",o+=t[r[n++]],o+=t[r[n++]],o+="-",o+=t[r[n++]],o+=t[r[n++]],o+="-",o+=t[r[n++]],o+=t[r[n++]],o+=t[r[n++]],o+=t[r[n++]],o+=t[r[n++]],o+=t[r[n++]],o}})();var wb=Object.freeze({create:r=>cr(r.map(t=>t.toString())).join(`\r
`),split:r=>r.split(`\r
`),parse:r=>wb.split(r).filter(t=>!t.startsWith("#"))});var JY=new Uint32Array(10);var jY=new Uint8Array([114,82,115,101,69,102,97,113,81,116,84,100,119,87,99,122,120,118,103]),QY=new Uint16Array([107,111,105,79,106,112,117,80,104,27496,28520,27752,121,110,27246,28782,27758,98,109,27757,108]),XY=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]),YY=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]);var tZ=new pr(1e4);var z9=new pr(1e4);function q9(r){return J9(r,"NFD",z9)}var K9=/[^\u0000-\u0080]/;function J9(r,t,e){if(!r)return r;let n=e.get(r);if(n)return n;let o;return K9.test(r)?o=r.normalize(t):o=r,e.set(r,o),o}var j9=(function(){let r=new pr(1e4),t=/[\u0300-\u036f]/g;return function(e){let n=r.get(e);if(n)return n;let o=q9(e).replace(t,""),i=(o.length===e.length?o:e).toLowerCase();return r.set(e,i),i}})();function mF(...r){return function(t,e){for(let n=0,o=r.length;n<o;n++){let i=r[n](t,e);if(i)return i}return null}}var cZ=gF.bind(void 0,!1),fF=gF.bind(void 0,!0);function gF(r,t,e){if(!e||e.length<t.length)return null;let n;return r?n=_a(e,t):n=e.indexOf(t)===0,n?t.length>0?[{start:0,end:t.length}]:[]:null}function Q9(r,t){if(r.length>t.length)return null;let e=t.toLowerCase().indexOf(r.toLowerCase());return e===-1?null:[{start:e,end:e+r.length}]}function X9(r,t){return r.length>t.length?null:IP(r.toLowerCase(),t.toLowerCase(),0,0)}function IP(r,t,e,n){if(e===r.length)return[];if(n===t.length)return null;if(r[e]===t[n]){let o=null;return(o=IP(r,t,e+1,n+1))?vF({start:n,end:n+1},o):null}return IP(r,t,e,n+1)}function EP(r){return 97<=r&&r<=122}function kb(r){return 65<=r&&r<=90}function SP(r){return 48<=r&&r<=57}function Y9(r){return r===32||r===9||r===10||r===13}var Z9=new Set;"()[]{}<>`'\"-/;:,.?!".split("").forEach(r=>Z9.add(r.charCodeAt(0)));function hF(r){return EP(r)||kb(r)||SP(r)}function vF(r,t){return t.length===0?t=[r]:r.end===t[0].start?t[0].start=r.start:t.unshift(r),t}function bF(r,t){for(let e=t;e<r.length;e++){let n=r.charCodeAt(e);if(kb(n)||SP(n)||e>0&&!hF(r.charCodeAt(e-1)))return e}return r.length}function yP(r,t,e,n){if(e===r.length)return[];if(n===t.length)return null;if(r[e]!==t[n].toLowerCase())return null;{let o=null,i=n+1;for(o=yP(r,t,e+1,n+1);!o&&(i=bF(t,i))<t.length;)o=yP(r,t,e+1,i),i++;return o===null?null:vF({start:n,end:n+1},o)}}function e7(r){let t=0,e=0,n=0,o=0,i=0;for(let c=0;c<r.length;c++)i=r.charCodeAt(c),kb(i)&&t++,EP(i)&&e++,hF(i)&&n++,SP(i)&&o++;let s=t/r.length,a=e/r.length,l=n/r.length,d=o/r.length;return{upperPercent:s,lowerPercent:a,alphaPercent:l,numericPercent:d}}function t7(r){let{upperPercent:t,lowerPercent:e}=r;return e===0&&t>.6}function n7(r){let{upperPercent:t,lowerPercent:e,alphaPercent:n,numericPercent:o}=r;return e>.2&&t<.8&&n>.6&&o<.2}function o7(r){let t=0,e=0,n=0,o=0;for(let i=0;i<r.length;i++)n=r.charCodeAt(i),kb(n)&&t++,EP(n)&&e++,Y9(n)&&o++;return(t===0||e===0)&&o===0?r.length<=30:t<=5}function IF(r,t){if(!t||(t=t.trim(),t.length===0)||!o7(r))return null;t.length>60&&(t=t.substring(0,60));let e=e7(t);if(!n7(e)){if(!t7(e))return null;t=t.toLowerCase()}let n=null,o=0;for(r=r.toLowerCase();o<t.length&&(n=yP(r,t,0,o))===null;)o=bF(t,o+1);return n}var uZ=mF(fF,IF,Q9),pZ=mF(fF,IF,X9),mZ=new pr(1e4);var Rb=128;function xP(){let r=[],t=[];for(let e=0;e<=Rb;e++)t[e]=0;for(let e=0;e<=Rb;e++)r.push(t.slice(0));return r}function yF(r){let t=[];for(let e=0;e<=r;e++)t[e]=0;return t}var fZ=yF(2*Rb),gZ=yF(2*Rb),hZ=xP(),vZ=xP(),bZ=xP();var r7;(e=>{e.Default=[-100,0];function t(n){return!n||n.length===2&&n[0]===-100&&n[1]===0}e.isDefault=t})(r7||={});var pF=class{constructor(t,e){this.firstMatchCanBeWeak=t;this.boostFullMatch=e}static{this.default={boostFullMatch:!0,firstMatchCanBeWeak:!1}}};var CP=Object.create(null);function v(r,t){if(Me(t)){let e=CP[t];if(e===void 0)throw new Error(`${r} references an unknown codicon: ${t}`);t=e}return CP[r]=t,{id:r}}function EF(){return CP}var SF={add:v("add",6e4),plus:v("plus",6e4),gistNew:v("gist-new",6e4),repoCreate:v("repo-create",6e4),lightbulb:v("lightbulb",60001),lightBulb:v("light-bulb",60001),repo:v("repo",60002),repoDelete:v("repo-delete",60002),gistFork:v("gist-fork",60003),repoForked:v("repo-forked",60003),gitPullRequest:v("git-pull-request",60004),gitPullRequestAbandoned:v("git-pull-request-abandoned",60004),recordKeys:v("record-keys",60005),keyboard:v("keyboard",60005),tag:v("tag",60006),gitPullRequestLabel:v("git-pull-request-label",60006),tagAdd:v("tag-add",60006),tagRemove:v("tag-remove",60006),person:v("person",60007),personFollow:v("person-follow",60007),personOutline:v("person-outline",60007),personFilled:v("person-filled",60007),sourceControl:v("source-control",60008),mirror:v("mirror",60009),mirrorPublic:v("mirror-public",60009),star:v("star",60010),starAdd:v("star-add",60010),starDelete:v("star-delete",60010),starEmpty:v("star-empty",60010),comment:v("comment",60011),commentAdd:v("comment-add",60011),alert:v("alert",60012),warning:v("warning",60012),search:v("search",60013),searchSave:v("search-save",60013),logOut:v("log-out",60014),signOut:v("sign-out",60014),logIn:v("log-in",60015),signIn:v("sign-in",60015),eye:v("eye",60016),eyeUnwatch:v("eye-unwatch",60016),eyeWatch:v("eye-watch",60016),circleFilled:v("circle-filled",60017),primitiveDot:v("primitive-dot",60017),closeDirty:v("close-dirty",60017),debugBreakpoint:v("debug-breakpoint",60017),debugBreakpointDisabled:v("debug-breakpoint-disabled",60017),debugHint:v("debug-hint",60017),terminalDecorationSuccess:v("terminal-decoration-success",60017),primitiveSquare:v("primitive-square",60018),edit:v("edit",60019),pencil:v("pencil",60019),info:v("info",60020),issueOpened:v("issue-opened",60020),gistPrivate:v("gist-private",60021),gitForkPrivate:v("git-fork-private",60021),lock:v("lock",60021),mirrorPrivate:v("mirror-private",60021),close:v("close",60022),removeClose:v("remove-close",60022),x:v("x",60022),repoSync:v("repo-sync",60023),sync:v("sync",60023),clone:v("clone",60024),desktopDownload:v("desktop-download",60024),beaker:v("beaker",60025),microscope:v("microscope",60025),vm:v("vm",60026),deviceDesktop:v("device-desktop",60026),file:v("file",60027),more:v("more",60028),ellipsis:v("ellipsis",60028),kebabHorizontal:v("kebab-horizontal",60028),mailReply:v("mail-reply",60029),reply:v("reply",60029),organization:v("organization",60030),organizationFilled:v("organization-filled",60030),organizationOutline:v("organization-outline",60030),newFile:v("new-file",60031),fileAdd:v("file-add",60031),newFolder:v("new-folder",60032),fileDirectoryCreate:v("file-directory-create",60032),trash:v("trash",60033),trashcan:v("trashcan",60033),history:v("history",60034),clock:v("clock",60034),folder:v("folder",60035),fileDirectory:v("file-directory",60035),symbolFolder:v("symbol-folder",60035),logoGithub:v("logo-github",60036),markGithub:v("mark-github",60036),github:v("github",60036),terminal:v("terminal",60037),console:v("console",60037),repl:v("repl",60037),zap:v("zap",60038),symbolEvent:v("symbol-event",60038),error:v("error",60039),stop:v("stop",60039),variable:v("variable",60040),symbolVariable:v("symbol-variable",60040),array:v("array",60042),symbolArray:v("symbol-array",60042),symbolModule:v("symbol-module",60043),symbolPackage:v("symbol-package",60043),symbolNamespace:v("symbol-namespace",60043),symbolObject:v("symbol-object",60043),symbolMethod:v("symbol-method",60044),symbolFunction:v("symbol-function",60044),symbolConstructor:v("symbol-constructor",60044),symbolBoolean:v("symbol-boolean",60047),symbolNull:v("symbol-null",60047),symbolNumeric:v("symbol-numeric",60048),symbolNumber:v("symbol-number",60048),symbolStructure:v("symbol-structure",60049),symbolStruct:v("symbol-struct",60049),symbolParameter:v("symbol-parameter",60050),symbolTypeParameter:v("symbol-type-parameter",60050),symbolKey:v("symbol-key",60051),symbolText:v("symbol-text",60051),symbolReference:v("symbol-reference",60052),goToFile:v("go-to-file",60052),symbolEnum:v("symbol-enum",60053),symbolValue:v("symbol-value",60053),symbolRuler:v("symbol-ruler",60054),symbolUnit:v("symbol-unit",60054),activateBreakpoints:v("activate-breakpoints",60055),archive:v("archive",60056),arrowBoth:v("arrow-both",60057),arrowDown:v("arrow-down",60058),arrowLeft:v("arrow-left",60059),arrowRight:v("arrow-right",60060),arrowSmallDown:v("arrow-small-down",60061),arrowSmallLeft:v("arrow-small-left",60062),arrowSmallRight:v("arrow-small-right",60063),arrowSmallUp:v("arrow-small-up",60064),arrowUp:v("arrow-up",60065),bell:v("bell",60066),bold:v("bold",60067),book:v("book",60068),bookmark:v("bookmark",60069),debugBreakpointConditionalUnverified:v("debug-breakpoint-conditional-unverified",60070),debugBreakpointConditional:v("debug-breakpoint-conditional",60071),debugBreakpointConditionalDisabled:v("debug-breakpoint-conditional-disabled",60071),debugBreakpointDataUnverified:v("debug-breakpoint-data-unverified",60072),debugBreakpointData:v("debug-breakpoint-data",60073),debugBreakpointDataDisabled:v("debug-breakpoint-data-disabled",60073),debugBreakpointLogUnverified:v("debug-breakpoint-log-unverified",60074),debugBreakpointLog:v("debug-breakpoint-log",60075),debugBreakpointLogDisabled:v("debug-breakpoint-log-disabled",60075),briefcase:v("briefcase",60076),broadcast:v("broadcast",60077),browser:v("browser",60078),bug:v("bug",60079),calendar:v("calendar",60080),caseSensitive:v("case-sensitive",60081),check:v("check",60082),checklist:v("checklist",60083),chevronDown:v("chevron-down",60084),chevronLeft:v("chevron-left",60085),chevronRight:v("chevron-right",60086),chevronUp:v("chevron-up",60087),chromeClose:v("chrome-close",60088),chromeMaximize:v("chrome-maximize",60089),chromeMinimize:v("chrome-minimize",60090),chromeRestore:v("chrome-restore",60091),circleOutline:v("circle-outline",60092),circle:v("circle",60092),debugBreakpointUnverified:v("debug-breakpoint-unverified",60092),terminalDecorationIncomplete:v("terminal-decoration-incomplete",60092),circleSlash:v("circle-slash",60093),circuitBoard:v("circuit-board",60094),clearAll:v("clear-all",60095),clippy:v("clippy",60096),closeAll:v("close-all",60097),cloudDownload:v("cloud-download",60098),cloudUpload:v("cloud-upload",60099),code:v("code",60100),collapseAll:v("collapse-all",60101),colorMode:v("color-mode",60102),commentDiscussion:v("comment-discussion",60103),creditCard:v("credit-card",60105),dash:v("dash",60108),dashboard:v("dashboard",60109),database:v("database",60110),debugContinue:v("debug-continue",60111),debugDisconnect:v("debug-disconnect",60112),debugPause:v("debug-pause",60113),debugRestart:v("debug-restart",60114),debugStart:v("debug-start",60115),debugStepInto:v("debug-step-into",60116),debugStepOut:v("debug-step-out",60117),debugStepOver:v("debug-step-over",60118),debugStop:v("debug-stop",60119),debug:v("debug",60120),deviceCameraVideo:v("device-camera-video",60121),deviceCamera:v("device-camera",60122),deviceMobile:v("device-mobile",60123),diffAdded:v("diff-added",60124),diffIgnored:v("diff-ignored",60125),diffModified:v("diff-modified",60126),diffRemoved:v("diff-removed",60127),diffRenamed:v("diff-renamed",60128),diff:v("diff",60129),diffSidebyside:v("diff-sidebyside",60129),discard:v("discard",60130),editorLayout:v("editor-layout",60131),emptyWindow:v("empty-window",60132),exclude:v("exclude",60133),extensions:v("extensions",60134),eyeClosed:v("eye-closed",60135),fileBinary:v("file-binary",60136),fileCode:v("file-code",60137),fileMedia:v("file-media",60138),filePdf:v("file-pdf",60139),fileSubmodule:v("file-submodule",60140),fileSymlinkDirectory:v("file-symlink-directory",60141),fileSymlinkFile:v("file-symlink-file",60142),fileZip:v("file-zip",60143),files:v("files",60144),filter:v("filter",60145),flame:v("flame",60146),foldDown:v("fold-down",60147),foldUp:v("fold-up",60148),fold:v("fold",60149),folderActive:v("folder-active",60150),folderOpened:v("folder-opened",60151),gear:v("gear",60152),gift:v("gift",60153),gistSecret:v("gist-secret",60154),gist:v("gist",60155),gitCommit:v("git-commit",60156),gitCompare:v("git-compare",60157),compareChanges:v("compare-changes",60157),gitMerge:v("git-merge",60158),githubAction:v("github-action",60159),githubAlt:v("github-alt",60160),globe:v("globe",60161),grabber:v("grabber",60162),graph:v("graph",60163),gripper:v("gripper",60164),heart:v("heart",60165),home:v("home",60166),horizontalRule:v("horizontal-rule",60167),hubot:v("hubot",60168),inbox:v("inbox",60169),issueReopened:v("issue-reopened",60171),issues:v("issues",60172),italic:v("italic",60173),jersey:v("jersey",60174),json:v("json",60175),bracket:v("bracket",60175),kebabVertical:v("kebab-vertical",60176),key:v("key",60177),law:v("law",60178),lightbulbAutofix:v("lightbulb-autofix",60179),linkExternal:v("link-external",60180),link:v("link",60181),listOrdered:v("list-ordered",60182),listUnordered:v("list-unordered",60183),liveShare:v("live-share",60184),loading:v("loading",60185),location:v("location",60186),mailRead:v("mail-read",60187),mail:v("mail",60188),markdown:v("markdown",60189),megaphone:v("megaphone",60190),mention:v("mention",60191),milestone:v("milestone",60192),gitPullRequestMilestone:v("git-pull-request-milestone",60192),mortarBoard:v("mortar-board",60193),move:v("move",60194),multipleWindows:v("multiple-windows",60195),mute:v("mute",60196),noNewline:v("no-newline",60197),note:v("note",60198),octoface:v("octoface",60199),openPreview:v("open-preview",60200),package:v("package",60201),paintcan:v("paintcan",60202),pin:v("pin",60203),play:v("play",60204),run:v("run",60204),plug:v("plug",60205),preserveCase:v("preserve-case",60206),preview:v("preview",60207),project:v("project",60208),pulse:v("pulse",60209),question:v("question",60210),quote:v("quote",60211),radioTower:v("radio-tower",60212),reactions:v("reactions",60213),references:v("references",60214),refresh:v("refresh",60215),regex:v("regex",60216),remoteExplorer:v("remote-explorer",60217),remote:v("remote",60218),remove:v("remove",60219),replaceAll:v("replace-all",60220),replace:v("replace",60221),repoClone:v("repo-clone",60222),repoForcePush:v("repo-force-push",60223),repoPull:v("repo-pull",60224),repoPush:v("repo-push",60225),report:v("report",60226),requestChanges:v("request-changes",60227),rocket:v("rocket",60228),rootFolderOpened:v("root-folder-opened",60229),rootFolder:v("root-folder",60230),rss:v("rss",60231),ruby:v("ruby",60232),saveAll:v("save-all",60233),saveAs:v("save-as",60234),save:v("save",60235),screenFull:v("screen-full",60236),screenNormal:v("screen-normal",60237),searchStop:v("search-stop",60238),server:v("server",60240),settingsGear:v("settings-gear",60241),settings:v("settings",60242),shield:v("shield",60243),smiley:v("smiley",60244),sortPrecedence:v("sort-precedence",60245),splitHorizontal:v("split-horizontal",60246),splitVertical:v("split-vertical",60247),squirrel:v("squirrel",60248),starFull:v("star-full",60249),starHalf:v("star-half",60250),symbolClass:v("symbol-class",60251),symbolColor:v("symbol-color",60252),symbolConstant:v("symbol-constant",60253),symbolEnumMember:v("symbol-enum-member",60254),symbolField:v("symbol-field",60255),symbolFile:v("symbol-file",60256),symbolInterface:v("symbol-interface",60257),symbolKeyword:v("symbol-keyword",60258),symbolMisc:v("symbol-misc",60259),symbolOperator:v("symbol-operator",60260),symbolProperty:v("symbol-property",60261),wrench:v("wrench",60261),wrenchSubaction:v("wrench-subaction",60261),symbolSnippet:v("symbol-snippet",60262),tasklist:v("tasklist",60263),telescope:v("telescope",60264),textSize:v("text-size",60265),threeBars:v("three-bars",60266),thumbsdown:v("thumbsdown",60267),thumbsup:v("thumbsup",60268),tools:v("tools",60269),triangleDown:v("triangle-down",60270),triangleLeft:v("triangle-left",60271),triangleRight:v("triangle-right",60272),triangleUp:v("triangle-up",60273),twitter:v("twitter",60274),unfold:v("unfold",60275),unlock:v("unlock",60276),unmute:v("unmute",60277),unverified:v("unverified",60278),verified:v("verified",60279),versions:v("versions",60280),vmActive:v("vm-active",60281),vmOutline:v("vm-outline",60282),vmRunning:v("vm-running",60283),watch:v("watch",60284),whitespace:v("whitespace",60285),wholeWord:v("whole-word",60286),window:v("window",60287),wordWrap:v("word-wrap",60288),zoomIn:v("zoom-in",60289),zoomOut:v("zoom-out",60290),listFilter:v("list-filter",60291),listFlat:v("list-flat",60292),listSelection:v("list-selection",60293),selection:v("selection",60293),listTree:v("list-tree",60294),debugBreakpointFunctionUnverified:v("debug-breakpoint-function-unverified",60295),debugBreakpointFunction:v("debug-breakpoint-function",60296),debugBreakpointFunctionDisabled:v("debug-breakpoint-function-disabled",60296),debugStackframeActive:v("debug-stackframe-active",60297),circleSmallFilled:v("circle-small-filled",60298),debugStackframeDot:v("debug-stackframe-dot",60298),terminalDecorationMark:v("terminal-decoration-mark",60298),debugStackframe:v("debug-stackframe",60299),debugStackframeFocused:v("debug-stackframe-focused",60299),debugBreakpointUnsupported:v("debug-breakpoint-unsupported",60300),symbolString:v("symbol-string",60301),debugReverseContinue:v("debug-reverse-continue",60302),debugStepBack:v("debug-step-back",60303),debugRestartFrame:v("debug-restart-frame",60304),debugAlt:v("debug-alt",60305),callIncoming:v("call-incoming",60306),callOutgoing:v("call-outgoing",60307),menu:v("menu",60308),expandAll:v("expand-all",60309),feedback:v("feedback",60310),gitPullRequestReviewer:v("git-pull-request-reviewer",60310),groupByRefType:v("group-by-ref-type",60311),ungroupByRefType:v("ungroup-by-ref-type",60312),account:v("account",60313),gitPullRequestAssignee:v("git-pull-request-assignee",60313),bellDot:v("bell-dot",60314),debugConsole:v("debug-console",60315),library:v("library",60316),output:v("output",60317),runAll:v("run-all",60318),syncIgnored:v("sync-ignored",60319),pinned:v("pinned",60320),githubInverted:v("github-inverted",60321),serverProcess:v("server-process",60322),serverEnvironment:v("server-environment",60323),pass:v("pass",60324),issueClosed:v("issue-closed",60324),stopCircle:v("stop-circle",60325),playCircle:v("play-circle",60326),record:v("record",60327),debugAltSmall:v("debug-alt-small",60328),vmConnect:v("vm-connect",60329),cloud:v("cloud",60330),merge:v("merge",60331),export:v("export",60332),graphLeft:v("graph-left",60333),magnet:v("magnet",60334),notebook:v("notebook",60335),redo:v("redo",60336),checkAll:v("check-all",60337),pinnedDirty:v("pinned-dirty",60338),passFilled:v("pass-filled",60339),circleLargeFilled:v("circle-large-filled",60340),circleLarge:v("circle-large",60341),circleLargeOutline:v("circle-large-outline",60341),combine:v("combine",60342),gather:v("gather",60342),table:v("table",60343),variableGroup:v("variable-group",60344),typeHierarchy:v("type-hierarchy",60345),typeHierarchySub:v("type-hierarchy-sub",60346),typeHierarchySuper:v("type-hierarchy-super",60347),gitPullRequestCreate:v("git-pull-request-create",60348),runAbove:v("run-above",60349),runBelow:v("run-below",60350),notebookTemplate:v("notebook-template",60351),debugRerun:v("debug-rerun",60352),workspaceTrusted:v("workspace-trusted",60353),workspaceUntrusted:v("workspace-untrusted",60354),workspaceUnknown:v("workspace-unknown",60355),terminalCmd:v("terminal-cmd",60356),terminalDebian:v("terminal-debian",60357),terminalLinux:v("terminal-linux",60358),terminalPowershell:v("terminal-powershell",60359),terminalTmux:v("terminal-tmux",60360),terminalUbuntu:v("terminal-ubuntu",60361),terminalBash:v("terminal-bash",60362),arrowSwap:v("arrow-swap",60363),copy:v("copy",60364),personAdd:v("person-add",60365),filterFilled:v("filter-filled",60366),wand:v("wand",60367),debugLineByLine:v("debug-line-by-line",60368),inspect:v("inspect",60369),layers:v("layers",60370),layersDot:v("layers-dot",60371),layersActive:v("layers-active",60372),compass:v("compass",60373),compassDot:v("compass-dot",60374),compassActive:v("compass-active",60375),azure:v("azure",60376),issueDraft:v("issue-draft",60377),gitPullRequestClosed:v("git-pull-request-closed",60378),gitPullRequestDraft:v("git-pull-request-draft",60379),debugAll:v("debug-all",60380),debugCoverage:v("debug-coverage",60381),runErrors:v("run-errors",60382),folderLibrary:v("folder-library",60383),debugContinueSmall:v("debug-continue-small",60384),beakerStop:v("beaker-stop",60385),graphLine:v("graph-line",60386),graphScatter:v("graph-scatter",60387),pieChart:v("pie-chart",60388),bracketDot:v("bracket-dot",60389),bracketError:v("bracket-error",60390),lockSmall:v("lock-small",60391),azureDevops:v("azure-devops",60392),verifiedFilled:v("verified-filled",60393),newline:v("newline",60394),layout:v("layout",60395),layoutActivitybarLeft:v("layout-activitybar-left",60396),layoutActivitybarRight:v("layout-activitybar-right",60397),layoutPanelLeft:v("layout-panel-left",60398),layoutPanelCenter:v("layout-panel-center",60399),layoutPanelJustify:v("layout-panel-justify",60400),layoutPanelRight:v("layout-panel-right",60401),layoutPanel:v("layout-panel",60402),layoutSidebarLeft:v("layout-sidebar-left",60403),layoutSidebarRight:v("layout-sidebar-right",60404),layoutStatusbar:v("layout-statusbar",60405),layoutMenubar:v("layout-menubar",60406),layoutCentered:v("layout-centered",60407),target:v("target",60408),indent:v("indent",60409),recordSmall:v("record-small",60410),errorSmall:v("error-small",60411),terminalDecorationError:v("terminal-decoration-error",60411),arrowCircleDown:v("arrow-circle-down",60412),arrowCircleLeft:v("arrow-circle-left",60413),arrowCircleRight:v("arrow-circle-right",60414),arrowCircleUp:v("arrow-circle-up",60415),layoutSidebarRightOff:v("layout-sidebar-right-off",60416),layoutPanelOff:v("layout-panel-off",60417),layoutSidebarLeftOff:v("layout-sidebar-left-off",60418),blank:v("blank",60419),heartFilled:v("heart-filled",60420),map:v("map",60421),mapHorizontal:v("map-horizontal",60421),foldHorizontal:v("fold-horizontal",60421),mapFilled:v("map-filled",60422),mapHorizontalFilled:v("map-horizontal-filled",60422),foldHorizontalFilled:v("fold-horizontal-filled",60422),circleSmall:v("circle-small",60423),bellSlash:v("bell-slash",60424),bellSlashDot:v("bell-slash-dot",60425),commentUnresolved:v("comment-unresolved",60426),gitPullRequestGoToChanges:v("git-pull-request-go-to-changes",60427),gitPullRequestNewChanges:v("git-pull-request-new-changes",60428),searchFuzzy:v("search-fuzzy",60429),commentDraft:v("comment-draft",60430),send:v("send",60431),sparkle:v("sparkle",60432),insert:v("insert",60433),mic:v("mic",60434),thumbsdownFilled:v("thumbsdown-filled",60435),thumbsupFilled:v("thumbsup-filled",60436),coffee:v("coffee",60437),snake:v("snake",60438),game:v("game",60439),vr:v("vr",60440),chip:v("chip",60441),piano:v("piano",60442),music:v("music",60443),micFilled:v("mic-filled",60444),repoFetch:v("repo-fetch",60445),copilot:v("copilot",60446),lightbulbSparkle:v("lightbulb-sparkle",60447),robot:v("robot",60448),sparkleFilled:v("sparkle-filled",60449),diffSingle:v("diff-single",60450),diffMultiple:v("diff-multiple",60451),surroundWith:v("surround-with",60452),share:v("share",60453),gitStash:v("git-stash",60454),gitStashApply:v("git-stash-apply",60455),gitStashPop:v("git-stash-pop",60456),vscode:v("vscode",60457),vscodeInsiders:v("vscode-insiders",60458),codeOss:v("code-oss",60459),runCoverage:v("run-coverage",60460),runAllCoverage:v("run-all-coverage",60461),coverage:v("coverage",60462),githubProject:v("github-project",60463),mapVertical:v("map-vertical",60464),foldVertical:v("fold-vertical",60464),mapVerticalFilled:v("map-vertical-filled",60465),foldVerticalFilled:v("fold-vertical-filled",60465),goToSearch:v("go-to-search",60466),percentage:v("percentage",60467),sortPercentage:v("sort-percentage",60467),attach:v("attach",60468),goToEditingSession:v("go-to-editing-session",60469),editSession:v("edit-session",60470),codeReview:v("code-review",60471),copilotWarning:v("copilot-warning",60472),python:v("python",60473),copilotLarge:v("copilot-large",60474),copilotWarningLarge:v("copilot-warning-large",60475),keyboardTab:v("keyboard-tab",60476),copilotBlocked:v("copilot-blocked",60477),copilotNotConnected:v("copilot-not-connected",60478),flag:v("flag",60479),lightbulbEmpty:v("lightbulb-empty",60480),symbolMethodArrow:v("symbol-method-arrow",60481),copilotUnavailable:v("copilot-unavailable",60482),repoPinned:v("repo-pinned",60483),keyboardTabAbove:v("keyboard-tab-above",60484),keyboardTabBelow:v("keyboard-tab-below",60485),gitPullRequestDone:v("git-pull-request-done",60486),mcp:v("mcp",60487),extensionsLarge:v("extensions-large",60488),layoutPanelDock:v("layout-panel-dock",60489),layoutSidebarLeftDock:v("layout-sidebar-left-dock",60490),layoutSidebarRightDock:v("layout-sidebar-right-dock",60491),copilotInProgress:v("copilot-in-progress",60492),copilotError:v("copilot-error",60493),copilotSuccess:v("copilot-success",60494),chatSparkle:v("chat-sparkle",60495),searchSparkle:v("search-sparkle",60496),editSparkle:v("edit-sparkle",60497),copilotSnooze:v("copilot-snooze",60498),sendToRemoteAgent:v("send-to-remote-agent",60499),commentDiscussionSparkle:v("comment-discussion-sparkle",60500),chatSparkleWarning:v("chat-sparkle-warning",60501),chatSparkleError:v("chat-sparkle-error",60502),collection:v("collection",60503),newCollection:v("new-collection",60504),thinking:v("thinking",60505),build:v("build",60506),commentDiscussionQuote:v("comment-discussion-quote",60507),cursor:v("cursor",60508),eraser:v("eraser",60509),fileText:v("file-text",60510),quotes:v("quotes",60512),rename:v("rename",60513),runWithDeps:v("run-with-deps",60514),debugConnected:v("debug-connected",60515),strikethrough:v("strikethrough",60516),openInProduct:v("open-in-product",60517),indexZero:v("index-zero",60518),agent:v("agent",60519),editCode:v("edit-code",60520),repoSelected:v("repo-selected",60521),skip:v("skip",60522),mergeInto:v("merge-into",60523),gitBranchChanges:v("git-branch-changes",60524),gitBranchStagedChanges:v("git-branch-staged-changes",60525),gitBranchConflicts:v("git-branch-conflicts",60526),gitBranch:v("git-branch",60527),gitBranchCreate:v("git-branch-create",60527),gitBranchDelete:v("git-branch-delete",60527),searchLarge:v("search-large",60528),terminalGitBash:v("terminal-git-bash",60529),windowActive:v("window-active",60530),forward:v("forward",60531),download:v("download",60532),clockface:v("clockface",60533),unarchive:v("unarchive",60534),sessionInProgress:v("session-in-progress",60535),collectionSmall:v("collection-small",60536),vmSmall:v("vm-small",60537),cloudSmall:v("cloud-small",60538),addSmall:v("add-small",60539),removeSmall:v("remove-small",60540),worktreeSmall:v("worktree-small",60541),worktree:v("worktree",60542),screenCut:v("screen-cut",60543),ask:v("ask",60544),openai:v("openai",60545),claude:v("claude",60546),openInWindow:v("open-in-window",60547),newSession:v("new-session",60548),cascade:v("cascade",63742),cascadeBrowser:v("cascade-browser",63743),deepwiki:v("deepwiki",63744)};var i7={dialogError:v("dialog-error","error"),dialogWarning:v("dialog-warning","warning"),dialogInfo:v("dialog-info","info"),dialogClose:v("dialog-close","close"),treeItemExpanded:v("tree-item-expanded","chevron-down"),treeFilterOnTypeOn:v("tree-filter-on-type-on","list-filter"),treeFilterOnTypeOff:v("tree-filter-on-type-off","list-selection"),treeFilterClear:v("tree-filter-clear","close"),treeItemLoading:v("tree-item-loading","loading"),menuSelection:v("menu-selection","check"),menuSubmenu:v("menu-submenu","chevron-right"),menuBarMore:v("menubar-more","more"),scrollbarButtonLeft:v("scrollbar-button-left","triangle-left"),scrollbarButtonRight:v("scrollbar-button-right","triangle-right"),scrollbarButtonUp:v("scrollbar-button-up","triangle-up"),scrollbarButtonDown:v("scrollbar-button-down","triangle-down"),toolBarMore:v("toolbar-more","more"),quickInputBack:v("quick-input-back","arrow-left"),dropDownButton:v("drop-down-button",60084),symbolCustomColor:v("symbol-customcolor",60252),exportIcon:v("export",60332),workspaceUnspecified:v("workspace-unspecified",60355),newLine:v("newline",60394),thumbsDownFilled:v("thumbsdown-filled",60435),thumbsUpFilled:v("thumbsup-filled",60436),gitFetch:v("git-fetch",60445),lightbulbSparkleAutofix:v("lightbulb-sparkle-autofix",60447),debugBreakpointPending:v("debug-breakpoint-pending",60377)},fe={...SF,...i7};var du;(t=>{function r(e){return!!e&&typeof e=="object"&&typeof e.id=="string"}t.isThemeColor=r})(du||={});var Tt;(_=>{_.iconNameSegment="[A-Za-z0-9]+",_.iconNameExpression="[A-Za-z0-9-]+",_.iconModifierExpression="~[A-Za-z]+",_.iconNameCharacter="[A-Za-z0-9~-]";let o=new RegExp(`^(${_.iconNameExpression})(${_.iconModifierExpression})?$`);function i(R){let O=o.exec(R.id);if(!O)return i(fe.error);let[,U,ie]=O,Y=["codicon","codicon-"+U];return ie&&Y.push("codicon-modifier-"+ie.substring(1)),Y}_.asClassNameArray=i;function s(R){return i(R).join(" ")}_.asClassName=s;function a(R){return"."+i(R).join(".")}_.asCSSSelector=a;function l(R){return!!R&&typeof R=="object"&&typeof R.id=="string"&&(typeof R.color>"u"||du.isThemeColor(R.color))}_.isThemeIcon=l;let d=new RegExp(`^\\$\\((${_.iconNameExpression}(?:${_.iconModifierExpression})?)\\)$`);function c(R){let O=d.exec(R);if(!O)return;let[,U]=O;return{id:U}}_.fromString=c;function u(R){return{id:R}}_.fromId=u;function f(R,O){let U=R.id,ie=U.lastIndexOf("~");return ie!==-1&&(U=U.substring(0,ie)),O&&(U=`${U}~${O}`),{id:U}}_.modify=f;function g(R){let O=R.id.lastIndexOf("~");if(O!==-1)return R.id.substring(O+1)}_.getModifier=g;function I(R,O){return R.id===O.id&&R.color?.id===O.color?.id}_.isEqual=I;function h(R){return R?.id===fe.file.id}_.isFile=h;function C(R){return R?.id===fe.folder.id}_.isFolder=C})(Tt||={});var TP=new RegExp(`\\$\\(${Tt.iconNameExpression}(?:${Tt.iconModifierExpression})?\\)`,"g"),s7=new RegExp(`(\\\\)?${TP.source}`,"g");function xF(r){return r.replace(s7,(t,e)=>e?t:`\\${t}`)}var LZ=new RegExp(`\\\\${TP.source}`,"g");var MZ=new RegExp(`(\\s)?(\\\\)?${TP.source}(\\s)?`,"g");var NZ=new RegExp(`\\$\\(${Tt.iconNameCharacter}+\\)`,"g");var Yn=class r{static lift(t){let e=new r(t.value,t);return e.uris=t.uris,e.baseUri=t.baseUri?E.revive(t.baseUri):void 0,e}constructor(t="",e=!1){if(this.value=t,typeof this.value!="string")throw Be("value");typeof e=="boolean"?(this.isTrusted=e,this.supportThemeIcons=!1,this.supportHtml=!1,this.supportAlertSyntax=!1):(this.isTrusted=e.isTrusted??void 0,this.supportThemeIcons=e.supportThemeIcons??!1,this.supportHtml=e.supportHtml??!1,this.supportAlertSyntax=e.supportAlertSyntax??!1)}appendText(t,e=0){return this.value+=a7(this.supportThemeIcons?xF(t):t).replace(/([ \t]+)/g,(n,o)=>"&nbsp;".repeat(o.length)).replace(/\>/gm,"\\>").replace(/\n/g,e===1?`\\
`:`

`),this}appendMarkdown(t){return this.value+=t,this}appendCodeblock(t,e){return this.value+=`
${l7(e,t)}
`,this}appendLink(t,e,n){return this.value+="[",this.value+=this._escape(e,"]"),this.value+="](",this.value+=this._escape(String(t),")"),n&&(this.value+=` "${this._escape(this._escape(n,'"'),")")}"`),this.value+=")",this}_escape(t,e){let n=new RegExp(hr(e),"g");return t.replace(n,(o,i)=>t.charAt(i-1)!=="\\"?`\\${o}`:o)}};function qr(r){return r instanceof Yn?!0:r&&typeof r=="object"?typeof r.value=="string"&&(typeof r.isTrusted=="boolean"||typeof r.isTrusted=="object"||r.isTrusted===void 0)&&(typeof r.supportThemeIcons=="boolean"||r.supportThemeIcons===void 0)&&(typeof r.supportAlertSyntax=="boolean"||r.supportAlertSyntax===void 0):!1}function a7(r){return r.replace(/[\\`*_{}[\]()#+\-!~]/g,"\\$&")}function l7(r,t){let e=r.match(/^`+/gm)?.reduce((o,i)=>o.length>i.length?o:i).length??0,n=e>=3?e+1:3;return[`${"`".repeat(n)}${t}`,r,`${"`".repeat(n)}`].join(`
`)}function CF(r){let t=[],e=r.split("|").map(o=>o.trim());r=e[0];let n=e[1];if(n){let o=/height=(\d+)/.exec(n),i=/width=(\d+)/.exec(n),s=o?o[1]:"",a=i?i[1]:"",l=isFinite(parseInt(a)),d=isFinite(parseInt(s));l&&t.push(`width="${a}"`),d&&t.push(`height="${s}"`)}return{href:r,dimensions:t}}function DP(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var bd=DP();function RF(r){bd=r}var kF=/[&<>"']/,c7=new RegExp(kF.source,"g"),AF=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,u7=new RegExp(AF.source,"g"),p7={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},TF=r=>p7[r];function er(r,t){if(t){if(kF.test(r))return r.replace(c7,TF)}else if(AF.test(r))return r.replace(u7,TF);return r}var m7=/(^|[^\[])\^/g;function Gt(r,t){let e=typeof r=="string"?r:r.source;t=t||"";let n={replace:(o,i)=>{let s=typeof i=="string"?i:i.source;return s=s.replace(m7,"$1"),e=e.replace(o,s),n},getRegex:()=>new RegExp(e,t)};return n}function _F(r){try{r=encodeURI(r).replace(/%25/g,"%")}catch{return null}return r}var ng={exec:()=>null};function PF(r,t){let e=r.replace(/\|/g,(i,s,a)=>{let l=!1,d=s;for(;--d>=0&&a[d]==="\\";)l=!l;return l?"|":" |"}),n=e.split(/ \|/),o=0;if(n[0].trim()||n.shift(),n.length>0&&!n[n.length-1].trim()&&n.pop(),t)if(n.length>t)n.splice(t);else for(;n.length<t;)n.push("");for(;o<n.length;o++)n[o]=n[o].trim().replace(/\\\|/g,"|");return n}function eg(r,t,e){let n=r.length;if(n===0)return"";let o=0;for(;o<n;){let i=r.charAt(n-o-1);if(i===t&&!e)o++;else if(i!==t&&e)o++;else break}return r.slice(0,n-o)}function f7(r,t){if(r.indexOf(t[1])===-1)return-1;let e=0;for(let n=0;n<r.length;n++)if(r[n]==="\\")n++;else if(r[n]===t[0])e++;else if(r[n]===t[1]&&(e--,e<0))return n;return-1}function DF(r,t,e,n){let o=t.href,i=t.title?er(t.title):null,s=r[1].replace(/\\([\[\]])/g,"$1");if(r[0].charAt(0)!=="!"){n.state.inLink=!0;let a={type:"link",raw:e,href:o,title:i,text:s,tokens:n.inlineTokens(s)};return n.state.inLink=!1,a}return{type:"image",raw:e,href:o,title:i,text:er(s)}}function g7(r,t){let e=r.match(/^(\s+)(?:```)/);if(e===null)return t;let n=e[1];return t.split(`
`).map(o=>{let i=o.match(/^\s+/);if(i===null)return o;let[s]=i;return s.length>=n.length?o.slice(n.length):o}).join(`
`)}var uu=class{options;rules;lexer;constructor(t){this.options=t||bd}space(t){let e=this.rules.block.newline.exec(t);if(e&&e[0].length>0)return{type:"space",raw:e[0]}}code(t){let e=this.rules.block.code.exec(t);if(e){let n=e[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:e[0],codeBlockStyle:"indented",text:this.options.pedantic?n:eg(n,`
`)}}}fences(t){let e=this.rules.block.fences.exec(t);if(e){let n=e[0],o=g7(n,e[3]||"");return{type:"code",raw:n,lang:e[2]?e[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):e[2],text:o}}}heading(t){let e=this.rules.block.heading.exec(t);if(e){let n=e[2].trim();if(/#$/.test(n)){let o=eg(n,"#");(this.options.pedantic||!o||/ $/.test(o))&&(n=o.trim())}return{type:"heading",raw:e[0],depth:e[1].length,text:n,tokens:this.lexer.inline(n)}}}hr(t){let e=this.rules.block.hr.exec(t);if(e)return{type:"hr",raw:eg(e[0],`
`)}}blockquote(t){let e=this.rules.block.blockquote.exec(t);if(e){let n=eg(e[0],`
`).split(`
`),o="",i="",s=[];for(;n.length>0;){let a=!1,l=[],d;for(d=0;d<n.length;d++)if(/^ {0,3}>/.test(n[d]))l.push(n[d]),a=!0;else if(!a)l.push(n[d]);else break;n=n.slice(d);let c=l.join(`
`),u=c.replace(/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,`
    $1`).replace(/^ {0,3}>[ \t]?/gm,"");o=o?`${o}
${c}`:c,i=i?`${i}
${u}`:u;let f=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(u,s,!0),this.lexer.state.top=f,n.length===0)break;let g=s[s.length-1];if(g?.type==="code")break;if(g?.type==="blockquote"){let I=g,h=I.raw+`
`+n.join(`
`),C=this.blockquote(h);s[s.length-1]=C,o=o.substring(0,o.length-I.raw.length)+C.raw,i=i.substring(0,i.length-I.text.length)+C.text;break}else if(g?.type==="list"){let I=g,h=I.raw+`
`+n.join(`
`),C=this.list(h);s[s.length-1]=C,o=o.substring(0,o.length-g.raw.length)+C.raw,i=i.substring(0,i.length-I.raw.length)+C.raw,n=h.substring(s[s.length-1].raw.length).split(`
`);continue}}return{type:"blockquote",raw:o,tokens:s,text:i}}}list(t){let e=this.rules.block.list.exec(t);if(e){let n=e[1].trim(),o=n.length>1,i={type:"list",raw:"",ordered:o,start:o?+n.slice(0,-1):"",loose:!1,items:[]};n=o?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=o?n:"[*+-]");let s=new RegExp(`^( {0,3}${n})((?:[	 ][^\\n]*)?(?:\\n|$))`),a=!1;for(;t;){let l=!1,d="",c="";if(!(e=s.exec(t))||this.rules.block.hr.test(t))break;d=e[0],t=t.substring(d.length);let u=e[2].split(`
`,1)[0].replace(/^\t+/,_=>" ".repeat(3*_.length)),f=t.split(`
`,1)[0],g=!u.trim(),I=0;if(this.options.pedantic?(I=2,c=u.trimStart()):g?I=e[1].length+1:(I=e[2].search(/[^ ]/),I=I>4?1:I,c=u.slice(I),I+=e[1].length),g&&/^ *$/.test(f)&&(d+=f+`
`,t=t.substring(f.length+1),l=!0),!l){let _=new RegExp(`^ {0,${Math.min(3,I-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ 	][^\\n]*)?(?:\\n|$))`),R=new RegExp(`^ {0,${Math.min(3,I-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),O=new RegExp(`^ {0,${Math.min(3,I-1)}}(?:\`\`\`|~~~)`),U=new RegExp(`^ {0,${Math.min(3,I-1)}}#`);for(;t;){let ie=t.split(`
`,1)[0];if(f=ie,this.options.pedantic&&(f=f.replace(/^ {1,4}(?=( {4})*[^ ])/g,"  ")),O.test(f)||U.test(f)||_.test(f)||R.test(t))break;if(f.search(/[^ ]/)>=I||!f.trim())c+=`
`+f.slice(I);else{if(g||u.search(/[^ ]/)>=4||O.test(u)||U.test(u)||R.test(u))break;c+=`
`+f}!g&&!f.trim()&&(g=!0),d+=ie+`
`,t=t.substring(ie.length+1),u=f.slice(I)}}i.loose||(a?i.loose=!0:/\n *\n *$/.test(d)&&(a=!0));let h=null,C;this.options.gfm&&(h=/^\[[ xX]\] /.exec(c),h&&(C=h[0]!=="[ ] ",c=c.replace(/^\[[ xX]\] +/,""))),i.items.push({type:"list_item",raw:d,task:!!h,checked:C,loose:!1,text:c,tokens:[]}),i.raw+=d}i.items[i.items.length-1].raw=i.items[i.items.length-1].raw.trimEnd(),i.items[i.items.length-1].text=i.items[i.items.length-1].text.trimEnd(),i.raw=i.raw.trimEnd();for(let l=0;l<i.items.length;l++)if(this.lexer.state.top=!1,i.items[l].tokens=this.lexer.blockTokens(i.items[l].text,[]),!i.loose){let d=i.items[l].tokens.filter(u=>u.type==="space"),c=d.length>0&&d.some(u=>/\n.*\n/.test(u.raw));i.loose=c}if(i.loose)for(let l=0;l<i.items.length;l++)i.items[l].loose=!0;return i}}html(t){let e=this.rules.block.html.exec(t);if(e)return{type:"html",block:!0,raw:e[0],pre:e[1]==="pre"||e[1]==="script"||e[1]==="style",text:e[0]}}def(t){let e=this.rules.block.def.exec(t);if(e){let n=e[1].toLowerCase().replace(/\s+/g," "),o=e[2]?e[2].replace(/^<(.*)>$/,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",i=e[3]?e[3].substring(1,e[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):e[3];return{type:"def",tag:n,raw:e[0],href:o,title:i}}}table(t){let e=this.rules.block.table.exec(t);if(!e||!/[:|]/.test(e[2]))return;let n=PF(e[1]),o=e[2].replace(/^\||\| *$/g,"").split("|"),i=e[3]&&e[3].trim()?e[3].replace(/\n[ \t]*$/,"").split(`
`):[],s={type:"table",raw:e[0],header:[],align:[],rows:[]};if(n.length===o.length){for(let a of o)/^ *-+: *$/.test(a)?s.align.push("right"):/^ *:-+: *$/.test(a)?s.align.push("center"):/^ *:-+ *$/.test(a)?s.align.push("left"):s.align.push(null);for(let a=0;a<n.length;a++)s.header.push({text:n[a],tokens:this.lexer.inline(n[a]),header:!0,align:s.align[a]});for(let a of i)s.rows.push(PF(a,s.header.length).map((l,d)=>({text:l,tokens:this.lexer.inline(l),header:!1,align:s.align[d]})));return s}}lheading(t){let e=this.rules.block.lheading.exec(t);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(t){let e=this.rules.block.paragraph.exec(t);if(e){let n=e[1].charAt(e[1].length-1)===`
`?e[1].slice(0,-1):e[1];return{type:"paragraph",raw:e[0],text:n,tokens:this.lexer.inline(n)}}}text(t){let e=this.rules.block.text.exec(t);if(e)return{type:"text",raw:e[0],text:e[0],tokens:this.lexer.inline(e[0])}}escape(t){let e=this.rules.inline.escape.exec(t);if(e)return{type:"escape",raw:e[0],text:er(e[1])}}tag(t){let e=this.rules.inline.tag.exec(t);if(e)return!this.lexer.state.inLink&&/^<a /i.test(e[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&/^<\/a>/i.test(e[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(e[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(e[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:e[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:e[0]}}link(t){let e=this.rules.inline.link.exec(t);if(e){let n=e[2].trim();if(!this.options.pedantic&&/^</.test(n)){if(!/>$/.test(n))return;let s=eg(n.slice(0,-1),"\\");if((n.length-s.length)%2===0)return}else{let s=f7(e[2],"()");if(s>-1){let l=(e[0].indexOf("!")===0?5:4)+e[1].length+s;e[2]=e[2].substring(0,s),e[0]=e[0].substring(0,l).trim(),e[3]=""}}let o=e[2],i="";if(this.options.pedantic){let s=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(o);s&&(o=s[1],i=s[3])}else i=e[3]?e[3].slice(1,-1):"";return o=o.trim(),/^</.test(o)&&(this.options.pedantic&&!/>$/.test(n)?o=o.slice(1):o=o.slice(1,-1)),DF(e,{href:o&&o.replace(this.rules.inline.anyPunctuation,"$1"),title:i&&i.replace(this.rules.inline.anyPunctuation,"$1")},e[0],this.lexer)}}reflink(t,e){let n;if((n=this.rules.inline.reflink.exec(t))||(n=this.rules.inline.nolink.exec(t))){let o=(n[2]||n[1]).replace(/\s+/g," "),i=e[o.toLowerCase()];if(!i){let s=n[0].charAt(0);return{type:"text",raw:s,text:s}}return DF(n,i,n[0],this.lexer)}}emStrong(t,e,n=""){let o=this.rules.inline.emStrongLDelim.exec(t);if(!o||o[3]&&n.match(/[\p{L}\p{N}]/u))return;if(!(o[1]||o[2]||"")||!n||this.rules.inline.punctuation.exec(n)){let s=[...o[0]].length-1,a,l,d=s,c=0,u=o[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(u.lastIndex=0,e=e.slice(-1*t.length+s);(o=u.exec(e))!=null;){if(a=o[1]||o[2]||o[3]||o[4]||o[5]||o[6],!a)continue;if(l=[...a].length,o[3]||o[4]){d+=l;continue}else if((o[5]||o[6])&&s%3&&!((s+l)%3)){c+=l;continue}if(d-=l,d>0)continue;l=Math.min(l,l+d+c);let f=[...o[0]][0].length,g=t.slice(0,s+o.index+f+l);if(Math.min(s,l)%2){let h=g.slice(1,-1);return{type:"em",raw:g,text:h,tokens:this.lexer.inlineTokens(h)}}let I=g.slice(2,-2);return{type:"strong",raw:g,text:I,tokens:this.lexer.inlineTokens(I)}}}}codespan(t){let e=this.rules.inline.code.exec(t);if(e){let n=e[2].replace(/\n/g," "),o=/[^ ]/.test(n),i=/^ /.test(n)&&/ $/.test(n);return o&&i&&(n=n.substring(1,n.length-1)),n=er(n,!0),{type:"codespan",raw:e[0],text:n}}}br(t){let e=this.rules.inline.br.exec(t);if(e)return{type:"br",raw:e[0]}}del(t){let e=this.rules.inline.del.exec(t);if(e)return{type:"del",raw:e[0],text:e[2],tokens:this.lexer.inlineTokens(e[2])}}autolink(t){let e=this.rules.inline.autolink.exec(t);if(e){let n,o;return e[2]==="@"?(n=er(e[1]),o="mailto:"+n):(n=er(e[1]),o=n),{type:"link",raw:e[0],text:n,href:o,tokens:[{type:"text",raw:n,text:n}]}}}url(t){let e;if(e=this.rules.inline.url.exec(t)){let n,o;if(e[2]==="@")n=er(e[0]),o="mailto:"+n;else{let i;do i=e[0],e[0]=this.rules.inline._backpedal.exec(e[0])?.[0]??"";while(i!==e[0]);n=er(e[0]),e[1]==="www."?o="http://"+e[0]:o=e[0]}return{type:"link",raw:e[0],text:n,href:o,tokens:[{type:"text",raw:n,text:n}]}}}inlineText(t){let e=this.rules.inline.text.exec(t);if(e){let n;return this.lexer.state.inRawBlock?n=e[0]:n=er(e[0]),{type:"text",raw:e[0],text:n}}}},h7=/^(?: *(?:\n|$))+/,v7=/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,b7=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,rg=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,I7=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,OF=/(?:[*+-]|\d{1,9}[.)])/,LF=Gt(/^(?!bull |blockCode|fences|blockquote|heading|html)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html))+?)\n {0,3}(=+|-+) *(?:\n+|$)/).replace(/bull/g,OF).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(),wP=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,y7=/^[^\n]+/,RP=/(?!\s*\])(?:\\.|[^\[\]\\])+/,E7=Gt(/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/).replace("label",RP).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),S7=Gt(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,OF).getRegex(),Lb="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",kP=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,x7=Gt("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))","i").replace("comment",kP).replace("tag",Lb).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),MF=Gt(wP).replace("hr",rg).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","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Lb).getRegex(),C7=Gt(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",MF).getRegex(),AP={blockquote:C7,code:v7,def:E7,fences:b7,heading:I7,hr:rg,html:x7,lheading:LF,list:S7,newline:h7,paragraph:MF,table:ng,text:y7},wF=Gt("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",rg).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","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Lb).getRegex(),T7={...AP,table:wF,paragraph:Gt(wP).replace("hr",rg).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",wF).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Lb).getRegex()},_7={...AP,html:Gt(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",kP).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:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:ng,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:Gt(wP).replace("hr",rg).replace("heading",` *#{1,6} *[^
]`).replace("lheading",LF).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},NF=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,P7=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,UF=/^( {2,}|\\)\n(?!\s*$)/,D7=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,ig="\\p{P}\\p{S}",w7=Gt(/^((?![*_])[\spunctuation])/,"u").replace(/punctuation/g,ig).getRegex(),R7=/\[[^[\]]*?\]\([^\(\)]*?\)|`[^`]*?`|<[^<>]*?>/g,k7=Gt(/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/,"u").replace(/punct/g,ig).getRegex(),A7=Gt("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)[punct](\\*+)(?=[\\s]|$)|[^punct\\s](\\*+)(?!\\*)(?=[punct\\s]|$)|(?!\\*)[punct\\s](\\*+)(?=[^punct\\s])|[\\s](\\*+)(?!\\*)(?=[punct])|(?!\\*)[punct](\\*+)(?!\\*)(?=[punct])|[^punct\\s](\\*+)(?=[^punct\\s])","gu").replace(/punct/g,ig).getRegex(),O7=Gt("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\\s]|$)|[^punct\\s](_+)(?!_)(?=[punct\\s]|$)|(?!_)[punct\\s](_+)(?=[^punct\\s])|[\\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])","gu").replace(/punct/g,ig).getRegex(),L7=Gt(/\\([punct])/,"gu").replace(/punct/g,ig).getRegex(),M7=Gt(/^<(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(),N7=Gt(kP).replace("(?:-->|$)","-->").getRegex(),U7=Gt("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",N7).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Ob=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,F7=Gt(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label",Ob).replace("href",/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),FF=Gt(/^!?\[(label)\]\[(ref)\]/).replace("label",Ob).replace("ref",RP).getRegex(),HF=Gt(/^!?\[(ref)\](?:\[\])?/).replace("ref",RP).getRegex(),H7=Gt("reflink|nolink(?!\\()","g").replace("reflink",FF).replace("nolink",HF).getRegex(),OP={_backpedal:ng,anyPunctuation:L7,autolink:M7,blockSkip:R7,br:UF,code:P7,del:ng,emStrongLDelim:k7,emStrongRDelimAst:A7,emStrongRDelimUnd:O7,escape:NF,link:F7,nolink:HF,punctuation:w7,reflink:FF,reflinkSearch:H7,tag:U7,text:D7,url:ng},B7={...OP,link:Gt(/^!?\[(label)\]\((.*?)\)/).replace("label",Ob).getRegex(),reflink:Gt(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Ob).getRegex()},_P={...OP,escape:Gt(NF).replace("])","~|])").getRegex(),url:Gt(/^((?: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]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/},V7={..._P,br:Gt(UF).replace("{2,}","*").getRegex(),text:Gt(_P.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Ab={normal:AP,gfm:T7,pedantic:_7},tg={normal:OP,gfm:_P,breaks:V7,pedantic:B7},Ss=class r{tokens;options;state;tokenizer;inlineQueue;constructor(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||bd,this.options.tokenizer=this.options.tokenizer||new uu,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let e={block:Ab.normal,inline:tg.normal};this.options.pedantic?(e.block=Ab.pedantic,e.inline=tg.pedantic):this.options.gfm&&(e.block=Ab.gfm,this.options.breaks?e.inline=tg.breaks:e.inline=tg.gfm),this.tokenizer.rules=e}static get rules(){return{block:Ab,inline:tg}}static lex(t,e){return new r(e).lex(t)}static lexInline(t,e){return new r(e).inlineTokens(t)}lex(t){t=t.replace(/\r\n|\r/g,`
`),this.blockTokens(t,this.tokens);for(let e=0;e<this.inlineQueue.length;e++){let n=this.inlineQueue[e];this.inlineTokens(n.src,n.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t,e=[],n=!1){this.options.pedantic?t=t.replace(/\t/g,"    ").replace(/^ +$/gm,""):t=t.replace(/^( *)(\t+)/gm,(a,l,d)=>l+"    ".repeat(d.length));let o,i,s;for(;t;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some(a=>(o=a.call({lexer:this},t,e))?(t=t.substring(o.raw.length),e.push(o),!0):!1))){if(o=this.tokenizer.space(t)){t=t.substring(o.raw.length),o.raw.length===1&&e.length>0?e[e.length-1].raw+=`
`:e.push(o);continue}if(o=this.tokenizer.code(t)){t=t.substring(o.raw.length),i=e[e.length-1],i&&(i.type==="paragraph"||i.type==="text")?(i.raw+=`
`+o.raw,i.text+=`
`+o.text,this.inlineQueue[this.inlineQueue.length-1].src=i.text):e.push(o);continue}if(o=this.tokenizer.fences(t)){t=t.substring(o.raw.length),e.push(o);continue}if(o=this.tokenizer.heading(t)){t=t.substring(o.raw.length),e.push(o);continue}if(o=this.tokenizer.hr(t)){t=t.substring(o.raw.length),e.push(o);continue}if(o=this.tokenizer.blockquote(t)){t=t.substring(o.raw.length),e.push(o);continue}if(o=this.tokenizer.list(t)){t=t.substring(o.raw.length),e.push(o);continue}if(o=this.tokenizer.html(t)){t=t.substring(o.raw.length),e.push(o);continue}if(o=this.tokenizer.def(t)){t=t.substring(o.raw.length),i=e[e.length-1],i&&(i.type==="paragraph"||i.type==="text")?(i.raw+=`
`+o.raw,i.text+=`
`+o.raw,this.inlineQueue[this.inlineQueue.length-1].src=i.text):this.tokens.links[o.tag]||(this.tokens.links[o.tag]={href:o.href,title:o.title});continue}if(o=this.tokenizer.table(t)){t=t.substring(o.raw.length),e.push(o);continue}if(o=this.tokenizer.lheading(t)){t=t.substring(o.raw.length),e.push(o);continue}if(s=t,this.options.extensions&&this.options.extensions.startBlock){let a=1/0,l=t.slice(1),d;this.options.extensions.startBlock.forEach(c=>{d=c.call({lexer:this},l),typeof d=="number"&&d>=0&&(a=Math.min(a,d))}),a<1/0&&a>=0&&(s=t.substring(0,a+1))}if(this.state.top&&(o=this.tokenizer.paragraph(s))){i=e[e.length-1],n&&i?.type==="paragraph"?(i.raw+=`
`+o.raw,i.text+=`
`+o.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=i.text):e.push(o),n=s.length!==t.length,t=t.substring(o.raw.length);continue}if(o=this.tokenizer.text(t)){t=t.substring(o.raw.length),i=e[e.length-1],i&&i.type==="text"?(i.raw+=`
`+o.raw,i.text+=`
`+o.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=i.text):e.push(o);continue}if(t){let a="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(a);break}else throw new Error(a)}}return this.state.top=!0,e}inline(t,e=[]){return this.inlineQueue.push({src:t,tokens:e}),e}inlineTokens(t,e=[]){let n,o,i,s=t,a,l,d;if(this.tokens.links){let c=Object.keys(this.tokens.links);if(c.length>0)for(;(a=this.tokenizer.rules.inline.reflinkSearch.exec(s))!=null;)c.includes(a[0].slice(a[0].lastIndexOf("[")+1,-1))&&(s=s.slice(0,a.index)+"["+"a".repeat(a[0].length-2)+"]"+s.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(a=this.tokenizer.rules.inline.blockSkip.exec(s))!=null;)s=s.slice(0,a.index)+"["+"a".repeat(a[0].length-2)+"]"+s.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;(a=this.tokenizer.rules.inline.anyPunctuation.exec(s))!=null;)s=s.slice(0,a.index)+"++"+s.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;t;)if(l||(d=""),l=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some(c=>(n=c.call({lexer:this},t,e))?(t=t.substring(n.raw.length),e.push(n),!0):!1))){if(n=this.tokenizer.escape(t)){t=t.substring(n.raw.length),e.push(n);continue}if(n=this.tokenizer.tag(t)){t=t.substring(n.raw.length),o=e[e.length-1],o&&n.type==="text"&&o.type==="text"?(o.raw+=n.raw,o.text+=n.text):e.push(n);continue}if(n=this.tokenizer.link(t)){t=t.substring(n.raw.length),e.push(n);continue}if(n=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(n.raw.length),o=e[e.length-1],o&&n.type==="text"&&o.type==="text"?(o.raw+=n.raw,o.text+=n.text):e.push(n);continue}if(n=this.tokenizer.emStrong(t,s,d)){t=t.substring(n.raw.length),e.push(n);continue}if(n=this.tokenizer.codespan(t)){t=t.substring(n.raw.length),e.push(n);continue}if(n=this.tokenizer.br(t)){t=t.substring(n.raw.length),e.push(n);continue}if(n=this.tokenizer.del(t)){t=t.substring(n.raw.length),e.push(n);continue}if(n=this.tokenizer.autolink(t)){t=t.substring(n.raw.length),e.push(n);continue}if(!this.state.inLink&&(n=this.tokenizer.url(t))){t=t.substring(n.raw.length),e.push(n);continue}if(i=t,this.options.extensions&&this.options.extensions.startInline){let c=1/0,u=t.slice(1),f;this.options.extensions.startInline.forEach(g=>{f=g.call({lexer:this},u),typeof f=="number"&&f>=0&&(c=Math.min(c,f))}),c<1/0&&c>=0&&(i=t.substring(0,c+1))}if(n=this.tokenizer.inlineText(i)){t=t.substring(n.raw.length),n.raw.slice(-1)!=="_"&&(d=n.raw.slice(-1)),l=!0,o=e[e.length-1],o&&o.type==="text"?(o.raw+=n.raw,o.text+=n.text):e.push(n);continue}if(t){let c="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(c);break}else throw new Error(c)}}return e}},pu=class{options;parser;constructor(t){this.options=t||bd}space(t){return""}code({text:t,lang:e,escaped:n}){let o=(e||"").match(/^\S*/)?.[0],i=t.replace(/\n$/,"")+`
`;return o?'<pre><code class="language-'+er(o)+'">'+(n?i:er(i,!0))+`</code></pre>
`:"<pre><code>"+(n?i:er(i,!0))+`</code></pre>
`}blockquote({tokens:t}){return`<blockquote>
${this.parser.parse(t)}</blockquote>
`}html({text:t}){return t}heading({tokens:t,depth:e}){return`<h${e}>${this.parser.parseInline(t)}</h${e}>
`}hr(t){return`<hr>
`}list(t){let e=t.ordered,n=t.start,o="";for(let a=0;a<t.items.length;a++){let l=t.items[a];o+=this.listitem(l)}let i=e?"ol":"ul",s=e&&n!==1?' start="'+n+'"':"";return"<"+i+s+`>
`+o+"</"+i+`>
`}listitem(t){let e="";if(t.task){let n=this.checkbox({checked:!!t.checked});t.loose?t.tokens.length>0&&t.tokens[0].type==="paragraph"?(t.tokens[0].text=n+" "+t.tokens[0].text,t.tokens[0].tokens&&t.tokens[0].tokens.length>0&&t.tokens[0].tokens[0].type==="text"&&(t.tokens[0].tokens[0].text=n+" "+t.tokens[0].tokens[0].text)):t.tokens.unshift({type:"text",raw:n+" ",text:n+" "}):e+=n+" "}return e+=this.parser.parse(t.tokens,!!t.loose),`<li>${e}</li>
`}checkbox({checked:t}){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:t}){return`<p>${this.parser.parseInline(t)}</p>
`}table(t){let e="",n="";for(let i=0;i<t.header.length;i++)n+=this.tablecell(t.header[i]);e+=this.tablerow({text:n});let o="";for(let i=0;i<t.rows.length;i++){let s=t.rows[i];n="";for(let a=0;a<s.length;a++)n+=this.tablecell(s[a]);o+=this.tablerow({text:n})}return o&&(o=`<tbody>${o}</tbody>`),`<table>
<thead>
`+e+`</thead>
`+o+`</table>
`}tablerow({text:t}){return`<tr>
${t}</tr>
`}tablecell(t){let e=this.parser.parseInline(t.tokens),n=t.header?"th":"td";return(t.align?`<${n} align="${t.align}">`:`<${n}>`)+e+`</${n}>
`}strong({tokens:t}){return`<strong>${this.parser.parseInline(t)}</strong>`}em({tokens:t}){return`<em>${this.parser.parseInline(t)}</em>`}codespan({text:t}){return`<code>${t}</code>`}br(t){return"<br>"}del({tokens:t}){return`<del>${this.parser.parseInline(t)}</del>`}link({href:t,title:e,tokens:n}){let o=this.parser.parseInline(n),i=_F(t);if(i===null)return o;t=i;let s='<a href="'+t+'"';return e&&(s+=' title="'+e+'"'),s+=">"+o+"</a>",s}image({href:t,title:e,text:n}){let o=_F(t);if(o===null)return n;t=o;let i=`<img src="${t}" alt="${n}"`;return e&&(i+=` title="${e}"`),i+=">",i}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):t.text}},og=class{strong({text:t}){return t}em({text:t}){return t}codespan({text:t}){return t}del({text:t}){return t}html({text:t}){return t}text({text:t}){return t}link({text:t}){return""+t}image({text:t}){return""+t}br(){return""}},xs=class r{options;renderer;textRenderer;constructor(t){this.options=t||bd,this.options.renderer=this.options.renderer||new pu,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new og}static parse(t,e){return new r(e).parse(t)}static parseInline(t,e){return new r(e).parseInline(t)}parse(t,e=!0){let n="";for(let o=0;o<t.length;o++){let i=t[o];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[i.type]){let a=i,l=this.options.extensions.renderers[a.type].call({parser:this},a);if(l!==!1||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(a.type)){n+=l||"";continue}}let s=i;switch(s.type){case"space":{n+=this.renderer.space(s);continue}case"hr":{n+=this.renderer.hr(s);continue}case"heading":{n+=this.renderer.heading(s);continue}case"code":{n+=this.renderer.code(s);continue}case"table":{n+=this.renderer.table(s);continue}case"blockquote":{n+=this.renderer.blockquote(s);continue}case"list":{n+=this.renderer.list(s);continue}case"html":{n+=this.renderer.html(s);continue}case"paragraph":{n+=this.renderer.paragraph(s);continue}case"text":{let a=s,l=this.renderer.text(a);for(;o+1<t.length&&t[o+1].type==="text";)a=t[++o],l+=`
`+this.renderer.text(a);e?n+=this.renderer.paragraph({type:"paragraph",raw:l,text:l,tokens:[{type:"text",raw:l,text:l}]}):n+=l;continue}default:{let a='Token with "'+s.type+'" type was not found.';if(this.options.silent)return console.error(a),"";throw new Error(a)}}}return n}parseInline(t,e){e=e||this.renderer;let n="";for(let o=0;o<t.length;o++){let i=t[o];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[i.type]){let a=this.options.extensions.renderers[i.type].call({parser:this},i);if(a!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(i.type)){n+=a||"";continue}}let s=i;switch(s.type){case"escape":{n+=e.text(s);break}case"html":{n+=e.html(s);break}case"link":{n+=e.link(s);break}case"image":{n+=e.image(s);break}case"strong":{n+=e.strong(s);break}case"em":{n+=e.em(s);break}case"codespan":{n+=e.codespan(s);break}case"br":{n+=e.br(s);break}case"del":{n+=e.del(s);break}case"text":{n+=e.text(s);break}default:{let a='Token with "'+s.type+'" type was not found.';if(this.options.silent)return console.error(a),"";throw new Error(a)}}}return n}},cu=class{options;constructor(t){this.options=t||bd}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}},PP=class{defaults=DP();options=this.setOptions;parse=this.parseMarkdown(Ss.lex,xs.parse);parseInline=this.parseMarkdown(Ss.lexInline,xs.parseInline);Parser=xs;Renderer=pu;TextRenderer=og;Lexer=Ss;Tokenizer=uu;Hooks=cu;constructor(...t){this.use(...t)}walkTokens(t,e){let n=[];for(let o of t)switch(n=n.concat(e.call(this,o)),o.type){case"table":{let i=o;for(let s of i.header)n=n.concat(this.walkTokens(s.tokens,e));for(let s of i.rows)for(let a of s)n=n.concat(this.walkTokens(a.tokens,e));break}case"list":{let i=o;n=n.concat(this.walkTokens(i.items,e));break}default:{let i=o;this.defaults.extensions?.childTokens?.[i.type]?this.defaults.extensions.childTokens[i.type].forEach(s=>{let a=i[s].flat(1/0);n=n.concat(this.walkTokens(a,e))}):i.tokens&&(n=n.concat(this.walkTokens(i.tokens,e)))}}return n}use(...t){let e=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(n=>{let o={...n};if(o.async=this.defaults.async||o.async||!1,n.extensions&&(n.extensions.forEach(i=>{if(!i.name)throw new Error("extension name required");if("renderer"in i){let s=e.renderers[i.name];s?e.renderers[i.name]=function(...a){let l=i.renderer.apply(this,a);return l===!1&&(l=s.apply(this,a)),l}:e.renderers[i.name]=i.renderer}if("tokenizer"in i){if(!i.level||i.level!=="block"&&i.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let s=e[i.level];s?s.unshift(i.tokenizer):e[i.level]=[i.tokenizer],i.start&&(i.level==="block"?e.startBlock?e.startBlock.push(i.start):e.startBlock=[i.start]:i.level==="inline"&&(e.startInline?e.startInline.push(i.start):e.startInline=[i.start]))}"childTokens"in i&&i.childTokens&&(e.childTokens[i.name]=i.childTokens)}),o.extensions=e),n.renderer){let i=this.defaults.renderer||new pu(this.defaults);for(let s in n.renderer){if(!(s in i))throw new Error(`renderer '${s}' does not exist`);if(["options","parser"].includes(s))continue;let a=s,l=n.renderer[a],d=i[a];i[a]=(...c)=>{let u=l.apply(i,c);return u===!1&&(u=d.apply(i,c)),u||""}}o.renderer=i}if(n.tokenizer){let i=this.defaults.tokenizer||new uu(this.defaults);for(let s in n.tokenizer){if(!(s in i))throw new Error(`tokenizer '${s}' does not exist`);if(["options","rules","lexer"].includes(s))continue;let a=s,l=n.tokenizer[a],d=i[a];i[a]=(...c)=>{let u=l.apply(i,c);return u===!1&&(u=d.apply(i,c)),u}}o.tokenizer=i}if(n.hooks){let i=this.defaults.hooks||new cu;for(let s in n.hooks){if(!(s in i))throw new Error(`hook '${s}' does not exist`);if(s==="options")continue;let a=s,l=n.hooks[a],d=i[a];cu.passThroughHooks.has(s)?i[a]=c=>{if(this.defaults.async)return Promise.resolve(l.call(i,c)).then(f=>d.call(i,f));let u=l.call(i,c);return d.call(i,u)}:i[a]=(...c)=>{let u=l.apply(i,c);return u===!1&&(u=d.apply(i,c)),u}}o.hooks=i}if(n.walkTokens){let i=this.defaults.walkTokens,s=n.walkTokens;o.walkTokens=function(a){let l=[];return l.push(s.call(this,a)),i&&(l=l.concat(i.call(this,a))),l}}this.defaults={...this.defaults,...o}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,e){return Ss.lex(t,e??this.defaults)}parser(t,e){return xs.parse(t,e??this.defaults)}parseMarkdown(t,e){return(o,i)=>{let s={...i},a={...this.defaults,...s},l=this.onError(!!a.silent,!!a.async);if(this.defaults.async===!0&&s.async===!1)return l(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 o>"u"||o===null)return l(new Error("marked(): input parameter is undefined or null"));if(typeof o!="string")return l(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(o)+", string expected"));if(a.hooks&&(a.hooks.options=a),a.async)return Promise.resolve(a.hooks?a.hooks.preprocess(o):o).then(d=>t(d,a)).then(d=>a.hooks?a.hooks.processAllTokens(d):d).then(d=>a.walkTokens?Promise.all(this.walkTokens(d,a.walkTokens)).then(()=>d):d).then(d=>e(d,a)).then(d=>a.hooks?a.hooks.postprocess(d):d).catch(l);try{a.hooks&&(o=a.hooks.preprocess(o));let d=t(o,a);a.hooks&&(d=a.hooks.processAllTokens(d)),a.walkTokens&&this.walkTokens(d,a.walkTokens);let c=e(d,a);return a.hooks&&(c=a.hooks.postprocess(c)),c}catch(d){return l(d)}}}onError(t,e){return n=>{if(n.message+=`
Please report this to https://github.com/markedjs/marked.`,t){let o="<p>An error occurred:</p><pre>"+er(n.message+"",!0)+"</pre>";return e?Promise.resolve(o):o}if(e)return Promise.reject(n);throw n}}},vd=new PP;function Ht(r,t){return vd.parse(r,t)}Ht.options=Ht.setOptions=function(r){return vd.setOptions(r),Ht.defaults=vd.defaults,RF(Ht.defaults),Ht};Ht.getDefaults=DP;Ht.defaults=bd;Ht.use=function(...r){return vd.use(...r),Ht.defaults=vd.defaults,RF(Ht.defaults),Ht};Ht.walkTokens=function(r,t){return vd.walkTokens(r,t)};Ht.parseInline=vd.parseInline;Ht.Parser=xs;Ht.parser=xs.parse;Ht.Renderer=pu;Ht.TextRenderer=og;Ht.Lexer=Ss;Ht.lexer=Ss.lex;Ht.Tokenizer=uu;Ht.Hooks=cu;Ht.parse=Ht;var zZ=Ht.options,qZ=Ht.setOptions,KZ=Ht.use,JZ=Ht.walkTokens,jZ=Ht.parseInline;var QZ=xs.parse,XZ=Ss.lex;function BF(r){return JSON.stringify(r,$7)}function Mb(r){let t=JSON.parse(r);return t=nn(t),t}function $7(r,t){return t instanceof RegExp?{$mid:2,source:t.source,flags:t.flags}:t}function nn(r,t=0){if(!r||t>200)return r;if(typeof r=="object"){switch(r.$mid){case 1:return E.revive(r);case 2:return new RegExp(r.source,r.flags);case 17:return new Date(r.source)}if(r instanceof ce||r instanceof Uint8Array)return r;if(Array.isArray(r))for(let e=0;e<r.length;++e)r[e]=nn(r[e],t+1);else for(let e in r)Object.hasOwnProperty.call(r,e)&&(r[e]=nn(r[e],t+1))}return r}var Io=Object.freeze({text:"text/plain",binary:"application/octet-stream",unknown:"application/unknown",markdown:"text/markdown",latex:"text/latex",uriList:"text/uri-list",html:"text/html"});var G7=/^(.+)\/(.+?)(;.+)?$/;function LP(r,t){let e=G7.exec(r);return e?`${e[1].toLowerCase()}/${e[2].toLowerCase()}${e[3]??""}`:t?void 0:r}function Nb(r){return["application/vnd.code.notebook.stdout","application/vnd.code.notebook.stderr"].includes(r)}var yo=Symbol("unset"),Ub=class{constructor(){this.root=new sg;this._size=0}get size(){return this._size}get nodes(){return this.root.children?.values()||Lt.empty()}get entries(){return this.root.children?.entries()||Lt.empty()}insert(t,e,n){this.opNode(t,o=>o._value=e,n)}mutate(t,e){this.opNode(t,n=>n._value=e(n._value===yo?void 0:n._value))}mutatePath(t,e){this.opNode(t,()=>{},n=>e(n))}delete(t){let e=this.getPathToKey(t);if(!e)return;let n=e.length-1,o=e[n].node._value;if(o!==yo){for(this._size--,e[n].node._value=yo;n>0;n--){let{node:i,part:s}=e[n];if(i.children?.size||i._value!==yo)break;e[n-1].node.children.delete(s)}return o}}*deleteRecursive(t){let e=this.getPathToKey(t);if(!e)return;let n=e[e.length-1].node;for(let o=e.length-1;o>0;o--){let i=e[o-1];if(i.node.children.delete(e[o].part),i.node.children.size>0||i.node._value!==yo)break}for(let o of VF(n))o._value!==yo&&(this._size--,yield o._value);n===this.root&&(this.root._value=yo,this.root.children=void 0)}find(t){let e=this.root;for(let n of t){let o=e.children?.get(n);if(!o)return;e=o}return e._value===yo?void 0:e._value}hasKeyOrParent(t){let e=this.root;for(let n of t){let o=e.children?.get(n);if(!o)return!1;if(o._value!==yo)return!0;e=o}return!1}hasKeyOrChildren(t){let e=this.root;for(let n of t){let o=e.children?.get(n);if(!o)return!1;e=o}return!0}hasKey(t){let e=this.root;for(let n of t){let o=e.children?.get(n);if(!o)return!1;e=o}return e._value!==yo}getPathToKey(t){let e=[{part:"",node:this.root}],n=0;for(let o of t){let i=e[n].node.children?.get(o);if(!i)return;e.push({part:o,node:i}),n++}return e}opNode(t,e,n){let o=this.root;for(let a of t){if(o.children)if(o.children.has(a))o=o.children.get(a);else{let l=new sg;o.children.set(a,l),o=l}else{let l=new sg;o.children=new Map([[a,l]]),o=l}n?.(o)}let i=o._value===yo?0:1;e(o);let s=o._value===yo?0:1;this._size+=s-i}*values(){for(let{_value:t}of VF(this.root))t!==yo&&(yield t)}};function*VF(r){let t=[r];for(;t.length>0;){let e=t.pop();if(yield e,e.children)for(let n of e.children.values())t.push(n)}}var sg=class{constructor(){this._value=yo}get value(){return this._value===yo?void 0:this._value}set value(t){this._value=t===void 0?yo:t}};var WF=new class{constructor(){this._zoomLevel=0;this._onDidChangeZoomLevel=new D;this.onDidChangeZoomLevel=this._onDidChangeZoomLevel.event}getZoomLevel(){return this._zoomLevel}setZoomLevel(r){r=Math.min(Math.max(-5,r),20),this._zoomLevel!==r&&(this._zoomLevel=r,this._onDidChangeZoomLevel.fire(this._zoomLevel))}};var z7=hn?1.5:1.35,MP=8,NP=class r{constructor(t){this._bareFontInfoBrand=void 0;this.pixelRatio=t.pixelRatio,this.fontFamily=String(t.fontFamily),this.fontWeight=String(t.fontWeight),this.fontSize=t.fontSize,this.fontFeatureSettings=t.fontFeatureSettings,this.fontVariationSettings=t.fontVariationSettings,this.lineHeight=t.lineHeight|0,this.letterSpacing=t.letterSpacing}static _create(t,e,n,o,i,s,a,l,d){s===0?s=z7*n:s<MP&&(s=s*n),s=Math.round(s),s<MP&&(s=MP);let c=1+(d?0:WF.getZoomLevel()*.1);return n*=c,s*=c,i===FP&&(e==="normal"||e==="bold"?i=UP:(i=`'wght' ${parseInt(e,10)}`,e="normal")),new r({pixelRatio:l,fontFamily:t,fontWeight:e,fontSize:n,fontFeatureSettings:o,fontVariationSettings:i,lineHeight:s,letterSpacing:a})}getId(){return`${this.pixelRatio}-${this.fontFamily}-${this.fontWeight}-${this.fontSize}-${this.fontFeatureSettings}-${this.fontVariationSettings}-${this.lineHeight}-${this.letterSpacing}`}getMassagedFontFamily(){let t=Kr.fontFamily,e=r._wrapInQuotes(this.fontFamily);return t&&this.fontFamily!==t?`${e}, ${t}`:e}static _wrapInQuotes(t){return/[,"']/.test(t)?t:/[+ ]/.test(t)?`"${t}"`:t}},q7=2,Fb=class extends NP{constructor(e,n){super(e);this._editorStylingBrand=void 0;this.version=q7;this.isTrusted=n,this.isMonospace=e.isMonospace,this.typicalHalfwidthCharacterWidth=e.typicalHalfwidthCharacterWidth,this.typicalFullwidthCharacterWidth=e.typicalFullwidthCharacterWidth,this.canUseHalfwidthRightwardsArrow=e.canUseHalfwidthRightwardsArrow,this.spaceWidth=e.spaceWidth,this.middotWidth=e.middotWidth,this.wsmiddotWidth=e.wsmiddotWidth,this.maxDigitWidth=e.maxDigitWidth}equals(e){return this.fontFamily===e.fontFamily&&this.fontWeight===e.fontWeight&&this.fontSize===e.fontSize&&this.fontFeatureSettings===e.fontFeatureSettings&&this.fontVariationSettings===e.fontVariationSettings&&this.lineHeight===e.lineHeight&&this.letterSpacing===e.letterSpacing&&this.typicalHalfwidthCharacterWidth===e.typicalHalfwidthCharacterWidth&&this.typicalFullwidthCharacterWidth===e.typicalFullwidthCharacterWidth&&this.canUseHalfwidthRightwardsArrow===e.canUseHalfwidthRightwardsArrow&&this.spaceWidth===e.spaceWidth&&this.middotWidth===e.middotWidth&&this.wsmiddotWidth===e.wsmiddotWidth&&this.maxDigitWidth===e.maxDigitWidth}},UP="normal",FP="translate",K7="Consolas, 'Courier New', monospace",J7="Menlo, Monaco, 'Courier New', monospace",j7="'Droid Sans Mono', monospace",Kr={fontFamily:hn?J7:Rt?K7:j7,fontWeight:"normal",fontSize:hn?12:14,lineHeight:0,letterSpacing:0};var HP={tabSize:4,indentSize:4,insertSpaces:!0,detectIndentation:!0,trimAutoWhitespace:!0,largeFileOptimizations:!0,bracketPairColorizationOptions:{enabled:!0,independentColorPoolPerBracketType:!1}};var BP="`~!@#$%^&*()-=+[{]}\\|;:'\",.<>/?";function Q7(r=""){let t="(-?\\d*\\.\\d\\w*)|([^";for(let e of BP)r.indexOf(e)>=0||(t+="\\"+e);return t+="\\s]+)",new RegExp(t,"g")}var X7=Q7();function VP(r){let t=X7;if(r&&r instanceof RegExp)if(r.global)t=r;else{let e="g";r.ignoreCase&&(e+="i"),r.multiline&&(e+="m"),r.unicode&&(e+="u"),t=new RegExp(r.source,e)}return t.lastIndex=0,t}var $F=new co;$F.unshift({maxLen:1e3,windowSize:15,timeBudget:150});function WP(r,t,e,n,o){if(t=VP(t),o||(o=Lt.first($F)),e.length>o.maxLen){let d=r-o.maxLen/2;return d<0?d=0:n+=d,e=e.substring(d,r+o.maxLen/2),WP(r,t,e,n,o)}let i=Date.now(),s=r-1-n,a=-1,l=null;for(let d=1;!(Date.now()-i>=o.timeBudget);d++){let c=s-o.windowSize*d;t.lastIndex=Math.max(0,c);let u=Y7(t,e,s,a);if(!u&&l||(l=u,c<=0))break;a=c}if(l){let d={word:l[0],startColumn:n+1+l.index,endColumn:n+1+l.index+l[0].length};return t.lastIndex=0,d}return null}function Y7(r,t,e,n){let o;for(;o=r.exec(t);){let i=o.index||0;if(i<=e&&r.lastIndex>=e)return o;if(n>0&&i>n)return null}return null}var GF=N("accessibilityService");var Tee=new w("accessibilityModeEnabled",!1);var Z7=8;var $P=class{constructor(){this.stableMinimapLayoutInput=null,this.stableFitMaxMinimapScale=0,this.stableFitRemainingWidth=0}},wt=class{constructor(t,e,n,o){this.id=t,this.name=e,this.defaultValue=n,this.schema=o}applyUpdate(t,e){return Hb(t,e)}compute(t,e,n){return n}},mu=class{constructor(t,e){this.newValue=t;this.didChange=e}};function Hb(r,t){if(typeof r!="object"||typeof t!="object"||!r||!t)return new mu(t,r!==t);if(Array.isArray(r)||Array.isArray(t)){let n=Array.isArray(r)&&Array.isArray(t)&&Zt(r,t);return new mu(t,!n)}let e=!1;for(let n in t)if(t.hasOwnProperty(n)){let o=Hb(r[n],t[n]);o.didChange&&(r[n]=o.newValue,e=!0)}return new mu(r,e)}var wi=class{constructor(t,e){this.schema=void 0;this.id=t,this.name="_never_",this.defaultValue=e}applyUpdate(t,e){return Hb(t,e)}validate(t){return this.defaultValue}},La=class{constructor(t,e,n,o){this.id=t,this.name=e,this.defaultValue=n,this.schema=o}applyUpdate(t,e){return Hb(t,e)}compute(t,e,n){return n}};function ve(r,t){return typeof r>"u"?t:r==="false"?!1:!!r}var Pe=class extends La{constructor(t,e,n,o=void 0){typeof o<"u"&&(o.type="boolean",o.default=n),super(t,e,n,o)}validate(t){return ve(t,this.defaultValue)}};function e6(r,t,e,n){if(typeof r=="string"&&(r=parseInt(r,10)),typeof r!="number"||isNaN(r))return t;let o=r;return o=Math.max(e,o),o=Math.min(n,o),o|0}var lt=class r extends La{static clampedInt(t,e,n,o){return e6(t,e,n,o)}constructor(t,e,n,o,i,s=void 0){typeof s<"u"&&(s.type="integer",s.default=n,s.minimum=o,s.maximum=i),super(t,e,n,s),this.minimum=o,this.maximum=i}validate(t){return r.clampedInt(t,this.defaultValue,this.minimum,this.maximum)}};var Bo=class r extends La{static clamp(t,e,n){return t<e?e:t>n?n:t}static float(t,e){return typeof t=="string"&&(t=parseFloat(t)),typeof t!="number"||isNaN(t)?e:t}constructor(t,e,n,o,i,s,a){typeof i<"u"&&(i.type="number",i.default=n,i.minimum=s,i.maximum=a),super(t,e,n,i),this.validationFn=o,this.minimum=s,this.maximum=a}validate(t){return this.validationFn(r.float(t,this.defaultValue))}},Zn=class r extends La{static string(t,e){return typeof t!="string"?e:t}constructor(t,e,n,o=void 0){typeof o<"u"&&(o.type="string",o.default=n),super(t,e,n,o)}validate(t){return r.string(t,this.defaultValue)}};function Dt(r,t,e,n){return typeof r!="string"?t:n&&r in n?n[r]:e.indexOf(r)===-1?t:r}var Pt=class extends La{constructor(t,e,n,o,i=void 0){typeof i<"u"&&(i.type="string",i.enum=o.slice(0),i.default=n),super(t,e,n,i),this._allowedValues=o}validate(t){return Dt(t,this.defaultValue,this._allowedValues)}},yd=class extends wt{constructor(t,e,n,o,i,s,a=void 0){typeof a<"u"&&(a.type="string",a.enum=i,a.default=o),super(t,e,n,a),this._allowedValues=i,this._convert=s}validate(t){return typeof t!="string"?this.defaultValue:this._allowedValues.indexOf(t)===-1?this.defaultValue:this._convert(t)}};function t6(r){switch(r){case"none":return 0;case"keep":return 1;case"brackets":return 2;case"advanced":return 3;case"full":return 4}}var GP=class extends wt{constructor(){super(2,"accessibilitySupport",0,{type:"string",enum:["auto","on","off"],enumDescriptions:[p(318,null),p(320,null),p(319,null)],default:"auto",tags:["accessibility"],description:p(317,null)})}validate(t){switch(t){case"auto":return 0;case"off":return 1;case"on":return 2}return this.defaultValue}compute(t,e,n){return n===0?t.accessibilitySupport:n}},zP=class extends wt{constructor(){let t={insertSpace:!0,ignoreEmptyLines:!0};super(29,"comments",t,{"editor.comments.insertSpace":{type:"boolean",default:t.insertSpace,description:p(348,null)},"editor.comments.ignoreEmptyLines":{type:"boolean",default:t.ignoreEmptyLines,description:p(347,null)}})}validate(t){if(!t||typeof t!="object")return this.defaultValue;let e=t;return{insertSpace:ve(e.insertSpace,this.defaultValue.insertSpace),ignoreEmptyLines:ve(e.ignoreEmptyLines,this.defaultValue.ignoreEmptyLines)}}};function n6(r){switch(r){case"blink":return 1;case"smooth":return 2;case"phase":return 3;case"expand":return 4;case"solid":return 5}}var OD=(s=>(s[s.Line=1]="Line",s[s.Block=2]="Block",s[s.Underline=3]="Underline",s[s.LineThin=4]="LineThin",s[s.BlockOutline=5]="BlockOutline",s[s.UnderlineThin=6]="UnderlineThin",s))(OD||{});function zF(r){switch(r){case"line":return 1;case"block":return 2;case"underline":return 3;case"line-thin":return 4;case"block-outline":return 5;case"underline-thin":return 6}}var qP=class extends wi{constructor(){super(162,"")}compute(t,e,n){let o=["monaco-editor"];return e.get(48)&&o.push(e.get(48)),t.extraEditorClassName&&o.push(t.extraEditorClassName),e.get(82)==="default"?o.push("mouse-default"):e.get(82)==="copy"&&o.push("mouse-copy"),e.get(127)&&o.push("showUnused"),e.get(157)&&o.push("showDeprecated"),o.join(" ")}},KP=class extends Pe{constructor(){super(45,"emptySelectionClipboard",!0,{description:p(471,null)})}compute(t,e,n){return n&&t.emptySelectionClipboard}},JP=class extends wt{constructor(){let t={cursorMoveOnType:!0,findOnType:!0,seedSearchStringFromSelection:"always",autoFindInSelection:"never",globalFindClipboard:!1,addExtraSpaceOnTop:!0,loop:!0,history:"workspace",replaceHistory:"workspace"};super(50,"find",t,{"editor.find.cursorMoveOnType":{type:"boolean",default:t.cursorMoveOnType,description:p(483,null)},"editor.find.seedSearchStringFromSelection":{type:"string",enum:["never","always","selection"],default:t.seedSearchStringFromSelection,enumDescriptions:[p(407,null),p(406,null),p(408,null)],description:p(489,null)},"editor.find.autoFindInSelection":{type:"string",enum:["never","always","multiline"],default:t.autoFindInSelection,enumDescriptions:[p(401,null),p(399,null),p(400,null)],description:p(482,null)},"editor.find.globalFindClipboard":{type:"boolean",default:t.globalFindClipboard,description:p(485,null),included:hn},"editor.find.addExtraSpaceOnTop":{type:"boolean",default:t.addExtraSpaceOnTop,description:p(481,null)},"editor.find.loop":{type:"boolean",default:t.loop,description:p(487,null)},"editor.find.history":{type:"string",enum:["never","workspace"],default:"workspace",enumDescriptions:[p(402,null),p(403,null)],description:p(486,null)},"editor.find.replaceHistory":{type:"string",enum:["never","workspace"],default:"workspace",enumDescriptions:[p(404,null),p(405,null)],description:p(488,null)},"editor.find.findOnType":{type:"boolean",default:t.findOnType,description:p(484,null)}})}validate(t){if(!t||typeof t!="object")return this.defaultValue;let e=t;return{cursorMoveOnType:ve(e.cursorMoveOnType,this.defaultValue.cursorMoveOnType),findOnType:ve(e.findOnType,this.defaultValue.findOnType),seedSearchStringFromSelection:typeof e.seedSearchStringFromSelection=="boolean"?e.seedSearchStringFromSelection?"always":"never":Dt(e.seedSearchStringFromSelection,this.defaultValue.seedSearchStringFromSelection,["never","always","selection"]),autoFindInSelection:typeof e.autoFindInSelection=="boolean"?e.autoFindInSelection?"always":"never":Dt(e.autoFindInSelection,this.defaultValue.autoFindInSelection,["never","always","multiline"]),globalFindClipboard:ve(e.globalFindClipboard,this.defaultValue.globalFindClipboard),addExtraSpaceOnTop:ve(e.addExtraSpaceOnTop,this.defaultValue.addExtraSpaceOnTop),loop:ve(e.loop,this.defaultValue.loop),history:Dt(e.history,this.defaultValue.history,["never","workspace"]),replaceHistory:Dt(e.replaceHistory,this.defaultValue.replaceHistory,["never","workspace"])}}},jP=class r extends wt{static{this.OFF='"liga" off, "calt" off'}static{this.ON='"liga" on, "calt" on'}constructor(){super(60,"fontLigatures",r.OFF,{anyOf:[{type:"boolean",description:p(499,null)},{type:"string",description:p(498,null)}],description:p(500,null),default:!1})}validate(t){return typeof t>"u"?this.defaultValue:typeof t=="string"?t==="false"||t.length===0?r.OFF:t==="true"?r.ON:t:t?r.ON:r.OFF}},QP=class r extends wt{static{this.OFF=UP}static{this.TRANSLATE=FP}constructor(){super(63,"fontVariations",r.OFF,{anyOf:[{type:"boolean",description:p(502,null)},{type:"string",description:p(503,null)}],description:p(504,null),default:!1})}validate(t){return typeof t>"u"?this.defaultValue:typeof t=="string"?t==="false"?r.OFF:t==="true"?r.TRANSLATE:t:t?r.TRANSLATE:r.OFF}compute(t,e,n){return t.fontInfo.fontVariationSettings}},XP=class extends wi{constructor(){super(59,new Fb({pixelRatio:0,fontFamily:"",fontWeight:"",fontSize:0,fontFeatureSettings:"",fontVariationSettings:"",lineHeight:0,letterSpacing:0,isMonospace:!1,typicalHalfwidthCharacterWidth:0,typicalFullwidthCharacterWidth:0,canUseHalfwidthRightwardsArrow:!1,spaceWidth:0,middotWidth:0,wsmiddotWidth:0,maxDigitWidth:0},!1))}compute(t,e,n){return t.fontInfo}},YP=class extends wi{constructor(){super(161,1)}compute(t,e,n){return t.inputMode==="overtype"?e.get(92):e.get(34)}},ZP=class extends wi{constructor(){super(170,!1)}compute(t,e){return t.editContextSupported&&e.get(44)}},eD=class extends wi{constructor(){super(172,!1)}compute(t,e){return t.accessibilitySupport===2?e.get(7):e.get(6)}},tD=class extends La{constructor(){super(61,"fontSize",Kr.fontSize,{type:"number",minimum:6,maximum:100,default:Kr.fontSize,description:p(501,null)})}validate(t){let e=Bo.float(t,this.defaultValue);return e===0?Kr.fontSize:Bo.clamp(e,6,100)}compute(t,e,n){return t.fontInfo.fontSize}},nD=class r extends wt{static{this.SUGGESTION_VALUES=["normal","bold","100","200","300","400","500","600","700","800","900"]}static{this.MINIMUM_VALUE=1}static{this.MAXIMUM_VALUE=1e3}constructor(){super(62,"fontWeight",Kr.fontWeight,{anyOf:[{type:"number",minimum:r.MINIMUM_VALUE,maximum:r.MAXIMUM_VALUE,errorMessage:p(506,null)},{type:"string",pattern:"^(normal|bold|1000|[1-9][0-9]{0,2})$"},{enum:r.SUGGESTION_VALUES}],default:Kr.fontWeight,description:p(505,null)})}validate(t){return t==="normal"||t==="bold"?t:String(lt.clampedInt(t,Kr.fontWeight,r.MINIMUM_VALUE,r.MAXIMUM_VALUE))}},oD=class extends wt{constructor(){let t={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:""},e={type:"string",enum:["peek","gotoAndPeek","goto"],default:t.multiple,enumDescriptions:[p(412,null),p(411,null),p(410,null)]},n=["","editor.action.referenceSearch.trigger","editor.action.goToReferences","editor.action.peekImplementation","editor.action.goToImplementation","editor.action.peekTypeDefinition","editor.action.goToTypeDefinition","editor.action.peekDeclaration","editor.action.revealDeclaration","editor.action.peekDefinition","editor.action.revealDefinitionAside","editor.action.revealDefinition"];super(67,"gotoLocation",t,{"editor.gotoLocation.multiple":{deprecationMessage:p(409,null)},"editor.gotoLocation.multipleDefinitions":{description:p(395,null),...e},"editor.gotoLocation.multipleTypeDefinitions":{description:p(398,null),...e},"editor.gotoLocation.multipleDeclarations":{description:p(394,null),...e},"editor.gotoLocation.multipleImplementations":{description:p(396,null),...e},"editor.gotoLocation.multipleReferences":{description:p(397,null),...e},"editor.gotoLocation.alternativeDefinitionCommand":{type:"string",default:t.alternativeDefinitionCommand,enum:n,description:p(325,null)},"editor.gotoLocation.alternativeTypeDefinitionCommand":{type:"string",default:t.alternativeTypeDefinitionCommand,enum:n,description:p(328,null)},"editor.gotoLocation.alternativeDeclarationCommand":{type:"string",default:t.alternativeDeclarationCommand,enum:n,description:p(324,null)},"editor.gotoLocation.alternativeImplementationCommand":{type:"string",default:t.alternativeImplementationCommand,enum:n,description:p(326,null)},"editor.gotoLocation.alternativeReferenceCommand":{type:"string",default:t.alternativeReferenceCommand,enum:n,description:p(327,null)}})}validate(t){if(!t||typeof t!="object")return this.defaultValue;let e=t;return{multiple:Dt(e.multiple,this.defaultValue.multiple,["peek","gotoAndPeek","goto"]),multipleDefinitions:Dt(e.multipleDefinitions,"peek",["peek","gotoAndPeek","goto"]),multipleTypeDefinitions:Dt(e.multipleTypeDefinitions,"peek",["peek","gotoAndPeek","goto"]),multipleDeclarations:Dt(e.multipleDeclarations,"peek",["peek","gotoAndPeek","goto"]),multipleImplementations:Dt(e.multipleImplementations,"peek",["peek","gotoAndPeek","goto"]),multipleReferences:Dt(e.multipleReferences,"peek",["peek","gotoAndPeek","goto"]),multipleTests:Dt(e.multipleTests,"peek",["peek","gotoAndPeek","goto"]),alternativeDefinitionCommand:Zn.string(e.alternativeDefinitionCommand,this.defaultValue.alternativeDefinitionCommand),alternativeTypeDefinitionCommand:Zn.string(e.alternativeTypeDefinitionCommand,this.defaultValue.alternativeTypeDefinitionCommand),alternativeDeclarationCommand:Zn.string(e.alternativeDeclarationCommand,this.defaultValue.alternativeDeclarationCommand),alternativeImplementationCommand:Zn.string(e.alternativeImplementationCommand,this.defaultValue.alternativeImplementationCommand),alternativeReferenceCommand:Zn.string(e.alternativeReferenceCommand,this.defaultValue.alternativeReferenceCommand),alternativeTestsCommand:Zn.string(e.alternativeTestsCommand,this.defaultValue.alternativeTestsCommand)}}},rD=class extends wt{constructor(){let t={enabled:"on",delay:300,hidingDelay:300,sticky:!0,above:!0};super(69,"hover",t,{"editor.hover.enabled":{type:"string",enum:["on","off","onKeyboardModifier"],default:t.enabled,markdownEnumDescriptions:[p(515,null),p(514,null),p(516,null,hn?"Command":"Control")],description:p(513,null)},"editor.hover.delay":{type:"number",default:t.delay,minimum:0,maximum:1e4,description:p(512,null)},"editor.hover.sticky":{type:"boolean",default:t.sticky,description:p(518,null)},"editor.hover.hidingDelay":{type:"integer",minimum:0,default:t.hidingDelay,markdownDescription:p(517,null)},"editor.hover.above":{type:"boolean",default:t.above,description:p(511,null)}})}validate(t){if(!t||typeof t!="object")return this.defaultValue;let e=t;return{enabled:Dt(e.enabled,this.defaultValue.enabled,["on","off","onKeyboardModifier"]),delay:lt.clampedInt(e.delay,this.defaultValue.delay,0,1e4),sticky:ve(e.sticky,this.defaultValue.sticky),hidingDelay:lt.clampedInt(e.hidingDelay,this.defaultValue.hidingDelay,0,6e5),above:ve(e.above,this.defaultValue.above)}}};var iD=class r extends wi{constructor(){super(165,{width:0,height:0,glyphMarginLeft:0,glyphMarginWidth:0,glyphMarginDecorationLaneCount:0,lineNumbersLeft:0,lineNumbersWidth:0,decorationsLeft:0,decorationsWidth:0,contentLeft:0,contentWidth:0,minimap:{renderMinimap:0,minimapLeft:0,minimapWidth:0,minimapHeightIsEditorHeight:!1,minimapIsSampling:!1,minimapScale:1,minimapLineHeight:1,minimapCanvasInnerWidth:0,minimapCanvasInnerHeight:0,minimapCanvasOuterWidth:0,minimapCanvasOuterHeight:0},viewportColumn:0,isWordWrapMinified:!1,isViewportWrapping:!1,wrappingColumn:-1,verticalScrollbarWidth:0,horizontalScrollbarHeight:0,overviewRuler:{top:0,width:0,height:0,right:0}})}compute(t,e,n){return r.computeLayout(e,{memory:t.memory,outerWidth:t.outerWidth,outerHeight:t.outerHeight,isDominatedByLongLines:t.isDominatedByLongLines,lineHeight:t.fontInfo.lineHeight,viewLineCount:t.viewLineCount,lineNumbersDigitCount:t.lineNumbersDigitCount,typicalHalfwidthCharacterWidth:t.fontInfo.typicalHalfwidthCharacterWidth,maxDigitWidth:t.fontInfo.maxDigitWidth,pixelRatio:t.pixelRatio,glyphMarginDecorationLaneCount:t.glyphMarginDecorationLaneCount})}static computeContainedMinimapLineCount(t){let e=t.height/t.lineHeight,n=Math.floor(t.paddingTop/t.lineHeight),o=Math.floor(t.paddingBottom/t.lineHeight);t.scrollBeyondLastLine&&(o=Math.max(o,e-1));let i=(n+t.viewLineCount+o)/(t.pixelRatio*t.height),s=Math.floor(t.viewLineCount/i);return{typicalViewportLineCount:e,extraLinesBeforeFirstLine:n,extraLinesBeyondLastLine:o,desiredRatio:i,minimapLineCount:s}}static _computeMinimapLayout(t,e){let n=t.outerWidth,o=t.outerHeight,i=t.pixelRatio;if(!t.minimap.enabled)return{renderMinimap:0,minimapLeft:0,minimapWidth:0,minimapHeightIsEditorHeight:!1,minimapIsSampling:!1,minimapScale:1,minimapLineHeight:1,minimapCanvasInnerWidth:0,minimapCanvasInnerHeight:Math.floor(i*o),minimapCanvasOuterWidth:0,minimapCanvasOuterHeight:o};let s=e.stableMinimapLayoutInput,a=s&&t.outerHeight===s.outerHeight&&t.lineHeight===s.lineHeight&&t.typicalHalfwidthCharacterWidth===s.typicalHalfwidthCharacterWidth&&t.pixelRatio===s.pixelRatio&&t.scrollBeyondLastLine===s.scrollBeyondLastLine&&t.paddingTop===s.paddingTop&&t.paddingBottom===s.paddingBottom&&t.minimap.enabled===s.minimap.enabled&&t.minimap.side===s.minimap.side&&t.minimap.size===s.minimap.size&&t.minimap.showSlider===s.minimap.showSlider&&t.minimap.renderCharacters===s.minimap.renderCharacters&&t.minimap.maxColumn===s.minimap.maxColumn&&t.minimap.scale===s.minimap.scale&&t.verticalScrollbarWidth===s.verticalScrollbarWidth&&t.isViewportWrapping===s.isViewportWrapping,l=t.lineHeight,d=t.typicalHalfwidthCharacterWidth,c=t.scrollBeyondLastLine,u=t.minimap.renderCharacters,f=i>=2?Math.round(t.minimap.scale*2):t.minimap.scale,g=t.minimap.maxColumn,I=t.minimap.size,h=t.minimap.side,C=t.verticalScrollbarWidth,_=t.viewLineCount,R=t.remainingWidth,O=t.isViewportWrapping,U=u?2:3,ie=Math.floor(i*o),Y=ie/i,Z=!1,ee=!1,oe=U*f,ke=f/i,B=1;if(I==="fill"||I==="fit"){let{typicalViewportLineCount:pe,extraLinesBeforeFirstLine:ge,extraLinesBeyondLastLine:Le,desiredRatio:Je,minimapLineCount:Ge}=r.computeContainedMinimapLineCount({viewLineCount:_,scrollBeyondLastLine:c,paddingTop:t.paddingTop,paddingBottom:t.paddingBottom,height:o,lineHeight:l,pixelRatio:i});if(_/Ge>1)Z=!0,ee=!0,f=1,oe=1,ke=f/i;else{let kt=!1,ot=f+1;if(I==="fit"){let rn=Math.ceil((ge+_+Le)*oe);O&&a&&R<=e.stableFitRemainingWidth?(kt=!0,ot=e.stableFitMaxMinimapScale):kt=rn>ie}if(I==="fill"||kt){Z=!0;let rn=f;oe=Math.min(l*i,Math.max(1,Math.floor(1/Je))),O&&a&&R<=e.stableFitRemainingWidth&&(ot=e.stableFitMaxMinimapScale),f=Math.min(ot,Math.max(1,Math.floor(oe/U))),f>rn&&(B=Math.min(2,f/rn)),ke=f/i/B,ie=Math.ceil(Math.max(pe,ge+_+Le)*oe),O?(e.stableMinimapLayoutInput=t,e.stableFitRemainingWidth=R,e.stableFitMaxMinimapScale=f):(e.stableMinimapLayoutInput=null,e.stableFitRemainingWidth=0)}}}let Xe=Math.floor(g*ke),it=Math.min(Xe,Math.max(0,Math.floor((R-C-2)*ke/(d+ke)))+Z7),Qe=Math.floor(i*it),q=Qe/i;Qe=Math.floor(Qe*B);let z=u?1:2,de=h==="left"?0:n-it-C;return{renderMinimap:z,minimapLeft:de,minimapWidth:it,minimapHeightIsEditorHeight:Z,minimapIsSampling:ee,minimapScale:f,minimapLineHeight:oe,minimapCanvasInnerWidth:Qe,minimapCanvasInnerHeight:ie,minimapCanvasOuterWidth:q,minimapCanvasOuterHeight:Y}}static computeLayout(t,e){let n=e.outerWidth|0,o=e.outerHeight|0,i=e.lineHeight|0,s=e.lineNumbersDigitCount|0,a=e.typicalHalfwidthCharacterWidth,l=e.maxDigitWidth,d=e.pixelRatio,c=e.viewLineCount,u=t.get(154),f=u==="inherit"?t.get(153):u,g=f==="inherit"?t.get(149):f,I=t.get(152),h=e.isDominatedByLongLines,C=t.get(66),_=t.get(76).renderType!==0,R=t.get(77),O=t.get(119),U=t.get(96),ie=t.get(81),Y=t.get(117),Z=Y.verticalScrollbarSize,ee=Y.verticalHasArrows,oe=Y.arrowSize,ke=Y.horizontalScrollbarSize,B=t.get(52),Xe=t.get(126)!=="never",it=t.get(74);B&&Xe&&(it+=16);let Qe=0;if(_){let so=Math.max(s,R);Qe=Math.round(so*l)}let q=0;C&&(q=i*e.glyphMarginDecorationLaneCount);let z=0,de=z+q,pe=de+Qe,ge=pe+it,Le=n-q-Qe-it,Je=!1,Ge=!1,ft=-1;t.get(2)===2&&f==="inherit"&&h?(Je=!0,Ge=!0):g==="on"||g==="bounded"?Ge=!0:g==="wordWrapColumn"&&(ft=I);let kt=r._computeMinimapLayout({outerWidth:n,outerHeight:o,lineHeight:i,typicalHalfwidthCharacterWidth:a,pixelRatio:d,scrollBeyondLastLine:O,paddingTop:U.top,paddingBottom:U.bottom,minimap:ie,verticalScrollbarWidth:Z,viewLineCount:c,remainingWidth:Le,isViewportWrapping:Ge},e.memory||new $P);kt.renderMinimap!==0&&kt.minimapLeft===0&&(z+=kt.minimapWidth,de+=kt.minimapWidth,pe+=kt.minimapWidth,ge+=kt.minimapWidth);let ot=Le-kt.minimapWidth,rn=Math.max(1,Math.floor((ot-Z-2)/a)),vn=ee?oe:0;return Ge&&(ft=Math.max(1,rn),g==="bounded"&&(ft=Math.min(ft,I))),{width:n,height:o,glyphMarginLeft:z,glyphMarginWidth:q,glyphMarginDecorationLaneCount:e.glyphMarginDecorationLaneCount,lineNumbersLeft:de,lineNumbersWidth:Qe,decorationsLeft:pe,decorationsWidth:it,contentLeft:ge,contentWidth:ot,minimap:kt,viewportColumn:rn,isWordWrapMinified:Je,isViewportWrapping:Ge,wrappingColumn:ft,verticalScrollbarWidth:Z,horizontalScrollbarHeight:ke,overviewRuler:{top:vn,width:Z,height:o-2*vn,right:0}}}},sD=class extends wt{constructor(){super(156,"wrappingStrategy","simple",{"editor.wrappingStrategy":{enumDescriptions:[p(731,null),p(730,null)],type:"string",enum:["simple","advanced"],default:"simple",description:p(729,null)}})}validate(t){return Dt(t,"simple",["simple","advanced"])}compute(t,e,n){return e.get(2)===2?"advanced":n}};var aD=class extends wt{constructor(){let t={enabled:"onCode"};super(73,"lightbulb",t,{"editor.lightbulb.enabled":{type:"string",enum:["off","onCode","on"],default:t.enabled,enumDescriptions:[p(433,null),p(435,null),p(434,null)],description:p(472,null)}})}validate(t){return!t||typeof t!="object"?this.defaultValue:{enabled:Dt(t.enabled,this.defaultValue.enabled,["off","onCode","on"])}}},lD=class extends wt{constructor(){let t={enabled:!0,maxLineCount:5,defaultModel:"outlineModel",scrollWithEditor:!0};super(131,"stickyScroll",t,{"editor.stickyScroll.enabled":{type:"boolean",default:t.enabled,description:p(437,null)},"editor.stickyScroll.maxLineCount":{type:"number",default:t.maxLineCount,minimum:1,maximum:20,description:p(438,null)},"editor.stickyScroll.defaultModel":{type:"string",enum:["outlineModel","foldingProviderModel","indentationModel"],default:t.defaultModel,description:p(436,null)},"editor.stickyScroll.scrollWithEditor":{type:"boolean",default:t.scrollWithEditor,description:p(439,null)}})}validate(t){if(!t||typeof t!="object")return this.defaultValue;let e=t;return{enabled:ve(e.enabled,this.defaultValue.enabled),maxLineCount:lt.clampedInt(e.maxLineCount,this.defaultValue.maxLineCount,1,20),defaultModel:Dt(e.defaultModel,this.defaultValue.defaultModel,["outlineModel","foldingProviderModel","indentationModel"]),scrollWithEditor:ve(e.scrollWithEditor,this.defaultValue.scrollWithEditor)}}},dD=class extends wt{constructor(){let t={enabled:"on",fontSize:0,fontFamily:"",padding:!1,maximumLength:43};super(159,"inlayHints",t,{"editor.inlayHints.enabled":{type:"string",default:t.enabled,description:p(520,null),enum:["on","onUnlessPressed","offUnlessPressed","off"],markdownEnumDescriptions:[p(429,null),p(430,null,hn?"Ctrl+Option":"Ctrl+Alt"),p(428,null,hn?"Ctrl+Option":"Ctrl+Alt"),p(427,null)]},"editor.inlayHints.fontSize":{type:"number",default:t.fontSize,markdownDescription:p(522,null,"`#editor.fontSize#`","`5`")},"editor.inlayHints.fontFamily":{type:"string",default:t.fontFamily,markdownDescription:p(521,null,"`#editor.fontFamily#`")},"editor.inlayHints.padding":{type:"boolean",default:t.padding,description:p(524,null)},"editor.inlayHints.maximumLength":{type:"number",default:t.maximumLength,markdownDescription:p(523,null)}})}validate(t){if(!t||typeof t!="object")return this.defaultValue;let e=t;return typeof e.enabled=="boolean"&&(e.enabled=e.enabled?"on":"off"),{enabled:Dt(e.enabled,this.defaultValue.enabled,["on","off","offUnlessPressed","onUnlessPressed"]),fontSize:lt.clampedInt(e.fontSize,this.defaultValue.fontSize,0,100),fontFamily:Zn.string(e.fontFamily,this.defaultValue.fontFamily),padding:ve(e.padding,this.defaultValue.padding),maximumLength:lt.clampedInt(e.maximumLength,this.defaultValue.maximumLength,0,Number.MAX_SAFE_INTEGER)}}},cD=class extends wt{constructor(){super(74,"lineDecorationsWidth",10)}validate(t){return typeof t=="string"&&/^\d+(\.\d+)?ch$/.test(t)?-parseFloat(t.substring(0,t.length-2)):lt.clampedInt(t,this.defaultValue,0,1e3)}compute(t,e,n){return n<0?lt.clampedInt(-n*t.fontInfo.typicalHalfwidthCharacterWidth,this.defaultValue,0,1e3):n}},uD=class extends Bo{constructor(){super(75,"lineHeight",Kr.lineHeight,t=>Bo.clamp(t,0,150),{markdownDescription:p(546,null)},0,150)}compute(t,e,n){return t.fontInfo.lineHeight}},pD=class extends wt{constructor(){let t={enabled:!0,size:"proportional",side:"right",showSlider:"mouseover",autohide:"none",renderCharacters:!0,maxColumn:120,scale:1,showRegionSectionHeaders:!0,showMarkSectionHeaders:!0,markSectionHeaderRegex:"\\bMARK:\\s*(?<separator>-?)\\s*(?<label>.*)$",sectionHeaderFontSize:9,sectionHeaderLetterSpacing:1};super(81,"minimap",t,{"editor.minimap.enabled":{type:"boolean",default:t.enabled,description:p(559,null)},"editor.minimap.autohide":{type:"string",enum:["none","mouseover","scroll"],enumDescriptions:[p(557,null),p(556,null),p(558,null)],default:t.autohide,description:p(555,null)},"editor.minimap.size":{type:"string",enum:["proportional","fill","fit"],enumDescriptions:[p(573,null),p(571,null),p(572,null)],default:t.size,description:p(570,null)},"editor.minimap.side":{type:"string",enum:["left","right"],default:t.side,description:p(569,null)},"editor.minimap.showSlider":{type:"string",enum:["always","mouseover"],default:t.showSlider,description:p(568,null)},"editor.minimap.scale":{type:"number",default:t.scale,minimum:1,maximum:3,enum:[1,2,3],description:p(563,null)},"editor.minimap.renderCharacters":{type:"boolean",default:t.renderCharacters,description:p(562,null)},"editor.minimap.maxColumn":{type:"number",default:t.maxColumn,description:p(561,null)},"editor.minimap.showRegionSectionHeaders":{type:"boolean",default:t.showRegionSectionHeaders,description:p(567,null)},"editor.minimap.showMarkSectionHeaders":{type:"boolean",default:t.showMarkSectionHeaders,description:p(566,null)},"editor.minimap.markSectionHeaderRegex":{type:"string",default:t.markSectionHeaderRegex,description:p(560,null)},"editor.minimap.sectionHeaderFontSize":{type:"number",default:t.sectionHeaderFontSize,description:p(564,null)},"editor.minimap.sectionHeaderLetterSpacing":{type:"number",default:t.sectionHeaderLetterSpacing,description:p(565,null)}})}validate(t){if(!t||typeof t!="object")return this.defaultValue;let e=t,n=this.defaultValue.markSectionHeaderRegex,o=e.markSectionHeaderRegex;if(typeof o=="string")try{new RegExp(o,"d"),n=o}catch{}return{enabled:ve(e.enabled,this.defaultValue.enabled),autohide:Dt(e.autohide,this.defaultValue.autohide,["none","mouseover","scroll"]),size:Dt(e.size,this.defaultValue.size,["proportional","fill","fit"]),side:Dt(e.side,this.defaultValue.side,["right","left"]),showSlider:Dt(e.showSlider,this.defaultValue.showSlider,["always","mouseover"]),renderCharacters:ve(e.renderCharacters,this.defaultValue.renderCharacters),scale:lt.clampedInt(e.scale,1,1,3),maxColumn:lt.clampedInt(e.maxColumn,this.defaultValue.maxColumn,1,1e4),showRegionSectionHeaders:ve(e.showRegionSectionHeaders,this.defaultValue.showRegionSectionHeaders),showMarkSectionHeaders:ve(e.showMarkSectionHeaders,this.defaultValue.showMarkSectionHeaders),markSectionHeaderRegex:n,sectionHeaderFontSize:Bo.clamp(Bo.float(e.sectionHeaderFontSize,this.defaultValue.sectionHeaderFontSize),4,32),sectionHeaderLetterSpacing:Bo.clamp(Bo.float(e.sectionHeaderLetterSpacing,this.defaultValue.sectionHeaderLetterSpacing),0,5)}}};function o6(r){return r==="ctrlCmd"?hn?"metaKey":"ctrlKey":"altKey"}var mD=class extends wt{constructor(){super(96,"padding",{top:0,bottom:0},{"editor.padding.top":{type:"number",default:0,minimum:0,maximum:1e3,description:p(598,null)},"editor.padding.bottom":{type:"number",default:0,minimum:0,maximum:1e3,description:p(597,null)}})}validate(t){if(!t||typeof t!="object")return this.defaultValue;let e=t;return{top:lt.clampedInt(e.top,0,0,1e3),bottom:lt.clampedInt(e.bottom,0,0,1e3)}}},fD=class extends wt{constructor(){let t={enabled:!0,cycle:!0};super(98,"parameterHints",t,{"editor.parameterHints.enabled":{type:"boolean",default:t.enabled,description:p(600,null)},"editor.parameterHints.cycle":{type:"boolean",default:t.cycle,description:p(599,null)}})}validate(t){if(!t||typeof t!="object")return this.defaultValue;let e=t;return{enabled:ve(e.enabled,this.defaultValue.enabled),cycle:ve(e.cycle,this.defaultValue.cycle)}}},gD=class extends wi{constructor(){super(163,1)}compute(t,e,n){return t.pixelRatio}},hD=class extends wt{constructor(){super(100,"placeholder",void 0)}validate(t){return typeof t>"u"?this.defaultValue:typeof t=="string"?t:this.defaultValue}},vD=class extends wt{constructor(){let t={other:"on",comments:"off",strings:"off"},e=[{type:"boolean"},{type:"string",enum:["on","inline","off","offWhenInlineCompletions"],enumDescriptions:[p(593,null),p(525,null),p(591,null),p(592,null)]}];super(102,"quickSuggestions",t,{anyOf:[{type:"boolean"},{type:"string",enum:["on","inline","off","offWhenInlineCompletions"],enumDescriptions:[p(615,null),p(612,null),p(613,null),p(614,null)]},{type:"object",additionalProperties:!1,properties:{strings:{anyOf:e,default:t.strings,description:p(611,null)},comments:{anyOf:e,default:t.comments,description:p(609,null)},other:{anyOf:e,default:t.other,description:p(610,null)}}}],default:t,markdownDescription:p(608,null,"`#editor.suggestOnTriggerCharacters#`"),experiment:{mode:"auto"}}),this.defaultValue=t}validate(t){if(typeof t=="boolean"){let d=t?"on":"off";return{comments:d,strings:d,other:d}}if(typeof t=="string"){let d=["on","inline","off","offWhenInlineCompletions"],c=Dt(t,this.defaultValue.other,d);return{comments:c,strings:c,other:c}}if(!t||typeof t!="object")return this.defaultValue;let{other:e,comments:n,strings:o}=t,i=["on","inline","off","offWhenInlineCompletions"],s,a,l;return typeof e=="boolean"?s=e?"on":"off":s=Dt(e,this.defaultValue.other,i),typeof n=="boolean"?a=n?"on":"off":a=Dt(n,this.defaultValue.comments,i),typeof o=="boolean"?l=o?"on":"off":l=Dt(o,this.defaultValue.strings,i),{other:s,comments:a,strings:l}}};var bD=class extends wt{constructor(){super(76,"lineNumbers",{renderType:1,renderFn:null},{type:"string",enum:["off","on","relative","interval"],enumDescriptions:[p(549,null),p(550,null),p(551,null),p(548,null)],default:"on",description:p(547,null)})}validate(t){let e=this.defaultValue.renderType,n=this.defaultValue.renderFn;return typeof t<"u"&&(typeof t=="function"?(e=4,n=t):t==="interval"?e=3:t==="relative"?e=2:t==="on"?e=1:e=0),{renderType:e,renderFn:n}}};var ID=class extends wt{constructor(){let t=[],e={type:"number",description:p(632,null)};super(116,"rulers",t,{type:"array",items:{anyOf:[e,{type:["object"],properties:{column:e,color:{type:"string",description:p(631,null),format:"color-hex"}}}]},default:t,description:p(630,null)})}validate(t){if(Array.isArray(t)){let e=[];for(let n of t)if(typeof n=="number")e.push({column:lt.clampedInt(n,0,0,1e4),color:null});else if(n&&typeof n=="object"){let o=n;e.push({column:lt.clampedInt(o.column,0,0,1e4),color:o.color})}return e.sort((n,o)=>n.column-o.column),e}return this.defaultValue}},yD=class extends wt{constructor(){super(105,"readOnlyMessage",void 0)}validate(t){return!t||typeof t!="object"?this.defaultValue:t}};function qF(r,t){if(typeof r!="string")return t;switch(r){case"hidden":return 2;case"visible":return 3;default:return 1}}var ED=class extends wt{constructor(){let t={vertical:1,horizontal:1,arrowSize:11,useShadows:!0,verticalHasArrows:!1,horizontalHasArrows:!1,horizontalScrollbarSize:12,horizontalSliderSize:12,verticalScrollbarSize:14,verticalSliderSize:14,handleMouseWheel:!0,alwaysConsumeMouseWheel:!0,scrollByPage:!1,ignoreHorizontalScrollbarInContentHeight:!1};super(117,"scrollbar",t,{"editor.scrollbar.vertical":{type:"string",enum:["auto","visible","hidden"],enumDescriptions:[p(642,null),p(644,null),p(643,null)],default:"auto",description:p(641,null)},"editor.scrollbar.horizontal":{type:"string",enum:["auto","visible","hidden"],enumDescriptions:[p(635,null),p(637,null),p(636,null)],default:"auto",description:p(634,null)},"editor.scrollbar.verticalScrollbarSize":{type:"number",default:t.verticalScrollbarSize,description:p(645,null)},"editor.scrollbar.horizontalScrollbarSize":{type:"number",default:t.horizontalScrollbarSize,description:p(638,null)},"editor.scrollbar.scrollByPage":{type:"boolean",default:t.scrollByPage,description:p(640,null)},"editor.scrollbar.ignoreHorizontalScrollbarInContentHeight":{type:"boolean",default:t.ignoreHorizontalScrollbarInContentHeight,description:p(639,null)}})}validate(t){if(!t||typeof t!="object")return this.defaultValue;let e=t,n=lt.clampedInt(e.horizontalScrollbarSize,this.defaultValue.horizontalScrollbarSize,0,1e3),o=lt.clampedInt(e.verticalScrollbarSize,this.defaultValue.verticalScrollbarSize,0,1e3);return{arrowSize:lt.clampedInt(e.arrowSize,this.defaultValue.arrowSize,0,1e3),vertical:qF(e.vertical,this.defaultValue.vertical),horizontal:qF(e.horizontal,this.defaultValue.horizontal),useShadows:ve(e.useShadows,this.defaultValue.useShadows),verticalHasArrows:ve(e.verticalHasArrows,this.defaultValue.verticalHasArrows),horizontalHasArrows:ve(e.horizontalHasArrows,this.defaultValue.horizontalHasArrows),handleMouseWheel:ve(e.handleMouseWheel,this.defaultValue.handleMouseWheel),alwaysConsumeMouseWheel:ve(e.alwaysConsumeMouseWheel,this.defaultValue.alwaysConsumeMouseWheel),horizontalScrollbarSize:n,horizontalSliderSize:lt.clampedInt(e.horizontalSliderSize,n,0,1e3),verticalScrollbarSize:o,verticalSliderSize:lt.clampedInt(e.verticalSliderSize,o,0,1e3),scrollByPage:ve(e.scrollByPage,this.defaultValue.scrollByPage),ignoreHorizontalScrollbarInContentHeight:ve(e.ignoreHorizontalScrollbarInContentHeight,this.defaultValue.ignoreHorizontalScrollbarInContentHeight)}}},Jr="inUntrustedWorkspace",Id={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"},SD=class extends wt{constructor(){let t={nonBasicASCII:Jr,invisibleCharacters:!0,ambiguousCharacters:!0,includeComments:Jr,includeStrings:!0,allowedCharacters:{},allowedLocales:{_os:!0,_vscode:!0}};super(142,"unicodeHighlight",t,{[Id.nonBasicASCII]:{restricted:!0,type:["boolean","string"],enum:[!0,!1,Jr],default:t.nonBasicASCII,description:p(706,null)},[Id.invisibleCharacters]:{restricted:!0,type:"boolean",default:t.invisibleCharacters,description:p(705,null)},[Id.ambiguousCharacters]:{restricted:!0,type:"boolean",default:t.ambiguousCharacters,description:p(702,null)},[Id.includeComments]:{restricted:!0,type:["boolean","string"],enum:[!0,!1,Jr],default:t.includeComments,description:p(703,null)},[Id.includeStrings]:{restricted:!0,type:["boolean","string"],enum:[!0,!1,Jr],default:t.includeStrings,description:p(704,null)},[Id.allowedCharacters]:{restricted:!0,type:"object",default:t.allowedCharacters,description:p(700,null),additionalProperties:{type:"boolean"}},[Id.allowedLocales]:{restricted:!0,type:"object",additionalProperties:{type:"boolean"},default:t.allowedLocales,description:p(701,null)}})}applyUpdate(t,e){let n=!1;e.allowedCharacters&&t&&(Xt(t.allowedCharacters,e.allowedCharacters)||(t={...t,allowedCharacters:e.allowedCharacters},n=!0)),e.allowedLocales&&t&&(Xt(t.allowedLocales,e.allowedLocales)||(t={...t,allowedLocales:e.allowedLocales},n=!0));let o=super.applyUpdate(t,e);return n?new mu(o.newValue,!0):o}validate(t){if(!t||typeof t!="object")return this.defaultValue;let e=t;return{nonBasicASCII:fu(e.nonBasicASCII,Jr,[!0,!1,Jr]),invisibleCharacters:ve(e.invisibleCharacters,this.defaultValue.invisibleCharacters),ambiguousCharacters:ve(e.ambiguousCharacters,this.defaultValue.ambiguousCharacters),includeComments:fu(e.includeComments,Jr,[!0,!1,Jr]),includeStrings:fu(e.includeStrings,Jr,[!0,!1,Jr]),allowedCharacters:this.validateBooleanMap(e.allowedCharacters,this.defaultValue.allowedCharacters),allowedLocales:this.validateBooleanMap(e.allowedLocales,this.defaultValue.allowedLocales)}}validateBooleanMap(t,e){if(typeof t!="object"||!t)return e;let n={};for(let[o,i]of Object.entries(t))i===!0&&(n[o]=!0);return n}},xD=class extends wt{constructor(){let t={enabled:!0,mode:"subwordSmart",showToolbar:"onHover",suppressSuggestions:!1,keepOnBlur:!1,fontFamily:"default",syntaxHighlightingEnabled:!0,minShowDelay:0,suppressInSnippetMode:!0,edits:{enabled:!0,showCollapsed:!1,renderSideBySide:"auto",allowCodeShifting:"always",showLongDistanceHint:!0},triggerCommandOnProviderChange:!1,experimental:{suppressInlineSuggestions:"",showOnSuggestConflict:"never",emptyResponseInformation:!0}};super(71,"inlineSuggest",t,{"editor.inlineSuggest.enabled":{type:"boolean",default:t.enabled,description:p(532,null)},"editor.inlineSuggest.showToolbar":{type:"string",default:t.showToolbar,enum:["always","onHover","never"],enumDescriptions:[p(537,null),p(539,null),p(538,null)],description:p(536,null)},"editor.inlineSuggest.syntaxHighlightingEnabled":{type:"boolean",default:t.syntaxHighlightingEnabled,description:p(543,null)},"editor.inlineSuggest.suppressSuggestions":{type:"boolean",default:t.suppressSuggestions,description:p(542,null)},"editor.inlineSuggest.suppressInSnippetMode":{type:"boolean",default:t.suppressInSnippetMode,description:p(541,null)},"editor.inlineSuggest.minShowDelay":{type:"number",default:0,minimum:0,maximum:1e4,description:p(534,null)},"editor.inlineSuggest.experimental.suppressInlineSuggestions":{type:"string",default:t.experimental.suppressInlineSuggestions,tags:["experimental"],description:p(540,null),experiment:{mode:"auto"}},"editor.inlineSuggest.experimental.emptyResponseInformation":{type:"boolean",default:t.experimental.emptyResponseInformation,tags:["experimental"],description:p(531,null),experiment:{mode:"auto"}},"editor.inlineSuggest.triggerCommandOnProviderChange":{type:"boolean",default:t.triggerCommandOnProviderChange,tags:["experimental"],description:p(544,null),experiment:{mode:"auto"}},"editor.inlineSuggest.experimental.showOnSuggestConflict":{type:"string",default:t.experimental.showOnSuggestConflict,tags:["experimental"],enum:["always","never","whenSuggestListIsIncomplete"],description:p(535,null),experiment:{mode:"auto"}},"editor.inlineSuggest.fontFamily":{type:"string",default:t.fontFamily,description:p(533,null)},"editor.inlineSuggest.edits.allowCodeShifting":{type:"string",default:t.edits.allowCodeShifting,description:p(527,null),enum:["always","horizontal","never"],tags:["nextEditSuggestions"]},"editor.inlineSuggest.edits.showLongDistanceHint":{type:"boolean",default:t.edits.showLongDistanceHint,description:p(530,null),tags:["nextEditSuggestions","experimental"]},"editor.inlineSuggest.edits.renderSideBySide":{type:"string",default:t.edits.renderSideBySide,description:p(528,null),enum:["auto","never"],enumDescriptions:[p(431,null),p(432,null)],tags:["nextEditSuggestions"]},"editor.inlineSuggest.edits.showCollapsed":{type:"boolean",default:t.edits.showCollapsed,description:p(529,null),tags:["nextEditSuggestions"]}})}validate(t){if(!t||typeof t!="object")return this.defaultValue;let e=t;return{enabled:ve(e.enabled,this.defaultValue.enabled),mode:Dt(e.mode,this.defaultValue.mode,["prefix","subword","subwordSmart"]),showToolbar:Dt(e.showToolbar,this.defaultValue.showToolbar,["always","onHover","never"]),suppressSuggestions:ve(e.suppressSuggestions,this.defaultValue.suppressSuggestions),keepOnBlur:ve(e.keepOnBlur,this.defaultValue.keepOnBlur),fontFamily:Zn.string(e.fontFamily,this.defaultValue.fontFamily),syntaxHighlightingEnabled:ve(e.syntaxHighlightingEnabled,this.defaultValue.syntaxHighlightingEnabled),minShowDelay:lt.clampedInt(e.minShowDelay,0,0,1e4),suppressInSnippetMode:ve(e.suppressInSnippetMode,this.defaultValue.suppressInSnippetMode),edits:this._validateEdits(e.edits),triggerCommandOnProviderChange:ve(e.triggerCommandOnProviderChange,this.defaultValue.triggerCommandOnProviderChange),experimental:this._validateExperimental(e.experimental)}}_validateEdits(t){if(!t||typeof t!="object")return this.defaultValue.edits;let e=t;return{enabled:ve(e.enabled,this.defaultValue.edits.enabled),showCollapsed:ve(e.showCollapsed,this.defaultValue.edits.showCollapsed),allowCodeShifting:Dt(e.allowCodeShifting,this.defaultValue.edits.allowCodeShifting,["always","horizontal","never"]),showLongDistanceHint:ve(e.showLongDistanceHint,this.defaultValue.edits.showLongDistanceHint),renderSideBySide:Dt(e.renderSideBySide,this.defaultValue.edits.renderSideBySide,["never","auto"])}}_validateExperimental(t){if(!t||typeof t!="object")return this.defaultValue.experimental;let e=t;return{suppressInlineSuggestions:Zn.string(e.suppressInlineSuggestions,this.defaultValue.experimental.suppressInlineSuggestions),showOnSuggestConflict:Dt(e.showOnSuggestConflict,this.defaultValue.experimental.showOnSuggestConflict,["always","never","whenSuggestListIsIncomplete"]),emptyResponseInformation:ve(e.emptyResponseInformation,this.defaultValue.experimental.emptyResponseInformation)}}},CD=class extends wt{constructor(){let t={enabled:HP.bracketPairColorizationOptions.enabled,independentColorPoolPerBracketType:HP.bracketPairColorizationOptions.independentColorPoolPerBracketType};super(21,"bracketPairColorization",t,{"editor.bracketPairColorization.enabled":{type:"boolean",default:t.enabled,markdownDescription:p(338,null,"`#workbench.colorCustomizations#`")},"editor.bracketPairColorization.independentColorPoolPerBracketType":{type:"boolean",default:t.independentColorPoolPerBracketType,description:p(339,null)}})}validate(t){if(!t||typeof t!="object")return this.defaultValue;let e=t;return{enabled:ve(e.enabled,this.defaultValue.enabled),independentColorPoolPerBracketType:ve(e.independentColorPoolPerBracketType,this.defaultValue.independentColorPoolPerBracketType)}}},TD=class extends wt{constructor(){let t={bracketPairs:!1,bracketPairsHorizontal:"active",highlightActiveBracketPair:!0,indentation:!0,highlightActiveIndentation:!0};super(22,"guides",t,{"editor.guides.bracketPairs":{type:["boolean","string"],enum:[!0,"active",!1],enumDescriptions:[p(416,null),p(414,null),p(415,null)],default:t.bracketPairs,description:p(413,null)},"editor.guides.bracketPairsHorizontal":{type:["boolean","string"],enum:[!0,"active",!1],enumDescriptions:[p(420,null),p(418,null),p(419,null)],default:t.bracketPairsHorizontal,description:p(417,null)},"editor.guides.highlightActiveBracketPair":{type:"boolean",default:t.highlightActiveBracketPair,description:p(421,null)},"editor.guides.indentation":{type:"boolean",default:t.indentation,description:p(426,null)},"editor.guides.highlightActiveIndentation":{type:["boolean","string"],enum:[!0,"always",!1],enumDescriptions:[p(425,null),p(423,null),p(424,null)],default:t.highlightActiveIndentation,description:p(422,null)}})}validate(t){if(!t||typeof t!="object")return this.defaultValue;let e=t;return{bracketPairs:fu(e.bracketPairs,this.defaultValue.bracketPairs,[!0,!1,"active"]),bracketPairsHorizontal:fu(e.bracketPairsHorizontal,this.defaultValue.bracketPairsHorizontal,[!0,!1,"active"]),highlightActiveBracketPair:ve(e.highlightActiveBracketPair,this.defaultValue.highlightActiveBracketPair),indentation:ve(e.indentation,this.defaultValue.indentation),highlightActiveIndentation:fu(e.highlightActiveIndentation,this.defaultValue.highlightActiveIndentation,[!0,!1,"always"])}}};function fu(r,t,e){let n=e.indexOf(r);return n===-1?t:e[n]}var _D=class extends wt{constructor(){let t={insertMode:"insert",filterGraceful:!0,snippetsPreventQuickSuggestions:!1,localityBonus:!1,shareSuggestSelections:!1,selectionMode:"always",showIcons:!0,showStatusBar:!1,preview:!1,previewMode:"subwordSmart",showInlineDetails:!0,showMethods:!0,showFunctions:!0,showConstructors:!0,showDeprecated:!0,matchOnWordStartOnly:!0,showFields:!0,showVariables:!0,showClasses:!0,showStructs:!0,showInterfaces:!0,showModules:!0,showProperties:!0,showEvents:!0,showOperators:!0,showUnits:!0,showValues:!0,showConstants:!0,showEnums:!0,showEnumMembers:!0,showKeywords:!0,showWords:!0,showColors:!0,showFiles:!0,showReferences:!0,showFolders:!0,showTypeParameters:!0,showSnippets:!0,showUsers:!0,showIssues:!0};super(134,"suggest",t,{"editor.suggest.insertMode":{type:"string",enum:["insert","replace"],enumDescriptions:[p(672,null),p(674,null)],default:t.insertMode,description:p(670,null)},"editor.suggest.filterGraceful":{type:"boolean",default:t.filterGraceful,description:p(669,null)},"editor.suggest.localityBonus":{type:"boolean",default:t.localityBonus,description:p(677,null)},"editor.suggest.shareSuggestSelections":{type:"boolean",default:t.shareSuggestSelections,markdownDescription:p(681,null)},"editor.suggest.selectionMode":{type:"string",enum:["always","never","whenTriggerCharacter","whenQuickSuggestion"],enumDescriptions:[p(671,null),p(673,null),p(676,null),p(675,null)],default:t.selectionMode,markdownDescription:p(680,null,"`#editor.quickSuggestions#`","`#editor.suggestOnTriggerCharacters#`")},"editor.suggest.snippetsPreventQuickSuggestions":{type:"boolean",default:t.snippetsPreventQuickSuggestions,description:p(685,null)},"editor.suggest.showIcons":{type:"boolean",default:t.showIcons,description:p(682,null)},"editor.suggest.showStatusBar":{type:"boolean",default:t.showStatusBar,description:p(684,null)},"editor.suggest.preview":{type:"boolean",default:t.preview,description:p(679,null)},"editor.suggest.showInlineDetails":{type:"boolean",default:t.showInlineDetails,description:p(683,null)},"editor.suggest.maxVisibleSuggestions":{type:"number",deprecationMessage:p(678,null)},"editor.suggest.filteredTypes":{type:"object",deprecationMessage:p(364,null)},"editor.suggest.showMethods":{type:"boolean",default:!0,markdownDescription:p(457,null)},"editor.suggest.showFunctions":{type:"boolean",default:!0,markdownDescription:p(453,null)},"editor.suggest.showConstructors":{type:"boolean",default:!0,markdownDescription:p(444,null)},"editor.suggest.showDeprecated":{type:"boolean",default:!0,markdownDescription:p(446,null)},"editor.suggest.matchOnWordStartOnly":{type:"boolean",default:!0,markdownDescription:p(440,null)},"editor.suggest.showFields":{type:"boolean",default:!0,markdownDescription:p(450,null)},"editor.suggest.showVariables":{type:"boolean",default:!0,markdownDescription:p(469,null)},"editor.suggest.showClasses":{type:"boolean",default:!0,markdownDescription:p(441,null)},"editor.suggest.showStructs":{type:"boolean",default:!0,markdownDescription:p(463,null)},"editor.suggest.showInterfaces":{type:"boolean",default:!0,markdownDescription:p(454,null)},"editor.suggest.showModules":{type:"boolean",default:!0,markdownDescription:p(458,null)},"editor.suggest.showProperties":{type:"boolean",default:!0,markdownDescription:p(460,null)},"editor.suggest.showEvents":{type:"boolean",default:!0,markdownDescription:p(449,null)},"editor.suggest.showOperators":{type:"boolean",default:!0,markdownDescription:p(459,null)},"editor.suggest.showUnits":{type:"boolean",default:!0,markdownDescription:p(466,null)},"editor.suggest.showValues":{type:"boolean",default:!0,markdownDescription:p(468,null)},"editor.suggest.showConstants":{type:"boolean",default:!0,markdownDescription:p(443,null)},"editor.suggest.showEnums":{type:"boolean",default:!0,markdownDescription:p(448,null)},"editor.suggest.showEnumMembers":{type:"boolean",default:!0,markdownDescription:p(447,null)},"editor.suggest.showKeywords":{type:"boolean",default:!0,markdownDescription:p(456,null)},"editor.suggest.showWords":{type:"boolean",default:!0,markdownDescription:p(464,null)},"editor.suggest.showColors":{type:"boolean",default:!0,markdownDescription:p(442,null)},"editor.suggest.showFiles":{type:"boolean",default:!0,markdownDescription:p(451,null)},"editor.suggest.showReferences":{type:"boolean",default:!0,markdownDescription:p(461,null)},"editor.suggest.showCustomcolors":{type:"boolean",default:!0,markdownDescription:p(445,null)},"editor.suggest.showFolders":{type:"boolean",default:!0,markdownDescription:p(452,null)},"editor.suggest.showTypeParameters":{type:"boolean",default:!0,markdownDescription:p(465,null)},"editor.suggest.showSnippets":{type:"boolean",default:!0,markdownDescription:p(462,null)},"editor.suggest.showUsers":{type:"boolean",default:!0,markdownDescription:p(467,null)},"editor.suggest.showIssues":{type:"boolean",default:!0,markdownDescription:p(455,null)}})}validate(t){if(!t||typeof t!="object")return this.defaultValue;let e=t;return{insertMode:Dt(e.insertMode,this.defaultValue.insertMode,["insert","replace"]),filterGraceful:ve(e.filterGraceful,this.defaultValue.filterGraceful),snippetsPreventQuickSuggestions:ve(e.snippetsPreventQuickSuggestions,this.defaultValue.filterGraceful),localityBonus:ve(e.localityBonus,this.defaultValue.localityBonus),shareSuggestSelections:ve(e.shareSuggestSelections,this.defaultValue.shareSuggestSelections),selectionMode:Dt(e.selectionMode,this.defaultValue.selectionMode,["always","never","whenQuickSuggestion","whenTriggerCharacter"]),showIcons:ve(e.showIcons,this.defaultValue.showIcons),showStatusBar:ve(e.showStatusBar,this.defaultValue.showStatusBar),preview:ve(e.preview,this.defaultValue.preview),previewMode:Dt(e.previewMode,this.defaultValue.previewMode,["prefix","subword","subwordSmart"]),showInlineDetails:ve(e.showInlineDetails,this.defaultValue.showInlineDetails),showMethods:ve(e.showMethods,this.defaultValue.showMethods),showFunctions:ve(e.showFunctions,this.defaultValue.showFunctions),showConstructors:ve(e.showConstructors,this.defaultValue.showConstructors),showDeprecated:ve(e.showDeprecated,this.defaultValue.showDeprecated),matchOnWordStartOnly:ve(e.matchOnWordStartOnly,this.defaultValue.matchOnWordStartOnly),showFields:ve(e.showFields,this.defaultValue.showFields),showVariables:ve(e.showVariables,this.defaultValue.showVariables),showClasses:ve(e.showClasses,this.defaultValue.showClasses),showStructs:ve(e.showStructs,this.defaultValue.showStructs),showInterfaces:ve(e.showInterfaces,this.defaultValue.showInterfaces),showModules:ve(e.showModules,this.defaultValue.showModules),showProperties:ve(e.showProperties,this.defaultValue.showProperties),showEvents:ve(e.showEvents,this.defaultValue.showEvents),showOperators:ve(e.showOperators,this.defaultValue.showOperators),showUnits:ve(e.showUnits,this.defaultValue.showUnits),showValues:ve(e.showValues,this.defaultValue.showValues),showConstants:ve(e.showConstants,this.defaultValue.showConstants),showEnums:ve(e.showEnums,this.defaultValue.showEnums),showEnumMembers:ve(e.showEnumMembers,this.defaultValue.showEnumMembers),showKeywords:ve(e.showKeywords,this.defaultValue.showKeywords),showWords:ve(e.showWords,this.defaultValue.showWords),showColors:ve(e.showColors,this.defaultValue.showColors),showFiles:ve(e.showFiles,this.defaultValue.showFiles),showReferences:ve(e.showReferences,this.defaultValue.showReferences),showFolders:ve(e.showFolders,this.defaultValue.showFolders),showTypeParameters:ve(e.showTypeParameters,this.defaultValue.showTypeParameters),showSnippets:ve(e.showSnippets,this.defaultValue.showSnippets),showUsers:ve(e.showUsers,this.defaultValue.showUsers),showIssues:ve(e.showIssues,this.defaultValue.showIssues)}}},PD=class extends wt{constructor(){super(129,"smartSelect",{selectLeadingAndTrailingWhitespace:!0,selectSubwords:!0},{"editor.smartSelect.selectLeadingAndTrailingWhitespace":{description:p(654,null),default:!0,type:"boolean"},"editor.smartSelect.selectSubwords":{description:p(655,null),default:!0,type:"boolean"}})}validate(t){return!t||typeof t!="object"?this.defaultValue:{selectLeadingAndTrailingWhitespace:ve(t.selectLeadingAndTrailingWhitespace,this.defaultValue.selectLeadingAndTrailingWhitespace),selectSubwords:ve(t.selectSubwords,this.defaultValue.selectSubwords)}}},DD=class extends wt{constructor(){let t=[];super(147,"wordSegmenterLocales",t,{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}],description:p(715,null),type:"array",items:{type:"string"},default:t})}validate(t){if(typeof t=="string"&&(t=[t]),Array.isArray(t)){let e=[];for(let n of t)if(typeof n=="string")try{Intl.Segmenter.supportedLocalesOf(n).length>0&&e.push(n)}catch{}return e}return this.defaultValue}};var wD=class extends wt{constructor(){super(155,"wrappingIndent",1,{"editor.wrappingIndent":{type:"string",enum:["none","same","indent","deepIndent"],enumDescriptions:[p(727,null),p(728,null),p(726,null),p(725,null)],description:p(724,null),default:"same"}})}validate(t){switch(t){case"none":return 0;case"same":return 1;case"indent":return 2;case"deepIndent":return 3}return 1}compute(t,e,n){return e.get(2)===2?0:n}},RD=class extends wi{constructor(){super(166,{isDominatedByLongLines:!1,isWordWrapMinified:!1,isViewportWrapping:!1,wrappingColumn:-1})}compute(t,e,n){let o=e.get(165);return{isDominatedByLongLines:t.isDominatedByLongLines,isWordWrapMinified:o.isWordWrapMinified,isViewportWrapping:o.isViewportWrapping,wrappingColumn:o.wrappingColumn}}},kD=class extends wt{constructor(){let t={enabled:!0,showDropSelector:"afterDrop"};super(43,"dropIntoEditor",t,{"editor.dropIntoEditor.enabled":{type:"boolean",default:t.enabled,markdownDescription:p(367,null)},"editor.dropIntoEditor.showDropSelector":{type:"string",markdownDescription:p(368,null),enum:["afterDrop","never"],enumDescriptions:[p(369,null),p(370,null)],default:"afterDrop"}})}validate(t){if(!t||typeof t!="object")return this.defaultValue;let e=t;return{enabled:ve(e.enabled,this.defaultValue.enabled),showDropSelector:Dt(e.showDropSelector,this.defaultValue.showDropSelector,["afterDrop","never"])}}},AD=class extends wt{constructor(){let t={enabled:!0,showPasteSelector:"afterPaste"};super(97,"pasteAs",t,{"editor.pasteAs.enabled":{type:"boolean",default:t.enabled,markdownDescription:p(601,null)},"editor.pasteAs.showPasteSelector":{type:"string",markdownDescription:p(602,null),enum:["afterPaste","never"],enumDescriptions:[p(603,null),p(604,null)],default:"afterPaste"}})}validate(t){if(!t||typeof t!="object")return this.defaultValue;let e=t;return{enabled:ve(e.enabled,this.defaultValue.enabled),showPasteSelector:Dt(e.showPasteSelector,this.defaultValue.showPasteSelector,["afterPaste","never"])}}},r6=[];function G(r){return r6[r.id]=r,r}var Mee={acceptSuggestionOnCommitCharacter:G(new Pe(0,"acceptSuggestionOnCommitCharacter",!0,{markdownDescription:p(313,null)})),acceptSuggestionOnEnter:G(new Pt(1,"acceptSuggestionOnEnter","on",["on","smart","off"],{markdownEnumDescriptions:["",p(315,null),""],markdownDescription:p(314,null)})),accessibilitySupport:G(new GP),accessibilityPageSize:G(new lt(3,"accessibilityPageSize",500,1,1073741824,{description:p(316,null),tags:["accessibility"]})),allowOverflow:G(new Pe(4,"allowOverflow",!0)),allowVariableLineHeights:G(new Pe(5,"allowVariableLineHeights",!0,{description:p(323,null)})),allowVariableFonts:G(new Pe(6,"allowVariableFonts",!0,{description:p(321,null)})),allowVariableFontsInAccessibilityMode:G(new Pe(7,"allowVariableFontsInAccessibilityMode",!1,{description:p(322,null),tags:["accessibility"]})),ariaLabel:G(new Zn(8,"ariaLabel",p(470,null))),ariaRequired:G(new Pe(9,"ariaRequired",!1,void 0)),screenReaderAnnounceInlineSuggestion:G(new Pe(12,"screenReaderAnnounceInlineSuggestion",!0,{description:p(633,null),tags:["accessibility"]})),autoClosingBrackets:G(new Pt(10,"autoClosingBrackets","languageDefined",["always","languageDefined","beforeWhitespace","never"],{enumDescriptions:["",p(373,null),p(372,null),""],description:p(329,null)})),autoClosingComments:G(new Pt(11,"autoClosingComments","languageDefined",["always","languageDefined","beforeWhitespace","never"],{enumDescriptions:["",p(375,null),p(374,null),""],description:p(330,null)})),autoClosingDelete:G(new Pt(13,"autoClosingDelete","auto",["always","auto","never"],{enumDescriptions:["",p(376,null),""],description:p(331,null)})),autoClosingOvertype:G(new Pt(14,"autoClosingOvertype","auto",["always","auto","never"],{enumDescriptions:["",p(377,null),""],description:p(332,null)})),autoClosingQuotes:G(new Pt(15,"autoClosingQuotes","languageDefined",["always","languageDefined","beforeWhitespace","never"],{enumDescriptions:["",p(379,null),p(378,null),""],description:p(333,null)})),autoIndent:G(new yd(16,"autoIndent",4,"full",["none","keep","brackets","advanced","full"],t6,{enumDescriptions:[p(384,null),p(383,null),p(381,null),p(380,null),p(382,null)],description:p(334,null)})),autoIndentOnPaste:G(new Pe(17,"autoIndentOnPaste",!1,{description:p(335,null)})),autoIndentOnPasteWithinString:G(new Pe(18,"autoIndentOnPasteWithinString",!0,{description:p(336,null)})),automaticLayout:G(new Pe(19,"automaticLayout",!1)),autoSurround:G(new Pt(20,"autoSurround","languageDefined",["languageDefined","quotes","brackets","never"],{enumDescriptions:[p(386,null),p(387,null),p(385,null),""],description:p(337,null)})),bracketPairColorization:G(new CD),bracketPairGuides:G(new TD),stickyTabStops:G(new Pe(132,"stickyTabStops",!1,{description:p(668,null)})),codeLens:G(new Pe(23,"codeLens",!0,{description:p(340,null)})),codeLensFontFamily:G(new Zn(24,"codeLensFontFamily","",{description:p(341,null)})),codeLensFontSize:G(new lt(25,"codeLensFontSize",0,0,100,{type:"number",default:0,minimum:0,maximum:100,markdownDescription:p(342,null)})),colorDecorators:G(new Pe(26,"colorDecorators",!0,{description:p(344,null)})),colorDecoratorActivatedOn:G(new Pt(168,"colorDecoratorsActivatedOn","clickAndHover",["clickAndHover","hover","click"],{enumDescriptions:[p(389,null),p(390,null),p(388,null)],description:p(343,null)})),colorDecoratorsLimit:G(new lt(27,"colorDecoratorsLimit",500,1,1e6,{markdownDescription:p(345,null)})),columnSelection:G(new Pe(28,"columnSelection",!1,{description:p(346,null)})),comments:G(new zP),contextmenu:G(new Pe(30,"contextmenu",!0)),copyWithSyntaxHighlighting:G(new Pe(31,"copyWithSyntaxHighlighting",!0,{description:p(349,null)})),cursorBlinking:G(new yd(32,"cursorBlinking",1,"blink",["blink","smooth","phase","expand","solid"],n6,{description:p(350,null)})),cursorSmoothCaretAnimation:G(new Pt(33,"cursorSmoothCaretAnimation","off",["off","explicit","on"],{enumDescriptions:[p(354,null),p(353,null),p(355,null)],description:p(352,null)})),cursorStyle:G(new yd(34,"cursorStyle",1,"line",["line","block","underline","line-thin","block-outline","underline-thin"],zF,{description:p(356,null)})),overtypeCursorStyle:G(new yd(92,"overtypeCursorStyle",2,"block",["line","block","underline","line-thin","block-outline","underline-thin"],zF,{description:p(594,null)})),cursorSurroundingLines:G(new lt(35,"cursorSurroundingLines",0,0,1073741824,{description:p(357,null)})),cursorSurroundingLinesStyle:G(new Pt(36,"cursorSurroundingLinesStyle","default",["default","all"],{enumDescriptions:[p(360,null),p(359,null)],markdownDescription:p(358,null)})),cursorWidth:G(new lt(37,"cursorWidth",0,0,1073741824,{markdownDescription:p(361,null)})),cursorHeight:G(new lt(38,"cursorHeight",0,0,1073741824,{markdownDescription:p(351,null)})),disableLayerHinting:G(new Pe(39,"disableLayerHinting",!1)),disableMonospaceOptimizations:G(new Pe(40,"disableMonospaceOptimizations",!1)),domReadOnly:G(new Pe(41,"domReadOnly",!1)),doubleClickSelectsBlock:G(new Pe(173,"doubleClickSelectsBlock",!0,{description:p(365,null)})),dragAndDrop:G(new Pe(42,"dragAndDrop",!0,{description:p(366,null)})),emptySelectionClipboard:G(new KP),dropIntoEditor:G(new kD),editContext:G(new Pe(44,"editContext",!0,{description:p(371,null),included:Pf||Mv||Av})),renderRichScreenReaderContent:G(new Pe(107,"renderRichScreenReaderContent",!1,{markdownDescription:p(624,null)})),stickyScroll:G(new lD),experimentalGpuAcceleration:G(new Pt(46,"experimentalGpuAcceleration","off",["off","on"],{tags:["experimental"],enumDescriptions:[p(474,null),p(475,null)],description:p(473,null)})),experimentalWhitespaceRendering:G(new Pt(47,"experimentalWhitespaceRendering","svg",["svg","font","off"],{enumDescriptions:[p(479,null),p(477,null),p(478,null)],description:p(476,null)})),extraEditorClassName:G(new Zn(48,"extraEditorClassName","")),fastScrollSensitivity:G(new Bo(49,"fastScrollSensitivity",5,r=>r<=0?5:r,{markdownDescription:p(480,null)})),find:G(new JP),fixedOverflowWidgets:G(new Pe(51,"fixedOverflowWidgets",!1)),folding:G(new Pe(52,"folding",!0,{description:p(490,null)})),foldingStrategy:G(new Pt(53,"foldingStrategy","auto",["auto","indentation"],{enumDescriptions:[p(495,null),p(496,null)],description:p(494,null)})),foldingHighlight:G(new Pe(54,"foldingHighlight",!0,{description:p(491,null)})),foldingImportsByDefault:G(new Pe(55,"foldingImportsByDefault",!1,{description:p(492,null)})),foldingMaximumRegions:G(new lt(56,"foldingMaximumRegions",5e3,10,65e3,{description:p(493,null)})),unfoldOnClickAfterEndOfLine:G(new Pe(57,"unfoldOnClickAfterEndOfLine",!1,{description:p(699,null)})),fontFamily:G(new Zn(58,"fontFamily",Kr.fontFamily,{description:p(497,null)})),fontInfo:G(new XP),fontLigatures2:G(new jP),fontSize:G(new tD),fontWeight:G(new nD),fontVariations:G(new QP),formatOnPaste:G(new Pe(64,"formatOnPaste",!1,{description:p(507,null)})),formatOnType:G(new Pe(65,"formatOnType",!1,{description:p(508,null)})),glyphMargin:G(new Pe(66,"glyphMargin",!0,{description:p(509,null)})),gotoLocation:G(new oD),hideCursorInOverviewRuler:G(new Pe(68,"hideCursorInOverviewRuler",!1,{description:p(510,null)})),hover:G(new rD),inDiffEditor:G(new Pe(70,"inDiffEditor",!1)),inertialScroll:G(new Pe(158,"inertialScroll",!1,{description:p(519,null)})),letterSpacing:G(new Bo(72,"letterSpacing",Kr.letterSpacing,r=>Bo.clamp(r,-5,20),{description:p(545,null)})),lightbulb:G(new aD),lineDecorationsWidth:G(new cD),lineHeight:G(new uD),lineNumbers:G(new bD),lineNumbersMinChars:G(new lt(77,"lineNumbersMinChars",5,1,300)),linkedEditing:G(new Pe(78,"linkedEditing",!1,{description:p(552,null)})),links:G(new Pe(79,"links",!0,{description:p(553,null)})),matchBrackets:G(new Pt(80,"matchBrackets","always",["always","near","never"],{description:p(554,null)})),minimap:G(new pD),mouseStyle:G(new Pt(82,"mouseStyle","text",["text","default","copy"])),mouseWheelScrollSensitivity:G(new Bo(83,"mouseWheelScrollSensitivity",1,r=>r===0?1:r,{markdownDescription:p(575,null)})),mouseWheelZoom:G(new Pe(84,"mouseWheelZoom",!1,{markdownDescription:hn?p(577,null):p(576,null)})),multiCursorMergeOverlapping:G(new Pe(85,"multiCursorMergeOverlapping",!0,{description:p(579,null)})),multiCursorModifier:G(new yd(86,"multiCursorModifier","altKey","alt",["ctrlCmd","alt"],o6,{markdownEnumDescriptions:[p(582,null),p(581,null)],markdownDescription:p(580,null)})),mouseMiddleClickAction:G(new Pt(87,"mouseMiddleClickAction","default",["default","openLink","ctrlLeftClick"],{description:p(574,null)})),multiCursorPaste:G(new Pt(88,"multiCursorPaste","spread",["spread","full"],{markdownEnumDescriptions:[p(585,null),p(584,null)],markdownDescription:p(583,null)})),multiCursorLimit:G(new lt(89,"multiCursorLimit",1e4,1,1e5,{markdownDescription:p(578,null)})),occurrencesHighlight:G(new Pt(90,"occurrencesHighlight","singleFile",["off","singleFile","multiFile"],{markdownEnumDescriptions:[p(588,null),p(589,null),p(587,null)],markdownDescription:p(586,null)})),occurrencesHighlightDelay:G(new lt(91,"occurrencesHighlightDelay",0,0,2e3,{description:p(590,null),tags:["preview"]})),overtypeOnPaste:G(new Pe(93,"overtypeOnPaste",!0,{description:p(595,null)})),overviewRulerBorder:G(new Pe(94,"overviewRulerBorder",!0,{description:p(596,null)})),overviewRulerLanes:G(new lt(95,"overviewRulerLanes",3,0,3)),padding:G(new mD),pasteAs:G(new AD),parameterHints:G(new fD),peekWidgetDefaultFocus:G(new Pt(99,"peekWidgetDefaultFocus","tree",["tree","editor"],{enumDescriptions:[p(607,null),p(606,null)],description:p(605,null)})),placeholder:G(new hD),definitionLinkOpensInPeek:G(new Pe(101,"definitionLinkOpensInPeek",!1,{description:p(363,null)})),quickSuggestions:G(new vD),quickSuggestionsDelay:G(new lt(103,"quickSuggestionsDelay",10,0,1073741824,{description:p(616,null),experiment:{mode:"auto"}})),readOnly:G(new Pe(104,"readOnly",!1)),readOnlyMessage:G(new yD),renameOnType:G(new Pe(106,"renameOnType",!1,{description:p(617,null),markdownDeprecationMessage:p(618,null)})),renderControlCharacters:G(new Pe(108,"renderControlCharacters",!0,{description:p(619,null),restricted:!0})),renderFinalNewline:G(new Pt(109,"renderFinalNewline",zn?"dimmed":"on",["off","on","dimmed"],{description:p(620,null)})),renderLineHighlight:G(new Pt(110,"renderLineHighlight","line",["none","gutter","line","all"],{enumDescriptions:["","","",p(622,null)],description:p(621,null)})),renderLineHighlightOnlyWhenFocus:G(new Pe(111,"renderLineHighlightOnlyWhenFocus",!1,{description:p(623,null)})),renderValidationDecorations:G(new Pt(112,"renderValidationDecorations","editable",["editable","on","off"])),renderWhitespace:G(new Pt(113,"renderWhitespace","selection",["none","boundary","selection","trailing","all"],{enumDescriptions:["",p(626,null),p(627,null),p(628,null),""],description:p(625,null)})),revealHorizontalRightPadding:G(new lt(114,"revealHorizontalRightPadding",15,0,1e3)),roundedSelection:G(new Pe(115,"roundedSelection",!0,{description:p(629,null)})),rulers:G(new ID),scrollbar:G(new ED),scrollBeyondLastColumn:G(new lt(118,"scrollBeyondLastColumn",4,0,1073741824,{description:p(646,null)})),scrollBeyondLastLine:G(new Pe(119,"scrollBeyondLastLine",!0,{description:p(647,null)})),scrollOnMiddleClick:G(new Pe(171,"scrollOnMiddleClick",!1,{description:p(648,null)})),scrollPredominantAxis:G(new Pe(120,"scrollPredominantAxis",!0,{description:p(649,null)})),selectionClipboard:G(new Pe(121,"selectionClipboard",!0,{description:p(650,null),included:zn})),selectionHighlight:G(new Pe(122,"selectionHighlight",!0,{description:p(651,null)})),selectionHighlightMaxLength:G(new lt(123,"selectionHighlightMaxLength",200,0,1073741824,{description:p(652,null)})),selectionHighlightMultiline:G(new Pe(124,"selectionHighlightMultiline",!1,{description:p(653,null)})),selectOnLineNumbers:G(new Pe(125,"selectOnLineNumbers",!0)),showFoldingControls:G(new Pt(126,"showFoldingControls","mouseover",["always","never","mouseover"],{enumDescriptions:[p(658,null),p(660,null),p(659,null)],description:p(657,null)})),showUnused:G(new Pe(127,"showUnused",!0,{description:p(661,null)})),showDeprecated:G(new Pe(157,"showDeprecated",!0,{description:p(656,null)})),inlayHints:G(new dD),snippetSuggestions:G(new Pt(128,"snippetSuggestions","inline",["top","bottom","inline","none"],{enumDescriptions:[p(667,null),p(664,null),p(665,null),p(666,null)],description:p(663,null)})),smartSelect:G(new PD),smoothScrolling:G(new Pe(130,"smoothScrolling",!1,{description:p(662,null)})),stopRenderingLineAfter:G(new lt(133,"stopRenderingLineAfter",1e4,-1,1073741824)),suggest:G(new _D),inlineSuggest:G(new xD),inlineCompletionsAccessibilityVerbose:G(new Pe(169,"inlineCompletionsAccessibilityVerbose",!1,{description:p(526,null)})),suggestFontSize:G(new lt(135,"suggestFontSize",0,0,1e3,{markdownDescription:p(686,null,"`0`","`#editor.fontSize#`")})),suggestLineHeight:G(new lt(136,"suggestLineHeight",0,0,1e3,{markdownDescription:p(687,null,"`0`","`#editor.lineHeight#`")})),suggestOnTriggerCharacters:G(new Pe(137,"suggestOnTriggerCharacters",!0,{description:p(688,null)})),suggestSelection:G(new Pt(138,"suggestSelection","first",["first","recentlyUsed","recentlyUsedByPrefix"],{markdownEnumDescriptions:[p(690,null),p(691,null),p(692,null)],description:p(689,null)})),tabCompletion:G(new Pt(139,"tabCompletion","off",["on","off","onlySnippets"],{enumDescriptions:[p(695,null),p(694,null),p(696,null)],description:p(693,null)})),tabIndex:G(new lt(140,"tabIndex",0,-1,1073741824)),trimWhitespaceOnDelete:G(new Pe(141,"trimWhitespaceOnDelete",!1,{description:p(698,null)})),unicodeHighlight:G(new SD),unusualLineTerminators:G(new Pt(143,"unusualLineTerminators","prompt",["auto","off","prompt"],{enumDescriptions:[p(708,null),p(709,null),p(710,null)],description:p(707,null)})),useShadowDOM:G(new Pe(144,"useShadowDOM",!0)),useTabStops:G(new Pe(145,"useTabStops",!0,{description:p(711,null)})),wordBreak:G(new Pt(146,"wordBreak","normal",["normal","keepAll"],{markdownEnumDescriptions:[p(714,null),p(713,null)],description:p(712,null)})),wordSegmenterLocales:G(new DD),wordSeparators:G(new Zn(148,"wordSeparators",BP,{description:p(716,null)})),wordWrap:G(new Pt(149,"wordWrap","off",["off","on","wordWrapColumn","bounded"],{markdownEnumDescriptions:[p(719,null),p(720,null),p(721,null),p(718,null)],description:p(717,null)})),wordWrapBreakAfterCharacters:G(new Zn(150,"wordWrapBreakAfterCharacters"," 	})]?|/&.,;\xA2\xB0\u2032\u2033\u2030\u2103\u3001\u3002\uFF61\uFF64\uFFE0\uFF0C\uFF0E\uFF1A\uFF1B\uFF1F\uFF01\uFF05\u30FB\uFF65\u309D\u309E\u30FD\u30FE\u30FC\u30A1\u30A3\u30A5\u30A7\u30A9\u30C3\u30E3\u30E5\u30E7\u30EE\u30F5\u30F6\u3041\u3043\u3045\u3047\u3049\u3063\u3083\u3085\u3087\u308E\u3095\u3096\u31F0\u31F1\u31F2\u31F3\u31F4\u31F5\u31F6\u31F7\u31F8\u31F9\u31FA\u31FB\u31FC\u31FD\u31FE\u31FF\u3005\u303B\uFF67\uFF68\uFF69\uFF6A\uFF6B\uFF6C\uFF6D\uFF6E\uFF6F\uFF70\u201D\u3009\u300B\u300D\u300F\u3011\u3015\uFF09\uFF3D\uFF5D\uFF63")),wordWrapBreakBeforeCharacters:G(new Zn(151,"wordWrapBreakBeforeCharacters","([{\u2018\u201C\u3008\u300A\u300C\u300E\u3010\u3014\uFF08\uFF3B\uFF5B\uFF62\xA3\xA5\uFF04\uFFE1\uFFE5+\uFF0B")),wordWrapColumn:G(new lt(152,"wordWrapColumn",80,1,1073741824,{markdownDescription:p(722,null)})),wordWrapOverride1:G(new Pt(153,"wordWrapOverride1","inherit",["off","on","inherit"])),wordWrapOverride2:G(new Pt(154,"wordWrapOverride2","inherit",["off","on","inherit"])),wrapOnEscapedLineFeeds:G(new Pe(160,"wrapOnEscapedLineFeeds",!1,{markdownDescription:p(723,null)})),effectiveCursorStyle:G(new YP),editorClassName:G(new qP),defaultColorDecorators:G(new Pt(167,"defaultColorDecorators","auto",["auto","always","never"],{enumDescriptions:[p(392,null),p(391,null),p(393,null)],description:p(362,null)})),pixelRatio:G(new gD),tabFocusMode:G(new Pe(164,"tabFocusMode",!1,{markdownDescription:p(697,null)})),layoutInfo:G(new iD),wrappingInfo:G(new RD),wrappingIndent:G(new wD),wrappingStrategy:G(new sD),effectiveEditContextEnabled:G(new ZP),effectiveAllowVariableFonts:G(new eD)};var In=class r{constructor(t,e){this.lineNumber=t,this.column=e}with(t=this.lineNumber,e=this.column){return t===this.lineNumber&&e===this.column?this:new r(t,e)}delta(t=0,e=0){return this.with(Math.max(1,this.lineNumber+t),Math.max(1,this.column+e))}equals(t){return r.equals(this,t)}static equals(t,e){return!t&&!e?!0:!!t&&!!e&&t.lineNumber===e.lineNumber&&t.column===e.column}isBefore(t){return r.isBefore(this,t)}static isBefore(t,e){return t.lineNumber<e.lineNumber?!0:e.lineNumber<t.lineNumber?!1:t.column<e.column}isBeforeOrEqual(t){return r.isBeforeOrEqual(this,t)}static isBeforeOrEqual(t,e){return t.lineNumber<e.lineNumber?!0:e.lineNumber<t.lineNumber?!1:t.column<=e.column}static compare(t,e){let n=t.lineNumber|0,o=e.lineNumber|0;if(n===o){let i=t.column|0,s=e.column|0;return i-s}return n-o}clone(){return new r(this.lineNumber,this.column)}toString(){return"("+this.lineNumber+","+this.column+")"}static lift(t){return new r(t.lineNumber,t.column)}static isIPosition(t){return!!t&&typeof t.lineNumber=="number"&&typeof t.column=="number"}toJSON(){return{lineNumber:this.lineNumber,column:this.column}}};var Ke=class r{constructor(t,e,n,o){t>n||t===n&&e>o?(this.startLineNumber=n,this.startColumn=o,this.endLineNumber=t,this.endColumn=e):(this.startLineNumber=t,this.startColumn=e,this.endLineNumber=n,this.endColumn=o)}isEmpty(){return r.isEmpty(this)}static isEmpty(t){return t.startLineNumber===t.endLineNumber&&t.startColumn===t.endColumn}containsPosition(t){return r.containsPosition(this,t)}static containsPosition(t,e){return!(e.lineNumber<t.startLineNumber||e.lineNumber>t.endLineNumber||e.lineNumber===t.startLineNumber&&e.column<t.startColumn||e.lineNumber===t.endLineNumber&&e.column>t.endColumn)}static strictContainsPosition(t,e){return!(e.lineNumber<t.startLineNumber||e.lineNumber>t.endLineNumber||e.lineNumber===t.startLineNumber&&e.column<=t.startColumn||e.lineNumber===t.endLineNumber&&e.column>=t.endColumn)}containsRange(t){return r.containsRange(this,t)}static containsRange(t,e){return!(e.startLineNumber<t.startLineNumber||e.endLineNumber<t.startLineNumber||e.startLineNumber>t.endLineNumber||e.endLineNumber>t.endLineNumber||e.startLineNumber===t.startLineNumber&&e.startColumn<t.startColumn||e.endLineNumber===t.endLineNumber&&e.endColumn>t.endColumn)}strictContainsRange(t){return r.strictContainsRange(this,t)}static strictContainsRange(t,e){return!(e.startLineNumber<t.startLineNumber||e.endLineNumber<t.startLineNumber||e.startLineNumber>t.endLineNumber||e.endLineNumber>t.endLineNumber||e.startLineNumber===t.startLineNumber&&e.startColumn<=t.startColumn||e.endLineNumber===t.endLineNumber&&e.endColumn>=t.endColumn)}plusRange(t){return r.plusRange(this,t)}static plusRange(t,e){let n,o,i,s;return e.startLineNumber<t.startLineNumber?(n=e.startLineNumber,o=e.startColumn):e.startLineNumber===t.startLineNumber?(n=e.startLineNumber,o=Math.min(e.startColumn,t.startColumn)):(n=t.startLineNumber,o=t.startColumn),e.endLineNumber>t.endLineNumber?(i=e.endLineNumber,s=e.endColumn):e.endLineNumber===t.endLineNumber?(i=e.endLineNumber,s=Math.max(e.endColumn,t.endColumn)):(i=t.endLineNumber,s=t.endColumn),new r(n,o,i,s)}intersectRanges(t){return r.intersectRanges(this,t)}static intersectRanges(t,e){let n=t.startLineNumber,o=t.startColumn,i=t.endLineNumber,s=t.endColumn,a=e.startLineNumber,l=e.startColumn,d=e.endLineNumber,c=e.endColumn;return n<a?(n=a,o=l):n===a&&(o=Math.max(o,l)),i>d?(i=d,s=c):i===d&&(s=Math.min(s,c)),n>i||n===i&&o>s?null:new r(n,o,i,s)}equalsRange(t){return r.equalsRange(this,t)}static equalsRange(t,e){return!t&&!e?!0:!!t&&!!e&&t.startLineNumber===e.startLineNumber&&t.startColumn===e.startColumn&&t.endLineNumber===e.endLineNumber&&t.endColumn===e.endColumn}getEndPosition(){return r.getEndPosition(this)}static getEndPosition(t){return new In(t.endLineNumber,t.endColumn)}getStartPosition(){return r.getStartPosition(this)}static getStartPosition(t){return new In(t.startLineNumber,t.startColumn)}toString(){return"["+this.startLineNumber+","+this.startColumn+" -> "+this.endLineNumber+","+this.endColumn+"]"}setEndPosition(t,e){return new r(this.startLineNumber,this.startColumn,t,e)}setStartPosition(t,e){return new r(t,e,this.endLineNumber,this.endColumn)}collapseToStart(){return r.collapseToStart(this)}static collapseToStart(t){return new r(t.startLineNumber,t.startColumn,t.startLineNumber,t.startColumn)}collapseToEnd(){return r.collapseToEnd(this)}static collapseToEnd(t){return new r(t.endLineNumber,t.endColumn,t.endLineNumber,t.endColumn)}delta(t){return new r(this.startLineNumber+t,this.startColumn,this.endLineNumber+t,this.endColumn)}isSingleLine(){return this.startLineNumber===this.endLineNumber}static fromPositions(t,e=t){return new r(t.lineNumber,t.column,e.lineNumber,e.column)}static lift(t){return t?new r(t.startLineNumber,t.startColumn,t.endLineNumber,t.endColumn):null}static isIRange(t){return!!t&&typeof t.startLineNumber=="number"&&typeof t.startColumn=="number"&&typeof t.endLineNumber=="number"&&typeof t.endColumn=="number"}static areIntersectingOrTouching(t,e){return!(t.endLineNumber<e.startLineNumber||t.endLineNumber===e.startLineNumber&&t.endColumn<e.startColumn||e.endLineNumber<t.startLineNumber||e.endLineNumber===t.startLineNumber&&e.endColumn<t.startColumn)}static areIntersecting(t,e){return!(t.endLineNumber<e.startLineNumber||t.endLineNumber===e.startLineNumber&&t.endColumn<=e.startColumn||e.endLineNumber<t.startLineNumber||e.endLineNumber===t.startLineNumber&&e.endColumn<=t.startColumn)}static areOnlyIntersecting(t,e){return!(t.endLineNumber<e.startLineNumber-1||t.endLineNumber===e.startLineNumber&&t.endColumn<e.startColumn-1||e.endLineNumber<t.startLineNumber-1||e.endLineNumber===t.startLineNumber&&e.endColumn<t.startColumn-1)}static compareRangesUsingStarts(t,e){if(t&&e){let i=t.startLineNumber|0,s=e.startLineNumber|0;if(i===s){let a=t.startColumn|0,l=e.startColumn|0;if(a===l){let d=t.endLineNumber|0,c=e.endLineNumber|0;if(d===c){let u=t.endColumn|0,f=e.endColumn|0;return u-f}return d-c}return a-l}return i-s}return(t?1:0)-(e?1:0)}static compareRangesUsingEnds(t,e){return t.endLineNumber===e.endLineNumber?t.endColumn===e.endColumn?t.startLineNumber===e.startLineNumber?t.startColumn-e.startColumn:t.startLineNumber-e.startLineNumber:t.endColumn-e.endColumn:t.endLineNumber-e.endLineNumber}static spansMultipleLines(t){return t.endLineNumber>t.startLineNumber}toJSON(){return this}};var Bb=class{constructor(){this._tokenizationSupports=new Map;this._factories=new Map;this._onDidChange=new D;this.onDidChange=this._onDidChange.event;this._colorMap=null}handleChange(t){this._onDidChange.fire({changedLanguages:t,changedColorMap:!1})}register(t,e){return this._tokenizationSupports.set(t,e),this.handleChange([t]),ae(()=>{this._tokenizationSupports.get(t)===e&&(this._tokenizationSupports.delete(t),this.handleChange([t]))})}get(t){return this._tokenizationSupports.get(t)||null}registerFactory(t,e){this._factories.get(t)?.dispose();let n=new LD(this,t,e);return this._factories.set(t,n),ae(()=>{let o=this._factories.get(t);!o||o!==n||(this._factories.delete(t),o.dispose())})}async getOrCreate(t){let e=this.get(t);if(e)return e;let n=this._factories.get(t);return!n||n.isResolved?null:(await n.resolve(),this.get(t))}isResolved(t){if(this.get(t))return!0;let n=this._factories.get(t);return!!(!n||n.isResolved)}setColorMap(t){this._colorMap=t,this._onDidChange.fire({changedLanguages:Array.from(this._tokenizationSupports.keys()),changedColorMap:!0})}getColorMap(){return this._colorMap}getDefaultBackground(){return this._colorMap&&this._colorMap.length>2?this._colorMap[2]:null}},LD=class extends K{constructor(e,n,o){super();this._registry=e;this._languageId=n;this._factory=o;this._isDisposed=!1;this._resolvePromise=null;this._isResolved=!1}get isResolved(){return this._isResolved}dispose(){this._isDisposed=!0,super.dispose()}async resolve(){return this._resolvePromise||(this._resolvePromise=this._create()),this._resolvePromise}async _create(){let e=await this._factory.tokenizationSupport;this._isResolved=!0,e&&!this._isDisposed&&this._register(this._registry.register(this._languageId,e))}};var s6;(i=>{let r=new Map;r.set(0,fe.symbolMethod),r.set(1,fe.symbolFunction),r.set(2,fe.symbolConstructor),r.set(3,fe.symbolField),r.set(4,fe.symbolVariable),r.set(5,fe.symbolClass),r.set(6,fe.symbolStruct),r.set(7,fe.symbolInterface),r.set(8,fe.symbolModule),r.set(9,fe.symbolProperty),r.set(10,fe.symbolEvent),r.set(11,fe.symbolOperator),r.set(12,fe.symbolUnit),r.set(13,fe.symbolValue),r.set(15,fe.symbolEnum),r.set(14,fe.symbolConstant),r.set(15,fe.symbolEnum),r.set(16,fe.symbolEnumMember),r.set(17,fe.symbolKeyword),r.set(28,fe.symbolSnippet),r.set(18,fe.symbolText),r.set(19,fe.symbolColor),r.set(20,fe.symbolFile),r.set(21,fe.symbolReference),r.set(22,fe.symbolCustomColor),r.set(23,fe.symbolFolder),r.set(24,fe.symbolTypeParameter),r.set(25,fe.account),r.set(26,fe.issues),r.set(27,fe.tools);function t(s){let a=r.get(s);return a||(console.info("No codicon found for CompletionItemKind "+s),a=fe.symbolProperty),a}i.toIcon=t;function e(s){switch(s){case 0:return p(893,null);case 1:return p(889,null);case 2:return p(881,null);case 3:return p(886,null);case 4:return p(906,null);case 5:return p(878,null);case 6:return p(899,null);case 7:return p(890,null);case 8:return p(894,null);case 9:return p(896,null);case 10:return p(885,null);case 11:return p(895,null);case 12:return p(903,null);case 13:return p(905,null);case 14:return p(880,null);case 15:return p(883,null);case 16:return p(884,null);case 17:return p(892,null);case 18:return p(900,null);case 19:return p(879,null);case 20:return p(887,null);case 21:return p(897,null);case 22:return p(882,null);case 23:return p(888,null);case 24:return p(902,null);case 25:return p(904,null);case 26:return p(891,null);case 27:return p(901,null);case 28:return p(898,null);default:return""}}i.toLabel=e;let n=new Map;n.set("method",0),n.set("function",1),n.set("constructor",2),n.set("field",3),n.set("variable",4),n.set("class",5),n.set("struct",6),n.set("interface",7),n.set("module",8),n.set("property",9),n.set("event",10),n.set("operator",11),n.set("unit",12),n.set("value",13),n.set("constant",14),n.set("enum",15),n.set("enum-member",16),n.set("enumMember",16),n.set("keyword",17),n.set("snippet",28),n.set("text",18),n.set("color",19),n.set("file",20),n.set("reference",21),n.set("customcolor",22),n.set("folder",23),n.set("type-parameter",24),n.set("typeParameter",24),n.set("account",25),n.set("issue",26),n.set("tool",27);function o(s,a){let l=n.get(s);return typeof l>"u"&&!a&&(l=9),l}i.fromString=o})(s6||={});function JF(r){return!!r&&E.isUri(r.uri)&&Ke.isIRange(r.range)&&(Ke.isIRange(r.originSelectionRange)||Ke.isIRange(r.targetSelectionRange))}function jF(r){return!!r&&E.isUri(r.uri)&&Ke.isIRange(r.range)}var ste={17:p(854,null),16:p(855,null),4:p(856,null),13:p(857,null),8:p(858,null),9:p(859,null),21:p(860,null),23:p(861,null),7:p(862,null),0:p(863,null),11:p(864,null),10:p(865,null),19:p(866,null),5:p(867,null),1:p(868,null),2:p(869,null),20:p(870,null),15:p(871,null),18:p(872,null),24:p(873,null),3:p(874,null),6:p(875,null),14:p(876,null),22:p(877,null),25:p(908,null),12:p(909,null)};var MD;(o=>{let r=new Map;r.set(0,fe.symbolFile),r.set(1,fe.symbolModule),r.set(2,fe.symbolNamespace),r.set(3,fe.symbolPackage),r.set(4,fe.symbolClass),r.set(5,fe.symbolMethod),r.set(6,fe.symbolProperty),r.set(7,fe.symbolField),r.set(8,fe.symbolConstructor),r.set(9,fe.symbolEnum),r.set(10,fe.symbolInterface),r.set(11,fe.symbolFunction),r.set(12,fe.symbolVariable),r.set(13,fe.symbolConstant),r.set(14,fe.symbolString),r.set(15,fe.symbolNumber),r.set(16,fe.symbolBoolean),r.set(17,fe.symbolArray),r.set(18,fe.symbolObject),r.set(19,fe.symbolKey),r.set(20,fe.symbolNull),r.set(21,fe.symbolEnumMember),r.set(22,fe.symbolStruct),r.set(23,fe.symbolEvent),r.set(24,fe.symbolOperator),r.set(25,fe.symbolTypeParameter),r.set(26,fe.symbolMisc);function t(i){let s=r.get(i);return s||(console.info("No codicon found for SymbolKind "+i),s=fe.symbolProperty),s}o.toIcon=t;let e=new Map;e.set(0,20),e.set(1,8),e.set(2,8),e.set(3,8),e.set(4,5),e.set(5,0),e.set(6,9),e.set(7,3),e.set(8,2),e.set(9,15),e.set(10,7),e.set(11,1),e.set(12,4),e.set(13,14),e.set(14,18),e.set(15,13),e.set(16,13),e.set(17,13),e.set(18,13),e.set(19,17),e.set(20,13),e.set(21,16),e.set(22,6),e.set(23,10),e.set(24,11),e.set(25,24),e.set(26,18);function n(i){let s=e.get(i);return s===void 0&&(console.info("No completion kind found for SymbolKind "+i),s=20),s}o.toCompletionKind=n})(MD||={});var Cs=class r{constructor(t){this.value=t}static{this.Comment=new r("comment")}static{this.Imports=new r("imports")}static{this.Region=new r("region")}static fromValue(t){switch(t){case"comment":return r.Comment;case"imports":return r.Imports;case"region":return r.Region}return new r(t)}};var ND;(t=>{function r(e){return!e||typeof e!="object"?!1:typeof e.id=="string"&&typeof e.title=="string"}t.is=r})(ND||={});var ate=new Bb;var UD=(o=>(o[o.Left=1]="Left",o[o.Center=2]="Center",o[o.Right=4]="Right",o[o.Full=7]="Full",o))(UD||{});var Ed=class{constructor(t,e){this._findMatchBrand=void 0;this.range=t,this.matches=e}};var Wb=class{constructor(t,e,n){this.regex=t,this.wordSeparators=e,this.simpleSearch=n}},$b=class{constructor(t,e,n){this.reverseEdits=t;this.changes=e;this.trimAutoWhitespaceLineNumbers=n}};var gu=(o=>(o[o.Hint=1]="Hint",o[o.Info=2]="Info",o[o.Warning=4]="Warning",o[o.Error=8]="Error",o))(gu||{});(a=>{function r(l,d){return d-l}a.compare=r;let t=Object.create(null);t[8]=p(2154,null),t[4]=p(2158,null),t[2]=p(2156,null);function e(l){return t[l]||""}a.toString=e;let n=Object.create(null);n[8]=p(2155,null),n[4]=p(2159,null),n[2]=p(2157,null);function o(l){return n[l]||""}a.toStringPlural=o;function i(l){switch(l){case tt.Error:return 8;case tt.Warning:return 4;case tt.Info:return 2;case tt.Ignore:return 1}}a.fromSeverity=i;function s(l){switch(l){case 8:return tt.Error;case 4:return tt.Warning;case 2:return tt.Info;case 1:return tt.Ignore}}a.toSeverity=s})(gu||={});var a6;(n=>{function t(o){return e(o,!0)}n.makeKey=t;function e(o,i){let s=[""];return o.source?s.push(o.source.replace("\xA6","\\\xA6")):s.push(""),o.code?typeof o.code=="string"?s.push(o.code.replace("\xA6","\\\xA6")):s.push(o.code.value.replace("\xA6","\\\xA6")):s.push(""),o.severity!==void 0&&o.severity!==null?s.push(gu.toString(o.severity)):s.push(""),o.message&&i?s.push(o.message.replace("\xA6","\\\xA6")):s.push(""),o.startLineNumber!==void 0&&o.startLineNumber!==null?s.push(o.startLineNumber.toString()):s.push(""),o.startColumn!==void 0&&o.startColumn!==null?s.push(o.startColumn.toString()):s.push(""),o.endLineNumber!==void 0&&o.endLineNumber!==null?s.push(o.endLineNumber.toString()):s.push(""),o.endColumn!==void 0&&o.endColumn!==null?s.push(o.endColumn.toString()):s.push(""),s.push(""),s.join("\xA6")}n.makeKeyOptionalMessage=e})(a6||={});var mte=N("markerService");var l6=N("progressService");var yte=Object.freeze({total(){},worked(){},done(){}}),Ma=class{constructor(t){this.callback=t}static{this.None=Object.freeze({report(){}})}get value(){return this._value}report(t){this._value=t,this.callback(this._value)}},Gb=class extends K{constructor(e,n){super();this.deferred=new jn;n.withProgress(e,o=>(this.reporter=o,this.lastStep&&o.report(this.lastStep),this.deferred.p)),this._register(ae(()=>this.deferred.complete()))}report(e){this.reporter?this.reporter.report(e):this.lastStep=e}};Gb=L([P(1,l6)],Gb);var Ete=N("editorProgressService");var FD=class{constructor(){this.data=new Map}add(t,e){kn(Me(t)),kn(mt(e)),kn(!this.data.has(t),"There is already an extension with this id"),this.data.set(t,e)}knows(t){return this.data.has(t)}as(t){return this.data.get(t)||null}dispose(){this.data.forEach(t=>{i_(t.dispose)&&t.dispose()}),this.data.clear()}},ht=new FD;var HD=class extends K{constructor(e,n="",o="",i=!0,s){super();this._onDidChange=this._register(new D);this._enabled=!0;this._id=e,this._label=n,this._cssClass=o,this._enabled=i,this._actionCallback=s}get onDidChange(){return this._onDidChange.event}get id(){return this._id}get label(){return this._label}set label(e){this._setLabel(e)}_setLabel(e){this._label!==e&&(this._label=e,this._onDidChange.fire({label:e}))}get tooltip(){return this._tooltip||""}set tooltip(e){this._setTooltip(e)}_setTooltip(e){this._tooltip!==e&&(this._tooltip=e,this._onDidChange.fire({tooltip:e}))}get class(){return this._cssClass}set class(e){this._setClass(e)}_setClass(e){this._cssClass!==e&&(this._cssClass=e,this._onDidChange.fire({class:e}))}get enabled(){return this._enabled}set enabled(e){this._setEnabled(e)}_setEnabled(e){this._enabled!==e&&(this._enabled=e,this._onDidChange.fire({enabled:e}))}get checked(){return this._checked}set checked(e){this._setChecked(e)}_setChecked(e){this._checked!==e&&(this._checked=e,this._onDidChange.fire({checked:e}))}async run(e,n){this._actionCallback&&await this._actionCallback(e)}};var XF=class r{constructor(){this.id=r.ID;this.label="";this.tooltip="";this.class="separator";this.enabled=!1;this.checked=void 0}static join(...t){let e=[];for(let n of t)n.length&&(e.length?e=[...e,new r,...n]:e=n);return e}static{this.ID="vs.actions.separator"}async run(){}};var YF=class r extends HD{static{this.ID="vs.actions.empty"}constructor(){super(r.ID,p(47,null),void 0,!1)}};var ZF={EditorPane:"workbench.contributions.editors",EditorFactory:"workbench.contributions.editor.inputFactories",EditorTitleControlContribution:"workbench.contributions.editorTitleControls",WindsurfAgentWindowWelcomeContribution:"workbench.contributions.windsurfAgentWindowWelcome"},$D={id:"default",displayName:p(4708,null),providerDisplayName:p(4705,null)};var e2="workbench.editors.textDiffEditor",t2="workbench.editors.binaryResourceDiffEditor";function qb(r,t,e){for(let n of e.visibleEditorPanes)if(n.group.id===t&&r.matches(n.input))return n.getViewState()}function n2(r){if(Vo(r))return!1;let t=r;return E.isUri(t?.resource)}function jr(r){if(Vo(r))return!1;let t=r;return t?.original!==void 0&&t.modified!==void 0}function hu(r){if(Vo(r))return!1;let t=r;return!t||t.resources&&!Array.isArray(t.resources)?!1:!!t.resources||!!t.multiDiffSource}function Ua(r){if(Vo(r)||jr(r))return!1;let t=r;return t?.primary!==void 0&&t.secondary!==void 0}function Na(r){if(Vo(r))return!1;let t=r;return E.isUri(t?.base?.resource)&&E.isUri(t?.input1?.resource)&&E.isUri(t?.input2?.resource)&&E.isUri(t?.result?.resource)}var BD=class{constructor(){this.mapIdToSaveSource=new Map}registerSource(t,e){let n=this.mapIdToSaveSource.get(t);return n||(n={source:t,label:e},this.mapIdToSaveSource.set(t,n)),n.source}getSourceLabel(t){return this.mapIdToSaveSource.get(t)?.label??t}},Yte=new BD;var ag=class extends K{};function Vo(r){return r instanceof ag}function d6(r){let t=r;return E.isUri(t?.preferredResource)}function c6(r){let t=r;return Vo(t?.primary)&&Vo(t?.secondary)}function GD(r){let t=r;return Vo(t?.modified)&&Vo(t?.original)}var VD=class{getOriginalUri(t,e){if(!t)return;if(Na(t))return zb.getOriginalUri(t.result,e);if(e?.supportSideBySide){let{primary:o,secondary:i}=this.getSideEditors(t);if(o&&i){if(e?.supportSideBySide===3)return{primary:this.getOriginalUri(o,{filterByScheme:e.filterByScheme}),secondary:this.getOriginalUri(i,{filterByScheme:e.filterByScheme})};if(e?.supportSideBySide===4)return this.getOriginalUri(o,{filterByScheme:e.filterByScheme})??this.getOriginalUri(i,{filterByScheme:e.filterByScheme});t=e.supportSideBySide===1?o:i}}if(jr(t)||hu(t)||Ua(t)||Na(t))return;let n=d6(t)?t.preferredResource:t.resource;return!n||!e?.filterByScheme?n:this.filterUri(n,e.filterByScheme)}getSideEditors(t){return c6(t)||Ua(t)?{primary:t.primary,secondary:t.secondary}:GD(t)||jr(t)?{primary:t.modified,secondary:t.original}:{primary:void 0,secondary:void 0}}getCanonicalUri(t,e){if(!t)return;if(Na(t))return zb.getCanonicalUri(t.result,e);if(e?.supportSideBySide){let{primary:o,secondary:i}=this.getSideEditors(t);if(o&&i){if(e?.supportSideBySide===3)return{primary:this.getCanonicalUri(o,{filterByScheme:e.filterByScheme}),secondary:this.getCanonicalUri(i,{filterByScheme:e.filterByScheme})};if(e?.supportSideBySide===4)return this.getCanonicalUri(o,{filterByScheme:e.filterByScheme})??this.getCanonicalUri(i,{filterByScheme:e.filterByScheme});t=e.supportSideBySide===1?o:i}}if(jr(t)||hu(t)||Ua(t)||Na(t))return;let n=t.resource;return!n||!e?.filterByScheme?n:this.filterUri(n,e.filterByScheme)}filterUri(t,e){if(Array.isArray(e)){if(e.some(n=>t.scheme===n))return t}else if(e===t.scheme)return t}};var zb=new VD;var WD=class{constructor(){this.editorSerializerConstructors=new Map;this.editorSerializerInstances=new Map}start(t){let e=this.instantiationService=t.get(ko);for(let[n,o]of this.editorSerializerConstructors)this.createEditorSerializer(n,o,e);this.editorSerializerConstructors.clear()}createEditorSerializer(t,e,n){let o=n.createInstance(e);this.editorSerializerInstances.set(t,o)}registerFileEditorFactory(t){if(this.fileEditorFactory)throw new Error("Can only register one file editor factory.");this.fileEditorFactory=t}getFileEditorFactory(){return Ur(this.fileEditorFactory)}registerEditorSerializer(t,e){if(this.editorSerializerConstructors.has(t)||this.editorSerializerInstances.has(t))throw new Error(`A editor serializer with type ID '${t}' was already registered.`);return this.instantiationService?this.createEditorSerializer(t,e,this.instantiationService):this.editorSerializerConstructors.set(t,e),ae(()=>{this.editorSerializerConstructors.delete(t),this.editorSerializerInstances.delete(t)})}getEditorSerializer(t){return this.editorSerializerInstances.get(typeof t=="string"?t:t.typeId)}};ht.add(ZF.EditorFactory,new WD);var zD="local";var u6=N("chatSessionsService");var Fa;(s=>{s.scheme=X.vscodeLocalChatSession;function t(a){let l=mr(ce.wrap(new TextEncoder().encode(a)),!1,!0);return E.from({scheme:s.scheme,authority:zD,path:"/"+l})}s.forSession=t;function e(){let a=Math.floor(Math.random()*1e9);return t(`chat-${a}`)}s.getNewSessionUri=e;function n(a){let l=i(a);return l?.chatSessionType===zD?l.sessionId:void 0}s.parseLocalSessionId=n;function o(a){return!!n(a)}s.isLocalSession=o;function i(a){if(a.scheme!==s.scheme||!a.authority)return;let l=a.path.split("/");if(l.length!==2)return;let d=a.authority,c=Qo(l[1]);return{chatSessionType:d,sessionId:new TextDecoder().decode(c.buffer)}}})(Fa||={});function o2(r){let t=Fa.parseLocalSessionId(r);return t||r.toString()}var qD;(i=>{i.icon=fe.error;function t(s){return{filterUri:s.resource,owner:s.owner,problemMessage:s.message,filterRange:{startLineNumber:s.startLineNumber,endLineNumber:s.endLineNumber,startColumn:s.startColumn,endColumn:s.endColumn}}}i.fromMarker=t;function e(s){return{id:n(s),name:o(s),icon:i.icon,value:s,kind:"diagnostic",...s}}i.toEntry=e;function n(s){return[s.filterUri,s.owner,s.filterSeverity,s.filterRange?.startLineNumber,s.filterRange?.startColumn].join(":")}i.id=n;function o(s){let a;if((u=>(u[u.MaxChars=30]="MaxChars",u[u.MaxSpaceLookback=10]="MaxSpaceLookback"))(a||={}),s.problemMessage){if(s.problemMessage.length<30)return s.problemMessage;let d=s.problemMessage.lastIndexOf(" ",30);return d===-1||d+10<30?s.problemMessage.substring(0,30)+"\u2026":s.problemMessage.substring(0,d)+"\u2026"}let l=p(7148,null);return s.filterUri&&(l=p(7149,null,tn(s.filterUri))),l}i.label=o})(qD||={});var KD;(n=>{function r(o){return E.isUri(o.value)?o.value:jF(o.value)?o.value.uri:void 0}n.toUri=r;function t(o){if(o.value instanceof Uint8Array){let i={...o};return i.value={$base64:mr(ce.wrap(o.value))},i}return o}n.toExport=t;function e(o){if(o&&"values"in o&&Array.isArray(o.values))return{kind:"generic",id:o.id??"",name:o.name,value:o.values[0]?.value,range:o.range,modelDescription:o.modelDescription,references:o.references};if(o.value&&typeof o.value=="object"&&"$base64"in o.value&&typeof o.value.$base64=="string"){let i={...o};return i.value=Qo(o.value.$base64).buffer,i}return o}n.fromExport=e})(KD||={});function r2(r){return r.kind==="image"}function lg(r){return r.kind==="promptFile"}function i2(r){return r.kind==="promptText"}function Kb(r,t,e,n=!1,o){return{id:`${t}__${r.toString()}`,name:`prompt:${tn(r)}`,value:r,kind:"promptFile",modelDescription:"Prompt instructions file",isRoot:t!=="vscode.prompt.instructions",originLabel:e,toolReferences:o,automaticallyAdded:n}}function s2(r,t=!1,e){return{id:"vscode.prompt.instructions.text",name:"prompt:instructionsList",value:r,kind:"promptText",modelDescription:"Prompt instructions list",automaticallyAdded:t,toolReferences:e}}function a2(r,t){return{kind:"tool",id:r.id,icon:Tt.isThemeIcon(r.icon)?r.icon:void 0,name:r.displayName,value:void 0,range:t}}var Sd=class{constructor(t){this._ids=new Set;this._entries=[];t&&this.add(...t)}add(...t){for(let e of t)this._ids.has(e.id)||(this._ids.add(e.id),this._entries.push(e))}insertFirst(t){this._ids.has(t.id)||(this._ids.add(t.id),this._entries.unshift(t))}remove(t){this._ids.delete(t.id),this._entries=this._entries.filter(e=>e.id!==t.id)}has(t){return this._ids.has(t.id)}asArray(){return this._entries.slice(0)}get length(){return this._entries.length}};var Ri=(o=>(o.Chat="panel",o.Terminal="terminal",o.Notebook="notebook",o.EditorInline="editor",o))(Ri||{});(t=>{function r(e){switch(e){case"panel":return"panel";case"terminal":return"terminal";case"notebook":return"notebook";case"editor":return"editor"}return"panel"}t.fromRaw=r})(Ri||={});var Ene=new Set([X.vscodeChatEditor,X.walkThrough,X.vscodeLocalChatSession,X.vscodeSettings,X.webviewPanel,X.vscodeUserData,X.extension,"ccreq","openai-codex"]);var Sne=new w("inModelsEditor",!1),xne=new w("inModelsSearch",!1);function vu(r,t=Rt){return kU(r,t)?r.charAt(0).toUpperCase()+r.slice(1):r}function JD(r,t){return r.replace(/^~($|\/|\\)/,`${t}$1`)}var l2="\u2026",dg="\\\\",cg="~";function d2(r,t=Bn){let e=new Array(r.length),n=!1;for(let o=0;o<r.length;o++){let i=r[o];if(i===""){e[o]=`.${t}`;continue}if(!i){e[o]=i;continue}n=!0;let s="",a=i;a.indexOf(dg)===0?(s=a.substr(0,a.indexOf(dg)+dg.length),a=a.substr(a.indexOf(dg)+dg.length)):a.indexOf(t)===0?(s=a.substr(0,a.indexOf(t)+t.length),a=a.substr(a.indexOf(t)+t.length)):a.indexOf(cg)===0&&(s=a.substr(0,a.indexOf(cg)+cg.length),a=a.substr(a.indexOf(cg)+cg.length));let l=a.split(t);for(let d=1;n&&d<=l.length;d++)for(let c=l.length-d;n&&c>=0;c--){n=!1;let u=l.slice(c,c+d).join(t);for(let f=0;!n&&f<r.length;f++)if(f!==o&&r[f]&&r[f].indexOf(u)>-1){let g=c+d===l.length,I=c>0&&r[f].indexOf(t)>-1?t+u:u,h=r[f].endsWith(I);n=!g||h}if(!n){let f="";(l[0].endsWith(":")||s!=="")&&(c===1&&(c=0,d++,u=l[0]+t+u),c>0&&(f=l[0]+t),f=s+f),c>0&&(f=f+l2+t),f=f+u,c+d<l.length&&(f=f+t+l2),e[o]=f}}n&&(e[o]=i)}return e}var Nne=[{id:"SessionStart",label:p(7253,null),description:p(7252,null)},{id:"UserPromptSubmit",label:p(7261,null),description:p(7260,null)},{id:"PreToolUse",label:p(7251,null),description:p(7250,null)},{id:"PostToolUse",label:p(7247,null),description:p(7246,null)},{id:"PreCompact",label:p(7249,null),description:p(7248,null)},{id:"SubagentStart",label:p(7257,null),description:p(7256,null)},{id:"SubagentStop",label:p(7259,null),description:p(7258,null)},{id:"Stop",label:p(7255,null),description:p(7254,null)}],p6={type:"object",additionalProperties:!0,required:["type"],anyOf:[{required:["command"]},{required:["windows"]},{required:["linux"]},{required:["osx"]},{required:["bash"]},{required:["powershell"]}],errorMessage:p(7219,null),properties:{type:{type:"string",enum:["command"],description:p(7227,null)},command:{type:"string",description:p(7218,null)},windows:{type:"string",description:p(7228,null)},linux:{type:"string",description:p(7222,null)},osx:{type:"string",description:p(7223,null)},cwd:{type:"string",description:p(7220,null)},env:{type:"object",additionalProperties:{type:"string"},description:p(7221,null)},timeout:{type:"number",default:30,description:p(7225,null)}}},Ha={type:"array",items:p6},m6={SessionStart:{...Ha,description:p(7238,null)},UserPromptSubmit:{...Ha,description:p(7244,null)},PreToolUse:{...Ha,description:p(7237,null)},PostToolUse:{...Ha,description:p(7235,null)},PreCompact:{...Ha,description:p(7236,null)},SubagentStart:{...Ha,description:p(7242,null)},SubagentStop:{...Ha,description:p(7243,null)},Stop:{...Ha,description:p(7241,null)}},f6={type:"object",additionalProperties:!0,required:["type"],anyOf:[{required:["bash"]},{required:["powershell"]}],errorMessage:p(7217,null),properties:{type:{type:"string",enum:["command"],description:p(7227,null)},bash:{type:"string",description:p(7216,null)},powershell:{type:"string",description:p(7224,null)},cwd:{type:"string",description:p(7220,null)},env:{type:"object",additionalProperties:{type:"string"},description:p(7221,null)},timeoutSec:{type:"number",default:10,description:p(7226,null)}}},Jb={type:"array",items:f6},g6={sessionStart:{...Jb,description:p(7231,null)},userPromptSubmitted:{...Jb,description:p(7232,null)},preToolUse:{...Jb,description:p(7230,null)},postToolUse:{...Jb,description:p(7229,null)}},Une={$schema:"http://json-schema.org/draft-07/schema#",type:"object",description:p(7233,null),additionalProperties:!0,required:["hooks"],properties:{hooks:{type:"object",description:p(7234,null),additionalProperties:!0}},if:{required:["version"],properties:{version:{type:"number"}}},then:{properties:{version:{type:"number",description:p(7245,null)},hooks:{properties:g6}}},else:{properties:{hooks:{properties:m6}}},defaultSnippets:[{label:p(7239,null),description:p(7240,null),body:{hooks:{SessionStart:[{type:"command",command:'${1:echo "Session started" >> session.log}'}],PreToolUse:[{type:"command",command:"${2:./scripts/validate.sh}",timeout:15}]}}}]};function c2(r,t){return t===1&&r.windows?r.windows:t===2&&r.osx?r.osx:t===3&&r.linux?r.linux:r.command}var Eo=class{constructor(t,e,n){this.owner=t;this.debugNameSource=e;this.referenceFn=n}getDebugName(t){return f2(t,this)}},u2=new Map,jD=new WeakMap;function f2(r,t){let e=jD.get(r);if(e)return e;let n=h6(r,t);if(n){let o=u2.get(n)??0;o++,u2.set(n,o);let i=o===1?n:`${n}#${o}`;return jD.set(r,i),i}}function h6(r,t){let e=jD.get(r);if(e)return e;let n=t.owner?b6(t.owner)+".":"",o,i=t.debugNameSource;if(i!==void 0)if(typeof i=="function"){if(o=i(),o!==void 0)return n+o}else return n+i;let s=t.referenceFn;if(s!==void 0&&(o=ug(s),o!==void 0))return n+o;if(t.owner!==void 0){let a=v6(t.owner,r);if(a!==void 0)return n+a}}function v6(r,t){for(let e in r)if(r[e]===t)return e}var p2=new Map,m2=new WeakMap;function b6(r){let t=m2.get(r);if(t)return t;let e=QD(r)??"Object",n=p2.get(e)??0;n++,p2.set(e,n);let o=n===1?e:`${e}#${n}`;return m2.set(r,o),o}function QD(r){let t=r.constructor;if(t)return t.name==="Object"?void 0:t.name}function ug(r){let t=r.toString(),n=/\/\*\*\s*@description\s*([^*]*)\*\//.exec(t);return(n?n[1]:void 0)?.trim()}function Sr(r,t){return r===t}function I6(){return(r,t)=>r===t}function y6(r,t,e){return Zt(r,t,e??Sr)}function E6(r){return(t,e)=>Zt(t,e,r??Sr)}function bu(r,t){if(r===t)return!0;if(Array.isArray(r)&&Array.isArray(t)){if(r.length!==t.length)return!1;for(let e=0;e<r.length;e++)if(!bu(r[e],t[e]))return!1;return!0}if(r&&typeof r=="object"&&t&&typeof t=="object"&&Object.getPrototypeOf(r)===Object.prototype&&Object.getPrototypeOf(t)===Object.prototype){let e=r,n=t,o=Object.keys(e),i=Object.keys(n),s=new Set(i);if(o.length!==i.length)return!1;for(let a of o)if(!s.has(a)||!bu(e[a],n[a]))return!1;return!0}return!1}function S6(){return(r,t)=>bu(r,t)}function x6(r,t){return JSON.stringify(r)===JSON.stringify(t)}function C6(){return(r,t)=>JSON.stringify(r)===JSON.stringify(t)}function T6(){return(r,t)=>r.equals(t)}function _6(r,t,e){return r==null||t===void 0||t===null?t===r:e(r,t)}function P6(r){return(t,e)=>t==null||e===void 0||e===null?e===t:r(t,e)}var D6;(u=>(u.strict=Sr,u.strictC=I6,u.array=y6,u.arrayC=E6,u.structural=bu,u.structuralC=S6,u.jsonStringify=x6,u.jsonStringifyC=C6,u.thisC=T6,u.ifDefined=_6,u.ifDefinedC=P6))(D6||={});function XD(r){let t=new Error("BugIndicatingErrorRecovery: "+r);Ct(t),console.error("recovered from an error that indicates a bug",t)}var Cd;function pg(r){Cd?Cd instanceof jb?Cd.loggers.push(r):Cd=new jb([Cd,r]):Cd=r}function on(){return Cd}var YD;function g2(r){YD=r}function h2(r){YD&&YD(r)}var jb=class{constructor(t){this.loggers=t}handleObservableCreated(t,e){for(let n of this.loggers)n.handleObservableCreated(t,e)}handleOnListenerCountChanged(t,e){for(let n of this.loggers)n.handleOnListenerCountChanged(t,e)}handleObservableUpdated(t,e){for(let n of this.loggers)n.handleObservableUpdated(t,e)}handleAutorunCreated(t,e){for(let n of this.loggers)n.handleAutorunCreated(t,e)}handleAutorunDisposed(t){for(let e of this.loggers)e.handleAutorunDisposed(t)}handleAutorunDependencyChanged(t,e,n){for(let o of this.loggers)o.handleAutorunDependencyChanged(t,e,n)}handleAutorunStarted(t){for(let e of this.loggers)e.handleAutorunStarted(t)}handleAutorunFinished(t){for(let e of this.loggers)e.handleAutorunFinished(t)}handleDerivedDependencyChanged(t,e,n){for(let o of this.loggers)o.handleDerivedDependencyChanged(t,e,n)}handleDerivedCleared(t){for(let e of this.loggers)e.handleDerivedCleared(t)}handleBeginTransaction(t){for(let e of this.loggers)e.handleBeginTransaction(t)}handleEndTransaction(t){for(let e of this.loggers)e.handleEndTransaction(t)}};function Iu(r,t){let e=new Td(r,t);try{r(e)}finally{e.finish()}}function ZD(r,t,e){r?t(r):Iu(t,e)}var Td=class{constructor(t,e){this._fn=t;this._getDebugName=e;this._updatingObservers=[];on()?.handleBeginTransaction(this)}getDebugName(){return this._getDebugName?this._getDebugName():ug(this._fn)}updateObserver(t,e){if(!this._updatingObservers){XD("Transaction already finished!"),Iu(n=>{n.updateObserver(t,e)});return}this._updatingObservers.push({observer:t,observable:e}),t.beginUpdate(e)}finish(){let t=this._updatingObservers;if(!t){XD("transaction.finish() has already been called!");return}for(let e=0;e<t.length;e++){let{observer:n,observable:o}=t[e];n.endUpdate(o)}this._updatingObservers=null,on()?.handleEndTransaction(this)}debugGetUpdatingObservers(){return this._updatingObservers}};var Mn;(n=>{let r=!1;function t(){r=!0}n.enable=t;function e(){if(!r)return;let o=Error,i=o.stackTraceLimit;o.stackTraceLimit=3;let s=new Error().stack;return o.stackTraceLimit=i,ew.fromStack(s,2)}n.ofCaller=e})(Mn||={});var ew=class r{constructor(t,e,n,o){this.fileName=t;this.line=e;this.column=n;this.id=o}static fromStack(t,e){let n=t.split(`
`),o=w6(n[e+1]);if(o)return new r(o.fileName,o.line,o.column,o.id)}};function w6(r){let t=r.match(/\((.*):(\d+):(\d+)\)/);if(t)return{fileName:t[1],line:parseInt(t[2]),column:parseInt(t[3]),id:r};let e=r.match(/at ([^\(\)]*):(\d+):(\d+)/);if(e)return{fileName:e[1],line:parseInt(e[2]),column:parseInt(e[3]),id:r}}var tw;function v2(r){tw=r}var b2;function I2(r){b2=r}var y2;function E2(r){y2=r}var nw;function S2(r){nw=r}var Qb=class{get TChange(){return null}reportChanges(){this.get()}read(t){return t?t.readObservable(this):this.get()}map(t,e,n=Mn.ofCaller()){let o=e===void 0?void 0:t,i=e===void 0?t:e;return tw({owner:o,debugName:()=>{let s=ug(i);if(s!==void 0)return s;let l=/^\s*\(?\s*([a-zA-Z_$][a-zA-Z_$0-9]*)\s*\)?\s*=>\s*\1(?:\??)\.([a-zA-Z_$][a-zA-Z_$0-9]*)\s*$/.exec(i.toString());if(l)return`${this.debugName}.${l[2]}`;if(!o)return`${this.debugName} (mapped)`},debugReferenceFn:i},s=>i(this.read(s),s),n)}flatten(){return tw({owner:void 0,debugName:()=>`${this.debugName} (flattened)`},t=>this.read(t).read(t))}recomputeInitiallyAndOnChange(t,e){return t.add(b2(this,e)),this}keepObserved(t){return t.add(y2(this)),this}get debugValue(){return this.get()}get debug(){return new ow(this)}},ow=class{constructor(t){this.observable=t}getDependencyGraph(){return nw(this.observable,{type:"dependencies"})}getObserverGraph(){return nw(this.observable,{type:"observers"})}},Qr=class extends Qb{constructor(e){super();this._observers=new Set;on()?.handleObservableCreated(this,e)}addObserver(e){let n=this._observers.size;this._observers.add(e),n===0&&this.onFirstObserverAdded(),n!==this._observers.size&&on()?.handleOnListenerCountChanged(this,this._observers.size)}removeObserver(e){let n=this._observers.delete(e);n&&this._observers.size===0&&this.onLastObserverRemoved(),n&&on()?.handleOnListenerCountChanged(this,this._observers.size)}onFirstObserverAdded(){}onLastObserverRemoved(){}log(){let e=!!on();return h2(this),e||on()?.handleObservableCreated(this,Mn.ofCaller()),this}debugGetObservers(){return this._observers}};function _d(r,t,e=Mn.ofCaller()){let n;return typeof r=="string"?n=new Eo(void 0,r,void 0):n=new Eo(r,void 0,void 0),new Ts(n,t,Sr,e)}var Ts=class extends Qr{constructor(e,n,o,i){super(i);this._debugNameData=e;this._equalityComparator=o;this._value=n,on()?.handleObservableUpdated(this,{hadValue:!1,newValue:n,change:void 0,didChange:!0,oldValue:void 0})}get debugName(){return this._debugNameData.getDebugName(this)??"ObservableValue"}get(){return this._value}set(e,n,o){if(o===void 0&&this._equalityComparator(this._value,e))return;let i;n||(n=i=new Td(()=>{},()=>`Setting ${this.debugName}`));try{let s=this._value;this._setValue(e),on()?.handleObservableUpdated(this,{oldValue:s,newValue:e,change:o,didChange:!0,hadValue:!0});for(let a of this._observers)n.updateObserver(a,this),a.handleChange(this,o)}finally{i&&i.finish()}}toString(){return`${this.debugName}: ${this._value}`}_setValue(e){this._value=e}debugGetState(){return{value:this._value}}debugSetValue(e){this._value=e}};function R6(r){switch(r){case 1:return"dependenciesMightHaveChanged";case 2:return"stale";case 3:return"upToDate";default:return"<unknown>"}}var _s=class{constructor(t,e,n,o){this._debugNameData=t;this._runFn=e;this._changeTracker=n;this._state=2;this._updateCount=0;this._disposed=!1;this._dependencies=new Set;this._dependenciesToBeRemoved=new Set;this._isRunning=!1;this._iteration=0;this._store=void 0;this._delayedStore=void 0;this._changeSummary=this._changeTracker?.createChangeSummary(void 0),on()?.handleAutorunCreated(this,o),this._run(),Ia(this)}get debugName(){return this._debugNameData.getDebugName(this)??"(anonymous)"}dispose(){if(!this._disposed){this._disposed=!0;for(let t of this._dependencies)t.removeObserver(this);this._dependencies.clear(),this._store!==void 0&&this._store.dispose(),this._delayedStore!==void 0&&this._delayedStore.dispose(),on()?.handleAutorunDisposed(this),ya(this)}}_run(){let t=this._dependenciesToBeRemoved;this._dependenciesToBeRemoved=this._dependencies,this._dependencies=t,this._state=3;try{if(!this._disposed){on()?.handleAutorunStarted(this);let e=this._changeSummary,n=this._delayedStore;n!==void 0&&(this._delayedStore=void 0);try{this._isRunning=!0,this._changeTracker&&(this._changeTracker.beforeUpdate?.(this,e),this._changeSummary=this._changeTracker.createChangeSummary(e)),this._store!==void 0&&(this._store.dispose(),this._store=void 0),this._runFn(this,e)}catch(o){ha(o)}finally{this._isRunning=!1,n!==void 0&&n.dispose()}}}finally{this._disposed||on()?.handleAutorunFinished(this);for(let e of this._dependenciesToBeRemoved)e.removeObserver(this);this._dependenciesToBeRemoved.clear()}}toString(){return`Autorun<${this.debugName}>`}beginUpdate(t){this._state===3&&(this._checkIterations(),this._state=1),this._updateCount++}endUpdate(t){try{if(this._updateCount===1){this._iteration=1;do{if(this._checkIterations())return;if(this._state===1){this._state=3;for(let e of this._dependencies)if(e.reportChanges(),this._state===2)break}this._iteration++,this._state!==3&&this._run()}while(this._state!==3)}}finally{this._updateCount--}vf(()=>this._updateCount>=0)}handlePossibleChange(t){this._state===3&&this._isDependency(t)&&(this._checkIterations(),this._state=1)}handleChange(t,e){if(this._isDependency(t)){on()?.handleAutorunDependencyChanged(this,t,e);try{(!this._changeTracker||this._changeTracker.handleChange({changedObservable:t,change:e,didChange:o=>o===t},this._changeSummary))&&(this._checkIterations(),this._state=2)}catch(n){ha(n)}}}_isDependency(t){return this._dependencies.has(t)&&!this._dependenciesToBeRemoved.has(t)}_ensureNoRunning(){if(!this._isRunning)throw new Nt("The reader object cannot be used outside its compute function!")}readObservable(t){if(this._ensureNoRunning(),this._disposed)return t.get();t.addObserver(this);let e=t.get();return this._dependencies.add(t),this._dependenciesToBeRemoved.delete(t),e}get store(){if(this._ensureNoRunning(),this._disposed)throw new Nt("Cannot access store after dispose");return this._store===void 0&&(this._store=new te),this._store}get delayedStore(){if(this._ensureNoRunning(),this._disposed)throw new Nt("Cannot access store after dispose");return this._delayedStore===void 0&&(this._delayedStore=new te),this._delayedStore}debugGetState(){return{isRunning:this._isRunning,updateCount:this._updateCount,dependencies:this._dependencies,state:this._state,stateStr:R6(this._state)}}debugRerun(){this._isRunning?this._state=2:this._run()}_checkIterations(){return this._iteration>100?(ha(new Nt(`Autorun '${this.debugName}' is stuck in an infinite update loop.`)),!0):!1}};function ki(r,t=Mn.ofCaller()){return new _s(new Eo(void 0,void 0,r),r,void 0,t)}function k6(r){switch(r){case 0:return"initial";case 1:return"dependenciesMightHaveChanged";case 2:return"stale";case 3:return"upToDate";default:return"<unknown>"}}var eo=class extends Qr{constructor(e,n,o,i=void 0,s,a){super(a);this._debugNameData=e;this._computeFn=n;this._changeTracker=o;this._handleLastObserverRemoved=i;this._equalityComparator=s;this._state=0;this._value=void 0;this._updateCount=0;this._dependencies=new Set;this._dependenciesToBeRemoved=new Set;this._changeSummary=void 0;this._isUpdating=!1;this._isComputing=!1;this._didReportChange=!1;this._isInBeforeUpdate=!1;this._isReaderValid=!1;this._store=void 0;this._delayedStore=void 0;this._removedObserverToCallEndUpdateOn=null;this._changeSummary=this._changeTracker?.createChangeSummary(void 0)}get debugName(){return this._debugNameData.getDebugName(this)??"(anonymous)"}onLastObserverRemoved(){this._state=0,this._value=void 0,on()?.handleDerivedCleared(this);for(let e of this._dependencies)e.removeObserver(this);this._dependencies.clear(),this._store!==void 0&&(this._store.dispose(),this._store=void 0),this._delayedStore!==void 0&&(this._delayedStore.dispose(),this._delayedStore=void 0),this._handleLastObserverRemoved?.()}get(){if(this._isComputing,this._observers.size===0){let n;try{this._isReaderValid=!0;let o;this._changeTracker&&(o=this._changeTracker.createChangeSummary(void 0),this._changeTracker.beforeUpdate?.(this,o)),n=this._computeFn(this,o)}finally{this._isReaderValid=!1}return this.onLastObserverRemoved(),n}else{do{if(this._state===1){for(let n of this._dependencies)if(n.reportChanges(),this._state===2)break}this._state===1&&(this._state=3),this._state!==3&&this._recompute()}while(this._state!==3);return this._value}}_recompute(){let e=!1;this._isComputing=!0,this._didReportChange=!1;let n=this._dependenciesToBeRemoved;this._dependenciesToBeRemoved=this._dependencies,this._dependencies=n;try{let o=this._changeSummary;this._isReaderValid=!0,this._changeTracker&&(this._isInBeforeUpdate=!0,this._changeTracker.beforeUpdate?.(this,o),this._isInBeforeUpdate=!1,this._changeSummary=this._changeTracker?.createChangeSummary(o));let i=this._state!==0,s=this._value;this._state=3;let a=this._delayedStore;a!==void 0&&(this._delayedStore=void 0);try{this._store!==void 0&&(this._store.dispose(),this._store=void 0),this._value=this._computeFn(this,o)}finally{this._isReaderValid=!1;for(let l of this._dependenciesToBeRemoved)l.removeObserver(this);this._dependenciesToBeRemoved.clear(),a!==void 0&&a.dispose()}e=this._didReportChange||i&&!this._equalityComparator(s,this._value),on()?.handleObservableUpdated(this,{oldValue:s,newValue:this._value,change:void 0,didChange:e,hadValue:i})}catch(o){ha(o)}if(this._isComputing=!1,!this._didReportChange&&e)for(let o of this._observers)o.handleChange(this,void 0);else this._didReportChange=!1}toString(){return`LazyDerived<${this.debugName}>`}beginUpdate(e){if(this._isUpdating)throw new Nt("Cyclic deriveds are not supported yet!");this._updateCount++,this._isUpdating=!0;try{let n=this._updateCount===1;if(this._state===3&&(this._state=1,!n))for(let o of this._observers)o.handlePossibleChange(this);if(n)for(let o of this._observers)o.beginUpdate(this)}finally{this._isUpdating=!1}}endUpdate(e){if(this._updateCount--,this._updateCount===0){let n=[...this._observers];for(let o of n)o.endUpdate(this);if(this._removedObserverToCallEndUpdateOn){let o=[...this._removedObserverToCallEndUpdateOn];this._removedObserverToCallEndUpdateOn=null;for(let i of o)i.endUpdate(this)}}vf(()=>this._updateCount>=0)}handlePossibleChange(e){if(this._state===3&&this._dependencies.has(e)&&!this._dependenciesToBeRemoved.has(e)){this._state=1;for(let n of this._observers)n.handlePossibleChange(this)}}handleChange(e,n){if(this._dependencies.has(e)&&!this._dependenciesToBeRemoved.has(e)||this._isInBeforeUpdate){on()?.handleDerivedDependencyChanged(this,e,n);let o=!1;try{o=this._changeTracker?this._changeTracker.handleChange({changedObservable:e,change:n,didChange:s=>s===e},this._changeSummary):!0}catch(s){ha(s)}let i=this._state===3;if(o&&(this._state===1||i)&&(this._state=2,i))for(let s of this._observers)s.handlePossibleChange(this)}}_ensureReaderValid(){if(!this._isReaderValid)throw new Nt("The reader object cannot be used outside its compute function!")}readObservable(e){this._ensureReaderValid(),e.addObserver(this);let n=e.get();return this._dependencies.add(e),this._dependenciesToBeRemoved.delete(e),n}reportChange(e){this._ensureReaderValid(),this._didReportChange=!0;for(let n of this._observers)n.handleChange(this,e)}get store(){return this._ensureReaderValid(),this._store===void 0&&(this._store=new te),this._store}get delayedStore(){return this._ensureReaderValid(),this._delayedStore===void 0&&(this._delayedStore=new te),this._delayedStore}addObserver(e){let n=!this._observers.has(e)&&this._updateCount>0;super.addObserver(e),n&&(this._removedObserverToCallEndUpdateOn?.delete(e)||e.beginUpdate(this))}removeObserver(e){this._observers.has(e)&&this._updateCount>0&&(this._removedObserverToCallEndUpdateOn||(this._removedObserverToCallEndUpdateOn=new Set),this._removedObserverToCallEndUpdateOn.add(e)),super.removeObserver(e)}debugGetState(){return{state:this._state,stateStr:k6(this._state),updateCount:this._updateCount,isComputing:this._isComputing,dependencies:this._dependencies,value:this._value}}debugSetValue(e){this._value=e}debugRecompute(){this.beginUpdate(this);try{this._isComputing?this._state=2:this._recompute()}finally{this.endUpdate(this)}}setValue(e,n,o){this._value=e;let i=this._observers;n.updateObserver(this,this);for(let s of i)s.handleChange(this,o)}};function mg(r,t,e=Mn.ofCaller()){return new eo(new Eo(r.owner,r.debugName,r.debugReferenceFn),t,void 0,r.onLastObserverRemoved,r.equalsFn??Sr,e)}v2(mg);function Ai(...r){let t,e,n,o;return r.length===2?[e,n]=r:[t,e,n,o]=r,new xr(new Eo(t,void 0,n),e,n,()=>xr.globalTransaction,Sr,o??Mn.ofCaller())}var xr=class extends Qr{constructor(e,n,o,i,s,a){super(a);this._debugNameData=e;this.event=n;this._getValue=o;this._getTransaction=i;this._equalityComparator=s;this._hasValue=!1;this.handleEvent=e=>{let n=this._getValue(e),o=this._value,i=!this._hasValue||!this._equalityComparator(o,n),s=!1;i&&(this._value=n,this._hasValue&&(s=!0,ZD(this._getTransaction(),a=>{on()?.handleObservableUpdated(this,{oldValue:o,newValue:n,change:void 0,didChange:i,hadValue:this._hasValue});for(let l of this._observers)a.updateObserver(l,this),l.handleChange(this,void 0)},()=>{let a=this.getDebugName();return"Event fired"+(a?`: ${a}`:"")})),this._hasValue=!0),s||on()?.handleObservableUpdated(this,{oldValue:o,newValue:n,change:void 0,didChange:i,hadValue:this._hasValue})}}getDebugName(){return this._debugNameData.getDebugName(this)}get debugName(){let e=this.getDebugName();return"From Event"+(e?`: ${e}`:"")}onFirstObserverAdded(){this._subscription=this.event(this.handleEvent)}onLastObserverRemoved(){this._subscription.dispose(),this._subscription=void 0,this._hasValue=!1,this._value=void 0}get(){return this._subscription?(this._hasValue||this.handleEvent(void 0),this._value):this._getValue(void 0)}debugSetValue(e){this._value=e}debugGetState(){return{value:this._value,hasValue:this._hasValue}}};(e=>{e.Observer=xr;function t(n,o){let i=!1;xr.globalTransaction===void 0&&(xr.globalTransaction=n,i=!0);try{o()}finally{i&&(xr.globalTransaction=void 0)}}e.batchEventsGlobally=t})(Ai||={});function x2(r){let t=new Xb(!1,void 0);return r.addObserver(t),ae(()=>{r.removeObserver(t)})}E2(x2);function C2(r,t){let e=new Xb(!0,t);r.addObserver(e);try{e.beginUpdate(r)}finally{e.endUpdate(r)}return ae(()=>{r.removeObserver(e)})}I2(C2);var Xb=class{constructor(t,e){this._forceRecompute=t;this._handleValue=e;this._counter=0}beginUpdate(t){this._counter++}endUpdate(t){this._counter===1&&this._forceRecompute&&(this._handleValue?this._handleValue(t.get()):t.reportChanges()),this._counter--}handlePossibleChange(t){}handleChange(t,e){}};var Yb;function _2(r){Yb||(Yb=new fg,pg(Yb)),Yb.addFilteredObj(r)}var fg=class{constructor(){this.indentation=0;this.changedObservablesSets=new WeakMap}addFilteredObj(t){this._filteredObjects||(this._filteredObjects=new Set),this._filteredObjects.add(t)}_isIncluded(t){return this._filteredObjects?.has(t)??!0}textToConsoleArgs(t){return U6([yu(B6("|  ",this.indentation)),t])}formatInfo(t){return t.hadValue?t.didChange?[yu(" "),Cr(tr(t.oldValue,70),{color:"red",strikeThrough:!0}),yu(" "),Cr(tr(t.newValue,60),{color:"green"})]:[yu(" (unchanged)")]:[yu(" "),Cr(tr(t.newValue,60),{color:"green"}),yu(" (initial)")]}handleObservableCreated(t){if(t instanceof eo){let e=t;if(this.changedObservablesSets.set(e,new Set),!1){let o=[];e.__debugUpdating=o;let i=e.beginUpdate;e.beginUpdate=a=>(o.push(a),i.apply(e,[a]));let s=e.endUpdate;e.endUpdate=a=>{let l=o.indexOf(a);return l===-1&&console.error("endUpdate called without beginUpdate",e.debugName,a.debugName),o.splice(l,1),s.apply(e,[a])}}}}handleOnListenerCountChanged(t,e){}handleObservableUpdated(t,e){if(this._isIncluded(t)){if(t instanceof eo){this._handleDerivedRecomputed(t,e);return}console.log(...this.textToConsoleArgs([Eu("observable value changed"),Cr(t.debugName,{color:"BlueViolet"}),...this.formatInfo(e)]))}}formatChanges(t){if(t.size!==0)return Cr(" (changed deps: "+[...t].map(e=>e.debugName).join(", ")+")",{color:"gray"})}handleDerivedDependencyChanged(t,e,n){this._isIncluded(t)&&this.changedObservablesSets.get(t)?.add(e)}_handleDerivedRecomputed(t,e){if(!this._isIncluded(t))return;let n=this.changedObservablesSets.get(t);n&&(console.log(...this.textToConsoleArgs([Eu("derived recomputed"),Cr(t.debugName,{color:"BlueViolet"}),...this.formatInfo(e),this.formatChanges(n),{data:[{fn:t._debugNameData.referenceFn??t._computeFn}]}])),n.clear())}handleDerivedCleared(t){this._isIncluded(t)&&console.log(...this.textToConsoleArgs([Eu("derived cleared"),Cr(t.debugName,{color:"BlueViolet"})]))}handleFromEventObservableTriggered(t,e){this._isIncluded(t)&&console.log(...this.textToConsoleArgs([Eu("observable from event triggered"),Cr(t.debugName,{color:"BlueViolet"}),...this.formatInfo(e),{data:[{fn:t._getValue}]}]))}handleAutorunCreated(t){this._isIncluded(t)&&this.changedObservablesSets.set(t,new Set)}handleAutorunDisposed(t){}handleAutorunDependencyChanged(t,e,n){this._isIncluded(t)&&this.changedObservablesSets.get(t).add(e)}handleAutorunStarted(t){let e=this.changedObservablesSets.get(t);e&&(this._isIncluded(t)&&console.log(...this.textToConsoleArgs([Eu("autorun"),Cr(t.debugName,{color:"BlueViolet"}),this.formatChanges(e),{data:[{fn:t._debugNameData.referenceFn??t._runFn}]}])),e.clear(),this.indentation++)}handleAutorunFinished(t){this.indentation--}handleBeginTransaction(t){let e=t.getDebugName();e===void 0&&(e=""),this._isIncluded(t)&&console.log(...this.textToConsoleArgs([Eu("transaction"),Cr(e,{color:"BlueViolet"}),{data:[{fn:t._fn}]}])),this.indentation++}handleEndTransaction(){this.indentation--}};function U6(r){let t=new Array,e=[],n="";function o(s){if("length"in s)for(let a of s)a&&o(a);else"text"in s?(n+=`%c${s.text}`,t.push(s.style),s.data&&e.push(...s.data)):"data"in s&&e.push(...s.data)}o(r);let i=[n,...t];return i.push(...e),i}function yu(r){return Cr(r,{color:"black"})}function Eu(r){return Cr(V6(`${r}: `,10),{color:"black",bold:!0})}function Cr(r,t={color:"black"}){function e(o){return Object.entries(o).reduce((i,[s,a])=>`${i}${s}:${a};`,"")}let n={color:t.color};return t.strikeThrough&&(n["text-decoration"]="line-through"),t.bold&&(n["font-weight"]="bold"),{text:r,style:e(n)}}function tr(r,t){switch(typeof r){case"number":return""+r;case"string":return r.length+2<=t?`"${r}"`:`"${r.substr(0,t-7)}"+...`;case"boolean":return r?"true":"false";case"undefined":return"undefined";case"object":return r===null?"null":Array.isArray(r)?F6(r,t):H6(r,t);case"symbol":return r.toString();case"function":return`[[Function${r.name?" "+r.name:""}]]`;default:return""+r}}function F6(r,t){let e="[ ",n=!0;for(let o of r){if(n||(e+=", "),e.length-5>t){e+="...";break}n=!1,e+=`${tr(o,t-e.length)}`}return e+=" ]",e}function H6(r,t){if(typeof r.toString=="function"&&r.toString!==Object.prototype.toString){let i=r.toString();return i.length<=t?i:i.substring(0,t-3)+"..."}let e=QD(r),n=e?e+"(":"{ ",o=!0;for(let[i,s]of Object.entries(r)){if(o||(n+=", "),n.length-5>t){n+="...";break}o=!1,n+=`${i}: ${tr(s,t-n.length)}`}return n+=e?")":" }",n}function B6(r,t){let e="";for(let n=1;n<=t;n++)e+=r;return e}function V6(r,t){for(;r.length<t;)r+=" ";return r}var Zb=class r{constructor(t,e){this._channelFactory=t;this._getHandler=e;this._channel=this._channelFactory({handleNotification:i=>{let s=i,a=this._getHandler().notifications[s[0]];if(!a)throw new Error(`Unknown notification "${s[0]}"!`);a(...s[1])},handleRequest:i=>{let s=i;try{return{type:"result",value:this._getHandler().requests[s[0]](...s[1])}}catch(a){return{type:"error",value:a}}}});let n=new Proxy({},{get:(i,s)=>async(...a)=>{let l=await this._channel.sendRequest([s,a]);if(l.type==="error")throw l.value;return l.value}}),o=new Proxy({},{get:(i,s)=>(...a)=>{this._channel.sendNotification([s,a])}});this.api={notifications:o,requests:n}}static createHost(t,e){return new r(t,e)}static createClient(t,e){return new r(t,e)}};function P2(r,t){let e=globalThis,n=[],o,{channel:i,handler:s}=W6({sendNotification:l=>{o?o.sendNotification(l):n.push(l)}}),a;return(e.$$debugValueEditor_debugChannels??(e.$$debugValueEditor_debugChannels={}))[r]=l=>{a=t(),o=l;for(let d of n)l.sendNotification(d);return n=[],s},Zb.createClient(i,()=>{if(!a)throw new Error("Not supported");return a})}function W6(r){let t;return{channel:n=>(t=n,{sendNotification:o=>{r.sendNotification(o)},sendRequest:o=>{throw new Error("not supported")}}),handler:{handleRequest:n=>n.type==="notification"?t?.handleNotification(n.data):t?.handleRequest(n.data)}}}var eI=class{constructor(){this._timeout=void 0}throttle(t,e){this._timeout===void 0&&(this._timeout=setTimeout(()=>{this._timeout=void 0,t()},e))}dispose(){this._timeout!==void 0&&clearTimeout(this._timeout)}};function iw(r,t){for(let e in t)r[e]&&typeof r[e]=="object"&&t[e]&&typeof t[e]=="object"?iw(r[e],t[e]):r[e]=t[e]}function sw(r,t){for(let e in t)t[e]===null?delete r[e]:r[e]&&typeof r[e]=="object"&&t[e]&&typeof t[e]=="object"?sw(r[e],t[e]):r[e]=t[e]}var tI=class r{constructor(){this._declarationId=0;this._instanceId=0;this._declarations=new Map;this._instanceInfos=new WeakMap;this._aliveInstances=new Map;this._activeTransactions=new Set;this._channel=P2("observableDevTools",()=>({notifications:{setDeclarationIdFilter:t=>{},logObservableValue:t=>{console.log("logObservableValue",t)},flushUpdates:()=>{this._flushUpdates()},resetUpdates:()=>{this._pendingChanges=null,this._channel.api.notifications.handleChange(this._fullState,!0)}},requests:{getDeclarations:()=>{let t={};for(let e of this._declarations.values())t[e.id]=e;return{decls:t}},getSummarizedInstances:()=>null,getObservableValueInfo:t=>({observers:[...this._aliveInstances.get(t).debugGetObservers()].map(n=>this._formatObserver(n)).filter(lo)}),getDerivedInfo:t=>{let e=this._aliveInstances.get(t);return{dependencies:[...e.debugGetState().dependencies].map(n=>this._formatObservable(n)).filter(lo),observers:[...e.debugGetObservers()].map(n=>this._formatObserver(n)).filter(lo)}},getAutorunInfo:t=>({dependencies:[...this._aliveInstances.get(t).debugGetState().dependencies].map(n=>this._formatObservable(n)).filter(lo)}),getTransactionState:()=>this.getTransactionState(),setValue:(t,e)=>{let n=this._aliveInstances.get(t);if(n instanceof eo)n.debugSetValue(e);else if(n instanceof Ts)n.debugSetValue(e);else if(n instanceof xr)n.debugSetValue(e);else throw new Nt("Observable is not supported");let o=[...n.debugGetObservers()];for(let i of o)i.beginUpdate(n);for(let i of o)i.handleChange(n,void 0);for(let i of o)i.endUpdate(n)},getValue:t=>{let e=this._aliveInstances.get(t);if(e instanceof eo)return tr(e.debugGetState().value,200);if(e instanceof Ts)return tr(e.debugGetState().value,200)},logValue:t=>{let e=this._aliveInstances.get(t);if(e&&"get"in e)console.log("Logged Value:",e.get());else throw new Nt("Observable is not supported")},rerun:t=>{let e=this._aliveInstances.get(t);if(e instanceof eo)e.debugRecompute();else if(e instanceof _s)e.debugRerun();else throw new Nt("Observable is not supported")}}}));this._pendingChanges=null;this._changeThrottler=new eI;this._fullState={};this._flushUpdates=()=>{this._pendingChanges!==null&&(this._channel.api.notifications.handleChange(this._pendingChanges,!1),this._pendingChanges=null)};Mn.enable()}static{this._instance=void 0}static getInstance(){return r._instance===void 0&&(r._instance=new r),r._instance}getTransactionState(){let t=[],e=[...this._activeTransactions];if(e.length===0)return;let n=e.flatMap(i=>i.debugGetUpdatingObservers()??[]).map(i=>i.observer),o=new Set;for(;n.length>0;){let i=n.shift();if(o.has(i))continue;o.add(i);let s=this._getInfo(i,a=>{o.has(a)||n.push(a)});s&&t.push(s)}return{names:e.map(i=>i.getDebugName()??"tx"),affected:t}}_getObservableInfo(t){let e=this._instanceInfos.get(t);if(!e){Ct(new Nt("No info found"));return}return e}_getAutorunInfo(t){let e=this._instanceInfos.get(t);if(!e){Ct(new Nt("No info found"));return}return e}_getInfo(t,e){if(t instanceof eo){let n=[...t.debugGetObservers()];for(let l of n)e(l);let o=this._getObservableInfo(t);if(!o)return;let i=t.debugGetState(),s={name:t.debugName,instanceId:o.instanceId,updateCount:i.updateCount},a=[...o.changedObservables].map(l=>this._instanceInfos.get(l)?.instanceId).filter(lo);if(i.isComputing)return{...s,type:"observable/derived",state:"updating",changedDependencies:a,initialComputation:!1};switch(i.state){case 0:return{...s,type:"observable/derived",state:"noValue"};case 3:return{...s,type:"observable/derived",state:"upToDate"};case 2:return{...s,type:"observable/derived",state:"stale",changedDependencies:a};case 1:return{...s,type:"observable/derived",state:"possiblyStale"}}}else if(t instanceof _s){let n=this._getAutorunInfo(t);if(!n)return;let o={name:t.debugName,instanceId:n.instanceId,updateCount:n.updateCount},i=[...n.changedObservables].map(s=>this._instanceInfos.get(s).instanceId);if(t.debugGetState().isRunning)return{...o,type:"autorun",state:"updating",changedDependencies:i};switch(t.debugGetState().state){case 3:return{...o,type:"autorun",state:"upToDate"};case 2:return{...o,type:"autorun",state:"stale",changedDependencies:i};case 1:return{...o,type:"autorun",state:"possiblyStale"}}}}_formatObservable(t){let e=this._getObservableInfo(t);if(e)return{name:t.debugName,instanceId:e.instanceId}}_formatObserver(t){if(t instanceof eo)return{name:t.toString(),instanceId:this._getObservableInfo(t)?.instanceId};let e=this._getAutorunInfo(t);if(e)return{name:t.toString(),instanceId:e.instanceId}}_handleChange(t){sw(this._fullState,t),this._pendingChanges===null?this._pendingChanges=t:iw(this._pendingChanges,t),this._changeThrottler.throttle(this._flushUpdates,10)}_getDeclarationId(t,e){if(!e)return-1;let n=this._declarations.get(e.id);return n===void 0&&(n={id:this._declarationId++,type:t,url:e.fileName,line:e.line,column:e.column},this._declarations.set(e.id,n),this._handleChange({decls:{[n.id]:n}})),n.id}handleObservableCreated(t,e){let o={declarationId:this._getDeclarationId("observable/value",e),instanceId:this._instanceId++,listenerCount:0,lastValue:void 0,updateCount:0,changedObservables:new Set};this._instanceInfos.set(t,o)}handleOnListenerCountChanged(t,e){let n=this._getObservableInfo(t);if(n){if(n.listenerCount===0&&e>0){let o=t instanceof eo?"observable/derived":"observable/value";this._aliveInstances.set(n.instanceId,t),this._handleChange({instances:{[n.instanceId]:{instanceId:n.instanceId,declarationId:n.declarationId,formattedValue:n.lastValue,type:o,name:t.debugName}}})}else n.listenerCount>0&&e===0&&(this._handleChange({instances:{[n.instanceId]:null}}),this._aliveInstances.delete(n.instanceId));n.listenerCount=e}}handleObservableUpdated(t,e){if(t instanceof eo){this._handleDerivedRecomputed(t,e);return}let n=this._getObservableInfo(t);n&&e.didChange&&(n.lastValue=tr(e.newValue,30),n.listenerCount>0&&this._handleChange({instances:{[n.instanceId]:{formattedValue:n.lastValue}}}))}handleAutorunCreated(t,e){let o={declarationId:this._getDeclarationId("autorun",e),instanceId:this._instanceId++,updateCount:0,changedObservables:new Set};this._instanceInfos.set(t,o),this._aliveInstances.set(o.instanceId,t),o&&this._handleChange({instances:{[o.instanceId]:{instanceId:o.instanceId,declarationId:o.declarationId,runCount:0,type:"autorun",name:t.debugName}}})}handleAutorunDisposed(t){let e=this._getAutorunInfo(t);e&&(this._handleChange({instances:{[e.instanceId]:null}}),this._instanceInfos.delete(t),this._aliveInstances.delete(e.instanceId))}handleAutorunDependencyChanged(t,e,n){let o=this._getAutorunInfo(t);o&&o.changedObservables.add(e)}handleAutorunStarted(t){}handleAutorunFinished(t){let e=this._getAutorunInfo(t);e&&(e.changedObservables.clear(),e.updateCount++,this._handleChange({instances:{[e.instanceId]:{runCount:e.updateCount}}}))}handleDerivedDependencyChanged(t,e,n){let o=this._getObservableInfo(t);o&&o.changedObservables.add(e)}_handleDerivedRecomputed(t,e){let n=this._getObservableInfo(t);if(!n)return;let o=tr(e.newValue,30);n.updateCount++,n.changedObservables.clear(),n.lastValue=o,n.listenerCount>0&&this._handleChange({instances:{[n.instanceId]:{formattedValue:o,recomputationCount:n.updateCount}}})}handleDerivedCleared(t){let e=this._getObservableInfo(t);e&&(e.lastValue=void 0,e.changedObservables.clear(),e.listenerCount>0&&this._handleChange({instances:{[e.instanceId]:{formattedValue:void 0}}}))}handleBeginTransaction(t){this._activeTransactions.add(t)}handleEndTransaction(t){this._activeTransactions.delete(t)}};function D2(r,t){let e=t?.debugNamePostProcessor??(i=>i),n=Pd.from(r,e);if(!n)return"";let o=new Set;return t.type==="observers"?R2(n,0,o,t).trim():w2(n,0,o,t).trim()}function w2(r,t,e,n){let o="		".repeat(t),i=[];if(e.has(r.sourceObj))return i.push(`${o}* ${r.type} ${r.name} (already listed)`),i.join(`
`);if(e.add(r.sourceObj),i.push(`${o}* ${r.type} ${r.name}:`),i.push(`${o}  value: ${tr(r.value,50)}`),i.push(`${o}  state: ${r.state}`),r.dependencies.length>0){i.push(`${o}  dependencies:`);for(let a of r.dependencies){let l=Pd.from(a,n.debugNamePostProcessor??(d=>d))??Pd.unknown(a);i.push(w2(l,t+1,e,n))}}return i.join(`
`)}function R2(r,t,e,n){let o="		".repeat(t),i=[];if(e.has(r.sourceObj))return i.push(`${o}* ${r.type} ${r.name} (already listed)`),i.join(`
`);if(e.add(r.sourceObj),i.push(`${o}* ${r.type} ${r.name}:`),i.push(`${o}  value: ${tr(r.value,50)}`),i.push(`${o}  state: ${r.state}`),r.observers.length>0){i.push(`${o}  observers:`);for(let a of r.observers){let l=Pd.from(a,n.debugNamePostProcessor??(d=>d))??Pd.unknown(a);i.push(R2(l,t+1,e,n))}}return i.join(`
`)}var Pd=class r{constructor(t,e,n,o,i,s,a){this.sourceObj=t;this.name=e;this.type=n;this.value=o;this.state=i;this.dependencies=s;this.observers=a}static from(t,e){if(t instanceof _s){let n=t.debugGetState();return new r(t,e(t.debugName),"autorun",void 0,n.stateStr,Array.from(n.dependencies),[])}else if(t instanceof eo){let n=t.debugGetState();return new r(t,e(t.debugName),"derived",n.value,n.stateStr,Array.from(n.dependencies),Array.from(t.debugGetObservers()))}else if(t instanceof Ts){let n=t.debugGetState();return new r(t,e(t.debugName),"observableValue",n.value,"upToDate",[],Array.from(t.debugGetObservers()))}else if(t instanceof xr){let n=t.debugGetState();return new r(t,e(t.debugName),"fromEvent",n.value,n.hasValue?"upToDate":"initial",[],Array.from(t.debugGetObservers()))}}static unknown(t){return new r(t,"(unknown)","unknown",void 0,"unknown",[],[])}};S2(D2);g2(_2);var q6=!1;q6&&pg(new fg);Hr&&Hr.VSCODE_DEV_DEBUG_OBSERVABLES&&pg(tI.getInstance());var So;(i=>{i.Internal={type:"internal",label:"Built-In"},i.External={type:"external",label:"External"};function e(s){switch(s.type){case"extension":return`extension:${s.extensionId.value}`;case"mcp":return`mcp:${s.collectionId}:${s.definitionId}`;case"user":return`user:${s.file.toString()}`;case"internal":return"internal";case"external":return"external"}}i.toKey=e;function n(s,a){return e(s)===e(a)}i.equals=n;function o(s){return s.type==="internal"?{ordinal:1,label:p(7506,null)}:s.type==="mcp"?{ordinal:2,label:s.label}:s.type==="user"?{ordinal:0,label:p(7508,null)}:{ordinal:3,label:s.label}}i.classify=o})(So||={});function k2(r){return r!==null&&typeof r=="object"&&E.isUri(r.sessionResource)}function A2(r){return!!r&&r.getTools!==void 0}var Dd=N("ILanguageModelToolsService");var K6;(a=>(a.execute="execute",a.edit="edit",a.search="search",a.agent="agent",a.read="read",a.web="web",a.todo="todo"))(K6||={});var gg;(e=>(e.runSubagent="runSubagent",e.vscode="vscode"))(gg||={});var Su=N("productService"),O2="vscode://schemas/vscode-product";var to=N("configurationService");function nI(r,t){let e=Object.create(null);for(let n in r)aw(e,n,r[n],t);return e}function aw(r,t,e,n){let o=t.split("."),i=o.pop(),s=r;for(let a=0;a<o.length;a++){let l=o[a],d=s[l];switch(typeof d){case"undefined":d=s[l]=Object.create(null);break;case"object":if(d===null){n(`Ignoring ${t} as ${o.slice(0,a+1).join(".")} is null`);return}break;default:n(`Ignoring ${t} as ${o.slice(0,a+1).join(".")} is ${JSON.stringify(d)}`);return}s=d}if(typeof s=="object"&&s!==null)try{s[i]=e}catch{n(`Ignoring ${t} as ${o.join(".")} is ${JSON.stringify(s)}`)}else n(`Ignoring ${t} as ${o.join(".")} is ${JSON.stringify(s)}`)}function L2(r,t){let e=t.split(".");M2(r,e)}function M2(r,t){if(!r)return;let e=r,n=t.shift();if(t.length===0){delete e[n];return}if(Object.keys(e).indexOf(n)!==-1){let o=e[n];typeof o=="object"&&!Array.isArray(o)&&(M2(o,t),Object.keys(o).length===0&&delete e[n])}}function hg(r,t,e){function n(s,a){let l=s;for(let d of a){if(typeof l!="object"||l===null)return;l=l[d]}return l}let o=t.split("."),i=n(r,o);return typeof i>"u"?e:i}function N2(r){return r.replace(/^\[/,"").replace(/]$/g,"").replace(/\]\[/g,", ")}function U2(r){let t=!1,e=new Map,n=new Map;if(J6(r,c=>{if(r===c)return!0;let u=JSON.stringify(c);if(u.length<30)return!0;let f=e.get(u);if(!f){let g={schemas:[c]};return e.set(u,g),n.set(c,g),!0}return f.schemas.push(c),n.set(c,f),t=!0,!1}),e.clear(),!t)return JSON.stringify(r);let i="$defs";for(;r.hasOwnProperty(i);)i+="_";let s=[];function a(c){return JSON.stringify(c,(u,f)=>{if(f!==c){let g=n.get(f);if(g&&g.schemas.length>1)return g.id||(g.id=`_${s.length}`,s.push(g.schemas[0])),{$ref:`#/${i}/${g.id}`}}return f})}let l=a(r),d=[];for(let c=0;c<s.length;c++)d.push(`"_${c}":${a(s[c])}`);return d.length?`${l.substring(0,l.length-1)},"${i}":{${d.join(",")}}}`:l}function xu(r){return typeof r=="object"&&r!==null}function J6(r,t){if(!r||typeof r!="object")return;let e=(...l)=>{for(let d of l)xu(d)&&s.push(d)},n=(...l)=>{for(let d of l)if(xu(d))for(let c in d){let u=d[c];xu(u)&&s.push(u)}},o=(...l)=>{for(let d of l)if(Array.isArray(d))for(let c of d)xu(c)&&s.push(c)},i=l=>{if(Array.isArray(l))for(let d of l)xu(d)&&s.push(d);else xu(l)&&s.push(l)},s=[r],a=s.pop();for(;a;)t(a)&&(e(a.additionalItems,a.additionalProperties,a.not,a.contains,a.propertyNames,a.if,a.then,a.else,a.unevaluatedItems,a.unevaluatedProperties),n(a.definitions,a.$defs,a.properties,a.patternProperties,a.dependencies,a.dependentSchemas),o(a.anyOf,a.allOf,a.oneOf,a.prefixItems),i(a.items)),a=s.pop()}var wd={JSONContribution:"base.contributions.json"};function F2(r){return r.length>0&&r.charAt(r.length-1)==="#"?r.substring(0,r.length-1):r}var lw=class extends K{constructor(){super(...arguments);this.schemasById={};this.schemaAssociations={};this._onDidChangeSchema=this._register(new D);this.onDidChangeSchema=this._onDidChangeSchema.event;this._onDidChangeSchemaAssociations=this._register(new D);this.onDidChangeSchemaAssociations=this._onDidChangeSchemaAssociations.event}registerSchema(e,n,o){let i=F2(e);this.schemasById[i]=n,this._onDidChangeSchema.fire(e),o&&o.add(ae(()=>{delete this.schemasById[i],this._onDidChangeSchema.fire(e)}))}registerSchemaAssociation(e,n){let o=F2(e);return this.schemaAssociations[o]||(this.schemaAssociations[o]=[]),this.schemaAssociations[o].includes(n)||(this.schemaAssociations[o].push(n),this._onDidChangeSchemaAssociations.fire()),ae(()=>{let i=this.schemaAssociations[o];if(i){let s=i.indexOf(n);s!==-1&&(i.splice(s,1),i.length===0&&delete this.schemaAssociations[o],this._onDidChangeSchemaAssociations.fire())}})}notifySchemaChanged(e){this._onDidChangeSchema.fire(e)}getSchemaContributions(){return{schemas:this.schemasById}}getSchemaContent(e){let n=this.schemasById[e];return n?U2(n):void 0}hasSchemaContent(e){return!!this.schemasById[e]}getSchemaAssociations(){return this.schemaAssociations}},j6=new lw;ht.add(wd.JSONContribution,j6);var Wo,dw=globalThis.vscode;if(typeof dw<"u"&&typeof dw.context<"u"){let r=dw.context.configuration();if(r)Wo=r.product;else throw new Error("Sandbox: unable to resolve product configuration from preload script.")}else if(globalThis._VSCODE_PRODUCT_JSON&&globalThis._VSCODE_PACKAGE_JSON){if(Wo=globalThis._VSCODE_PRODUCT_JSON,Hr.VSCODE_DEV&&Object.assign(Wo,{nameShort:`${Wo.nameShort} Dev`,nameLong:`${Wo.nameLong} Dev`,dataFolderName:`${Wo.dataFolderName}-dev`,serverDataFolderName:Wo.serverDataFolderName?`${Wo.serverDataFolderName}-dev`:void 0}),!Wo.version){let r=globalThis._VSCODE_PACKAGE_JSON;Object.assign(Wo,{version:r.version})}}else Wo={nameShort:"Windsurf",nameLong:"Windsurf",applicationName:"windsurf",aliasName:"surf",dataFolderName:".windsurf",win32MutexName:"windsurf",licenseName:"MIT",licenseUrl:"https://windsurf.com/terms-of-service-individual",serverLicenseUrl:"https://windsurf.com/terms-of-service-individual",serverGreeting:[],serverLicense:[],serverLicensePrompt:"",serverApplicationName:"windsurf-server",serverDataFolderName:".windsurf-server",tunnelApplicationName:"windsurf-tunnel",win32DirName:"Windsurf",win32NameVersion:"Windsurf",win32RegValueName:"Windsurf",win32x64AppId:"{{A71B58E9-CEFB-4424-8A1D-A0E49CF18EBB}",win32arm64AppId:"{{9B0AE7D1-5CD0-43E6-B7B0-EE4B79723A25}",win32x64UserAppId:"{{5A8B7D94-9B5F-4D1F-93FC-5609F7159349}",win32arm64UserAppId:"{{1A69CEA0-8DA8-4B3E-950C-23FA9F850651}",win32AppUserModelId:"Exafunction.Windsurf",win32ShellNameShort:"Windsurf",win32TunnelServiceMutex:"windsurf-tunnelservice",win32TunnelMutex:"windsurf-tunnel",darwinBundleIdentifier:"com.exafunction.windsurf",darwinProfileUUID:"35631911-548E-4245-8C30-A1A0C65DCF7E",darwinProfilePayloadUUID:"53671443-8AE4-4FCA-B901-991F8B03A158",linuxIconName:"windsurf",licenseFileName:"LICENSE.txt",reportIssueUrl:"https://windsurf.com/redirect/windsurf/feedback?referrer=extension",nodejsRepository:"https://nodejs.org",urlProtocol:"windsurf",webviewContentExternalBaseUrlTemplate:"https://{{uuid}}.vscode-cdn.net/insider/ef65ac1ba57f57f2a3961bfe94aa20481caca4c6/out/vs/workbench/contrib/webview/browser/pre/",extensionsGallery:{serviceUrl:"https://marketplace.windsurf.com/vscode/gallery",itemUrl:"https://marketplace.windsurf.com/vscode/item",controlUrl:"https://marketplace.windsurf.com/vscode/extensions-control"},builtInExtensions:[{name:"ms-vscode.js-debug-companion",version:"1.1.3",sha256:"7380a890787452f14b2db7835dfa94de538caf358ebc263f9d46dd68ac52de93",repo:"https://github.com/microsoft/vscode-js-debug-companion",metadata:{id:"99cb0b7f-7354-4278-b8da-6cc79972169d",publisherId:{publisherId:"5f5636e7-69ed-4afe-b5d6-8d231fb3d3ee",publisherName:"ms-vscode",displayName:"Microsoft",flags:"verified"},publisherDisplayName:"Microsoft"}},{name:"ms-vscode.js-debug",version:"1.110.0",sha256:"ad3f7d935b64f4ee123853c464b47b3cba13e5018edef831770ae9c3eb218f5b",repo:"https://github.com/microsoft/vscode-js-debug",metadata:{id:"25629058-ddac-4e17-abba-74678e126c5d",publisherId:{publisherId:"5f5636e7-69ed-4afe-b5d6-8d231fb3d3ee",publisherName:"ms-vscode",displayName:"Microsoft",flags:"verified"},publisherDisplayName:"Microsoft"}},{name:"ms-vscode.vscode-js-profile-table",version:"1.0.10",sha256:"7361748ddf9fd09d8a2ed1f2a2d7376a2cf9aae708692820b799708385c38e08",repo:"https://github.com/microsoft/vscode-js-profile-visualizer",metadata:{id:"7e52b41b-71ad-457b-ab7e-0620f1fc4feb",publisherId:{publisherId:"5f5636e7-69ed-4afe-b5d6-8d231fb3d3ee",publisherName:"ms-vscode",displayName:"Microsoft",flags:"verified"},publisherDisplayName:"Microsoft"}}],____________EXTRA_WINDSURF_KEYS_START_HERE_______________:{},zendeskTicketApiKey:"1d83db0009861157cacd3279a927855f53279e48c84bd26d2ba48d241699773d",enableTelemetry:!0,aiConfig:{ariaKey:"windsurf"},aiGeneratedWorkspaceTrust:{title:"This workspace was generated by GitHub Copilot",checkboxText:"Trust the contents of all files in this workspace",trustOption:"Yes, I trust the contents",dontTrustOption:"No, I don't trust the contents",startupTrustRequestLearnMore:"If you don't trust the contents of the files generated by GitHub Copilot, we recommend continuing in restricted mode. See [our docs](https://aka.ms/vscode-workspace-trust) to learn more. "},extensionUntrustedWorkspaceSupport:{"codeium.windsurf":{override:!0}},chatParticipantRegistry:"https://main.vscode-cdn.net/extensions/chat.json",commandPaletteSuggestedCommandIds:["windsurf.prioritized.chat.open"],commonlyUsedSettings:["files.autoSave","editor.fontSize","editor.fontFamily","editor.tabSize","editor.renderWhitespace","editor.cursorStyle","editor.multiCursorModifier","editor.insertSpaces","editor.wordWrap","files.exclude","files.associations","workbench.editor.enablePreview"],defaultChatAgent:{extensionId:"GitHub.copilot",chatExtensionId:"GitHub.copilot-chat",chatExtensionOutputId:"GitHub.copilot-chat.GitHub Copilot Chat.log",chatExtensionOutputExtensionStateCommand:"github.copilot.debug.extensionState",documentationUrl:"https://aka.ms/github-copilot-overview",termsStatementUrl:"https://aka.ms/github-copilot-terms-statement",privacyStatementUrl:"https://aka.ms/github-copilot-privacy-statement",skusDocumentationUrl:"https://aka.ms/github-copilot-plans",publicCodeMatchesUrl:"https://aka.ms/github-copilot-match-public-code",manageSettingsUrl:"https://aka.ms/github-copilot-settings",managePlanUrl:"https://aka.ms/github-copilot-manage-plan",manageOverageUrl:"https://aka.ms/github-copilot-manage-overage",upgradePlanUrl:"https://aka.ms/github-copilot-upgrade-plan",signUpUrl:"https://aka.ms/github-sign-up",provider:{default:{id:"github",name:"GitHub"},enterprise:{id:"github-enterprise",name:"GHE.com"},google:{id:"google",name:"Google"},apple:{id:"apple",name:"Apple"}},providerExtensionId:"vscode.github-authentication",providerUriSetting:"github-enterprise.uri",providerScopes:[["read:user","user:email","repo","workflow"],["user:email"],["read:user"]],entitlementUrl:"",entitlementSignupLimitedUrl:"",chatQuotaExceededContext:"github.copilot.chat.quotaExceeded",completionsQuotaExceededContext:"github.copilot.completions.quotaExceeded",walkthroughCommand:"github.copilot.open.walkthrough",completionsMenuCommand:"github.copilot.toggleStatusMenu",completionsRefreshTokenCommand:"github.copilot.signIn",chatRefreshTokenCommand:"github.copilot.refreshToken",generateCommitMessageCommand:"github.copilot.git.generateCommitMessage",resolveMergeConflictsCommand:"github.copilot.git.resolveMergeConflicts",completionsAdvancedSetting:"github.copilot.advanced",completionsEnablementSetting:"github.copilot.enable",nextEditSuggestionsSetting:"github.copilot.nextEditSuggestions.enabled",tokenEntitlementUrl:"",mcpRegistryDataUrl:""},configBasedExtensionTips:{git:{configPath:".git/config",configName:"Git",recommendations:{"github.vscode-pull-request-github":{name:"GitHub Pull Request",contentPattern:"^\\s*url\\s*=\\s*https:\\/\\/github\\.com.*$"},"eamodio.gitlens":{name:"GitLens"}}},maven:{configPath:"pom.xml",configName:"Maven",recommendations:{"vscjava.vscode-java-pack":{name:"Java",important:!0,isExtensionPack:!0,whenNotInstalled:["ASF.apache-netbeans-java","Oracle.oracle-java"]},"vmware.vscode-boot-dev-pack":{name:"Spring Boot Extension Pack",isExtensionPack:!0}}},gradle:{configPath:"build.gradle",configName:"Gradle",recommendations:{"vscjava.vscode-java-pack":{name:"Java",important:!0,isExtensionPack:!0,whenNotInstalled:["ASF.apache-netbeans-java","Oracle.oracle-java"]}}},"github-pull-request":{configPath:".vscode/.github-pull-request.rec",configName:"GitHub",configScheme:"vscode-vfs",recommendations:{"github.vscode-pull-request-github":{name:"GitHub Pull Request",important:!0}}},"pyproject-formatter":{configPath:"pyproject.toml",configName:"Python Formatter",recommendations:{"ms-python.black-formatter":{name:"Black Formatter",contentPattern:'(^\\s*\\[\\[?\\s*"?tool"?\\s*\\.\\s*"?black"?\\s*[\\].])|("black\\s*["[(<=>!~;@])'},"ms-python.autopep8":{name:"Autopep8",contentPattern:'(^\\s*\\[\\[?\\s*"?tool"?\\s*\\.\\s*"?autopep8"?\\s*[\\].])|("autopep8\\s*["[(<=>!~;@])'}}},"pep8-formatter":{configPath:".pep8",configName:"Python Formatter",recommendations:{"ms-python.autopep8":{name:"Autopep8"}}},"python-setup-cgf-formatter":{configPath:"setup.cfg",configName:"Python Formatter",recommendations:{"ms-python.autopep8":{name:"Autopep8",contentPattern:"^\\[pep8\\]"}}},"tox-ini-formatter":{configPath:"tox.ini",configName:"Python Formatter",recommendations:{"ms-python.autopep8":{name:"Autopep8",contentPattern:"^\\[pep8\\]"}}},"pyproject-linter":{configPath:"pyproject.toml",configName:"Python Linter",recommendations:{"ms-python.pylint":{name:"Pylint",contentPattern:'(^\\s*\\[\\[?\\s*"?tool"?\\s*\\.\\s*"?pylint"?\\s*[\\].])|("pylint\\s*["[(<=>!~;@])'},"charliermarsh.ruff":{name:"Ruff",contentPattern:'(^\\s*\\[\\[?\\s*"?tool"?\\s*\\.\\s*"?ruff"?\\s*[\\].])|("ruff\\s*["[(<=>!~;@])'},"ms-python.mypy-type-checker":{name:"Mypy Type Checker",contentPattern:'(^\\s*\\[\\[?\\s*"?tool"?\\s*\\.\\s*"?mypy"?\\s*[\\].])|("mypy\\s*["[(<=>!~;@])'},"ms-python.flake8":{name:"Flake8",contentPattern:'(^\\s*\\[\\[?\\s*"?tool"?\\s*\\.\\s*"?flake8"?\\s*[\\].])|("flake8\\s*["[(<=>!~;@])'}}},".pylintrc-linter":{configPath:".pylintrc",configName:"Python Linter",recommendations:{"ms-python.pylint":{name:"Pylint"}}},"pylintrc-linter":{configPath:"pylintrc",configName:"Python Linter",recommendations:{"ms-python.pylint":{name:"Pylint"}}},"mypy-ini-linter":{configPath:".mypy.ini",configName:"Python Linter",recommendations:{"ms-python.mypy-type-checker":{name:"Mypy Type Checker"}}},"tox-ini-linter":{configPath:"tox.ini",configName:"Python Linter",recommendations:{"ms-python.flake8":{name:"Flake8",contentPattern:"^\\[flake8\\]"}}},".flake8-linter":{configPath:".flake8",configName:"Python Linter",recommendations:{"ms-python.flake8":{name:"Flake8"}}},"python-setup-cgf-linter":{configPath:"setup.cfg",configName:"Python Linter",recommendations:{"ms-python.flake8":{name:"Flake8",contentPattern:"^\\[flake8\\]"}}}},crashReporter:{productName:"Windsurf",companyName:"Exafunction"},enabledTelemetryLevels:{error:!0,usage:!0},exeBasedExtensionTips:{az:{friendlyName:"Azure CLI",windowsPath:"%ProgramFiles(x86)%\\Microsoft SDKs\\Azure\\CLI2\\wbin\\az.cmd",recommendations:{"ms-vscode.azurecli":{name:"Azure CLI Tools"}}},azd:{friendlyName:"Azure Dev CLI",windowsPath:"%USERPROFILE%\\AppData\\Local\\Programs\\Azure Dev CLI\\azd.exe",recommendations:{"ms-azuretools.vscode-azureresourcegroups":{name:"Azure Resources"}}},"azd-user":{friendlyName:"Azure Dev CLI",windowsPath:"%ProgramFiles%\\Azure Dev CLI\\azd.exe",recommendations:{"ms-azuretools.vscode-azureresourcegroups":{name:"Azure Resources"}}},heroku:{friendlyName:"Heroku CLI",windowsPath:"%ProgramFiles%\\Heroku\\bin\\heroku.cmd",recommendations:{"ms-azuretools.vscode-azureappservice":{name:"Azure App Service"}}},mongo:{friendlyName:"Mongo",windowsPath:"%ProgramFiles%\\MongoDB\\Server\\3.6\\bin\\mongod.exe",recommendations:{}},serverless:{friendlyName:"Serverless framework",windowsPath:"%APPDATA%\\npm\\serverless.cmd",recommendations:{"ms-azuretools.vscode-azurefunctions":{name:"Azure Functions"}}},func:{friendlyName:"Azure Function SDK",windowsPath:"%APPDATA%\\npm\\func.cmd",recommendations:{"ms-azuretools.vscode-azurefunctions":{name:"Azure Functions"}}},mysql:{friendlyName:"MySQL",windowsPath:"%ProgramFiles%\\MySQL\\MySQL Server 8.0\\bin\\mysqld.exe",recommendations:{"mtxr.sqltools":{name:"SQLTools"}}},postgres:{friendlyName:"PostgreSQL",windowsPath:"%ProgramFiles%\\PostgreSQL\\11\\bin\\psql.exe",recommendations:{"mtxr.sqltools":{name:"SQLTools"}}},sqlcmd:{friendlyName:"SQL CLI",recommendations:{"ms-mssql.mssql":{name:"SQL Server (mssql)"}}},now:{friendlyName:"Now CLI",windowsPath:"%APPDATA%\\npm\\now.cmd",recommendations:{"ms-azuretools.vscode-azureappservice":{name:"Azure App Service"},"ms-azuretools.vscode-docker":{name:"Docker"}}},docker:{friendlyName:"Docker",windowsPath:"%ProgramFiles%\\Docker\\Docker\\Resources\\bin\\docker.exe",recommendations:{"ms-azuretools.vscode-docker":{name:"Docker",important:!0},"ms-kubernetes-tools.vscode-kubernetes-tools":{name:"Kubernetes"}}},kubectl:{friendlyName:"Kubernetes",windowsPath:"%ProgramFiles%\\Docker\\Docker\\Resources\\bin\\kubectl.exe",recommendations:{"ms-azuretools.vscode-docker":{name:"Docker"},"ms-kubernetes-tools.vscode-kubernetes-tools":{name:"Kubernetes"}}},ng:{friendlyName:"Angular CLI",windowsPath:"%APPDATA%\\npmexit\\ng.cmd",recommendations:{"johnpapa.Angular2":{name:"Angular Snippets"}}},"create-react-app":{friendlyName:"Create React App",windowsPath:"%APPDATA%\\npm\\create-react-app.cmd",recommendations:{"msjsdiag.vscode-react-native":{name:"React Native Tools"}}},"react-native":{friendlyName:"React Native",windowsPath:"%APPDATA%\\npm\\react-native-cli",recommendations:{"msjsdiag.vscode-react-native":{name:"React Native Tools"}}},p4:{friendlyName:"Perforce",recommendations:{}},hg:{friendlyName:"Mercurial",recommendations:{"mrcrowl.hg":{name:"Hg"}}},git:{friendlyName:"Git",windowsPath:"%ProgramFiles%\\Git\\git-bash.exe",recommendations:{"eamodio.gitlens":{name:"GitLens"}}},svn:{friendlyName:"Subversion",windowsPath:"%ProgramFiles%\\TortoiseSVN\\bin\\TortoiseProc.exe",recommendations:{"johnstoncode.svn-scm":{name:"SVN"}}},subl:{friendlyName:"Sublime",windowsPath:"%ProgramFiles%\\Sublime Text3\\sublime_text.exe",recommendations:{"ms-vscode.sublime-keybindings":{name:"Sublime Text Keymap and Settings Importer"}}},atom:{friendlyName:"Atom",windowsPath:"%USERPROFILE%\\AppData\\Local\\atom\\bin\\atom.cmd",recommendations:{"ms-vscode.atom-keybindings":{name:"Atom Keymap"}}},brackets:{friendlyName:"Brackets",windowsPath:"%ProgramFiles(x86)%\\Brackets\\Brackets.exe",recommendations:{"ms-vscode.brackets-keybindings":{name:"Brackets Keymap"}}},notepadplusplus:{friendlyName:"Notepad++",windowsPath:"%ProgramFiles%\\Notepad++\\Notepad++.exe",recommendations:{"ms-vscode.notepadplusplus-keybindings":{name:"Notepad++ keymap"}}},vi:{friendlyName:"VIM",windowsPath:"%ProgramFiles(x86)%\\Vim\\vim80\\gvim.exe",recommendations:{"vscodevim.vim":{name:"Vim"}}},mvn:{friendlyName:"Maven",recommendations:{"vscjava.vscode-java-pack":{name:"Java",important:!0,isExtensionPack:!0,whenNotInstalled:["ASF.apache-netbeans-java","Oracle.oracle-java"]}}},gradle:{friendlyName:"Gradle",recommendations:{"vscjava.vscode-java-pack":{name:"Java",important:!0,isExtensionPack:!0,whenNotInstalled:["ASF.apache-netbeans-java","Oracle.oracle-java"]}}},"Microsoft Edge":{friendlyName:"Microsoft Edge",windowsPath:"%USERPROFILE%\\AppData\\Local\\Microsoft\\Edge\\Application\\msedge.exe",recommendations:{"ms-edgedevtools.vscode-edge-devtools":{name:"Microsoft Edge Developer Tools"}}},"Microsoft Edge Dev":{friendlyName:"Microsoft Edge Dev",windowsPath:"%USERPROFILE%\\AppData\\Local\\Microsoft\\Edge Dev\\Application\\msedge.exe",recommendations:{"ms-edgedevtools.vscode-edge-devtools":{name:"Microsoft Edge Developer Tools"}}},"Microsoft Edge Beta":{friendlyName:"Microsoft Edge Beta",windowsPath:"%USERPROFILE%\\AppData\\Local\\Microsoft\\Edge Beta\\Application\\msedge.exe",recommendations:{"ms-edgedevtools.vscode-edge-devtools":{name:"Microsoft Edge Developer Tools"}}},"Microsoft Edge Canary":{friendlyName:"Microsoft Edge Canary",windowsPath:"%USERPROFILE%\\AppData\\Local\\Microsoft\\Edge SxS\\Application\\msedge.exe",recommendations:{"ms-edgedevtools.vscode-edge-devtools":{name:"Microsoft Edge Developer Tools"}}},"Mozilla Firefox (x86)":{friendlyName:"Mozilla Firefox",windowsPath:"%ProgramFiles(x86)%\\Mozilla Firefox\\firefox.exe",recommendations:{"firefox-devtools.vscode-firefox-debug":{name:"Debugger for Firefox"}}},"Mozilla Firefox Developer Edition (x86)":{friendlyName:"Mozilla Firefox Developer Edition",windowsPath:"%ProgramFiles(x86)%\\Firefox Developer Edition\\firefox.exe",recommendations:{"firefox-devtools.vscode-firefox-debug":{name:"Debugger for Firefox"}}},"Mozilla Firefox":{friendlyName:"Mozilla Firefox",windowsPath:"%ProgramFiles%\\Mozilla Firefox\\firefox.exe",recommendations:{"firefox-devtools.vscode-firefox-debug":{name:"Debugger for Firefox"}}},"Mozilla Firefox Developer Edition":{friendlyName:"Mozilla Firefox Developer Edition",windowsPath:"%ProgramFiles%\\Firefox Developer Edition\\firefox.exe",recommendations:{"firefox-devtools.vscode-firefox-debug":{name:"Debugger for Firefox"}}},cordova:{friendlyName:"Cordova",windowsPath:"%APPDATA%\\npm\\cordova",recommendations:{}},gcloud:{friendlyName:"Google GCloud CLI",windowsPath:"%ProgramFiles(x86)%\\Google\\Cloud SDK\\google-cloud-sdk\\bin\\gcloud.cmd",recommendations:{"GoogleCloudTools.cloudcode":{name:"Cloud Code"}}},skaffold:{friendlyName:"Skaffold Code to Cluster",recommendations:{"ms-azuretools.vscode-docker":{name:"Docker"},"ms-kubernetes-tools.vscode-kubernetes-tools":{name:"Kubernetes"}}},minikube:{friendlyName:"MiniKube Local Kubernetes Cluster",recommendations:{"ms-azuretools.vscode-docker":{name:"Docker"},"ms-kubernetes-tools.vscode-kubernetes-tools":{name:"Kubernetes"}}},podman:{friendlyName:"Podman",recommendations:{}},wsl:{friendlyName:"Windows Subsystem for Linux (WSL)",windowsPath:"%WINDIR%\\system32\\lxss\\LxssManager.dll",important:!0,recommendations:{}}},extensionAllowedBadgeProviders:["api.bintray.com","api.travis-ci.com","api.travis-ci.org","app.fossa.io","badge.buildkite.com","badge.fury.io","badge.waffle.io","badgen.net","badges.frapsoft.com","badges.gitter.im","badges.greenkeeper.io","cdn.travis-ci.com","cdn.travis-ci.org","ci.appveyor.com","circleci.com","cla.opensource.microsoft.com","codacy.com","codeclimate.com","codecov.io","coveralls.io","david-dm.org","deepscan.io","dev.azure.com","docs.rs","flat.badgen.net","gemnasium.com","githost.io","gitlab.com","godoc.org","goreportcard.com","img.shields.io","isitmaintained.com","marketplace.visualstudio.com","nodesecurity.io","opencollective.com","snyk.io","travis-ci.com","travis-ci.org","visualstudio.com","vsmarketplacebadge.apphb.com","www.bithound.io","www.versioneye.com"],extensionAllowedBadgeProvidersRegex:["^https:\\/\\/github\\.com\\/[^/]+\\/[^/]+\\/(actions\\/)?workflows\\/.*badge\\.svg"],extensionEnabledApiProposals:{"mrleemurray.theme-2026":["css"],"ms-azuretools.vscode-containers":["authenticationChallenges"],"ms-azuretools.vscode-azureresourcegroups":["authenticationChallenges"],"ms-azuretools.vscode-azure-github-copilot":["authenticationChallenges"],"ms-azuretools.vscode-dev-azurecloudshell":["contribEditSessions","authenticationChallenges"],"ms-toolsai.vscode-ai":["authenticationChallenges"],"TeamsDevApp.vscode-ai-foundry":["authenticationChallenges"],"ms-vscode.vscode-selfhost-test-provider":["testObserver","testRelatedCode"],"VisualStudioExptTeam.vscodeintellicode-completions":["inlineCompletionsAdditions"],"ms-vsliveshare.vsliveshare":["contribMenuBarHome","contribShareMenu","contribStatusBarItems","diffCommand","documentFiltersExclusive","fileSearchProvider","findTextInFiles","notebookLiveShare","terminalDimensions","terminalDataWriteEvent","textSearchProvider"],"ms-vscode.js-debug":["portsAttributes","findTextInFiles","workspaceTrust","tunnels"],"ms-toolsai.vscode-ai-remote":["resolvers","authenticationChallenges"],"ms-python.python":["codeActionAI","contribEditorContentMenu","quickPickSortByLabel","portsAttributes","testObserver","quickPickItemTooltip","terminalDataWriteEvent","terminalExecuteCommandEvent","notebookReplDocument","notebookVariableProvider","terminalShellEnv"],"ms-python.vscode-python-envs":["terminalShellEnv","terminalDataWriteEvent","taskExecutionTerminal"],"ms-dotnettools.dotnet-interactive-vscode":["notebookMessaging"],"GitHub.codespaces":["contribEditSessions","contribMenuBarHome","contribRemoteHelp","contribViewsRemote","resolvers","tunnels","terminalDataWriteEvent","treeViewReveal","notebookKernelSource"],"ms-vscode.azure-repos":["extensionRuntime","fileSearchProvider","textSearchProvider"],"ms-vscode.remote-repositories":["canonicalUriProvider","contribEditSessions","contribRemoteHelp","contribMenuBarHome","contribViewsRemote","contribViewsWelcome","contribShareMenu","documentFiltersExclusive","editSessionIdentityProvider","extensionRuntime","fileSearchProvider","quickPickSortByLabel","workspaceTrust","shareProvider","scmActionButton","scmSelectedProvider","scmValidation","textSearchProvider","timeline"],"ms-vscode-remote.remote-wsl":["resolvers","contribRemoteHelp","contribViewsRemote","telemetry"],"ms-vscode-remote.remote-ssh":["resolvers","tunnels","terminalDataWriteEvent","contribRemoteHelp","contribViewsRemote","telemetry"],"ms-vscode.remote-server":["resolvers","tunnels","contribViewsWelcome"],"ms-vscode.remote-explorer":["contribRemoteHelp","contribViewsRemote","extensionsAny"],"ms-vscode-remote.remote-containers":["contribEditSessions","resolvers","portsAttributes","tunnels","workspaceTrust","terminalDimensions","contribRemoteHelp","contribViewsRemote"],"ms-vscode.js-debug-nightly":["portsAttributes","findTextInFiles","workspaceTrust","tunnels"],"ms-vscode.lsif-browser":["documentFiltersExclusive"],"ms-vscode.vscode-speech":["speech"],"GitHub.vscode-pull-request-github":["activeComment","chatContextProvider","chatParticipantAdditions","chatParticipantPrivate","chatSessionsProvider","codiconDecoration","codeActionRanges","commentingRangeHint","commentReactor","commentReveal","commentsDraftState","commentThreadApplicability","contribAccessibilityHelpContent","contribCommentEditorActionsMenu","contribCommentPeekContext","contribCommentThreadAdditionalMenu","contribCommentsViewThreadMenus","contribEditorContentMenu","contribMultiDiffEditorMenus","contribShareMenu","diffCommand","languageModelToolResultAudience","markdownAlertSyntax","quickDiffProvider","shareProvider","tabInputMultiDiff","tabInputTextMerge","tokenInformation","treeItemMarkdownLabel","treeViewMarkdownMessage"],"GitHub.copilot":["inlineCompletionsAdditions","devDeviceId"],"GitHub.copilot-nightly":["inlineCompletionsAdditions","devDeviceId"],"GitHub.copilot-chat":["agentSessionsWorkspace","interactive","terminalDataWriteEvent","terminalExecuteCommandEvent","terminalSelection","terminalQuickFixProvider","chatParticipantAdditions","defaultChatParticipant","embeddings","chatProvider","mappedEditsProvider","aiRelatedInformation","aiSettingsSearch","codeActionAI","findTextInFiles","findTextInFiles2","textSearchProvider","textSearchProvider2","activeComment","commentReveal","contribSourceControlInputBoxMenu","contribCommentEditorActionsMenu","contribCommentThreadAdditionalMenu","contribCommentsViewThreadMenus","contribChatEditorInlineGutterMenu","extensionAffinity","newSymbolNamesProvider","findFiles2","chatReferenceDiagnostic","extensionsAny","authLearnMore","testObserver","aiTextSearchProvider","documentFiltersExclusive","chatParticipantPrivate","contribDebugCreateConfiguration","inlineCompletionsAdditions","chatReferenceBinaryData","languageModelSystem","languageModelCapabilities","languageModelThinkingPart","languageModelToolSupportsModel","chatStatusItem","taskProblemMatcherStatus","contribLanguageModelToolSets","textDocumentChangeReason","resolvers","taskExecutionTerminal","dataChannels","chatSessionsProvider","devDeviceId","contribEditorContentMenu","tokenInformation","chatPromptFiles","mcpServerDefinitions","tabInputMultiDiff","workspaceTrust","chatHooks","chatDebug","environmentPower","terminalTitle"],"GitHub.remotehub":["contribRemoteHelp","contribMenuBarHome","contribViewsRemote","contribViewsWelcome","documentFiltersExclusive","extensionRuntime","fileSearchProvider","quickPickSortByLabel","workspaceTrust","scmSelectedProvider","scmValidation","textSearchProvider","timeline"],"ms-python.vscode-pylance":["terminalShellEnv","portsAttributes","codeActionAI"],"ms-python.debugpy":["contribViewsWelcome","debugVisualization","portsAttributes"],"ms-toolsai.jupyter-renderers":["contribNotebookStaticPreloads"],"ms-toolsai.jupyter":["notebookDeprecated","notebookMessaging","notebookMime","portsAttributes","quickPickSortByLabel","notebookKernelSource","interactiveWindow","notebookControllerAffinityHidden","contribNotebookStaticPreloads","quickPickItemTooltip","notebookExecution","notebookCellExecution","notebookVariableProvider","notebookReplDocument"],"donjayamanne.kusto":["notebookVariableProvider"],"ms-toolsai.tensorboard":["portsAttributes"],"dbaeumer.vscode-eslint":[],"ms-vscode.azure-sphere-tools-ui":["tunnels"],"ms-azuretools.vscode-azureappservice":["terminalDataWriteEvent"],"ms-vscode.anycode":["extensionsAny"],"ms-vscode.cpptools":["terminalDataWriteEvent","chatParticipantAdditions"],"vscjava.vscode-java-pack":[],"ms-dotnettools.csdevkit":["inlineCompletionsAdditions"],"ms-dotnettools.vscodeintellicode-csharp":["inlineCompletionsAdditions"],"ms-dotnettools.vscode-dotnet-modernize":["chatParticipantAdditions","chatPromptFiles"],"microsoft-IsvExpTools.powerplatform-vscode":["fileSearchProvider","textSearchProvider"],"microsoft-IsvExpTools.powerplatform-vscode-preview":["fileSearchProvider","textSearchProvider"],"TeamsDevApp.ms-teams-vscode-extension":["chatParticipantAdditions","languageModelSystem"],"ms-toolsai.datawrangler":[],"ms-vscode.vscode-commander":[],"ms-vscode.vscode-websearchforcopilot":[],"ms-vscode.vscode-copilot-vision":["chatReferenceBinaryData","codeActionAI"],"ms-autodev.vscode-autodev":["chatParticipantAdditions"],"vscjava.vscode-java-upgrade":["chatParticipantAdditions","chatParticipantPrivate"],"FoundryLocal.foundry-local-chat":["chatProvider"],"Microsoft.foundry-local-chat":["chatProvider"],"ms-wmcp.windows-mcp-server-extension":["mcpToolDefinitions"],"openai.chatgpt":["languageModelProxy","chatSessionsProvider"],"TypeScriptTeam.native-preview":["editorHoverVerbosityLevel","multiDocumentHighlightProvider"],"ms-vscode.vscode-eng-codereview":["chatContextProvider"],"ms-python.gather":[]},extensionKeywords:{md:["Markdown"],js:["JavaScript"],jsx:["JavaScript"],es6:["JavaScript"],html:["Html"],ts:["TypeScript"],tsx:["TypeScript"],css:["CSS"],scss:["SASS"],txt:["Text"],php:["PHP"],php3:["PHP"],php4:["PHP"],ph3:["PHP"],ph4:["PHP"],xml:["XML"],py:["Python"],pyc:["Python"],pyd:["Python"],pyo:["Python"],pyw:["Python"],pyz:["Python"],java:["Java"],class:["Java"],jar:["Java"],c:["c","objective c","objective-c"],m:["objective c","objective-c"],mm:["objective c","objective-c"],cpp:["cpp","c plus plus","c","c++"],cc:["cpp","c plus plus","c","c++"],cxx:["cpp","c plus plus","c++"],hh:["cpp","c plus plus","c++"],hpp:["cpp","c++"],h:["cpp","c plus plus","c++","c","objective c","objective-c"],sql:["sql"],sh:["bash"],bash:["bash"],zsh:["bash","zshell"],cs:["c#","csharp"],csproj:["c#","csharp"],sln:["c#","csharp"],go:["go"],sty:["latex"],tex:["latex"],ps:["powershell"],ps1:["powershell"],rs:["rust"],rslib:["rust"],hs:["haskell"],lhs:["haskell"],scm:["scheme"],ss:["scheme"],clj:["clojure"],cljs:["clojure"],cljc:["clojure"],edn:["clojure"],erl:["erlang"],hrl:["erlang"],scala:["scala"],sc:["scala"],pl:["perl"],pm:["perl"],t:["perl"],pod:["perl"],groovy:["groovy"],swift:["swift"],rb:["ruby"],rbw:["ruby"],jl:["julia"],f:["fortran"],for:["fortran"],f90:["fortran"],f95:["fortran"],coffee:["CoffeeScript"],litcoffee:["CoffeeScript"],yaml:["yaml"],yml:["yaml"],dart:["dart"],json:["json"]},extensionKind:{"Shan.code-settings-sync":["ui"],"shalldie.background":["ui"],"techer.open-in-browser":["ui"],"CoenraadS.bracket-pair-colorizer-2":["ui"],"CoenraadS.bracket-pair-colorizer":["ui","workspace"],"hiro-sun.vscode-emacs":["ui","workspace"],"hnw.vscode-auto-open-markdown-preview":["ui","workspace"],"wayou.vscode-todo-highlight":["ui","workspace"],"aaron-bond.better-comments":["ui","workspace"],"vscodevim.vim":["ui"],"ollyhayes.colmak-vim":["ui"]},extensionPointExtensionKind:{typescriptServerPlugins:["workspace"]},extensionSyncedKeys:{"ritwickdey.liveserver":["liveServer.setup.version"]},extensionVirtualWorkspacesSupport:{"esbenp.prettier-vscode":{default:!1},"msjsdiag.debugger-for-chrome":{default:!1},"redhat.java":{default:!1},"HookyQR.beautify":{default:!1},"ritwickdey.LiveServer":{default:!1},"VisualStudioExptTeam.vscodeintellicode":{default:!1},"octref.vetur":{default:!1},"formulahendry.code-runner":{default:!1},"xdebug.php-debug":{default:!1},"ms-mssql.mssql":{default:!1},"christian-kohler.path-intellisense":{default:!1},"eg2.tslint":{default:!1},"eg2.vscode-npm-script":{default:!1},"donjayamanne.githistory":{default:!1},"Zignd.html-css-class-completion":{default:!1},"christian-kohler.npm-intellisense":{default:!1},"EditorConfig.EditorConfig":{default:!1},"austin.code-gnu-global":{default:!1},"johnpapa.Angular2":{default:!1},"ms-vscode.vscode-typescript-tslint-plugin":{default:!1},"DotJoshJohnson.xml":{default:!1},"techer.open-in-browser":{default:!1},"tht13.python":{default:!1},"bmewburn.vscode-intelephense-client":{default:!1},"Angular.ng-template":{default:!1},"xdebug.php-pack":{default:!1},"dbaeumer.jshint":{default:!1},"yzhang.markdown-all-in-one":{default:!1},"Dart-Code.flutter":{default:!1},"streetsidesoftware.code-spell-checker":{default:!1},"rebornix.Ruby":{default:!1},"ms-vscode.sublime-keybindings":{default:!1},"mitaki28.vscode-clang":{default:!1},"steoates.autoimport":{default:!1},"donjayamanne.python-extension-pack":{default:!1},"shd101wyy.markdown-preview-enhanced":{default:!1},"mikestead.dotenv":{default:!1},"pranaygp.vscode-css-peek":{default:!1},"ikappas.phpcs":{default:!1},"platformio.platformio-ide":{default:!1},"jchannon.csharpextensions":{default:!1},"gruntfuggly.todo-tree":{default:!1}},extensionRecommendations:{"ms-python.python":{onFileOpen:[{pathGlob:"{**/*.py}",important:!0},{languages:["python"],important:!0},{pathGlob:"{**/*.ipynb}"}]},"ms-toolsai.jupyter":{onFileOpen:[{pathGlob:"{**/*.py}",contentPattern:"^#\\s*%%$",important:!0,whenInstalled:["ms-python.python"]},{pathGlob:"{**/*.ipynb}"}]},"golang.Go":{onFileOpen:[{pathGlob:"**/*.go",important:!0},{languages:["go"],important:!0}]},"vscjava.vscode-java-pack":{onFileOpen:[{pathGlob:"{**/*.java}",important:!0,whenNotInstalled:["ASF.apache-netbeans-java","Oracle.oracle-java"]},{languages:["java"],important:!0,whenNotInstalled:["ASF.apache-netbeans-java","Oracle.oracle-java"]}]},"ms-vscode.PowerShell":{onFileOpen:[{pathGlob:"{**/*.ps1,**/*.psd1,**/*.psm1}",important:!0},{languages:["powershell"],important:!0},{pathGlob:"{**/*.ps.config,**/*.ps1.config}"}]},"ms-azuretools.vscode-docker":{onFileOpen:[{pathGlob:"{**/dockerfile,**/Dockerfile,**/docker-compose.yml,**/docker-compose.*.yml}",important:!0},{languages:["dockerfile"],important:!0},{pathGlob:"{**/*.cs,**/project.json,**/global.json,**/*.csproj,**/*.cshtml,**/*.sln,**/appsettings.json,**/*.py,**/*.ipynb,**/*.js,**/*.ts,**/package.json}"}]},"vue.volar":{onFileOpen:[{pathGlob:"{**/*.vue}",important:!0},{languages:["vue"],important:!0}]},"ms-vscode.makefile-tools":{onFileOpen:[{pathGlob:"{**/makefile,**/Makefile}",important:!0},{languages:["makefile"],important:!0}]},"ms-vscode.cmake-tools":{onFileOpen:[{pathGlob:"{**/CMakeLists.txt}",important:!0}]},"svelte.svelte-vscode":{onFileOpen:[{pathGlob:"{**/*.svelte}",important:!0}]},"ms-vscode.vscode-github-issue-notebooks":{onFileOpen:[{pathGlob:"{**/*.github-issues}",important:!0}]},"ms-playwright.playwright":{onFileOpen:[{pathGlob:"{**/*playwright*.config.ts,**/*playwright*.config.js,**/*playwright*.config.mjs}",important:!0}]},"vscjava.vscode-gradle":{onFileOpen:[{pathGlob:"{**/gradlew,**/gradlew.bat,**/build.gradle,**/build.gradle.kts,**/settings.gradle,**/settings.gradle.kts}",important:!0}]},"REditorSupport.r":{onFileOpen:[{pathGlob:"{**/*.r}",important:!0},{languages:["r"],important:!0}]},"firefox-devtools.vscode-firefox-debug":{onFileOpen:[{pathGlob:"{**/*.ts,**/*.tsx,**/*.js,**/*.jsx,**/*.es6,**/.babelrc}"}]},"ms-edgedevtools.vscode-edge-devtools":{onFileOpen:[{pathGlob:"{**/*.ts,**/*.tsx,**/*.js,**/*.css,**/*.html}"}]},"Ionide.Ionide-fsharp":{onFileOpen:[{pathGlob:"{**/*.fsx,**/*.fsi,**/*.fs,**/*.ml,**/*.mli}"}]},"dbaeumer.vscode-eslint":{onFileOpen:[{pathGlob:"{**/*.js,**/*.jsx,**/*.es6,**/.eslintrc.*,**/.eslintrc,**/.babelrc,**/jsconfig.json}"}]},"bmewburn.vscode-intelephense-client":{onFileOpen:[{pathGlob:"{**/*.php,**/php.ini}"}]},"xdebug.php-debug":{onFileOpen:[{pathGlob:"{**/*.php,**/php.ini}"}]},"rust-lang.rust-analyzer":{onFileOpen:[{pathGlob:"{**/*.rs,**/*.rslib}"}]},"DavidAnson.vscode-markdownlint":{onFileOpen:[{pathGlob:"{**/*.md}"}]},"EditorConfig.EditorConfig":{onFileOpen:[{pathGlob:"{**/.editorconfig}"}]},"HookyQR.beautify":{onFileOpen:[{pathGlob:"{**/.jsbeautifyrc}"}]},"donjayamanne.githistory":{onFileOpen:[{pathGlob:"{**/.gitignore,**/.git}"}]},"eamodio.gitlens":{onFileOpen:[{pathGlob:"{**/.gitignore,**/.git}"}]},"Shopify.ruby-lsp":{onFileOpen:[{pathGlob:"{**/*.rb,**/*.erb,**/*.reek,**/.fasterer.yml,**/ruby-lint.yml,**/.rubocop.yml}"}]},"DotJoshJohnson.xml":{onFileOpen:[{pathGlob:"{**/*.xml}"}]},"stylelint.vscode-stylelint":{onFileOpen:[{pathGlob:"{**/.stylelintrc,**/stylelint.config.js}"}]},"ms-mssql.mssql":{onFileOpen:[{pathGlob:"{**/*.sql}"}]},"mtxr.sqltools":{onFileOpen:[{pathGlob:"{**/*.sql}"}]},"ms-vscode.sublime-keybindings":{onFileOpen:[{pathGlob:"{**/.sublime-project,**/.sublime-workspace}"}]},"k--kato.intellij-idea-keybindings":{onFileOpen:[{pathGlob:"{**/.idea}"}]},"christian-kohler.npm-intellisense":{onFileOpen:[{pathGlob:"{**/package.json}"}]},"Angular.ng-template":{onFileOpen:[{pathGlob:"{**/.angular-cli.json,**/angular.json,**/*.ng.html,**/*.ng,**/*.ngml}"}]},"vscjava.vscode-maven":{onFileOpen:[{pathGlob:"**/pom.xml"}]},"HashiCorp.terraform":{onFileOpen:[{pathGlob:"**/*.tf"}]},"ms-kubernetes-tools.vscode-kubernetes-tools":{onFileOpen:[{pathGlob:"{**/Chart.yaml}"}]},"betterthantomorrow.calva":{onFileOpen:[{pathGlob:"{**/*.clj,**/*.cljs}"}]},"vmware.vscode-boot-dev-pack":{onFileOpen:[{pathGlob:"{**/application.properties}"}]},"GitHub.vscode-github-actions":{onFileOpen:[{pathGlob:"{**/.github/workflows/*.yml}",important:!0}]},"circleci.circleci":{onFileOpen:[{pathGlob:"{**/.circleci/config.yml}"}]},"mechatroner.rainbow-csv":{onFileOpen:[{pathGlob:"**/*.csv",important:!0}]},"tomoki1207.pdf":{onFileOpen:[{pathGlob:"**/*.pdf",important:!0}]}},keymapExtensionTips:["vscodevim.vim","ms-vscode.sublime-keybindings","ms-vscode.atom-keybindings","ms-vscode.brackets-keybindings","ms-vscode.vs-keybindings","ms-vscode.notepadplusplus-keybindings","k--kato.intellij-idea-keybindings","alphabotsec.vscode-eclipse-keybindings","alefragnani.delphi-keybindings"],languageExtensionTips:["ms-python.python","codeium.windsurfpyright","ms-toolsai.jupyter","vscjava.vscode-java-pack","ecmel.vscode-html-css","vue.volar","bmewburn.vscode-intelephense-client","dsznajder.es7-react-js-snippets","golang.go","ms-vscode.powershell","dart-code.dart-code","rust-lang.rust-analyzer","Shopify.ruby-lsp"],linkProtectionTrustedDomains:["https://open-vsx.org","https://marketplace.windsurf.com","https://*.visualstudio.com","https://*.microsoft.com","https://aka.ms","https://*.gallerycdn.vsassets.io","https://*.github.com","https://login.microsoftonline.com","https://*.vscode.dev","https://*.github.dev","https://gh.io","https://portal.azure.com","https://raw.githubusercontent.com","https://private-user-images.githubusercontent.com","https://avatars.githubusercontent.com","https://*.codeium.com","https://*.windsurf.com","https://windsurf.com","https://codeium-staging-exafunction.vercel.app","https://staging.itsdev.in","https://app.devin.ai","https://app.beta.devin.ai","https://*.devinenterprise.com","https://beta.devinenterprise.com"],showTelemetryOptOut:!0,trustedExtensionAuthAccess:{github:["vscode.github","github.remotehub","ms-vscode.remote-server","github.vscode-pull-request-github","github.codespaces","github.copilot","github.copilot-chat","ms-vsliveshare.vsliveshare"],"github-enterprise":["vscode.github","github.remotehub","ms-vscode.remote-server","github.vscode-pull-request-github","github.codespaces","github.copilot","github.copilot-chat","ms-vsliveshare.vsliveshare"],microsoft:["ms-vscode.azure-repos","ms-vscode.remote-server","ms-vsliveshare.vsliveshare","ms-azuretools.vscode-azureresourcegroups","ms-edu.vscode-learning","ms-toolsai.vscode-ai","ms-toolsai.vscode-ai-remote"],"microsoft-sovereign-cloud":["ms-vscode.azure-repos","ms-vscode.remote-server","ms-vsliveshare.vsliveshare","ms-azuretools.vscode-azureresourcegroups","ms-edu.vscode-learning","ms-toolsai.vscode-ai","ms-toolsai.vscode-ai-remote"],windsurf_auth:["codeium.windsurf"]},verifiedExtensionPublishers:{codeium:"https://windsurf.com"},extensionPublisherDisplayNameOverrides:{codeium:"Windsurf"},trustedExtensionPublishers:["meta"],trustedExtensionProtocolHandlers:["vscode.git","vscode.github-authentication","vscode.microsoft-authentication","codeium.windsurf"],webExtensionTips:["codespaces-contrib.codeswing","ms-vscode.vscode-github-issue-notebooks","esbenp.prettier-vscode","hediet.vscode-drawio"],tunnelServerQualities:{stable:{serverApplicationName:"windsurf-server"},next:{serverApplicationName:"windsurf-server-next"},insider:{serverApplicationName:"windsurf-server-insiders"}},quality:"stable",codeiumVersion:"1.48.2",codeiumCommit:"c46c49e94b4d3f41181204d59809d8f1b2c48d68",windsurfVersion:"2.3.15",win32ContextMenu:{x64:{clsid:"79B67B12-BD17-4CE4-B89B-F5F1AD10609A"},arm64:{clsid:"848C41FC-A2D0-4E67-9728-2AF87E61C814"}},updateUrl:"https://windsurf-stable.codeium.com",version:"1.110.1",commit:"c46c49e94b4d3f41181204d59809d8f1b2c48d68",date:"2026-05-27T02:08:16.904Z"},Object.keys(Wo).length===0&&Object.assign(Wo,{version:"1.104.2-dev",nameShort:"Windsurf Dev",nameLong:"Windsurf Dev",applicationName:"code-oss",dataFolderName:".vscode-oss",urlProtocol:"code-oss",reportIssueUrl:"https://github.com/microsoft/vscode/issues/new",licenseName:"MIT",licenseUrl:"https://github.com/microsoft/vscode/blob/main/LICENSE.txt",serverLicenseUrl:"https://github.com/microsoft/vscode/blob/main/LICENSE.txt",defaultChatAgent:{extensionId:"GitHub.copilot",chatExtensionId:"GitHub.copilot-chat",provider:{default:{id:"github",name:"GitHub"},enterprise:{id:"github-enterprise",name:"GitHub Enterprise"}},providerScopes:[]}});var Oi=Wo;var $o={Configuration:"base.contributions.configuration"};function Q6(r,t){return r===t?!0:!r||!t?!1:typeof r=="string"||typeof t=="string"?r===t:r.id===t.id}var oI={properties:{},patternProperties:{}},rI={properties:{},patternProperties:{}},iI={properties:{},patternProperties:{}},sI={properties:{},patternProperties:{}},aI={properties:{},patternProperties:{}},lI={properties:{},patternProperties:{}},vg={properties:{},patternProperties:{}},Rd="vscode://schemas/settings/resourceLanguage";var dI=ht.as(wd.JSONContribution),cw=class extends K{constructor(){super();this.registeredConfigurationDefaults=[];this.overrideIdentifiers=new Set;this._onDidSchemaChange=this._register(new D);this.onDidSchemaChange=this._onDidSchemaChange.event;this._onDidUpdateConfiguration=this._register(new D);this.onDidUpdateConfiguration=this._onDidUpdateConfiguration.event;this.configurationDefaultsOverrides=new Map,this.defaultLanguageConfigurationOverridesNode={id:"defaultOverrides",title:p(1851,null),properties:{}},this.configurationContributors=[this.defaultLanguageConfigurationOverridesNode],this.resourceLanguageSettingsSchema={properties:{},patternProperties:{},additionalProperties:!0,allowTrailingCommas:!0,allowComments:!0},this.configurationProperties={},this.policyConfigurations=new Map,this.excludedConfigurationProperties={},dI.registerSchema(Rd,this.resourceLanguageSettingsSchema),this.registerOverridePropertyPatternKey()}registerConfiguration(e,n=!0){return this.registerConfigurations([e],n),e}registerConfigurations(e,n=!0){let o=new Set;this.doRegisterConfigurations(e,n,o),dI.registerSchema(Rd,this.resourceLanguageSettingsSchema),this._onDidSchemaChange.fire(),this._onDidUpdateConfiguration.fire({properties:o})}deregisterConfigurations(e){let n=new Set;this.doDeregisterConfigurations(e,n),dI.registerSchema(Rd,this.resourceLanguageSettingsSchema),this._onDidSchemaChange.fire(),this._onDidUpdateConfiguration.fire({properties:n})}updateConfigurations({add:e,remove:n}){let o=new Set;this.doDeregisterConfigurations(n,o),this.doRegisterConfigurations(e,!1,o),dI.registerSchema(Rd,this.resourceLanguageSettingsSchema),this._onDidSchemaChange.fire(),this._onDidUpdateConfiguration.fire({properties:o})}registerDefaultConfigurations(e){let n=new Set;this.doRegisterDefaultConfigurations(e,n),this._onDidSchemaChange.fire(),this._onDidUpdateConfiguration.fire({properties:n,defaultsOverrides:!0})}doRegisterDefaultConfigurations(e,n){this.registeredConfigurationDefaults.push(...e);let o=[];for(let{overrides:i,source:s}of e)for(let a in i){n.add(a);let l=this.configurationDefaultsOverrides.get(a)??this.configurationDefaultsOverrides.set(a,{configurationDefaultOverrides:[]}).get(a),d=i[a];if(l.configurationDefaultOverrides.push({value:d,source:s}),Tr.test(a)){let c=this.mergeDefaultConfigurationsForOverrideIdentifier(a,d,s,l.configurationDefaultOverrideValue);if(!c)continue;l.configurationDefaultOverrideValue=c,this.updateDefaultOverrideProperty(a,c,s),o.push(...Cu(a))}else{let c=this.mergeDefaultConfigurationsForConfigurationProperty(a,d,s,l.configurationDefaultOverrideValue);if(!c)continue;l.configurationDefaultOverrideValue=c;let u=this.configurationProperties[a];u&&(this.updatePropertyDefaultValue(a,u),this.updateSchema(a,u))}}this.doRegisterOverrideIdentifiers(o)}deregisterDefaultConfigurations(e){let n=new Set;this.doDeregisterDefaultConfigurations(e,n),this._onDidSchemaChange.fire(),this._onDidUpdateConfiguration.fire({properties:n,defaultsOverrides:!0})}doDeregisterDefaultConfigurations(e,n){for(let o of e){let i=this.registeredConfigurationDefaults.indexOf(o);i!==-1&&this.registeredConfigurationDefaults.splice(i,1)}for(let{overrides:o,source:i}of e)for(let s in o){let a=this.configurationDefaultsOverrides.get(s);if(!a)continue;let l=a.configurationDefaultOverrides.findIndex(d=>i?Q6(d.source,i):d.value===o[s]);if(l!==-1){if(a.configurationDefaultOverrides.splice(l,1),a.configurationDefaultOverrides.length===0&&this.configurationDefaultsOverrides.delete(s),Tr.test(s)){let d;for(let c of a.configurationDefaultOverrides)d=this.mergeDefaultConfigurationsForOverrideIdentifier(s,c.value,c.source,d);d&&!qc(d.value)?(a.configurationDefaultOverrideValue=d,this.updateDefaultOverrideProperty(s,d,i)):(this.configurationDefaultsOverrides.delete(s),delete this.configurationProperties[s],delete this.defaultLanguageConfigurationOverridesNode.properties[s])}else{let d;for(let u of a.configurationDefaultOverrides)d=this.mergeDefaultConfigurationsForConfigurationProperty(s,u.value,u.source,d);a.configurationDefaultOverrideValue=d;let c=this.configurationProperties[s];c&&(this.updatePropertyDefaultValue(s,c),this.updateSchema(s,c))}n.add(s)}}this.updateOverridePropertyPatternKey()}updateDefaultOverrideProperty(e,n,o){let i={section:{id:this.defaultLanguageConfigurationOverridesNode.id,title:this.defaultLanguageConfigurationOverridesNode.title,order:this.defaultLanguageConfigurationOverridesNode.order,extensionInfo:this.defaultLanguageConfigurationOverridesNode.extensionInfo},type:"object",default:n.value,description:p(1850,null,N2(e)),$ref:Rd,defaultDefaultValue:n.value,source:o,defaultValueSource:o};this.configurationProperties[e]=i,this.defaultLanguageConfigurationOverridesNode.properties[e]=i}mergeDefaultConfigurationsForOverrideIdentifier(e,n,o,i){let s=i?.value||{},a=i?.source??new Map;if(!(a instanceof Map)){console.error("objectConfigurationSources is not a Map");return}for(let l of Object.keys(n)){let d=n[l];if(mt(d)&&(zc(s[l])||mt(s[l]))){if(s[l]={...s[l]??{},...d},o)for(let u in d)a.set(`${l}.${u}`,o)}else s[l]=d,o?a.set(l,o):a.delete(l)}return{value:s,source:a}}mergeDefaultConfigurationsForConfigurationProperty(e,n,o,i){let s=this.configurationProperties[e],a=i?.value??s?.defaultDefaultValue,l=o;if(mt(n)&&(s!==void 0&&s.type==="object"||s===void 0&&(zc(a)||mt(a)))){if(l=i?.source??new Map,!(l instanceof Map)){console.error("defaultValueSource is not a Map");return}for(let c in n)o&&l.set(`${e}.${c}`,o);n={...mt(a)?a:{},...n}}return{value:n,source:l}}deltaConfiguration(e){let n=!1,o=new Set;e.removedDefaults&&(this.doDeregisterDefaultConfigurations(e.removedDefaults,o),n=!0),e.addedDefaults&&(this.doRegisterDefaultConfigurations(e.addedDefaults,o),n=!0),e.removedConfigurations&&this.doDeregisterConfigurations(e.removedConfigurations,o),e.addedConfigurations&&this.doRegisterConfigurations(e.addedConfigurations,!1,o),this._onDidSchemaChange.fire(),this._onDidUpdateConfiguration.fire({properties:o,defaultsOverrides:n})}notifyConfigurationSchemaUpdated(...e){this._onDidSchemaChange.fire()}registerOverrideIdentifiers(e){this.doRegisterOverrideIdentifiers(e),this._onDidSchemaChange.fire()}doRegisterOverrideIdentifiers(e){for(let n of e)this.overrideIdentifiers.add(n);this.updateOverridePropertyPatternKey()}doRegisterConfigurations(e,n,o){e.forEach(i=>{this.validateAndRegisterProperties(i,n,i.extensionInfo,i.restrictedProperties,void 0,o),this.configurationContributors.push(i),this.registerJSONConfiguration(i)})}doDeregisterConfigurations(e,n){let o=i=>{if(i.properties)for(let s in i.properties){n.add(s);let a=this.configurationProperties[s];a?.policy?.name&&this.policyConfigurations.delete(a.policy.name),delete this.configurationProperties[s],this.removeFromSchema(s,i.properties[s])}i.allOf?.forEach(s=>o(s))};for(let i of e){o(i);let s=this.configurationContributors.indexOf(i);s!==-1&&this.configurationContributors.splice(s,1)}}validateAndRegisterProperties(e,n=!0,o,i,s=4,a){s=Ft(e.scope)?s:e.scope;let l=e.properties;if(l)for(let c in l){let u=l[c];if(u.section={id:e.id,title:e.title,order:e.order,extensionInfo:e.extensionInfo},n&&Y6(c,u,o?.id)){delete l[c];continue}u.source=o,u.defaultDefaultValue=l[c].default,this.updatePropertyDefaultValue(c,u),Tr.test(c)?u.scope=void 0:(u.scope=Ft(u.scope)?s:u.scope,u.restricted=Ft(u.restricted)?!!i?.includes(c):u.restricted),u.experiment?u.tags?.some(I=>I.toLowerCase()==="onexp")||(u.tags=u.tags??[],u.tags.push("onExP")):u.tags?.some(I=>I.toLowerCase()==="onexp")&&(console.error(`Invalid tag 'onExP' found for property '${c}'. Please use 'experiment' property instead.`),u.experiment={mode:"startup"});let f=l[c].hasOwnProperty("included")&&!l[c].included,g=l[c].policy?.name;f?(this.excludedConfigurationProperties[c]=l[c],g&&(this.policyConfigurations.set(g,c),a.add(c)),delete l[c]):(a.add(c),g&&this.policyConfigurations.set(g,c),this.configurationProperties[c]=l[c],!l[c].deprecationMessage&&l[c].markdownDeprecationMessage&&(l[c].deprecationMessage=l[c].markdownDeprecationMessage))}let d=e.allOf;if(d)for(let c of d)this.validateAndRegisterProperties(c,n,o,i,s,a)}getConfigurations(){return this.configurationContributors}getConfigurationProperties(){return this.configurationProperties}getPolicyConfigurations(){return this.policyConfigurations}getExcludedConfigurationProperties(){return this.excludedConfigurationProperties}getRegisteredDefaultConfigurations(){return[...this.registeredConfigurationDefaults]}getConfigurationDefaultsOverrides(){let e=new Map;for(let[n,o]of this.configurationDefaultsOverrides)o.configurationDefaultOverrideValue&&e.set(n,o.configurationDefaultOverrideValue);return e}registerJSONConfiguration(e){let n=o=>{let i=o.properties;if(i)for(let a in i)this.updateSchema(a,i[a]);o.allOf?.forEach(n)};n(e)}updateSchema(e,n){switch(oI.properties[e]=n,n.scope){case 1:rI.properties[e]=n;break;case 2:sI.properties[e]=n;break;case 3:iI.properties[e]=n;break;case 7:aI.properties[e]=n;break;case 4:lI.properties[e]=n;break;case 5:vg.properties[e]=n;break;case 6:vg.properties[e]=n,this.resourceLanguageSettingsSchema.properties[e]=n;break}}removeFromSchema(e,n){switch(delete oI.properties[e],n.scope){case 1:delete rI.properties[e];break;case 2:delete sI.properties[e];break;case 3:delete iI.properties[e];break;case 7:delete aI.properties[e];break;case 4:delete lI.properties[e];break;case 5:case 6:delete vg.properties[e],delete this.resourceLanguageSettingsSchema.properties[e];break}}updateOverridePropertyPatternKey(){for(let e of this.overrideIdentifiers.values()){let n=`[${e}]`,o={type:"object",description:p(1852,null),errorMessage:p(1853,null),$ref:Rd};this.updatePropertyDefaultValue(n,o),oI.properties[n]=o,rI.properties[n]=o,iI.properties[n]=o,sI.properties[n]=o,aI.properties[n]=o,lI.properties[n]=o,vg.properties[n]=o}}registerOverridePropertyPatternKey(){let e={type:"object",description:p(1852,null),errorMessage:p(1853,null),$ref:Rd};oI.patternProperties[Ba]=e,rI.patternProperties[Ba]=e,iI.patternProperties[Ba]=e,sI.patternProperties[Ba]=e,aI.patternProperties[Ba]=e,lI.patternProperties[Ba]=e,vg.patternProperties[Ba]=e,this._onDidSchemaChange.fire()}updatePropertyDefaultValue(e,n){let o=this.configurationDefaultsOverrides.get(e)?.configurationDefaultOverrideValue,i,s;o&&(!n.disallowConfigurationDefault||!o.source)&&(i=o.value,s=o.source),zc(i)&&(i=n.defaultDefaultValue,s=void 0),zc(i)&&(i=X6(n.type)),n.default=i,n.defaultValueSource=s}},B2="\\[([^\\]]+)\\]",H2=new RegExp(B2,"g"),Ba=`^(${B2})+$`,Tr=new RegExp(Ba);function Cu(r){let t=[];if(Tr.test(r)){let e=H2.exec(r);for(;e?.length;){let n=e[1].trim();n&&t.push(n),e=H2.exec(r)}}return cr(t)}function X6(r){switch(Array.isArray(r)?r[0]:r){case"boolean":return!1;case"integer":case"number":return 0;case"string":return"";case"array":return[];case"object":return{};default:return null}}var cI=new cw;ht.add($o.Configuration,cI);function Y6(r,t,e){return r.trim()?Tr.test(r)?p(1849,null,r):cI.getConfigurationProperties()[r]!==void 0&&(!e||!Z6.has(e.toLowerCase()))?p(1847,null,r):t.policy?.name&&cI.getPolicyConfigurations().get(t.policy?.name)!==void 0?p(1846,null,r,t.policy?.name,cI.getPolicyConfigurations().get(t.policy?.name)):null:p(1848,null)}var Z6=new Set(Oi.defaultChatAgent?[Oi.defaultChatAgent.extensionId,Oi.defaultChatAgent.chatExtensionId].map(r=>r.toLowerCase()):[]);var pI=N("requestService");function e$(r){return r.res.statusCode&&r.res.statusCode>=200&&r.res.statusCode<300||r.res.statusCode===1223}function $2(r){return r.res.statusCode===204}async function pw(r){return $2(r)?null:(await p_(r.stream)).toString()}async function G2(r){if(!e$(r))throw new Error("Server returned "+r.res.statusCode);if($2(r))return null;let e=(await p_(r.stream)).toString();try{return JSON.parse(e)}catch(n){throw n.message+=`:
`+e,n}}var t$=!1,uw=[],V2,W2;function n$(r=!0,t=!0){if(V2===r&&W2===t)return;V2=r,W2=t;let e=ht.as($o.Configuration),n=uw;uw=[{id:"http",order:15,title:p(2277,null),type:"object",scope:2,properties:{"http.useLocalProxyConfiguration":{type:"boolean",default:t,markdownDescription:p(2292,null),restricted:!0}}},{id:"http",order:15,title:p(2277,null),type:"object",scope:1,properties:{"http.electronFetch":{type:"boolean",default:!1,description:p(2275,null),restricted:!0}}},{id:"http",order:15,title:p(2277,null),type:"object",scope:r?1:2,properties:{"http.proxy":{type:"string",pattern:"^(https?|socks|socks4a?|socks5h?)://([^:]*(:[^@]*)?@)?([^:]+|\\[[:0-9a-fA-F]+\\])(:\\d+)?/?$|^$",markdownDescription:p(2280,null,"`#http.useLocalProxyConfiguration#`"),restricted:!0},"http.proxyStrictSSL":{type:"boolean",default:!0,markdownDescription:p(2288,null,"`#http.useLocalProxyConfiguration#`"),restricted:!0},"http.proxyKerberosServicePrincipal":{type:"string",markdownDescription:p(2282,null,"`#http.useLocalProxyConfiguration#`"),restricted:!0},"http.noProxy":{type:"array",items:{type:"string"},markdownDescription:p(2279,null,"`#http.useLocalProxyConfiguration#`"),restricted:!0},"http.proxyAuthorization":{type:["null","string"],default:null,markdownDescription:p(2281,null,"`#http.useLocalProxyConfiguration#`"),restricted:!0},"http.proxySupport":{type:"string",enum:["off","on","fallback","override"],enumDescriptions:[p(2285,null),p(2286,null),p(2284,null),p(2287,null)],default:"override",markdownDescription:p(2283,null,"`#http.useLocalProxyConfiguration#`"),restricted:!0},"http.systemCertificates":{type:"boolean",default:!0,markdownDescription:p(2289,null,"`#http.useLocalProxyConfiguration#`"),restricted:!0},"http.systemCertificatesNode":{type:"boolean",tags:["experimental"],default:t$,markdownDescription:p(2290,null,"`#http.useLocalProxyConfiguration#`"),restricted:!0,experiment:{mode:"auto"}},"http.experimental.systemCertificatesV2":{type:"boolean",tags:["experimental"],default:!1,markdownDescription:p(2291,null,"`#http.useLocalProxyConfiguration#`"),restricted:!0},"http.fetchAdditionalSupport":{type:"boolean",default:!0,markdownDescription:p(2276,null,"`#http.useLocalProxyConfiguration#`","`#http.proxySupport#`","`#http.systemCertificates#`"),restricted:!0},"http.experimental.networkInterfaceCheckInterval":{type:"number",default:300,minimum:-1,tags:["experimental"],markdownDescription:p(2278,null,"`#http.useLocalProxyConfiguration#`"),restricted:!0,experiment:{mode:"auto"}}}}],e.updateConfigurations({add:uw,remove:n})}n$();var mw=class{constructor(t){this.options=t}getItemLabel(t){return t.label}getItemDescription(t){if(!this.options?.skipDescription)return t.description}getItemPath(t){if(!this.options?.skipPath)return t.resource?.scheme===X.file?t.resource.fsPath:t.resource?.path}},Sle=new mw,z2=N("quickInputService");var q2=N("encryptionService"),Tle=N("encryptionMainService");var Tu=class r extends K{constructor(e,n=Object.create(null)){super();this.database=e;this.options=n;this._onDidChangeStorage=this._register(new Ea);this.onDidChangeStorage=this._onDidChangeStorage.event;this.state=0;this.cache=new Map;this.flushDelayer=this._register(new Xc(r.DEFAULT_FLUSH_DELAY));this.pendingDeletes=new Set;this.pendingInserts=new Map;this.pendingClose=void 0;this.whenFlushedCallbacks=[];this.registerListeners()}static{this.DEFAULT_FLUSH_DELAY=100}registerListeners(){this._register(this.database.onDidChangeItemsExternal(e=>this.onDidChangeItemsExternal(e)))}onDidChangeItemsExternal(e){this._onDidChangeStorage.pause();try{e.changed?.forEach((n,o)=>this.acceptExternal(o,n)),e.deleted?.forEach(n=>this.acceptExternal(n,void 0))}finally{this._onDidChangeStorage.resume()}}acceptExternal(e,n){if(this.state===2)return;let o=!1;Ft(n)?o=this.cache.delete(e):this.cache.get(e)!==n&&(this.cache.set(e,n),o=!0),o&&this._onDidChangeStorage.fire({key:e,external:!0})}get items(){return this.cache}get size(){return this.cache.size}async init(){this.state===0&&(this.state=1,this.options.hint!==0&&(this.cache=await this.database.getItems()))}get(e,n){let o=this.cache.get(e);return Ft(o)?n:o}getBoolean(e,n){let o=this.get(e);return Ft(o)?n:o==="true"}getNumber(e,n){let o=this.get(e);return Ft(o)?n:parseInt(o,10)}getObject(e,n){let o=this.get(e);return Ft(o)?n:Mb(o)}async set(e,n,o=!1){if(this.state===2)return;if(Ft(n))return this.delete(e,o);let i=mt(n)||Array.isArray(n)?BF(n):String(n);if(this.cache.get(e)!==i)return this.cache.set(e,i),this.pendingInserts.set(e,i),this.pendingDeletes.delete(e),this._onDidChangeStorage.fire({key:e,external:o}),this.doFlush()}async delete(e,n=!1){if(!(this.state===2||!this.cache.delete(e)))return this.pendingDeletes.has(e)||this.pendingDeletes.add(e),this.pendingInserts.delete(e),this._onDidChangeStorage.fire({key:e,external:n}),this.doFlush()}async optimize(){if(this.state!==2)return await this.flush(0),this.database.optimize()}async close(){return this.pendingClose||(this.pendingClose=this.doClose()),this.pendingClose}async doClose(){this.state=2;try{await this.doFlush(0)}catch{}await this.database.close(()=>this.cache)}get hasPending(){return this.pendingInserts.size>0||this.pendingDeletes.size>0}async flushPending(){if(!this.hasPending)return;let e={insert:this.pendingInserts,delete:this.pendingDeletes};return this.pendingDeletes=new Set,this.pendingInserts=new Map,this.database.updateItems(e).finally(()=>{if(!this.hasPending)for(;this.whenFlushedCallbacks.length;)this.whenFlushedCallbacks.pop()?.()})}async flush(e){if(!(this.state===2||this.pendingClose))return this.doFlush(e)}async doFlush(e){return this.options.hint===1?this.flushPending():this.flushDelayer.trigger(()=>this.flushPending(),e)}async whenFlushed(){if(this.hasPending)return new Promise(e=>this.whenFlushedCallbacks.push(e))}isInMemory(){return this.options.hint===1}},_u=class{constructor(){this.onDidChangeItemsExternal=He.None;this.items=new Map}async getItems(){return this.items}async updateItems(t){t.insert?.forEach((e,n)=>this.items.set(n,e)),t.delete?.forEach(e=>this.items.delete(e))}async optimize(){}async close(){}};var bg=N("environmentService"),Mle=bg;var Pu=N("IUriIdentityService");function K2(r){let t=r;return!!(t&&typeof t=="object"&&typeof t.id=="string"&&typeof t.isDefault=="boolean"&&typeof t.name=="string"&&E.isUri(t.location)&&E.isUri(t.globalStorageHome)&&E.isUri(t.settingsResource)&&E.isUri(t.keybindingsResource)&&E.isUri(t.tasksResource)&&E.isUri(t.snippetsHome)&&E.isUri(t.promptsHome)&&E.isUri(t.extensionsResource)&&E.isUri(t.mcpResource))}var J2=N("IUserDataProfilesService");function mI(r,t,e,n,o,i){return{id:r,name:t,location:e,isDefault:!1,icon:o?.icon,globalStorageHome:i&&o?.useDefaultFlags?.globalState?i.globalStorageHome:Qt(e,"globalStorage"),settingsResource:i&&o?.useDefaultFlags?.settings?i.settingsResource:Qt(e,"settings.json"),keybindingsResource:i&&o?.useDefaultFlags?.keybindings?i.keybindingsResource:Qt(e,"keybindings.json"),tasksResource:i&&o?.useDefaultFlags?.tasks?i.tasksResource:Qt(e,"tasks.json"),snippetsHome:i&&o?.useDefaultFlags?.snippets?i.snippetsHome:Qt(e,"snippets"),promptsHome:i&&o?.useDefaultFlags?.prompts?i.promptsHome:Qt(e,"prompts"),extensionsResource:i&&o?.useDefaultFlags?.extensions?i.extensionsResource:Qt(e,"extensions.json"),mcpResource:i&&o?.useDefaultFlags?.mcp?i.mcpResource:Qt(e,"mcp.json"),cacheHome:Qt(n,r),useDefaultFlags:o?.useDefaultFlags,isTransient:o?.transient,workspaces:o?.workspaces}}var fI=class extends K{constructor(e,n,o,i){super();this.environmentService=e;this.fileService=n;this.uriIdentityService=o;this.logService=i;this._onDidChangeProfiles=this._register(new D);this.onDidChangeProfiles=this._onDidChangeProfiles.event;this._onWillCreateProfile=this._register(new D);this.onWillCreateProfile=this._onWillCreateProfile.event;this._onWillRemoveProfile=this._register(new D);this.onWillRemoveProfile=this._onWillRemoveProfile.event;this._onDidResetWorkspaces=this._register(new D);this.onDidResetWorkspaces=this._onDidResetWorkspaces.event;this.profileCreationPromises=new Map;this.transientProfilesObject={profiles:[],emptyWindows:new Map};this.profilesHome=Qt(this.environmentService.userRoamingDataHome,"profiles"),this.profilesCacheHome=Qt(this.environmentService.cacheHome,"CachedProfilesData")}static{this.PROFILES_KEY="userDataProfiles"}static{this.PROFILE_ASSOCIATIONS_KEY="profileAssociations"}get defaultProfile(){return this.profiles[0]}get profiles(){return[...this.profilesObject.profiles,...this.transientProfilesObject.profiles]}init(){this._profilesObject=void 0}get profilesObject(){if(!this._profilesObject){let e=this.createDefaultProfile(),n=[e];try{for(let i of this.getStoredProfiles()){if(this.isInvalidProfile(i)){this.logService.warn("Skipping the invalid stored profile",i.location||i.name);continue}let s=tn(i.location);n.push(mI(s,i.name,i.location,this.profilesCacheHome,{icon:i.icon,useDefaultFlags:i.useDefaultFlags},e))}}catch(i){this.logService.error(i)}let o=new Map;if(n.length)try{let i=this.getStoredProfileAssociations();if(i.workspaces)for(let[s,a]of Object.entries(i.workspaces)){let l=E.parse(s),d=n.find(c=>c.id===a);if(d){let c=d.workspaces?d.workspaces.slice(0):[];c.push(l),d.workspaces=c}}if(i.emptyWindows)for(let[s,a]of Object.entries(i.emptyWindows)){let l=n.find(d=>d.id===a);l&&o.set(s,l)}}catch(i){this.logService.error(i)}this._profilesObject={profiles:n,emptyWindows:o}}return this._profilesObject}isInvalidProfile(e){return!!(!e.name||!Me(e.name)||!e.location||e.isSystem||this.uriIdentityService.extUri.basename(this.uriIdentityService.extUri.dirname(e.location))==="builtin")}createDefaultProfile(){let e=mI("__default__profile__",p(2708,null),this.environmentService.userRoamingDataHome,this.profilesCacheHome);return{...e,extensionsResource:this.getDefaultProfileExtensionsLocation()??e.extensionsResource,isDefault:!0}}async createTransientProfile(e){let n="Temp",o=new RegExp(`${hr(n)}\\s(\\d+)`),i=0;for(let a of this.profiles){let l=o.exec(a.name),d=l?parseInt(l[1]):0;i=d>i?d:i}let s=`${n} ${i+1}`;return this.createProfile(zr(ct()).toString(16),s,{transient:!0},e)}async createNamedProfile(e,n,o){return this.createProfile(zr(ct()).toString(16),e,n,o)}async createProfile(e,n,o,i){return await this.doCreateProfile(e,n,o,i)}async doCreateProfile(e,n,o,i){if(!Me(n)||!n)throw new Error("Name of the profile is mandatory and must be of type `string`");let s=this.profileCreationPromises.get(n);return s||(s=(async()=>{try{if(this.profiles.find(u=>u.id===e||!u.isTransient&&!o?.transient&&u.name===n))throw new Error(`Profile with ${n} name already exists`);let l=i?this.getWorkspace(i):void 0;E.isUri(l)&&(o={...o,workspaces:[l]});let d=mI(e,n,this.uriIdentityService.extUri.joinPath(this.profilesHome,e),this.profilesCacheHome,o,this.defaultProfile);await this.fileService.createFolder(d.location);let c=[];return this._onWillCreateProfile.fire({profile:d,join(u){c.push(u)}}),await wa.settled(c),l&&!E.isUri(l)&&this.updateEmptyWindowAssociation(l,d,!!d.isTransient),this.updateProfiles([d],[],[]),d}finally{this.profileCreationPromises.delete(n)}})(),this.profileCreationPromises.set(n,s)),s}async updateProfile(e,n){let o=[];for(let s of this.profiles){let a;if(e.id===s.id)s.isDefault?n.workspaces&&(a=s,a.workspaces=n.workspaces):a=mI(s.id,n.name??s.name,s.location,this.profilesCacheHome,{icon:n.icon===null?void 0:n.icon??s.icon,transient:n.transient??s.isTransient,useDefaultFlags:n.useDefaultFlags??s.useDefaultFlags,workspaces:n.workspaces??s.workspaces},this.defaultProfile);else if(n.workspaces){let l=s.workspaces?.filter(d=>!n.workspaces?.some(c=>this.uriIdentityService.extUri.isEqual(d,c)));s.workspaces?.length!==l?.length&&(a=s,a.workspaces=l)}a&&o.push(a)}if(!o.length)throw e.isDefault?new Error("Cannot update default profile"):new Error(`Profile '${e.name}' does not exist`);this.updateProfiles([],[],o);let i=this.profiles.find(s=>s.id===e.id);if(!i)throw new Error(`Profile '${e.name}' was not updated`);return i}async removeProfile(e){if(e.isDefault)throw new Error("Cannot remove default profile");let n=this.profiles.find(i=>i.id===e.id);if(!n)throw new Error(`Profile '${e.name}' does not exist`);let o=[];this._onWillRemoveProfile.fire({profile:n,join(i){o.push(i)}});try{await Promise.allSettled(o)}catch(i){this.logService.error(i)}this.updateProfiles([],[n],[]);try{await this.fileService.del(n.cacheHome,{recursive:!0})}catch(i){sF(i)!==1&&this.logService.error(i)}}async setProfileForWorkspace(e,n){let o=this.profiles.find(s=>s.id===n.id);if(!o)throw new Error(`Profile '${n.name}' does not exist`);let i=this.getWorkspace(e);if(E.isUri(i)){let s=o.workspaces?[...o.workspaces]:[];s.some(a=>this.uriIdentityService.extUri.isEqual(a,i))||(s.push(i),await this.updateProfile(o,{workspaces:s}))}else this.updateEmptyWindowAssociation(i,o,!1),this.updateStoredProfiles(this.profiles)}unsetWorkspace(e,n=!1){let o=this.getWorkspace(e);if(E.isUri(o)){let i=this.getProfileForWorkspace(e);i&&this.updateProfile(i,{workspaces:i.workspaces?.filter(s=>!this.uriIdentityService.extUri.isEqual(s,o))})}else this.updateEmptyWindowAssociation(o,void 0,n),this.updateStoredProfiles(this.profiles)}async resetWorkspaces(){this.transientProfilesObject.emptyWindows.clear(),this.profilesObject.emptyWindows.clear();for(let e of this.profiles)e.workspaces=void 0;this.updateProfiles([],[],this.profiles),this._onDidResetWorkspaces.fire()}async cleanUp(){try{if(await this.fileService.exists(this.profilesHome)){let e=this.uriIdentityService.extUri.joinPath(this.profilesHome,"builtin");if(await this.fileService.exists(e))try{await this.fileService.del(e,{recursive:!0})}catch(o){this.logService.error(o)}let n=await this.fileService.resolve(this.profilesHome);await Promise.all((n.children||[]).filter(o=>o.isDirectory&&this.profiles.every(i=>!this.uriIdentityService.extUri.isEqual(i.location,o.resource))).map(o=>this.fileService.del(o.resource,{recursive:!0})))}}catch(e){this.logService.error("Error deleting redundant profile folders",e)}try{let e=this.getStoredProfiles(),n=[];for(let o of this.getStoredProfiles())this.isInvalidProfile(o)?this.logService.warn(`Invalid user data profile found: ${o.name}`):n.push(o);e.length!==n.length&&this.saveStoredProfiles(n)}catch(e){this.logService.error("Error removing invalid stored profiles",e)}}async cleanUpTransientProfiles(){let e=this.transientProfilesObject.profiles.filter(n=>!this.isProfileAssociatedToWorkspace(n));await Promise.allSettled(e.map(n=>this.removeProfile(n)))}getProfileForWorkspace(e){let n=this.getWorkspace(e);return E.isUri(n)?this.profiles.find(o=>o.workspaces?.some(i=>this.uriIdentityService.extUri.isEqual(i,n))):this.profilesObject.emptyWindows.get(n)??this.transientProfilesObject.emptyWindows.get(n)}getWorkspace(e){return dF(e)?e.uri:cF(e)?e.configPath:e.id}isProfileAssociatedToWorkspace(e){return!!(e.workspaces?.length||[...this.profilesObject.emptyWindows.values()].some(n=>this.uriIdentityService.extUri.isEqual(n.location,e.location))||[...this.transientProfilesObject.emptyWindows.values()].some(n=>this.uriIdentityService.extUri.isEqual(n.location,e.location)))}updateProfiles(e,n,o,i=!1){let s=[...this.profiles,...e],a=this.transientProfilesObject.profiles;this.transientProfilesObject.profiles=[];let l=[];for(let d of s){if(n.some(c=>d.id===c.id)){for(let c of[...this.profilesObject.emptyWindows.keys()])d.id===this.profilesObject.emptyWindows.get(c)?.id&&this.profilesObject.emptyWindows.delete(c);continue}if(!d.isDefault){d=o.find(u=>d.id===u.id)??d;let c=a.find(u=>d.id===u.id);if(d.isTransient)this.transientProfilesObject.profiles.push(d);else if(c){for(let[u,f]of this.transientProfilesObject.emptyWindows.entries())if(d.id===f.id){this.transientProfilesObject.emptyWindows.delete(u),this.profilesObject.emptyWindows.set(u,d);break}}}d.workspaces?.length===0&&(d.workspaces=void 0),l.push(d)}this.updateStoredProfiles(l),i||this.triggerProfilesChanges(e,n,o)}triggerProfilesChanges(e,n,o){this._onDidChangeProfiles.fire({added:e,removed:n,updated:o,all:this.profiles})}updateEmptyWindowAssociation(e,n,o){o=n?.isTransient?!0:o,o?n?this.transientProfilesObject.emptyWindows.set(e,n):this.transientProfilesObject.emptyWindows.delete(e):(this.transientProfilesObject.emptyWindows.delete(e),n?this.profilesObject.emptyWindows.set(e,n):this.profilesObject.emptyWindows.delete(e))}updateStoredProfiles(e){let n=[],o={},i={};for(let s of e)if(!s.isTransient&&(s.isDefault||n.push({location:s.location,name:s.name,icon:s.icon,useDefaultFlags:s.useDefaultFlags}),s.workspaces))for(let a of s.workspaces)o[a.toString()]=s.id;for(let[s,a]of this.profilesObject.emptyWindows.entries())i[s.toString()]=a.id;this.saveStoredProfileAssociations({workspaces:o,emptyWindows:i}),this.saveStoredProfiles(n),this._profilesObject=void 0}getStoredProfiles(){return[]}saveStoredProfiles(e){throw new Error("not implemented")}getStoredProfileAssociations(){return{}}saveStoredProfileAssociations(e){throw new Error("not implemented")}getDefaultProfileExtensionsLocation(){}};fI=L([P(0,bg),P(1,hd),P(2,Pu),P(3,be)],fI);var r$="__$__isNewStorageMarker",gI="__$__targetStorageMarker",Ps=N("storageService");function i$(r){let t=r.get(gI);if(t)try{return JSON.parse(t)}catch{}return Object.create(null)}var gw=class r extends K{constructor(e={flushInterval:r.DEFAULT_FLUSH_INTERVAL}){super();this._onDidChangeValue=this._register(new Ea);this._onDidChangeTarget=this._register(new Ea);this.onDidChangeTarget=this._onDidChangeTarget.event;this._onWillSaveState=this._register(new D);this.onWillSaveState=this._onWillSaveState.event;this.runFlushWhenIdle=this._register(new An);this._workspaceKeyTargets=void 0;this._profileKeyTargets=void 0;this._applicationKeyTargets=void 0;this.flushWhenIdleScheduler=this._register(new ho(()=>this.doFlushWhenIdle(),e.flushInterval))}static{this.DEFAULT_FLUSH_INTERVAL=60*1e3}onDidChangeValue(e,n,o){return He.filter(this._onDidChangeValue.event,i=>i.scope===e&&(n===void 0||i.key===n),o)}doFlushWhenIdle(){this.runFlushWhenIdle.value=tP(()=>{this.shouldFlushWhenIdle()&&this.flush(),this.flushWhenIdleScheduler.schedule()})}shouldFlushWhenIdle(){return!0}stopFlushWhenIdle(){Hn([this.runFlushWhenIdle,this.flushWhenIdleScheduler])}initialize(){return this.initializationPromise||(this.initializationPromise=(async()=>{On("code/willInitStorage");try{await this.doInitialize()}finally{On("code/didInitStorage")}this.flushWhenIdleScheduler.schedule()})()),this.initializationPromise}emitDidChangeValue(e,n){let{key:o,external:i}=n;if(o===gI){switch(e){case-1:this._applicationKeyTargets=void 0;break;case 0:this._profileKeyTargets=void 0;break;case 1:this._workspaceKeyTargets=void 0;break}this._onDidChangeTarget.fire({scope:e})}else this._onDidChangeValue.fire({scope:e,key:o,target:this.getKeyTargets(e)[o],external:i})}emitWillSaveState(e){this._onWillSaveState.fire({reason:e})}get(e,n,o){return this.getStorage(n)?.get(e,o)}getBoolean(e,n,o){return this.getStorage(n)?.getBoolean(e,o)}getNumber(e,n,o){return this.getStorage(n)?.getNumber(e,o)}getObject(e,n,o){return this.getStorage(n)?.getObject(e,o)}storeAll(e,n){this.withPausedEmitters(()=>{for(let o of e)this.store(o.key,o.value,o.scope,o.target,n)})}store(e,n,o,i,s=!1){if(Ft(n)){this.remove(e,o,s);return}this.withPausedEmitters(()=>{this.updateKeyTarget(e,o,i),this.getStorage(o)?.set(e,n,s)})}remove(e,n,o=!1){this.withPausedEmitters(()=>{this.updateKeyTarget(e,n,void 0),this.getStorage(n)?.delete(e,o)})}withPausedEmitters(e){this._onDidChangeValue.pause(),this._onDidChangeTarget.pause();try{e()}finally{this._onDidChangeValue.resume(),this._onDidChangeTarget.resume()}}keys(e,n){let o=[],i=this.getKeyTargets(e);for(let s of Object.keys(i))i[s]===n&&o.push(s);return o}updateKeyTarget(e,n,o,i=!1){let s=this.getKeyTargets(n);typeof o=="number"?s[e]!==o&&(s[e]=o,this.getStorage(n)?.set(gI,JSON.stringify(s),i)):typeof s[e]=="number"&&(delete s[e],this.getStorage(n)?.set(gI,JSON.stringify(s),i))}get workspaceKeyTargets(){return this._workspaceKeyTargets||(this._workspaceKeyTargets=this.loadKeyTargets(1)),this._workspaceKeyTargets}get profileKeyTargets(){return this._profileKeyTargets||(this._profileKeyTargets=this.loadKeyTargets(0)),this._profileKeyTargets}get applicationKeyTargets(){return this._applicationKeyTargets||(this._applicationKeyTargets=this.loadKeyTargets(-1)),this._applicationKeyTargets}getKeyTargets(e){switch(e){case-1:return this.applicationKeyTargets;case 0:return this.profileKeyTargets;default:return this.workspaceKeyTargets}}loadKeyTargets(e){let n=this.getStorage(e);return n?i$(n):Object.create(null)}isNew(e){return this.getBoolean(r$,e)===!0}async flush(e=0){this._onWillSaveState.fire({reason:e});let n=this.getStorage(-1),o=this.getStorage(0),i=this.getStorage(1);switch(e){case 0:await wa.settled([n?.whenFlushed()??Promise.resolve(),o?.whenFlushed()??Promise.resolve(),i?.whenFlushed()??Promise.resolve()]);break;case 1:await wa.settled([n?.flush(0)??Promise.resolve(),o?.flush(0)??Promise.resolve(),i?.flush(0)??Promise.resolve()]);break}}async log(){let e=this.getStorage(-1)?.items??new Map,n=this.getStorage(0)?.items??new Map,o=this.getStorage(1)?.items??new Map;return s$(e,n,o,this.getLogDetails(-1)??"",this.getLogDetails(0)??"",this.getLogDetails(1)??"")}async optimize(e){return await this.flush(),this.getStorage(e)?.optimize()}async switch(e,n){return this.emitWillSaveState(0),K2(e)?this.switchToProfile(e,n):this.switchToWorkspace(e,n)}canSwitchProfile(e,n){return!(e.id===n.id||j2(n)&&j2(e))}switchData(e,n,o){this.withPausedEmitters(()=>{let i=new Set;for(let[s,a]of e)i.add(s),n.get(s)!==a&&this.emitDidChangeValue(o,{key:s,external:!0});for(let[s]of n.items)i.has(s)||this.emitDidChangeValue(o,{key:s,external:!0})})}};function j2(r){return r.isDefault||!!r.useDefaultFlags?.globalState}var hI=class extends gw{constructor(){super();this.applicationStorage=this._register(new Tu(new _u,{hint:1}));this.profileStorage=this._register(new Tu(new _u,{hint:1}));this.workspaceStorage=this._register(new Tu(new _u,{hint:1}));this._register(this.workspaceStorage.onDidChangeStorage(e=>this.emitDidChangeValue(1,e))),this._register(this.profileStorage.onDidChangeStorage(e=>this.emitDidChangeValue(0,e))),this._register(this.applicationStorage.onDidChangeStorage(e=>this.emitDidChangeValue(-1,e)))}getStorage(e){switch(e){case-1:return this.applicationStorage;case 0:return this.profileStorage;default:return this.workspaceStorage}}getLogDetails(e){switch(e){case-1:return"inMemory (application)";case 0:return"inMemory (profile)";default:return"inMemory (workspace)"}}async doInitialize(){}async switchToProfile(){}async switchToWorkspace(){}shouldFlushWhenIdle(){return!1}hasScope(e){return!1}};async function s$(r,t,e,n,o,i){let s=h=>{try{return JSON.parse(h)}catch{return h}},a=new Map,l=new Map;r.forEach((h,C)=>{a.set(C,h),l.set(C,s(h))});let d=new Map,c=new Map;t.forEach((h,C)=>{d.set(C,h),c.set(C,s(h))});let u=new Map,f=new Map;e.forEach((h,C)=>{u.set(C,h),f.set(C,s(h))}),console.group(n!==o?`Storage: Application (path: ${n})`:`Storage: Application & Profile (path: ${n}, default profile)`);let g=[];if(a.forEach((h,C)=>{g.push({key:C,value:h})}),console.table(g),console.groupEnd(),console.log(l),n!==o){console.group(`Storage: Profile (path: ${o}, profile specific)`);let h=[];d.forEach((C,_)=>{h.push({key:_,value:C})}),console.table(h),console.groupEnd(),console.log(c)}console.group(`Storage: Workspace (path: ${i})`);let I=[];u.forEach((h,C)=>{I.push({key:C,value:h})}),console.table(I),console.groupEnd(),console.log(f)}var Q2=N("secretStorageService"),vI=class extends K{constructor(e,n,o,i){super();this._useInMemoryStorage=e;this._storageService=n;this._encryptionService=o;this._logService=i;this._storagePrefix="secret://";this.onDidChangeSecretEmitter=this._register(new D);this.onDidChangeSecret=this.onDidChangeSecretEmitter.event;this._sequencer=new Da;this._type="unknown";this._onDidChangeValueDisposable=this._register(new te);this._lazyStorageService=new xt(()=>this.initialize())}get type(){return this._type}get resolvedStorageService(){return this._lazyStorageService.value}get(e){return this._sequencer.queue(e,async()=>{let n=await this.resolvedStorageService,o=this.getKey(e);this._logService.trace("[secrets] getting secret for key:",o);let i=n.get(o,-1);if(!i){this._logService.trace("[secrets] no secret found for key:",o);return}try{this._logService.trace("[secrets] decrypting gotten secret for key:",o);let s=this._type==="in-memory"?i:await this._encryptionService.decrypt(i);return this._logService.trace("[secrets] decrypted secret for key:",o),s}catch(s){this._logService.error(s),this.delete(e);return}})}set(e,n){return this._sequencer.queue(e,async()=>{let o=await this.resolvedStorageService;this._logService.trace("[secrets] encrypting secret for key:",e);let i;try{i=this._type==="in-memory"?n:await this._encryptionService.encrypt(n)}catch(a){throw this._logService.error(a),a}let s=this.getKey(e);this._logService.trace("[secrets] storing encrypted secret for key:",s),o.store(s,i,-1,1),this._logService.trace("[secrets] stored encrypted secret for key:",s)})}delete(e){return this._sequencer.queue(e,async()=>{let n=await this.resolvedStorageService,o=this.getKey(e);this._logService.trace("[secrets] deleting secret for key:",o),n.remove(o,-1),this._logService.trace("[secrets] deleted secret for key:",o)})}keys(){return this._sequencer.queue("__keys__",async()=>{let e=await this.resolvedStorageService;this._logService.trace("[secrets] fetching keys of all secrets");let n=e.keys(-1,1);return this._logService.trace("[secrets] fetched keys of all secrets"),n.filter(o=>o.startsWith(this._storagePrefix)).map(o=>o.slice(this._storagePrefix.length))})}async initialize(){let e;if(!this._useInMemoryStorage&&await this._encryptionService.isEncryptionAvailable())this._logService.trace("[SecretStorageService] Encryption is available, using persisted storage"),this._type="persisted",e=this._storageService;else{if(this._type==="in-memory")return this._storageService;this._logService.trace("[SecretStorageService] Encryption is not available, falling back to in-memory storage"),this._type="in-memory",e=this._register(new hI)}return this._onDidChangeValueDisposable.clear(),this._onDidChangeValueDisposable.add(e.onDidChangeValue(-1,void 0,this._onDidChangeValueDisposable)(n=>{this.onDidChangeValue(n.key)})),e}reinitialize(){this._lazyStorageService=new xt(()=>this.initialize())}onDidChangeValue(e){if(!e.startsWith(this._storagePrefix))return;let n=e.slice(this._storagePrefix.length);this._logService.trace(`[SecretStorageService] Notifying change in value for secret: ${n}`),this.onDidChangeSecretEmitter.fire(n)}getKey(e){return`${this._storagePrefix}${e}`}};vI=L([P(1,Ps),P(2,q2),P(3,be)],vI);var Lde={Extensions:{name:{key:"extensionsConfigurationTitle",value:p(141,null)}},IntegratedTerminal:{name:{key:"terminalIntegratedConfigurationTitle",value:p(144,null)}},InteractiveSession:{name:{key:"interactiveSessionConfigurationTitle",value:p(142,null)}},Telemetry:{name:{key:"telemetryConfigurationTitle",value:p(143,null)}},Update:{name:{key:"updateConfigurationTitle",value:p(145,null)}}};var Ig="^([a-z0-9A-Z][a-z0-9-A-Z]*)\\.([a-z0-9A-Z][a-z0-9-A-Z]*)$",Yde=new RegExp(Ig);var Zde=N("extensionGalleryService");var ece=N("extensionManagementService");var tce=N("IGlobalExtensionEnablementService"),nce=N("IExtensionTipsService"),oce=N("IAllowedExtensionsService");var rce=od(1972,"Extensions"),ice=od(1989,"Preferences"),a$="extensions.allowed";ht.as($o.Configuration).registerConfiguration({id:"extensions",order:30,title:p(1988,null),type:"object",properties:{[a$]:{type:"object",markdownDescription:p(1978,null),default:"*",defaultSnippets:[{body:{},description:p(1983,null)},{body:{"*":!0},description:p(1979,null)}],scope:1,policy:{name:"AllowedExtensions",category:"Extensions",minimumVersion:"1.96",localization:{description:{key:"extensions.allowed.policy",value:p(1984,null)}}},additionalProperties:!1,patternProperties:{"([a-z0-9A-Z][a-z0-9-A-Z]*)\\.([a-z0-9A-Z][a-z0-9-A-Z]*)$":{anyOf:[{type:["boolean","string"],enum:[!0,!1,"stable"],description:p(1976,null),enumDescriptions:[p(1982,null),p(1980,null),p(1981,null)]},{type:"array",items:{type:"string"},description:p(1977,null)}]},"([a-z0-9A-Z][a-z0-9-A-Z]*)$":{type:["boolean","string"],enum:[!0,!1,"stable"],description:p(1971,null),enumDescriptions:[p(1987,null),p(1985,null),p(1986,null)]},"\\*":{type:"boolean",enum:[!0,!1],description:p(1973,null),enumDescriptions:[p(1975,null),p(1974,null)]}}}}});var Li=N("telemetryService");var mce=N("customEndpointTelemetryService");var Va=class{constructor(t){this.value=t;this.isTrustedTelemetryValue=!0}},vw=class{constructor(){this.telemetryLevel=0;this.sessionId="someValue.sessionId";this.machineId="someValue.machineId";this.sqmId="someValue.sqmId";this.devDeviceId="someValue.devDeviceId";this.firstSessionDate="someValue.firstSessionDate";this.sendErrorTelemetry=!1}publicLog(){}publicLog2(){}publicLogError(){}publicLogError2(){}setExperimentProperty(){}},Rce=new vw;var d$="telemetry",eH={id:d$,name:p(2317,null)};function tH(r,t){if(!r)return"none";let e=Nf(r),n=t?.remoteExtensionTips;if(n&&Object.prototype.hasOwnProperty.call(n,e))return e;let o=t?.virtualWorkspaceExtensionTips;return o&&Object.prototype.hasOwnProperty.call(o,e)?e:"other"}function c$(r,t){if(!r||!r.includes("/")&&!r.includes("\\"))return r;let e=r,n=[];for(let l of t)for(;;){let d=l.exec(r);if(!d)break;n.push([d.index,l.lastIndex])}let o=/^[\\\/]?(node_modules|node_modules\.asar)[\\\/]/,i=/^(.*?)((?:\.vscode(?:-[a-z]+)*|resources[\\\/]app)[\\\/]extensions[\\\/].*)$/i,s=/(file:\/\/)?([a-zA-Z]:(\\\\|\\|\/)|(\\\\|\\|\/))?([\w-\._]+(\\\\|\\|\/))+[\w-\._]*/g,a=0;for(e="";;){let l=s.exec(r);if(!l)break;let d=n.some(([c,u])=>l.index<u&&c<s.lastIndex);if(!o.test(l[0])&&!d){let c=i.exec(l[0]);c?e+=r.substring(a,l.index)+"<REDACTED: user-file-path>/"+c[2]:e+=r.substring(a,l.index)+"<REDACTED: user-file-path>",a=s.lastIndex}}return a<r.length&&(e+=r.substr(a)),e}function u$(r){if(!r)return r;let t=[{label:"URL",regex:/[a-zA-Z][a-zA-Z0-9+.-]*:\/\/[^\s]*/},{label:"Google API Key",regex:/AIza[A-Za-z0-9_\\\-]{35}/},{label:"JWT",regex:/eyJ[0eXAiOiJKV1Qi|hbGci|a-zA-Z0-9\-_]+\.[a-zA-Z0-9\-_]+\.[a-zA-Z0-9\-_]+/},{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.-]+\.[a-zA-Z]{2,}/}];for(let e of t)if(e.regex.test(r))return`<REDACTED: ${e.label}>`;return r}function bw(r,t){return r?Es(r,e=>{if(e instanceof Va||Object.hasOwnProperty.call(e,"isTrustedTelemetryValue"))return e.value;if(typeof e=="string"){let n=e.replaceAll("%20"," ");n=c$(n,t);for(let o of t)n=n.replace(o,"");return n=u$(n),n}}):{}}function nH(r,t){return r.uuid&&t.uuid?r.uuid===t.uuid:r.id===t.id?!0:kf(r.id,t.id)===0}var Jce=new Ue("pprice.better-merge");var Iw=class{constructor(){this._generators=new Map;this._cache=new WeakMap}register(t,e){this._generators.set(t,e)}readActivationEvents(t){return this._cache.has(t)||this._cache.set(t,this._readActivationEvents(t)),this._cache.get(t)}createActivationEventsMap(t){let e=Object.create(null);for(let n of t){let o=this.readActivationEvents(n);o.length>0&&(e[Ue.toKey(n.identifier)]=o)}return e}_readActivationEvents(t){if(typeof t.main>"u"&&typeof t.browser>"u")return[];let e=Array.isArray(t.activationEvents)?t.activationEvents.slice(0):[];for(let n=0;n<e.length;n++)e[n]==="onUri"&&(e[n]=`onUri:${Ue.toKey(t.identifier)}`);if(!t.contributes)return e;for(let n in t.contributes){let o=this._generators.get(n);if(!o)continue;let i=t.contributes[n],s=Array.isArray(i)?i:[i];try{e.push(...o(s))}catch(a){Ct(a)}}return e}},yw=new Iw;var oH=Object.freeze({identifier:new Ue("nullExtensionDescription"),name:"Null Extension Description",version:"0.0.0",publisher:"vscode",engines:{vscode:""},extensionLocation:E.parse("void:location"),isBuiltin:!1,targetPlatform:"undefined",isUserBuiltin:!1,isUnderDevelopment:!1,preRelease:!1});var rH=N("extensionService"),yg=class{constructor(t){this.dependency=t}};function $e(r,t){return r.enabledApiProposals?r.enabledApiProposals.includes(t):!1}function H(r,t){if(!$e(r,t))throw new Error(`Extension '${r.identifier.value}' CANNOT use API proposal: ${t}.
Its package.json#enabledApiProposals-property declares: ${r.enabledApiProposals?.join(", ")??"[]"} but NOT ${t}.
 The missing proposal MUST be added and you must start in extension development mode or use the following command line switch: --enable-proposed-api ${r.identifier.value}`)}var p$={activeComment:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.activeComment.d.ts"},agentSessionsWorkspace:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.agentSessionsWorkspace.d.ts"},aiRelatedInformation:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.aiRelatedInformation.d.ts"},aiSettingsSearch:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.aiSettingsSearch.d.ts"},aiTextSearchProvider:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.aiTextSearchProvider.d.ts",version:2},authIssuers:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.authIssuers.d.ts"},authLearnMore:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.authLearnMore.d.ts"},authProviderSpecific:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.authProviderSpecific.d.ts"},authSession:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.authSession.d.ts"},authenticationChallenges:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.authenticationChallenges.d.ts"},canonicalUriProvider:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.canonicalUriProvider.d.ts"},chatContextProvider:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.chatContextProvider.d.ts"},chatDebug:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.chatDebug.d.ts",version:2},chatHooks:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.chatHooks.d.ts",version:6},chatOutputRenderer:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.chatOutputRenderer.d.ts"},chatParticipantAdditions:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.chatParticipantAdditions.d.ts",version:3},chatParticipantPrivate:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.chatParticipantPrivate.d.ts",version:14},chatPromptFiles:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.chatPromptFiles.d.ts",version:1},chatProvider:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.chatProvider.d.ts",version:4},chatReferenceBinaryData:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.chatReferenceBinaryData.d.ts"},chatReferenceDiagnostic:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.chatReferenceDiagnostic.d.ts"},chatSessionsProvider:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.chatSessionsProvider.d.ts",version:3},chatStatusItem:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.chatStatusItem.d.ts"},chatTab:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.chatTab.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"},contribChatEditorInlineGutterMenu:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.contribChatEditorInlineGutterMenu.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"},contribLanguageModelToolSets:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.contribLanguageModelToolSets.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"},contribSourceControlArtifactGroupMenu:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.contribSourceControlArtifactGroupMenu.d.ts"},contribSourceControlArtifactMenu:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.contribSourceControlArtifactMenu.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"},css:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.css.d.ts"},customEditorMove:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.customEditorMove.d.ts"},dataChannels:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.dataChannels.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:4},devDeviceId:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.devDeviceId.d.ts"},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"},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"},envIsConnectionMetered:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.envIsConnectionMetered.d.ts"},environmentPower:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.environmentPower.d.ts"},extensionAffinity:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.extensionAffinity.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"},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"},inlineCompletionsAdditions:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.inlineCompletionsAdditions.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"},languageModelCapabilities:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.languageModelCapabilities.d.ts"},languageModelProxy:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.languageModelProxy.d.ts"},languageModelSystem:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.languageModelSystem.d.ts"},languageModelThinkingPart:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.languageModelThinkingPart.d.ts",version:1},languageModelToolResultAudience:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.languageModelToolResultAudience.d.ts"},languageModelToolSupportsModel:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.languageModelToolSupportsModel.d.ts",version:1},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"},markdownAlertSyntax:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.markdownAlertSyntax.d.ts"},mcpServerDefinitions:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.mcpServerDefinitions.d.ts"},mcpToolDefinitions:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.mcpToolDefinitions.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"},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"},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"},remoteCodingAgents:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.remoteCodingAgents.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"},scmArtifactProvider:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.scmArtifactProvider.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"},scmProviderOptions:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.scmProviderOptions.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"},speech:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.speech.d.ts"},statusBarItemTooltip:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.statusBarItemTooltip.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"},taskExecutionTerminal:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.taskExecutionTerminal.d.ts"},taskPresentationGroup:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.taskPresentationGroup.d.ts"},taskProblemMatcherStatus:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.taskProblemMatcherStatus.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"},terminalShellEnv:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.terminalShellEnv.d.ts"},terminalTitle:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.terminalTitle.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"},textDocumentChangeReason:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.textDocumentChangeReason.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"},toolProgress:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.toolProgress.d.ts"},treeItemMarkdownLabel:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.treeItemMarkdownLabel.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"},windsurfAcp:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.windsurfAcp.d.ts"},windsurfAnnotations:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.windsurfAnnotations.d.ts"},windsurfAudio:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.windsurfAudio.d.ts"},windsurfAuth:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.windsurfAuth.d.ts"},windsurfCascade:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.windsurfCascade.d.ts"},windsurfCommandPopup:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.windsurfCommandPopup.d.ts"},windsurfDebug:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.windsurfDebug.d.ts"},windsurfDevContainers:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.windsurfDevContainers.d.ts"},windsurfDiffZone:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.windsurfDiffZone.d.ts"},windsurfEditorCommandPopup:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.windsurfEditorCommandPopup.d.ts"},windsurfEditorNudge:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.windsurfEditorNudge.d.ts"},windsurfExtensionManager:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.windsurfExtensionManager.d.ts"},windsurfExtensionMetadata:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.windsurfExtensionMetadata.d.ts"},windsurfFiles:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.windsurfFiles.d.ts"},windsurfGenerateCommitMessageButton:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.windsurfGenerateCommitMessageButton.d.ts"},windsurfInlineCompletions:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.windsurfInlineCompletions.d.ts"},windsurfLanguageServer:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.windsurfLanguageServer.d.ts"},windsurfMarkers:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.windsurfMarkers.d.ts"},windsurfMcp:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.windsurfMcp.d.ts"},windsurfProductEducation:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.windsurfProductEducation.d.ts"},windsurfSettings:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.windsurfSettings.d.ts"},windsurfSideHint:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.windsurfSideHint.d.ts"},windsurfStatusBar:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.windsurfStatusBar.d.ts"},windsurfTabToJump:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.windsurfTabToJump.d.ts"},windsurfTerminalCommandPopup:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.windsurfTerminalCommandPopup.d.ts"},windsurfUndoRedo:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.windsurfUndoRedo.d.ts"},workspaceTrust:{proposal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.workspaceTrust.d.ts"}},Du=Object.freeze(p$);var Tw=ht.as(wd.JSONContribution);var Ew=class r{constructor(t,e){this.added=t;this.removed=e}static _toSet(t){let e=new vo;for(let n=0,o=t.length;n<o;n++)e.add(t[n].description.identifier);return e}static compute(t,e){if(!t||!t.length)return new r(e,[]);if(!e||!e.length)return new r([],t);let n=this._toSet(t),o=this._toSet(e),i=e.filter(a=>!n.has(a.description.identifier)),s=t.filter(a=>!o.has(a.description.identifier));return new r(i,s)}},Sw=class{constructor(t,e,n){this.name=t,this.defaultExtensionKind=e,this.canHandleResolver=n,this._handler=null,this._users=null,this._delta=null}setHandler(t){if(this._handler!==null)throw new Error("Handler already set!");return this._handler=t,this._handle(),{dispose:()=>{this._handler=null}}}acceptUsers(t){this._delta=Ew.compute(this._users,t),this._users=t,this._handle()}_handle(){if(!(this._handler===null||this._users===null||this._delta===null))try{this._handler(this._users,this._delta)}catch(t){Ct(t)}}},m$={type:"string",enum:["ui","workspace"],enumDescriptions:[p(16598,null),p(16678,null)]},iH="vscode://schemas/vscode-extensions",xw={properties:{engines:{type:"object",description:p(16662,null),properties:{vscode:{type:"string",description:p(16663,null),default:"^1.22.0"}}},publisher:{description:p(16674,null),type:"string"},displayName:{description:p(16659,null),type:"string"},categories:{description:p(16653,null),type:"array",uniqueItems:!0,items:{oneOf:[{type:"string",enum:ab},{type:"string",const:"Languages",deprecationMessage:p(16654,null)}]}},galleryBanner:{type:"object",description:p(16666,null),properties:{color:{description:p(16667,null),type:"string"},theme:{description:p(16668,null),type:"string",enum:["dark","light"]}}},contributes:{description:p(16655,null),type:"object",properties:{},default:{}},preview:{type:"boolean",description:p(16672,null)},enableProposedApi:{type:"boolean",deprecationMessage:p(16661,null)},enabledApiProposals:{markdownDescription:p(16660,null),type:"array",uniqueItems:!0,items:{type:"string",enum:Object.keys(Du).map(r=>r),markdownEnumDescriptions:Object.values(Du).map(r=>r.proposal)}},api:{markdownDescription:p(16633,null),type:"string",enum:["none"],enumDescriptions:[p(16634,null)]},activationEvents:{description:p(16599,null),type:"array",items:{type:"string",defaultSnippets:[{label:"onWebviewPanel",description:p(16630,null),body:"onWebviewPanel:viewType"},{label:"onLanguage",description:p(16613,null),body:"onLanguage:${1:languageId}"},{label:"onCommand",description:p(16603,null),body:"onCommand:${2:commandId}"},{label:"onDebug",description:p(16605,null),body:"onDebug"},{label:"onDebugInitialConfigurations",description:p(16608,null),body:"onDebugInitialConfigurations"},{label:"onDebugDynamicConfigurations",description:p(16607,null),body:"onDebugDynamicConfigurations"},{label:"onDebugResolve",description:p(16609,null),body:"onDebugResolve:${6:type}"},{label:"onDebugAdapterProtocolTracker",description:p(16606,null),body:"onDebugAdapterProtocolTracker:${6:type}"},{label:"workspaceContains",description:p(16632,null),body:"workspaceContains:${4:filePattern}"},{label:"onStartupFinished",description:p(16621,null),body:"onStartupFinished"},{label:"onTaskType",description:p(16622,null),body:"onTaskType:${1:taskType}"},{label:"onFileSystem",description:p(16611,null),body:"onFileSystem:${1:scheme}"},{label:"onEditSession",description:p(16610,null),body:"onEditSession:${1:scheme}"},{label:"onSearch",description:p(16620,null),body:"onSearch:${7:scheme}"},{label:"onView",body:"onView:${5:viewId}",description:p(16628,null)},{label:"onUri",body:"onUri",description:p(16627,null)},{label:"onOpenExternalUri",body:"onOpenExternalUri",description:p(16618,null)},{label:"onCustomEditor",body:"onCustomEditor:${9:viewType}",description:p(16604,null)},{label:"onNotebook",body:"onNotebook:${1:type}",description:p(16617,null)},{label:"onAuthenticationRequest",body:"onAuthenticationRequest:${11:authenticationProviderId}",description:p(16600,null)},{label:"onRenderer",description:p(16619,null),body:"onRenderer:${11:rendererId}"},{label:"onTerminalProfile",body:"onTerminalProfile:${1:terminalId}",description:p(16624,null)},{label:"onTerminalQuickFixRequest",body:"onTerminalQuickFixRequest:${1:quickFixId}",description:p(16625,null)},{label:"onWalkthrough",body:"onWalkthrough:${1:walkthroughID}",description:p(16629,null)},{label:"onIssueReporterOpened",body:"onIssueReporterOpened",description:p(16612,null)},{label:"onChatParticipant",body:"onChatParticipant:${1:participantId}",description:p(16602,null)},{label:"onChatContextProvider",body:"onChatContextProvider:${1:contextProviderId}",description:p(16601,null)},{label:"onLanguageModelChatProvider",body:"onLanguageModelChatProvider:${1:vendor}",description:p(16614,null)},{label:"onLanguageModelTool",body:"onLanguageModelTool:${1:toolId}",description:p(16615,null)},{label:"onTerminal",body:"onTerminal:{1:shellType}",description:p(16623,null)},{label:"onTerminalShellIntegration",body:"onTerminalShellIntegration:${1:shellType}",description:p(16626,null)},{label:"onMcpCollection",description:p(16616,null),body:"onMcpCollection:${2:collectionId}"},{label:"*",description:p(16631,null),body:"*"}]}},badges:{type:"array",description:p(16635,null),items:{type:"object",required:["url","href","description"],properties:{url:{type:"string",description:p(16638,null)},href:{type:"string",description:p(16637,null)},description:{type:"string",description:p(16636,null)}}}},markdown:{type:"string",description:p(16671,null),enum:["github","standard"],default:"github"},qna:{default:"marketplace",description:p(16675,null),anyOf:[{type:["string","boolean"],enum:["marketplace",!1]},{type:"string"}]},extensionDependencies:{description:p(16665,null),type:"array",uniqueItems:!0,items:{type:"string",pattern:Ig}},extensionAffinity:{description:p(16664,null),type:"array",uniqueItems:!0,items:{type:"string",pattern:Ig}},extensionPack:{description:p(16656,null),type:"array",uniqueItems:!0,items:{type:"string",pattern:Ig}},extensionKind:{description:p(16591,null),type:"array",items:m$,default:["workspace"],defaultSnippets:[{body:["ui"],description:p(16593,null)},{body:["workspace"],description:p(16595,null)},{body:["ui","workspace"],description:p(16594,null)},{body:["workspace","ui"],description:p(16596,null)},{body:[],description:p(16592,null)}]},capabilities:{description:p(16639,null),type:"object",properties:{virtualWorkspaces:{description:p(16647,null),type:["boolean","object"],defaultSnippets:[{label:"limited",body:{supported:"${1:limited}",description:"${2}"}},{label:"false",body:{supported:!1,description:"${2}"}}],default:(!0).valueOf,properties:{supported:{markdownDescription:p(16649,null),type:["string","boolean"],enum:["limited",!0,!1],enumDescriptions:[p(16651,null),p(16652,null),p(16650,null)]},description:{type:"string",markdownDescription:p(16648,null)}}},untrustedWorkspaces:{description:p(16640,null),type:"object",required:["supported"],defaultSnippets:[{body:{supported:"${1:limited}",description:"${2}"}}],properties:{supported:{markdownDescription:p(16643,null),type:["string","boolean"],enum:["limited",!0,!1],enumDescriptions:[p(16645,null),p(16646,null),p(16644,null)]},restrictedConfigurations:{description:p(16642,null),type:"array",items:{type:"string"}},description:{type:"string",markdownDescription:p(16641,null)}}}}},sponsor:{description:p(16657,null),type:"object",defaultSnippets:[{body:{url:"${1:https:}"}}],properties:{url:{description:p(16658,null),type:"string"}}},scripts:{type:"object",properties:{"vscode:prepublish":{description:p(16676,null),type:"string"},"vscode:uninstall":{description:p(16677,null),type:"string"}}},icon:{type:"string",description:p(16669,null)},l10n:{type:"string",description:p(16670,null)},pricing:{type:"string",markdownDescription:p(16673,null),enum:["Free","Trial"],default:"Free"}}},Cw=class{constructor(){this._extensionPoints=new Map}registerExtensionPoint(t){if(this._extensionPoints.has(t.extensionPoint))throw new Error("Duplicate extension point: "+t.extensionPoint);let e=new Sw(t.extensionPoint,t.defaultExtensionKind,t.canHandleResolver);return this._extensionPoints.set(t.extensionPoint,e),t.activationEventsGenerator&&yw.register(t.extensionPoint,t.activationEventsGenerator),xw.properties.contributes.properties[t.extensionPoint]=t.jsonSchema,Tw.registerSchema(iH,xw),e}getExtensionPoints(){return Array.from(this._extensionPoints.values())}},sH={ExtensionsRegistry:"ExtensionsRegistry"};ht.add(sH.ExtensionsRegistry,new Cw);var II=ht.as(sH.ExtensionsRegistry);Tw.registerSchema(iH,xw);Tw.registerSchema(O2,{properties:{extensionEnabledApiProposals:{description:p(16597,null),type:"object",properties:{},additionalProperties:{anyOf:[{type:"array",uniqueItems:!0,items:{type:"string",enum:Object.keys(Du),markdownEnumDescriptions:Object.values(Du).map(r=>r.proposal)}}]}}}});var kue=new w("isMac",hn,p(1869,null)),Aue=new w("isLinux",zn,p(1868,null)),Oue=new w("isWindows",Rt,p(1873,null)),aH=new w("isWeb",Xo,p(1872,null)),Lue=new w("isMacNative",hn&&!Xo,p(1870,null)),Mue=new w("isIOS",eU,p(1867,null)),Nue=new w("isMobile",tU,p(1871,null)),Uue=new w("isDevelopment",!1,!0),Fue=new w("productQualityType","",p(1874,null)),f$="inputFocus",Hue=new w(f$,!1,p(1866,null)),Bue=new w("isInsiders",!1,!0),Vue=new w("isNext",!1,!0);var Eg=N("languageService");var Sg=N("modelService");var xg=class extends ag{constructor(){super(...arguments);this._onDidChangeDirty=this._register(new D);this._onDidChangeLabel=this._register(new D);this._onDidChangeCapabilities=this._register(new D);this._onWillDispose=this._register(new D);this.onDidChangeDirty=this._onDidChangeDirty.event;this.onDidChangeLabel=this._onDidChangeLabel.event;this.onDidChangeCapabilities=this._onDidChangeCapabilities.event;this.onWillDispose=this._onWillDispose.event}get editorId(){}get capabilities(){return 2}hasCapability(e){return e===0?this.capabilities===0:(this.capabilities&e)!==0}isReadonly(){return this.hasCapability(2)}getName(){return`Editor ${this.typeId}`}getDescription(e){}getTitle(e){return this.getName()}getLabelExtraClasses(){return[]}getAriaLabel(){return this.getTitle(0)}getIcon(){}getTelemetryDescriptor(){return{typeId:this.typeId}}isDirty(){return!1}isModified(){return this.isDirty()}isSaving(){return!1}async resolve(){return null}async save(e,n){return this}async saveAs(e,n){return this}async revert(e,n){}async rename(e,n){}copy(){return this}canMove(e,n){return!0}canReopen(){return!0}matches(e){if(Vo(e))return this===e;let n=e.options?.override;return this.editorId!==n&&n!==void 0&&this.editorId!==void 0?!1:Wr(this.resource,zb.getCanonicalUri(e))}prefersEditorPane(e){return e.at(0)}toUntyped(e){}isDisposed(){return this._store.isDisposed}dispose(){this.isDisposed()||this._onWillDispose.fire(),super.dispose()}};var dH=N("editorGroupsService");var yI=N("editorService"),cH=-1,uH=-2;var Xr=class extends xg{constructor(e,n,o,i,s){super();this.preferredName=e;this.preferredDescription=n;this.secondary=o;this.primary=i;this.editorService=s;this.hasIdenticalSides=this.primary.matches(this.secondary),this.registerListeners()}static{this.ID="workbench.editorinputs.sidebysideEditorInput"}get typeId(){return Xr.ID}get capabilities(){let e=this.primary.capabilities;return e&=-33,this.secondary.hasCapability(16)&&(e|=16),this.secondary.hasCapability(8)&&(e|=8),e|=256,e}get resource(){if(this.hasIdenticalSides)return this.primary.resource}registerListeners(){this._register(He.once(He.any(this.primary.onWillDispose,this.secondary.onWillDispose))(()=>{this.isDisposed()||this.dispose()})),this._register(this.primary.onDidChangeDirty(()=>this._onDidChangeDirty.fire())),this._register(this.primary.onDidChangeCapabilities(()=>this._onDidChangeCapabilities.fire())),this._register(this.secondary.onDidChangeCapabilities(()=>this._onDidChangeCapabilities.fire())),this._register(this.primary.onDidChangeLabel(()=>this._onDidChangeLabel.fire())),this._register(this.secondary.onDidChangeLabel(()=>this._onDidChangeLabel.fire()))}getName(){let e=this.getPreferredName();return e||(this.hasIdenticalSides?this.primary.getName():p(4710,null,this.secondary.getName(),this.primary.getName()))}getPreferredName(){return this.preferredName}getDescription(e){let n=this.getPreferredDescription();return n||(this.hasIdenticalSides?this.primary.getDescription(e):super.getDescription(e))}getPreferredDescription(){return this.preferredDescription}getTitle(e){let n;this.hasIdenticalSides?n=this.primary.getTitle(e)??this.getName():n=super.getTitle(e);let o=this.getPreferredTitle();return o&&(n=`${o} (${n})`),n}getPreferredTitle(){if(this.preferredName&&this.preferredDescription)return`${this.preferredName} ${this.preferredDescription}`;if(this.preferredName||this.preferredDescription)return this.preferredName??this.preferredDescription}getLabelExtraClasses(){return this.hasIdenticalSides?this.primary.getLabelExtraClasses():super.getLabelExtraClasses()}getAriaLabel(){return this.hasIdenticalSides?this.primary.getAriaLabel():super.getAriaLabel()}getTelemetryDescriptor(){return{...this.primary.getTelemetryDescriptor(),...super.getTelemetryDescriptor()}}isDirty(){return this.primary.isDirty()}isSaving(){return this.primary.isSaving()}async save(e,n){let o=await this.primary.save(e,n);return this.saveResultToEditor(o)}async saveAs(e,n){let o=await this.primary.saveAs(e,n);return this.saveResultToEditor(o)}saveResultToEditor(e){if(!e||!this.hasIdenticalSides)return e;if(this.primary.matches(e))return this;if(e instanceof xg)return new Xr(this.preferredName,this.preferredDescription,e,e,this.editorService);if(!jr(e)&&!hu(e)&&!Ua(e)&&!Na(e))return{primary:e,secondary:e,label:this.preferredName,description:this.preferredDescription}}revert(e,n){return this.primary.revert(e,n)}async rename(e,n){if(!this.hasIdenticalSides)return;let o=await this.primary.rename(e,n);if(o){if(Vo(o.editor))return{editor:new Xr(this.preferredName,this.preferredDescription,o.editor,o.editor,this.editorService),options:{...o.options,viewState:qb(this,e,this.editorService)}};if(n2(o.editor))return{editor:{label:this.preferredName,description:this.preferredDescription,primary:o.editor,secondary:o.editor,options:{...o.options,viewState:qb(this,e,this.editorService)}}}}}isReadonly(){return this.primary.isReadonly()}toUntyped(e){let n=this.primary.toUntyped(e),o=this.secondary.toUntyped(e);if(n&&o&&!jr(n)&&!jr(o)&&!hu(n)&&!hu(o)&&!Ua(n)&&!Ua(o)&&!Na(n)&&!Na(o)){let i={label:this.preferredName,description:this.preferredDescription,primary:n,secondary:o};return typeof e?.preserveViewState=="number"&&(i.options={viewState:qb(this,e.preserveViewState,this.editorService)}),i}}matches(e){return this===e?!0:GD(e)||jr(e)?!1:e instanceof Xr?this.primary.matches(e.primary)&&this.secondary.matches(e.secondary):Ua(e)?this.primary.matches(e.primary)&&this.secondary.matches(e.secondary):!1}};Xr=L([P(4,yI)],Xr);var wu=class extends K{constructor(){super(...arguments);this._onWillDispose=this._register(new D);this.onWillDispose=this._onWillDispose.event;this.resolved=!1}async resolve(){this.resolved=!0}isResolved(){return this.resolved}isDisposed(){return this._store.isDisposed}dispose(){this._onWillDispose.fire(),super.dispose()}};var h$={ModesRegistry:"editor.modesRegistry"},_w=class extends K{constructor(){super();this._onDidChangeLanguages=this._register(new D);this.onDidChangeLanguages=this._onDidChangeLanguages.event;this._languages=[]}registerLanguage(e){return this._languages.push(e),this._onDidChangeLanguages.fire(void 0),{dispose:()=>{for(let n=0,o=this._languages.length;n<o;n++)if(this._languages[n]===e){this._languages.splice(n,1);return}}}}getLanguages(){return this._languages}},pH=new _w;ht.add(h$.ModesRegistry,pH);var Cg="plaintext",v$=".txt";pH.registerLanguage({id:Cg,extensions:[v$],aliases:[p(910,null),"text"],mimetypes:[Io.text]});ht.as($o.Configuration).registerDefaultConfigurations([{overrides:{"[plaintext]":{"editor.unicodeHighlight.ambiguousCharacters":!1,"editor.unicodeHighlight.invisibleCharacters":!1},"[go]":{"editor.insertSpaces":!1},"[makefile]":{"editor.insertSpaces":!1},"[shellscript]":{"files.eol":`
`},"[yaml]":{"editor.insertSpaces":!0,"editor.tabSize":2}}}]);var mH=N("ILanguageDetectionService"),Pw="languageDetection";var Ds=class extends wu{constructor(e,n,o,i,s){super();this.modelService=e;this.languageService=n;this.languageDetectionService=o;this.accessibilityService=i;this.textEditorModelHandle=void 0;this.modelDisposeListener=this._register(new An);this.autoDetectLanguageThrottler=this._register(new Xc(Ds.AUTO_DETECT_LANGUAGE_THROTTLE_DELAY));this._blockLanguageChangeListener=!1;this._languageChangeSource=void 0;s&&this.handleExistingModel(s)}static{this.AUTO_DETECT_LANGUAGE_THROTTLE_DELAY=600}handleExistingModel(e){let n=this.modelService.getModel(e);if(!n)throw new Error(`Document with resource ${e.toString(!0)} does not exist`);this.textEditorModelHandle=e,this.registerModelDisposeListener(n)}registerModelDisposeListener(e){this.modelDisposeListener.value=e.onWillDispose(()=>{this.textEditorModelHandle=void 0,this.dispose()})}get textEditorModel(){return this.textEditorModelHandle?this.modelService.getModel(this.textEditorModelHandle):null}isReadonly(){return!0}get languageChangeSource(){return this._languageChangeSource}get hasLanguageSetExplicitly(){return typeof this._languageChangeSource=="string"}setLanguageId(e,n){this._languageChangeSource="user",this.setLanguageIdInternal(e,n)}setLanguageIdInternal(e,n){if(this.isResolved()&&!(!e||e===this.textEditorModel.getLanguageId())){this._blockLanguageChangeListener=!0;try{this.textEditorModel.setLanguage(this.languageService.createById(e),n)}finally{this._blockLanguageChangeListener=!1}}}installModelListeners(e){let n=this._register(e.onDidChangeLanguage(o=>{o.source===Pw||this._blockLanguageChangeListener||(this._languageChangeSource="api",n.dispose())}))}getLanguageId(){return this.textEditorModel?.getLanguageId()}autoDetectLanguage(){return this.autoDetectLanguageThrottler.trigger(()=>this.doAutoDetectLanguage())}async doAutoDetectLanguage(){if(this.hasLanguageSetExplicitly||!this.textEditorModelHandle||!this.languageDetectionService.isEnabledForLanguage(this.getLanguageId()??Cg))return;let e=await this.languageDetectionService.detectLanguage(this.textEditorModelHandle),n=this.getLanguageId();if(e&&e!==n&&!this.isDisposed()){this.setLanguageIdInternal(e,Pw);let o=this.languageService.getLanguageName(e);this.accessibilityService.alert(p(4711,null,o??e))}}createTextEditorModel(e,n,o){let i=this.getFirstLineText(e),s=this.getOrCreateLanguage(n,this.languageService,o,i);return this.doCreateTextEditorModel(e,s,n)}doCreateTextEditorModel(e,n,o){let i=o&&this.modelService.getModel(o);return i?this.updateTextEditorModel(e,n.languageId):(i=this.modelService.createModel(e,n,o),this.createdEditorModel=!0,this.registerModelDisposeListener(i)),this.textEditorModelHandle=i.uri,i}getFirstLineText(e){let n=e;return typeof n.getFirstLineText=="function"?n.getFirstLineText(1e3):e.getLineContent(1).substr(0,1e3)}getOrCreateLanguage(e,n,o,i){return!o||o===Cg?n.createByFilepathOrFirstLine(e??null,i):n.createById(o)}updateTextEditorModel(e,n,o){this.isResolved()&&(e&&this.modelService.updateModel(this.textEditorModel,e,o),n&&n!==Cg&&this.textEditorModel.getLanguageId()!==n&&this.textEditorModel.setLanguage(this.languageService.createById(n)))}createSnapshot(){return this.textEditorModel?this.textEditorModel.createSnapshot(!0):null}isResolved(){return!!this.textEditorModelHandle}dispose(){this.modelDisposeListener.dispose(),this.textEditorModelHandle&&this.createdEditorModel&&this.modelService.destroyModel(this.textEditorModelHandle),this.textEditorModelHandle=void 0,this.createdEditorModel=!1,super.dispose()}};Ds=L([P(0,Sg),P(1,Eg),P(2,mH),P(3,GF)],Ds);var Ru=class extends wu{get originalModel(){return this._originalModel}get modifiedModel(){return this._modifiedModel}constructor(t,e){super(),this._originalModel=t,this._modifiedModel=e}async resolve(){await Promise.all([this._originalModel?.resolve(),this._modifiedModel?.resolve()])}isResolved(){return!!(this._originalModel?.isResolved()&&this._modifiedModel?.isResolved())}dispose(){super.dispose()}};var EI=class extends Ru{constructor(e,n){super(e,n);this._textDiffEditorModel=void 0;this._originalModel=e,this._modifiedModel=n,this.updateTextDiffEditorModel()}get originalModel(){return this._originalModel}get modifiedModel(){return this._modifiedModel}get textDiffEditorModel(){return this._textDiffEditorModel}async resolve(){await super.resolve(),this.updateTextDiffEditorModel()}updateTextDiffEditorModel(){this.originalModel?.isResolved()&&this.modifiedModel?.isResolved()&&(this._textDiffEditorModel?(this._textDiffEditorModel.original=this.originalModel.textEditorModel,this._textDiffEditorModel.modified=this.modifiedModel.textEditorModel):this._textDiffEditorModel={original:this.originalModel.textEditorModel,modified:this.modifiedModel.textEditorModel})}isResolved(){return!!this._textDiffEditorModel}isReadonly(){return!!this.modifiedModel&&this.modifiedModel.isReadonly()}dispose(){this._textDiffEditorModel=void 0,super.dispose()}};function Dw(r){let t=r;return typeof t?.resolve=="function"&&typeof t?.isResolved=="function"}var Wa=class extends Xr{constructor(e,n,o,i,s,a){super(e,n,o,i,a);this.original=o;this.modified=i;this.forceOpenAsBinary=s;this.cachedModel=void 0;this.labels=this.computeLabels()}static{this.ID="workbench.editors.diffEditorInput"}get typeId(){return Wa.ID}get editorId(){return this.modified.editorId===this.original.editorId?this.modified.editorId:void 0}get capabilities(){let e=super.capabilities;return this.labels.forceDescription&&(e|=64),e}computeLabels(){let e,n=!1;if(this.preferredName)e=this.preferredName;else{let u=this.original.getName(),f=this.modified.getName();e=p(4709,null,u,f),n=u===f}let o,i,s;if(this.preferredDescription)o=this.preferredDescription,i=this.preferredDescription,s=this.preferredDescription;else{o=this.computeLabel(this.original.getDescription(0),this.modified.getDescription(0)),s=this.computeLabel(this.original.getDescription(2),this.modified.getDescription(2));let u=this.original.getDescription(1),f=this.modified.getDescription(1);if(typeof u=="string"&&typeof f=="string"&&(u||f)){let[g,I]=d2([u,f]);i=this.computeLabel(g,I)}}let a=this.computeLabel(this.original.getTitle(0)??this.original.getName(),this.modified.getTitle(0)??this.modified.getName()," \u2194 "),l=this.computeLabel(this.original.getTitle(1)??this.original.getName(),this.modified.getTitle(1)??this.modified.getName()," \u2194 "),d=this.computeLabel(this.original.getTitle(2)??this.original.getName(),this.modified.getTitle(2)??this.modified.getName()," \u2194 "),c=this.getPreferredTitle();return c&&(a=`${c} (${a})`,l=`${c} (${l})`,d=`${c} (${d})`),{name:e,shortDescription:o,mediumDescription:i,longDescription:s,forceDescription:n,shortTitle:a,mediumTitle:l,longTitle:d}}computeLabel(e,n,o=" - "){if(!(!e||!n))return e===n?n:`${e}${o}${n}`}getName(){return this.labels.name}getDescription(e=1){switch(e){case 0:return this.labels.shortDescription;case 2:return this.labels.longDescription;case 1:default:return this.labels.mediumDescription}}getTitle(e){switch(e){case 0:return this.labels.shortTitle;case 2:return this.labels.longTitle;default:case 1:return this.labels.mediumTitle}}async resolve(){let e=await this.createModel();return this.cachedModel?.dispose(),this.cachedModel=e,this.cachedModel}prefersEditorPane(e){return this.forceOpenAsBinary?e.find(n=>n.typeId===t2):e.find(n=>n.typeId===e2)}async createModel(){let[e,n]=await Promise.all([this.original.resolve(),this.modified.resolve()]);return n instanceof Ds&&e instanceof Ds?new EI(e,n):new Ru(Dw(e)?e:void 0,Dw(n)?n:void 0)}toUntyped(e){let n=super.toUntyped(e);if(n)return{...n,modified:n.primary,original:n.secondary}}matches(e){return this===e?!0:e instanceof Wa?this.modified.matches(e.modified)&&this.original.matches(e.original)&&e.forceOpenAsBinary===this.forceOpenAsBinary:jr(e)?this.modified.matches(e.modified)&&this.original.matches(e.original):!1}dispose(){this.cachedModel&&(this.cachedModel.dispose(),this.cachedModel=void 0),super.dispose()}};Wa=L([P(5,yI)],Wa);var lfe=new w("workbenchState",void 0,{type:"string",description:p(4703,null)}),dfe=new w("workspaceFolderCount",0,p(4704,null)),cfe=new w("openFolderWorkspaceSupport",!0,!0),ufe=new w("enterMultiRootWorkspaceSupport",!0,!0),pfe=new w("emptyWorkspaceSupport",!0,!0),mfe=new w("dirtyWorkingCopies",!1,p(4647,null)),fH=new w("remoteName","",p(4680,null)),ffe=new w("virtualWorkspace","",p(4701,null)),gfe=new w("temporaryWorkspace",!1,p(4695,null)),hfe=new w("isSessionsWindow",!1,p(4667,null)),vfe=new w("isAgentSessionsWorkspace",!1,p(4660,null)),bfe=new w("workbenchMode","",p(4702,null)),Ife=new w("hasWebFileSystemAccess",!1,!0),yfe=new w("embedderIdentifier",void 0,p(4655,null)),Efe=new w("inAutomation",!1,p(4658,null)),Sfe=new w("isFullscreen",!1,p(4665,null)),xfe=new w("isAuxiliaryWindowFocusedContext",!1,p(4662,null)),Cfe=new w("isWindowAlwaysOnTop",!1,p(4668,null)),Tfe=new w("isAuxiliaryWindow",!1,p(4661,null)),_fe=new w("activeEditorIsDirty",!1,p(4633,null)),Pfe=new w("activeEditorIsNotPreview",!1,p(4636,null)),Dfe=new w("activeEditorIsFirstInGroup",!1,p(4634,null)),wfe=new w("activeEditorIsLastInGroup",!1,p(4635,null)),Rfe=new w("activeEditorIsPinned",!1,p(4637,null)),kfe=new w("activeEditorIsReadonly",!1,p(4638,null)),Afe=new w("activeCompareEditorCanSwap",!1,p(4623,null)),Ofe=new w("activeEditorCanToggleReadonly",!0,p(4627,null)),Lfe=new w("activeEditorCanRevert",!1,p(4626,null)),Mfe=new w("activeEditorCanSplitInGroup",!0),Nfe=new w("activeEditor",null,{type:"string",description:p(4624,null)}),Ufe=new w("activeEditorAvailableEditorIds","",p(4625,null)),Ffe=new w("textCompareEditorVisible",!1,p(4697,null)),Hfe=new w("textCompareEditorActive",!1,p(4696,null)),Bfe=new w("sideBySideEditorActive",!1,p(4692,null)),Vfe=new w("groupEditorsCount",0,p(4657,null)),Wfe=new w("activeEditorGroupEmpty",!1,p(4629,null)),$fe=new w("activeEditorGroupIndex",0,p(4630,null)),Gfe=new w("activeEditorGroupLast",!1,p(4631,null)),zfe=new w("activeEditorGroupLocked",!1,p(4632,null)),qfe=new w("activeEditorGroupAutoLocked",!1,p(4628,null)),b$=new w("multipleEditorGroups",!1,p(4670,null)),Kfe=b$.toNegated(),Jfe=new w("multipleEditorsSelectedInGroup",!1,p(4671,null)),jfe=new w("twoEditorsSelectedInGroup",!1,p(4700,null)),Qfe=new w("SelectedEditorsInGroupFileOrUntitledResourceContextKey",!0,p(4689,null)),I$=new w("editorPartMultipleEditorGroups",!1,p(4653,null)),Xfe=I$.toNegated(),Yfe=new w("editorPartMaximizedEditorGroup",!1,p(4649,null)),Zfe=new w("editorPartModal",!1,p(4650,null)),ege=new w("editorPartModalMaximized",!1,p(4651,null)),tge=new w("editorPartModalNavigation",!1,p(4652,null)),nge=new w("editorIsOpen",!1,p(4648,null)),oge=new w("inZenMode",!1,p(4659,null)),rge=new w("isCenteredLayout",!1,p(4666,null)),ige=new w("splitEditorsVertically",!1,p(4693,null)),sge=new w("mainEditorAreaVisible",!0,p(4669,null)),age=new w("editorTabsVisible",!0,p(4654,null)),lge=new w("cascadeEditorHasExternalUrl",!1,p(4645,null)),dge=new w("cascadeEditorIsDevinCloudAndAwake",!1,p(4646,null)),cge=new w("sideBarVisible",!1,p(4691,null)),uge=new w("sideBarFocus",!1,p(4690,null)),pge=new w("activeViewlet","",p(4640,null)),mge=new w("statusBarFocused",!1,p(4694,null)),fge=new w("titleBarStyle","custom",p(4698,null)),gge=new w("titleBarVisible",!1,p(4699,null)),hge=new w("isCompactTitleBar",!1,p(4663,null)),vge=new w("bannerFocused",!1,p(4644,null)),bge=new w("notificationFocus",!0,p(4673,null)),Ige=new w("notificationCenterVisible",!1,p(4672,null)),yge=new w("notificationToastsVisible",!1,p(4674,null)),Ege=new w("activeAuxiliary","",p(4622,null)),Sge=new w("auxiliaryBarFocus",!1,p(4641,null)),xge=new w("auxiliaryBarVisible",!1,p(4643,null)),Cge=new w("auxiliaryBarMaximized",!1,p(4642,null)),Tge=new w("activePanel","",p(4639,null)),_ge=new w("panelFocus",!1,p(4676,null)),Pge=new w("panelPosition","bottom",p(4678,null)),Dge=new w("panelAlignment","center",p(4675,null)),wge=new w("panelVisible",!1,p(4679,null)),Rge=new w("panelMaximized",!1,p(4677,null)),kge=new w("focusedView","",p(4656,null));var Lo=class{constructor(t,e,n,o){this._contextKeyService=t;this._fileService=e;this._languageService=n;this._modelService=o;this._schemeKey=Lo.Scheme.bindTo(this._contextKeyService),this._filenameKey=Lo.Filename.bindTo(this._contextKeyService),this._dirnameKey=Lo.Dirname.bindTo(this._contextKeyService),this._pathKey=Lo.Path.bindTo(this._contextKeyService),this._langIdKey=Lo.LangId.bindTo(this._contextKeyService),this._resourceKey=Lo.Resource.bindTo(this._contextKeyService),this._extensionKey=Lo.Extension.bindTo(this._contextKeyService),this._hasResource=Lo.HasResource.bindTo(this._contextKeyService),this._isFileSystemResource=Lo.IsFileSystemResource.bindTo(this._contextKeyService)}static{this.Scheme=new w("resourceScheme",void 0,{type:"string",description:p(4687,null)})}static{this.Filename=new w("resourceFilename",void 0,{type:"string",description:p(4684,null)})}static{this.Dirname=new w("resourceDirname",void 0,{type:"string",description:p(4682,null)})}static{this.Path=new w("resourcePath",void 0,{type:"string",description:p(4686,null)})}static{this.LangId=new w("resourceLangId",void 0,{type:"string",description:p(4685,null)})}static{this.Resource=new w("resource",void 0,{type:"URI",description:p(4681,null)})}static{this.Extension=new w("resourceExtname",void 0,{type:"string",description:p(4683,null)})}static{this.HasResource=new w("resourceSet",void 0,{type:"boolean",description:p(4688,null)})}static{this.IsFileSystemResource=new w("isFileSystemResource",void 0,{type:"boolean",description:p(4664,null)})}_setLangId(){let t=this.get();if(!t){this._langIdKey.set(null);return}let e=this._modelService.getModel(t)?.getLanguageId()??this._languageService.guessLanguageIdByFilepathOrFirstLine(t);this._langIdKey.set(e)}set(t){t=t??void 0,!Wr(this._value,t)&&(this._value=t,this._contextKeyService.bufferChangeEvents(()=>{this._resourceKey.set(t?t.toString():null),this._schemeKey.set(t?t.scheme:null),this._filenameKey.set(t?tn(t):null),this._dirnameKey.set(t?this.uriToPath(bs(t)):null),this._pathKey.set(t?this.uriToPath(t):null),this._setLangId(),this._extensionKey.set(t?K_(t):null),this._hasResource.set(!!t),this._isFileSystemResource.set(t?this._fileService.hasProvider(t):!1)}))}uriToPath(t){return t.scheme===X.file?t.fsPath:t.path}reset(){this._value=void 0,this._contextKeyService.bufferChangeEvents(()=>{this._resourceKey.reset(),this._schemeKey.reset(),this._filenameKey.reset(),this._dirnameKey.reset(),this._pathKey.reset(),this._langIdKey.reset(),this._extensionKey.reset(),this._hasResource.reset(),this._isFileSystemResource.reset()})}get(){return this._value}};Lo=L([P(0,Ir),P(1,hd),P(2,Eg),P(3,Sg)],Lo);var SI=class extends Lo{constructor(e,n,o,i){super(e,n,o,i);this._disposables=new te;this._disposables.add(n.onDidChangeFileSystemProviderRegistrations(()=>{let s=this.get();this._isFileSystemResource.set(!!(s&&n.hasProvider(s)))})),this._disposables.add(i.onModelAdded(s=>{Wr(s.uri,this.get())&&this._setLangId()})),this._disposables.add(i.onModelLanguageChanged(s=>{Wr(s.model.uri,this.get())&&this._setLangId()}))}dispose(){this._disposables.dispose()}};SI=L([P(0,Ir),P(1,hd),P(2,Eg),P(3,Sg)],SI);var gH=N("dialogService");var Wge=N("fileDialogService");var xI="__";function hH(r){return typeof r=="object"&&r!==null&&"wwwAuthenticate"in r&&typeof r.wwwAuthenticate=="string"}var vH=N("IAuthenticationService");var zge=N("IAuthenticationExtensionsService");var bH=N("openerService");var CI=bg;var ww=N("lifecycleService");var IH=N("defaultAccountService");var Ne;(i=>(i.Setup={hidden:new w("chatSetupHidden",!1,!0),installed:new w("chatSetupInstalled",!1,!0),disabled:new w("chatSetupDisabled",!1,!0),untrusted:new w("chatSetupUntrusted",!1,!0),later:new w("chatSetupLater",!1,!0),registered:new w("chatSetupRegistered",!1,!0)},i.Entitlement={signedOut:new w("chatEntitlementSignedOut",!1,!0),canSignUp:new w("chatPlanCanSignUp",!1,!0),planFree:new w("chatPlanFree",!1,!0),planPro:new w("chatPlanPro",!1,!0),planProPlus:new w("chatPlanProPlus",!1,!0),planBusiness:new w("chatPlanBusiness",!1,!0),planEnterprise:new w("chatPlanEnterprise",!1,!0),organisations:new w("chatEntitlementOrganisations",void 0,!0),internal:new w("chatEntitlementInternal",!1,!0),sku:new w("chatEntitlementSku",void 0,!0)},i.chatQuotaExceeded=new w("chatQuotaExceeded",!1,!0),i.completionsQuotaExceeded=new w("completionsQuotaExceeded",!1,!0),i.chatAnonymous=new w("chatAnonymous",!1,!0)))(Ne||={});var y$=N("chatEntitlementService");function E$(r){return r===6||r===7||r===8||r===9}var Pg={upgradePlanUrl:Oi.defaultChatAgent?.upgradePlanUrl??"",providerUriSetting:Oi.defaultChatAgent?.providerUriSetting??"",entitlementSignupLimitedUrl:Oi.defaultChatAgent?.entitlementSignupLimitedUrl??"",chatQuotaExceededContext:Oi.defaultChatAgent?.chatQuotaExceededContext??"",completionsQuotaExceededContext:Oi.defaultChatAgent?.completionsQuotaExceededContext??""},yH="chat.allowAnonymousAccess";function Rw(r,t,e){return!(r.getValue(yH)!==!0||t!==1||e.hidden||e.disabled)}function EH(r,t,e){e.publicLog2("chatEntitlements",{chatHidden:!!r.hidden,chatDisabled:!!r.disabled,chatEntitlement:r.entitlement,chatRegistered:!!r.registered,chatAnonymous:Rw(t,r.entitlement,r)})}var Tg=class extends K{constructor(e,n,o,i,s,a,l){super();this.contextKeyService=i;this.configurationService=s;this.telemetryService=a;this._onDidChangeQuotaExceeded=this._register(new D);this.onDidChangeQuotaExceeded=this._onDidChangeQuotaExceeded.event;this._onDidChangeQuotaRemaining=this._register(new D);this.onDidChangeQuotaRemaining=this._onDidChangeQuotaRemaining.event;this._quotas={};this.ExtensionQuotaContextKeys={chatQuotaExceeded:Pg.chatQuotaExceededContext,completionsQuotaExceeded:Pg.completionsQuotaExceededContext};this._onDidChangeAnonymous=this._register(new D);this.onDidChangeAnonymous=this._onDidChangeAnonymous.event;this.anonymousObs=Ai(this.onDidChangeAnonymous,()=>this.anonymous);if(this.chatQuotaExceededContextKey=Ne.chatQuotaExceeded.bindTo(this.contextKeyService),this.completionsQuotaExceededContextKey=Ne.completionsQuotaExceeded.bindTo(this.contextKeyService),this.anonymousContextKey=Ne.chatAnonymous.bindTo(this.contextKeyService),this.anonymousContextKey.set(this.anonymous),this.onDidChangeEntitlement=He.map(He.filter(this.contextKeyService.onDidChangeContext,c=>c.affectsSome(new Set([Ne.Entitlement.planPro.key,Ne.Entitlement.planBusiness.key,Ne.Entitlement.planEnterprise.key,Ne.Entitlement.planProPlus.key,Ne.Entitlement.planFree.key,Ne.Entitlement.canSignUp.key,Ne.Entitlement.signedOut.key,Ne.Entitlement.organisations.key,Ne.Entitlement.internal.key,Ne.Entitlement.sku.key])),this._store),()=>{},this._store),this.entitlementObs=Ai(this.onDidChangeEntitlement,()=>this.entitlement),this.onDidChangeSentiment=He.map(He.filter(this.contextKeyService.onDidChangeContext,c=>c.affectsSome(new Set([Ne.Setup.hidden.key,Ne.Setup.disabled.key,Ne.Setup.untrusted.key,Ne.Setup.installed.key,Ne.Setup.later.key,Ne.Setup.registered.key])),this._store),()=>{},this._store),this.sentimentObs=Ai(this.onDidChangeSentiment,()=>this.sentiment),Xo&&!o.remoteAuthority){Ne.Setup.hidden.bindTo(this.contextKeyService).set(!0);return}if(!n.defaultChatAgent){Ne.Setup.hidden.bindTo(this.contextKeyService).set(!0);return}let d=this.context=new xt(()=>this._register(e.createInstance(Mi)));this.requests=new xt(()=>this._register(e.createInstance(_g,d.value,{clearQuotas:()=>this.clearQuotas(),acceptQuotas:c=>this.acceptQuotas(c)}))),this.registerListeners()}get entitlement(){return this.contextKeyService.getContextKeyValue(Ne.Entitlement.planPro.key)===!0?6:this.contextKeyService.getContextKeyValue(Ne.Entitlement.planBusiness.key)===!0?8:this.contextKeyService.getContextKeyValue(Ne.Entitlement.planEnterprise.key)===!0?9:this.contextKeyService.getContextKeyValue(Ne.Entitlement.planProPlus.key)===!0?7:this.contextKeyService.getContextKeyValue(Ne.Entitlement.planFree.key)===!0?5:this.contextKeyService.getContextKeyValue(Ne.Entitlement.canSignUp.key)===!0?3:this.contextKeyService.getContextKeyValue(Ne.Entitlement.signedOut.key)===!0?1:2}get isInternal(){return this.contextKeyService.getContextKeyValue(Ne.Entitlement.internal.key)===!0}get organisations(){return this.contextKeyService.getContextKeyValue(Ne.Entitlement.organisations.key)}get sku(){return this.contextKeyService.getContextKeyValue(Ne.Entitlement.sku.key)}get copilotTrackingId(){return this.context?.value.state.copilotTrackingId}get previewFeaturesDisabled(){return this.contextKeyService.getContextKeyValue("github.copilot.previewFeaturesDisabled")===!0}get quotas(){return this._quotas}registerListeners(){let e=new Set([this.ExtensionQuotaContextKeys.chatQuotaExceeded,this.ExtensionQuotaContextKeys.completionsQuotaExceeded]),n=this._register(new An);this._register(this.contextKeyService.onDidChangeContext(s=>{s.affectsSome(e)&&(n.value&&n.value.cancel(),n.value=new We,this.update(n.value.token))}));let o=this.anonymous,i=()=>{let s=this.anonymous;s!==o&&(o=s,this.anonymousContextKey.set(s),this.context?.hasValue&&EH(this.context.value.state,this.configurationService,this.telemetryService),this._onDidChangeAnonymous.fire())};this._register(this.configurationService.onDidChangeConfiguration(s=>{s.affectsConfiguration(yH)&&i()})),this._register(this.onDidChangeEntitlement(()=>i())),this._register(this.onDidChangeSentiment(()=>i()))}acceptQuotas(e){let n=this._quotas;this._quotas=e,this.updateContextKeys();let{changed:o}=this.compareQuotas(n.chat,e.chat),{changed:i}=this.compareQuotas(n.completions,e.completions),{changed:s}=this.compareQuotas(n.premiumChat,e.premiumChat);(o.exceeded||i.exceeded||s.exceeded)&&this._onDidChangeQuotaExceeded.fire(),(o.remaining||i.remaining||s.remaining)&&this._onDidChangeQuotaRemaining.fire()}compareQuotas(e,n){return{changed:{exceeded:e?.percentRemaining===0!=(n?.percentRemaining===0),remaining:e?.percentRemaining!==n?.percentRemaining}}}clearQuotas(){this.acceptQuotas({})}updateContextKeys(){this.chatQuotaExceededContextKey.set(this._quotas.chat?.percentRemaining===0),this.completionsQuotaExceededContextKey.set(this._quotas.completions?.percentRemaining===0)}get sentiment(){return{installed:this.contextKeyService.getContextKeyValue(Ne.Setup.installed.key)===!0,hidden:this.contextKeyService.getContextKeyValue(Ne.Setup.hidden.key)===!0,disabled:this.contextKeyService.getContextKeyValue(Ne.Setup.disabled.key)===!0,untrusted:this.contextKeyService.getContextKeyValue(Ne.Setup.untrusted.key)===!0,later:this.contextKeyService.getContextKeyValue(Ne.Setup.later.key)===!0,registered:this.contextKeyService.getContextKeyValue(Ne.Setup.registered.key)===!0}}get anonymous(){return Rw(this.configurationService,this.entitlement,this.sentiment)}markAnonymousRateLimited(){this.anonymous&&(this.chatQuotaExceededContextKey.set(!0),this._onDidChangeQuotaExceeded.fire())}async update(e){await this.requests?.value.forceResolveEntitlement(e)}};Tg=L([P(0,ko),P(1,Su),P(2,CI),P(3,Ir),P(4,to),P(5,Li),P(6,ww)],Tg);var _g=class extends K{constructor(e,n,o,i,s,a,l,d,c,u){super();this.context=e;this.chatQuotasAccessor=n;this.telemetryService=o;this.logService=i;this.requestService=s;this.dialogService=a;this.openerService=l;this.lifecycleService=d;this.defaultAccountService=c;this.authenticationService=u;this.pendingResolveCts=new We;this.state={entitlement:this.context.state.entitlement},this.registerListeners(),this.resolve()}registerListeners(){this._register(this.defaultAccountService.onDidChangeDefaultAccount(()=>this.resolve())),this._register(this.context.onDidChange(()=>{(!this.context.state.installed||this.context.state.disabled||this.context.state.entitlement===1)&&(this.state={entitlement:this.state.entitlement,quotas:void 0},this.chatQuotasAccessor.clearQuotas())}))}async resolve(){this.pendingResolveCts.dispose(!0);let e=this.pendingResolveCts=new We,n=await this.defaultAccountService.getDefaultAccount();if(e.token.isCancellationRequested)return;let o;n?this.state.entitlement===1&&(o={entitlement:2}):o={entitlement:1},o&&this.update(o),n&&await this.resolveEntitlement(n,e.token)}async resolveEntitlement(e,n){let o=await this.doResolveEntitlement(e,n);return typeof o?.entitlement=="number"&&!n.isCancellationRequested&&this.update(o),o}async doResolveEntitlement(e,n){if(n.isCancellationRequested)return;let o=e.entitlementsData;if(!o)return this.logService.trace("[chat entitlement]: no entitlements data available on default account"),{entitlement:o===null?1:2};let i;o.access_type_sku==="free_limited_copilot"?i=5:o.can_signup_for_limited?i=3:o.copilot_plan==="individual"?i=6:o.copilot_plan==="individual_pro"?i=7:o.copilot_plan==="business"?i=8:o.copilot_plan==="enterprise"?i=9:i=4;let s={entitlement:i,organisations:o.organization_login_list,quotas:this.toQuotas(o),sku:o.access_type_sku,copilotTrackingId:o.analytics_tracking_id};return this.logService.trace(`[chat entitlement]: resolved to ${s.entitlement}, quotas: ${JSON.stringify(s.quotas)}`),this.telemetryService.publicLog2("chatInstallEntitlement",{entitlement:s.entitlement,tid:o.analytics_tracking_id,sku:s.sku,quotaChat:s.quotas?.chat?.remaining,quotaPremiumChat:s.quotas?.premiumChat?.remaining,quotaCompletions:s.quotas?.completions?.remaining,quotaResetDate:s.quotas?.resetDate}),s}toQuotas(e){let n={resetDate:e.quota_reset_date_utc??e.quota_reset_date??e.limited_user_reset_date,resetDateHasTime:typeof e.quota_reset_date_utc=="string"};if(e.monthly_quotas?.chat&&typeof e.limited_user_quotas?.chat=="number"&&(n.chat={total:e.monthly_quotas.chat,remaining:e.limited_user_quotas.chat,percentRemaining:Math.min(100,Math.max(0,e.limited_user_quotas.chat/e.monthly_quotas.chat*100)),overageEnabled:!1,overageCount:0,unlimited:!1}),e.monthly_quotas?.completions&&typeof e.limited_user_quotas?.completions=="number"&&(n.completions={total:e.monthly_quotas.completions,remaining:e.limited_user_quotas.completions,percentRemaining:Math.min(100,Math.max(0,e.limited_user_quotas.completions/e.monthly_quotas.completions*100)),overageEnabled:!1,overageCount:0,unlimited:!1}),e.quota_snapshots)for(let o of["chat","completions","premium_interactions"]){let i=e.quota_snapshots[o];if(!i)continue;let s={total:i.entitlement,remaining:i.remaining,percentRemaining:Math.min(100,Math.max(0,i.percent_remaining)),overageEnabled:i.overage_permitted,overageCount:i.overage_count,unlimited:i.unlimited};switch(o){case"chat":n.chat=s;break;case"completions":n.completions=s;break;case"premium_interactions":n.premiumChat=s;break}}return n}async request(e,n,o,i,s){let a;for(let l of i){if(s.isCancellationRequested)return a;try{let d=await this.requestService.request({type:n,url:e,data:n==="POST"?JSON.stringify(o):void 0,disableCache:!0,headers:{Authorization:`Bearer ${l.accessToken}`}},s),c=d.res.statusCode;if(c&&c!==200){a=d;continue}return d}catch(d){s.isCancellationRequested||this.logService.error(`[chat entitlement] request: error ${d}`)}}return a}update(e){this.state=e,this.context.update({entitlement:this.state.entitlement,organisations:this.state.organisations,sku:this.state.sku,copilotTrackingId:this.state.copilotTrackingId}),e.quotas&&this.chatQuotasAccessor.acceptQuotas(e.quotas)}async forceResolveEntitlement(e=De.None){let n=await this.defaultAccountService.refresh();if(n)return this.resolveEntitlement(n,e)}async signUpFree(){let e=await this.getSessions();if(e.length!==0)return this.doSignUpFree(e)}async doSignUpFree(e){if(!Pg.entitlementSignupLimitedUrl)return{errorCode:1};let n={restricted_telemetry:this.telemetryService.telemetryLevel===0?"disabled":"enabled",public_code_suggestions:"enabled"},o=await this.request(Pg.entitlementSignupLimitedUrl,"POST",n,e,De.None);if(!o)return await this.onUnknownSignUpError(p(16338,null),"[chat entitlement] sign-up: no response")?this.doSignUpFree(e):{errorCode:1};if(o.res.statusCode&&o.res.statusCode!==200){if(o.res.statusCode===422)try{let l=await pw(o);if(l){let d=JSON.parse(l);if(typeof d.message=="string"&&d.message)return this.onUnprocessableSignUpError(`[chat entitlement] sign-up: unprocessable entity (${d.message})`,d.message),{errorCode:o.res.statusCode}}}catch{}return await this.onUnknownSignUpError(p(16339,null,o.res.statusCode),`[chat entitlement] sign-up: unexpected status code ${o.res.statusCode}`)?this.doSignUpFree(e):{errorCode:o.res.statusCode}}let i=null;try{i=await pw(o)}catch{}if(!i)return await this.onUnknownSignUpError(p(16337,null),"[chat entitlement] sign-up: response has no content")?this.doSignUpFree(e):{errorCode:2};let s;try{s=JSON.parse(i),this.logService.trace(`[chat entitlement] sign-up: response is ${i}`)}catch(a){return await this.onUnknownSignUpError(p(16336,null),`[chat entitlement] sign-up: error parsing response (${a})`)?this.doSignUpFree(e):{errorCode:3}}return this.update({entitlement:5}),!!s?.subscribed}async getSessions(){let e=await this.defaultAccountService.getDefaultAccount();if(e){let o=(await this.authenticationService.getSessions(e.authenticationProvider.id)).filter(i=>i.id===e.sessionId);if(o.length)return o}return[...await this.authenticationService.getSessions(this.defaultAccountService.getDefaultAccountAuthenticationProvider().id)]}async onUnknownSignUpError(e,n){if(this.logService.error(n),!this.lifecycleService.willShutdown){let{confirmed:o}=await this.dialogService.confirm({type:tt.Error,message:p(16340,null),detail:e,primaryButton:p(16335,null)});return o}return!1}onUnprocessableSignUpError(e,n){this.logService.error(e),this.lifecycleService.willShutdown||this.dialogService.prompt({type:tt.Error,message:p(16341,null),detail:n,buttons:[{label:p(16329,null),run:()=>{}},{label:p(16328,null),run:()=>this.openerService.open(E.parse(Pg.upgradePlanUrl))}]})}async signIn(e){let n=await this.defaultAccountService.signIn({additionalScopes:e?.additionalScopes,extraAuthorizeParameters:{get_started_with:"copilot-vscode"},provider:e?.useSocialProvider});if(!n)return{};let o=await this.doResolveEntitlement(n,De.None);return{defaultAccount:n,entitlements:o}}dispose(){this.pendingResolveCts.dispose(!0),super.dispose()}};_g=L([P(2,Li),P(3,be),P(4,pI),P(5,gH),P(6,bH),P(7,ww),P(8,IH),P(9,vH)],_g);var Mi=class extends K{constructor(e,n,o,i,s){super();this.storageService=n;this.logService=o;this.configurationService=i;this.telemetryService=s;this.suspendedState=void 0;this._onDidChange=this._register(new D);this.onDidChange=this._onDidChange.event;this.updateBarrier=void 0;this.canSignUpContextKey=Ne.Entitlement.canSignUp.bindTo(e),this.signedOutContextKey=Ne.Entitlement.signedOut.bindTo(e),this.freeContextKey=Ne.Entitlement.planFree.bindTo(e),this.proContextKey=Ne.Entitlement.planPro.bindTo(e),this.proPlusContextKey=Ne.Entitlement.planProPlus.bindTo(e),this.businessContextKey=Ne.Entitlement.planBusiness.bindTo(e),this.enterpriseContextKey=Ne.Entitlement.planEnterprise.bindTo(e),this.organisationsContextKey=Ne.Entitlement.organisations.bindTo(e),this.isInternalContextKey=Ne.Entitlement.internal.bindTo(e),this.skuContextKey=Ne.Entitlement.sku.bindTo(e),this.hiddenContext=Ne.Setup.hidden.bindTo(e),this.laterContext=Ne.Setup.later.bindTo(e),this.installedContext=Ne.Setup.installed.bindTo(e),this.disabledContext=Ne.Setup.disabled.bindTo(e),this.untrustedContext=Ne.Setup.untrusted.bindTo(e),this.registeredContext=Ne.Setup.registered.bindTo(e),this._state=this.storageService.getObject(Mi.CHAT_ENTITLEMENT_CONTEXT_STORAGE_KEY,0)??{entitlement:1,organisations:void 0,sku:void 0,copilotTrackingId:void 0},this.updateContextSync(),this.registerListeners()}static{this.CHAT_ENTITLEMENT_CONTEXT_STORAGE_KEY="chat.setupContext"}static{this.CHAT_DISABLED_CONFIGURATION_KEY="chat.disableAIFeatures"}get state(){return this.withConfiguration(this.suspendedState??this._state)}registerListeners(){this._register(this.configurationService.onDidChangeConfiguration(e=>{e.affectsConfiguration(Mi.CHAT_DISABLED_CONFIGURATION_KEY)&&this.updateContext()}))}withConfiguration(e){return this.configurationService.getValue(Mi.CHAT_DISABLED_CONFIGURATION_KEY)===!0?{...e,hidden:!0}:e}async update(e){this.logService.trace(`[chat entitlement context] update(): ${JSON.stringify(e)}`);let n=JSON.stringify(this._state);if(typeof e.installed=="boolean"&&typeof e.disabled=="boolean"&&typeof e.untrusted=="boolean"&&(this._state.installed=e.installed,this._state.disabled=e.disabled,this._state.untrusted=e.untrusted,e.installed&&!e.disabled&&(e.hidden=!1)),typeof e.hidden=="boolean"&&(this._state.hidden=e.hidden),typeof e.later=="boolean"&&(this._state.later=e.later),typeof e.entitlement=="number"&&(this._state.entitlement=e.entitlement,this._state.organisations=e.organisations,this._state.sku=e.sku,this._state.copilotTrackingId=e.copilotTrackingId,this._state.entitlement===5||E$(this._state.entitlement)?this._state.registered=!0:this._state.entitlement===3&&(this._state.registered=!1)),Rw(this.configurationService,this._state.entitlement,this._state)&&(this._state.sku="no_auth_limited_copilot"),n!==JSON.stringify(this._state))return this.storageService.store(Mi.CHAT_ENTITLEMENT_CONTEXT_STORAGE_KEY,{...this._state,later:void 0},0,1),this.updateContext()}async updateContext(){await this.updateBarrier?.wait(),this.updateContextSync()}updateContextSync(){let e=this.withConfiguration(this._state);this.signedOutContextKey.set(e.entitlement===1),this.canSignUpContextKey.set(e.entitlement===3),this.freeContextKey.set(e.entitlement===5),this.proContextKey.set(e.entitlement===6),this.proPlusContextKey.set(e.entitlement===7),this.businessContextKey.set(e.entitlement===8),this.enterpriseContextKey.set(e.entitlement===9),this.organisationsContextKey.set(e.organisations),this.isInternalContextKey.set(!!e.organisations?.some(n=>n==="github"||n==="microsoft"||n==="ms-copilot"||n==="MicrosoftCopilot")),this.skuContextKey.set(e.sku),this.hiddenContext.set(!!e.hidden),this.laterContext.set(!!e.later),this.installedContext.set(!!e.installed),this.disabledContext.set(!!e.disabled),this.untrustedContext.set(!!e.untrusted),this.registeredContext.set(!!e.registered),this.logService.trace(`[chat entitlement context] updateContext(): ${JSON.stringify(e)}`),EH(e,this.configurationService,this.telemetryService),this._onDidChange.fire()}suspend(){this.suspendedState={...this._state},this.updateBarrier=new Ln}resume(){this.suspendedState=void 0,this.updateBarrier?.open(),this.updateBarrier=void 0}};Mi=L([P(0,Ir),P(1,Ps),P(2,be),P(3,to),P(4,Li)],Mi);rt(y$,Tg,0);var Yr;(ue=>{ue.responseVote=new w("chatSessionResponseVote","",{type:"string",description:p(7143,null)}),ue.responseDetectedAgentCommand=new w("chatSessionResponseDetectedAgentOrCommand",!1,{type:"boolean",description:p(7123,null)}),ue.responseSupportsIssueReporting=new w("chatResponseSupportsIssueReporting",!1,{type:"boolean",description:p(7116,null)}),ue.responseIsFiltered=new w("chatSessionResponseFiltered",!1,{type:"boolean",description:p(7115,null)}),ue.responseHasError=new w("chatSessionResponseError",!1,{type:"boolean",description:p(7114,null)}),ue.requestInProgress=new w("chatSessionRequestInProgress",!1,{type:"boolean",description:p(7142,null)}),ue.currentlyEditing=new w("chatSessionCurrentlyEditing",!1,{type:"boolean",description:p(7140,null)}),ue.currentlyEditingInput=new w("chatSessionCurrentlyEditingInput",!1,{type:"boolean",description:p(7141,null)});let l;(At=>(At.Sent="s",At.QueueOrSteer="qs"))(l=ue.EditingRequestType||={}),ue.editingRequestType=new w("chatEditingSentRequest",void 0,{type:"string",description:p(7092,null)}),ue.isResponse=new w("chatResponse",!1,{type:"boolean",description:p(7113,null)}),ue.isRequest=new w("chatRequest",!1,{type:"boolean",description:p(7111,null)}),ue.isPendingRequest=new w("chatRequestIsPending",!1,{type:"boolean",description:p(7112,null)}),ue.itemId=new w("chatItemId","",{type:"string",description:p(7101,null)}),ue.lastItemId=new w("chatLastItemId",[],{type:"string",description:p(7102,null)}),ue.editApplied=new w("chatEditApplied",!1,{type:"boolean",description:p(7086,null)}),ue.inputHasText=new w("chatInputHasText",!1,{type:"boolean",description:p(7139,null)}),ue.inputHasFocus=new w("chatInputHasFocus",!1,{type:"boolean",description:p(7138,null)}),ue.inChatInput=new w("inChatInput",!1,{type:"boolean",description:p(7136,null)}),ue.inChatSession=new w("inChat",!1,{type:"boolean",description:p(7130,null)}),ue.inChatQuestionCarousel=new w("inChatQuestionCarousel",!1,{type:"boolean",description:p(7132,null)}),ue.inChatEditor=new w("inChatEditor",!1,{type:"boolean",description:p(7131,null)}),ue.inChatTodoList=new w("inChatTodoList",!1,{type:"boolean",description:p(7135,null)}),ue.inChatTip=new w("inChatTip",!1,{type:"boolean",description:p(7134,null)}),ue.multipleChatTips=new w("multipleChatTips",!1,{type:"boolean",description:p(7145,null)}),ue.inChatTerminalToolOutput=new w("inChatTerminalToolOutput",!1,{type:"boolean",description:p(7133,null)}),ue.chatModeKind=new w("chatAgentKind","ask",{type:"string",description:p(7072,null)}),ue.chatModeName=new w("chatModeName","",{type:"string",description:p(7105,null)}),ue.chatModelId=new w("chatModelId","",{type:"string",description:p(7103,null)}),ue.supported=Ut.or(aH.negate(),fH.notEqualsTo(""),Ut.has("config.chat.experimental.serverlessWebEnabled")),ue.enabled=new w("chatIsEnabled",!1,{type:"boolean",description:p(7099,null)}),ue.lockedToCodingAgent=new w("lockedToCodingAgent",!1,{type:"boolean",description:p(7144,null)}),ue.chatSessionHasCustomAgentTarget=new w("chatSessionHasCustomAgentTarget",!1,{type:"boolean",description:p(7117,null)}),ue.chatSessionHasTargetedModels=new w("chatSessionHasTargetedModels",!1,{type:"boolean",description:p(7120,null)}),ue.agentSupportsAttachments=new w("agentSupportsAttachments",!1,{type:"boolean",description:p(7083,null)}),ue.withinEditSessionDiff=new w("withinEditSessionDiff",!1,{type:"boolean",description:p(7147,null)}),ue.filePartOfEditSession=new w("filePartOfEditSession",!1,{type:"boolean",description:p(7127,null)}),ue.extensionParticipantRegistered=new w("chatPanelExtensionParticipantRegistered",!1,{type:"boolean",description:p(7107,null)}),ue.panelParticipantRegistered=new w("chatPanelParticipantRegistered",!1,{type:"boolean",description:p(7109,null)}),ue.chatEditingCanUndo=new w("chatEditingCanUndo",!1,{type:"boolean",description:p(7088,null)}),ue.chatEditingCanRedo=new w("chatEditingCanRedo",!1,{type:"boolean",description:p(7087,null)}),ue.languageModelsAreUserSelectable=new w("chatModelsAreUserSelectable",!1,{type:"boolean",description:p(7104,null)}),ue.chatSessionHasModels=new w("chatSessionHasModels",!1,{type:"boolean",description:p(7119,null)}),ue.chatSessionOptionsValid=new w("chatSessionOptionsValid",!0,{type:"boolean",description:p(7122,null)}),ue.extensionInvalid=new w("chatExtensionInvalid",!1,{type:"boolean",description:p(7093,null)}),ue.inputCursorAtTop=new w("chatCursorAtTop",!1),ue.inputHasAgent=new w("chatInputHasAgent",!1),ue.location=new w("chatLocation",void 0),ue.inQuickChat=new w("quickChatHasFocus",!1,{type:"boolean",description:p(7137,null)}),ue.inAgentSessionsWelcome=new w("inAgentSessionsWelcome",!1,{type:"boolean",description:p(7129,null)}),ue.chatSessionType=new w("chatSessionType","",{type:"string",description:p(7124,null)}),ue.hasFileAttachments=new w("chatHasFileAttachments",!1,{type:"boolean",description:p(7096,null)}),ue.chatSessionIsEmpty=new w("chatSessionIsEmpty",!0,{type:"boolean",description:p(7121,null)}),ue.hasPendingRequests=new w("chatHasPendingRequests",!1,{type:"boolean",description:p(7097,null)}),ue.chatSessionHasDebugData=new w("chatSessionHasDebugData",!1,{type:"boolean",description:p(7118,null)}),ue.remoteJobCreating=new w("chatRemoteJobCreating",!1,{type:"boolean",description:p(7110,null)}),ue.hasRemoteCodingAgent=new w("hasRemoteCodingAgent",!1,p(7128,null)),ue.hasCanDelegateProviders=new w("chatHasCanDelegateProviders",!1,{type:"boolean",description:p(7095,null)}),ue.enableRemoteCodingAgentPromptFileOverlay=new w("enableRemoteCodingAgentPromptFileOverlay",!1,p(7126,null)),ue.skipChatRequestInProgressMessage=new w("chatSkipRequestInProgressMessage",!1,{type:"boolean",description:p(7125,null)}),ue.Setup=Ne.Setup,ue.Entitlement=Ne.Entitlement,ue.chatQuotaExceeded=Ne.chatQuotaExceeded,ue.completionsQuotaExceeded=Ne.completionsQuotaExceeded,ue.Editing={hasToolConfirmation:new w("chatHasToolConfirmation",!1,{type:"boolean",description:p(7091,null)}),hasElicitationRequest:new w("chatHasElicitationRequest",!1,{type:"boolean",description:p(7089,null)}),hasQuestionCarousel:new w("chatHasQuestionCarousel",!1,{type:"boolean",description:p(7090,null)})},ue.Tools={toolsCount:new w("toolsCount",0,{type:"number",description:p(7146,null)})},ue.Modes={hasCustomChatModes:new w("chatHasCustomAgents",!1,{type:"boolean",description:p(7094,null)}),agentModeDisabledByPolicy:new w("chatAgentModeDisabledByPolicy",!1,{type:"boolean",description:p(7084,null)})},ue.panelLocation=new w("chatPanelLocation",void 0,{type:"number",description:p(7108,null)}),ue.agentSessionsViewerFocused=new w("agentSessionsViewerFocused",!0,{type:"boolean",description:p(7078,null)}),ue.agentSessionsViewerOrientation=new w("agentSessionsViewerOrientation",void 0,{type:"number",description:p(7079,null)}),ue.agentSessionsViewerPosition=new w("agentSessionsViewerPosition",void 0,{type:"number",description:p(7080,null)}),ue.agentSessionsViewerVisible=new w("agentSessionsViewerVisible",void 0,{type:"boolean",description:p(7081,null)}),ue.agentSessionType=new w("chatSessionType","",{type:"string",description:p(7082,null)}),ue.agentSessionSection=new w("agentSessionSection","",{type:"string",description:p(7077,null)}),ue.isArchivedAgentSession=new w("agentSessionIsArchived",!1,{type:"boolean",description:p(7075,null)}),ue.isReadAgentSession=new w("agentSessionIsRead",!1,{type:"boolean",description:p(7076,null)}),ue.hasMultipleAgentSessionsSelected=new w("agentSessionHasMultipleSelected",!1,{type:"boolean",description:p(7074,null)}),ue.hasAgentSessionChanges=new w("agentSessionHasChanges",!1,{type:"boolean",description:p(7073,null)}),ue.isKatexMathElement=new w("chatIsKatexMathElement",!1,{type:"boolean",description:p(7100,null)}),ue.hasUsedCreateSlashCommands=new w("chatHasUsedCreateSlashCommands",!1,{type:"boolean",description:p(7098,null)}),ue.contextUsageHasBeenOpened=new w("chatContextUsageHasBeenOpened",!1,{type:"boolean",description:p(7085,null)}),ue.newChatButtonExperimentIcon=new w("chatNewChatButtonExperimentIcon","",{type:"string",description:p(7106,null)})})(Yr||={});var S$;(e=>(e.inEditingMode=Ut.or(Yr.chatModeKind.isEqualTo("edit"),Yr.chatModeKind.isEqualTo("agent")),e.chatSetupTriggerContext=Ut.or(Yr.Setup.installed.negate(),Yr.Entitlement.canSignUp)))(S$||={});var SH=N("ILanguageModelsConfigurationService");var TH;(n=>{function r(o){return(typeof o.capabilities?.agentMode>"u"||o.capabilities.agentMode)&&!!o.capabilities?.toolCalling}n.suitableForAgentMode=r;function t(o){return`${o.name} (${o.vendor})`}n.asQualifiedName=t;function e(o,i){return i.vendor==="copilot"&&o===i.name?!0:o===t(i)}n.matchesQualifiedName=e})(TH||={});var _I=N("ILanguageModelsService"),xH={type:"object",required:["vendor","displayName"],properties:{vendor:{type:"string",description:p(7174,null)},displayName:{type:"string",description:p(7170,null)},configuration:{type:"object",description:p(7168,null),anyOf:[{$ref:"http://json-schema.org/draft-07/schema#"},{properties:{properties:{type:"object",additionalProperties:{$ref:"http://json-schema.org/draft-07/schema#",properties:{secret:{type:"boolean",description:p(7169,null)}}}},additionalProperties:{$ref:"http://json-schema.org/draft-07/schema#",properties:{secret:{type:"boolean",description:p(7169,null)}}}}}]},managementCommand:{type:"string",description:p(7172,null),deprecated:!0,deprecationMessage:p(7173,null)},when:{type:"string",description:p(7176,null)}}},x$=II.registerExtensionPoint({extensionPoint:"languageModelChatProviders",jsonSchema:{description:p(7167,null),oneOf:[xH,{type:"array",items:xH}]},activationEventsGenerator:function*(r){for(let t of r)yield`onLanguageModelChatProvider:${t.vendor}`}}),Aw="chatModelPickerPreferences",CH="chatModelRecentlyUsed",Ow="chat.participantNameRegistry",Lw="chat.modelsControl",kd=class{constructor(t,e,n,o,i,s,a,l,d){this._extensionService=t;this._logService=e;this._storageService=n;this._contextKeyService=o;this._languageModelsConfigurationService=i;this._quickInputService=s;this._secretStorageService=a;this._productService=l;this._requestService=d;this._store=new te;this._providers=new Map;this._vendors=new Map;this._onDidChangeLanguageModelVendors=this._store.add(new D);this.onDidChangeLanguageModelVendors=this._onDidChangeLanguageModelVendors.event;this._modelsGroups=new Map;this._modelCache=new Map;this._resolveLMSequencer=new Da;this._modelPickerUserPreferences={};this._onLanguageModelChange=this._store.add(new D);this.onDidChangeLanguageModels=this._onLanguageModelChange.event;this._recentlyUsedModelIds=[];this._onDidChangeModelsControlManifest=this._store.add(new D);this.onDidChangeModelsControlManifest=this._onDidChangeModelsControlManifest.event;this._modelsControlManifest={free:{},paid:{}};this._chatControlDisposed=!1;this._restrictedChatParticipants=_d(this,Object.create(null));this.restrictedChatParticipants=this._restrictedChatParticipants;this._hasUserSelectableModels=Yr.languageModelsAreUserSelectable.bindTo(o),this._modelPickerUserPreferences=this._readModelPickerPreferences(),this._recentlyUsedModelIds=this._readRecentlyUsedModels(),this._initChatControlData(),this._store.add(this._storageService.onDidChangeValue(0,Aw,this._store)(()=>this._onDidChangeModelPickerPreferences())),this._store.add(this.onDidChangeLanguageModels(()=>{this._hasUserSelectableModels.set(this._modelCache.size>0&&Array.from(this._modelCache.values()).some(c=>c.isUserSelectable)),this._refreshModelsControlManifest()})),this._store.add(this._languageModelsConfigurationService.onDidChangeLanguageModelGroups(c=>this._onDidChangeLanguageModelGroups(c))),this._store.add(x$.setHandler((c,{added:u,removed:f})=>{let g=[],I=[];for(let h of u)for(let C of Lt.wrap(h.value)){if(this._vendors.has(C.vendor)){h.collector.error(p(7175,null,C.vendor));continue}if(Ti(C.vendor)){h.collector.error(p(7171,null));continue}if(C.vendor.trim()!==C.vendor){h.collector.error(p(7177,null));continue}g.push(C)}for(let h of f)for(let C of Lt.wrap(h.value))I.push(C);this.deltaLanguageModelChatProviderDescriptors(g,I)}))}static{this.SECRET_KEY_PREFIX="chat.lm.secret."}static{this.SECRET_INPUT="${input:{0}}"}deltaLanguageModelChatProviderDescriptors(t,e){let n=[],o=[];for(let i of t){if(this._vendors.has(i.vendor)){this._logService.error(`The vendor '${i.vendor}' is already registered and cannot be registered twice`);continue}if(Ti(i.vendor)){this._logService.error("The vendor field cannot be empty.");continue}if(i.vendor.trim()!==i.vendor){this._logService.error("The vendor field cannot start or end with whitespace.");continue}let s={vendor:i.vendor,displayName:i.displayName,configuration:i.configuration,managementCommand:i.managementCommand,when:i.when,isDefault:i.vendor==="copilot"};this._vendors.set(i.vendor,s),n.push(i.vendor),this._hasStoredModelForVendor(i.vendor)&&this._extensionService.activateByEvent(`onLanguageModelChatProvider:${i.vendor}`)}for(let i of e)this._vendors.delete(i.vendor),this._providers.delete(i.vendor),this._clearModelCache(i.vendor),o.push(i.vendor);for(let[i,s]of this._providers)this._vendors.has(i)||this._providers.delete(i);if((n.length>0||o.length>0)&&(this._onDidChangeLanguageModelVendors.fire([...n,...o]),o.length>0))for(let i of o)this._onLanguageModelChange.fire(i)}async _onDidChangeLanguageModelGroups(t){let e=new Set(t.map(n=>n.vendor));await Promise.all(Array.from(e).map(n=>this._resolveAllLanguageModels(n,!0)))}_readModelPickerPreferences(){return this._storageService.getObject(Aw,0,{})}_onDidChangeModelPickerPreferences(){let t=this._readModelPickerPreferences(),e=this._modelPickerUserPreferences,n=new Set,o=!1;for(let i in t)if(e[i]!==t[i]){o=!0;let s=this._modelCache.get(i);s&&n.add(s.vendor)}for(let i in e)if(!t.hasOwnProperty(i)){o=!0;let s=this._modelCache.get(i);s&&n.add(s.vendor)}if(o){this._logService.trace("[LM] Updated model picker preferences from storage"),this._modelPickerUserPreferences=t;for(let i of n)this._onLanguageModelChange.fire(i)}}_hasStoredModelForVendor(t){return Object.keys(this._modelPickerUserPreferences).some(e=>e.startsWith(t))}_saveModelPickerPreferences(){this._storageService.store(Aw,this._modelPickerUserPreferences,0,0)}updateModelPickerPreference(t,e){let n=this._modelCache.get(t);if(!n){this._logService.warn(`[LM] Cannot update model picker preference for unknown model ${t}`);return}this._modelPickerUserPreferences[t]=e,e===n.isUserSelectable?(delete this._modelPickerUserPreferences[t],this._saveModelPickerPreferences()):n.isUserSelectable!==e&&this._saveModelPickerPreferences(),this._onLanguageModelChange.fire(n.vendor),this._logService.trace(`[LM] Updated model picker preference for ${t} to ${e}`)}getVendors(){return Array.from(this._vendors.values()).filter(t=>{if(!t.when)return!0;let e=Ut.deserialize(t.when);return e?this._contextKeyService.contextMatchesRules(e):!1})}getLanguageModelIds(){return Array.from(this._modelCache.keys())}lookupLanguageModel(t){let e=this._modelCache.get(t);return e&&this._modelPickerUserPreferences[t]!==void 0?{...e,isUserSelectable:this._modelPickerUserPreferences[t]}:e}lookupLanguageModelByQualifiedName(t){for(let[e,n]of this._modelCache.entries())if(TH.matchesQualifiedName(t,n))return{metadata:n,identifier:e}}async _resolveAllLanguageModels(t,e){let n=this._vendors.get(t);if(!n)return;await this._extensionService.activateByEvent(`onLanguageModelChatProvider:${t}`);let o=this._providers.get(t);if(!o){this._logService.warn(`[LM] No provider registered for vendor ${t}`);return}return this._resolveLMSequencer.queue(t,async()=>{let i=[],s=[];try{let c=await o.provideLanguageModelChatInfo({silent:e},De.None);if(c.length){i.push(...c);let u=[];for(let f of c)n.isDefault?f.metadata.isUserSelectable||this._modelPickerUserPreferences[f.identifier]===!0?u.push(f.identifier):this._logService.trace(`[LM] Skipping model ${f.identifier} from model picker as it is not user selectable.`):u.push(f.identifier);s.push({modelIdentifiers:u})}}catch(c){s.push({modelIdentifiers:[],status:{message:Zl(c),severity:tt.Error}})}let a=this._languageModelsConfigurationService.getLanguageModelsProviderGroups();for(let c of a){if(c.vendor!==t)continue;let u=await this._resolveConfiguration(c,n.configuration);try{let f=await o.provideLanguageModelChatInfo({group:c.name,silent:e,configuration:u},De.None);f.length&&(i.push(...f),s.push({group:c,modelIdentifiers:f.map(g=>g.identifier)}))}catch(f){s.push({group:c,modelIdentifiers:[],status:{message:Zl(f),severity:tt.Error}})}}this._modelsGroups.set(t,s);let l=this._clearModelCache(t),d=!1;for(let c of i){if(this._modelCache.has(c.identifier)){this._logService.warn(`[LM] Model ${c.identifier} is already registered. Skipping.`);continue}this._modelCache.set(c.identifier,c.metadata),d=d||!Xt(l.get(c.identifier),c.metadata),l.delete(c.identifier)}this._logService.trace(`[LM] Resolved language models for vendor ${t}`,i),d=d||l.size>0,d?this._onLanguageModelChange.fire(t):this._logService.trace(`[LM] No changes in language models for vendor ${t}`)})}getLanguageModelGroups(t){return this._modelsGroups.get(t)??[]}async selectLanguageModels(t){if(t.vendor)await this._resolveAllLanguageModels(t.vendor,!0);else{let n=Array.from(this._vendors.keys());await Promise.all(n.map(o=>this._resolveAllLanguageModels(o,!0)))}let e=[];for(let[n,o]of this._modelCache)(t.vendor===void 0||o.vendor===t.vendor)&&(t.family===void 0||o.family===t.family)&&(t.version===void 0||o.version===t.version)&&(t.id===void 0||o.id===t.id)&&e.push(n);return this._logService.trace("[LM] selected language models",t,e),e}registerLanguageModelProvider(t,e){if(this._logService.trace("[LM] registering language model provider",t,e),!this._vendors.has(t))throw new Error(`Chat model provider uses UNKNOWN vendor ${t}.`);if(this._providers.has(t))throw new Error(`Chat model provider for vendor ${t} is already registered.`);this._providers.set(t,e),this._hasStoredModelForVendor(t)&&this._resolveAllLanguageModels(t,!0);let n=e.onDidChange(()=>{this._resolveAllLanguageModels(t,!0)});return ae(()=>{this._logService.trace("[LM] UNregistered language model provider",t),this._clearModelCache(t),this._providers.delete(t),n.dispose()})}async sendChatRequest(t,e,n,o,i){let s=this._providers.get(this._modelCache.get(t)?.vendor||"");if(!s)throw new Error(`Chat provider for model ${t} is not registered.`);return s.sendChatRequest(t,n,e,o,i)}computeTokenLength(t,e,n){let o=this._modelCache.get(t);if(!o)throw new Error(`Chat model ${t} could not be found.`);let i=this._providers.get(o.vendor);if(!i)throw new Error(`Chat provider for model ${t} is not registered.`);return i.provideTokenCount(t,e,n)}async configureLanguageModelsProviderGroup(t,e){let n=this.getVendors().find(({vendor:l})=>l===t);if(!n)throw new Error(`Vendor ${t} not found.`);if(n.managementCommand){await this._resolveAllLanguageModels(n.vendor,!1);return}let o=this._languageModelsConfigurationService.getLanguageModelsProviderGroups(),i=o.find(l=>l.vendor===t&&l.name===e),s=await this.promptForName(o,n,i);if(!s)return;let a=i?await this._resolveConfiguration(i,n.configuration):void 0;try{let l=n.configuration?await this.promptForConfiguration(s,n.configuration,a):void 0;if(n.configuration&&!l)return;let d=await this._resolveLanguageModelProviderGroup(s,t,l,n.configuration),c=i?await this._languageModelsConfigurationService.updateLanguageModelsProviderGroup(i,d):await this._languageModelsConfigurationService.addLanguageModelsProviderGroup(d);if(n.configuration&&this.requireConfiguring(n.configuration)){let u=this.getSnippetForFirstUnconfiguredProperty(l??{},n.configuration);await this._languageModelsConfigurationService.configureLanguageModels({group:c,snippet:u})}}catch(l){if(Fn(l))return;throw l}}async addLanguageModelsProviderGroup(t,e,n){let o=this.getVendors().find(({vendor:s})=>s===e);if(!o)throw new Error(`Vendor ${e} not found.`);let i=await this._resolveLanguageModelProviderGroup(t,e,n,o.configuration);await this._languageModelsConfigurationService.addLanguageModelsProviderGroup(i)}async removeLanguageModelsProviderGroup(t,e){let n=this.getVendors().find(({vendor:s})=>s===t);if(!n)throw new Error(`Vendor ${t} not found.`);let i=this._languageModelsConfigurationService.getLanguageModelsProviderGroups().find(s=>s.vendor===t&&s.name===e);if(!i)throw new Error(`Language model provider group ${e} for vendor ${t} not found.`);await this._deleteSecretsInConfiguration(i,n.configuration),await this._languageModelsConfigurationService.removeLanguageModelsProviderGroup(i)}requireConfiguring(t){if(t.additionalProperties)return!0;if(!t.properties)return!1;for(let e of Object.keys(t.properties))if(!this.canPromptForProperty(t.properties[e]))return!0;return!1}getSnippetForFirstUnconfiguredProperty(t,e){if(e.properties){for(let n of Object.keys(e.properties))if(t[n]===void 0){let o=e.properties[n];if(o&&typeof o!="boolean"&&o.defaultSnippets?.[0]){let i=o.defaultSnippets[0],s=i.bodyText??JSON.stringify(i.body,null,"	");return s=s.replace(/"(\^[^"]*)"/g,(a,l)=>l.substring(1)),`"${n}": ${s}`}}}}async promptForName(t,e,n){let o=n?.name;if(!o){o=e.displayName;let a=1;for(;t.some(l=>l.vendor===e.vendor&&l.name===o);)a++,o=`${e.displayName} ${a}`}let i,s=new te;try{await new Promise(a=>{let l=s.add(this._quickInputService.createInputBox());l.title=p(7159,null),l.placeholder=p(7162,null),l.value=o,l.ignoreFocusOut=!0,s.add(l.onDidChangeValue(d=>{if(!d){l.validationMessage=p(7160,null),l.severity=tt.Error;return}if(!n&&t.some(c=>c.name===d)){l.validationMessage=p(7163,null),l.severity=tt.Error;return}l.validationMessage=void 0,l.severity=tt.Ignore})),s.add(l.onDidAccept(async()=>{i=l.value,l.hide()})),s.add(l.onDidHide(()=>a())),l.show()})}finally{s.dispose()}return i}async promptForConfiguration(t,e,n){if(!e.properties)return;let o=n?{...n}:{};for(let i of Object.keys(e.properties)){let s=e.properties[i],a=!!e.required?.includes(i),l=await this.promptForValue(t,i,s,a,n);l!==void 0&&(o[i]=l)}return o}async promptForValue(t,e,n,o,i){if(!n||!this.canPromptForProperty(n))return;if(n.type==="array"&&n.items&&!Array.isArray(n.items)&&n.items.enum){let a=await this.promptForArray(t,e,n);return a===void 0?void 0:a}let s=await this.promptForInput(t,e,n,o,i);if(s!==void 0)return s}canPromptForProperty(t){return!t||typeof t=="boolean"?!1:!!(t.type==="array"&&t.items&&!Array.isArray(t.items)&&t.items.enum||t.type==="string"||t.type==="number"||t.type==="integer"||t.type==="boolean")}async promptForArray(t,e,n){if(!n.items||Array.isArray(n.items)||!n.items.enum)return;let o=n.items.enum,i=new te;try{return await new Promise(s=>{let a=i.add(this._quickInputService.createQuickPick());a.title=`${t}: ${n.title??e}`,a.items=o.map(l=>({label:l})),a.placeholder=n.description??p(7165,null,e),a.canSelectMany=!0,a.ignoreFocusOut=!0,i.add(a.onDidAccept(()=>{s(a.selectedItems.map(l=>l.label)),a.hide()})),i.add(a.onDidHide(()=>{s(void 0)})),a.show()})}finally{i.dispose()}}async promptForInput(t,e,n,o,i){let s=new te;try{let a=await new Promise((l,d)=>{let c=s.add(this._quickInputService.createInputBox());c.title=`${t}: ${n.title??e}`,c.placeholder=p(7161,null,e),c.password=!!n.secret,c.ignoreFocusOut=!0,i?.[e]?c.value=String(i?.[e]):n.default&&(c.value=String(n.default)),n.description&&(c.prompt=n.description),s.add(c.onDidChangeValue(u=>{if(!u&&o){c.validationMessage=p(7166,null),c.severity=tt.Error;return}if((n.type==="number"||n.type==="integer")&&isNaN(Number(u))){c.validationMessage=p(7164,null),c.severity=tt.Error;return}if(n.type==="boolean"&&u!=="true"&&u!=="false"){c.validationMessage=p(7158,null),c.severity=tt.Error;return}c.validationMessage=void 0,c.severity=tt.Ignore})),s.add(c.onDidAccept(()=>{if(!c.value&&o){c.validationMessage=p(7166,null),c.severity=tt.Error;return}l(c.value),c.hide()})),s.add(c.onDidHide(u=>{u.reason===2?d(new Bt):l(void 0)})),c.show()});return a?n.type==="number"||n.type==="integer"?Number(a):n.type==="boolean"?a==="true":a:void 0}finally{s.dispose()}}encodeSecretKey(t){return bU(kd.SECRET_INPUT,t)}decodeSecretKey(t){if(Me(t))return t.substring(t.indexOf(":")+1,t.length-1)}_clearModelCache(t){let e=new Map;for(let[n,o]of this._modelCache.entries())o.vendor===t&&(e.set(n,o),this._modelCache.delete(n));return e}async _resolveConfiguration(t,e){if(!e)return{};let n={};for(let o in t){if(o==="vendor"||o==="name"||o==="range")continue;let i=t[o];if(e.properties?.[o]?.secret){let s=this.decodeSecretKey(i);i=s?await this._secretStorageService.get(s):void 0}n[o]=i}return n}async _resolveLanguageModelProviderGroup(t,e,n,o){if(!o)return{name:t,vendor:e};let i={};for(let s in n){let a=n[s];if(o.properties?.[s]?.secret&&Me(a)){let l=`${kd.SECRET_KEY_PREFIX}${zr(ct()).toString(16)}`;await this._secretStorageService.set(l,a),a=this.encodeSecretKey(l)}i[s]=a}return{name:t,vendor:e,...i}}async _deleteSecretsInConfiguration(t,e){if(!e)return;let{vendor:n,name:o,range:i,...s}=t;for(let a in s){let l=t[a];if(e.properties?.[a]?.secret){let d=this.decodeSecretKey(l);d&&await this._secretStorageService.delete(d)}}}async migrateLanguageModelsProviderGroup(t){let{vendor:e,name:n,...o}=t;if(!this._vendors.get(e))throw new Error(`Vendor ${e} not found.`);await this._extensionService.activateByEvent(`onLanguageModelChatProvider:${e}`);let i=this._providers.get(e);if(!i)throw new Error(`Chat model provider for vendor ${e} is not registered.`);let s=await i.provideLanguageModelChatInfo({group:n,silent:!1,configuration:o},De.None);for(let a of s){let l=`${e}/${a.metadata.id}`;this._modelPickerUserPreferences[l]===!0&&(this._modelPickerUserPreferences[a.identifier]=!0),delete this._modelPickerUserPreferences[l]}this._saveModelPickerPreferences(),await this.addLanguageModelsProviderGroup(n,e,o)}_readRecentlyUsedModels(){return this._storageService.getObject(CH,0,[])}_saveRecentlyUsedModels(){this._storageService.store(CH,this._recentlyUsedModelIds,0,0)}getRecentlyUsedModelIds(){return this._recentlyUsedModelIds.filter(t=>this._modelCache.has(t)&&t!=="copilot/auto").slice(0,4)}addToRecentlyUsedList(t){if(t==="copilot/auto")return;let e=this._recentlyUsedModelIds.indexOf(t);e!==-1&&this._recentlyUsedModelIds.splice(e,1),this._recentlyUsedModelIds.unshift(t),this._recentlyUsedModelIds.length>20&&(this._recentlyUsedModelIds.length=20),this._saveRecentlyUsedModels()}clearRecentlyUsedList(){this._recentlyUsedModelIds=[],this._saveRecentlyUsedModels()}getModelsControlManifest(){return this._modelsControlManifest}_setModelsControlManifest(t){this._modelsControlRawResponse=t,this._refreshModelsControlManifest()}_refreshModelsControlManifest(){let t=this._modelsControlRawResponse,e={},n={};if(t?.free){let o=Array.isArray(t.free)?t.free:Object.values(t.free);for(let i of o)!i||!mt(i)||(e[i.id]={label:i.label,featured:i.featured,exists:this._modelExistsInCache(i.id)})}if(t?.paid){let o=Array.isArray(t.paid)?t.paid:Object.values(t.paid);for(let i of o)!i||!mt(i)||(n[i.id]={label:i.label,featured:i.featured,minVSCodeVersion:i.minVSCodeVersion,exists:this._modelExistsInCache(i.id)})}this._modelsControlManifest={free:e,paid:n},this._onDidChangeModelsControlManifest.fire(this._modelsControlManifest)}_modelExistsInCache(t){for(let e of this._modelCache.values())if(e.id===t)return!0;return!1}_initChatControlData(){if(this._chatControlUrl=this._productService.chatParticipantRegistry,!this._chatControlUrl)return;let t=this._storageService.get(Ow,-1);try{this._restrictedChatParticipants.set(JSON.parse(t??"{}"),void 0)}catch{this._storageService.remove(Ow,-1)}let e=this._storageService.get(Lw,-1);try{let n=JSON.parse(e??"{}");mt(n)&&this._setModelsControlManifest(n)}catch{this._storageService.remove(Lw,-1)}this._refreshChatControlData()}_refreshChatControlData(){this._chatControlDisposed||this._fetchChatControlData().catch(t=>this._logService.warn("Failed to fetch chat control data",t)).then(()=>Qn(300*1e3)).then(()=>this._refreshChatControlData())}async _fetchChatControlData(){this._logService.trace("[LM] Fetching chat control data from",this._chatControlUrl);let t;try{t=await this._requestService.request({type:"GET",url:this._chatControlUrl},De.None)}catch(o){this._logService.warn("[LM] Failed to request chat control data",Zl(o));return}if(t.res.statusCode!==200){this._logService.warn(`[LM] Chat control data request failed with status ${t.res.statusCode}`);return}let e;try{e=await G2(t)}catch(o){this._logService.warn("[LM] Failed to parse chat control response",Zl(o));return}if(this._logService.trace("[LM] Received chat control response",e?Object.keys(e):"null"),!e||e.version!==1){this._logService.warn("[LM] Unexpected chat control response version",e?.version);return}let n=e.restrictedChatParticipants;this._restrictedChatParticipants.set(n,void 0),this._storageService.store(Ow,JSON.stringify(n),-1,1),e.models&&(this._logService.trace("[LM] Updating models control manifest",{freeCount:Object.keys(e.models.free??{}).length,paidCount:Object.keys(e.models.paid??{}).length}),this._setModelsControlManifest(e.models),this._storageService.store(Lw,JSON.stringify(e.models),-1,1))}dispose(){this._chatControlDisposed=!0,this._store.dispose(),this._providers.clear()}};kd=L([P(0,rH),P(1,be),P(2,Ps),P(3,Ir),P(4,SH),P(5,z2),P(6,Q2),P(7,Su),P(8,pI)],kd);var Pve=new w("debugType",void 0,{type:"string",description:p(8669,null)}),Dve=new w("debugConfigurationType",void 0,{type:"string",description:p(8660,null)}),wve=new w("debugState","inactive",{type:"string",description:p(8668,null)}),T$="debugUx",Rve=new w(T$,"default",{type:"string",description:p(8670,null)}),kve=new w("hasDebugged",!1,{type:"boolean",description:p(8678,null)}),Ave=new w("inDebugMode",!1,{type:"boolean",description:p(8680,null)}),Ove=new w("inDebugRepl",!1,{type:"boolean",description:p(8681,null)}),Lve=new w("breakpointWidgetVisible",!1,{type:"boolean",description:p(8650,null)}),Mve=new w("inBreakpointWidget",!1,{type:"boolean",description:p(8679,null)}),Nve=new w("breakpointsFocused",!0,{type:"boolean",description:p(8648,null)}),Uve=new w("watchExpressionsFocused",!0,{type:"boolean",description:p(8706,null)}),Fve=new w("watchExpressionsExist",!1,{type:"boolean",description:p(8705,null)}),Hve=new w("variablesFocused",!0,{type:"boolean",description:p(8702,null)}),Bve=new w("expressionSelected",!1,{type:"boolean",description:p(8674,null)}),Vve=new w("breakpointInputFocused",!1,{type:"boolean",description:p(8644,null)}),Wve=new w("callStackItemType",void 0,{type:"string",description:p(8656,null)}),$ve=new w("callStackSessionIsAttach",!1,{type:"boolean",description:p(8658,null)}),Gve=new w("callStackItemStopped",!1,{type:"boolean",description:p(8655,null)}),zve=new w("callStackSessionHasOneThread",!1,{type:"boolean",description:p(8657,null)}),qve=new w("callStackFocused",!0,{type:"boolean",description:p(8654,null)}),Kve=new w("watchItemType",void 0,{type:"string",description:p(8707,null)}),Jve=new w("canViewMemory",void 0,{type:"boolean",description:p(8659,null)}),jve=new w("breakpointItemType",void 0,{type:"string",description:p(8646,null)}),Qve=new w("breakpointItemBytes",void 0,{type:"boolean",description:p(8645,null)}),Xve=new w("breakpointHasModes",!1,{type:"boolean",description:p(8643,null)}),Yve=new w("breakpointSupportsCondition",!1,{type:"boolean",description:p(8649,null)}),Zve=new w("loadedScriptsSupported",!1,{type:"boolean",description:p(8686,null)}),ebe=new w("loadedScriptsItemType",void 0,{type:"string",description:p(8685,null)}),tbe=new w("focusedSessionIsAttach",!1,{type:"boolean",description:p(8675,null)}),nbe=new w("focusedSessionIsNoDebug",!1,{type:"boolean",description:p(8676,null)}),obe=new w("stepBackSupported",!1,{type:"boolean",description:p(8691,null)}),rbe=new w("restartFrameSupported",!1,{type:"boolean",description:p(8689,null)}),ibe=new w("stackFrameSupportsRestart",!1,{type:"boolean",description:p(8690,null)}),sbe=new w("jumpToCursorSupported",!1,{type:"boolean",description:p(8683,null)}),abe=new w("stepIntoTargetsSupported",!1,{type:"boolean",description:p(8692,null)}),lbe=new w("breakpointsExist",!1,{type:"boolean",description:p(8647,null)}),dbe=new w("debuggersAvailable",!1,{type:"boolean",description:p(8663,null)}),cbe=new w("debugExtensionAvailable",!0,{type:"boolean",description:p(8661,null)}),ube=new w("debugProtocolVariableMenuContext",void 0,{type:"string",description:p(8664,null)}),pbe=new w("debugSetVariableSupported",!1,{type:"boolean",description:p(8667,null)}),mbe=new w("debugSetDataBreakpointAddressSupported",!1,{type:"boolean",description:p(8665,null)}),fbe=new w("debugSetExpressionSupported",!1,{type:"boolean",description:p(8666,null)}),gbe=new w("breakWhenValueChangesSupported",!1,{type:"boolean",description:p(8651,null)}),hbe=new w("breakWhenValueIsAccessedSupported",!1,{type:"boolean",description:p(8652,null)}),vbe=new w("breakWhenValueIsReadSupported",!1,{type:"boolean",description:p(8653,null)}),bbe=new w("terminateDebuggeeSupported",!1,{type:"boolean",description:p(8694,null)}),Ibe=new w("suspendDebuggeeSupported",!1,{type:"boolean",description:p(8693,null)}),ybe=new w("terminateThreadsSupported",!1,{type:"boolean",description:p(8695,null)}),Ebe=new w("variableEvaluateNamePresent",!1,{type:"boolean",description:p(8696,null)}),Sbe=new w("variableIsReadonly",!1,{type:"boolean",description:p(8699,null)}),xbe=new w("variableValue",!1,{type:"string",description:p(8704,null)}),Cbe=new w("variableType",!1,{type:"string",description:p(8703,null)}),Tbe=new w("variableInterfaces",!1,{type:"array",description:p(8698,null)}),_be=new w("variableName",!1,{type:"string",description:p(8701,null)}),Pbe=new w("variableLanguage",!1,{type:"string",description:p(8700,null)}),Dbe=new w("variableExtensionId",!1,{type:"string",description:p(8697,null)}),wbe=new w("exceptionWidgetVisible",!1,{type:"boolean",description:p(8673,null)}),Rbe=new w("multiSessionRepl",!1,{type:"boolean",description:p(8688,null)}),kbe=new w("multiSessionDebug",!1,{type:"boolean",description:p(8687,null)}),Abe=new w("disassembleRequestSupported",!1,{type:"boolean",description:p(8671,null)}),Obe=new w("disassemblyViewFocus",!1,{type:"boolean",description:p(8672,null)}),Lbe=new w("languageSupportsDisassembleRequest",!1,{type:"boolean",description:p(8684,null)}),Mbe=new w("focusedStackFrameHasInstructionReference",!1,{type:"boolean",description:p(8677,null)});var Nbe={enum:["neverOpen","openOnSessionStart","openOnFirstSessionStart"],default:"openOnFirstSessionStart",description:p(8682,null)};var Mw=(e=>(e[e.Initial=1]="Initial",e[e.Dynamic=2]="Dynamic",e))(Mw||{});var Ube=N("debugService");var _$;(e=>(e.deserialize=n=>n,e.serialize=n=>n))(_$||={});var P$;(e=>(e.deserialize=n=>({id:n.id,name:n.name,iconPath:n.iconPath&&{light:E.revive(n.iconPath.light),dark:E.revive(n.iconPath.dark)},iconClass:n.iconClass,visualization:n.visualization}),e.serialize=n=>n))(P$||={});var Bbe=N("IMcpGalleryManifestService");var Nw;(l=>(l.LATEST_PROTOCOL_VERSION="2025-11-25",l.JSONRPC_VERSION="2.0",l.PARSE_ERROR=-32700,l.INVALID_REQUEST=-32600,l.METHOD_NOT_FOUND=-32601,l.INVALID_PARAMS=-32602,l.INTERNAL_ERROR=-32603,l.URL_ELICITATION_REQUIRED=-32042))(Nw||={});var D$;(t=>{function r(e,n){return e.id===n.id&&e.remoteAuthority===n.remoteAuthority&&e.label===n.label&&e.trustBehavior===n.trustBehavior}t.equals=r})(D$||={});var w$;(n=>{function r(o){return o}n.toSerialized=r;function t(o){return{id:o.id,label:o.label,cacheNonce:o.cacheNonce,staticMetadata:o.staticMetadata,launch:Dg.fromSerialized(o.launch),sandboxEnabled:o.sandboxEnabled,sandbox:o.sandboxEnabled?o.sandbox:void 0,variableReplacement:o.variableReplacement?PH.fromSerialized(o.variableReplacement):void 0}}n.fromSerialized=t;function e(o,i){return o.id===i.id&&o.label===i.label&&o.cacheNonce===i.cacheNonce&&Zt(o.roots,i.roots,(s,a)=>s.toString()===a.toString())&&Xt(o.launch,i.launch)&&Xt(o.presentation,i.presentation)&&Xt(o.variableReplacement,i.variableReplacement)&&Xt(o.devMode,i.devMode)&&o.sandboxEnabled===i.sandboxEnabled&&Xt(o.sandbox,i.sandbox)}n.equals=e})(w$||={});var PH;(e=>{function r(n){return n}e.toSerialized=r;function t(n){return{section:n.section,folder:n.folder?{...n.folder,uri:E.revive(n.folder.uri)}:void 0,target:n.target}}e.fromSerialized=t})(PH||={});var R$;(t=>t.Empty={working:!1,starting:[],serversRequiringInteraction:[]})(R$||={});var lIe=N("IMcpService");var k$;(t=>{let r;(s=>(s[s.Trusted=0]="Trusted",s[s.TrustedOnNonce=1]="TrustedOnNonce",s[s.Untrusted=2]="Untrusted",s[s.Unknown=3]="Unknown"))(r=t.Kind||={})})(k$||={});var Dg;(n=>{function r(o){return o}n.toSerialized=r;function t(o){switch(o.type){case 2:return{type:o.type,uri:E.revive(o.uri),headers:o.headers,authentication:o.authentication};case 1:return{type:o.type,cwd:o.cwd,command:o.command,args:o.args,env:o.env,envFile:o.envFile}}}n.fromSerialized=t;async function e(o){let i=await crypto.subtle.digest("SHA-256",new TextEncoder().encode(JSON.stringify(o)));return Sf(ce.wrap(new Uint8Array(i)))}n.hash=e})(Dg||={});var A$;(i=>{let r;(c=>(c[c.Stopped=0]="Stopped",c[c.Starting=1]="Starting",c[c.Running=2]="Running",c[c.Error=3]="Error"))(r=i.Kind||={}),i.toString=s=>{switch(s.state){case 0:return p(10989,null);case 1:return p(10988,null);case 2:return p(10987,null);case 3:return p(10986,null,s.message);default:$c(s)}},i.toKindString=s=>{switch(s){case 0:return"stopped";case 1:return"starting";case 2:return"running";case 3:return"error";default:$c(s)}},i.canBeStarted=s=>s===3||s===0,i.isRunning=s=>!(0,i.canBeStarted)(s.state)})(A$||={});var _H=class r extends Error{constructor(e){super(`${r.prefix}${e}`);this.reason=e}static{this.prefix="User interaction required: "}static is(e){return e.message.startsWith(this.prefix)}};var O$=N("IMcpWorkbenchService"),PI=class extends K{constructor(e,n){super();this.containers=e;this._register(n.onChange(this.update,this))}set mcpServer(e){this.containers.forEach(n=>n.mcpServer=e)}update(e){for(let n of this.containers)e&&n.mcpServer?e.id===n.mcpServer.id&&(n.mcpServer=e):n.update()}};PI=L([P(1,O$)],PI);var dIe=new w("mcpServersGalleryStatus","unavailable"),cIe=new w("hasInstalledMcpServers",!0);var L$;(o=>{o.scheme="mcp-resource";let t="dylo78gyp";function e(i,s){return typeof s=="string"&&(s=E.parse(s)),s.with({scheme:o.scheme,authority:Sf(ce.fromString(i.id)),path:["",s.scheme,s.authority||t].join("/")+s.path})}o.fromServer=e;function n(i){if(typeof i=="string"&&(i=E.parse(i)),i.scheme!==o.scheme)throw new Error(`Invalid MCP resource URI: ${i.toString()}`);let s=i.path.split("/");if(s.length<3)throw new Error(`Invalid MCP resource URI: ${i.toString()}`);let[,a,l,...d]=s,c=new URL(`${a}://${l.toLowerCase()===t?"":l}`);return c.pathname=d.length?"/"+d.join("/"):"",c.search=i.query,c.hash=i.fragment,{definitionId:N0(i.authority).toString(),resourceURL:c}}o.toServer=n})(L$||={});var uIe=N("IMcpServerSampling");var pIe=N("IMcpElicitationService");var ws="**",RI="/",DI="[/\\\\]",wI="[^/\\\\]",M$=/\//g;function DH(r,t){switch(r){case 0:return"";case 1:return`${wI}*?`;default:return`(?:${DI}|${wI}+${DI}${t?`|${DI}${wI}+`:""})*?`}}function ku(r,t){if(!r)return[];let e=[],n=!1,o=!1,i="";for(let s of r){switch(s){case t:if(!n&&!o){e.push(i),i="";continue}break;case"{":n=!0;break;case"}":n=!1;break;case"[":o=!0;break;case"]":o=!1;break}i+=s}return i&&e.push(i),e}function OH(r){if(!r)return"";let t="",e=ku(r,RI);if(e.every(n=>n===ws))t=".*";else{let n=!1;e.forEach((o,i)=>{if(o===ws){if(n)return;t+=DH(2,i===e.length-1)}else{let s=!1,a="",l=!1,d="";for(let c of o){if(c!=="}"&&s){a+=c;continue}if(l&&(c!=="]"||!d)){let u;c==="-"?u=c:(c==="^"||c==="!")&&!d?u="^":c===RI?u="":u=hr(c),d+=u;continue}switch(c){case"{":s=!0;continue;case"[":l=!0;continue;case"}":{let f=`(?:${ku(a,",").map(g=>OH(g)).join("|")})`;t+=f,s=!1,a="";break}case"]":{t+="["+d+"]",l=!1,d="";break}case"?":t+=wI;continue;case"*":t+=DH(1);continue;default:t+=hr(c)}}i<e.length-1&&(e[i+1]!==ws||i+2<e.length)&&(t+=DI)}n=o===ws})}return t}var N$=/^\*\*\/\*\.[\w\.-]+$/,U$=/^\*\*\/([\w\.-]+)\/?$/,F$=/^{\*\*\/\*?[\w\.-]+\/?(,\*\*\/\*?[\w\.-]+\/?)*}$/,H$=/^{\*\*\/\*?[\w\.-]+(\/(\*\*)?)?(,\*\*\/\*?[\w\.-]+(\/(\*\*)?)?)*}$/,B$=/^\*\*((\/[\w\.-]+)+)\/?$/,V$=/^([\w\.-]+(\/[\w\.-]+)*)\/?$/,wH=new pr(1e4),RH=function(){return!1},Ni=function(){return null};function Fw(r,t){if(!r)return Ni;let e;typeof r!="string"?e=r.pattern:e=r,e=e.trim();let n=t.ignoreCase??!1,o={...t,equals:n?Jn:(l,d)=>l===d,endsWith:n?SU:(l,d)=>l.endsWith(d),isEqualOrParent:(l,d)=>ud(l,d,!zn||n)},i=`${n?e.toLowerCase():e}_${!!t.trimForExclusions}_${n}`,s=wH.get(i);if(s)return kH(s,r,o);let a;return N$.test(e)?s=W$(e.substring(4),e,o):(a=U$.exec(Uw(e,o)))?s=$$(a[1],e,o):(t.trimForExclusions?H$:F$).test(e)?s=G$(e,o):(a=B$.exec(Uw(e,o)))?s=AH(a[1].substring(1),e,!0,o):(a=V$.exec(Uw(e,o)))?s=AH(a[1],e,!1,o):s=z$(e,o),wH.set(i,s),kH(s,r,o)}function kH(r,t,e){if(typeof t=="string")return r;let n=function(o,i){return e.isEqualOrParent(o,t.base)?r(U_(o.substring(t.base.length),Bn),i):null};return n.allBasenames=r.allBasenames,n.allPaths=r.allPaths,n.basenames=r.basenames,n.patterns=r.patterns,n}function Uw(r,t){return t.trimForExclusions&&r.endsWith("/**")?r.substring(0,r.length-2):r}function W$(r,t,e){return function(n,o){return typeof n=="string"&&e.endsWith(n,r)?t:null}}function $$(r,t,e){let n=`/${r}`,o=`\\${r}`,i=function(a,l){return typeof a!="string"?null:l?e.equals(l,r)?t:null:e.equals(a,r)||e.endsWith(a,n)||e.endsWith(a,o)?t:null},s=[r];return i.basenames=s,i.patterns=[t],i.allBasenames=s,i}function G$(r,t){let e=MH(r.slice(1,-1).split(",").map(a=>Fw(a,t)).filter(a=>a!==Ni),r),n=e.length;if(!n)return Ni;if(n===1)return e[0];let o=function(a,l){for(let d=0,c=e.length;d<c;d++)if(e[d](a,l))return r;return null},i=e.find(a=>!!a.allBasenames);i&&(o.allBasenames=i.allBasenames);let s=e.reduce((a,l)=>l.allPaths?a.concat(l.allPaths):a,[]);return s.length&&(o.allPaths=s),o}function AH(r,t,e,n){let o=Bn===qe.sep,i=o?r:r.replace(M$,Bn),s=Bn+i,a=qe.sep+r,l;return e?l=function(d,c){return typeof d=="string"&&(n.equals(d,i)||n.endsWith(d,s)||!o&&(n.equals(d,r)||n.endsWith(d,a)))?t:null}:l=function(d,c){return typeof d=="string"&&(n.equals(d,i)||!o&&n.equals(d,r))?t:null},l.allPaths=[(e?"*/":"./")+r],l}function z$(r,t){try{let e=new RegExp(`^${OH(r)}$`,t.ignoreCase?"i":void 0);return function(n){return e.lastIndex=0,typeof n=="string"&&e.test(n)?r:null}}catch{return Ni}}function Zr(r,t,e){return!r||typeof t!="string"?!1:ei(r,e)(t)}function ei(r,t={}){if(!r)return RH;if(typeof r=="string"||LH(r)){let e=Fw(r,t);if(e===Ni)return RH;let n=function(o,i){return!!e(o,i)};return e.allBasenames&&(n.allBasenames=e.allBasenames),e.allPaths&&(n.allPaths=e.allPaths),n}return q$(r,t)}function LH(r){let t=r;return t?typeof t.base=="string"&&typeof t.pattern=="string":!1}function q$(r,t){let e=MH(Object.getOwnPropertyNames(r).map(a=>K$(a,r[a],t)).filter(a=>a!==Ni)),n=e.length;if(!n)return Ni;if(!e.some(a=>!!a.requiresSiblings)){if(n===1)return e[0];let a=function(c,u){let f;for(let g=0,I=e.length;g<I;g++){let h=e[g](c,u);if(typeof h=="string")return h;br(h)&&(f||(f=[]),f.push(h))}return f?(async()=>{for(let g of f){let I=await g;if(typeof I=="string")return I}return null})():null},l=e.find(c=>!!c.allBasenames);l&&(a.allBasenames=l.allBasenames);let d=e.reduce((c,u)=>u.allPaths?c.concat(u.allPaths):c,[]);return d.length&&(a.allPaths=d),a}let o=function(a,l,d){let c,u;for(let f=0,g=e.length;f<g;f++){let I=e[f];I.requiresSiblings&&d&&(l||(l=Cn(a)),c||(c=l.substring(0,l.length-hs(a).length)));let h=I(a,l,c,d);if(typeof h=="string")return h;br(h)&&(u||(u=[]),u.push(h))}return u?(async()=>{for(let f of u){let g=await f;if(typeof g=="string")return g}return null})():null},i=e.find(a=>!!a.allBasenames);i&&(o.allBasenames=i.allBasenames);let s=e.reduce((a,l)=>l.allPaths?a.concat(l.allPaths):a,[]);return s.length&&(o.allPaths=s),o}function K$(r,t,e){if(t===!1)return Ni;let n=Fw(r,e);if(n===Ni)return Ni;if(typeof t=="boolean")return n;if(t){let o=t.when;if(typeof o=="string"){let i=(s,a,l,d)=>{if(!d||!n(s,a))return null;let c=o.replace("$(basename)",()=>l),u=d(c);return br(u)?u.then(f=>f?r:null):u?r:null};return i.requiresSiblings=!0,i}}return n}function MH(r,t){let e=r.filter(a=>!!a.basenames);if(e.length<2)return r;let n=e.reduce((a,l)=>{let d=l.basenames;return d?a.concat(d):a},[]),o;if(t){o=[];for(let a=0,l=n.length;a<l;a++)o.push(t)}else o=e.reduce((a,l)=>{let d=l.patterns;return d?a.concat(d):a},[]);let i=function(a,l){if(typeof a!="string")return null;if(!l){let c;for(c=a.length;c>0;c--){let u=a.charCodeAt(c-1);if(u===47||u===92)break}l=a.substring(c)}let d=n.indexOf(l);return d!==-1?o[d]:null};i.basenames=n,i.patterns=o,i.allBasenames=n;let s=r.filter(a=>!a.basenames);return s.push(i),s}var J$=N("notebookDocumentService"),Hw=["W","X","Y","Z","a","b","c","d","e","f"],j$=new RegExp(`^[${Hw.join("")}]+`),NH=7;function kI(r){if(r.scheme!==X.vscodeNotebookCell)return;let t=r.fragment.indexOf("s");if(t<0)return;let e=parseInt(r.fragment.substring(0,t).replace(j$,""),NH),n=Qo(r.fragment.substring(t+1)).toString();if(!isNaN(e))return{handle:e,notebook:r.with({scheme:n,fragment:null})}}function UH(r,t){let e=t.toString(NH),o=`${e.length<Hw.length?Hw[e.length-1]:"z"}${e}s${mr(ce.fromString(r.scheme),!0,!0)}`;return r.with({scheme:X.vscodeNotebookCell,fragment:o})}function FH(r){if(r.scheme!==X.vscodeNotebookMetadata)return;let t=Qo(r.fragment).toString();return r.with({scheme:t,fragment:null})}function HH(r){let t=`${mr(ce.fromString(r.scheme),!0,!0)}`;return r.with({scheme:X.vscodeNotebookMetadata,fragment:t})}function Vw(r){if(r.scheme!==X.vscodeNotebookCellOutput)return;let t=new URLSearchParams(r.query),e=t.get("openIn");if(!e)return;let n=t.get("outputId")??void 0,o=kI(r.with({scheme:X.vscodeNotebookCell,query:null})),i=t.get("outputIndex")?parseInt(t.get("outputIndex")||"",10):void 0,s=o?o.notebook:r.with({scheme:t.get("notebookScheme")||X.file,fragment:null,query:null}),a=t.get("cellIndex")?parseInt(t.get("cellIndex")||"",10):void 0;return{notebook:s,openIn:e,outputId:n,outputIndex:i,cellHandle:o?.handle,cellFragment:r.fragment,cellIndex:a}}var Bw=class{constructor(){this._documents=new et}getNotebook(t){if(t.scheme===X.vscodeNotebookCell){let e=kI(t);if(e){let n=this._documents.get(e.notebook);if(n)return n}}if(t.scheme===X.vscodeNotebookCellOutput){let e=Vw(t);if(e){let n=this._documents.get(e.notebook);if(n)return n}}return this._documents.get(t)}addNotebookDocument(t){this._documents.set(t.uri,t)}removeNotebookDocument(t){this._documents.delete(t.uri)}};rt(J$,Bw,1);var UIe=["application/json","application/javascript","text/html","image/svg+xml",Io.latex,Io.markdown,"image/png","image/jpeg",Io.text],FIe=[Io.latex,Io.markdown,"application/json","text/html","image/svg+xml","image/png","image/jpeg",Io.text];var Q$;(n=>{n.scheme=X.vscodeNotebookMetadata;function t(o){return HH(o)}n.generate=t;function e(o){return FH(o)}n.parse=e})(Q$||={});var $w;(d=>{d.scheme=X.vscodeNotebookCell;function t(c,u){return UH(c,u)}d.generate=t;function e(c){return kI(c)}d.parse=e;function n(c,u){return c.with({scheme:X.vscodeNotebookCellOutput,query:new URLSearchParams({openIn:"editor",outputId:u??"",notebookScheme:c.scheme!==X.file?c.scheme:""}).toString()})}d.generateCellOutputUriWithId=n;function o(c,u,f){return c.with({scheme:X.vscodeNotebookCellOutput,fragment:u.fragment,query:new URLSearchParams({openIn:"notebook",outputIndex:String(f)}).toString()})}d.generateCellOutputUriWithIndex=o;function i(c,u,f,g,I){return c.with({scheme:X.vscodeNotebookCellOutput,query:new URLSearchParams({openIn:"notebookOutputEditor",notebook:c.toString(),cellIndex:String(f),outputId:g,outputIndex:String(I)}).toString()})}d.generateOutputEditorUri=i;function s(c){return Vw(c)}d.parseCellOutputUri=s;function a(c,u,f){return d.generate(c,u).with({scheme:f})}d.generateCellPropertyUri=a;function l(c,u){if(c.scheme===u)return d.parse(c.with({scheme:d.scheme}))}d.parseCellPropertyUri=l})($w||={});var HIe=new w("notebookEditorCursorAtBoundary","none"),BIe=new w("notebookEditorCursorAtLineBoundary","none");var BH=class r{static{this._prefix="notebook/"}static create(t,e){return`${r._prefix}${t}/${e??t}`}static parse(t){if(t.startsWith(r._prefix)){let e=t.substring(r._prefix.length).split("/");if(e.length===2)return{notebookType:e[0],viewType:e[1]}}}},X$=new TextDecoder;function VH(r){let t=[],e=!1;for(let s of r)(t.length===0||e)&&(t.push(s),e=!0);let n=Z$(t),o=ce.concat(t.map(s=>ce.wrap(s))),i=rG(o);return n=n||i.byteLength!==o.byteLength,{data:i,didCompression:n}}var AI="\x1B[A",Ww=AI.split("").map(r=>r.charCodeAt(0)),Y$=10;function Z$(r){let t=!1;return r.forEach((e,n)=>{if(n===0||e.length<AI.length)return;let o=r[n-1],i=e.subarray(0,AI.length);if(i[0]===Ww[0]&&i[1]===Ww[1]&&i[2]===Ww[2]){let s=o.lastIndexOf(Y$);if(s===-1)return;t=!0,r[n-1]=o.subarray(0,s),r[n]=e.subarray(AI.length)}}),t}function eG(r){let t=r;do r=t,t=r.replace(/[^\n]\x08/gm,"");while(t.length<r.length);return r}function tG(r){for(r=r.replace(/\r+\n/gm,`
`);r.search(/\r[^$]/g)>-1;){let t=r.match(/^(.*)\r+/m)[1],e=r.match(/\r+(.*)$/m)[1];e=e+t.slice(e.length,t.length),r=r.replace(/\r+.*$/m,"\r").replace(/^.*\r/m,e)}return r}var nG=8,oG=13;function rG(r){return!r.buffer.includes(nG)&&!r.buffer.includes(oG)?r:ce.fromString(tG(eG(X$.decode(r.buffer))))}var WIe=N("scm");var $Ie=N("scmView");var nt=class r{constructor(t,e=t.length){this.path=t;this.viewEnd=e;if(t.length===0||e<1)throw new Error("cannot create test with empty path")}static fromExtHostTestItem(t,e,n=t.parent){if(t._isRoot)return new r([e]);let o=[t.id];for(let i=n;i&&i.id!==e;i=i.parent)o.push(i.id);return o.push(e),new r(o.reverse())}static isRoot(t){return!t.includes("\0")}static root(t){let e=t.indexOf("\0");return e===-1?t:t.slice(0,e)}static fromString(t){return new r(t.split("\0"))}static join(t,e){return new r([...t.path,e])}static split(t){return t.split("\0")}static joinToString(t,e){return t.toString()+"\0"+e}static parentId(t){let e=t.lastIndexOf("\0");return e===-1?void 0:t.slice(0,e)}static localId(t){let e=t.lastIndexOf("\0");return e===-1?t:t.slice(e+1)}static isChild(t,e){return e[t.length]==="\0"&&e.startsWith(t)}static compare(t,e){return t===e?0:r.isChild(t,e)?2:r.isChild(e,t)?3:1}static getLengthOfCommonPrefix(t,e){if(t===0)return 0;let n=0;for(;n<t-1;){for(let o=1;o<t;o++){let i=e(o-1),s=e(o);if(i.path[n]!==s.path[n])return n}n++}return n}get rootId(){return new r(this.path,1)}get parentId(){return this.viewEnd>1?new r(this.path,this.viewEnd-1):void 0}get localId(){return this.path[this.viewEnd-1]}get controllerId(){return this.path[0]}get isRoot(){return this.viewEnd===1}*idsFromRoot(){for(let t=1;t<=this.viewEnd;t++)yield new r(this.path,t)}*idsToRoot(){for(let t=this.viewEnd;t>0;t--)yield new r(this.path,t)}compare(t){if(typeof t=="string")return r.compare(this.toString(),t);for(let e=0;e<t.viewEnd&&e<this.viewEnd;e++)if(t.path[e]!==this.path[e])return 1;return t.viewEnd>this.viewEnd?2:t.viewEnd<this.viewEnd?3:0}toJSON(){return this.toString()}toString(){if(!this.stringifed){this.stringifed=this.path[0];for(let t=1;t<this.viewEnd;t++)this.stringifed+="\0",this.stringifed+=this.path[t]}return this.stringifed}};var eye={2:p(14956,null),4:p(14955,null),8:p(14954,null)};var $H=r=>"runId"in r,Rg;(e=>(e.serialize=n=>({range:n.range.toJSON(),uri:n.uri.toJSON()}),e.deserialize=(n,o)=>({range:Ke.lift(o.range),uri:n.asCanonicalUri(E.revive(o.uri))})))(Rg||={});var Gw;(e=>(e.serialize=n=>({label:n.label,uri:n.uri?.toJSON(),position:n.position?.toJSON()}),e.deserialize=(n,o)=>({label:o.label,uri:o.uri?n.asCanonicalUri(E.revive(o.uri)):void 0,position:o.position?In.lift(o.position):void 0})))(Gw||={});var zw;(e=>(e.serialize=n=>({message:n.message,type:0,expected:n.expected,actual:n.actual,contextValue:n.contextValue,location:n.location&&Rg.serialize(n.location),stackTrace:n.stackTrace?.map(Gw.serialize)}),e.deserialize=(n,o)=>({message:o.message,type:0,expected:o.expected,actual:o.actual,contextValue:o.contextValue,location:o.location&&Rg.deserialize(n,o.location),stackTrace:o.stackTrace&&o.stackTrace.map(i=>Gw.deserialize(n,i))})))(zw||={});var qw;(e=>(e.serialize=n=>({message:n.message,type:1,offset:n.offset,length:n.length,location:n.location&&Rg.serialize(n.location)}),e.deserialize=(n,o)=>({message:o.message,type:1,offset:o.offset,length:o.length,location:o.location&&Rg.deserialize(n,o.location)})))(qw||={});var Kw;(n=>(n.serialize=o=>o.type===0?zw.serialize(o):qw.serialize(o),n.deserialize=(o,i)=>i.type===0?zw.deserialize(o,i):qw.deserialize(o,i),n.isDiffable=o=>o.type===0&&o.actual!==void 0&&o.expected!==void 0))(Kw||={});var OI;(n=>(n.serializeWithoutMessages=o=>({state:o.state,duration:o.duration,messages:[]}),n.serialize=o=>({state:o.state,duration:o.duration,messages:o.messages.map(Kw.serialize)}),n.deserialize=(o,i)=>({state:i.state,duration:i.duration,messages:i.messages.map(s=>Kw.deserialize(o,s))})))(OI||={});var GH="\0",Au=(r,t)=>r+GH+t,NI=r=>{let t=r.indexOf(GH);return{ctrlId:r.slice(0,t),tagId:r.slice(t+1)}},Jw;(e=>(e.serialize=n=>({extId:n.extId,label:n.label,tags:n.tags,busy:n.busy,children:void 0,uri:n.uri?.toJSON(),range:n.range?.toJSON()||null,description:n.description,error:n.error,sortText:n.sortText}),e.deserialize=(n,o)=>({extId:o.extId,label:o.label,tags:o.tags,busy:o.busy,children:void 0,uri:o.uri?n.asCanonicalUri(E.revive(o.uri)):void 0,range:o.range?Ke.lift(o.range):null,description:o.description,error:o.error,sortText:o.sortText})))(Jw||={});var Ad;(e=>(e.serialize=n=>({expand:n.expand,item:Jw.serialize(n.item)}),e.deserialize=(n,o)=>({controllerId:nt.root(o.item.extId),expand:o.expand,item:Jw.deserialize(n,o.item)})))(Ad||={});var LI;(e=>(e.serialize=n=>{let o;return n.item&&(o={},n.item.label!==void 0&&(o.label=n.item.label),n.item.tags!==void 0&&(o.tags=n.item.tags),n.item.busy!==void 0&&(o.busy=n.item.busy),n.item.uri!==void 0&&(o.uri=n.item.uri?.toJSON()),n.item.range!==void 0&&(o.range=n.item.range?.toJSON()),n.item.description!==void 0&&(o.description=n.item.description),n.item.error!==void 0&&(o.error=n.item.error),n.item.sortText!==void 0&&(o.sortText=n.item.sortText)),{extId:n.extId,expand:n.expand,item:o}},e.deserialize=n=>{let o;return n.item&&(o={},n.item.label!==void 0&&(o.label=n.item.label),n.item.tags!==void 0&&(o.tags=n.item.tags),n.item.busy!==void 0&&(o.busy=n.item.busy),n.item.range!==void 0&&(o.range=n.item.range?Ke.lift(n.item.range):null),n.item.description!==void 0&&(o.description=n.item.description),n.item.error!==void 0&&(o.error=n.item.error),n.item.sortText!==void 0&&(o.sortText=n.item.sortText)),{extId:n.extId,expand:n.expand,item:o}}))(LI||={});var UI=(r,t)=>{t.expand!==void 0&&(r.expand=t.expand),t.item!==void 0&&(r.item=r.item?Object.assign(r.item,t.item):t.item)},iG;(n=>(n.serializeWithoutMessages=o=>({...Ad.serialize(o),ownComputedState:o.ownComputedState,computedState:o.computedState,tasks:o.tasks.map(OI.serializeWithoutMessages)}),n.serialize=o=>({...Ad.serialize(o),ownComputedState:o.ownComputedState,computedState:o.computedState,tasks:o.tasks.map(OI.serialize)}),n.deserialize=(o,i)=>({...Ad.deserialize(o,i),ownComputedState:i.ownComputedState,computedState:i.computedState,tasks:i.tasks.map(s=>OI.deserialize(o,s)),retired:!0})))(iG||={});var zH;(e=>(e.empty=()=>({covered:0,total:0}),e.sum=(n,o)=>{n.covered+=o.covered,n.total+=o.total}))(zH||={});var sG;(n=>(n.serialize=o=>({id:o.id,statement:o.statement,branch:o.branch,declaration:o.declaration,testIds:o.testIds,uri:o.uri.toJSON()}),n.deserialize=(o,i)=>({id:i.id,statement:i.statement,branch:i.branch,declaration:i.declaration,testIds:i.testIds,uri:o.asCanonicalUri(E.revive(i.uri))}),n.empty=(o,i)=>({id:o,uri:i,statement:zH.empty()})))(sG||={});function Yw(r){return{...r,location:r.location?.toJSON()}}function Zw(r){return r.location=r.location?In.isIPosition(r.location)?In.lift(r.location):Ke.lift(r.location):void 0,r}var aG;(e=>(e.serialize=n=>n.type===0?Qw.serialize(n):Xw.serialize(n),e.deserialize=n=>n.type===0?Qw.deserialize(n):Xw.deserialize(n)))(aG||={});var jw;(e=>(e.serialize=Yw,e.deserialize=Zw))(jw||={});var Qw;(e=>(e.serialize=Yw,e.deserialize=Zw))(Qw||={});var Xw;(e=>(e.serialize=n=>({...Yw(n),branches:n.branches?.map(jw.serialize)}),e.deserialize=n=>({...Zw(n),branches:n.branches?.map(jw.deserialize)})))(Xw||={});var FI;(e=>(e.deserialize=(n,o)=>o.op===0?{op:o.op,item:Ad.deserialize(n,o.item)}:o.op===1?{op:o.op,item:LI.deserialize(o.item)}:o.op===2?{op:o.op,uri:n.asCanonicalUri(E.revive(o.uri)),docv:o.docv}:o,e.serialize=n=>n.op===0?{op:n.op,item:Ad.serialize(n.item)}:n.op===1?{op:n.op,item:LI.serialize(n.item)}:n))(FI||={});var MI=class{constructor(t){this.uriIdentity=t;this._tags=new Map;this.items=new Map;this.roots=new Set;this.busyControllerCount=0;this.pendingRootCount=0;this.tags=this._tags}apply(t){let e=this.createChangeCollector();for(let n of t)switch(n.op){case 0:this.add(Ad.deserialize(this.uriIdentity,n.item),e);break;case 1:this.update(LI.deserialize(n.item),e);break;case 3:this.remove(n.itemId,e);break;case 5:this.retireTest(n.itemId);break;case 4:this.updatePendingRoots(n.amount);break;case 6:this._tags.set(n.tag.id,n.tag);break;case 7:this._tags.delete(n.id);break}e.complete?.()}add(t,e){let n=nt.parentId(t.item.extId)?.toString(),o;if(!n)o=this.createItem(t),this.roots.add(o),this.items.set(t.item.extId,o);else if(this.items.has(n)){let i=this.items.get(n);i.children.add(t.item.extId),o=this.createItem(t,i),this.items.set(t.item.extId,o)}else{console.error(`Test with unknown parent ID: ${JSON.stringify(t)}`);return}return e.add?.(o),t.expand===2&&this.busyControllerCount++,o}update(t,e){let n=this.items.get(t.extId);if(n)return t.expand!==void 0&&(n.expand===2&&this.busyControllerCount--,t.expand===2&&this.busyControllerCount++),UI(n,t),e.update?.(n),n}remove(t,e){let n=this.items.get(t);if(!n)return;let o=nt.parentId(n.item.extId)?.toString();o?this.items.get(o).children.delete(n.item.extId):this.roots.delete(n);let i=[[t]];for(;i.length;)for(let s of i.pop()){let a=this.items.get(s);a&&(i.push(a.children),this.items.delete(s),e.remove?.(a,a!==n),a.expand===2&&this.busyControllerCount--)}}retireTest(t){}updatePendingRoots(t){this.pendingRootCount+=t}createChangeCollector(){return{}}};var oye=N("IAiSettingsSearchService");var kg=(r,t)=>r===t,lG={range:(r,t)=>r===t?!0:!r||!t?!1:r.equalsRange(t),busy:kg,label:kg,description:kg,error:kg,sortText:kg,tags:(r,t)=>!(r.length!==t.length||r.some(e=>!t.includes(e)))},dG=Object.entries(lG),cG=(r,t)=>{let e;for(let[n,o]of dG)o(r[n],t[n])||(e?e[n]=t[n]:e={[n]:t[n]});return e},HI=class extends K{constructor(e){super();this.options=e;this.debounceSendDiff=this._register(new ho(()=>this.flushDiff(),200));this.diffOpEmitter=this._register(new D);this.tree=new Map;this.tags=new Map;this.diff=[];this.onDidGenerateDiff=this.diffOpEmitter.event;this.root.canResolveChildren=!0,this.upsertItem(this.root,void 0)}get root(){return this.options.root}set resolveHandler(e){this._resolveHandler=e;for(let n of this.tree.values())this.updateExpandability(n)}get resolveHandler(){return this._resolveHandler}collectDiff(){let e=this.diff;return this.diff=[],e}pushDiff(e){switch(e.op){case 2:{for(let n of this.diff)if(n.op===2&&n.uri===e.uri){n.docv=e.docv;return}break}case 1:{let n=this.diff[this.diff.length-1];if(n){if(n.op===1&&n.item.extId===e.item.extId){UI(n.item,e.item);return}if(n.op===0&&n.item.item.extId===e.item.extId){UI(n.item,e.item);return}}break}}this.diff.push(e),this.debounceSendDiff.isScheduled()||this.debounceSendDiff.schedule()}expand(e,n){let o=this.tree.get(e);if(o){if((o.expandLevels===void 0||n>o.expandLevels)&&(o.expandLevels=n),o.expand===1){let i=this.resolveChildren(o);return i.isOpen()?this.expandChildren(o,n-1):i.wait().then(()=>this.expandChildren(o,n-1))}else if(o.expand===3)return o.resolveBarrier?.isOpen()===!1?o.resolveBarrier.wait().then(()=>this.expandChildren(o,n-1)):this.expandChildren(o,n-1)}}dispose(){for(let e of this.tree.values())this.options.getApiFor(e.actual).listener=void 0;this.tree.clear(),this.diff=[],super.dispose()}onTestItemEvent(e,n){switch(n.op){case 3:this.removeItem(nt.joinToString(e.fullId,n.id));break;case 0:this.upsertItem(n.item,e);break;case 5:for(let o of n.ops)this.onTestItemEvent(e,o);break;case 1:this.diffTagRefs(n.new,n.old,e.fullId.toString());break;case 2:this.updateExpandability(e);break;case 4:this.pushDiff({op:1,item:{extId:e.fullId.toString(),item:n.update}});break;case 6:this.documentSynced(e.actual.uri);break;default:$c(n)}}documentSynced(e){e&&this.pushDiff({op:2,uri:e,docv:this.options.getDocumentVersion(e)})}upsertItem(e,n){let o=nt.fromExtHostTestItem(e,this.root.id,n?.actual),i=this.options.getApiFor(e);i.parent&&i.parent!==n?.actual&&this.options.getChildren(i.parent).delete(e.id);let s=this.tree.get(o.toString());if(!s){s={fullId:o,actual:e,expandLevels:n?.expandLevels?n.expandLevels-1:void 0,expand:0},e.tags.forEach(this.incrementTagRefs,this),this.tree.set(s.fullId.toString(),s),this.setItemParent(e,n),this.pushDiff({op:0,item:{controllerId:this.options.controllerId,expand:s.expand,item:this.options.toITestItem(e)}}),this.connectItemAndChildren(e,s,n);return}if(s.actual===e){this.connectItem(e,s,n);return}if(s.actual.uri?.toString()!==e.uri?.toString())return this.removeItem(o.toString()),this.upsertItem(e,n);let a=this.options.getChildren(s.actual),l=s.actual,d=cG(this.options.toITestItem(l),this.options.toITestItem(e));this.options.getApiFor(l).listener=void 0,s.actual=e,s.resolveBarrier=void 0,s.expand=0,d&&(d.hasOwnProperty("tags")&&(this.diffTagRefs(e.tags,l.tags,o.toString()),delete d.tags),this.onTestItemEvent(s,{op:4,update:d})),this.connectItemAndChildren(e,s,n);for(let[u,f]of a)this.options.getChildren(e).get(f.id)||this.removeItem(nt.joinToString(o,f.id));let c=s.expandLevels;c!==void 0&&queueMicrotask(()=>{s.expand===1&&(s.expandLevels=void 0,this.expand(o.toString(),c))}),this.documentSynced(s.actual.uri)}diffTagRefs(e,n,o){let i=new Set(n.map(s=>s.id));for(let s of e)i.delete(s.id)||this.incrementTagRefs(s);this.pushDiff({op:1,item:{extId:o,item:{tags:e.map(s=>Au(this.options.controllerId,s.id))}}}),i.forEach(this.decrementTagRefs,this)}incrementTagRefs(e){let n=this.tags.get(e.id);n?n.refCount++:(this.tags.set(e.id,{refCount:1}),this.pushDiff({op:6,tag:{id:Au(this.options.controllerId,e.id)}}))}decrementTagRefs(e){let n=this.tags.get(e);n&&!--n.refCount&&(this.tags.delete(e),this.pushDiff({op:7,id:Au(this.options.controllerId,e)}))}setItemParent(e,n){this.options.getApiFor(e).parent=n&&n.actual!==this.root?n.actual:void 0}connectItem(e,n,o){this.setItemParent(e,o);let i=this.options.getApiFor(e);i.parent=o?.actual,i.listener=s=>this.onTestItemEvent(n,s),this.updateExpandability(n)}connectItemAndChildren(e,n,o){this.connectItem(e,n,o);for(let[i,s]of this.options.getChildren(e))this.upsertItem(s,n)}updateExpandability(e){let n;this._resolveHandler?e.resolveBarrier?n=e.resolveBarrier.isOpen()?3:2:n=e.actual.canResolveChildren?1:0:n=0,n!==e.expand&&(e.expand=n,this.pushDiff({op:1,item:{extId:e.fullId.toString(),expand:n}}),n===1&&e.expandLevels!==void 0&&this.resolveChildren(e))}expandChildren(e,n){if(n<0)return;let o=[];for(let[i,s]of this.options.getChildren(e.actual)){let a=this.expand(nt.joinToString(e.fullId,s.id),n);br(a)&&o.push(a)}if(o.length)return Promise.all(o).then(()=>{})}resolveChildren(e){if(e.resolveBarrier)return e.resolveBarrier;if(!this._resolveHandler){let s=new Ln;return s.open(),s}e.expand=2,this.pushExpandStateUpdate(e);let n=e.resolveBarrier=new Ln,o=s=>{console.error(`Unhandled error in resolveHandler of test controller "${this.options.controllerId}"`,s)},i;try{i=this._resolveHandler(e.actual===this.root?void 0:e.actual)}catch(s){o(s)}return br(i)?i.catch(o).then(()=>{n.open(),this.updateExpandability(e)}):(n.open(),this.updateExpandability(e)),e.resolveBarrier}pushExpandStateUpdate(e){this.pushDiff({op:1,item:{extId:e.fullId.toString(),expand:e.expand}})}removeItem(e){let n=this.tree.get(e);if(!n)throw new Error("attempting to remove non-existent child");this.pushDiff({op:3,itemId:e});let o=[n];for(;o.length;){let i=o.pop();if(i){this.options.getApiFor(i.actual).listener=void 0;for(let s of i.actual.tags)this.decrementTagRefs(s.id);this.tree.delete(i.fullId.toString());for(let[s,a]of this.options.getChildren(i.actual))o.push(this.tree.get(nt.joinToString(i.fullId,a.id)))}}}flushDiff(){let e=this.collectDiff();e.length&&this.diffOpEmitter.fire(e)}},eR=class extends Error{constructor(t){super(`Attempted to insert a duplicate test item ID ${t}`)}},$a=class extends Error{constructor(t){super(`TestItem with ID "${t}" is invalid. Make sure to create it from the createTestItem method.`)}},tR=class extends Error{constructor(t,e,n){super(`TestItem with ID "${t}" is from controller "${e}" and cannot be added as a child of an item from controller "${n}".`)}},qH=(r,t,e)=>{let n=new Map;return{get size(){return n.size},forEach(o,i){for(let s of n.values())o.call(i,s,this)},[Symbol.iterator](){return n.entries()},replace(o){let i=new Map,s=new Set(n.keys()),a={op:5,ops:[]};for(let l of o){if(!(l instanceof e))throw new $a(l.id);let d=t(l).controllerId;if(d!==r.controllerId)throw new tR(l.id,d,r.controllerId);if(i.has(l.id))throw new eR(l.id);i.set(l.id,l),s.delete(l.id),a.ops.push({op:0,item:l})}for(let l of s.keys())a.ops.push({op:3,id:l});r.listener?.(a),n=i},add(o){if(!(o instanceof e))throw new $a(o.id);n.set(o.id,o),r.listener?.({op:0,item:o})},delete(o){n.delete(o)&&r.listener?.({op:3,id:o})},get(o){return n.get(o)},toJSON(){return Array.from(n.values())}}};var KH=new WeakMap,JH=(r,t)=>{let e={controllerId:t};return KH.set(r,e),e},Ou=r=>{let t=KH.get(r);if(!t)throw new $a(r?.id||"<unknown>");return t};var xye=N("remoteAuthorityResolverService");var BI=class{constructor(t){this.id=t;this.type=1}toString(){return`Managed(${this.id})`}},VI=class{constructor(t,e){this.host=t;this.port=e;this.type=0}toString(){return`WebSocket(${this.host}:${this.port})`}};function nR(r){let t=r.indexOf("+");return t===-1?r:r.substring(0,t)}function Ie(r){return Object.assign(r,{apply:function(...e){if(e.length===0)return Reflect.construct(r,[]);{let n=e.length===1?[]:e[1];return Reflect.construct(r,n,e[0].constructor)}},call:function(...e){if(e.length===0)return Reflect.construct(r,[]);{let[n,...o]=e;return Reflect.construct(r,o,n.constructor)}}})}var Wn,zt=class{constructor(t,e=!1){Uc(this,Wn);cf(this,Wn,new Yn(t,{supportThemeIcons:e}))}static isMarkdownString(t){return t instanceof zt?!0:!t||typeof t!="object"?!1:t.appendCodeblock&&t.appendMarkdown&&t.appendText&&t.value!==void 0}get value(){return an(this,Wn).value}set value(t){an(this,Wn).value=t}get isTrusted(){return an(this,Wn).isTrusted}set isTrusted(t){an(this,Wn).isTrusted=t}get supportThemeIcons(){return an(this,Wn).supportThemeIcons}set supportThemeIcons(t){an(this,Wn).supportThemeIcons=t}get supportHtml(){return an(this,Wn).supportHtml}set supportHtml(t){an(this,Wn).supportHtml=t}get supportAlertSyntax(){return an(this,Wn).supportAlertSyntax}set supportAlertSyntax(t){an(this,Wn).supportAlertSyntax=t}get baseUri(){return an(this,Wn).baseUri}set baseUri(t){an(this,Wn).baseUri=t}appendText(t){return an(this,Wn).appendText(t),this}appendMarkdown(t){return an(this,Wn).appendMarkdown(t),this}appendCodeblock(t,e){return an(this,Wn).appendCodeblock(e??"",t),this}};Wn=new WeakMap,zt=L([Ie],zt);var we=class{static Min(...t){if(t.length===0)throw new TypeError;let e=t[0];for(let n=1;n<t.length;n++){let o=t[n];o.isBefore(e)&&(e=o)}return e}static Max(...t){if(t.length===0)throw new TypeError;let e=t[0];for(let n=1;n<t.length;n++){let o=t[n];o.isAfter(e)&&(e=o)}return e}static isPosition(t){if(!t)return!1;if(t instanceof we)return!0;let{line:e,character:n}=t;return typeof e=="number"&&typeof n=="number"}static of(t){if(t instanceof we)return t;if(this.isPosition(t))return new we(t.line,t.character);throw new Error("Invalid argument, is NOT a position-like object")}get line(){return this._line}get character(){return this._character}constructor(t,e){if(t<0)throw Be("line must be non-negative");if(e<0)throw Be("character must be non-negative");this._line=t,this._character=e}isBefore(t){return this._line<t._line?!0:t._line<this._line?!1:this._character<t._character}isBeforeOrEqual(t){return this._line<t._line?!0:t._line<this._line?!1:this._character<=t._character}isAfter(t){return!this.isBeforeOrEqual(t)}isAfterOrEqual(t){return!this.isBefore(t)}isEqual(t){return this._line===t._line&&this._character===t._character}compareTo(t){return this._line<t._line?-1:this._line>t.line?1:this._character<t._character?-1:this._character>t._character?1:0}translate(t,e=0){if(t===null||e===null)throw Be();let n;return typeof t>"u"?n=0:typeof t=="number"?n=t:(n=typeof t.lineDelta=="number"?t.lineDelta:0,e=typeof t.characterDelta=="number"?t.characterDelta:0),n===0&&e===0?this:new we(this.line+n,this.character+e)}with(t,e=this.character){if(t===null||e===null)throw Be();let n;return typeof t>"u"?n=this.line:typeof t=="number"?n=t:(n=typeof t.line=="number"?t.line:this.line,e=typeof t.character=="number"?t.character:this.character),n===this.line&&e===this.character?this:new we(n,e)}toJSON(){return{line:this.line,character:this.character}}[Symbol.for("debug.description")](){return`(${this.line}:${this.character})`}};we=L([Ie],we);var Se=class{static isRange(t){return t instanceof Se?!0:!t||typeof t!="object"?!1:we.isPosition(t.start)&&we.isPosition(t.end)}static of(t){if(t instanceof Se)return t;if(this.isRange(t))return new Se(t.start,t.end);throw new Error("Invalid argument, is NOT a range-like object")}get start(){return this._start}get end(){return this._end}constructor(t,e,n,o){let i,s;if(typeof t=="number"&&typeof e=="number"&&typeof n=="number"&&typeof o=="number"?(i=new we(t,e),s=new we(n,o)):we.isPosition(t)&&we.isPosition(e)&&(i=we.of(t),s=we.of(e)),!i||!s)throw new Error("Invalid arguments");i.isBefore(s)?(this._start=i,this._end=s):(this._start=s,this._end=i)}contains(t){return Se.isRange(t)?this.contains(t.start)&&this.contains(t.end):we.isPosition(t)?!(we.of(t).isBefore(this._start)||this._end.isBefore(t)):!1}isEqual(t){return this._start.isEqual(t._start)&&this._end.isEqual(t._end)}intersection(t){let e=we.Max(t.start,this._start),n=we.Min(t.end,this._end);if(!e.isAfter(n))return new Se(e,n)}union(t){if(this.contains(t))return this;if(t.contains(this))return t;let e=we.Min(t.start,this._start),n=we.Max(t.end,this.end);return new Se(e,n)}get isEmpty(){return this._start.isEqual(this._end)}get isSingleLine(){return this._start.line===this._end.line}with(t,e=this.end){if(t===null||e===null)throw Be();let n;return t?we.isPosition(t)?n=t:(n=t.start||this.start,e=t.end||this.end):n=this.start,n.isEqual(this._start)&&e.isEqual(this.end)?this:new Se(n,e)}toJSON(){return[this.start,this.end]}[Symbol.for("debug.description")](){return oR(this)}};Se=L([Ie],Se);function oR(r){return r.isEmpty?`[${r.start.line}:${r.start.character})`:`[${r.start.line}:${r.start.character} -> ${r.end.line}:${r.end.character})`}var yt=class{constructor(t){this.value=t}append(t){return new yt(this.value?this.value+yt.sep+t:t)}intersects(t){return this.contains(t)||t.contains(this)}contains(t){return this.value===t.value||t.value.startsWith(this.value+yt.sep)}};yt.sep=".",yt=L([Ie],yt);yt.Empty=new yt("");yt.QuickFix=yt.Empty.append("quickfix");yt.Refactor=yt.Empty.append("refactor");yt.RefactorExtract=yt.Refactor.append("extract");yt.RefactorInline=yt.Refactor.append("inline");yt.RefactorMove=yt.Refactor.append("move");yt.RefactorRewrite=yt.Refactor.append("rewrite");yt.Source=yt.Empty.append("source");yt.SourceOrganizeImports=yt.Source.append("organizeImports");yt.SourceFixAll=yt.Source.append("fixAll");yt.Notebook=yt.Empty.append("notebook");var Ag=(e=>(e[e.Unnecessary=1]="Unnecessary",e[e.Deprecated=2]="Deprecated",e))(Ag||{}),Od=(o=>(o[o.Hint=3]="Hint",o[o.Information=2]="Information",o[o.Warning=1]="Warning",o[o.Error=0]="Error",o))(Od||{}),Ui=class{static is(t){return t?typeof t.message=="string"&&t.location&&Se.isRange(t.location.range)&&E.isUri(t.location.uri):!1}constructor(t,e){this.location=t,this.message=e}static isEqual(t,e){return t===e?!0:!t||!e?!1:t.message===e.message&&t.location.range.isEqual(e.location.range)&&t.location.uri.toString()===e.location.uri.toString()}};Ui=L([Ie],Ui);var Rs=class{constructor(t,e,n=0){if(!Se.isRange(t))throw new TypeError("range must be set");if(!e)throw new TypeError("message must be set");this.range=t,this.message=e,this.severity=n}toJSON(){return{severity:Od[this.severity],message:this.message,range:this.range,source:this.source,code:this.code}}static isEqual(t,e){return t===e?!0:!t||!e?!1:t.message===e.message&&t.severity===e.severity&&t.code===e.code&&t.severity===e.severity&&t.source===e.source&&t.range.isEqual(e.range)&&Zt(t.tags,e.tags)&&Zt(t.relatedInformation,e.relatedInformation,Ui.isEqual)}};Rs=L([Ie],Rs);var qt=class{static isLocation(t){return t instanceof qt?!0:t?Se.isRange(t.range)&&E.isUri(t.uri):!1}constructor(t,e){if(this.uri=t,e)if(Se.isRange(e))this.range=Se.of(e);else if(we.isPosition(e))this.range=new Se(e,e);else throw new Error("Illegal argument")}toJSON(){return{uri:this.uri,range:this.range}}};qt=L([Ie],qt);var Og=(e=>(e[e.Markup=1]="Markup",e[e.Code=2]="Code",e))(Og||{}),$n=class r{static isNotebookRange(t){return t instanceof r?!0:t?typeof t.start=="number"&&typeof t.end=="number":!1}get start(){return this._start}get end(){return this._end}get isEmpty(){return this._start===this._end}constructor(t,e){if(t<0)throw Be("start must be positive");if(e<0)throw Be("end must be positive");t<=e?(this._start=t,this._end=e):(this._start=e,this._end=t)}with(t){let e=this._start,n=this._end;return t.start!==void 0&&(e=t.start),t.end!==void 0&&(n=t.end),e===this._start&&n===this._end?this:new r(e,n)}},Fi=class r{static validate(t){if(typeof t.kind!="number")throw new Error("NotebookCellData MUST have 'kind' property");if(typeof t.value!="string")throw new Error("NotebookCellData MUST have 'value' property");if(typeof t.languageId!="string")throw new Error("NotebookCellData MUST have 'languageId' property")}static isNotebookCellDataArray(t){return Array.isArray(t)&&t.every(e=>r.isNotebookCellData(e))}static isNotebookCellData(t){return!0}constructor(t,e,n,o,i,s,a){this.kind=t,this.value=e,this.languageId=n,this.mime=o,this.outputs=i??[],this.metadata=s,this.executionSummary=a,r.validate(this)}},Ld=class{constructor(t){this.cells=t}},xo=class{static isNotebookCellEdit(t){return t instanceof xo?!0:t?$n.isNotebookRange(t)&&Array.isArray(t.newCells):!1}static replaceCells(t,e){return new xo(t,e)}static insertCells(t,e){return new xo(new $n(t,t),e)}static deleteCells(t){return new xo(t,[])}static updateCellMetadata(t,e){let n=new xo(new $n(t,t),[]);return n.newCellMetadata=e,n}static updateNotebookMetadata(t){let e=new xo(new $n(0,0),[]);return e.newNotebookMetadata=t,e}constructor(t,e){this.range=t,this.newCells=e}};xo=L([Ie],xo);var Md=class r{constructor(t,e){this.data=t;this.mime=e;let n=LP(e,!0);if(!n)throw new Error(`INVALID mime type: ${e}. Must be in the format "type/subtype[;optionalparameter]"`);this.mime=n}static isNotebookCellOutputItem(t){return t instanceof r?!0:t?typeof t.mime=="string"&&t.data instanceof Uint8Array:!1}static error(t){let e={name:t.name,message:t.message,stack:t.stack};return r.json(e,"application/vnd.code.notebook.error")}static stdout(t){return r.text(t,"application/vnd.code.notebook.stdout")}static stderr(t){return r.text(t,"application/vnd.code.notebook.stderr")}static bytes(t,e="application/octet-stream"){return new r(t,e)}static#e=new TextEncoder;static text(t,e=Io.text){let n=r.#e.encode(String(t));return new r(n,e)}static json(t,e="text/x-json"){let n=JSON.stringify(t,void 0,"	");return r.text(n,e)}},Hi=class r{static isNotebookCellOutput(t){return t instanceof r?!0:!t||typeof t!="object"?!1:typeof t.id=="string"&&Array.isArray(t.items)}static ensureUniqueMimeTypes(t,e=!1){let n=new Set,o=new Set;for(let i=0;i<t.length;i++){let s=t[i],a=LP(s.mime);if(!n.has(a)||Nb(a)){n.add(a);continue}o.add(i),e&&console.warn(`DUPLICATED mime type '${s.mime}' will be dropped`)}return o.size===0?t:t.filter((i,s)=>!o.has(s))}constructor(t,e,n){this.items=r.ensureUniqueMimeTypes(t,!0),typeof e=="string"?(this.id=e,this.metadata=n):(this.id=ct(),this.metadata=e??n)}};var Nn=class extends Se{static isSelection(t){return t instanceof Nn?!0:!t||typeof t!="object"?!1:Se.isRange(t)&&we.isPosition(t.anchor)&&we.isPosition(t.active)&&typeof t.isReversed=="boolean"}get anchor(){return this._anchor}get active(){return this._active}constructor(t,e,n,o){let i,s;if(typeof t=="number"&&typeof e=="number"&&typeof n=="number"&&typeof o=="number"?(i=new we(t,e),s=new we(n,o)):we.isPosition(t)&&we.isPosition(e)&&(i=we.of(t),s=we.of(e)),!i||!s)throw new Error("Invalid arguments");super(i,s),this._anchor=i,this._active=s}get isReversed(){return this._anchor===this._end}toJSON(){return{start:this.start,end:this.end,active:this.active,anchor:this.anchor}}[Symbol.for("debug.description")](){return uG(this)}};Nn=L([Ie],Nn);function uG(r){let t=oR(r);return r.isEmpty||(r.active.isEqual(r.start)?t=`|${t}`:t=`${t}|`),t}var Un=class{constructor(t){this._tabstop=1;this.value=t||""}static isSnippetString(t){return t instanceof Un?!0:!t||typeof t!="object"?!1:typeof t.value=="string"}static _escape(t){return t.replace(/\$|}|\\/g,"\\$&")}appendText(t){return this.value+=Un._escape(t),this}appendTabstop(t=this._tabstop++){return this.value+="$",this.value+=t,this}appendPlaceholder(t,e=this._tabstop++){if(typeof t=="function"){let n=new Un;n._tabstop=this._tabstop,t(n),this._tabstop=n._tabstop,t=n.value}else t=Un._escape(t);return this.value+="${",this.value+=e,this.value+=":",this.value+=t,this.value+="}",this}appendChoice(t,e=this._tabstop++){let n=t.map(o=>o.replaceAll(/[|\\,]/g,"\\$&")).join(",");return this.value+="${",this.value+=e,this.value+="|",this.value+=n,this.value+="|}",this}appendVariable(t,e){if(typeof e=="function"){let n=new Un;n._tabstop=this._tabstop,e(n),this._tabstop=n._tabstop,e=n.value}else typeof e=="string"&&(e=e.replace(/\$|}/g,"\\$&"));return this.value+="${",this.value+=t,e&&(this.value+=":",this.value+=e),this.value+="}",this}};Un=L([Ie],Un);var ks=class r{static isSnippetTextEdit(t){return t instanceof r?!0:t?Se.isRange(t.range)&&Un.isSnippetString(t.snippet):!1}static replace(t,e){return new r(t,e)}static insert(t,e){return r.replace(new Se(t,t),e)}constructor(t,e){this.range=t,this.snippet=e}};var Lu=(B=>(B[B.File=0]="File",B[B.Module=1]="Module",B[B.Namespace=2]="Namespace",B[B.Package=3]="Package",B[B.Class=4]="Class",B[B.Method=5]="Method",B[B.Property=6]="Property",B[B.Field=7]="Field",B[B.Constructor=8]="Constructor",B[B.Enum=9]="Enum",B[B.Interface=10]="Interface",B[B.Function=11]="Function",B[B.Variable=12]="Variable",B[B.Constant=13]="Constant",B[B.String=14]="String",B[B.Number=15]="Number",B[B.Boolean=16]="Boolean",B[B.Array=17]="Array",B[B.Object=18]="Object",B[B.Key=19]="Key",B[B.Null=20]="Null",B[B.EnumMember=21]="EnumMember",B[B.Struct=22]="Struct",B[B.Event=23]="Event",B[B.Operator=24]="Operator",B[B.TypeParameter=25]="TypeParameter",B[B.Unknown=26]="Unknown",B))(Lu||{}),Lg=(t=>(t[t.Deprecated=1]="Deprecated",t))(Lg||{}),nr=class{static validate(t){if(!t.name)throw new Error("name must not be falsy")}constructor(t,e,n,o,i){this.name=t,this.kind=e,this.containerName=i,typeof n=="string"&&(this.containerName=n),o instanceof qt?this.location=o:n instanceof Se&&(this.location=new qt(o,n)),nr.validate(this)}toJSON(){return{name:this.name,kind:Lu[this.kind],location:this.location,containerName:this.containerName}}};nr=L([Ie],nr);var Nd=(e=>(e[e.LF=1]="LF",e[e.CRLF=2]="CRLF",e))(Nd||{}),Tn=class{static isTextEdit(t){return t instanceof Tn?!0:!t||typeof t!="object"?!1:Se.isRange(t)&&typeof t.newText=="string"}static replace(t,e){return new Tn(t,e)}static insert(t,e){return Tn.replace(new Se(t,t),e)}static delete(t){return Tn.replace(t,"")}static setEndOfLine(t){let e=new Tn(new Se(new we(0,0),new we(0,0)),"");return e.newEol=t,e}get range(){return this._range}set range(t){if(t&&!Se.isRange(t))throw Be("range");this._range=t}get newText(){return this._newText||""}set newText(t){if(t&&typeof t!="string")throw Be("newText");this._newText=t}get newEol(){return this._newEol}set newEol(t){if(t&&typeof t!="number")throw Be("newEol");this._newEol=t}constructor(t,e){this._range=t,this._newText=e}toJSON(){return{range:this.range,newText:this.newText,newEol:this._newEol}}};Tn=L([Ie],Tn);var Go=class{constructor(){this._edits=[]}_allEntries(){return this._edits}renameFile(t,e,n,o){this._edits.push({_type:1,from:t,to:e,options:n,metadata:o})}createFile(t,e,n){this._edits.push({_type:1,from:void 0,to:t,options:e,metadata:n})}deleteFile(t,e,n){this._edits.push({_type:1,from:t,to:void 0,options:e,metadata:n})}replaceNotebookMetadata(t,e,n){this._edits.push({_type:3,metadata:n,uri:t,edit:{editType:5,metadata:e}})}replaceNotebookCells(t,e,n,o){let i=e.start,s=e.end;(i!==s||n.length>0)&&this._edits.push({_type:5,uri:t,index:i,count:s-i,cells:n,metadata:o})}replaceNotebookCellMetadata(t,e,n,o){this._edits.push({_type:3,metadata:o,uri:t,edit:{editType:3,index:e,metadata:n}})}replace(t,e,n,o){this._edits.push({_type:2,uri:t,edit:new Tn(e,n),metadata:o})}insert(t,e,n,o){this.replace(t,new Se(e,e),n,o)}delete(t,e,n){this.replace(t,e,"",n)}has(t){return this._edits.some(e=>e._type===2&&e.uri.toString()===t.toString())}set(t,e){if(e)for(let n of e){if(!n)continue;let o,i;Array.isArray(n)?(o=n[0],i=n[1]):o=n,xo.isNotebookCellEdit(o)?o.newCellMetadata?this.replaceNotebookCellMetadata(t,o.range.start,o.newCellMetadata,i):o.newNotebookMetadata?this.replaceNotebookMetadata(t,o.newNotebookMetadata,i):this.replaceNotebookCells(t,o.range,o.newCells,i):ks.isSnippetTextEdit(o)?this._edits.push({_type:6,uri:t,range:o.range,edit:o.snippet,metadata:i,keepWhitespace:o.keepWhitespace}):this._edits.push({_type:2,uri:t,edit:o,metadata:i})}else{for(let n=0;n<this._edits.length;n++){let o=this._edits[n];switch(o._type){case 2:case 6:case 3:case 5:o.uri.toString()===t.toString()&&(this._edits[n]=void 0);break}}p0(this._edits)}}get(t){let e=[];for(let n of this._edits)n._type===2&&n.uri.toString()===t.toString()&&e.push(n.edit);return e}entries(){let t=new et;for(let e of this._edits)if(e._type===2){let n=t.get(e.uri);n||(n=[e.uri,[]],t.set(e.uri,n)),n[1].push(e.edit)}return[...t.values()]}get size(){return this.entries().length}toJSON(){return this.entries()}};Go=L([Ie],Go);var rR=(e=>(e[e.Top=0]="Top",e[e.Bottom=1]="Bottom",e))(rR||{});var Vd,Ce=class{constructor(t){Uc(this,Vd);cf(this,Vd,t)}static from(...t){let e=t;return new Ce(function(){if(e){for(let n of e)n&&typeof n.dispose=="function"&&n.dispose();e=void 0}})}dispose(){typeof an(this,Vd)=="function"&&(an(this,Vd).call(this),cf(this,Vd,void 0))}};Vd=new WeakMap,Ce=L([Ie],Ce);var XH=r=>{if(typeof r!="string"||r.length===0||!/^[0-9A-Za-z_\-]+$/.test(r))throw Be("connectionToken")},WI=class{static isResolvedAuthority(t){return t&&typeof t=="object"&&typeof t.host=="string"&&typeof t.port=="number"&&(t.connectionToken===void 0||typeof t.connectionToken=="string")}constructor(t,e,n){if(typeof t!="string"||t.length===0)throw Be("host");if(typeof e!="number"||e===0||Math.round(e)!==e)throw Be("port");typeof n<"u"&&XH(n),this.host=t,this.port=Math.round(e),this.connectionToken=n}},al=class{constructor(t,e){this.makeConnection=t;this.connectionToken=e;typeof e<"u"&&XH(e)}static isManagedResolvedAuthority(t){return t&&typeof t=="object"&&typeof t.makeConnection=="function"&&(t.connectionToken===void 0||typeof t.connectionToken=="string")}},Ki=class r extends Error{static NotAvailable(t,e){return new r(t,"NotAvailable",e)}static TemporarilyNotAvailable(t){return new r(t,"TemporarilyNotAvailable")}constructor(t,e="Unknown",n){super(t),this._message=t,this._code=e,this._detail=n,Object.setPrototypeOf(this,r.prototype)}},Ty=(n=>(n[n.Replace=1]="Replace",n[n.Append=2]="Append",n[n.Prepend=3]="Prepend",n))(Ty||{}),Ud=class{constructor(t,e){if(!t)throw new Error("Illegal argument, contents must be defined");Array.isArray(t)?this.contents=t:this.contents=[t],this.range=e}};Ud=L([Ie],Ud);var Ga=class extends Ud{constructor(t,e,n,o){super(t,e),this.canIncreaseVerbosity=n,this.canDecreaseVerbosity=o}};Ga=L([Ie],Ga);var iR=(e=>(e[e.Increase=0]="Increase",e[e.Decrease=1]="Decrease",e))(iR||{}),_y=(n=>(n[n.Text=0]="Text",n[n.Read=1]="Read",n[n.Write=2]="Write",n))(_y||{}),za=class{constructor(t,e=0){this.range=t,this.kind=e}toJSON(){return{range:this.range,kind:_y[this.kind]}}};za=L([Ie],za);var qa=class{constructor(t,e){this.uri=t,this.highlights=e}toJSON(){return{uri:this.uri,highlights:this.highlights.map(t=>t.toJSON())}}};qa=L([Ie],qa);var or=class{static validate(t){if(!t.name)throw new Error("name must not be falsy");if(!t.range.contains(t.selectionRange))throw new Error("selectionRange must be contained in fullRange");t.children?.forEach(or.validate)}constructor(t,e,n,o,i){this.name=t,this.detail=e,this.kind=n,this.range=o,this.selectionRange=i,this.children=[],or.validate(this)}};or=L([Ie],or);var Py=(e=>(e[e.Invoke=1]="Invoke",e[e.Automatic=2]="Automatic",e))(Py||{}),Vi=class{constructor(t,e){this.title=t,this.kind=e}};Vi=L([Ie],Vi);var Wi=class{constructor(t,e){if(this.range=t,this.parent=e,e&&!e.range.contains(this.range))throw new Error("Invalid argument: parent must contain this range")}};Wi=L([Ie],Wi);var ll=class{constructor(t,e,n,o,i,s){this.kind=t,this.name=e,this.detail=n,this.uri=o,this.range=i,this.selectionRange=s}},Gu=class{constructor(t,e){this.fromRanges=e,this.from=t}},zu=class{constructor(t,e){this.fromRanges=e,this.to=t}},Dy=(n=>(n[n.Information=0]="Information",n[n.Warning=1]="Warning",n[n.Error=2]="Error",n))(Dy||{}),Ka=class{constructor(t,e){this.range=t,this.command=e}get isResolved(){return!!this.command}};Ka=L([Ie],Ka);var Mu=class{constructor(t,e){this.label=t,this.documentation=e}};Mu=L([Ie],Mu);var Nu=class{constructor(t,e){this.label=t,this.documentation=e,this.parameters=[]}};Nu=L([Ie],Nu);var Uu=class{constructor(){this.activeSignature=0;this.activeParameter=0;this.signatures=[]}};Uu=L([Ie],Uu);var sR=(n=>(n[n.Invoke=1]="Invoke",n[n.TriggerCharacter=2]="TriggerCharacter",n[n.ContentChange=3]="ContentChange",n))(sR||{}),aR=(e=>(e[e.Type=1]="Type",e[e.Parameter=2]="Parameter",e))(aR||{}),Ja=class{constructor(t){this.value=t}};Ja=L([Ie],Ja);var ja=class{constructor(t,e,n){this.position=t,this.label=e,this.kind=n}};ja=L([Ie],ja);var wy=(n=>(n[n.Invoke=0]="Invoke",n[n.TriggerCharacter=1]="TriggerCharacter",n[n.TriggerForIncompleteCompletions=2]="TriggerForIncompleteCompletions",n))(wy||{}),Ng=(B=>(B[B.Text=0]="Text",B[B.Method=1]="Method",B[B.Function=2]="Function",B[B.Constructor=3]="Constructor",B[B.Field=4]="Field",B[B.Variable=5]="Variable",B[B.Class=6]="Class",B[B.Interface=7]="Interface",B[B.Module=8]="Module",B[B.Property=9]="Property",B[B.Unit=10]="Unit",B[B.Value=11]="Value",B[B.Enum=12]="Enum",B[B.Keyword=13]="Keyword",B[B.Snippet=14]="Snippet",B[B.Color=15]="Color",B[B.File=16]="File",B[B.Reference=17]="Reference",B[B.Folder=18]="Folder",B[B.EnumMember=19]="EnumMember",B[B.Constant=20]="Constant",B[B.Struct=21]="Struct",B[B.Event=22]="Event",B[B.Operator=23]="Operator",B[B.TypeParameter=24]="TypeParameter",B[B.User=25]="User",B[B.Issue=26]="Issue",B))(Ng||{}),Ry=(t=>(t[t.Deprecated=1]="Deprecated",t))(Ry||{}),Qa=class{constructor(t,e){this.label=t,this.kind=e}toJSON(){return{label:this.label,kind:this.kind&&Ng[this.kind],detail:this.detail,documentation:this.documentation,sortText:this.sortText,filterText:this.filterText,preselect:this.preselect,insertText:this.insertText,textEdit:this.textEdit}}};Qa=L([Ie],Qa);var ti=class{constructor(t=[],e=!1){this.items=t,this.isIncomplete=e}};ti=L([Ie],ti);var Fu=class{constructor(t,e,n){this.insertText=t,this.range=e,this.command=n}};Fu=L([Ie],Fu);var Hu=class{constructor(t){this.commands=void 0;this.suppressSuggestions=void 0;this.items=t}};Hu=L([Ie],Hu);var ky=(o=>(o[o.Unknown=0]="Unknown",o[o.Word=1]="Word",o[o.Line=2]="Line",o[o.Suggest=3]="Suggest",o))(ky||{}),Ay=(n=>(n[n.Accepted=0]="Accepted",n[n.Rejected=1]="Rejected",n[n.Ignored=2]="Ignored",n))(Ay||{}),Oy=(e=>(e[e.Code=1]="Code",e[e.Label=2]="Label",e))(Oy||{}),Ly=(u=>(u[u.Active=-1]="Active",u[u.Beside=-2]="Beside",u[u.One=1]="One",u[u.Two=2]="Two",u[u.Three=3]="Three",u[u.Four=4]="Four",u[u.Five=5]="Five",u[u.Six=6]="Six",u[u.Seven=7]="Seven",u[u.Eight=8]="Eight",u[u.Nine=9]="Nine",u))(Ly||{}),My=(e=>(e[e.Left=1]="Left",e[e.Right=2]="Right",e))(My||{});function YH(r,t){return`${Ue.toKey(r)}.${t}`}var Ny=(o=>(o[o.Off=0]="Off",o[o.On=1]="On",o[o.Relative=2]="Relative",o[o.Interval=3]="Interval",o))(Ny||{}),Uy=(n=>(n[n.Manual=1]="Manual",n[n.AfterDelay=2]="AfterDelay",n[n.FocusOut=3]="FocusOut",n))(Uy||{}),Fy=(o=>(o[o.Default=0]="Default",o[o.InCenter=1]="InCenter",o[o.InCenterIfOutsideViewport=2]="InCenterIfOutsideViewport",o[o.AtTop=3]="AtTop",o))(Fy||{}),Zd=(n=>(n[n.Keyboard=1]="Keyboard",n[n.Mouse=2]="Mouse",n[n.Command=3]="Command",n))(Zd||{}),Hy=(n=>(n[n.Addition=1]="Addition",n[n.Deletion=2]="Deletion",n[n.Modification=3]="Modification",n))(Hy||{}),By=(e=>(e[e.Undo=1]="Undo",e[e.Redo=2]="Redo",e))(By||{}),Vy=(o=>(o[o.OpenOpen=0]="OpenOpen",o[o.ClosedClosed=1]="ClosedClosed",o[o.OpenClosed=2]="OpenClosed",o[o.ClosedOpen=3]="ClosedOpen",o))(Vy||{});(t=>{function r(e){switch(e){case"keyboard":return 1;case"mouse":return 2;case"api":case"code.jump":case"code.navigation":return 3}}t.fromValue=r})(Zd||={});var ec=(o=>(o[o.Other=0]="Other",o[o.Comment=1]="Comment",o[o.String=2]="String",o[o.RegEx=3]="RegEx",o))(ec||{});(t=>{function r(e){switch(e){case 0:return"other";case 1:return"comment";case 2:return"string";case 3:return"regex"}return"other"}t.toString=r})(ec||={});var Xa=class{constructor(t,e){if(e&&!E.isUri(e))throw Be("target");if(!Se.isRange(t)||t.isEmpty)throw Be("range");this.range=t,this.target=e}};Xa=L([Ie],Xa);var ni=class{constructor(t,e,n,o){this.red=t,this.green=e,this.blue=n,this.alpha=o}};ni=L([Ie],ni);var Ya=class{constructor(t,e){if(e&&!(e instanceof ni))throw Be("color");if(!Se.isRange(t)||t.isEmpty)throw Be("range");this.range=t,this.color=e}};Ya=L([Ie],Ya);var Za=class{constructor(t){if(!t||typeof t!="string")throw Be("label");this.label=t}};Za=L([Ie],Za);var Wy=(n=>(n[n.Error=0]="Error",n[n.Warning=1]="Warning",n[n.Information=2]="Information",n))(Wy||{}),lR=(i=>(i[i.Unknown=0]="Unknown",i[i.Shutdown=1]="Shutdown",i[i.Process=2]="Process",i[i.User=3]="User",i[i.Extension=4]="Extension",i))(lR||{}),$y=(n=>(n[n.Low=0]="Low",n[n.Medium=1]="Medium",n[n.High=2]="High",n))($y||{}),dR=(I=>(I[I.Sh=1]="Sh",I[I.Bash=2]="Bash",I[I.Fish=3]="Fish",I[I.Csh=4]="Csh",I[I.Ksh=5]="Ksh",I[I.Zsh=6]="Zsh",I[I.CommandPrompt=7]="CommandPrompt",I[I.GitBash=8]="GitBash",I[I.PowerShell=9]="PowerShell",I[I.Python=10]="Python",I[I.Julia=11]="Julia",I[I.NuShell=12]="NuShell",I[I.Node=13]="Node",I[I.Xonsh=14]="Xonsh",I))(dR||{}),$I=class{constructor(t,e,n){this.startIndex=t;this.length=e;this.tooltip=n;if(typeof t!="number"||t<0)throw Be("startIndex");if(typeof e!="number"||e<1)throw Be("length");if(n!==void 0&&typeof n!="string")throw Be("tooltip")}},GI=class{constructor(t){this.uri=t}},zI=class{constructor(t){this.terminalCommand=t}},cR=(e=>(e[e.Panel=1]="Panel",e[e.Editor=2]="Editor",e))(cR||{}),qI=class{constructor(t){this.options=t;if(typeof t!="object")throw Be("options")}},uR=(_=>(_[_.File=0]="File",_[_.Folder=1]="Folder",_[_.Method=2]="Method",_[_.Alias=3]="Alias",_[_.Argument=4]="Argument",_[_.Option=5]="Option",_[_.OptionValue=6]="OptionValue",_[_.Flag=7]="Flag",_[_.SymbolicLinkFile=8]="SymbolicLinkFile",_[_.SymbolicLinkFolder=9]="SymbolicLinkFolder",_[_.ScmCommit=10]="ScmCommit",_[_.ScmBranch=11]="ScmBranch",_[_.ScmTag=12]="ScmTag",_[_.ScmStash=13]="ScmStash",_[_.ScmRemote=14]="ScmRemote",_[_.PullRequest=15]="PullRequest",_[_.PullRequestDone=16]="PullRequestDone",_))(uR||{}),KI=class{constructor(t,e,n,o,i,s,a,l){this.label=t,this.replacementRange=e,this.kind=n,this.detail=o,this.documentation=i,this.isFile=s,this.isDirectory=a,this.isKeyword=l}},JI=class{constructor(t,e){this.items=t??[],this.resourceOptions=e}},pR=(n=>(n[n.Always=1]="Always",n[n.Silent=2]="Silent",n[n.Never=3]="Never",n))(pR||{}),mR=(g=>(g.Changed="changed",g.ProcessStarted="processStarted",g.ProcessEnded="processEnded",g.Terminated="terminated",g.Start="start",g.AcquiredInput="acquiredInput",g.DependsOnStarted="dependsOnStarted",g.Active="active",g.Inactive="inactive",g.End="end",g.ProblemMatcherStarted="problemMatcherStarted",g.ProblemMatcherEnded="problemMatcherEnded",g.ProblemMatcherFoundErrors="problemMatcherFoundErrors",g))(mR||{}),fR=(n=>(n[n.Shared=1]="Shared",n[n.Dedicated=2]="Dedicated",n[n.New=3]="New",n))(fR||{}),yn=class{constructor(t,e){this.label=e;if(typeof t!="string")throw Be("name");if(typeof e!="string")throw Be("name");this._id=t}static from(t){switch(t){case"clean":return yn.Clean;case"build":return yn.Build;case"rebuild":return yn.Rebuild;case"test":return yn.Test;default:return}}get id(){return this._id}};yn.Clean=new yn("clean","Clean"),yn.Build=new yn("build","Build"),yn.Rebuild=new yn("rebuild","Rebuild"),yn.Test=new yn("test","Test"),yn=L([Ie],yn);function ZH(r){let t="";for(let e=0;e<r.length;e++)t+=r[e].replace(/,/g,",,")+",";return t}var $i=class{constructor(t,e,n){if(typeof t!="string")throw Be("process");this._args=[],this._process=t,e!==void 0&&(Array.isArray(e)?(this._args=e,this._options=n):this._options=e)}get process(){return this._process}set process(t){if(typeof t!="string")throw Be("process");this._process=t}get args(){return this._args}set args(t){Array.isArray(t)||(t=[]),this._args=t}get options(){return this._options}set options(t){this._options=t}computeId(){let t=[];if(t.push("process"),this._process!==void 0&&t.push(this._process),this._args&&this._args.length>0)for(let e of this._args)t.push(e);return ZH(t)}};$i=L([Ie],$i);var oi=class{constructor(t,e,n){this._args=[];if(Array.isArray(e)){if(!t)throw Be("command can't be undefined or null");if(typeof t!="string"&&typeof t.value!="string")throw Be("command");this._command=t,e&&(this._args=e),this._options=n}else{if(typeof t!="string")throw Be("commandLine");this._commandLine=t,this._options=e}}get commandLine(){return this._commandLine}set commandLine(t){if(typeof t!="string")throw Be("commandLine");this._commandLine=t}get command(){return this._command?this._command:""}set command(t){if(typeof t!="string"&&typeof t.value!="string")throw Be("command");this._command=t}get args(){return this._args}set args(t){this._args=t||[]}get options(){return this._options}set options(t){this._options=t}computeId(){let t=[];if(t.push("shell"),this._commandLine!==void 0&&t.push(this._commandLine),this._command!==void 0&&t.push(typeof this._command=="string"?this._command:this._command.value),this._args&&this._args.length>0)for(let e of this._args)t.push(typeof e=="string"?e:e.value);return ZH(t)}};oi=L([Ie],oi);var gR=(n=>(n[n.Escape=1]="Escape",n[n.Strong=2]="Strong",n[n.Weak=3]="Weak",n))(gR||{}),Gy=(e=>(e[e.Global=1]="Global",e[e.Workspace=2]="Workspace",e))(Gy||{}),Gd=class{constructor(t){this._callback=t}computeId(){return"customExecution"+ct()}set callback(t){this._callback=t}get callback(){return this._callback}},_n=class{constructor(t,e,n,o,i,s){this.__deprecated=!1;this._definition=this.definition=t;let a;typeof e=="string"?(this._name=this.name=e,this._source=this.source=n,this.execution=o,a=i,this.__deprecated=!0):e===1||e===2?(this.target=e,this._name=this.name=n,this._source=this.source=o,this.execution=i,a=s):(this.target=e,this._name=this.name=n,this._source=this.source=o,this.execution=i,a=s),typeof a=="string"?(this._problemMatchers=[a],this._hasDefinedMatchers=!0):Array.isArray(a)?(this._problemMatchers=a,this._hasDefinedMatchers=!0):(this._problemMatchers=[],this._hasDefinedMatchers=!1),this._isBackground=!1,this._presentationOptions=Object.create(null),this._runOptions=Object.create(null)}get _id(){return this.__id}set _id(t){this.__id=t}get _deprecated(){return this.__deprecated}clear(){this.__id!==void 0&&(this.__id=void 0,this._scope=void 0,this.computeDefinitionBasedOnExecution())}computeDefinitionBasedOnExecution(){this._execution instanceof $i?this._definition={type:_n.ProcessType,id:this._execution.computeId()}:this._execution instanceof oi?this._definition={type:_n.ShellType,id:this._execution.computeId()}:this._execution instanceof Gd?this._definition={type:_n.ExtensionCallbackType,id:this._execution.computeId()}:this._definition={type:_n.EmptyType,id:ct()}}get definition(){return this._definition}set definition(t){if(t==null)throw Be("Kind can't be undefined or null");this.clear(),this._definition=t}get scope(){return this._scope}set target(t){this.clear(),this._scope=t}get name(){return this._name}set name(t){if(typeof t!="string")throw Be("name");this.clear(),this._name=t}get execution(){return this._execution}set execution(t){t===null&&(t=void 0),this.clear(),this._execution=t;let e=this._definition.type;(_n.EmptyType===e||_n.ProcessType===e||_n.ShellType===e||_n.ExtensionCallbackType===e)&&this.computeDefinitionBasedOnExecution()}get problemMatchers(){return this._problemMatchers}set problemMatchers(t){if(Array.isArray(t))this.clear(),this._problemMatchers=t,this._hasDefinedMatchers=!0;else{this.clear(),this._problemMatchers=[],this._hasDefinedMatchers=!1;return}}get hasDefinedMatchers(){return this._hasDefinedMatchers}get isBackground(){return this._isBackground}set isBackground(t){t!==!0&&t!==!1&&(t=!1),this.clear(),this._isBackground=t}get source(){return this._source}set source(t){if(typeof t!="string"||t.length===0)throw Be("source must be a string of length > 0");this.clear(),this._source=t}get group(){return this._group}set group(t){t===null&&(t=void 0),this.clear(),this._group=t}get detail(){return this._detail}set detail(t){t===null&&(t=void 0),this._detail=t}get presentationOptions(){return this._presentationOptions}set presentationOptions(t){t==null&&(t=Object.create(null)),this.clear(),this._presentationOptions=t}get runOptions(){return this._runOptions}set runOptions(t){t==null&&(t=Object.create(null)),this.clear(),this._runOptions=t}};_n.ExtensionCallbackType="customExecution",_n.ProcessType="process",_n.ShellType="shell",_n.EmptyType="$empty",_n=L([Ie],_n);var Ug=(n=>(n[n.SourceControl=1]="SourceControl",n[n.Window=10]="Window",n[n.Notification=15]="Notification",n))(Ug||{}),hR;(t=>{function r(e){let n=e;return jo(n.value)?n.tooltip&&!Me(n.tooltip)?(console.log("INVALID view badge, invalid tooltip",n.tooltip),!1):!0:(console.log("INVALID view badge, invalid value",n.value),!1)}t.isViewBadge=r})(hR||={});var Gi=class{constructor(t,e=0){this.collapsibleState=e;E.isUri(t)?this.resourceUri=t:this.label=t}static isTreeItem(t,e){let n=t;if(n.checkboxState!==void 0){let o=jo(n.checkboxState)?n.checkboxState:mt(n.checkboxState)&&jo(n.checkboxState.state)?n.checkboxState.state:void 0,i=!jo(n.checkboxState)&&mt(n.checkboxState)?n.checkboxState.tooltip:void 0;if(o===void 0||o!==1&&o!==0||i!==void 0&&!Me(i))return console.log("INVALID tree item, invalid checkboxState",n.checkboxState),!1}if(t instanceof Gi)return!0;if(n.label!==void 0&&!Me(n.label)&&!n.label?.label)return console.log("INVALID tree item, invalid label",n.label),!1;if(n.id!==void 0&&!Me(n.id))return console.log("INVALID tree item, invalid id",n.id),!1;if(n.iconPath!==void 0&&!Me(n.iconPath)&&!E.isUri(n.iconPath)&&(!n.iconPath||!Me(n.iconPath.id))){let o=n.iconPath;if(!o||!Me(o.light)&&!E.isUri(o.light)&&!Me(o.dark)&&!E.isUri(o.dark))return console.log("INVALID tree item, invalid iconPath",n.iconPath),!1}return n.description!==void 0&&!Me(n.description)&&typeof n.description!="boolean"?(console.log("INVALID tree item, invalid description",n.description),!1):n.resourceUri!==void 0&&!E.isUri(n.resourceUri)?(console.log("INVALID tree item, invalid resourceUri",n.resourceUri),!1):n.tooltip!==void 0&&!Me(n.tooltip)&&!(n.tooltip instanceof zt)?(console.log("INVALID tree item, invalid tooltip",n.tooltip),!1):n.command!==void 0&&!n.command.command?(console.log("INVALID tree item, invalid command",n.command),!1):n.collapsibleState!==void 0&&n.collapsibleState<0&&n.collapsibleState>2?(console.log("INVALID tree item, invalid collapsibleState",n.collapsibleState),!1):n.contextValue!==void 0&&!Me(n.contextValue)?(console.log("INVALID tree item, invalid contextValue",n.contextValue),!1):n.accessibilityInformation!==void 0&&!n.accessibilityInformation?.label?(console.log("INVALID tree item, invalid accessibilityInformation",n.accessibilityInformation),!1):!0}};Gi=L([Ie],Gi);var zy=(n=>(n[n.None=0]="None",n[n.Collapsed=1]="Collapsed",n[n.Expanded=2]="Expanded",n))(zy||{}),qy=(e=>(e[e.Unchecked=0]="Unchecked",e[e.Checked=1]="Checked",e))(qy||{}),Fd=class{constructor(t){this.value=t}async asString(){return typeof this.value=="string"?this.value:JSON.stringify(this.value)}asFile(){}};Fd=L([Ie],Fd);var dl=class extends Fd{},jI=class extends dl{#e;constructor(t){super(""),this.#e=t}asFile(){return this.#e}},QI=class{constructor(t,e,n,o){this.name=t,this.uri=e,this._itemId=n,this._getData=o}data(){return this._getData()}},As,Wd,Mg,_r=class{constructor(t){Uc(this,Wd);Uc(this,As,new Map);for(let[e,n]of t??[]){let o=an(this,As).get(uf(this,Wd,Mg).call(this,e));o?o.push(n):an(this,As).set(uf(this,Wd,Mg).call(this,e),[n])}}get(t){return an(this,As).get(uf(this,Wd,Mg).call(this,t))?.[0]}set(t,e){an(this,As).set(uf(this,Wd,Mg).call(this,t),[e])}forEach(t,e){for(let[n,o]of an(this,As))for(let i of o)t.call(e,i,n,this)}*[Symbol.iterator](){for(let[t,e]of an(this,As))for(let n of e)yield[t,n]}};As=new WeakMap,Wd=new WeakSet,Mg=function(t){return t.toLowerCase()},_r=L([Ie],_r);var Bu=class{constructor(t,e,n){this.insertText=t,this.title=e,this.kind=n}};Bu=L([Ie],Bu);var vR=(e=>(e[e.Automatic=0]="Automatic",e[e.PasteAs=1]="PasteAs",e))(vR||{}),Pr=class r{constructor(t){this.value=t}static{this.sep="."}append(...t){return new r((this.value?[this.value,...t]:t).join(r.sep))}intersects(t){return this.contains(t)||t.contains(this)}contains(t){return this.value===t.value||t.value.startsWith(this.value+r.sep)}};Pr.Empty=new Pr("");Pr.Text=new Pr("text");Pr.TextUpdateImports=Pr.Text.append("updateImports");var XI=class{constructor(t,e,n){this.title=e,this.insertText=t,this.kind=n}},En=class{constructor(t,e){this.id=t,this.color=e}static isThemeIcon(t){return typeof t.id!="string"?(console.log("INVALID ThemeIcon, invalid id",t.id),!1):!0}};En=L([Ie],En);En.File=new En("file");En.Folder=new En("folder");var Os=class{constructor(t){this.id=t}};Os=L([Ie],Os);var Ky=(n=>(n[n.Global=1]="Global",n[n.Workspace=2]="Workspace",n[n.WorkspaceFolder=3]="WorkspaceFolder",n))(Ky||{}),zi=class{get base(){return this._base}set base(t){this._base=t,this._baseUri=E.file(t)}get baseUri(){return this._baseUri}set baseUri(t){this._baseUri=t,this._base=t.fsPath}constructor(t,e){if(typeof t!="string"&&(!t||!E.isUri(t)&&!E.isUri(t.uri)))throw Be("base");if(typeof e!="string")throw Be("pattern");typeof t=="string"?this.baseUri=E.file(t):E.isUri(t)?this.baseUri=t:this.baseUri=t.uri,this.pattern=e}toJSON(){return{pattern:this.pattern,base:this.base,baseUri:this.baseUri.toJSON()}}};zi=L([Ie],zi);var eB=new WeakMap;function tB(r,t){eB.set(r,t)}var Ls=class{constructor(t,e,n,o,i){this.enabled=typeof t=="boolean"?t:!0,typeof e=="string"&&(this.condition=e),typeof n=="string"&&(this.hitCondition=n),typeof o=="string"&&(this.logMessage=o),typeof i=="string"&&(this.mode=i)}get id(){return this._id||(this._id=eB.get(this)??ct()),this._id}};Ls=L([Ie],Ls);var ri=class extends Ls{constructor(t,e,n,o,i,s){if(super(e,n,o,i,s),t===null)throw Be("location");this.location=t}};ri=L([Ie],ri);var ii=class extends Ls{constructor(t,e,n,o,i,s){super(e,n,o,i,s),this.functionName=t}};ii=L([Ie],ii);var Hd=class extends Ls{constructor(t,e,n,o,i,s,a,l){if(super(o,i,s,a,l),!e)throw Be("dataId");this.label=t,this.dataId=e,this.canPersist=n}};Hd=L([Ie],Hd);var el=class{constructor(t,e,n){this.command=t,this.args=e||[],this.options=n}};el=L([Ie],el);var Ms=class{constructor(t,e){this.port=t,this.host=e}};Ms=L([Ie],Ms);var tl=class{constructor(t){this.path=t}};tl=L([Ie],tl);var Ns=class{constructor(t){this.implementation=t}};Ns=L([Ie],Ns);var qu=class{constructor(t,e,n){this.session=t;this.threadId=e;this.frameId=n}},Ku=class{constructor(t,e){this.session=t;this.threadId=e}},nl=class{constructor(t,e){this.range=t,this.expression=e}};nl=L([Ie],nl);var Jy=(e=>(e[e.Invoke=0]="Invoke",e[e.Automatic=1]="Automatic",e))(Jy||{}),jy=(i=>(i[i.Other=0]="Other",i[i.Empty=1]="Empty",i[i.TokenCancellation=2]="TokenCancellation",i[i.LostRace=3]="LostRace",i[i.NotTaken=4]="NotTaken",i))(jy||{}),ol=class{constructor(t,e){this.range=t,this.text=e}};ol=L([Ie],ol);var rl=class{constructor(t,e,n=!0){this.range=t,this.variableName=e,this.caseSensitiveLookup=n}};rl=L([Ie],rl);var il=class{constructor(t,e){this.range=t,this.expression=e}};il=L([Ie],il);var Vu=class{constructor(t,e){this.frameId=t,this.stoppedLocation=e}};Vu=L([Ie],Vu);var bR=(t=>(t[t.AIGenerated=1]="AIGenerated",t))(bR||{}),Qy=(e=>(e[e.Invoke=0]="Invoke",e[e.Automatic=1]="Automatic",e))(Qy||{}),YI=class{constructor(t,e){this.newSymbolName=t,this.tags=e}},Xy=(n=>(n[n.Changed=1]="Changed",n[n.Created=2]="Created",n[n.Deleted=3]="Deleted",n))(Xy||{}),vt=class extends Error{static FileExists(t){return new vt(t,"EntryExists",vt.FileExists)}static FileNotFound(t){return new vt(t,"EntryNotFound",vt.FileNotFound)}static FileNotADirectory(t){return new vt(t,"EntryNotADirectory",vt.FileNotADirectory)}static FileIsADirectory(t){return new vt(t,"EntryIsADirectory",vt.FileIsADirectory)}static NoPermissions(t){return new vt(t,"NoPermissions",vt.NoPermissions)}static Unavailable(t){return new vt(t,"Unavailable",vt.Unavailable)}constructor(t,e="Unknown",n){super(E.isUri(t)?t.toString(!0):t),this.code=n?.name??"Unknown",vP(this,e),Object.setPrototypeOf(this,vt.prototype),typeof Error.captureStackTrace=="function"&&typeof n=="function"&&Error.captureStackTrace(this,n)}};vt=L([Ie],vt);var Wu=class{constructor(t,e,n){this.start=t,this.end=e,this.kind=n}};Wu=L([Ie],Wu);var Yy=(n=>(n[n.Comment=1]="Comment",n[n.Imports=2]="Imports",n[n.Region=3]="Region",n))(Yy||{}),Zy=(e=>(e[e.Collapsed=0]="Collapsed",e[e.Expanded=1]="Expanded",e))(Zy||{}),IR=(e=>(e[e.Editing=0]="Editing",e[e.Preview=1]="Preview",e))(IR||{}),yR=(e=>(e[e.Published=0]="Published",e[e.Draft=1]="Draft",e))(yR||{}),eE=(e=>(e[e.Unresolved=0]="Unresolved",e[e.Resolved=1]="Resolved",e))(eE||{}),tE=(e=>(e[e.Current=0]="Current",e[e.Outdated=1]="Outdated",e))(tE||{}),nE=(e=>(e[e.Reply=1]="Reply",e[e.Comment=2]="Comment",e))(nE||{}),zd=class{constructor(t,e=[]){this.tokenTypes=t,this.tokenModifiers=e}};function fG(r){return typeof r>"u"||x0(r)}var ZI=class r{constructor(t){if(this._prevLine=0,this._prevChar=0,this._dataIsSortedAndDeltaEncoded=!0,this._data=[],this._dataLen=0,this._tokenTypeStrToInt=new Map,this._tokenModifierStrToInt=new Map,this._hasLegend=!1,t){this._hasLegend=!0;for(let e=0,n=t.tokenTypes.length;e<n;e++)this._tokenTypeStrToInt.set(t.tokenTypes[e],e);for(let e=0,n=t.tokenModifiers.length;e<n;e++)this._tokenModifierStrToInt.set(t.tokenModifiers[e],e)}}push(t,e,n,o,i){if(typeof t=="number"&&typeof e=="number"&&typeof n=="number"&&typeof o=="number"&&(typeof i=="number"||typeof i>"u"))return typeof i>"u"&&(i=0),this._pushEncoded(t,e,n,o,i);if(Se.isRange(t)&&typeof e=="string"&&fG(n))return this._push(t,e,n);throw Be()}_push(t,e,n){if(!this._hasLegend)throw new Error("Legend must be provided in constructor");if(t.start.line!==t.end.line)throw new Error("`range` cannot span multiple lines");if(!this._tokenTypeStrToInt.has(e))throw new Error("`tokenType` is not in the provided legend");let o=t.start.line,i=t.start.character,s=t.end.character-t.start.character,a=this._tokenTypeStrToInt.get(e),l=0;if(n)for(let d of n){if(!this._tokenModifierStrToInt.has(d))throw new Error("`tokenModifier` is not in the provided legend");let c=this._tokenModifierStrToInt.get(d);l|=1<<c>>>0}this._pushEncoded(o,i,s,a,l)}_pushEncoded(t,e,n,o,i){if(this._dataIsSortedAndDeltaEncoded&&(t<this._prevLine||t===this._prevLine&&e<this._prevChar)){this._dataIsSortedAndDeltaEncoded=!1;let l=this._data.length/5|0,d=0,c=0;for(let u=0;u<l;u++){let f=this._data[5*u],g=this._data[5*u+1];f===0?(f=d,g+=c):f+=d,this._data[5*u]=f,this._data[5*u+1]=g,d=f,c=g}}let s=t,a=e;this._dataIsSortedAndDeltaEncoded&&this._dataLen>0&&(s-=this._prevLine,s===0&&(a-=this._prevChar)),this._data[this._dataLen++]=s,this._data[this._dataLen++]=a,this._data[this._dataLen++]=n,this._data[this._dataLen++]=o,this._data[this._dataLen++]=i,this._prevLine=t,this._prevChar=e}static _sortAndDeltaEncode(t){let e=[],n=t.length/5|0;for(let a=0;a<n;a++)e[a]=a;e.sort((a,l)=>{let d=t[5*a],c=t[5*l];if(d===c){let u=t[5*a+1],f=t[5*l+1];return u-f}return d-c});let o=new Uint32Array(t.length),i=0,s=0;for(let a=0;a<n;a++){let l=5*e[a],d=t[l+0],c=t[l+1],u=t[l+2],f=t[l+3],g=t[l+4],I=d-i,h=I===0?c-s:c,C=5*a;o[C+0]=I,o[C+1]=h,o[C+2]=u,o[C+3]=f,o[C+4]=g,i=d,s=c}return o}build(t){return this._dataIsSortedAndDeltaEncoded?new si(new Uint32Array(this._data),t):new si(r._sortAndDeltaEncode(this._data),t)}},si=class{constructor(t,e){this.resultId=e,this.data=t}},Ju=class{constructor(t,e,n){this.start=t,this.deleteCount=e,this.data=n}},cl=class{constructor(t,e){this.resultId=e,this.edits=t}},oE=(e=>(e[e.Separate=0]="Separate",e[e.MergeWithParent=1]="MergeWithParent",e))(oE||{}),ey=class{constructor(t){this.name=t}},ER=(n=>(n[n.Title=1]="Title",n[n.Inline=2]="Inline",n[n.Input=3]="Input",n))(ER||{}),Bi=class{constructor(){}};Bi.Back={iconPath:new En("arrow-left")},Bi=L([Ie],Bi);var rE=(e=>(e[e.Separator=-1]="Separator",e[e.Default=0]="Default",e))(rE||{}),iE=(n=>(n[n.Info=1]="Info",n[n.Warning=2]="Warning",n[n.Error=3]="Error",n))(iE||{}),sE=(e=>(e[e.UI=1]="UI",e[e.Workspace=2]="Workspace",e))(sE||{}),qd=class{static validate(t){if(typeof t.badge=="string"){let e=H_(t.badge,0);if(e<t.badge.length&&(e+=H_(t.badge,e)),t.badge.length>e)throw new Error("The 'badge'-property must be undefined or a short character")}else if(t.badge&&!En.isThemeIcon(t.badge))throw new Error("The 'badge'-property is not a valid ThemeIcon");if(!t.color&&!t.badge&&!t.tooltip)throw new Error("The decoration is empty");return!0}constructor(t,e,n){this.badge=t,this.tooltip=e,this.color=n}},Bd=class{constructor(t){this.kind=t}};Bd=L([Ie],Bd);var aE=(o=>(o[o.Light=1]="Light",o[o.Dark=2]="Dark",o[o.HighContrast=3]="HighContrast",o[o.HighContrastLight=4]="HighContrastLight",o))(aE||{}),ty=class{constructor(t,e,n){this.label=t;this.uri=e;this.position=n}},SR=(n=>(n[n.Idle=1]="Idle",n[n.Pending=2]="Pending",n[n.Executing=3]="Executing",n))(SR||{}),lE=(e=>(e[e.Left=1]="Left",e[e.Right=2]="Right",e))(lE||{}),dE=(o=>(o[o.Default=0]="Default",o[o.InCenter=1]="InCenter",o[o.InCenterIfOutsideViewport=2]="InCenterIfOutsideViewport",o[o.AtTop=3]="AtTop",o))(dE||{}),ny=class{constructor(t,e){this.text=t;this.alignment=e}},xR=(e=>(e[e.Default=1]="Default",e[e.Preferred=2]="Preferred",e))(xR||{}),cE=(n=>(n[n.Default=1]="Default",n[n.Preferred=2]="Preferred",n[n.Hidden=-1]="Hidden",n))(cE||{}),ju=class{constructor(t,e=[]){this.uri=t;this.provides=Rn(e)}},oy=class{constructor(t){this.label=t}},uE=(e=>(e[e.Named=1]="Named",e[e.Indexed=2]="Indexed",e))(uE||{}),$u=class{constructor(t,e){this.label=t;this.timestamp=e}};$u=L([Ie],$u);var pE=(n=>(n[n.Production=1]="Production",n[n.Development=2]="Development",n[n.Test=3]="Test",n))(pE||{}),mE=(e=>(e[e.Node=1]="Node",e[e.Webworker=2]="Webworker",e))(mE||{}),Fg=(o=>(o[o.Other=0]="Other",o[o.Comment=1]="Comment",o[o.String=2]="String",o[o.RegEx=3]="RegEx",o))(Fg||{}),ry=class{constructor(t,e){this.ranges=t;this.wordPattern=e}},iy=class{constructor(t){this._autoForwardAction=t}get autoForwardAction(){return this._autoForwardAction}},CR=(s=>(s[s.Queued=1]="Queued",s[s.Running=2]="Running",s[s.Passed=3]="Passed",s[s.Failed=4]="Failed",s[s.Skipped=5]="Skipped",s[s.Errored=6]="Errored",s))(CR||{}),fE=(n=>(n[n.Run=1]="Run",n[n.Debug=2]="Debug",n[n.Coverage=3]="Coverage",n))(fE||{}),Qu=class{constructor(t,e,n){this.controllerId=t;this.profileId=e;this.kind=n}},sl=class{constructor(t=void 0,e=void 0,n=void 0,o=!1,i=!0){this.include=t;this.exclude=e;this.profile=n;this.continuous=o;this.preserveFocus=i}};sl=L([Ie],sl);var qi=class{constructor(t){this.message=t}static diff(t,e,n){let o=new qi(t);return o.expectedOutput=e,o.actualOutput=n,o}};qi=L([Ie],qi);var Us=class{constructor(t){this.id=t}};Us=L([Ie],Us);var sy=class{constructor(t,e,n){this.label=t;this.uri=e;this.position=n}},$d=class{constructor(t,e){this.covered=t;this.total=e;Hg(this)}};function Hg(r){if(r){if(r.covered>r.total)throw new Error(`The total number of covered items (${r.covered}) cannot be greater than the total (${r.total})`);if(r.total<0)throw new Error(`The number of covered items (${r.total}) cannot be negative`)}}var Fs=class r{constructor(t,e,n,o,i=[]){this.uri=t;this.statementCoverage=e;this.branchCoverage=n;this.declarationCoverage=o;this.includesTests=i}static fromDetails(t,e){let n=new $d(0,0),o=new $d(0,0),i=new $d(0,0);for(let a of e)if("branches"in a){n.total+=1,n.covered+=a.executed?1:0;for(let l of a.branches)o.total+=1,o.covered+=l.executed?1:0}else i.total+=1,i.covered+=a.executed?1:0;let s=new r(t,n,o.total>0?o:void 0,i.total>0?i:void 0);return s.detailedCoverage=e,s}},Xu=class{constructor(t,e,n=[]){this.executed=t;this.location=e;this.branches=n}get executionCount(){return+this.executed}set executionCount(t){this.executed=t}},Yu=class{constructor(t,e,n){this.executed=t;this.location=e;this.label=n}get executionCount(){return+this.executed}set executionCount(t){this.executed=t}},Zu=class{constructor(t,e,n){this.name=t;this.executed=e;this.location=n}get executionCount(){return+this.executed}set executionCount(t){this.executed=t}},TR=(o=>(o[o.None=0]="None",o[o.Option=1]="Option",o[o.Default=2]="Default",o[o.Preferred=3]="Preferred",o))(TR||{}),_R=(n=>(n[n.Untrusted=0]="Untrusted",n[n.Trusted=1]="Trusted",n[n.Unspecified=2]="Unspecified",n))(_R||{}),PR=(s=>(s[s.Notify=1]="Notify",s[s.OpenBrowser=2]="OpenBrowser",s[s.OpenPreview=3]="OpenPreview",s[s.Silent=4]="Silent",s[s.Ignore=5]="Ignore",s[s.OpenBrowserOnce=6]="OpenBrowserOnce",s))(PR||{}),ul=class{constructor(t,e,n,o,i,s){this.kind=t,this.name=e,this.detail=n,this.uri=o,this.range=i,this.selectionRange=s}},pl=class{constructor(t){this.uri=t}},Hs=class{constructor(t,e){this.original=t;this.modified=e}},ep=class{constructor(t,e,n,o){this.base=t;this.input1=e;this.input2=n;this.result=o}},ml=class{constructor(t,e){this.uri=t;this.viewType=e}},tp=class{constructor(t){this.viewType=t}},fl=class{constructor(t,e){this.uri=t;this.notebookType=e}},gl=class{constructor(t,e,n){this.original=t;this.modified=e;this.notebookType=n}},np=class{constructor(){}},op=class{constructor(t,e){this.uri=t;this.inputBoxUri=e}},rp=class{constructor(){}},ip=class{constructor(t){this.textDiffs=t}},DR=(e=>(e[e.Down=0]="Down",e[e.Up=1]="Up",e))(DR||{}),wR=(e=>(e[e.Action=1]="Action",e[e.Toolbar=2]="Toolbar",e))(wR||{}),RR=(n=>(n[n.Short=1]="Short",n[n.Medium=2]="Medium",n[n.Full=3]="Full",n))(RR||{}),ay=class{constructor(t,e,n){this.id=t,this.label=e,this.values=n}},gE=(n=>(n[n.Accepted=1]="Accepted",n[n.Rejected=2]="Rejected",n[n.Saved=3]="Saved",n))(gE||{}),kR=(n=>(n[n.Keep=1]="Keep",n[n.Undo=2]="Undo",n[n.UserModification=3]="UserModification",n))(kR||{}),AR=(i=>(i[i.Unhelpful=0]="Unhelpful",i[i.Helpful=1]="Helpful",i[i.Undone=2]="Undone",i[i.Accepted=3]="Accepted",i[i.Bug=4]="Bug",i))(AR||{}),hE=(e=>(e[e.Unhelpful=0]="Unhelpful",e[e.Helpful=1]="Helpful",e))(hE||{}),Bs=class{constructor(t){if(typeof t!="string"&&t.isTrusted===!0)throw new Error("The boolean form of MarkdownString.isTrusted is NOT supported for chat participants.");this.value=typeof t=="string"?new zt(t):t}},Ji=class{constructor(t,e){if(typeof t!="string"&&t.isTrusted===!0)throw new Error("The boolean form of MarkdownString.isTrusted is NOT supported for chat participants.");this.value=typeof t=="string"?new zt(t):t,this.vulnerabilities=e}},Vs=class{constructor(t,e,n,o){this.title=t,this.message=e,this.data=n,this.buttons=o}},Ws=class{constructor(t,e){this.value=t,this.baseUri=e}},Kd=class{constructor(t,e,n){this.value=t,this.title=e,this.readOnly=n}},ly=class{constructor(t,e){this.data=t,this.mimeType=e}},sp=class{constructor(t,e,n,o){this.description=t,this.agentName=e,this.prompt=n,this.result=o}},Jd=class{constructor(t,e){this.uris=t;this.callback=e;this.applied=new Promise(n=>{this.didGetApplied=n})}},ji=class{constructor(t,e){this.value=t,this.value2=t,this.title=e}},jd=class{constructor(t){this.value=t}},hl=class{constructor(t,e){this.value=t,this.task=e}},ai=class{constructor(t,e,n){this.value=t,this.id=e,this.metadata=n}},$s=class{constructor(t,e,n,o){this.hookType=t,this.stopReason=e,this.systemMessage=n,this.metadata=o}},Qi=class{constructor(t){if(typeof t!="string"&&t.isTrusted===!0)throw new Error("The boolean form of MarkdownString.isTrusted is NOT supported for chat participants.");this.value=typeof t=="string"?new zt(t):t}},Gs=class{constructor(t){this.value=t}},Dr=class{constructor(t,e,n){this.value=t,this.iconPath=e,this.options=n}},zs=class{constructor(t,e,n){this.value=t,this.isEdit=e,this.undoStopId=n}},qs=class{constructor(t,e,n){this.value=t,this.license=e,this.snippet=n}},Ks=class{constructor(t,e){this.uri=t;this.range=e}},vl=class{constructor(t){this.extensions=t}},bl=class{constructor(t,e,n,o,i){this.title=e;this.description=n;this.author=o;this.linkTag=i;Ta(t)?(this.uri=t,this.command={title:"Open Pull Request",command:"vscode.open",arguments:[t]}):this.command=t}toJSON(){return{$mid:26,uri:this.uri,title:this.title,description:this.description,author:this.author}}},vE=(n=>(n[n.Text=1]="Text",n[n.SingleSelect=2]="SingleSelect",n[n.MultiSelect=3]="MultiSelect",n))(vE||{}),ap=class{constructor(t,e,n,o){this.id=t,this.type=e,this.title=n,this.message=o?.message,this.options=o?.options,this.defaultValue=o?.defaultValue,this.allowFreeformInput=o?.allowFreeformInput}},Xi=class{constructor(t,e=!0){this.questions=t,this.allowSkip=e}},Yi=class{constructor(t,e){this.uri=t,e===!0?(this.isDone=!0,this.edits=[]):this.edits=Array.isArray(e)?e:[e]}},Js=class{constructor(t,e){this.uri=t,e===!0?(this.isDone=!0,this.edits=[]):this.edits=Array.isArray(e)?e:[e]}},Il=class{constructor(t){this.edits=t}};var Qd=class{constructor(t,e,n){this.toolName=t,this.toolCallId=e,this.errorMessage=n}},js=class{constructor(t,e,n,o,i,s,a,l){this.prompt=t;this.command=e;this.references=n;this.participant=o;this.toolReferences=i;this.editedFileEvents=s;this.id=a;this.modelId=l}},lp=class{constructor(t,e,n,o){this.response=t;this.result=e;this.participant=n;this.command=o}},dy=class{constructor(t,e,n,o){this.response=t;this.result=e;this.participant=n;this.command=o}},bE=(o=>(o[o.Panel=1]="Panel",o[o.Terminal=2]="Terminal",o[o.Notebook=3]="Notebook",o[o.Editor=4]="Editor",o))(bE||{}),OR=(o=>(o[o.Failed=0]="Failed",o[o.Completed=1]="Completed",o[o.InProgress=2]="InProgress",o[o.NeedsInput=3]="NeedsInput",o))(OR||{}),LR=(o=>(o[o.Trace=0]="Trace",o[o.Info=1]="Info",o[o.Warning=2]="Warning",o[o.Error=3]="Error",o))(LR||{}),IE=(e=>(e[e.Success=0]="Success",e[e.Error=1]="Error",e))(IE||{}),cy=class{constructor(t,e){this._kind="toolCall";this.toolName=t,this.created=e}},uy=class{constructor(t){this._kind="modelTurn";this.created=t}},py=class{constructor(t,e,n){this._kind="generic";this.name=t,this.level=e,this.created=n}},my=class{constructor(t,e){this._kind="subagentInvocation";this.agentName=t,this.created=e}},fy=class{constructor(t,e){this.name=t,this.content=e}},gy=class{constructor(t,e){this._kind="userMessage";this.message=t,this.created=e,this.sections=[]}},hy=class{constructor(t,e){this._kind="agentResponse";this.message=t,this.created=e,this.sections=[]}},vy=class{constructor(t){this._kind="text";this.value=t}},yE=(e=>(e[e.User=0]="User",e[e.Agent=1]="Agent",e))(yE||{}),by=class{constructor(t,e,n){this._kind="messageContent";this.type=t,this.message=e,this.sections=n}},Iy=class{constructor(t){this._kind="toolCallContent";this.toolName=t}},yy=class{constructor(t){this._kind="modelTurnContent";this.requestName=t}},Ey=class{constructor(t,e,n,o){this.modifiedUri=t;this.insertions=e;this.deletions=n;this.originalUri=o}},Sy=class{constructor(t,e,n,o,i){this.uri=t;this.originalUri=e;this.modifiedUri=n;this.insertions=o;this.deletions=i}},MR=(n=>(n[n.Complete=1]="Complete",n[n.Partial=2]="Partial",n[n.Omitted=3]="Omitted",n))(MR||{}),NR=(n=>(n[n.NoReason=0]="NoReason",n[n.FilteredContentRetry=1]="FilteredContentRetry",n[n.CopyrightContentRetry=2]="CopyrightContentRetry",n))(NR||{}),dp=class{constructor(t,e,n,o){this.editor=t;this.document=e;this.selection=n;this.wholeRange=o}},cp=class{constructor(t){this.cell=t}},up=class{constructor(t,e,n){this.mimeType=t,this.data=e,this.reference=n}},yl=class{constructor(t){this.diagnostics=t}},Bg=(n=>(n[n.User=1]="User",n[n.Assistant=2]="Assistant",n[n.System=3]="System",n))(Bg||{}),Zi=class{constructor(t,e,n){this.callId=t,this.content=e,this.isError=n??!1}},UR=(n=>(n[n.Info=0]="Info",n[n.Warning=1]="Warning",n[n.Error=2]="Error",n))(UR||{}),pp=class r{constructor(t,e,n){this._content=[];this.role=t,this.content=e,this.name=n}static User(t,e){return new r(1,t,e)}static Assistant(t,e){return new r(2,t,e)}set content(t){typeof t=="string"?this._content=[new Kt(t)]:this._content=t}get content(){return this._content}},mp=class r{constructor(t,e,n){this._content=[];this.role=t,this.content=e,this.name=n}static User(t,e){return new r(1,t,e)}static Assistant(t,e){return new r(2,t,e)}set content(t){typeof t=="string"?this._content=[new Kt(t)]:this._content=t}get content(){return this._content}set content2(t){t&&(this.content=t.map(e=>typeof e=="string"?new Kt(e):e))}get content2(){return this.content.map(t=>t instanceof Kt?t.value:t)}},wr=class{constructor(t,e,n){this.callId=t,this.name=e,this.input=n}},EE=(n=>(n[n.Assistant=0]="Assistant",n[n.User=1]="User",n[n.Extension=2]="Extension",n))(EE||{}),Kt=class{constructor(t,e){this.value=t,e=e}toJSON(){return{$mid:21,value:this.value,audience:this.audience}}},Pn=class r{constructor(t,e,n){this.mimeType=e,this.data=t,this.audience=n}static image(t,e){return new r(t,e)}static json(t,e="text/x-json"){let n=JSON.stringify(t,void 0,"	");return new r(ce.fromString(n).buffer,e)}static text(t,e=Io.text){return new r(ce.fromString(t).buffer,e)}toJSON(){return{$mid:24,mimeType:this.mimeType,data:this.data,audience:this.audience}}},FR=(i=>(i.PNG="image/png",i.JPEG="image/jpeg",i.GIF="image/gif",i.WEBP="image/webp",i.BMP="image/bmp",i))(FR||{}),li=class{constructor(t,e,n){this.value=t,this.id=e,this.metadata=n}toJSON(){return{$mid:22,value:this.value,id:this.id,metadata:this.metadata}}},Rr=class{constructor(t){this.value=t}toJSON(){return{$mid:23,value:this.value}}};var zo=class r extends Error{static#e="LanguageModelError";static NotFound(t){return new r(t,r.NotFound.name)}static NoPermissions(t){return new r(t,r.NoPermissions.name)}static Blocked(t){return new r(t,r.Blocked.name)}static tryDeserialize(t){if(t.name===r.#e)return new r(t.message,t.code,t.cause)}constructor(t,e,n){super(t,{cause:n}),this.name=r.#e,this.code=e??""}},El=class{constructor(t){this.content=t}toJSON(){return{$mid:20,content:this.content}}},xy=class{constructor(t){this.content=t}toJSON(){return{$mid:20,content:this.content}}},Cy=class extends El{},SE=(e=>(e[e.Auto=1]="Auto",e[e.Required=2]="Required",e))(SE||{}),fp=class{constructor(t,e){this.id=t;this.label=e}},gp=class{constructor(t,e,n){this.label=t;this.name=e;this.instructions=n}},HR=(o=>(o[o.SymbolInformation=1]="SymbolInformation",o[o.CommandInformation=2]="CommandInformation",o[o.SearchInformation=3]="SearchInformation",o[o.SettingInformation=4]="SettingInformation",o))(HR||{}),BR=(n=>(n[n.EMBEDDED=1]="EMBEDDED",n[n.LLM_RANKED=2]="LLM_RANKED",n[n.CANCELED=3]="CANCELED",n))(BR||{}),VR=(i=>(i[i.Started=1]="Started",i[i.Recognizing=2]="Recognizing",i[i.Recognized=3]="Recognized",i[i.Stopped=4]="Stopped",i[i.Error=5]="Error",i))(VR||{}),WR=(n=>(n[n.Started=1]="Started",n[n.Stopped=2]="Stopped",n[n.Error=3]="Error",n))(WR||{}),$R=(e=>(e[e.Recognized=1]="Recognized",e[e.Stopped=2]="Stopped",e))($R||{}),GR=(e=>(e[e.Initial=0]="Initial",e[e.Dynamic=1]="Dynamic",e))(GR||{}),Xd=class{constructor(t,e,n,o={},i,s){this.label=t;this.command=e;this.args=n;this.env=o;this.version=i;this.metadata=s}},Yd=class{constructor(t,e,n={},o,i,s){this.label=t;this.uri=e;this.headers=n;this.version=o;this.metadata=i;this.authentication=s}};var oo;(e=>{function r(n){let{selectionStartLineNumber:o,selectionStartColumn:i,positionLineNumber:s,positionColumn:a}=n,l=new we(o-1,i-1),d=new we(s-1,a-1);return new Nn(l,d)}e.to=r;function t(n){let{anchor:o,active:i}=n;return{selectionStartLineNumber:o.line+1,selectionStartColumn:o.character+1,positionLineNumber:i.line+1,positionColumn:i.character+1}}e.from=t})(oo||={});var j;(e=>{function r(n){if(!n)return;let{start:o,end:i}=n;return{startLineNumber:o.line+1,startColumn:o.character+1,endLineNumber:i.line+1,endColumn:i.character+1}}e.from=r;function t(n){if(!n)return;let{startLineNumber:o,startColumn:i,endLineNumber:s,endColumn:a}=n;return new Se(o-1,i-1,s-1,a-1)}e.to=t})(j||={});var kr;(e=>{function r(n){return{uri:n.uri,range:j.from(n.range)}}e.from=r;function t(n){return new qt(E.revive(n.uri),j.to(n.range))}e.to=t})(kr||={});var YR;(t=>{function r(e){switch(e){case 1:return 1;case 0:return 0;case 3:return 3;case 2:return 2}}t.to=r})(YR||={});var st;(e=>{function r(n){return new we(n.lineNumber-1,n.column-1)}e.to=r;function t(n){return{lineNumber:n.line+1,column:n.character+1}}e.from=t})(st||={});var di;(n=>{function r(o,i,s){return pt(Rn(o).map(a=>t(a,i,s)))}n.from=r;function t(o,i,s){if(typeof o=="string")return{$serialized:!0,language:o,isBuiltin:s?.isBuiltin};if(o)return{$serialized:!0,language:o.language,scheme:e(o.scheme,i),pattern:To.from(o.pattern)??void 0,exclusive:o.exclusive,notebookType:o.notebookType,isBuiltin:s?.isBuiltin}}function e(o,i){return i&&typeof o=="string"?i.transformOutgoingScheme(o):o}})(di||={});var zR;(e=>{function r(n){switch(n){case 1:return 1;case 2:return 2}}e.from=r;function t(n){switch(n){case 1:return 1;case 2:return 2;default:return}}e.to=t})(zR||={});var Ys;(e=>{function r(n){let o;return n.code&&(Me(n.code)||jo(n.code)?o=String(n.code):o={value:String(n.code.value),target:n.code.target}),{...j.from(n.range),message:n.message,source:n.source,code:o,severity:xE.from(n.severity),relatedInformation:n.relatedInformation&&n.relatedInformation.map(qR.from),tags:Array.isArray(n.tags)?pt(n.tags.map(zR.from)):void 0}}e.from=r;function t(n){let o=new Rs(j.to(n),n.message,xE.to(n.severity));return o.source=n.source,o.code=Me(n.code)?n.code:n.code?.value,o.relatedInformation=n.relatedInformation&&n.relatedInformation.map(qR.to),o.tags=n.tags&&pt(n.tags.map(zR.to)),o}e.to=t})(Ys||={});var qR;(e=>{function r(n){return{...j.from(n.location.range),message:n.message,resource:n.location.uri}}e.from=r;function t(n){return new Ui(new qt(n.resource,j.to(n)),n.message)}e.to=t})(qR||={});var xE;(e=>{function r(n){switch(n){case 0:return 8;case 1:return 4;case 2:return 2;case 3:return 1}return 8}e.from=r;function t(n){switch(n){case 2:return 2;case 4:return 1;case 8:return 0;case 1:return 3;default:return 0}}e.to=t})(xE||={});var Vt;(e=>{function r(n){return typeof n=="number"&&n>=1?n-1:n===-2?uH:cH}e.from=r;function t(n){if(typeof n=="number"&&n>=0)return n+1;throw new Error("invalid 'EditorGroupColumn'")}e.to=t})(Vt||={});function yG(r){return typeof r.range<"u"}function ZR(r){return r.length===0?!0:!!yG(r[0])}var ye;(s=>{function r(a){return a.map(s.from)}s.fromMany=r;function t(a){return a&&typeof a=="object"&&typeof a.language=="string"&&typeof a.value=="string"}function e(a){let l;if(t(a)){let{language:u,value:f}=a;l={value:"```"+u+`
`+f+"\n```\n"}}else zt.isMarkdownString(a)?l={value:a.value,isTrusted:a.isTrusted,supportThemeIcons:a.supportThemeIcons,supportHtml:a.supportHtml,supportAlertSyntax:a.supportAlertSyntax,baseUri:a.baseUri}:typeof a=="string"?l={value:a}:l={value:""};let d=Object.create(null);l.uris=d;let c=({href:u})=>{try{let f=E.parse(u,!0);f=f.with({query:n(f.query,d)}),d[u]=f}catch{}return""};return Ht.walkTokens(Ht.lexer(l.value),u=>{u.type==="link"?c({href:u.href}):u.type==="image"&&typeof u.href=="string"&&c(CF(u.href))}),l}s.from=e;function n(a,l){if(!a)return a;let d;try{d=Mb(a)}catch{}if(!d)return a;let c=!1;return d=Es(d,u=>{if(E.isUri(u)){let f=`__uri_${Math.random().toString(16).slice(2,8)}`;return l[f]=u,c=!0,f}else return}),c?JSON.stringify(d):a}function o(a){let l=new zt(a.value,a.supportThemeIcons);return l.isTrusted=a.isTrusted,l.supportHtml=a.supportHtml,l.supportAlertSyntax=a.supportAlertSyntax,l.baseUri=a.baseUri?E.from(a.baseUri):void 0,l}s.to=o;function i(a){if(a)return typeof a=="string"?a:s.from(a)}s.fromStrict=i})(ye||={});function ek(r){return ZR(r)?r.map(t=>({range:j.from(t.range),hoverMessage:Array.isArray(t.hoverMessage)?ye.fromMany(t.hoverMessage):t.hoverMessage?ye.from(t.hoverMessage):void 0,renderOptions:t.renderOptions})):r.map(t=>({range:j.from(t)}))}function Jg(r){return typeof r>"u"?r:typeof r=="string"?E.file(r):r}var Vg;(t=>{function r(e){return typeof e>"u"?e:{contentText:e.contentText,contentIconPath:e.contentIconPath?Jg(e.contentIconPath):void 0,border:e.border,borderColor:e.borderColor,fontStyle:e.fontStyle,fontWeight:e.fontWeight,textDecoration:e.textDecoration,color:e.color,backgroundColor:e.backgroundColor,margin:e.margin,width:e.width,height:e.height}}t.from=r})(Vg||={});var KR;(t=>{function r(e){return typeof e>"u"?e:{backgroundColor:e.backgroundColor,outline:e.outline,outlineColor:e.outlineColor,outlineStyle:e.outlineStyle,outlineWidth:e.outlineWidth,border:e.border,borderColor:e.borderColor,borderRadius:e.borderRadius,borderSpacing:e.borderSpacing,borderStyle:e.borderStyle,borderWidth:e.borderWidth,fontStyle:e.fontStyle,fontWeight:e.fontWeight,textDecoration:e.textDecoration,cursor:e.cursor,color:e.color,opacity:e.opacity,letterSpacing:e.letterSpacing,gutterIconPath:e.gutterIconPath?Jg(e.gutterIconPath):void 0,gutterIconSize:e.gutterIconSize,overviewRulerColor:e.overviewRulerColor,before:e.before?Vg.from(e.before):void 0,after:e.after?Vg.from(e.after):void 0}}t.from=r})(KR||={});var oB;(t=>{function r(e){if(typeof e>"u")return e;switch(e){case 0:return 0;case 1:return 1;case 2:return 2;case 3:return 3}}t.from=r})(oB||={});var CE;(t=>{function r(e){return{isWholeLine:e.isWholeLine,rangeBehavior:e.rangeBehavior?oB.from(e.rangeBehavior):void 0,overviewRulerLane:e.overviewRulerLane,light:e.light?KR.from(e.light):void 0,dark:e.dark?KR.from(e.dark):void 0,backgroundColor:e.backgroundColor,outline:e.outline,outlineColor:e.outlineColor,outlineStyle:e.outlineStyle,outlineWidth:e.outlineWidth,border:e.border,borderColor:e.borderColor,borderRadius:e.borderRadius,borderSpacing:e.borderSpacing,borderStyle:e.borderStyle,borderWidth:e.borderWidth,fontStyle:e.fontStyle,fontWeight:e.fontWeight,textDecoration:e.textDecoration,cursor:e.cursor,color:e.color,opacity:e.opacity,letterSpacing:e.letterSpacing,gutterIconPath:e.gutterIconPath?Jg(e.gutterIconPath):void 0,gutterIconSize:e.gutterIconSize,overviewRulerColor:e.overviewRulerColor,before:e.before?Vg.from(e.before):void 0,after:e.after?Vg.from(e.after):void 0}}t.from=r})(CE||={});var un;(e=>{function r(n){return{text:n.newText,eol:n.newEol&&oc.from(n.newEol),range:j.from(n.range)}}e.from=r;function t(n){let o=new Tn(j.to(n.range),n.text);return o.newEol=typeof n.eol>"u"?void 0:oc.to(n.eol),o}e.to=t})(un||={});var ro;(e=>{function r(n,o){let i={edits:[]};if(n instanceof Go){let s=new ur;for(let a of n._allEntries())a._type===1&&E.isUri(a.to)&&a.from===void 0&&s.add(a.to);for(let a of n._allEntries())if(a._type===1){let l;a.options?.contents&&(ArrayBuffer.isView(a.options.contents)?l={type:"base64",value:mr(ce.wrap(a.options.contents))}:l={type:"dataTransferItem",id:a.options.contents._itemId}),i.edits.push({oldResource:a.from,newResource:a.to,options:{...a.options,contents:l},metadata:a.metadata})}else a._type===2?i.edits.push({resource:a.uri,textEdit:un.from(a.edit),versionId:s.has(a.uri)?void 0:o?.getTextDocumentVersion(a.uri),metadata:a.metadata}):a._type===6?i.edits.push({resource:a.uri,textEdit:{range:j.from(a.range),text:a.edit.value,insertAsSnippet:!0,keepWhitespace:a.keepWhitespace},versionId:s.has(a.uri)?void 0:o?.getTextDocumentVersion(a.uri),metadata:a.metadata}):a._type===3?i.edits.push({metadata:a.metadata,resource:a.uri,cellEdit:a.edit,notebookVersionId:o?.getNotebookDocumentVersion(a.uri)}):a._type===5&&i.edits.push({metadata:a.metadata,resource:a.uri,notebookVersionId:o?.getNotebookDocumentVersion(a.uri),cellEdit:{editType:1,index:a.index,count:a.count,cells:a.cells.map($g.from)}})}return i}e.from=r;function t(n){let o=new Go,i=new et;for(let s of n.edits)if(s.textEdit){let a=s,l=E.revive(a.resource),d=j.to(a.textEdit.range),c=a.textEdit.text,u=a.textEdit.insertAsSnippet,f;u?f=ks.replace(d,new Un(c)):f=Tn.replace(d,c);let g=i.get(l);g?g.push(f):i.set(l,[f])}else o.renameFile(E.revive(s.oldResource),E.revive(s.newResource),s.options);for(let[s,a]of i)o.set(s,a);return o}e.to=t})(ro||={});var rr;(n=>{let r=Object.create(null);r[0]=0,r[1]=1,r[2]=2,r[3]=3,r[4]=4,r[5]=5,r[6]=6,r[7]=7,r[8]=8,r[9]=9,r[10]=10,r[11]=11,r[12]=12,r[13]=13,r[14]=14,r[15]=15,r[16]=16,r[17]=17,r[18]=18,r[19]=19,r[20]=20,r[21]=21,r[22]=22,r[23]=23,r[24]=24,r[25]=25,r[26]=26;function t(o){return typeof r[o]=="number"?r[o]:6}n.from=t;function e(o){for(let i in r)if(r[i]===o)return Number(i);return 6}n.to=e})(rr||={});var Qs;(e=>{function r(n){if(n===1)return 1}e.from=r;function t(n){if(n===1)return 1}e.to=t})(Qs||={});var Sl;(e=>{function r(n){return{name:n.name,kind:rr.from(n.kind),tags:n.tags&&n.tags.map(Qs.from),containerName:n.containerName,location:no.from(n.location)}}e.from=r;function t(n){let o=new nr(n.name,rr.to(n.kind),n.containerName,no.to(n.location));return o.tags=n.tags&&n.tags.map(Qs.to),o}e.to=t})(Sl||={});var tk;(e=>{function r(n){let o={name:n.name||"!!MISSING: name!!",detail:n.detail,range:j.from(n.range),selectionRange:j.from(n.selectionRange),kind:rr.from(n.kind),tags:n.tags?.map(Qs.from)??[]};return n.children&&(o.children=n.children.map(r)),o}e.from=r;function t(n){let o=new or(n.name,n.detail,rr.to(n.kind),j.to(n.range),j.to(n.selectionRange));return va(n.tags)&&(o.tags=n.tags.map(Qs.to)),n.children&&(o.children=n.children.map(t)),o}e.to=t})(tk||={});var Zs;(e=>{function r(n){let o=new ll(rr.to(n.kind),n.name,n.detail||"",E.revive(n.uri),j.to(n.range),j.to(n.selectionRange));return o._sessionId=n._sessionId,o._itemId=n._itemId,o}e.to=r;function t(n,o,i){if(o=o??n._sessionId,i=i??n._itemId,o===void 0||i===void 0)throw new Error("invalid item");return{_sessionId:o,_itemId:i,name:n.name,detail:n.detail,kind:rr.from(n.kind),uri:n.uri,range:j.from(n.range),selectionRange:j.from(n.selectionRange),tags:n.tags?.map(Qs.from)}}e.from=t})(Zs||={});var nk;(t=>{function r(e){return new Gu(Zs.to(e.from),e.fromRanges.map(n=>j.to(n)))}t.to=r})(nk||={});var ok;(t=>{function r(e){return new zu(Zs.to(e.to),e.fromRanges.map(n=>j.to(n)))}t.to=r})(ok||={});var no;(e=>{function r(n){return{range:n.range&&j.from(n.range),uri:n.uri}}e.from=r;function t(n){return new qt(E.revive(n.uri),j.to(n.range))}e.to=t})(no||={});var bp;(e=>{function r(n){let o=n,i=n;return{originSelectionRange:o.originSelectionRange?j.from(o.originSelectionRange):void 0,uri:o.targetUri?o.targetUri:i.uri,range:j.from(o.targetRange?o.targetRange:i.range),targetSelectionRange:o.targetSelectionRange?j.from(o.targetSelectionRange):void 0}}e.from=r;function t(n){return{targetUri:E.revive(n.uri),targetRange:j.to(n.range),targetSelectionRange:n.targetSelectionRange?j.to(n.targetSelectionRange):void 0,originSelectionRange:n.originSelectionRange?j.to(n.originSelectionRange):void 0}}e.to=t})(bp||={});var Ip;(e=>{function r(n){return{range:j.from(n.range),contents:ye.fromMany(n.contents),canIncreaseVerbosity:n.canIncreaseVerbosity,canDecreaseVerbosity:n.canDecreaseVerbosity}}e.from=r;function t(n){let o=n.contents.map(ye.to),i=j.to(n.range),s=n.canIncreaseVerbosity,a=n.canDecreaseVerbosity;return new Ga(o,i,s,a)}e.to=t})(Ip||={});var rk;(e=>{function r(n){return{range:j.from(n.range),expression:n.expression}}e.from=r;function t(n){return new nl(j.to(n.range),n.expression)}e.to=t})(rk||={});var jg;(e=>{function r(n){if(n instanceof ol)return{type:"text",range:j.from(n.range),text:n.text};if(n instanceof rl)return{type:"variable",range:j.from(n.range),variableName:n.variableName,caseSensitiveLookup:n.caseSensitiveLookup};if(n instanceof il)return{type:"expression",range:j.from(n.range),expression:n.expression};throw new Error("Unknown 'InlineValue' type")}e.from=r;function t(n){switch(n.type){case"text":return{range:j.to(n.range),text:n.text};case"variable":return{range:j.to(n.range),variableName:n.variableName,caseSensitiveLookup:n.caseSensitiveLookup};case"expression":return{range:j.to(n.range),expression:n.expression}}}e.to=t})(jg||={});var Qg;(e=>{function r(n){return{frameId:n.frameId,stoppedLocation:j.from(n.stoppedLocation)}}e.from=r;function t(n){return new Vu(n.frameId,j.to(n.stoppedLocation))}e.to=t})(Qg||={});var nc;(e=>{function r(n){return{range:j.from(n.range),kind:n.kind}}e.from=r;function t(n){return new za(j.to(n.range),n.kind)}e.to=t})(nc||={});var ik;(e=>{function r(n){return{uri:n.uri,highlights:n.highlights.map(nc.from)}}e.from=r;function t(n){return new qa(E.revive(n.uri),n.highlights.map(nc.to))}e.to=t})(ik||={});var rB;(t=>{function r(e){switch(e){case 1:return 1;case 2:return 2;case 0:default:return 0}}t.to=r})(rB||={});var sk;(t=>{function r(e){return{triggerKind:rB.to(e.triggerKind),triggerCharacter:e.triggerCharacter}}t.to=r})(sk||={});var TE;(e=>{function r(n){if(n===1)return 1}e.from=r;function t(n){if(n===1)return 1}e.to=t})(TE||={});var ak;(t=>{function r(e,n,o){return"icon"in e&&"command"in e?{command:n.toInternal(e.command,o),icon:ci.fromThemeIcon(e.icon)}:{command:n.toInternal(e,o)}}t.from=r})(ak||={});var _E;(o=>{let r=new Map([[1,0],[2,1],[3,2],[4,3],[5,4],[6,5],[7,7],[21,6],[8,8],[9,9],[10,12],[11,13],[20,14],[12,15],[19,16],[13,17],[14,28],[0,18],[15,19],[16,20],[17,21],[18,23],[22,10],[23,11],[24,24],[26,26],[25,25]]);function t(i){return r.get(i)??9}o.from=t;let e=new Map([[0,1],[1,2],[2,3],[3,4],[4,5],[5,6],[7,7],[6,21],[8,8],[9,9],[12,10],[13,11],[14,20],[15,12],[16,19],[17,13],[28,14],[18,0],[19,15],[20,16],[21,17],[23,18],[10,22],[11,23],[24,24],[25,25],[26,26]]);function n(i){return e.get(i)??9}o.to=n})(_E||={});var lk;(t=>{function r(e,n){let o=new Qa(e.label);return o.insertText=e.insertText,o.kind=_E.to(e.kind),o.tags=e.tags?.map(TE.to),o.detail=e.detail,o.documentation=qr(e.documentation)?ye.to(e.documentation):e.documentation,o.sortText=e.sortText,o.filterText=e.filterText,o.preselect=e.preselect,o.commitCharacters=e.commitCharacters,Ke.isIRange(e.range)?o.range=j.to(e.range):typeof e.range=="object"&&(o.range={inserting:j.to(e.range.insert),replacing:j.to(e.range.replace)}),o.keepWhitespace=typeof e.insertTextRules>"u"?!1:!!(e.insertTextRules&1),typeof e.insertTextRules<"u"&&e.insertTextRules&4?o.insertText=new Un(e.insertText):(o.insertText=e.insertText,o.textEdit=o.range instanceof Se?new Tn(o.range,o.insertText):void 0),e.additionalTextEdits&&e.additionalTextEdits.length>0&&(o.additionalTextEdits=e.additionalTextEdits.map(i=>un.to(i))),o.command=n&&e.command?n.fromInternal(e.command):void 0,o}t.to=r})(lk||={});var JR;(e=>{function r(n){if(typeof n.label!="string"&&!Array.isArray(n.label))throw new TypeError("Invalid label");return{label:n.label,documentation:ye.fromStrict(n.documentation)}}e.from=r;function t(n){return{label:n.label,documentation:qr(n.documentation)?ye.to(n.documentation):n.documentation}}e.to=t})(JR||={});var jR;(e=>{function r(n){return{label:n.label,documentation:ye.fromStrict(n.documentation),parameters:Array.isArray(n.parameters)?n.parameters.map(JR.from):[],activeParameter:n.activeParameter}}e.from=r;function t(n){return{label:n.label,documentation:qr(n.documentation)?ye.to(n.documentation):n.documentation,parameters:Array.isArray(n.parameters)?n.parameters.map(JR.to):[],activeParameter:n.activeParameter}}e.to=t})(jR||={});var yp;(e=>{function r(n){return{activeSignature:n.activeSignature,activeParameter:n.activeParameter,signatures:Array.isArray(n.signatures)?n.signatures.map(jR.from):[]}}e.from=r;function t(n){return{activeSignature:n.activeSignature,activeParameter:n.activeParameter,signatures:Array.isArray(n.signatures)?n.signatures.map(jR.to):[]}}e.to=t})(yp||={});var dk;(t=>{function r(e,n){let o=new ja(st.to(n.position),typeof n.label=="string"?n.label:n.label.map(iB.to.bind(void 0,e)),n.kind&&PE.to(n.kind));return o.textEdits=n.textEdits&&n.textEdits.map(un.to),o.tooltip=qr(n.tooltip)?ye.to(n.tooltip):n.tooltip,o.paddingLeft=n.paddingLeft,o.paddingRight=n.paddingRight,o}t.to=r})(dk||={});var iB;(t=>{function r(e,n){let o=new Ja(n.label);return o.tooltip=qr(n.tooltip)?ye.to(n.tooltip):n.tooltip,ND.is(n.command)&&(o.command=e.fromInternal(n.command)),n.location&&(o.location=no.to(n.location)),o}t.to=r})(iB||={});var PE;(e=>{function r(n){return n}e.from=r;function t(n){return n}e.to=t})(PE||={});var ea;(e=>{function r(n){return{range:j.from(n.range),url:n.target,tooltip:n.tooltip}}e.from=r;function t(n){let o;if(n.url)try{o=typeof n.url=="string"?E.parse(n.url,!0):E.revive(n.url)}catch{}let i=new Xa(j.to(n.range),o);return i.tooltip=n.tooltip,i}e.to=t})(ea||={});var Xg;(e=>{function r(n){let o=new Za(n.label);return n.textEdit&&(o.textEdit=un.to(n.textEdit)),n.additionalTextEdits&&(o.additionalTextEdits=n.additionalTextEdits.map(i=>un.to(i))),o}e.to=r;function t(n){return{label:n.label,textEdit:n.textEdit?un.from(n.textEdit):void 0,additionalTextEdits:n.additionalTextEdits?n.additionalTextEdits.map(o=>un.from(o)):void 0}}e.from=t})(Xg||={});var ac;(e=>{function r(n){return new ni(n[0],n[1],n[2],n[3])}e.to=r;function t(n){return[n.red,n.green,n.blue,n.alpha]}e.from=t})(ac||={});var ck;(e=>{function r(n){return{range:j.from(n.range)}}e.from=r;function t(n){return new Wi(j.to(n.range))}e.to=t})(ck||={});var Yg;(t=>{function r(e){switch(e){case 2:return 2;case 1:return 1;case 3:case 4:return 3}}t.to=r})(Yg||={});var lc;(e=>{function r(n){switch(n){case 0:return 0;case 2:return 2;case 3:return 3;case 1:default:return 1}}e.from=r;function t(n){switch(n){case 0:return 0;case 2:return 2;case 3:return 3;case 1:default:return 1}}e.to=t})(lc||={});var oc;(e=>{function r(n){if(n===2)return 1;if(n===1)return 0}e.from=r;function t(n){if(n===1)return 2;if(n===0)return 1}e.to=t})(oc||={});var DE;(t=>{function r(e){if(typeof e=="object")return e.viewId;switch(e){case 1:return 3;case 10:return 10;case 15:return 15}throw new Error("Unknown 'ProgressLocation'")}t.from=r})(DE||={});var Zg;(e=>{function r(n){let o={start:n.start+1,end:n.end+1};return n.kind&&(o.kind=QR.from(n.kind)),o}e.from=r;function t(n){let o={start:n.start-1,end:n.end-1};return n.kind&&(o.kind=QR.to(n.kind)),o}e.to=t})(Zg||={});var QR;(e=>{function r(n){if(n)switch(n){case 1:return Cs.Comment;case 2:return Cs.Imports;case 3:return Cs.Region}}e.from=r;function t(n){if(n)switch(n.value){case Cs.Comment.value:return 1;case Cs.Imports.value:return 2;case Cs.Region.value:return 3}}e.to=t})(QR||={});var eh;(t=>{function r(e){if(e)return{pinned:typeof e.preview=="boolean"?!e.preview:void 0,inactive:e.background,preserveFocus:e.preserveFocus,selection:typeof e.selection=="object"?j.from(e.selection):void 0,override:typeof e.override=="boolean"?$D.id:void 0}}t.from=r})(eh||={});var To;(o=>{function r(i){return i instanceof zi?i.toJSON():typeof i=="string"?i:t(i)||e(i)?new zi(i.baseUri??i.base,i.pattern).toJSON():i}o.from=r;function t(i){let s=i;return s?E.isUri(s.baseUri)&&typeof s.pattern=="string":!1}function e(i){let s=i;return s?typeof s.base=="string"&&typeof s.pattern=="string":!1}function n(i){return typeof i=="string"?i:new zi(E.revive(i.baseUri),i.pattern)}o.to=n})(To||={});var uk;(t=>{function r(e){if(e){if(Array.isArray(e))return e.map(r);if(typeof e=="string")return e;{let n=e;return{language:n.language,scheme:n.scheme,pattern:To.from(n.pattern)??void 0,exclusive:n.exclusive,notebookType:n.notebookType}}}else return}t.from=r})(uk||={});var ir;(e=>{function r(n){return{start:n.start,end:n.end}}e.from=r;function t(n){return new $n(n.start,n.end)}e.to=t})(ir||={});var hp;(e=>{function r(n){return{timing:typeof n.runStartTime=="number"&&typeof n.runEndTime=="number"?{startTime:n.runStartTime,endTime:n.runEndTime}:void 0,executionOrder:n.executionOrder,success:n.lastRunSuccess}}e.to=r;function t(n){return{lastRunSuccess:n.success,runStartTime:n.timing?.startTime,runEndTime:n.timing?.endTime,executionOrder:n.executionOrder}}e.from=t})(hp||={});var Wg;(e=>{function r(n){switch(n){case 1:return 1;case 2:default:return 2}}e.from=r;function t(n){switch(n){case 1:return 1;case 2:default:return 2}}e.to=t})(Wg||={});var xl;(e=>{function r(n){let o={metadata:n.metadata??Object.create(null),cells:[]};for(let i of n.cells)Fi.validate(i),o.cells.push($g.from(i));return o}e.from=r;function t(n){let o=new Ld(n.cells.map($g.to));return qc(n.metadata)||(o.metadata=n.metadata),o}e.to=t})(xl||={});var $g;(e=>{function r(n){return{cellKind:Wg.from(n.kind),language:n.languageId,mime:n.mime,source:n.value,metadata:n.metadata,internalMetadata:hp.from(n.executionSummary??{}),outputs:n.outputs?n.outputs.map(Xs.from):[]}}e.from=r;function t(n){return new Fi(Wg.to(n.cellKind),n.source,n.language,n.mime,n.outputs?n.outputs.map(Xs.to):void 0,n.metadata,n.internalMetadata?hp.to(n.internalMetadata):void 0)}e.to=t})($g||={});var rc;(e=>{function r(n){return{mime:n.mime,valueBytes:ce.wrap(n.data)}}e.from=r;function t(n){return new Md(n.valueBytes.buffer,n.mime)}e.to=t})(rc||={});var Xs;(e=>{function r(n){return{outputId:n.id,items:n.items.map(rc.from),metadata:n.metadata}}e.from=r;function t(n){let o=n.items.map(rc.to);return new Hi(o,n.outputId,n.metadata)}e.to=t})(Xs||={});var th;(n=>{function r(o){return e(o)?{include:To.from(o.include)??void 0,exclude:To.from(o.exclude)??void 0}:To.from(o)??void 0}n.from=r;function t(o){return e(o)?{include:To.to(o.include),exclude:To.to(o.exclude)}:To.to(o)}n.to=t;function e(o){let i=o;return i?!Ft(i.include)&&!Ft(i.exclude):!1}})(th||={});var pk;(t=>{function r(e,n,o){let i=typeof e.command=="string"?{title:"",command:e.command}:e.command;return{alignment:e.alignment===1?1:2,command:n.toInternal(i,o),text:e.text,tooltip:e.tooltip,accessibilityInformation:e.accessibilityInformation,priority:e.priority}}t.from=r})(pk||={});var mk;(t=>{function r(e,n,o){let i=typeof e.command=="string"?{title:"",command:e.command}:e.command;return{command:n.toInternal(i,o),label:e.label,description:e.description,detail:e.detail,documentation:e.documentation}}t.from=r})(mk||={});var fk;(t=>{function r(e){return{transientOutputs:e?.transientOutputs??!1,transientCellMetadata:e?.transientCellMetadata??{},transientDocumentMetadata:e?.transientDocumentMetadata??{},cellContentMetadata:e?.cellContentMetadata??{}}}t.from=r})(fk||={});var wE;(e=>{function r(n){return{uri:n.uri,provides:n.provides}}e.from=r;function t(n){return new ju(E.revive(n.uri),n.provides)}e.to=t})(wE||={});var Ep;(e=>{function r(n){return{message:ye.fromStrict(n.message)||"",type:0,expected:n.expectedOutput,actual:n.actualOutput,contextValue:n.contextValue,location:n.location&&{range:j.from(n.location.range),uri:n.location.uri},stackTrace:n.stackTrace?.map(o=>({label:o.label,position:o.position&&st.from(o.position),uri:o.uri&&E.revive(o.uri).toJSON()}))}}e.from=r;function t(n){let o=new qi(typeof n.message=="string"?n.message:ye.to(n.message));return o.actualOutput=n.actual,o.expectedOutput=n.expected,o.contextValue=n.contextValue,o.location=n.location?no.to(n.location):void 0,o}e.to=t})(Ep||={});var Ar;(e=>(e.namespace=Au,e.denamespace=NI))(Ar||={});var gk;(t=>{function r(e){return{controllerId:e.controllerId,profileId:e.profileId,group:Sp.from(e.kind)}}t.from=r})(gk||={});var Sp;(e=>{let r={3:8,2:4,1:2};function t(n){return r.hasOwnProperty(n)?r[n]:2}e.from=t})(Sp||={});var es;(e=>{function r(n){let o=Ou(n).controllerId;return{extId:nt.fromExtHostTestItem(n,o).toString(),label:n.label,uri:E.revive(n.uri),busy:n.busy,tags:n.tags.map(i=>Ar.namespace(o,i.id)),range:Ke.lift(j.from(n.range)),description:n.description||null,sortText:n.sortText||null,error:n.error&&ye.fromStrict(n.error)||null}}e.from=r;function t(n){return{parent:void 0,error:void 0,id:nt.fromString(n.extId).localId,label:n.label,uri:E.revive(n.uri),tags:(n.tags||[]).map(o=>{let{tagId:i}=Ar.denamespace(o);return new Us(i)}),children:{add:()=>{},delete:()=>{},forEach:()=>{},*[Symbol.iterator](){},get:()=>{},replace:()=>{},size:0},range:j.to(n.range||void 0),canResolveChildren:!1,busy:n.busy,description:n.description||void 0,sortText:n.sortText||void 0}}e.toPlain=t})(es||={});(e=>{function r(n){return{id:n.id}}e.from=r;function t(n){return new Us(n.id)}e.to=t})(Ar||={});var hk;(e=>{let r=(n,o)=>{let i=n.value;if(!i)return;let s={...es.toPlain(i.item),parent:o,taskStates:i.tasks.map(a=>({state:a.state,duration:a.duration,messages:a.messages.filter(l=>l.type===0).map(Ep.to)})),children:[]};if(n.children)for(let a of n.children.values()){let l=r(a,s);l&&s.children.push(l)}return s};function t(n){let o=new Ub;for(let a of n.items)o.insert(nt.fromString(a.item.extId).path,a);let i=[o.nodes],s=[];for(;i.length;)for(let a of i.pop())a.value?s.push(a):a.children&&i.push(a.children.values());return{completedAt:n.completedAt,results:s.map(a=>r(a)).filter(lo)}}e.to=t})(hk||={});var nh;(s=>{function r(a){return{covered:a.covered,total:a.total}}function t(a){return"line"in a?st.from(a):j.from(a)}function e(a){if(a)return"endLineNumber"in a?j.to(a):st.to(a)}function n(a){if(a.type===1){let l=[];if(a.branches)for(let d of a.branches)l.push({executed:d.count,location:e(d.location),label:d.label});return new Xu(a.count,e(a.location),a.branches?.map(d=>new Yu(d.count,e(d.location),d.label)))}else return new Zu(a.name,a.count,e(a.location))}s.to=n;function o(a){if(typeof a.executed=="number"&&a.executed<0)throw new Error(`Invalid coverage count ${a.executed}`);return"branches"in a?{count:a.executed,location:t(a.location),type:1,branches:a.branches.length?a.branches.map(l=>({count:l.executed,location:l.location&&t(l.location),label:l.label})):void 0}:{type:0,name:a.name,count:a.executed,location:t(a.location)}}s.fromDetails=o;function i(a,l,d){return Hg(d.statementCoverage),Hg(d.branchCoverage),Hg(d.declarationCoverage),{id:l,uri:d.uri,statement:r(d.statementCoverage),branch:d.branchCoverage&&r(d.branchCoverage),declaration:d.declarationCoverage&&r(d.declarationCoverage),testIds:d instanceof Fs&&d.includesTests.length?d.includesTests.map(c=>nt.fromExtHostTestItem(c,a).toString()):void 0}}s.fromFile=i})(nh||={});var vk;(t=>{function r(e){switch(e){case 1:return 1;case 2:return 2}}t.to=r})(vk||={});var ta;(e=>{function r(n){let o=new ul(rr.to(n.kind),n.name,n.detail||"",E.revive(n.uri),j.to(n.range),j.to(n.selectionRange));return o._sessionId=n._sessionId,o._itemId=n._itemId,o}e.to=r;function t(n,o,i){if(o=o??n._sessionId,i=i??n._itemId,o===void 0||i===void 0)throw new Error("invalid item");return{_sessionId:o,_itemId:i,kind:rr.from(n.kind),name:n.name,detail:n.detail??"",uri:n.uri,range:j.from(n.range),selectionRange:j.from(n.selectionRange),tags:n.tags?.map(Qs.from)}}e.from=t})(ta||={});var oh;(t=>{function r(e){if(e)return{value:e.value,tooltip:e.tooltip}}t.from=r})(oh||={});var tc;(o=>{function r(i,s,a){let l=s.fileData;return l?new jI(new QI(l.name,E.revive(l.uri),l.id,Wc(()=>a(l.id)))):i===Io.uriList&&s.uriListData?new dl(n(s.uriListData)):new dl(s.asString)}o.to=r;async function t(i,s,a=ct()){let l=await s.asString();if(i===Io.uriList)return{id:a,asString:l,fileData:void 0,uriListData:e(l)};let d=s.asFile();return{id:a,asString:l,fileData:d?{name:d.name,uri:d.uri,id:d._itemId??d.id}:void 0}}o.from=t;function e(i){return wb.split(i).map(s=>{if(s.startsWith("#"))return s;try{return E.parse(s)}catch{}return s})}function n(i){return wb.create(i.map(s=>typeof s=="string"?s:E.revive(s)))}})(tc||={});var dc;(n=>{function r(o,i){let s=o.items.map(([a,l])=>[a,tc.to(a,l,i)]);return new _r(s)}n.toDataTransfer=r;async function t(o){return{items:await Promise.all(Array.from(o,async([s,a])=>[s,await tc.from(s,a)]))}}n.from=t;async function e(o){return{items:await Promise.all(Array.from(o,async([s,a])=>[s,await tc.from(s,a,a.id)]))}}n.fromList=e})(dc||={});var RE;(e=>{function r(n,o){return{kind:"reply",agentId:n.participant??o?.agentId??"",subCommand:n.command??o?.command,message:n.prompt,title:n.label}}e.from=r;function t(n){return{prompt:n.message,label:n.title,participant:n.agentId,command:n.subCommand}}e.to=t})(RE||={});var Gg;(e=>{function r(n){switch(n){case 0:return 3;case 1:return 1;case 2:return 2}}e.to=r;function t(n){switch(n){case 3:return 0;case 1:return 1;case 2:return 2}return 1}e.from=t})(Gg||={});var EG;(e=>{function r(n){let o=n.content.map(a=>{if(a.type==="text")return new Kt(a.value,a.audience);if(a.type==="tool_result"){let l=pt(a.value.map(d=>d.type==="text"?new Kt(d.value,d.audience):d.type==="data"?new Pn(d.data.buffer,d.mimeType):d.type==="prompt_tsx"?new Rr(d.value):void 0));return new Zi(a.toolCallId,l,a.isError)}else{if(a.type==="image_url")return new Pn(a.value.data.buffer,a.value.mimeType);if(a.type==="data")return new Pn(a.data.buffer,a.mimeType);if(a.type==="tool_use")return new wr(a.toolCallId,a.name,a.parameters)}}).filter(a=>a!==void 0),i=Gg.to(n.role);return new pp(i,o,n.name)}e.to=r;function t(n){let o=Gg.from(n.role),i=n.name,s=n.content;typeof s=="string"&&(s=[new Kt(s)]);let a=s.map(l=>{if(l instanceof Zi)return{type:"tool_result",toolCallId:l.callId,value:pt(l.content.map(d=>d instanceof Kt?{type:"text",value:d.value,audience:d.audience}:d instanceof Rr?{type:"prompt_tsx",value:d.value}:d instanceof Pn?{type:"data",mimeType:d.mimeType,data:ce.wrap(d.data),audience:d.audience}:void 0)),isError:l.isError};if(l instanceof Pn)return sB(l)?{type:"image_url",value:{mimeType:l.mimeType,data:ce.wrap(l.data)}}:{type:"data",mimeType:l.mimeType,data:ce.wrap(l.data),audience:l.audience};if(l instanceof wr)return{type:"tool_use",toolCallId:l.callId,name:l.name,parameters:l.input};if(l instanceof Kt)return{type:"text",value:l.value};if(typeof l!="string")throw new Error("Unexpected chat message content type");return{type:"text",value:l}});return{role:o,name:i,content:a}}e.from=t})(EG||={});var kE;(e=>{function r(n){let o=n.content.map(a=>{if(a.type==="text")return new Kt(a.value,a.audience);if(a.type==="tool_result"){let l=a.value.map(d=>d.type==="text"?new Kt(d.value,d.audience):d.type==="data"?new Pn(d.data.buffer,d.mimeType):new Rr(d.value));return new Zi(a.toolCallId,l,a.isError)}else return a.type==="image_url"?new Pn(a.value.data.buffer,a.value.mimeType):a.type==="data"?new Pn(a.data.buffer,a.mimeType):a.type==="thinking"?new li(a.value,a.id,a.metadata):new wr(a.toolCallId,a.name,a.parameters)}),i=Gg.to(n.role);return new mp(i,o,n.name)}e.to=r;function t(n){let o=Gg.from(n.role),i=n.name,s=n.content;typeof s=="string"&&(s=[new Kt(s)]);let a=s.map(l=>{if(l instanceof Zi)return{type:"tool_result",toolCallId:l.callId,value:pt(l.content.map(d=>d instanceof Kt?{type:"text",value:d.value,audience:d.audience}:d instanceof Rr?{type:"prompt_tsx",value:d.value}:d instanceof Pn?{type:"data",mimeType:d.mimeType,data:ce.wrap(d.data),audience:d.audience}:void 0)),isError:l.isError};if(l instanceof Pn)return sB(l)?{type:"image_url",value:{mimeType:l.mimeType,data:ce.wrap(l.data)}}:{type:"data",mimeType:l.mimeType,data:ce.wrap(l.data),audience:l.audience};if(l instanceof wr)return{type:"tool_use",toolCallId:l.callId,name:l.name,parameters:l.input};if(l instanceof Kt)return{type:"text",value:l.value};if(l instanceof li)return{type:"thinking",value:l.value,id:l.id,metadata:l.metadata};if(typeof l!="string")throw new Error("Unexpected chat message content type llm 2");return{type:"text",value:l}});return{role:o,name:i,content:a}}e.from=t})(kE||={});function sB(r){switch(typeof r.mimeType=="string"?r.mimeType.toLowerCase():""){case"image/png":case"image/jpeg":case"image/jpg":case"image/gif":case"image/webp":case"image/bmp":return!0;default:return!1}}var zg;(e=>{function r(n){return{kind:"markdownContent",content:ye.from(n.value)}}e.from=r;function t(n){return new Bs(ye.to(n.content))}e.to=t})(zg||={});var AE;(e=>{function r(n){return{kind:"codeblockUri",uri:n.value,isEdit:n.isEdit,undoStopId:n.undoStopId}}e.from=r;function t(n){return new zs(E.revive(n.uri),n.isEdit,n.undoStopId)}e.to=t})(AE||={});var OE;(e=>{function r(n){return{kind:"markdownVuln",content:ye.from(n.value),vulnerabilities:n.vulnerabilities}}e.from=r;function t(n){return new Ji(ye.to(n.content),n.vulnerabilities)}e.to=t})(OE||={});var LE;(t=>{function r(e){return{kind:"confirmation",title:e.title,message:ye.from(e.message),data:e.data,buttons:e.buttons}}t.from=r})(LE||={});var ME;(o=>{function r(i){switch(i){case 1:return"text";case 2:return"singleSelect";case 3:return"multiSelect";default:return"text"}}function t(i){switch(i){case"text":return 1;case"singleSelect":return 2;case"multiSelect":return 3;default:return 1}}function e(i){return{kind:"questionCarousel",questions:i.questions.map(s=>({id:s.id,type:r(s.type),title:s.title,message:s.message?ye.from(s.message):void 0,options:s.options,defaultValue:s.defaultValue,allowFreeformInput:s.allowFreeformInput})),allowSkip:i.allowSkip}}o.from=e;function n(i){let s=i.questions.map(a=>new ap(a.id,t(a.type),a.title,{message:a.message?typeof a.message=="string"?new zt(a.message):ye.to(a.message):void 0,options:a.options?.map(l=>({id:l.id,label:l.label,value:l.value})),defaultValue:a.defaultValue,allowFreeformInput:a.allowFreeformInput}));return new Xi(s,i.allowSkip)}o.to=n})(ME||={});var qg;(e=>{function r(n){let{value:o,baseUri:i}=n;function s(a,l){return a.map(d=>{let c=E.joinPath(l,d.name);return{label:d.name,uri:c,children:d.children&&s(d.children,c)}})}return{kind:"treeData",treeData:{label:tn(i),uri:i,children:s(o,i)}}}e.from=r;function t(n){let o=nn(n.treeData);function i(l){return l.map(d=>({name:d.label,children:d.children&&i(d.children)}))}let s=o.uri,a=o.children?i(o.children):[];return new Ws(a,s)}e.to=t})(qg||={});var aB;(e=>{function r(n){return{kind:"multiDiffData",multiDiffData:{title:n.title,resources:n.value.map(o=>({originalUri:o.originalUri,modifiedUri:o.modifiedUri,goToFileUri:o.goToFileUri,added:o.added,removed:o.removed}))},readOnly:n.readOnly}}e.from=r;function t(n){let o=n.multiDiffData.resources.map(i=>({originalUri:i.originalUri?E.revive(i.originalUri):void 0,modifiedUri:i.modifiedUri?E.revive(i.modifiedUri):void 0,goToFileUri:i.goToFileUri?E.revive(i.goToFileUri):void 0,added:i.added,removed:i.removed}));return new Kd(o,n.multiDiffData.title,n.readOnly)}e.to=t})(aB||={});var vp;(e=>{function r(n){let o=s=>E.isUri(s),i=s=>"name"in s;return{kind:"inlineReference",name:n.title,inlineReference:o(n.value)?n.value:i(n.value)?Sl.from(n.value):kr.from(n.value)}}e.from=r;function t(n){let o=nn(n);return new ji(E.isUri(o.inlineReference)?o.inlineReference:"location"in o.inlineReference?Sl.to(o.inlineReference):kr.to(o.inlineReference),n.name)}e.to=t})(vp||={});var rh;(e=>{function r(n){return{kind:"progressMessage",content:ye.from(n.value)}}e.from=r;function t(n){return new jd(n.content.value)}e.to=t})(rh||={});var ih;(e=>{function r(n){return{kind:"thinking",value:n.value,id:n.id,metadata:n.metadata}}e.from=r;function t(n){return new ai(n.value??"",n.id,n.metadata)}e.to=t})(ih||={});var NE;(e=>{function r(n){return{kind:"hook",hookType:n.hookType,stopReason:n.stopReason,systemMessage:n.systemMessage,metadata:n.metadata}}e.from=r;function t(n){return new $s(n.hookType,n.stopReason,n.systemMessage,n.metadata)}e.to=t})(NE||={});var sh;(e=>{function r(n){return{kind:"warning",content:ye.from(n.value)}}e.from=r;function t(n){return new Qi(n.content.value)}e.to=t})(sh||={});var lB;(t=>{function r(e){return{kind:"extensions",extensions:e.extensions}}t.from=r})(lB||={});var dB;(t=>{function r(e,n,o){let i;if(e.command)i=n.toInternal(e.command,o);else{if(!e.uri)throw new Error("Pull request part must have a command if URI is provided");i={title:"Open Pull Request",id:"vscode.open",arguments:[e.uri]}}return{kind:"pullRequest",author:e.author,title:e.title,description:e.description,uri:e.uri,linkTag:e.linkTag,command:i}}t.from=r})(dB||={});var cB;(e=>{function r(n){return{kind:"move",uri:n.uri,range:j.from(n.range)}}e.from=r;function t(n){return new Ks(E.revive(n.uri),j.to(n.range))}e.to=t})(cB||={});var uB;(l=>{function r(d){let c,u;d.toolSpecificData&&t(d.toolSpecificData)?(c=e(d.toolSpecificData,d.isError),u=void 0):u=d.toolSpecificData?n(d.toolSpecificData):void 0;let f=d.presentation==="hidden"?"hidden":d.presentation==="hiddenAfterComplete"?"hiddenAfterComplete":void 0;return d.enablePartialUpdate?{kind:"externalToolInvocationUpdate",toolCallId:d.toolCallId,toolName:d.toolName,isComplete:!!d.isComplete,invocationMessage:d.invocationMessage?ye.from(d.invocationMessage):void 0,pastTenseMessage:d.pastTenseMessage?ye.from(d.pastTenseMessage):void 0,toolSpecificData:u,subagentInvocationId:d.subAgentInvocationId}:{kind:"toolInvocationSerialized",toolCallId:d.toolCallId,toolId:d.toolName,invocationMessage:d.invocationMessage?ye.from(d.invocationMessage):d.toolName,originMessage:d.originMessage?ye.from(d.originMessage):void 0,pastTenseMessage:d.pastTenseMessage?ye.from(d.pastTenseMessage):void 0,isConfirmed:d.isConfirmed,isComplete:!0,source:So.External,toolSpecificData:u,resultDetails:c,presentation:f,subAgentInvocationId:d.subAgentInvocationId}}l.from=r;function t(d){return d!==null&&typeof d=="object"&&"input"in d&&typeof d.input=="string"&&"output"in d&&Array.isArray(d.output)}function e(d,c){return{input:d.input,output:d.output.map(u=>{let f=u.mimeType.startsWith("text/");return{type:"embed",mimeType:u.mimeType,value:f?ce.wrap(u.data).toString():mr(ce.wrap(u.data)),isText:f}}),isError:c??!1}}function n(d){return"command"in d&&"language"in d?{kind:"terminal",command:d.command,language:d.language}:"commandLine"in d&&"language"in d?{kind:"terminal",presentationOverrides:d.presentationOverrides&&typeof d.presentationOverrides.commandLine=="string"?{commandLine:d.presentationOverrides.commandLine,language:d.presentationOverrides.language}:void 0,commandLine:d.commandLine,language:d.language,terminalCommandOutput:typeof d.output?.text=="string"?{text:d.output.text}:void 0,terminalCommandState:d.state?{exitCode:d.state.exitCode,duration:d.state.duration}:void 0}:"todoList"in d&&Array.isArray(d.todoList)?{kind:"todoList",todoList:d.todoList.map(c=>({id:String(c.id),title:c.title,status:o(c.status)}))}:"input"in d&&"output"in d&&!Array.isArray(d.output)?{kind:"simpleToolInvocation",input:typeof d.input=="string"?d.input:"",output:typeof d.output=="string"?d.output:""}:d&&"values"in d&&Array.isArray(d.values)?{kind:"resources",values:d.values.map(c=>c instanceof qt?kr.from(c):E.revive(c))}:d instanceof sp?{kind:"subagent",description:d.description,agentName:d.agentName,prompt:d.prompt,result:d.result}:d}function o(d){switch(d){case 1:return"not-started";case 2:return"in-progress";case 3:return"completed";default:return"not-started"}}function i(d){switch(d){case"not-started":return 1;case"in-progress":return 2;case"completed":return 3;default:return 1}}function s(d){let c=new Qd(d.toolId||d.toolName,d.toolCallId,d.errorMessage);return d.invocationMessage&&(c.invocationMessage=d.invocationMessage),d.originMessage&&(c.originMessage=d.originMessage),d.pastTenseMessage&&(c.pastTenseMessage=d.pastTenseMessage),d.isConfirmed!==void 0&&(c.isConfirmed=d.isConfirmed),d.isComplete!==void 0&&(c.isComplete=d.isComplete),d.toolSpecificData&&(c.toolSpecificData=a(d.toolSpecificData)),c.subAgentInvocationId=d.subAgentInvocationId,c.subAgentName=d.subAgentName,c}l.to=s;function a(d){if(d.kind==="terminal")if(d.commandLine){let c={commandLine:d.commandLine,language:d.language};return d.terminalCommandOutput&&(c.output={text:d.terminalCommandOutput.text,truncated:d.terminalCommandOutput.truncated,lineCount:d.terminalCommandOutput.lineCount}),d.terminalCommandState&&(c.state={exitCode:d.terminalCommandState.exitCode,duration:d.terminalCommandState.duration}),c}else return{command:d.command,language:d.language};else{if(d.kind==="terminal2")return{commandLine:d.commandLine,language:d.language};if(d.kind==="todoList")return{todoList:d.todoList.map((c,u)=>{let f=Number(c.id);return{id:Number.isFinite(f)?f:u,title:c.title,status:i(c.status)}})}}return d}})(uB||={});var UE;(t=>{function r(e){return{kind:"progressTask",content:ye.from(e.value)}}t.from=r})(UE||={});var bk;(t=>{function r(e){return{kind:"progressTaskResult",content:typeof e=="string"?ye.from(e):void 0}}t.from=r})(bk||={});var Kg;(e=>{function r(n,o,i){return{kind:"command",command:o.toInternal(n.value,i)??{command:n.value.command,title:n.value.title}}}e.from=r;function t(n,o){return new Gs(o.fromInternal(n.command)??{command:n.command.id,title:n.command.title})}e.to=t})(Kg||={});var FE;(e=>{function r(n){return{kind:"textEdit",uri:n.uri,edits:n.edits.map(o=>un.from(o)),done:n.isDone}}e.from=r;function t(n){let o=new Yi(E.revive(n.uri),n.edits.map(i=>un.to(i)));return o.isDone=n.done,o}e.to=t})(FE||={});var HE;(t=>{function r(e){return e.newCellMetadata?{editType:3,index:e.range.start,metadata:e.newCellMetadata}:e.newNotebookMetadata?{editType:5,metadata:e.newNotebookMetadata}:{editType:1,index:e.range.start,count:e.range.end-e.range.start,cells:e.newCells.map($g.from)}}t.from=r})(HE||={});var BE;(t=>{function r(e){return{kind:"notebookEdit",uri:e.uri,edits:e.edits.map(HE.from),done:e.isDone}}t.from=r})(BE||={});var VE;(t=>{function r(e){return{kind:"workspaceEdit",edits:e.edits.map(n=>({oldResource:n.oldResource,newResource:n.newResource}))}}t.from=r})(VE||={});var ic;(e=>{function r(n){let o=Tt.isThemeIcon(n.iconPath)?n.iconPath:E.isUri(n.iconPath)?{light:E.revive(n.iconPath)}:n.iconPath&&"light"in n.iconPath&&"dark"in n.iconPath&&E.isUri(n.iconPath.light)&&E.isUri(n.iconPath.dark)?{light:E.revive(n.iconPath.light),dark:E.revive(n.iconPath.dark)}:void 0;return typeof n.value=="object"&&"variableName"in n.value?{kind:"reference",reference:{variableName:n.value.variableName,value:E.isUri(n.value.value)||!n.value.value?n.value.value:kr.from(n.value.value)},iconPath:o,options:n.options}:{kind:"reference",reference:E.isUri(n.value)||typeof n.value=="string"?n.value:kr.from(n.value),iconPath:o,options:n.options}}e.from=r;function t(n){let o=nn(n),i=s=>E.isUri(s)?s:kr.to(s);return new Dr(typeof o.reference=="string"?o.reference:"variableName"in o.reference?{variableName:o.reference.variableName,value:o.reference.value&&i(o.reference.value)}:i(o.reference))}e.to=t})(ic||={});var WE;(t=>{function r(e){return{kind:"codeCitation",value:e.value,license:e.license,snippet:e.snippet}}t.from=r})(WE||={});var xp;(n=>{function r(o,i,s){return o instanceof Bs?zg.from(o):o instanceof ji?vp.from(o):o instanceof Dr?ic.from(o):o instanceof jd?rh.from(o):o instanceof ai?ih.from(o):o instanceof $s?NE.from(o):o instanceof Ws?qg.from(o):o instanceof Kd?aB.from(o):o instanceof Gs?Kg.from(o,i,s):o instanceof Yi?FE.from(o):o instanceof Js?BE.from(o):o instanceof Ji?OE.from(o):o instanceof zs?AE.from(o):o instanceof Qi?sh.from(o):o instanceof Vs?LE.from(o):o instanceof Xi?ME.from(o):o instanceof qs?WE.from(o):o instanceof Ks?cB.from(o):o instanceof vl?lB.from(o):o instanceof bl?dB.from(o,i,s):o instanceof Qd?uB.from(o):o instanceof Il?VE.from(o):{kind:"markdownContent",content:ye.from("")}}n.from=r;function t(o,i){switch(o.kind){case"reference":return ic.to(o);case"markdownContent":case"inlineReference":case"progressMessage":case"treeData":case"command":return e(o,i)}}n.to=t;function e(o,i){switch(o.kind){case"markdownContent":return zg.to(o);case"inlineReference":return vp.to(o);case"progressMessage":return;case"treeData":return qg.to(o);case"command":return Kg.to(o,i)}}n.toContent=e})(xp||={});var cc;(t=>{function r(e,n,o,i,s,a,l){let d=[],c=[];for(let g of e.variables.variables)g.kind==="tool"?d.push(g):g.kind==="toolset"?d.push(...g.value):c.push(g);let u=Fa.parseLocalSessionId(e.sessionResource)??e.sessionResource.toString(),f={id:e.requestId,prompt:e.message,command:e.command,attempt:e.attempt??0,enableCommandDetection:e.enableCommandDetection??!0,isParticipantDetected:e.isParticipantDetected??!1,sessionId:u,sessionResource:e.sessionResource,references:c.map(g=>$E.to(g,i,l)).filter(lo),toolReferences:d.map(sc.to),location:Cp.to(e.location),acceptedConfirmationData:e.acceptedConfirmationData,rejectedConfirmationData:e.rejectedConfirmationData,location2:n,toolInvocationToken:Object.freeze({sessionResource:e.sessionResource}),tools:s,model:o,editedFileEvents:e.editedFileEvents,modeInstructions:e.modeInstructions?.content,modeInstructions2:pB.to(e.modeInstructions),subAgentInvocationId:e.subAgentInvocationId,subAgentName:e.subAgentName,parentRequestId:e.parentRequestId,hasHooksEnabled:e.hasHooksEnabled??!1,hooks:e.hooks?gB.to(e.hooks):void 0};return $e(a,"chatParticipantPrivate")||(delete f.id,delete f.attempt,delete f.enableCommandDetection,delete f.isParticipantDetected,delete f.location,delete f.location2,delete f.editedFileEvents,delete f.sessionId,delete f.subAgentInvocationId,delete f.subAgentName,delete f.parentRequestId,delete f.hasHooksEnabled,delete f.hooks),$e(a,"chatParticipantAdditions")||(delete f.acceptedConfirmationData,delete f.rejectedConfirmationData,delete f.tools),f}t.to=r})(cc||={});var Cp;(e=>{function r(n){switch(n){case"notebook":return 3;case"terminal":return 2;case"panel":return 1;case"editor":return 4}}e.to=r;function t(n){switch(n){case 3:return"notebook";case 2:return"terminal";case 1:return"panel";case 4:return"editor"}}e.from=t})(Cp||={});var $E;(t=>{function r(e,n,o){let i=e.value;if(!i){let a;try{a=JSON.stringify(e)}catch{a=`kind=${e.kind}, id=${e.id}, name=${e.name}`}o.error(`[ChatPromptReference] Ignoring invalid reference in variable: ${a}`);return}if(Ta(i))i=E.revive(i);else if(i&&typeof i=="object"&&"uri"in i&&"range"in i&&Ta(i.uri))i=kr.to(nn(i));else if(r2(e)){let a=e.references?.[0]?.reference;i=new up(e.mimeType??"image/png",()=>Promise.resolve(new Uint8Array(Object.values(e.value))),a&&E.isUri(a)?a:void 0)}else if(e.kind==="diagnostic"){let a=e.filterSeverity&&xE.to(e.filterSeverity),l=e.filterUri&&E.revive(e.filterUri).toString();i=new yl(n.map(([d,c])=>e.filterUri&&d.toString()!==l?[d,[]]:[d,c.filter(u=>!(a&&u.severity>a||e.filterRange&&!Ke.areIntersectingOrTouching(e.filterRange,j.from(u.range))))]).filter(([,d])=>d.length>0))}let s;return(lg(e)||i2(e))&&e.toolReferences&&(s=Ik.to(e.toolReferences)),{id:e.id,name:e.name,range:e.range&&[e.range.start,e.range.endExclusive],toolReferences:s,value:i,modelDescription:e.modelDescription}}t.to=r})($E||={});var sc;(t=>{function r(e){if(e.value)throw new Error("Invalid tool reference");return{name:e.id,range:e.range&&[e.range.start,e.range.endExclusive]}}t.to=r})(sc||={});var Ik;(t=>{function r(e){let n=[];for(let o of e)if(o.kind==="tool")n.push(sc.to(o));else if(o.kind==="toolset")n.push(...o.value.map(sc.to));else throw new Error("Invalid tool reference in prompt variables");return n}t.to=r})(Ik||={});var pB;(t=>{function r(e){if(e)return{name:e.name,content:e.content,toolReferences:Ik.to(e.toolReferences),metadata:e.metadata}}t.to=r})(pB||={});var yk;(t=>{function r(e,n,o){return{id:e.id,label:e.label,fullName:e.fullName,icon:e.icon?.id,value:e.values[0].value,insertText:e.insertText,detail:e.detail,documentation:e.documentation,command:n.toInternal(e.command,o)}}t.from=r})(yk||={});var Tp;(n=>{function r(o){return{errorDetails:o.errorDetails,metadata:e(o.metadata),nextQuestion:o.nextQuestion,details:o.details}}n.to=r;function t(o){return{errorDetails:o.errorDetails,metadata:o.metadata,nextQuestion:o.nextQuestion,details:o.details}}n.from=t;function e(o){return Es(o,i=>{if(i.$mid===20)return new El(Es(i.content,e));if(i.$mid===21)return new Kt(i.value);if(i.$mid===22)return new li(i.value,i.id,i.metadata);if(i.$mid===23)return new Rr(i.value)})}})(Tp||={});var Ek;(t=>{function r(e,n,o){if(n.action.kind==="vote")return;let i=Tp.to(e);if(n.action.kind==="command"){let s=n.action.commandButton.command;return{action:{kind:"command",commandButton:{command:o.fromInternal(s)??{command:s.id,title:s.title}}},result:i}}else return n.action.kind==="followUp"?{action:{kind:"followUp",followup:RE.to(n.action.followup)},result:i}:n.action.kind==="inlineChat"?{action:{kind:"editor",accepted:n.action.action==="accepted"},result:i}:n.action.kind==="chatEditingSessionAction"?{action:{kind:"chatEditingSessionAction",outcome:new Map([["accepted",1],["rejected",2],["saved",3]]).get(n.action.outcome)??2,uri:E.revive(n.action.uri),hasRemainingEdits:n.action.hasRemainingEdits},result:i}:n.action.kind==="chatEditingHunkAction"?{action:{kind:"chatEditingHunkAction",outcome:new Map([["accepted",1],["rejected",2]]).get(n.action.outcome)??2,uri:E.revive(n.action.uri),hasRemainingEdits:n.action.hasRemainingEdits,lineCount:n.action.lineCount,linesAdded:n.action.linesAdded,linesRemoved:n.action.linesRemoved},result:i}:{action:n.action,result:i}}t.to=r})(Ek||={});var GE;(t=>{function r(e,n,o){return"terminalCommand"in e?{terminalCommand:e.terminalCommand,shouldExecute:e.shouldExecute}:"uri"in e?{uri:e.uri}:n.toInternal(e,o)}t.from=r})(GE||={});var XR;(t=>{function r(e){return{...e,documentation:ye.fromStrict(e.documentation)}}t.from=r})(XR||={});var Sk;(t=>{function r(e,n){return Array.isArray(e)?{items:e.map(o=>XR.from(o))}:{items:e.items.map(o=>XR.from(o)),resourceOptions:e.resourceOptions?mB.from(e.resourceOptions,n):void 0}}t.from=r})(Sk||={});var mB;(t=>{function r(e,n){return{...e,pathSeparator:n,cwd:e.cwd,globPattern:To.from(e.globPattern)??void 0}}t.from=r})(mB||={});var xk;(t=>{function r(e){return{kind:fB.to(e.kind),acceptedLength:e.acceptedLength}}t.to=r})(xk||={});var fB;(t=>{function r(e){switch(e){case 0:return 1;case 1:return 2;case 2:return 3;default:return 0}}t.to=r})(fB||={});var Ck;(t=>{function r(e,n){if(e.kind===2){let o=e.supersededBy?n(e.supersededBy):void 0;return{kind:2,supersededBy:o,userTypingDisagreed:e.userTypingDisagreed}}else if(e.kind===0)return{kind:0};return{kind:1}}t.to=r})(Ck||={});var Tk;(e=>{function r(n){return n===2?2:1}e.from=r;function t(n){return n===2?2:1}e.to=t})(Tk||={});var _k;(t=>{function r(e,n){return{id:n,label:e.label,description:e.description,canEdit:e.canEdit,collapsibleState:e.collapsibleState||0,contextValue:e.contextValue}}t.from=r})(_k||={});var Pk;(t=>{function r(e){return e.type==="mcp"?new gp(e.label,e.serverLabel||e.label,e.instructions):e.type==="extension"?new fp(e.extensionId.value,e.label):void 0}t.to=r})(Pk||={});var zE;(e=>{function r(n){let o=new El(n.content.map(i=>i.kind==="text"?new Kt(i.value,i.audience):i.kind==="data"?new Pn(i.value.data.buffer,i.value.mimeType,i.audience):new Rr(i.value)));return n.toolMetadata!==void 0&&(o.toolMetadata=n.toolMetadata),n.toolResultError&&(o.hasError=!!n.toolResultError),o}e.to=r;function t(n,o){n.toolResultMessage&&H(o,"chatParticipantPrivate");let i=d=>{d.audience&&H(o,"languageModelToolResultAudience")},s=!1,a;Array.isArray(n.toolResultDetails)?a=n.toolResultDetails?.map(d=>E.isUri(d)?d:kr.from(d)):n.toolResultDetails2&&(a={output:{type:"data",mimeType:n.toolResultDetails2.mime,value:ce.wrap(n.toolResultDetails2.value)}},s=!0);let l={content:n.content.map(d=>{if(d instanceof Kt)return i(d),{kind:"text",value:d.value,audience:d.audience};if(d instanceof Rr)return{kind:"promptTsx",value:d.value};if(d instanceof Pn)return i(d),s=!0,{kind:"data",value:{mimeType:d.mimeType,data:ce.wrap(d.data)},audience:d.audience};throw new Error("Unknown LanguageModelToolResult part type")}),toolResultMessage:ye.fromStrict(n.toolResultMessage),toolResultDetails:a,toolMetadata:n.toolMetadata,toolResultError:n.hasError};return s?new Wt(l):l}e.from=t})(zE||={});var ci;(n=>{function r(o){return o}n.fromThemeIcon=r;function t(o){if(o){if(Tt.isThemeIcon(o))return o;if(E.isUri(o))return o;if(typeof o=="string")return E.file(o);if(typeof o=="object"&&o!==null&&"dark"in o){let i=typeof o.dark=="string"?E.file(o.dark):o.dark,s=typeof o.light=="string"?E.file(o.light):o.light;return i?{dark:i,light:s??i}:void 0}else return}else return}n.from=t;function e(o){if(o){if(Tt.isThemeIcon(o))return o;if(Ta(o))return E.revive(o);{let i=o;return{light:E.revive(i.light),dark:E.revive(i.dark)}}}else return}n.to=e})(ci||={});var Dk;(t=>{function r(e){return{text:e.text,commandId:e.commandId,type:e.type}}t.from=r})(Dk||={});var wk;(e=>{function r(n){return{query:n.query,kind:t(n.kind),settings:n.settings}}e.fromSettingsSearchResult=r;function t(n){switch(n){case 1:return 1;case 2:return 2;case 3:return 3;default:throw new Error("Unknown AiSettingsSearchResultKind")}}})(wk||={});var SG;(n=>{function r(o){return!!o.uri}function t(o){return Dg.toSerialized(r(o)?{type:2,uri:o.uri,headers:Object.entries(o.headers),authentication:o.authentication?{providerId:o.authentication.providerId,scopes:o.authentication.scopes}:void 0}:{type:1,cwd:o.cwd?.fsPath,args:o.args,command:o.command,env:o.env,envFile:void 0})}n.from=t;function e(o){let i=Dg.fromSerialized(o.launch);if(i.type===2)return new Yd(o.label,i.uri,Object.fromEntries(i.headers),o.cacheNonce==="$$NONE"?void 0:o.cacheNonce);{let s=new Xd(o.label,i.command,[...i.args],Object.fromEntries(Object.entries(i.env).map(([a,l])=>[a,l===null?null:String(l)])),o.cacheNonce==="$$NONE"?void 0:o.cacheNonce);return i.cwd&&(s.cwd=E.file(i.cwd)),s}}n.to=e})(SG||={});var Rk;(t=>{function r(e){switch(e){case 0:return 0;case 1:return 1;case 2:return 2;default:throw new Error("Unknown SourceControlInputBoxValidationType")}}t.from=r})(Rk||={});var gB;(t=>{function r(e){let n={};for(let[o,i]of Object.entries(e)){if(!i||i.length===0)continue;let s=[];for(let a of i){let l=hB.to(a);l&&s.push(l)}s.length>0&&(n[o]=s)}return n}t.to=r})(gB||={});var hB;(t=>{function r(e){let n=c2(e,xi);if(n)return{command:n,cwd:e.cwd,env:e.env,timeout:e.timeout}}t.to=r})(hB||={});var _p;(e=>{function r(n){if(n!==void 0)switch(n){case 0:return 0;case 1:return 1;case 2:return 2;case 3:return 3;default:return}}function t(n){let o=n.timing,i=o?.created??o?.startTime??0,s=o?.lastRequestStarted??o?.startTime,a=o?.lastRequestEnded??o?.endTime;return{resource:n.resource,label:n.label,description:n.description?ye.from(n.description):void 0,badge:n.badge?ye.from(n.badge):void 0,status:r(n.status),archived:n.archived,tooltip:ye.fromStrict(n.tooltip),timing:{created:i,lastRequestStarted:s,lastRequestEnded:a},changes:n.changes instanceof Array?n.changes:void 0,metadata:n.metadata}}e.from=t})(_p||={});var qo=class{constructor(t,e,n){this.uri=t;this.ranges=e;this.previewText=n}},Cl=class{constructor(t,e,n){this.uri=t;this.text=e;this.lineNumber=n}},uc=class{constructor(t){this.keyword=t}},qE=(n=>(n[n.None=1]="None",n[n.FilesExclude=2]="FilesExclude",n[n.SearchAndFilesExclude=3]="SearchAndFilesExclude",n))(qE||{}),ah=(e=>(e[e.Information=1]="Information",e[e.Warning=2]="Warning",e))(ah||{});var jE=2e4,vB="\u27EA ",bB=" characters skipped \u27EB",xG=(vB.length+bB.length+5)*2,CG=N("searchService");function Ak(r){return!!r.rangeLocations&&!!r.previewText}var KE=class{constructor(t,e,n,o){this.rangeLocations=[];this.webviewIndex=o;let i=Array.isArray(e)?e:[e];if(n&&n.matchLines===1&&TG(i)){t=PU(t,n.matchLines);let s="",a=0,l=0,d=Math.floor(n.charsPerLine/5);for(let c of i){let u=Math.max(c.startColumn-d,0),f=c.startColumn+n.charsPerLine;if(u>l+d+xG){let g=vB+(u-l)+bB;s+=g+t.slice(u,f),a+=u-(l+g.length)}else s+=t.slice(l,f);l=f,this.rangeLocations.push({source:c,preview:new kk(0,c.startColumn-a,c.endColumn-a)})}this.previewText=s}else{let s=Array.isArray(e)?e[0].startLineNumber:e.startLineNumber,a=hf(e,l=>({preview:new JE(l.startLineNumber-s,l.startColumn,l.endLineNumber-s,l.endColumn),source:l}));this.rangeLocations=Array.isArray(a)?a:[a],this.previewText=t}}};function TG(r){let t=r[0].startLineNumber;for(let e of r)if(e.startLineNumber!==t||e.endLineNumber!==t)return!1;return!0}var JE=class{constructor(t,e,n,o){this.startLineNumber=t,this.startColumn=e,this.endLineNumber=n,this.endColumn=o}},kk=class extends JE{constructor(t,e,n){super(t,e,t,n)}};function IB(r,t=!0){let e=r&&r.files&&r.files.exclude,n=t&&r&&r.search&&r.search.exclude;if(!e&&!n)return;if(!e||!n)return e||n||void 0;let o=Object.create(null);return o=yr(o,St(e)),o=yr(o,St(n),!0),o}function Ok(r,t){let e=r.ignoreGlobCase?{ignoreCase:!0}:void 0;return r.excludePattern&&Zr(r.excludePattern,t,e)?!1:r.includePattern||r.usingSearchPaths?r.includePattern&&Zr(r.includePattern,t,e)?!0:r.usingSearchPaths?!!r.folderQueries&&r.folderQueries.some(n=>{let o=n.folder.fsPath;if(ud(t,o,r.ignoreGlobCase)){let i=gs(o,t);return!n.includePattern||!!Zr(n.includePattern,i,e)}else return!1}):!1:!0}function Tl(r,t){let e={...r||{},...t||{}};return Object.keys(e).filter(n=>{let o=e[n];return typeof o=="boolean"&&o})}var Pp=class{constructor(t,e){this._parsedIncludeExpression=null;let n=t.ignoreGlobCase||e.ignoreGlobCase?{ignoreCase:!0}:void 0;this._excludeExpression=e.excludePattern?.map(i=>({...t.excludePattern||{},...i.pattern||{}}))??[],this._excludeExpression.length===0&&(this._excludeExpression=[t.excludePattern||{}]),this._parsedExcludeExpression=this._excludeExpression.map(i=>ei(i,n));let o=t.includePattern;e.includePattern&&(o?o={...o,...e.includePattern}:o=e.includePattern),o&&(this._parsedIncludeExpression=ei(o,n))}_evalParsedExcludeExpression(t,e,n){let o=null;for(let i of this._parsedExcludeExpression){let s=i(t,e,n);if(typeof s=="string"){o=s;break}}return o}matchesExcludesSync(t,e,n){return!!(this._parsedExcludeExpression&&this._evalParsedExcludeExpression(t,e,n))}includedInQuerySync(t,e,n){return!(this._parsedExcludeExpression&&this._evalParsedExcludeExpression(t,e,n)||this._parsedIncludeExpression&&!this._parsedIncludeExpression(t,e,n))}includedInQuery(t,e,n){let o=()=>this._parsedIncludeExpression?!!this._parsedIncludeExpression(t,e,n):!0;return Promise.all(this._parsedExcludeExpression.map(i=>{let s=i(t,e,n);return br(s)?s.then(a=>a?!1:o()):o()})).then(i=>i.some(s=>!!s))}hasSiblingExcludeClauses(){return this._excludeExpression.reduce((t,e)=>_G(e)||t,!1)}};function _G(r){for(let t in r)if(typeof r[t]!="boolean")return!0;return!1}function yB(r){if(!r)return;let t;return e=>(t||(t=(r()||Promise.resolve([])).then(n=>n?SB(n):{})),t.then(n=>!!n[e]))}function EB(r){if(!r)return;let t;return e=>{if(!t){let n=r();t=n?SB(n):{}}return!!t[e]}}function SB(r){let t={};for(let e of r)t[e]=!0;return t}function QE(r){return r.flatMap(t=>t.patterns.map(e=>t.baseUri?{baseUri:t.baseUri,pattern:e}:e))}var lh={matchLines:100,charsPerLine:1e4};var PG=!1,Mk=class{constructor(t,e,n){this.id=t;this.dependencies=e;this.callback=n}};var Nk=class r{constructor(){this._isWebWorker=typeof self=="object"&&self.constructor&&self.constructor.name==="DedicatedWorkerGlobalScope";this._isRenderer=typeof document=="object";this._defineCalls=[];this._state=1}static{this.INSTANCE=new r}_initialize(){if(this._state===1){if(globalThis.define){this._state=3;return}}else return;this._state=2,globalThis.define=(t,e,n)=>{typeof t!="string"&&(n=e,e=t,t=null),(typeof e!="object"||!Array.isArray(e))&&(n=e,e=null),this._defineCalls.push(new Mk(t,e,n))},globalThis.define.amd=!0,this._isRenderer?this._amdPolicy=globalThis._VSCODE_WEB_PACKAGE_TTP??window.trustedTypes?.createPolicy("amdLoader",{createScriptURL(t){if(t.startsWith(window.location.origin)||t.startsWith(`${X.vscodeFileResource}://${G_}`))return t;throw new Error(`[trusted_script_src] Invalid script url: ${t}`)}}):this._isWebWorker&&(this._amdPolicy=globalThis._VSCODE_WEB_PACKAGE_TTP??globalThis.trustedTypes?.createPolicy("amdLoader",{createScriptURL(t){return t}}))}async load(t){if(this._initialize(),this._state===3)return new Promise(s=>{let a=ct();globalThis.define(a,[t],function(l){s(l)})});let e=await(this._isWebWorker?this._workerLoadScript(t):this._isRenderer?this._rendererLoadScript(t):this._nodeJSLoadScript(t));if(!e){console.warn(`Did not receive a define call from script ${t}`);return}let n={},o=[],i=[];if(Array.isArray(e.dependencies))for(let s of e.dependencies)s==="exports"?o.push(n):i.push(s);if(i.length>0)throw new Error(`Cannot resolve dependencies for script ${t}. The dependencies are: ${i.join(", ")}`);return typeof e.callback=="function"?e.callback(...o)??n:e.callback}_rendererLoadScript(t){return new Promise((e,n)=>{let o=document.createElement("script");o.setAttribute("async","async"),o.setAttribute("type","text/javascript");let i=()=>{o.removeEventListener("load",s),o.removeEventListener("error",a)},s=l=>{i(),e(this._defineCalls.pop())},a=l=>{i(),n(l)};o.addEventListener("load",s),o.addEventListener("error",a),this._amdPolicy&&(t=this._amdPolicy.createScriptURL(t)),o.setAttribute("src",t),window.document.getElementsByTagName("head")[0].appendChild(o)})}async _workerLoadScript(t){return this._amdPolicy&&(t=this._amdPolicy.createScriptURL(t)),await import(t),this._defineCalls.pop()}async _nodeJSLoadScript(t){try{let e=(await import("fs")).default,n=(await import("vm")).default,o=(await import("module")).default,i=E.parse(t).fsPath,s=e.readFileSync(i).toString(),a=o.wrap(s.replace(/^#!.*/,""));return new n.Script(a).runInThisContext().apply(),this._defineCalls.pop()}catch(e){throw e}}},Lk=new Map;async function XE(r,t,e){e===void 0&&(e=!!(globalThis._VSCODE_PRODUCT_JSON??globalThis.vscode?.context?.configuration()?.product)?.commit);let n=t?`${r}/${t}`:r;if(Lk.has(n))return Lk.get(n);let o;if(/^\w[\w\d+.-]*:\/\//.test(n))o=n;else{let l=`${PG&&e&&!Xo?MU:LU}/${n}`;o=Xv.asBrowserUri(l).toString(!0)}let i=Nk.INSTANCE.load(o);return Lk.set(n,i),i}var ch="utf8",Vk="utf8bom",ZE="utf16be",eS="utf16le";var YE=[254,255],Fk=[255,254],dh=[239,187,191],DG=512,wG=512,RG=512*8,kG=512*128;var Hk=class extends Error{constructor(e,n){super(e);this.decodeStreamErrorKind=n}},Bk=class r{constructor(t){this.iconvLiteDecoder=t}static async create(t){let e;if(t!==ch)e=(await XE("@vscode/iconv-lite-umd","lib/iconv-lite-umd.js")).getDecoder(TB(t));else{let n=new TextDecoder;e={write(o){return n.decode(o,{stream:!0})},end(){return n.decode()}}}return new r(e)}write(t){return this.iconvLiteDecoder.write(t)}end(){return this.iconvLiteDecoder.end()}};function xB(r,t){let e=t.minBytesRequiredForDetection??(t.guessEncoding?RG:wG);return new Promise((n,o)=>{let i=xv(u=>u.join("")),s=[],a=0,l,d=new We,c=async()=>{try{let u=await HG({buffer:ce.concat(s),bytesRead:a},t.guessEncoding,t.candidateGuessEncodings);if(u.seemsBinary&&t.acceptTextOnly)throw new Hk("Stream is binary but only text is accepted for decoding",1);u.encoding=await t.overwriteEncoding(u.encoding),l=await Bk.create(u.encoding);let f=l.write(ce.concat(s).buffer);i.write(f),s.length=0,a=0,n({stream:i,detected:u})}catch(u){d.cancel(),i.destroy(),o(u)}};d_(r,{onData:async u=>{l?i.write(l.write(u.buffer)):(s.push(u),a+=u.byteLength,a>=e&&(r.pause(),await c(),setTimeout(()=>r.resume())))},onError:u=>i.error(u),onEnd:async()=>{l||await c(),i.end(l?.end())}},d.token)})}async function CB(r,t,e){let o=(await XE("@vscode/iconv-lite-umd","lib/iconv-lite-umd.js")).getEncoder(TB(t),e),i=!1,s=!1;return{read(){if(s)return null;let a=r.read();if(typeof a!="string"){if(s=!0,!i&&e?.addBOM)switch(t){case ch:case Vk:return ce.wrap(Uint8Array.from(dh));case ZE:return ce.wrap(Uint8Array.from(YE));case eS:return ce.wrap(Uint8Array.from(Fk))}let l=o.end();return l&&l.length>0?(i=!0,ce.wrap(l)):null}return i=!0,ce.wrap(o.write(a))}}}function TB(r){return r===Vk||r===null?ch:r}function AG(r,t){if(!r||t<YE.length)return null;let e=r.readUInt8(0),n=r.readUInt8(1);if(e===YE[0]&&n===YE[1])return ZE;if(e===Fk[0]&&n===Fk[1])return eS;if(t<dh.length)return null;let o=r.readUInt8(2);return e===dh[0]&&n===dh[1]&&o===dh[2]?Vk:null}var OG=["ascii","utf-16","utf-32"];async function LG(r,t){let e=await XE("jschardet","dist/jschardet.min.js"),n=r.slice(0,kG),o=FG(n.buffer);t&&(t=pt(t.map(a=>UG(a))),t.length===0&&(t=void 0));let i;try{i=e.detect(o,t?{detectEncodings:t}:void 0)}catch{return null}if(!i?.encoding)return null;let s=i.encoding.toLowerCase();return 0<=OG.indexOf(s)?null:NG(i.encoding)}var MG={ibm866:"cp866",big5:"cp950"};function _B(r){return r.replace(/[^a-zA-Z0-9]/g,"").toLowerCase()}function NG(r){let t=_B(r);return MG[t]||t}function UG(r){let t=_B(r),e=BG[t];return e?e.guessableName:void 0}function FG(r){let t="";for(let e=0;e<r.length;e++)t+=String.fromCharCode(r[e]);return t}function HG({buffer:r,bytesRead:t},e,n){let o=AG(r,t),i=!1;if(o!==ZE&&o!==eS&&r){let s=!0,a=!0,l=!1;for(let d=0;d<t&&d<DG;d++){let c=d%2===1,u=r.readUInt8(d)===0;if(u&&(l=!0),s&&(c&&!u||!c&&u)&&(s=!1),a&&(c&&u||!c&&!u)&&(a=!1),u&&!s&&!a)break}l&&(s?o=eS:a?o=ZE:i=!0)}return e&&!i&&!o&&r?LG(r.slice(0,t),n).then(s=>({seemsBinary:!1,encoding:s})):{seemsBinary:i,encoding:o}}var Uk={utf8:{labelLong:"UTF-8",labelShort:"UTF-8",order:1,alias:"utf8bom",guessableName:"UTF-8"},utf8bom:{labelLong:"UTF-8 with BOM",labelShort:"UTF-8 with BOM",encodeOnly:!0,order:2,alias:"utf8"},utf16le:{labelLong:"UTF-16 LE",labelShort:"UTF-16 LE",order:3,guessableName:"UTF-16LE"},utf16be:{labelLong:"UTF-16 BE",labelShort:"UTF-16 BE",order:4,guessableName:"UTF-16BE"},windows1252:{labelLong:"Western (Windows 1252)",labelShort:"Windows 1252",order:5,guessableName:"windows-1252"},iso88591:{labelLong:"Western (ISO 8859-1)",labelShort:"ISO 8859-1",order:6},iso88593:{labelLong:"Western (ISO 8859-3)",labelShort:"ISO 8859-3",order:7},iso885915:{labelLong:"Western (ISO 8859-15)",labelShort:"ISO 8859-15",order:8},macroman:{labelLong:"Western (Mac Roman)",labelShort:"Mac Roman",order:9},cp437:{labelLong:"DOS (CP 437)",labelShort:"CP437",order:10},windows1256:{labelLong:"Arabic (Windows 1256)",labelShort:"Windows 1256",order:11},iso88596:{labelLong:"Arabic (ISO 8859-6)",labelShort:"ISO 8859-6",order:12},windows1257:{labelLong:"Baltic (Windows 1257)",labelShort:"Windows 1257",order:13},iso88594:{labelLong:"Baltic (ISO 8859-4)",labelShort:"ISO 8859-4",order:14},iso885914:{labelLong:"Celtic (ISO 8859-14)",labelShort:"ISO 8859-14",order:15},windows1250:{labelLong:"Central European (Windows 1250)",labelShort:"Windows 1250",order:16,guessableName:"windows-1250"},iso88592:{labelLong:"Central European (ISO 8859-2)",labelShort:"ISO 8859-2",order:17,guessableName:"ISO-8859-2"},cp852:{labelLong:"Central European (CP 852)",labelShort:"CP 852",order:18},windows1251:{labelLong:"Cyrillic (Windows 1251)",labelShort:"Windows 1251",order:19,guessableName:"windows-1251"},cp866:{labelLong:"Cyrillic (CP 866)",labelShort:"CP 866",order:20,guessableName:"IBM866"},cp1125:{labelLong:"Cyrillic (CP 1125)",labelShort:"CP 1125",order:21,guessableName:"IBM1125"},iso88595:{labelLong:"Cyrillic (ISO 8859-5)",labelShort:"ISO 8859-5",order:22,guessableName:"ISO-8859-5"},koi8r:{labelLong:"Cyrillic (KOI8-R)",labelShort:"KOI8-R",order:23,guessableName:"KOI8-R"},koi8u:{labelLong:"Cyrillic (KOI8-U)",labelShort:"KOI8-U",order:24},iso885913:{labelLong:"Estonian (ISO 8859-13)",labelShort:"ISO 8859-13",order:25},windows1253:{labelLong:"Greek (Windows 1253)",labelShort:"Windows 1253",order:26,guessableName:"windows-1253"},iso88597:{labelLong:"Greek (ISO 8859-7)",labelShort:"ISO 8859-7",order:27,guessableName:"ISO-8859-7"},windows1255:{labelLong:"Hebrew (Windows 1255)",labelShort:"Windows 1255",order:28,guessableName:"windows-1255"},iso88598:{labelLong:"Hebrew (ISO 8859-8)",labelShort:"ISO 8859-8",order:29,guessableName:"ISO-8859-8"},iso885910:{labelLong:"Nordic (ISO 8859-10)",labelShort:"ISO 8859-10",order:30},iso885916:{labelLong:"Romanian (ISO 8859-16)",labelShort:"ISO 8859-16",order:31},windows1254:{labelLong:"Turkish (Windows 1254)",labelShort:"Windows 1254",order:32},iso88599:{labelLong:"Turkish (ISO 8859-9)",labelShort:"ISO 8859-9",order:33},windows1258:{labelLong:"Vietnamese (Windows 1258)",labelShort:"Windows 1258",order:34},gbk:{labelLong:"Simplified Chinese (GBK)",labelShort:"GBK",order:35},gb18030:{labelLong:"Simplified Chinese (GB18030)",labelShort:"GB18030",order:36},cp950:{labelLong:"Traditional Chinese (Big5)",labelShort:"Big5",order:37,guessableName:"Big5"},big5hkscs:{labelLong:"Traditional Chinese (Big5-HKSCS)",labelShort:"Big5-HKSCS",order:38},shiftjis:{labelLong:"Japanese (Shift JIS)",labelShort:"Shift JIS",order:39,guessableName:"SHIFT_JIS"},eucjp:{labelLong:"Japanese (EUC-JP)",labelShort:"EUC-JP",order:40,guessableName:"EUC-JP"},euckr:{labelLong:"Korean (EUC-KR)",labelShort:"EUC-KR",order:41,guessableName:"EUC-KR"},windows874:{labelLong:"Thai (Windows 874)",labelShort:"Windows 874",order:42},iso885911:{labelLong:"Latin/Thai (ISO 8859-11)",labelShort:"ISO 8859-11",order:43},koi8ru:{labelLong:"Cyrillic (KOI8-RU)",labelShort:"KOI8-RU",order:44},koi8t:{labelLong:"Tajik (KOI8-T)",labelShort:"KOI8-T",order:45},gb2312:{labelLong:"Simplified Chinese (GB 2312)",labelShort:"GB 2312",order:46,guessableName:"GB2312"},cp865:{labelLong:"Nordic DOS (CP 865)",labelShort:"CP 865",order:47},cp850:{labelLong:"Western European DOS (CP 850)",labelShort:"CP 850",order:48}},BG=(()=>{let r={};for(let t in Uk)Uk[t].guessableName&&(r[t]=Uk[t]);return r})();var $Ce=N("textFileService");function PB(r){let t=!1;return{read(){return t?null:(t=!0,r)}}}function ph(r,t,e){return new Pi(n=>nS(n,e)).isEqual(r,t)}function VG(r,t,e){return ph(r.uri,t.uri,e)?0:Vr(r.uri.toString(),t.uri.toString())}function WG(r,t,e){return r.index!==t.index?r.index<t.index?-1:1:ph(r.uri,t.uri,e)?Vr(r.name,t.name):Vr(r.uri.toString(),t.uri.toString())}function wB(r,t,e,n){let o=r.slice(0).sort((s,a)=>e(s,a,n)),i=t.slice(0).sort((s,a)=>e(s,a,n));return u0(o,i,(s,a)=>e(s,a,n))}function nS(r,t){let e=t.getCapabilities(r.scheme);return!(e&&e&1024)}var uh=class r extends _b{constructor(e,n,o,i,s,a,l){super(e,o.map(d=>new Yf(d)),i,s,l);this._name=n;this._isUntitled=a;this._workspaceFolders=[];this._structure=Oo.forUris(l,()=>!0),o.forEach(d=>{this._workspaceFolders.push(d),this._structure.set(d.uri,d)})}static toExtHostWorkspace(e,n,o,i){if(!e)return{workspace:null,added:[],removed:[]};let{id:s,name:a,folders:l,configuration:d,transient:c,isUntitled:u}=e,f=[],g=n;n?l.forEach((_,R)=>{let O=E.revive(_.uri),U=r._findFolder(o||n,O,i);U?(U.name=_.name,U.index=_.index,f.push(U)):f.push({uri:O,name:_.name,index:R})}):f.push(...l.map(({uri:_,name:R,index:O})=>({uri:E.revive(_),name:R,index:O}))),f.sort((_,R)=>_.index<R.index?-1:1);let I=new r(s,a,f,!!c,d?E.revive(d):null,!!u,_=>nS(_,i)),{added:h,removed:C}=wB(g?g.workspaceFolders:[],I.workspaceFolders,VG,i);return{workspace:I,added:h,removed:C}}static _findFolder(e,n,o){for(let i=0;i<e.folders.length;i++){let s=e.workspaceFolders[i];if(ph(s.uri,n,o))return s}}get name(){return this._name}get isUntitled(){return this._isUntitled}get workspaceFolders(){return this._workspaceFolders.slice(0)}getWorkspaceFolder(e,n){return n&&this._structure.get(e)&&(e=bs(e)),this._structure.findSubstr(e)}resolveWorkspaceFolder(e){return this._structure.get(e)}},Dp=class{constructor(t,e,n,o,i){this._onDidChangeWorkspace=new D;this.onDidChangeWorkspace=this._onDidChangeWorkspace.event;this._onDidGrantWorkspaceTrust=new D;this.onDidGrantWorkspaceTrust=this._onDidGrantWorkspaceTrust.event;this._onDidChangeWorkspaceTrustedFolders=new D;this.onDidChangeWorkspaceTrustedFolders=this._onDidChangeWorkspaceTrustedFolders.event;this._activeSearchCallbacks=[];this._trusted=!1;this._editSessionIdentityProviders=new Map;this._providerHandlePool=0;this._onWillCreateEditSessionIdentityEvent=new yi;this._canonicalUriProviders=new Map;this._logService=o,this._extHostFileSystemInfo=n,this._uriTransformerService=i,this._requestIdProvider=new xb,this._barrier=new Ln,this._proxy=t.getProxy(V.MainThreadWorkspace),this._messageService=t.getProxy(V.MainThreadMessageService);let s=e.workspace;this._confirmedWorkspace=s?new uh(s.id,s.name,[],!!s.transient,s.configuration?E.revive(s.configuration):null,!!s.isUntitled,a=>nS(a,n)):void 0}$initializeWorkspace(t,e){this._trusted=e,this.$acceptWorkspaceData(t),this._barrier.open()}waitForInitializeCall(){return this._barrier.wait()}get workspace(){return this._actualWorkspace}get name(){return this._actualWorkspace?this._actualWorkspace.name:void 0}get workspaceFile(){if(this._actualWorkspace&&this._actualWorkspace.configuration)return this._actualWorkspace.isUntitled?E.from({scheme:X.untitled,path:tn(bs(this._actualWorkspace.configuration))}):this._actualWorkspace.configuration}get _actualWorkspace(){return this._unconfirmedWorkspace||this._confirmedWorkspace}getWorkspaceFolders(){if(this._actualWorkspace)return this._actualWorkspace.workspaceFolders.slice(0)}async getWorkspaceFolders2(){if(await this._barrier.wait(),!!this._actualWorkspace)return this._actualWorkspace.workspaceFolders.slice(0)}updateWorkspaceFolders(t,e,n,...o){let i=[];if(Array.isArray(o)&&o.forEach(c=>{E.isUri(c.uri)&&!i.some(u=>ph(u.uri,c.uri,this._extHostFileSystemInfo))&&i.push({uri:c.uri,name:c.name||Of(c.uri)})}),this._unconfirmedWorkspace||[e,n].some(c=>typeof c!="number"||c<0)||n===0&&i.length===0)return!1;let s=this._actualWorkspace?this._actualWorkspace.workspaceFolders:[];if(e+n>s.length)return!1;let a=s.slice(0);a.splice(e,n,...i.map(c=>({uri:c.uri,name:c.name||Of(c.uri),index:void 0})));for(let c=0;c<a.length;c++){let u=a[c];if(a.some((f,g)=>g!==c&&ph(u.uri,f.uri,this._extHostFileSystemInfo)))return!1}a.forEach((c,u)=>c.index=u);let{added:l,removed:d}=wB(s,a,WG,this._extHostFileSystemInfo);if(l.length===0&&d.length===0)return!1;if(this._proxy){let c=t.displayName||t.name;this._proxy.$updateWorkspaceFolders(c,e,n,i).then(void 0,u=>{this._unconfirmedWorkspace=void 0;let f={source:{identifier:t.identifier,label:t.displayName||t.name}};this._messageService.$showMessage(lF.Error,p(3214,null,c,u.toString()),f,[])})}return this.trySetWorkspaceFolders(a),!0}getWorkspaceFolder(t,e){if(this._actualWorkspace)return this._actualWorkspace.getWorkspaceFolder(t,e)}async getWorkspaceFolder2(t,e){if(await this._barrier.wait(),!!this._actualWorkspace)return this._actualWorkspace.getWorkspaceFolder(t,e)}async resolveWorkspaceFolder(t){if(await this._barrier.wait(),!!this._actualWorkspace)return this._actualWorkspace.resolveWorkspaceFolder(t)}getPath(){if(!this._actualWorkspace)return;let{folders:t}=this._actualWorkspace;if(t.length!==0)return t[0].uri.fsPath}getRelativePath(t,e){let n,o="";if(typeof t=="string"?(n=E.file(t),o=t):typeof t<"u"&&(n=t,o=t.fsPath),!n)return o;let i=this.getWorkspaceFolder(n,!0);if(!i)return o;typeof e>"u"&&this._actualWorkspace&&(e=this._actualWorkspace.folders.length>1);let s=Lf(i.uri,n);return e&&i.name&&(s=`${i.name}/${s}`),s}trySetWorkspaceFolders(t){this._actualWorkspace&&(this._unconfirmedWorkspace=uh.toExtHostWorkspace({id:this._actualWorkspace.id,name:this._actualWorkspace.name,configuration:this._actualWorkspace.configuration,folders:t,isUntitled:this._actualWorkspace.isUntitled},this._actualWorkspace,void 0,this._extHostFileSystemInfo).workspace||void 0)}$acceptWorkspaceData(t){let{workspace:e,added:n,removed:o}=uh.toExtHostWorkspace(t,this._confirmedWorkspace,this._unconfirmedWorkspace,this._extHostFileSystemInfo);this._confirmedWorkspace=e||void 0,this._unconfirmedWorkspace=void 0,this._onDidChangeWorkspace.fire(Object.freeze({added:n,removed:o}))}findFiles(t,e,n,o,i=De.None){this._logService.trace(`extHostWorkspace#findFiles: fileSearch, extension: ${o.value}, entryPoint: findFiles`);let s="",a=!0;return e===null?a=!1:e!==void 0&&(typeof e=="string"?s=e:s=e.pattern),this._findFilesImpl({type:"include",value:t},{exclude:[s],maxResults:n,useExcludeSettings:a?2:1,useIgnoreFiles:{local:!1}},i)}findFiles2(t,e={},n,o=De.None){return this._logService.trace(`extHostWorkspace#findFiles2New: fileSearch, extension: ${n.value}, entryPoint: findFiles2New`),this._findFilesImpl({type:"filePatterns",value:t},e,o)}async _findFilesImpl(t,e,n){if(n.isCancellationRequested)return Promise.resolve([]);let o=t.type==="include"?[t.value]:t.value??[];if(!Array.isArray(o))throw console.error("Invalid file pattern provided",o),new Error(`Invalid file pattern provided ${JSON.stringify(o)}`);let i=o.map(s=>{let a=DB(e.exclude),l={ignoreSymlinks:typeof e.followSymlinks=="boolean"?!e.followSymlinks:void 0,disregardIgnoreFiles:typeof e.useIgnoreFiles?.local=="boolean"?!e.useIgnoreFiles.local:void 0,disregardGlobalIgnoreFiles:typeof e.useIgnoreFiles?.global=="boolean"?!e.useIgnoreFiles.global:void 0,disregardParentIgnoreFiles:typeof e.useIgnoreFiles?.parent=="boolean"?!e.useIgnoreFiles.parent:void 0,disregardExcludeSettings:e.useExcludeSettings!==void 0&&e.useExcludeSettings===1,disregardSearchExcludeSettings:e.useExcludeSettings!==void 0&&e.useExcludeSettings!==3,maxResults:e.maxResults,excludePattern:a.length>0?a:void 0,_reason:"startFileSearch",shouldGlobSearch:e.shouldGlobSearch??(t.type==="include"?void 0:!0),sortByScore:e.sortByScore,cacheKey:e.cacheKey},d=tS(To.from(s)),c=d?.folder;return t.type==="include"?l.includePattern=d?.pattern:l.filePattern=d?.pattern,{folder:c,options:l}});return this._findFilesBase(i,n)}async _findFilesBase(t,e){let o=(await Promise.all(t?.map(a=>this._proxy.$startFileSearch(a.folder??null,a.options,e).then(l=>Array.isArray(l)?l.map(d=>E.revive(d)):[]))??[])).flat(),i=new Pi(a=>nS(a,this._extHostFileSystemInfo)),s=new Map;for(let a of o){let l=i.getComparisonKey(a);s.has(l)||s.set(l,a)}return Array.from(s.values())}findTextInFiles2(t,e,n,o=De.None){this._logService.trace(`extHostWorkspace#findTextInFiles2: textSearch, extension: ${n.value}, entryPoint: findTextInFiles2`);let i=f=>{if(!e)return{folder:void 0,options:{}};let g=f?tS(To.from(f)):void 0,I=e.exclude?DB(e.exclude):void 0;return{options:{ignoreSymlinks:typeof e.followSymlinks=="boolean"?!e.followSymlinks:void 0,disregardIgnoreFiles:typeof e.useIgnoreFiles?.local=="boolean"?!e.useIgnoreFiles?.local:void 0,disregardGlobalIgnoreFiles:typeof e.useIgnoreFiles?.global=="boolean"?!e.useIgnoreFiles?.global:void 0,disregardParentIgnoreFiles:typeof e.useIgnoreFiles?.parent=="boolean"?!e.useIgnoreFiles?.parent:void 0,disregardExcludeSettings:e.useExcludeSettings!==void 0&&e.useExcludeSettings===1,disregardSearchExcludeSettings:e.useExcludeSettings!==void 0&&e.useExcludeSettings!==3,fileEncoding:e.encoding,maxResults:e.maxResults,previewOptions:e.previewOptions?{matchLines:e.previewOptions?.numMatchLines??100,charsPerLine:e.previewOptions?.charsPerLine??1e4}:void 0,surroundingContext:e.surroundingContext,includePattern:g?.pattern,excludePattern:I},folder:g?.folder}},a=(e?.include?.map(f=>i(f))??[i(void 0)]).filter(f=>!!f),l=new te,d=l.add(new D),c=this.findTextInFilesBase(t,a,(f,g)=>d.fire({result:f,uri:g}),o);return{results:new Zc(async f=>{l.add(d.event(g=>{let I=g.result,h=g.uri;Ak(I)?f.emitOne(new qo(h,I.rangeLocations.map(C=>({previewRange:new Se(C.preview.startLineNumber,C.preview.startColumn,C.preview.endLineNumber,C.preview.endColumn),sourceRange:new Se(C.source.startLineNumber,C.source.startColumn,C.source.endLineNumber,C.source.endColumn)})),I.previewText)):f.emitOne(new Cl(h,I.text,I.lineNumber))})),await c}),complete:c.then(f=>(l.dispose(),{limitHit:f?.limitHit??!1}))}}async findTextInFilesBase(t,e,n,o=De.None){let i=this._requestIdProvider.getNext(),s=!1;if(o.onCancellationRequested(a=>{s=!0}),this._activeSearchCallbacks[i]=a=>{if(s)return;let l=E.revive(a.resource);a.results.forEach(d=>{let c=nn(d);n(c,l)})},o.isCancellationRequested)return{};try{let a=await Promise.all(e?.map(l=>this._proxy.$startTextSearch(t,l.folder??null,l.options,i,o)||{})??[]);return delete this._activeSearchCallbacks[i],a.reduce((l,d)=>({limitHit:l?.limitHit||(d?.limitHit??!1),message:[l?.message??[],d?.message??[]].flat()}),{})??{limitHit:!1}}catch(a){throw delete this._activeSearchCallbacks[i],a}}async findTextInFiles(t,e,n,o,i=De.None){this._logService.trace(`extHostWorkspace#findTextInFiles: textSearch, extension: ${o.value}, entryPoint: findTextInFiles`);let s=typeof e.previewOptions>"u"?{matchLines:100,charsPerLine:1e4}:e.previewOptions,a=tS(To.from(e.include)),l=typeof e.exclude=="string"?e.exclude:e.exclude?e.exclude.pattern:void 0,d={ignoreSymlinks:typeof e.followSymlinks=="boolean"?!e.followSymlinks:void 0,disregardIgnoreFiles:typeof e.useIgnoreFiles=="boolean"?!e.useIgnoreFiles:void 0,disregardGlobalIgnoreFiles:typeof e.useGlobalIgnoreFiles=="boolean"?!e.useGlobalIgnoreFiles:void 0,disregardParentIgnoreFiles:typeof e.useParentIgnoreFiles=="boolean"?!e.useParentIgnoreFiles:void 0,disregardExcludeSettings:typeof e.useDefaultExcludes=="boolean"?!e.useDefaultExcludes:!0,disregardSearchExcludeSettings:typeof e.useSearchExclude=="boolean"?!e.useSearchExclude:!0,fileEncoding:e.encoding,maxResults:e.maxResults,previewOptions:s,surroundingContext:e.afterContext,includePattern:a?.pattern,excludePattern:l?[{pattern:l}]:void 0},c=(u,f)=>{Ak(u)?n({uri:f,preview:{text:u.previewText,matches:hf(u.rangeLocations,g=>new Se(g.preview.startLineNumber,g.preview.startColumn,g.preview.endLineNumber,g.preview.endColumn))},ranges:hf(u.rangeLocations,g=>new Se(g.source.startLineNumber,g.source.startColumn,g.source.endLineNumber,g.source.endColumn))}):n({uri:f,text:u.text,lineNumber:u.lineNumber})};return this.findTextInFilesBase(t,[{options:d,folder:a?.folder}],c,i)}$handleTextSearchResult(t,e){this._activeSearchCallbacks[e]?.(t)}async save(t){let e=await this._proxy.$save(t,{saveAs:!1});return E.revive(e)}async saveAs(t){let e=await this._proxy.$save(t,{saveAs:!0});return E.revive(e)}saveAll(t){return this._proxy.$saveAll(t)}resolveProxy(t){return this._proxy.$resolveProxy(t)}lookupAuthorization(t){return this._proxy.$lookupAuthorization(t)}lookupKerberosAuthorization(t){return this._proxy.$lookupKerberosAuthorization(t)}loadCertificates(){return this._proxy.$loadCertificates()}get trusted(){return this._trusted}requestResourceTrust(t){return this._proxy.$requestResourceTrust(t)}requestWorkspaceTrust(t){return this._proxy.$requestWorkspaceTrust(t)}$onDidGrantWorkspaceTrust(){this._trusted||(this._trusted=!0,this._onDidGrantWorkspaceTrust.fire())}$onDidChangeWorkspaceTrustedFolders(){this._onDidChangeWorkspaceTrustedFolders.fire()}isResourceTrusted(t){return this._proxy.$isResourceTrusted(t)}registerEditSessionIdentityProvider(t,e){if(this._editSessionIdentityProviders.has(t))throw new Error(`A provider has already been registered for scheme ${t}`);this._editSessionIdentityProviders.set(t,e);let n=this._uriTransformerService.transformOutgoingScheme(t),o=this._providerHandlePool++;return this._proxy.$registerEditSessionIdentityProvider(o,n),ae(()=>{this._editSessionIdentityProviders.delete(t),this._proxy.$unregisterEditSessionIdentityProvider(o)})}async $getEditSessionIdentifier(t,e){this._logService.info("Getting edit session identifier for workspaceFolder",t);let n=await this.resolveWorkspaceFolder(E.revive(t));if(!n){this._logService.warn("Unable to resolve workspace folder");return}this._logService.info("Invoking #provideEditSessionIdentity for workspaceFolder",n);let o=this._editSessionIdentityProviders.get(n.uri.scheme);if(this._logService.info(`Provider for scheme ${n.uri.scheme} is defined: `,!!o),!o)return;let i=await o.provideEditSessionIdentity(n,e);if(this._logService.info("Provider returned edit session identifier: ",i),!!i)return i}async $provideEditSessionIdentityMatch(t,e,n,o){this._logService.info("Getting edit session identifier for workspaceFolder",t);let i=await this.resolveWorkspaceFolder(E.revive(t));if(!i){this._logService.warn("Unable to resolve workspace folder");return}this._logService.info("Invoking #provideEditSessionIdentity for workspaceFolder",i);let s=this._editSessionIdentityProviders.get(i.uri.scheme);if(this._logService.info(`Provider for scheme ${i.uri.scheme} is defined: `,!!s),!s)return;let a=await s.provideEditSessionIdentityMatch?.(e,n,o);if(this._logService.info("Provider returned edit session identifier match result: ",a),!!a)return a}getOnWillCreateEditSessionIdentityEvent(t){return(e,n,o)=>{let i=function(a){e.call(n,a)};return i.extension=t,this._onWillCreateEditSessionIdentityEvent.event(i,void 0,o)}}async $onWillCreateEditSessionIdentity(t,e,n){let o=await this.resolveWorkspaceFolder(E.revive(t));if(o===void 0)throw new Error("Unable to resolve workspace folder");await this._onWillCreateEditSessionIdentityEvent.fireAsync({workspaceFolder:o},e,async(i,s)=>{let a=Date.now();await Promise.resolve(i),Date.now()-a>n&&this._logService.warn("SLOW edit session create-participant",s.extension.identifier)}),e.isCancellationRequested}registerCanonicalUriProvider(t,e){if(this._canonicalUriProviders.has(t))throw new Error(`A provider has already been registered for scheme ${t}`);this._canonicalUriProviders.set(t,e);let n=this._uriTransformerService.transformOutgoingScheme(t),o=this._providerHandlePool++;return this._proxy.$registerCanonicalUriProvider(o,n),ae(()=>{this._canonicalUriProviders.delete(t),this._proxy.$unregisterCanonicalUriProvider(o)})}async provideCanonicalUri(t,e,n){let o=this._canonicalUriProviders.get(t.scheme);if(!o)return;let i=await o.provideCanonicalUri?.(E.revive(t),e,n);if(i)return i}async $provideCanonicalUri(t,e,n){return this.provideCanonicalUri(E.revive(t),{targetScheme:e},n)}async decode(t,e){let[n,o]=this.toEncodeDecodeParameters(e),i=await this._proxy.$resolveDecoding(n,o),s=(await xB(M0(ce.wrap(t)),{...i,acceptTextOnly:!0,overwriteEncoding:a=>a===null||a===i.preferredEncoding?Promise.resolve(i.preferredEncoding):this._proxy.$validateDetectedEncoding(n,a,o)})).stream;return Cv(s,a=>a.join(""))}async encode(t,e){let[n,o]=this.toEncodeDecodeParameters(e),{encoding:i,addBOM:s}=await this._proxy.$resolveEncoding(n,o);if(i===ch&&!s)return ce.fromString(t).buffer;let a=await CB(PB(t),i,{addBOM:s});return L0(a).buffer}toEncodeDecodeParameters(t){let e=Ta(t?.uri)?t.uri:void 0,n=typeof t?.encoding=="string"?t.encoding:void 0;return[e,n?{encoding:n}:void 0]}};Dp=L([P(0,Ee),P(1,Et),P(2,Er),P(3,be),P(4,Aa)],Dp);var _o=N("IExtHostWorkspace");function tS(r){let t,e;if(r)return typeof r=="string"?t=r:(t=r.pattern,e=E.revive(r.baseUri)),{pattern:t,folder:e}}function DB(r){return(r?.map(t=>{if(typeof t=="string")return t===""?void 0:{pattern:t,uri:void 0};{let e=tS(t);return e?{pattern:e.pattern,uri:e.folder}:void 0}})??[]).filter(t=>!!t)}var RB;(t=>t.DEFAULT={allowTrailingComma:!0})(RB||={});function $G(r,t=!1){let e=0,n=r.length,o="",i=0,s=16,a=0;function l(h){let C=0,_=0;for(;C<h;){let R=r.charCodeAt(e);if(R>=48&&R<=57)_=_*16+R-48;else if(R>=65&&R<=70)_=_*16+R-65+10;else if(R>=97&&R<=102)_=_*16+R-97+10;else break;e++,C++}return C<h&&(_=-1),_}function d(h){e=h,o="",i=0,s=16,a=0}function c(){let h=e;if(r.charCodeAt(e)===48)e++;else for(e++;e<r.length&&wp(r.charCodeAt(e));)e++;if(e<r.length&&r.charCodeAt(e)===46)if(e++,e<r.length&&wp(r.charCodeAt(e)))for(e++;e<r.length&&wp(r.charCodeAt(e));)e++;else return a=3,r.substring(h,e);let C=e;if(e<r.length&&(r.charCodeAt(e)===69||r.charCodeAt(e)===101))if(e++,(e<r.length&&r.charCodeAt(e)===43||r.charCodeAt(e)===45)&&e++,e<r.length&&wp(r.charCodeAt(e))){for(e++;e<r.length&&wp(r.charCodeAt(e));)e++;C=e}else a=3;return r.substring(h,C)}function u(){let h="",C=e;for(;;){if(e>=n){h+=r.substring(C,e),a=2;break}let _=r.charCodeAt(e);if(_===34){h+=r.substring(C,e),e++;break}if(_===92){if(h+=r.substring(C,e),e++,e>=n){a=2;break}switch(r.charCodeAt(e++)){case 34:h+='"';break;case 92:h+="\\";break;case 47:h+="/";break;case 98:h+="\b";break;case 102:h+="\f";break;case 110:h+=`
`;break;case 114:h+="\r";break;case 116:h+="	";break;case 117:{let O=l(4);O>=0?h+=String.fromCharCode(O):a=4;break}default:a=5}C=e;continue}if(_>=0&&_<=31)if(oS(_)){h+=r.substring(C,e),a=2;break}else a=6;e++}return h}function f(){if(o="",a=0,i=e,e>=n)return i=n,s=17;let h=r.charCodeAt(e);if(Wk(h)){do e++,o+=String.fromCharCode(h),h=r.charCodeAt(e);while(Wk(h));return s=15}if(oS(h))return e++,o+=String.fromCharCode(h),h===13&&r.charCodeAt(e)===10&&(e++,o+=`
`),s=14;switch(h){case 123:return e++,s=1;case 125:return e++,s=2;case 91:return e++,s=3;case 93:return e++,s=4;case 58:return e++,s=6;case 44:return e++,s=5;case 34:return e++,o=u(),s=10;case 47:{let C=e-1;if(r.charCodeAt(e+1)===47){for(e+=2;e<n&&!oS(r.charCodeAt(e));)e++;return o=r.substring(C,e),s=12}if(r.charCodeAt(e+1)===42){e+=2;let _=n-1,R=!1;for(;e<_;){if(r.charCodeAt(e)===42&&r.charCodeAt(e+1)===47){e+=2,R=!0;break}e++}return R||(e++,a=1),o=r.substring(C,e),s=13}return o+=String.fromCharCode(h),e++,s=16}case 45:if(o+=String.fromCharCode(h),e++,e===n||!wp(r.charCodeAt(e)))return s=16;case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return o+=c(),s=11;default:for(;e<n&&g(h);)e++,h=r.charCodeAt(e);if(i!==e){switch(o=r.substring(i,e),o){case"true":return s=8;case"false":return s=9;case"null":return s=7}return s=16}return o+=String.fromCharCode(h),e++,s=16}}function g(h){if(Wk(h)||oS(h))return!1;switch(h){case 125:case 93:case 123:case 91:case 34:case 58:case 44:case 47:return!1}return!0}function I(){let h;do h=f();while(h>=12&&h<=15);return h}return{setPosition:d,getPosition:()=>e,scan:t?I:f,getToken:()=>s,getTokenValue:()=>o,getTokenOffset:()=>i,getTokenLength:()=>e-i,getTokenError:()=>a}}function Wk(r){return r===32||r===9||r===11||r===12||r===160||r===5760||r>=8192&&r<=8203||r===8239||r===8287||r===12288||r===65279}function oS(r){return r===10||r===13||r===8232||r===8233}function wp(r){return r>=48&&r<=57}function kB(r,t,e=RB.DEFAULT){let n=$G(r,!1);function o(oe){return oe?()=>oe(n.getTokenOffset(),n.getTokenLength()):()=>!0}function i(oe){return oe?ke=>oe(ke,n.getTokenOffset(),n.getTokenLength()):()=>!0}let s=o(t.onObjectBegin),a=i(t.onObjectProperty),l=o(t.onObjectEnd),d=o(t.onArrayBegin),c=o(t.onArrayEnd),u=i(t.onLiteralValue),f=i(t.onSeparator),g=o(t.onComment),I=i(t.onError),h=e&&e.disallowComments,C=e&&e.allowTrailingComma;function _(){for(;;){let oe=n.scan();switch(n.getTokenError()){case 4:R(14);break;case 5:R(15);break;case 3:R(13);break;case 1:h||R(11);break;case 2:R(12);break;case 6:R(16);break}switch(oe){case 12:case 13:h?R(10):g();break;case 16:R(1);break;case 15:case 14:break;default:return oe}}}function R(oe,ke=[],B=[]){if(I(oe),ke.length+B.length>0){let Xe=n.getToken();for(;Xe!==17;){if(ke.indexOf(Xe)!==-1){_();break}else if(B.indexOf(Xe)!==-1)break;Xe=_()}}}function O(oe){let ke=n.getTokenValue();return oe?u(ke):a(ke),_(),!0}function U(){switch(n.getToken()){case 11:{let oe=0;try{oe=JSON.parse(n.getTokenValue()),typeof oe!="number"&&(R(2),oe=0)}catch{R(2)}u(oe);break}case 7:u(null);break;case 8:u(!0);break;case 9:u(!1);break;default:return!1}return _(),!0}function ie(){return n.getToken()!==10?(R(3,[],[2,5]),!1):(O(!1),n.getToken()===6?(f(":"),_(),ee()||R(4,[],[2,5])):R(5,[],[2,5]),!0)}function Y(){s(),_();let oe=!1;for(;n.getToken()!==2&&n.getToken()!==17;){if(n.getToken()===5){if(oe||R(4,[],[]),f(","),_(),n.getToken()===2&&C)break}else oe&&R(6,[],[]);ie()||R(4,[],[2,5]),oe=!0}return l(),n.getToken()!==2?R(7,[2],[]):_(),!0}function Z(){d(),_();let oe=!1;for(;n.getToken()!==4&&n.getToken()!==17;){if(n.getToken()===5){if(oe||R(4,[],[]),f(","),_(),n.getToken()===4&&C)break}else oe&&R(6,[],[]);ee()||R(4,[],[4,5]),oe=!0}return c(),n.getToken()!==4?R(8,[4],[]):_(),!0}function ee(){switch(n.getToken()){case 3:return Z();case 1:return Y();case 10:return O(!0);default:return U()}}return _(),n.getToken()===17?e.allowEmptyContent?!0:(R(4,[],[]),!1):ee()?(n.getToken()!==17&&R(9,[],[]),!0):(R(4,[],[]),!1)}function mh(r){return Object.isFrozen(r)?r:jf(r)}var Pl=class r{constructor(t,e,n,o,i){this._contents=t;this._keys=e;this._overrides=n;this._raw=o;this.logService=i;this.overrideConfigurations=new Map}static createEmptyModel(t){return new r({},[],[],void 0,t)}get rawConfiguration(){if(!this._rawConfiguration)if(this._raw){let t=(Array.isArray(this._raw)?this._raw:[this._raw]).map(e=>{if(e instanceof r)return e;let n=new $k("",this.logService);return n.parseRaw(e),n.configurationModel});this._rawConfiguration=t.reduce((e,n)=>n===e?n:e.merge(n),t[0])}else this._rawConfiguration=this;return this._rawConfiguration}get contents(){return this._contents}get overrides(){return this._overrides}get keys(){return this._keys}get raw(){if(this._raw&&!(Array.isArray(this._raw)&&this._raw.every(t=>t instanceof r)))return this._raw}isEmpty(){return this._keys.length===0&&Object.keys(this._contents).length===0&&this._overrides.length===0}getValue(t){return t?hg(this.contents,t):this.contents}inspect(t,e){let n=this;return{get value(){return mh(n.rawConfiguration.getValue(t))},get override(){return e?mh(n.rawConfiguration.getOverrideValue(t,e)):void 0},get merged(){return mh(e?n.rawConfiguration.override(e).getValue(t):n.rawConfiguration.getValue(t))},get overrides(){let o=[];for(let{contents:i,identifiers:s,keys:a}of n.rawConfiguration.overrides){let l=new r(i,a,[],void 0,n.logService).getValue(t);l!==void 0&&o.push({identifiers:s,value:l})}return o.length?mh(o):void 0}}}getOverrideValue(t,e){let n=this.getContentsForOverrideIdentifer(e);return n?t?hg(n,t):n:void 0}getKeysForOverrideIdentifier(t){let e=[];for(let n of this.overrides)n.identifiers.includes(t)&&e.push(...n.keys);return cr(e)}getAllOverrideIdentifiers(){let t=[];for(let e of this.overrides)t.push(...e.identifiers);return cr(t)}override(t){let e=this.overrideConfigurations.get(t);return e||(e=this.createOverrideConfigurationModel(t),this.overrideConfigurations.set(t,e)),e}merge(...t){let e=St(this.contents),n=St(this.overrides),o=[...this.keys],i=this._raw?Array.isArray(this._raw)?[...this._raw]:[this._raw]:[this];for(let s of t)if(i.push(...s._raw?Array.isArray(s._raw)?s._raw:[s._raw]:[s]),!s.isEmpty()){this.mergeContents(e,s.contents);for(let a of s.overrides){let[l]=n.filter(d=>Zt(d.identifiers,a.identifiers));l?(this.mergeContents(l.contents,a.contents),l.keys.push(...a.keys),l.keys=cr(l.keys)):n.push(St(a))}for(let a of s.keys)o.indexOf(a)===-1&&o.push(a)}return new r(e,o,n,!i.length||i.every(s=>s instanceof r)?void 0:i,this.logService)}createOverrideConfigurationModel(t){let e=this.getContentsForOverrideIdentifer(t);if(!e||typeof e!="object"||!Object.keys(e).length)return this;let n={};for(let o of cr([...Object.keys(this.contents),...Object.keys(e)])){let i=this.contents[o],s=e[o];s&&(typeof i=="object"&&typeof s=="object"?(i=St(i),this.mergeContents(i,s)):i=s),n[o]=i}return new r(n,this.keys,this.overrides,void 0,this.logService)}mergeContents(t,e){for(let n of Object.keys(e)){if(n in t&&mt(t[n])&&mt(e[n])){this.mergeContents(t[n],e[n]);continue}t[n]=St(e[n])}}getContentsForOverrideIdentifer(t){let e=null,n=null,o=i=>{i&&(n?this.mergeContents(n,i):n=St(i))};for(let i of this.overrides)i.identifiers.length===1&&i.identifiers[0]===t?e=i.contents:i.identifiers.includes(t)&&o(i.contents);return o(e),n}toJSON(){return{contents:this.contents,overrides:this.overrides,keys:this.keys}}addValue(t,e){this.updateValue(t,e,!0)}setValue(t,e){this.updateValue(t,e,!1)}removeValue(t){let e=this.keys.indexOf(t);e!==-1&&(this.keys.splice(e,1),L2(this.contents,t),Tr.test(t)&&this.overrides.splice(this.overrides.findIndex(n=>Zt(n.identifiers,Cu(t))),1))}updateValue(t,e,n){if(aw(this.contents,t,e,o=>this.logService.error(o)),n=n||this.keys.indexOf(t)===-1,n&&this.keys.push(t),Tr.test(t)){let o=this.contents[t],i=Cu(t),s={identifiers:i,keys:Object.keys(o),contents:nI(o,l=>this.logService.error(l))},a=this.overrides.findIndex(l=>Zt(l.identifiers,i));a!==-1?this.overrides[a]=s:this.overrides.push(s)}}},$k=class{constructor(t,e){this._name=t;this.logService=e;this._raw=null;this._configurationModel=null;this._restrictedConfigurations=[];this._parseErrors=[]}get configurationModel(){return this._configurationModel||Pl.createEmptyModel(this.logService)}get restrictedConfigurations(){return this._restrictedConfigurations}get errors(){return this._parseErrors}parse(t,e){if(!Ft(t)){let n=this.doParseContent(t);this.parseRaw(n,e)}}reparse(t){this._raw&&this.parseRaw(this._raw,t)}parseRaw(t,e){this._raw=t;let{contents:n,keys:o,overrides:i,restricted:s,hasExcludedProperties:a}=this.doParseRaw(t,e);this._configurationModel=new Pl(n,o,i,a?[t]:void 0,this.logService),this._restrictedConfigurations=s||[]}doParseContent(t){let e={},n=null,o=[],i=[],s=[];function a(d){Array.isArray(o)?o.push(d):n!==null&&(o[n]=d)}let l={onObjectBegin:()=>{let d={};a(d),i.push(o),o=d,n=null},onObjectProperty:d=>{n=d},onObjectEnd:()=>{o=i.pop()},onArrayBegin:()=>{let d=[];a(d),i.push(o),o=d,n=null},onArrayEnd:()=>{o=i.pop()},onLiteralValue:a,onError:(d,c,u)=>{s.push({error:d,offset:c,length:u})}};if(t)try{kB(t,l),e=o[0]||{}}catch(d){this.logService.error(`Error while parsing settings file ${this._name}: ${d}`),this._parseErrors=[d]}return e}doParseRaw(t,e){let n=ht.as($o.Configuration),o=n.getConfigurationProperties(),i=n.getExcludedConfigurationProperties(),s=this.filter(t,o,i,!0,e);t=s.raw;let a=nI(t,c=>this.logService.error(`Conflict in settings file ${this._name}: ${c}`)),l=Object.keys(t),d=this.toOverrides(t,c=>this.logService.error(`Conflict in settings file ${this._name}: ${c}`));return{contents:a,keys:l,overrides:d,restricted:s.restricted,hasExcludedProperties:s.hasExcludedProperties}}filter(t,e,n,o,i){let s=!1;if(!i?.scopes&&!i?.skipRestricted&&!i?.skipUnregistered&&!i?.exclude?.length)return{raw:t,restricted:[],hasExcludedProperties:s};let a={},l=[];for(let d in t)if(Tr.test(d)&&o){let c=this.filter(t[d],e,n,!1,i);a[d]=c.raw,s=s||c.hasExcludedProperties,l.push(...c.restricted)}else{let c=e[d];c?.restricted&&l.push(d),this.shouldInclude(d,c,n,i)?a[d]=t[d]:s=!0}return{raw:a,restricted:l,hasExcludedProperties:s}}shouldInclude(t,e,n,o){if(o.exclude?.includes(t))return!1;if(o.include?.includes(t))return!0;if(o.skipRestricted&&e?.restricted||o.skipUnregistered&&!e)return!1;let i=e??n[t],s=i?typeof i.scope<"u"?i.scope:4:void 0;return s===void 0||o.scopes===void 0?!0:o.scopes.includes(s)}toOverrides(t,e){let n=[];for(let o of Object.keys(t))if(Tr.test(o)){let i={},s=t[o];for(let a in s)i[a]=s[a];n.push({identifiers:Cu(o),keys:Object.keys(i),contents:nI(i,e)})}return n}};var Gk=class{constructor(t,e,n,o,i,s,a,l,d,c,u,f,g){this.key=t;this.overrides=e;this._value=n;this.overrideIdentifiers=o;this.defaultConfiguration=i;this.policyConfiguration=s;this.applicationConfiguration=a;this.userConfiguration=l;this.localUserConfiguration=d;this.remoteUserConfiguration=c;this.workspaceConfiguration=u;this.folderConfigurationModel=f;this.memoryConfigurationModel=g}get value(){return mh(this._value)}toInspectValue(t){return t?.value!==void 0||t?.override!==void 0||t?.overrides!==void 0?t:void 0}get defaultInspectValue(){return this._defaultInspectValue||(this._defaultInspectValue=this.defaultConfiguration.inspect(this.key,this.overrides.overrideIdentifier)),this._defaultInspectValue}get defaultValue(){return this.defaultInspectValue.merged}get default(){return this.toInspectValue(this.defaultInspectValue)}get policyInspectValue(){return this._policyInspectValue===void 0&&(this._policyInspectValue=this.policyConfiguration?this.policyConfiguration.inspect(this.key):null),this._policyInspectValue}get policyValue(){return this.policyInspectValue?.merged}get policy(){return this.policyInspectValue?.value!==void 0?{value:this.policyInspectValue.value}:void 0}get applicationInspectValue(){return this._applicationInspectValue===void 0&&(this._applicationInspectValue=this.applicationConfiguration?this.applicationConfiguration.inspect(this.key):null),this._applicationInspectValue}get applicationValue(){return this.applicationInspectValue?.merged}get application(){return this.toInspectValue(this.applicationInspectValue)}get userInspectValue(){return this._userInspectValue||(this._userInspectValue=this.userConfiguration.inspect(this.key,this.overrides.overrideIdentifier)),this._userInspectValue}get userValue(){return this.userInspectValue.merged}get user(){return this.toInspectValue(this.userInspectValue)}get userLocalInspectValue(){return this._userLocalInspectValue||(this._userLocalInspectValue=this.localUserConfiguration.inspect(this.key,this.overrides.overrideIdentifier)),this._userLocalInspectValue}get userLocalValue(){return this.userLocalInspectValue.merged}get userLocal(){return this.toInspectValue(this.userLocalInspectValue)}get userRemoteInspectValue(){return this._userRemoteInspectValue||(this._userRemoteInspectValue=this.remoteUserConfiguration.inspect(this.key,this.overrides.overrideIdentifier)),this._userRemoteInspectValue}get userRemoteValue(){return this.userRemoteInspectValue.merged}get userRemote(){return this.toInspectValue(this.userRemoteInspectValue)}get workspaceInspectValue(){return this._workspaceInspectValue===void 0&&(this._workspaceInspectValue=this.workspaceConfiguration?this.workspaceConfiguration.inspect(this.key,this.overrides.overrideIdentifier):null),this._workspaceInspectValue}get workspaceValue(){return this.workspaceInspectValue?.merged}get workspace(){return this.toInspectValue(this.workspaceInspectValue)}get workspaceFolderInspectValue(){return this._workspaceFolderInspectValue===void 0&&(this._workspaceFolderInspectValue=this.folderConfigurationModel?this.folderConfigurationModel.inspect(this.key,this.overrides.overrideIdentifier):null),this._workspaceFolderInspectValue}get workspaceFolderValue(){return this.workspaceFolderInspectValue?.merged}get workspaceFolder(){return this.toInspectValue(this.workspaceFolderInspectValue)}get memoryInspectValue(){return this._memoryInspectValue===void 0&&(this._memoryInspectValue=this.memoryConfigurationModel.inspect(this.key,this.overrides.overrideIdentifier)),this._memoryInspectValue}get memoryValue(){return this.memoryInspectValue.merged}get memory(){return this.toInspectValue(this.memoryInspectValue)}},Rp=class r{constructor(t,e,n,o,i,s,a,l,d,c){this._defaultConfiguration=t;this._policyConfiguration=e;this._applicationConfiguration=n;this._localUserConfiguration=o;this._remoteUserConfiguration=i;this._workspaceConfiguration=s;this._folderConfigurations=a;this._memoryConfiguration=l;this._memoryConfigurationByResource=d;this.logService=c;this._workspaceConsolidatedConfiguration=null;this._foldersConsolidatedConfigurations=new et;this._userConfiguration=null}getValue(t,e,n){return this.getConsolidatedConfigurationModel(t,e,n).getValue(t)}updateValue(t,e,n={}){let o;n.resource?(o=this._memoryConfigurationByResource.get(n.resource),o||(o=Pl.createEmptyModel(this.logService),this._memoryConfigurationByResource.set(n.resource,o))):o=this._memoryConfiguration,e===void 0?o.removeValue(t):o.setValue(t,e),n.resource||(this._workspaceConsolidatedConfiguration=null)}inspect(t,e,n){let o=this.getConsolidatedConfigurationModel(t,e,n),i=this.getFolderConfigurationModelForResource(e.resource,n),s=e.resource?this._memoryConfigurationByResource.get(e.resource)||this._memoryConfiguration:this._memoryConfiguration,a=new Set;for(let l of o.overrides)for(let d of l.identifiers)o.getOverrideValue(t,d)!==void 0&&a.add(d);return new Gk(t,e,o.getValue(t),a.size?[...a]:void 0,this._defaultConfiguration,this._policyConfiguration.isEmpty()?void 0:this._policyConfiguration,this.applicationConfiguration.isEmpty()?void 0:this.applicationConfiguration,this.userConfiguration,this.localUserConfiguration,this.remoteUserConfiguration,n?this._workspaceConfiguration:void 0,i||void 0,s)}keys(t){let e=this.getFolderConfigurationModelForResource(void 0,t);return{default:this._defaultConfiguration.keys.slice(0),policy:this._policyConfiguration.keys.slice(0),user:this.userConfiguration.keys.slice(0),workspace:this._workspaceConfiguration.keys.slice(0),workspaceFolder:e?e.keys.slice(0):[]}}updateDefaultConfiguration(t){this._defaultConfiguration=t,this._workspaceConsolidatedConfiguration=null,this._foldersConsolidatedConfigurations.clear()}updatePolicyConfiguration(t){this._policyConfiguration=t}updateApplicationConfiguration(t){this._applicationConfiguration=t,this._workspaceConsolidatedConfiguration=null,this._foldersConsolidatedConfigurations.clear()}updateLocalUserConfiguration(t){this._localUserConfiguration=t,this._userConfiguration=null,this._workspaceConsolidatedConfiguration=null,this._foldersConsolidatedConfigurations.clear()}updateRemoteUserConfiguration(t){this._remoteUserConfiguration=t,this._userConfiguration=null,this._workspaceConsolidatedConfiguration=null,this._foldersConsolidatedConfigurations.clear()}updateWorkspaceConfiguration(t){this._workspaceConfiguration=t,this._workspaceConsolidatedConfiguration=null,this._foldersConsolidatedConfigurations.clear()}updateFolderConfiguration(t,e){this._folderConfigurations.set(t,e),this._foldersConsolidatedConfigurations.delete(t)}deleteFolderConfiguration(t){this.folderConfigurations.delete(t),this._foldersConsolidatedConfigurations.delete(t)}compareAndUpdateDefaultConfiguration(t,e){let n=[];if(!e){let{added:o,updated:i,removed:s}=_l(this._defaultConfiguration,t);e=[...o,...i,...s]}for(let o of e)for(let i of Cu(o)){let s=this._defaultConfiguration.getKeysForOverrideIdentifier(i),a=t.getKeysForOverrideIdentifier(i),l=[...a.filter(d=>s.indexOf(d)===-1),...s.filter(d=>a.indexOf(d)===-1),...s.filter(d=>!Xt(this._defaultConfiguration.override(i).getValue(d),t.override(i).getValue(d)))];n.push([i,l])}return this.updateDefaultConfiguration(t),{keys:e,overrides:n}}compareAndUpdatePolicyConfiguration(t){let{added:e,updated:n,removed:o}=_l(this._policyConfiguration,t),i=[...e,...n,...o];return i.length&&this.updatePolicyConfiguration(t),{keys:i,overrides:[]}}compareAndUpdateApplicationConfiguration(t){let{added:e,updated:n,removed:o,overrides:i}=_l(this.applicationConfiguration,t),s=[...e,...n,...o];return s.length&&this.updateApplicationConfiguration(t),{keys:s,overrides:i}}compareAndUpdateLocalUserConfiguration(t){let{added:e,updated:n,removed:o,overrides:i}=_l(this.localUserConfiguration,t),s=[...e,...n,...o];return s.length&&this.updateLocalUserConfiguration(t),{keys:s,overrides:i}}compareAndUpdateRemoteUserConfiguration(t){let{added:e,updated:n,removed:o,overrides:i}=_l(this.remoteUserConfiguration,t),s=[...e,...n,...o];return s.length&&this.updateRemoteUserConfiguration(t),{keys:s,overrides:i}}compareAndUpdateWorkspaceConfiguration(t){let{added:e,updated:n,removed:o,overrides:i}=_l(this.workspaceConfiguration,t),s=[...e,...n,...o];return s.length&&this.updateWorkspaceConfiguration(t),{keys:s,overrides:i}}compareAndUpdateFolderConfiguration(t,e){let n=this.folderConfigurations.get(t),{added:o,updated:i,removed:s,overrides:a}=_l(n,e),l=[...o,...i,...s];return(l.length||!n)&&this.updateFolderConfiguration(t,e),{keys:l,overrides:a}}compareAndDeleteFolderConfiguration(t){let e=this.folderConfigurations.get(t);if(!e)throw new Error("Unknown folder");this.deleteFolderConfiguration(t);let{added:n,updated:o,removed:i,overrides:s}=_l(e,void 0);return{keys:[...n,...o,...i],overrides:s}}get defaults(){return this._defaultConfiguration}get applicationConfiguration(){return this._applicationConfiguration}get userConfiguration(){if(!this._userConfiguration)if(this._remoteUserConfiguration.isEmpty())this._userConfiguration=this._localUserConfiguration;else{let t=this._localUserConfiguration.merge(this._remoteUserConfiguration);this._userConfiguration=new Pl(t.contents,t.keys,t.overrides,void 0,this.logService)}return this._userConfiguration}get localUserConfiguration(){return this._localUserConfiguration}get remoteUserConfiguration(){return this._remoteUserConfiguration}get workspaceConfiguration(){return this._workspaceConfiguration}get folderConfigurations(){return this._folderConfigurations}getConsolidatedConfigurationModel(t,e,n){let o=this.getConsolidatedConfigurationModelForResource(e,n);if(e.overrideIdentifier&&(o=o.override(e.overrideIdentifier)),!this._policyConfiguration.isEmpty()&&this._policyConfiguration.getValue(t)!==void 0){o=o.merge();for(let i of this._policyConfiguration.keys)o.setValue(i,this._policyConfiguration.getValue(i))}return o}getConsolidatedConfigurationModelForResource({resource:t},e){let n=this.getWorkspaceConsolidatedConfiguration();if(e&&t){let o=e.getFolder(t);o&&(n=this.getFolderConsolidatedConfiguration(o.uri)||n);let i=this._memoryConfigurationByResource.get(t);i&&(n=n.merge(i))}return n}getWorkspaceConsolidatedConfiguration(){return this._workspaceConsolidatedConfiguration||(this._workspaceConsolidatedConfiguration=this._defaultConfiguration.merge(this.applicationConfiguration,this.userConfiguration,this._workspaceConfiguration,this._memoryConfiguration)),this._workspaceConsolidatedConfiguration}getFolderConsolidatedConfiguration(t){let e=this._foldersConsolidatedConfigurations.get(t);if(!e){let n=this.getWorkspaceConsolidatedConfiguration(),o=this._folderConfigurations.get(t);o?(e=n.merge(o),this._foldersConsolidatedConfigurations.set(t,e)):e=n}return e}getFolderConfigurationModelForResource(t,e){if(e&&t){let n=e.getFolder(t);if(n)return this._folderConfigurations.get(n.uri)}}toData(){return{defaults:{contents:this._defaultConfiguration.contents,overrides:this._defaultConfiguration.overrides,keys:this._defaultConfiguration.keys},policy:{contents:this._policyConfiguration.contents,overrides:this._policyConfiguration.overrides,keys:this._policyConfiguration.keys},application:{contents:this.applicationConfiguration.contents,overrides:this.applicationConfiguration.overrides,keys:this.applicationConfiguration.keys,raw:Array.isArray(this.applicationConfiguration.raw)?void 0:this.applicationConfiguration.raw},userLocal:{contents:this.localUserConfiguration.contents,overrides:this.localUserConfiguration.overrides,keys:this.localUserConfiguration.keys,raw:Array.isArray(this.localUserConfiguration.raw)?void 0:this.localUserConfiguration.raw},userRemote:{contents:this.remoteUserConfiguration.contents,overrides:this.remoteUserConfiguration.overrides,keys:this.remoteUserConfiguration.keys,raw:Array.isArray(this.remoteUserConfiguration.raw)?void 0:this.remoteUserConfiguration.raw},workspace:{contents:this._workspaceConfiguration.contents,overrides:this._workspaceConfiguration.overrides,keys:this._workspaceConfiguration.keys},folders:[...this._folderConfigurations.keys()].reduce((t,e)=>{let{contents:n,overrides:o,keys:i}=this._folderConfigurations.get(e);return t.push([e,{contents:n,overrides:o,keys:i}]),t},[])}}allKeys(){let t=new Set;return this._defaultConfiguration.keys.forEach(e=>t.add(e)),this.userConfiguration.keys.forEach(e=>t.add(e)),this._workspaceConfiguration.keys.forEach(e=>t.add(e)),this._folderConfigurations.forEach(e=>e.keys.forEach(n=>t.add(n))),[...t.values()]}allOverrideIdentifiers(){let t=new Set;return this._defaultConfiguration.getAllOverrideIdentifiers().forEach(e=>t.add(e)),this.userConfiguration.getAllOverrideIdentifiers().forEach(e=>t.add(e)),this._workspaceConfiguration.getAllOverrideIdentifiers().forEach(e=>t.add(e)),this._folderConfigurations.forEach(e=>e.getAllOverrideIdentifiers().forEach(n=>t.add(n))),[...t.values()]}getAllKeysForOverrideIdentifier(t){let e=new Set;return this._defaultConfiguration.getKeysForOverrideIdentifier(t).forEach(n=>e.add(n)),this.userConfiguration.getKeysForOverrideIdentifier(t).forEach(n=>e.add(n)),this._workspaceConfiguration.getKeysForOverrideIdentifier(t).forEach(n=>e.add(n)),this._folderConfigurations.forEach(n=>n.getKeysForOverrideIdentifier(t).forEach(o=>e.add(o))),[...e.values()]}static parse(t,e){let n=this.parseConfigurationModel(t.defaults,e),o=this.parseConfigurationModel(t.policy,e),i=this.parseConfigurationModel(t.application,e),s=this.parseConfigurationModel(t.userLocal,e),a=this.parseConfigurationModel(t.userRemote,e),l=this.parseConfigurationModel(t.workspace,e),d=t.folders.reduce((c,u)=>(c.set(E.revive(u[0]),this.parseConfigurationModel(u[1],e)),c),new et);return new r(n,o,i,s,a,l,d,Pl.createEmptyModel(e),new et,e)}static parseConfigurationModel(t,e){return new Pl(t.contents,t.keys,t.overrides,t.raw,e)}};var rS=class{constructor(t,e,n,o,i){this.change=t;this.previous=e;this.currentConfiguraiton=n;this.currentWorkspace=o;this.logService=i;this._marker=`
`;this._markerCode1=this._marker.charCodeAt(0);this._markerCode2=46;this.affectedKeys=new Set;this._previousConfiguration=void 0;for(let s of t.keys)this.affectedKeys.add(s);for(let[,s]of t.overrides)for(let a of s)this.affectedKeys.add(a);this._affectsConfigStr=this._marker;for(let s of this.affectedKeys)this._affectsConfigStr+=s+this._marker}get previousConfiguration(){return!this._previousConfiguration&&this.previous&&(this._previousConfiguration=Rp.parse(this.previous.data,this.logService)),this._previousConfiguration}affectsConfiguration(t,e){let n=this._marker+t,o=this._affectsConfigStr.indexOf(n);if(o<0)return!1;let i=o+n.length;if(i>=this._affectsConfigStr.length)return!1;let s=this._affectsConfigStr.charCodeAt(i);if(s!==this._markerCode1&&s!==this._markerCode2)return!1;if(e){let a=this.previousConfiguration?this.previousConfiguration.getValue(t,e,this.previous?.workspace):void 0,l=this.currentConfiguraiton.getValue(t,e,this.currentWorkspace);return!Xt(a,l)}return!0}};function _l(r,t){let{added:e,removed:n,updated:o}=AB(t?.rawConfiguration,r?.rawConfiguration),i=[],s=r?.getAllOverrideIdentifiers()||[],a=t?.getAllOverrideIdentifiers()||[];if(t){let l=a.filter(d=>!s.includes(d));for(let d of l)i.push([d,t.getKeysForOverrideIdentifier(d)])}if(r){let l=s.filter(d=>!a.includes(d));for(let d of l)i.push([d,r.getKeysForOverrideIdentifier(d)])}if(t&&r){for(let l of s)if(a.includes(l)){let d=AB({contents:r.getOverrideValue(void 0,l)||{},keys:r.getKeysForOverrideIdentifier(l)},{contents:t.getOverrideValue(void 0,l)||{},keys:t.getKeysForOverrideIdentifier(l)});i.push([l,[...d.added,...d.removed,...d.updated]])}}return{added:e,removed:n,updated:o,overrides:i}}function AB(r,t){let e=r?t?r.keys.filter(i=>t.keys.indexOf(i)===-1):[...r.keys]:[],n=t?r?t.keys.filter(i=>r.keys.indexOf(i)===-1):[...t.keys]:[],o=[];if(r&&t){for(let i of t.keys)if(r.keys.indexOf(i)!==-1){let s=hg(t.contents,i),a=hg(r.contents,i);Xt(s,a)||o.push(i)}}return{added:e,removed:n,updated:o}}function iS(r,t){if(t){let e=t.split("."),n=r;for(let o=0;n&&o<e.length;o++)n=n[e[o]];return n}}function qG(r){return r instanceof E}function KG(r){return mt(r)&&r.uri instanceof E&&!!r.languageId&&typeof r.languageId=="string"}function JG(r){return mt(r)&&!r.uri&&!!r.languageId&&typeof r.languageId=="string"}function jG(r){return mt(r)&&r.uri instanceof E&&(!r.name||typeof r.name=="string")&&(!r.index||typeof r.index=="number")}function OB(r){if(qG(r))return{resource:r};if(KG(r))return{resource:r.uri,overrideIdentifier:r.languageId};if(JG(r))return{overrideIdentifier:r.languageId};if(jG(r))return{resource:r.uri};if(r===null)return{resource:null}}var kp=class{constructor(t,e,n){this._proxy=t.getProxy(V.MainThreadConfiguration),this._extHostWorkspace=e,this._logService=n,this._barrier=new Ln,this._actual=null}getConfigProvider(){return this._barrier.wait().then(t=>this._actual)}$initializeConfiguration(t){this._actual=new zk(this._proxy,this._extHostWorkspace,t,this._logService),this._barrier.open()}$acceptConfigurationChanged(t,e){this.getConfigProvider().then(n=>n.$acceptConfigurationChanged(t,e))}};kp=L([P(0,Ee),P(1,_o),P(2,be)],kp);var zk=class{constructor(t,e,n,o){this._onDidChangeConfiguration=new D;this._proxy=t,this._logService=o,this._extHostWorkspace=e,this._configuration=Rp.parse(n,o),this._configurationScopes=this._toMap(n.configurationScopes)}get onDidChangeConfiguration(){return this._onDidChangeConfiguration&&this._onDidChangeConfiguration.event}$acceptConfigurationChanged(t,e){let n={data:this._configuration.toData(),workspace:this._extHostWorkspace.workspace};this._configuration=Rp.parse(t,this._logService),this._configurationScopes=this._toMap(t.configurationScopes),this._onDidChangeConfiguration.fire(this._toConfigurationChangeEvent(e,n))}getConfiguration(t,e,n){let o=OB(e)||{},i=this._toReadonlyValue(this._configuration.getValue(t,o,this._extHostWorkspace.workspace));t&&this._validateConfigurationAccess(t,o,n?.identifier);function s(l){if(l==null)return null;if(typeof l=="boolean")return l?2:5;switch(l){case 1:return 2;case 2:return 5;case 3:return 6}}let a={has(l){return typeof iS(i,l)<"u"},get:(l,d)=>{this._validateConfigurationAccess(t?`${t}.${l}`:l,o,n?.identifier);let c=iS(i,l);if(typeof c>"u")c=d;else{let u,f=(g,I)=>{if(mt(g)){let h,C=()=>{u=u||St(i),h=h||iS(u,I)};return new Proxy(g,{get:(_,R)=>{if(typeof R=="string"&&R.toLowerCase()==="tojson")return C(),()=>h;if(u)return h=h||iS(u,I),h[R];let O=_[R];return typeof R=="string"?f(O,`${I}.${R}`):O},set:(_,R,O)=>(C(),h&&(h[R]=O),!0),deleteProperty:(_,R)=>(C(),h&&delete h[R],!0),defineProperty:(_,R,O)=>(C(),h&&Object.defineProperty(h,R,O),!0)})}return Array.isArray(g)?St(g):g};c=f(c,l)}return c},update:(l,d,c,u)=>{l=t?`${t}.${l}`:l;let f=s(c);return d!==void 0?this._proxy.$updateConfigurationOption(f,l,d,o,u):this._proxy.$removeConfigurationOption(f,l,o,u)},inspect:l=>{l=t?`${t}.${l}`:l;let d=this._configuration.inspect(l,o,this._extHostWorkspace.workspace);if(d)return{key:l,defaultValue:St(d.policy?.value??d.default?.value),globalLocalValue:St(d.userLocal?.value),globalRemoteValue:St(d.userRemote?.value),globalValue:St(d.user?.value??d.application?.value),workspaceValue:St(d.workspace?.value),workspaceFolderValue:St(d.workspaceFolder?.value),defaultLanguageValue:St(d.default?.override),globalLocalLanguageValue:St(d.userLocal?.override),globalRemoteLanguageValue:St(d.userRemote?.override),globalLanguageValue:St(d.user?.override??d.application?.override),workspaceLanguageValue:St(d.workspace?.override),workspaceFolderLanguageValue:St(d.workspaceFolder?.override),languageIds:St(d.overrideIdentifiers)}}};return typeof i=="object"&&yr(a,i,!1),Object.freeze(a)}_toReadonlyValue(t){let e=n=>mt(n)?new Proxy(n,{get:(o,i)=>e(o[i]),set:(o,i,s)=>{throw new Error(`TypeError: Cannot assign to read only property '${String(i)}' of object`)},deleteProperty:(o,i)=>{throw new Error(`TypeError: Cannot delete read only property '${String(i)}' of object`)},defineProperty:(o,i)=>{throw new Error(`TypeError: Cannot define property '${String(i)}' for a readonly object`)},setPrototypeOf:o=>{throw new Error("TypeError: Cannot set prototype for a readonly object")},isExtensible:()=>!1,preventExtensions:()=>!0}):n;return e(t)}_validateConfigurationAccess(t,e,n){let o=Tr.test(t)?5:this._configurationScopes.get(t),i=n?`[${n.value}] `:"";if(5===o){typeof e?.resource>"u"&&this._logService.warn(`${i}Accessing a resource scoped configuration without providing a resource is not expected. To get the effective value for '${t}', provide the URI of a resource or 'null' for any resource.`);return}if(4===o){e?.resource&&this._logService.warn(`${i}Accessing a window scoped configuration for a resource is not expected. To associate '${t}' to a resource, define its scope to 'resource' in configuration contributions in 'package.json'.`);return}}_toConfigurationChangeEvent(t,e){let n=new rS(t,e,this._configuration,this._extHostWorkspace.workspace,this._logService);return Object.freeze({affectsConfiguration:(o,i)=>n.affectsConfiguration(o,OB(i))})}_toMap(t){return t.reduce((e,n)=>(e.set(n[0],n[1]),e),new Map)}},Po=N("IExtHostConfiguration");var qk=class{constructor(t,e){this.versionId=t;this.removedDueToLooping=e}},na=class r extends K{constructor(e,n){super();this._activationEventsReader=e;this._onDidChange=this._register(new D);this.onDidChange=this._onDidChange.event;this._versionId=0;this._extensionDescriptions=n,this._initialize()}static isHostExtension(e,n,o){if(n.getExtensionDescription(e))return!1;let i=o.getExtensionDescription(e);return i?!!((i.main||i.browser)&&i.api==="none"):!1}_initialize(){this._extensionDescriptions.sort(QG),this._extensionsMap=new Xn,this._extensionsArr=[],this._activationMap=new Map;for(let e of this._extensionDescriptions){if(this._extensionsMap.has(e.identifier)){console.error("Extension `"+e.identifier.value+"` is already registered");continue}this._extensionsMap.set(e.identifier,e),this._extensionsArr.push(e);let n=this._activationEventsReader.readActivationEvents(e);for(let o of n)this._activationMap.has(o)||this._activationMap.set(o,[]),this._activationMap.get(o).push(e)}}set(e){return this._extensionDescriptions=e,this._initialize(),this._versionId++,this._onDidChange.fire(void 0),{versionId:this._versionId}}deltaExtensions(e,n){this._extensionDescriptions=MB(this._extensionDescriptions,n),this._extensionDescriptions=this._extensionDescriptions.concat(e);let o=r._findLoopingExtensions(this._extensionDescriptions);return this._extensionDescriptions=MB(this._extensionDescriptions,o.map(i=>i.identifier)),this._initialize(),this._versionId++,this._onDidChange.fire(void 0),new qk(this._versionId,o)}static _findLoopingExtensions(e){let n=new class{constructor(){this._arcs=new Map;this._nodesSet=new Set;this._nodesArr=[]}addNode(l){this._nodesSet.has(l)||(this._nodesSet.add(l),this._nodesArr.push(l))}addArc(l,d){this.addNode(l),this.addNode(d),this._arcs.has(l)?this._arcs.get(l).push(d):this._arcs.set(l,[d])}getArcs(l){return this._arcs.has(l)?this._arcs.get(l):[]}hasOnlyGoodArcs(l,d){let c=n.getArcs(l);for(let u=0;u<c.length;u++)if(!d.has(c[u]))return!1;return!0}getNodes(){return this._nodesArr}},o=new Xn;for(let l of e)if(o.set(l.identifier,l),l.extensionDependencies)for(let d of l.extensionDependencies)n.addArc(Ue.toKey(l.identifier),Ue.toKey(d));let i=new Set;n.getNodes().filter(l=>n.getArcs(l).length===0).forEach(l=>i.add(l));let s=n.getNodes().filter(l=>!i.has(l)),a;do{a=!1;for(let l=0;l<s.length;l++){let d=s[l];n.hasOnlyGoodArcs(d,i)&&(s.splice(l,1),l--,i.add(d),a=!0)}}while(a);return s.map(l=>o.get(l))}containsActivationEvent(e){return this._activationMap.has(e)}containsExtension(e){return this._extensionsMap.has(e)}getExtensionDescriptionsForActivationEvent(e){let n=this._activationMap.get(e);return n?n.slice(0):[]}getAllExtensionDescriptions(){return this._extensionsArr.slice(0)}getSnapshot(){return new Kk(this._versionId,this.getAllExtensionDescriptions())}getExtensionDescription(e){let n=this._extensionsMap.get(e);return n||void 0}getExtensionDescriptionByUUID(e){for(let n of this._extensionsArr)if(n.uuid===e)return n}getExtensionDescriptionByIdOrUUID(e,n){return this.getExtensionDescription(e)??(n?this.getExtensionDescriptionByUUID(n):void 0)}},Kk=class{constructor(t,e){this.versionId=t;this.extensions=e}};function QG(r,t){let e=r.isBuiltin?0:r.isUnderDevelopment?2:1,n=t.isBuiltin?0:t.isUnderDevelopment?2:1;if(e!==n)return e-n;let o=qe.basename(r.extensionLocation.path),i=qe.basename(t.extensionLocation.path);return o<i?-1:o>i?1:0}function MB(r,t){let e=new vo(t);return r.filter(n=>!e.has(n.identifier))}var pc=class r{static{this.NONE=new r(!1,-1,-1,-1)}constructor(t,e,n,o){this.startup=t,this.codeLoadingTime=e,this.activateCallTime=n,this.activateResolvedTime=o}},Op=class{constructor(t){this._startup=t,this._codeLoadingStart=-1,this._codeLoadingStop=-1,this._activateCallStart=-1,this._activateCallStop=-1,this._activateResolveStart=-1,this._activateResolveStop=-1}_delta(t,e){return t===-1||e===-1?-1:e-t}build(){return new pc(this._startup,this._delta(this._codeLoadingStart,this._codeLoadingStop),this._delta(this._activateCallStart,this._activateCallStop),this._delta(this._activateResolveStart,this._activateResolveStop))}codeLoadingStart(){this._codeLoadingStart=Date.now()}codeLoadingStop(){this._codeLoadingStop=Date.now()}activateCallStart(){this._activateCallStart=Date.now()}activateCallStop(){this._activateCallStop=Date.now()}activateResolveStart(){this._activateResolveStart=Date.now()}activateResolveStop(){this._activateResolveStop=Date.now()}},mc=class{constructor(t,e,n,o,i,s){this.activationFailed=t,this.activationFailedError=e,this.activationTimes=n,this.module=o,this.exports=i,this.disposable=s}},sS=class extends mc{constructor(t){super(!1,null,t,{activate:void 0,deactivate:void 0},void 0,K.None)}},aS=class extends mc{constructor(){super(!1,null,pc.NONE,{activate:void 0,deactivate:void 0},void 0,K.None)}},Lp=class extends mc{constructor(t){super(!0,t,pc.NONE,{activate:void 0,deactivate:void 0},void 0,K.None)}},Ap=class{constructor(t,e,n,o){this._logService=o;this._registry=t,this._globalRegistry=e,this._host=n,this._operations=new Xn,this._alreadyActivatedEvents=Object.create(null)}dispose(){for(let[t,e]of this._operations)e.dispose()}async waitForActivatingExtensions(){let t=[];for(let[e,n]of this._operations)t.push(n.wait());await Promise.all(t)}isActivated(t){let e=this._operations.get(t);return!!(e&&e.value)}getActivatedExtension(t){let e=this._operations.get(t);if(!e||!e.value)throw new Error(`Extension '${t.value}' is not known or not activated`);return e.value}async activateByEvent(t,e){if(this._alreadyActivatedEvents[t])return;let n=this._registry.getExtensionDescriptionsForActivationEvent(t);await this._activateExtensions(n.map(o=>({id:o.identifier,reason:{startup:e,extensionId:o.identifier,activationEvent:t}}))),this._alreadyActivatedEvents[t]=!0}activateById(t,e){let n=this._registry.getExtensionDescription(t);if(!n)throw new Error(`Extension '${t.value}' is not known`);return this._activateExtensions([{id:n.identifier,reason:e}])}async _activateExtensions(t){let e=t.filter(n=>!this.isActivated(n.id)).map(n=>this._handleActivationRequest(n));await Promise.all(e.map(n=>n.wait()))}_handleActivationRequest(t){if(this._operations.has(t.id))return this._operations.get(t.id);if(this._isHostExtension(t.id))return this._createAndSaveOperation(t,null,[],null);let e=this._registry.getExtensionDescription(t.id);if(!e){let i=new Error(`Cannot activate unknown extension '${t.id.value}'`),s=this._createAndSaveOperation(t,null,[],new Lp(i));return this._host.onExtensionActivationError(t.id,i,new yg(t.id.value)),s}let n=[],o=typeof e.extensionDependencies>"u"?[]:e.extensionDependencies;for(let i of o){if(this._isResolvedExtension(i))continue;let s=this._operations.get(i);if(s){n.push(s);continue}if(this._isHostExtension(i)){n.push(this._handleActivationRequest({id:this._globalRegistry.getExtensionDescription(i).identifier,reason:t.reason}));continue}let a=this._registry.getExtensionDescription(i);if(a){if(!a.main&&!a.browser)continue;n.push(this._handleActivationRequest({id:a.identifier,reason:t.reason}));continue}let l=e.displayName||e.identifier.value,d=new Error(`Cannot activate the '${l}' extension because it depends on unknown extension '${i}'`),c=this._createAndSaveOperation(t,e.displayName,[],new Lp(d));return this._host.onExtensionActivationError(e.identifier,d,new yg(i)),c}return this._createAndSaveOperation(t,e.displayName,n,null)}_createAndSaveOperation(t,e,n,o){let i=new fh(t.id,e,t.reason,n,o,this._host,this._logService);return this._operations.set(t.id,i),i}_isHostExtension(t){return na.isHostExtension(t,this._registry,this._globalRegistry)}_isResolvedExtension(t){let e=this._globalRegistry.getExtensionDescription(t);return e?!e.main&&!e.browser:!1}};Ap=L([P(3,be)],Ap);var fh=class{constructor(t,e,n,o,i,s,a){this._id=t;this._displayName=e;this._reason=n;this._deps=o;this._value=i;this._host=s;this._logService=a;this._barrier=new Ln;this._isDisposed=!1;this._initialize()}get value(){return this._value}get friendlyName(){return this._displayName||this._id.value}dispose(){this._isDisposed=!0}wait(){return this._barrier.wait()}async _initialize(){await this._waitForDepsThenActivate(),this._barrier.open()}async _waitForDepsThenActivate(){if(!this._value){for(;this._deps.length>0;){for(let t=0;t<this._deps.length;t++){let e=this._deps[t];if(e.value&&!e.value.activationFailed){this._deps.splice(t,1),t--;continue}if(e.value&&e.value.activationFailed){let n=new Error(`Cannot activate the '${this.friendlyName}' extension because its dependency '${e.friendlyName}' failed to activate`);n.detail=e.value.activationFailedError,this._value=new Lp(n),this._host.onExtensionActivationError(this._id,n,null);return}}this._deps.length>0&&await Promise.race(this._deps.map(t=>t.wait()))}await this._activate()}}async _activate(){try{this._value=await this._host.actualActivateExtension(this._id,this._reason)}catch(t){let e=new Error;if(t&&t.name&&(e.name=t.name),t&&t.message?e.message=`Activating extension '${this._id.value}' failed: ${t.message}.`:e.message=`Activating extension '${this._id.value}' failed: ${t}.`,t&&t.stack&&(e.stack=t.stack),this._value=new Lp(e),this._isDisposed&&Fn(t))return;this._host.onExtensionActivationError(this._id,e,null),this._logService.error(`Activating extension ${this._id.value} failed due to an error:`),this._logService.error(t)}}};fh=L([P(6,be)],fh);var Mp=class{constructor(t,e){this._logService=e;this._onDidChangeStorage=new D;this.onDidChangeStorage=this._onDidChangeStorage.event;this._proxy=t.getProxy(V.MainThreadStorage)}registerExtensionStorageKeysToSync(t,e){this._proxy.$registerExtensionStorageKeysToSync(t,e)}async initializeExtensionStorage(t,e,n){let o=await this._proxy.$initializeExtensionStorage(t,e),i;return o&&(i=this.safeParseValue(t,e,o)),i||n}setValue(t,e,n){return this._proxy.$setValue(t,e,n)}$acceptValue(t,e,n){let o=this.safeParseValue(t,e,n);o&&this._onDidChangeStorage.fire({shared:t,key:e,value:o})}safeParseValue(t,e,n){try{return JSON.parse(n)}catch(o){this._logService.error(`[extHostStorage] unexpected error parsing storage contents (extensionId: ${e}, global: ${t}): ${o}`)}}},Np=N("IExtHostStorage");var gh=class{constructor(t,e,n){this._deferredPromises=new Map;this._id=t,this._shared=e,this._storage=n,this._init=this._storage.initializeExtensionStorage(this._shared,this._id,Object.create(null)).then(o=>(this._value=o,this)),this._storageListener=this._storage.onDidChangeStorage(o=>{o.shared===this._shared&&o.key===this._id&&(this._value=o.value)}),this._scheduler=new ho(()=>{let o=this._deferredPromises;this._deferredPromises=new Map,(async()=>{try{await this._storage.setValue(this._shared,this._id,this._value);for(let i of o.values())i.complete()}catch(i){for(let s of o.values())s.error(i)}})()},0)}keys(){return Object.entries(this._value??{}).filter(([,t])=>t!==void 0).map(([t])=>t)}get whenReady(){return this._init}get(t,e){let n=this._value[t];return typeof n>"u"&&(n=e),n}update(t,e){e!==null&&typeof e=="object"?this._value[t]=JSON.parse(JSON.stringify(e)):this._value[t]=e;let n=this._deferredPromises.get(t);if(n!==void 0)return n.p;let o=new jn;return this._deferredPromises.set(t,o),this._scheduler.isScheduled()||this._scheduler.schedule(),o.p}dispose(){this._storageListener.dispose()}},lS=class extends gh{setKeysForSync(t){this._storage.registerExtensionStorageKeysToSync({id:this._id,version:this._extension.version},t)}constructor(t,e){super(t.identifier.value,!0,e),this._extension=t}};var Mo=class{constructor(t,e){this._fileSystemProvider=new Map;this._writeQueue=new eb;this._proxy=t.getProxy(V.MainThreadFileSystem);let n=this;this.value=Object.freeze({async stat(o){try{let i,s=n._fileSystemProvider.get(o.scheme);return s?(await n._proxy.$ensureActivation(o.scheme),i=await s.impl.stat(o)):i=await n._proxy.$stat(o),{type:i.type,ctime:i.ctime,mtime:i.mtime,size:i.size,permissions:i.permissions===1?1:void 0}}catch(i){Mo._handleError(i)}},async readDirectory(o){try{let i=n._fileSystemProvider.get(o.scheme);return i?(await n._proxy.$ensureActivation(o.scheme),(await i.impl.readDirectory(o)).slice()):await n._proxy.$readdir(o)}catch(i){return Mo._handleError(i)}},async createDirectory(o){try{let i=n._fileSystemProvider.get(o.scheme);return i&&!i.isReadonly?(await n._proxy.$ensureActivation(o.scheme),await n.mkdirp(i.impl,i.extUri,o)):await n._proxy.$mkdir(o)}catch(i){return Mo._handleError(i)}},async readFile(o){try{let i=n._fileSystemProvider.get(o.scheme);return i?(await n._proxy.$ensureActivation(o.scheme),(await i.impl.readFile(o)).slice()):(await n._proxy.$readFile(o)).buffer}catch(i){return Mo._handleError(i)}},async writeFile(o,i){try{let s=n._fileSystemProvider.get(o.scheme);return s&&!s.isReadonly?(await n._proxy.$ensureActivation(o.scheme),await n.mkdirp(s.impl,s.extUri,s.extUri.dirname(o)),await n._writeQueue.queueFor(o,()=>Promise.resolve(s.impl.writeFile(o,i,{create:!0,overwrite:!0})))):await n._proxy.$writeFile(o,ce.wrap(i))}catch(s){return Mo._handleError(s)}},async delete(o,i){try{let s=n._fileSystemProvider.get(o.scheme);return s&&!s.isReadonly&&!i?.useTrash?(await n._proxy.$ensureActivation(o.scheme),await s.impl.delete(o,{recursive:!1,...i})):await n._proxy.$delete(o,{recursive:!1,useTrash:!1,atomic:!1,...i})}catch(s){return Mo._handleError(s)}},async rename(o,i,s){try{return await n._proxy.$rename(o,i,{overwrite:!1,...s})}catch(a){return Mo._handleError(a)}},async copy(o,i,s){try{return await n._proxy.$copy(o,i,{overwrite:!1,...s})}catch(a){return Mo._handleError(a)}},isWritableFileSystem(o){let i=e.getCapabilities(o);if(typeof i=="number")return!(i&2048)}})}async mkdirp(t,e,n){let o=[];for(;!e.isEqual(n,e.dirname(n));)try{if(((await t.stat(n)).type&2)===0)throw vt.FileExists(`Unable to create folder '${n.scheme===X.file?n.fsPath:n.toString(!0)}' that already exists but is not a directory`);break}catch(i){if(lu(i)!=="EntryNotFound")throw i;o.push(e.basename(n)),n=e.dirname(n)}for(let i=o.length-1;i>=0;i--){n=e.joinPath(n,o[i]);try{await t.createDirectory(n)}catch(s){if(lu(s)!=="EntryExists")throw s}}}static _handleError(t){if(t instanceof vt)throw t;if(t instanceof Qf)switch(t.code){case"EntryExists":throw vt.FileExists(t.message);case"EntryNotFound":throw vt.FileNotFound(t.message);case"EntryNotADirectory":throw vt.FileNotADirectory(t.message);case"EntryIsADirectory":throw vt.FileIsADirectory(t.message);case"NoPermissions":throw vt.NoPermissions(t.message);case"Unavailable":throw vt.Unavailable(t.message);default:throw new vt(t.message,t.name)}if(!(t instanceof Error))throw new vt(String(t));if(t.name==="ENOPRO"||t.message.includes("ENOPRO"))throw vt.Unavailable(t.message);switch(t.name){case"EntryExists":throw vt.FileExists(t.message);case"EntryNotFound":throw vt.FileNotFound(t.message);case"EntryNotADirectory":throw vt.FileNotADirectory(t.message);case"EntryIsADirectory":throw vt.FileIsADirectory(t.message);case"NoPermissions":throw vt.NoPermissions(t.message);case"Unavailable":throw vt.Unavailable(t.message);default:throw new vt(t.message,t.name)}}addFileSystemProvider(t,e,n){return this._fileSystemProvider.set(t,{impl:e,extUri:n?.isCaseSensitive?gt:q_,isReadonly:!!n?.isReadonly}),ae(()=>this._fileSystemProvider.delete(t))}getFileSystemProviderExtUri(t){return this._fileSystemProvider.get(t)?.extUri??gt}};Mo=L([P(0,Ee),P(1,Er)],Mo);var Dl=N("IExtHostConsumerFileSystem");var Fp=N("IExtensionStoragePaths"),Up=class{constructor(t,e,n){this._logService=e;this._extHostFileSystem=n;this._workspace=t.workspace??void 0,this._environment=t.environment,this.whenReady=this._getOrCreateWorkspaceStoragePath().then(o=>this._value=o)}async _getWorkspaceStorageURI(t){return E.joinPath(this._environment.workspaceStorageHome,t)}async _getOrCreateWorkspaceStoragePath(){if(!this._workspace)return Promise.resolve(void 0);let t=this._workspace.id,e=await this._getWorkspaceStorageURI(t);try{return await this._extHostFileSystem.value.stat(e),this._logService.trace("[ExtHostStorage] storage dir already exists",e),e}catch{}try{return this._logService.trace("[ExtHostStorage] creating dir and metadata-file",e),await this._extHostFileSystem.value.createDirectory(e),await this._extHostFileSystem.value.writeFile(E.joinPath(e,"meta.json"),new TextEncoder().encode(JSON.stringify({id:this._workspace.id,configuration:E.revive(this._workspace.configuration)?.toString(),name:this._workspace.name},void 0,2))),e}catch(n){this._logService.error("[ExtHostStorage]",n);return}}workspaceValue(t){if(this._value)return E.joinPath(this._value,t.identifier.value)}globalValue(t){return E.joinPath(this._environment.globalStorageHome,t.identifier.value.toLowerCase())}onWillDeactivateAll(){}};Up=L([P(0,Et),P(1,be),P(2,Dl)],Up);var OPe=N("tunnelService"),LPe=N("sharedTunnelsService");function XG(r){if(r.scheme!=="http"&&r.scheme!=="https")return;let t=/^(localhost|127\.0\.0\.1|0\.0\.0\.0):(\d+)$/.exec(r.authority);if(t)return{address:t[1],port:+t[2]}}var Jk=["localhost","127.0.0.1","0:0:0:0:0:0:0:1","::1"];function NB(r){return Jk.indexOf(r)>=0}var jk=["0.0.0.0","0:0:0:0:0:0:0:0","::"];function UB(r){return jk.indexOf(r)>=0}var cS=class{constructor(t,e,n){this.remoteAddress=t;this.localAddress=e;this._dispose=n;this._onDispose=new D;this.onDidDispose=this._onDispose.event}dispose(){return this._onDispose.fire(),this._onDispose.dispose(),this._dispose()}},dS=class extends K{constructor(e,n){super();this.logService=e;this.configurationService=n;this._onTunnelOpened=this._register(new D);this.onTunnelOpened=this._onTunnelOpened.event;this._onTunnelClosed=this._register(new D);this.onTunnelClosed=this._onTunnelClosed.event;this._onAddedTunnelProvider=this._register(new D);this.onAddedTunnelProvider=this._onAddedTunnelProvider.event;this._tunnels=new Map;this._canElevate=!1;this._canChangeProtocol=!0;this._privacyOptions=[];this._factoryInProgress=new Set}get hasTunnelProvider(){return!!this._tunnelProvider}get defaultTunnelHost(){let e=this.configurationService.getValue("remote.localPortHost");return!e||e==="localhost"?"127.0.0.1":"0.0.0.0"}setTunnelProvider(e){return this._tunnelProvider=e,e?(this._onAddedTunnelProvider.fire(),{dispose:()=>{this._tunnelProvider=void 0,this._canElevate=!1,this._privacyOptions=[]}}):(this._canElevate=!1,this._privacyOptions=[],this._onAddedTunnelProvider.fire(),{dispose:()=>{}})}setTunnelFeatures(e){this._canElevate=e.elevation,this._privacyOptions=e.privacyOptions,this._canChangeProtocol=e.protocol}get canChangeProtocol(){return this._canChangeProtocol}get canElevate(){return this._canElevate}get canChangePrivacy(){return this._privacyOptions.length>0}get privacyOptions(){return this._privacyOptions}get tunnels(){return this.getTunnels()}async getTunnels(){let e=[],n=Array.from(this._tunnels.values());for(let o of n){let i=Array.from(o.values());for(let s of i){let a=await s.value;a&&typeof a!="string"&&e.push(a)}}return e}async dispose(){super.dispose();for(let e of this._tunnels.values()){for(let{value:n}of e.values())await n.then(o=>typeof o!="string"?o?.dispose():void 0);e.clear()}this._tunnels.clear()}setEnvironmentTunnel(e,n,o,i,s){this.addTunnelToMap(e,n,Promise.resolve({tunnelRemoteHost:e,tunnelRemotePort:n,localAddress:o,privacy:i,protocol:s,dispose:()=>Promise.resolve()}))}async getExistingTunnel(e,n){(UB(e)||NB(e))&&(e=Jk[0]);let o=this.getTunnelFromMap(e,n);if(o)return++o.refcount,o.value}openTunnel(e,n,o,i,s,a=!1,l,d){this.logService.trace(`ForwardedPorts: (TunnelService) openTunnel request for ${n}:${o} on local port ${s}.`);let c=this._tunnelProvider??e;if(!c)return;if(n||(n="localhost"),i||(i=this.defaultTunnelHost),this._tunnelProvider&&this._factoryInProgress.has(o)){this.logService.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}let u=this.retainOrCreateTunnel(c,n,o,i,s,a,l,d);return u?u.then(f=>{if(f){if(typeof f=="string")return this.logService.trace("ForwardedPorts: (TunnelService) The tunnel provider returned an error when creating the tunnel."),this.removeEmptyOrErrorTunnelFromMap(n,o),f}else{this.logService.trace("ForwardedPorts: (TunnelService) New tunnel is undefined."),this.removeEmptyOrErrorTunnelFromMap(n,o);return}this.logService.trace("ForwardedPorts: (TunnelService) New tunnel established.");let g=this.makeTunnel(f);return(f.tunnelRemoteHost!==n||f.tunnelRemotePort!==o)&&this.logService.warn("ForwardedPorts: (TunnelService) Created tunnel does not match requirements of requested tunnel. Host or port mismatch."),l&&f.privacy!==l&&this.logService.warn("ForwardedPorts: (TunnelService) Created tunnel does not match requirements of requested tunnel. Privacy mismatch."),this._onTunnelOpened.fire(g),g}):(this.logService.trace("ForwardedPorts: (TunnelService) Tunnel was not created."),u)}makeTunnel(e){return{tunnelRemotePort:e.tunnelRemotePort,tunnelRemoteHost:e.tunnelRemoteHost,tunnelLocalPort:e.tunnelLocalPort,localAddress:e.localAddress,privacy:e.privacy,protocol:e.protocol,dispose:async()=>{this.logService.trace(`ForwardedPorts: (TunnelService) dispose request for ${e.tunnelRemoteHost}:${e.tunnelRemotePort} `);let n=this._tunnels.get(e.tunnelRemoteHost);if(n){let o=n.get(e.tunnelRemotePort);o&&(o.refcount--,await this.tryDisposeTunnel(e.tunnelRemoteHost,e.tunnelRemotePort,o))}}}}async tryDisposeTunnel(e,n,o){if(o.refcount<=0){this.logService.trace(`ForwardedPorts: (TunnelService) Tunnel is being disposed ${e}:${n}.`);let i=o.value.then(async s=>{s&&typeof s!="string"&&(await s.dispose(!0),this._onTunnelClosed.fire({host:s.tunnelRemoteHost,port:s.tunnelRemotePort}))});return this._tunnels.has(e)&&this._tunnels.get(e).delete(n),i}}async closeTunnel(e,n){this.logService.trace(`ForwardedPorts: (TunnelService) close request for ${e}:${n} `);let o=this._tunnels.get(e);if(o&&o.has(n)){let i=o.get(n);i.refcount=0,await this.tryDisposeTunnel(e,n,i)}}addTunnelToMap(e,n,o){this._tunnels.has(e)||this._tunnels.set(e,new Map),this._tunnels.get(e).set(n,{refcount:1,value:o})}async removeEmptyOrErrorTunnelFromMap(e,n){let o=this._tunnels.get(e);if(o){let i=o.get(n),s=i?await i.value:void 0;(!s||typeof s=="string")&&o.delete(n),o.size===0&&this._tunnels.delete(e)}}getTunnelFromMap(e,n){let o=[e];NB(e)?(o.push(...Jk),o.push(...jk)):UB(e)&&o.push(...jk);let i=o.map(s=>this._tunnels.get(s));for(let s of i){let a=s?.get(n);if(a)return a}}canTunnel(e){return!!XG(e)}createWithProvider(e,n,o,i,s,a,l){this.logService.trace(`ForwardedPorts: (TunnelService) Creating tunnel with provider ${n}:${o} on local port ${i}.`);let d=o;this._factoryInProgress.add(d);let c=i===void 0?o:i,u={elevationRequired:s?this.isPortPrivileged(c):!1},f={remoteAddress:{host:n,port:o},localAddressPort:i,privacy:a,public:a?a!=="private":void 0,protocol:l},g=e.forwardPort(f,u);return g?(this.addTunnelToMap(n,o,g),g.finally(()=>{this.logService.trace("ForwardedPorts: (TunnelService) Tunnel created by provider."),this._factoryInProgress.delete(d)})):this._factoryInProgress.delete(d),g}};dS=L([P(0,be),P(1,to)],dS);var Qk=class extends cS{},FB;(e=>{function r(n){return{remoteAddress:n.remoteAddress,localAddress:n.localAddress,public:!!n.public,privacy:n.privacy??(n.public?"public":"private"),protocol:n.protocol}}e.fromApiTunnel=r;function t(n){return{remoteAddress:{host:n.tunnelRemoteHost,port:n.tunnelRemotePort},localAddress:n.localAddress,public:n.privacy!=="constantPrivate"&&n.privacy!=="constantPrivate",privacy:n.privacy,protocol:n.protocol}}e.fromServiceTunnel=t})(FB||={});var Bp=N("IExtHostTunnelService"),Hp=class extends K{constructor(e,n,o){super();this.logService=o;this._showCandidatePort=()=>Promise.resolve(!0);this._extensionTunnels=new Map;this._onDidChangeTunnels=this._register(new D);this.onDidChangeTunnels=this._onDidChangeTunnels.event;this._providerHandleCounter=0;this._portAttributesProviders=new Map;this._proxy=e.getProxy(V.MainThreadTunnelService)}async openTunnel(e,n){this.logService.trace(`ForwardedPorts: (ExtHostTunnelService) ${e.identifier.value} called openTunnel API for ${n.remoteAddress.host}:${n.remoteAddress.port}.`);let o=await this._proxy.$openTunnel(n,e.displayName);if(o){let i=new Qk(o.remoteAddress,o.localAddress,()=>this._proxy.$closeTunnel(o.remoteAddress));return this._register(i),i}}async getTunnels(){return this._proxy.$getTunnels()}nextPortAttributesProviderHandle(){return this._providerHandleCounter++}registerPortsAttributesProvider(e,n){e.portRange===void 0&&e.commandPattern===void 0&&this.logService.error("PortAttributesProvider must specify either a portRange or a commandPattern");let o=this.nextPortAttributesProviderHandle();return this._portAttributesProviders.set(o,{selector:e,provider:n}),this._proxy.$registerPortsAttributesProvider(e,o),new Ce(()=>{this._portAttributesProviders.delete(o),this._proxy.$unregisterPortsAttributesProvider(o)})}async $providePortAttributes(e,n,o,i,s){let a=[];for(let d of e){let c=this._portAttributesProviders.get(d);if(!c)return[];a.push(...await Promise.all(n.map(async u=>{let f;try{f=await c.provider.providePortAttributes({port:u,pid:o,commandLine:i},s)}catch{f=await c.provider.providePortAttributes(u,o,i,s)}return{providedAttributes:f,port:u}})))}let l=a.filter(d=>!!d.providedAttributes);return l.length>0?l.map(d=>({autoForwardAction:d.providedAttributes.autoForwardAction,port:d.port})):[]}async $registerCandidateFinder(e){}registerTunnelProvider(e,n){if(this._forwardPortProvider)throw new Error("A tunnel provider has already been registered. Only the first tunnel provider to be registered will be used.");this._forwardPortProvider=async(i,s)=>await e.provideTunnel(i,s,De.None)??void 0;let o=n.tunnelFeatures?{elevation:!!n.tunnelFeatures?.elevation,privacyOptions:n.tunnelFeatures?.privacyOptions,protocol:n.tunnelFeatures.protocol===void 0?!0:n.tunnelFeatures.protocol}:void 0;return this._proxy.$setTunnelProvider(o,!0),Promise.resolve(ae(()=>{this._forwardPortProvider=void 0,this._proxy.$setTunnelProvider(void 0,!1)}))}hasTunnelProvider(){return this._proxy.$hasTunnelProvider()}async setTunnelFactory(e,n){if(e){e.candidatePortSource!==void 0&&this._proxy.$setCandidatePortSource(e.candidatePortSource),e.showCandidatePort&&(this._showCandidatePort=e.showCandidatePort,this._proxy.$setCandidateFilter());let o=e.tunnelFactory??(n?this.makeManagedTunnelFactory(n):void 0);if(o){this._forwardPortProvider=o;let i=e.tunnelFeatures?.privacyOptions??[];e.tunnelFeatures?.public&&i.length===0&&(i=[{id:"private",label:p(3212,null),themeIcon:"lock"},{id:"public",label:p(3213,null),themeIcon:"eye"}]);let s=e.tunnelFeatures?{elevation:!!e.tunnelFeatures?.elevation,public:!!e.tunnelFeatures?.public,privacyOptions:i,protocol:!0}:void 0;this._proxy.$setTunnelProvider(s,!!e.tunnelFactory)}}else this._forwardPortProvider=void 0;return ae(()=>{this._forwardPortProvider=void 0})}makeManagedTunnelFactory(e){}async $closeTunnel(e,n){if(this._extensionTunnels.has(e.host)){let o=this._extensionTunnels.get(e.host);o.has(e.port)&&(n&&o.get(e.port).disposeListener.dispose(),await o.get(e.port).tunnel.dispose(),o.delete(e.port))}}async $onDidTunnelsChange(){this._onDidChangeTunnels.fire()}async $forwardPort(e,n){if(this._forwardPortProvider)try{this.logService.trace("ForwardedPorts: (ExtHostTunnelService) Getting tunnel from provider.");let o=this._forwardPortProvider(e,n);if(this.logService.trace("ForwardedPorts: (ExtHostTunnelService) Got tunnel promise from provider."),o!==void 0){let i=await o;if(this.logService.trace("ForwardedPorts: (ExtHostTunnelService) Successfully awaited tunnel from provider."),i===void 0){this.logService.error("ForwardedPorts: (ExtHostTunnelService) Resolved tunnel is undefined");return}this._extensionTunnels.has(e.remoteAddress.host)||this._extensionTunnels.set(e.remoteAddress.host,new Map);let s=this._register(i.onDidDispose(()=>(this.logService.trace("ForwardedPorts: (ExtHostTunnelService) Extension fired tunnel's onDidDispose."),this._proxy.$closeTunnel(i.remoteAddress))));return this._extensionTunnels.get(e.remoteAddress.host).set(e.remoteAddress.port,{tunnel:i,disposeListener:s}),FB.fromApiTunnel(i)}else this.logService.trace("ForwardedPorts: (ExtHostTunnelService) Tunnel is undefined")}catch(o){if(this.logService.trace("ForwardedPorts: (ExtHostTunnelService) tunnel provider error"),o instanceof Error)return o.message}}async $applyCandidateFilter(e){let n=await Promise.all(e.map(i=>this._showCandidatePort(i.host,i.port,i.detail??""))),o=e.filter((i,s)=>n[s]);return this.logService.trace(`ForwardedPorts: (ExtHostTunnelService) filtered from ${e.map(i=>i.port).join(", ")} to ${o.map(i=>i.port).join(", ")}`),o}};Hp=L([P(0,Ee),P(1,Et),P(2,be)],Hp);function HB(r){return[...r.entries()]}function BB(r){return r?[...r.entries()]:[]}var lDe=N("ptyService");var YG={Backend:"workbench.contributions.terminal.processBackend"},Xk=class{constructor(){this._backends=new Map}get backends(){return this._backends}registerTerminalBackend(t){let e=this._sanitizeRemoteAuthority(t.remoteAuthority);if(this._backends.has(e))throw new Error(`A terminal backend with remote authority '${e}' was already registered.`);this._backends.set(e,t)}getTerminalBackend(t){return this._backends.get(this._sanitizeRemoteAuthority(t))}_sanitizeRemoteAuthority(t){return t?.toLowerCase()??""}};ht.add(YG.Backend,new Xk);var dDe=N("localPtyService"),cDe=N("terminalLogService");var uS=class{constructor(t){this._callback=t;this._terminalBufferMap=new Map}dispose(){for(let t of this._terminalBufferMap.values())t.dispose()}startBuffering(t,e,n=5){let o=e(i=>{let s=Me(i)?i:i.data,a=this._terminalBufferMap.get(t);if(a){a.data.push(s);return}let l=setTimeout(()=>this.flushBuffer(t),n);a={data:[s],timeoutId:l,dispose:()=>{clearTimeout(l),this.flushBuffer(t),o.dispose()}},this._terminalBufferMap.set(t,a)});return o}stopBuffering(t){this._terminalBufferMap.get(t)?.dispose()}flushBuffer(t){let e=this._terminalBufferMap.get(t);e&&(this._terminalBufferMap.delete(t),this._callback(t,e.data.join("")))}};var fc=(r,t,e,n)=>{let o=t;return{enumerable:!0,configurable:!1,get(){return o},set(i){if(!e(o,i)){let s=o;o=i,r.listener?.(n(i,s))}}}},Vp=(r,t)=>r===t,wl={range:(r,t)=>r===t?!0:!r||!t?!1:r.isEqual(t),label:Vp,description:Vp,sortText:Vp,busy:Vp,error:Vp,canResolveChildren:Vp,tags:(r,t)=>!(r.length!==t.length||r.some(e=>!t.find(n=>e.id===n.id)))},Wp=r=>t=>({op:4,update:r(t)}),ZG=(r,t)=>({range:(()=>{let e,n=Wp(o=>({range:Ke.lift(j.from(o))}));return{enumerable:!0,configurable:!1,get(){return e},set(o){r.listener?.({op:6}),wl.range(e,o)||(e=o,r.listener?.(n(o)))}}})(),label:fc(r,t,wl.label,Wp(e=>({label:e}))),description:fc(r,void 0,wl.description,Wp(e=>({description:e}))),sortText:fc(r,void 0,wl.sortText,Wp(e=>({sortText:e}))),canResolveChildren:fc(r,!1,wl.canResolveChildren,e=>({op:2,state:e})),busy:fc(r,!1,wl.busy,Wp(e=>({busy:e}))),error:fc(r,void 0,wl.error,Wp(e=>({error:ye.fromStrict(e)||null}))),tags:fc(r,[],wl.tags,(e,n)=>({op:1,new:e.map(Ar.from),old:n.map(Ar.from)}))}),ez=r=>{let t=nt.fromString(r.extId),e=new oa(t.controllerId,t.localId,r.label,E.revive(r.uri)||void 0);return e.range=j.to(r.range||void 0),e.description=r.description||void 0,e.sortText=r.sortText||void 0,e.tags=r.tags.map(n=>Ar.to({id:NI(n).tagId})),e},Yk=r=>{let t;for(let e of r.tests){let n=ez(e.item);Ou(n).parent=t,t=n}return t},oa=class r{constructor(t,e,n,o){if(e.includes("\0"))throw new Error(`Test IDs may not include the ${JSON.stringify(e)} symbol`);let i=JH(this,t);Object.defineProperties(this,{id:{value:e,enumerable:!0,writable:!1},uri:{value:o,enumerable:!0,writable:!1},parent:{enumerable:!1,get(){return i.parent instanceof $p?void 0:i.parent}},children:{value:qH(i,Ou,r),enumerable:!0,writable:!1},...ZG(i,n)})}},$p=class extends oa{constructor(e,n){super(e,e,n,void 0);this._isRoot=!0}},pS=class extends HI{constructor(t,e,n){super({controllerId:t,getDocumentVersion:o=>o&&n.getDocument(o)?.version,getApiFor:Ou,getChildren:o=>o.children,root:new $p(t,e),toITestItem:es.from})}};var Gp=class extends K{constructor(e,n,o){super();this.initData=n;this._onDidChangeTelemetryEnabled=this._register(new D);this.onDidChangeTelemetryEnabled=this._onDidChangeTelemetryEnabled.event;this._onDidChangeTelemetryConfiguration=this._register(new D);this.onDidChangeTelemetryConfiguration=this._onDidChangeTelemetryConfiguration.event;this._productConfig={usage:!0,error:!0};this._level=0;this._inLoggingOnlyMode=!1;this._telemetryLoggers=new Map;this._inLoggingOnlyMode=this.initData.environment.isExtensionTelemetryLoggingOnly;let i=n.remote.isRemote?"remoteExtHostTelemetry":e?"workerExtHostTelemetry":"extHostTelemetry";this._outputLogger=this._register(o.createLogger(i,{name:p(3209,null,this._inLoggingOnlyMode?" (Not Sent)":""),hidden:!0,group:eH}))}getTelemetryConfiguration(){return this._level===3}getTelemetryDetails(){return{isCrashEnabled:this._level>=1,isErrorsEnabled:this._productConfig.error?this._level>=2:!1,isUsageEnabled:this._productConfig.usage?this._level>=3:!1}}instantiateLogger(e,n,o){let i=this.getTelemetryDetails(),s=new hh(n,o,e,this._outputLogger,this._inLoggingOnlyMode,this.getBuiltInCommonProperties(e),{isUsageEnabled:i.isUsageEnabled,isErrorsEnabled:i.isErrorsEnabled}),a=this._telemetryLoggers.get(e.identifier.value)??[];return this._telemetryLoggers.set(e.identifier.value,[...a,s]),s.apiTelemetryLogger}$initializeTelemetryLevel(e,n,o){this._level=e,this._productConfig=o??{usage:!0,error:!0}}getBuiltInCommonProperties(e){let n=Object.create(null);switch(n["common.extname"]=`${e.publisher}.${e.name}`,n["common.extversion"]=e.version,n["common.vscodemachineid"]=this.initData.telemetryInfo.machineId,n["common.vscodesessionid"]=this.initData.telemetryInfo.sessionId,n["common.vscodecommithash"]=this.initData.commit,n["common.sqmid"]=this.initData.telemetryInfo.sqmId,n["common.devDeviceId"]=this.initData.telemetryInfo.devDeviceId??this.initData.telemetryInfo.machineId,n["common.vscodeversion"]=this.initData.version,n["common.vscodereleasedate"]=this.initData.date,n["common.isnewappinstall"]=Zk(this.initData.telemetryInfo.firstSessionDate),n["common.product"]=this.initData.environment.appHost,this.initData.uiKind){case 2:n["common.uikind"]="web";break;case 1:n["common.uikind"]="desktop";break;default:n["common.uikind"]="unknown"}return n["common.remotename"]=tH(this.initData.remote.authority,this.initData),n}$onDidChangeTelemetryLevel(e){this._oldTelemetryEnablement=this.getTelemetryConfiguration(),this._level=e;let n=this.getTelemetryDetails();this._telemetryLoggers.forEach((o,i)=>{let s=o.filter(a=>!a.isDisposed);s.length===0?this._telemetryLoggers.delete(i):this._telemetryLoggers.set(i,s)}),this._telemetryLoggers.forEach(o=>{for(let i of o)i.updateTelemetryEnablements(n.isUsageEnabled,n.isErrorsEnabled)}),this._oldTelemetryEnablement!==this.getTelemetryConfiguration()&&this._onDidChangeTelemetryEnabled.fire(this.getTelemetryConfiguration()),this._onDidChangeTelemetryConfiguration.fire(this.getTelemetryDetails())}onExtensionError(e,n){let i=this._telemetryLoggers.get(e.value)?.filter(a=>!a.isDisposed);if(!i)return this._telemetryLoggers.delete(e.value),!1;let s=!1;for(let a of i)a.ignoreUnhandledExtHostErrors||(a.logError(n),s=!0);return s}};Gp=L([P(1,Et),P(2,Zo)],Gp);var hh=class{constructor(t,e,n,o,i,s,a){this._extension=n;this._logger=o;this._inLoggingOnlyMode=i;this._commonProperties=s;this._onDidChangeEnableStates=new D;this.ignoreUnhandledExtHostErrors=e?.ignoreUnhandledErrors??!1,this._ignoreBuiltinCommonProperties=e?.ignoreBuiltInCommonProperties??!1,this._additionalCommonProperties=e?.additionalCommonProperties,this._sender=t,this._telemetryEnablements={isUsageEnabled:a.isUsageEnabled,isErrorsEnabled:a.isErrorsEnabled}}static validateSender(t){if(typeof t!="object")throw new TypeError("TelemetrySender argument is invalid");if(typeof t.sendEventData!="function")throw new TypeError("TelemetrySender.sendEventData must be a function");if(typeof t.sendErrorData!="function")throw new TypeError("TelemetrySender.sendErrorData must be a function");if(typeof t.flush<"u"&&typeof t.flush!="function")throw new TypeError("TelemetrySender.flush must be a function or undefined")}updateTelemetryEnablements(t,e){this._apiObject&&(this._telemetryEnablements={isUsageEnabled:t,isErrorsEnabled:e},this._onDidChangeEnableStates.fire(this._apiObject))}mixInCommonPropsAndCleanData(t){let e=t.properties?t.properties??{}:t;return e=bw(e,[]),this._additionalCommonProperties&&(e=yr(e,this._additionalCommonProperties)),this._ignoreBuiltinCommonProperties||(e=yr(e,this._commonProperties)),t.properties?t.properties=e:t=e,t}logEvent(t,e){this._sender&&(this._extension.publisher==="vscode"?t=this._extension.name+"/"+t:t=this._extension.identifier.value+"/"+t,e=this.mixInCommonPropsAndCleanData(e||{}),this._inLoggingOnlyMode||this._sender?.sendEventData(t,e),this._logger.trace(t,e))}logUsage(t,e){this._telemetryEnablements.isUsageEnabled&&this.logEvent(t,e)}logError(t,e){if(!(!this._telemetryEnablements.isErrorsEnabled||!this._sender))if(typeof t=="string")this.logEvent(t,e);else{let n={name:t.name,message:t.message,stack:t.stack,cause:t.cause},o=bw(n,[]),i=new Error(typeof o.message=="string"?o.message:void 0,{cause:o.cause});i.stack=typeof o.stack=="string"?o.stack:void 0,i.name=typeof o.name=="string"?o.name:"unknown",e=this.mixInCommonPropsAndCleanData(e||{}),this._inLoggingOnlyMode||this._sender.sendErrorData(i,e),this._logger.trace("exception",e)}}get apiTelemetryLogger(){if(!this._apiObject){let t=this,e={logUsage:t.logUsage.bind(t),get isUsageEnabled(){return t._telemetryEnablements.isUsageEnabled},get isErrorsEnabled(){return t._telemetryEnablements.isErrorsEnabled},logError:t.logError.bind(t),dispose:t.dispose.bind(t),onDidChangeEnableStates:t._onDidChangeEnableStates.event.bind(t)};this._apiObject=Object.freeze(e)}return this._apiObject}get isDisposed(){return!this._sender}dispose(){if(this._sender?.flush){let t=this._sender;this._sender=void 0,Promise.resolve(t.flush()).then(t=void 0),this._apiObject=void 0}else this._sender=void 0;this._onDidChangeEnableStates.dispose()}};function Zk(r){let t=Date.now()-new Date(r).getTime();return isNaN(t)?!1:t<1e3*60*60*24}var Rl=N("IExtHostTelemetry");var zp=class{constructor(t,e,n){this._commands=new Map;this._apiCommands=new Map;this.#e=t.getProxy(V.MainThreadCommands),this._logService=e,this.#n=n,this.#t=t.getProxy(V.MainThreadTelemetry),this.converter=new eA(this,o=>{let i=this._apiCommands.get(o);return i?.result===Re.Void?i:void 0},e),this._argumentProcessors=[{processArgument(o){return nn(o)}},{processArgument(o){return Es(o,function(i){if(Ke.isIRange(i))return j.to(i);if(In.isIPosition(i))return st.to(i);if(Ke.isIRange(i.range)&&E.isUri(i.uri))return no.to(i);if(i instanceof ce)return i.buffer.buffer;if(!Array.isArray(i))return i})}}]}#e;#t;#n;registerArgumentProcessor(t){this._argumentProcessors.push(t)}registerApiCommand(t){let e=this.registerCommand(!1,t.id,async(...n)=>{let o=t.args.map((s,a)=>{if(!s.validate(n[a]))throw new Error(`Invalid argument '${s.name}' when running '${t.id}', received: ${typeof n[a]=="object"?JSON.stringify(n[a],null,"	"):n[a]} `);return s.convert(n[a])}),i=await this.executeCommand(t.internalId,...o);return t.result.convert(i,n,this.converter)},void 0,{description:t.description,args:t.args,returns:t.result.description});return this._apiCommands.set(t.id,t),new Ce(()=>{e.dispose(),this._apiCommands.delete(t.id)})}registerCommand(t,e,n,o,i,s){if(this._logService.trace("ExtHostCommands#registerCommand",e),!e.trim().length)throw new Error("invalid id");if(this._commands.has(e))throw new Error(`command '${e}' already exists`);return this._commands.set(e,{callback:n,thisArg:o,metadata:i,extension:s}),t&&this.#e.$registerCommand(e),new Ce(()=>{this._commands.delete(e)&&t&&this.#e.$unregisterCommand(e)})}executeCommand(t,...e){return this._logService.trace("ExtHostCommands#executeCommand",t),this._doExecuteCommand(t,e,!0)}async _doExecuteCommand(t,e,n){if(this._commands.has(t))return this.#e.$fireCommandActivationEvent(t),this._executeContributedCommand(t,e,!1);{let o=!1,i=Es(e,function(s){if(s instanceof we)return st.from(s);if(s instanceof Se)return j.from(s);if(s instanceof qt)return no.from(s);if($n.isNotebookRange(s))return ir.from(s);if(s instanceof ArrayBuffer)return o=!0,ce.wrap(new Uint8Array(s));if(s instanceof Uint8Array)return o=!0,ce.wrap(s);if(s instanceof ce)return o=!0,s;if(!Array.isArray(s))return s});try{let s=await this.#e.$executeCommand(t,o?new Wt(i):i,n);return nn(s)}catch(s){if(s instanceof Error&&s.message==="$executeCommand:retry")return this._doExecuteCommand(t,e,!1);throw s}}}async _executeContributedCommand(t,e,n){let o=this._commands.get(t);if(!o)throw new Error("Unknown command");let{callback:i,thisArg:s,metadata:a}=o;if(a?.args)for(let d=0;d<a.args.length;d++)try{s_(e[d],a.args[d].constraint)}catch{throw new Error(`Running the contributed command: '${t}' failed. Illegal argument '${a.args[d].name}' - ${a.args[d].description}`)}let l=uo.create();try{return await i.apply(s,e)}catch(d){if(t===this.converter.delegatingCommandId){let c=this.converter.getActualCommand(...e);c&&(t=c.command)}if(Fn(d)||this._logService.error(d,t,o.extension?.identifier),!n)throw d;if(o.extension?.identifier){let c=this.#n.onExtensionError(o.extension.identifier,d);this._logService.trace("forwarded error to extension?",c,o.extension?.identifier)}throw new class extends Error{constructor(){super(Gr(d));this.id=t;this.source=o.extension?.displayName??o.extension?.name}}}finally{this._reportTelemetry(o,t,l.elapsed())}}_reportTelemetry(t,e,n){t.extension&&(e.startsWith("code.copilot.logStructured")||this.#t.$publicLog2("Extension:ActionExecuted",{extensionId:t.extension.identifier.value,id:new Va(e),duration:n}))}$executeContributedCommand(t,...e){this._logService.trace("ExtHostCommands#$executeContributedCommand",t);let n=this._commands.get(t);return n?(e=e.map(o=>this._argumentProcessors.reduce((i,s)=>s.processArgument(i,n.extension),o)),this._executeContributedCommand(t,e,!0)):Promise.reject(new Error(`Contributed command '${t}' does not exist.`))}getCommands(t=!1){return this._logService.trace("ExtHostCommands#getCommands",t),this.#e.$getCommands().then(e=>(t&&(e=e.filter(n=>n[0]!=="_")),e))}$getContributedCommandMetadata(){let t=Object.create(null);for(let[e,n]of this._commands){let{metadata:o}=n;o&&(t[e]=o)}return Promise.resolve(t)}};zp=L([P(0,Ee),P(1,be),P(2,Rl)],zp);var Ko=N("IExtHostCommands"),eA=class{constructor(t,e,n){this._commands=t;this._lookupApiCommand=e;this._logService=n;this.delegatingCommandId=`__vsc${ct()}`;this._cache=new Map;this._cachIdPool=0;this._commands.registerCommand(!0,this.delegatingCommandId,this._executeConvertedCommand,this)}toInternal(t,e){if(!t)return;let n={$ident:void 0,id:t.command,title:t.title,tooltip:t.tooltip};if(!t.command)return n;let o=this._lookupApiCommand(t.command);if(o)n.id=o.internalId,n.arguments=o.args.map((i,s)=>i.convert(t.arguments&&t.arguments[s]));else if(va(t.arguments)){let i=`${t.command} /${++this._cachIdPool}`;this._cache.set(i,t),e.add(ae(()=>{this._cache.delete(i),this._logService.trace("CommandsConverter#DISPOSE",i)})),n.$ident=i,n.id=this.delegatingCommandId,n.arguments=[i],this._logService.trace("CommandsConverter#CREATE",t.command,i)}return n}fromInternal(t){return typeof t.$ident=="string"?this._cache.get(t.$ident):{command:t.id,title:t.title,arguments:t.arguments}}getActualCommand(...t){return this._cache.get(t[0])}_executeConvertedCommand(...t){let e=this.getActualCommand(...t);return this._logService.trace("CommandsConverter#EXECUTE",t[0],e?e.command:"MISSING"),e?this._commands.executeCommand(e.command,...e.arguments||[]):Promise.reject(`Actual command not found, wanted to execute ${t[0]}`)}},re=class r{constructor(t,e,n,o){this.name=t;this.description=e;this.validate=n;this.convert=o}static{this.Uri=new r("uri","Uri of a text document",t=>E.isUri(t),t=>t)}static{this.Position=new r("position","A position in a text document",t=>we.isPosition(t),st.from)}static{this.Range=new r("range","A range in a text document",t=>Se.isRange(t),j.from)}static{this.Selection=new r("selection","A selection in a text document",t=>Nn.isSelection(t),oo.from)}static{this.Number=new r("number","",t=>typeof t=="number",t=>t)}static{this.String=new r("string","",t=>typeof t=="string",t=>t)}static Arr(t){return new r(`${t.name}_array`,`Array of ${t.name}, ${t.description}`,e=>Array.isArray(e)&&e.every(n=>t.validate(n)),e=>e.map(n=>t.convert(n)))}static{this.CallHierarchyItem=new r("item","A call hierarchy item",t=>t instanceof ll,Zs.from)}static{this.TypeHierarchyItem=new r("item","A type hierarchy item",t=>t instanceof ul,ta.from)}static{this.TestItem=new r("testItem","A TestItem",t=>t instanceof oa,es.from)}static{this.TestProfile=new r("testProfile","A test profile",t=>t instanceof Qu,gk.from)}optional(){return new r(this.name,`(optional) ${this.description}`,t=>t==null||this.validate(t),t=>t===void 0?void 0:t===null?null:this.convert(t))}with(t,e){return new r(t??this.name,e??this.description,this.validate,this.convert)}},Re=class r{constructor(t,e){this.description=t;this.convert=e}static{this.Void=new r("no result",t=>t)}},Oe=class{constructor(t,e,n,o,i){this.id=t;this.internalId=e;this.description=n;this.args=o;this.result=i}};var mS=class extends K{constructor(e,n,o=()=>{}){super();this._terminalCommandPopupsProxy=e;this._id=n;this._submitInstructionEmitter=this._register(new D);this.onDidSubmitInstruction=this._submitInstructionEmitter.event;this._closePopupEmitter=this._register(new D);this.onDidClose=this._closePopupEmitter.event;this._acceptEmitter=this._register(new D);this.onDidAccept=this._acceptEmitter.event;this._rejectEmitter=this._register(new D);this.onDidReject=this._rejectEmitter.event;this._runEmitter=this._register(new D);this.onDidRun=this._runEmitter.event;this._cancelEmitter=this._register(new D);this.onDidCancel=this._cancelEmitter.event;this._modelChangeEmitter=this._register(new D);this.onDidChangeModelSelection=this._modelChangeEmitter.event;let i=this;this.value=Object.freeze({async dispose(){return o(),i.dispose(),await i._terminalCommandPopupsProxy.$closePopup(i._id)},async setLoadingState(s){return await i._terminalCommandPopupsProxy.$setPopupLoadingState(i._id,s)},async focus(){return await i._terminalCommandPopupsProxy.$focusPopup(i._id)},async showNotification(s,a,l){return await i._terminalCommandPopupsProxy.$showPopupNotification(i._id,s,a,l)},onDidClose:i.onDidClose,onDidAccept:i.onDidAccept,onDidReject:i.onDidReject,onDidRun:i.onDidRun,onDidCancel:i.onDidCancel,onDidSubmitInstruction:i.onDidSubmitInstruction,onDidChangeModelSelection:i.onDidChangeModelSelection}),this._terminalCommandPopupsProxy.$createCommandPopup(this._id)}handleEvent(e){switch(e.type){case"submit-instruction":this._submitInstructionEmitter.fire({...e});break;case"close":this._closePopupEmitter.fire();break;case"accept":this._acceptEmitter.fire();break;case"reject":this._rejectEmitter.fire();break;case"run":this._runEmitter.fire();break;case"cancel":this._cancelEmitter.fire();break;case"model-change":this._modelChangeEmitter.fire(e.clientModelConfigProtoBinaryBase64);break;default:throw new Error("Unhandled Command update")}}};var ui=N("IExtHostTerminalService"),fS=class extends K{constructor(e,n,o,i,s){super();this._proxy=e;this._terminalCommandPopupsProxy=n;this._id=o;this._creationOptions=i;this._name=s;this._disposed=!1;this._state={isInteractedWith:!1,shell:void 0};this.isOpen=!1;this.commandPopup=void 0;this._onWillDispose=this._register(new D);this.onWillDispose=this._onWillDispose.event;this._creationOptions=Object.freeze(this._creationOptions),this._pidPromise=new Promise(l=>this._pidPromiseComplete=l);let a=this;this.value={get name(){return a._name||""},get processId(){return a._pidPromise},get creationOptions(){return a._creationOptions},get exitStatus(){return a._exitStatus},get state(){return a._state},get selection(){return a._selection},get shellIntegration(){return a.shellIntegration},sendText(l,d=!0){a._checkDisposed(),a._proxy.$sendText(a._id,l,d)},sendSignal(l){return a._checkDisposed(),a._proxy.$sendSignal(a._id,l)},show(l){a._checkDisposed(),a._proxy.$show(a._id,l)},hide(){a._checkDisposed(),a._proxy.$hide(a._id)},dispose(){a._disposed||(a._disposed=!0,a._proxy.$dispose(a._id))},createCommandPopup(){return a._checkDisposed(),a.commandPopup===void 0&&(a.commandPopup=new mS(a._terminalCommandPopupsProxy,a._id,()=>{a.commandPopup=void 0})),a.commandPopup.value},get dimensions(){if(!(a._cols===void 0||a._rows===void 0))return{columns:a._cols,rows:a._rows}}}}dispose(){this._onWillDispose.fire(),super.dispose()}async create(e,n){if(typeof this._id!="string")throw new Error("Terminal has already been created");await this._proxy.$createTerminal(this._id,{name:e.name,shellPath:e.shellPath??void 0,shellArgs:e.shellArgs??void 0,cwd:e.cwd??n?.cwd??void 0,env:e.env??void 0,icon:WB(e.iconPath)??void 0,color:du.isThemeColor(e.color)?e.color.id:void 0,initialText:e.message??void 0,strictEnv:e.strictEnv??void 0,hideFromUser:e.hideFromUser??void 0,forCascadeUi:e.forCascadeUi??void 0,forceShellIntegration:n?.forceShellIntegration??void 0,isFeatureTerminal:n?.isFeatureTerminal??void 0,isExtensionOwnedTerminal:!0,useShellEnvironment:n?.useShellEnvironment??void 0,location:n?.location||this._serializeParentTerminal(e.location,n?.resolvedExtHostIdentifier),isTransient:e.isTransient??void 0,shellIntegrationNonce:e.shellIntegrationNonce??void 0,titleTemplate:e.titleTemplate??void 0})}async createExtensionTerminal(e,n,o,i,s,a,l){if(typeof this._id!="string")throw new Error("Terminal has already been created");if(await this._proxy.$createTerminal(this._id,{name:this._name,isExtensionCustomPtyTerminal:!0,icon:i,color:du.isThemeColor(s)?s.id:void 0,location:n?.location||this._serializeParentTerminal(e,o),isTransient:!0,shellIntegrationNonce:a??void 0,titleTemplate:l??void 0}),typeof this._id=="string")throw new Error("Terminal creation failed");return this._id}_serializeParentTerminal(e,n){return typeof e=="object"?Ii(e,{parentTerminal:!0})&&e.parentTerminal&&n?{parentTerminal:n}:Ii(e,{viewColumn:!0})?{viewColumn:Vt.from(e.viewColumn),preserveFocus:e.preserveFocus}:void 0:e}_checkDisposed(){if(this._disposed)throw new Error("Terminal has already been disposed")}set name(e){this._name=e}setExitStatus(e,n){this._exitStatus=Object.freeze({code:e,reason:n})}setDimensions(e,n){return e===this._cols&&n===this._rows||e===0||n===0?!1:(this._cols=e,this._rows=n,!0)}setInteractedWith(){return this._state.isInteractedWith?!1:(this._state={...this._state,isInteractedWith:!0},!0)}setShellType(e){return this._state.shell!==e?(this._state={...this._state,shell:e},!0):!1}setSelection(e){this._selection=e}_setProcessId(e){this._pidPromiseComplete?(this._pidPromiseComplete(e),this._pidPromiseComplete=void 0):this._pidPromise.then(n=>{n!==e&&(this._pidPromise=Promise.resolve(e))})}},bh=class{constructor(t){this._pty=t;this.id=0;this.shouldPersist=!1;this._onProcessData=new D;this.onProcessData=this._onProcessData.event;this._onProcessReady=new D;this._onDidChangeProperty=new D;this.onDidChangeProperty=this._onDidChangeProperty.event;this._onProcessExit=new D;this.onProcessExit=this._onProcessExit.event}get onProcessReady(){return this._onProcessReady.event}refreshProperty(t){throw new Error(`refreshProperty is not suppported in extension owned terminals. property: ${t}`)}updateProperty(t,e){throw new Error(`updateProperty is not suppported in extension owned terminals. property: ${t}, value: ${e}`)}async start(){}shutdown(){this._pty.close()}input(t){this._pty.handleInput?.(t)}sendSignal(t){}resize(t,e){this._pty.setDimensions?.({columns:t,rows:e})}clearBuffer(){}async processBinary(t){}acknowledgeDataEvent(t){}async setUnicodeVersion(t){}getInitialCwd(){return Promise.resolve("")}getCwd(){return Promise.resolve("")}startSendingEvents(t){this._pty.onDidWrite(e=>this._onProcessData.fire(e)),this._pty.onDidClose?.((e=void 0)=>{this._onProcessExit.fire(e===void 0?void 0:e)}),this._pty.onDidOverrideDimensions?.(e=>{e&&this._onDidChangeProperty.fire({type:"overrideDimensions",value:{cols:e.columns,rows:e.rows}})}),this._pty.onDidChangeName?.(e=>{this._onDidChangeProperty.fire({type:"title",value:e})}),this._pty.open(t||void 0),t&&this._pty.setDimensions?.(t),this._onProcessReady.fire({pid:-1,cwd:"",windowsPty:void 0})}},tz=1,vh=class extends K{constructor(e,n,o){super();this._extHostCommands=n;this._terminals=[];this._terminalProcesses=new Map;this._terminalProcessDisposables={};this._extensionTerminalAwaitingStart={};this._getTerminalPromises={};this._environmentVariableCollections=new Map;this._lastQuickFixCommands=this._register(new An);this._linkProviders=new Set;this._completionProviders=new Map;this._profileProviders=new Map;this._quickFixProviders=new Map;this._terminalLinkCache=new Map;this._terminalLinkCancellationSource=new Map;this._onDidCloseTerminal=new D;this.onDidCloseTerminal=this._onDidCloseTerminal.event;this._onDidOpenTerminal=new D;this.onDidOpenTerminal=this._onDidOpenTerminal.event;this._onDidChangeActiveTerminal=new D;this.onDidChangeActiveTerminal=this._onDidChangeActiveTerminal.event;this._onDidChangeTerminalDimensions=new D;this.onDidChangeTerminalDimensions=this._onDidChangeTerminalDimensions.event;this._onDidChangeTerminalState=new D;this.onDidChangeTerminalState=this._onDidChangeTerminalState.event;this._onDidChangeShell=new D;this.onDidChangeShell=this._onDidChangeShell.event;this._onDidWriteTerminalData=new D({onWillAddFirstListener:()=>this._proxy.$startSendingDataEvents(),onDidRemoveLastListener:()=>this._proxy.$stopSendingDataEvents()});this.onDidWriteTerminalData=this._onDidWriteTerminalData.event;this._onDidExecuteCommand=new D({onWillAddFirstListener:()=>this._proxy.$startSendingCommandEvents(),onDidRemoveLastListener:()=>this._proxy.$stopSendingCommandEvents()});this.onDidExecuteTerminalCommand=this._onDidExecuteCommand.event;this._proxy=o.getProxy(V.MainThreadTerminalService),this._terminalCommandPopupsProxy=o.getProxy(V.MainThreadTerminalCommandPopups),this._bufferer=new uS(this._proxy.$sendProcessData),this._proxy.$registerProcessSupport(e),this._extHostCommands.registerArgumentProcessor({processArgument:i=>{let s=a=>this.getTerminalById(a.instanceId)?.value;switch(i?.$mid){case 15:return s(i);default:{if(Array.isArray(i))for(let a=0;a<i.length&&i[a].$mid===15;a++)i[a]=s(i[a]);return i}}}}),this._register({dispose:()=>{for(let[i,s]of this._terminalProcesses)s.shutdown(!0)}})}get activeTerminal(){return this._activeTerminal?.value}get terminals(){return this._terminals.map(e=>e.value)}getDefaultShell(e){return(e?this._defaultAutomationProfile:this._defaultProfile)?.path||""}getDefaultShellArgs(e){return(e?this._defaultAutomationProfile:this._defaultProfile)?.args||[]}createExtensionTerminal(e,n){let o=new fS(this._proxy,this._terminalCommandPopupsProxy,ct(),e,e.name),i=new bh(e.pty);return o.createExtensionTerminal(e.location,n,this._serializeParentTerminal(e,n).resolvedExtHostIdentifier,WB(e.iconPath),nz(e.color),e.shellIntegrationNonce,e.titleTemplate).then(s=>{let a=this._setupExtHostProcessListeners(s,i);this._terminalProcessDisposables[s]=a}),this._terminals.push(o),o.value}_serializeParentTerminal(e,n){if(n=n||{},e.location&&typeof e.location=="object"&&Ii(e.location,{parentTerminal:!0})){let o=e.location.parentTerminal;if(o){let i=this._terminals.find(s=>s.value===o);i&&(n.resolvedExtHostIdentifier=i._id)}}else e.location&&typeof e.location!="object"?n.location=e.location:n.location&&typeof n.location=="object"&&Ii(n.location,{splitActiveTerminal:!0})&&(n.location={splitActiveTerminal:!0});return n}attachPtyToTerminal(e,n){if(!this.getTerminalById(e))throw new Error(`Cannot resolve terminal with id ${e} for virtual process`);let i=new bh(n),s=this._setupExtHostProcessListeners(e,i);this._terminalProcessDisposables[e]=s}async $acceptActiveTerminalChanged(e){let n=this._activeTerminal;if(e===null){this._activeTerminal=void 0,n!==this._activeTerminal&&this._onDidChangeActiveTerminal.fire(this._activeTerminal);return}let o=this.getTerminalById(e);o&&(this._activeTerminal=o,n!==this._activeTerminal&&this._onDidChangeActiveTerminal.fire(this._activeTerminal.value))}async $acceptTerminalProcessData(e,n){let o=this.getTerminalById(e);o&&this._onDidWriteTerminalData.fire({terminal:o.value,data:n})}async $acceptTerminalDimensions(e,n,o){let i=this.getTerminalById(e);i&&i.setDimensions(n,o)&&this._onDidChangeTerminalDimensions.fire({terminal:i.value,dimensions:i.value.dimensions})}async $acceptDidExecuteCommand(e,n){let o=this.getTerminalById(e);o&&this._onDidExecuteCommand.fire({terminal:o.value,...n})}async $acceptTerminalMaximumDimensions(e,n,o){this._terminalProcesses.get(e)?.resize(n,o)}async $acceptTerminalTitleChange(e,n){let o=this.getTerminalById(e);o&&(o.name=n)}async $acceptTerminalClosed(e,n,o){let i=this._getTerminalObjectIndexById(this._terminals,e);if(i!==null){let s=this._terminals.splice(i,1)[0];s.setExitStatus(n,o),s.commandPopup?.handleEvent({type:"close"}),this._onDidCloseTerminal.fire(s.value)}}$acceptTerminalOpened(e,n,o,i){if(n){let l=this._getTerminalObjectIndexById(this._terminals,n);if(l!==null){this._terminals[l]._id=e,this._onDidOpenTerminal.fire(this.terminals[l]),this._terminals[l].isOpen=!0;return}}let s={name:i.name,shellPath:i.executable,shellArgs:i.args,cwd:typeof i.cwd=="string"?i.cwd:E.revive(i.cwd),env:i.env,hideFromUser:i.hideFromUser,titleTemplate:i.titleTemplate},a=new fS(this._proxy,this._terminalCommandPopupsProxy,e,s,o);this._terminals.push(a),this._onDidOpenTerminal.fire(a.value),a.isOpen=!0}async $acceptTerminalProcessId(e,n){this.getTerminalById(e)?._setProcessId(n)}async $startExtensionTerminal(e,n){let o=this.getTerminalById(e);if(!o)return{message:p(3210,null,e)};o.isOpen||await new Promise(s=>{let a=this.onDidOpenTerminal(async l=>{l===o.value&&(a.dispose(),s())})});let i=this._terminalProcesses.get(e);i?i.startSendingEvents(n):this._extensionTerminalAwaitingStart[e]={initialDimensions:n}}_setupExtHostProcessListeners(e,n){let o=new te;o.add(n.onProcessReady(s=>this._proxy.$sendProcessReady(e,s.pid,s.cwd,s.windowsPty))),o.add(n.onDidChangeProperty(s=>this._proxy.$sendProcessProperty(e,s))),this._bufferer.startBuffering(e,n.onProcessData),o.add(n.onProcessExit(s=>this._onProcessExit(e,s))),this._terminalProcesses.set(e,n);let i=this._extensionTerminalAwaitingStart[e];return i&&n instanceof bh&&(n.startSendingEvents(i.initialDimensions),delete this._extensionTerminalAwaitingStart[e]),o}$acceptProcessAckDataEvent(e,n){this._terminalProcesses.get(e)?.acknowledgeDataEvent(n)}$acceptProcessInput(e,n){this._terminalProcesses.get(e)?.input(n)}$acceptTerminalInteraction(e){let n=this.getTerminalById(e);n?.setInteractedWith()&&this._onDidChangeTerminalState.fire(n.value)}$acceptTerminalSelection(e,n){this.getTerminalById(e)?.setSelection(n)}$acceptProcessResize(e,n,o){try{this._terminalProcesses.get(e)?.resize(n,o)}catch(i){if(i.code!=="EPIPE"&&i.code!=="ERR_IPC_CHANNEL_CLOSED")throw i}}$acceptProcessShutdown(e,n){this._terminalProcesses.get(e)?.shutdown(n)}$acceptProcessRequestInitialCwd(e){this._terminalProcesses.get(e)?.getInitialCwd().then(n=>this._proxy.$sendProcessProperty(e,{type:"initialCwd",value:n}))}$acceptProcessRequestCwd(e){this._terminalProcesses.get(e)?.getCwd().then(n=>this._proxy.$sendProcessProperty(e,{type:"cwd",value:n}))}$acceptProcessRequestLatency(e){return Promise.resolve(e)}registerProfileProvider(e,n,o){if(this._profileProviders.has(n))throw new Error(`Terminal profile provider "${n}" already registered`);return this._profileProviders.set(n,{provider:o,extension:e}),this._proxy.$registerProfileProvider(n,e.identifier.value),new Ce(()=>{this._profileProviders.delete(n),this._proxy.$unregisterProfileProvider(n)})}registerTerminalCompletionProvider(e,n,...o){if(this._completionProviders.has(e.identifier.value))throw new Error(`Terminal completion provider "${e.identifier.value}" already registered`);return this._completionProviders.set(e.identifier.value,n),this._proxy.$registerCompletionProvider(e.identifier.value,e.identifier.value,...o),new Ce(()=>{this._completionProviders.delete(e.identifier.value),this._proxy.$unregisterCompletionProvider(e.identifier.value)})}async $provideTerminalCompletions(e,n){let o=new We().token;if(o.isCancellationRequested||!this.activeTerminal)return;let i=this._completionProviders.get(e);if(!i)return;let s=await i.provideTerminalCompletions(this.activeTerminal,n,o);if(s==null)return;let a=!Rt||this.activeTerminal.state?.shell==="gitbash"?"/":"\\";return Sk.from(s,a)}$acceptTerminalShellType(e,n){let o=this.getTerminalById(e);o?.setShellType(n)&&this._onDidChangeTerminalState.fire(o.value)}registerTerminalQuickFixProvider(e,n,o){if(this._quickFixProviders.has(e))throw new Error(`Terminal quick fix provider "${e}" is already registered`);return this._quickFixProviders.set(e,o),this._proxy.$registerQuickFixProvider(e,n),new Ce(()=>{this._quickFixProviders.delete(e),this._proxy.$unregisterQuickFixProvider(e)})}async $provideTerminalQuickFixes(e,n){let o=new We().token;if(o.isCancellationRequested)return;let i=this._quickFixProviders.get(e);if(!i)return;let s=await i.provideTerminalQuickFixes(n,o);if(s===null||Array.isArray(s)&&s.length===0)return;let a=new te;if(this._lastQuickFixCommands.value=a,!Array.isArray(s))return s?GE.from(s,this._extHostCommands.converter,a):void 0;let l=[];for(let d of s){let c=GE.from(d,this._extHostCommands.converter,a);c&&l.push(c)}return l}async $createContributedProfileTerminal(e,n){let o=new We().token,i=this._profileProviders.get(e);if(!i)throw new Error(`No terminal profile provider registered for id "${e}"`);let s=await i.provider.provideTerminalProfile(o);if(o.isCancellationRequested)return;if(s&&!Ii(s,{options:!0})&&(s={options:s}),!s||!Ii(s,{options:!0}))throw new Error(`No terminal profile options provided for id "${e}"`);let a=$e(i.extension,"terminalTitle");!a&&s.options.titleTemplate!==void 0&&(console.error(`[${i.extension.identifier.value}] \`titleTemplate\` returned from TerminalProfileProvider is ignored because the \`terminalTitle\` proposed API is not enabled.`),s={options:{...s.options,titleTemplate:void 0}}),!a&&n.titleTemplate!==void 0&&console.error(`[${i.extension.identifier.value}] \`titleTemplate\` passed to createContributedTerminalProfile is ignored because the \`terminalTitle\` proposed API is not enabled.`);let l=a&&n.titleTemplate&&!s.options.titleTemplate?{...s.options,titleTemplate:n.titleTemplate}:s.options;if(Ii(l,{pty:!0})){this.createExtensionTerminal(l,n);return}this.createTerminalFromOptions(l,n)}registerLinkProvider(e){return this._linkProviders.add(e),this._linkProviders.size===1&&this._proxy.$startLinkProvider(),new Ce(()=>{this._linkProviders.delete(e),this._linkProviders.size===0&&this._proxy.$stopLinkProvider()})}async $provideLinks(e,n){let o=this.getTerminalById(e);if(!o)return[];this._terminalLinkCache.delete(e),this._terminalLinkCancellationSource.get(e)?.dispose(!0);let s=new We;this._terminalLinkCancellationSource.set(e,s);let a=[],l={terminal:o.value,line:n},d=[];for(let f of this._linkProviders)d.push(wa.withAsyncBody(async g=>{s.token.onCancellationRequested(()=>g({provider:f,links:[]}));let I=await f.provideTerminalLinks(l,s.token)||[];s.token.isCancellationRequested||g({provider:f,links:I})}));let c=await Promise.all(d);if(s.token.isCancellationRequested)return[];let u=new Map;for(let f of c)f&&f.links.length>0&&a.push(...f.links.map(g=>{let I={id:tz++,startIndex:g.startIndex,length:g.length,label:g.tooltip};return u.set(I.id,{provider:f.provider,link:g}),I}));return this._terminalLinkCache.set(e,u),a}$activateLink(e,n){let o=this._terminalLinkCache.get(e)?.get(n);o&&o.provider.handleTerminalLink(o.link)}_onProcessExit(e,n){this._bufferer.stopBuffering(e),this._terminalProcesses.delete(e),delete this._extensionTerminalAwaitingStart[e];let o=this._terminalProcessDisposables[e];o&&(o.dispose(),delete this._terminalProcessDisposables[e]),this._proxy.$sendProcessExit(e,n)}getTerminalById(e){return this._getTerminalObjectById(this._terminals,e)}getTerminalIdByApiObject(e){let n=this._terminals.findIndex(o=>o.value===e);return n>=0?n:null}_getTerminalObjectById(e,n){let o=this._getTerminalObjectIndexById(e,n);return o!==null?e[o]:null}_getTerminalObjectIndexById(e,n){let o=e.findIndex(i=>i._id===n);return o>=0?o:null}getEnvironmentVariableCollection(e){let n=this._environmentVariableCollections.get(e.identifier.value);return n||(n=this._register(new gS),this._setEnvironmentVariableCollection(e.identifier.value,n)),n.getScopedEnvironmentVariableCollection(void 0)}_syncEnvironmentVariableCollection(e,n){let o=HB(n.map),i=BB(n.descriptionMap);this._proxy.$setEnvironmentVariableCollection(e,n.persistent,o.length===0?void 0:o,i)}$initEnvironmentVariableCollections(e){e.forEach(n=>{let o=n[0],i=this._register(new gS(n[1]));this._setEnvironmentVariableCollection(o,i)})}$acceptDefaultProfile(e,n){let o=this._defaultProfile;this._defaultProfile=e,this._defaultAutomationProfile=n,o?.path!==e.path&&this._onDidChangeShell.fire(e.path)}_setEnvironmentVariableCollection(e,n){this._environmentVariableCollections.set(e,n),this._register(n.onDidChangeCollection(()=>{this._syncEnvironmentVariableCollection(e,n)}))}$onTerminalCommandPopupEvent(e,n){this._getTerminalObjectById(this._terminals,e)?.commandPopup?.handleEvent(n)}};vh=L([P(1,Ko),P(2,Ee)],vh);var gS=class extends K{constructor(e){super();this.map=new Map;this.scopedCollections=new Map;this.descriptionMap=new Map;this._persistent=!0;this._onDidChangeCollection=this._register(new D);this.map=new Map(e)}get persistent(){return this._persistent}set persistent(e){this._persistent=e,this._onDidChangeCollection.fire()}get onDidChangeCollection(){return this._onDidChangeCollection&&this._onDidChangeCollection.event}getScopedEnvironmentVariableCollection(e){let n=this.getScopeKey(e),o=this.scopedCollections.get(n);return o||(o=new tA(this,e),this.scopedCollections.set(n,o),this._register(o.onDidChangeCollection(()=>this._onDidChangeCollection.fire()))),o}replace(e,n,o,i){this._setIfDiffers(e,{value:n,type:1,options:o??{applyAtProcessCreation:!0},scope:i})}append(e,n,o,i){this._setIfDiffers(e,{value:n,type:2,options:o??{applyAtProcessCreation:!0},scope:i})}prepend(e,n,o,i){this._setIfDiffers(e,{value:n,type:3,options:o??{applyAtProcessCreation:!0},scope:i})}_setIfDiffers(e,n){if(n.options&&n.options.applyAtProcessCreation===!1&&!n.options.applyAtShellIntegration)throw new Error("EnvironmentVariableMutatorOptions must apply at either process creation or shell integration");let o=this.getKey(e,n.scope),i=this.map.get(o),s=n.options?{applyAtProcessCreation:n.options.applyAtProcessCreation??!1,applyAtShellIntegration:n.options.applyAtShellIntegration??!1}:{applyAtProcessCreation:!0};if(!i||i.value!==n.value||i.type!==n.type||i.options?.applyAtProcessCreation!==s.applyAtProcessCreation||i.options?.applyAtShellIntegration!==s.applyAtShellIntegration||i.scope?.workspaceFolder?.index!==n.scope?.workspaceFolder?.index){let a=this.getKey(e,n.scope),l={variable:e,...n,options:s};this.map.set(a,l),this._onDidChangeCollection.fire()}}get(e,n){let o=this.getKey(e,n),i=this.map.get(o);return i?VB(i):void 0}getKey(e,n){let o=this.getScopeKey(n);return o.length?`${e}:::${o}`:e}getScopeKey(e){return this.getWorkspaceKey(e?.workspaceFolder)??""}getWorkspaceKey(e){return e?e.uri.toString():void 0}getVariableMap(e){let n=new Map;for(let[o,i]of this.map)this.getScopeKey(i.scope)===this.getScopeKey(e)&&n.set(i.variable,VB(i));return n}delete(e,n){let o=this.getKey(e,n);this.map.delete(o),this._onDidChangeCollection.fire()}clear(e){if(e?.workspaceFolder){for(let[n,o]of this.map)o.scope?.workspaceFolder?.index===e.workspaceFolder.index&&this.map.delete(n);this.clearDescription(e)}else this.map.clear(),this.descriptionMap.clear();this._onDidChangeCollection.fire()}setDescription(e,n){let o=this.getScopeKey(n),i=this.descriptionMap.get(o);if(!i||i.description!==e){let s;typeof e=="string"?s=e:s=e?.value.split(`

`)[0];let a={description:s,scope:n};this.descriptionMap.set(o,a),this._onDidChangeCollection.fire()}}getDescription(e){let n=this.getScopeKey(e);return this.descriptionMap.get(n)?.description}clearDescription(e){let n=this.getScopeKey(e);this.descriptionMap.delete(n)}},tA=class{constructor(t,e){this.collection=t;this.scope=e;this._onDidChangeCollection=new D}get persistent(){return this.collection.persistent}set persistent(t){this.collection.persistent=t}get onDidChangeCollection(){return this._onDidChangeCollection&&this._onDidChangeCollection.event}getScoped(t){return this.collection.getScopedEnvironmentVariableCollection(t)}replace(t,e,n){this.collection.replace(t,e,n,this.scope)}append(t,e,n){this.collection.append(t,e,n,this.scope)}prepend(t,e,n){this.collection.prepend(t,e,n,this.scope)}get(t){return this.collection.get(t,this.scope)}forEach(t,e){this.collection.getVariableMap(this.scope).forEach((n,o)=>t.call(e,o,n,this),this.scope)}[Symbol.iterator](){return this.collection.getVariableMap(this.scope).entries()}delete(t){this.collection.delete(t,this.scope),this._onDidChangeCollection.fire(void 0)}clear(){this.collection.clear(this.scope)}set description(t){this.collection.setDescription(t,this.scope)}get description(){return this.collection.getDescription(this.scope)}},qp=class extends vh{constructor(t,e){super(!1,t,e)}createTerminal(t,e,n){throw new Yl}createTerminalFromOptions(t,e){throw new Yl}};qp=L([P(0,Ko),P(1,Ee)],qp);function WB(r){if(!(!r||typeof r=="string"))return Ii(r,{id:!0})?{id:r.id,color:r.color}:r}function nz(r){return du.isThemeColor(r)?r:void 0}function VB(r){let t={...r};return delete t.scope,t.options=t.options??void 0,t}var $B={label:p(7525,null),order:Number.MAX_SAFE_INTEGER};var nA="/.well-known",wRe=`${nA}/oauth-protected-resource`,RRe=`${nA}/oauth-authorization-server`,kRe=`${nA}/openid-configuration`,oz=" ";function rz(r){return typeof r!="object"||r===null?!1:r.client_id!==void 0}function oA(r){if(typeof r!="object"||r===null)return!1;let t=r;return t.access_token!==void 0&&t.token_type!==void 0}function rA(r){return typeof r!="object"||r===null?!1:r.error!==void 0}function iz(r){return typeof r!="object"||r===null?!1:r.error!==void 0}var GB=["authorization_code","refresh_token","urn:ietf:params:oauth:grant-type:device_code"],sz=33418;async function iA(r,t,e){if(!r.registration_endpoint)throw new Error("Server does not support dynamic registration");let n={client_name:t,client_uri:"https://code.visualstudio.com",grant_types:r.grant_types_supported?r.grant_types_supported.filter(s=>GB.includes(s)):GB,response_types:["code"],redirect_uris:["https://insiders.vscode.dev/redirect","https://vscode.dev/redirect","http://127.0.0.1/",`http://127.0.0.1:${sz}/`],scope:e?.join(oz),token_endpoint_auth_method:"none",application_type:"native"},o=await fetch(r.registration_endpoint,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)});if(!o.ok){let s=await o.text(),a=s;try{let l=JSON.parse(s);iz(l)&&(a=`${l.error}${l.error_description?`: ${l.error_description}`:""}`)}catch{}throw new Error(`Registration to ${r.registration_endpoint} failed: ${a}`)}let i=await o.json();if(rz(i))return i;throw new Error(`Invalid authorization dynamic client registration response: ${JSON.stringify(i)}`)}function sA(r){let t=r.split(".");if(t.length!==3)throw new Error("Invalid JWT token format: token must have three parts separated by dots");let[e,n,o]=t;try{if(typeof JSON.parse(Qo(e).toString())!="object")throw new Error("Invalid JWT token format: header is not a JSON object");let s=JSON.parse(Qo(n).toString());if(typeof s!="object")throw new Error("Invalid JWT token format: payload is not a JSON object");return s}catch(i){throw i instanceof Error?new Error(`Failed to parse JWT token: ${i.message}`):new Error("Failed to parse JWT token")}}var kl=class{constructor(t,e){this._onDidChangeWindowState=new D;this.onDidChangeWindowState=this._onDidChangeWindowState.event;this._state=kl.InitialState;t.handle&&(this._nativeHandle=Qo(t.handle).buffer),this._proxy=e.getProxy(V.MainThreadWindow),this._proxy.$getInitialState().then(({isFocused:n,isActive:o})=>{this.onDidChangeWindowProperty("focused",n),this.onDidChangeWindowProperty("active",o)})}static{this.InitialState={focused:!0,active:!0}}getState(){let t=this._state;return{get focused(){return t.focused},get active(){return t.active}}}get nativeHandle(){return this._nativeHandle}$onDidChangeActiveNativeWindowHandle(t){this._nativeHandle=t?Qo(t).buffer:void 0}$onDidChangeWindowFocus(t){this.onDidChangeWindowProperty("focused",t)}$onDidChangeWindowActive(t){this.onDidChangeWindowProperty("active",t)}onDidChangeWindowProperty(t,e){e!==this._state[t]&&(this._state={...this._state,[t]:e},this._onDidChangeWindowState.fire(this._state))}openUri(t,e){let n;if(typeof t=="string"){n=t;try{t=E.parse(t)}catch{return Promise.reject(`Invalid uri - '${t}'`)}}return Ti(t.scheme)?Promise.reject("Invalid scheme - cannot be empty"):t.scheme===X.command?Promise.reject(`Invalid scheme '${t.scheme}'`):this._proxy.$openUri(t,n,e)}async asExternalUri(t,e){if(Ti(t.scheme))return Promise.reject("Invalid scheme - cannot be empty");let n=await this._proxy.$asExternalUri(t,e);return E.from(n)}};kl=L([P(0,Et),P(1,Ee)],kl);var gc=N("IExtHostWindow");var Al=class{constructor(t){this.handles=new vo;this.handlers=new Map;this._proxy=t.getProxy(V.MainThreadUrls)}static{this.HandlePool=0}registerUriHandler(t,e){let n=t.identifier;if(this.handles.has(n))throw new Error(`Protocol handler already registered for extension ${n}`);let o=Al.HandlePool++;return this.handles.add(n),this.handlers.set(o,e),this._proxy.$registerUriHandler(o,n,t.displayName||t.name),ae(()=>{this.handles.delete(n),this.handlers.delete(o),this._proxy.$unregisterUriHandler(o)})}$handleExternalUri(t,e){let n=this.handlers.get(t);if(!n)return Promise.resolve(void 0);try{n.handleUri(E.revive(e))}catch(o){Ct(o)}return Promise.resolve(void 0)}async createAppUri(t){return E.revive(await this._proxy.$createAppUri(t))}};Al=L([P(0,Ee)],Al);var hc=N("IExtHostUrlsService");function zB(r){return(t,e,n)=>{let o=null,i=null;if(typeof n.value=="function"?(o="value",i=n.value):typeof n.get=="function"&&(o="get",i=n.get),!i||typeof e=="symbol")throw new Error("not supported");n[o]=r(i,e)}}function Ih(r,t,e){return zB((n,o)=>{let i=`$debounce$${o}`,s=`$debounce$result$${o}`;return function(...a){this[s]||(this[s]=e?e():void 0),clearTimeout(this[i]),t&&(this[s]=t(this[s],...a),a=[this[s]]),this[i]=setTimeout(()=>{n.apply(this,a),this[s]=e?e():void 0},r)}})}function qB(r,t,e){return zB((n,o)=>{let i=`$throttle$timer$${o}`,s=`$throttle$result$${o}`,a=`$throttle$lastRun$${o}`,l=`$throttle$pending$${o}`;return function(...d){if(this[s]||(this[s]=e?e():void 0),(this[a]===null||this[a]===void 0)&&(this[a]=-Number.MAX_VALUE),t&&(this[s]=t(this[s],...d)),this[l])return;let c=this[a]+r;c<=Date.now()?(this[a]=Date.now(),n.apply(this,[this[s]]),this[s]=e?e():void 0):(this[l]=!0,this[i]=setTimeout(()=>{this[l]=!1,this[a]=Date.now(),n.apply(this,[this[s]]),this[s]=e?e():void 0},c-Date.now()))}})}var vc=N("IExtHostProgress"),Kp=class{constructor(t){this._handles=0;this._mapHandleToCancellationSource=new Map;this._proxy=t.getProxy(V.MainThreadProgress)}async withProgress(t,e,n){let o=this._handles++,{title:i,location:s,cancellable:a}=e,l={label:t.displayName||t.name,id:t.identifier.value};return this._proxy.$startProgress(o,{location:DE.from(s),title:i,source:l,cancellable:a},t.isUnderDevelopment?void 0:t.identifier.value).catch(ff),this._withProgress(o,n,!!a)}async withProgressFromSource(t,e,n){let o=this._handles++,{title:i,location:s,cancellable:a}=e;return this._proxy.$startProgress(o,{location:DE.from(s),title:i,source:t,cancellable:a},void 0).catch(ff),this._withProgress(o,n,!!a)}_withProgress(t,e,n){let o;n&&(o=new We,this._mapHandleToCancellationSource.set(t,o));let i=a=>{this._proxy.$progressEnd(a),this._mapHandleToCancellationSource.delete(a),o?.dispose()},s;try{s=e(new hS(this._proxy,t),n&&o?o.token:De.None)}catch(a){throw i(t),a}return s.then(a=>i(t),a=>i(t)),s}$acceptProgressCanceled(t){let e=this._mapHandleToCancellationSource.get(t);e&&(e.cancel(),this._mapHandleToCancellationSource.delete(t))}};Kp=L([P(0,Ee)],Kp);function az(r,t){return r.message=t.message,typeof t.increment=="number"&&(typeof r.increment=="number"?r.increment+=t.increment:r.increment=t.increment),r}var hS=class extends Ma{constructor(e,n){super(o=>this.throttledReport(o));this._proxy=e;this._handle=n}throttledReport(e){this._proxy.$progressReport(this._handle,e)}};L([qB(100,(e,n)=>az(e,n),()=>Object.create(null))],hS.prototype,"throttledReport",1);var jp=N("IExtHostAuthentication"),Jp=class{constructor(t,e,n,o,i,s,a){this._initData=e;this._extHostWindow=n;this._extHostUrls=o;this._extHostProgress=i;this._extHostLoggerService=s;this._logService=a;this._dynamicAuthProviderCtor=yh;this._authenticationProviders=new Map;this._providerOperations=new Da;this._onDidChangeSessions=new D;this._getSessionTaskSingler=new aA;this._onDidDynamicAuthProviderTokensChange=new D;this._proxy=t.getProxy(V.MainThreadAuthentication)}getExtensionScopedSessionsEvent(t){let e=t.toLowerCase();return He.chain(this._onDidChangeSessions.event,n=>n.filter(o=>!o.extensionIdFilter||o.extensionIdFilter.includes(e)).map(o=>({provider:o.provider})))}async getSession(t,e,n,o={}){let i=Ue.toKey(t.identifier),a=Object.keys(o).map(d=>{switch(d){case"account":return`${d}:${o.account?.id}`;case"createIfNone":case"forceNewSession":{let c=typeof o[d]=="boolean"?`${o[d]}`:`'${o[d]?.detail}/${o[d]?.learnMore?.toString()}'`;return`${d}:${c}`}case"authorizationServer":return`${d}:${o.authorizationServer?.toString(!0)}`;default:return`${d}:${!!o[d]}`}}).sort().join(", "),l;if(hH(n)){let d=n,c=d.wwwAuthenticate,u=d.fallbackScopes?[...d.fallbackScopes].sort().join(" "):"";l=`${i} ${e} challenge:${c} ${u} ${a}`}else{let d=[...n].sort().join(" ");l=`${i} ${e} ${d} ${a}`}return await this._getSessionTaskSingler.getOrCreate(l,async()=>{await this._proxy.$ensureProvider(e);let d=t.displayName||t.name;return this._proxy.$getSession(e,n,i,d,o)})}async getAccounts(t){return await this._proxy.$ensureProvider(t),await this._proxy.$getAccounts(t)}registerAuthenticationProvider(t,e,n,o){return this._providerOperations.queue(t,async()=>{if(this._authenticationProviders.get(t)){this._logService.error(`An authentication provider with id '${t}' is already registered. The existing provider will not be replaced.`);return}let i=n.onDidChangeSessions(s=>this._proxy.$sendDidChangeSessions(t,s));this._authenticationProviders.set(t,{label:e,provider:n,disposable:i,options:o??{supportsMultipleAccounts:!1}}),await this._proxy.$registerAuthenticationProvider({id:t,label:e,supportsMultipleAccounts:o?.supportsMultipleAccounts??!1,supportedAuthorizationServers:o?.supportedAuthorizationServers,supportsChallenges:o?.supportsChallenges})}),new Ce(()=>{this._providerOperations.queue(t,async()=>{let i=this._authenticationProviders.get(t);i&&(i.disposable?.dispose(),this._authenticationProviders.delete(t),await this._proxy.$unregisterAuthenticationProvider(t))})})}$createSession(t,e,n){return this._providerOperations.queue(t,async()=>{let o=this._authenticationProviders.get(t);if(o)return n.authorizationServer=E.revive(n.authorizationServer),await o.provider.createSession(e,n);throw new Error(`Unable to find authentication provider with handle: ${t}`)})}$removeSession(t,e){return this._providerOperations.queue(t,async()=>{let n=this._authenticationProviders.get(t);if(n)return await n.provider.removeSession(e);throw new Error(`Unable to find authentication provider with handle: ${t}`)})}$getSessions(t,e,n){return this._providerOperations.queue(t,async()=>{let o=this._authenticationProviders.get(t);if(o)return n.authorizationServer=E.revive(n.authorizationServer),await o.provider.getSessions(e,n);throw new Error(`Unable to find authentication provider with handle: ${t}`)})}$getSessionsFromChallenges(t,e,n){return this._providerOperations.queue(t,async()=>{let o=this._authenticationProviders.get(t);if(o){let i=o.provider;if(typeof i.getSessionsFromChallenges=="function")return n.authorizationServer=E.revive(n.authorizationServer),await i.getSessionsFromChallenges(e,n);throw new Error(`Authentication provider with handle: ${t} does not support getSessionsFromChallenges`)}throw new Error(`Unable to find authentication provider with handle: ${t}`)})}$createSessionFromChallenges(t,e,n){return this._providerOperations.queue(t,async()=>{let o=this._authenticationProviders.get(t);if(o){let i=o.provider;if(typeof i.createSessionFromChallenges=="function")return n.authorizationServer=E.revive(n.authorizationServer),await i.createSessionFromChallenges(e,n);throw new Error(`Authentication provider with handle: ${t} does not support createSessionFromChallenges`)}throw new Error(`Unable to find authentication provider with handle: ${t}`)})}$onDidChangeAuthenticationSessions(t,e,n){return t.startsWith(xI)||this._onDidChangeSessions.fire({provider:{id:t,label:e},extensionIdFilter:n}),Promise.resolve()}$onDidUnregisterAuthenticationProvider(t){return this._providerOperations.queue(t,async()=>{let e=this._authenticationProviders.get(t);e&&(e.disposable?.dispose(),this._authenticationProviders.delete(t))})}async $registerDynamicAuthProvider(t,e,n,o,i,s){if(!o){let l=E.revive(t);if(e.registration_endpoint)try{let d=await iA(e,this._initData.environment.appName,n?.scopes_supported);o=d.client_id,i=d.client_secret}catch(d){this._logService.warn(`Dynamic registration failed for ${l.toString()}: ${d.message}. Prompting user for client ID and client secret...`)}if(!o){this._logService.info(`Prompting user for client registration details for ${l.toString()}`);let d=await this._proxy.$promptForClientRegistration(l.toString());if(!d)throw new Error("User did not provide client details");o=d.clientId,i=d.clientSecret,this._logService.info(`User provided client registration for ${l.toString()}`),i?this._logService.trace(`User provided client secret for ${l.toString()}`):this._logService.trace(`User did not provide client secret for ${l.toString()}`)}}let a=new this._dynamicAuthProviderCtor(this._extHostWindow,this._extHostUrls,this._initData,this._extHostProgress,this._extHostLoggerService,this._proxy,E.revive(t),e,n,o,i,this._onDidDynamicAuthProviderTokensChange,s||[]);return await this._providerOperations.queue(a.id,async()=>{this._authenticationProviders.set(a.id,{label:a.label,provider:a,disposable:Ce.from(a,a.onDidChangeSessions(l=>this._proxy.$sendDidChangeSessions(a.id,l)),a.onDidChangeClientId(()=>this._proxy.$sendDidChangeDynamicProviderInfo({providerId:a.id,clientId:a.clientId,clientSecret:a.clientSecret}))),options:{supportsMultipleAccounts:!0}}),await this._proxy.$registerDynamicAuthenticationProvider({id:a.id,label:a.label,supportsMultipleAccounts:!0,authorizationServer:t,resourceServer:n?E.parse(n.resource):void 0,clientId:a.clientId,clientSecret:a.clientSecret})}),a.id}async $onDidChangeDynamicAuthProviderTokens(t,e,n){this._onDidDynamicAuthProviderTokensChange.fire({authProviderId:t,clientId:e,tokens:n})}};Jp=L([P(0,Ee),P(1,Et),P(2,gc),P(3,hc),P(4,vc),P(5,Zo),P(6,be)],Jp);var aA=class{constructor(){this._inFlightPromises=new Map}getOrCreate(t,e){let n=this._inFlightPromises.get(t);if(n)return n;let o=e().finally(()=>this._inFlightPromises.delete(t));return this._inFlightPromises.set(t,o),o}},yh=class{constructor(t,e,n,o,i,s,a,l,d,c,u,f,g){this._extHostWindow=t;this._extHostUrls=e;this._initData=n;this._extHostProgress=o;this._proxy=s;this.authorizationServer=a;this._serverMetadata=l;this._resourceMetadata=d;this._clientId=c;this._clientSecret=u;this._onDidChangeSessions=new D;this.onDidChangeSessions=this._onDidChangeSessions.event;this._onDidChangeClientId=new D;this.onDidChangeClientId=this._onDidChangeClientId.event;let I=a.toString(!0);this.id=d?.resource?I+" "+d?.resource:I,this.label=d?.resource_name??this.authorizationServer.authority,this._logger=i.createLogger(this.id,{name:`Auth: ${this.label}`}),this._disposable=new te,this._disposable.add(this._onDidChangeSessions),this._disposable.add(this._onDidChangeClientId);let h=He.chain(f.event,C=>C.filter(_=>_.authProviderId===this.id&&_.clientId===c).map(_=>_.tokens));this._tokenStore=this._disposable.add(new lA({onDidChange:h,set:C=>s.$setSessionsForDynamicAuthProvider(this.id,this.clientId,C)},g,this._logger)),this._disposable.add(this._tokenStore.onDidChangeSessions(C=>this._onDidChangeSessions.fire(C))),this._createFlows=[],l.authorization_endpoint&&this._createFlows.push({label:p(3194,null),handler:(C,_,R)=>this._createWithUrlHandler(C,_,R)})}get clientId(){return this._clientId}get clientSecret(){return this._clientSecret}async getSessions(t,e){if(this._logger.info(`Getting sessions for scopes: ${t?.join(" ")??"all"}`),!t)return this._tokenStore.sessions;let n=[...t].sort(),o=t.join(" "),i=this._tokenStore.sessions.filter(s=>Zt([...s.scopes].sort(),n));if(this._logger.info(`Found ${i.length} sessions for scopes: ${o}`),i.length){let s=[],a=[],l=new Map(this._tokenStore.tokens.map(d=>[d.access_token,d]));for(let d of i){let c=l.get(d.accessToken);if(c&&c.expires_in){let u=Date.now(),f=c.expires_in*1e3;if(u>c.created_at+f-300*1e3){if(this._logger.info(`Token for session ${d.id} is about to expire, refreshing...`),a.push(c),!c.refresh_token){this._logger.warn(`No refresh token available for scopes ${d.scopes.join(" ")}. Throwing away token.`);continue}try{let g=await this.exchangeRefreshTokenForToken(c.refresh_token);g.scope!==o&&(this._logger.warn(`Token scopes '${g.scope}' do not match requested scopes '${o}'. Overwriting token with what was requested...`),g.scope=o),this._logger.info(`Successfully created a new token for scopes ${d.scopes.join(" ")}.`),s.push(g)}catch(g){this._logger.error(`Failed to refresh token: ${g}`)}}}}return(s.length||a.length)&&(this._tokenStore.update({added:s,removed:a}),i=this._tokenStore.sessions.filter(d=>Zt([...d.scopes].sort(),n))),this._logger.info(`Found ${i.length} sessions for scopes: ${o}`),i}return[]}async createSession(t,e){this._logger.info(`Creating session for scopes: ${t.join(" ")}`);let n;for(let i=0;i<this._createFlows.length;i++){let{handler:s}=this._createFlows[i];try{if(n=await this._extHostProgress.withProgressFromSource({label:this.label,id:this.id},{location:15,title:p(3191,null,this.label),cancellable:!0},(a,l)=>s(t,a,l)),n)break}catch(a){let l=this._createFlows[i+1]?.label;if(!l)break;let d=Fn(a)?p(3195,null,this.label,l):p(3193,null,this.label,l);if(!await this._proxy.$showContinueNotification(d))throw new Bt;this._logger.error(`Failed to create token via flow '${l}': ${a}`)}}if(!n)throw new Error("Failed to create authentication token");n.scope!==t.join(" ")&&(this._logger.warn(`Token scopes '${n.scope}' do not match requested scopes '${t.join(" ")}'. Overwriting token with what was requested...`),n.scope=t.join(" ")),this._tokenStore.update({added:[{...n,created_at:Date.now()}],removed:[]});let o=this._tokenStore.sessions.find(i=>i.accessToken===n.access_token);return this._logger.info(`Created ${n.refresh_token?"refreshable":"non-refreshable"} session for scopes: ${n.scope}${n.expires_in?` that expires in ${n.expires_in} seconds`:""}`),o}async removeSession(t){this._logger.info(`Removing session with id: ${t}`);let e=this._tokenStore.sessions.find(o=>o.id===t);if(!e){this._logger.error(`Session with id ${t} not found`);return}let n=this._tokenStore.tokens.find(o=>o.access_token===e.accessToken);if(!n){this._logger.error(`Failed to retrieve token for removed session: ${e.id}`);return}this._tokenStore.update({added:[],removed:[n]}),this._logger.info(`Removed token for session: ${e.id} with scopes: ${e.scopes.join(" ")}`)}dispose(){this._disposable.dispose()}async _createWithUrlHandler(t,e,n){if(!this._serverMetadata.authorization_endpoint)throw new Error("Authorization Endpoint required");if(!this._serverMetadata.token_endpoint)throw new Error("Token endpoint not available in server metadata");let o=this.generateRandomString(64),i=await this.generateCodeChallenge(o),s=this.generateRandomString(32),a=E.parse(`${this._initData.environment.appUriScheme}://dynamicauthprovider/${this.authorizationServer.authority}/authorize?nonce=${s}`),l;try{l=await this._extHostUrls.createAppUri(a)}catch(C){throw new Error(`Failed to create external URI: ${C}`)}let d=new URL(this._serverMetadata.authorization_endpoint);d.searchParams.append("client_id",this._clientId),d.searchParams.append("response_type","code"),d.searchParams.append("state",l.toString()),d.searchParams.append("code_challenge",i),d.searchParams.append("code_challenge_method","S256");let c=t.join(" ");c&&d.searchParams.append("scope",c),this._resourceMetadata?.resource&&d.searchParams.append("resource",this._resourceMetadata.resource);let u="https://vscode.dev/redirect";d.searchParams.append("redirect_uri",u);let f=this.waitForAuthorizationCode(a);if(this._logger.info(`Opening authorization URL for scopes: ${c}`),this._logger.trace(`Authorization URL: ${d.toString()}`),!await this._extHostWindow.openUri(d.toString(),{}))throw new Bt;e.report({message:p(3192,null)});let I;try{I=(await rb(f,n)).code}catch(C){throw Fn(C)?(this._logger.info("Authorization code request was cancelled by the user."),C):(this._logger.error(`Failed to receive authorization code: ${C}`),new Error(`Failed to receive authorization code: ${C}`))}return this._logger.info(`Authorization code received for scopes: ${c}`),await this.exchangeCodeForToken(I,o,u)}generateRandomString(t){let e=new Uint8Array(t);return crypto.getRandomValues(e),Array.from(e).map(n=>n.toString(16).padStart(2,"0")).join("").substring(0,t)}async generateCodeChallenge(t){let n=new TextEncoder().encode(t),o=await crypto.subtle.digest("SHA-256",n);return mr(ce.wrap(new Uint8Array(o)),!1,!1).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}async waitForAuthorizationCode(t){let e=await this._proxy.$waitForUriHandler(t),n=/[?&]code=([^&]+)/.exec(e.query||"");if(!n||n.length<2)throw new Error("Authentication failed: No authorization code received");return{code:n[1]}}async exchangeCodeForToken(t,e,n){if(!this._serverMetadata.token_endpoint)throw new Error("Token endpoint not available in server metadata");let o=new URLSearchParams;o.append("client_id",this._clientId),o.append("grant_type","authorization_code"),o.append("code",t),o.append("redirect_uri",n),o.append("code_verifier",e),this._resourceMetadata?.resource&&o.append("resource",this._resourceMetadata.resource),this._clientSecret&&o.append("client_secret",this._clientSecret),this._logger.info("Exchanging authorization code for token..."),this._logger.trace(`Url: ${this._serverMetadata.token_endpoint}`),this._logger.trace(`Token request body: ${o.toString()}`);let i;try{i=await fetch(this._serverMetadata.token_endpoint,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:o.toString()})}catch(a){throw this._logger.error(`Failed to exchange authorization code for token: ${a}`),new Error(`Failed to exchange authorization code for token: ${a}`)}if(!i.ok){let a=await i.text();throw new Error(`Token exchange failed: ${i.status} ${i.statusText} - ${a}`)}let s=await i.json();if(oA(s))return this._logger.info("Successfully exchanged authorization code for token."),s;throw rA(s)&&s.error==="invalid_client"?(this._logger.warn(`Client ID (${this._clientId}) was invalid, generated a new one.`),await this._generateNewClientId(),new Error("Client ID was invalid, generated a new one. Please try again.")):new Error(`Invalid authorization token response: ${JSON.stringify(s)}`)}async exchangeRefreshTokenForToken(t){if(!this._serverMetadata.token_endpoint)throw new Error("Token endpoint not available in server metadata");let e=new URLSearchParams;e.append("client_id",this._clientId),e.append("grant_type","refresh_token"),e.append("refresh_token",t),this._resourceMetadata?.resource&&e.append("resource",this._resourceMetadata.resource),this._clientSecret&&e.append("client_secret",this._clientSecret);let o=await(await fetch(this._serverMetadata.token_endpoint,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:e.toString()})).json();if(oA(o))return{...o,created_at:Date.now()};throw rA(o)&&o.error==="invalid_client"?(this._logger.warn(`Client ID (${this._clientId}) was invalid, generated a new one.`),await this._generateNewClientId(),new Error("Client ID was invalid, generated a new one. Please try again.")):new Error(`Invalid authorization token response: ${JSON.stringify(o)}`)}async _generateNewClientId(){try{let t=await iA(this._serverMetadata,this._initData.environment.appName,this._resourceMetadata?.scopes_supported);this._clientId=t.client_id,this._clientSecret=t.client_secret,this._onDidChangeClientId.fire()}catch(t){this._logger.info(`Dynamic registration failed for ${this.authorizationServer.toString()}: ${t}. Prompting user for client ID and client secret.`);try{let e=await this._proxy.$promptForClientRegistration(this.authorizationServer.toString());if(!e)throw new Error("User did not provide client details");this._clientId=e.clientId,this._clientSecret=e.clientSecret,this._logger.info(`User provided client ID for ${this.authorizationServer.toString()}`),e.clientSecret?this._logger.info(`User provided client secret for ${this.authorizationServer.toString()}`):this._logger.info(`User did not provide client secret for ${this.authorizationServer.toString()} (optional)`),this._onDidChangeClientId.fire()}catch{throw this._logger.error(`Failed to fetch new client ID and user did not provide one: ${t}`),new Error(`Failed to fetch new client ID and user did not provide one: ${t}`)}}}};yh=L([P(0,gc),P(1,hc),P(2,Et),P(3,vc),P(4,Zo)],yh);var lA=class{constructor(t,e,n){this._persistence=t;this._logger=n;this._onDidChangeSessions=new D;this.onDidChangeSessions=this._onDidChangeSessions.event;this._disposable=new te,this._tokensObservable=_d("tokens",e),this._sessionsObservable=mg({equalsFn:(o,i)=>Zt(o,i,(s,a)=>s.accessToken===a.accessToken)},o=>this._tokensObservable.read(o).map(i=>this._getSessionFromToken(i))),this._disposable.add(this._registerChangeEventAutorun()),this._disposable.add(this._persistence.onDidChange(o=>this._tokensObservable.set(o,void 0)))}get tokens(){return this._tokensObservable.get()}get sessions(){return this._sessionsObservable.get()}dispose(){this._disposable.dispose()}update({added:t,removed:e}){this._logger.trace(`Updating tokens: added ${t.length}, removed ${e.length}`);let n=[...this._tokensObservable.get()];for(let o of e){let i=n.findIndex(s=>s.access_token===o.access_token);i!==-1&&n.splice(i,1)}for(let o of t){let i=n.findIndex(s=>s.access_token===o.access_token);i===-1?n.push(o):n[i]=o}(t.length||e.length)&&(this._tokensObservable.set(n,void 0),this._persistence.set(n)),this._logger.trace(`Tokens updated: ${n.length} tokens stored.`)}_registerChangeEventAutorun(){let t=[];return ki(e=>{this._logger.trace("Checking for session changes...");let n=this._sessionsObservable.read(e);if(t===n){this._logger.trace("No session changes detected.");return}if(!n||n.length===0){this._logger.trace("All sessions removed."),t.length>0&&(this._onDidChangeSessions.fire({added:[],removed:t,changed:[]}),t=[]);return}let o=[],i=[];for(let s of n)t.some(l=>l.accessToken===s.accessToken)||o.push(s);for(let s of t)n.some(l=>l.accessToken===s.accessToken)||i.push(s);(o.length>0||i.length>0)&&(this._logger.trace(`Sessions changed: added ${o.length}, removed ${i.length}`),this._onDidChangeSessions.fire({added:o,removed:i,changed:[]})),t=n})}_getSessionFromToken(t){let e;if(t.id_token)try{e=sA(t.id_token)}catch{}if(!e)try{e=sA(t.access_token)}catch{}let n=t.scope?t.scope.split(" "):e?.scope?e.scope.split(" "):[];return{id:lb(t.access_token,0).toString(),accessToken:t.access_token,account:{id:e?.sub||"unknown",label:e?.preferred_username||e?.name||e?.email||"MCP"},scopes:n,idToken:t.id_token}}};var Qp=N("IExtHostLanguageModels"),dA=class{constructor(){this._defaultStream=new ob;this._isDone=!1;let t=this,[e,n]=Zc.tee(t._defaultStream.asyncIterable);this.apiObject={get stream(){return e},get text(){return n.map(o=>{if(o instanceof Kt)return o.value}).coalesce()}}}handleResponsePart(t){if(this._isDone)return;let e=[];for(let n of Lt.wrap(t)){let o;n.type==="text"?o=new Kt(n.value,n.audience):n.type==="thinking"?o=new li(n.value,n.id,n.metadata):n.type==="data"?o=new Pn(n.data.buffer,n.mimeType,n.audience):o=new wr(n.toolCallId,n.name,n.parameters),e.push(o)}this._defaultStream.emitMany(e)}reject(t){this._isDone=!0,this._defaultStream.reject(t)}resolve(){this._isDone=!0,this._defaultStream.resolve()}},Ol=class{constructor(t,e,n){this._logService=e;this._extHostAuthentication=n;this._onDidChangeModelAccess=new D;this._onDidChangeProviders=new D;this.onDidChangeProviders=this._onDidChangeProviders.event;this._onDidChangeModelProxyAvailability=new D;this.onDidChangeModelProxyAvailability=this._onDidChangeModelProxyAvailability.event;this._languageModelProviders=new Map;this._localModels=new Map;this._modelAccessList=new Xn;this._pendingRequest=new Map;this._ignoredFileProviders=new Map;this._languageAccessInformationExtensions=new Set;this._proxy=t.getProxy(V.MainThreadLanguageModels)}static{this._idPool=1}dispose(){this._onDidChangeModelAccess.dispose(),this._onDidChangeProviders.dispose(),this._onDidChangeModelProxyAvailability.dispose()}registerLanguageModelChatProvider(t,e,n){this._languageModelProviders.set(e,{extension:t,provider:n}),this._proxy.$registerLanguageModelProvider(e);let o;return n.onDidChangeLanguageModelChatInformation&&(o=n.onDidChangeLanguageModelChatInformation(()=>{this._proxy.$onLMProviderChange(e)})),ae(()=>{this._languageModelProviders.delete(e),this._localModels.forEach((i,s)=>{i.metadata.vendor===e&&this._localModels.delete(s)}),o?.dispose(),this._proxy.$unregisterProvider(e)})}toModelIdentifier(t,e,n){return e?`${t}/${e}/${n}`:`${t}/${n}`}getVendorFromModelIdentifier(t){let e=t.indexOf("/");return e===-1?void 0:t.substring(0,e)}async $provideLanguageModelChatInfo(t,e,n){let o=this._languageModelProviders.get(t);if(!o)return[];let i=await o.provider.provideLanguageModelChatInformation({silent:e.silent,configuration:e.configuration},n)??[],s=i.map(a=>{let l;a.requiresAuthorization&&$e(o.extension,"chatProvider")&&(l={providerLabel:o.extension.displayName||o.extension.name,accountLabel:typeof a.requiresAuthorization=="object"?a.requiresAuthorization.label:void 0}),a.capabilities.editTools&&H(o.extension,"chatProvider");let d={};if($e(o.extension,"chatProvider")){if(a.isDefault===!0)for(let c of Object.values(Ri))typeof c=="string"&&(d[c]=!0);else if(typeof a.isDefault=="object")for(let c of Object.keys(a.isDefault)){let u=parseInt(c);d[Cp.from(u)]=a.isDefault[u]}}return{metadata:{extension:o.extension.identifier,id:a.id,vendor:t,name:a.name??"",family:a.family??"",detail:a.detail,tooltip:a.tooltip,version:a.version,multiplier:a.multiplier,multiplierNumeric:a.multiplierNumeric,maxInputTokens:a.maxInputTokens,maxOutputTokens:a.maxOutputTokens,auth:l,isDefaultForLocation:d,isUserSelectable:a.isUserSelectable,statusIcon:a.statusIcon,targetChatSessionType:a.targetChatSessionType,modelPickerCategory:a.category??$B,capabilities:a.capabilities?{vision:a.capabilities.imageInput,editTools:a.capabilities.editTools,toolCalling:!!a.capabilities.toolCalling,agentMode:!!a.capabilities.toolCalling}:void 0},identifier:this.toModelIdentifier(t,e.group,a.id)}});this._localModels.forEach((a,l)=>{a.metadata.vendor===t&&a.group===e.group&&this._localModels.delete(l)});for(let a=0;a<s.length;a++)this._localModels.set(s[a].identifier,{group:e.group,metadata:s[a].metadata,info:i[a]});return s}async $startChatRequest(t,e,n,o,i,s){let a=this._localModels.get(t);if(!a)throw new Error("Model not found");let l=this._languageModelProviders.get(a.metadata.vendor);if(!l)throw new Error(`Language model provider for '${a.metadata.id}' not found.`);let d=[],c=()=>{d.length>0&&(this._proxy.$reportResponsePart(e,new Wt(d)),d.length=0)},u=new ho(c,30),f=h=>{d.push(h)>30?(c(),u.cancel()):u.schedule()},g=new Ma(async h=>{if(s.isCancellationRequested){this._logService.warn(`[CHAT](${l.extension.identifier.value}) CANNOT send progress because the REQUEST IS CANCELLED`);return}let C;if(h instanceof wr?C={type:"tool_use",name:h.name,parameters:h.input,toolCallId:h.callId}:h instanceof Kt?C={type:"text",value:h.value,audience:h.audience}:h instanceof Pn?C={type:"data",mimeType:h.mimeType,data:ce.wrap(h.data),audience:h.audience}:h instanceof li&&(C={type:"thinking",value:h.value,id:h.id,metadata:h.metadata}),!C){this._logService.warn(`[CHAT](${l.extension.identifier.value}) UNKNOWN part ${JSON.stringify(h)}`);return}f(C)}),I;try{I=l.provider.provideLanguageModelChatResponse(a.info,o.value.map(kE.to),{...i,modelOptions:i.modelOptions??{},requestInitiator:Ue.toKey(n),toolMode:i.toolMode??1},g,s)}catch(h){throw h}Promise.resolve(I).then(()=>{c(),this._proxy.$reportResponseDone(e,void 0)},h=>{c(),this._proxy.$reportResponseDone(e,bi(h))})}$provideTokenLength(t,e,n){let o=this._localModels.get(t);if(!o)return Promise.resolve(0);let i=this._languageModelProviders.get(o.metadata.vendor);return i?Promise.resolve(i.provider.provideTokenCount(o.info,e,n)):Promise.resolve(0)}async getDefaultLanguageModel(t,e){let n;e&&await this.selectLanguageModels(t,{});for(let[o,i]of this._localModels)if(i.metadata.isDefaultForLocation.panel&&i.metadata.vendor==="copilot"){n=o;break}return!n&&!e?this.getDefaultLanguageModel(t,!0):this.getLanguageModelByIdentifier(t,n)}async getLanguageModelByIdentifier(t,e){if(!e)return;let n=this._localModels.get(e);if(!n){this._logService.warn(`[LanguageModelProxy](${t.identifier.value}) Could not find model '${e}' in local cache. Trying to resolve model again.`);let i=this.getVendorFromModelIdentifier(e);if(!i){this._logService.warn(`[LanguageModelProxy](${t.identifier.value}) Could not extract vendor from model identifier '${e}'.`);return}if(await this.selectLanguageModels(t,{vendor:i}),n=this._localModels.get(e),!n){this._logService.warn(`[LanguageModelProxy](${t.identifier.value}) Could not find model '${e}' in local cache after re-resolving models.`);return}}this._isUsingAuth(t.identifier,n.metadata)&&await this._fakeAuthPopulate(n.metadata);let o;if(!o){let i=this;o={id:n.info.id,vendor:n.metadata.vendor,family:n.info.family,version:n.info.version,name:n.info.name,capabilities:{supportsImageToText:n.metadata.capabilities?.vision??!1,supportsToolCalling:!!n.metadata.capabilities?.toolCalling,editToolsHint:n.metadata.capabilities?.editTools},maxInputTokens:n.metadata.maxInputTokens,countTokens(s,a){if(!i._localModels.has(e))throw zo.NotFound(e);return i._computeTokenLength(e,s,a??De.None)},sendRequest(s,a,l){if(!i._localModels.has(e))throw zo.NotFound(e);return i._sendChatRequest(t,e,s,a??{},l??De.None)}},Object.freeze(o)}return o}async selectLanguageModels(t,e){let n=await this._proxy.$selectChatModels({...e,extension:t.identifier}),o=[],i=n.map(a=>this.getLanguageModelByIdentifier(t,a)),s=await Promise.all(i);for(let a of s)a&&o.push(a);return o}async _sendChatRequest(t,e,n,o,i){let s=this._convertMessages(t,n),a=t.identifier,l=this._localModels.get(e)?.metadata;if(!l||!this._localModels.has(e))throw zo.NotFound(`Language model '${e}' is unknown.`);if(this._isUsingAuth(a,l)&&(!await this._getAuthAccess(t,{identifier:l.extension,displayName:l.auth.providerLabel},o.justification,!1)||!this._modelAccessList.get(a)?.has(l.extension)))throw zo.NoPermissions(`Language model '${e}' cannot be used by '${a.value}'.`);let d=Math.random()*1e6|0,c=new dA;this._pendingRequest.set(d,{languageModelId:e,res:c});try{await this._proxy.$tryStartChatRequest(a,e,d,new Wt(s),o,i)}catch(u){throw this._pendingRequest.delete(d),zo.tryDeserialize(u)??u}return c.apiObject}_convertMessages(t,e){let n=[];for(let o of e)o.role===3&&H(t,"languageModelSystem"),n.push(kE.from(o));return n}async $acceptResponsePart(t,e){let n=this._pendingRequest.get(t);n&&n.res.handleResponsePart(e.value)}async $acceptResponseDone(t,e){let n=this._pendingRequest.get(t);n&&(this._pendingRequest.delete(t),e?n.res.reject(zo.tryDeserialize(e)??QT(e)):n.res.resolve())}async _getAuthAccess(t,e,n,o){let i=xI+e.identifier.value;if(await this._extHostAuthentication.getSession(t,i,[],{silent:!0}))return this.$updateModelAccesslist([{from:t.identifier,to:e.identifier,enabled:!0}]),!0;if(o)return!1;try{let a=n?p(3201,null,e.displayName,n):void 0;return await this._extHostAuthentication.getSession(t,i,[],{forceNewSession:{detail:a}}),this.$updateModelAccesslist([{from:t.identifier,to:e.identifier,enabled:!0}]),!0}catch{return!1}}_isUsingAuth(t,e){return!!e.auth&&!Ue.equals(e.extension,t)}async _fakeAuthPopulate(t){if(t.auth)for(let e of this._languageAccessInformationExtensions)try{await this._getAuthAccess(e,{identifier:t.extension,displayName:""},void 0,!0)}catch(n){this._logService.error("Fake Auth request failed"),this._logService.error(n)}}async _computeTokenLength(t,e,n){let o=this._localModels.get(t);if(!o)throw zo.NotFound(`Language model '${t}' is unknown.`);return this._languageModelProviders.get(o.metadata.vendor)?.provider.provideTokenCount(o.info,e,n)??0}$updateModelAccesslist(t){let e=new Array;for(let{from:n,to:o,enabled:i}of t){let s=this._modelAccessList.get(n)??new vo;if(s.has(o)!==i){i?s.add(o):s.delete(o),this._modelAccessList.set(n,s);let l={from:n,to:o};e.push(l),this._onDidChangeModelAccess.fire(l)}}}createLanguageModelAccessInformation(t){this._languageAccessInformationExtensions.add(t);let e=He.signal(He.filter(this._onDidChangeModelAccess.event,o=>Ue.equals(o.from,t.identifier))),n=He.signal(this._onDidChangeProviders.event);return{get onDidChange(){return He.any(e,n)},canSendRequest(o){return!0}}}fileIsIgnored(t,e,n=De.None){return H(t,"chatParticipantAdditions"),this._proxy.$fileIsIgnored(e,n)}get isModelProxyAvailable(){return!!this._languageModelProxyProvider}async getModelProxy(t){if(H(t,"languageModelProxy"),!this._languageModelProxyProvider)throw this._logService.trace("[LanguageModelProxy] No LanguageModelProxyProvider registered"),new Error("No language model proxy provider is registered.");let e=Ue.toKey(t.identifier);try{let n=await Promise.resolve(this._languageModelProxyProvider.provideModelProxy(e,De.None));if(!n)throw this._logService.warn(`[LanguageModelProxy] Provider returned no proxy for ${e}`),new Error("Language model proxy is not available.");return n}catch(n){throw this._logService.error(`[LanguageModelProxy] Provider failed to return proxy for ${e}`,n),n}}async $isFileIgnored(t,e,n){let o=this._ignoredFileProviders.get(t);if(!o)throw new Error("Unknown LanguageModelIgnoredFileProvider");return await o.provideFileIgnored(E.revive(e),n)??!1}registerIgnoredFileProvider(t,e){H(t,"chatParticipantPrivate");let n=Ol._idPool++;return this._proxy.$registerFileIgnoreProvider(n),this._ignoredFileProviders.set(n,e),ae(()=>{this._proxy.$unregisterFileIgnoreProvider(n),this._ignoredFileProviders.delete(n)})}registerLanguageModelProxyProvider(t,e){return H(t,"chatParticipantPrivate"),this._languageModelProxyProvider=e,this._onDidChangeModelProxyAvailability.fire(),ae(()=>{this._languageModelProxyProvider===e&&(this._languageModelProxyProvider=void 0,this._onDidChangeModelProxyAvailability.fire())})}};Ol=L([P(0,Ee),P(1,be),P(2,jp)],Ol);var lz=60,dz=lz*60,cA=dz*24,$Ae=cA*7,GAe=cA*30,zAe=cA*365;function KB(r){return r.getFullYear()+"-"+String(r.getMonth()+1).padStart(2,"0")+"-"+String(r.getDate()).padStart(2,"0")+"T"+String(r.getHours()).padStart(2,"0")+":"+String(r.getMinutes()).padStart(2,"0")+":"+String(r.getSeconds()).padStart(2,"0")+"."+(r.getMilliseconds()/1e3).toFixed(3).slice(2,5)+"Z"}var Xp={DateTimeFormat(r,t){return new xt(()=>{try{return new Intl.DateTimeFormat(r,t)}catch{return new Intl.DateTimeFormat(void 0,t)}})},Collator(r,t){return new xt(()=>{try{return new Intl.Collator(r,t)}catch{return new Intl.Collator(void 0,t)}})},Segmenter(r,t){return new xt(()=>{try{return new Intl.Segmenter(r,t)}catch{return new Intl.Segmenter(void 0,t)}})},Locale(r,t){return new xt(()=>{try{return new Intl.Locale(r,t)}catch{return new Intl.Locale(Ei,t)}})},NumberFormat(r,t){return new xt(()=>{try{return new Intl.NumberFormat(r,t)}catch{return new Intl.NumberFormat(void 0,t)}})}};var Yp=class r{constructor(t){let e=A_(t);this._defaultValue=e,this._asciiMap=r._createAsciiMap(e),this._map=new Map}static _createAsciiMap(t){let e=new Uint8Array(256);return e.fill(t),e}set(t,e){let n=A_(e);t>=0&&t<256?this._asciiMap[t]=n:this._map.set(t,n)}get(t){return t>=0&&t<256?this._asciiMap[t]:this._map.get(t)||this._defaultValue}clear(){this._asciiMap.fill(this._defaultValue),this._map.clear()}};var uA=class extends Yp{constructor(e,n){super(0);this._segmenter=null;this._cachedLine=null;this._cachedSegments=[];this.intlSegmenterLocales=n,this.intlSegmenterLocales.length>0?this._segmenter=Xp.Segmenter(this.intlSegmenterLocales,{granularity:"word"}):this._segmenter=null;for(let o=0,i=e.length;o<i;o++)this.set(e.charCodeAt(o),2);this.set(32,1),this.set(9,1)}findPrevIntlWordBeforeOrAtOffset(e,n){let o=null;for(let i of this._getIntlSegmenterWordsOnLine(e)){if(i.index>n)break;o=i}return o}findNextIntlWordAtOrAfterOffset(e,n){for(let o of this._getIntlSegmenterWordsOnLine(e))if(!(o.index<n))return o;return null}_getIntlSegmenterWordsOnLine(e){return this._segmenter?this._cachedLine===e?this._cachedSegments:(this._cachedLine=e,this._cachedSegments=this._filterWordSegments(this._segmenter.value.segment(e)),this._cachedSegments):[]}_filterWordSegments(e){let n=[];for(let o of e)this._isWordLike(o)&&n.push(o);return n}_isWordLike(e){return!!e.isWordLike}},JB=new pr(10);function jB(r,t){let e=`${r}/${t.join(",")}`,n=JB.get(e);return n||(n=new uA(r,t),JB.set(e,n)),n}var Eh=class{constructor(t,e,n,o){this.searchString=t,this.isRegex=e,this.matchCase=n,this.wordSeparators=o}parseSearchRequest(){if(this.searchString==="")return null;let t;this.isRegex?t=pA(this.searchString):t=this.searchString.indexOf(`
`)>=0;let e=null;try{e=yU(this.searchString,this.isRegex,{matchCase:this.matchCase,wholeWord:!1,multiline:t,global:!0,unicode:!0})}catch{return null}if(!e)return null;let n=!this.isRegex&&!t;return n&&this.searchString.toLowerCase()!==this.searchString.toUpperCase()&&(n=this.matchCase),new Wb(e,this.wordSeparators?jB(this.wordSeparators,[]):null,n?this.searchString:null)}};function pA(r){if(!r||r.length===0)return!1;for(let t=0,e=r.length;t<e;t++){let n=r.charCodeAt(t);if(n===10)return!0;if(n===92){if(t++,t>=e)break;let o=r.charCodeAt(t);if(o===110||o===114||o===87)return!0}}return!1}function mA(r,t,e){if(!e)return new Ed(r,null);let n=[];for(let o=0,i=t.length;o<i;o++)n[o]=t[o];return new Ed(r,n)}function uz(r,t,e,n,o){if(n===0)return!0;let i=t.charCodeAt(n-1);if(r.get(i)!==0||i===13||i===10)return!0;if(o>0){let s=t.charCodeAt(n);if(r.get(s)!==0)return!0}return!1}function pz(r,t,e,n,o){if(n+o===e)return!0;let i=t.charCodeAt(n+o);if(r.get(i)!==0||i===13||i===10)return!0;if(o>0){let s=t.charCodeAt(n+o-1);if(r.get(s)!==0)return!0}return!1}function fA(r,t,e,n,o){return uz(r,t,e,n,o)&&pz(r,t,e,n,o)}var vS=class{constructor(t,e){this._wordSeparators=t,this._searchRegex=e,this._prevMatchStartIndex=-1,this._prevMatchLength=0}reset(t){this._searchRegex.lastIndex=t,this._prevMatchStartIndex=-1,this._prevMatchLength=0}next(t){let e=t.length,n;do{if(this._prevMatchStartIndex+this._prevMatchLength===e||(n=this._searchRegex.exec(t),!n))return null;let o=n.index,i=n[0].length;if(o===this._prevMatchStartIndex&&i===this._prevMatchLength){if(i===0){F_(t,e,this._searchRegex.lastIndex)>65535?this._searchRegex.lastIndex+=2:this._searchRegex.lastIndex+=1;continue}return null}if(this._prevMatchStartIndex=o,this._prevMatchLength=i,!this._wordSeparators||fA(this._wordSeparators,t,e,o,i))return n}while(n);return null}};var QB=N("chiselConfigService");function Jt(r,t){if(!r)throw new Error(t)}var mz=34028234663852886e22,fz=-34028234663852886e22,gz=4294967295,hz=2147483647,vz=-2147483648;function Zp(r){if(typeof r!="number")throw new Error("invalid int 32: "+typeof r);if(!Number.isInteger(r)||r>hz||r<vz)throw new Error("invalid int 32: "+r)}function Sh(r){if(typeof r!="number")throw new Error("invalid uint 32: "+typeof r);if(!Number.isInteger(r)||r>gz||r<0)throw new Error("invalid uint 32: "+r)}function bS(r){if(typeof r!="number")throw new Error("invalid float 32: "+typeof r);if(Number.isFinite(r)&&(r>mz||r<fz))throw new Error("invalid float 32: "+r)}var XB=Symbol("@bufbuild/protobuf/enum-type");function YB(r){let t=r[XB];return Jt(t,"missing enum type on enum object"),t}function gA(r,t,e,n){r[XB]=hA(t,e.map(o=>({no:o.no,name:o.name,localName:r[o.no]})),n)}function hA(r,t,e){let n=Object.create(null),o=Object.create(null),i=[];for(let s of t){let a=e4(s);i.push(a),n[s.name]=a,o[s.no]=a}return{typeName:r,values:i,findName(s){return n[s]},findNumber(s){return o[s]}}}function ZB(r,t,e){let n={};for(let o of t){let i=e4(o);n[i.localName]=i.no,n[i.no]=i.localName}return gA(n,r,t,e),n}function e4(r){return"localName"in r?r:Object.assign(Object.assign({},r),{localName:r.name})}var M=class{equals(t){return this.getType().runtime.util.equals(this.getType(),this,t)}clone(){return this.getType().runtime.util.clone(this)}fromBinary(t,e){let n=this.getType(),o=n.runtime.bin,i=o.makeReadOptions(e);return o.readMessage(this,i.readerFactory(t),t.byteLength,i),this}fromJson(t,e){let n=this.getType(),o=n.runtime.json,i=o.makeReadOptions(e);return o.readMessage(n,t,i,this),this}fromJsonString(t,e){let n;try{n=JSON.parse(t)}catch(o){throw new Error(`cannot decode ${this.getType().typeName} from JSON: ${o instanceof Error?o.message:String(o)}`)}return this.fromJson(n,e)}toBinary(t){let e=this.getType(),n=e.runtime.bin,o=n.makeWriteOptions(t),i=o.writerFactory();return n.writeMessage(this,i,o),i.finish()}toJson(t){let e=this.getType(),n=e.runtime.json,o=n.makeWriteOptions(t);return n.writeMessage(this,o)}toJsonString(t){var e;let n=this.toJson(t);return JSON.stringify(n,null,(e=t?.prettySpaces)!==null&&e!==void 0?e:0)}toJSON(){return this.toJson({emitDefaultValues:!0})}getType(){return Object.getPrototypeOf(this).constructor}};function t4(r,t,e,n){var o;let i=(o=n?.localName)!==null&&o!==void 0?o:t.substring(t.lastIndexOf(".")+1),s={[i]:function(a){r.util.initFields(this),r.util.initPartial(a,this)}}[i];return Object.setPrototypeOf(s.prototype,new M),Object.assign(s,{runtime:r,typeName:t,fields:r.util.newFieldList(e),fromBinary(a,l){return new s().fromBinary(a,l)},fromJson(a,l){return new s().fromJson(a,l)},fromJsonString(a,l){return new s().fromJsonString(a,l)},equals(a,l){return r.util.equals(s,a,l)}}),s}function o4(){let r=0,t=0;for(let n=0;n<28;n+=7){let o=this.buf[this.pos++];if(r|=(o&127)<<n,(o&128)==0)return this.assertBounds(),[r,t]}let e=this.buf[this.pos++];if(r|=(e&15)<<28,t=(e&112)>>4,(e&128)==0)return this.assertBounds(),[r,t];for(let n=3;n<=31;n+=7){let o=this.buf[this.pos++];if(t|=(o&127)<<n,(o&128)==0)return this.assertBounds(),[r,t]}throw new Error("invalid varint")}function yS(r,t,e){for(let i=0;i<28;i=i+7){let s=r>>>i,a=!(!(s>>>7)&&t==0),l=(a?s|128:s)&255;if(e.push(l),!a)return}let n=r>>>28&15|(t&7)<<4,o=t>>3!=0;if(e.push((o?n|128:n)&255),!!o){for(let i=3;i<31;i=i+7){let s=t>>>i,a=!!(s>>>7),l=(a?s|128:s)&255;if(e.push(l),!a)return}e.push(t>>>31&1)}}var IS=4294967296;function vA(r){let t=r[0]==="-";t&&(r=r.slice(1));let e=1e6,n=0,o=0;function i(s,a){let l=Number(r.slice(s,a));o*=e,n=n*e+l,n>=IS&&(o=o+(n/IS|0),n=n%IS)}return i(-24,-18),i(-18,-12),i(-12,-6),i(-6),t?i4(n,o):IA(n,o)}function r4(r,t){let e=IA(r,t),n=e.hi&2147483648;n&&(e=i4(e.lo,e.hi));let o=bA(e.lo,e.hi);return n?"-"+o:o}function bA(r,t){if({lo:r,hi:t}=bz(r,t),t<=2097151)return String(IS*t+r);let e=r&16777215,n=(r>>>24|t<<8)&16777215,o=t>>16&65535,i=e+n*6777216+o*6710656,s=n+o*8147497,a=o*2,l=1e7;return i>=l&&(s+=Math.floor(i/l),i%=l),s>=l&&(a+=Math.floor(s/l),s%=l),a.toString()+n4(s)+n4(i)}function bz(r,t){return{lo:r>>>0,hi:t>>>0}}function IA(r,t){return{lo:r|0,hi:t|0}}function i4(r,t){return t=~t,r?r=~r+1:t+=1,IA(r,t)}var n4=r=>{let t=String(r);return"0000000".slice(t.length)+t};function yA(r,t){if(r>=0){for(;r>127;)t.push(r&127|128),r=r>>>7;t.push(r)}else{for(let e=0;e<9;e++)t.push(r&127|128),r=r>>7;t.push(1)}}function s4(){let r=this.buf[this.pos++],t=r&127;if((r&128)==0)return this.assertBounds(),t;if(r=this.buf[this.pos++],t|=(r&127)<<7,(r&128)==0)return this.assertBounds(),t;if(r=this.buf[this.pos++],t|=(r&127)<<14,(r&128)==0)return this.assertBounds(),t;if(r=this.buf[this.pos++],t|=(r&127)<<21,(r&128)==0)return this.assertBounds(),t;r=this.buf[this.pos++],t|=(r&15)<<28;for(let e=5;(r&128)!==0&&e<10;e++)r=this.buf[this.pos++];if((r&128)!=0)throw new Error("invalid varint");return this.assertBounds(),t>>>0}function Iz(){let r=new DataView(new ArrayBuffer(8));if(typeof BigInt=="function"&&typeof r.getBigInt64=="function"&&typeof r.getBigUint64=="function"&&typeof r.setBigInt64=="function"&&typeof r.setBigUint64=="function"&&(typeof process!="object"||typeof process.env!="object"||process.env.BUF_BIGINT_DISABLE!=="1")){let o=BigInt("-9223372036854775808"),i=BigInt("9223372036854775807"),s=BigInt("0"),a=BigInt("18446744073709551615");return{zero:BigInt(0),supported:!0,parse(l){let d=typeof l=="bigint"?l:BigInt(l);if(d>i||d<o)throw new Error(`int64 invalid: ${l}`);return d},uParse(l){let d=typeof l=="bigint"?l:BigInt(l);if(d>a||d<s)throw new Error(`uint64 invalid: ${l}`);return d},enc(l){return r.setBigInt64(0,this.parse(l),!0),{lo:r.getInt32(0,!0),hi:r.getInt32(4,!0)}},uEnc(l){return r.setBigInt64(0,this.uParse(l),!0),{lo:r.getInt32(0,!0),hi:r.getInt32(4,!0)}},dec(l,d){return r.setInt32(0,l,!0),r.setInt32(4,d,!0),r.getBigInt64(0,!0)},uDec(l,d){return r.setInt32(0,l,!0),r.setInt32(4,d,!0),r.getBigUint64(0,!0)}}}let e=o=>Jt(/^-?[0-9]+$/.test(o),`int64 invalid: ${o}`),n=o=>Jt(/^[0-9]+$/.test(o),`uint64 invalid: ${o}`);return{zero:"0",supported:!1,parse(o){return typeof o!="string"&&(o=o.toString()),e(o),o},uParse(o){return typeof o!="string"&&(o=o.toString()),n(o),o},enc(o){return typeof o!="string"&&(o=o.toString()),e(o),vA(o)},uEnc(o){return typeof o!="string"&&(o=o.toString()),n(o),vA(o)},dec(o,i){return r4(o,i)},uDec(o,i){return bA(o,i)}}}var ne=Iz();var le;(function(r){r[r.DOUBLE=1]="DOUBLE",r[r.FLOAT=2]="FLOAT",r[r.INT64=3]="INT64",r[r.UINT64=4]="UINT64",r[r.INT32=5]="INT32",r[r.FIXED64=6]="FIXED64",r[r.FIXED32=7]="FIXED32",r[r.BOOL=8]="BOOL",r[r.STRING=9]="STRING",r[r.BYTES=12]="BYTES",r[r.UINT32=13]="UINT32",r[r.SFIXED32=15]="SFIXED32",r[r.SFIXED64=16]="SFIXED64",r[r.SINT32=17]="SINT32",r[r.SINT64=18]="SINT64"})(le||(le={}));var pi;(function(r){r[r.BIGINT=0]="BIGINT",r[r.STRING=1]="STRING"})(pi||(pi={}));function ra(r,t,e){if(t===e)return!0;if(r==le.BYTES){if(!(t instanceof Uint8Array)||!(e instanceof Uint8Array)||t.length!==e.length)return!1;for(let n=0;n<t.length;n++)if(t[n]!==e[n])return!1;return!0}switch(r){case le.UINT64:case le.FIXED64:case le.INT64:case le.SFIXED64:case le.SINT64:return t==e}return!1}function mi(r,t){switch(r){case le.BOOL:return!1;case le.UINT64:case le.FIXED64:case le.INT64:case le.SFIXED64:case le.SINT64:return t==0?ne.zero:"0";case le.DOUBLE:case le.FLOAT:return 0;case le.BYTES:return new Uint8Array(0);case le.STRING:return"";default:return 0}}function ES(r,t){switch(r){case le.BOOL:return t===!1;case le.STRING:return t==="";case le.BYTES:return t instanceof Uint8Array&&!t.byteLength;default:return t==0}}var Sn;(function(r){r[r.Varint=0]="Varint",r[r.Bit64=1]="Bit64",r[r.LengthDelimited=2]="LengthDelimited",r[r.StartGroup=3]="StartGroup",r[r.EndGroup=4]="EndGroup",r[r.Bit32=5]="Bit32"})(Sn||(Sn={}));var SS=class{constructor(t){this.stack=[],this.textEncoder=t??new TextEncoder,this.chunks=[],this.buf=[]}finish(){this.chunks.push(new Uint8Array(this.buf));let t=0;for(let o=0;o<this.chunks.length;o++)t+=this.chunks[o].length;let e=new Uint8Array(t),n=0;for(let o=0;o<this.chunks.length;o++)e.set(this.chunks[o],n),n+=this.chunks[o].length;return this.chunks=[],e}fork(){return this.stack.push({chunks:this.chunks,buf:this.buf}),this.chunks=[],this.buf=[],this}join(){let t=this.finish(),e=this.stack.pop();if(!e)throw new Error("invalid state, fork stack empty");return this.chunks=e.chunks,this.buf=e.buf,this.uint32(t.byteLength),this.raw(t)}tag(t,e){return this.uint32((t<<3|e)>>>0)}raw(t){return this.buf.length&&(this.chunks.push(new Uint8Array(this.buf)),this.buf=[]),this.chunks.push(t),this}uint32(t){for(Sh(t);t>127;)this.buf.push(t&127|128),t=t>>>7;return this.buf.push(t),this}int32(t){return Zp(t),yA(t,this.buf),this}bool(t){return this.buf.push(t?1:0),this}bytes(t){return this.uint32(t.byteLength),this.raw(t)}string(t){let e=this.textEncoder.encode(t);return this.uint32(e.byteLength),this.raw(e)}float(t){bS(t);let e=new Uint8Array(4);return new DataView(e.buffer).setFloat32(0,t,!0),this.raw(e)}double(t){let e=new Uint8Array(8);return new DataView(e.buffer).setFloat64(0,t,!0),this.raw(e)}fixed32(t){Sh(t);let e=new Uint8Array(4);return new DataView(e.buffer).setUint32(0,t,!0),this.raw(e)}sfixed32(t){Zp(t);let e=new Uint8Array(4);return new DataView(e.buffer).setInt32(0,t,!0),this.raw(e)}sint32(t){return Zp(t),t=(t<<1^t>>31)>>>0,yA(t,this.buf),this}sfixed64(t){let e=new Uint8Array(8),n=new DataView(e.buffer),o=ne.enc(t);return n.setInt32(0,o.lo,!0),n.setInt32(4,o.hi,!0),this.raw(e)}fixed64(t){let e=new Uint8Array(8),n=new DataView(e.buffer),o=ne.uEnc(t);return n.setInt32(0,o.lo,!0),n.setInt32(4,o.hi,!0),this.raw(e)}int64(t){let e=ne.enc(t);return yS(e.lo,e.hi,this.buf),this}sint64(t){let e=ne.enc(t),n=e.hi>>31,o=e.lo<<1^n,i=(e.hi<<1|e.lo>>>31)^n;return yS(o,i,this.buf),this}uint64(t){let e=ne.uEnc(t);return yS(e.lo,e.hi,this.buf),this}},xS=class{constructor(t,e){this.varint64=o4,this.uint32=s4,this.buf=t,this.len=t.length,this.pos=0,this.view=new DataView(t.buffer,t.byteOffset,t.byteLength),this.textDecoder=e??new TextDecoder}tag(){let t=this.uint32(),e=t>>>3,n=t&7;if(e<=0||n<0||n>5)throw new Error("illegal tag: field no "+e+" wire type "+n);return[e,n]}skip(t,e){let n=this.pos;switch(t){case Sn.Varint:for(;this.buf[this.pos++]&128;);break;case Sn.Bit64:this.pos+=4;case Sn.Bit32:this.pos+=4;break;case Sn.LengthDelimited:let o=this.uint32();this.pos+=o;break;case Sn.StartGroup:for(;;){let[i,s]=this.tag();if(s===Sn.EndGroup){if(e!==void 0&&i!==e)throw new Error("invalid end group tag");break}this.skip(s,i)}break;default:throw new Error("cant skip wire type "+t)}return this.assertBounds(),this.buf.subarray(n,this.pos)}assertBounds(){if(this.pos>this.len)throw new RangeError("premature EOF")}int32(){return this.uint32()|0}sint32(){let t=this.uint32();return t>>>1^-(t&1)}int64(){return ne.dec(...this.varint64())}uint64(){return ne.uDec(...this.varint64())}sint64(){let[t,e]=this.varint64(),n=-(t&1);return t=(t>>>1|(e&1)<<31)^n,e=e>>>1^n,ne.dec(t,e)}bool(){let[t,e]=this.varint64();return t!==0||e!==0}fixed32(){return this.view.getUint32((this.pos+=4)-4,!0)}sfixed32(){return this.view.getInt32((this.pos+=4)-4,!0)}fixed64(){return ne.uDec(this.sfixed32(),this.sfixed32())}sfixed64(){return ne.dec(this.sfixed32(),this.sfixed32())}float(){return this.view.getFloat32((this.pos+=4)-4,!0)}double(){return this.view.getFloat64((this.pos+=8)-8,!0)}bytes(){let t=this.uint32(),e=this.pos;return this.pos+=t,this.assertBounds(),this.buf.subarray(e,e+t)}string(){return this.textDecoder.decode(this.bytes())}};function a4(r,t,e,n){let o;return{typeName:t,extendee:e,get field(){if(!o){let i=typeof n=="function"?n():n;i.name=t.split(".").pop(),i.jsonName=`[${t}]`,o=r.util.newFieldList([i]).list()[0]}return o},runtime:r}}function CS(r){let t=r.field.localName,e=Object.create(null);return e[t]=yz(r),[e,()=>e[t]]}function yz(r){let t=r.field;if(t.repeated)return[];if(t.default!==void 0)return t.default;switch(t.kind){case"enum":return t.T.values[0].no;case"scalar":return mi(t.T,t.L);case"message":let e=t.T,n=new e;return e.fieldWrapper?e.fieldWrapper.unwrapField(n):n;case"map":throw"map fields are not allowed to be extensions"}}function l4(r,t){if(!t.repeated&&(t.kind=="enum"||t.kind=="scalar")){for(let e=r.length-1;e>=0;--e)if(r[e].no==t.no)return[r[e]];return[]}return r.filter(e=>e.no===t.no)}var ia="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""),TS=[];for(let r=0;r<ia.length;r++)TS[ia[r].charCodeAt(0)]=r;TS[45]=ia.indexOf("+");TS[95]=ia.indexOf("/");var EA={dec(r){let t=r.length*3/4;r[r.length-2]=="="?t-=2:r[r.length-1]=="="&&(t-=1);let e=new Uint8Array(t),n=0,o=0,i,s=0;for(let a=0;a<r.length;a++){if(i=TS[r.charCodeAt(a)],i===void 0)switch(r[a]){case"=":o=0;case`
`:case"\r":case"	":case" ":continue;default:throw Error("invalid base64 string.")}switch(o){case 0:s=i,o=1;break;case 1:e[n++]=s<<2|(i&48)>>4,s=i,o=2;break;case 2:e[n++]=(s&15)<<4|(i&60)>>2,s=i,o=3;break;case 3:e[n++]=(s&3)<<6|i,o=0;break}}if(o==1)throw Error("invalid base64 string.");return e.subarray(0,n)},enc(r){let t="",e=0,n,o=0;for(let i=0;i<r.length;i++)switch(n=r[i],e){case 0:t+=ia[n>>2],o=(n&3)<<4,e=1;break;case 1:t+=ia[o|n>>4],o=(n&15)<<2,e=2;break;case 2:t+=ia[o|n>>6],t+=ia[n&63],e=0;break}return e&&(t+=ia[o],t+="=",e==1&&(t+="=")),t}};function d4(r,t,e){u4(t,r);let n=t.runtime.bin.makeReadOptions(e),o=l4(r.getType().runtime.bin.listUnknownFields(r),t.field),[i,s]=CS(t);for(let a of o)t.runtime.bin.readField(i,n.readerFactory(a.data),t.field,a.wireType,n);return s()}function c4(r,t,e,n){u4(t,r);let o=t.runtime.bin.makeReadOptions(n),i=t.runtime.bin.makeWriteOptions(n);if(SA(r,t)){let d=r.getType().runtime.bin.listUnknownFields(r).filter(c=>c.no!=t.field.no);r.getType().runtime.bin.discardUnknownFields(r);for(let c of d)r.getType().runtime.bin.onUnknownField(r,c.no,c.wireType,c.data)}let s=i.writerFactory(),a=t.field;!a.opt&&!a.repeated&&(a.kind=="enum"||a.kind=="scalar")&&(a=Object.assign(Object.assign({},t.field),{opt:!0})),t.runtime.bin.writeField(a,e,s,i);let l=o.readerFactory(s.finish());for(;l.pos<l.len;){let[d,c]=l.tag(),u=l.skip(c,d);r.getType().runtime.bin.onUnknownField(r,d,c,u)}}function SA(r,t){let e=r.getType();return t.extendee.typeName===e.typeName&&!!e.runtime.bin.listUnknownFields(r).find(n=>n.no==t.field.no)}function u4(r,t){Jt(r.extendee.typeName==t.getType().typeName,`extension ${r.typeName} can only be applied to message ${r.extendee.typeName}`)}function _S(r,t){let e=r.localName;if(r.repeated)return t[e].length>0;if(r.oneof)return t[r.oneof.localName].case===e;switch(r.kind){case"enum":case"scalar":return r.opt||r.req?t[e]!==void 0:r.kind=="enum"?t[e]!==r.T.values[0].no:!ES(r.T,t[e]);case"message":return t[e]!==void 0;case"map":return Object.keys(t[e]).length>0}}function xA(r,t){let e=r.localName,n=!r.opt&&!r.req;if(r.repeated)t[e]=[];else if(r.oneof)t[r.oneof.localName]={case:void 0};else switch(r.kind){case"map":t[e]={};break;case"enum":t[e]=n?r.T.values[0].no:void 0;break;case"scalar":t[e]=n?mi(r.T,r.L):void 0;break;case"message":t[e]=void 0;break}}function sr(r,t){if(r===null||typeof r!="object"||!Object.getOwnPropertyNames(M.prototype).every(n=>n in r&&typeof r[n]=="function"))return!1;let e=r.getType();return e===null||typeof e!="function"||!("typeName"in e)||typeof e.typeName!="string"?!1:t===void 0?!0:e.typeName==t.typeName}function PS(r,t){return sr(t)||!r.fieldWrapper?t:r.fieldWrapper.wrapField(t)}var VOe={"google.protobuf.DoubleValue":le.DOUBLE,"google.protobuf.FloatValue":le.FLOAT,"google.protobuf.Int64Value":le.INT64,"google.protobuf.UInt64Value":le.UINT64,"google.protobuf.Int32Value":le.INT32,"google.protobuf.UInt32Value":le.UINT32,"google.protobuf.BoolValue":le.BOOL,"google.protobuf.StringValue":le.STRING,"google.protobuf.BytesValue":le.BYTES};var p4={ignoreUnknownFields:!1},m4={emitDefaultValues:!1,enumAsInteger:!1,useProtoFieldName:!1,prettySpaces:0};function Ez(r){return r?Object.assign(Object.assign({},p4),r):p4}function Sz(r){return r?Object.assign(Object.assign({},m4),r):m4}var RS=Symbol(),DS=Symbol();function h4(){return{makeReadOptions:Ez,makeWriteOptions:Sz,readMessage(r,t,e,n){if(t==null||Array.isArray(t)||typeof t!="object")throw new Error(`cannot decode message ${r.typeName} from JSON: ${ts(t)}`);n=n??new r;let o=new Map,i=e.typeRegistry;for(let[s,a]of Object.entries(t)){let l=r.fields.findJsonName(s);if(l){if(l.oneof){if(a===null&&l.kind=="scalar")continue;let d=o.get(l.oneof);if(d!==void 0)throw new Error(`cannot decode message ${r.typeName} from JSON: multiple keys for oneof "${l.oneof.name}" present: "${d}", "${s}"`);o.set(l.oneof,s)}f4(n,a,l,e,r)}else{let d=!1;if(i?.findExtension&&s.startsWith("[")&&s.endsWith("]")){let c=i.findExtension(s.substring(1,s.length-1));if(c&&c.extendee.typeName==r.typeName){d=!0;let[u,f]=CS(c);f4(u,a,c.field,e,c),c4(n,c,f(),e)}}if(!d&&!e.ignoreUnknownFields)throw new Error(`cannot decode message ${r.typeName} from JSON: key "${s}" is unknown`)}}return n},writeMessage(r,t){let e=r.getType(),n={},o;try{for(o of e.fields.byNumber()){if(!_S(o,r)){if(o.req)throw"required field not set";if(!t.emitDefaultValues||!Cz(o))continue}let s=o.oneof?r[o.oneof.localName].value:r[o.localName],a=g4(o,s,t);a!==void 0&&(n[t.useProtoFieldName?o.name:o.jsonName]=a)}let i=t.typeRegistry;if(i?.findExtensionFor)for(let s of e.runtime.bin.listUnknownFields(r)){let a=i.findExtensionFor(e.typeName,s.no);if(a&&SA(r,a)){let l=d4(r,a,t),d=g4(a.field,l,t);d!==void 0&&(n[a.field.jsonName]=d)}}}catch(i){let s=o?`cannot encode field ${e.typeName}.${o.name} to JSON`:`cannot encode message ${e.typeName} to JSON`,a=i instanceof Error?i.message:String(i);throw new Error(s+(a.length>0?`: ${a}`:""))}return n},readScalar(r,t,e){return xh(r,t,e??pi.BIGINT,!0)},writeScalar(r,t,e){if(t!==void 0&&(e||ES(r,t)))return wS(r,t)},debug:ts}}function ts(r){if(r===null)return"null";switch(typeof r){case"object":return Array.isArray(r)?"array":"object";case"string":return r.length>100?"string":`"${r.split('"').join('\\"')}"`;default:return String(r)}}function f4(r,t,e,n,o){let i=e.localName;if(e.repeated){if(Jt(e.kind!="map"),t===null)return;if(!Array.isArray(t))throw new Error(`cannot decode field ${o.typeName}.${e.name} from JSON: ${ts(t)}`);let s=r[i];for(let a of t){if(a===null)throw new Error(`cannot decode field ${o.typeName}.${e.name} from JSON: ${ts(a)}`);switch(e.kind){case"message":s.push(e.T.fromJson(a,n));break;case"enum":let l=CA(e.T,a,n.ignoreUnknownFields,!0);l!==DS&&s.push(l);break;case"scalar":try{s.push(xh(e.T,a,e.L,!0))}catch(d){let c=`cannot decode field ${o.typeName}.${e.name} from JSON: ${ts(a)}`;throw d instanceof Error&&d.message.length>0&&(c+=`: ${d.message}`),new Error(c)}break}}}else if(e.kind=="map"){if(t===null)return;if(typeof t!="object"||Array.isArray(t))throw new Error(`cannot decode field ${o.typeName}.${e.name} from JSON: ${ts(t)}`);let s=r[i];for(let[a,l]of Object.entries(t)){if(l===null)throw new Error(`cannot decode field ${o.typeName}.${e.name} from JSON: map value null`);let d;try{d=xz(e.K,a)}catch(c){let u=`cannot decode map key for field ${o.typeName}.${e.name} from JSON: ${ts(t)}`;throw c instanceof Error&&c.message.length>0&&(u+=`: ${c.message}`),new Error(u)}switch(e.V.kind){case"message":s[d]=e.V.T.fromJson(l,n);break;case"enum":let c=CA(e.V.T,l,n.ignoreUnknownFields,!0);c!==DS&&(s[d]=c);break;case"scalar":try{s[d]=xh(e.V.T,l,pi.BIGINT,!0)}catch(u){let f=`cannot decode map value for field ${o.typeName}.${e.name} from JSON: ${ts(t)}`;throw u instanceof Error&&u.message.length>0&&(f+=`: ${u.message}`),new Error(f)}break}}}else switch(e.oneof&&(r=r[e.oneof.localName]={case:i},i="value"),e.kind){case"message":let s=e.T;if(t===null&&s.typeName!="google.protobuf.Value")return;let a=r[i];sr(a)?a.fromJson(t,n):(r[i]=a=s.fromJson(t,n),s.fieldWrapper&&!e.oneof&&(r[i]=s.fieldWrapper.unwrapField(a)));break;case"enum":let l=CA(e.T,t,n.ignoreUnknownFields,!1);switch(l){case RS:xA(e,r);break;case DS:break;default:r[i]=l;break}break;case"scalar":try{let d=xh(e.T,t,e.L,!1);d===RS?xA(e,r):r[i]=d}catch(d){let c=`cannot decode field ${o.typeName}.${e.name} from JSON: ${ts(t)}`;throw d instanceof Error&&d.message.length>0&&(c+=`: ${d.message}`),new Error(c)}break}}function xz(r,t){if(r===le.BOOL)switch(t){case"true":t=!0;break;case"false":t=!1;break}return xh(r,t,pi.BIGINT,!0).toString()}function xh(r,t,e,n){if(t===null)return n?mi(r,e):RS;switch(r){case le.DOUBLE:case le.FLOAT:if(t==="NaN")return Number.NaN;if(t==="Infinity")return Number.POSITIVE_INFINITY;if(t==="-Infinity")return Number.NEGATIVE_INFINITY;if(t===""||typeof t=="string"&&t.trim().length!==t.length||typeof t!="string"&&typeof t!="number")break;let o=Number(t);if(Number.isNaN(o)||!Number.isFinite(o))break;return r==le.FLOAT&&bS(o),o;case le.INT32:case le.FIXED32:case le.SFIXED32:case le.SINT32:case le.UINT32:let i;if(typeof t=="number"?i=t:typeof t=="string"&&t.length>0&&t.trim().length===t.length&&(i=Number(t)),i===void 0)break;return r==le.UINT32||r==le.FIXED32?Sh(i):Zp(i),i;case le.INT64:case le.SFIXED64:case le.SINT64:if(typeof t!="number"&&typeof t!="string")break;let s=ne.parse(t);return e?s.toString():s;case le.FIXED64:case le.UINT64:if(typeof t!="number"&&typeof t!="string")break;let a=ne.uParse(t);return e?a.toString():a;case le.BOOL:if(typeof t!="boolean")break;return t;case le.STRING:if(typeof t!="string")break;try{encodeURIComponent(t)}catch{throw new Error("invalid UTF8")}return t;case le.BYTES:if(t==="")return new Uint8Array(0);if(typeof t!="string")break;return EA.dec(t)}throw new Error}function CA(r,t,e,n){if(t===null)return r.typeName=="google.protobuf.NullValue"?0:n?r.values[0].no:RS;switch(typeof t){case"number":if(Number.isInteger(t))return t;break;case"string":let o=r.findName(t);if(o!==void 0)return o.no;if(e)return DS;break}throw new Error(`cannot decode enum ${r.typeName} from JSON: ${ts(t)}`)}function Cz(r){return r.repeated||r.kind=="map"?!0:!(r.oneof||r.kind=="message"||r.opt||r.req)}function g4(r,t,e){if(r.kind=="map"){Jt(typeof t=="object"&&t!=null);let n={},o=Object.entries(t);switch(r.V.kind){case"scalar":for(let[s,a]of o)n[s.toString()]=wS(r.V.T,a);break;case"message":for(let[s,a]of o)n[s.toString()]=a.toJson(e);break;case"enum":let i=r.V.T;for(let[s,a]of o)n[s.toString()]=TA(i,a,e.enumAsInteger);break}return e.emitDefaultValues||o.length>0?n:void 0}if(r.repeated){Jt(Array.isArray(t));let n=[];switch(r.kind){case"scalar":for(let o=0;o<t.length;o++)n.push(wS(r.T,t[o]));break;case"enum":for(let o=0;o<t.length;o++)n.push(TA(r.T,t[o],e.enumAsInteger));break;case"message":for(let o=0;o<t.length;o++)n.push(t[o].toJson(e));break}return e.emitDefaultValues||n.length>0?n:void 0}switch(r.kind){case"scalar":return wS(r.T,t);case"enum":return TA(r.T,t,e.enumAsInteger);case"message":return PS(r.T,t).toJson(e)}}function TA(r,t,e){var n;if(Jt(typeof t=="number"),r.typeName=="google.protobuf.NullValue")return null;if(e)return t;let o=r.findNumber(t);return(n=o?.name)!==null&&n!==void 0?n:t}function wS(r,t){switch(r){case le.INT32:case le.SFIXED32:case le.SINT32:case le.FIXED32:case le.UINT32:return Jt(typeof t=="number"),t;case le.FLOAT:case le.DOUBLE:return Jt(typeof t=="number"),Number.isNaN(t)?"NaN":t===Number.POSITIVE_INFINITY?"Infinity":t===Number.NEGATIVE_INFINITY?"-Infinity":t;case le.STRING:return Jt(typeof t=="string"),t;case le.BOOL:return Jt(typeof t=="boolean"),t;case le.UINT64:case le.FIXED64:case le.INT64:case le.SFIXED64:case le.SINT64:return Jt(typeof t=="bigint"||typeof t=="string"||typeof t=="number"),t.toString();case le.BYTES:return Jt(t instanceof Uint8Array),EA.enc(t)}}var em=Symbol("@bufbuild/protobuf/unknown-fields"),v4={readUnknownFields:!0,readerFactory:r=>new xS(r)},b4={writeUnknownFields:!0,writerFactory:()=>new SS};function Tz(r){return r?Object.assign(Object.assign({},v4),r):v4}function _z(r){return r?Object.assign(Object.assign({},b4),r):b4}function S4(){return{makeReadOptions:Tz,makeWriteOptions:_z,listUnknownFields(r){var t;return(t=r[em])!==null&&t!==void 0?t:[]},discardUnknownFields(r){delete r[em]},writeUnknownFields(r,t){let n=r[em];if(n)for(let o of n)t.tag(o.no,o.wireType).raw(o.data)},onUnknownField(r,t,e,n){let o=r;Array.isArray(o[em])||(o[em]=[]),o[em].push({no:t,wireType:e,data:n})},readMessage(r,t,e,n,o){let i=r.getType(),s=o?t.len:t.pos+e,a,l;for(;t.pos<s&&([a,l]=t.tag(),!(o===!0&&l==Sn.EndGroup));){let d=i.fields.find(a);if(!d){let c=t.skip(l,a);n.readUnknownFields&&this.onUnknownField(r,a,l,c);continue}I4(r,t,d,l,n)}if(o&&(l!=Sn.EndGroup||a!==e))throw new Error("invalid end group tag")},readField:I4,writeMessage(r,t,e){let n=r.getType();for(let o of n.fields.byNumber()){if(!_S(o,r)){if(o.req)throw new Error(`cannot encode field ${n.typeName}.${o.name} to binary: required field not set`);continue}let i=o.oneof?r[o.oneof.localName].value:r[o.localName];y4(o,i,t,e)}return e.writeUnknownFields&&this.writeUnknownFields(r,t),t},writeField(r,t,e,n){t!==void 0&&y4(r,t,e,n)}}}function I4(r,t,e,n,o){let{repeated:i,localName:s}=e;switch(e.oneof&&(r=r[e.oneof.localName],r.case!=s&&delete r.value,r.case=s,s="value"),e.kind){case"scalar":case"enum":let a=e.kind=="enum"?le.INT32:e.T,l=AS;if(e.kind=="scalar"&&e.L>0&&(l=Dz),i){let f=r[s];if(n==Sn.LengthDelimited&&a!=le.STRING&&a!=le.BYTES){let I=t.uint32()+t.pos;for(;t.pos<I;)f.push(l(t,a))}else f.push(l(t,a))}else r[s]=l(t,a);break;case"message":let d=e.T;i?r[s].push(kS(t,new d,o,e)):sr(r[s])?kS(t,r[s],o,e):(r[s]=kS(t,new d,o,e),d.fieldWrapper&&!e.oneof&&!e.repeated&&(r[s]=d.fieldWrapper.unwrapField(r[s])));break;case"map":let[c,u]=Pz(e,t,o);r[s][c]=u;break}}function kS(r,t,e,n){let o=t.getType().runtime.bin,i=n?.delimited;return o.readMessage(t,r,i?n.no:r.uint32(),e,i),t}function Pz(r,t,e){let n=t.uint32(),o=t.pos+n,i,s;for(;t.pos<o;){let[a]=t.tag();switch(a){case 1:i=AS(t,r.K);break;case 2:switch(r.V.kind){case"scalar":s=AS(t,r.V.T);break;case"enum":s=t.int32();break;case"message":s=kS(t,new r.V.T,e,void 0);break}break}}if(i===void 0&&(i=mi(r.K,pi.BIGINT)),typeof i!="string"&&typeof i!="number"&&(i=i.toString()),s===void 0)switch(r.V.kind){case"scalar":s=mi(r.V.T,pi.BIGINT);break;case"enum":s=r.V.T.values[0].no;break;case"message":s=new r.V.T;break}return[i,s]}function Dz(r,t){let e=AS(r,t);return typeof e=="bigint"?e.toString():e}function AS(r,t){switch(t){case le.STRING:return r.string();case le.BOOL:return r.bool();case le.DOUBLE:return r.double();case le.FLOAT:return r.float();case le.INT32:return r.int32();case le.INT64:return r.int64();case le.UINT64:return r.uint64();case le.FIXED64:return r.fixed64();case le.BYTES:return r.bytes();case le.FIXED32:return r.fixed32();case le.SFIXED32:return r.sfixed32();case le.SFIXED64:return r.sfixed64();case le.SINT64:return r.sint64();case le.UINT32:return r.uint32();case le.SINT32:return r.sint32()}}function y4(r,t,e,n){Jt(t!==void 0);let o=r.repeated;switch(r.kind){case"scalar":case"enum":let i=r.kind=="enum"?le.INT32:r.T;if(o)if(Jt(Array.isArray(t)),r.packed)Rz(e,i,r.no,t);else for(let s of t)Ch(e,i,r.no,s);else Ch(e,i,r.no,t);break;case"message":if(o){Jt(Array.isArray(t));for(let s of t)E4(e,n,r,s)}else E4(e,n,r,t);break;case"map":Jt(typeof t=="object"&&t!=null);for(let[s,a]of Object.entries(t))wz(e,n,r,s,a);break}}function wz(r,t,e,n,o){r.tag(e.no,Sn.LengthDelimited),r.fork();let i=n;switch(e.K){case le.INT32:case le.FIXED32:case le.UINT32:case le.SFIXED32:case le.SINT32:i=Number.parseInt(n);break;case le.BOOL:Jt(n=="true"||n=="false"),i=n=="true";break}switch(Ch(r,e.K,1,i),e.V.kind){case"scalar":Ch(r,e.V.T,2,o);break;case"enum":Ch(r,le.INT32,2,o);break;case"message":Jt(o!==void 0),r.tag(2,Sn.LengthDelimited).bytes(o.toBinary(t));break}r.join()}function E4(r,t,e,n){let o=PS(e.T,n);e.delimited?r.tag(e.no,Sn.StartGroup).raw(o.toBinary(t)).tag(e.no,Sn.EndGroup):r.tag(e.no,Sn.LengthDelimited).bytes(o.toBinary(t))}function Ch(r,t,e,n){Jt(n!==void 0);let[o,i]=x4(t);r.tag(e,o)[i](n)}function Rz(r,t,e,n){if(!n.length)return;r.tag(e,Sn.LengthDelimited).fork();let[,o]=x4(t);for(let i=0;i<n.length;i++)r[o](n[i]);r.join()}function x4(r){let t=Sn.Varint;switch(r){case le.BYTES:case le.STRING:t=Sn.LengthDelimited;break;case le.DOUBLE:case le.FIXED64:case le.SFIXED64:t=Sn.Bit64;break;case le.FIXED32:case le.SFIXED32:case le.FLOAT:t=Sn.Bit32;break}let e=le[r].toLowerCase();return[t,e]}function C4(){return{setEnumType:gA,initPartial(r,t){if(r===void 0)return;let e=t.getType();for(let n of e.fields.byMember()){let o=n.localName,i=t,s=r;if(s[o]!=null)switch(n.kind){case"oneof":let a=s[o].case;if(a===void 0)continue;let l=n.findField(a),d=s[o].value;l&&l.kind=="message"&&!sr(d,l.T)?d=new l.T(d):l&&l.kind==="scalar"&&l.T===le.BYTES&&(d=Th(d)),i[o]={case:a,value:d};break;case"scalar":case"enum":let c=s[o];n.T===le.BYTES&&(c=n.repeated?c.map(Th):Th(c)),i[o]=c;break;case"map":switch(n.V.kind){case"scalar":case"enum":if(n.V.T===le.BYTES)for(let[g,I]of Object.entries(s[o]))i[o][g]=Th(I);else Object.assign(i[o],s[o]);break;case"message":let f=n.V.T;for(let g of Object.keys(s[o])){let I=s[o][g];f.fieldWrapper||(I=new f(I)),i[o][g]=I}break}break;case"message":let u=n.T;if(n.repeated)i[o]=s[o].map(f=>sr(f,u)?f:new u(f));else{let f=s[o];u.fieldWrapper?u.typeName==="google.protobuf.BytesValue"?i[o]=Th(f):i[o]=f:i[o]=sr(f,u)?f:new u(f)}break}}},equals(r,t,e){return t===e?!0:!t||!e?!1:r.fields.byMember().every(n=>{let o=t[n.localName],i=e[n.localName];if(n.repeated){if(o.length!==i.length)return!1;switch(n.kind){case"message":return o.every((s,a)=>n.T.equals(s,i[a]));case"scalar":return o.every((s,a)=>ra(n.T,s,i[a]));case"enum":return o.every((s,a)=>ra(le.INT32,s,i[a]))}throw new Error(`repeated cannot contain ${n.kind}`)}switch(n.kind){case"message":let s=o,a=i;return n.T.fieldWrapper&&(s!==void 0&&!sr(s)&&(s=n.T.fieldWrapper.wrapField(s)),a!==void 0&&!sr(a)&&(a=n.T.fieldWrapper.wrapField(a))),n.T.equals(s,a);case"enum":return ra(le.INT32,o,i);case"scalar":return ra(n.T,o,i);case"oneof":if(o.case!==i.case)return!1;let l=n.findField(o.case);if(l===void 0)return!0;switch(l.kind){case"message":return l.T.equals(o.value,i.value);case"enum":return ra(le.INT32,o.value,i.value);case"scalar":return ra(l.T,o.value,i.value)}throw new Error(`oneof cannot contain ${l.kind}`);case"map":let d=Object.keys(o).concat(Object.keys(i));switch(n.V.kind){case"message":let c=n.V.T;return d.every(f=>c.equals(o[f],i[f]));case"enum":return d.every(f=>ra(le.INT32,o[f],i[f]));case"scalar":let u=n.V.T;return d.every(f=>ra(u,o[f],i[f]))}break}})},clone(r){let t=r.getType(),e=new t,n=e;for(let o of t.fields.byMember()){let i=r[o.localName],s;if(o.repeated)s=i.map(OS);else if(o.kind=="map"){s=n[o.localName];for(let[a,l]of Object.entries(i))s[a]=OS(l)}else o.kind=="oneof"?s=o.findField(i.case)?{case:i.case,value:OS(i.value)}:{case:void 0}:s=OS(i);n[o.localName]=s}for(let o of t.runtime.bin.listUnknownFields(r))t.runtime.bin.onUnknownField(n,o.no,o.wireType,o.data);return e}}}function OS(r){if(r===void 0)return r;if(sr(r))return r.clone();if(r instanceof Uint8Array){let t=new Uint8Array(r.byteLength);return t.set(r),t}return r}function Th(r){return r instanceof Uint8Array?r:new Uint8Array(r)}function T4(r,t,e){return{syntax:r,json:h4(),bin:S4(),util:Object.assign(Object.assign({},C4()),{newFieldList:t,initFields:e}),makeMessageType(n,o,i){return t4(this,n,o,i)},makeEnum:ZB,makeEnumType:hA,getEnumType:YB,makeExtension(n,o,i){return a4(this,n,o,i)}}}var LS=class{constructor(t,e){this._fields=t,this._normalizer=e}findJsonName(t){if(!this.jsonNames){let e={};for(let n of this.list())e[n.jsonName]=e[n.name]=n;this.jsonNames=e}return this.jsonNames[t]}find(t){if(!this.numbers){let e={};for(let n of this.list())e[n.no]=n;this.numbers=e}return this.numbers[t]}list(){return this.all||(this.all=this._normalizer(this._fields)),this.all}byNumber(){return this.numbersAsc||(this.numbersAsc=this.list().concat().sort((t,e)=>t.no-e.no)),this.numbersAsc}byMember(){if(!this.members){this.members=[];let t=this.members,e;for(let n of this.list())n.oneof?n.oneof!==e&&(e=n.oneof,t.push(e)):t.push(n)}return this.members}};function _A(r,t){let e=D4(r);return t?e:Lz(Oz(e))}function _4(r){return _A(r,!1)}var P4=D4;function D4(r){let t=!1,e=[];for(let n=0;n<r.length;n++){let o=r.charAt(n);switch(o){case"_":t=!0;break;case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":e.push(o),t=!1;break;default:t&&(t=!1,o=o.toUpperCase()),e.push(o);break}}return e.join("")}var kz=new Set(["constructor","toString","toJSON","valueOf"]),Az=new Set(["getType","clone","equals","fromBinary","fromJson","fromJsonString","toBinary","toJson","toJsonString","toObject"]),w4=r=>`${r}$`,Oz=r=>Az.has(r)?w4(r):r,Lz=r=>kz.has(r)?w4(r):r;var MS=class{constructor(t){this.kind="oneof",this.repeated=!1,this.packed=!1,this.opt=!1,this.req=!1,this.default=void 0,this.fields=[],this.name=t,this.localName=_4(t)}addField(t){Jt(t.oneof===this,`field ${t.name} not one of ${this.name}`),this.fields.push(t)}findField(t){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[t]}};function R4(r,t){var e,n,o,i,s,a;let l=[],d;for(let c of typeof r=="function"?r():r){let u=c;if(u.localName=_A(c.name,c.oneof!==void 0),u.jsonName=(e=c.jsonName)!==null&&e!==void 0?e:P4(c.name),u.repeated=(n=c.repeated)!==null&&n!==void 0?n:!1,c.kind=="scalar"&&(u.L=(o=c.L)!==null&&o!==void 0?o:pi.BIGINT),u.delimited=(i=c.delimited)!==null&&i!==void 0?i:!1,u.req=(s=c.req)!==null&&s!==void 0?s:!1,u.opt=(a=c.opt)!==null&&a!==void 0?a:!1,c.packed===void 0&&(t?u.packed=c.kind=="enum"||c.kind=="scalar"&&c.T!=le.BYTES&&c.T!=le.STRING:u.packed=!1),c.oneof!==void 0){let f=typeof c.oneof=="string"?c.oneof:c.oneof.name;(!d||d.name!=f)&&(d=new MS(f)),u.oneof=d,d.addField(u)}l.push(u)}return l}var m=T4("proto3",r=>new LS(r,t=>R4(t,!0)),r=>{for(let t of r.getType().fields.byMember()){if(t.opt)continue;let e=t.localName,n=r;if(t.repeated){n[e]=[];continue}switch(t.kind){case"oneof":n[e]={case:void 0};break;case"enum":n[e]=0;break;case"map":n[e]={};break;case"scalar":n[e]=mi(t.T,t.L);break;case"message":break}}});var Ve=class r extends M{constructor(t){super(),this.seconds=ne.zero,this.nanos=0,m.util.initPartial(t,this)}fromJson(t,e){if(typeof t!="string")throw new Error(`cannot decode google.protobuf.Timestamp from JSON: ${m.json.debug(t)}`);let n=t.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(!n)throw new Error("cannot decode google.protobuf.Timestamp from JSON: invalid RFC 3339 string");let o=Date.parse(n[1]+"-"+n[2]+"-"+n[3]+"T"+n[4]+":"+n[5]+":"+n[6]+(n[8]?n[8]:"Z"));if(Number.isNaN(o))throw new Error("cannot decode google.protobuf.Timestamp from JSON: invalid RFC 3339 string");if(o<Date.parse("0001-01-01T00:00:00Z")||o>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");return this.seconds=ne.parse(o/1e3),this.nanos=0,n[7]&&(this.nanos=parseInt("1"+n[7]+"0".repeat(9-n[7].length))-1e9),this}toJson(t){let e=Number(this.seconds)*1e3;if(e<Date.parse("0001-01-01T00:00:00Z")||e>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 n="Z";if(this.nanos>0){let o=(this.nanos+1e9).toString().substring(1);o.substring(3)==="000000"?n="."+o.substring(0,3)+"Z":o.substring(6)==="000"?n="."+o.substring(0,6)+"Z":n="."+o+"Z"}return new Date(e).toISOString().replace(".000Z",n)}toDate(){return new Date(Number(this.seconds)*1e3+Math.ceil(this.nanos/1e6))}static now(){return r.fromDate(new Date)}static fromDate(t){let e=t.getTime();return new r({seconds:ne.parse(Math.floor(e/1e3)),nanos:e%1e3*1e6})}static fromBinary(t,e){return new r().fromBinary(t,e)}static fromJson(t,e){return new r().fromJson(t,e)}static fromJsonString(t,e){return new r().fromJsonString(t,e)}static equals(t,e){return m.util.equals(r,t,e)}};Ve.runtime=m;Ve.typeName="google.protobuf.Timestamp";Ve.fields=m.util.newFieldList(()=>[{no:1,name:"seconds",kind:"scalar",T:3},{no:2,name:"nanos",kind:"scalar",T:5}]);var bc=class r extends M{constructor(t){super(),this.seconds=ne.zero,this.nanos=0,m.util.initPartial(t,this)}fromJson(t,e){if(typeof t!="string")throw new Error(`cannot decode google.protobuf.Duration from JSON: ${m.json.debug(t)}`);let n=t.match(/^(-?[0-9]+)(?:\.([0-9]+))?s/);if(n===null)throw new Error(`cannot decode google.protobuf.Duration from JSON: ${m.json.debug(t)}`);let o=Number(n[1]);if(o>315576e6||o<-315576e6)throw new Error(`cannot decode google.protobuf.Duration from JSON: ${m.json.debug(t)}`);if(this.seconds=ne.parse(o),typeof n[2]=="string"){let i=n[2]+"0".repeat(9-n[2].length);this.nanos=parseInt(i),(o<0||Object.is(o,-0))&&(this.nanos=-this.nanos)}return this}toJson(t){if(Number(this.seconds)>315576e6||Number(this.seconds)<-315576e6)throw new Error("cannot encode google.protobuf.Duration to JSON: value out of range");let e=this.seconds.toString();if(this.nanos!==0){let n=Math.abs(this.nanos).toString();n="0".repeat(9-n.length)+n,n.substring(3)==="000000"?n=n.substring(0,3):n.substring(6)==="000"&&(n=n.substring(0,6)),e+="."+n,this.nanos<0&&Number(this.seconds)==0&&(e="-"+e)}return e+"s"}static fromBinary(t,e){return new r().fromBinary(t,e)}static fromJson(t,e){return new r().fromJson(t,e)}static fromJsonString(t,e){return new r().fromJsonString(t,e)}static equals(t,e){return m.util.equals(r,t,e)}};bc.runtime=m;bc.typeName="google.protobuf.Duration";bc.fields=m.util.newFieldList(()=>[{no:1,name:"seconds",kind:"scalar",T:3},{no:2,name:"nanos",kind:"scalar",T:5}]);var cW=(f=>(f[f.UNSPECIFIED=0]="UNSPECIFIED",f[f.AUTOCOMPLETE=1]="AUTOCOMPLETE",f[f.CHAT=2]="CHAT",f[f.COMMAND_GENERATE=4]="COMMAND_GENERATE",f[f.COMMAND_EDIT=5]="COMMAND_EDIT",f[f.SUPERCOMPLETE=6]="SUPERCOMPLETE",f[f.COMMAND_PLAN=7]="COMMAND_PLAN",f[f.QUERY=8]="QUERY",f[f.FAST_APPLY=9]="FAST_APPLY",f[f.COMMAND_TERMINAL=10]="COMMAND_TERMINAL",f[f.TAB_JUMP=11]="TAB_JUMP",f[f.CASCADE=12]="CASCADE",f))(cW||{});m.util.setEnumType(cW,"exa.codeium_common_pb.ProviderSource",[{no:0,name:"PROVIDER_SOURCE_UNSPECIFIED"},{no:1,name:"PROVIDER_SOURCE_AUTOCOMPLETE"},{no:2,name:"PROVIDER_SOURCE_CHAT"},{no:4,name:"PROVIDER_SOURCE_COMMAND_GENERATE"},{no:5,name:"PROVIDER_SOURCE_COMMAND_EDIT"},{no:6,name:"PROVIDER_SOURCE_SUPERCOMPLETE"},{no:7,name:"PROVIDER_SOURCE_COMMAND_PLAN"},{no:8,name:"PROVIDER_SOURCE_QUERY"},{no:9,name:"PROVIDER_SOURCE_FAST_APPLY"},{no:10,name:"PROVIDER_SOURCE_COMMAND_TERMINAL"},{no:11,name:"PROVIDER_SOURCE_TAB_JUMP"},{no:12,name:"PROVIDER_SOURCE_CASCADE"}]);var YS=(I=>(I[I.UNSPECIFIED=0]="UNSPECIFIED",I[I.FILE_MARKER=2]="FILE_MARKER",I[I.OTHER_DOCUMENT=4]="OTHER_DOCUMENT",I[I.BEFORE_CURSOR=5]="BEFORE_CURSOR",I[I.AFTER_CURSOR=7]="AFTER_CURSOR",I[I.FIM=8]="FIM",I[I.SOT=9]="SOT",I[I.EOT=10]="EOT",I[I.CODE_CONTEXT_ITEM=13]="CODE_CONTEXT_ITEM",I[I.INSTRUCTION=14]="INSTRUCTION",I[I.SELECTION=15]="SELECTION",I[I.TRAJECTORY_STEP=16]="TRAJECTORY_STEP",I[I.ACTIVE_DOCUMENT=17]="ACTIVE_DOCUMENT",I[I.CACHED_MESSAGE=18]="CACHED_MESSAGE",I))(YS||{});m.util.setEnumType(YS,"exa.codeium_common_pb.PromptElementKind",[{no:0,name:"PROMPT_ELEMENT_KIND_UNSPECIFIED"},{no:2,name:"PROMPT_ELEMENT_KIND_FILE_MARKER"},{no:4,name:"PROMPT_ELEMENT_KIND_OTHER_DOCUMENT"},{no:5,name:"PROMPT_ELEMENT_KIND_BEFORE_CURSOR"},{no:7,name:"PROMPT_ELEMENT_KIND_AFTER_CURSOR"},{no:8,name:"PROMPT_ELEMENT_KIND_FIM"},{no:9,name:"PROMPT_ELEMENT_KIND_SOT"},{no:10,name:"PROMPT_ELEMENT_KIND_EOT"},{no:13,name:"PROMPT_ELEMENT_KIND_CODE_CONTEXT_ITEM"},{no:14,name:"PROMPT_ELEMENT_KIND_INSTRUCTION"},{no:15,name:"PROMPT_ELEMENT_KIND_SELECTION"},{no:16,name:"PROMPT_ELEMENT_KIND_TRAJECTORY_STEP"},{no:17,name:"PROMPT_ELEMENT_KIND_ACTIVE_DOCUMENT"},{no:18,name:"PROMPT_ELEMENT_KIND_CACHED_MESSAGE"}]);var M1=(n=>(n[n.UNSPECIFIED=0]="UNSPECIFIED",n[n.COPY=1]="COPY",n[n.PROMPT_CACHE=2]="PROMPT_CACHE",n))(M1||{});m.util.setEnumType(M1,"exa.codeium_common_pb.PromptAnnotationKind",[{no:0,name:"PROMPT_ANNOTATION_KIND_UNSPECIFIED"},{no:1,name:"PROMPT_ANNOTATION_KIND_COPY"},{no:2,name:"PROMPT_ANNOTATION_KIND_PROMPT_CACHE"}]);var tm=(T=>(T[T.UNSPECIFIED=0]="UNSPECIFIED",T[T.USE_INTERNAL_CHAT_MODEL=36]="USE_INTERNAL_CHAT_MODEL",T[T.RECORD_FILES=47]="RECORD_FILES",T[T.NO_SAMPLER_EARLY_STOP=48]="NO_SAMPLER_EARLY_STOP",T[T.CM_MEMORY_TELEMETRY=53]="CM_MEMORY_TELEMETRY",T[T.LANGUAGE_SERVER_VERSION=55]="LANGUAGE_SERVER_VERSION",T[T.LANGUAGE_SERVER_AUTO_RELOAD=56]="LANGUAGE_SERVER_AUTO_RELOAD",T[T.ONLY_MULTILINE=60]="ONLY_MULTILINE",T[T.USE_AUTOCOMPLETE_MODEL=64]="USE_AUTOCOMPLETE_MODEL",T[T.USE_ATTRIBUTION_FOR_INDIVIDUAL_TIER=68]="USE_ATTRIBUTION_FOR_INDIVIDUAL_TIER",T[T.CHAT_MODEL_CONFIG=78]="CHAT_MODEL_CONFIG",T[T.COMMAND_MODEL_CONFIG=79]="COMMAND_MODEL_CONFIG",T[T.MIN_IDE_VERSION=81]="MIN_IDE_VERSION",T[T.API_SERVER_VERBOSE_ERRORS=84]="API_SERVER_VERBOSE_ERRORS",T[T.DEFAULT_ENABLE_SEARCH=86]="DEFAULT_ENABLE_SEARCH",T[T.COLLECT_ONBOARDING_EVENTS=87]="COLLECT_ONBOARDING_EVENTS",T[T.COLLECT_EXAMPLE_COMPLETIONS=88]="COLLECT_EXAMPLE_COMPLETIONS",T[T.USE_MULTILINE_MODEL=89]="USE_MULTILINE_MODEL",T[T.ATTRIBUTION_KILL_SWITCH=92]="ATTRIBUTION_KILL_SWITCH",T[T.FAST_MULTILINE=94]="FAST_MULTILINE",T[T.SINGLE_COMPLETION=95]="SINGLE_COMPLETION",T[T.STOP_FIRST_NON_WHITESPACE_LINE=96]="STOP_FIRST_NON_WHITESPACE_LINE",T[T.CORTEX_CONFIG=102]="CORTEX_CONFIG",T[T.MODEL_CHAT_11121_VARIANTS=103]="MODEL_CHAT_11121_VARIANTS",T[T.INCLUDE_PROMPT_COMPONENTS=105]="INCLUDE_PROMPT_COMPONENTS",T[T.NON_TEAMS_KILL_SWITCH=106]="NON_TEAMS_KILL_SWITCH",T[T.PERSIST_CODE_TRACKER=108]="PERSIST_CODE_TRACKER",T[T.CHAT_COMPLETION_TOKENS_SOFT_LIMIT=114]="CHAT_COMPLETION_TOKENS_SOFT_LIMIT",T[T.CHAT_TOKENS_SOFT_LIMIT=115]="CHAT_TOKENS_SOFT_LIMIT",T[T.DISABLE_COMPLETIONS_CACHE=118]="DISABLE_COMPLETIONS_CACHE",T[T.LLAMA3_405B_KILL_SWITCH=119]="LLAMA3_405B_KILL_SWITCH",T[T.USE_COMMAND_DOCSTRING_GENERATION=121]="USE_COMMAND_DOCSTRING_GENERATION",T[T.ENABLE_SUPERCOMPLETE=123]="ENABLE_SUPERCOMPLETE",T[T.SENTRY=136]="SENTRY",T[T.FAST_SINGLELINE=144]="FAST_SINGLELINE",T[T.R2_LANGUAGE_SERVER_DOWNLOAD=147]="R2_LANGUAGE_SERVER_DOWNLOAD",T[T.SPLIT_MODEL=152]="SPLIT_MODEL",T[T.WINDSURF_SENTRY_SAMPLE_RATE=198]="WINDSURF_SENTRY_SAMPLE_RATE",T[T.API_SERVER_CUTOFF=158]="API_SERVER_CUTOFF",T[T.FAST_SPEED_KILL_SWITCH=159]="FAST_SPEED_KILL_SWITCH",T[T.PREDICTIVE_MULTILINE=160]="PREDICTIVE_MULTILINE",T[T.SUPERCOMPLETE_FILTER_REVERT=125]="SUPERCOMPLETE_FILTER_REVERT",T[T.SUPERCOMPLETE_FILTER_PREFIX_MATCH=126]="SUPERCOMPLETE_FILTER_PREFIX_MATCH",T[T.SUPERCOMPLETE_FILTER_SCORE_THRESHOLD=127]="SUPERCOMPLETE_FILTER_SCORE_THRESHOLD",T[T.SUPERCOMPLETE_FILTER_INSERTION_CAP=128]="SUPERCOMPLETE_FILTER_INSERTION_CAP",T[T.SUPERCOMPLETE_FILTER_DELETION_CAP=133]="SUPERCOMPLETE_FILTER_DELETION_CAP",T[T.SUPERCOMPLETE_FILTER_WHITESPACE_ONLY=156]="SUPERCOMPLETE_FILTER_WHITESPACE_ONLY",T[T.SUPERCOMPLETE_FILTER_NO_OP=170]="SUPERCOMPLETE_FILTER_NO_OP",T[T.SUPERCOMPLETE_FILTER_SUFFIX_MATCH=176]="SUPERCOMPLETE_FILTER_SUFFIX_MATCH",T[T.SUPERCOMPLETE_FILTER_PREVIOUSLY_SHOWN=182]="SUPERCOMPLETE_FILTER_PREVIOUSLY_SHOWN",T[T.SUPERCOMPLETE_MIN_SCORE=129]="SUPERCOMPLETE_MIN_SCORE",T[T.SUPERCOMPLETE_MAX_INSERTIONS=130]="SUPERCOMPLETE_MAX_INSERTIONS",T[T.SUPERCOMPLETE_LINE_RADIUS=131]="SUPERCOMPLETE_LINE_RADIUS",T[T.SUPERCOMPLETE_MAX_DELETIONS=132]="SUPERCOMPLETE_MAX_DELETIONS",T[T.SUPERCOMPLETE_RECENT_STEPS_DURATION=138]="SUPERCOMPLETE_RECENT_STEPS_DURATION",T[T.SUPERCOMPLETE_MAX_TRAJECTORY_STEPS=154]="SUPERCOMPLETE_MAX_TRAJECTORY_STEPS",T[T.SUPERCOMPLETE_MAX_TRAJECTORY_STEP_SIZE=203]="SUPERCOMPLETE_MAX_TRAJECTORY_STEP_SIZE",T[T.SUPERCOMPLETE_DISABLE_TYPING_CACHE=231]="SUPERCOMPLETE_DISABLE_TYPING_CACHE",T[T.SUPERCOMPLETE_ALWAYS_USE_CACHE_ON_EQUAL_STATE=293]="SUPERCOMPLETE_ALWAYS_USE_CACHE_ON_EQUAL_STATE",T[T.SUPERCOMPLETE_CACHE_ON_PARENT_ID_KILL_SWITCH=297]="SUPERCOMPLETE_CACHE_ON_PARENT_ID_KILL_SWITCH",T[T.SUPERCOMPLETE_PRUNE_RESPONSE=140]="SUPERCOMPLETE_PRUNE_RESPONSE",T[T.SUPERCOMPLETE_PRUNE_MAX_INSERT_DELETE_LINE_DELTA=141]="SUPERCOMPLETE_PRUNE_MAX_INSERT_DELETE_LINE_DELTA",T[T.SUPERCOMPLETE_MODEL_CONFIG=145]="SUPERCOMPLETE_MODEL_CONFIG",T[T.SUPERCOMPLETE_MODEL_CONFIG_LOW=330]="SUPERCOMPLETE_MODEL_CONFIG_LOW",T[T.SUPERCOMPLETE_MODEL_CONFIG_HIGH=331]="SUPERCOMPLETE_MODEL_CONFIG_HIGH",T[T.SUPERCOMPLETE_ON_TAB=151]="SUPERCOMPLETE_ON_TAB",T[T.SUPERCOMPLETE_INLINE_PURE_DELETE=171]="SUPERCOMPLETE_INLINE_PURE_DELETE",T[T.SUPERCOMPLETE_INLINE_RICH_GHOST_TEXT_INSERTIONS=218]="SUPERCOMPLETE_INLINE_RICH_GHOST_TEXT_INSERTIONS",T[T.MODEL_CHAT_19821_VARIANTS=308]="MODEL_CHAT_19821_VARIANTS",T[T.SUPERCOMPLETE_MAX_CONCURRENT_REQUESTS=284]="SUPERCOMPLETE_MAX_CONCURRENT_REQUESTS",T[T.COMMAND_PROMPT_CACHE_CONFIG=255]="COMMAND_PROMPT_CACHE_CONFIG",T[T.CUMULATIVE_PROMPT_CONFIG=256]="CUMULATIVE_PROMPT_CONFIG",T[T.CUMULATIVE_PROMPT_CASCADE_CONFIG=279]="CUMULATIVE_PROMPT_CASCADE_CONFIG",T[T.TAB_JUMP_CUMULATIVE_PROMPT_CONFIG=301]="TAB_JUMP_CUMULATIVE_PROMPT_CONFIG",T[T.COMPLETION_SPEED_SUPERCOMPLETE_CACHE=207]="COMPLETION_SPEED_SUPERCOMPLETE_CACHE",T[T.COMPLETION_SPEED_PREDICTIVE_SUPERCOMPLETE=208]="COMPLETION_SPEED_PREDICTIVE_SUPERCOMPLETE",T[T.COMPLETION_SPEED_TAB_JUMP_CACHE=209]="COMPLETION_SPEED_TAB_JUMP_CACHE",T[T.COMPLETION_SPEED_PREDICTIVE_TAB_JUMP=210]="COMPLETION_SPEED_PREDICTIVE_TAB_JUMP",T[T.COMPLETION_SPEED_BLOCK_TAB_JUMP_ON_PREDICTIVE_SUPERCOMPLETE=294]="COMPLETION_SPEED_BLOCK_TAB_JUMP_ON_PREDICTIVE_SUPERCOMPLETE",T[T.JETBRAINS_ENABLE_ONBOARDING=137]="JETBRAINS_ENABLE_ONBOARDING",T[T.ENABLE_AUTOCOMPLETE_DURING_INTELLISENSE=146]="ENABLE_AUTOCOMPLETE_DURING_INTELLISENSE",T[T.COMMAND_BOX_ON_TOP=155]="COMMAND_BOX_ON_TOP",T[T.CONTEXT_ACTIVE_DOCUMENT_FRACTION=149]="CONTEXT_ACTIVE_DOCUMENT_FRACTION",T[T.CONTEXT_FORCE_LOCAL_CONTEXT=178]="CONTEXT_FORCE_LOCAL_CONTEXT",T[T.CROSS_SELL_EXTENSION_DOWNLOAD_WINDSURF=220]="CROSS_SELL_EXTENSION_DOWNLOAD_WINDSURF",T[T.MODEL_LLAMA_3_1_70B_INSTRUCT_LONG_CONTEXT_VARIANTS=295]="MODEL_LLAMA_3_1_70B_INSTRUCT_LONG_CONTEXT_VARIANTS",T[T.USE_AUTOCOMPLETE_MODEL_SERVER_SIDE=163]="USE_AUTOCOMPLETE_MODEL_SERVER_SIDE",T[T.SUPERCOMPLETE_NO_CONTEXT=165]="SUPERCOMPLETE_NO_CONTEXT",T[T.SUPERCOMPLETE_NO_ACTIVE_NODE=166]="SUPERCOMPLETE_NO_ACTIVE_NODE",T[T.TAB_JUMP_ENABLED=168]="TAB_JUMP_ENABLED",T[T.TAB_JUMP_ACCEPT_ENABLED=169]="TAB_JUMP_ACCEPT_ENABLED",T[T.TAB_JUMP_LINE_RADIUS=177]="TAB_JUMP_LINE_RADIUS",T[T.TAB_JUMP_MIN_FILTER_RADIUS=197]="TAB_JUMP_MIN_FILTER_RADIUS",T[T.TAB_JUMP_ON_ACCEPT_ONLY=205]="TAB_JUMP_ON_ACCEPT_ONLY",T[T.TAB_JUMP_FILTER_IN_SELECTION=215]="TAB_JUMP_FILTER_IN_SELECTION",T[T.TAB_JUMP_MODEL_CONFIG=237]="TAB_JUMP_MODEL_CONFIG",T[T.TAB_JUMP_FILTER_NO_OP=238]="TAB_JUMP_FILTER_NO_OP",T[T.TAB_JUMP_FILTER_REVERT=239]="TAB_JUMP_FILTER_REVERT",T[T.TAB_JUMP_FILTER_SCORE_THRESHOLD=240]="TAB_JUMP_FILTER_SCORE_THRESHOLD",T[T.TAB_JUMP_FILTER_WHITESPACE_ONLY=241]="TAB_JUMP_FILTER_WHITESPACE_ONLY",T[T.TAB_JUMP_FILTER_INSERTION_CAP=242]="TAB_JUMP_FILTER_INSERTION_CAP",T[T.TAB_JUMP_FILTER_DELETION_CAP=243]="TAB_JUMP_FILTER_DELETION_CAP",T[T.TAB_JUMP_PRUNE_RESPONSE=260]="TAB_JUMP_PRUNE_RESPONSE",T[T.TAB_JUMP_PRUNE_MAX_INSERT_DELETE_LINE_DELTA=261]="TAB_JUMP_PRUNE_MAX_INSERT_DELETE_LINE_DELTA",T[T.TAB_JUMP_STOP_TOKEN_MIDSTREAM=317]="TAB_JUMP_STOP_TOKEN_MIDSTREAM",T[T.VIEWED_FILE_TRACKER_CONFIG=211]="VIEWED_FILE_TRACKER_CONFIG",T[T.SNAPSHOT_TO_STEP_OPTIONS_OVERRIDE=305]="SNAPSHOT_TO_STEP_OPTIONS_OVERRIDE",T[T.STREAMING_EXTERNAL_COMMAND=172]="STREAMING_EXTERNAL_COMMAND",T[T.USE_SPECIAL_EDIT_CODE_BLOCK=179]="USE_SPECIAL_EDIT_CODE_BLOCK",T[T.ENABLE_SUGGESTED_RESPONSES=187]="ENABLE_SUGGESTED_RESPONSES",T[T.CASCADE_BASE_MODEL_ID=190]="CASCADE_BASE_MODEL_ID",T[T.CASCADE_PLAN_BASED_CONFIG_OVERRIDE=266]="CASCADE_PLAN_BASED_CONFIG_OVERRIDE",T[T.CASCADE_GLOBAL_CONFIG_OVERRIDE=212]="CASCADE_GLOBAL_CONFIG_OVERRIDE",T[T.CASCADE_BACKGROUND_RESEARCH_CONFIG_OVERRIDE=193]="CASCADE_BACKGROUND_RESEARCH_CONFIG_OVERRIDE",T[T.CASCADE_ENFORCE_QUOTA=204]="CASCADE_ENFORCE_QUOTA",T[T.CASCADE_ENABLE_AUTOMATED_MEMORIES=224]="CASCADE_ENABLE_AUTOMATED_MEMORIES",T[T.CASCADE_MEMORY_CONFIG_OVERRIDE=314]="CASCADE_MEMORY_CONFIG_OVERRIDE",T[T.CASCADE_USE_REPLACE_CONTENT_EDIT_TOOL=228]="CASCADE_USE_REPLACE_CONTENT_EDIT_TOOL",T[T.CASCADE_VIEW_FILE_TOOL_CONFIG_OVERRIDE=258]="CASCADE_VIEW_FILE_TOOL_CONFIG_OVERRIDE",T[T.CASCADE_USE_EXPERIMENT_CHECKPOINTER=247]="CASCADE_USE_EXPERIMENT_CHECKPOINTER",T[T.CASCADE_ENABLE_MCP_TOOLS=245]="CASCADE_ENABLE_MCP_TOOLS",T[T.CASCADE_AUTO_FIX_LINTS=275]="CASCADE_AUTO_FIX_LINTS",T[T.USE_ANTHROPIC_TOKEN_EFFICIENT_TOOLS_BETA=296]="USE_ANTHROPIC_TOKEN_EFFICIENT_TOOLS_BETA",T[T.CASCADE_USER_MEMORIES_IN_SYS_PROMPT=289]="CASCADE_USER_MEMORIES_IN_SYS_PROMPT",T[T.CASCADE_ENABLE_PROXY_WEB_SERVER=290]="CASCADE_ENABLE_PROXY_WEB_SERVER",T[T.COLLAPSE_ASSISTANT_MESSAGES=312]="COLLAPSE_ASSISTANT_MESSAGES",T[T.CASCADE_DEFAULT_MODEL_OVERRIDE=321]="CASCADE_DEFAULT_MODEL_OVERRIDE",T[T.ENABLE_SMART_COPY=181]="ENABLE_SMART_COPY",T[T.ENABLE_COMMIT_MESSAGE_GENERATION=185]="ENABLE_COMMIT_MESSAGE_GENERATION",T[T.SKIP_CONSISTENCY_MANAGER=194]="SKIP_CONSISTENCY_MANAGER",T[T.FIREWORKS_ON_DEMAND_DEPLOYMENT=276]="FIREWORKS_ON_DEMAND_DEPLOYMENT",T[T.API_SERVER_CLIENT_USE_HTTP_2=202]="API_SERVER_CLIENT_USE_HTTP_2",T[T.AUTOCOMPLETE_DEFAULT_DEBOUNCE_MS=213]="AUTOCOMPLETE_DEFAULT_DEBOUNCE_MS",T[T.AUTOCOMPLETE_FAST_DEBOUNCE_MS=214]="AUTOCOMPLETE_FAST_DEBOUNCE_MS",T[T.PROFILING_TELEMETRY_SAMPLE_RATE=219]="PROFILING_TELEMETRY_SAMPLE_RATE",T[T.STREAM_USER_SHELL_COMMANDS=225]="STREAM_USER_SHELL_COMMANDS",T[T.API_SERVER_PROMPT_CACHE_REPLICAS=307]="API_SERVER_PROMPT_CACHE_REPLICAS",T[T.API_SERVER_ENABLE_MORE_LOGGING=272]="API_SERVER_ENABLE_MORE_LOGGING",T[T.COMMAND_INJECT_USER_MEMORIES=233]="COMMAND_INJECT_USER_MEMORIES",T[T.AUTOCOMPLETE_HIDDEN_ERROR_REGEX=234]="AUTOCOMPLETE_HIDDEN_ERROR_REGEX",T[T.DISABLE_IDE_COMPLETIONS_DEBOUNCE=278]="DISABLE_IDE_COMPLETIONS_DEBOUNCE",T[T.ENABLE_QUICK_ACTIONS=250]="ENABLE_QUICK_ACTIONS",T[T.QUICK_ACTIONS_WHITELIST_REGEX=251]="QUICK_ACTIONS_WHITELIST_REGEX",T[T.CASCADE_NEW_MODELS_NUX=259]="CASCADE_NEW_MODELS_NUX",T[T.CASCADE_NEW_WAVE_2_MODELS_NUX=270]="CASCADE_NEW_WAVE_2_MODELS_NUX",T[T.SUPERCOMPLETE_FAST_DEBOUNCE=262]="SUPERCOMPLETE_FAST_DEBOUNCE",T[T.SUPERCOMPLETE_REGULAR_DEBOUNCE=263]="SUPERCOMPLETE_REGULAR_DEBOUNCE",T[T.XML_TOOL_PARSING_MODELS=268]="XML_TOOL_PARSING_MODELS",T[T.SUPERCOMPLETE_DONT_FILTER_MID_STREAMED=269]="SUPERCOMPLETE_DONT_FILTER_MID_STREAMED",T[T.ANNOYANCE_MANAGER_MAX_NAVIGATION_RENDERS=285]="ANNOYANCE_MANAGER_MAX_NAVIGATION_RENDERS",T[T.ANNOYANCE_MANAGER_INLINE_PREVENTION_THRESHOLD_MS=286]="ANNOYANCE_MANAGER_INLINE_PREVENTION_THRESHOLD_MS",T[T.ANNOYANCE_MANAGER_INLINE_PREVENTION_MAX_INTENTIONAL_REJECTIONS=287]="ANNOYANCE_MANAGER_INLINE_PREVENTION_MAX_INTENTIONAL_REJECTIONS",T[T.ANNOYANCE_MANAGER_INLINE_PREVENTION_MAX_AUTO_REJECTIONS=288]="ANNOYANCE_MANAGER_INLINE_PREVENTION_MAX_AUTO_REJECTIONS",T[T.USE_CUSTOM_CHARACTER_DIFF=292]="USE_CUSTOM_CHARACTER_DIFF",T[T.FORCE_NON_OPTIMIZED_DIFF=298]="FORCE_NON_OPTIMIZED_DIFF",T[T.CASCADE_WEB_APP_DEPLOYMENTS_ENABLED=300]="CASCADE_WEB_APP_DEPLOYMENTS_ENABLED",T[T.CASCADE_RECIPES_AT_MENTION_VISIBILITY=316]="CASCADE_RECIPES_AT_MENTION_VISIBILITY",T[T.IMPLICIT_USES_CLIPBOARD=310]="IMPLICIT_USES_CLIPBOARD",T[T.DISABLE_SUPERCOMPLETE_PCW=303]="DISABLE_SUPERCOMPLETE_PCW",T[T.BLOCK_TAB_ON_SHOWN_AUTOCOMPLETE=304]="BLOCK_TAB_ON_SHOWN_AUTOCOMPLETE",T[T.CASCADE_WEB_SEARCH_NUX=311]="CASCADE_WEB_SEARCH_NUX",T[T.MODEL_NOTIFICATIONS=319]="MODEL_NOTIFICATIONS",T[T.MODEL_SELECTOR_NUX_COPY=320]="MODEL_SELECTOR_NUX_COPY",T[T.CASCADE_TOOL_CALL_PRICING_NUX=322]="CASCADE_TOOL_CALL_PRICING_NUX",T[T.CASCADE_PLUGINS_TAB=323]="CASCADE_PLUGINS_TAB",T[T.WAVE_8_RULES_ENABLED=324]="WAVE_8_RULES_ENABLED",T[T.WAVE_8_KNOWLEDGE_ENABLED=325]="WAVE_8_KNOWLEDGE_ENABLED",T[T.CASCADE_ONBOARDING=326]="CASCADE_ONBOARDING",T[T.CASCADE_ONBOARDING_REVERT=327]="CASCADE_ONBOARDING_REVERT",T[T.CASCADE_WINDSURF_BROWSER_TOOLS_ENABLED=328]="CASCADE_WINDSURF_BROWSER_TOOLS_ENABLED",T[T.CASCADE_MODEL_HEADER_WARNING=329]="CASCADE_MODEL_HEADER_WARNING",T[T.TEST_ONLY=999]="TEST_ONLY",T))(tm||{});m.util.setEnumType(tm,"exa.codeium_common_pb.ExperimentKey",[{no:0,name:"UNSPECIFIED"},{no:36,name:"USE_INTERNAL_CHAT_MODEL"},{no:47,name:"RECORD_FILES"},{no:48,name:"NO_SAMPLER_EARLY_STOP"},{no:53,name:"CM_MEMORY_TELEMETRY"},{no:55,name:"LANGUAGE_SERVER_VERSION"},{no:56,name:"LANGUAGE_SERVER_AUTO_RELOAD"},{no:60,name:"ONLY_MULTILINE"},{no:64,name:"USE_AUTOCOMPLETE_MODEL"},{no:68,name:"USE_ATTRIBUTION_FOR_INDIVIDUAL_TIER"},{no:78,name:"CHAT_MODEL_CONFIG"},{no:79,name:"COMMAND_MODEL_CONFIG"},{no:81,name:"MIN_IDE_VERSION"},{no:84,name:"API_SERVER_VERBOSE_ERRORS"},{no:86,name:"DEFAULT_ENABLE_SEARCH"},{no:87,name:"COLLECT_ONBOARDING_EVENTS"},{no:88,name:"COLLECT_EXAMPLE_COMPLETIONS"},{no:89,name:"USE_MULTILINE_MODEL"},{no:92,name:"ATTRIBUTION_KILL_SWITCH"},{no:94,name:"FAST_MULTILINE"},{no:95,name:"SINGLE_COMPLETION"},{no:96,name:"STOP_FIRST_NON_WHITESPACE_LINE"},{no:102,name:"CORTEX_CONFIG"},{no:103,name:"MODEL_CHAT_11121_VARIANTS"},{no:105,name:"INCLUDE_PROMPT_COMPONENTS"},{no:106,name:"NON_TEAMS_KILL_SWITCH"},{no:108,name:"PERSIST_CODE_TRACKER"},{no:114,name:"CHAT_COMPLETION_TOKENS_SOFT_LIMIT"},{no:115,name:"CHAT_TOKENS_SOFT_LIMIT"},{no:118,name:"DISABLE_COMPLETIONS_CACHE"},{no:119,name:"LLAMA3_405B_KILL_SWITCH"},{no:121,name:"USE_COMMAND_DOCSTRING_GENERATION"},{no:123,name:"ENABLE_SUPERCOMPLETE"},{no:136,name:"SENTRY"},{no:144,name:"FAST_SINGLELINE"},{no:147,name:"R2_LANGUAGE_SERVER_DOWNLOAD"},{no:152,name:"SPLIT_MODEL"},{no:198,name:"WINDSURF_SENTRY_SAMPLE_RATE"},{no:158,name:"API_SERVER_CUTOFF"},{no:159,name:"FAST_SPEED_KILL_SWITCH"},{no:160,name:"PREDICTIVE_MULTILINE"},{no:125,name:"SUPERCOMPLETE_FILTER_REVERT"},{no:126,name:"SUPERCOMPLETE_FILTER_PREFIX_MATCH"},{no:127,name:"SUPERCOMPLETE_FILTER_SCORE_THRESHOLD"},{no:128,name:"SUPERCOMPLETE_FILTER_INSERTION_CAP"},{no:133,name:"SUPERCOMPLETE_FILTER_DELETION_CAP"},{no:156,name:"SUPERCOMPLETE_FILTER_WHITESPACE_ONLY"},{no:170,name:"SUPERCOMPLETE_FILTER_NO_OP"},{no:176,name:"SUPERCOMPLETE_FILTER_SUFFIX_MATCH"},{no:182,name:"SUPERCOMPLETE_FILTER_PREVIOUSLY_SHOWN"},{no:129,name:"SUPERCOMPLETE_MIN_SCORE"},{no:130,name:"SUPERCOMPLETE_MAX_INSERTIONS"},{no:131,name:"SUPERCOMPLETE_LINE_RADIUS"},{no:132,name:"SUPERCOMPLETE_MAX_DELETIONS"},{no:138,name:"SUPERCOMPLETE_RECENT_STEPS_DURATION"},{no:154,name:"SUPERCOMPLETE_MAX_TRAJECTORY_STEPS"},{no:203,name:"SUPERCOMPLETE_MAX_TRAJECTORY_STEP_SIZE"},{no:231,name:"SUPERCOMPLETE_DISABLE_TYPING_CACHE"},{no:293,name:"SUPERCOMPLETE_ALWAYS_USE_CACHE_ON_EQUAL_STATE"},{no:297,name:"SUPERCOMPLETE_CACHE_ON_PARENT_ID_KILL_SWITCH"},{no:140,name:"SUPERCOMPLETE_PRUNE_RESPONSE"},{no:141,name:"SUPERCOMPLETE_PRUNE_MAX_INSERT_DELETE_LINE_DELTA"},{no:145,name:"SUPERCOMPLETE_MODEL_CONFIG"},{no:330,name:"SUPERCOMPLETE_MODEL_CONFIG_LOW"},{no:331,name:"SUPERCOMPLETE_MODEL_CONFIG_HIGH"},{no:151,name:"SUPERCOMPLETE_ON_TAB"},{no:171,name:"SUPERCOMPLETE_INLINE_PURE_DELETE"},{no:218,name:"SUPERCOMPLETE_INLINE_RICH_GHOST_TEXT_INSERTIONS"},{no:308,name:"MODEL_CHAT_19821_VARIANTS"},{no:284,name:"SUPERCOMPLETE_MAX_CONCURRENT_REQUESTS"},{no:255,name:"COMMAND_PROMPT_CACHE_CONFIG"},{no:256,name:"CUMULATIVE_PROMPT_CONFIG"},{no:279,name:"CUMULATIVE_PROMPT_CASCADE_CONFIG"},{no:301,name:"TAB_JUMP_CUMULATIVE_PROMPT_CONFIG"},{no:207,name:"COMPLETION_SPEED_SUPERCOMPLETE_CACHE"},{no:208,name:"COMPLETION_SPEED_PREDICTIVE_SUPERCOMPLETE"},{no:209,name:"COMPLETION_SPEED_TAB_JUMP_CACHE"},{no:210,name:"COMPLETION_SPEED_PREDICTIVE_TAB_JUMP"},{no:294,name:"COMPLETION_SPEED_BLOCK_TAB_JUMP_ON_PREDICTIVE_SUPERCOMPLETE"},{no:137,name:"JETBRAINS_ENABLE_ONBOARDING"},{no:146,name:"ENABLE_AUTOCOMPLETE_DURING_INTELLISENSE"},{no:155,name:"COMMAND_BOX_ON_TOP"},{no:149,name:"CONTEXT_ACTIVE_DOCUMENT_FRACTION"},{no:178,name:"CONTEXT_FORCE_LOCAL_CONTEXT"},{no:220,name:"CROSS_SELL_EXTENSION_DOWNLOAD_WINDSURF"},{no:295,name:"MODEL_LLAMA_3_1_70B_INSTRUCT_LONG_CONTEXT_VARIANTS"},{no:163,name:"USE_AUTOCOMPLETE_MODEL_SERVER_SIDE"},{no:165,name:"SUPERCOMPLETE_NO_CONTEXT"},{no:166,name:"SUPERCOMPLETE_NO_ACTIVE_NODE"},{no:168,name:"TAB_JUMP_ENABLED"},{no:169,name:"TAB_JUMP_ACCEPT_ENABLED"},{no:177,name:"TAB_JUMP_LINE_RADIUS"},{no:197,name:"TAB_JUMP_MIN_FILTER_RADIUS"},{no:205,name:"TAB_JUMP_ON_ACCEPT_ONLY"},{no:215,name:"TAB_JUMP_FILTER_IN_SELECTION"},{no:237,name:"TAB_JUMP_MODEL_CONFIG"},{no:238,name:"TAB_JUMP_FILTER_NO_OP"},{no:239,name:"TAB_JUMP_FILTER_REVERT"},{no:240,name:"TAB_JUMP_FILTER_SCORE_THRESHOLD"},{no:241,name:"TAB_JUMP_FILTER_WHITESPACE_ONLY"},{no:242,name:"TAB_JUMP_FILTER_INSERTION_CAP"},{no:243,name:"TAB_JUMP_FILTER_DELETION_CAP"},{no:260,name:"TAB_JUMP_PRUNE_RESPONSE"},{no:261,name:"TAB_JUMP_PRUNE_MAX_INSERT_DELETE_LINE_DELTA"},{no:317,name:"TAB_JUMP_STOP_TOKEN_MIDSTREAM"},{no:211,name:"VIEWED_FILE_TRACKER_CONFIG"},{no:305,name:"SNAPSHOT_TO_STEP_OPTIONS_OVERRIDE"},{no:172,name:"STREAMING_EXTERNAL_COMMAND"},{no:179,name:"USE_SPECIAL_EDIT_CODE_BLOCK"},{no:187,name:"ENABLE_SUGGESTED_RESPONSES"},{no:190,name:"CASCADE_BASE_MODEL_ID"},{no:266,name:"CASCADE_PLAN_BASED_CONFIG_OVERRIDE"},{no:212,name:"CASCADE_GLOBAL_CONFIG_OVERRIDE"},{no:193,name:"CASCADE_BACKGROUND_RESEARCH_CONFIG_OVERRIDE"},{no:204,name:"CASCADE_ENFORCE_QUOTA"},{no:224,name:"CASCADE_ENABLE_AUTOMATED_MEMORIES"},{no:314,name:"CASCADE_MEMORY_CONFIG_OVERRIDE"},{no:228,name:"CASCADE_USE_REPLACE_CONTENT_EDIT_TOOL"},{no:258,name:"CASCADE_VIEW_FILE_TOOL_CONFIG_OVERRIDE"},{no:247,name:"CASCADE_USE_EXPERIMENT_CHECKPOINTER"},{no:245,name:"CASCADE_ENABLE_MCP_TOOLS"},{no:275,name:"CASCADE_AUTO_FIX_LINTS"},{no:296,name:"USE_ANTHROPIC_TOKEN_EFFICIENT_TOOLS_BETA"},{no:289,name:"CASCADE_USER_MEMORIES_IN_SYS_PROMPT"},{no:290,name:"CASCADE_ENABLE_PROXY_WEB_SERVER"},{no:312,name:"COLLAPSE_ASSISTANT_MESSAGES"},{no:321,name:"CASCADE_DEFAULT_MODEL_OVERRIDE"},{no:181,name:"ENABLE_SMART_COPY"},{no:185,name:"ENABLE_COMMIT_MESSAGE_GENERATION"},{no:194,name:"SKIP_CONSISTENCY_MANAGER"},{no:276,name:"FIREWORKS_ON_DEMAND_DEPLOYMENT"},{no:202,name:"API_SERVER_CLIENT_USE_HTTP_2"},{no:213,name:"AUTOCOMPLETE_DEFAULT_DEBOUNCE_MS"},{no:214,name:"AUTOCOMPLETE_FAST_DEBOUNCE_MS"},{no:219,name:"PROFILING_TELEMETRY_SAMPLE_RATE"},{no:225,name:"STREAM_USER_SHELL_COMMANDS"},{no:307,name:"API_SERVER_PROMPT_CACHE_REPLICAS"},{no:272,name:"API_SERVER_ENABLE_MORE_LOGGING"},{no:233,name:"COMMAND_INJECT_USER_MEMORIES"},{no:234,name:"AUTOCOMPLETE_HIDDEN_ERROR_REGEX"},{no:278,name:"DISABLE_IDE_COMPLETIONS_DEBOUNCE"},{no:250,name:"ENABLE_QUICK_ACTIONS"},{no:251,name:"QUICK_ACTIONS_WHITELIST_REGEX"},{no:259,name:"CASCADE_NEW_MODELS_NUX"},{no:270,name:"CASCADE_NEW_WAVE_2_MODELS_NUX"},{no:262,name:"SUPERCOMPLETE_FAST_DEBOUNCE"},{no:263,name:"SUPERCOMPLETE_REGULAR_DEBOUNCE"},{no:268,name:"XML_TOOL_PARSING_MODELS"},{no:269,name:"SUPERCOMPLETE_DONT_FILTER_MID_STREAMED"},{no:285,name:"ANNOYANCE_MANAGER_MAX_NAVIGATION_RENDERS"},{no:286,name:"ANNOYANCE_MANAGER_INLINE_PREVENTION_THRESHOLD_MS"},{no:287,name:"ANNOYANCE_MANAGER_INLINE_PREVENTION_MAX_INTENTIONAL_REJECTIONS"},{no:288,name:"ANNOYANCE_MANAGER_INLINE_PREVENTION_MAX_AUTO_REJECTIONS"},{no:292,name:"USE_CUSTOM_CHARACTER_DIFF"},{no:298,name:"FORCE_NON_OPTIMIZED_DIFF"},{no:300,name:"CASCADE_WEB_APP_DEPLOYMENTS_ENABLED"},{no:316,name:"CASCADE_RECIPES_AT_MENTION_VISIBILITY"},{no:310,name:"IMPLICIT_USES_CLIPBOARD"},{no:303,name:"DISABLE_SUPERCOMPLETE_PCW"},{no:304,name:"BLOCK_TAB_ON_SHOWN_AUTOCOMPLETE"},{no:311,name:"CASCADE_WEB_SEARCH_NUX"},{no:319,name:"MODEL_NOTIFICATIONS"},{no:320,name:"MODEL_SELECTOR_NUX_COPY"},{no:322,name:"CASCADE_TOOL_CALL_PRICING_NUX"},{no:323,name:"CASCADE_PLUGINS_TAB"},{no:324,name:"WAVE_8_RULES_ENABLED"},{no:325,name:"WAVE_8_KNOWLEDGE_ENABLED"},{no:326,name:"CASCADE_ONBOARDING"},{no:327,name:"CASCADE_ONBOARDING_REVERT"},{no:328,name:"CASCADE_WINDSURF_BROWSER_TOOLS_ENABLED"},{no:329,name:"CASCADE_MODEL_HEADER_WARNING"},{no:999,name:"TEST_ONLY"}]);var N1=(o=>(o[o.UNSPECIFIED=0]="UNSPECIFIED",o[o.EXTENSION=1]="EXTENSION",o[o.LANGUAGE_SERVER=2]="LANGUAGE_SERVER",o[o.API_SERVER=3]="API_SERVER",o))(N1||{});m.util.setEnumType(N1,"exa.codeium_common_pb.ExperimentSource",[{no:0,name:"EXPERIMENT_SOURCE_UNSPECIFIED"},{no:1,name:"EXPERIMENT_SOURCE_EXTENSION"},{no:2,name:"EXPERIMENT_SOURCE_LANGUAGE_SERVER"},{no:3,name:"EXPERIMENT_SOURCE_API_SERVER"}]);var U1=(a=>(a[a.UNSPECIFIED=0]="UNSPECIFIED",a[a.CASCADE_BASE=1]="CASCADE_BASE",a[a.VISTA=3]="VISTA",a[a.SHAMU=4]="SHAMU",a[a.SWE_1=5]="SWE_1",a[a.SWE_1_LITE=6]="SWE_1_LITE",a[a.AUTO=7]="AUTO",a))(U1||{});m.util.setEnumType(U1,"exa.codeium_common_pb.ModelAlias",[{no:0,name:"MODEL_ALIAS_UNSPECIFIED"},{no:1,name:"MODEL_ALIAS_CASCADE_BASE"},{no:3,name:"MODEL_ALIAS_VISTA"},{no:4,name:"MODEL_ALIAS_SHAMU"},{no:5,name:"MODEL_ALIAS_SWE_1"},{no:6,name:"MODEL_ALIAS_SWE_1_LITE"},{no:7,name:"MODEL_ALIAS_AUTO"}]);var fo=(b=>(b[b.MODEL_UNSPECIFIED=0]="MODEL_UNSPECIFIED",b[b.MODEL_EMBED_6591=20]="MODEL_EMBED_6591",b[b.MODEL_8341=33]="MODEL_8341",b[b.MODEL_8528=42]="MODEL_8528",b[b.MODEL_9024=41]="MODEL_9024",b[b.MODEL_14602=112]="MODEL_14602",b[b.MODEL_15133=115]="MODEL_15133",b[b.MODEL_15302=119]="MODEL_15302",b[b.MODEL_15335=121]="MODEL_15335",b[b.MODEL_15336=122]="MODEL_15336",b[b.MODEL_15931=167]="MODEL_15931",b[b.MODEL_QUERY_9905=48]="MODEL_QUERY_9905",b[b.MODEL_QUERY_11791=66]="MODEL_QUERY_11791",b[b.MODEL_CHAT_11120=57]="MODEL_CHAT_11120",b[b.MODEL_CHAT_11121=58]="MODEL_CHAT_11121",b[b.MODEL_CHAT_12119=70]="MODEL_CHAT_12119",b[b.MODEL_CHAT_12121=69]="MODEL_CHAT_12121",b[b.MODEL_CHAT_12437=74]="MODEL_CHAT_12437",b[b.MODEL_CHAT_12491=76]="MODEL_CHAT_12491",b[b.MODEL_CHAT_12623=78]="MODEL_CHAT_12623",b[b.MODEL_CHAT_12950=79]="MODEL_CHAT_12950",b[b.MODEL_CHAT_12968=101]="MODEL_CHAT_12968",b[b.MODEL_CHAT_13404=102]="MODEL_CHAT_13404",b[b.MODEL_CHAT_13566=103]="MODEL_CHAT_13566",b[b.MODEL_CHAT_13930=108]="MODEL_CHAT_13930",b[b.MODEL_CHAT_14255=110]="MODEL_CHAT_14255",b[b.MODEL_CHAT_14256=111]="MODEL_CHAT_14256",b[b.MODEL_CHAT_14942=114]="MODEL_CHAT_14942",b[b.MODEL_CHAT_15305=120]="MODEL_CHAT_15305",b[b.MODEL_CHAT_15600=123]="MODEL_CHAT_15600",b[b.MODEL_CHAT_16801=124]="MODEL_CHAT_16801",b[b.MODEL_CHAT_16718=175]="MODEL_CHAT_16718",b[b.MODEL_CHAT_15729=168]="MODEL_CHAT_15729",b[b.MODEL_CHAT_16579=173]="MODEL_CHAT_16579",b[b.MODEL_CHAT_16579_CRUSOE=174]="MODEL_CHAT_16579_CRUSOE",b[b.MODEL_CHAT_18805=181]="MODEL_CHAT_18805",b[b.MODEL_CHAT_18468=210]="MODEL_CHAT_18468",b[b.MODEL_CHAT_19484=233]="MODEL_CHAT_19484",b[b.MODEL_CHAT_20706=235]="MODEL_CHAT_20706",b[b.MODEL_CHAT_21779=245]="MODEL_CHAT_21779",b[b.MODEL_CHAT_19040=211]="MODEL_CHAT_19040",b[b.MODEL_CHAT_19820=229]="MODEL_CHAT_19820",b[b.MODEL_CHAT_19821=230]="MODEL_CHAT_19821",b[b.MODEL_CHAT_19821_CRUSOE=244]="MODEL_CHAT_19821_CRUSOE",b[b.MODEL_CHAT_23310=269]="MODEL_CHAT_23310",b[b.MODEL_CHAT_28580=330]="MODEL_CHAT_28580",b[b.MODEL_CHAT_28581=331]="MODEL_CHAT_28581",b[b.MODEL_CHAT_28582=332]="MODEL_CHAT_28582",b[b.MODEL_CHAT_28583=333]="MODEL_CHAT_28583",b[b.MODEL_CHAT_28584=334]="MODEL_CHAT_28584",b[b.MODEL_CHAT_19822=231]="MODEL_CHAT_19822",b[b.MODEL_CHAT_22798=255]="MODEL_CHAT_22798",b[b.MODEL_CHAT_22799=256]="MODEL_CHAT_22799",b[b.MODEL_CHAT_22800=257]="MODEL_CHAT_22800",b[b.MODEL_CHAT_23151=267]="MODEL_CHAT_23151",b[b.MODEL_CHAT_23152=268]="MODEL_CHAT_23152",b[b.MODEL_TAB_ARMADILLO=500]="MODEL_TAB_ARMADILLO",b[b.MODEL_TAB_BASE_1=501]="MODEL_TAB_BASE_1",b[b.MODEL_TAB_EXPERIMENTAL_1=502]="MODEL_TAB_EXPERIMENTAL_1",b[b.MODEL_TAB_EXPERIMENTAL_2=503]="MODEL_TAB_EXPERIMENTAL_2",b[b.MODEL_TAB_EXPERIMENTAL_3=504]="MODEL_TAB_EXPERIMENTAL_3",b[b.MODEL_TAB_EXPERIMENTAL_4=505]="MODEL_TAB_EXPERIMENTAL_4",b[b.MODEL_TAB_EXPERIMENTAL_5=506]="MODEL_TAB_EXPERIMENTAL_5",b[b.MODEL_TAB_EXPERIMENTAL_6=507]="MODEL_TAB_EXPERIMENTAL_6",b[b.MODEL_TAB_EXPERIMENTAL_7=508]="MODEL_TAB_EXPERIMENTAL_7",b[b.MODEL_TAB_EXPERIMENTAL_8=509]="MODEL_TAB_EXPERIMENTAL_8",b[b.MODEL_TAB_EXPERIMENTAL_9=510]="MODEL_TAB_EXPERIMENTAL_9",b[b.MODEL_TAB_EXPERIMENTAL_10=511]="MODEL_TAB_EXPERIMENTAL_10",b[b.MODEL_CASCADE_22893=270]="MODEL_CASCADE_22893",b[b.MODEL_CASCADE_20064=225]="MODEL_CASCADE_20064",b[b.MODEL_CASCADE_20065=236]="MODEL_CASCADE_20065",b[b.MODEL_CASCADE_20066=237]="MODEL_CASCADE_20066",b[b.MODEL_CASCADE_20067=238]="MODEL_CASCADE_20067",b[b.MODEL_CASCADE_20068=239]="MODEL_CASCADE_20068",b[b.MODEL_CASCADE_20069=240]="MODEL_CASCADE_20069",b[b.MODEL_CASCADE_20070=250]="MODEL_CASCADE_20070",b[b.MODEL_CASCADE_20071=251]="MODEL_CASCADE_20071",b[b.MODEL_CASCADE_20072=252]="MODEL_CASCADE_20072",b[b.MODEL_CASCADE_20073=253]="MODEL_CASCADE_20073",b[b.MODEL_CASCADE_20074=254]="MODEL_CASCADE_20074",b[b.MODEL_CASCADE_20075=307]="MODEL_CASCADE_20075",b[b.MODEL_CASCADE_20076=308]="MODEL_CASCADE_20076",b[b.MODEL_CASCADE_20077=309]="MODEL_CASCADE_20077",b[b.MODEL_CASCADE_20078=310]="MODEL_CASCADE_20078",b[b.MODEL_CASCADE_20079=311]="MODEL_CASCADE_20079",b[b.MODEL_CASCADE_20080=297]="MODEL_CASCADE_20080",b[b.MODEL_CASCADE_20081=298]="MODEL_CASCADE_20081",b[b.MODEL_CASCADE_20082=299]="MODEL_CASCADE_20082",b[b.MODEL_CASCADE_20083=300]="MODEL_CASCADE_20083",b[b.MODEL_CASCADE_20084=301]="MODEL_CASCADE_20084",b[b.MODEL_CASCADE_20085=302]="MODEL_CASCADE_20085",b[b.MODEL_CASCADE_20086=303]="MODEL_CASCADE_20086",b[b.MODEL_CASCADE_20087=304]="MODEL_CASCADE_20087",b[b.MODEL_CASCADE_20088=305]="MODEL_CASCADE_20088",b[b.MODEL_CASCADE_20089=306]="MODEL_CASCADE_20089",b[b.MODEL_DEEPSEEK_V3_INTERNAL=247]="MODEL_DEEPSEEK_V3_INTERNAL",b[b.MODEL_DEEPSEEK_V3_0324_INTERNAL=248]="MODEL_DEEPSEEK_V3_0324_INTERNAL",b[b.MODEL_DEEPSEEK_R1_INTERNAL=249]="MODEL_DEEPSEEK_R1_INTERNAL",b[b.MODEL_ANTHROPIC_WINDSURF_RESEARCH=241]="MODEL_ANTHROPIC_WINDSURF_RESEARCH",b[b.MODEL_ANTHROPIC_WINDSURF_RESEARCH_THINKING=242]="MODEL_ANTHROPIC_WINDSURF_RESEARCH_THINKING",b[b.MODEL_DRAFT_11408=65]="MODEL_DRAFT_11408",b[b.MODEL_DRAFT_CHAT_11883=67]="MODEL_DRAFT_CHAT_11883",b[b.MODEL_DRAFT_CHAT_12196=72]="MODEL_DRAFT_CHAT_12196",b[b.MODEL_DRAFT_CHAT_12413=73]="MODEL_DRAFT_CHAT_12413",b[b.MODEL_DRAFT_CHAT_13175=104]="MODEL_DRAFT_CHAT_13175",b[b.MODEL_DRAFT_CHAT_19823=232]="MODEL_DRAFT_CHAT_19823",b[b.MODEL_DRAFT_CHAT_20707=243]="MODEL_DRAFT_CHAT_20707",b[b.MODEL_DRAFT_CHAT_22801=258]="MODEL_DRAFT_CHAT_22801",b[b.MODEL_DRAFT_CHAT_23508=273]="MODEL_DRAFT_CHAT_23508",b[b.MODEL_DRAFT_CASCADE_23672=274]="MODEL_DRAFT_CASCADE_23672",b[b.MODEL_CHAT_3_5_TURBO=28]="MODEL_CHAT_3_5_TURBO",b[b.MODEL_CHAT_GPT_4=30]="MODEL_CHAT_GPT_4",b[b.MODEL_CHAT_GPT_4_1106_PREVIEW=37]="MODEL_CHAT_GPT_4_1106_PREVIEW",b[b.MODEL_TEXT_EMBEDDING_OPENAI_ADA=91]="MODEL_TEXT_EMBEDDING_OPENAI_ADA",b[b.MODEL_TEXT_EMBEDDING_OPENAI_3_SMALL=163]="MODEL_TEXT_EMBEDDING_OPENAI_3_SMALL",b[b.MODEL_TEXT_EMBEDDING_OPENAI_3_LARGE=164]="MODEL_TEXT_EMBEDDING_OPENAI_3_LARGE",b[b.MODEL_CHAT_GPT_4O_2024_05_13=71]="MODEL_CHAT_GPT_4O_2024_05_13",b[b.MODEL_CHAT_GPT_4O_2024_08_06=109]="MODEL_CHAT_GPT_4O_2024_08_06",b[b.MODEL_CHAT_GPT_4O_MINI_2024_07_18=113]="MODEL_CHAT_GPT_4O_MINI_2024_07_18",b[b.MODEL_CHAT_GPT_4_1_2025_04_14=259]="MODEL_CHAT_GPT_4_1_2025_04_14",b[b.MODEL_CHAT_GPT_4_1_MINI_2025_04_14=260]="MODEL_CHAT_GPT_4_1_MINI_2025_04_14",b[b.MODEL_CHAT_GPT_4_1_NANO_2025_04_14=261]="MODEL_CHAT_GPT_4_1_NANO_2025_04_14",b[b.MODEL_CHAT_O1_PREVIEW=117]="MODEL_CHAT_O1_PREVIEW",b[b.MODEL_CHAT_O1_MINI=118]="MODEL_CHAT_O1_MINI",b[b.MODEL_CHAT_O1=170]="MODEL_CHAT_O1",b[b.MODEL_CHAT_O3_MINI=207]="MODEL_CHAT_O3_MINI",b[b.MODEL_CHAT_O3_MINI_LOW=213]="MODEL_CHAT_O3_MINI_LOW",b[b.MODEL_CHAT_O3_MINI_HIGH=214]="MODEL_CHAT_O3_MINI_HIGH",b[b.MODEL_CHAT_O3=218]="MODEL_CHAT_O3",b[b.MODEL_CHAT_O3_LOW=262]="MODEL_CHAT_O3_LOW",b[b.MODEL_CHAT_O3_HIGH=263]="MODEL_CHAT_O3_HIGH",b[b.MODEL_CHAT_O4_MINI=264]="MODEL_CHAT_O4_MINI",b[b.MODEL_CHAT_O4_MINI_LOW=265]="MODEL_CHAT_O4_MINI_LOW",b[b.MODEL_CHAT_O4_MINI_HIGH=266]="MODEL_CHAT_O4_MINI_HIGH",b[b.MODEL_CHAT_GPT_4_5=228]="MODEL_CHAT_GPT_4_5",b[b.MODEL_CODEX_MINI_LATEST=287]="MODEL_CODEX_MINI_LATEST",b[b.MODEL_CODEX_MINI_LATEST_LOW=288]="MODEL_CODEX_MINI_LATEST_LOW",b[b.MODEL_CODEX_MINI_LATEST_HIGH=289]="MODEL_CODEX_MINI_LATEST_HIGH",b[b.MODEL_O3_PRO_2025_06_10=294]="MODEL_O3_PRO_2025_06_10",b[b.MODEL_O3_PRO_2025_06_10_LOW=295]="MODEL_O3_PRO_2025_06_10_LOW",b[b.MODEL_O3_PRO_2025_06_10_HIGH=296]="MODEL_O3_PRO_2025_06_10_HIGH",b[b.MODEL_GPT_OSS_120B=326]="MODEL_GPT_OSS_120B",b[b.MODEL_GPT_5_NANO=337]="MODEL_GPT_5_NANO",b[b.MODEL_CHAT_GPT_5_MINIMAL=338]="MODEL_CHAT_GPT_5_MINIMAL",b[b.MODEL_CHAT_GPT_5_LOW=339]="MODEL_CHAT_GPT_5_LOW",b[b.MODEL_CHAT_GPT_5=340]="MODEL_CHAT_GPT_5",b[b.MODEL_CHAT_GPT_5_HIGH=341]="MODEL_CHAT_GPT_5_HIGH",b[b.MODEL_CHAT_GPT_5_CODEX=346]="MODEL_CHAT_GPT_5_CODEX",b[b.MODEL_GPT_5_1_CODEX_MINI_LOW=385]="MODEL_GPT_5_1_CODEX_MINI_LOW",b[b.MODEL_GPT_5_1_CODEX_MINI_MEDIUM=386]="MODEL_GPT_5_1_CODEX_MINI_MEDIUM",b[b.MODEL_GPT_5_1_CODEX_MINI_HIGH=387]="MODEL_GPT_5_1_CODEX_MINI_HIGH",b[b.MODEL_GPT_5_1_CODEX_LOW=388]="MODEL_GPT_5_1_CODEX_LOW",b[b.MODEL_GPT_5_1_CODEX_MEDIUM=389]="MODEL_GPT_5_1_CODEX_MEDIUM",b[b.MODEL_GPT_5_1_CODEX_HIGH=390]="MODEL_GPT_5_1_CODEX_HIGH",b[b.MODEL_GPT_5_1_CODEX_MAX_LOW=395]="MODEL_GPT_5_1_CODEX_MAX_LOW",b[b.MODEL_GPT_5_1_CODEX_MAX_MEDIUM=396]="MODEL_GPT_5_1_CODEX_MAX_MEDIUM",b[b.MODEL_GPT_5_1_CODEX_MAX_HIGH=397]="MODEL_GPT_5_1_CODEX_MAX_HIGH",b[b.MODEL_GOOGLE_GEMINI_1_0_PRO=61]="MODEL_GOOGLE_GEMINI_1_0_PRO",b[b.MODEL_GOOGLE_GEMINI_1_5_PRO=62]="MODEL_GOOGLE_GEMINI_1_5_PRO",b[b.MODEL_GOOGLE_GEMINI_EXP_1206=183]="MODEL_GOOGLE_GEMINI_EXP_1206",b[b.MODEL_GOOGLE_GEMINI_2_0_FLASH=184]="MODEL_GOOGLE_GEMINI_2_0_FLASH",b[b.MODEL_GOOGLE_GEMINI_2_5_PRO=246]="MODEL_GOOGLE_GEMINI_2_5_PRO",b[b.MODEL_GOOGLE_GEMINI_2_5_FLASH_PREVIEW_04_17=272]="MODEL_GOOGLE_GEMINI_2_5_FLASH_PREVIEW_04_17",b[b.MODEL_GOOGLE_GEMINI_2_5_FLASH_PREVIEW_05_20=275]="MODEL_GOOGLE_GEMINI_2_5_FLASH_PREVIEW_05_20",b[b.MODEL_GOOGLE_GEMINI_2_5_FLASH_PREVIEW_05_20_THINKING=276]="MODEL_GOOGLE_GEMINI_2_5_FLASH_PREVIEW_05_20_THINKING",b[b.MODEL_GOOGLE_GEMINI_2_5_FLASH=312]="MODEL_GOOGLE_GEMINI_2_5_FLASH",b[b.MODEL_GOOGLE_GEMINI_2_5_FLASH_THINKING=313]="MODEL_GOOGLE_GEMINI_2_5_FLASH_THINKING",b[b.MODEL_GOOGLE_GEMINI_2_5_FLASH_LITE=343]="MODEL_GOOGLE_GEMINI_2_5_FLASH_LITE",b[b.MODEL_GOOGLE_GEMINI_3_0_PRO_LOW=378]="MODEL_GOOGLE_GEMINI_3_0_PRO_LOW",b[b.MODEL_GOOGLE_GEMINI_3_0_PRO_HIGH=379]="MODEL_GOOGLE_GEMINI_3_0_PRO_HIGH",b[b.MODEL_GOOGLE_GEMINI_3_0_PRO_MINIMAL=411]="MODEL_GOOGLE_GEMINI_3_0_PRO_MINIMAL",b[b.MODEL_GOOGLE_GEMINI_3_0_PRO_MEDIUM=412]="MODEL_GOOGLE_GEMINI_3_0_PRO_MEDIUM",b[b.MODEL_GOOGLE_GEMINI_3_0_FLASH_MINIMAL=413]="MODEL_GOOGLE_GEMINI_3_0_FLASH_MINIMAL",b[b.MODEL_GOOGLE_GEMINI_3_0_FLASH_LOW=414]="MODEL_GOOGLE_GEMINI_3_0_FLASH_LOW",b[b.MODEL_GOOGLE_GEMINI_3_0_FLASH_MEDIUM=415]="MODEL_GOOGLE_GEMINI_3_0_FLASH_MEDIUM",b[b.MODEL_GOOGLE_GEMINI_3_0_FLASH_HIGH=416]="MODEL_GOOGLE_GEMINI_3_0_FLASH_HIGH",b[b.MODEL_CLAUDE_3_OPUS_20240229=63]="MODEL_CLAUDE_3_OPUS_20240229",b[b.MODEL_CLAUDE_3_SONNET_20240229=64]="MODEL_CLAUDE_3_SONNET_20240229",b[b.MODEL_CLAUDE_3_HAIKU_20240307=172]="MODEL_CLAUDE_3_HAIKU_20240307",b[b.MODEL_CLAUDE_3_5_HAIKU_20241022=171]="MODEL_CLAUDE_3_5_HAIKU_20241022",b[b.MODEL_CLAUDE_3_5_SONNET_20240620=80]="MODEL_CLAUDE_3_5_SONNET_20240620",b[b.MODEL_CLAUDE_3_5_SONNET_20241022=166]="MODEL_CLAUDE_3_5_SONNET_20241022",b[b.MODEL_CLAUDE_3_7_SONNET_20250219=226]="MODEL_CLAUDE_3_7_SONNET_20250219",b[b.MODEL_CLAUDE_3_7_SONNET_20250219_THINKING=227]="MODEL_CLAUDE_3_7_SONNET_20250219_THINKING",b[b.MODEL_CLAUDE_3_5_SONNET_BYOK=284]="MODEL_CLAUDE_3_5_SONNET_BYOK",b[b.MODEL_CLAUDE_3_7_SONNET_BYOK=285]="MODEL_CLAUDE_3_7_SONNET_BYOK",b[b.MODEL_CLAUDE_3_7_SONNET_OPEN_ROUTER_BYOK=319]="MODEL_CLAUDE_3_7_SONNET_OPEN_ROUTER_BYOK",b[b.MODEL_CLAUDE_3_7_SONNET_THINKING_BYOK=286]="MODEL_CLAUDE_3_7_SONNET_THINKING_BYOK",b[b.MODEL_CLAUDE_3_7_SONNET_THINKING_OPEN_ROUTER_BYOK=320]="MODEL_CLAUDE_3_7_SONNET_THINKING_OPEN_ROUTER_BYOK",b[b.MODEL_CLAUDE_4_OPUS_BYOK=277]="MODEL_CLAUDE_4_OPUS_BYOK",b[b.MODEL_CLAUDE_4_OPUS_THINKING_BYOK=278]="MODEL_CLAUDE_4_OPUS_THINKING_BYOK",b[b.MODEL_CLAUDE_4_OPUS=290]="MODEL_CLAUDE_4_OPUS",b[b.MODEL_CLAUDE_4_OPUS_THINKING=291]="MODEL_CLAUDE_4_OPUS_THINKING",b[b.MODEL_CLAUDE_4_SONNET_BYOK=279]="MODEL_CLAUDE_4_SONNET_BYOK",b[b.MODEL_CLAUDE_4_SONNET_OPEN_ROUTER_BYOK=321]="MODEL_CLAUDE_4_SONNET_OPEN_ROUTER_BYOK",b[b.MODEL_CLAUDE_4_SONNET_THINKING_BYOK=280]="MODEL_CLAUDE_4_SONNET_THINKING_BYOK",b[b.MODEL_CLAUDE_4_SONNET_THINKING_OPEN_ROUTER_BYOK=322]="MODEL_CLAUDE_4_SONNET_THINKING_OPEN_ROUTER_BYOK",b[b.MODEL_CLAUDE_4_SONNET=281]="MODEL_CLAUDE_4_SONNET",b[b.MODEL_CLAUDE_4_SONNET_THINKING=282]="MODEL_CLAUDE_4_SONNET_THINKING",b[b.MODEL_CLAUDE_4_1_OPUS=328]="MODEL_CLAUDE_4_1_OPUS",b[b.MODEL_CLAUDE_4_1_OPUS_THINKING=329]="MODEL_CLAUDE_4_1_OPUS_THINKING",b[b.MODEL_CLAUDE_4_5_SONNET=353]="MODEL_CLAUDE_4_5_SONNET",b[b.MODEL_CLAUDE_4_5_SONNET_THINKING=354]="MODEL_CLAUDE_4_5_SONNET_THINKING",b[b.MODEL_CLAUDE_4_5_SONNET_1M=370]="MODEL_CLAUDE_4_5_SONNET_1M",b[b.MODEL_CLAUDE_4_5_SONNET_THINKING_1M=371]="MODEL_CLAUDE_4_5_SONNET_THINKING_1M",b[b.MODEL_CLAUDE_4_5_OPUS=391]="MODEL_CLAUDE_4_5_OPUS",b[b.MODEL_CLAUDE_4_5_OPUS_THINKING=392]="MODEL_CLAUDE_4_5_OPUS_THINKING",b[b.MODEL_CLAUDE_4_SONNET_DATABRICKS=292]="MODEL_CLAUDE_4_SONNET_DATABRICKS",b[b.MODEL_CLAUDE_4_SONNET_THINKING_DATABRICKS=293]="MODEL_CLAUDE_4_SONNET_THINKING_DATABRICKS",b[b.MODEL_TOGETHERAI_TEXT_EMBEDDING_M2_BERT=81]="MODEL_TOGETHERAI_TEXT_EMBEDDING_M2_BERT",b[b.MODEL_TOGETHERAI_LLAMA_3_1_8B_INSTRUCT=165]="MODEL_TOGETHERAI_LLAMA_3_1_8B_INSTRUCT",b[b.MODEL_HUGGING_FACE_TEXT_EMBEDDING_M2_BERT=82]="MODEL_HUGGING_FACE_TEXT_EMBEDDING_M2_BERT",b[b.MODEL_HUGGING_FACE_TEXT_EMBEDDING_UAE_CODE=83]="MODEL_HUGGING_FACE_TEXT_EMBEDDING_UAE_CODE",b[b.MODEL_HUGGING_FACE_TEXT_EMBEDDING_BGE=84]="MODEL_HUGGING_FACE_TEXT_EMBEDDING_BGE",b[b.MODEL_HUGGING_FACE_TEXT_EMBEDDING_BLADE=85]="MODEL_HUGGING_FACE_TEXT_EMBEDDING_BLADE",b[b.MODEL_HUGGING_FACE_TEXT_EMBEDDING_ARCTIC_LARGE=86]="MODEL_HUGGING_FACE_TEXT_EMBEDDING_ARCTIC_LARGE",b[b.MODEL_HUGGING_FACE_TEXT_EMBEDDING_E5_BASE=87]="MODEL_HUGGING_FACE_TEXT_EMBEDDING_E5_BASE",b[b.MODEL_HUGGING_FACE_TEXT_EMBEDDING_MXBAI=88]="MODEL_HUGGING_FACE_TEXT_EMBEDDING_MXBAI",b[b.MODEL_LLAMA_3_1_8B_INSTRUCT=106]="MODEL_LLAMA_3_1_8B_INSTRUCT",b[b.MODEL_LLAMA_3_1_70B_INSTRUCT=107]="MODEL_LLAMA_3_1_70B_INSTRUCT",b[b.MODEL_LLAMA_3_1_405B_INSTRUCT=105]="MODEL_LLAMA_3_1_405B_INSTRUCT",b[b.MODEL_LLAMA_3_3_70B_INSTRUCT=208]="MODEL_LLAMA_3_3_70B_INSTRUCT",b[b.MODEL_LLAMA_3_3_70B_INSTRUCT_R1=209]="MODEL_LLAMA_3_3_70B_INSTRUCT_R1",b[b.MODEL_LLAMA_3_1_70B_INSTRUCT_LONG_CONTEXT=116]="MODEL_LLAMA_3_1_70B_INSTRUCT_LONG_CONTEXT",b[b.MODEL_LLAMA_3_1_8B_HERMES_3=176]="MODEL_LLAMA_3_1_8B_HERMES_3",b[b.MODEL_LLAMA_3_1_70B_HERMES_3=177]="MODEL_LLAMA_3_1_70B_HERMES_3",b[b.MODEL_QWEN_2_5_7B_INSTRUCT=178]="MODEL_QWEN_2_5_7B_INSTRUCT",b[b.MODEL_QWEN_2_5_32B_INSTRUCT=179]="MODEL_QWEN_2_5_32B_INSTRUCT",b[b.MODEL_QWEN_2_5_72B_INSTRUCT=180]="MODEL_QWEN_2_5_72B_INSTRUCT",b[b.MODEL_QWEN_2_5_32B_INSTRUCT_R1=224]="MODEL_QWEN_2_5_32B_INSTRUCT_R1",b[b.MODEL_QWEN_3_235B_INSTRUCT=324]="MODEL_QWEN_3_235B_INSTRUCT",b[b.MODEL_QWEN_3_CODER_480B_INSTRUCT=325]="MODEL_QWEN_3_CODER_480B_INSTRUCT",b[b.MODEL_QWEN_3_CODER_480B_INSTRUCT_FAST=327]="MODEL_QWEN_3_CODER_480B_INSTRUCT_FAST",b[b.MODEL_GLM_4_5=342]="MODEL_GLM_4_5",b[b.MODEL_GLM_4_5_FAST=352]="MODEL_GLM_4_5_FAST",b[b.MODEL_GLM_4_6=356]="MODEL_GLM_4_6",b[b.MODEL_GLM_4_6_FAST=357]="MODEL_GLM_4_6_FAST",b[b.MODEL_GLM_4_7=417]="MODEL_GLM_4_7",b[b.MODEL_GLM_4_7_FAST=418]="MODEL_GLM_4_7_FAST",b[b.MODEL_SWE_1_5=359]="MODEL_SWE_1_5",b[b.MODEL_SWE_1_5_REDIRECT=361]="MODEL_SWE_1_5_REDIRECT",b[b.MODEL_SWE_1_5_THINKING=369]="MODEL_SWE_1_5_THINKING",b[b.MODEL_SWE_1_5_SLOW=377]="MODEL_SWE_1_5_SLOW",b[b.MODEL_SWE_1_6=420]="MODEL_SWE_1_6",b[b.MODEL_SWE_1_6_FAST=421]="MODEL_SWE_1_6_FAST",b[b.MODEL_CODEMAP_SMALL=358]="MODEL_CODEMAP_SMALL",b[b.MODEL_CODEMAP_MEDIUM=360]="MODEL_CODEMAP_MEDIUM",b[b.MODEL_CODEMAP_SMART=362]="MODEL_CODEMAP_SMART",b[b.MODEL_COGNITION_INSTANT_CONTEXT=355]="MODEL_COGNITION_INSTANT_CONTEXT",b[b.MODEL_LLAMA_FT_DEEPWIKI_ARTICLE=335]="MODEL_LLAMA_FT_DEEPWIKI_ARTICLE",b[b.MODEL_LLAMA_FT_DEEPWIKI_HOVER=336]="MODEL_LLAMA_FT_DEEPWIKI_HOVER",b[b.MODEL_LLAMA_FT_LIFEGUARD=398]="MODEL_LLAMA_FT_LIFEGUARD",b[b.MODEL_COGNITION_LIFEGUARD=410]="MODEL_COGNITION_LIFEGUARD",b[b.MODEL_NOMIC_TEXT_EMBEDDING_V1=89]="MODEL_NOMIC_TEXT_EMBEDDING_V1",b[b.MODEL_NOMIC_TEXT_EMBEDDING_V1_5=90]="MODEL_NOMIC_TEXT_EMBEDDING_V1_5",b[b.MODEL_MISTRAL_7B=77]="MODEL_MISTRAL_7B",b[b.MODEL_SALESFORCE_EMBEDDING_2R=99]="MODEL_SALESFORCE_EMBEDDING_2R",b[b.MODEL_CUSTOM_VLLM=182]="MODEL_CUSTOM_VLLM",b[b.MODEL_TEI_BGE_M3=92]="MODEL_TEI_BGE_M3",b[b.MODEL_TEI_NOMIC_EMBED_TEXT_V1=93]="MODEL_TEI_NOMIC_EMBED_TEXT_V1",b[b.MODEL_TEI_INTFLOAT_E5_LARGE_INSTRUCT=94]="MODEL_TEI_INTFLOAT_E5_LARGE_INSTRUCT",b[b.MODEL_TEI_SNOWFLAKE_ARCTIC_EMBED_L=95]="MODEL_TEI_SNOWFLAKE_ARCTIC_EMBED_L",b[b.MODEL_TEI_UAE_CODE_LARGE_V1=96]="MODEL_TEI_UAE_CODE_LARGE_V1",b[b.MODEL_TEI_B1ADE=97]="MODEL_TEI_B1ADE",b[b.MODEL_TEI_WHEREISAI_UAE_LARGE_V1=98]="MODEL_TEI_WHEREISAI_UAE_LARGE_V1",b[b.MODEL_TEI_WHEREISAI_UAE_CODE_LARGE_V1=100]="MODEL_TEI_WHEREISAI_UAE_CODE_LARGE_V1",b[b.MODEL_OPENAI_COMPATIBLE=200]="MODEL_OPENAI_COMPATIBLE",b[b.MODEL_ANTHROPIC_COMPATIBLE=201]="MODEL_ANTHROPIC_COMPATIBLE",b[b.MODEL_VERTEX_COMPATIBLE=202]="MODEL_VERTEX_COMPATIBLE",b[b.MODEL_BEDROCK_COMPATIBLE=203]="MODEL_BEDROCK_COMPATIBLE",b[b.MODEL_AZURE_COMPATIBLE=204]="MODEL_AZURE_COMPATIBLE",b[b.MODEL_DEEPSEEK_V3=205]="MODEL_DEEPSEEK_V3",b[b.MODEL_DEEPSEEK_R1=206]="MODEL_DEEPSEEK_R1",b[b.MODEL_DEEPSEEK_R1_SLOW=215]="MODEL_DEEPSEEK_R1_SLOW",b[b.MODEL_DEEPSEEK_R1_FAST=216]="MODEL_DEEPSEEK_R1_FAST",b[b.MODEL_KIMI_K2=323]="MODEL_KIMI_K2",b[b.MODEL_MINIMAX_M2=368]="MODEL_MINIMAX_M2",b[b.MODEL_MINIMAX_M2_1=419]="MODEL_MINIMAX_M2_1",b[b.MODEL_DEEPSEEK_V3_2=409]="MODEL_DEEPSEEK_V3_2",b[b.MODEL_KIMI_K2_THINKING=394]="MODEL_KIMI_K2_THINKING",b[b.MODEL_CUSTOM_OPEN_ROUTER=185]="MODEL_CUSTOM_OPEN_ROUTER",b[b.MODEL_XAI_GROK_2=212]="MODEL_XAI_GROK_2",b[b.MODEL_XAI_GROK_3=217]="MODEL_XAI_GROK_3",b[b.MODEL_XAI_GROK_3_MINI_REASONING=234]="MODEL_XAI_GROK_3_MINI_REASONING",b[b.MODEL_XAI_GROK_CODE_FAST=345]="MODEL_XAI_GROK_CODE_FAST",b[b.MODEL_PRIVATE_1=219]="MODEL_PRIVATE_1",b[b.MODEL_PRIVATE_2=220]="MODEL_PRIVATE_2",b[b.MODEL_PRIVATE_3=221]="MODEL_PRIVATE_3",b[b.MODEL_PRIVATE_4=222]="MODEL_PRIVATE_4",b[b.MODEL_PRIVATE_5=223]="MODEL_PRIVATE_5",b[b.MODEL_PRIVATE_6=314]="MODEL_PRIVATE_6",b[b.MODEL_PRIVATE_7=315]="MODEL_PRIVATE_7",b[b.MODEL_PRIVATE_8=316]="MODEL_PRIVATE_8",b[b.MODEL_PRIVATE_9=317]="MODEL_PRIVATE_9",b[b.MODEL_PRIVATE_10=318]="MODEL_PRIVATE_10",b[b.MODEL_PRIVATE_11=347]="MODEL_PRIVATE_11",b[b.MODEL_PRIVATE_12=348]="MODEL_PRIVATE_12",b[b.MODEL_PRIVATE_13=349]="MODEL_PRIVATE_13",b[b.MODEL_PRIVATE_14=350]="MODEL_PRIVATE_14",b[b.MODEL_PRIVATE_15=351]="MODEL_PRIVATE_15",b[b.MODEL_PRIVATE_16=363]="MODEL_PRIVATE_16",b[b.MODEL_PRIVATE_17=364]="MODEL_PRIVATE_17",b[b.MODEL_PRIVATE_18=365]="MODEL_PRIVATE_18",b[b.MODEL_PRIVATE_19=366]="MODEL_PRIVATE_19",b[b.MODEL_PRIVATE_20=367]="MODEL_PRIVATE_20",b[b.MODEL_PRIVATE_21=372]="MODEL_PRIVATE_21",b[b.MODEL_PRIVATE_22=373]="MODEL_PRIVATE_22",b[b.MODEL_PRIVATE_23=374]="MODEL_PRIVATE_23",b[b.MODEL_PRIVATE_24=375]="MODEL_PRIVATE_24",b[b.MODEL_PRIVATE_25=376]="MODEL_PRIVATE_25",b[b.MODEL_PRIVATE_26=380]="MODEL_PRIVATE_26",b[b.MODEL_PRIVATE_27=381]="MODEL_PRIVATE_27",b[b.MODEL_PRIVATE_28=382]="MODEL_PRIVATE_28",b[b.MODEL_PRIVATE_29=383]="MODEL_PRIVATE_29",b[b.MODEL_PRIVATE_30=384]="MODEL_PRIVATE_30",b[b.MODEL_GPT_5_2_NONE=399]="MODEL_GPT_5_2_NONE",b[b.MODEL_GPT_5_2_LOW=400]="MODEL_GPT_5_2_LOW",b[b.MODEL_GPT_5_2_MEDIUM=401]="MODEL_GPT_5_2_MEDIUM",b[b.MODEL_GPT_5_2_HIGH=402]="MODEL_GPT_5_2_HIGH",b[b.MODEL_GPT_5_2_XHIGH=403]="MODEL_GPT_5_2_XHIGH",b[b.MODEL_GPT_5_2_NONE_PRIORITY=404]="MODEL_GPT_5_2_NONE_PRIORITY",b[b.MODEL_GPT_5_2_LOW_PRIORITY=405]="MODEL_GPT_5_2_LOW_PRIORITY",b[b.MODEL_GPT_5_2_MEDIUM_PRIORITY=406]="MODEL_GPT_5_2_MEDIUM_PRIORITY",b[b.MODEL_GPT_5_2_HIGH_PRIORITY=407]="MODEL_GPT_5_2_HIGH_PRIORITY",b[b.MODEL_GPT_5_2_XHIGH_PRIORITY=408]="MODEL_GPT_5_2_XHIGH_PRIORITY",b[b.MODEL_GPT_5_2_CODEX_LOW=422]="MODEL_GPT_5_2_CODEX_LOW",b[b.MODEL_GPT_5_2_CODEX_MEDIUM=423]="MODEL_GPT_5_2_CODEX_MEDIUM",b[b.MODEL_GPT_5_2_CODEX_HIGH=424]="MODEL_GPT_5_2_CODEX_HIGH",b[b.MODEL_GPT_5_2_CODEX_XHIGH=425]="MODEL_GPT_5_2_CODEX_XHIGH",b[b.MODEL_GPT_5_2_CODEX_LOW_PRIORITY=426]="MODEL_GPT_5_2_CODEX_LOW_PRIORITY",b[b.MODEL_GPT_5_2_CODEX_MEDIUM_PRIORITY=427]="MODEL_GPT_5_2_CODEX_MEDIUM_PRIORITY",b[b.MODEL_GPT_5_2_CODEX_HIGH_PRIORITY=428]="MODEL_GPT_5_2_CODEX_HIGH_PRIORITY",b[b.MODEL_GPT_5_2_CODEX_XHIGH_PRIORITY=429]="MODEL_GPT_5_2_CODEX_XHIGH_PRIORITY",b[b.MODEL_SGLANG_ROLLOUT=600]="MODEL_SGLANG_ROLLOUT",b))(fo||{});m.util.setEnumType(fo,"exa.codeium_common_pb.Model",[{no:0,name:"MODEL_UNSPECIFIED"},{no:20,name:"MODEL_EMBED_6591"},{no:33,name:"MODEL_8341"},{no:42,name:"MODEL_8528"},{no:41,name:"MODEL_9024"},{no:112,name:"MODEL_14602"},{no:115,name:"MODEL_15133"},{no:119,name:"MODEL_15302"},{no:121,name:"MODEL_15335"},{no:122,name:"MODEL_15336"},{no:167,name:"MODEL_15931"},{no:48,name:"MODEL_QUERY_9905"},{no:66,name:"MODEL_QUERY_11791"},{no:57,name:"MODEL_CHAT_11120"},{no:58,name:"MODEL_CHAT_11121"},{no:70,name:"MODEL_CHAT_12119"},{no:69,name:"MODEL_CHAT_12121"},{no:74,name:"MODEL_CHAT_12437"},{no:76,name:"MODEL_CHAT_12491"},{no:78,name:"MODEL_CHAT_12623"},{no:79,name:"MODEL_CHAT_12950"},{no:101,name:"MODEL_CHAT_12968"},{no:102,name:"MODEL_CHAT_13404"},{no:103,name:"MODEL_CHAT_13566"},{no:108,name:"MODEL_CHAT_13930"},{no:110,name:"MODEL_CHAT_14255"},{no:111,name:"MODEL_CHAT_14256"},{no:114,name:"MODEL_CHAT_14942"},{no:120,name:"MODEL_CHAT_15305"},{no:123,name:"MODEL_CHAT_15600"},{no:124,name:"MODEL_CHAT_16801"},{no:175,name:"MODEL_CHAT_16718"},{no:168,name:"MODEL_CHAT_15729"},{no:173,name:"MODEL_CHAT_16579"},{no:174,name:"MODEL_CHAT_16579_CRUSOE"},{no:181,name:"MODEL_CHAT_18805"},{no:210,name:"MODEL_CHAT_18468"},{no:233,name:"MODEL_CHAT_19484"},{no:235,name:"MODEL_CHAT_20706"},{no:245,name:"MODEL_CHAT_21779"},{no:211,name:"MODEL_CHAT_19040"},{no:229,name:"MODEL_CHAT_19820"},{no:230,name:"MODEL_CHAT_19821"},{no:244,name:"MODEL_CHAT_19821_CRUSOE"},{no:269,name:"MODEL_CHAT_23310"},{no:330,name:"MODEL_CHAT_28580"},{no:331,name:"MODEL_CHAT_28581"},{no:332,name:"MODEL_CHAT_28582"},{no:333,name:"MODEL_CHAT_28583"},{no:334,name:"MODEL_CHAT_28584"},{no:231,name:"MODEL_CHAT_19822"},{no:255,name:"MODEL_CHAT_22798"},{no:256,name:"MODEL_CHAT_22799"},{no:257,name:"MODEL_CHAT_22800"},{no:267,name:"MODEL_CHAT_23151"},{no:268,name:"MODEL_CHAT_23152"},{no:500,name:"MODEL_TAB_ARMADILLO"},{no:501,name:"MODEL_TAB_BASE_1"},{no:502,name:"MODEL_TAB_EXPERIMENTAL_1"},{no:503,name:"MODEL_TAB_EXPERIMENTAL_2"},{no:504,name:"MODEL_TAB_EXPERIMENTAL_3"},{no:505,name:"MODEL_TAB_EXPERIMENTAL_4"},{no:506,name:"MODEL_TAB_EXPERIMENTAL_5"},{no:507,name:"MODEL_TAB_EXPERIMENTAL_6"},{no:508,name:"MODEL_TAB_EXPERIMENTAL_7"},{no:509,name:"MODEL_TAB_EXPERIMENTAL_8"},{no:510,name:"MODEL_TAB_EXPERIMENTAL_9"},{no:511,name:"MODEL_TAB_EXPERIMENTAL_10"},{no:270,name:"MODEL_CASCADE_22893"},{no:225,name:"MODEL_CASCADE_20064"},{no:236,name:"MODEL_CASCADE_20065"},{no:237,name:"MODEL_CASCADE_20066"},{no:238,name:"MODEL_CASCADE_20067"},{no:239,name:"MODEL_CASCADE_20068"},{no:240,name:"MODEL_CASCADE_20069"},{no:250,name:"MODEL_CASCADE_20070"},{no:251,name:"MODEL_CASCADE_20071"},{no:252,name:"MODEL_CASCADE_20072"},{no:253,name:"MODEL_CASCADE_20073"},{no:254,name:"MODEL_CASCADE_20074"},{no:307,name:"MODEL_CASCADE_20075"},{no:308,name:"MODEL_CASCADE_20076"},{no:309,name:"MODEL_CASCADE_20077"},{no:310,name:"MODEL_CASCADE_20078"},{no:311,name:"MODEL_CASCADE_20079"},{no:297,name:"MODEL_CASCADE_20080"},{no:298,name:"MODEL_CASCADE_20081"},{no:299,name:"MODEL_CASCADE_20082"},{no:300,name:"MODEL_CASCADE_20083"},{no:301,name:"MODEL_CASCADE_20084"},{no:302,name:"MODEL_CASCADE_20085"},{no:303,name:"MODEL_CASCADE_20086"},{no:304,name:"MODEL_CASCADE_20087"},{no:305,name:"MODEL_CASCADE_20088"},{no:306,name:"MODEL_CASCADE_20089"},{no:247,name:"MODEL_DEEPSEEK_V3_INTERNAL"},{no:248,name:"MODEL_DEEPSEEK_V3_0324_INTERNAL"},{no:249,name:"MODEL_DEEPSEEK_R1_INTERNAL"},{no:241,name:"MODEL_ANTHROPIC_WINDSURF_RESEARCH"},{no:242,name:"MODEL_ANTHROPIC_WINDSURF_RESEARCH_THINKING"},{no:65,name:"MODEL_DRAFT_11408"},{no:67,name:"MODEL_DRAFT_CHAT_11883"},{no:72,name:"MODEL_DRAFT_CHAT_12196"},{no:73,name:"MODEL_DRAFT_CHAT_12413"},{no:104,name:"MODEL_DRAFT_CHAT_13175"},{no:232,name:"MODEL_DRAFT_CHAT_19823"},{no:243,name:"MODEL_DRAFT_CHAT_20707"},{no:258,name:"MODEL_DRAFT_CHAT_22801"},{no:273,name:"MODEL_DRAFT_CHAT_23508"},{no:274,name:"MODEL_DRAFT_CASCADE_23672"},{no:28,name:"MODEL_CHAT_3_5_TURBO"},{no:30,name:"MODEL_CHAT_GPT_4"},{no:37,name:"MODEL_CHAT_GPT_4_1106_PREVIEW"},{no:91,name:"MODEL_TEXT_EMBEDDING_OPENAI_ADA"},{no:163,name:"MODEL_TEXT_EMBEDDING_OPENAI_3_SMALL"},{no:164,name:"MODEL_TEXT_EMBEDDING_OPENAI_3_LARGE"},{no:71,name:"MODEL_CHAT_GPT_4O_2024_05_13"},{no:109,name:"MODEL_CHAT_GPT_4O_2024_08_06"},{no:113,name:"MODEL_CHAT_GPT_4O_MINI_2024_07_18"},{no:259,name:"MODEL_CHAT_GPT_4_1_2025_04_14"},{no:260,name:"MODEL_CHAT_GPT_4_1_MINI_2025_04_14"},{no:261,name:"MODEL_CHAT_GPT_4_1_NANO_2025_04_14"},{no:117,name:"MODEL_CHAT_O1_PREVIEW"},{no:118,name:"MODEL_CHAT_O1_MINI"},{no:170,name:"MODEL_CHAT_O1"},{no:207,name:"MODEL_CHAT_O3_MINI"},{no:213,name:"MODEL_CHAT_O3_MINI_LOW"},{no:214,name:"MODEL_CHAT_O3_MINI_HIGH"},{no:218,name:"MODEL_CHAT_O3"},{no:262,name:"MODEL_CHAT_O3_LOW"},{no:263,name:"MODEL_CHAT_O3_HIGH"},{no:264,name:"MODEL_CHAT_O4_MINI"},{no:265,name:"MODEL_CHAT_O4_MINI_LOW"},{no:266,name:"MODEL_CHAT_O4_MINI_HIGH"},{no:228,name:"MODEL_CHAT_GPT_4_5"},{no:287,name:"MODEL_CODEX_MINI_LATEST"},{no:288,name:"MODEL_CODEX_MINI_LATEST_LOW"},{no:289,name:"MODEL_CODEX_MINI_LATEST_HIGH"},{no:294,name:"MODEL_O3_PRO_2025_06_10"},{no:295,name:"MODEL_O3_PRO_2025_06_10_LOW"},{no:296,name:"MODEL_O3_PRO_2025_06_10_HIGH"},{no:326,name:"MODEL_GPT_OSS_120B"},{no:337,name:"MODEL_GPT_5_NANO"},{no:338,name:"MODEL_CHAT_GPT_5_MINIMAL"},{no:339,name:"MODEL_CHAT_GPT_5_LOW"},{no:340,name:"MODEL_CHAT_GPT_5"},{no:341,name:"MODEL_CHAT_GPT_5_HIGH"},{no:346,name:"MODEL_CHAT_GPT_5_CODEX"},{no:385,name:"MODEL_GPT_5_1_CODEX_MINI_LOW"},{no:386,name:"MODEL_GPT_5_1_CODEX_MINI_MEDIUM"},{no:387,name:"MODEL_GPT_5_1_CODEX_MINI_HIGH"},{no:388,name:"MODEL_GPT_5_1_CODEX_LOW"},{no:389,name:"MODEL_GPT_5_1_CODEX_MEDIUM"},{no:390,name:"MODEL_GPT_5_1_CODEX_HIGH"},{no:395,name:"MODEL_GPT_5_1_CODEX_MAX_LOW"},{no:396,name:"MODEL_GPT_5_1_CODEX_MAX_MEDIUM"},{no:397,name:"MODEL_GPT_5_1_CODEX_MAX_HIGH"},{no:61,name:"MODEL_GOOGLE_GEMINI_1_0_PRO"},{no:62,name:"MODEL_GOOGLE_GEMINI_1_5_PRO"},{no:183,name:"MODEL_GOOGLE_GEMINI_EXP_1206"},{no:184,name:"MODEL_GOOGLE_GEMINI_2_0_FLASH"},{no:246,name:"MODEL_GOOGLE_GEMINI_2_5_PRO"},{no:272,name:"MODEL_GOOGLE_GEMINI_2_5_FLASH_PREVIEW_04_17"},{no:275,name:"MODEL_GOOGLE_GEMINI_2_5_FLASH_PREVIEW_05_20"},{no:276,name:"MODEL_GOOGLE_GEMINI_2_5_FLASH_PREVIEW_05_20_THINKING"},{no:312,name:"MODEL_GOOGLE_GEMINI_2_5_FLASH"},{no:313,name:"MODEL_GOOGLE_GEMINI_2_5_FLASH_THINKING"},{no:343,name:"MODEL_GOOGLE_GEMINI_2_5_FLASH_LITE"},{no:378,name:"MODEL_GOOGLE_GEMINI_3_0_PRO_LOW"},{no:379,name:"MODEL_GOOGLE_GEMINI_3_0_PRO_HIGH"},{no:411,name:"MODEL_GOOGLE_GEMINI_3_0_PRO_MINIMAL"},{no:412,name:"MODEL_GOOGLE_GEMINI_3_0_PRO_MEDIUM"},{no:413,name:"MODEL_GOOGLE_GEMINI_3_0_FLASH_MINIMAL"},{no:414,name:"MODEL_GOOGLE_GEMINI_3_0_FLASH_LOW"},{no:415,name:"MODEL_GOOGLE_GEMINI_3_0_FLASH_MEDIUM"},{no:416,name:"MODEL_GOOGLE_GEMINI_3_0_FLASH_HIGH"},{no:63,name:"MODEL_CLAUDE_3_OPUS_20240229"},{no:64,name:"MODEL_CLAUDE_3_SONNET_20240229"},{no:172,name:"MODEL_CLAUDE_3_HAIKU_20240307"},{no:171,name:"MODEL_CLAUDE_3_5_HAIKU_20241022"},{no:80,name:"MODEL_CLAUDE_3_5_SONNET_20240620"},{no:166,name:"MODEL_CLAUDE_3_5_SONNET_20241022"},{no:226,name:"MODEL_CLAUDE_3_7_SONNET_20250219"},{no:227,name:"MODEL_CLAUDE_3_7_SONNET_20250219_THINKING"},{no:284,name:"MODEL_CLAUDE_3_5_SONNET_BYOK"},{no:285,name:"MODEL_CLAUDE_3_7_SONNET_BYOK"},{no:319,name:"MODEL_CLAUDE_3_7_SONNET_OPEN_ROUTER_BYOK"},{no:286,name:"MODEL_CLAUDE_3_7_SONNET_THINKING_BYOK"},{no:320,name:"MODEL_CLAUDE_3_7_SONNET_THINKING_OPEN_ROUTER_BYOK"},{no:277,name:"MODEL_CLAUDE_4_OPUS_BYOK"},{no:278,name:"MODEL_CLAUDE_4_OPUS_THINKING_BYOK"},{no:290,name:"MODEL_CLAUDE_4_OPUS"},{no:291,name:"MODEL_CLAUDE_4_OPUS_THINKING"},{no:279,name:"MODEL_CLAUDE_4_SONNET_BYOK"},{no:321,name:"MODEL_CLAUDE_4_SONNET_OPEN_ROUTER_BYOK"},{no:280,name:"MODEL_CLAUDE_4_SONNET_THINKING_BYOK"},{no:322,name:"MODEL_CLAUDE_4_SONNET_THINKING_OPEN_ROUTER_BYOK"},{no:281,name:"MODEL_CLAUDE_4_SONNET"},{no:282,name:"MODEL_CLAUDE_4_SONNET_THINKING"},{no:328,name:"MODEL_CLAUDE_4_1_OPUS"},{no:329,name:"MODEL_CLAUDE_4_1_OPUS_THINKING"},{no:353,name:"MODEL_CLAUDE_4_5_SONNET"},{no:354,name:"MODEL_CLAUDE_4_5_SONNET_THINKING"},{no:370,name:"MODEL_CLAUDE_4_5_SONNET_1M"},{no:371,name:"MODEL_CLAUDE_4_5_SONNET_THINKING_1M"},{no:391,name:"MODEL_CLAUDE_4_5_OPUS"},{no:392,name:"MODEL_CLAUDE_4_5_OPUS_THINKING"},{no:292,name:"MODEL_CLAUDE_4_SONNET_DATABRICKS"},{no:293,name:"MODEL_CLAUDE_4_SONNET_THINKING_DATABRICKS"},{no:81,name:"MODEL_TOGETHERAI_TEXT_EMBEDDING_M2_BERT"},{no:165,name:"MODEL_TOGETHERAI_LLAMA_3_1_8B_INSTRUCT"},{no:82,name:"MODEL_HUGGING_FACE_TEXT_EMBEDDING_M2_BERT"},{no:83,name:"MODEL_HUGGING_FACE_TEXT_EMBEDDING_UAE_CODE"},{no:84,name:"MODEL_HUGGING_FACE_TEXT_EMBEDDING_BGE"},{no:85,name:"MODEL_HUGGING_FACE_TEXT_EMBEDDING_BLADE"},{no:86,name:"MODEL_HUGGING_FACE_TEXT_EMBEDDING_ARCTIC_LARGE"},{no:87,name:"MODEL_HUGGING_FACE_TEXT_EMBEDDING_E5_BASE"},{no:88,name:"MODEL_HUGGING_FACE_TEXT_EMBEDDING_MXBAI"},{no:106,name:"MODEL_LLAMA_3_1_8B_INSTRUCT"},{no:107,name:"MODEL_LLAMA_3_1_70B_INSTRUCT"},{no:105,name:"MODEL_LLAMA_3_1_405B_INSTRUCT"},{no:208,name:"MODEL_LLAMA_3_3_70B_INSTRUCT"},{no:209,name:"MODEL_LLAMA_3_3_70B_INSTRUCT_R1"},{no:116,name:"MODEL_LLAMA_3_1_70B_INSTRUCT_LONG_CONTEXT"},{no:176,name:"MODEL_LLAMA_3_1_8B_HERMES_3"},{no:177,name:"MODEL_LLAMA_3_1_70B_HERMES_3"},{no:178,name:"MODEL_QWEN_2_5_7B_INSTRUCT"},{no:179,name:"MODEL_QWEN_2_5_32B_INSTRUCT"},{no:180,name:"MODEL_QWEN_2_5_72B_INSTRUCT"},{no:224,name:"MODEL_QWEN_2_5_32B_INSTRUCT_R1"},{no:324,name:"MODEL_QWEN_3_235B_INSTRUCT"},{no:325,name:"MODEL_QWEN_3_CODER_480B_INSTRUCT"},{no:327,name:"MODEL_QWEN_3_CODER_480B_INSTRUCT_FAST"},{no:342,name:"MODEL_GLM_4_5"},{no:352,name:"MODEL_GLM_4_5_FAST"},{no:356,name:"MODEL_GLM_4_6"},{no:357,name:"MODEL_GLM_4_6_FAST"},{no:417,name:"MODEL_GLM_4_7"},{no:418,name:"MODEL_GLM_4_7_FAST"},{no:359,name:"MODEL_SWE_1_5"},{no:361,name:"MODEL_SWE_1_5_REDIRECT"},{no:369,name:"MODEL_SWE_1_5_THINKING"},{no:377,name:"MODEL_SWE_1_5_SLOW"},{no:420,name:"MODEL_SWE_1_6"},{no:421,name:"MODEL_SWE_1_6_FAST"},{no:358,name:"MODEL_CODEMAP_SMALL"},{no:360,name:"MODEL_CODEMAP_MEDIUM"},{no:362,name:"MODEL_CODEMAP_SMART"},{no:355,name:"MODEL_COGNITION_INSTANT_CONTEXT"},{no:335,name:"MODEL_LLAMA_FT_DEEPWIKI_ARTICLE"},{no:336,name:"MODEL_LLAMA_FT_DEEPWIKI_HOVER"},{no:398,name:"MODEL_LLAMA_FT_LIFEGUARD"},{no:410,name:"MODEL_COGNITION_LIFEGUARD"},{no:89,name:"MODEL_NOMIC_TEXT_EMBEDDING_V1"},{no:90,name:"MODEL_NOMIC_TEXT_EMBEDDING_V1_5"},{no:77,name:"MODEL_MISTRAL_7B"},{no:99,name:"MODEL_SALESFORCE_EMBEDDING_2R"},{no:182,name:"MODEL_CUSTOM_VLLM"},{no:92,name:"MODEL_TEI_BGE_M3"},{no:93,name:"MODEL_TEI_NOMIC_EMBED_TEXT_V1"},{no:94,name:"MODEL_TEI_INTFLOAT_E5_LARGE_INSTRUCT"},{no:95,name:"MODEL_TEI_SNOWFLAKE_ARCTIC_EMBED_L"},{no:96,name:"MODEL_TEI_UAE_CODE_LARGE_V1"},{no:97,name:"MODEL_TEI_B1ADE"},{no:98,name:"MODEL_TEI_WHEREISAI_UAE_LARGE_V1"},{no:100,name:"MODEL_TEI_WHEREISAI_UAE_CODE_LARGE_V1"},{no:200,name:"MODEL_OPENAI_COMPATIBLE"},{no:201,name:"MODEL_ANTHROPIC_COMPATIBLE"},{no:202,name:"MODEL_VERTEX_COMPATIBLE"},{no:203,name:"MODEL_BEDROCK_COMPATIBLE"},{no:204,name:"MODEL_AZURE_COMPATIBLE"},{no:205,name:"MODEL_DEEPSEEK_V3"},{no:206,name:"MODEL_DEEPSEEK_R1"},{no:215,name:"MODEL_DEEPSEEK_R1_SLOW"},{no:216,name:"MODEL_DEEPSEEK_R1_FAST"},{no:323,name:"MODEL_KIMI_K2"},{no:368,name:"MODEL_MINIMAX_M2"},{no:419,name:"MODEL_MINIMAX_M2_1"},{no:409,name:"MODEL_DEEPSEEK_V3_2"},{no:394,name:"MODEL_KIMI_K2_THINKING"},{no:185,name:"MODEL_CUSTOM_OPEN_ROUTER"},{no:212,name:"MODEL_XAI_GROK_2"},{no:217,name:"MODEL_XAI_GROK_3"},{no:234,name:"MODEL_XAI_GROK_3_MINI_REASONING"},{no:345,name:"MODEL_XAI_GROK_CODE_FAST"},{no:219,name:"MODEL_PRIVATE_1"},{no:220,name:"MODEL_PRIVATE_2"},{no:221,name:"MODEL_PRIVATE_3"},{no:222,name:"MODEL_PRIVATE_4"},{no:223,name:"MODEL_PRIVATE_5"},{no:314,name:"MODEL_PRIVATE_6"},{no:315,name:"MODEL_PRIVATE_7"},{no:316,name:"MODEL_PRIVATE_8"},{no:317,name:"MODEL_PRIVATE_9"},{no:318,name:"MODEL_PRIVATE_10"},{no:347,name:"MODEL_PRIVATE_11"},{no:348,name:"MODEL_PRIVATE_12"},{no:349,name:"MODEL_PRIVATE_13"},{no:350,name:"MODEL_PRIVATE_14"},{no:351,name:"MODEL_PRIVATE_15"},{no:363,name:"MODEL_PRIVATE_16"},{no:364,name:"MODEL_PRIVATE_17"},{no:365,name:"MODEL_PRIVATE_18"},{no:366,name:"MODEL_PRIVATE_19"},{no:367,name:"MODEL_PRIVATE_20"},{no:372,name:"MODEL_PRIVATE_21"},{no:373,name:"MODEL_PRIVATE_22"},{no:374,name:"MODEL_PRIVATE_23"},{no:375,name:"MODEL_PRIVATE_24"},{no:376,name:"MODEL_PRIVATE_25"},{no:380,name:"MODEL_PRIVATE_26"},{no:381,name:"MODEL_PRIVATE_27"},{no:382,name:"MODEL_PRIVATE_28"},{no:383,name:"MODEL_PRIVATE_29"},{no:384,name:"MODEL_PRIVATE_30"},{no:399,name:"MODEL_GPT_5_2_NONE"},{no:400,name:"MODEL_GPT_5_2_LOW"},{no:401,name:"MODEL_GPT_5_2_MEDIUM"},{no:402,name:"MODEL_GPT_5_2_HIGH"},{no:403,name:"MODEL_GPT_5_2_XHIGH"},{no:404,name:"MODEL_GPT_5_2_NONE_PRIORITY"},{no:405,name:"MODEL_GPT_5_2_LOW_PRIORITY"},{no:406,name:"MODEL_GPT_5_2_MEDIUM_PRIORITY"},{no:407,name:"MODEL_GPT_5_2_HIGH_PRIORITY"},{no:408,name:"MODEL_GPT_5_2_XHIGH_PRIORITY"},{no:422,name:"MODEL_GPT_5_2_CODEX_LOW"},{no:423,name:"MODEL_GPT_5_2_CODEX_MEDIUM"},{no:424,name:"MODEL_GPT_5_2_CODEX_HIGH"},{no:425,name:"MODEL_GPT_5_2_CODEX_XHIGH"},{no:426,name:"MODEL_GPT_5_2_CODEX_LOW_PRIORITY"},{no:427,name:"MODEL_GPT_5_2_CODEX_MEDIUM_PRIORITY"},{no:428,name:"MODEL_GPT_5_2_CODEX_HIGH_PRIORITY"},{no:429,name:"MODEL_GPT_5_2_CODEX_XHIGH_PRIORITY"},{no:600,name:"MODEL_SGLANG_ROLLOUT"}]);var uW=(i=>(i[i.UNSPECIFIED=0]="UNSPECIFIED",i[i.CAPACITY_FALLBACK=1]="CAPACITY_FALLBACK",i[i.LITE_FREE=2]="LITE_FREE",i[i.LITE_PAID=3]="LITE_PAID",i[i.PREMIUM=4]="PREMIUM",i))(uW||{});m.util.setEnumType(uW,"exa.codeium_common_pb.DeepWikiModelType",[{no:0,name:"DEEP_WIKI_MODEL_TYPE_UNSPECIFIED"},{no:1,name:"DEEP_WIKI_MODEL_TYPE_CAPACITY_FALLBACK"},{no:2,name:"DEEP_WIKI_MODEL_TYPE_LITE_FREE"},{no:3,name:"DEEP_WIKI_MODEL_TYPE_LITE_PAID"},{no:4,name:"DEEP_WIKI_MODEL_TYPE_PREMIUM"}]);var F1=(i=>(i[i.EXCLUSION_UNSPECIFIED=0]="EXCLUSION_UNSPECIFIED",i[i.EXCLUSION_ELEMENT_KIND_DISABLED=1]="EXCLUSION_ELEMENT_KIND_DISABLED",i[i.EXCLUSION_ELEMENT_MISSING_DEPENDENCY=2]="EXCLUSION_ELEMENT_MISSING_DEPENDENCY",i[i.EXCLUSION_TOKEN_BUDGET=3]="EXCLUSION_TOKEN_BUDGET",i[i.EXCLUSION_ACTIVE_SOURCE_OVERLAP=4]="EXCLUSION_ACTIVE_SOURCE_OVERLAP",i))(F1||{});m.util.setEnumType(F1,"exa.codeium_common_pb.PromptElementExclusionReason",[{no:0,name:"EXCLUSION_UNSPECIFIED"},{no:1,name:"EXCLUSION_ELEMENT_KIND_DISABLED"},{no:2,name:"EXCLUSION_ELEMENT_MISSING_DEPENDENCY"},{no:3,name:"EXCLUSION_TOKEN_BUDGET"},{no:4,name:"EXCLUSION_ACTIVE_SOURCE_OVERLAP"}]);var kh=(I=>(I[I.UNSPECIFIED=0]="UNSPECIFIED",I[I.INCOMPLETE=1]="INCOMPLETE",I[I.STOP_PATTERN=2]="STOP_PATTERN",I[I.MAX_TOKENS=3]="MAX_TOKENS",I[I.MIN_LOG_PROB=4]="MIN_LOG_PROB",I[I.MAX_NEWLINES=5]="MAX_NEWLINES",I[I.EXIT_SCOPE=6]="EXIT_SCOPE",I[I.NONFINITE_LOGIT_OR_PROB=7]="NONFINITE_LOGIT_OR_PROB",I[I.FIRST_NON_WHITESPACE_LINE=8]="FIRST_NON_WHITESPACE_LINE",I[I.PARTIAL=9]="PARTIAL",I[I.FUNCTION_CALL=10]="FUNCTION_CALL",I[I.CONTENT_FILTER=11]="CONTENT_FILTER",I[I.NON_INSERTION=12]="NON_INSERTION",I[I.ERROR=13]="ERROR",I))(kh||{});m.util.setEnumType(kh,"exa.codeium_common_pb.StopReason",[{no:0,name:"STOP_REASON_UNSPECIFIED"},{no:1,name:"STOP_REASON_INCOMPLETE"},{no:2,name:"STOP_REASON_STOP_PATTERN"},{no:3,name:"STOP_REASON_MAX_TOKENS"},{no:4,name:"STOP_REASON_MIN_LOG_PROB"},{no:5,name:"STOP_REASON_MAX_NEWLINES"},{no:6,name:"STOP_REASON_EXIT_SCOPE"},{no:7,name:"STOP_REASON_NONFINITE_LOGIT_OR_PROB"},{no:8,name:"STOP_REASON_FIRST_NON_WHITESPACE_LINE"},{no:9,name:"STOP_REASON_PARTIAL"},{no:10,name:"STOP_REASON_FUNCTION_CALL"},{no:11,name:"STOP_REASON_CONTENT_FILTER"},{no:12,name:"STOP_REASON_NON_INSERTION"},{no:13,name:"STOP_REASON_ERROR"}]);var H1=(c=>(c[c.NONE=0]="NONE",c[c.INCOMPLETE=1]="INCOMPLETE",c[c.EMPTY=2]="EMPTY",c[c.REPETITIVE=3]="REPETITIVE",c[c.DUPLICATE=4]="DUPLICATE",c[c.LONG_LINE=5]="LONG_LINE",c[c.COMPLETIONS_CUTOFF=6]="COMPLETIONS_CUTOFF",c[c.ATTRIBUTION=7]="ATTRIBUTION",c[c.NON_MATCHING=8]="NON_MATCHING",c[c.NON_INSERTION=9]="NON_INSERTION",c))(H1||{});m.util.setEnumType(H1,"exa.codeium_common_pb.FilterReason",[{no:0,name:"FILTER_REASON_NONE"},{no:1,name:"FILTER_REASON_INCOMPLETE"},{no:2,name:"FILTER_REASON_EMPTY"},{no:3,name:"FILTER_REASON_REPETITIVE"},{no:4,name:"FILTER_REASON_DUPLICATE"},{no:5,name:"FILTER_REASON_LONG_LINE"},{no:6,name:"FILTER_REASON_COMPLETIONS_CUTOFF"},{no:7,name:"FILTER_REASON_ATTRIBUTION"},{no:8,name:"FILTER_REASON_NON_MATCHING"},{no:9,name:"FILTER_REASON_NON_INSERTION"}]);var B1=(s=>(s[s.UNSPECIFIED=0]="UNSPECIFIED",s[s.NEW_CODE=1]="NEW_CODE",s[s.NO_LICENSE=2]="NO_LICENSE",s[s.NONPERMISSIVE=3]="NONPERMISSIVE",s[s.PERMISSIVE=4]="PERMISSIVE",s[s.PERMISSIVE_BLOCKED=5]="PERMISSIVE_BLOCKED",s))(B1||{});m.util.setEnumType(B1,"exa.codeium_common_pb.AttributionStatus",[{no:0,name:"ATTRIBUTION_STATUS_UNSPECIFIED"},{no:1,name:"ATTRIBUTION_STATUS_NEW_CODE"},{no:2,name:"ATTRIBUTION_STATUS_NO_LICENSE"},{no:3,name:"ATTRIBUTION_STATUS_NONPERMISSIVE"},{no:4,name:"ATTRIBUTION_STATUS_PERMISSIVE"},{no:5,name:"ATTRIBUTION_STATUS_PERMISSIVE_BLOCKED"}]);var V1=(n=>(n[n.UNSPECIFIED=0]="UNSPECIFIED",n[n.HIGH=1]="HIGH",n[n.LOW=2]="LOW",n))(V1||{});m.util.setEnumType(V1,"exa.codeium_common_pb.EmbeddingPriority",[{no:0,name:"EMBEDDING_PRIORITY_UNSPECIFIED"},{no:1,name:"EMBEDDING_PRIORITY_HIGH"},{no:2,name:"EMBEDDING_PRIORITY_LOW"}]);var W1=(i=>(i[i.UNSPECIFIED=0]="UNSPECIFIED",i[i.NOMIC_DOCUMENT=1]="NOMIC_DOCUMENT",i[i.NOMIC_SEARCH=2]="NOMIC_SEARCH",i[i.NOMIC_CLASSIFICATION=3]="NOMIC_CLASSIFICATION",i[i.NOMIC_CLUSTERING=4]="NOMIC_CLUSTERING",i))(W1||{});m.util.setEnumType(W1,"exa.codeium_common_pb.EmbeddingPrefix",[{no:0,name:"EMBEDDING_PREFIX_UNSPECIFIED"},{no:1,name:"EMBEDDING_PREFIX_NOMIC_DOCUMENT"},{no:2,name:"EMBEDDING_PREFIX_NOMIC_SEARCH"},{no:3,name:"EMBEDDING_PREFIX_NOMIC_CLASSIFICATION"},{no:4,name:"EMBEDDING_PREFIX_NOMIC_CLUSTERING"}]);var $1=(n=>(n[n.UNSPECIFIED=0]="UNSPECIFIED",n[n.CODE_CONTEXT_ITEM=1]="CODE_CONTEXT_ITEM",n[n.COMMIT_INTENT=2]="COMMIT_INTENT",n))($1||{});m.util.setEnumType($1,"exa.codeium_common_pb.EmbeddingSource",[{no:0,name:"EMBEDDING_SOURCE_UNSPECIFIED"},{no:1,name:"EMBEDDING_SOURCE_CODE_CONTEXT_ITEM"},{no:2,name:"EMBEDDING_SOURCE_COMMIT_INTENT"}]);var G1=(d=>(d[d.CODEIUM=0]="CODEIUM",d[d.DEEPNOTE=1]="DEEPNOTE",d[d.CODESANDBOX=2]="CODESANDBOX",d[d.STACKBLITZ=3]="STACKBLITZ",d[d.VALTOWN=4]="VALTOWN",d[d.HEX=5]="HEX",d[d.ZAPIER=6]="ZAPIER",d[d.SUPERBLOCKS=7]="SUPERBLOCKS",d[d.EMBARCADERO=8]="EMBARCADERO",d))(G1||{});m.util.setEnumType(G1,"exa.codeium_common_pb.AuthSource",[{no:0,name:"AUTH_SOURCE_CODEIUM"},{no:1,name:"AUTH_SOURCE_DEEPNOTE"},{no:2,name:"AUTH_SOURCE_CODESANDBOX"},{no:3,name:"AUTH_SOURCE_STACKBLITZ"},{no:4,name:"AUTH_SOURCE_VALTOWN"},{no:5,name:"AUTH_SOURCE_HEX"},{no:6,name:"AUTH_SOURCE_ZAPIER"},{no:7,name:"AUTH_SOURCE_SUPERBLOCKS"},{no:8,name:"AUTH_SOURCE_EMBARCADERO"}]);var z1=(I=>(I[I.UNSPECIFIED=0]="UNSPECIFIED",I[I.ENABLE_CODEIUM=1]="ENABLE_CODEIUM",I[I.DISABLE_CODEIUM=2]="DISABLE_CODEIUM",I[I.SHOW_PREVIOUS_COMPLETION=3]="SHOW_PREVIOUS_COMPLETION",I[I.SHOW_NEXT_COMPLETION=4]="SHOW_NEXT_COMPLETION",I[I.COPILOT_STATUS=5]="COPILOT_STATUS",I[I.COMPLETION_SUPPRESSED=6]="COMPLETION_SUPPRESSED",I[I.MEMORY_STATS=8]="MEMORY_STATS",I[I.LOCAL_CONTEXT_RELEVANCE_CHECK=9]="LOCAL_CONTEXT_RELEVANCE_CHECK",I[I.ACTIVE_EDITOR_CHANGED=10]="ACTIVE_EDITOR_CHANGED",I[I.SHOW_PREVIOUS_CORTEX_STEP=11]="SHOW_PREVIOUS_CORTEX_STEP",I[I.SHOW_NEXT_CORTEX_STEP=12]="SHOW_NEXT_CORTEX_STEP",I[I.INDEXER_STATS=13]="INDEXER_STATS",I[I.SYSTEM_METRICS_TELEMETRY=14]="SYSTEM_METRICS_TELEMETRY",I))(z1||{});m.util.setEnumType(z1,"exa.codeium_common_pb.EventType",[{no:0,name:"EVENT_TYPE_UNSPECIFIED"},{no:1,name:"EVENT_TYPE_ENABLE_CODEIUM"},{no:2,name:"EVENT_TYPE_DISABLE_CODEIUM"},{no:3,name:"EVENT_TYPE_SHOW_PREVIOUS_COMPLETION"},{no:4,name:"EVENT_TYPE_SHOW_NEXT_COMPLETION"},{no:5,name:"EVENT_TYPE_COPILOT_STATUS"},{no:6,name:"EVENT_TYPE_COMPLETION_SUPPRESSED"},{no:8,name:"EVENT_TYPE_MEMORY_STATS"},{no:9,name:"EVENT_TYPE_LOCAL_CONTEXT_RELEVANCE_CHECK"},{no:10,name:"EVENT_TYPE_ACTIVE_EDITOR_CHANGED"},{no:11,name:"EVENT_TYPE_SHOW_PREVIOUS_CORTEX_STEP"},{no:12,name:"EVENT_TYPE_SHOW_NEXT_CORTEX_STEP"},{no:13,name:"EVENT_TYPE_INDEXER_STATS"},{no:14,name:"EVENT_TYPE_SYSTEM_METRICS_TELEMETRY"}]);var q1=(n=>(n[n.UNSPECIFIED=0]="UNSPECIFIED",n[n.CLUSTER=1]="CLUSTER",n[n.EXACT=2]="EXACT",n))(q1||{});m.util.setEnumType(q1,"exa.codeium_common_pb.SearchResultType",[{no:0,name:"SEARCH_RESULT_TYPE_UNSPECIFIED"},{no:1,name:"SEARCH_RESULT_TYPE_CLUSTER"},{no:2,name:"SEARCH_RESULT_TYPE_EXACT"}]);var K1=(l=>(l[l.UNSPECIFIED=0]="UNSPECIFIED",l[l.RAW_SOURCE=1]="RAW_SOURCE",l[l.DOCSTRING=2]="DOCSTRING",l[l.FUNCTION=3]="FUNCTION",l[l.NODEPATH=4]="NODEPATH",l[l.DECLARATION=5]="DECLARATION",l[l.NAIVE_CHUNK=6]="NAIVE_CHUNK",l[l.SIGNATURE=7]="SIGNATURE",l))(K1||{});m.util.setEnumType(K1,"exa.codeium_common_pb.EmbedType",[{no:0,name:"EMBED_TYPE_UNSPECIFIED"},{no:1,name:"EMBED_TYPE_RAW_SOURCE"},{no:2,name:"EMBED_TYPE_DOCSTRING"},{no:3,name:"EMBED_TYPE_FUNCTION"},{no:4,name:"EMBED_TYPE_NODEPATH"},{no:5,name:"EMBED_TYPE_DECLARATION"},{no:6,name:"EMBED_TYPE_NAIVE_CHUNK"},{no:7,name:"EMBED_TYPE_SIGNATURE"}]);var pW=(o=>(o[o.UNSPECIFIED=0]="UNSPECIFIED",o[o.TYPING_AS_SUGGESTED=1]="TYPING_AS_SUGGESTED",o[o.CACHE=2]="CACHE",o[o.NETWORK=3]="NETWORK",o))(pW||{});m.util.setEnumType(pW,"exa.codeium_common_pb.CompletionSource",[{no:0,name:"COMPLETION_SOURCE_UNSPECIFIED"},{no:1,name:"COMPLETION_SOURCE_TYPING_AS_SUGGESTED"},{no:2,name:"COMPLETION_SOURCE_CACHE"},{no:3,name:"COMPLETION_SOURCE_NETWORK"}]);var mW=(i=>(i[i.UNSPECIFIED=0]="UNSPECIFIED",i[i.SINGLE=1]="SINGLE",i[i.MULTI=2]="MULTI",i[i.INLINE_FIM=3]="INLINE_FIM",i[i.CASCADE=4]="CASCADE",i))(mW||{});m.util.setEnumType(mW,"exa.codeium_common_pb.CompletionType",[{no:0,name:"COMPLETION_TYPE_UNSPECIFIED"},{no:1,name:"COMPLETION_TYPE_SINGLE"},{no:2,name:"COMPLETION_TYPE_MULTI"},{no:3,name:"COMPLETION_TYPE_INLINE_FIM"},{no:4,name:"COMPLETION_TYPE_CASCADE"}]);var ns=(W=>(W[W.UNSPECIFIED=0]="UNSPECIFIED",W[W.C=1]="C",W[W.CLOJURE=2]="CLOJURE",W[W.COFFEESCRIPT=3]="COFFEESCRIPT",W[W.CPP=4]="CPP",W[W.CSHARP=5]="CSHARP",W[W.CSS=6]="CSS",W[W.CUDACPP=7]="CUDACPP",W[W.DOCKERFILE=8]="DOCKERFILE",W[W.GO=9]="GO",W[W.GROOVY=10]="GROOVY",W[W.HANDLEBARS=11]="HANDLEBARS",W[W.HASKELL=12]="HASKELL",W[W.HCL=13]="HCL",W[W.HTML=14]="HTML",W[W.INI=15]="INI",W[W.JAVA=16]="JAVA",W[W.JAVASCRIPT=17]="JAVASCRIPT",W[W.JSON=18]="JSON",W[W.JULIA=19]="JULIA",W[W.KOTLIN=20]="KOTLIN",W[W.LATEX=21]="LATEX",W[W.LESS=22]="LESS",W[W.LUA=23]="LUA",W[W.MAKEFILE=24]="MAKEFILE",W[W.MARKDOWN=25]="MARKDOWN",W[W.OBJECTIVEC=26]="OBJECTIVEC",W[W.OBJECTIVECPP=27]="OBJECTIVECPP",W[W.PERL=28]="PERL",W[W.PHP=29]="PHP",W[W.PLAINTEXT=30]="PLAINTEXT",W[W.PROTOBUF=31]="PROTOBUF",W[W.PBTXT=32]="PBTXT",W[W.PYTHON=33]="PYTHON",W[W.R=34]="R",W[W.RUBY=35]="RUBY",W[W.RUST=36]="RUST",W[W.SASS=37]="SASS",W[W.SCALA=38]="SCALA",W[W.SCSS=39]="SCSS",W[W.SHELL=40]="SHELL",W[W.SQL=41]="SQL",W[W.STARLARK=42]="STARLARK",W[W.SWIFT=43]="SWIFT",W[W.TSX=44]="TSX",W[W.TYPESCRIPT=45]="TYPESCRIPT",W[W.VISUALBASIC=46]="VISUALBASIC",W[W.VUE=47]="VUE",W[W.XML=48]="XML",W[W.XSL=49]="XSL",W[W.YAML=50]="YAML",W[W.SVELTE=51]="SVELTE",W[W.TOML=52]="TOML",W[W.DART=53]="DART",W[W.RST=54]="RST",W[W.OCAML=55]="OCAML",W[W.CMAKE=56]="CMAKE",W[W.PASCAL=57]="PASCAL",W[W.ELIXIR=58]="ELIXIR",W[W.FSHARP=59]="FSHARP",W[W.LISP=60]="LISP",W[W.MATLAB=61]="MATLAB",W[W.POWERSHELL=62]="POWERSHELL",W[W.SOLIDITY=63]="SOLIDITY",W[W.ADA=64]="ADA",W[W.OCAML_INTERFACE=65]="OCAML_INTERFACE",W[W.TREE_SITTER_QUERY=66]="TREE_SITTER_QUERY",W[W.APL=67]="APL",W[W.ASSEMBLY=68]="ASSEMBLY",W[W.COBOL=69]="COBOL",W[W.CRYSTAL=70]="CRYSTAL",W[W.EMACS_LISP=71]="EMACS_LISP",W[W.ERLANG=72]="ERLANG",W[W.FORTRAN=73]="FORTRAN",W[W.FREEFORM=74]="FREEFORM",W[W.GRADLE=75]="GRADLE",W[W.HACK=76]="HACK",W[W.MAVEN=77]="MAVEN",W[W.M68KASSEMBLY=78]="M68KASSEMBLY",W[W.SAS=79]="SAS",W[W.UNIXASSEMBLY=80]="UNIXASSEMBLY",W[W.VBA=81]="VBA",W[W.VIMSCRIPT=82]="VIMSCRIPT",W[W.WEBASSEMBLY=83]="WEBASSEMBLY",W[W.BLADE=84]="BLADE",W[W.ASTRO=85]="ASTRO",W[W.MUMPS=86]="MUMPS",W[W.GDSCRIPT=87]="GDSCRIPT",W[W.NIM=88]="NIM",W[W.PROLOG=89]="PROLOG",W[W.MARKDOWN_INLINE=90]="MARKDOWN_INLINE",W[W.APEX=91]="APEX",W[W.JUPYTER_NOTEBOOK=92]="JUPYTER_NOTEBOOK",W))(ns||{});m.util.setEnumType(ns,"exa.codeium_common_pb.Language",[{no:0,name:"LANGUAGE_UNSPECIFIED"},{no:1,name:"LANGUAGE_C"},{no:2,name:"LANGUAGE_CLOJURE"},{no:3,name:"LANGUAGE_COFFEESCRIPT"},{no:4,name:"LANGUAGE_CPP"},{no:5,name:"LANGUAGE_CSHARP"},{no:6,name:"LANGUAGE_CSS"},{no:7,name:"LANGUAGE_CUDACPP"},{no:8,name:"LANGUAGE_DOCKERFILE"},{no:9,name:"LANGUAGE_GO"},{no:10,name:"LANGUAGE_GROOVY"},{no:11,name:"LANGUAGE_HANDLEBARS"},{no:12,name:"LANGUAGE_HASKELL"},{no:13,name:"LANGUAGE_HCL"},{no:14,name:"LANGUAGE_HTML"},{no:15,name:"LANGUAGE_INI"},{no:16,name:"LANGUAGE_JAVA"},{no:17,name:"LANGUAGE_JAVASCRIPT"},{no:18,name:"LANGUAGE_JSON"},{no:19,name:"LANGUAGE_JULIA"},{no:20,name:"LANGUAGE_KOTLIN"},{no:21,name:"LANGUAGE_LATEX"},{no:22,name:"LANGUAGE_LESS"},{no:23,name:"LANGUAGE_LUA"},{no:24,name:"LANGUAGE_MAKEFILE"},{no:25,name:"LANGUAGE_MARKDOWN"},{no:26,name:"LANGUAGE_OBJECTIVEC"},{no:27,name:"LANGUAGE_OBJECTIVECPP"},{no:28,name:"LANGUAGE_PERL"},{no:29,name:"LANGUAGE_PHP"},{no:30,name:"LANGUAGE_PLAINTEXT"},{no:31,name:"LANGUAGE_PROTOBUF"},{no:32,name:"LANGUAGE_PBTXT"},{no:33,name:"LANGUAGE_PYTHON"},{no:34,name:"LANGUAGE_R"},{no:35,name:"LANGUAGE_RUBY"},{no:36,name:"LANGUAGE_RUST"},{no:37,name:"LANGUAGE_SASS"},{no:38,name:"LANGUAGE_SCALA"},{no:39,name:"LANGUAGE_SCSS"},{no:40,name:"LANGUAGE_SHELL"},{no:41,name:"LANGUAGE_SQL"},{no:42,name:"LANGUAGE_STARLARK"},{no:43,name:"LANGUAGE_SWIFT"},{no:44,name:"LANGUAGE_TSX"},{no:45,name:"LANGUAGE_TYPESCRIPT"},{no:46,name:"LANGUAGE_VISUALBASIC"},{no:47,name:"LANGUAGE_VUE"},{no:48,name:"LANGUAGE_XML"},{no:49,name:"LANGUAGE_XSL"},{no:50,name:"LANGUAGE_YAML"},{no:51,name:"LANGUAGE_SVELTE"},{no:52,name:"LANGUAGE_TOML"},{no:53,name:"LANGUAGE_DART"},{no:54,name:"LANGUAGE_RST"},{no:55,name:"LANGUAGE_OCAML"},{no:56,name:"LANGUAGE_CMAKE"},{no:57,name:"LANGUAGE_PASCAL"},{no:58,name:"LANGUAGE_ELIXIR"},{no:59,name:"LANGUAGE_FSHARP"},{no:60,name:"LANGUAGE_LISP"},{no:61,name:"LANGUAGE_MATLAB"},{no:62,name:"LANGUAGE_POWERSHELL"},{no:63,name:"LANGUAGE_SOLIDITY"},{no:64,name:"LANGUAGE_ADA"},{no:65,name:"LANGUAGE_OCAML_INTERFACE"},{no:66,name:"LANGUAGE_TREE_SITTER_QUERY"},{no:67,name:"LANGUAGE_APL"},{no:68,name:"LANGUAGE_ASSEMBLY"},{no:69,name:"LANGUAGE_COBOL"},{no:70,name:"LANGUAGE_CRYSTAL"},{no:71,name:"LANGUAGE_EMACS_LISP"},{no:72,name:"LANGUAGE_ERLANG"},{no:73,name:"LANGUAGE_FORTRAN"},{no:74,name:"LANGUAGE_FREEFORM"},{no:75,name:"LANGUAGE_GRADLE"},{no:76,name:"LANGUAGE_HACK"},{no:77,name:"LANGUAGE_MAVEN"},{no:78,name:"LANGUAGE_M68KASSEMBLY"},{no:79,name:"LANGUAGE_SAS"},{no:80,name:"LANGUAGE_UNIXASSEMBLY"},{no:81,name:"LANGUAGE_VBA"},{no:82,name:"LANGUAGE_VIMSCRIPT"},{no:83,name:"LANGUAGE_WEBASSEMBLY"},{no:84,name:"LANGUAGE_BLADE"},{no:85,name:"LANGUAGE_ASTRO"},{no:86,name:"LANGUAGE_MUMPS"},{no:87,name:"LANGUAGE_GDSCRIPT"},{no:88,name:"LANGUAGE_NIM"},{no:89,name:"LANGUAGE_PROLOG"},{no:90,name:"LANGUAGE_MARKDOWN_INLINE"},{no:91,name:"LANGUAGE_APEX"},{no:92,name:"LANGUAGE_JUPYTER_NOTEBOOK"}]);var fW=(s=>(s[s.UNSPECIFIED=0]="UNSPECIFIED",s[s.USER=1]="USER",s[s.SYSTEM=2]="SYSTEM",s[s.UNKNOWN=3]="UNKNOWN",s[s.TOOL=4]="TOOL",s[s.SYSTEM_PROMPT=5]="SYSTEM_PROMPT",s))(fW||{});m.util.setEnumType(fW,"exa.codeium_common_pb.ChatMessageSource",[{no:0,name:"CHAT_MESSAGE_SOURCE_UNSPECIFIED"},{no:1,name:"CHAT_MESSAGE_SOURCE_USER"},{no:2,name:"CHAT_MESSAGE_SOURCE_SYSTEM"},{no:3,name:"CHAT_MESSAGE_SOURCE_UNKNOWN"},{no:4,name:"CHAT_MESSAGE_SOURCE_TOOL"},{no:5,name:"CHAT_MESSAGE_SOURCE_SYSTEM_PROMPT"}]);var ZS=(o=>(o[o.UNSPECIFIED=0]="UNSPECIFIED",o[o.PENDING=1]="PENDING",o[o.APPROVED=2]="APPROVED",o[o.REJECTED=3]="REJECTED",o))(ZS||{});m.util.setEnumType(ZS,"exa.codeium_common_pb.UserTeamStatus",[{no:0,name:"USER_TEAM_STATUS_UNSPECIFIED"},{no:1,name:"USER_TEAM_STATUS_PENDING"},{no:2,name:"USER_TEAM_STATUS_APPROVED"},{no:3,name:"USER_TEAM_STATUS_REJECTED"}]);var gW=(n=>(n[n.UNSPECIFIED=0]="UNSPECIFIED",n[n.ENABLED=1]="ENABLED",n[n.DISABLED=2]="DISABLED",n))(gW||{});m.util.setEnumType(gW,"exa.codeium_common_pb.CliAccessOverride",[{no:0,name:"CLI_ACCESS_OVERRIDE_UNSPECIFIED"},{no:1,name:"CLI_ACCESS_OVERRIDE_ENABLED"},{no:2,name:"CLI_ACCESS_OVERRIDE_DISABLED"}]);var J1=(l=>(l[l.UNSPECIFIED=0]="UNSPECIFIED",l[l.SSO=1]="SSO",l[l.ATTRIBUTION=2]="ATTRIBUTION",l[l.PHI=3]="PHI",l[l.CORTEX=4]="CORTEX",l[l.OPENAI_DISABLED=5]="OPENAI_DISABLED",l[l.REMOTE_INDEXING_DISABLED=6]="REMOTE_INDEXING_DISABLED",l[l.API_KEY_ENABLED=7]="API_KEY_ENABLED",l))(J1||{});m.util.setEnumType(J1,"exa.codeium_common_pb.TeamsFeatures",[{no:0,name:"TEAMS_FEATURES_UNSPECIFIED"},{no:1,name:"TEAMS_FEATURES_SSO"},{no:2,name:"TEAMS_FEATURES_ATTRIBUTION"},{no:3,name:"TEAMS_FEATURES_PHI"},{no:4,name:"TEAMS_FEATURES_CORTEX"},{no:5,name:"TEAMS_FEATURES_OPENAI_DISABLED"},{no:6,name:"TEAMS_FEATURES_REMOTE_INDEXING_DISABLED"},{no:7,name:"TEAMS_FEATURES_API_KEY_ENABLED"}]);var j1=(n=>(n[n.UNSPECIFIED=0]="UNSPECIFIED",n[n.CORTEX=1]="CORTEX",n[n.CORTEX_TEST=2]="CORTEX_TEST",n))(j1||{});m.util.setEnumType(j1,"exa.codeium_common_pb.UserFeatures",[{no:0,name:"USER_FEATURES_UNSPECIFIED"},{no:1,name:"USER_FEATURES_CORTEX"},{no:2,name:"USER_FEATURES_CORTEX_TEST"}]);var Q1=(z=>(z[z.UNSPECIFIED=0]="UNSPECIFIED",z[z.ATTRIBUTION_READ=1]="ATTRIBUTION_READ",z[z.ANALYTICS_READ=2]="ANALYTICS_READ",z[z.LICENSE_READ=3]="LICENSE_READ",z[z.TEAM_USER_READ=4]="TEAM_USER_READ",z[z.TEAM_USER_UPDATE=5]="TEAM_USER_UPDATE",z[z.TEAM_USER_DELETE=6]="TEAM_USER_DELETE",z[z.TEAM_USER_INVITE=17]="TEAM_USER_INVITE",z[z.INDEXING_READ=7]="INDEXING_READ",z[z.INDEXING_CREATE=8]="INDEXING_CREATE",z[z.INDEXING_UPDATE=9]="INDEXING_UPDATE",z[z.INDEXING_DELETE=10]="INDEXING_DELETE",z[z.INDEXING_MANAGEMENT=27]="INDEXING_MANAGEMENT",z[z.FINETUNING_READ=19]="FINETUNING_READ",z[z.FINETUNING_CREATE=20]="FINETUNING_CREATE",z[z.FINETUNING_UPDATE=21]="FINETUNING_UPDATE",z[z.FINETUNING_DELETE=22]="FINETUNING_DELETE",z[z.SSO_READ=11]="SSO_READ",z[z.SSO_WRITE=12]="SSO_WRITE",z[z.SERVICE_KEY_READ=13]="SERVICE_KEY_READ",z[z.SERVICE_KEY_CREATE=14]="SERVICE_KEY_CREATE",z[z.SERVICE_KEY_UPDATE=28]="SERVICE_KEY_UPDATE",z[z.SERVICE_KEY_DELETE=15]="SERVICE_KEY_DELETE",z[z.ROLE_READ=23]="ROLE_READ",z[z.ROLE_CREATE=24]="ROLE_CREATE",z[z.ROLE_UPDATE=25]="ROLE_UPDATE",z[z.ROLE_DELETE=26]="ROLE_DELETE",z[z.BILLING_READ=16]="BILLING_READ",z[z.BILLING_WRITE=18]="BILLING_WRITE",z[z.EXTERNAL_CHAT_UPDATE=29]="EXTERNAL_CHAT_UPDATE",z[z.TEAM_SETTINGS_READ=30]="TEAM_SETTINGS_READ",z[z.TEAM_SETTINGS_UPDATE=31]="TEAM_SETTINGS_UPDATE",z))(Q1||{});m.util.setEnumType(Q1,"exa.codeium_common_pb.Permission",[{no:0,name:"PERMISSION_UNSPECIFIED"},{no:1,name:"PERMISSION_ATTRIBUTION_READ"},{no:2,name:"PERMISSION_ANALYTICS_READ"},{no:3,name:"PERMISSION_LICENSE_READ"},{no:4,name:"PERMISSION_TEAM_USER_READ"},{no:5,name:"PERMISSION_TEAM_USER_UPDATE"},{no:6,name:"PERMISSION_TEAM_USER_DELETE"},{no:17,name:"PERMISSION_TEAM_USER_INVITE"},{no:7,name:"PERMISSION_INDEXING_READ"},{no:8,name:"PERMISSION_INDEXING_CREATE"},{no:9,name:"PERMISSION_INDEXING_UPDATE"},{no:10,name:"PERMISSION_INDEXING_DELETE"},{no:27,name:"PERMISSION_INDEXING_MANAGEMENT"},{no:19,name:"PERMISSION_FINETUNING_READ"},{no:20,name:"PERMISSION_FINETUNING_CREATE"},{no:21,name:"PERMISSION_FINETUNING_UPDATE"},{no:22,name:"PERMISSION_FINETUNING_DELETE"},{no:11,name:"PERMISSION_SSO_READ"},{no:12,name:"PERMISSION_SSO_WRITE"},{no:13,name:"PERMISSION_SERVICE_KEY_READ"},{no:14,name:"PERMISSION_SERVICE_KEY_CREATE"},{no:28,name:"PERMISSION_SERVICE_KEY_UPDATE"},{no:15,name:"PERMISSION_SERVICE_KEY_DELETE"},{no:23,name:"PERMISSION_ROLE_READ"},{no:24,name:"PERMISSION_ROLE_CREATE"},{no:25,name:"PERMISSION_ROLE_UPDATE"},{no:26,name:"PERMISSION_ROLE_DELETE"},{no:16,name:"PERMISSION_BILLING_READ"},{no:18,name:"PERMISSION_BILLING_WRITE"},{no:29,name:"PERMISSION_EXTERNAL_CHAT_UPDATE"},{no:30,name:"PERMISSION_TEAM_SETTINGS_READ"},{no:31,name:"PERMISSION_TEAM_SETTINGS_UPDATE"}]);var Ah=(U=>(U[U.UNSPECIFIED=0]="UNSPECIFIED",U[U.TEAMS=1]="TEAMS",U[U.PRO=2]="PRO",U[U.TRIAL=9]="TRIAL",U[U.ENTERPRISE_SAAS=3]="ENTERPRISE_SAAS",U[U.HYBRID=4]="HYBRID",U[U.ENTERPRISE_SELF_HOSTED=5]="ENTERPRISE_SELF_HOSTED",U[U.ENTERPRISE_SELF_SERVE=10]="ENTERPRISE_SELF_SERVE",U[U.DEVIN_ENTERPRISE=12]="DEVIN_ENTERPRISE",U[U.DEVIN_TEAMS=14]="DEVIN_TEAMS",U[U.DEVIN_TEAMS_V2=15]="DEVIN_TEAMS_V2",U[U.DEVIN_PRO=16]="DEVIN_PRO",U[U.DEVIN_MAX=17]="DEVIN_MAX",U[U.MAX=18]="MAX",U[U.DEVIN_FREE=19]="DEVIN_FREE",U[U.DEVIN_TRIAL=20]="DEVIN_TRIAL",U[U.WAITLIST_PRO=6]="WAITLIST_PRO",U[U.TEAMS_ULTIMATE=7]="TEAMS_ULTIMATE",U[U.PRO_ULTIMATE=8]="PRO_ULTIMATE",U[U.ENTERPRISE_SAAS_POOLED=11]="ENTERPRISE_SAAS_POOLED",U))(Ah||{});m.util.setEnumType(Ah,"exa.codeium_common_pb.TeamsTier",[{no:0,name:"TEAMS_TIER_UNSPECIFIED"},{no:1,name:"TEAMS_TIER_TEAMS"},{no:2,name:"TEAMS_TIER_PRO"},{no:9,name:"TEAMS_TIER_TRIAL"},{no:3,name:"TEAMS_TIER_ENTERPRISE_SAAS"},{no:4,name:"TEAMS_TIER_HYBRID"},{no:5,name:"TEAMS_TIER_ENTERPRISE_SELF_HOSTED"},{no:10,name:"TEAMS_TIER_ENTERPRISE_SELF_SERVE"},{no:12,name:"TEAMS_TIER_DEVIN_ENTERPRISE"},{no:14,name:"TEAMS_TIER_DEVIN_TEAMS"},{no:15,name:"TEAMS_TIER_DEVIN_TEAMS_V2"},{no:16,name:"TEAMS_TIER_DEVIN_PRO"},{no:17,name:"TEAMS_TIER_DEVIN_MAX"},{no:18,name:"TEAMS_TIER_MAX"},{no:19,name:"TEAMS_TIER_DEVIN_FREE"},{no:20,name:"TEAMS_TIER_DEVIN_TRIAL"},{no:6,name:"TEAMS_TIER_WAITLIST_PRO"},{no:7,name:"TEAMS_TIER_TEAMS_ULTIMATE"},{no:8,name:"TEAMS_TIER_PRO_ULTIMATE"},{no:11,name:"TEAMS_TIER_ENTERPRISE_SAAS_POOLED"}]);var ex=(d=>(d[d.UNSPECIFIED=0]="UNSPECIFIED",d[d.WINDSURF=1]="WINDSURF",d[d.OPENAI=2]="OPENAI",d[d.ANTHROPIC=3]="ANTHROPIC",d[d.GOOGLE=4]="GOOGLE",d[d.XAI=5]="XAI",d[d.DEEPSEEK=6]="DEEPSEEK",d[d.MOONSHOT=7]="MOONSHOT",d[d.QWEN=8]="QWEN",d))(ex||{});m.util.setEnumType(ex,"exa.codeium_common_pb.ModelProvider",[{no:0,name:"MODEL_PROVIDER_UNSPECIFIED"},{no:1,name:"MODEL_PROVIDER_WINDSURF"},{no:2,name:"MODEL_PROVIDER_OPENAI"},{no:3,name:"MODEL_PROVIDER_ANTHROPIC"},{no:4,name:"MODEL_PROVIDER_GOOGLE"},{no:5,name:"MODEL_PROVIDER_XAI"},{no:6,name:"MODEL_PROVIDER_DEEPSEEK"},{no:7,name:"MODEL_PROVIDER_MOONSHOT"},{no:8,name:"MODEL_PROVIDER_QWEN"}]);var X1=(o=>(o[o.UNSPECIFIED=0]="UNSPECIFIED",o[o.CREDITS=1]="CREDITS",o[o.QUOTA=2]="QUOTA",o[o.ACU=3]="ACU",o))(X1||{});m.util.setEnumType(X1,"exa.codeium_common_pb.BillingStrategy",[{no:0,name:"BILLING_STRATEGY_UNSPECIFIED"},{no:1,name:"BILLING_STRATEGY_CREDITS"},{no:2,name:"BILLING_STRATEGY_QUOTA"},{no:3,name:"BILLING_STRATEGY_ACU"}]);var Y1=(s=>(s[s.UNSPECIFIED=0]="UNSPECIFIED",s[s.STATIC_CREDIT=1]="STATIC_CREDIT",s[s.API=2]="API",s[s.BYOK=3]="BYOK",s[s.ACU_TOKEN=4]="ACU_TOKEN",s[s.ACU_CREDIT=5]="ACU_CREDIT",s))(Y1||{});m.util.setEnumType(Y1,"exa.codeium_common_pb.ModelPricingType",[{no:0,name:"MODEL_PRICING_TYPE_UNSPECIFIED"},{no:1,name:"MODEL_PRICING_TYPE_STATIC_CREDIT"},{no:2,name:"MODEL_PRICING_TYPE_API"},{no:3,name:"MODEL_PRICING_TYPE_BYOK"},{no:4,name:"MODEL_PRICING_TYPE_ACU_TOKEN"},{no:5,name:"MODEL_PRICING_TYPE_ACU_CREDIT"}]);var Z1=(i=>(i[i.UNSPECIFIED=0]="UNSPECIFIED",i[i.LOW=1]="LOW",i[i.MEDIUM=2]="MEDIUM",i[i.HIGH=3]="HIGH",i[i.FREE=4]="FREE",i))(Z1||{});m.util.setEnumType(Z1,"exa.codeium_common_pb.ModelCostTier",[{no:0,name:"MODEL_COST_TIER_UNSPECIFIED"},{no:1,name:"MODEL_COST_TIER_LOW"},{no:2,name:"MODEL_COST_TIER_MEDIUM"},{no:3,name:"MODEL_COST_TIER_HIGH"},{no:4,name:"MODEL_COST_TIER_FREE"}]);var eL=(e=>(e[e.UNSPECIFIED=0]="UNSPECIFIED",e[e.COST=1]="COST",e))(eL||{});m.util.setEnumType(eL,"exa.codeium_common_pb.ModelDimensionKind",[{no:0,name:"MODEL_DIMENSION_KIND_UNSPECIFIED"},{no:1,name:"MODEL_DIMENSION_KIND_COST"}]);var tL=(i=>(i[i.UNSPECIFIED=0]="UNSPECIFIED",i[i.SUCCEEDED=1]="SUCCEEDED",i[i.PROCESSING=2]="PROCESSING",i[i.FAILED=3]="FAILED",i[i.NO_ACTIVE=4]="NO_ACTIVE",i))(tL||{});m.util.setEnumType(tL,"exa.codeium_common_pb.TransactionStatus",[{no:0,name:"TRANSACTION_STATUS_UNSPECIFIED"},{no:1,name:"TRANSACTION_STATUS_SUCCEEDED"},{no:2,name:"TRANSACTION_STATUS_PROCESSING"},{no:3,name:"TRANSACTION_STATUS_FAILED"},{no:4,name:"TRANSACTION_STATUS_NO_ACTIVE"}]);var nL=(o=>(o[o.UNSPECIFIED=0]="UNSPECIFIED",o[o.NONE=1]="NONE",o[o.ACTIVE=2]="ACTIVE",o[o.EXPIRED=3]="EXPIRED",o))(nL||{});m.util.setEnumType(nL,"exa.codeium_common_pb.GracePeriodStatus",[{no:0,name:"GRACE_PERIOD_STATUS_UNSPECIFIED"},{no:1,name:"GRACE_PERIOD_STATUS_NONE"},{no:2,name:"GRACE_PERIOD_STATUS_ACTIVE"},{no:3,name:"GRACE_PERIOD_STATUS_EXPIRED"}]);var oL=(i=>(i[i.UNSPECIFIED=0]="UNSPECIFIED",i[i.GITHUB=1]="GITHUB",i[i.GITLAB=2]="GITLAB",i[i.BITBUCKET=3]="BITBUCKET",i[i.AZURE_DEVOPS=4]="AZURE_DEVOPS",i))(oL||{});m.util.setEnumType(oL,"exa.codeium_common_pb.ScmProvider",[{no:0,name:"SCM_PROVIDER_UNSPECIFIED"},{no:1,name:"SCM_PROVIDER_GITHUB"},{no:2,name:"SCM_PROVIDER_GITLAB"},{no:3,name:"SCM_PROVIDER_BITBUCKET"},{no:4,name:"SCM_PROVIDER_AZURE_DEVOPS"}]);var hW=(n=>(n[n.UNSPECIFIED=0]="UNSPECIFIED",n[n.GIT=1]="GIT",n[n.PERFORCE=2]="PERFORCE",n))(hW||{});m.util.setEnumType(hW,"exa.codeium_common_pb.ScmType",[{no:0,name:"SCM_TYPE_UNSPECIFIED"},{no:1,name:"SCM_TYPE_GIT"},{no:2,name:"SCM_TYPE_PERFORCE"}]);var rL=(c=>(c[c.UNSPECIFIED=0]="UNSPECIFIED",c[c.FUNCTION=1]="FUNCTION",c[c.CLASS=2]="CLASS",c[c.IMPORT=3]="IMPORT",c[c.NAIVE_LINECHUNK=4]="NAIVE_LINECHUNK",c[c.REFERENCE_FUNCTION=5]="REFERENCE_FUNCTION",c[c.REFERENCE_CLASS=6]="REFERENCE_CLASS",c[c.FILE=7]="FILE",c[c.TERMINAL=8]="TERMINAL",c[c.DIRECTORY=9]="DIRECTORY",c))(rL||{});m.util.setEnumType(rL,"exa.codeium_common_pb.CodeContextType",[{no:0,name:"CODE_CONTEXT_TYPE_UNSPECIFIED"},{no:1,name:"CODE_CONTEXT_TYPE_FUNCTION"},{no:2,name:"CODE_CONTEXT_TYPE_CLASS"},{no:3,name:"CODE_CONTEXT_TYPE_IMPORT"},{no:4,name:"CODE_CONTEXT_TYPE_NAIVE_LINECHUNK"},{no:5,name:"CODE_CONTEXT_TYPE_REFERENCE_FUNCTION"},{no:6,name:"CODE_CONTEXT_TYPE_REFERENCE_CLASS"},{no:7,name:"CODE_CONTEXT_TYPE_FILE"},{no:8,name:"CODE_CONTEXT_TYPE_TERMINAL"},{no:9,name:"CODE_CONTEXT_TYPE_DIRECTORY"}]);var vW=(u=>(u[u.UNSPECIFIED=0]="UNSPECIFIED",u[u.OPEN_DOCS=1]="OPEN_DOCS",u[u.SEARCH_RESULT=2]="SEARCH_RESULT",u[u.IMPORT=3]="IMPORT",u[u.LOCAL_DIRECTORY=4]="LOCAL_DIRECTORY",u[u.LAST_ACTIVE_DOC=5]="LAST_ACTIVE_DOC",u[u.ORACLE_ITEMS=6]="ORACLE_ITEMS",u[u.PINNED_CONTEXT=7]="PINNED_CONTEXT",u[u.RESEARCH_STATE=8]="RESEARCH_STATE",u[u.GROUND_TRUTH_PLAN_EDIT=9]="GROUND_TRUTH_PLAN_EDIT",u[u.COMMIT_GRAPH=10]="COMMIT_GRAPH",u))(vW||{});m.util.setEnumType(vW,"exa.codeium_common_pb.CodeContextSource",[{no:0,name:"CODE_CONTEXT_SOURCE_UNSPECIFIED"},{no:1,name:"CODE_CONTEXT_SOURCE_OPEN_DOCS"},{no:2,name:"CODE_CONTEXT_SOURCE_SEARCH_RESULT"},{no:3,name:"CODE_CONTEXT_SOURCE_IMPORT"},{no:4,name:"CODE_CONTEXT_SOURCE_LOCAL_DIRECTORY"},{no:5,name:"CODE_CONTEXT_SOURCE_LAST_ACTIVE_DOC"},{no:6,name:"CODE_CONTEXT_SOURCE_ORACLE_ITEMS"},{no:7,name:"CODE_CONTEXT_SOURCE_PINNED_CONTEXT"},{no:8,name:"CODE_CONTEXT_SOURCE_RESEARCH_STATE"},{no:9,name:"CODE_CONTEXT_SOURCE_GROUND_TRUTH_PLAN_EDIT"},{no:10,name:"CODE_CONTEXT_SOURCE_COMMIT_GRAPH"}]);var iL=(o=>(o[o.UNSPECIFIED=0]="UNSPECIFIED",o[o.RAW_SOURCE=1]="RAW_SOURCE",o[o.SIGNATURE=2]="SIGNATURE",o[o.NODEPATH=3]="NODEPATH",o))(iL||{});m.util.setEnumType(iL,"exa.codeium_common_pb.ContextSnippetType",[{no:0,name:"CONTEXT_SNIPPET_TYPE_UNSPECIFIED"},{no:1,name:"CONTEXT_SNIPPET_TYPE_RAW_SOURCE"},{no:2,name:"CONTEXT_SNIPPET_TYPE_SIGNATURE"},{no:3,name:"CONTEXT_SNIPPET_TYPE_NODEPATH"}]);var bW=(e=>(e[e.UNSPECIFIED=0]="UNSPECIFIED",e[e.COMMIT_MESSAGE=1]="COMMIT_MESSAGE",e))(bW||{});m.util.setEnumType(bW,"exa.codeium_common_pb.CommitIntentType",[{no:0,name:"COMMIT_INTENT_TYPE_UNSPECIFIED"},{no:1,name:"COMMIT_INTENT_TYPE_COMMIT_MESSAGE"}]);var IW=(a=>(a[a.UNSPECIFIED=0]="UNSPECIFIED",a[a.L4=1]="L4",a[a.T4=2]="T4",a[a.A10=3]="A10",a[a.A100=4]="A100",a[a.V100=5]="V100",a[a.A5000=6]="A5000",a))(IW||{});m.util.setEnumType(IW,"exa.codeium_common_pb.GpuType",[{no:0,name:"GPU_TYPE_UNSPECIFIED"},{no:1,name:"GPU_TYPE_L4"},{no:2,name:"GPU_TYPE_T4"},{no:3,name:"GPU_TYPE_A10"},{no:4,name:"GPU_TYPE_A100"},{no:5,name:"GPU_TYPE_V100"},{no:6,name:"GPU_TYPE_A5000"}]);var yW=(n=>(n[n.UNSPECIFIED=0]="UNSPECIFIED",n[n.INCLUDE=1]="INCLUDE",n[n.EXCLUDE=2]="EXCLUDE",n))(yW||{});m.util.setEnumType(yW,"exa.codeium_common_pb.ContextInclusionType",[{no:0,name:"CONTEXT_INCLUSION_TYPE_UNSPECIFIED"},{no:1,name:"CONTEXT_INCLUSION_TYPE_INCLUDE"},{no:2,name:"CONTEXT_INCLUSION_TYPE_EXCLUDE"}]);var sL=(o=>(o[o.UNSPECIFIED=0]="UNSPECIFIED",o[o.AUTO=1]="AUTO",o[o.LIGHT=2]="LIGHT",o[o.DARK=3]="DARK",o))(sL||{});m.util.setEnumType(sL,"exa.codeium_common_pb.ThemePreference",[{no:0,name:"THEME_PREFERENCE_UNSPECIFIED"},{no:1,name:"THEME_PREFERENCE_AUTO"},{no:2,name:"THEME_PREFERENCE_LIGHT"},{no:3,name:"THEME_PREFERENCE_DARK"}]);var aL=(o=>(o[o.UNSPECIFIED=0]="UNSPECIFIED",o[o.SMALL=1]="SMALL",o[o.DEFAULT=2]="DEFAULT",o[o.LARGE=3]="LARGE",o))(aL||{});m.util.setEnumType(aL,"exa.codeium_common_pb.FontSize",[{no:0,name:"FONT_SIZE_UNSPECIFIED"},{no:1,name:"FONT_SIZE_SMALL"},{no:2,name:"FONT_SIZE_DEFAULT"},{no:3,name:"FONT_SIZE_LARGE"}]);var lL=(o=>(o[o.UNSPECIFIED=0]="UNSPECIFIED",o[o.SLOW=1]="SLOW",o[o.DEFAULT=2]="DEFAULT",o[o.FAST=3]="FAST",o))(lL||{});m.util.setEnumType(lL,"exa.codeium_common_pb.AutocompleteSpeed",[{no:0,name:"AUTOCOMPLETE_SPEED_UNSPECIFIED"},{no:1,name:"AUTOCOMPLETE_SPEED_SLOW"},{no:2,name:"AUTOCOMPLETE_SPEED_DEFAULT"},{no:3,name:"AUTOCOMPLETE_SPEED_FAST"}]);var sm=(i=>(i[i.UNSPECIFIED=0]="UNSPECIFIED",i[i.OFF=1]="OFF",i[i.AUTO=2]="AUTO",i[i.EAGER=3]="EAGER",i[i.DISABLED=4]="DISABLED",i))(sm||{});m.util.setEnumType(sm,"exa.codeium_common_pb.CascadeCommandsAutoExecution",[{no:0,name:"CASCADE_COMMANDS_AUTO_EXECUTION_UNSPECIFIED"},{no:1,name:"CASCADE_COMMANDS_AUTO_EXECUTION_OFF"},{no:2,name:"CASCADE_COMMANDS_AUTO_EXECUTION_AUTO"},{no:3,name:"CASCADE_COMMANDS_AUTO_EXECUTION_EAGER"},{no:4,name:"CASCADE_COMMANDS_AUTO_EXECUTION_DISABLED"}]);var tx=(o=>(o[o.UNSPECIFIED=0]="UNSPECIFIED",o[o.DISABLED=1]="DISABLED",o[o.ALLOWLIST=2]="ALLOWLIST",o[o.TURBO=3]="TURBO",o))(tx||{});m.util.setEnumType(tx,"exa.codeium_common_pb.CascadeWebRequestsAutoExecution",[{no:0,name:"CASCADE_WEB_REQUESTS_AUTO_EXECUTION_UNSPECIFIED"},{no:1,name:"CASCADE_WEB_REQUESTS_AUTO_EXECUTION_DISABLED"},{no:2,name:"CASCADE_WEB_REQUESTS_AUTO_EXECUTION_ALLOWLIST"},{no:3,name:"CASCADE_WEB_REQUESTS_AUTO_EXECUTION_TURBO"}]);var dL=(a=>(a[a.UNSPECIFIED=0]="UNSPECIFIED",a[a.CHAT=1]="CHAT",a[a.PROFILE=2]="PROFILE",a[a.BRAIN=4]="BRAIN",a[a.COMMAND=5]="COMMAND",a[a.CORTEX=6]="CORTEX",a[a.DEBUG=7]="DEBUG",a))(dL||{});m.util.setEnumType(dL,"exa.codeium_common_pb.ExtensionPanelTab",[{no:0,name:"EXTENSION_PANEL_TAB_UNSPECIFIED"},{no:1,name:"EXTENSION_PANEL_TAB_CHAT"},{no:2,name:"EXTENSION_PANEL_TAB_PROFILE"},{no:4,name:"EXTENSION_PANEL_TAB_BRAIN"},{no:5,name:"EXTENSION_PANEL_TAB_COMMAND"},{no:6,name:"EXTENSION_PANEL_TAB_CORTEX"},{no:7,name:"EXTENSION_PANEL_TAB_DEBUG"}]);var cL=(n=>(n[n.UNSPECIFIED=0]="UNSPECIFIED",n[n.ENABLED=1]="ENABLED",n[n.DISABLED=2]="DISABLED",n))(cL||{});m.util.setEnumType(cL,"exa.codeium_common_pb.RememberLastModelSelection",[{no:0,name:"REMEMBER_LAST_MODEL_SELECTION_UNSPECIFIED"},{no:1,name:"REMEMBER_LAST_MODEL_SELECTION_ENABLED"},{no:2,name:"REMEMBER_LAST_MODEL_SELECTION_DISABLED"}]);var nx=(h=>(h[h.CASCADE_NUX_EVENT_UNSPECIFIED=0]="CASCADE_NUX_EVENT_UNSPECIFIED",h[h.CASCADE_NUX_EVENT_DIFF_OVERVIEW=1]="CASCADE_NUX_EVENT_DIFF_OVERVIEW",h[h.CASCADE_NUX_EVENT_WEB_SEARCH=2]="CASCADE_NUX_EVENT_WEB_SEARCH",h[h.CASCADE_NUX_EVENT_NEW_MODELS_WAVE2=3]="CASCADE_NUX_EVENT_NEW_MODELS_WAVE2",h[h.CASCADE_NUX_EVENT_TOOL_CALL=4]="CASCADE_NUX_EVENT_TOOL_CALL",h[h.CASCADE_NUX_EVENT_MODEL_SELECTOR_NUX=5]="CASCADE_NUX_EVENT_MODEL_SELECTOR_NUX",h[h.CASCADE_NUX_EVENT_TOOL_CALL_PRICING_NUX=6]="CASCADE_NUX_EVENT_TOOL_CALL_PRICING_NUX",h[h.CASCADE_NUX_EVENT_WRITE_CHAT_MODE=7]="CASCADE_NUX_EVENT_WRITE_CHAT_MODE",h[h.CASCADE_NUX_EVENT_REVERT_STEP=8]="CASCADE_NUX_EVENT_REVERT_STEP",h[h.CASCADE_NUX_EVENT_RULES=9]="CASCADE_NUX_EVENT_RULES",h[h.CASCADE_NUX_EVENT_WEB_MENTION=10]="CASCADE_NUX_EVENT_WEB_MENTION",h[h.CASCADE_NUX_EVENT_BACKGROUND_CASCADE=11]="CASCADE_NUX_EVENT_BACKGROUND_CASCADE",h[h.CASCADE_NUX_EVENT_ANTHROPIC_API_PRICING=12]="CASCADE_NUX_EVENT_ANTHROPIC_API_PRICING",h[h.CASCADE_NUX_EVENT_PLAN_MODE=13]="CASCADE_NUX_EVENT_PLAN_MODE",h[h.CASCADE_NUX_EVENT_OPEN_BROWSER_URL=14]="CASCADE_NUX_EVENT_OPEN_BROWSER_URL",h))(nx||{});m.util.setEnumType(nx,"exa.codeium_common_pb.CascadeNUXEvent",[{no:0,name:"CASCADE_NUX_EVENT_UNSPECIFIED"},{no:1,name:"CASCADE_NUX_EVENT_DIFF_OVERVIEW"},{no:2,name:"CASCADE_NUX_EVENT_WEB_SEARCH"},{no:3,name:"CASCADE_NUX_EVENT_NEW_MODELS_WAVE2"},{no:4,name:"CASCADE_NUX_EVENT_TOOL_CALL"},{no:5,name:"CASCADE_NUX_EVENT_MODEL_SELECTOR_NUX"},{no:6,name:"CASCADE_NUX_EVENT_TOOL_CALL_PRICING_NUX"},{no:7,name:"CASCADE_NUX_EVENT_WRITE_CHAT_MODE"},{no:8,name:"CASCADE_NUX_EVENT_REVERT_STEP"},{no:9,name:"CASCADE_NUX_EVENT_RULES"},{no:10,name:"CASCADE_NUX_EVENT_WEB_MENTION"},{no:11,name:"CASCADE_NUX_EVENT_BACKGROUND_CASCADE"},{no:12,name:"CASCADE_NUX_EVENT_ANTHROPIC_API_PRICING"},{no:13,name:"CASCADE_NUX_EVENT_PLAN_MODE"},{no:14,name:"CASCADE_NUX_EVENT_OPEN_BROWSER_URL"}]);var uL=(e=>(e[e.USER_NUX_EVENT_UNSPECIFIED=0]="USER_NUX_EVENT_UNSPECIFIED",e[e.USER_NUX_EVENT_DISMISS_WINDSURF_CROSS_SELL=1]="USER_NUX_EVENT_DISMISS_WINDSURF_CROSS_SELL",e))(uL||{});m.util.setEnumType(uL,"exa.codeium_common_pb.UserNUXEvent",[{no:0,name:"USER_NUX_EVENT_UNSPECIFIED"},{no:1,name:"USER_NUX_EVENT_DISMISS_WINDSURF_CROSS_SELL"}]);var pL=(a=>(a[a.UNSPECIFIED=0]="UNSPECIFIED",a[a.DEFAULT=1]="DEFAULT",a[a.READ_ONLY=2]="READ_ONLY",a[a.NO_TOOL=3]="NO_TOOL",a[a.EXPLORE=4]="EXPLORE",a[a.PLANNING=5]="PLANNING",a[a.AUTO=6]="AUTO",a))(pL||{});m.util.setEnumType(pL,"exa.codeium_common_pb.ConversationalPlannerMode",[{no:0,name:"CONVERSATIONAL_PLANNER_MODE_UNSPECIFIED"},{no:1,name:"CONVERSATIONAL_PLANNER_MODE_DEFAULT"},{no:2,name:"CONVERSATIONAL_PLANNER_MODE_READ_ONLY"},{no:3,name:"CONVERSATIONAL_PLANNER_MODE_NO_TOOL"},{no:4,name:"CONVERSATIONAL_PLANNER_MODE_EXPLORE"},{no:5,name:"CONVERSATIONAL_PLANNER_MODE_PLANNING"},{no:6,name:"CONVERSATIONAL_PLANNER_MODE_AUTO"}]);var ox=(n=>(n[n.UNSPECIFIED=0]="UNSPECIFIED",n[n.ENABLED=1]="ENABLED",n[n.DISABLED=2]="DISABLED",n))(ox||{});m.util.setEnumType(ox,"exa.codeium_common_pb.TabToJump",[{no:0,name:"TAB_TO_JUMP_UNSPECIFIED"},{no:1,name:"TAB_TO_JUMP_ENABLED"},{no:2,name:"TAB_TO_JUMP_DISABLED"}]);var rx=(n=>(n[n.UNSPECIFIED=0]="UNSPECIFIED",n[n.ENABLED=1]="ENABLED",n[n.DISABLED=2]="DISABLED",n))(rx||{});m.util.setEnumType(rx,"exa.codeium_common_pb.CascadeWebSearchTool",[{no:0,name:"CASCADE_WEB_SEARCH_TOOL_UNSPECIFIED"},{no:1,name:"CASCADE_WEB_SEARCH_TOOL_ENABLED"},{no:2,name:"CASCADE_WEB_SEARCH_TOOL_DISABLED"}]);var mL=(n=>(n[n.UNSPECIFIED=0]="UNSPECIFIED",n[n.ENABLED=1]="ENABLED",n[n.DISABLED=2]="DISABLED",n))(mL||{});m.util.setEnumType(mL,"exa.codeium_common_pb.CommandPopupAutocomplete",[{no:0,name:"COMMAND_POPUP_AUTOCOMPLETE_UNSPECIFIED"},{no:1,name:"COMMAND_POPUP_AUTOCOMPLETE_ENABLED"},{no:2,name:"COMMAND_POPUP_AUTOCOMPLETE_DISABLED"}]);var EW=(s=>(s[s.UNSPECIFIED=0]="UNSPECIFIED",s[s.CASCADE_BROWSER=1]="CASCADE_BROWSER",s[s.CASCADE_WEB_AT_MENTION=2]="CASCADE_WEB_AT_MENTION",s[s.CASCADE_REVERT_TO_STEP=3]="CASCADE_REVERT_TO_STEP",s[s.CASCADE_CLICK_MODEL_SELECTOR=4]="CASCADE_CLICK_MODEL_SELECTOR",s[s.CASCADE_MESSAGE_FEEDBACK=5]="CASCADE_MESSAGE_FEEDBACK",s))(EW||{});m.util.setEnumType(EW,"exa.codeium_common_pb.FeatureUsageType",[{no:0,name:"FEATURE_USAGE_TYPE_UNSPECIFIED"},{no:1,name:"FEATURE_USAGE_TYPE_CASCADE_BROWSER"},{no:2,name:"FEATURE_USAGE_TYPE_CASCADE_WEB_AT_MENTION"},{no:3,name:"FEATURE_USAGE_TYPE_CASCADE_REVERT_TO_STEP"},{no:4,name:"FEATURE_USAGE_TYPE_CASCADE_CLICK_MODEL_SELECTOR"},{no:5,name:"FEATURE_USAGE_TYPE_CASCADE_MESSAGE_FEEDBACK"}]);var ix=(n=>(n[n.UNSPECIFIED=0]="UNSPECIFIED",n[n.ON=1]="ON",n[n.OFF=2]="OFF",n))(ix||{});m.util.setEnumType(ix,"exa.codeium_common_pb.PlanMode",[{no:0,name:"PLAN_MODE_UNSPECIFIED"},{no:1,name:"PLAN_MODE_ON"},{no:2,name:"PLAN_MODE_OFF"}]);var fL=(n=>(n[n.UNSPECIFIED=0]="UNSPECIFIED",n[n.ENABLED=1]="ENABLED",n[n.DISABLED=2]="DISABLED",n))(fL||{});m.util.setEnumType(fL,"exa.codeium_common_pb.AutoContinueOnMaxGeneratorInvocations",[{no:0,name:"AUTO_CONTINUE_ON_MAX_GENERATOR_INVOCATIONS_UNSPECIFIED"},{no:1,name:"AUTO_CONTINUE_ON_MAX_GENERATOR_INVOCATIONS_ENABLED"},{no:2,name:"AUTO_CONTINUE_ON_MAX_GENERATOR_INVOCATIONS_DISABLED"}]);var gL=(l=>(l[l.CASCADE_NUX_LOCATION_UNSPECIFIED=0]="CASCADE_NUX_LOCATION_UNSPECIFIED",l[l.CASCADE_NUX_LOCATION_CASCADE_INPUT=1]="CASCADE_NUX_LOCATION_CASCADE_INPUT",l[l.CASCADE_NUX_LOCATION_MODEL_SELECTOR=2]="CASCADE_NUX_LOCATION_MODEL_SELECTOR",l[l.CASCADE_NUX_LOCATION_RULES_TAB=4]="CASCADE_NUX_LOCATION_RULES_TAB",l[l.CASCADE_NUX_LOCATION_REVERT_STEP=6]="CASCADE_NUX_LOCATION_REVERT_STEP",l[l.CASCADE_NUX_LOCATION_PLAN_MODE=7]="CASCADE_NUX_LOCATION_PLAN_MODE",l[l.CASCADE_NUX_LOCATION_WRITE_CHAT_MODE=8]="CASCADE_NUX_LOCATION_WRITE_CHAT_MODE",l[l.CASCADE_NUX_LOCATION_TOOLBAR=9]="CASCADE_NUX_LOCATION_TOOLBAR",l))(gL||{});m.util.setEnumType(gL,"exa.codeium_common_pb.CascadeNUXLocation",[{no:0,name:"CASCADE_NUX_LOCATION_UNSPECIFIED"},{no:1,name:"CASCADE_NUX_LOCATION_CASCADE_INPUT"},{no:2,name:"CASCADE_NUX_LOCATION_MODEL_SELECTOR"},{no:4,name:"CASCADE_NUX_LOCATION_RULES_TAB"},{no:6,name:"CASCADE_NUX_LOCATION_REVERT_STEP"},{no:7,name:"CASCADE_NUX_LOCATION_PLAN_MODE"},{no:8,name:"CASCADE_NUX_LOCATION_WRITE_CHAT_MODE"},{no:9,name:"CASCADE_NUX_LOCATION_TOOLBAR"}]);var hL=(n=>(n[n.CASCADE_NUX_ICON_UNSPECIFIED=0]="CASCADE_NUX_ICON_UNSPECIFIED",n[n.CASCADE_NUX_ICON_WEB_SEARCH=1]="CASCADE_NUX_ICON_WEB_SEARCH",n[n.CASCADE_NUX_ICON_WINDSURF_BROWSER=2]="CASCADE_NUX_ICON_WINDSURF_BROWSER",n))(hL||{});m.util.setEnumType(hL,"exa.codeium_common_pb.CascadeNUXIcon",[{no:0,name:"CASCADE_NUX_ICON_UNSPECIFIED"},{no:1,name:"CASCADE_NUX_ICON_WEB_SEARCH"},{no:2,name:"CASCADE_NUX_ICON_WINDSURF_BROWSER"}]);var vL=(o=>(o[o.CASCADE_NUX_TRIGGER_UNSPECIFIED=0]="CASCADE_NUX_TRIGGER_UNSPECIFIED",o[o.CASCADE_NUX_TRIGGER_PRODUCED_CODE_DIFF=1]="CASCADE_NUX_TRIGGER_PRODUCED_CODE_DIFF",o[o.CASCADE_NUX_TRIGGER_OPEN_BROWSER_URL=3]="CASCADE_NUX_TRIGGER_OPEN_BROWSER_URL",o[o.CASCADE_NUX_TRIGGER_WEB_SEARCH=4]="CASCADE_NUX_TRIGGER_WEB_SEARCH",o))(vL||{});m.util.setEnumType(vL,"exa.codeium_common_pb.CascadeNUXTrigger",[{no:0,name:"CASCADE_NUX_TRIGGER_UNSPECIFIED"},{no:1,name:"CASCADE_NUX_TRIGGER_PRODUCED_CODE_DIFF"},{no:3,name:"CASCADE_NUX_TRIGGER_OPEN_BROWSER_URL"},{no:4,name:"CASCADE_NUX_TRIGGER_WEB_SEARCH"}]);var sx=(n=>(n[n.UNSPECIFIED=0]="UNSPECIFIED",n[n.ENABLED=1]="ENABLED",n[n.DISABLED=2]="DISABLED",n))(sx||{});m.util.setEnumType(sx,"exa.codeium_common_pb.AnnotationsConfig",[{no:0,name:"ANNOTATIONS_CONFIG_UNSPECIFIED"},{no:1,name:"ANNOTATIONS_CONFIG_ENABLED"},{no:2,name:"ANNOTATIONS_CONFIG_DISABLED"}]);var bL=(n=>(n[n.UNSPECIFIED=0]="UNSPECIFIED",n[n.ENABLED=1]="ENABLED",n[n.DISABLED=2]="DISABLED",n))(bL||{});m.util.setEnumType(bL,"exa.codeium_common_pb.BrowserExperimentalFeaturesConfig",[{no:0,name:"BROWSER_EXPERIMENTAL_FEATURES_CONFIG_UNSPECIFIED"},{no:1,name:"BROWSER_EXPERIMENTAL_FEATURES_CONFIG_ENABLED"},{no:2,name:"BROWSER_EXPERIMENTAL_FEATURES_CONFIG_DISABLED"}]);var IL=(o=>(o[o.UNSPECIFIED=0]="UNSPECIFIED",o[o.SUPERCOMPLETE=1]="SUPERCOMPLETE",o[o.AUTOCOMPLETE=2]="AUTOCOMPLETE",o[o.OFF=3]="OFF",o))(IL||{});m.util.setEnumType(IL,"exa.codeium_common_pb.CompletionMode",[{no:0,name:"COMPLETION_MODE_UNSPECIFIED"},{no:1,name:"COMPLETION_MODE_SUPERCOMPLETE"},{no:2,name:"COMPLETION_MODE_AUTOCOMPLETE"},{no:3,name:"COMPLETION_MODE_OFF"}]);var ax=(o=>(o[o.UNSPECIFIED=0]="UNSPECIFIED",o[o.LOW=1]="LOW",o[o.MEDIUM=2]="MEDIUM",o[o.HIGH=3]="HIGH",o))(ax||{});m.util.setEnumType(ax,"exa.codeium_common_pb.SupercompleteAggression",[{no:0,name:"SUPERCOMPLETE_AGGRESSION_UNSPECIFIED"},{no:1,name:"SUPERCOMPLETE_AGGRESSION_LOW"},{no:2,name:"SUPERCOMPLETE_AGGRESSION_MEDIUM"},{no:3,name:"SUPERCOMPLETE_AGGRESSION_HIGH"}]);var yL=(i=>(i[i.UNSPECIFIED=0]="UNSPECIFIED",i[i.COMPLETION=1]="COMPLETION",i[i.CHAT=2]="CHAT",i[i.EMBED=3]="EMBED",i[i.QUERY=4]="QUERY",i))(yL||{});m.util.setEnumType(yL,"exa.codeium_common_pb.ModelType",[{no:0,name:"MODEL_TYPE_UNSPECIFIED"},{no:1,name:"MODEL_TYPE_COMPLETION"},{no:2,name:"MODEL_TYPE_CHAT"},{no:3,name:"MODEL_TYPE_EMBED"},{no:4,name:"MODEL_TYPE_QUERY"}]);var lx=(i=>(i[i.UNSPECIFIED=0]="UNSPECIFIED",i[i.ARENA=1]="ARENA",i[i.BATTLE_GROUP_ONLY=2]="BATTLE_GROUP_ONLY",i[i.MODEL_ROUTER=3]="MODEL_ROUTER",i[i.QUICK_REVIEW=4]="QUICK_REVIEW",i))(lx||{});m.util.setEnumType(lx,"exa.codeium_common_pb.DisplayOption",[{no:0,name:"DISPLAY_OPTION_UNSPECIFIED"},{no:1,name:"DISPLAY_OPTION_ARENA"},{no:2,name:"DISPLAY_OPTION_BATTLE_GROUP_ONLY"},{no:3,name:"DISPLAY_OPTION_MODEL_ROUTER"},{no:4,name:"DISPLAY_OPTION_QUICK_REVIEW"}]);var SW=(n=>(n[n.UNSPECIFIED=0]="UNSPECIFIED",n[n.FAST=1]="FAST",n[n.SMART=2]="SMART",n))(SW||{});m.util.setEnumType(SW,"exa.codeium_common_pb.ArenaTier",[{no:0,name:"ARENA_TIER_UNSPECIFIED"},{no:1,name:"ARENA_TIER_FAST"},{no:2,name:"ARENA_TIER_SMART"}]);var am=(se=>(se[se.API_PROVIDER_UNSPECIFIED=0]="API_PROVIDER_UNSPECIFIED",se[se.API_PROVIDER_INTERNAL=1]="API_PROVIDER_INTERNAL",se[se.API_PROVIDER_OPENAI=2]="API_PROVIDER_OPENAI",se[se.API_PROVIDER_GOOGLE_VERTEX=3]="API_PROVIDER_GOOGLE_VERTEX",se[se.API_PROVIDER_ANTHROPIC=4]="API_PROVIDER_ANTHROPIC",se[se.API_PROVIDER_VLLM=5]="API_PROVIDER_VLLM",se[se.API_PROVIDER_TOGETHER_AI=6]="API_PROVIDER_TOGETHER_AI",se[se.API_PROVIDER_HUGGING_FACE=7]="API_PROVIDER_HUGGING_FACE",se[se.API_PROVIDER_NOMIC=8]="API_PROVIDER_NOMIC",se[se.API_PROVIDER_TEI=9]="API_PROVIDER_TEI",se[se.API_PROVIDER_OPENAI_COMPATIBLE_EXTERNAL=10]="API_PROVIDER_OPENAI_COMPATIBLE_EXTERNAL",se[se.API_PROVIDER_ANTHROPIC_COMPATIBLE_EXTERNAL=11]="API_PROVIDER_ANTHROPIC_COMPATIBLE_EXTERNAL",se[se.API_PROVIDER_VERTEX_COMPATIBLE_EXTERNAL=12]="API_PROVIDER_VERTEX_COMPATIBLE_EXTERNAL",se[se.API_PROVIDER_BEDROCK_COMPATIBLE_EXTERNAL=13]="API_PROVIDER_BEDROCK_COMPATIBLE_EXTERNAL",se[se.API_PROVIDER_AZURE_COMPATIBLE_EXTERNAL=14]="API_PROVIDER_AZURE_COMPATIBLE_EXTERNAL",se[se.API_PROVIDER_ANTHROPIC_BEDROCK=15]="API_PROVIDER_ANTHROPIC_BEDROCK",se[se.API_PROVIDER_FIREWORKS=16]="API_PROVIDER_FIREWORKS",se[se.API_PROVIDER_OPEN_ROUTER=17]="API_PROVIDER_OPEN_ROUTER",se[se.API_PROVIDER_XAI=18]="API_PROVIDER_XAI",se[se.API_PROVIDER_ANTHROPIC_BYOK=20]="API_PROVIDER_ANTHROPIC_BYOK",se[se.API_PROVIDER_CEREBRAS=21]="API_PROVIDER_CEREBRAS",se[se.API_PROVIDER_XAI_BYOK=22]="API_PROVIDER_XAI_BYOK",se[se.API_PROVIDER_GEMINI_OPENAI=23]="API_PROVIDER_GEMINI_OPENAI",se[se.API_PROVIDER_GOOGLE_GEMINI=24]="API_PROVIDER_GOOGLE_GEMINI",se[se.API_PROVIDER_GOOGLE_GENAI_VERTEX=25]="API_PROVIDER_GOOGLE_GENAI_VERTEX",se[se.API_PROVIDER_ANTHROPIC_VERTEX=26]="API_PROVIDER_ANTHROPIC_VERTEX",se[se.API_PROVIDER_DATABRICKS=27]="API_PROVIDER_DATABRICKS",se[se.API_PROVIDER_OPEN_ROUTER_BYOK=28]="API_PROVIDER_OPEN_ROUTER_BYOK",se[se.API_PROVIDER_ANTHROPIC_DEVIN=29]="API_PROVIDER_ANTHROPIC_DEVIN",se[se.API_PROVIDER_FIREWORKS_DEVIN=30]="API_PROVIDER_FIREWORKS_DEVIN",se[se.API_PROVIDER_GROQ=31]="API_PROVIDER_GROQ",se[se.API_PROVIDER_OPENAI_DEVIN=32]="API_PROVIDER_OPENAI_DEVIN",se[se.API_PROVIDER_LLAMA_FT_DEEPWIKI=33]="API_PROVIDER_LLAMA_FT_DEEPWIKI",se[se.API_PROVIDER_XAI_INTERNAL=34]="API_PROVIDER_XAI_INTERNAL",se[se.API_PROVIDER_FLOODGATE=36]="API_PROVIDER_FLOODGATE",se[se.API_PROVIDER_ANTHROPIC_BEDROCK_US=37]="API_PROVIDER_ANTHROPIC_BEDROCK_US",se[se.API_PROVIDER_ANTHROPIC_BEDROCK_GLOBAL=38]="API_PROVIDER_ANTHROPIC_BEDROCK_GLOBAL",se[se.API_PROVIDER_MODAL=40]="API_PROVIDER_MODAL",se[se.API_PROVIDER_GOOGLE_GEMINI_DEVIN=41]="API_PROVIDER_GOOGLE_GEMINI_DEVIN",se[se.API_PROVIDER_FIREWORKS_COGNITION=42]="API_PROVIDER_FIREWORKS_COGNITION",se[se.API_PROVIDER_GOOGLE_GENAI_VERTEX_GLOBAL=43]="API_PROVIDER_GOOGLE_GENAI_VERTEX_GLOBAL",se[se.API_PROVIDER_ANTHROPIC_VERTEX_US=44]="API_PROVIDER_ANTHROPIC_VERTEX_US",se[se.API_PROVIDER_ANTHROPIC_VERTEX_EU=45]="API_PROVIDER_ANTHROPIC_VERTEX_EU",se[se.API_PROVIDER_ANTHROPIC_VERTEX_GLOBAL=46]="API_PROVIDER_ANTHROPIC_VERTEX_GLOBAL",se[se.API_PROVIDER_FIREWORKS_COGNITION_INTERNAL=47]="API_PROVIDER_FIREWORKS_COGNITION_INTERNAL",se[se.API_PROVIDER_ANTHROPIC_DATABRICKS=48]="API_PROVIDER_ANTHROPIC_DATABRICKS",se[se.API_PROVIDER_GEMINI_DATABRICKS=49]="API_PROVIDER_GEMINI_DATABRICKS",se[se.API_PROVIDER_MIMIC=50]="API_PROVIDER_MIMIC",se[se.API_PROVIDER_ANTHROPIC_NON_ZDR=51]="API_PROVIDER_ANTHROPIC_NON_ZDR",se[se.API_PROVIDER_SGLANG=60]="API_PROVIDER_SGLANG",se[se.API_PROVIDER_AZURE_OPENAI_FEDERATED=61]="API_PROVIDER_AZURE_OPENAI_FEDERATED",se))(am||{});m.util.setEnumType(am,"exa.codeium_common_pb.APIProvider",[{no:0,name:"API_PROVIDER_UNSPECIFIED"},{no:1,name:"API_PROVIDER_INTERNAL"},{no:2,name:"API_PROVIDER_OPENAI"},{no:3,name:"API_PROVIDER_GOOGLE_VERTEX"},{no:4,name:"API_PROVIDER_ANTHROPIC"},{no:5,name:"API_PROVIDER_VLLM"},{no:6,name:"API_PROVIDER_TOGETHER_AI"},{no:7,name:"API_PROVIDER_HUGGING_FACE"},{no:8,name:"API_PROVIDER_NOMIC"},{no:9,name:"API_PROVIDER_TEI"},{no:10,name:"API_PROVIDER_OPENAI_COMPATIBLE_EXTERNAL"},{no:11,name:"API_PROVIDER_ANTHROPIC_COMPATIBLE_EXTERNAL"},{no:12,name:"API_PROVIDER_VERTEX_COMPATIBLE_EXTERNAL"},{no:13,name:"API_PROVIDER_BEDROCK_COMPATIBLE_EXTERNAL"},{no:14,name:"API_PROVIDER_AZURE_COMPATIBLE_EXTERNAL"},{no:15,name:"API_PROVIDER_ANTHROPIC_BEDROCK"},{no:16,name:"API_PROVIDER_FIREWORKS"},{no:17,name:"API_PROVIDER_OPEN_ROUTER"},{no:18,name:"API_PROVIDER_XAI"},{no:20,name:"API_PROVIDER_ANTHROPIC_BYOK"},{no:21,name:"API_PROVIDER_CEREBRAS"},{no:22,name:"API_PROVIDER_XAI_BYOK"},{no:23,name:"API_PROVIDER_GEMINI_OPENAI"},{no:24,name:"API_PROVIDER_GOOGLE_GEMINI"},{no:25,name:"API_PROVIDER_GOOGLE_GENAI_VERTEX"},{no:26,name:"API_PROVIDER_ANTHROPIC_VERTEX"},{no:27,name:"API_PROVIDER_DATABRICKS"},{no:28,name:"API_PROVIDER_OPEN_ROUTER_BYOK"},{no:29,name:"API_PROVIDER_ANTHROPIC_DEVIN"},{no:30,name:"API_PROVIDER_FIREWORKS_DEVIN"},{no:31,name:"API_PROVIDER_GROQ"},{no:32,name:"API_PROVIDER_OPENAI_DEVIN"},{no:33,name:"API_PROVIDER_LLAMA_FT_DEEPWIKI"},{no:34,name:"API_PROVIDER_XAI_INTERNAL"},{no:36,name:"API_PROVIDER_FLOODGATE"},{no:37,name:"API_PROVIDER_ANTHROPIC_BEDROCK_US"},{no:38,name:"API_PROVIDER_ANTHROPIC_BEDROCK_GLOBAL"},{no:40,name:"API_PROVIDER_MODAL"},{no:41,name:"API_PROVIDER_GOOGLE_GEMINI_DEVIN"},{no:42,name:"API_PROVIDER_FIREWORKS_COGNITION"},{no:43,name:"API_PROVIDER_GOOGLE_GENAI_VERTEX_GLOBAL"},{no:44,name:"API_PROVIDER_ANTHROPIC_VERTEX_US"},{no:45,name:"API_PROVIDER_ANTHROPIC_VERTEX_EU"},{no:46,name:"API_PROVIDER_ANTHROPIC_VERTEX_GLOBAL"},{no:47,name:"API_PROVIDER_FIREWORKS_COGNITION_INTERNAL"},{no:48,name:"API_PROVIDER_ANTHROPIC_DATABRICKS"},{no:49,name:"API_PROVIDER_GEMINI_DATABRICKS"},{no:50,name:"API_PROVIDER_MIMIC"},{no:51,name:"API_PROVIDER_ANTHROPIC_NON_ZDR"},{no:60,name:"API_PROVIDER_SGLANG"},{no:61,name:"API_PROVIDER_AZURE_OPENAI_FEDERATED"}]);var EL=(n=>(n[n.UNSPECIFIED=0]="UNSPECIFIED",n[n.INFO=1]="INFO",n[n.WARNING=2]="WARNING",n))(EL||{});m.util.setEnumType(EL,"exa.codeium_common_pb.ModelStatus",[{no:0,name:"MODEL_STATUS_UNSPECIFIED"},{no:1,name:"MODEL_STATUS_INFO"},{no:2,name:"MODEL_STATUS_WARNING"}]);var xW=(s=>(s[s.UNSPECIFIED=0]="UNSPECIFIED",s[s.BASE=1]="BASE",s[s.CODEIUM=2]="CODEIUM",s[s.USER=3]="USER",s[s.USER_LARGE=4]="USER_LARGE",s[s.UNKNOWN=5]="UNKNOWN",s))(xW||{});m.util.setEnumType(xW,"exa.codeium_common_pb.CodeSource",[{no:0,name:"CODE_SOURCE_UNSPECIFIED"},{no:1,name:"CODE_SOURCE_BASE"},{no:2,name:"CODE_SOURCE_CODEIUM"},{no:3,name:"CODE_SOURCE_USER"},{no:4,name:"CODE_SOURCE_USER_LARGE"},{no:5,name:"CODE_SOURCE_UNKNOWN"}]);var SL=(c=>(c[c.UNSPECIFIED=0]="UNSPECIFIED",c[c.SLACK_MESSAGE=1]="SLACK_MESSAGE",c[c.SLACK_CHANNEL=2]="SLACK_CHANNEL",c[c.GITHUB_ISSUE=3]="GITHUB_ISSUE",c[c.GITHUB_ISSUE_COMMENT=4]="GITHUB_ISSUE_COMMENT",c[c.GITHUB_REPO=8]="GITHUB_REPO",c[c.GOOGLE_DRIVE_FILE=5]="GOOGLE_DRIVE_FILE",c[c.GOOGLE_DRIVE_FOLDER=6]="GOOGLE_DRIVE_FOLDER",c[c.JIRA_ISSUE=7]="JIRA_ISSUE",c[c.CCI=9]="CCI",c))(SL||{});m.util.setEnumType(SL,"exa.codeium_common_pb.DocumentType",[{no:0,name:"DOCUMENT_TYPE_UNSPECIFIED"},{no:1,name:"DOCUMENT_TYPE_SLACK_MESSAGE"},{no:2,name:"DOCUMENT_TYPE_SLACK_CHANNEL"},{no:3,name:"DOCUMENT_TYPE_GITHUB_ISSUE"},{no:4,name:"DOCUMENT_TYPE_GITHUB_ISSUE_COMMENT"},{no:8,name:"DOCUMENT_TYPE_GITHUB_REPO"},{no:5,name:"DOCUMENT_TYPE_GOOGLE_DRIVE_FILE"},{no:6,name:"DOCUMENT_TYPE_GOOGLE_DRIVE_FOLDER"},{no:7,name:"DOCUMENT_TYPE_JIRA_ISSUE"},{no:9,name:"DOCUMENT_TYPE_CCI"}]);var CW=(q=>(q[q.UNSPECIFIED=0]="UNSPECIFIED",q[q.FILE=1]="FILE",q[q.DIRECTORY=2]="DIRECTORY",q[q.REPOSITORY=3]="REPOSITORY",q[q.CODE_CONTEXT=4]="CODE_CONTEXT",q[q.CCI_WITH_SUBRANGE=5]="CCI_WITH_SUBRANGE",q[q.REPOSITORY_PATH=6]="REPOSITORY_PATH",q[q.SLACK=7]="SLACK",q[q.GITHUB=8]="GITHUB",q[q.FILE_LINE_RANGE=9]="FILE_LINE_RANGE",q[q.TEXT_BLOCK=10]="TEXT_BLOCK",q[q.JIRA=11]="JIRA",q[q.GOOGLE_DRIVE=12]="GOOGLE_DRIVE",q[q.CONSOLE_LOG=13]="CONSOLE_LOG",q[q.DOM_ELEMENT=14]="DOM_ELEMENT",q[q.RECIPE=15]="RECIPE",q[q.KNOWLEDGE=16]="KNOWLEDGE",q[q.RULE=17]="RULE",q[q.MCP_RESOURCE=18]="MCP_RESOURCE",q[q.BROWSER_PAGE=19]="BROWSER_PAGE",q[q.BROWSER_CODE_BLOCK=20]="BROWSER_CODE_BLOCK",q[q.BROWSER_TEXT=21]="BROWSER_TEXT",q[q.CONVERSATION=22]="CONVERSATION",q[q.USER_ACTIVITY=23]="USER_ACTIVITY",q[q.TERMINAL=24]="TERMINAL",q[q.GITHUB_PULL_REQUEST=25]="GITHUB_PULL_REQUEST",q[q.CODE_MAP=26]="CODE_MAP",q[q.MCP_PROMPT=27]="MCP_PROMPT",q[q.SKILL=28]="SKILL",q[q.PLAN_FILE=29]="PLAN_FILE",q[q.GIT=30]="GIT",q))(CW||{});m.util.setEnumType(CW,"exa.codeium_common_pb.ContextScopeType",[{no:0,name:"CONTEXT_SCOPE_TYPE_UNSPECIFIED"},{no:1,name:"CONTEXT_SCOPE_TYPE_FILE"},{no:2,name:"CONTEXT_SCOPE_TYPE_DIRECTORY"},{no:3,name:"CONTEXT_SCOPE_TYPE_REPOSITORY"},{no:4,name:"CONTEXT_SCOPE_TYPE_CODE_CONTEXT"},{no:5,name:"CONTEXT_SCOPE_TYPE_CCI_WITH_SUBRANGE"},{no:6,name:"CONTEXT_SCOPE_TYPE_REPOSITORY_PATH"},{no:7,name:"CONTEXT_SCOPE_TYPE_SLACK"},{no:8,name:"CONTEXT_SCOPE_TYPE_GITHUB"},{no:9,name:"CONTEXT_SCOPE_TYPE_FILE_LINE_RANGE"},{no:10,name:"CONTEXT_SCOPE_TYPE_TEXT_BLOCK"},{no:11,name:"CONTEXT_SCOPE_TYPE_JIRA"},{no:12,name:"CONTEXT_SCOPE_TYPE_GOOGLE_DRIVE"},{no:13,name:"CONTEXT_SCOPE_TYPE_CONSOLE_LOG"},{no:14,name:"CONTEXT_SCOPE_TYPE_DOM_ELEMENT"},{no:15,name:"CONTEXT_SCOPE_TYPE_RECIPE"},{no:16,name:"CONTEXT_SCOPE_TYPE_KNOWLEDGE"},{no:17,name:"CONTEXT_SCOPE_TYPE_RULE"},{no:18,name:"CONTEXT_SCOPE_TYPE_MCP_RESOURCE"},{no:19,name:"CONTEXT_SCOPE_TYPE_BROWSER_PAGE"},{no:20,name:"CONTEXT_SCOPE_TYPE_BROWSER_CODE_BLOCK"},{no:21,name:"CONTEXT_SCOPE_TYPE_BROWSER_TEXT"},{no:22,name:"CONTEXT_SCOPE_TYPE_CONVERSATION"},{no:23,name:"CONTEXT_SCOPE_TYPE_USER_ACTIVITY"},{no:24,name:"CONTEXT_SCOPE_TYPE_TERMINAL"},{no:25,name:"CONTEXT_SCOPE_TYPE_GITHUB_PULL_REQUEST"},{no:26,name:"CONTEXT_SCOPE_TYPE_CODE_MAP"},{no:27,name:"CONTEXT_SCOPE_TYPE_MCP_PROMPT"},{no:28,name:"CONTEXT_SCOPE_TYPE_SKILL"},{no:29,name:"CONTEXT_SCOPE_TYPE_PLAN_FILE"},{no:30,name:"CONTEXT_SCOPE_TYPE_GIT"}]);var TW=(h=>(h[h.UNSPECIFIED=0]="UNSPECIFIED",h[h.DEFAULT=1]="DEFAULT",h[h.FUNCTION_CODE_LENS=2]="FUNCTION_CODE_LENS",h[h.CLASS_CODE_LENS=3]="CLASS_CODE_LENS",h[h.RIGHT_CLICK_REFACTOR=4]="RIGHT_CLICK_REFACTOR",h[h.SELECTION_HINT_CODE_LENS=5]="SELECTION_HINT_CODE_LENS",h[h.LINE_HINT_CODE_LENS=6]="LINE_HINT_CODE_LENS",h[h.PLAN=7]="PLAN",h[h.FOLLOWUP=8]="FOLLOWUP",h[h.PASTE_AND_TRANSLATE=9]="PASTE_AND_TRANSLATE",h[h.SUPERCOMPLETE=10]="SUPERCOMPLETE",h[h.FUNCTION_DOCSTRING=11]="FUNCTION_DOCSTRING",h[h.FAST_APPLY=12]="FAST_APPLY",h[h.TERMINAL=13]="TERMINAL",h[h.TAB_JUMP=14]="TAB_JUMP",h))(TW||{});m.util.setEnumType(TW,"exa.codeium_common_pb.CommandRequestSource",[{no:0,name:"COMMAND_REQUEST_SOURCE_UNSPECIFIED"},{no:1,name:"COMMAND_REQUEST_SOURCE_DEFAULT"},{no:2,name:"COMMAND_REQUEST_SOURCE_FUNCTION_CODE_LENS"},{no:3,name:"COMMAND_REQUEST_SOURCE_CLASS_CODE_LENS"},{no:4,name:"COMMAND_REQUEST_SOURCE_RIGHT_CLICK_REFACTOR"},{no:5,name:"COMMAND_REQUEST_SOURCE_SELECTION_HINT_CODE_LENS"},{no:6,name:"COMMAND_REQUEST_SOURCE_LINE_HINT_CODE_LENS"},{no:7,name:"COMMAND_REQUEST_SOURCE_PLAN"},{no:8,name:"COMMAND_REQUEST_SOURCE_FOLLOWUP"},{no:9,name:"COMMAND_REQUEST_SOURCE_PASTE_AND_TRANSLATE"},{no:10,name:"COMMAND_REQUEST_SOURCE_SUPERCOMPLETE"},{no:11,name:"COMMAND_REQUEST_SOURCE_FUNCTION_DOCSTRING"},{no:12,name:"COMMAND_REQUEST_SOURCE_FAST_APPLY"},{no:13,name:"COMMAND_REQUEST_SOURCE_TERMINAL"},{no:14,name:"COMMAND_REQUEST_SOURCE_TAB_JUMP"}]);var xL=(i=>(i[i.UNSPECIFIED=0]="UNSPECIFIED",i[i.ERROR=1]="ERROR",i[i.WARNING=2]="WARNING",i[i.INFO=3]="INFO",i[i.DEBUG=4]="DEBUG",i))(xL||{});m.util.setEnumType(xL,"exa.codeium_common_pb.StatusLevel",[{no:0,name:"STATUS_LEVEL_UNSPECIFIED"},{no:1,name:"STATUS_LEVEL_ERROR"},{no:2,name:"STATUS_LEVEL_WARNING"},{no:3,name:"STATUS_LEVEL_INFO"},{no:4,name:"STATUS_LEVEL_DEBUG"}]);var _W=(o=>(o[o.UNSPECIFIED=0]="UNSPECIFIED",o[o.OVERALL=1]="OVERALL",o[o.ACTION_PREPARE=2]="ACTION_PREPARE",o[o.ACTION_APPLY=3]="ACTION_APPLY",o))(_W||{});m.util.setEnumType(_W,"exa.codeium_common_pb.CortexErrorCategory",[{no:0,name:"CORTEX_ERROR_CATEGORY_UNSPECIFIED"},{no:1,name:"CORTEX_ERROR_CATEGORY_OVERALL"},{no:2,name:"CORTEX_ERROR_CATEGORY_ACTION_PREPARE"},{no:3,name:"CORTEX_ERROR_CATEGORY_ACTION_APPLY"}]);var CL=(i=>(i[i.UNSPECIFIED=0]="UNSPECIFIED",i[i.OVERALL=1]="OVERALL",i[i.LAST_AUTOCOMPLETE_USAGE_TIME=2]="LAST_AUTOCOMPLETE_USAGE_TIME",i[i.LAST_CHAT_USAGE_TIME=3]="LAST_CHAT_USAGE_TIME",i[i.LAST_COMMAND_USAGE_TIME=4]="LAST_COMMAND_USAGE_TIME",i))(CL||{});m.util.setEnumType(CL,"exa.codeium_common_pb.LastUpdateType",[{no:0,name:"LAST_UPDATE_TYPE_UNSPECIFIED"},{no:1,name:"LAST_UPDATE_TYPE_OVERALL"},{no:2,name:"LAST_UPDATE_TYPE_LAST_AUTOCOMPLETE_USAGE_TIME"},{no:3,name:"LAST_UPDATE_TYPE_LAST_CHAT_USAGE_TIME"},{no:4,name:"LAST_UPDATE_TYPE_LAST_COMMAND_USAGE_TIME"}]);var PW=(o=>(o[o.UNSPECIFIED=0]="UNSPECIFIED",o[o.AUTOCOMPLETE=1]="AUTOCOMPLETE",o[o.COMMAND=2]="COMMAND",o[o.CHAT=3]="CHAT",o))(PW||{});m.util.setEnumType(PW,"exa.codeium_common_pb.OnboardingActionType",[{no:0,name:"ONBOARDING_ACTION_TYPE_UNSPECIFIED"},{no:1,name:"ONBOARDING_ACTION_TYPE_AUTOCOMPLETE"},{no:2,name:"ONBOARDING_ACTION_TYPE_COMMAND"},{no:3,name:"ONBOARDING_ACTION_TYPE_CHAT"}]);var DW=(u=>(u[u.UNSPECIFIED=0]="UNSPECIFIED",u[u.AUTOCOMPLETE_ACCEPT=1]="AUTOCOMPLETE_ACCEPT",u[u.CURSOR_LINE_NAVIGATION=2]="CURSOR_LINE_NAVIGATION",u[u.TYPING=3]="TYPING",u[u.FORCED=4]="FORCED",u[u.TAB_JUMP_ACCEPT=5]="TAB_JUMP_ACCEPT",u[u.SUPERCOMPLETE_ACCEPT=6]="SUPERCOMPLETE_ACCEPT",u[u.TAB_JUMP_PREDICTIVE=7]="TAB_JUMP_PREDICTIVE",u[u.AUTOCOMPLETE_PREDICTIVE=8]="AUTOCOMPLETE_PREDICTIVE",u[u.SUPERCOMPLETE_PREDICTIVE=9]="SUPERCOMPLETE_PREDICTIVE",u[u.TAB_JUMP_EDIT=10]="TAB_JUMP_EDIT",u))(DW||{});m.util.setEnumType(DW,"exa.codeium_common_pb.SupercompleteTriggerCondition",[{no:0,name:"SUPERCOMPLETE_TRIGGER_CONDITION_UNSPECIFIED"},{no:1,name:"SUPERCOMPLETE_TRIGGER_CONDITION_AUTOCOMPLETE_ACCEPT"},{no:2,name:"SUPERCOMPLETE_TRIGGER_CONDITION_CURSOR_LINE_NAVIGATION"},{no:3,name:"SUPERCOMPLETE_TRIGGER_CONDITION_TYPING"},{no:4,name:"SUPERCOMPLETE_TRIGGER_CONDITION_FORCED"},{no:5,name:"SUPERCOMPLETE_TRIGGER_CONDITION_TAB_JUMP_ACCEPT"},{no:6,name:"SUPERCOMPLETE_TRIGGER_CONDITION_SUPERCOMPLETE_ACCEPT"},{no:7,name:"SUPERCOMPLETE_TRIGGER_CONDITION_TAB_JUMP_PREDICTIVE"},{no:8,name:"SUPERCOMPLETE_TRIGGER_CONDITION_AUTOCOMPLETE_PREDICTIVE"},{no:9,name:"SUPERCOMPLETE_TRIGGER_CONDITION_SUPERCOMPLETE_PREDICTIVE"},{no:10,name:"SUPERCOMPLETE_TRIGGER_CONDITION_TAB_JUMP_EDIT"}]);var dt=(S=>(S[S.EVENT_UNSPECIFIED=0]="EVENT_UNSPECIFIED",S[S.WINDSURF_EDITOR_READY=251]="WINDSURF_EDITOR_READY",S[S.WINDSURF_EXTENSION_START=253]="WINDSURF_EXTENSION_START",S[S.WINDSURF_EXTENSION_ACTIVATED=32]="WINDSURF_EXTENSION_ACTIVATED",S[S.LS_DOWNLOAD_START=1]="LS_DOWNLOAD_START",S[S.LS_DOWNLOAD_COMPLETE=2]="LS_DOWNLOAD_COMPLETE",S[S.LS_DOWNLOAD_FAILURE=5]="LS_DOWNLOAD_FAILURE",S[S.LS_BINARY_STARTUP=250]="LS_BINARY_STARTUP",S[S.LS_STARTUP=3]="LS_STARTUP",S[S.LS_FAILURE=4]="LS_FAILURE",S[S.AUTOCOMPLETE_ACCEPTED=6]="AUTOCOMPLETE_ACCEPTED",S[S.AUTOCOMPLETE_ONE_WORD_ACCEPTED=7]="AUTOCOMPLETE_ONE_WORD_ACCEPTED",S[S.CHAT_MESSAGE_SENT=8]="CHAT_MESSAGE_SENT",S[S.CHAT_MENTION_INSERT=13]="CHAT_MENTION_INSERT",S[S.CHAT_MENTION_MENU_OPEN=19]="CHAT_MENTION_MENU_OPEN",S[S.CHAT_OPEN_SETTINGS=14]="CHAT_OPEN_SETTINGS",S[S.CHAT_OPEN_CONTEXT_SETTINGS=15]="CHAT_OPEN_CONTEXT_SETTINGS",S[S.CHAT_WITH_CODEBASE=16]="CHAT_WITH_CODEBASE",S[S.CHAT_NEW_CONVERSATION=17]="CHAT_NEW_CONVERSATION",S[S.CHAT_CHANGE_MODEL=18]="CHAT_CHANGE_MODEL",S[S.CHAT_TOGGLE_FOCUS_INSERT_TEXT=34]="CHAT_TOGGLE_FOCUS_INSERT_TEXT",S[S.FUNCTION_REFACTOR=28]="FUNCTION_REFACTOR",S[S.EXPLAIN_CODE_BLOCK=29]="EXPLAIN_CODE_BLOCK",S[S.FUNCTION_ADD_DOCSTRING=30]="FUNCTION_ADD_DOCSTRING",S[S.EXPLAIN_PROBLEM=31]="EXPLAIN_PROBLEM",S[S.COMMAND_BOX_OPENED=9]="COMMAND_BOX_OPENED",S[S.COMMAND_SUBMITTED=10]="COMMAND_SUBMITTED",S[S.COMMAND_ACCEPTED=11]="COMMAND_ACCEPTED",S[S.COMMAND_REJECTED=12]="COMMAND_REJECTED",S[S.WS_ONBOARDING_LANDING_PAGE_OPENED=20]="WS_ONBOARDING_LANDING_PAGE_OPENED",S[S.WS_ONBOARDING_SETUP_PAGE_OPENED=21]="WS_ONBOARDING_SETUP_PAGE_OPENED",S[S.WS_ONBOARDING_KEYBINDINGS_PAGE_OPENED=22]="WS_ONBOARDING_KEYBINDINGS_PAGE_OPENED",S[S.WS_ONBOARDING_MIGRATION_SCOPE_PAGE_OPENED=23]="WS_ONBOARDING_MIGRATION_SCOPE_PAGE_OPENED",S[S.WS_ONBOARDING_IMPORT_PAGE_OPENED=24]="WS_ONBOARDING_IMPORT_PAGE_OPENED",S[S.WS_ONBOARDING_AUTH_PAGE_OPENED=25]="WS_ONBOARDING_AUTH_PAGE_OPENED",S[S.WS_ONBOARDING_AUTH_MANUAL_PAGE_OPENED=26]="WS_ONBOARDING_AUTH_MANUAL_PAGE_OPENED",S[S.WS_ONBOARDING_CHOOSE_THEME_PAGE_OPENED=35]="WS_ONBOARDING_CHOOSE_THEME_PAGE_OPENED",S[S.WS_ONBOARDING_COMPLETED=27]="WS_ONBOARDING_COMPLETED",S[S.WS_SKIPPED_ONBOARDING=69]="WS_SKIPPED_ONBOARDING",S[S.WS_SETTINGS_PAGE_OPEN=72]="WS_SETTINGS_PAGE_OPEN",S[S.WS_SETTINGS_PAGE_OPEN_WITH_SETTING_FOCUS=73]="WS_SETTINGS_PAGE_OPEN_WITH_SETTING_FOCUS",S[S.EMPTY_WORKSPACE_PAGE_OPENED=209]="EMPTY_WORKSPACE_PAGE_OPENED",S[S.EMPTY_WORKSPACE_PAGE_RECENT_FOLDERS_CLICKED=210]="EMPTY_WORKSPACE_PAGE_RECENT_FOLDERS_CLICKED",S[S.EMPTY_WORKSPACE_PAGE_OPEN_FOLDER_CLICKED=211]="EMPTY_WORKSPACE_PAGE_OPEN_FOLDER_CLICKED",S[S.EMPTY_WORKSPACE_PAGE_GENERATE_PROJECT_CLICKED=212]="EMPTY_WORKSPACE_PAGE_GENERATE_PROJECT_CLICKED",S[S.PROVIDE_FEEDBACK=33]="PROVIDE_FEEDBACK",S[S.CASCADE_MESSAGE_SENT=36]="CASCADE_MESSAGE_SENT",S[S.WS_OPEN_CASCADE_MEMORIES_PANEL=38]="WS_OPEN_CASCADE_MEMORIES_PANEL",S[S.PROVIDE_MESSAGE_FEEDBACK=41]="PROVIDE_MESSAGE_FEEDBACK",S[S.CASCADE_MEMORY_DELETED=42]="CASCADE_MEMORY_DELETED",S[S.CASCADE_STEP_COMPLETED=43]="CASCADE_STEP_COMPLETED",S[S.ACKNOWLEDGE_CASCADE_CODE_EDIT=44]="ACKNOWLEDGE_CASCADE_CODE_EDIT",S[S.CASCADE_WEB_TOOLS_OPEN_READ_URL_MARKDOWN=45]="CASCADE_WEB_TOOLS_OPEN_READ_URL_MARKDOWN",S[S.CASCADE_WEB_TOOLS_OPEN_CHUNK_MARKDOWN=46]="CASCADE_WEB_TOOLS_OPEN_CHUNK_MARKDOWN",S[S.CASCADE_MCP_SERVER_INIT=64]="CASCADE_MCP_SERVER_INIT",S[S.CASCADE_KNOWLEDGE_BASE_ITEM_OPENED=113]="CASCADE_KNOWLEDGE_BASE_ITEM_OPENED",S[S.CASCADE_VIEW_LOADED=119]="CASCADE_VIEW_LOADED",S[S.CASCADE_CONTEXT_SCOPE_ITEM_ATTACHED=173]="CASCADE_CONTEXT_SCOPE_ITEM_ATTACHED",S[S.CASCADE_CLICK_EVENT=65]="CASCADE_CLICK_EVENT",S[S.CASCADE_IMPRESSION_EVENT=67]="CASCADE_IMPRESSION_EVENT",S[S.OPEN_CHANGELOG=37]="OPEN_CHANGELOG",S[S.CURSOR_DETECTED=39]="CURSOR_DETECTED",S[S.VSCODE_DETECTED=40]="VSCODE_DETECTED",S[S.JETBRAINS_DETECTED=153]="JETBRAINS_DETECTED",S[S.CROSS_SELL_EXTENSION_DOWNLOAD_WINDSURF_CLICK=47]="CROSS_SELL_EXTENSION_DOWNLOAD_WINDSURF_CLICK",S[S.CROSS_SELL_EXTENSION_DOWNLOAD_WINDSURF_NUDGE_IMPRESSION=48]="CROSS_SELL_EXTENSION_DOWNLOAD_WINDSURF_NUDGE_IMPRESSION",S[S.WS_PROBLEMS_TAB_SEND_ALL_TO_CASCADE=49]="WS_PROBLEMS_TAB_SEND_ALL_TO_CASCADE",S[S.WS_PROBLEMS_TAB_SEND_ALL_IN_FILE_TO_CASCADE=50]="WS_PROBLEMS_TAB_SEND_ALL_IN_FILE_TO_CASCADE",S[S.WS_CASCADE_BAR_FILE_NAV=51]="WS_CASCADE_BAR_FILE_NAV",S[S.WS_CASCADE_BAR_HUNK_NAV=52]="WS_CASCADE_BAR_HUNK_NAV",S[S.WS_CASCADE_BAR_ACCEPT_FILE=53]="WS_CASCADE_BAR_ACCEPT_FILE",S[S.WS_CASCADE_BAR_REJECT_FILE=54]="WS_CASCADE_BAR_REJECT_FILE",S[S.WS_CUSTOM_APP_ICON_MODAL_OPEN=55]="WS_CUSTOM_APP_ICON_MODAL_OPEN",S[S.WS_CUSTOM_APP_ICON_SELECT_CLASSIC=56]="WS_CUSTOM_APP_ICON_SELECT_CLASSIC",S[S.WS_CUSTOM_APP_ICON_SELECT_CLASSIC_LIGHT=57]="WS_CUSTOM_APP_ICON_SELECT_CLASSIC_LIGHT",S[S.WS_CUSTOM_APP_ICON_SELECT_RETRO=58]="WS_CUSTOM_APP_ICON_SELECT_RETRO",S[S.WS_CUSTOM_APP_ICON_SELECT_BLUEPRINT=59]="WS_CUSTOM_APP_ICON_SELECT_BLUEPRINT",S[S.WS_CUSTOM_APP_ICON_SELECT_HAND_DRAWN=60]="WS_CUSTOM_APP_ICON_SELECT_HAND_DRAWN",S[S.WS_CUSTOM_APP_ICON_SELECT_SUNSET=61]="WS_CUSTOM_APP_ICON_SELECT_SUNSET",S[S.WS_CUSTOM_APP_ICON_SELECT_VALENTINE=66]="WS_CUSTOM_APP_ICON_SELECT_VALENTINE",S[S.WS_CUSTOM_APP_ICON_SELECT_PIXEL_SURF=82]="WS_CUSTOM_APP_ICON_SELECT_PIXEL_SURF",S[S.ENTERED_MCP_TOOLBAR_TAB=63]="ENTERED_MCP_TOOLBAR_TAB",S[S.CLICKED_TO_CONFIGURE_MCP=62]="CLICKED_TO_CONFIGURE_MCP",S[S.WS_SETTINGS_UPDATED=68]="WS_SETTINGS_UPDATED",S[S.BROWSER_PREVIEW_DOM_ELEMENT=70]="BROWSER_PREVIEW_DOM_ELEMENT",S[S.BROWSER_PREVIEW_CONSOLE_OUTPUT=71]="BROWSER_PREVIEW_CONSOLE_OUTPUT",S[S.WS_SETTINGS_CHANGED_BY_USER=74]="WS_SETTINGS_CHANGED_BY_USER",S[S.WS_GENERATE_COMMIT_MESSAGE_CLICKED=75]="WS_GENERATE_COMMIT_MESSAGE_CLICKED",S[S.WS_GENERATE_COMMIT_MESSAGE_ERRORED=76]="WS_GENERATE_COMMIT_MESSAGE_ERRORED",S[S.WS_CLICKED_COMMIT_FROM_SCM_PANEL=77]="WS_CLICKED_COMMIT_FROM_SCM_PANEL",S[S.WS_CANCELED_GENERATE_COMMIT_MESSAGE=79]="WS_CANCELED_GENERATE_COMMIT_MESSAGE",S[S.USING_DEV_EXTENSION=78]="USING_DEV_EXTENSION",S[S.WS_APP_DEPLOYMENT_CREATE_PROJECT=80]="WS_APP_DEPLOYMENT_CREATE_PROJECT",S[S.WS_APP_DEPLOYMENT_DEPLOY_PROJECT=81]="WS_APP_DEPLOYMENT_DEPLOY_PROJECT",S[S.CASCADE_OPEN_ACTIVE_CONVERSATION_DROPDOWN=114]="CASCADE_OPEN_ACTIVE_CONVERSATION_DROPDOWN",S[S.CASCADE_SELECT_ACTIVE_CONVERSATION_ON_DROPDOWN=115]="CASCADE_SELECT_ACTIVE_CONVERSATION_ON_DROPDOWN",S[S.CASCADE_NAVIGATE_ACTIVE_CONVERSATION_ON_DROPDOWN=122]="CASCADE_NAVIGATE_ACTIVE_CONVERSATION_ON_DROPDOWN",S[S.CASCADE_SNOOZE_CONVERSATION_ON_DROPDOWN=123]="CASCADE_SNOOZE_CONVERSATION_ON_DROPDOWN",S[S.CASCADE_TOGGLE_NOTIFICATION_ON_DROPDOWN=124]="CASCADE_TOGGLE_NOTIFICATION_ON_DROPDOWN",S[S.CASCADE_SELECT_NOTIFICATION_ON_DROPDOWN=125]="CASCADE_SELECT_NOTIFICATION_ON_DROPDOWN",S[S.CASCADE_NAVIGATE_NOTIFICATION_ON_DROPDOWN=126]="CASCADE_NAVIGATE_NOTIFICATION_ON_DROPDOWN",S[S.CASCADE_DISMISS_NOTIFICATION_ON_DROPDOWN=127]="CASCADE_DISMISS_NOTIFICATION_ON_DROPDOWN",S[S.CASCADE_TRAJECTORY_SHARE_COPY_LINK=137]="CASCADE_TRAJECTORY_SHARE_COPY_LINK",S[S.CASCADE_TRAJECTORY_SHARE_CREATE_LINK=138]="CASCADE_TRAJECTORY_SHARE_CREATE_LINK",S[S.CASCADE_CUSTOMIZATIONS_TAB_CHANGE=139]="CASCADE_CUSTOMIZATIONS_TAB_CHANGE",S[S.CASCADE_WORKFLOW_OPEN=140]="CASCADE_WORKFLOW_OPEN",S[S.CASCADE_NEW_WORKFLOW_CLICKED=141]="CASCADE_NEW_WORKFLOW_CLICKED",S[S.CASCADE_NEW_GLOBAL_WORKFLOW_CLICKED=184]="CASCADE_NEW_GLOBAL_WORKFLOW_CLICKED",S[S.CASCADE_WORKFLOW_REFRESH_CLICKED=142]="CASCADE_WORKFLOW_REFRESH_CLICKED",S[S.CASCADE_RULE_OPEN=143]="CASCADE_RULE_OPEN",S[S.CASCADE_NEW_RULE_CLICKED=144]="CASCADE_NEW_RULE_CLICKED",S[S.CASCADE_NEW_GLOBAL_RULE_CLICKED=145]="CASCADE_NEW_GLOBAL_RULE_CLICKED",S[S.CASCADE_RULE_REFRESH_CLICKED=146]="CASCADE_RULE_REFRESH_CLICKED",S[S.CASCADE_IMPORT_RULES_FROM_CURSOR_CLICKED=147]="CASCADE_IMPORT_RULES_FROM_CURSOR_CLICKED",S[S.WS_IMPORT_CURSOR_RULES_COMMAND_PALETTE=152]="WS_IMPORT_CURSOR_RULES_COMMAND_PALETTE",S[S.CASCADE_CHANGES_ACCEPT_ALL=83]="CASCADE_CHANGES_ACCEPT_ALL",S[S.CASCADE_CHANGES_REJECT_ALL=84]="CASCADE_CHANGES_REJECT_ALL",S[S.CASCADE_MEMORIES_EDIT=85]="CASCADE_MEMORIES_EDIT",S[S.CASCADE_MEMORIES_VIEW=86]="CASCADE_MEMORIES_VIEW",S[S.KEYBOARD_SHORTCUT=136]="KEYBOARD_SHORTCUT",S[S.CASCADE_INSERT_AT_MENTION=87]="CASCADE_INSERT_AT_MENTION",S[S.CASCADE_ERROR_STEP=120]="CASCADE_ERROR_STEP",S[S.CASCADE_SUGGESTED_RESPONSES_SUGGESTION_CLICKED=121]="CASCADE_SUGGESTED_RESPONSES_SUGGESTION_CLICKED",S[S.CASCADE_PLUGIN_PANEL_OPENED=128]="CASCADE_PLUGIN_PANEL_OPENED",S[S.CASCADE_PLUGIN_PAGE_OPENED=129]="CASCADE_PLUGIN_PAGE_OPENED",S[S.CASCADE_PLUGIN_INSTALLED=130]="CASCADE_PLUGIN_INSTALLED",S[S.CASCADE_PLUGIN_DISABLED=131]="CASCADE_PLUGIN_DISABLED",S[S.CASCADE_PLUGIN_ENABLED=132]="CASCADE_PLUGIN_ENABLED",S[S.CASCADE_PLUGIN_INSTALLATION_ERROR=133]="CASCADE_PLUGIN_INSTALLATION_ERROR",S[S.CASCADE_PLUGIN_TOOL_ENABLED=134]="CASCADE_PLUGIN_TOOL_ENABLED",S[S.CASCADE_PLUGIN_TOOL_DISABLED=135]="CASCADE_PLUGIN_TOOL_DISABLED",S[S.WEBSITE_NOT_FOUND_PAGE=88]="WEBSITE_NOT_FOUND_PAGE",S[S.WEBSITE_AUTH_REDIRECT_LONG_WAIT=89]="WEBSITE_AUTH_REDIRECT_LONG_WAIT",S[S.WEBSITE_AUTH_REDIRECT_ERROR=90]="WEBSITE_AUTH_REDIRECT_ERROR",S[S.WEBSITE_AUTH_REDIRECT_SUCCESS=112]="WEBSITE_AUTH_REDIRECT_SUCCESS",S[S.WEBSITE_PAGE_VISIT=175]="WEBSITE_PAGE_VISIT",S[S.WEBSITE_SIGNUP_INFO=176]="WEBSITE_SIGNUP_INFO",S[S.WEBSITE_START_PLAN_CHECKOUT=177]="WEBSITE_START_PLAN_CHECKOUT",S[S.WEBSITE_START_UPDATE_PAYMENT=202]="WEBSITE_START_UPDATE_PAYMENT",S[S.WEBSITE_START_VIEW_INVOICES=203]="WEBSITE_START_VIEW_INVOICES",S[S.WEBSITE_UNIVERSITY_LECTURE_VIEW=214]="WEBSITE_UNIVERSITY_LECTURE_VIEW",S[S.WEBSITE_DISALLOW_ENTERPRISE_LOGIN=224]="WEBSITE_DISALLOW_ENTERPRISE_LOGIN",S[S.WEBSITE_SSO_LOGIN_REDIRECT=225]="WEBSITE_SSO_LOGIN_REDIRECT",S[S.WEBSITE_ATTEMPT_TO_LOGIN=226]="WEBSITE_ATTEMPT_TO_LOGIN",S[S.WEBSITE_SUCCESSFUL_LOGIN=227]="WEBSITE_SUCCESSFUL_LOGIN",S[S.WEBSITE_FAILED_LOGIN=228]="WEBSITE_FAILED_LOGIN",S[S.JB_OPEN_PLAN_INFO=91]="JB_OPEN_PLAN_INFO",S[S.JB_SNOOZE_PLUGIN=92]="JB_SNOOZE_PLUGIN",S[S.JB_TOGGLE_PLUGIN_STATUS=93]="JB_TOGGLE_PLUGIN_STATUS",S[S.JB_SWITCH_CHANNEL=94]="JB_SWITCH_CHANNEL",S[S.JB_OPEN_SETTINGS=95]="JB_OPEN_SETTINGS",S[S.JB_PLUGIN_LOG_IN=96]="JB_PLUGIN_LOG_IN",S[S.JB_PLUGIN_LOG_OUT=97]="JB_PLUGIN_LOG_OUT",S[S.JB_OPEN_QUICK_REFERENCE=98]="JB_OPEN_QUICK_REFERENCE",S[S.JB_EDIT_KEYBOARD_SHORTCUTS=99]="JB_EDIT_KEYBOARD_SHORTCUTS",S[S.JB_CASCADE_BAR_CASCADE_ICON=100]="JB_CASCADE_BAR_CASCADE_ICON",S[S.JB_CASCADE_BAR_FILE_NAV=101]="JB_CASCADE_BAR_FILE_NAV",S[S.JB_CASCADE_BAR_HUNK_NAV=102]="JB_CASCADE_BAR_HUNK_NAV",S[S.JB_CASCADE_BAR_ACCEPT_FILE=103]="JB_CASCADE_BAR_ACCEPT_FILE",S[S.JB_CASCADE_BAR_REJECT_FILE=104]="JB_CASCADE_BAR_REJECT_FILE",S[S.JB_INLAY_HUNK_ACCEPT=105]="JB_INLAY_HUNK_ACCEPT",S[S.JB_INLAY_HUNK_REJECT=106]="JB_INLAY_HUNK_REJECT",S[S.JB_DIFF_RE_RENDER=107]="JB_DIFF_RE_RENDER",S[S.JB_ONBOARDING_OPENED=108]="JB_ONBOARDING_OPENED",S[S.JB_ONBOARDING_COMPLETED=109]="JB_ONBOARDING_COMPLETED",S[S.JB_ONBOARDING_SKIPPED=110]="JB_ONBOARDING_SKIPPED",S[S.JB_ONBOARDING_LEARN_MORE=111]="JB_ONBOARDING_LEARN_MORE",S[S.JB_DIFF_RESOLUTION_ERRORED=116]="JB_DIFF_RESOLUTION_ERRORED",S[S.JB_ACKNOWLEDGE_CODE_EDIT_ERRORED=117]="JB_ACKNOWLEDGE_CODE_EDIT_ERRORED",S[S.JB_OPEN_SETTINGS_NOTIFICATION=118]="JB_OPEN_SETTINGS_NOTIFICATION",S[S.JB_MCP_ADD_SERVER=148]="JB_MCP_ADD_SERVER",S[S.JB_MCP_SAVE_CONFIG=149]="JB_MCP_SAVE_CONFIG",S[S.JB_MCP_EXPAND_TOOLS=150]="JB_MCP_EXPAND_TOOLS",S[S.JB_DISABLE_AUTOGEN_MEMORY=151]="JB_DISABLE_AUTOGEN_MEMORY",S[S.JB_TOGGLE_AUTOCOMPLETE=154]="JB_TOGGLE_AUTOCOMPLETE",S[S.JB_LOGIN_MANUAL_AUTH_TOKEN=174]="JB_LOGIN_MANUAL_AUTH_TOKEN",S[S.JB_AUTO_UPDATED=179]="JB_AUTO_UPDATED",S[S.JB_DRAG_DROP_FILE=182]="JB_DRAG_DROP_FILE",S[S.JB_AUTO_OPEN_CHAT_WINDOW=183]="JB_AUTO_OPEN_CHAT_WINDOW",S[S.WS_TERMINAL_INTEGRATION_FORCE_EXIT=155]="WS_TERMINAL_INTEGRATION_FORCE_EXIT",S[S.KNOWLEDGE_BASE_ITEM_CREATED=156]="KNOWLEDGE_BASE_ITEM_CREATED",S[S.KNOWLEDGE_BASE_ITEM_EDITED=157]="KNOWLEDGE_BASE_ITEM_EDITED",S[S.KNOWLEDGE_BASE_ITEM_DELETED=158]="KNOWLEDGE_BASE_ITEM_DELETED",S[S.KNOWLEDGE_BASE_ITEM_READ=159]="KNOWLEDGE_BASE_ITEM_READ",S[S.KNOWLEDGE_BASE_CONNECTION_CREATE=160]="KNOWLEDGE_BASE_CONNECTION_CREATE",S[S.KNOWLEDGE_BASE_CONNECTION_REMOVE=161]="KNOWLEDGE_BASE_CONNECTION_REMOVE",S[S.TEAM_CONFIG_TOGGLE_AUTO_RUN_COMMANDS=162]="TEAM_CONFIG_TOGGLE_AUTO_RUN_COMMANDS",S[S.TEAM_CONFIG_TOGGLE_MCP_SERVERS=163]="TEAM_CONFIG_TOGGLE_MCP_SERVERS",S[S.TEAM_CONFIG_TOGGLE_APP_DEPLOYMENTS=164]="TEAM_CONFIG_TOGGLE_APP_DEPLOYMENTS",S[S.TEAM_CONFIG_TOGGLE_SANDBOX_APP_DEPLOYMENTS=165]="TEAM_CONFIG_TOGGLE_SANDBOX_APP_DEPLOYMENTS",S[S.TEAM_CONFIG_TOGGLE_TEAMS_APP_DEPLOYMENTS=166]="TEAM_CONFIG_TOGGLE_TEAMS_APP_DEPLOYMENTS",S[S.TEAM_CONFIG_TOGGLE_GITHUB_REVIEWS=167]="TEAM_CONFIG_TOGGLE_GITHUB_REVIEWS",S[S.TEAM_CONFIG_TOGGLE_GITHUB_DESCRIPTION_EDITS=168]="TEAM_CONFIG_TOGGLE_GITHUB_DESCRIPTION_EDITS",S[S.TEAM_CONFIG_TOGGLE_PR_REVIEW_GUIDELINES=169]="TEAM_CONFIG_TOGGLE_PR_REVIEW_GUIDELINES",S[S.TEAM_CONFIG_TOGGLE_PR_DESCRIPTION_GUIDELINES=170]="TEAM_CONFIG_TOGGLE_PR_DESCRIPTION_GUIDELINES",S[S.TEAM_CONFIG_TOGGLE_INDIVIDUAL_LEVEL_ANALYTICS=171]="TEAM_CONFIG_TOGGLE_INDIVIDUAL_LEVEL_ANALYTICS",S[S.TEAM_CONFIG_TOGGLE_CONVERSATION_SHARING=172]="TEAM_CONFIG_TOGGLE_CONVERSATION_SHARING",S[S.TEAM_CONFIG_UPDATE_MCP_SERVERS=178]="TEAM_CONFIG_UPDATE_MCP_SERVERS",S[S.TEAM_CONFIG_TOGGLE_GITHUB_AUTO_REVIEWS=207]="TEAM_CONFIG_TOGGLE_GITHUB_AUTO_REVIEWS",S[S.TEAM_CONFIG_UPDATE_TOP_UP_SETTINGS=213]="TEAM_CONFIG_UPDATE_TOP_UP_SETTINGS",S[S.BROWSER_OPEN=180]="BROWSER_OPEN",S[S.CASCADE_WEB_TOOLS_OPEN_BROWSER_MARKDOWN=181]="CASCADE_WEB_TOOLS_OPEN_BROWSER_MARKDOWN",S[S.BROWSER_PAGE_LOAD_SUCCESS=206]="BROWSER_PAGE_LOAD_SUCCESS",S[S.BROWSER_TOOLBAR_INSERT_PAGE_MENTION=208]="BROWSER_TOOLBAR_INSERT_PAGE_MENTION",S[S.BROWSER_INSERT_TEXT_CONTENT=215]="BROWSER_INSERT_TEXT_CONTENT",S[S.BROWSER_INSERT_SCREENSHOT=216]="BROWSER_INSERT_SCREENSHOT",S[S.BROWSER_INSERT_CODE_BLOCK=217]="BROWSER_INSERT_CODE_BLOCK",S[S.BROWSER_INSERT_LOG_BLOCK=218]="BROWSER_INSERT_LOG_BLOCK",S[S.BROWSER_INSERT_CONSOLE_OUTPUT=219]="BROWSER_INSERT_CONSOLE_OUTPUT",S[S.BROWSER_INSERT_DOM_ELEMENT=220]="BROWSER_INSERT_DOM_ELEMENT",S[S.SUPERCOMPLETE_REQUEST_STARTED=195]="SUPERCOMPLETE_REQUEST_STARTED",S[S.SUPERCOMPLETE_CACHE_HIT=196]="SUPERCOMPLETE_CACHE_HIT",S[S.SUPERCOMPLETE_ERROR_GETTING_RESPONSE=197]="SUPERCOMPLETE_ERROR_GETTING_RESPONSE",S[S.SUPERCOMPLETE_NO_RESPONSE=185]="SUPERCOMPLETE_NO_RESPONSE",S[S.SUPERCOMPLETE_REQUEST_SUCCEEDED=186]="SUPERCOMPLETE_REQUEST_SUCCEEDED",S[S.SUPERCOMPLETE_FILTERED=187]="SUPERCOMPLETE_FILTERED",S[S.TAB_JUMP_REQUEST_STARTED=188]="TAB_JUMP_REQUEST_STARTED",S[S.TAB_JUMP_CACHE_HIT=189]="TAB_JUMP_CACHE_HIT",S[S.TAB_JUMP_ERROR_GETTING_RESPONSE=190]="TAB_JUMP_ERROR_GETTING_RESPONSE",S[S.TAB_JUMP_NO_RESPONSE=191]="TAB_JUMP_NO_RESPONSE",S[S.TAB_JUMP_PROCESSING_COMPLETE=192]="TAB_JUMP_PROCESSING_COMPLETE",S[S.TAB_JUMP_FILTERED=193]="TAB_JUMP_FILTERED",S[S.TAB_JUMP_ERROR_UI_RENDERED=194]="TAB_JUMP_ERROR_UI_RENDERED",S[S.AUTO_CASCADE_PR_TITLE_GENERATED=198]="AUTO_CASCADE_PR_TITLE_GENERATED",S[S.AUTO_CASCADE_PR_DESCRIPTION_GENERATED=199]="AUTO_CASCADE_PR_DESCRIPTION_GENERATED",S[S.AUTO_CASCADE_PR_REVIEW_REQUESTED=200]="AUTO_CASCADE_PR_REVIEW_REQUESTED",S[S.AUTO_CASCADE_PR_REVIEW_GENERATED=201]="AUTO_CASCADE_PR_REVIEW_GENERATED",S[S.AUTO_CASCADE_GITHUB_CONNECTION_ADDED=204]="AUTO_CASCADE_GITHUB_CONNECTION_ADDED",S[S.AUTO_CASCADE_GITHUB_CONNECTION_REMOVED=205]="AUTO_CASCADE_GITHUB_CONNECTION_REMOVED",S[S.AUTOCOMPLETE_CHAT_NO_RESPONSE=221]="AUTOCOMPLETE_CHAT_NO_RESPONSE",S[S.AUTOCOMPLETE_CHAT_ERROR_GETTING_RESPONSE=222]="AUTOCOMPLETE_CHAT_ERROR_GETTING_RESPONSE",S[S.AUTOCOMPLETE_CHAT_REQUEST_ACCEPTED=223]="AUTOCOMPLETE_CHAT_REQUEST_ACCEPTED",S))(dt||{});m.util.setEnumType(dt,"exa.codeium_common_pb.ProductEventType",[{no:0,name:"EVENT_UNSPECIFIED"},{no:251,name:"WINDSURF_EDITOR_READY"},{no:253,name:"WINDSURF_EXTENSION_START"},{no:32,name:"WINDSURF_EXTENSION_ACTIVATED"},{no:1,name:"LS_DOWNLOAD_START"},{no:2,name:"LS_DOWNLOAD_COMPLETE"},{no:5,name:"LS_DOWNLOAD_FAILURE"},{no:250,name:"LS_BINARY_STARTUP"},{no:3,name:"LS_STARTUP"},{no:4,name:"LS_FAILURE"},{no:6,name:"AUTOCOMPLETE_ACCEPTED"},{no:7,name:"AUTOCOMPLETE_ONE_WORD_ACCEPTED"},{no:8,name:"CHAT_MESSAGE_SENT"},{no:13,name:"CHAT_MENTION_INSERT"},{no:19,name:"CHAT_MENTION_MENU_OPEN"},{no:14,name:"CHAT_OPEN_SETTINGS"},{no:15,name:"CHAT_OPEN_CONTEXT_SETTINGS"},{no:16,name:"CHAT_WITH_CODEBASE"},{no:17,name:"CHAT_NEW_CONVERSATION"},{no:18,name:"CHAT_CHANGE_MODEL"},{no:34,name:"CHAT_TOGGLE_FOCUS_INSERT_TEXT"},{no:28,name:"FUNCTION_REFACTOR"},{no:29,name:"EXPLAIN_CODE_BLOCK"},{no:30,name:"FUNCTION_ADD_DOCSTRING"},{no:31,name:"EXPLAIN_PROBLEM"},{no:9,name:"COMMAND_BOX_OPENED"},{no:10,name:"COMMAND_SUBMITTED"},{no:11,name:"COMMAND_ACCEPTED"},{no:12,name:"COMMAND_REJECTED"},{no:20,name:"WS_ONBOARDING_LANDING_PAGE_OPENED"},{no:21,name:"WS_ONBOARDING_SETUP_PAGE_OPENED"},{no:22,name:"WS_ONBOARDING_KEYBINDINGS_PAGE_OPENED"},{no:23,name:"WS_ONBOARDING_MIGRATION_SCOPE_PAGE_OPENED"},{no:24,name:"WS_ONBOARDING_IMPORT_PAGE_OPENED"},{no:25,name:"WS_ONBOARDING_AUTH_PAGE_OPENED"},{no:26,name:"WS_ONBOARDING_AUTH_MANUAL_PAGE_OPENED"},{no:35,name:"WS_ONBOARDING_CHOOSE_THEME_PAGE_OPENED"},{no:27,name:"WS_ONBOARDING_COMPLETED"},{no:69,name:"WS_SKIPPED_ONBOARDING"},{no:72,name:"WS_SETTINGS_PAGE_OPEN"},{no:73,name:"WS_SETTINGS_PAGE_OPEN_WITH_SETTING_FOCUS"},{no:209,name:"EMPTY_WORKSPACE_PAGE_OPENED"},{no:210,name:"EMPTY_WORKSPACE_PAGE_RECENT_FOLDERS_CLICKED"},{no:211,name:"EMPTY_WORKSPACE_PAGE_OPEN_FOLDER_CLICKED"},{no:212,name:"EMPTY_WORKSPACE_PAGE_GENERATE_PROJECT_CLICKED"},{no:33,name:"PROVIDE_FEEDBACK"},{no:36,name:"CASCADE_MESSAGE_SENT"},{no:38,name:"WS_OPEN_CASCADE_MEMORIES_PANEL"},{no:41,name:"PROVIDE_MESSAGE_FEEDBACK"},{no:42,name:"CASCADE_MEMORY_DELETED"},{no:43,name:"CASCADE_STEP_COMPLETED"},{no:44,name:"ACKNOWLEDGE_CASCADE_CODE_EDIT"},{no:45,name:"CASCADE_WEB_TOOLS_OPEN_READ_URL_MARKDOWN"},{no:46,name:"CASCADE_WEB_TOOLS_OPEN_CHUNK_MARKDOWN"},{no:64,name:"CASCADE_MCP_SERVER_INIT"},{no:113,name:"CASCADE_KNOWLEDGE_BASE_ITEM_OPENED"},{no:119,name:"CASCADE_VIEW_LOADED"},{no:173,name:"CASCADE_CONTEXT_SCOPE_ITEM_ATTACHED"},{no:65,name:"CASCADE_CLICK_EVENT"},{no:67,name:"CASCADE_IMPRESSION_EVENT"},{no:37,name:"OPEN_CHANGELOG"},{no:39,name:"CURSOR_DETECTED"},{no:40,name:"VSCODE_DETECTED"},{no:153,name:"JETBRAINS_DETECTED"},{no:47,name:"CROSS_SELL_EXTENSION_DOWNLOAD_WINDSURF_CLICK"},{no:48,name:"CROSS_SELL_EXTENSION_DOWNLOAD_WINDSURF_NUDGE_IMPRESSION"},{no:49,name:"WS_PROBLEMS_TAB_SEND_ALL_TO_CASCADE"},{no:50,name:"WS_PROBLEMS_TAB_SEND_ALL_IN_FILE_TO_CASCADE"},{no:51,name:"WS_CASCADE_BAR_FILE_NAV"},{no:52,name:"WS_CASCADE_BAR_HUNK_NAV"},{no:53,name:"WS_CASCADE_BAR_ACCEPT_FILE"},{no:54,name:"WS_CASCADE_BAR_REJECT_FILE"},{no:55,name:"WS_CUSTOM_APP_ICON_MODAL_OPEN"},{no:56,name:"WS_CUSTOM_APP_ICON_SELECT_CLASSIC"},{no:57,name:"WS_CUSTOM_APP_ICON_SELECT_CLASSIC_LIGHT"},{no:58,name:"WS_CUSTOM_APP_ICON_SELECT_RETRO"},{no:59,name:"WS_CUSTOM_APP_ICON_SELECT_BLUEPRINT"},{no:60,name:"WS_CUSTOM_APP_ICON_SELECT_HAND_DRAWN"},{no:61,name:"WS_CUSTOM_APP_ICON_SELECT_SUNSET"},{no:66,name:"WS_CUSTOM_APP_ICON_SELECT_VALENTINE"},{no:82,name:"WS_CUSTOM_APP_ICON_SELECT_PIXEL_SURF"},{no:63,name:"ENTERED_MCP_TOOLBAR_TAB"},{no:62,name:"CLICKED_TO_CONFIGURE_MCP"},{no:68,name:"WS_SETTINGS_UPDATED"},{no:70,name:"BROWSER_PREVIEW_DOM_ELEMENT"},{no:71,name:"BROWSER_PREVIEW_CONSOLE_OUTPUT"},{no:74,name:"WS_SETTINGS_CHANGED_BY_USER"},{no:75,name:"WS_GENERATE_COMMIT_MESSAGE_CLICKED"},{no:76,name:"WS_GENERATE_COMMIT_MESSAGE_ERRORED"},{no:77,name:"WS_CLICKED_COMMIT_FROM_SCM_PANEL"},{no:79,name:"WS_CANCELED_GENERATE_COMMIT_MESSAGE"},{no:78,name:"USING_DEV_EXTENSION"},{no:80,name:"WS_APP_DEPLOYMENT_CREATE_PROJECT"},{no:81,name:"WS_APP_DEPLOYMENT_DEPLOY_PROJECT"},{no:114,name:"CASCADE_OPEN_ACTIVE_CONVERSATION_DROPDOWN"},{no:115,name:"CASCADE_SELECT_ACTIVE_CONVERSATION_ON_DROPDOWN"},{no:122,name:"CASCADE_NAVIGATE_ACTIVE_CONVERSATION_ON_DROPDOWN"},{no:123,name:"CASCADE_SNOOZE_CONVERSATION_ON_DROPDOWN"},{no:124,name:"CASCADE_TOGGLE_NOTIFICATION_ON_DROPDOWN"},{no:125,name:"CASCADE_SELECT_NOTIFICATION_ON_DROPDOWN"},{no:126,name:"CASCADE_NAVIGATE_NOTIFICATION_ON_DROPDOWN"},{no:127,name:"CASCADE_DISMISS_NOTIFICATION_ON_DROPDOWN"},{no:137,name:"CASCADE_TRAJECTORY_SHARE_COPY_LINK"},{no:138,name:"CASCADE_TRAJECTORY_SHARE_CREATE_LINK"},{no:139,name:"CASCADE_CUSTOMIZATIONS_TAB_CHANGE"},{no:140,name:"CASCADE_WORKFLOW_OPEN"},{no:141,name:"CASCADE_NEW_WORKFLOW_CLICKED"},{no:184,name:"CASCADE_NEW_GLOBAL_WORKFLOW_CLICKED"},{no:142,name:"CASCADE_WORKFLOW_REFRESH_CLICKED"},{no:143,name:"CASCADE_RULE_OPEN"},{no:144,name:"CASCADE_NEW_RULE_CLICKED"},{no:145,name:"CASCADE_NEW_GLOBAL_RULE_CLICKED"},{no:146,name:"CASCADE_RULE_REFRESH_CLICKED"},{no:147,name:"CASCADE_IMPORT_RULES_FROM_CURSOR_CLICKED"},{no:152,name:"WS_IMPORT_CURSOR_RULES_COMMAND_PALETTE"},{no:83,name:"CASCADE_CHANGES_ACCEPT_ALL"},{no:84,name:"CASCADE_CHANGES_REJECT_ALL"},{no:85,name:"CASCADE_MEMORIES_EDIT"},{no:86,name:"CASCADE_MEMORIES_VIEW"},{no:136,name:"KEYBOARD_SHORTCUT"},{no:87,name:"CASCADE_INSERT_AT_MENTION"},{no:120,name:"CASCADE_ERROR_STEP"},{no:121,name:"CASCADE_SUGGESTED_RESPONSES_SUGGESTION_CLICKED"},{no:128,name:"CASCADE_PLUGIN_PANEL_OPENED"},{no:129,name:"CASCADE_PLUGIN_PAGE_OPENED"},{no:130,name:"CASCADE_PLUGIN_INSTALLED"},{no:131,name:"CASCADE_PLUGIN_DISABLED"},{no:132,name:"CASCADE_PLUGIN_ENABLED"},{no:133,name:"CASCADE_PLUGIN_INSTALLATION_ERROR"},{no:134,name:"CASCADE_PLUGIN_TOOL_ENABLED"},{no:135,name:"CASCADE_PLUGIN_TOOL_DISABLED"},{no:88,name:"WEBSITE_NOT_FOUND_PAGE"},{no:89,name:"WEBSITE_AUTH_REDIRECT_LONG_WAIT"},{no:90,name:"WEBSITE_AUTH_REDIRECT_ERROR"},{no:112,name:"WEBSITE_AUTH_REDIRECT_SUCCESS"},{no:175,name:"WEBSITE_PAGE_VISIT"},{no:176,name:"WEBSITE_SIGNUP_INFO"},{no:177,name:"WEBSITE_START_PLAN_CHECKOUT"},{no:202,name:"WEBSITE_START_UPDATE_PAYMENT"},{no:203,name:"WEBSITE_START_VIEW_INVOICES"},{no:214,name:"WEBSITE_UNIVERSITY_LECTURE_VIEW"},{no:224,name:"WEBSITE_DISALLOW_ENTERPRISE_LOGIN"},{no:225,name:"WEBSITE_SSO_LOGIN_REDIRECT"},{no:226,name:"WEBSITE_ATTEMPT_TO_LOGIN"},{no:227,name:"WEBSITE_SUCCESSFUL_LOGIN"},{no:228,name:"WEBSITE_FAILED_LOGIN"},{no:91,name:"JB_OPEN_PLAN_INFO"},{no:92,name:"JB_SNOOZE_PLUGIN"},{no:93,name:"JB_TOGGLE_PLUGIN_STATUS"},{no:94,name:"JB_SWITCH_CHANNEL"},{no:95,name:"JB_OPEN_SETTINGS"},{no:96,name:"JB_PLUGIN_LOG_IN"},{no:97,name:"JB_PLUGIN_LOG_OUT"},{no:98,name:"JB_OPEN_QUICK_REFERENCE"},{no:99,name:"JB_EDIT_KEYBOARD_SHORTCUTS"},{no:100,name:"JB_CASCADE_BAR_CASCADE_ICON"},{no:101,name:"JB_CASCADE_BAR_FILE_NAV"},{no:102,name:"JB_CASCADE_BAR_HUNK_NAV"},{no:103,name:"JB_CASCADE_BAR_ACCEPT_FILE"},{no:104,name:"JB_CASCADE_BAR_REJECT_FILE"},{no:105,name:"JB_INLAY_HUNK_ACCEPT"},{no:106,name:"JB_INLAY_HUNK_REJECT"},{no:107,name:"JB_DIFF_RE_RENDER"},{no:108,name:"JB_ONBOARDING_OPENED"},{no:109,name:"JB_ONBOARDING_COMPLETED"},{no:110,name:"JB_ONBOARDING_SKIPPED"},{no:111,name:"JB_ONBOARDING_LEARN_MORE"},{no:116,name:"JB_DIFF_RESOLUTION_ERRORED"},{no:117,name:"JB_ACKNOWLEDGE_CODE_EDIT_ERRORED"},{no:118,name:"JB_OPEN_SETTINGS_NOTIFICATION"},{no:148,name:"JB_MCP_ADD_SERVER"},{no:149,name:"JB_MCP_SAVE_CONFIG"},{no:150,name:"JB_MCP_EXPAND_TOOLS"},{no:151,name:"JB_DISABLE_AUTOGEN_MEMORY"},{no:154,name:"JB_TOGGLE_AUTOCOMPLETE"},{no:174,name:"JB_LOGIN_MANUAL_AUTH_TOKEN"},{no:179,name:"JB_AUTO_UPDATED"},{no:182,name:"JB_DRAG_DROP_FILE"},{no:183,name:"JB_AUTO_OPEN_CHAT_WINDOW"},{no:155,name:"WS_TERMINAL_INTEGRATION_FORCE_EXIT"},{no:156,name:"KNOWLEDGE_BASE_ITEM_CREATED"},{no:157,name:"KNOWLEDGE_BASE_ITEM_EDITED"},{no:158,name:"KNOWLEDGE_BASE_ITEM_DELETED"},{no:159,name:"KNOWLEDGE_BASE_ITEM_READ"},{no:160,name:"KNOWLEDGE_BASE_CONNECTION_CREATE"},{no:161,name:"KNOWLEDGE_BASE_CONNECTION_REMOVE"},{no:162,name:"TEAM_CONFIG_TOGGLE_AUTO_RUN_COMMANDS"},{no:163,name:"TEAM_CONFIG_TOGGLE_MCP_SERVERS"},{no:164,name:"TEAM_CONFIG_TOGGLE_APP_DEPLOYMENTS"},{no:165,name:"TEAM_CONFIG_TOGGLE_SANDBOX_APP_DEPLOYMENTS"},{no:166,name:"TEAM_CONFIG_TOGGLE_TEAMS_APP_DEPLOYMENTS"},{no:167,name:"TEAM_CONFIG_TOGGLE_GITHUB_REVIEWS"},{no:168,name:"TEAM_CONFIG_TOGGLE_GITHUB_DESCRIPTION_EDITS"},{no:169,name:"TEAM_CONFIG_TOGGLE_PR_REVIEW_GUIDELINES"},{no:170,name:"TEAM_CONFIG_TOGGLE_PR_DESCRIPTION_GUIDELINES"},{no:171,name:"TEAM_CONFIG_TOGGLE_INDIVIDUAL_LEVEL_ANALYTICS"},{no:172,name:"TEAM_CONFIG_TOGGLE_CONVERSATION_SHARING"},{no:178,name:"TEAM_CONFIG_UPDATE_MCP_SERVERS"},{no:207,name:"TEAM_CONFIG_TOGGLE_GITHUB_AUTO_REVIEWS"},{no:213,name:"TEAM_CONFIG_UPDATE_TOP_UP_SETTINGS"},{no:180,name:"BROWSER_OPEN"},{no:181,name:"CASCADE_WEB_TOOLS_OPEN_BROWSER_MARKDOWN"},{no:206,name:"BROWSER_PAGE_LOAD_SUCCESS"},{no:208,name:"BROWSER_TOOLBAR_INSERT_PAGE_MENTION"},{no:215,name:"BROWSER_INSERT_TEXT_CONTENT"},{no:216,name:"BROWSER_INSERT_SCREENSHOT"},{no:217,name:"BROWSER_INSERT_CODE_BLOCK"},{no:218,name:"BROWSER_INSERT_LOG_BLOCK"},{no:219,name:"BROWSER_INSERT_CONSOLE_OUTPUT"},{no:220,name:"BROWSER_INSERT_DOM_ELEMENT"},{no:195,name:"SUPERCOMPLETE_REQUEST_STARTED"},{no:196,name:"SUPERCOMPLETE_CACHE_HIT"},{no:197,name:"SUPERCOMPLETE_ERROR_GETTING_RESPONSE"},{no:185,name:"SUPERCOMPLETE_NO_RESPONSE"},{no:186,name:"SUPERCOMPLETE_REQUEST_SUCCEEDED"},{no:187,name:"SUPERCOMPLETE_FILTERED"},{no:188,name:"TAB_JUMP_REQUEST_STARTED"},{no:189,name:"TAB_JUMP_CACHE_HIT"},{no:190,name:"TAB_JUMP_ERROR_GETTING_RESPONSE"},{no:191,name:"TAB_JUMP_NO_RESPONSE"},{no:192,name:"TAB_JUMP_PROCESSING_COMPLETE"},{no:193,name:"TAB_JUMP_FILTERED"},{no:194,name:"TAB_JUMP_ERROR_UI_RENDERED"},{no:198,name:"AUTO_CASCADE_PR_TITLE_GENERATED"},{no:199,name:"AUTO_CASCADE_PR_DESCRIPTION_GENERATED"},{no:200,name:"AUTO_CASCADE_PR_REVIEW_REQUESTED"},{no:201,name:"AUTO_CASCADE_PR_REVIEW_GENERATED"},{no:204,name:"AUTO_CASCADE_GITHUB_CONNECTION_ADDED"},{no:205,name:"AUTO_CASCADE_GITHUB_CONNECTION_REMOVED"},{no:221,name:"AUTOCOMPLETE_CHAT_NO_RESPONSE"},{no:222,name:"AUTOCOMPLETE_CHAT_ERROR_GETTING_RESPONSE"},{no:223,name:"AUTOCOMPLETE_CHAT_REQUEST_ACCEPTED"}]);var TL=(a=>(a[a.UNSPECIFIED=0]="UNSPECIFIED",a[a.GITHUB_BASE=1]="GITHUB_BASE",a[a.SLACK_BASE=2]="SLACK_BASE",a[a.SLACK_AGGREGATE=3]="SLACK_AGGREGATE",a[a.GOOGLE_DRIVE_BASE=4]="GOOGLE_DRIVE_BASE",a[a.JIRA_BASE=5]="JIRA_BASE",a[a.SCM=6]="SCM",a))(TL||{});m.util.setEnumType(TL,"exa.codeium_common_pb.IndexChoice",[{no:0,name:"INDEX_CHOICE_UNSPECIFIED"},{no:1,name:"INDEX_CHOICE_GITHUB_BASE"},{no:2,name:"INDEX_CHOICE_SLACK_BASE"},{no:3,name:"INDEX_CHOICE_SLACK_AGGREGATE"},{no:4,name:"INDEX_CHOICE_GOOGLE_DRIVE_BASE"},{no:5,name:"INDEX_CHOICE_JIRA_BASE"},{no:6,name:"INDEX_CHOICE_SCM"}]);var _L=(a=>(a[a.UNSPECIFIED=0]="UNSPECIFIED",a[a.HEADER_1=1]="HEADER_1",a[a.HEADER_2=2]="HEADER_2",a[a.HEADER_3=3]="HEADER_3",a[a.HEADER_4=4]="HEADER_4",a[a.HEADER_5=5]="HEADER_5",a[a.HEADER_6=6]="HEADER_6",a))(_L||{});m.util.setEnumType(_L,"exa.codeium_common_pb.MarkdownNodeType",[{no:0,name:"MARKDOWN_NODE_TYPE_UNSPECIFIED"},{no:1,name:"MARKDOWN_NODE_TYPE_HEADER_1"},{no:2,name:"MARKDOWN_NODE_TYPE_HEADER_2"},{no:3,name:"MARKDOWN_NODE_TYPE_HEADER_3"},{no:4,name:"MARKDOWN_NODE_TYPE_HEADER_4"},{no:5,name:"MARKDOWN_NODE_TYPE_HEADER_5"},{no:6,name:"MARKDOWN_NODE_TYPE_HEADER_6"}]);var dx=(n=>(n[n.UNSPECIFIED=0]="UNSPECIFIED",n[n.USER=1]="USER",n[n.CASCADE=2]="CASCADE",n))(dx||{});m.util.setEnumType(dx,"exa.codeium_common_pb.TerminalShellCommandSource",[{no:0,name:"TERMINAL_SHELL_COMMAND_SOURCE_UNSPECIFIED"},{no:1,name:"TERMINAL_SHELL_COMMAND_SOURCE_USER"},{no:2,name:"TERMINAL_SHELL_COMMAND_SOURCE_CASCADE"}]);var PL=(n=>(n[n.UNSPECIFIED=0]="UNSPECIFIED",n[n.RUNNING=1]="RUNNING",n[n.COMPLETED=2]="COMPLETED",n))(PL||{});m.util.setEnumType(PL,"exa.codeium_common_pb.TerminalShellCommandStatus",[{no:0,name:"TERMINAL_SHELL_COMMAND_STATUS_UNSPECIFIED"},{no:1,name:"TERMINAL_SHELL_COMMAND_STATUS_RUNNING"},{no:2,name:"TERMINAL_SHELL_COMMAND_STATUS_COMPLETED"}]);var wW=(a=>(a[a.UNSPECIFIED=0]="UNSPECIFIED",a[a.QUEUED=1]="QUEUED",a[a.INITIALIZING=2]="INITIALIZING",a[a.BUILDING=3]="BUILDING",a[a.ERROR=4]="ERROR",a[a.READY=5]="READY",a[a.CANCELED=6]="CANCELED",a))(wW||{});m.util.setEnumType(wW,"exa.codeium_common_pb.DeploymentBuildStatus",[{no:0,name:"DEPLOYMENT_BUILD_STATUS_UNSPECIFIED"},{no:1,name:"DEPLOYMENT_BUILD_STATUS_QUEUED"},{no:2,name:"DEPLOYMENT_BUILD_STATUS_INITIALIZING"},{no:3,name:"DEPLOYMENT_BUILD_STATUS_BUILDING"},{no:4,name:"DEPLOYMENT_BUILD_STATUS_ERROR"},{no:5,name:"DEPLOYMENT_BUILD_STATUS_READY"},{no:6,name:"DEPLOYMENT_BUILD_STATUS_CANCELED"}]);var Oh=(o=>(o[o.UNSPECIFIED=0]="UNSPECIFIED",o[o.VERCEL=1]="VERCEL",o[o.NETLIFY=2]="NETLIFY",o[o.CLOUDFLARE=3]="CLOUDFLARE",o))(Oh||{});m.util.setEnumType(Oh,"exa.codeium_common_pb.DeploymentProvider",[{no:0,name:"DEPLOYMENT_PROVIDER_UNSPECIFIED"},{no:1,name:"DEPLOYMENT_PROVIDER_VERCEL"},{no:2,name:"DEPLOYMENT_PROVIDER_NETLIFY"},{no:3,name:"DEPLOYMENT_PROVIDER_CLOUDFLARE"}]);var RW=(i=>(i[i.UNSPECIFIED=0]="UNSPECIFIED",i[i.AVAILABLE=1]="AVAILABLE",i[i.IN_USE=2]="IN_USE",i[i.TAKEN=3]="TAKEN",i[i.INVALID=4]="INVALID",i))(RW||{});m.util.setEnumType(RW,"exa.codeium_common_pb.ValidationStatus",[{no:0,name:"VALIDATION_STATUS_UNSPECIFIED"},{no:1,name:"VALIDATION_STATUS_AVAILABLE"},{no:2,name:"VALIDATION_STATUS_IN_USE"},{no:3,name:"VALIDATION_STATUS_TAKEN"},{no:4,name:"VALIDATION_STATUS_INVALID"}]);var DL=(n=>(n[n.UNSPECIFIED=0]="UNSPECIFIED",n[n.OPTIONAL=1]="OPTIONAL",n[n.REQUIRED=2]="REQUIRED",n))(DL||{});m.util.setEnumType(DL,"exa.codeium_common_pb.SandboxEnforcementMode",[{no:0,name:"SANDBOX_ENFORCEMENT_MODE_UNSPECIFIED"},{no:1,name:"SANDBOX_ENFORCEMENT_MODE_OPTIONAL"},{no:2,name:"SANDBOX_ENFORCEMENT_MODE_REQUIRED"}]);var wL=(l=>(l[l.UNSPECIFIED=0]="UNSPECIFIED",l[l.LLAMA_2=1]="LLAMA_2",l[l.LLAMA_3=2]="LLAMA_3",l[l.CHATML=3]="CHATML",l[l.CHAT_TRANSCRIPT=4]="CHAT_TRANSCRIPT",l[l.DEEPSEEK_V2=5]="DEEPSEEK_V2",l[l.DEEPSEEK_V3=6]="DEEPSEEK_V3",l[l.KIMI=7]="KIMI",l))(wL||{});m.util.setEnumType(wL,"exa.codeium_common_pb.PromptTemplaterType",[{no:0,name:"PROMPT_TEMPLATER_TYPE_UNSPECIFIED"},{no:1,name:"PROMPT_TEMPLATER_TYPE_LLAMA_2"},{no:2,name:"PROMPT_TEMPLATER_TYPE_LLAMA_3"},{no:3,name:"PROMPT_TEMPLATER_TYPE_CHATML"},{no:4,name:"PROMPT_TEMPLATER_TYPE_CHAT_TRANSCRIPT"},{no:5,name:"PROMPT_TEMPLATER_TYPE_DEEPSEEK_V2"},{no:6,name:"PROMPT_TEMPLATER_TYPE_DEEPSEEK_V3"},{no:7,name:"PROMPT_TEMPLATER_TYPE_KIMI"}]);var RL=(l=>(l[l.UNSPECIFIED=0]="UNSPECIFIED",l[l.LLAMA_3=1]="LLAMA_3",l[l.HERMES=2]="HERMES",l[l.XML=3]="XML",l[l.CHAT_TRANSCRIPT=4]="CHAT_TRANSCRIPT",l[l.KIMI=5]="KIMI",l[l.QWENCODER=6]="QWENCODER",l[l.SUPERCOMPLETE=7]="SUPERCOMPLETE",l))(RL||{});m.util.setEnumType(RL,"exa.codeium_common_pb.ToolFormatterType",[{no:0,name:"TOOL_FORMATTER_TYPE_UNSPECIFIED"},{no:1,name:"TOOL_FORMATTER_TYPE_LLAMA_3"},{no:2,name:"TOOL_FORMATTER_TYPE_HERMES"},{no:3,name:"TOOL_FORMATTER_TYPE_XML"},{no:4,name:"TOOL_FORMATTER_TYPE_CHAT_TRANSCRIPT"},{no:5,name:"TOOL_FORMATTER_TYPE_KIMI"},{no:6,name:"TOOL_FORMATTER_TYPE_QWENCODER"},{no:7,name:"TOOL_FORMATTER_TYPE_SUPERCOMPLETE"}]);var kW=(i=>(i[i.UNSPECIFIED=0]="UNSPECIFIED",i[i.NOT_INSTALLED=1]="NOT_INSTALLED",i[i.IN_PROGRESS=2]="IN_PROGRESS",i[i.COMPLETE=3]="COMPLETE",i[i.ERROR=4]="ERROR",i))(kW||{});m.util.setEnumType(kW,"exa.codeium_common_pb.BrowserInstallationStatus",[{no:0,name:"BROWSER_INSTALLATION_STATUS_UNSPECIFIED"},{no:1,name:"BROWSER_INSTALLATION_STATUS_NOT_INSTALLED"},{no:2,name:"BROWSER_INSTALLATION_STATUS_IN_PROGRESS"},{no:3,name:"BROWSER_INSTALLATION_STATUS_COMPLETE"},{no:4,name:"BROWSER_INSTALLATION_STATUS_ERROR"}]);var AW=(n=>(n[n.UNSPECIFIED=0]="UNSPECIFIED",n[n.CASCADE=1]="CASCADE",n[n.MAINLINE_TRAJECTORY=2]="MAINLINE_TRAJECTORY",n))(AW||{});m.util.setEnumType(AW,"exa.codeium_common_pb.TrajectoryType",[{no:0,name:"TRAJECTORY_TYPE_UNSPECIFIED"},{no:1,name:"TRAJECTORY_TYPE_CASCADE"},{no:2,name:"TRAJECTORY_TYPE_MAINLINE_TRAJECTORY"}]);var OW=(a=>(a[a.UNSPECIFIED=0]="UNSPECIFIED",a[a.RULE=1]="RULE",a[a.WORKFLOW=2]="WORKFLOW",a[a.USER_MEMORY=3]="USER_MEMORY",a[a.SKILL=4]="SKILL",a[a.PLAN=5]="PLAN",a[a.MCP=6]="MCP",a))(OW||{});m.util.setEnumType(OW,"exa.codeium_common_pb.RefreshCustomizationType",[{no:0,name:"REFRESH_CUSTOMIZATION_TYPE_UNSPECIFIED"},{no:1,name:"REFRESH_CUSTOMIZATION_TYPE_RULE"},{no:2,name:"REFRESH_CUSTOMIZATION_TYPE_WORKFLOW"},{no:3,name:"REFRESH_CUSTOMIZATION_TYPE_USER_MEMORY"},{no:4,name:"REFRESH_CUSTOMIZATION_TYPE_SKILL"},{no:5,name:"REFRESH_CUSTOMIZATION_TYPE_PLAN"},{no:6,name:"REFRESH_CUSTOMIZATION_TYPE_MCP"}]);var kL=(e=>(e[e.UNSPECIFIED=0]="UNSPECIFIED",e[e.OPENAI=1]="OPENAI",e))(kL||{});m.util.setEnumType(kL,"exa.codeium_common_pb.ThirdPartyWebSearchProvider",[{no:0,name:"THIRD_PARTY_WEB_SEARCH_PROVIDER_UNSPECIFIED"},{no:1,name:"THIRD_PARTY_WEB_SEARCH_PROVIDER_OPENAI"}]);var AL=(o=>(o[o.UNSPECIFIED=0]="UNSPECIFIED",o[o.O3=1]="O3",o[o.GPT_4_1=2]="GPT_4_1",o[o.O4_MINI=3]="O4_MINI",o))(AL||{});m.util.setEnumType(AL,"exa.codeium_common_pb.ThirdPartyWebSearchModel",[{no:0,name:"THIRD_PARTY_WEB_SEARCH_MODEL_UNSPECIFIED"},{no:1,name:"THIRD_PARTY_WEB_SEARCH_MODEL_O3"},{no:2,name:"THIRD_PARTY_WEB_SEARCH_MODEL_GPT_4_1"},{no:3,name:"THIRD_PARTY_WEB_SEARCH_MODEL_O4_MINI"}]);var PA=class r extends M{constructor(e){super();this.prompt="";this.contextPrompt="";this.uid="";this.promptElementRanges=[];this.promptElementKindInfos=[];this.promptLatencyMs=ne.zero;this.promptStageLatencies=[];this.numTokenizedBytes=ne.zero;this.editorLanguage="";this.language=0;this.absolutePathUriForTelemetry="";this.relativePathForTelemetry="";this.workspaceUriForTelemetry="";this.experimentFeaturesJson="";this.experimentVariantJson="";this.model=0;this.hasLineSuffix=!1;this.shouldInlineFim=!1;this.modelTag="";this.experimentTags=[];this.evalSuffix="";this.promptAnnotationRanges=[];this.supportsPackedStreamingCompletionMaps=!1;m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.CompletionsRequest"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"configuration",kind:"message",T:DA},{no:2,name:"prompt",kind:"scalar",T:9},{no:21,name:"context_prompt",kind:"scalar",T:9},{no:25,name:"uid",kind:"scalar",T:9},{no:8,name:"prompt_element_ranges",kind:"message",T:wA,repeated:!0},{no:9,name:"prompt_element_kind_infos",kind:"message",T:kA,repeated:!0},{no:11,name:"prompt_latency_ms",kind:"scalar",T:4},{no:12,name:"prompt_stage_latencies",kind:"message",T:AA,repeated:!0},{no:20,name:"num_tokenized_bytes",kind:"scalar",T:4},{no:3,name:"editor_language",kind:"scalar",T:9},{no:4,name:"language",kind:"enum",T:m.getEnumType(ns)},{no:5,name:"absolute_path_uri_for_telemetry",kind:"scalar",T:9},{no:6,name:"relative_path_for_telemetry",kind:"scalar",T:9},{no:13,name:"workspace_uri_for_telemetry",kind:"scalar",T:9},{no:7,name:"experiment_features_json",kind:"scalar",T:9},{no:19,name:"experiment_variant_json",kind:"scalar",T:9},{no:10,name:"model",kind:"enum",T:m.getEnumType(fo)},{no:14,name:"has_line_suffix",kind:"scalar",T:8},{no:15,name:"should_inline_fim",kind:"scalar",T:8},{no:16,name:"repository",kind:"message",T:nO},{no:17,name:"model_tag",kind:"scalar",T:9},{no:18,name:"experiment_tags",kind:"scalar",T:9,repeated:!0},{no:22,name:"eval_suffix",kind:"scalar",T:9},{no:23,name:"prompt_annotation_ranges",kind:"message",T:RA,repeated:!0},{no:24,name:"supports_packed_streaming_completion_maps",kind:"scalar",T:8}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},DA=class r extends M{constructor(e){super();this.numCompletions=ne.zero;this.maxTokens=ne.zero;this.maxNewlines=ne.zero;this.minLogProbability=0;this.temperature=0;this.firstTemperature=0;this.topK=ne.zero;this.topP=0;this.stopPatterns=[];this.seed=ne.zero;this.fimEotProbThreshold=0;this.useFimEotThreshold=!1;this.doNotScoreStopTokens=!1;this.sqrtLenNormalizedLogProbScore=!1;this.lastMessageIsPartial=!1;this.returnLogprob=!1;this.serviceTier="";m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.CompletionConfiguration"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"num_completions",kind:"scalar",T:4},{no:2,name:"max_tokens",kind:"scalar",T:4},{no:3,name:"max_newlines",kind:"scalar",T:4},{no:4,name:"min_log_probability",kind:"scalar",T:1},{no:5,name:"temperature",kind:"scalar",T:1},{no:6,name:"first_temperature",kind:"scalar",T:1},{no:7,name:"top_k",kind:"scalar",T:4},{no:8,name:"top_p",kind:"scalar",T:1},{no:9,name:"stop_patterns",kind:"scalar",T:9,repeated:!0},{no:10,name:"seed",kind:"scalar",T:4},{no:11,name:"fim_eot_prob_threshold",kind:"scalar",T:1},{no:12,name:"use_fim_eot_threshold",kind:"scalar",T:8},{no:13,name:"do_not_score_stop_tokens",kind:"scalar",T:8},{no:14,name:"sqrt_len_normalized_log_prob_score",kind:"scalar",T:8},{no:15,name:"last_message_is_partial",kind:"scalar",T:8},{no:16,name:"return_logprob",kind:"scalar",T:8},{no:17,name:"service_tier",kind:"scalar",T:9}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},wA=class r extends M{constructor(e){super();this.kind=0;this.byteOffsetStart=ne.zero;this.byteOffsetEnd=ne.zero;this.tokenOffsetStart=ne.zero;this.tokenOffsetEnd=ne.zero;m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.PromptElementRange"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"kind",kind:"enum",T:m.getEnumType(YS)},{no:2,name:"byte_offset_start",kind:"scalar",T:4},{no:3,name:"byte_offset_end",kind:"scalar",T:4},{no:4,name:"token_offset_start",kind:"scalar",T:4},{no:5,name:"token_offset_end",kind:"scalar",T:4}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},k4=class r extends M{constructor(e){super();this.cortexPlanId="";this.codePlanId="";this.actionIndex=0;m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.ActionPointer"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"cortex_plan_id",kind:"scalar",T:9},{no:2,name:"code_plan_id",kind:"scalar",T:9},{no:3,name:"action_index",kind:"scalar",T:5}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},RA=class r extends M{constructor(e){super();this.kind=0;this.byteOffsetStart=ne.zero;this.byteOffsetEnd=ne.zero;this.suffix="";m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.PromptAnnotationRange"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"kind",kind:"enum",T:m.getEnumType(M1)},{no:2,name:"byte_offset_start",kind:"scalar",T:4},{no:3,name:"byte_offset_end",kind:"scalar",T:4},{no:4,name:"suffix",kind:"scalar",T:9}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},NS=class r extends M{constructor(e){super();this.key=0;this.keyString="";this.disabled=!1;this.payload={case:void 0};this.source=0;m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.ExperimentWithVariant"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"key",kind:"enum",T:m.getEnumType(tm)},{no:5,name:"key_string",kind:"scalar",T:9},{no:6,name:"disabled",kind:"scalar",T:8},{no:2,name:"string",kind:"scalar",T:9,oneof:"payload"},{no:3,name:"json",kind:"scalar",T:9,oneof:"payload"},{no:4,name:"csv",kind:"scalar",T:9,oneof:"payload"},{no:7,name:"source",kind:"enum",T:m.getEnumType(N1)}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},A4=class r extends M{constructor(e){super();this.experiments=[];this.forceEnableExperiments=[];this.forceDisableExperiments=[];this.forceEnableExperimentsWithVariants=[];this.forceEnableExperimentStrings=[];this.forceDisableExperimentStrings=[];this.devMode=!1;m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.ExperimentConfig"}static{this.fields=m.util.newFieldList(()=>[{no:6,name:"experiments",kind:"message",T:NS,repeated:!0},{no:1,name:"force_enable_experiments",kind:"enum",T:m.getEnumType(tm),repeated:!0},{no:2,name:"force_disable_experiments",kind:"enum",T:m.getEnumType(tm),repeated:!0},{no:3,name:"force_enable_experiments_with_variants",kind:"message",T:NS,repeated:!0},{no:4,name:"force_enable_experiment_strings",kind:"scalar",T:9,repeated:!0},{no:5,name:"force_disable_experiment_strings",kind:"scalar",T:9,repeated:!0},{no:7,name:"dev_mode",kind:"scalar",T:8}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},O4=class r extends M{constructor(e){super();this.sha="";this.crc32cLinuxX64="";this.crc32cLinuxArm="";this.crc32cMacosX64="";this.crc32cMacosArm="";this.crc32cWindowsX64="";m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.ExperimentLanguageServerVersionPayload"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"sha",kind:"scalar",T:9},{no:2,name:"crc32c_linux_x64",kind:"scalar",T:9},{no:3,name:"crc32c_linux_arm",kind:"scalar",T:9},{no:4,name:"crc32c_macos_x64",kind:"scalar",T:9},{no:5,name:"crc32c_macos_arm",kind:"scalar",T:9},{no:6,name:"crc32c_windows_x64",kind:"scalar",T:9}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},L4=class r extends M{constructor(e){super();this.modelName="";this.contextCheckModelName="";m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.ExperimentModelConfigPayload"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"model_name",kind:"scalar",T:9},{no:2,name:"context_check_model_name",kind:"scalar",T:9}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},M4=class r extends M{constructor(e){super();this.modeToken="";m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.ExperimentMiddleModeTokenPayload"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"mode_token",kind:"scalar",T:9}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},N4=class r extends M{constructor(e){super();this.threshold=0;m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.ExperimentMultilineModelThresholdPayload"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"threshold",kind:"scalar",T:2}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},U4=class r extends M{constructor(e){super();this.sampleRate=0;this.procedureToSampleRate={};this.errorMatchToSampleRate={};m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.ExperimentSentryPayload"}static{this.fields=m.util.newFieldList(()=>[{no:2,name:"sample_rate",kind:"scalar",T:1},{no:3,name:"procedure_to_sample_rate",kind:"map",K:9,V:{kind:"scalar",T:1}},{no:5,name:"error_match_to_sample_rate",kind:"map",K:9,V:{kind:"scalar",T:1}}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},F4=class r extends M{constructor(e){super();this.teamId="";this.cascadeModelLabels=[];this.commandModelLabels=[];this.extensionModelLabels=[];this.allowedApiProviders=[];this.cliModelLabels=[];this.allowedModelProviders=[];this.cascadeModelUids=[];this.commandModelUids=[];this.cliModelUids=[];this.modelFilterMode=0;this.adaptiveSetting=0;this.anthropicProfileId="";this.anthropicCyberVerificationStatus="";this.anthropicCyberVerificationEnabled=0;this.blockedModelTags=[];this.quickReviewSetting=0;m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.TeamOrganizationalControls"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"team_id",kind:"scalar",T:9},{no:2,name:"cascade_model_labels",kind:"scalar",T:9,repeated:!0},{no:3,name:"command_model_labels",kind:"scalar",T:9,repeated:!0},{no:4,name:"created_at",kind:"message",T:Ve},{no:5,name:"updated_at",kind:"message",T:Ve},{no:6,name:"extension_model_labels",kind:"scalar",T:9,repeated:!0},{no:8,name:"allowed_api_providers",kind:"enum",T:m.getEnumType(am),repeated:!0},{no:9,name:"cli_model_labels",kind:"scalar",T:9,repeated:!0},{no:10,name:"allowed_model_providers",kind:"enum",T:m.getEnumType(ex),repeated:!0},{no:11,name:"cascade_model_uids",kind:"scalar",T:9,repeated:!0},{no:12,name:"command_model_uids",kind:"scalar",T:9,repeated:!0},{no:13,name:"cli_model_uids",kind:"scalar",T:9,repeated:!0},{no:14,name:"model_filter_mode",kind:"enum",T:m.getEnumType(OL)},{no:15,name:"adaptive_setting",kind:"enum",T:m.getEnumType(LL)},{no:16,name:"anthropic_profile_id",kind:"scalar",T:9},{no:17,name:"anthropic_cyber_verification_status",kind:"scalar",T:9},{no:18,name:"anthropic_cyber_verification_enabled",kind:"enum",T:m.getEnumType(ML)},{no:19,name:"blocked_model_tags",kind:"scalar",T:9,repeated:!0},{no:20,name:"quick_review_setting",kind:"enum",T:m.getEnumType(NL)}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},OL=(n=>(n[n.UNSPECIFIED=0]="UNSPECIFIED",n[n.BY_MODEL=1]="BY_MODEL",n[n.BY_PROVIDER=2]="BY_PROVIDER",n))(OL||{});m.util.setEnumType(OL,"exa.codeium_common_pb.TeamOrganizationalControls.ModelFilterMode",[{no:0,name:"MODEL_FILTER_MODE_UNSPECIFIED"},{no:1,name:"MODEL_FILTER_MODE_BY_MODEL"},{no:2,name:"MODEL_FILTER_MODE_BY_PROVIDER"}]);var LL=(n=>(n[n.UNSPECIFIED=0]="UNSPECIFIED",n[n.ENABLED=1]="ENABLED",n[n.DISABLED=2]="DISABLED",n))(LL||{});m.util.setEnumType(LL,"exa.codeium_common_pb.TeamOrganizationalControls.AdaptiveSetting",[{no:0,name:"ADAPTIVE_SETTING_UNSPECIFIED"},{no:1,name:"ADAPTIVE_SETTING_ENABLED"},{no:2,name:"ADAPTIVE_SETTING_DISABLED"}]);var ML=(n=>(n[n.UNSPECIFIED=0]="UNSPECIFIED",n[n.ON=1]="ON",n[n.OFF=2]="OFF",n))(ML||{});m.util.setEnumType(ML,"exa.codeium_common_pb.TeamOrganizationalControls.CyberVerificationEnabled",[{no:0,name:"CYBER_VERIFICATION_ENABLED_UNSPECIFIED"},{no:1,name:"CYBER_VERIFICATION_ENABLED_ON"},{no:2,name:"CYBER_VERIFICATION_ENABLED_OFF"}]);var NL=(n=>(n[n.UNSPECIFIED=0]="UNSPECIFIED",n[n.ENABLED=1]="ENABLED",n[n.DISABLED=2]="DISABLED",n))(NL||{});m.util.setEnumType(NL,"exa.codeium_common_pb.TeamOrganizationalControls.QuickReviewSetting",[{no:0,name:"QUICK_REVIEW_SETTING_UNSPECIFIED"},{no:1,name:"QUICK_REVIEW_SETTING_ENABLED"},{no:2,name:"QUICK_REVIEW_SETTING_DISABLED"}]);var H4=class r extends M{constructor(e){super();this.memoryUsageToSampleRate={};m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.ExperimentProfilingTelemetrySampleRatePayload"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"memory_usage_to_sample_rate",kind:"map",K:9,V:{kind:"scalar",T:1}}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},nm=class r extends M{constructor(e){super();this.choice={case:void 0};m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.ModelOrAlias"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"model",kind:"enum",T:m.getEnumType(fo),oneof:"choice"},{no:2,name:"alias",kind:"enum",T:m.getEnumType(U1),oneof:"choice"},{no:3,name:"model_uid",kind:"scalar",T:9,oneof:"choice"}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},kA=class r extends M{constructor(e){super();this.kind=0;this.experimentKey=0;this.enabled=!1;this.numConsidered=ne.zero;this.numIncluded=ne.zero;m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.PromptElementKindInfo"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"kind",kind:"enum",T:m.getEnumType(YS)},{no:2,name:"experiment_key",kind:"enum",T:m.getEnumType(tm)},{no:3,name:"enabled",kind:"scalar",T:8},{no:4,name:"num_considered",kind:"scalar",T:4},{no:5,name:"num_included",kind:"scalar",T:4}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},B4=class r extends M{constructor(e){super();this.included=!1;this.exclusionReason=0;m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.PromptElementInclusionMetadata"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"included",kind:"scalar",T:8},{no:2,name:"exclusion_reason",kind:"enum",T:m.getEnumType(F1)}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},AA=class r extends M{constructor(e){super();this.name="";this.latencyMs=ne.zero;m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.PromptStageLatency"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"latency_ms",kind:"scalar",T:4}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},V4=class r extends M{constructor(e){super();this.completions=[];this.maxTokens=ne.zero;this.temperature=0;this.topK=ne.zero;this.topP=0;this.stopPatterns=[];this.promptLength=ne.zero;this.promptId="";this.modelTag="";m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.CompletionResponse"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"completions",kind:"message",T:_h,repeated:!0},{no:2,name:"max_tokens",kind:"scalar",T:4},{no:3,name:"temperature",kind:"scalar",T:1},{no:4,name:"top_k",kind:"scalar",T:4},{no:5,name:"top_p",kind:"scalar",T:1},{no:6,name:"stop_patterns",kind:"scalar",T:9,repeated:!0},{no:7,name:"prompt_length",kind:"scalar",T:4},{no:8,name:"prompt_id",kind:"scalar",T:9},{no:10,name:"model_tag",kind:"scalar",T:9},{no:11,name:"completion_profile",kind:"message",T:Ph,opt:!0}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},_h=class r extends M{constructor(e){super();this.completionId="";this.requestUid="";this.text="";this.stop="";this.score=0;this.tokens=[];this.decodedTokens=[];this.probabilities=[];this.adjustedProbabilities=[];this.logprobs=[];this.generatedLength=ne.zero;this.stopReason=0;this.filterReasons=[];this.originalText="";this.toolCalls=[];m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.Completion"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"completion_id",kind:"scalar",T:9},{no:17,name:"request_uid",kind:"scalar",T:9},{no:2,name:"text",kind:"scalar",T:9},{no:4,name:"stop",kind:"scalar",T:9},{no:5,name:"score",kind:"scalar",T:1},{no:6,name:"tokens",kind:"scalar",T:4,repeated:!0},{no:7,name:"decoded_tokens",kind:"scalar",T:9,repeated:!0},{no:8,name:"probabilities",kind:"scalar",T:1,repeated:!0},{no:9,name:"adjusted_probabilities",kind:"scalar",T:1,repeated:!0},{no:16,name:"logprobs",kind:"scalar",T:1,repeated:!0},{no:10,name:"generated_length",kind:"scalar",T:4},{no:12,name:"stop_reason",kind:"enum",T:m.getEnumType(kh)},{no:13,name:"filter_reasons",kind:"enum",T:m.getEnumType(H1),repeated:!0},{no:14,name:"original_text",kind:"scalar",T:9},{no:15,name:"tool_calls",kind:"message",T:JS,repeated:!0}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},OA=class r extends M{constructor(e){super();this.completionIds=[];this.maxTokens=ne.zero;this.temperature=0;this.topK=ne.zero;this.topP=0;this.stopPatterns=[];this.promptLength=ne.zero;this.promptId="";this.modelTag="";m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.StreamingCompletionInfo"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"completion_ids",kind:"scalar",T:9,repeated:!0},{no:2,name:"max_tokens",kind:"scalar",T:4},{no:3,name:"temperature",kind:"scalar",T:1},{no:4,name:"top_k",kind:"scalar",T:4},{no:5,name:"top_p",kind:"scalar",T:1},{no:6,name:"stop_patterns",kind:"scalar",T:9,repeated:!0},{no:7,name:"prompt_length",kind:"scalar",T:4},{no:9,name:"prompt_id",kind:"scalar",T:9},{no:8,name:"model_tag",kind:"scalar",T:9},{no:10,name:"completions_request",kind:"message",T:PA},{no:11,name:"eval_suffix_info",kind:"message",T:NA}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},US=class r extends M{constructor(e){super();this.totalPrefillPassTime=0;this.avgPrefillPassTime=0;this.numPrefillPasses=ne.zero;this.totalSpecCopyPassTime=0;this.avgSpecCopyPassTime=0;this.numSpecCopyPasses=ne.zero;this.totalGenerationPassTime=0;this.avgGenerationPassTime=0;this.numGenerationPasses=ne.zero;this.totalModelTime=0;m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.SingleModelCompletionProfile"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"total_prefill_pass_time",kind:"scalar",T:1},{no:2,name:"avg_prefill_pass_time",kind:"scalar",T:1},{no:3,name:"num_prefill_passes",kind:"scalar",T:4},{no:7,name:"total_spec_copy_pass_time",kind:"scalar",T:1},{no:8,name:"avg_spec_copy_pass_time",kind:"scalar",T:1},{no:9,name:"num_spec_copy_passes",kind:"scalar",T:4},{no:4,name:"total_generation_pass_time",kind:"scalar",T:1},{no:5,name:"avg_generation_pass_time",kind:"scalar",T:1},{no:6,name:"num_generation_passes",kind:"scalar",T:4},{no:10,name:"total_model_time",kind:"scalar",T:1}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},Ph=class r extends M{constructor(e){super();this.timeToFirstPrefillPass=0;this.timeToFirstToken=0;this.totalCompletionTime=0;m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.CompletionProfile"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"model_profile",kind:"message",T:US},{no:2,name:"draft_model_profile",kind:"message",T:US,opt:!0},{no:3,name:"time_to_first_prefill_pass",kind:"scalar",T:1},{no:4,name:"time_to_first_token",kind:"scalar",T:1},{no:5,name:"total_completion_time",kind:"scalar",T:1},{no:6,name:"model_usage",kind:"message",T:QS,opt:!0}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},LA=class r extends M{constructor(e){super();this.decodedToken=new Uint8Array(0);this.token=ne.zero;this.probability=0;this.adjustedProbability=0;this.logprob=0;this.completionFinished=!1;this.stop="";this.stopReason=0;this.attributionStatuses={};m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.StreamingCompletion"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"decoded_token",kind:"scalar",T:12},{no:2,name:"token",kind:"scalar",T:4},{no:3,name:"probability",kind:"scalar",T:1},{no:4,name:"adjusted_probability",kind:"scalar",T:1},{no:9,name:"logprob",kind:"scalar",T:1},{no:5,name:"completion_finished",kind:"scalar",T:8},{no:6,name:"stop",kind:"scalar",T:9},{no:7,name:"stop_reason",kind:"enum",T:m.getEnumType(kh)},{no:8,name:"attribution_statuses",kind:"map",K:13,V:{kind:"enum",T:m.getEnumType(B1)}}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},FS=class r extends M{constructor(e){super();this.completions={};m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.StreamingCompletionMap"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"completions",kind:"map",K:5,V:{kind:"message",T:LA}}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},MA=class r extends M{constructor(e){super();this.completionMaps=[];m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.PackedStreamingCompletionMaps"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"completion_maps",kind:"message",T:FS,repeated:!0}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},NA=class r extends M{constructor(e){super();this.perTokenLogLikelihoods=[];this.isGreedy=!1;m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.StreamingEvalSuffixInfo"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"per_token_log_likelihoods",kind:"scalar",T:2,repeated:!0},{no:2,name:"is_greedy",kind:"scalar",T:8}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},W4=class r extends M{constructor(e){super();this.payload={case:void 0};m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.StreamingCompletionResponse"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"completion_info",kind:"message",T:OA,oneof:"payload"},{no:2,name:"completion_map",kind:"message",T:FS,oneof:"payload"},{no:4,name:"packed_completion_maps",kind:"message",T:MA,oneof:"payload"},{no:5,name:"completion_profile",kind:"message",T:Ph,opt:!0}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},UA=class r extends M{constructor(e){super();this.apiServerLatencyMs=ne.zero;this.languageServerLatencyMs=ne.zero;this.networkLatencyMs=ne.zero;this.apiServerFirstByteLatencyMs=ne.zero;this.languageServerFirstByteLatencyMs=ne.zero;this.networkFirstByteLatencyMs=ne.zero;this.apiServerFirstLineLatencyMs=ne.zero;this.languageServerFirstLineLatencyMs=ne.zero;this.networkFirstLineLatencyMs=ne.zero;m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.CompletionLatencyInfo"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"api_server_latency_ms",kind:"scalar",T:4},{no:2,name:"language_server_latency_ms",kind:"scalar",T:4},{no:3,name:"network_latency_ms",kind:"scalar",T:4},{no:4,name:"api_server_first_byte_latency_ms",kind:"scalar",T:4},{no:5,name:"language_server_first_byte_latency_ms",kind:"scalar",T:4},{no:6,name:"network_first_byte_latency_ms",kind:"scalar",T:4},{no:7,name:"api_server_first_line_latency_ms",kind:"scalar",T:4},{no:8,name:"language_server_first_line_latency_ms",kind:"scalar",T:4},{no:9,name:"network_first_line_latency_ms",kind:"scalar",T:4}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},$4=class r extends M{constructor(t){super(),m.util.initPartial(t,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.CompletionWithLatencyInfo"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"completion",kind:"message",T:_h},{no:2,name:"latency_info",kind:"message",T:UA}])}static fromBinary(t,e){return new r().fromBinary(t,e)}static fromJson(t,e){return new r().fromJson(t,e)}static fromJsonString(t,e){return new r().fromJsonString(t,e)}static equals(t,e){return m.util.equals(r,t,e)}},G4=class r extends M{constructor(e){super();this.prompts=[];this.priority=0;this.prefix=0;this.model=0;m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.EmbeddingsRequest"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"prompts",kind:"scalar",T:9,repeated:!0},{no:2,name:"priority",kind:"enum",T:m.getEnumType(V1)},{no:3,name:"prefix",kind:"enum",T:m.getEnumType(W1)},{no:4,name:"model",kind:"enum",T:m.getEnumType(fo)}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},FA=class r extends M{constructor(e){super();this.values=[];m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.Embedding"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"values",kind:"scalar",T:2,repeated:!0}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},z4=class r extends M{constructor(e){super();this.embeddings=[];this.promptsExceededContextLength=!1;m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.EmbeddingResponse"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"embeddings",kind:"message",T:FA,repeated:!0},{no:2,name:"prompts_exceeded_context_length",kind:"scalar",T:8}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},q4=class r extends M{constructor(e){super();this.prefix="";this.items=[];this.hasInstructTokens=!1;m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.RewardsRequest"}static{this.fields=m.util.newFieldList(()=>[{no:2,name:"prefix",kind:"scalar",T:9},{no:3,name:"items",kind:"scalar",T:9,repeated:!0},{no:4,name:"has_instruct_tokens",kind:"scalar",T:8}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},K4=class r extends M{constructor(e){super();this.values=[];this.promptsExceededContextLength=!1;m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.RewardsResponse"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"values",kind:"scalar",T:2,repeated:!0},{no:2,name:"prompts_exceeded_context_length",kind:"scalar",T:8}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},HS=class r extends M{constructor(e){super();this.ideName="";this.ideVersion="";this.ideType="";this.extensionName="";this.extensionVersion="";this.apiKey="";this.locale="";this.os="";this.hardware="";this.disableTelemetry=!1;this.sessionId="";this.requestId=ne.zero;this.sourceAddress="";this.userAgent="";this.url="";this.authSource=0;this.extensionPath="";this.userId="";this.userJwt="";this.forceTeamId="";this.deviceFingerprint="";this.triggerId="";this.planName="";this.id="";this.impersonateTier="";this.supportedModelDisplays=[];this.f="";this.teamId="";m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.Metadata"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"ide_name",kind:"scalar",T:9},{no:7,name:"ide_version",kind:"scalar",T:9},{no:28,name:"ide_type",kind:"scalar",T:9},{no:12,name:"extension_name",kind:"scalar",T:9},{no:2,name:"extension_version",kind:"scalar",T:9},{no:3,name:"api_key",kind:"scalar",T:9},{no:4,name:"locale",kind:"scalar",T:9},{no:5,name:"os",kind:"scalar",T:9},{no:8,name:"hardware",kind:"scalar",T:9},{no:6,name:"disable_telemetry",kind:"scalar",T:8},{no:10,name:"session_id",kind:"scalar",T:9},{no:16,name:"ls_timestamp",kind:"message",T:Ve},{no:9,name:"request_id",kind:"scalar",T:4},{no:11,name:"source_address",kind:"scalar",T:9},{no:13,name:"user_agent",kind:"scalar",T:9},{no:14,name:"url",kind:"scalar",T:9},{no:15,name:"auth_source",kind:"enum",T:m.getEnumType(G1)},{no:17,name:"extension_path",kind:"scalar",T:9},{no:20,name:"user_id",kind:"scalar",T:9},{no:21,name:"user_jwt",kind:"scalar",T:9},{no:22,name:"force_team_id",kind:"scalar",T:9},{no:24,name:"device_fingerprint",kind:"scalar",T:9},{no:25,name:"trigger_id",kind:"scalar",T:9},{no:26,name:"plan_name",kind:"scalar",T:9},{no:27,name:"id",kind:"scalar",T:9},{no:29,name:"impersonate_tier",kind:"scalar",T:9},{no:30,name:"supported_model_displays",kind:"enum",T:m.getEnumType(lx),repeated:!0},{no:31,name:"f",kind:"scalar",T:9},{no:32,name:"team_id",kind:"scalar",T:9}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},J4=class r extends M{constructor(e){super();this.tabSize=ne.zero;this.insertSpaces=!1;this.disableAutocompleteInComments=!1;m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.EditorOptions"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"tab_size",kind:"scalar",T:4},{no:2,name:"insert_spaces",kind:"scalar",T:8},{no:3,name:"disable_autocomplete_in_comments",kind:"scalar",T:8}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},j4=class r extends M{constructor(e){super();this.errorId="";this.timestampUnixMs=ne.zero;this.stacktrace="";this.recovered=!1;m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.ErrorTrace"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"error_id",kind:"scalar",T:9},{no:2,name:"timestamp_unix_ms",kind:"scalar",T:3},{no:3,name:"stacktrace",kind:"scalar",T:9},{no:4,name:"recovered",kind:"scalar",T:8}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},Q4=class r extends M{constructor(e){super();this.eventType=0;this.eventJson="";this.timestampUnixMs=ne.zero;m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.Event"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"event_type",kind:"enum",T:m.getEnumType(z1)},{no:2,name:"event_json",kind:"scalar",T:9},{no:3,name:"timestamp_unix_ms",kind:"scalar",T:3}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},X4=class r extends M{constructor(e){super();this.searchId="";this.resultId="";this.absolutePath="";this.workspacePaths=[];this.text="";this.similarityScore=0;this.numResultsInCluster=ne.zero;this.representativePath="";this.meanSimilarityScore=0;this.searchResultType=0;m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.SearchResultRecord"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"search_id",kind:"scalar",T:9},{no:2,name:"result_id",kind:"scalar",T:9},{no:3,name:"absolute_path",kind:"scalar",T:9},{no:4,name:"workspace_paths",kind:"message",T:BS,repeated:!0},{no:5,name:"text",kind:"scalar",T:9},{no:6,name:"embedding_metadata",kind:"message",T:HA},{no:7,name:"similarity_score",kind:"scalar",T:2},{no:8,name:"num_results_in_cluster",kind:"scalar",T:3},{no:9,name:"representative_path",kind:"scalar",T:9},{no:10,name:"mean_similarity_score",kind:"scalar",T:2},{no:11,name:"search_result_type",kind:"enum",T:m.getEnumType(q1)}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},BS=class r extends M{constructor(e){super();this.workspaceMigrateMeToUri="";this.workspaceUri="";this.relativePath="";m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.WorkspacePath"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"workspace_migrate_me_to_uri",kind:"scalar",T:9},{no:3,name:"workspace_uri",kind:"scalar",T:9},{no:2,name:"relative_path",kind:"scalar",T:9}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},HA=class r extends M{constructor(e){super();this.nodeName="";this.startLine=0;this.endLine=0;this.embedType=0;m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.EmbeddingMetadata"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"node_name",kind:"scalar",T:9},{no:2,name:"start_line",kind:"scalar",T:13},{no:3,name:"end_line",kind:"scalar",T:13},{no:4,name:"embed_type",kind:"enum",T:m.getEnumType(K1)}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},Y4=class r extends M{constructor(e){super();this.completions=[];m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.MockResponseData"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"completions",kind:"message",T:_h,repeated:!0}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},Z4=class r extends M{constructor(e){super();this.workspaceUriForTelemetry="";this.numFilesTotal=ne.zero;this.numFilesToEmbed=ne.zero;this.numNodesTotal=ne.zero;this.numNodesToEmbed=ne.zero;this.numTokens=ne.zero;this.numHighPriorityNodesToEmbed=ne.zero;this.error="";m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.WorkspaceIndexData"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"workspace_uri_for_telemetry",kind:"scalar",T:9},{no:2,name:"indexing_start",kind:"message",T:Ve},{no:3,name:"indexing_end",kind:"message",T:Ve},{no:4,name:"embedding_duration",kind:"message",T:bc},{no:5,name:"num_files_total",kind:"scalar",T:3},{no:6,name:"num_files_to_embed",kind:"scalar",T:3},{no:7,name:"num_nodes_total",kind:"scalar",T:3},{no:8,name:"num_nodes_to_embed",kind:"scalar",T:3},{no:9,name:"num_tokens",kind:"scalar",T:3},{no:10,name:"num_high_priority_nodes_to_embed",kind:"scalar",T:3},{no:11,name:"error",kind:"scalar",T:9}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},eV=class r extends M{constructor(e){super();this.workspace="";this.numFiles={};this.numBytes={};this.initialScanCompleted=!1;m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.WorkspaceStats"}static{this.fields=m.util.newFieldList(()=>[{no:3,name:"workspace",kind:"scalar",T:9},{no:1,name:"num_files",kind:"map",K:5,V:{kind:"scalar",T:3}},{no:2,name:"num_bytes",kind:"map",K:5,V:{kind:"scalar",T:3}},{no:4,name:"initial_scan_completed",kind:"scalar",T:8}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},tV=class r extends M{constructor(e){super();this.numTotalFiles=0;this.numIndexedFiles=0;m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.PartialIndexMetadata"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"num_total_files",kind:"scalar",T:13},{no:2,name:"num_indexed_files",kind:"scalar",T:13},{no:3,name:"cutoff_timestamp",kind:"message",T:Ve}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},BA=class r extends M{constructor(e){super();this.rawSource="";this.cleanFunction="";this.docstring="";this.nodeName="";this.params="";this.definitionLine=0;this.startLine=0;this.endLine=0;this.startCol=0;this.endCol=0;this.leadingWhitespace="";this.language=0;this.bodyStartLine=0;this.bodyStartCol=0;m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.FunctionInfo"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"raw_source",kind:"scalar",T:9},{no:2,name:"clean_function",kind:"scalar",T:9},{no:3,name:"docstring",kind:"scalar",T:9},{no:4,name:"node_name",kind:"scalar",T:9},{no:5,name:"params",kind:"scalar",T:9},{no:6,name:"definition_line",kind:"scalar",T:5},{no:7,name:"start_line",kind:"scalar",T:5},{no:8,name:"end_line",kind:"scalar",T:5},{no:9,name:"start_col",kind:"scalar",T:5},{no:10,name:"end_col",kind:"scalar",T:5},{no:11,name:"leading_whitespace",kind:"scalar",T:9},{no:12,name:"language",kind:"enum",T:m.getEnumType(ns)},{no:13,name:"body_start_line",kind:"scalar",T:5},{no:14,name:"body_start_col",kind:"scalar",T:5}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},nV=class r extends M{constructor(e){super();this.rawSource="";this.startLine=0;this.endLine=0;this.startCol=0;this.endCol=0;this.leadingWhitespace="";this.fieldsAndConstructors=[];this.docstring="";this.nodeName="";this.methods=[];this.nodeLineage=[];this.isExported=!1;this.language=0;this.definitionLine=0;m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.ClassInfo"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"raw_source",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:"start_col",kind:"scalar",T:5},{no:5,name:"end_col",kind:"scalar",T:5},{no:6,name:"leading_whitespace",kind:"scalar",T:9},{no:7,name:"fields_and_constructors",kind:"scalar",T:9,repeated:!0},{no:8,name:"docstring",kind:"scalar",T:9},{no:9,name:"node_name",kind:"scalar",T:9},{no:10,name:"methods",kind:"message",T:BA,repeated:!0},{no:11,name:"node_lineage",kind:"scalar",T:9,repeated:!0},{no:12,name:"is_exported",kind:"scalar",T:8},{no:13,name:"language",kind:"enum",T:m.getEnumType(ns)},{no:14,name:"definition_line",kind:"scalar",T:5}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},VA=class r extends M{constructor(e){super();this.isActive=!1;this.stripeSubscriptionId="";this.hasAccess=!1;m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.TeamsFeaturesMetadata"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"is_active",kind:"scalar",T:8},{no:2,name:"stripe_subscription_id",kind:"scalar",T:9},{no:3,name:"has_access",kind:"scalar",T:8}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},WA=class r extends M{constructor(e){super();this.isActive=!1;this.label="";m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.PromoStatus"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"is_active",kind:"scalar",T:8},{no:2,name:"end_date",kind:"message",T:Ve},{no:3,name:"label",kind:"scalar",T:9}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},$A=class r extends M{constructor(e){super();this.isActive=!1;this.tooltip="";m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.FastStatus"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"is_active",kind:"scalar",T:8},{no:2,name:"tooltip",kind:"scalar",T:9}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},GA=class r extends M{constructor(e){super();this.tokensPerSecond=0;m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.ArenaConfig"}static{this.fields=m.util.newFieldList(()=>[{no:2,name:"tokens_per_second",kind:"scalar",T:2}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},zA=class r extends M{constructor(e){super();this.label="";this.value=0;this.denominator="";this.minRange=0;this.maxRange=0;this.kind=0;m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.ModelDimension"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"label",kind:"scalar",T:9},{no:2,name:"value",kind:"scalar",T:2},{no:3,name:"denominator",kind:"scalar",T:9},{no:4,name:"min_range",kind:"scalar",T:2},{no:5,name:"max_range",kind:"scalar",T:2},{no:6,name:"kind",kind:"enum",T:m.getEnumType(eL)},{no:7,name:"info",kind:"scalar",T:9,opt:!0}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},VS=class r extends M{constructor(e){super();this.label="";this.modelUid="";this.creditMultiplier=0;this.pricingType=0;this.disabled=!1;this.supportsImages=!1;this.supportsLegacy=!1;this.isPremium=!1;this.betaWarningMessage="";this.isBeta=!1;this.provider=0;this.isRecommended=!1;this.allowedTiers=[];this.apiProvider=0;this.isNew=!1;this.partialRollout=!1;this.rolloutFraction=0;this.maxTokens=0;this.isCapacityLimited=!1;this.modelCostTier=0;this.isDefaultModelInFamily=!1;this.modelDimensions=[];m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.ClientModelConfig"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"label",kind:"scalar",T:9},{no:2,name:"model_or_alias",kind:"message",T:nm},{no:22,name:"model_uid",kind:"scalar",T:9},{no:3,name:"credit_multiplier",kind:"scalar",T:2},{no:13,name:"pricing_type",kind:"enum",T:m.getEnumType(Y1)},{no:4,name:"disabled",kind:"scalar",T:8},{no:5,name:"supports_images",kind:"scalar",T:8},{no:6,name:"supports_legacy",kind:"scalar",T:8},{no:7,name:"is_premium",kind:"scalar",T:8},{no:8,name:"beta_warning_message",kind:"scalar",T:9},{no:9,name:"is_beta",kind:"scalar",T:8},{no:10,name:"provider",kind:"enum",T:m.getEnumType(ex)},{no:11,name:"is_recommended",kind:"scalar",T:8},{no:12,name:"allowed_tiers",kind:"enum",T:m.getEnumType(Ah),repeated:!0},{no:14,name:"api_provider",kind:"enum",T:m.getEnumType(am)},{no:15,name:"is_new",kind:"scalar",T:8},{no:16,name:"partial_rollout",kind:"scalar",T:8},{no:17,name:"rollout_fraction",kind:"scalar",T:2},{no:18,name:"max_tokens",kind:"scalar",T:5},{no:19,name:"promo_status",kind:"message",T:WA},{no:20,name:"is_capacity_limited",kind:"scalar",T:8},{no:21,name:"fast_status",kind:"message",T:$A},{no:23,name:"model_info",kind:"message",T:wh},{no:24,name:"model_cost_tier",kind:"enum",T:m.getEnumType(Z1)},{no:27,name:"description",kind:"scalar",T:9,opt:!0},{no:29,name:"smart_friend_model_uid",kind:"scalar",T:9,opt:!0},{no:30,name:"model_family_metadata",kind:"message",T:gO},{no:31,name:"is_default_model_in_family",kind:"scalar",T:8},{no:32,name:"model_dimensions",kind:"message",T:zA,repeated:!0}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},qA=class r extends M{constructor(e){super();this.modelUid="";this.versionId="";m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.DefaultOverrideModelConfig"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"model_or_alias_deprecated",jsonName:"modelOrAlias",kind:"message",T:nm},{no:3,name:"model_uid",kind:"scalar",T:9},{no:2,name:"version_id",kind:"scalar",T:9}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},WS=class r extends M{constructor(e){super();this.name="";this.groups=[];m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.ClientModelSort"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"groups",kind:"message",T:KA,repeated:!0},{no:3,name:"display_metric",kind:"scalar",T:9,opt:!0}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},KA=class r extends M{constructor(e){super();this.groupName="";this.modelLabels=[];m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.ClientModelGroup"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"group_name",kind:"scalar",T:9},{no:2,name:"model_labels",kind:"scalar",T:9,repeated:!0}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},JA=class r extends M{constructor(e){super();this.clientModelConfigs=[];this.clientModelSorts=[];this.arenaModeCostFast=0;this.arenaModeCostSmart=0;m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.CascadeModelConfigData"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"client_model_configs",kind:"message",T:VS,repeated:!0},{no:2,name:"client_model_sorts",kind:"message",T:WS,repeated:!0},{no:3,name:"default_override_model_config",kind:"message",T:qA,opt:!0},{no:4,name:"arena_mode_cost_fast",kind:"scalar",T:2},{no:5,name:"arena_mode_cost_smart",kind:"scalar",T:2}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},jA=class r extends M{constructor(e){super();this.creditMultiplier=0;m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.AllowedModelConfig"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"model_or_alias",kind:"message",T:nm},{no:2,name:"credit_multiplier",kind:"scalar",T:2}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},Dh=class r extends M{constructor(e){super();this.teamsTier=0;this.planName="";this.hasAutocompleteFastMode=!1;this.allowStickyPremiumModels=!1;this.hasForgeAccess=!1;this.disableCodeSnippetTelemetry=!1;this.allowPremiumCommandModels=!1;this.hasTabToJump=!1;this.maxNumPremiumChatMessages=ne.zero;this.maxNumChatInputTokens=ne.zero;this.maxCustomChatInstructionCharacters=ne.zero;this.maxNumPinnedContextItems=ne.zero;this.maxLocalIndexSize=ne.zero;this.maxUnclaimedSites=0;this.monthlyPromptCredits=0;this.monthlyFlowCredits=0;this.monthlyFlexCreditPurchaseAmount=0;this.isTeams=!1;this.isEnterprise=!1;this.hasPaidFeatures=!1;this.canBuyMoreCredits=!1;this.cascadeWebSearchEnabled=!1;this.canCustomizeAppIcon=!1;this.cascadeCanAutoRunCommands=!1;this.canGenerateCommitMessages=!1;this.knowledgeBaseEnabled=!1;this.cascadeAllowedModelsConfig=[];this.canShareConversations=!1;this.canAllowCascadeInBackground=!1;this.defaultTeamFeatures={};this.browserEnabled=!1;this.isDevin=!1;this.billingStrategy=0;this.hideDailyQuota=!1;this.hideWeeklyQuota=!1;m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.PlanInfo"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"teams_tier",kind:"enum",T:m.getEnumType(Ah)},{no:2,name:"plan_name",kind:"scalar",T:9},{no:3,name:"has_autocomplete_fast_mode",kind:"scalar",T:8},{no:4,name:"allow_sticky_premium_models",kind:"scalar",T:8},{no:5,name:"has_forge_access",kind:"scalar",T:8},{no:11,name:"disable_code_snippet_telemetry",kind:"scalar",T:8},{no:15,name:"allow_premium_command_models",kind:"scalar",T:8},{no:23,name:"has_tab_to_jump",kind:"scalar",T:8},{no:6,name:"max_num_premium_chat_messages",kind:"scalar",T:3},{no:7,name:"max_num_chat_input_tokens",kind:"scalar",T:3},{no:8,name:"max_custom_chat_instruction_characters",kind:"scalar",T:3},{no:9,name:"max_num_pinned_context_items",kind:"scalar",T:3},{no:10,name:"max_local_index_size",kind:"scalar",T:3},{no:26,name:"max_unclaimed_sites",kind:"scalar",T:5},{no:12,name:"monthly_prompt_credits",kind:"scalar",T:5},{no:13,name:"monthly_flow_credits",kind:"scalar",T:5},{no:14,name:"monthly_flex_credit_purchase_amount",kind:"scalar",T:5},{no:17,name:"is_teams",kind:"scalar",T:8},{no:16,name:"is_enterprise",kind:"scalar",T:8},{no:32,name:"has_paid_features",kind:"scalar",T:8},{no:18,name:"can_buy_more_credits",kind:"scalar",T:8},{no:19,name:"cascade_web_search_enabled",kind:"scalar",T:8},{no:20,name:"can_customize_app_icon",kind:"scalar",T:8},{no:22,name:"cascade_can_auto_run_commands",kind:"scalar",T:8},{no:25,name:"can_generate_commit_messages",kind:"scalar",T:8},{no:27,name:"knowledge_base_enabled",kind:"scalar",T:8},{no:21,name:"cascade_allowed_models_config",kind:"message",T:jA,repeated:!0},{no:24,name:"default_team_config",kind:"message",T:XS},{no:28,name:"can_share_conversations",kind:"scalar",T:8},{no:29,name:"can_allow_cascade_in_background",kind:"scalar",T:8},{no:30,name:"default_team_features",kind:"map",K:5,V:{kind:"message",T:VA}},{no:31,name:"browser_enabled",kind:"scalar",T:8},{no:33,name:"devin_info",kind:"message",T:QA},{no:34,name:"is_devin",kind:"scalar",T:8},{no:35,name:"billing_strategy",kind:"enum",T:m.getEnumType(X1)},{no:36,name:"hide_daily_quota",kind:"scalar",T:8},{no:37,name:"hide_weekly_quota",kind:"scalar",T:8}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},QA=class r extends M{constructor(e){super();this.canUseCascade=!1;this.canUseCli=!1;this.isAdmin=!1;this.orgId="";this.webappHost="";this.apiUrl="";this.accountDisplayName="";m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.DevinPlanInfo"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"can_use_cascade",kind:"scalar",T:8},{no:2,name:"can_use_cli",kind:"scalar",T:8},{no:3,name:"is_admin",kind:"scalar",T:8},{no:4,name:"org_id",kind:"scalar",T:9},{no:5,name:"webapp_host",kind:"scalar",T:9},{no:6,name:"devin_review_enabled",kind:"scalar",T:8,opt:!0},{no:7,name:"api_url",kind:"scalar",T:9},{no:8,name:"account_display_name",kind:"scalar",T:9}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},XA=class r extends M{constructor(e){super();this.topUpTransactionStatus=0;this.topUpEnabled=!1;this.monthlyTopUpAmount=0;this.topUpSpent=0;this.topUpIncrement=0;this.topUpCriteriaMet=!1;m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.TopUpStatus"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"top_up_transaction_status",kind:"enum",T:m.getEnumType(tL)},{no:2,name:"top_up_enabled",kind:"scalar",T:8},{no:3,name:"monthly_top_up_amount",kind:"scalar",T:5},{no:4,name:"top_up_spent",kind:"scalar",T:5},{no:5,name:"top_up_increment",kind:"scalar",T:5},{no:6,name:"top_up_criteria_met",kind:"scalar",T:8}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},YA=class r extends M{constructor(e){super();this.availablePromptCredits=0;this.availableFlowCredits=0;this.availableFlexCredits=0;this.usedFlexCredits=0;this.usedFlowCredits=0;this.usedPromptCredits=0;this.wasReducedByOrphanedUsage=!1;this.gracePeriodStatus=0;this.dailyQuotaRemainingPercent=0;this.weeklyQuotaRemainingPercent=0;this.overageBalanceMicros=ne.zero;this.dailyQuotaResetAtUnix=ne.zero;this.weeklyQuotaResetAtUnix=ne.zero;m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.PlanStatus"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"plan_info",kind:"message",T:Dh},{no:2,name:"plan_start",kind:"message",T:Ve},{no:3,name:"plan_end",kind:"message",T:Ve},{no:8,name:"available_prompt_credits",kind:"scalar",T:5},{no:9,name:"available_flow_credits",kind:"scalar",T:5},{no:4,name:"available_flex_credits",kind:"scalar",T:5},{no:7,name:"used_flex_credits",kind:"scalar",T:5},{no:5,name:"used_flow_credits",kind:"scalar",T:5},{no:6,name:"used_prompt_credits",kind:"scalar",T:5},{no:10,name:"top_up_status",kind:"message",T:XA},{no:11,name:"was_reduced_by_orphaned_usage",kind:"scalar",T:8},{no:12,name:"grace_period_status",kind:"enum",T:m.getEnumType(nL)},{no:13,name:"grace_period_end",kind:"message",T:Ve},{no:14,name:"daily_quota_remaining_percent",kind:"scalar",T:5},{no:15,name:"weekly_quota_remaining_percent",kind:"scalar",T:5},{no:16,name:"overage_balance_micros",kind:"scalar",T:3},{no:17,name:"daily_quota_reset_at_unix",kind:"scalar",T:3},{no:18,name:"weekly_quota_reset_at_unix",kind:"scalar",T:3}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},oV=class r extends M{constructor(e){super();this.pro=!1;this.disableTelemetry=!1;this.name="";this.ignoreChatTelemetrySetting=!1;this.teamId="";this.teamStatus=0;this.email="";this.userFeatures=[];this.teamsFeatures=[];this.teamsTier=0;this.permissions=[];this.hasUsedWindsurf=!1;this.userUsedPromptCredits=ne.zero;this.userUsedFlowCredits=ne.zero;this.hasFingerprintSet=!1;this.maxNumPremiumChatMessages=ne.zero;this.userId="";m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.UserStatus"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"pro",kind:"scalar",T:8},{no:2,name:"disable_telemetry",kind:"scalar",T:8},{no:3,name:"name",kind:"scalar",T:9},{no:4,name:"ignore_chat_telemetry_setting",kind:"scalar",T:8},{no:5,name:"team_id",kind:"scalar",T:9},{no:6,name:"team_status",kind:"enum",T:m.getEnumType(ZS)},{no:7,name:"email",kind:"scalar",T:9},{no:9,name:"user_features",kind:"enum",T:m.getEnumType(j1),repeated:!0},{no:8,name:"teams_features",kind:"enum",T:m.getEnumType(J1),repeated:!0},{no:10,name:"teams_tier",kind:"enum",T:m.getEnumType(Ah)},{no:11,name:"permissions",kind:"enum",T:m.getEnumType(Q1),repeated:!0},{no:13,name:"plan_status",kind:"message",T:YA},{no:31,name:"has_used_windsurf",kind:"scalar",T:8},{no:28,name:"user_used_prompt_credits",kind:"scalar",T:3},{no:29,name:"user_used_flow_credits",kind:"scalar",T:3},{no:30,name:"has_fingerprint_set",kind:"scalar",T:8},{no:32,name:"team_config",kind:"message",T:XS},{no:33,name:"cascade_model_config_data",kind:"message",T:JA},{no:34,name:"windsurf_pro_trial_end_time",kind:"message",T:Ve},{no:35,name:"max_num_premium_chat_messages",kind:"scalar",T:3},{no:36,name:"user_id",kind:"scalar",T:9}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},rV=class r extends M{constructor(e){super();this.info={case:void 0};m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.ScmWorkspaceInfo"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"perforce_info",kind:"message",T:ZA,oneof:"info"},{no:2,name:"git_info",kind:"message",T:om,oneof:"info"}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},ZA=class r extends M{constructor(e){super();this.depotName="";this.versionAlias="";this.baseP4dUrl="";m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.PerforceDepotInfo"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"depot_name",kind:"scalar",T:9},{no:2,name:"version_alias",kind:"scalar",T:9},{no:3,name:"base_p4d_url",kind:"scalar",T:9}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},om=class r extends M{constructor(e){super();this.name="";this.owner="";this.repoName="";this.commit="";this.versionAlias="";this.scmProvider=0;this.baseGitUrl="";m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.GitRepoInfo"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"owner",kind:"scalar",T:9},{no:5,name:"repo_name",kind:"scalar",T:9},{no:3,name:"commit",kind:"scalar",T:9},{no:4,name:"version_alias",kind:"scalar",T:9},{no:6,name:"scm_provider",kind:"enum",T:m.getEnumType(oL)},{no:7,name:"base_git_url",kind:"scalar",T:9}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},yc=class r extends M{constructor(e){super();this.absolutePathMigrateMeToUri="";this.absoluteUri="";this.workspacePaths=[];this.nodeName="";this.nodeLineage=[];this.startLine=0;this.startCol=0;this.endLine=0;this.endCol=0;this.contextType=0;this.language=0;this.snippetByType={};this.fileContentHash=new Uint8Array(0);m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.CodeContextItem"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"absolute_path_migrate_me_to_uri",kind:"scalar",T:9},{no:16,name:"absolute_uri",kind:"scalar",T:9},{no:2,name:"workspace_paths",kind:"message",T:BS,repeated:!0},{no:3,name:"node_name",kind:"scalar",T:9},{no:4,name:"node_lineage",kind:"scalar",T:9,repeated:!0},{no:5,name:"start_line",kind:"scalar",T:13},{no:12,name:"start_col",kind:"scalar",T:13},{no:6,name:"end_line",kind:"scalar",T:13},{no:13,name:"end_col",kind:"scalar",T:13},{no:7,name:"context_type",kind:"enum",T:m.getEnumType(rL)},{no:10,name:"language",kind:"enum",T:m.getEnumType(ns)},{no:11,name:"snippet_by_type",kind:"map",K:9,V:{kind:"message",T:eO}},{no:14,name:"repo_info",kind:"message",T:om},{no:15,name:"file_content_hash",kind:"scalar",T:12}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},eO=class r extends M{constructor(e){super();this.snippet="";this.wordCountBySplitter={};m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.SnippetWithWordCount"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"snippet",kind:"scalar",T:9},{no:2,name:"word_count_by_splitter",kind:"map",K:9,V:{kind:"message",T:tO}}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},tO=class r extends M{constructor(e){super();this.wordCountMap={};m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.WordCount"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"word_count_map",kind:"map",K:9,V:{kind:"scalar",T:3}}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},nO=class r extends M{constructor(e){super();this.computedName="";this.gitOriginUrl="";this.gitUpstreamUrl="";this.reportedName="";this.modelName="";this.submoduleUrl="";this.submodulePath="";m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.Repository"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"computed_name",kind:"scalar",T:9},{no:2,name:"git_origin_url",kind:"scalar",T:9},{no:3,name:"git_upstream_url",kind:"scalar",T:9},{no:4,name:"reported_name",kind:"scalar",T:9},{no:5,name:"model_name",kind:"scalar",T:9},{no:6,name:"submodule_url",kind:"scalar",T:9},{no:7,name:"submodule_path",kind:"scalar",T:9}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},iV=class r extends M{constructor(e){super();this.promptId="";this.filePath="";this.originalFileContent="";this.completionText="";this.startOffset=ne.zero;this.endOffset=ne.zero;this.cursorLine=ne.zero;this.cursorColumn=ne.zero;m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.CaptureFileRequestData"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"metadata",kind:"message",T:HS},{no:2,name:"prompt_id",kind:"scalar",T:9},{no:3,name:"file_path",kind:"scalar",T:9},{no:4,name:"original_file_content",kind:"scalar",T:9},{no:5,name:"completion_text",kind:"scalar",T:9},{no:6,name:"start_offset",kind:"scalar",T:4},{no:7,name:"end_offset",kind:"scalar",T:4},{no:8,name:"cursor_line",kind:"scalar",T:4},{no:9,name:"cursor_column",kind:"scalar",T:4}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},$S=class r extends M{constructor(e){super();this.numAcceptances=0;this.numRejections=0;this.numLinesAccepted=0;this.numBytesAccepted=0;this.numUsers=0;this.activeDeveloperDays=0;this.activeDeveloperHours=0;m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.CompletionStatistics"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"num_acceptances",kind:"scalar",T:13},{no:2,name:"num_rejections",kind:"scalar",T:13},{no:3,name:"num_lines_accepted",kind:"scalar",T:13},{no:4,name:"num_bytes_accepted",kind:"scalar",T:13},{no:5,name:"num_users",kind:"scalar",T:13},{no:6,name:"active_developer_days",kind:"scalar",T:13},{no:7,name:"active_developer_hours",kind:"scalar",T:13}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},sV=class r extends M{constructor(t){super(),m.util.initPartial(t,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.CompletionByDateEntry"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"timestamp",kind:"message",T:Ve},{no:2,name:"completion_statistics",kind:"message",T:$S}])}static fromBinary(t,e){return new r().fromBinary(t,e)}static fromJson(t,e){return new r().fromJson(t,e)}static fromJsonString(t,e){return new r().fromJsonString(t,e)}static equals(t,e){return m.util.equals(r,t,e)}},aV=class r extends M{constructor(e){super();this.language=0;m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.CompletionByLanguageEntry"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"language",kind:"enum",T:m.getEnumType(ns)},{no:2,name:"completion_statistics",kind:"message",T:$S}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},GS=class r extends M{constructor(e){super();this.chatsSent=ne.zero;this.activeDeveloperDays=0;m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.ChatStats"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"chats_sent",kind:"scalar",T:4},{no:15,name:"active_developer_days",kind:"scalar",T:13}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},lV=class r extends M{constructor(t){super(),m.util.initPartial(t,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.ChatStatsByDateEntry"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"timestamp",kind:"message",T:Ve},{no:2,name:"chat_stats",kind:"message",T:GS}])}static fromBinary(t,e){return new r().fromBinary(t,e)}static fromJson(t,e){return new r().fromJson(t,e)}static fromJsonString(t,e){return new r().fromJsonString(t,e)}static equals(t,e){return m.util.equals(r,t,e)}},dV=class r extends M{constructor(e){super();this.modelId=0;m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.ChatStatsByModelEntry"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"model_id",kind:"enum",T:m.getEnumType(fo)},{no:2,name:"chat_stats",kind:"message",T:GS}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},oO=class r extends M{constructor(e){super();this.numCommands=ne.zero;this.numCommandsAccepted=ne.zero;this.numCommandsRejected=ne.zero;this.numEdits=ne.zero;this.numGenerations=ne.zero;this.locAdded=ne.zero;this.locRemoved=ne.zero;this.bytesAdded=ne.zero;this.bytesRemoved=ne.zero;this.locSelected=ne.zero;this.bytesSelected=ne.zero;this.numCommandsBySource={};m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.CommandStats"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"num_commands",kind:"scalar",T:4},{no:2,name:"num_commands_accepted",kind:"scalar",T:4},{no:3,name:"num_commands_rejected",kind:"scalar",T:4},{no:4,name:"num_edits",kind:"scalar",T:4},{no:5,name:"num_generations",kind:"scalar",T:4},{no:6,name:"loc_added",kind:"scalar",T:4},{no:7,name:"loc_removed",kind:"scalar",T:4},{no:8,name:"bytes_added",kind:"scalar",T:4},{no:9,name:"bytes_removed",kind:"scalar",T:4},{no:10,name:"loc_selected",kind:"scalar",T:4},{no:11,name:"bytes_selected",kind:"scalar",T:4},{no:12,name:"num_commands_by_source",kind:"map",K:9,V:{kind:"scalar",T:4}}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},cV=class r extends M{constructor(t){super(),m.util.initPartial(t,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.CommandStatsByDateEntry"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"timestamp",kind:"message",T:Ve},{no:2,name:"command_stats",kind:"message",T:oO}])}static fromBinary(t,e){return new r().fromBinary(t,e)}static fromJson(t,e){return new r().fromJson(t,e)}static fromJsonString(t,e){return new r().fromJsonString(t,e)}static equals(t,e){return m.util.equals(r,t,e)}},uV=class r extends M{constructor(e){super();this.name="";this.email="";this.apiKey="";this.disableCodeium=!1;this.activeDays=0;this.role="";this.promptCreditsUsed=ne.zero;this.teamStatus=0;this.tabsGenerated=ne.zero;this.cascadeMessages=ne.zero;this.uniqueCascadeTabs=ne.zero;this.idesUsed=[];this.acusUsed=0;m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.UserTableStats"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"email",kind:"scalar",T:9},{no:3,name:"last_update_time",kind:"message",T:Ve},{no:4,name:"api_key",kind:"scalar",T:9},{no:5,name:"disable_codeium",kind:"scalar",T:8},{no:6,name:"active_days",kind:"scalar",T:13},{no:7,name:"role",kind:"scalar",T:9},{no:8,name:"signup_time",kind:"message",T:Ve},{no:9,name:"last_autocomplete_usage_time",kind:"message",T:Ve},{no:10,name:"last_chat_usage_time",kind:"message",T:Ve},{no:11,name:"last_command_usage_time",kind:"message",T:Ve},{no:12,name:"prompt_credits_used",kind:"scalar",T:3},{no:13,name:"team_status",kind:"enum",T:m.getEnumType(ZS)},{no:14,name:"tabs_generated",kind:"scalar",T:3},{no:15,name:"cascade_messages",kind:"scalar",T:3},{no:16,name:"unique_cascade_tabs",kind:"scalar",T:3},{no:17,name:"ides_used",kind:"scalar",T:9,repeated:!0},{no:18,name:"acus_used",kind:"scalar",T:1}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},rO=class r extends M{constructor(e){super();this.event=0;m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.CascadeNUXState"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"event",kind:"enum",T:m.getEnumType(nx)},{no:2,name:"timestamp",kind:"message",T:Ve}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},iO=class r extends M{constructor(e){super();this.event=0;m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.UserNUXState"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"event",kind:"enum",T:m.getEnumType(uL)},{no:2,name:"timestamp",kind:"message",T:Ve}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},sO=class r extends M{constructor(e){super();this.planMode=0;m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.ConversationBrainConfig"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"plan_mode",kind:"enum",T:m.getEnumType(ix)}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},aO=class r extends M{constructor(e){super();this.hasUsed=!1;m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.FeatureUsageData"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"has_used",kind:"scalar",T:8}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},pV=class r extends M{constructor(e){super();this.uid=0;this.location=0;this.trigger=0;this.analyticsEventName="";this.mainText="";this.onHoverExplanation="";this.learnMoreUrl="";this.priority=0;this.oldNuxEvent=0;this.icon=0;this.requiresIdleCascade=!1;m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.CascadeNUXConfig"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"uid",kind:"scalar",T:13},{no:2,name:"location",kind:"enum",T:m.getEnumType(gL)},{no:3,name:"trigger",kind:"enum",T:m.getEnumType(vL)},{no:4,name:"analytics_event_name",kind:"scalar",T:9},{no:5,name:"main_text",kind:"scalar",T:9},{no:6,name:"on_hover_explanation",kind:"scalar",T:9},{no:7,name:"learn_more_url",kind:"scalar",T:9},{no:8,name:"priority",kind:"scalar",T:5},{no:9,name:"old_nux_event",kind:"enum",T:m.getEnumType(nx)},{no:10,name:"icon",kind:"enum",T:m.getEnumType(hL)},{no:11,name:"requires_idle_cascade",kind:"scalar",T:8}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},rm=class r extends M{constructor(e){super();this.openMostRecentChatConversation=!1;this.lastSelectedModel=0;this.themePreference=0;this.extensionPanelTab=0;this.fontSize=0;this.rememberLastModelSelection=0;this.autocompleteSpeed=0;this.lastSelectedModelName="";this.cascadeNuxStates=[];this.seenNuxUids={};this.cascadeAllowedCommandsPrefix=[];this.cascadeDeniedCommandsPrefix=[];this.cascadeAllowedCommands=[];this.cascadeDeniedCommands=[];this.userNuxStates=[];this.cascadeWebSearchDisabled=!1;this.disableAutocomplete=!1;this.disableSupercomplete=!1;this.disableSelectionPopup=!1;this.disableExplainProblemInlayHint=!1;this.disableInlayHintShortcuts=!1;this.disableOpenCascadeOnReload=!1;this.disableAutoOpenEditedFiles=!1;this.disableTabToJump=!1;this.cascadeAutoExecutionPolicy=0;this.explainAndFixInCurrentConversation=!1;this.allowCascadeAccessGitignoreFilesDeprecated=!1;this.disableCascadeAutoFixLints=!1;this.disableCascadeBrowserPreviews=!1;this.detectProxy=!1;this.disableTabToImport=!1;this.useClipboardForCompletions=!1;this.disableHighlightAfterAccept=!1;this.lastSelectedNewConvoTab="";this.disableAutoGenerateMemories=!1;this.enableSoundsForSpecialEvents=!1;this.enableTabSounds=!1;this.allowCascadeInBackground=!1;this.tabToJump=0;this.cascadeWebSearch=0;this.enableTerminalCompletion=!1;this.isSnoozed=!1;this.enableCommandCascadeMode=!1;this.featureUsageData={};this.disableCascadeInBackground=!1;this.customWorkspace=[];this.conversationBrainConfigs={};this.globalPlanModePreference=0;this.cachedCascadeModelConfigs=[];this.cachedCascadeModelSorts=[];this.autoContinueOnMaxGeneratorInvocationsDeprecated=0;this.recentlyUsedCascadeModelsDeprecated=[];this.cascadeDismissedSuggestionWorkspaces=[];this.annotationsConfig=0;this.enableAutomaticScreenshot=!1;this.browserExperimentalFeaturesConfig=0;this.commandPopupAutocomplete=0;this.enableInstantContextAgent=!1;this.disableInstantContextAgent=!1;this.enableCascadeCompletionNotifications=!1;this.enableCascadeAlwaysNotifyOnFinish=!1;this.completionModeDeprecated=0;this.supercompleteAggression=0;this.enableInlayHintShortcuts=!1;this.cascadeUserAllowedWebOrigins=[];this.cascadeRemovedDefaultWebOrigins=[];this.cascadeWebRequestsAutoExecutionPolicy=0;this.lastSpecificArenaModelUids=[];this.arenaAlwaysOpenFullscreen=!1;this.modelGroupVariantPreferences={};this.pinnedCascadeModelUidsDeprecated=[];m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.UserSettings"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"open_most_recent_chat_conversation",kind:"scalar",T:8},{no:2,name:"last_selected_model",kind:"enum",T:m.getEnumType(fo)},{no:3,name:"theme_preference",kind:"enum",T:m.getEnumType(sL)},{no:4,name:"extension_panel_tab",kind:"enum",T:m.getEnumType(dL)},{no:5,name:"font_size",kind:"enum",T:m.getEnumType(aL)},{no:7,name:"remember_last_model_selection",kind:"enum",T:m.getEnumType(cL)},{no:6,name:"autocomplete_speed",kind:"enum",T:m.getEnumType(lL)},{no:8,name:"last_selected_model_name",kind:"scalar",T:9},{no:11,name:"cascade_nux_states",kind:"message",T:rO,repeated:!0},{no:60,name:"seen_nux_uids",kind:"map",K:13,V:{kind:"scalar",T:8}},{no:9,name:"last_selected_cascade_model_deprecated",jsonName:"lastSelectedCascadeModel",kind:"enum",T:m.getEnumType(fo),opt:!0},{no:30,name:"last_selected_cascade_model_or_alias_deprecated",jsonName:"lastSelectedCascadeModelOrAlias",kind:"message",T:nm,opt:!0},{no:91,name:"last_selected_cascade_model_uid_deprecated",jsonName:"lastSelectedCascadeModelUid",kind:"scalar",T:9,opt:!0},{no:13,name:"cascade_planner_mode_deprecated",jsonName:"cascadePlannerMode",kind:"enum",T:m.getEnumType(pL),opt:!0},{no:46,name:"last_model_override",kind:"enum",T:m.getEnumType(fo),opt:!0},{no:58,name:"last_model_default_override_version_id",kind:"scalar",T:9,opt:!0},{no:87,name:"cascade_model_explicitly_set",kind:"scalar",T:8,opt:!0},{no:14,name:"cascade_allowed_commands_prefix",kind:"scalar",T:9,repeated:!0},{no:15,name:"cascade_denied_commands_prefix",kind:"scalar",T:9,repeated:!0},{no:85,name:"cascade_allowed_commands",kind:"scalar",T:9,repeated:!0},{no:86,name:"cascade_denied_commands",kind:"scalar",T:9,repeated:!0},{no:17,name:"user_nux_states",kind:"message",T:iO,repeated:!0},{no:18,name:"cascade_web_search_disabled",kind:"scalar",T:8},{no:19,name:"disable_autocomplete",kind:"scalar",T:8},{no:20,name:"disable_supercomplete",kind:"scalar",T:8},{no:21,name:"disable_selection_popup",kind:"scalar",T:8},{no:22,name:"disable_explain_problem_inlay_hint",kind:"scalar",T:8},{no:23,name:"disable_inlay_hint_shortcuts",kind:"scalar",T:8},{no:24,name:"disable_open_cascade_on_reload",kind:"scalar",T:8},{no:25,name:"disable_auto_open_edited_files",kind:"scalar",T:8},{no:26,name:"disable_tab_to_jump",kind:"scalar",T:8},{no:27,name:"cascade_auto_execution_policy",kind:"enum",T:m.getEnumType(sm)},{no:28,name:"last_selected_cascade_id",kind:"scalar",T:9,opt:!0},{no:29,name:"explain_and_fix_in_current_conversation",kind:"scalar",T:8},{no:31,name:"allow_cascade_access_gitignore_files_deprecated",jsonName:"allowCascadeAccessGitignoreFiles",kind:"scalar",T:8},{no:32,name:"disable_cascade_auto_fix_lints",kind:"scalar",T:8},{no:33,name:"disable_cascade_browser_previews",kind:"scalar",T:8},{no:34,name:"detect_proxy",kind:"scalar",T:8},{no:35,name:"disable_tab_to_import",kind:"scalar",T:8},{no:36,name:"use_clipboard_for_completions",kind:"scalar",T:8},{no:37,name:"disable_highlight_after_accept",kind:"scalar",T:8},{no:38,name:"last_selected_new_convo_tab",kind:"scalar",T:9},{no:39,name:"disable_auto_generate_memories",kind:"scalar",T:8},{no:40,name:"enable_sounds_for_special_events",kind:"scalar",T:8},{no:41,name:"enable_tab_sounds",kind:"scalar",T:8},{no:42,name:"allow_cascade_in_background",kind:"scalar",T:8},{no:43,name:"tab_to_jump",kind:"enum",T:m.getEnumType(ox)},{no:44,name:"cascade_web_search",kind:"enum",T:m.getEnumType(rx)},{no:45,name:"enable_terminal_completion",kind:"scalar",T:8},{no:55,name:"is_snoozed",kind:"scalar",T:8},{no:49,name:"enable_command_cascade_mode",kind:"scalar",T:8},{no:47,name:"feature_usage_data",kind:"map",K:9,V:{kind:"message",T:aO}},{no:48,name:"disable_cascade_in_background",kind:"scalar",T:8},{no:50,name:"custom_workspace",kind:"scalar",T:9,repeated:!0},{no:51,name:"conversation_brain_configs",kind:"map",K:9,V:{kind:"message",T:sO}},{no:54,name:"global_plan_mode_preference",kind:"enum",T:m.getEnumType(ix)},{no:52,name:"cached_cascade_model_configs",kind:"message",T:VS,repeated:!0},{no:53,name:"cached_cascade_model_sorts",kind:"message",T:WS,repeated:!0},{no:59,name:"auto_continue_on_max_generator_invocations_deprecated",jsonName:"autoContinueOnMaxGeneratorInvocations",kind:"enum",T:m.getEnumType(fL)},{no:61,name:"recently_used_cascade_models_deprecated",jsonName:"recentlyUsedCascadeModels",kind:"scalar",T:9,repeated:!0},{no:62,name:"cascade_dismissed_suggestion_workspaces",kind:"scalar",T:9,repeated:!0},{no:63,name:"annotations_config",kind:"enum",T:m.getEnumType(sx)},{no:64,name:"enable_automatic_screenshot",kind:"scalar",T:8},{no:66,name:"browser_experimental_features_config",kind:"enum",T:m.getEnumType(bL)},{no:67,name:"command_popup_autocomplete",kind:"enum",T:m.getEnumType(mL)},{no:77,name:"enable_instant_context_agent",kind:"scalar",T:8},{no:78,name:"disable_instant_context_agent",kind:"scalar",T:8},{no:79,name:"last_selected_smart_friend_model_deprecated",jsonName:"lastSelectedSmartFriendModel",kind:"enum",T:m.getEnumType(fo),opt:!0},{no:92,name:"last_selected_smart_friend_model_uid_deprecated",jsonName:"lastSelectedSmartFriendModelUid",kind:"scalar",T:9,opt:!0},{no:81,name:"enable_cascade_completion_notifications",kind:"scalar",T:8},{no:82,name:"enable_cascade_always_notify_on_finish",kind:"scalar",T:8},{no:83,name:"completion_mode_deprecated",jsonName:"completionMode",kind:"enum",T:m.getEnumType(IL)},{no:97,name:"supercomplete_aggression",kind:"enum",T:m.getEnumType(ax)},{no:84,name:"enable_inlay_hint_shortcuts",kind:"scalar",T:8},{no:88,name:"cascade_user_allowed_web_origins",kind:"scalar",T:9,repeated:!0},{no:89,name:"cascade_removed_default_web_origins",kind:"scalar",T:9,repeated:!0},{no:90,name:"cascade_web_requests_auto_execution_policy",kind:"enum",T:m.getEnumType(tx)},{no:93,name:"last_specific_arena_model_uids",kind:"scalar",T:9,repeated:!0},{no:94,name:"arena_always_open_fullscreen",kind:"scalar",T:8},{no:95,name:"last_arena_mode_enabled",kind:"scalar",T:8,opt:!0},{no:98,name:"model_group_variant_preferences",kind:"map",K:9,V:{kind:"scalar",T:9}},{no:99,name:"pinned_cascade_model_uids_deprecated",jsonName:"pinnedCascadeModelUids",kind:"scalar",T:9,repeated:!0}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},lO=class r extends M{constructor(e){super();this.supportsContextTokens=!1;this.requiresInstructTags=!1;this.requiresFimContext=!1;this.requiresContextSnippetPrefix=!1;this.requiresContextRelevanceTags=!1;this.requiresLlama3Tokens=!1;this.zeroShotCapable=!1;this.requiresAutocompleteAsCommand=!1;this.supportsCursorAwareSupercomplete=!1;this.supportsImages=!1;this.supportsImageCaptions=!1;this.supportsToolCalls=!1;this.supportsParallelToolCalls=!1;this.supportsCumulativeContext=!1;this.tabJumpPrintLineRange=!1;this.supportsThinking=!1;this.interleaveThinking=!1;this.preserveThinking=!1;this.supportsEstimateTokenCounter=!1;this.addCursorToFindReplaceTarget=!1;this.supportsTabJumpUseWholeDocument=!1;this.requiresSupercompleteClean=!1;this.tabRouteToModal=!1;this.supportsRejectionContext=!1;m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.ModelFeatures"}static{this.fields=m.util.newFieldList(()=>[{no:2,name:"supports_context_tokens",kind:"scalar",T:8},{no:3,name:"requires_instruct_tags",kind:"scalar",T:8},{no:4,name:"requires_fim_context",kind:"scalar",T:8},{no:5,name:"requires_context_snippet_prefix",kind:"scalar",T:8},{no:6,name:"requires_context_relevance_tags",kind:"scalar",T:8},{no:7,name:"requires_llama3_tokens",kind:"scalar",T:8},{no:8,name:"zero_shot_capable",kind:"scalar",T:8},{no:9,name:"requires_autocomplete_as_command",kind:"scalar",T:8},{no:10,name:"supports_cursor_aware_supercomplete",kind:"scalar",T:8},{no:11,name:"supports_images",kind:"scalar",T:8},{no:20,name:"supports_image_captions",kind:"scalar",T:8},{no:12,name:"supports_tool_calls",kind:"scalar",T:8},{no:21,name:"supports_parallel_tool_calls",kind:"scalar",T:8},{no:13,name:"supports_cumulative_context",kind:"scalar",T:8},{no:14,name:"tab_jump_print_line_range",kind:"scalar",T:8},{no:15,name:"supports_thinking",kind:"scalar",T:8},{no:24,name:"interleave_thinking",kind:"scalar",T:8},{no:25,name:"preserve_thinking",kind:"scalar",T:8},{no:17,name:"supports_estimate_token_counter",kind:"scalar",T:8},{no:18,name:"add_cursor_to_find_replace_target",kind:"scalar",T:8},{no:19,name:"supports_tab_jump_use_whole_document",kind:"scalar",T:8},{no:22,name:"requires_supercomplete_clean",kind:"scalar",T:8},{no:23,name:"tab_route_to_modal",kind:"scalar",T:8},{no:26,name:"supports_rejection_context",kind:"scalar",T:8}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},mV=class r extends M{constructor(e){super();this.isInternal=!1;this.modelId=0;this.modelName="";this.baseUrl="";this.apiKey="";this.accessKey="";this.secretAccessKey="";this.region="";this.projectId="";this.id=0;this.maxCompletionTokens=0;this.maxInputTokens=0;m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.ExternalModel"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"is_internal",kind:"scalar",T:8},{no:2,name:"model_id",kind:"enum",T:m.getEnumType(fo)},{no:3,name:"model_name",kind:"scalar",T:9},{no:4,name:"base_url",kind:"scalar",T:9},{no:5,name:"api_key",kind:"scalar",T:9},{no:6,name:"access_key",kind:"scalar",T:9},{no:7,name:"secret_access_key",kind:"scalar",T:9},{no:8,name:"region",kind:"scalar",T:9},{no:9,name:"project_id",kind:"scalar",T:9},{no:10,name:"id",kind:"scalar",T:13},{no:11,name:"max_completion_tokens",kind:"scalar",T:5},{no:12,name:"max_input_tokens",kind:"scalar",T:5}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},dO=class r extends M{constructor(e){super();this.reasoningEffort="";this.serviceTier="";this.extendedPromptCacheRetention=!1;m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.OpenAIInferenceConfig"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"reasoning_effort",kind:"scalar",T:9},{no:2,name:"service_tier",kind:"scalar",T:9},{no:3,name:"extended_prompt_cache_retention",kind:"scalar",T:8}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},cO=class r extends M{constructor(e){super();this.reasoningEffort="";m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.GoogleInferenceConfig"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"reasoning_effort",kind:"scalar",T:9}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},uO=class r extends M{constructor(e){super();this.thinking=!1;this.effort="";this.fastMode=!1;this.context1m=!1;m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.AnthropicInferenceConfig"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"thinking",kind:"scalar",T:8},{no:2,name:"effort",kind:"scalar",T:9},{no:3,name:"fast_mode",kind:"scalar",T:8},{no:4,name:"context_1m",kind:"scalar",T:8}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},pO=class r extends M{constructor(e){super();this.config={case:void 0};m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.InferenceConfig"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"openai",kind:"message",T:dO,oneof:"config"},{no:2,name:"google",kind:"message",T:cO,oneof:"config"},{no:3,name:"anthropic",kind:"message",T:uO,oneof:"config"}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},wh=class r extends M{constructor(e){super();this.modelId=0;this.modelUid="";this.isInternal=!1;this.modelType=0;this.maxTokens=0;this.tokenizerType="";this.apiProvider=0;this.modelName="";this.supportsContext=!1;this.embedDim=0;this.baseUrl="";this.chatModelName="";this.maxOutputTokens=0;this.promptTemplaterType=0;this.toolFormatterType=0;this.inferenceServerUrl="";this.harnessUids=[];this.displayOption=0;this.modelFamilyUid="";this.isModelRouter=!1;m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.ModelInfo"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"model_id",kind:"enum",T:m.getEnumType(fo)},{no:17,name:"model_uid",kind:"scalar",T:9},{no:2,name:"is_internal",kind:"scalar",T:8},{no:3,name:"model_type",kind:"enum",T:m.getEnumType(yL)},{no:4,name:"max_tokens",kind:"scalar",T:5},{no:5,name:"tokenizer_type",kind:"scalar",T:9},{no:6,name:"model_features",kind:"message",T:lO},{no:7,name:"api_provider",kind:"enum",T:m.getEnumType(am)},{no:8,name:"model_name",kind:"scalar",T:9},{no:9,name:"supports_context",kind:"scalar",T:8},{no:10,name:"embed_dim",kind:"scalar",T:5},{no:11,name:"base_url",kind:"scalar",T:9},{no:12,name:"chat_model_name",kind:"scalar",T:9},{no:13,name:"max_output_tokens",kind:"scalar",T:5},{no:14,name:"prompt_templater_type",kind:"enum",T:m.getEnumType(wL)},{no:15,name:"tool_formatter_type",kind:"enum",T:m.getEnumType(RL)},{no:18,name:"inference_server_url",kind:"scalar",T:9},{no:20,name:"harness_uids",kind:"scalar",T:9,repeated:!0},{no:21,name:"arena_config",kind:"message",T:GA,opt:!0},{no:22,name:"display_option",kind:"enum",T:m.getEnumType(lx)},{no:23,name:"model_family_uid",kind:"scalar",T:9},{no:24,name:"inference_config",kind:"message",T:pO},{no:25,name:"is_model_router",kind:"scalar",T:8}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},mO=class r extends M{constructor(e){super();this.order=0;this.name="";m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.ModelFamilyMetadataValue"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"order",kind:"scalar",T:5},{no:2,name:"name",kind:"scalar",T:9}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},fO=class r extends M{constructor(e){super();this.key="";m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.ModelFamilyMetadataEntry"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"key",kind:"scalar",T:9},{no:2,name:"value",kind:"message",T:mO}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},gO=class r extends M{constructor(e){super();this.modelFamilyLabel="";this.entries=[];this.isDefaultModelInFamily=!1;m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.ModelFamilyMetadata"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"model_family_label",kind:"scalar",T:9},{no:2,name:"entries",kind:"message",T:fO,repeated:!0},{no:3,name:"is_default_model_in_family",kind:"scalar",T:8}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},fV=class r extends M{constructor(e){super();this.modelMap={};m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.ApiProviderRoutingConfig"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"model_map",kind:"map",K:9,V:{kind:"message",T:hO}}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},hO=class r extends M{constructor(e){super();this.providerMap={};m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.ApiProviderConfigMap"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"provider_map",kind:"map",K:9,V:{kind:"message",T:vO}}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},vO=class r extends M{constructor(e){super();this.weight=0;this.cacheTtlMinutes=0;this.modelName="";m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.ApiProviderConfig"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"weight",kind:"scalar",T:13},{no:2,name:"cache_ttl_minutes",kind:"scalar",T:13},{no:3,name:"model_name",kind:"scalar",T:9}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},gV=class r extends M{constructor(e){super();this.modelMap={};m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.ShadowTrafficConfig"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"model_map",kind:"map",K:9,V:{kind:"message",T:bO}}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},bO=class r extends M{constructor(e){super();this.targets=[];m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.ShadowTargetList"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"targets",kind:"message",T:IO,repeated:!0}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},IO=class r extends M{constructor(e){super();this.provider="";this.model="";this.modelName="";this.sampleRate=0;m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.ShadowTarget"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"provider",kind:"scalar",T:9},{no:2,name:"model",kind:"scalar",T:9},{no:3,name:"model_name",kind:"scalar",T:9},{no:4,name:"sample_rate",kind:"scalar",T:1}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},hV=class r extends M{constructor(t){super(),m.util.initPartial(t,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.ModelConfig"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"generation_model",kind:"message",T:wh},{no:2,name:"context_check_model",kind:"message",T:wh}])}static fromBinary(t,e){return new r().fromBinary(t,e)}static fromJson(t,e){return new r().fromJson(t,e)}static fromJsonString(t,e){return new r().fromJsonString(t,e)}static equals(t,e){return m.util.equals(r,t,e)}},vV=class r extends M{constructor(e){super();this.model=0;this.modelUid="";this.message="";this.status=0;m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.ModelStatusInfo"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"model",kind:"enum",T:m.getEnumType(fo)},{no:4,name:"model_uid",kind:"scalar",T:9},{no:2,name:"message",kind:"scalar",T:9},{no:3,name:"status",kind:"enum",T:m.getEnumType(EL)}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},yO=class r extends M{constructor(e){super();this.uid="";this.completionId="";this.filePath="";this.shortPrefix="";this.completionText="";this.shortSuffix="";m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.CompletionExample"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"uid",kind:"scalar",T:9},{no:2,name:"completion_id",kind:"scalar",T:9},{no:3,name:"file_path",kind:"scalar",T:9},{no:4,name:"short_prefix",kind:"scalar",T:9},{no:5,name:"completion_text",kind:"scalar",T:9},{no:6,name:"short_suffix",kind:"scalar",T:9}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},bV=class r extends M{constructor(e){super();this.name="";m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.CompletionExampleWithMetadata"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"example",kind:"message",T:yO},{no:2,name:"name",kind:"scalar",T:9},{no:4,name:"time",kind:"message",T:Ve}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},EO=class r extends M{constructor(t){super(),m.util.initPartial(t,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.CciWithSubrange"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"cci",kind:"message",T:yc},{no:2,name:"subrange",kind:"message",T:SO}])}static fromBinary(t,e){return new r().fromBinary(t,e)}static fromJson(t,e){return new r().fromJson(t,e)}static fromJsonString(t,e){return new r().fromJsonString(t,e)}static equals(t,e){return m.util.equals(r,t,e)}},SO=class r extends M{constructor(e){super();this.snippetType=0;this.startOffset=ne.zero;this.endOffset=ne.zero;m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.ContextSubrange"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"snippet_type",kind:"enum",T:m.getEnumType(iL)},{no:2,name:"start_offset",kind:"scalar",T:3},{no:3,name:"end_offset",kind:"scalar",T:3}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},zS=class r extends M{constructor(e){super();this.absolutePathMigrateMeToUri="";this.absoluteUri="";this.workspaceRelativePathsMigrateMeToWorkspaceUris={};this.workspaceUrisToRelativePaths={};this.numFiles=0;this.numBytes=ne.zero;m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.PathScopeItem"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"absolute_path_migrate_me_to_uri",kind:"scalar",T:9},{no:5,name:"absolute_uri",kind:"scalar",T:9},{no:2,name:"workspace_relative_paths_migrate_me_to_workspace_uris",kind:"map",K:9,V:{kind:"scalar",T:9}},{no:6,name:"workspace_uris_to_relative_paths",kind:"map",K:9,V:{kind:"scalar",T:9}},{no:3,name:"num_files",kind:"scalar",T:13},{no:4,name:"num_bytes",kind:"scalar",T:4}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},im=class r extends M{constructor(e){super();this.absoluteUri="";this.startLine=0;this.endLine=0;m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.FileLineRange"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"absolute_uri",kind:"scalar",T:9},{no:2,name:"start_line",kind:"scalar",T:13},{no:3,name:"end_line",kind:"scalar",T:13}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},IV=class r extends M{constructor(e){super();this.content="";m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.FileRangeContent"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"content",kind:"scalar",T:9},{no:2,name:"source",kind:"message",T:im}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},xO=class r extends M{constructor(e){super();this.content="";this.identifier={case:void 0};m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.TextBlock"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"content",kind:"scalar",T:9},{no:2,name:"file_line_range",kind:"message",T:im,oneof:"identifier"},{no:3,name:"label",kind:"scalar",T:9,oneof:"identifier"}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},CO=class r extends M{constructor(t){super(),m.util.initPartial(t,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.RepositoryScopeItem"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"repo_info",kind:"message",T:om}])}static fromBinary(t,e){return new r().fromBinary(t,e)}static fromJson(t,e){return new r().fromJson(t,e)}static fromJsonString(t,e){return new r().fromJsonString(t,e)}static equals(t,e){return m.util.equals(r,t,e)}},TO=class r extends M{constructor(e){super();this.relativePath="";this.isDir=!1;m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.RepositoryPathScopeItem"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"repo_info",kind:"message",T:om},{no:2,name:"relative_path",kind:"scalar",T:9},{no:3,name:"is_dir",kind:"scalar",T:8}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},Ic=class r extends M{constructor(e){super();this.documentId="";this.index=0;this.documentType=0;this.displayName="";this.description="";this.displaySource="";this.url="";m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.KnowledgeBaseScopeItem"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"document_id",kind:"scalar",T:9},{no:7,name:"index",kind:"enum",T:m.getEnumType(TL)},{no:8,name:"document_type",kind:"enum",T:m.getEnumType(SL)},{no:3,name:"display_name",kind:"scalar",T:9},{no:4,name:"description",kind:"scalar",T:9},{no:5,name:"display_source",kind:"scalar",T:9},{no:6,name:"url",kind:"scalar",T:9}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},_O=class r extends M{constructor(e){super();this.timestampStr="";this.type="";this.output="";this.consoleMessageLocation="";m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.ConsoleLogLine"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"timestamp_str",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"output",kind:"scalar",T:9},{no:4,name:"console_message_location",kind:"scalar",T:9}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},PO=class r extends M{constructor(e){super();this.lines=[];this.serverAddress="";m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.ConsoleLogScopeItem"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"lines",kind:"message",T:_O,repeated:!0},{no:2,name:"server_address",kind:"scalar",T:9}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},DO=class r extends M{constructor(e){super();this.tagName="";this.outerHtml="";this.id="";this.reactComponentName="";m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.DOMElementScopeItem"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"tag_name",kind:"scalar",T:9},{no:2,name:"outer_html",kind:"scalar",T:9},{no:3,name:"id",kind:"scalar",T:9},{no:4,name:"react_component_name",kind:"scalar",T:9},{no:5,name:"file_line_range",kind:"message",T:im}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},wO=class r extends M{constructor(e){super();this.numNodes=0;m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.DOMTree"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"root",kind:"message",T:kO},{no:2,name:"num_nodes",kind:"scalar",T:13}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},RO=class r extends M{constructor(e){super();this.x=0;this.y=0;this.width=0;this.height=0;m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.DOMTree.BoundingBox"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"x",kind:"scalar",T:2},{no:2,name:"y",kind:"scalar",T:2},{no:3,name:"width",kind:"scalar",T:2},{no:4,name:"height",kind:"scalar",T:2}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},kO=class r extends M{constructor(e){super();this.children=[];this.tagName="";this.id="";this.classNames=[];this.textContent="";this.ariaLabel="";this.title="";this.alt="";this.placeholder="";this.href="";m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.DOMTree.DOMNode"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"children",kind:"message",T:r,repeated:!0},{no:2,name:"tag_name",kind:"scalar",T:9},{no:3,name:"id",kind:"scalar",T:9},{no:4,name:"class_names",kind:"scalar",T:9,repeated:!0},{no:5,name:"text_content",kind:"scalar",T:9},{no:6,name:"bbox",kind:"message",T:RO},{no:7,name:"aria_label",kind:"scalar",T:9},{no:8,name:"title",kind:"scalar",T:9},{no:9,name:"alt",kind:"scalar",T:9},{no:10,name:"placeholder",kind:"scalar",T:9},{no:11,name:"href",kind:"scalar",T:9}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},AO=class r extends M{constructor(e){super();this.recipeId="";this.title="";this.description="";this.systemPrompt="";m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.RecipeScopeItem"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"recipe_id",kind:"scalar",T:9},{no:2,name:"title",kind:"scalar",T:9},{no:3,name:"description",kind:"scalar",T:9},{no:4,name:"system_prompt",kind:"scalar",T:9},{no:5,name:"uri",kind:"scalar",T:9,opt:!0},{no:6,name:"execution_mode",kind:"enum",T:m.getEnumType(sm),opt:!0}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},OO=class r extends M{constructor(e){super();this.title="";this.content="";this.description="";m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.CodeMapScopeItem"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"title",kind:"scalar",T:9},{no:2,name:"content",kind:"scalar",T:9},{no:3,name:"description",kind:"scalar",T:9},{no:4,name:"location",kind:"scalar",T:9,opt:!0}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},LO=class r extends M{constructor(e){super();this.rulePath="";this.ruleName="";this.description="";m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.RuleScopeItem"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"rule_path",kind:"scalar",T:9},{no:2,name:"rule_name",kind:"scalar",T:9},{no:3,name:"description",kind:"scalar",T:9}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},MO=class r extends M{constructor(e){super();this.skillName="";this.description="";this.resourceCount=0;this.baseDir="";this.content="";m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.SkillScopeItem"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"skill_name",kind:"scalar",T:9},{no:2,name:"description",kind:"scalar",T:9},{no:3,name:"uri",kind:"scalar",T:9,opt:!0},{no:4,name:"resource_count",kind:"scalar",T:5},{no:5,name:"base_dir",kind:"scalar",T:9},{no:6,name:"content",kind:"scalar",T:9}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},NO=class r extends M{constructor(e){super();this.planPath="";this.title="";this.description="";this.requestImplementation=!1;m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.PlanFileScopeItem"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"plan_path",kind:"scalar",T:9},{no:2,name:"title",kind:"scalar",T:9},{no:3,name:"description",kind:"scalar",T:9},{no:4,name:"request_implementation",kind:"scalar",T:8}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},UO=class r extends M{constructor(e){super();this.serverName="";this.promptName="";this.arguments={};this.resolvedContent="";m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.McpPromptScopeItem"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"server_name",kind:"scalar",T:9},{no:2,name:"prompt_name",kind:"scalar",T:9},{no:3,name:"arguments",kind:"map",K:9,V:{kind:"scalar",T:9}},{no:4,name:"resolved_content",kind:"scalar",T:9}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},FO=class r extends M{constructor(e){super();this.uri="";this.name="";this.serverName="";m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.McpResourceItem"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"uri",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9},{no:3,name:"description",kind:"scalar",T:9,opt:!0},{no:4,name:"mime_type",kind:"scalar",T:9,opt:!0},{no:5,name:"server_name",kind:"scalar",T:9}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},HO=class r extends M{constructor(e){super();this.url="";this.title="";this.visibleTextContent="";this.pageId="";m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.BrowserPageScopeItem"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"url",kind:"scalar",T:9},{no:2,name:"title",kind:"scalar",T:9},{no:3,name:"visible_text_content",kind:"scalar",T:9},{no:4,name:"page_id",kind:"scalar",T:9}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},BO=class r extends M{constructor(e){super();this.url="";this.title="";this.codeContent="";this.language=0;this.pageId="";m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.BrowserCodeBlockScopeItem"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"url",kind:"scalar",T:9},{no:2,name:"title",kind:"scalar",T:9},{no:3,name:"code_content",kind:"scalar",T:9},{no:4,name:"language",kind:"enum",T:m.getEnumType(ns)},{no:5,name:"context_text",kind:"scalar",T:9,opt:!0},{no:6,name:"page_id",kind:"scalar",T:9}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},VO=class r extends M{constructor(e){super();this.url="";this.visibleText="";this.pageId="";m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.BrowserTextScopeItem"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"url",kind:"scalar",T:9},{no:2,name:"visible_text",kind:"scalar",T:9},{no:3,name:"page_id",kind:"scalar",T:9}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},WO=class r extends M{constructor(e){super();this.id="";this.title="";this.summary="";m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.ConversationScopeItem"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"title",kind:"scalar",T:9},{no:3,name:"last_modified_time",kind:"message",T:Ve},{no:4,name:"summary",kind:"scalar",T:9}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},$O=class r extends M{constructor(e){super();this.id="";this.branch="";this.current=!1;m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.UserActivityScopeItem"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"branch",kind:"scalar",T:9},{no:3,name:"current",kind:"scalar",T:8}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},GO=class r extends M{constructor(e){super();this.processId="";this.name="";this.lastCommand="";this.content="";m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.TerminalScopeItem"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"process_id",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9},{no:3,name:"last_command",kind:"scalar",T:9},{no:4,name:"content",kind:"scalar",T:9}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},zO=class r extends M{constructor(e){super();this.url="";this.title="";this.owner="";this.number="";m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.GithubPullRequestItem"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"url",kind:"scalar",T:9},{no:2,name:"title",kind:"scalar",T:9},{no:3,name:"owner",kind:"scalar",T:9},{no:4,name:"number",kind:"scalar",T:9}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},qO=class r extends M{constructor(e){super();this.sha="";this.shortSha="";this.subject="";this.author="";this.insertions=0;this.deletions=0;m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.GitCommitData"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"sha",kind:"scalar",T:9},{no:2,name:"short_sha",kind:"scalar",T:9},{no:3,name:"subject",kind:"scalar",T:9},{no:4,name:"author",kind:"scalar",T:9},{no:5,name:"timestamp",kind:"message",T:Ve},{no:6,name:"insertions",kind:"scalar",T:5},{no:7,name:"deletions",kind:"scalar",T:5}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},KO=class r extends M{constructor(e){super();this.branchName="";this.baseBranch="";this.mergeBaseSha="";this.filesChanged=0;this.insertions=0;this.deletions=0;this.branchHeadSha="";m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.GitDiffData"}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:"merge_base_sha",kind:"scalar",T:9},{no:4,name:"files_changed",kind:"scalar",T:5},{no:5,name:"insertions",kind:"scalar",T:5},{no:6,name:"deletions",kind:"scalar",T:5},{no:7,name:"branch_head_sha",kind:"scalar",T:9}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},JO=class r extends M{constructor(e){super();this.stagedCount=0;this.unstagedCount=0;this.untrackedCount=0;m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.GitWorkingChangesData"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"staged_count",kind:"scalar",T:5},{no:2,name:"unstaged_count",kind:"scalar",T:5},{no:3,name:"untracked_count",kind:"scalar",T:5}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},jO=class r extends M{constructor(e){super();this.repoRootUri="";this.repoDisplayName="";this.gitData={case:void 0};this.formattedContent="";m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.GitScopeItem"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"repo_root_uri",kind:"scalar",T:9},{no:6,name:"repo_display_name",kind:"scalar",T:9},{no:2,name:"commit",kind:"message",T:qO,oneof:"git_data"},{no:3,name:"diff",kind:"message",T:KO,oneof:"git_data"},{no:4,name:"working_changes",kind:"message",T:JO,oneof:"git_data"},{no:5,name:"formatted_content",kind:"scalar",T:9}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},qS=class r extends M{constructor(e){super();this.scopeItem={case:void 0};m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.ContextScopeItem"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"file",kind:"message",T:zS,oneof:"scope_item"},{no:2,name:"directory",kind:"message",T:zS,oneof:"scope_item"},{no:3,name:"repository",kind:"message",T:CO,oneof:"scope_item"},{no:4,name:"code_context",kind:"message",T:yc,oneof:"scope_item"},{no:6,name:"cci_with_subrange",kind:"message",T:EO,oneof:"scope_item"},{no:7,name:"repository_path",kind:"message",T:TO,oneof:"scope_item"},{no:8,name:"slack",kind:"message",T:Ic,oneof:"scope_item"},{no:9,name:"github",kind:"message",T:Ic,oneof:"scope_item"},{no:10,name:"file_line_range",kind:"message",T:im,oneof:"scope_item"},{no:11,name:"text_block",kind:"message",T:xO,oneof:"scope_item"},{no:12,name:"jira",kind:"message",T:Ic,oneof:"scope_item"},{no:13,name:"google_drive",kind:"message",T:Ic,oneof:"scope_item"},{no:14,name:"console_log",kind:"message",T:PO,oneof:"scope_item"},{no:15,name:"dom_element",kind:"message",T:DO,oneof:"scope_item"},{no:16,name:"recipe",kind:"message",T:AO,oneof:"scope_item"},{no:17,name:"knowledge",kind:"message",T:Ic,oneof:"scope_item"},{no:18,name:"rule",kind:"message",T:LO,oneof:"scope_item"},{no:19,name:"mcp_resource",kind:"message",T:FO,oneof:"scope_item"},{no:20,name:"browser_page",kind:"message",T:HO,oneof:"scope_item"},{no:21,name:"browser_code_block",kind:"message",T:BO,oneof:"scope_item"},{no:22,name:"browser_text",kind:"message",T:VO,oneof:"scope_item"},{no:23,name:"conversation",kind:"message",T:WO,oneof:"scope_item"},{no:24,name:"user_activity",kind:"message",T:$O,oneof:"scope_item"},{no:25,name:"terminal",kind:"message",T:GO,oneof:"scope_item"},{no:26,name:"github_pull_request",kind:"message",T:zO,oneof:"scope_item"},{no:27,name:"code_map",kind:"message",T:OO,oneof:"scope_item"},{no:28,name:"mcp_prompt",kind:"message",T:UO,oneof:"scope_item"},{no:29,name:"skill",kind:"message",T:MO,oneof:"scope_item"},{no:30,name:"plan_file",kind:"message",T:NO,oneof:"scope_item"},{no:31,name:"git",kind:"message",T:jO,oneof:"scope_item"}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},yV=class r extends M{constructor(e){super();this.items=[];m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.ContextScope"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"items",kind:"message",T:qS,repeated:!0}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},KS=class r extends M{constructor(e){super();this.nodeName="";this.graphStateJson=new Uint8Array(0);this.graphStateJsonNumBytes=ne.zero;m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.NodeExecutionRecord"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"node_name",kind:"scalar",T:9},{no:2,name:"start_time",kind:"message",T:Ve},{no:3,name:"end_time",kind:"message",T:Ve},{no:5,name:"graph_state_json",kind:"scalar",T:12},{no:6,name:"graph_state_json_num_bytes",kind:"scalar",T:4},{no:4,name:"subgraph_execution",kind:"message",T:QO}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},QO=class r extends M{constructor(e){super();this.history=[];m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.GraphExecutionState"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"current",kind:"message",T:KS},{no:2,name:"history",kind:"message",T:KS,repeated:!0}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},EV=class r extends M{constructor(e){super();this.items=[];m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.Guideline"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"items",kind:"message",T:XO,repeated:!0}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},XO=class r extends M{constructor(e){super();this.guideline="";m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.GuidelineItem"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"guideline",kind:"scalar",T:9}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},SV=class r extends M{constructor(e){super();this.model=0;this.maxInputTokens=0;this.temperature=0;this.maxOutputTokens=0;this.orderSnippetsByFile=!1;m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.ChatNodeConfig"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"model",kind:"enum",T:m.getEnumType(fo)},{no:2,name:"max_input_tokens",kind:"scalar",T:13},{no:3,name:"temperature",kind:"scalar",T:2},{no:4,name:"max_output_tokens",kind:"scalar",T:13},{no:5,name:"order_snippets_by_file",kind:"scalar",T:8}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},xV=class r extends M{constructor(e){super();this.shouldBatchCcis=!1;this.maxTokensPerSubrange=ne.zero;this.numParserWorkers=ne.zero;this.numWorkersPerDistributedScorer=ne.zero;this.verbose=!1;this.ignoreExtensions=[];this.ignoreDirectoryStubs=[];this.minTokenSpaceForContext=0;this.maxTargetFiles=0;this.topCciCount=0;m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.MQueryConfig"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"should_batch_ccis",kind:"scalar",T:8},{no:2,name:"max_tokens_per_subrange",kind:"scalar",T:3},{no:3,name:"num_parser_workers",kind:"scalar",T:3},{no:4,name:"num_workers_per_distributed_scorer",kind:"scalar",T:3},{no:5,name:"verbose",kind:"scalar",T:8},{no:6,name:"ignore_extensions",kind:"scalar",T:9,repeated:!0},{no:7,name:"ignore_directory_stubs",kind:"scalar",T:9,repeated:!0},{no:8,name:"min_token_space_for_context",kind:"scalar",T:13},{no:9,name:"max_target_files",kind:"scalar",T:13},{no:10,name:"top_cci_count",kind:"scalar",T:13}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},YO=class r extends M{constructor(e){super();this.deltaText="";this.deltaTokens=0;this.stopReason=0;this.deltaToolCalls=[];this.deltaThinking="";this.deltaSignature="";this.thinkingRedacted=!1;this.outputId="";this.thinkingId="";this.geminiThoughtSignature=new Uint8Array(0);this.deltaSignatureType="";this.phase="";m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.CompletionDelta"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"delta_text",kind:"scalar",T:9},{no:2,name:"delta_tokens",kind:"scalar",T:13},{no:3,name:"stop_reason",kind:"enum",T:m.getEnumType(kh)},{no:4,name:"usage",kind:"message",T:QS},{no:5,name:"delta_tool_calls",kind:"message",T:JS,repeated:!0},{no:6,name:"delta_thinking",kind:"scalar",T:9},{no:7,name:"delta_signature",kind:"scalar",T:9},{no:8,name:"thinking_redacted",kind:"scalar",T:8},{no:9,name:"output_id",kind:"scalar",T:9},{no:10,name:"thinking_id",kind:"scalar",T:9},{no:11,name:"gemini_thought_signature",kind:"scalar",T:12},{no:12,name:"delta_signature_type",kind:"scalar",T:9},{no:13,name:"phase",kind:"scalar",T:9}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},CV=class r extends M{constructor(e){super();this.deltas={};this.prompt="";m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.CompletionDeltaMap"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"deltas",kind:"map",K:5,V:{kind:"message",T:YO}},{no:2,name:"prompt",kind:"scalar",T:9},{no:3,name:"completion_profile",kind:"message",T:Ph}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},TV=class r extends M{constructor(e){super();this.prompt="";this.inferenceAddress="";m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.ChatCompletionInfo"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"prompt",kind:"scalar",T:9},{no:2,name:"inference_address",kind:"scalar",T:9}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},JS=class r extends M{constructor(e){super();this.id="";this.name="";this.argumentsJson="";this.invalidJsonStr="";this.invalidJsonErr="";this.isCustomToolCall=!1;m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.ChatToolCall"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9},{no:3,name:"arguments_json",kind:"scalar",T:9},{no:4,name:"invalid_json_str",kind:"scalar",T:9},{no:5,name:"invalid_json_err",kind:"scalar",T:9},{no:6,name:"is_custom_tool_call",kind:"scalar",T:8}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},_V=class r extends M{constructor(e){super();this.level=0;this.message="";m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.IdeStatus"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"level",kind:"enum",T:m.getEnumType(xL)},{no:2,name:"message",kind:"scalar",T:9}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},PV=class r extends M{constructor(e){super();this.code=0;this.message="";m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.Status"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"code",kind:"scalar",T:5},{no:2,name:"message",kind:"scalar",T:9}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},Rh=class r extends M{constructor(e){super();this.row=ne.zero;this.col=ne.zero;m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.DocumentPosition"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"row",kind:"scalar",T:4},{no:2,name:"col",kind:"scalar",T:4}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},Ec=class r extends M{constructor(e){super();this.startOffset=ne.zero;this.endOffset=ne.zero;m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.Range"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"start_offset",kind:"scalar",T:4},{no:2,name:"end_offset",kind:"scalar",T:4},{no:3,name:"start_position",kind:"message",T:Rh},{no:4,name:"end_position",kind:"message",T:Rh}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},jS=class r extends M{constructor(e){super();this.absolutePathMigrateMeToUri="";this.absoluteUri="";this.relativePathMigrateMeToWorkspaceUri="";this.workspaceUri="";this.text="";this.editorLanguage="";this.language=0;this.cursorOffset=ne.zero;this.lineEnding="";this.isCutoffStart=!1;this.isCutoffEnd=!1;this.linesCutoffStart=0;this.linesCutoffEnd=0;this.isDirty=!1;this.isNotebook=!1;this.selections=[];m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.Document"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"absolute_path_migrate_me_to_uri",kind:"scalar",T:9},{no:12,name:"absolute_uri",kind:"scalar",T:9},{no:2,name:"relative_path_migrate_me_to_workspace_uri",kind:"scalar",T:9},{no:13,name:"workspace_uri",kind:"scalar",T:9},{no:3,name:"text",kind:"scalar",T:9},{no:4,name:"editor_language",kind:"scalar",T:9},{no:5,name:"language",kind:"enum",T:m.getEnumType(ns)},{no:6,name:"cursor_offset",kind:"scalar",T:4},{no:8,name:"cursor_position",kind:"message",T:Rh},{no:7,name:"line_ending",kind:"scalar",T:9},{no:9,name:"visible_range",kind:"message",T:Ec},{no:10,name:"is_cutoff_start",kind:"scalar",T:8},{no:11,name:"is_cutoff_end",kind:"scalar",T:8},{no:14,name:"lines_cutoff_start",kind:"scalar",T:5},{no:15,name:"lines_cutoff_end",kind:"scalar",T:5},{no:16,name:"timestamp",kind:"message",T:Ve},{no:17,name:"is_dirty",kind:"scalar",T:8},{no:19,name:"is_notebook",kind:"scalar",T:8},{no:21,name:"last_access_time",kind:"message",T:Ve},{no:22,name:"selections",kind:"message",T:Ec,repeated:!0},{no:23,name:"hash",kind:"scalar",T:4,opt:!0}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},DV=class r extends M{constructor(e){super();this.otherDocuments=[];this.codeContextItems=[];m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.PromptComponents"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"document",kind:"message",T:jS},{no:2,name:"other_documents",kind:"message",T:jS,repeated:!0},{no:3,name:"code_context_items",kind:"message",T:yc,repeated:!0}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},wV=class r extends M{constructor(e){super();this.chunk={case:void 0};m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.TextOrScopeItem"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"text",kind:"scalar",T:9,oneof:"chunk"},{no:2,name:"item",kind:"message",T:qS,oneof:"chunk"}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},ZO=class r extends M{constructor(e){super();this.matchRepoName="";this.matchPath="";this.pinnedContexts=[];m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.PinnedContextConfig"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"match_repo_name",kind:"scalar",T:9},{no:2,name:"match_path",kind:"scalar",T:9},{no:3,name:"pinned_contexts",kind:"message",T:e1,repeated:!0}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},e1=class r extends M{constructor(e){super();this.contextItem={case:void 0};m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.PinnedContext"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"repository_path",kind:"message",T:t1,oneof:"context_item"}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},t1=class r extends M{constructor(e){super();this.remoteRepoName="";this.version="";this.relativePath="";m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.RepositoryPath"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"remote_repo_name",kind:"scalar",T:9},{no:2,name:"version",kind:"scalar",T:9},{no:3,name:"relative_path",kind:"scalar",T:9}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},RV=class r extends M{constructor(e){super();this.pinnedContextConfigs=[];m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.DefaultPinnedContextConfig"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"pinned_context_configs",kind:"message",T:ZO,repeated:!0}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},n1=class r extends M{constructor(e){super();this.id="";this.prompt="";m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.Rule"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"prompt",kind:"scalar",T:9}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},kV=class r extends M{constructor(e){super();this.id="";this.startLine=0;this.endLine=0;m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.RuleViolation"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"rule",kind:"message",T:n1},{no:3,name:"start_line",kind:"scalar",T:5},{no:4,name:"end_line",kind:"scalar",T:5}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},AV=class r extends M{constructor(e){super();this.logs=[];this.goroutineProfile=new Uint8Array(0);m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.LanguageServerDiagnostics"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"logs",kind:"scalar",T:9,repeated:!0},{no:2,name:"goroutine_profile",kind:"scalar",T:12}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},OV=class r extends M{constructor(t){super(),m.util.initPartial(t,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.IndexerStats"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"database",kind:"message",T:o1}])}static fromBinary(t,e){return new r().fromBinary(t,e)}static fromJson(t,e){return new r().fromJson(t,e)}static fromJsonString(t,e){return new r().fromJsonString(t,e)}static equals(t,e){return m.util.equals(r,t,e)}},o1=class r extends M{constructor(e){super();this.backend={case:void 0};m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.IndexerDbStats"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"local_sqlite_faiss",kind:"message",T:r1,oneof:"backend"},{no:2,name:"postgres",kind:"message",T:s1,oneof:"backend"}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},r1=class r extends M{constructor(e){super();this.faissStateStats=[];this.totalItemCount=ne.zero;this.quantized=!1;m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.LocalSqliteFaissDbStats"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"faiss_state_stats",kind:"message",T:i1,repeated:!0},{no:2,name:"total_item_count",kind:"scalar",T:3},{no:3,name:"quantized",kind:"scalar",T:8}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},i1=class r extends M{constructor(e){super();this.embeddingSource=0;this.workspace="";this.itemCount=ne.zero;m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.FaissStateStats"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"embedding_source",kind:"enum",T:m.getEnumType($1)},{no:2,name:"workspace",kind:"scalar",T:9},{no:3,name:"item_count",kind:"scalar",T:3}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},s1=class r extends M{constructor(t){super(),m.util.initPartial(t,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.PostgresDbStats"}static{this.fields=m.util.newFieldList(()=>[])}static fromBinary(t,e){return new r().fromBinary(t,e)}static fromJson(t,e){return new r().fromJson(t,e)}static fromJsonString(t,e){return new r().fromJsonString(t,e)}static equals(t,e){return m.util.equals(r,t,e)}},a1=class r extends M{constructor(e){super();this.type=0;m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.LastUpdateRecord"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"time",kind:"message",T:Ve},{no:2,name:"type",kind:"enum",T:m.getEnumType(CL)}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},LV=class r extends M{constructor(e){super();this.records=[];m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.LastUpdateRecordList"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"records",kind:"message",T:a1,repeated:!0}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},QS=class r extends M{constructor(e){super();this.modelDeprecated=0;this.modelUid="";this.billingModelUid="";this.requestedModelUid="";this.inputTokens=ne.zero;this.outputTokens=ne.zero;this.cacheWriteTokens=ne.zero;this.cacheReadTokens=ne.zero;this.apiProvider=0;this.messageId="";this.responseHeader={};m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.ModelUsageStats"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"model_deprecated",jsonName:"model",kind:"enum",T:m.getEnumType(fo)},{no:9,name:"model_uid",kind:"scalar",T:9},{no:10,name:"billing_model_uid",kind:"scalar",T:9},{no:11,name:"requested_model_uid",kind:"scalar",T:9},{no:2,name:"input_tokens",kind:"scalar",T:4},{no:3,name:"output_tokens",kind:"scalar",T:4},{no:4,name:"cache_write_tokens",kind:"scalar",T:4},{no:5,name:"cache_read_tokens",kind:"scalar",T:4},{no:6,name:"api_provider",kind:"enum",T:m.getEnumType(am)},{no:7,name:"message_id",kind:"scalar",T:9},{no:8,name:"response_header",kind:"map",K:9,V:{kind:"scalar",T:9}}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},MV=class r extends M{constructor(e){super();this.reason="";m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.SuperCompleteFilterReason"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"reason",kind:"scalar",T:9}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},l1=class r extends M{constructor(e){super();this.id="";this.title="";m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.DiagnosticFix"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"title",kind:"scalar",T:9}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},NV=class r extends M{constructor(e){super();this.message="";this.severity="";this.source="";this.uri="";this.language=0;this.score=ne.zero;this.fixes=[];m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.CodeDiagnostic"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"range",kind:"message",T:Ec},{no:2,name:"message",kind:"scalar",T:9},{no:3,name:"severity",kind:"scalar",T:9},{no:4,name:"source",kind:"scalar",T:9},{no:5,name:"uri",kind:"scalar",T:9},{no:6,name:"id",kind:"scalar",T:9,opt:!0},{no:7,name:"language",kind:"enum",T:m.getEnumType(ns)},{no:8,name:"score",kind:"scalar",T:3},{no:9,name:"fixes",kind:"message",T:l1,repeated:!0}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},UV=class r extends M{constructor(e){super();this.text="";this.label="";this.labelDetail="";this.description="";this.detail="";this.documentation="";this.kind="";this.selected=!1;m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.IntellisenseSuggestion"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"range",kind:"message",T:Ec},{no:2,name:"text",kind:"scalar",T:9},{no:3,name:"label",kind:"scalar",T:9},{no:4,name:"label_detail",kind:"scalar",T:9},{no:5,name:"description",kind:"scalar",T:9},{no:6,name:"detail",kind:"scalar",T:9},{no:7,name:"documentation",kind:"scalar",T:9},{no:8,name:"kind",kind:"scalar",T:9},{no:9,name:"selected",kind:"scalar",T:8}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},d1=class r extends M{constructor(e){super();this.overlappedCodeContextItems=[];this.firstElementSuffixOverlap=0;this.lastElementPrefixOverlap=0;m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.DocumentLinesElement"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"document_query",kind:"message",T:c1},{no:2,name:"overlapped_code_context_items",kind:"message",T:yc,repeated:!0},{no:3,name:"first_element_suffix_overlap",kind:"scalar",T:13},{no:4,name:"last_element_prefix_overlap",kind:"scalar",T:13}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},c1=class r extends M{constructor(e){super();this.text="";this.cursorOffset=0;this.startLine=0;this.endLine=0;this.useCharacterPosition=!1;m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.DocumentQuery"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"text",kind:"scalar",T:9},{no:2,name:"cursor_offset",kind:"scalar",T:5},{no:3,name:"start_line",kind:"scalar",T:13},{no:4,name:"end_line",kind:"scalar",T:13},{no:5,name:"use_character_position",kind:"scalar",T:8}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},u1=class r extends M{constructor(e){super();this.element={case:void 0};m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.DocumentOutlineElement"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"code_context_item",kind:"message",T:yc,oneof:"element"},{no:2,name:"document_lines_element",kind:"message",T:d1,oneof:"element"},{no:3,name:"text",kind:"scalar",T:9,oneof:"element"}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},FV=class r extends M{constructor(e){super();this.elements=[];this.startIndex=ne.zero;m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.DocumentOutline"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"elements",kind:"message",T:u1,repeated:!0},{no:2,name:"start_index",kind:"scalar",T:3}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},HV=class r extends M{constructor(e){super();this.eventName="";this.apiKey="";this.installationId="";this.ideName="";this.os="";this.codeiumVersion="";this.ideVersion="";this.durationMs=ne.zero;this.extra={};m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.ProductEvent"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"event_name",kind:"scalar",T:9},{no:2,name:"api_key",kind:"scalar",T:9},{no:3,name:"installation_id",kind:"scalar",T:9},{no:4,name:"ide_name",kind:"scalar",T:9},{no:5,name:"os",kind:"scalar",T:9},{no:6,name:"codeium_version",kind:"scalar",T:9},{no:7,name:"ide_version",kind:"scalar",T:9},{no:8,name:"duration_ms",kind:"scalar",T:4},{no:9,name:"extra",kind:"map",K:9,V:{kind:"scalar",T:9}}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},p1=class r extends M{constructor(e){super();this.id="";this.name="";this.description="";this.codebaseRootUri="";this.fileNames=[];this.commitMessages=[];this.commitSha=[];this.commitDescriptions=[];this.fileDescriptions=[];this.intent="";m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.CodebaseCluster"}static{this.fields=m.util.newFieldList(()=>[{no:5,name:"id",kind:"scalar",T:9},{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"description",kind:"scalar",T:9},{no:6,name:"codebase_root_uri",kind:"scalar",T:9},{no:3,name:"file_names",kind:"scalar",T:9,repeated:!0},{no:4,name:"commit_messages",kind:"scalar",T:9,repeated:!0},{no:7,name:"commit_sha",kind:"scalar",T:9,repeated:!0},{no:8,name:"commit_descriptions",kind:"scalar",T:9,repeated:!0},{no:9,name:"file_descriptions",kind:"scalar",T:9,repeated:!0},{no:10,name:"intent",kind:"scalar",T:9}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},BV=class r extends M{constructor(e){super();this.clusters=[];m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.CodebaseClusterList"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"clusters",kind:"message",T:p1,repeated:!0}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},m1=class r extends M{constructor(e){super();this.chunkType={case:void 0};this.position=0;m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.KnowledgeBaseChunk"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"text",kind:"scalar",T:9,oneof:"chunk_type"},{no:3,name:"markdown_chunk",kind:"message",T:v1,oneof:"chunk_type"},{no:2,name:"position",kind:"scalar",T:5}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},f1=class r extends M{constructor(e){super();this.documentId="";this.url="";this.title="";this.chunks=[];this.summary="";this.text="";m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.KnowledgeBaseItem"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"document_id",kind:"scalar",T:9},{no:3,name:"url",kind:"scalar",T:9},{no:4,name:"title",kind:"scalar",T:9},{no:5,name:"timestamp",kind:"message",T:Ve},{no:6,name:"chunks",kind:"message",T:m1,repeated:!0},{no:7,name:"summary",kind:"scalar",T:9},{no:8,name:"image",kind:"message",T:h1},{no:9,name:"dom_tree",kind:"message",T:wO},{no:2,name:"text",kind:"scalar",T:9}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},g1=class r extends M{constructor(e){super();this.score=0;this.indexName="";this.documentSourceName="";m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.KnowledgeBaseItemWithMetadata"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"knowledge_base_item",kind:"message",T:f1},{no:2,name:"score",kind:"scalar",T:2},{no:3,name:"index_name",kind:"scalar",T:9},{no:4,name:"document_source_name",kind:"scalar",T:9}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},VV=class r extends M{constructor(e){super();this.description="";this.children=[];m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.KnowledgeBaseGroup"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"description",kind:"scalar",T:9},{no:2,name:"item",kind:"message",T:g1},{no:3,name:"children",kind:"message",T:r,repeated:!0}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},h1=class r extends M{constructor(e){super();this.base64Data="";this.mimeType="";this.caption="";m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.ImageData"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"base64_data",kind:"scalar",T:9},{no:2,name:"mime_type",kind:"scalar",T:9},{no:3,name:"caption",kind:"scalar",T:9}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},WV=class r extends M{constructor(e){super();this.text="";this.mimeType="";m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.TextData"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"text",kind:"scalar",T:9},{no:2,name:"mime_type",kind:"scalar",T:9}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},v1=class r extends M{constructor(e){super();this.headers=[];this.text="";m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.MarkdownChunk"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"headers",kind:"message",T:b1,repeated:!0},{no:2,name:"text",kind:"scalar",T:9}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},b1=class r extends M{constructor(e){super();this.type=0;this.text="";m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.MarkdownChunk.MarkdownHeader"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"type",kind:"enum",T:m.getEnumType(_L)},{no:2,name:"text",kind:"scalar",T:9}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},I1=class r extends M{constructor(e){super();this.terminalId="";this.commandLine="";this.cwd="";this.source=0;m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.TerminalShellCommandHeader"}static{this.fields=m.util.newFieldList(()=>[{no:7,name:"metadata",kind:"message",T:HS},{no:1,name:"terminal_id",kind:"scalar",T:9},{no:3,name:"command_line",kind:"scalar",T:9},{no:4,name:"cwd",kind:"scalar",T:9},{no:5,name:"start_time",kind:"message",T:Ve},{no:6,name:"source",kind:"enum",T:m.getEnumType(dx)}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},y1=class r extends M{constructor(e){super();this.rawData=new Uint8Array(0);m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.TerminalShellCommandData"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"raw_data",kind:"scalar",T:12}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},E1=class r extends M{constructor(t){super(),m.util.initPartial(t,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.TerminalShellCommandTrailer"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"exit_code",kind:"scalar",T:5,opt:!0},{no:2,name:"end_time",kind:"message",T:Ve},{no:3,name:"full_output",kind:"scalar",T:9,opt:!0},{no:4,name:"ansi_output",kind:"scalar",T:9,opt:!0}])}static fromBinary(t,e){return new r().fromBinary(t,e)}static fromJson(t,e){return new r().fromJson(t,e)}static fromJsonString(t,e){return new r().fromJsonString(t,e)}static equals(t,e){return m.util.equals(r,t,e)}},$V=class r extends M{constructor(e){super();this.value={case:void 0};m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.TerminalShellCommandStreamChunk"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"header",kind:"message",T:I1,oneof:"value"},{no:2,name:"data",kind:"message",T:y1,oneof:"value"},{no:3,name:"trailer",kind:"message",T:E1,oneof:"value"}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},GV=class r extends M{constructor(e){super();this.id="";this.commandLine="";this.cwd="";this.output=new Uint8Array(0);this.status=0;this.source=0;m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.TerminalShellCommand"}static{this.fields=m.util.newFieldList(()=>[{no:10,name:"id",kind:"scalar",T:9},{no:2,name:"command_line",kind:"scalar",T:9},{no:3,name:"cwd",kind:"scalar",T:9},{no:4,name:"output",kind:"scalar",T:12},{no:5,name:"exit_code",kind:"scalar",T:5,opt:!0},{no:6,name:"start_time",kind:"message",T:Ve},{no:7,name:"end_time",kind:"message",T:Ve},{no:11,name:"last_updated_time",kind:"message",T:Ve},{no:8,name:"status",kind:"enum",T:m.getEnumType(PL)},{no:9,name:"source",kind:"enum",T:m.getEnumType(dx)}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},zV=class r extends M{constructor(e){super();this.terminalId="";this.platform="";this.cwd="";this.shellName="";m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.TerminalCommandData"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"terminal_id",kind:"scalar",T:9},{no:2,name:"platform",kind:"scalar",T:9},{no:3,name:"cwd",kind:"scalar",T:9},{no:4,name:"shell_name",kind:"scalar",T:9}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},qV=class r extends M{constructor(e){super();this.windsurfProjectId="";this.authUid="";this.deploymentProvider=0;this.providerProjectId="";this.projectName="";this.domain="";this.subdomainName="";this.providerTeamId="";this.projectUrl="";m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.WindsurfProject"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"windsurf_project_id",kind:"scalar",T:9},{no:2,name:"auth_uid",kind:"scalar",T:9},{no:3,name:"deployment_provider",kind:"enum",T:m.getEnumType(Oh)},{no:4,name:"provider_project_id",kind:"scalar",T:9},{no:5,name:"project_name",kind:"scalar",T:9},{no:6,name:"created_at",kind:"message",T:Ve},{no:7,name:"updated_at",kind:"message",T:Ve},{no:8,name:"domain",kind:"scalar",T:9},{no:9,name:"subdomain_name",kind:"scalar",T:9},{no:10,name:"expires_at",kind:"message",T:Ve},{no:11,name:"claimed_at",kind:"message",T:Ve},{no:12,name:"deprovisioned_at",kind:"message",T:Ve},{no:14,name:"provider_team_id",kind:"scalar",T:9},{no:13,name:"project_url",kind:"scalar",T:9}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},KV=class r extends M{constructor(e){super();this.windsurfDeploymentId="";this.authUid="";this.deploymentProvider=0;this.providerDeploymentId="";this.windsurfProjectId="";this.projectId="";this.projectName="";this.workspacePath="";this.domain="";this.subdomainName="";this.providerTeamId="";this.deploymentUrl="";this.buildStatusUrl="";this.projectUrl="";m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.WindsurfDeployment"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"windsurf_deployment_id",kind:"scalar",T:9},{no:2,name:"auth_uid",kind:"scalar",T:9},{no:3,name:"deployment_provider",kind:"enum",T:m.getEnumType(Oh)},{no:14,name:"provider_deployment_id",kind:"scalar",T:9},{no:19,name:"windsurf_project_id",kind:"scalar",T:9},{no:4,name:"project_id",kind:"scalar",T:9},{no:5,name:"project_name",kind:"scalar",T:9},{no:6,name:"workspace_path",kind:"scalar",T:9},{no:7,name:"created_at",kind:"message",T:Ve},{no:8,name:"updated_at",kind:"message",T:Ve},{no:16,name:"domain",kind:"scalar",T:9},{no:17,name:"subdomain_name",kind:"scalar",T:9},{no:20,name:"provider_team_id",kind:"scalar",T:9},{no:11,name:"expires_at",kind:"message",T:Ve},{no:12,name:"deployment_url",kind:"scalar",T:9},{no:15,name:"claimed_at",kind:"message",T:Ve},{no:13,name:"deprovisioned_at",kind:"message",T:Ve},{no:9,name:"build_status_url",kind:"scalar",T:9},{no:10,name:"project_url",kind:"scalar",T:9}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},JV=class r extends M{constructor(e){super();this.deploymentProvider=0;this.isSandbox=!1;this.providerTeamId="";this.providerTeamSlug="";this.domain="";m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.DeployTarget"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"deployment_provider",kind:"enum",T:m.getEnumType(Oh)},{no:2,name:"is_sandbox",kind:"scalar",T:8},{no:3,name:"provider_team_id",kind:"scalar",T:9},{no:4,name:"provider_team_slug",kind:"scalar",T:9},{no:5,name:"domain",kind:"scalar",T:9}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},jV=class r extends M{constructor(e){super();this.label="";this.value={case:void 0};this.synonyms=[];this.isFeatured=!1;m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.WebDocsOption"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"label",kind:"scalar",T:9},{no:2,name:"docs_url",kind:"scalar",T:9,oneof:"value"},{no:3,name:"docs_search_domain",kind:"scalar",T:9,oneof:"value"},{no:4,name:"synonyms",kind:"scalar",T:9,repeated:!0},{no:5,name:"is_featured",kind:"scalar",T:8}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},XS=class r extends M{constructor(e){super();this.teamId="";this.userPromptCreditCap=0;this.userFlowCreditCap=0;this.autoProvisionCascadeSeat=!1;this.allowMcpServers=!1;this.allowAutoRunCommands=!1;this.maxUnclaimedSites=0;this.allowAppDeployments=!1;this.allowSandboxAppDeployments=!1;this.allowTeamsAppDeployments=!1;this.maxNewSitesPerDay=0;this.allowGithubReviews=!1;this.allowGithubDescriptionEdits=!1;this.pullRequestReviewGuidelines="";this.pullRequestDescriptionGuidelines="";this.disableToolCalls=!1;this.allowIndividualLevelAnalytics=!1;this.allowAttribution=!1;this.allowedMcpServers=[];this.allowGithubAutoReviews=!1;this.allowBrowserExperimentalFeatures=!1;this.disableToolCallExecutionOutsideWorkspace=!1;this.allowVibeAndReplace=!1;this.disableDeepwiki=!1;this.userAddOnCreditCap=0;this.disableCodemaps=!1;this.allowCodemapSharing="";this.disableFastContext=!1;this.disableLifeguard=!1;this.allowedIpRanges=[];this.maxCascadeAutoExecutionLevel=0;this.terminalAllowList=[];this.terminalDenyList=[];this.cliPermissionsAllow=[];this.cliPermissionsDeny=[];this.cliPermissionsAsk=[];this.defaultModelUid="";this.allowArenaMode=!1;this.cascadeHooksJson="";this.allowBundlingDevinCli=!1;this.mcpRegistryUrls=[];this.enforceMcpRegistry=!1;this.cliDefaultDisabled=!1;this.acpRegistryConfig="";this.sandboxEnforcementMode=0;this.sandboxAllowedDomains=[];this.sandboxDeniedDomains=[];this.devinTerminalAcpEnabled=!1;this.devinCloudAcpEnabled=!1;this.userConfiguredBannerEnabled=!1;this.userConfiguredBannerLabel="";this.userConfiguredBannerColor="";this.disableCascade=!1;this.extensionPolicy="";m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.TeamConfig"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"team_id",kind:"scalar",T:9},{no:2,name:"user_prompt_credit_cap",kind:"scalar",T:5},{no:3,name:"user_flow_credit_cap",kind:"scalar",T:5},{no:4,name:"auto_provision_cascade_seat",kind:"scalar",T:8},{no:5,name:"allow_mcp_servers",kind:"scalar",T:8},{no:7,name:"allow_auto_run_commands",kind:"scalar",T:8},{no:9,name:"max_unclaimed_sites",kind:"scalar",T:5},{no:10,name:"allow_app_deployments",kind:"scalar",T:8},{no:19,name:"allow_sandbox_app_deployments",kind:"scalar",T:8},{no:20,name:"allow_teams_app_deployments",kind:"scalar",T:8},{no:11,name:"max_new_sites_per_day",kind:"scalar",T:5},{no:12,name:"allow_github_reviews",kind:"scalar",T:8},{no:13,name:"allow_github_description_edits",kind:"scalar",T:8},{no:14,name:"pull_request_review_guidelines",kind:"scalar",T:9},{no:16,name:"pull_request_description_guidelines",kind:"scalar",T:9},{no:15,name:"disable_tool_calls",kind:"scalar",T:8},{no:17,name:"allow_individual_level_analytics",kind:"scalar",T:8},{no:18,name:"allow_conversation_sharing",kind:"scalar",T:8,opt:!0},{no:21,name:"pull_request_review_rate_limit",kind:"scalar",T:5,opt:!0},{no:22,name:"allow_attribution",kind:"scalar",T:8},{no:23,name:"allowed_mcp_servers",kind:"message",T:S1,repeated:!0},{no:24,name:"allow_github_auto_reviews",kind:"scalar",T:8},{no:25,name:"allow_browser_experimental_features",kind:"scalar",T:8},{no:26,name:"disable_tool_call_execution_outside_workspace",kind:"scalar",T:8},{no:27,name:"allow_vibe_and_replace",kind:"scalar",T:8},{no:28,name:"disable_deepwiki",kind:"scalar",T:8},{no:30,name:"user_add_on_credit_cap",kind:"scalar",T:5},{no:31,name:"disable_codemaps",kind:"scalar",T:8},{no:32,name:"allow_codemap_sharing",kind:"scalar",T:9},{no:33,name:"disable_fast_context",kind:"scalar",T:8},{no:34,name:"disable_lifeguard",kind:"scalar",T:8},{no:35,name:"allowed_ip_ranges",kind:"scalar",T:9,repeated:!0},{no:37,name:"max_cascade_auto_execution_level",kind:"enum",T:m.getEnumType(sm)},{no:38,name:"cascade_web_search_enabled",kind:"scalar",T:8,opt:!0},{no:39,name:"terminal_allow_list",kind:"scalar",T:9,repeated:!0},{no:40,name:"terminal_deny_list",kind:"scalar",T:9,repeated:!0},{no:41,name:"cli_permissions_allow",kind:"scalar",T:9,repeated:!0},{no:42,name:"cli_permissions_deny",kind:"scalar",T:9,repeated:!0},{no:43,name:"cli_permissions_ask",kind:"scalar",T:9,repeated:!0},{no:44,name:"default_model_uid",kind:"scalar",T:9},{no:45,name:"allow_arena_mode",kind:"scalar",T:8},{no:46,name:"cascade_hooks_json",kind:"scalar",T:9},{no:47,name:"allow_bundling_devin_cli",kind:"scalar",T:8},{no:49,name:"mcp_registry_urls",kind:"scalar",T:9,repeated:!0},{no:60,name:"enforce_mcp_registry",kind:"scalar",T:8},{no:50,name:"cli_default_disabled",kind:"scalar",T:8},{no:51,name:"acp_registry_config",kind:"scalar",T:9},{no:55,name:"sandbox_enforcement_mode",kind:"enum",T:m.getEnumType(DL)},{no:56,name:"sandbox_allowed_domains",kind:"scalar",T:9,repeated:!0},{no:57,name:"sandbox_denied_domains",kind:"scalar",T:9,repeated:!0},{no:58,name:"devin_terminal_acp_enabled",kind:"scalar",T:8},{no:59,name:"devin_cloud_acp_enabled",kind:"scalar",T:8},{no:61,name:"user_configured_banner_enabled",kind:"scalar",T:8},{no:62,name:"user_configured_banner_label",kind:"scalar",T:9},{no:63,name:"user_configured_banner_color",kind:"scalar",T:9},{no:64,name:"disable_cascade",kind:"scalar",T:8},{no:65,name:"extension_policy",kind:"scalar",T:9}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},QV=class r extends M{constructor(e){super();this.projectId="";this.framework="";m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.WebAppDeploymentConfig"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"project_id",kind:"scalar",T:9},{no:2,name:"framework",kind:"scalar",T:9}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},S1=class r extends M{constructor(e){super();this.serverId="";this.configuration={case:void 0};m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.McpServerConfig"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"server_id",kind:"scalar",T:9},{no:2,name:"local",kind:"message",T:x1,oneof:"configuration"},{no:3,name:"remote",kind:"message",T:C1,oneof:"configuration"}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},x1=class r extends M{constructor(e){super();this.command="";this.args=[];this.env={};m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.McpLocalServer"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"command",kind:"scalar",T:9},{no:2,name:"args",kind:"scalar",T:9,repeated:!0},{no:3,name:"env",kind:"map",K:9,V:{kind:"scalar",T:9}}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},C1=class r extends M{constructor(e){super();this.type="";this.url="";this.headers={};m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.McpRemoteServer"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"type",kind:"scalar",T:9},{no:2,name:"url",kind:"scalar",T:9},{no:3,name:"headers",kind:"map",K:9,V:{kind:"scalar",T:9}}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},XV=class r extends M{constructor(e){super();this.userId="";this.sessionId="";this.properties={};m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.UnleashContext"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"user_id",kind:"scalar",T:9},{no:2,name:"session_id",kind:"scalar",T:9},{no:3,name:"properties",kind:"map",K:9,V:{kind:"scalar",T:9}}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},T1=class r extends M{constructor(e){super();this.url="";this.pageId="";this.pageTitle="";this.viewportWidth=0;this.viewportHeight=0;this.faviconUrl="";m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.BrowserPageMetadata"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"url",kind:"scalar",T:9},{no:2,name:"page_id",kind:"scalar",T:9},{no:3,name:"page_title",kind:"scalar",T:9},{no:4,name:"viewport_width",kind:"scalar",T:13},{no:5,name:"viewport_height",kind:"scalar",T:13},{no:6,name:"favicon_url",kind:"scalar",T:9},{no:7,name:"last_visited_time",kind:"message",T:Ve}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},_1=class r extends M{constructor(e){super();this.viewportScrollX=0;this.viewportScrollY=0;this.clickX=0;this.clickY=0;this.targetElementTagName="";this.targetElementXPath="";m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.BrowserClickInteraction"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"viewport_scroll_x",kind:"scalar",T:13},{no:2,name:"viewport_scroll_y",kind:"scalar",T:13},{no:3,name:"click_x",kind:"scalar",T:13},{no:4,name:"click_y",kind:"scalar",T:13},{no:5,name:"target_element_tag_name",kind:"scalar",T:9},{no:6,name:"target_element_x_path",kind:"scalar",T:9}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},P1=class r extends M{constructor(e){super();this.viewportScrollX=0;this.viewportScrollY=0;m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.BrowserScrollInteraction"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"viewport_scroll_x",kind:"scalar",T:13},{no:2,name:"viewport_scroll_y",kind:"scalar",T:13}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},YV=class r extends M{constructor(e){super();this.interaction={case:void 0};m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.BrowserInteraction"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"timestamp",kind:"message",T:Ve},{no:2,name:"page_metadata",kind:"message",T:T1},{no:3,name:"click",kind:"message",T:_1,oneof:"interaction"},{no:4,name:"scroll",kind:"message",T:P1,oneof:"interaction"}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},ZV=class r extends M{constructor(e){super();this.name="";this.value=0;this.details={};this.lowerBetter=!1;this.isBool=!1;this.error="";this.trajectoryId="";m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.MetricsRecord"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"value",kind:"scalar",T:2},{no:3,name:"details",kind:"map",K:9,V:{kind:"scalar",T:9}},{no:4,name:"lower_better",kind:"scalar",T:8},{no:5,name:"is_bool",kind:"scalar",T:8},{no:6,name:"error",kind:"scalar",T:9},{no:7,name:"trajectory_id",kind:"scalar",T:9}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},D1=class r extends M{constructor(e){super();this.model=0;this.modelUid="";this.message="";m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.ModelNotification"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"model",kind:"enum",T:m.getEnumType(fo)},{no:3,name:"model_uid",kind:"scalar",T:9},{no:2,name:"message",kind:"scalar",T:9}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},eW=class r extends M{constructor(e){super();this.modelNotifications=[];m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.ModelNotificationExperimentPayload"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"model_notifications",kind:"message",T:D1,repeated:!0}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},tW=class r extends M{constructor(e){super();this.uri="";m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.LspReference"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"uri",kind:"scalar",T:9},{no:2,name:"range",kind:"message",T:Ec},{no:3,name:"snippet",kind:"scalar",T:9,opt:!0}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},nW=class r extends M{constructor(e){super();this.text="";this.tooltipText="";m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.CascadeModelHeaderWarningExperimentPayload"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"text",kind:"scalar",T:9},{no:2,name:"tooltip_text",kind:"scalar",T:9}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},w1=class r extends M{constructor(e){super();this.id="";this.uri="";this.line=0;this.content="";m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.CodeAnnotation"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"uri",kind:"scalar",T:9},{no:3,name:"line",kind:"scalar",T:13},{no:4,name:"content",kind:"scalar",T:9},{no:5,name:"created_at",kind:"message",T:Ve}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},oW=class r extends M{constructor(e){super();this.annotations=[];m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.CodeAnnotationsState"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"annotations",kind:"message",T:w1,repeated:!0}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},rW=class r extends M{constructor(e){super();this.description={case:void 0};m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.TrajectoryDescription"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"cascade_conversation_title",kind:"scalar",T:9,oneof:"description"},{no:2,name:"mainline_branch_name",kind:"scalar",T:9,oneof:"description"}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},iW=class r extends M{constructor(e){super();this.provider=0;this.model=0;m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.ThirdPartyWebSearchConfig"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"provider",kind:"enum",T:m.getEnumType(kL)},{no:2,name:"model",kind:"enum",T:m.getEnumType(AL)}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},sW=class r extends M{constructor(e){super();this.code=0;this.message="";m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.GRPCStatus"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"code",kind:"scalar",T:5},{no:2,name:"message",kind:"scalar",T:9}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},aW=class r extends M{constructor(e){super();this.ideVersion="";m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.CascadeDataMetadata"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"ide_version",kind:"scalar",T:9}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},R1=class r extends M{constructor(e){super();this.enabled=!1;this.model=0;this.modelDisplayName="";this.agentVersion="";m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.LifeguardModeConfig"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"enabled",kind:"scalar",T:8},{no:2,name:"model",kind:"enum",T:m.getEnumType(fo)},{no:3,name:"model_display_name",kind:"scalar",T:9},{no:4,name:"agent_version",kind:"scalar",T:9}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},lW=class r extends M{constructor(e){super();this.modes={};m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.LifeguardConfig"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"modes",kind:"map",K:9,V:{kind:"message",T:R1}}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},dW=class r extends M{constructor(e){super();this.title="";this.dimensions=[];m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.ResponseDimensionGroup"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"title",kind:"scalar",T:9},{no:2,name:"dimensions",kind:"message",T:k1,repeated:!0}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},k1=class r extends M{constructor(e){super();this.dimension={case:void 0};this.uid="";m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.ResponseDimension"}static{this.fields=m.util.newFieldList(()=>[{no:2,name:"copyable_code",kind:"message",T:A1,oneof:"dimension"},{no:3,name:"metric",kind:"message",T:O1,oneof:"dimension"},{no:4,name:"cumulative_metric",kind:"message",T:L1,oneof:"dimension"},{no:5,name:"uid",kind:"scalar",T:9}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},A1=class r extends M{constructor(e){super();this.label="";this.value="";m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.ResponseDimensionCopyableCode"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"label",kind:"scalar",T:9},{no:2,name:"value",kind:"scalar",T:9}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},O1=class r extends M{constructor(e){super();this.label="";this.value="";m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.ResponseDimensionMetric"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"label",kind:"scalar",T:9},{no:2,name:"value",kind:"scalar",T:9}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}},L1=class r extends M{constructor(e){super();this.label="";this.value=0;this.tail="";this.pluralTail="";this.prefix="";m.util.initPartial(e,this)}static{this.runtime=m}static{this.typeName="exa.codeium_common_pb.ResponseDimensionCumulativeMetric"}static{this.fields=m.util.newFieldList(()=>[{no:1,name:"label",kind:"scalar",T:9},{no:2,name:"value",kind:"scalar",T:2},{no:3,name:"tail",kind:"scalar",T:9},{no:4,name:"plural_tail",kind:"scalar",T:9},{no:5,name:"prefix",kind:"scalar",T:9}])}static fromBinary(e,n){return new r().fromBinary(e,n)}static fromJson(e,n){return new r().fromJson(e,n)}static fromJsonString(e,n){return new r().fromJsonString(e,n)}static equals(e,n){return m.util.equals(r,e,n)}};var Ll={extensionId:"codeium.windsurf",statusBarItemIdSuffixes:{settings:"settings",planInfo:"settings.planInfo"},authProviderId:"windsurf_auth",commands:{LOGIN_WITH_REDIRECT:{id:"windsurf.login"},LOGIN_WITH_AUTH_TOKEN:{id:"windsurf.loginWithAuthToken"},LOGOUT:{id:"windsurf.logout"},PROVIDE_AUTH_TOKEN_TO_AUTH_PROVIDER:{id:"windsurf.provideAuthTokenToAuthProvider"},CANCEL_LOGIN:{id:"windsurf.cancelLogin"},IMPORT_VS_CODE_SETTINGS:{id:"windsurf.importVSCodeSettings"},IMPORT_VS_CODE_EXTENSIONS:{id:"windsurf.importVSCodeExtensions"},IMPORT_VS_CODE_RECENT_WORKSPACES:{id:"windsurf.importVSCodeRecentWorkspaces"},IMPORT_CURSOR_SETTINGS:{id:"windsurf.importCursorSettings"},IMPORT_CURSOR_EXTENSIONS:{id:"windsurf.importCursorExtensions"},IMPORT_WINDSURF_SETTINGS:{id:"windsurf.importWindsurfSettings"},IMPORT_WINDSURF_EXTENSIONS:{id:"windsurf.importWindsurfExtensions"},GENERATE_COMMIT_MESSAGE:{id:"windsurf.generateCommitMessage"},CANCEL_GENERATE_COMMIT_MESSAGE:{id:"windsurf.cancelGenerateCommitMessage"},ACCEPT_COMPLETION:{id:"windsurf.acceptCompletion"},OPEN_PROFILE:{id:"windsurf.openProfile"},OPEN_GENERIC_URL:{id:"windsurf.openGenericUrl"},OPEN_DOCS:{id:"windsurf.openDocs"},OPEN_COMMUNITY:{id:"windsurf.openCommunity"},OPEN_CHANGELOG:{id:"windsurf.openChangeLog"},OPEN_BILLING_PAGE:{id:"windsurf.openBillingPage"},OPEN_AUTO_REFILL_PAGE:{id:"windsurf.openAutoRefillPage"},OPEN_PRICING_PAGE:{id:"windsurf.openPricingPage"},OPEN_MCP_DOCS_PAGE:{id:"windsurf.openMcpDocsPage"},OPEN_REFERRAL_LINK:{id:"windsurf.openReferralLink"},GET_MCP_CATALOG:{id:"windsurf.getAvailableCascadePlugins"},GET_MCP_REGISTRY_SERVERS:{id:"windsurf.getMcpRegistryServers"},GET_CASCADE_PLUGIN_TEMPLATE:{id:"windsurf.getCascadePluginTemplate"},UPDATE_PLUGIN_INSTALLATION_COUNT:{id:"windsurf.updatePluginInstallationCount"},SEND_TEXT_TO_CHAT:{id:"windsurf.sendTextToChat"},SEND_TERMINAL_TO_CHAT:{id:"windsurf.sendTerminalToChat"},TOGGLE_CHAT_FOCUS:{id:"windsurf.prioritized.chat.open"},ADD_CURRENT_FILE_TO_CHAT:{id:"windsurf.addCurrentFileToChat"},TOGGLE_CHAT_FOCUS_FROM_PROBLEMS_PANEL:{id:"windsurf.prioritized.chat.openFromProblemsPanel"},TOGGLE_CHAT_FOCUS_FROM_PROBLEMS_PANEL_FOR_SINGLE_FILE:{id:"windsurf.prioritized.chat.openFromProblemsPanelForSingleFile"},ATTACH_LIFEGUARD_BUG_TO_CHAT:{id:"windsurf.lifeguard.attachBugToChat"},LEARN_FROM_LIFEGUARD_BUG:{id:"windsurf.lifeguard.learnFromBug"},RESTART_LS:{id:"windsurf.restartLanguageServer"},IMPORT_RULES_FROM_CURSOR:{id:"windsurf.importRulesFromCursor"},HAS_CURSOR_RULES:{id:"windsurf.hasCursorRules"},CREATE_WORKFLOW:{id:"windsurf.createWorkflow"},CREATE_GLOBAL_WORKFLOW:{id:"windsurf.createGlobalWorkflow"},CREATE_RULE:{id:"windsurf.createRule"},CREATE_SKILL:{id:"windsurf.createSkill"},CREATE_GLOBAL_SKILL:{id:"windsurf.createGlobalSkill"},TRIGGER_CASCADE:{id:"windsurf.triggerCascade"},EXECUTE_CASCADE_ACTION:{id:"windsurf.executeCascadeAction"},OPEN_NEW_CASCADE_CONVERSATION:{id:"windsurf.prioritized.chat.openNewConversation"},RESET_CURRENT_CASCADE_CONVERSATION:{id:"windsurf.cascade.resetCurrentConversation"},INITIALIZE_CASCADE:{id:"windsurf.initializeCascade"},CASCADE_CHAT_CLIENT_ACCEPT_CASCADE_STEP:{id:"windsurf.cascade.acceptCascadeStep"},CASCADE_CHAT_CLIENT_REJECT_CASCADE_STEP:{id:"windsurf.cascade.rejectCascadeStep"},COMMAND_OPEN:{id:"windsurf.prioritized.command.open",priority:1},COMMAND_ACCEPT:{id:"windsurf.command.accept"},COMMAND_REJECT:{id:"windsurf.command.reject"},COMMAND_NO_POPUP:{id:"windsurf.command.noPopup"},COMMAND_RESET_COMPLETIONS:{id:"windsurf.command.resetCompletions"},COMMAND_INCREMENT_GUEST_REQUESTS:{id:"windsurf.command.incrementGuestRequests"},COMMAND_SET_ACTIVE_EDITOR_URIS:{id:"windsurf.command.setActiveEditorUris"},TERMINAL_COMMAND_OPEN:{id:"windsurf.prioritized.terminalCommand.open"},TERMINAL_COMMAND_RUN:{id:"windsurf.terminalCommand.run"},TERMINAL_COMMAND_ACCEPT:{id:"windsurf.terminalCommand.accept"},TERMINAL_COMMAND_REJECT:{id:"windsurf.terminalCommand.reject"},DEV_UPDATE_DOC_AND_EDITOR:{id:"codeium_dev.updateDocAndEditor"},DEV_UPDATE_REQUEST_AND_COMPLETIONS:{id:"codeium_dev.updateRequestAndCompletions"},DEV_UPDATE_STATE:{id:"codeium_dev.updateState"},DEV_UPDATE_SUPERCOMPLETE_DETAILED_VIEW:{id:"codeium_dev.updateSupercompleteDetailedView"},DEV_UPDATE_TAB_DETAILED_VIEW:{id:"codeium_dev.updateTabDetailedView"},SUPERCOMPLETE_ACCEPT:{id:"windsurf.prioritized.supercompleteAccept",priority:1},SUPERCOMPLETE_FORCE:{id:"windsurf.forceSupercomplete"},SUPERCOMPLETE_ESCAPE:{id:"windsurf.prioritized.supercompleteEscape"},TAB_JUMP_ACCEPT:{id:"windsurf.prioritized.tabJumpAccept",priority:1},TAB_JUMP_ESCAPE:{id:"windsurf.prioritized.tabJumpEscape"},RELOAD_COMMAND:{id:"workbench.action.reloadWindow"},OPEN_DIFF_VIEW:{id:"windsurf.openDiffView"},OPEN_DIFF_ZONES:{id:"windsurf.openDiffZones"},EDIT_WITH_DIFF_ZONE:{id:"windsurf.editWithDiffZone"},EXPLAIN:{id:"windsurf.explain"},GENERATE_FUNCTION_DOCSTRING:{id:"windsurf.generateFunctionDocstring"},REFACTOR_FUNCTION:{id:"windsurf.refactorFunction"},REFACTOR_CODE_BLOCK:{id:"windsurf.refactorCodeBlock"},EXPLAIN_PROBLEM:{id:"windsurf.explainProblem"},RESET_PRODUCT_EDUCATION:{id:"windsurf.resetProductEducation"},FIRE_PRODUCT_ANALYTICS_EVENT:{id:"windsurf.fireProductAnalyticsEvent"},FIRE_LSP_TELEMETRY_EVENT:{id:"windsurf.fireLspTelemetryEvent"},CASCADE_ACCEPT_ALL_IN_FILE:{id:"windsurf.prioritized.cascadeAcceptAllInFile"},CASCADE_REJECT_ALL_IN_FILE:{id:"windsurf.prioritized.cascadeRejectAllInFile"},CASCADE_NAV_TO_NEXT_HUNK:{id:"windsurf.prioritized.cascadeFocusNextHunk"},CASCADE_NAV_TO_PREVIOUS_HUNK:{id:"windsurf.prioritized.cascadeFocusPreviousHunk"},CASCADE_NAV_TO_NEXT_FILE:{id:"windsurf.prioritized.cascadeFocusNextFile"},CASCADE_NAV_TO_PREVIOUS_FILE:{id:"windsurf.prioritized.cascadeFocusPreviousFile"},UPDATE_PLAN_INFO:{id:"windsurf.updatePlanInfo"},ACCEPT_FOCUSED_DIFFZONE_HUNK:{id:"windsurf.prioritized.cascadeAcceptFocusedHunk"},REJECT_FOCUSED_DIFFZONE_HUNK:{id:"windsurf.prioritized.cascadeRejectFocusedHunk"},OPEN_CUSTOMIZATIONS_TAB:{id:"windsurf.openCustomizationsTab"},OPEN_MCP_CONFIG_FILE:{id:"windsurf.openMcpConfigFile"},OPEN_RULES_EDUCATIONAL_LINK:{id:"windsurf.openRulesEducationalLink"},DOWNLOAD_DIAGNOSTICS:{id:"windsurf.downloadDiagnostics"},COPY_API_KEY:{id:"windsurf.copyApiKey"},GET_DIAGNOSTICS_INFO:{id:"windsurf.getDiagnosticInfo"},UPDATE_USER_SETTINGS:{id:"windsurf.updateUserSetting"},REFRESH_MCP_SERVERS:{id:"windsurf.refreshMcpServers"},OPEN_CONFIGURE_PLUGINS_PAGE:{id:"windsurf.openConfigurePluginsPage"},CASCADE_PRESS_MICROPHONE:{id:"windsurf.cascade.pressMicrophone"},CASCADE_TOGGLE_WRITE_CHAT_MODE:{id:"windsurf.prioritized.chat.toggleWriteChatMode"},CASCADE_OPEN_AGENT_PICKER:{id:"windsurf.cascade.openAgentPicker"},CASCADE_TOGGLE_MODEL_SELECTOR:{id:"windsurf.cascade.toggleModelSelector"},CASCADE_SWITCH_TO_NEXT_MODEL:{id:"windsurf.cascade.switchToNextModel"},CASCADE_TOGGLE_WORKTREE:{id:"windsurf.cascade.toggleWorktree"},CASCADE_TOGGLE_AGENT_SELECTOR:{id:"windsurf.cascade.toggleAgentSelector"},TAB_REPORTING:{id:"windsurf.tabReporting"},OPEN_BROWSER:{id:"windsurf.openBrowser"},GET_BROWSER_INSTALLATION_STATUS:{id:"windsurf.getBrowserInstallationStatus"},UPDATE_CONVERSATION_SUMMARIES:{id:"windsurf.updateConversationSummaries"},MANAGE_ANNOTATIONS:{id:"windsurf.cascade.manageAnnotations"},START_WORKTREE_LANGUAGE_SERVER:{id:"windsurf.setWorktreeLanguageServer"},DELETE_WORKTREE_LANGUAGE_SERVER:{id:"windsurf.deleteWorktreeLanguageServer"},RENAME_WORKTREE_BRANCH:{id:"windsurf.renameWorktreeBranch"},CREATE_VIBE_AND_REPLACE_SESSION:{id:"windsurf.createVibeAndReplaceSession"},VIBE_AND_REPLACE:{id:"windsurf.vibeAndReplace"},CANCEL_VIBE_AND_REPLACE:{id:"windsurf.cancelVibeAndReplace"},SYNCED_STATE_UPDATE_FROM_CHAT:{id:"windsurf.syncedState.updateFromChat"},SYNCED_STATE_UPDATE_TO_CHAT:{id:"windsurf.syncedState.updateToChat"},SET_WORKSPACE_CASCADE_MAP:{id:"windsurf.setWorkspaceCascadeMap"}},contextKeys:{CAN_ACCEPT_OR_REJECT_COMMAND:{id:"windsurf.canAcceptOrRejectCommand"},CAN_TRIGGER_TERMINAL_COMMAND_ACTION:{id:"windsurf.canTriggerTerminalCommandAction"},CAN_ACCEPT_OR_REJECT_ALL_CASCASDE_EDITS_IN_FILE:{id:"windsurf.canAcceptOrRejectAllCascadeEditsInFile"},CAN_ACCEPT_OR_REJECT_FOCUSED_DIFFZONE_HUNK:{id:"windsurf.canAcceptOrRejectFocusedHunk"},CASCADE_BAR_VISIBLE:{id:"windsurf.cascadeBarVisible"},IS_LOGGED_IN:{id:"windsurf.isLoggedIn"},IS_ABLE_TO_CUSTOMIZE_APP_ICON:{id:"windsurf.isAbleToCustomizeAppIcon"},IS_WINDSURF_NEXT:{id:"windsurf.isWindsurfNext"},HAS_MCP_ACCESS:{id:"windsurf.isNotTeamsNorEnterprise"},COMPONENT_SHARING_ENABLED:{id:"windsurf.componentSharingEnabled"},BROWSER_FEATURE_ENABLED:{id:"windsurf.browserFeatureEnabled"},IS_REMOTE_SSH:{id:"windsurf.isRemoteSsh"},BROWSER_EXPERIMENTAL_FEATURES_ENABLED:{id:"windsurf.browserExperimentalFeaturesEnabled"},CASCADE_PANEL_VISIBLE:{id:"windsurf.cascadePanel.visible"},CASCADE_PANEL_FOCUSED:{id:"windsurf.cascadePanel.focused"},CASCADE_MAIN_PANEL_FOCUSED:{id:"windsurf.cascadeMainPanel.focused"},DEEPWIKI_PANEL_FOCUSED:{id:"windsurf.deepwikiPanel.focused"}},blacklistedExtensionIds:["codeium.codeium","codeium.codeium-enterprise-updater","codeium.codeium-enterprise","sourcegraph.cody-ai","github.copilot","github.copilot-chat","tabnine.tabnine-vscode","amazonwebservices.amazon-q-vscode","googlecloudtools.cloudcode","supermaven.supermaven","continue.continue","ms-vscode-remote.remote-ssh","ms-vscode-remote.remote-ssh-editor","amazonwebservices.codewhisperer-for-command-line-companion","ms-vscode-remote.remote-wsl","ms-vsliveshare.vsliveshare","ms-python.vscode-pylance","ms-vscode-remote.remote-containers","visualstudioexptteam.vscodeintellicode","jeanp413.open-remote-ssh","miguelsolorio.symbols","robbowen.synthwave-vscode","enkia.tokyo-night","github.codespaces"],blacklistedPublishers:["anysphere"],customEditorDecorations:{DIFF_INSERTIONS_ID:"windsurf.diff.insertionText"},windsurfAnalyticEvents:{WINDSURF_EDITOR_READY:bt(251,dt),WINDSURF_EXTENSION_START:bt(253,dt),LANDING_PAGE:bt(20,dt),CAROUSEL_PAGE:bt(21,dt),CAROUSEL_MIGRATION_PROMPT:bt(23,dt),CAROUSEL_MIGRATION:bt(24,dt),CAROUSEL_CHOOSE_KEYBINDINGS:bt(22,dt),CAROUSEL_CHOOSE_THEME:bt(35,dt),CAROUSEL_AUTH:bt(25,dt),CAROUSEL_MANUAL_AUTH:bt(26,dt),SEND_OFF_PAGE:bt(27,dt),CURSOR_DETECTED:bt(39,dt),VSCODE_DETECTED:bt(40,dt),JETBRAINS_DETECTED:bt(153,dt),WS_CUSTOM_APP_ICON_MODAL_OPEN:bt(55,dt),WS_CUSTOM_APP_ICON_SELECT_CLASSIC:bt(56,dt),WS_CUSTOM_APP_ICON_SELECT_CLASSIC_LIGHT:bt(57,dt),WS_CUSTOM_APP_ICON_SELECT_RETRO:bt(58,dt),WS_CUSTOM_APP_ICON_SELECT_BLUEPRINT:bt(59,dt),WS_CUSTOM_APP_ICON_SELECT_HAND_DRAWN:bt(60,dt),WS_CUSTOM_APP_ICON_SELECT_SUNSET:bt(61,dt),WS_CUSTOM_APP_ICON_SELECT_VALENTINE:bt(66,dt),WS_CUSTOM_APP_ICON_SELECT_PIXEL_SURF:bt(82,dt),WS_SKIPPED_ONBOARDING:bt(69,dt),WS_SETTINGS_PAGE_OPEN:bt(72,dt),WS_SETTINGS_PAGE_OPEN_WITH_SETTING_FOCUS:bt(73,dt),WS_SETTINGS_CHANGED_BY_USER:bt(74,dt),EMPTY_WORKSPACE_PAGE_OPENED:bt(209,dt),EMPTY_WORKSPACE_PAGE_RECENT_FOLDERS_CLICKED:bt(210,dt),EMPTY_WORKSPACE_PAGE_OPEN_FOLDER_CLICKED:bt(211,dt),EMPTY_WORKSPACE_PAGE_GENERATE_PROJECT_CLICKED:bt(212,dt),CASCADE_VIEW_LOADED:bt(119,dt),CASCADE_PLUGIN_PAGE_OPENED:bt(129,dt),CASCADE_PLUGIN_INSTALLED:bt(130,dt),CASCADE_PLUGIN_DISABLED:bt(131,dt),CASCADE_PLUGIN_ENABLED:bt(132,dt),CASCADE_PLUGIN_INSTALLATION_ERROR:bt(133,dt),CASCADE_PLUGIN_TOOL_ENABLED:bt(134,dt),CASCADE_PLUGIN_TOOL_DISABLED:bt(135,dt),VIBE_AND_REPLACE_TOGGLED:"VIBE_AND_REPLACE_TOGGLED",VIBE_AND_REPLACE_MODEL_CHANGED:"VIBE_AND_REPLACE_MODEL_CHANGED",VIBE_AND_REPLACE_STARTED:"VIBE_AND_REPLACE_STARTED",VIBE_AND_REPLACE_REQUESTED:"VIBE_AND_REPLACE_REQUESTED",VIBE_AND_REPLACE_SUCCEEDED:"VIBE_AND_REPLACE_SUCCEEDED",VIBE_AND_REPLACE_CANCELED:"VIBE_AND_REPLACE_CANCELED",VIBE_AND_REPLACE_ERRORED:"VIBE_AND_REPLACE_ERRORED",DEEPWIKI_ARTICLE_OPENED:"DEEPWIKI_ARTICLE_OPENED",DEEPWIKI_READ_MORE_CLICKED:"DEEPWIKI_READ_MORE_CLICKED",DEEPWIKI_SUMMARY_LOADED:"DEEPWIKI_SUMMARY_LOADED",DEEPWIKI_CMD_SHIFT_CLICK:"DEEPWIKI_CMD_SHIFT_CLICK",DEEPWIKI_SEND_TO_CASCADE_CLICKED:"DEEPWIKI_SEND_TO_CASCADE_CLICKED",DEEPWIKI_HOME_PANE_OPENED:"DEEPWIKI_HOME_PANE_OPENED",DEEPWIKI_HOME_PANE_CLOSED:"DEEPWIKI_HOME_PANE_CLOSED",LANDING_PAGE_VIEWED:"WS_ONBOARDING_LANDING_PAGE_VIEWED",SETUP_PAGE_VIEWED:"WS_ONBOARDING_SETUP_PAGE_VIEWED",THEMES_PAGE_VIEWED:"WS_ONBOARDING_THEMES_PAGE_VIEWED",AUTH_PAGE_VIEWED:"WS_ONBOARDING_AUTH_PAGE_VIEWED",LANDING_PAGE_NEXT:"WS_ONBOARDING_LANDING_PAGE_NEXT_CLICKED",SETUP_PAGE_NEXT:"WS_ONBOARDING_SETUP_PAGE_NEXT_CLICKED",THEMES_PAGE_NEXT:"WS_ONBOARDING_THEMES_PAGE_NEXT_CLICKED",AUTH_LOGIN:"WS_ONBOARDING_AUTH_LOGIN_CLICKED",AUTH_SIGNUP:"WS_ONBOARDING_AUTH_SIGNUP_CLICKED",AUTH_HAVING_TROUBLE:"WS_ONBOARDING_AUTH_HAVING_TROUBLE_CLICKED",AUTH_SUBMIT:"WS_ONBOARDING_AUTH_SUBMIT_CLICKED",ONBOARDING_FINISHED:"WS_ONBOARDING_FINISHED",KEYBINDING_VSCODE_SELECTED:"WS_ONBOARDING_KEYBINDING_VSCODE_SELECTED",KEYBINDING_VIM_SELECTED:"WS_ONBOARDING_KEYBINDING_VIM_SELECTED",IMPORT_VSCODE_SELECTED:"WS_ONBOARDING_IMPORT_VSCODE_SELECTED",IMPORT_CURSOR_SELECTED:"WS_ONBOARDING_IMPORT_CURSOR_SELECTED",IMPORT_WINDSURF_SELECTED:"WS_ONBOARDING_IMPORT_WINDSURF_SELECTED",IMPORT_START_FRESH_SELECTED:"WS_ONBOARDING_IMPORT_START_FRESH_SELECTED",INSTALL_WINDSURF_TERMINAL_COMMAND_CHECKED:"WS_ONBOARDING_INSTALL_WINDSURF_TERMINAL_COMMAND_CHECKED",INSTALL_WINDSURF_TERMINAL_COMMAND_UNCHECKED:"WS_ONBOARDING_INSTALL_WINDSURF_TERMINAL_COMMAND_UNCHECKED",INSTALL_WINDSURF_NEXT_TERMINAL_COMMAND_CHECKED:"WS_ONBOARDING_INSTALL_WINDSURF_NEXT_TERMINAL_COMMAND_CHECKED",INSTALL_WINDSURF_NEXT_TERMINAL_COMMAND_UNCHECKED:"WS_ONBOARDING_INSTALL_WINDSURF_NEXT_TERMINAL_COMMAND_UNCHECKED",THEME_LIGHT_SELECTED:"WS_ONBOARDING_THEME_LIGHT_SELECTED",THEME_DARK_SELECTED:"WS_ONBOARDING_THEME_DARK_SELECTED",THEME_MONOKAI_SELECTED:"WS_ONBOARDING_THEME_MONOKAI_SELECTED",THEME_OTHER_SELECTED:"WS_ONBOARDING_THEME_OTHER_SELECTED",FEATURE_NOTIFICATION_MODAL_DISMISSED:"FEATURE_NOTIFICATION_MODAL_DISMISSED",FEATURE_NOTIFICATION_MODAL_PRIMARY_BUTTON_PRESSED:"FEATURE_NOTIFICATION_MODAL_PRIMARY_BUTTON_PRESSED"},errorCodes:{GENERIC_ERROR:{code:0,description:"Encountered an error"},AUTH_INVALID_AUTH_TOKEN:{code:1,description:"Invalid auth token"},GENERIC_LS_FAILURE:{code:2,description:"Server errored internally"},AUTH_MALFORMED_LS_RESPONSE:{code:3,description:"Server returned an invalid API key or name"}},userSettingsFilePathSegments:["user_settings.pb"],mcpConfigFilePathSegments:["mcp_config.json"],globalMemoriesPathSegments:["memories","global_rules.md"],localRulesFilePathSegments:[".windsurfrules"],appDeploymentConfigFilePathSegments:["windsurf_deployment.yaml"],cascadePlanDirPathSegments:["brain"]};function bt(r,t){return Object.keys(t).find(o=>t[o]===r)}var LW=Ll.commands;var UL=N("windsurfFileSystemService"),Lh=class{constructor(t,e,n,o){this._uriIdentityService=t;this._productService=e;this._workspaceContextService=n;this._configurationService=o;this._homeDir=null;this._homeDirResolvedResolver=()=>{};this.homeDirResolved=new Promise(i=>{this._homeDirResolvedResolver=i})}get homeDir(){return this._homeDir}registerHomeDirProvider(t){t.userHome().then(e=>{this._homeDir=e,this._homeDirResolvedResolver(e)})}isMcpConfigFile(t){if(this._homeDir===null)return!1;let e=E.joinPath(this._homeDir,...this.codeiumDirPathSegments,...Ll.mcpConfigFilePathSegments);return this._uriIdentityService.extUri.isEqualOrParent(t,e)}isLocalRulesFile(t){let e=this._workspaceContextService.getWorkspace();if(!e.folders.length)return!1;let n=e.folders[0].uri;if(!n)return!1;let o=this._uriIdentityService.extUri.joinPath(n,...Ll.localRulesFilePathSegments);return this._uriIdentityService.extUri.isEqualOrParent(t,o)}isGlobalRulesFile(t){if(this._homeDir===null)return!1;let e=this._uriIdentityService.extUri.joinPath(this._homeDir,...this.codeiumDirPathSegments,...Ll.globalMemoriesPathSegments);return!!this._uriIdentityService.extUri.isEqualOrParent(t,e)}isProjectRulesFile(t){let e=this._workspaceContextService.getWorkspace();return!e.folders.length||!t.path.replace(/\\/g,"/").includes("/.windsurf/rules/")?!1:e.folders.some(o=>this._uriIdentityService.extUri.isEqualOrParent(t,o.uri))}isAppDeploymentConfigFile(t){let e=this._workspaceContextService.getWorkspace();if(!e.folders.length)return!1;let n=e.folders[0].uri;if(!n)return!1;let o=this._uriIdentityService.extUri.joinPath(n,...Ll.appDeploymentConfigFilePathSegments);return this._uriIdentityService.extUri.isEqualOrParent(t,o)}isLocalWorkflowFile(t){let e=this._workspaceContextService.getWorkspace();return!e.folders.length||!t.path.replace(/\\/g,"/").includes("/.windsurf/workflows/")?!1:e.folders.some(o=>this._uriIdentityService.extUri.isEqualOrParent(t,o.uri))}isGlobalWorkflowFile(t){if(this._homeDir===null)return!1;let e=this._uriIdentityService.extUri.joinPath(this._homeDir,...this.codeiumDirPathSegments,"global_workflows");return this._uriIdentityService.extUri.isEqualOrParent(t,e)}_isClaudeCodeConfigReadEnabled(){return this._configurationService.getValue("windsurf.cascade.readClaudeCodeConfig")!==!1}isLocalSkillFile(t){let e=this._workspaceContextService.getWorkspace();if(!e.folders.length)return!1;let n=t.path.replace(/\\/g,"/"),o=this._isClaudeCodeConfigReadEnabled();return(n.includes("/.windsurf/skills/")||o&&n.includes("/.claude/skills/")||n.includes("/.agents/skills/"))&&n.endsWith("/SKILL.md")?e.folders.some(s=>this._uriIdentityService.extUri.isEqualOrParent(t,s.uri)):!1}isGlobalSkillFile(t){if(this._homeDir===null||!t.path.replace(/\\/g,"/").endsWith("/SKILL.md"))return!1;let n=this._uriIdentityService.extUri.joinPath(this._homeDir,...this.codeiumDirPathSegments,"skills");if(this._uriIdentityService.extUri.isEqualOrParent(t,n))return!0;if(this._isClaudeCodeConfigReadEnabled()){let i=this._uriIdentityService.extUri.joinPath(this._homeDir,".claude","skills");if(this._uriIdentityService.extUri.isEqualOrParent(t,i))return!0}let o=this._uriIdentityService.extUri.joinPath(this._homeDir,".agents","skills");return this._uriIdentityService.extUri.isEqualOrParent(t,o)}isPlanFile(t){let e=t.path.replace(/\\/g,"/");if(!e.includes("/.windsurf/plans/")||!e.endsWith(".md"))return!1;if(this._homeDir!==null){let o=this._uriIdentityService.extUri.joinPath(this._homeDir,".windsurf","plans");if(this._uriIdentityService.extUri.isEqualOrParent(t,o))return!0}let n=this._workspaceContextService.getWorkspace();return n.folders.length?n.folders.some(o=>this._uriIdentityService.extUri.isEqualOrParent(t,o.uri)):!1}get codeiumDirPathSegments(){let t="windsurf";switch(this._productService.quality){case"insider":t="windsurf-insiders";break;case"next":t="windsurf-next";break}return[".codeium",t]}getWorktreeInfo(t){if(this._homeDir===null)return null;let e=E.joinPath(this._homeDir,".windsurf","worktrees");if(!this._uriIdentityService.extUri.isEqualOrParent(t,e))return null;let n=e.path,s=t.path.substring(n.length+1).split("/");if(s.length<2)return null;let a=s[0],l=s[1],d=s.slice(2).join("/"),c=`${n}/${a}/${l}`;return{worktreeName:a,worktreeRootPath:c,relativePath:d}}};Lh=L([P(0,Pu),P(1,Su),P(2,Di),P(3,to)],Lh);rt(UL,Lh,1);var yLe=N("windsurfUserSettingsService"),MW=N("windsurfConfigurationFileWatcher"),ELe=N("windsurfUserSettingsUpdater");function NW(r){return r.scheme!==X.file&&r.scheme!==X.vscodeRemote}function Mz(r){if(r.folders.length)return r.folders.every(t=>NW(t.uri))?r.folders[0].uri:void 0;if(r.configuration&&NW(r.configuration))return r.configuration}function UW(r){return Mz(r)?.scheme}var lm=N("remoteAgentService"),PLe=new class{constructor(){this.maxSampleCount=5;this.sampleDelay=2e3;this.initial=[];this.maxInitialCount=3;this.average=[];this.maxAverageCount=100;this.highLatencyMultiple=2;this.highLatencyMinThreshold=500;this.highLatencyMaxThreshold=1500;this.lastMeasurement=void 0}get latency(){return this.lastMeasurement}async measure(r){let t=1/0;for(let n=0;n<this.maxSampleCount;n++){let o=await r.getRoundTripTime();if(o===void 0)return;t=Math.min(t,o/2),await Qn(this.sampleDelay)}this.average.push(t),this.average.length>this.maxAverageCount&&this.average.shift();let e;return this.initial.length<this.maxInitialCount?this.initial.push(t):e=this.initial.reduce((n,o)=>n+o,0)/this.initial.length,this.lastMeasurement={initial:e,current:t,average:this.average.reduce((n,o)=>n+o,0)/this.average.length,high:typeof e>"u"?!1:t>this.highLatencyMaxThreshold||t>this.highLatencyMinThreshold&&t>e*this.highLatencyMultiple},this.lastMeasurement}};var FW=N("pathService"),dm=class{constructor(t,e,n,o,i,s,a){this.localUserHome=t;this.remoteAgentService=e;this.environmentService=n;this.contextService=o;this.fileWatchService=i;this.windsurfFileSystemService=s;this.chiselConfigService=a;this.resolveOS=(async()=>(await this.remoteAgentService.getEnvironment())?.os||xi)(),this.resolveUserHome=(async()=>{let l=await this.remoteAgentService.getEnvironment();return this.maybeUnresolvedUserHome=l?.userHome??t})(),this.fileWatchService.registerPathService(this),this.windsurfFileSystemService.registerHomeDirProvider(this),this.chiselConfigService.registerPathService(this)}hasValidBasename(t,e,n){return typeof e=="string"||typeof e>"u"?this.resolveOS.then(o=>this.doHasValidBasename(t,o,e)):this.doHasValidBasename(t,e,n)}doHasValidBasename(t,e,n){return t.scheme===X.file||t.scheme===X.vscodeRemote?wU(n??tn(t),e===1):!0}get defaultUriScheme(){return dm.findDefaultUriScheme(this.environmentService,this.contextService)}static findDefaultUriScheme(t,e){if(t.remoteAuthority)return X.vscodeRemote;let n=UW(e.getWorkspace());if(n)return n;let o=e.getWorkspace().folders[0];if(o)return o.uri.scheme;let i=e.getWorkspace().configuration;return i?i.scheme:X.file}userHome(t){return t?.preferLocal?this.localUserHome:this.resolveUserHome}get resolvedUserHome(){return this.maybeUnresolvedUserHome}get path(){return this.resolveOS.then(t=>t===1?ln:qe)}targetOS(){return this.resolveOS}async fileURI(t){let e="";if(await this.resolveOS===1&&(t=t.replace(/\\/g,"/")),t[0]==="/"&&t[1]==="/"){let o=t.indexOf("/",2);o===-1?(e=t.substring(2),t="/"):(e=t.substring(2,o),t=t.substring(o)||"/")}return E.from({scheme:X.file,authority:e,path:t,query:"",fragment:""})}};dm=L([P(1,lm),P(2,CI),P(3,Di),P(4,MW),P(5,UL),P(6,QB)],dm);function Uz(r){return typeof r=="object"&&"uri"in r&&"pattern"in r}var Mh=class{constructor(t,e,n,o,i,s){this.configurationService=t;this.workspaceContextService=e;this.editorGroupsService=n;this.logService=o;this.pathService=i;this.uriIdentityService=s}aiText(t,e,n={}){return{...this.commonQuery(e?.map(Zf),n),type:3,contentPattern:t}}text(t,e,n={}){t=this.getContentPattern(t,n);let o=this.configurationService.getValue(),i=e&&e.some(a=>!this.configurationService.getValue({resource:a}).search.useRipgrep);return{...this.commonQuery(e?.map(Zf),n),type:2,contentPattern:t,previewOptions:n.previewOptions,maxFileSize:n.maxFileSize,usePCRE2:o.search.usePCRE2||i||!1,surroundingContext:n.surroundingContext,userDisabledExcludesAndIgnoreFiles:n.disregardExcludeSettings&&n.disregardIgnoreFiles}}getContentPattern(t,e){let n=this.configurationService.getValue();t.isRegExp&&(t.pattern=t.pattern.replace(/\r?\n/g,"\\n"));let o={...t,wordSeparators:n.editor.wordSeparators};return this.isCaseSensitive(t,e)&&(o.isCaseSensitive=!0),this.isMultiline(t)&&(o.isMultiline=!0),e.notebookSearchConfig?.includeMarkupInput&&(o.notebookInfo||(o.notebookInfo={}),o.notebookInfo.isInNotebookMarkdownInput=e.notebookSearchConfig.includeMarkupInput),e.notebookSearchConfig?.includeMarkupPreview&&(o.notebookInfo||(o.notebookInfo={}),o.notebookInfo.isInNotebookMarkdownPreview=e.notebookSearchConfig.includeMarkupPreview),e.notebookSearchConfig?.includeCodeInput&&(o.notebookInfo||(o.notebookInfo={}),o.notebookInfo.isInNotebookCellInput=e.notebookSearchConfig.includeCodeInput),e.notebookSearchConfig?.includeOutput&&(o.notebookInfo||(o.notebookInfo={}),o.notebookInfo.isInNotebookCellOutput=e.notebookSearchConfig.includeOutput),o}file(t,e={}){return{...this.commonQuery(t,e),type:1,filePattern:e.filePattern?e.filePattern.trim():e.filePattern,exists:e.exists,sortByScore:e.sortByScore,cacheKey:e.cacheKey,shouldGlobMatchFilePattern:e.shouldGlobSearch}}handleIncludeExclude(t,e){if(!t)return{};if(Array.isArray(t)){if(t=t.filter(n=>n.length>0).map(cx),!t.length)return{}}else t=cx(t);return e?this.parseSearchPaths(t):{pattern:FL(...Array.isArray(t)?t:[t])}}commonQuery(t=[],e={}){let n=Array.isArray(e.excludePattern)?e.excludePattern.map(c=>c.pattern).flat():e.excludePattern;n=n?.length===1?n[0]:n;let o=this.handleIncludeExclude(e.includePattern,e.expandPatterns),i=this.handleIncludeExclude(n,e.expandPatterns),s=t.length>1,a=(o.searchPaths&&o.searchPaths.length?o.searchPaths.map(c=>this.getFolderQueryForSearchPath(c,e,i)):t.map(c=>this.getFolderQueryForRoot(c,e,i,s))).filter(c=>!!c),l={_reason:e._reason,folderQueries:a,usingSearchPaths:!!(o.searchPaths&&o.searchPaths.length),extraFileResources:e.extraFileResources,excludePattern:i.pattern,includePattern:o.pattern,ignoreGlobCase:e.ignoreGlobCase,onlyOpenEditors:e.onlyOpenEditors,maxResults:e.maxResults,onlyFileScheme:e.onlyFileScheme};if(e.onlyOpenEditors){let c=pt(this.editorGroupsService.groups.flatMap(g=>g.editors.map(I=>I.resource)));this.logService.trace("QueryBuilder#commonQuery - openEditor URIs",JSON.stringify(c));let u=c.filter(g=>Ok(l,g.fsPath)),f=this.commonQueryFromFileList(u);return this.logService.trace("QueryBuilder#commonQuery - openEditor Query",JSON.stringify(f)),{...l,...f}}let d=e.extraFileResources&&e.extraFileResources.filter(c=>Ok(l,c.fsPath));return l.extraFileResources=d&&d.length?d:void 0,l}commonQueryFromFileList(t){let e=[],n=new et,o={},i=!1;return t.forEach(s=>{if(s.scheme===X.walkThrough)return;if(FU(s)){let l=this.workspaceContextService.getWorkspaceFolder(s)?.uri??this.uriIdentityService.extUri.dirname(s),d=n.get(l);d||(i=!0,d={folder:l,includePattern:{}},e.push(d),n.set(l,d));let c=gs(l.fsPath,s.fsPath);Ur(d.includePattern)[HW(c.replace(/\\/g,"/"))]=!0}else s.fsPath&&(i=!0,o[HW(s.fsPath)]=!0)}),{folderQueries:e,includePattern:o,usingSearchPaths:!0,excludePattern:i?void 0:{"**/*":!0}}}isCaseSensitive(t,e){if(e.isSmartCase){if(t.isRegExp){if(B_(t.pattern,!0))return!0}else if(B_(t.pattern))return!0}return!!t.isCaseSensitive}isMultiline(t){return t.isMultiline||t.isRegExp&&pA(t.pattern)||t.pattern.indexOf(`
`)>=0?!0:!!t.isMultiline}parseSearchPaths(t){let e=u=>fs(u)||/^\.\.?([\/\\]|$)/.test(u),o=(Array.isArray(t)?t:Hz(t)).map(u=>{let f=this.pathService.resolvedUserHome;return f?JD(u,f.scheme===X.file?f.fsPath:f.path):u}),i=Iv(o,u=>e(u)?"searchPaths":"exprSegments"),s=(i.exprSegments||[]).map(u=>ld(u,"/")).map(u=>ld(u,"\\")).map(u=>(u[0]==="."&&(u="*"+u),Bz(u))),a={},l=this.expandSearchPathPatterns(i.searchPaths||[]);l&&l.length&&(a.searchPaths=l);let d=s.flat(),c=FL(...d);return c&&(a.pattern=c),a}getExcludesForFolder(t,e){return e.disregardExcludeSettings?void 0:IB(t,!e.disregardSearchExcludeSettings)}expandSearchPathPatterns(t){if(!t||!t.length)return[];let e=t.flatMap(o=>{let{pathPortion:i,globPortion:s}=Fz(o);return s&&(s=HL(s)),this.expandOneSearchPath(i).flatMap(l=>this.resolveOneSearchPathPattern(l,s))}),n=new Map;return e.forEach(o=>{let i=o.searchPath.toString(),s=n.get(i);s?o.pattern&&(s.pattern=s.pattern||{},s.pattern[o.pattern]=!0):n.set(i,{searchPath:o.searchPath,pattern:o.pattern?FL(o.pattern):void 0})}),Array.from(n.values())}expandOneSearchPath(t){if(fs(t)){let e=this.workspaceContextService.getWorkspace().folders;return e[0]&&e[0].uri.scheme!==X.file?[{searchPath:e[0].uri.with({path:t})}]:[{searchPath:E.file(fr(t))}]}if(this.workspaceContextService.getWorkbenchState()===2){let e=this.workspaceContextService.getWorkspace().folders[0].uri;if(t=cx(t),t.startsWith("../")||t===".."){let o=qe.resolve(e.path,t);return[{searchPath:e.with({path:o})}]}let n=HL(t);return[{searchPath:e,pattern:n}]}else{if(t==="./"||t===".\\")return[];{let e=t.replace(/^\.[\/\\]/,""),o=this.workspaceContextService.getWorkspace().folders.map(i=>{let s=e.match(new RegExp(`^${hr(i.name)}(?:/(.*)|$)`));return s?{match:s,folder:i}:null}).filter(lo);if(o.length)return o.map(i=>{let s=i.match[1];return{searchPath:i.folder.uri,pattern:s&&HL(s)}});{let i=t.match(/\.[\/\\](.+)[\/\\]?/),s=i?i[1]:t,a=p(16871,null,s);throw new Error(a)}}}}resolveOneSearchPathPattern(t,e){let n=t.pattern&&e?`${t.pattern}/${e}`:t.pattern||e,o=[{searchPath:t.searchPath,pattern:n}];return n&&!n.endsWith("**")&&o.push({searchPath:t.searchPath,pattern:n+"/**"}),o}getFolderQueryForSearchPath(t,e,n){let o=this.getFolderQueryForRoot(Zf(t.searchPath),e,n,!1);return o?{...o,includePattern:t.pattern}:null}getFolderQueryForRoot(t,e,n,o){let i,s=E.isUri(t)?t:t.uri,a=e.excludePattern?.map(g=>{let I=e.excludePattern&&Uz(g)?g.uri:void 0;return!I||!(E.isUri(t)&&this.uriIdentityService.extUri.isEqual(t,I))?I:void 0});if(a?.length||(a=[void 0]),n.searchPaths){let g=n.searchPaths.filter(I=>Wr(I.searchPath,s))[0];if(g&&!g.pattern)return null;g&&(i=g.pattern)}let l=this.configurationService.getValue({resource:s}),c={...this.getExcludesForFolder(l,e)||{},...i||{}},u=E.isUri(t)?tn(t):t.name,f=a.map(g=>Object.keys(c).length>0?{folder:g,pattern:c}:void 0).filter(g=>g);return{folder:s,folderName:o?u:void 0,excludePattern:f,fileEncoding:l.files&&l.files.encoding,disregardIgnoreFiles:typeof e.disregardIgnoreFiles=="boolean"?e.disregardIgnoreFiles:!l.search.useIgnoreFiles,disregardGlobalIgnoreFiles:typeof e.disregardGlobalIgnoreFiles=="boolean"?e.disregardGlobalIgnoreFiles:!l.search.useGlobalIgnoreFiles,disregardParentIgnoreFiles:typeof e.disregardParentIgnoreFiles=="boolean"?e.disregardParentIgnoreFiles:!l.search.useParentIgnoreFiles,ignoreSymlinks:typeof e.ignoreSymlinks=="boolean"?e.ignoreSymlinks:!l.search.followSymlinks,ignoreGlobCase:e.ignoreGlobCase}}};Mh=L([P(0,to),P(1,Di),P(2,dH),P(3,be),P(4,FW),P(5,Pu)],Mh);function Fz(r){let t=r.match(/[\*\{\}\(\)\[\]\?]/);if(t){let e=t.index,n=r.substr(0,e).match(/[/|\\][^/\\]*$/);if(n){let o=r.substr(0,n.index);return o.match(/[/\\]/)||(o+="/"),{pathPortion:o,globPortion:r.substr((n.index||0)+1)}}}return{pathPortion:r}}function FL(...r){return r.length?r.reduce((t,e)=>(t[e]=!0,t),Object.create(null)):void 0}function Hz(r){return ku(r,",").map(t=>t.trim()).filter(t=>!!t.length)}function Bz(r){return[`**/${r}/**`,`**/${r}`].map(e=>e.replace(/\*\*\/\*\*/g,"**"))}function cx(r){return r.replace(/\\/g,"/")}function HL(r){return cx(r).replace(/^\.\//,"").replace(/\/+$/g,"")}function HW(r){return r.replace(/([?*[\]])/g,"[$1]")}var Vz=7e3;function VW(r,t){let e=t.activationEvents;if(!e)return Promise.resolve(void 0);let n=[],o=[];for(let c of e)if(/^workspaceContains:/.test(c)){let u=c.substr(18);u.indexOf("*")>=0||u.indexOf("?")>=0||r.forceUsingSearch?o.push(u):n.push(u)}if(n.length===0&&o.length===0)return Promise.resolve(void 0);let{promise:i,resolve:s}=eP(),a=c=>s({activationEvent:c}),l=Promise.all(n.map(c=>Wz(r,c,a))).then(()=>{}),d=$z(r,t.identifier,o,a);return Promise.all([l,d]).then(()=>{s(void 0)}),i}async function Wz(r,t,e){for(let n of r.folders)if(await r.exists(Qt(E.revive(n),t))){e(`workspaceContains:${t}`);return}}async function $z(r,t,e,n){if(e.length===0)return Promise.resolve(void 0);let o=new We,i=r.checkExists(r.folders,e,o.token),s=setTimeout(async()=>{o.cancel(),r.logService.info(`Not activating extension '${t.value}': Timed out while searching for 'workspaceContains' pattern ${e.join(",")}`)},Vz),a=!1;try{a=await i}catch(l){Fn(l)||Ct(l)}o.dispose(),clearTimeout(s),a&&n(`workspaceContains:${e.join(",")}`)}var cm=class{constructor(t){this._onDidChangePassword=new D;this.onDidChangePassword=this._onDidChangePassword.event;this._proxy=t.getProxy(V.MainThreadSecretState)}async $onDidChangePassword(t){this._onDidChangePassword.fire(t)}get(t,e){return this._proxy.$getPassword(t,e)}store(t,e,n){return this._proxy.$setPassword(t,e,n)}delete(t,e){return this._proxy.$deletePassword(t,e)}keys(t){return this._proxy.$getKeys(t)}},um=N("IExtHostSecretState");var ux=class{constructor(t,e){this.disposables=new te;this._id=Ue.toKey(t.identifier),this.#e=e,this.onDidChange=He.map(He.filter(this.#e.onDidChangePassword,n=>n.extensionId===this._id),n=>({key:n.key}),this.disposables)}#e;dispose(){this.disposables.dispose()}get(t){return this.#e.get(this._id,t)}store(t,e){return this.#e.store(this._id,t,e)}delete(t){return this.#e.delete(this._id,t)}keys(){return this.#e.keys(this._id)||[]}};var pm=class{constructor(t,e,n){this.logService=n;this.bundleCache=new Map;this._proxy=e.getProxy(V.MainThreadLocalization),this.currentLanguage=t.environment.appLanguage,this.isDefaultLanguage=this.currentLanguage===Ei}getMessage(t,e){let{message:n,args:o,comment:i}=e;if(this.isDefaultLanguage)return N_(n,o??{});let s=n;i&&i.length>0&&(s+=`/${Array.isArray(i)?i.join(""):i}`);let a=this.bundleCache.get(t)?.contents[s];return a||this.logService.warn(`Using default string since no string found in i18n bundle that has the key: ${s}`),N_(a??n,o??{})}getBundle(t){return this.bundleCache.get(t)?.contents}getBundleUri(t){return this.bundleCache.get(t)?.uri}async initializeLocalizedMessages(t){if(this.isDefaultLanguage||!t.l10n&&!t.isBuiltin||this.bundleCache.has(t.identifier.value))return;let e,n=await this.getBundleLocation(t);if(!n){this.logService.error(`No bundle location found for extension ${t.identifier.value}`);return}try{let o=await this._proxy.$fetchBundleContents(n),i=JSON.parse(o);e=t.isBuiltin?i.contents?.bundle:i}catch(o){this.logService.error(`Failed to load translations for ${t.identifier.value} from ${n}: ${o.message}`);return}e&&this.bundleCache.set(t.identifier.value,{contents:e,uri:n})}async getBundleLocation(t){if(t.isBuiltin){let e=await this._proxy.$fetchBuiltInBundleUri(t.identifier.value,this.currentLanguage);return E.revive(e)}return t.l10n?E.joinPath(t.extensionLocation,t.l10n,`bundle.l10n.${this.currentLanguage}.json`):void 0}};pm=L([P(0,Et),P(1,Ee),P(2,be)],pm);var mm=N("IExtHostLocalizationService");var gm=N("IExtHostManagedSockets"),fm=class{constructor(t){this._remoteSocketIdCounter=0;this._factory=null;this._managedRemoteSockets=new Map;this._proxy=t.getProxy(V.MainThreadManagedSockets)}setFactory(t,e){for(let n of this._managedRemoteSockets.values())n.dispose();this._factory&&this._proxy.$unregisterSocketFactory(this._factory.socketFactoryId),this._factory=new BL(t,e),this._proxy.$registerSocketFactory(this._factory.socketFactoryId)}async $openRemoteSocket(t){if(!this._factory||this._factory.socketFactoryId!==t)throw new Error(`No socket factory with id ${t}`);let e=++this._remoteSocketIdCounter,n=await this._factory.makeConnection(),o=new te;return this._managedRemoteSockets.set(e,new VL(e,n,o)),o.add(ae(()=>this._managedRemoteSockets.delete(e))),o.add(n.onDidEnd(()=>{this._proxy.$onDidManagedSocketEnd(e),o.dispose()})),o.add(n.onDidClose(i=>{this._proxy.$onDidManagedSocketClose(e,i?.stack??i?.message),o.dispose()})),o.add(n.onDidReceiveMessage(i=>this._proxy.$onDidManagedSocketHaveData(e,ce.wrap(i)))),e}$remoteSocketWrite(t,e){this._managedRemoteSockets.get(t)?.actual.send(e.buffer)}$remoteSocketEnd(t){let e=this._managedRemoteSockets.get(t);e&&(e.actual.end(),e.dispose())}async $remoteSocketDrain(t){await this._managedRemoteSockets.get(t)?.actual.drain?.()}};fm=L([P(0,Ee)],fm);var BL=class{constructor(t,e){this.socketFactoryId=t;this.makeConnection=e}},VL=class extends K{constructor(e,n,o){super();this.socketId=e;this.actual=n;this._register(o)}};var GL=N("IHostUtils"),Ml=class extends K{constructor(e,n,o,i,s,a,l,d,c,u,f,g,I){super();this._extHostManagedSockets=g;this._extHostLanguageModels=I;this._onDidChangeRemoteConnectionData=this._register(new D);this.onDidChangeRemoteConnectionData=this._onDidChangeRemoteConnectionData.event;this._realPathCache=new Map;this._isTerminating=!1;this._hostUtils=n,this._extHostContext=o,this._initData=l,this._extHostWorkspace=i,this._extHostConfiguration=s,this._logService=a,this._extHostTunnelService=c,this._extHostTerminalService=u,this._extHostLocalizationService=f,this._mainThreadWorkspaceProxy=this._extHostContext.getProxy(V.MainThreadWorkspace),this._mainThreadTelemetryProxy=this._extHostContext.getProxy(V.MainThreadTelemetry),this._mainThreadExtensionsProxy=this._extHostContext.getProxy(V.MainThreadExtensionService),this._almostReadyToRunExtensions=new Ln,this._readyToStartExtensionHost=new Ln,this._readyToRunExtensions=new Ln,this._eagerExtensionsActivated=new Ln,this._activationEventsReader=new $L(this._initData.extensions.activationEvents),this._globalRegistry=new na(this._activationEventsReader,this._initData.extensions.allExtensions);let h=new vo(this._initData.extensions.myExtensions);this._myRegistry=new na(this._activationEventsReader,GW(this._globalRegistry,h)),xa&&(this._logService.info(`Creating extension host with the following global extensions: ${hm(this._globalRegistry)}`),this._logService.info(`Creating extension host with the following local extensions: ${hm(this._myRegistry)}`)),this._storage=new Mp(this._extHostContext,this._logService),this._secretState=new cm(this._extHostContext),this._storagePath=d,this._instaService=this._store.add(e.createChild(new ka([Np,this._storage],[um,this._secretState]))),this._activator=this._register(new Ap(this._myRegistry,this._globalRegistry,{onExtensionActivationError:(C,_,R)=>{this._mainThreadExtensionsProxy.$onExtensionActivationError(C,bi(_),R)},actualActivateExtension:async(C,_)=>{if(na.isHostExtension(C,this._myRegistry,this._globalRegistry))return await this._mainThreadExtensionsProxy.$activateExtension(C,_),new aS;let R=this._myRegistry.getExtensionDescription(C);return this._activateExtension(R,_)}},this._logService)),this._extensionPathIndex=null,this._resolvers=Object.create(null),this._started=!1,this._remoteConnectionData=this._initData.remote.connectionData}$startAddedExtensionsOnDisk(){return this._mainThreadExtensionsProxy.$startAddedExtensionsOnDisk()}$getAllExtensionIdsFromDisk(){return this._mainThreadExtensionsProxy.$getAllExtensionIdsFromDisk()}$installFromDirectory(e){return this._mainThreadExtensionsProxy.$installFromDirectory(e)}getRemoteConnectionData(){return this._remoteConnectionData}async initialize(){try{await this._beforeAlmostReadyToRunExtensions(),this._almostReadyToRunExtensions.open(),await this._extHostWorkspace.waitForInitializeCall(),On("code/extHost/ready"),this._readyToStartExtensionHost.open(),this._initData.autoStart&&this._startExtensionHost()}catch(e){Ct(e)}}async _deactivateAll(){this._storagePath.onWillDeactivateAll();let e=[];try{e=this._myRegistry.getAllExtensionDescriptions().map(s=>s.identifier).filter(s=>this.isActivated(s)).map(s=>this._deactivate(s))}catch{}await Promise.all(e)}terminate(e,n=0){if(this._isTerminating)return;this._isTerminating=!0,this._logService.info(`Extension host terminating: ${e}`),this._logService.flush(),this._extHostTerminalService.dispose(),this._activator.dispose(),mf(i=>{this._logService.error(i)}),this._extHostContext.dispose();let o=this._deactivateAll();Promise.race([Qn(5e3),o]).finally(()=>{this._hostUtils.pid?this._logService.info(`Extension host with pid ${this._hostUtils.pid} exiting with code ${n}`):this._logService.info(`Extension host exiting with code ${n}`),this._logService.flush(),this._logService.dispose(),this._hostUtils.exit(n)})}isActivated(e){return this._readyToRunExtensions.isOpen()?this._activator.isActivated(e):!1}async getExtension(e){let n=await this._mainThreadExtensionsProxy.$getExtension(e);return n&&{...n,identifier:new Ue(n.identifier.value),extensionLocation:E.revive(n.extensionLocation)}}_activateByEvent(e,n){return this._activator.activateByEvent(e,n)}_activateById(e,n){return this._activator.activateById(e,n)}activateByIdWithErrors(e,n){return this._activateById(e,n).then(()=>{let o=this._activator.getActivatedExtension(e);if(o.activationFailed)return Promise.reject(o.activationFailedError)})}getExtensionRegistry(){return this._readyToRunExtensions.wait().then(e=>this._myRegistry)}getExtensionExports(e){if(this._readyToRunExtensions.isOpen())return this._activator.getActivatedExtension(e).exports;try{return this._activator.getActivatedExtension(e).exports}catch{return null}}async _realPathExtensionUri(e){if(e.scheme===X.file&&this._hostUtils.fsRealpath){let n=e.fsPath;this._realPathCache.has(n)||this._realPathCache.set(n,this._hostUtils.fsRealpath(n));let o=await this._realPathCache.get(n);return E.file(o)}return e}async getExtensionPathIndex(){return this._extensionPathIndex||(this._extensionPathIndex=this._createExtensionPathIndex(this._myRegistry.getAllExtensionDescriptions()).then(e=>new WL(e))),this._extensionPathIndex}async _createExtensionPathIndex(e){let n=Oo.forUris(o=>z_.ignorePathCasing(o));return await Promise.all(e.map(async o=>{if(this._getEntryPoint(o)){let i=await this._realPathExtensionUri(o.extensionLocation);n.set(i,o)}})),n}_deactivate(e){let n=Promise.resolve(void 0);if(!this._readyToRunExtensions.isOpen()||!this._activator.isActivated(e))return n;let o=this._activator.getActivatedExtension(e);if(!o)return n;try{typeof o.module.deactivate=="function"&&(n=Promise.resolve(o.module.deactivate()).then(void 0,i=>(this._logService.error(i),Promise.resolve(void 0))))}catch(i){this._logService.error(`An error occurred when deactivating the extension '${e.value}':`),this._logService.error(i)}try{o.disposable.dispose()}catch(i){this._logService.error(`An error occurred when disposing the subscriptions for extension '${e.value}':`),this._logService.error(i)}return n}async _activateExtension(e,n){return this._initData.remote.isRemote?this._mainThreadExtensionsProxy.$onWillActivateExtension(e.identifier):await this._mainThreadExtensionsProxy.$onWillActivateExtension(e.identifier),this._doActivateExtension(e,n).then(o=>{let i=o.activationTimes;return this._mainThreadExtensionsProxy.$onDidActivateExtension(e.identifier,i.codeLoadingTime,i.activateCallTime,i.activateResolvedTime,n),this._logExtensionActivationTimes(e,n,"success",i),o},o=>{throw this._logExtensionActivationTimes(e,n,"failure"),o})}_logExtensionActivationTimes(e,n,o,i){let s=$W(e,n);this._mainThreadTelemetryProxy.$publicLog2("extensionActivationTimes",{...s,...i||{},outcome:o})}_doActivateExtension(e,n){let o=$W(e,n);this._mainThreadTelemetryProxy.$publicLog2("activatePlugin",o);let i=this._getEntryPoint(e);if(!i)return Promise.resolve(new sS(pc.NONE));this._logService.info(`ExtensionService#_doActivateExtension ${e.identifier.value}, startup: ${n.startup}, activationEvent: '${n.activationEvent}'${e.identifier.value!==n.extensionId.value?`, root cause: ${n.extensionId.value}`:""}`),this._logService.flush();let s=this._isESM(e),a=new te,l=new Op(n.startup);return Promise.all([s?this._loadESMModule(e,Qt(e.extensionLocation,i),l):this._loadCommonJSModule(e,Qt(e.extensionLocation,i),l),this._loadExtensionContext(e,a)]).then(d=>(On(`code/extHost/willActivateExtension/${e.identifier.value}`),Ml._callActivate(this._logService,e.identifier,d[0],d[1],a,l))).then(d=>(On(`code/extHost/didActivateExtension/${e.identifier.value}`),d))}_loadExtensionContext(e,n){let o=this._extHostLanguageModels.createLanguageModelAccessInformation(e),i=n.add(new lS(e,this._storage)),s=n.add(new gh(e.identifier.value,!1,this._storage)),a=n.add(new ux(e,this._secretState)),l=e.isUnderDevelopment?this._initData.environment.extensionTestsLocationURI?3:2:1,d=this._initData.remote.isRemote?2:1;return this._logService.trace(`ExtensionService#loadExtensionContext ${e.identifier.value}`),Promise.all([i.whenReady,s.whenReady,this._storagePath.whenReady]).then(()=>{let c=this,u,f,g=$e(e,"ipc")?this._initData.messagePorts?.get(Ue.toKey(e.identifier)):void 0;return Object.freeze({globalState:i,workspaceState:s,secrets:a,subscriptions:[],get languageModelAccessInformation(){return o},get extensionUri(){return e.extensionLocation},get extensionPath(){return e.extensionLocation.fsPath},asAbsolutePath(I){return jc(e.extensionLocation.fsPath,I)},get storagePath(){return c._storagePath.workspaceValue(e)?.fsPath},get globalStoragePath(){return c._storagePath.globalValue(e).fsPath},get logPath(){return jc(c._initData.logsLocation.fsPath,e.identifier.value)},get logUri(){return E.joinPath(c._initData.logsLocation,e.identifier.value)},get storageUri(){return c._storagePath.workspaceValue(e)},get globalStorageUri(){return c._storagePath.globalValue(e)},get extensionMode(){return l},get extension(){return u===void 0&&(u=new Nl(c,e.identifier,e,d,!1)),u},get extensionRuntime(){return H(e,"extensionRuntime"),c.extensionRuntime},get environmentVariableCollection(){return c._extHostTerminalService.getEnvironmentVariableCollection(e)},get messagePassingProtocol(){if(!f){if(!g)return;let I=He.buffer(He.fromDOMEventEmitter(g,"message",h=>h.data));g.start(),f={onDidReceiveMessage:I,postMessage:g.postMessage.bind(g)}}return f}})})}static _callActivate(e,n,o,i,s,a){return o=o||{activate:void 0,deactivate:void 0},this._callActivateOptional(e,n,o,i,a).then(l=>new mc(!1,null,a.build(),o,l,ae(()=>{s.dispose(),Hn(i.subscriptions)})))}static _callActivateOptional(e,n,o,i,s){if(typeof o.activate=="function")try{s.activateCallStart(),e.trace(`ExtensionService#_callActivateOptional ${n.value}`);let a=o.activate.apply(globalThis,[i]);return s.activateCallStop(),s.activateResolveStart(),Promise.resolve(a).then(l=>(s.activateResolveStop(),l))}catch(a){return Promise.reject(a)}else return Promise.resolve(o)}_activateOneStartupFinished(e,n){this._activateById(e.identifier,{startup:!1,extensionId:e.identifier,activationEvent:n}).then(void 0,o=>{this._logService.error(o)})}_activateAllStartupFinishedDeferred(e,n=0){let i=Date.now();Ov(()=>{for(let s=n;s<e.length;s+=1){let a=e[s];for(let l of a.activationEvents??[])if(l==="onStartupFinished")if(Date.now()-i>50){this._activateAllStartupFinishedDeferred(e,s);break}else this._activateOneStartupFinished(a,l)}})}_activateAllStartupFinished(){this._mainThreadExtensionsProxy.$setPerformanceMarks(G0()),this._extHostConfiguration.getConfigProvider().then(e=>{let n=e.getConfiguration("extensions.experimental").get("deferredStartupFinishedActivation"),o=this._myRegistry.getAllExtensionDescriptions();if(n)this._activateAllStartupFinishedDeferred(o);else for(let i of o)if(i.activationEvents)for(let s of i.activationEvents)s==="onStartupFinished"&&this._activateOneStartupFinished(i,s)})}_handleEagerExtensions(){let e=this._activateByEvent("*",!0).then(void 0,a=>{this._logService.error(a)});this._register(this._extHostWorkspace.onDidChangeWorkspace(a=>this._handleWorkspaceContainsEagerExtensions(a.added)));let n=this._extHostWorkspace.workspace?this._extHostWorkspace.workspace.folders:[],o=this._handleWorkspaceContainsEagerExtensions(n),i=this._handleRemoteResolverEagerExtensions(),s=Promise.all([i,e,o]).then(()=>{});return Promise.race([s,Qn(1e4)]).then(()=>{this._activateAllStartupFinished()}),s}_handleWorkspaceContainsEagerExtensions(e){return e.length===0?Promise.resolve(void 0):Promise.all(this._myRegistry.getAllExtensionDescriptions().map(n=>this._handleWorkspaceContainsEagerExtension(e,n))).then(()=>{})}async _handleWorkspaceContainsEagerExtension(e,n){if(this.isActivated(n.identifier))return;let o=!this._initData.remote.isRemote&&!!this._initData.remote.authority,i={logService:this._logService,folders:e.map(a=>a.uri),forceUsingSearch:o||!this._hostUtils.fsExists,exists:a=>this._hostUtils.fsExists(a.fsPath),checkExists:(a,l,d)=>this._mainThreadWorkspaceProxy.$checkExists(a,l,d)},s=await VW(i,n);if(s)return this._activateById(n.identifier,{startup:!0,extensionId:n.identifier,activationEvent:s.activationEvent}).then(void 0,a=>this._logService.error(a))}async _handleRemoteResolverEagerExtensions(){if(this._initData.remote.authority)return this._activateByEvent(`onResolveRemoteAuthority:${this._initData.remote.authority}`,!1)}async $extensionTestsExecute(){await this._eagerExtensionsActivated.wait();try{return await this._doHandleExtensionTests()}catch(e){throw console.error(e),e}}async _doHandleExtensionTests(){let{extensionDevelopmentLocationURI:e,extensionTestsLocationURI:n}=this._initData.environment;if(!e||!n)throw new Error(p(3198,null));let o=(await this.getExtensionPathIndex()).findSubstr(n),s=await(this._isESM(o,n.path)?this._loadESMModule(null,n,new Op(!1)):this._loadCommonJSModule(null,n,new Op(!1)));if(!s||typeof s.run!="function")throw new Error(p(3197,null,n.toString()));return new Promise((a,l)=>{let d=(f,g)=>{f?(xa&&this._logService.error("Test runner called back with error",f),l(f)):(xa&&(g?this._logService.info(`Test runner called back with ${g} failures.`):this._logService.info("Test runner called back with successful outcome.")),a(typeof g=="number"&&g>0?1:0))},c=vr(n),u=s.run(c,d);u&&u.then&&u.then(()=>{xa&&this._logService.info("Test runner finished successfully."),a(0)}).catch(f=>{xa&&this._logService.error("Test runner finished with error",f),l(f instanceof Error&&f.stack?f.stack:String(f))})})}_startExtensionHost(){if(this._started)throw new Error("Extension host is already started!");return this._started=!0,this._readyToStartExtensionHost.wait().then(()=>this._readyToRunExtensions.open()).then(()=>Promise.race([this._activator.waitForActivatingExtensions(),Qn(1e3)])).then(()=>this._handleEagerExtensions()).then(()=>{this._eagerExtensionsActivated.open(),this._logService.info("Eager extensions activated")})}registerRemoteAuthorityResolver(e,n){return this._resolvers[e]=n,ae(()=>{delete this._resolvers[e]})}async getRemoteExecServer(e){let{resolver:n}=await this._activateAndGetResolver(e);return n?.resolveExecServer?.(e,{resolveAttempt:0})}async _activateAndGetResolver(e){let n=e.indexOf("+");if(n===-1)throw new Ki("Not an authority that can be resolved!","InvalidAuthority");let o=e.substr(0,n);return await this._almostReadyToRunExtensions.wait(),await this._activateByEvent(`onResolveRemoteAuthority:${o}`,!1),{authorityPrefix:o,resolver:this._resolvers[o]}}async $resolveAuthority(e,n){let o=uo.create(!1),i=()=>`[resolveAuthority(${nR(e)},${n})][${o.elapsed()}ms] `,s=O=>this._logService.info(`${i()}${O}`),a=O=>this._logService.warn(`${i()}${O}`),l=(O,U=void 0)=>this._logService.error(`${i()}${O}`,U),d=O=>{if(O instanceof Ki)return{type:"error",error:{code:O._code,message:O._message,detail:O._detail}};throw O},c=async O=>{s(`activating resolver for ${O}...`);let{resolver:U,authorityPrefix:ie}=await this._activateAndGetResolver(O);if(!U)throw l(`no resolver for ${ie}`),new Ki(`No remote extension installed to resolve ${ie}.`,"NoResolverFound");return{resolver:U,authorityPrefix:ie,remoteAuthority:O}},u=e.split(/@|%40/g).reverse();s(`activating remote resolvers ${u.join(" -> ")}`);let f;try{f=await Promise.all(u.map(c)).catch(async O=>{if(!(O instanceof Ki)||O._code!=="InvalidAuthority")throw O;return a(`resolving nested authorities failed: ${O.message}`),[await c(e)]})}catch(O){return d(O)}let g=new tb;g.cancelAndSet(()=>s("waiting..."),1e3);let I,h;for(let[O,{authorityPrefix:U,resolver:ie,remoteAuthority:Y}]of f.entries())try{if(O===f.length-1)s("invoking final resolve()..."),On(`code/extHost/willResolveAuthority/${U}`),I=await ie.resolve(Y,{resolveAttempt:n,execServer:h}),On(`code/extHost/didResolveAuthorityOK/${U}`),s("setting tunnel factory..."),this._register(await this._extHostTunnelService.setTunnelFactory(ie,al.isManagedResolvedAuthority(I)?I:void 0));else{if(s(`invoking resolveExecServer() for ${Y}`),On(`code/extHost/willResolveExecServer/${U}`),h=await ie.resolveExecServer?.(Y,{resolveAttempt:n,execServer:h}),!h)throw new Ki(`Exec server was not available for ${Y}`,"NoResolverFound");On(`code/extHost/didResolveExecServerOK/${U}`)}}catch(Z){return On(`code/extHost/didResolveAuthorityError/${U}`),l("returned an error",Z),g.dispose(),d(Z)}g.dispose();let C={environmentTunnels:I.environmentTunnels,features:I.tunnelFeatures?{elevation:I.tunnelFeatures.elevation,privacyOptions:I.tunnelFeatures.privacyOptions,protocol:I.tunnelFeatures.protocol===void 0?!0:I.tunnelFeatures.protocol}:void 0},_={extensionHostEnv:I.extensionHostEnv,isTrusted:I.isTrusted,authenticationSession:I.authenticationSessionForInitializingExtensions?{id:I.authenticationSessionForInitializingExtensions.id,providerId:I.authenticationSessionForInitializingExtensions.providerId}:void 0};s(`returned ${al.isManagedResolvedAuthority(I)?"managed authority":`${I.host}:${I.port}`}`);let R;if(al.isManagedResolvedAuthority(I)){let O=n;this._extHostManagedSockets.setFactory(O,I.makeConnection),R={authority:e,connectTo:new BI(O),connectionToken:I.connectionToken}}else R={authority:e,connectTo:new VI(I.host,I.port),connectionToken:I.connectionToken};return{type:"ok",value:{authority:R,options:_,tunnelInformation:C}}}async $getCanonicalURI(e,n){this._logService.info(`$getCanonicalURI invoked for authority (${nR(e)})`);let{resolver:o}=await this._activateAndGetResolver(e);if(!o)return null;let i=E.revive(n);if(typeof o.getCanonicalURI>"u")return i;let s=await dn(()=>o.getCanonicalURI(i));return s||i}async $startExtensionHost(e){e.toAdd.forEach(a=>a.extensionLocation=E.revive(a.extensionLocation));let{globalRegistry:n,myExtensions:o}=WW(this._activationEventsReader,this._globalRegistry,this._myRegistry,e),i=await this._createExtensionPathIndex(o);return(await this.getExtensionPathIndex()).setSearchTree(i),this._globalRegistry.set(n.getAllExtensionDescriptions()),this._myRegistry.set(o),xa&&(this._logService.info(`$startExtensionHost: global extensions: ${hm(this._globalRegistry)}`),this._logService.info(`$startExtensionHost: local extensions: ${hm(this._myRegistry)}`)),this._startExtensionHost()}$activateByEvent(e,n){return n===1?this._almostReadyToRunExtensions.wait().then(o=>this._activateByEvent(e,!1)):this._readyToRunExtensions.wait().then(o=>this._activateByEvent(e,!1))}async $activate(e,n){return await this._readyToRunExtensions.wait(),this._myRegistry.getExtensionDescription(e)?(await this._activateById(e,n),!0):!1}async $deltaExtensions(e){e.toAdd.forEach(a=>a.extensionLocation=E.revive(a.extensionLocation));let{globalRegistry:n,myExtensions:o}=WW(this._activationEventsReader,this._globalRegistry,this._myRegistry,e),i=await this._createExtensionPathIndex(o);return(await this.getExtensionPathIndex()).setSearchTree(i),this._globalRegistry.set(n.getAllExtensionDescriptions()),this._myRegistry.set(o),xa&&(this._logService.info(`$deltaExtensions: global extensions: ${hm(this._globalRegistry)}`),this._logService.info(`$deltaExtensions: local extensions: ${hm(this._myRegistry)}`)),Promise.resolve(void 0)}async $test_latency(e){return e}async $test_up(e){return e.byteLength}async $test_down(e){let n=ce.alloc(e),o=Math.random()%256;for(let i=0;i<e;i++)n.writeUInt8(o,i);return n}async $updateRemoteConnectionData(e){this._remoteConnectionData=e,this._onDidChangeRemoteConnectionData.fire()}_isESM(e,n){return n??=e?this._getEntryPoint(e):n,n?.endsWith(".mjs")||e?.type==="module"&&!n?.endsWith(".cjs")}};Ml=L([P(0,ko),P(1,GL),P(2,Ee),P(3,_o),P(4,Po),P(5,be),P(6,Et),P(7,Fp),P(8,Bp),P(9,ui),P(10,mm),P(11,gm),P(12,Qp)],Ml);function WW(r,t,e,n){r.addActivationEvents(n.addActivationEvents);let o=new na(r,t.getAllExtensionDescriptions());o.deltaExtensions(n.toAdd,n.toRemove);let i=new vo(e.getAllExtensionDescriptions().map(a=>a.identifier));for(let a of n.myToRemove)i.delete(a);for(let a of n.myToAdd)i.add(a);let s=GW(o,i);return{globalRegistry:o,myExtensions:s}}function $W(r,t){return{id:r.identifier.value,name:r.name,extensionVersion:r.version,publisherDisplayName:r.publisher,activationEvents:r.activationEvents?r.activationEvents.join(","):null,isBuiltin:r.isBuiltin,reason:t.activationEvent,reasonId:t.extensionId.value}}function hm(r){return r.getAllExtensionDescriptions().map(t=>t.identifier.value).join(",")}var Do=N("IExtHostExtensionService"),Nl=class{#e;#t;#n;constructor(t,e,n,o,i){this.#e=t,this.#t=e,this.#n=n.identifier,this.id=n.identifier.value,this.extensionUri=n.extensionLocation,this.extensionPath=fr(vr(n.extensionLocation)),this.packageJSON=n,this.extensionKind=o,this.isFromDifferentExtensionHost=i}get isActive(){return this.#e.isActivated(this.#n)}get exports(){if(!(this.packageJSON.api==="none"||this.isFromDifferentExtensionHost))return this.#e.getExtensionExports(this.#n)}async activate(){if(this.isFromDifferentExtensionHost)throw new Error("Cannot activate foreign extension");return await this.#e.activateByIdWithErrors(this.#n,{startup:!1,extensionId:this.#t,activationEvent:"api"}),this.exports}};function GW(r,t){return r.getAllExtensionDescriptions().filter(e=>t.has(e.identifier))}var WL=class{constructor(t){this._searchTree=t}setSearchTree(t){this._searchTree=t}findSubstr(t){return this._searchTree.findSubstr(t)}forEach(t){return this._searchTree.forEach(t)}},$L=class{constructor(t){this._map=new Xn;this.addActivationEvents(t)}readActivationEvents(t){return this._map.get(t.identifier)??[]}addActivationEvents(t){for(let e of Object.keys(t))this._map.set(e,t[e])}};var sa=N("IExtHostApiDeprecationService"),vm=class{constructor(t,e){this._extHostLogService=e;this._reportedUsages=new Set;this._telemetryShape=t.getProxy(V.MainThreadTelemetry)}report(t,e,n){let o=this.getUsageKey(t,e);this._reportedUsages.has(o)||(this._reportedUsages.add(o),e.isUnderDevelopment&&this._extHostLogService.warn(`[Deprecation Warning] '${t}' is deprecated. ${n}`),this._telemetryShape.$publicLog2("extHostDeprecatedApiUsage",{extensionId:e.identifier.value,apiId:t}))}getUsageKey(t,e){return`${t}-${e.identifier.value}`}};vm=L([P(0,Ee),P(1,be)],vm);var b0e=Object.freeze(new class{report(r,t,e){}});var px=class r{static async installEarlyHandler(t){Error.stackTraceLimit=100;let e=t.get(be),o=t.get(Ee).getProxy(V.MainThreadErrors);mf(i=>{e.error(i);let s=bi(i);o.$onUnexpectedError(s)})}static _formatStack(t,e){let n=r._resolveSourceLocation,o="";for(let i of e){let s,a=i.getFileName();if(n&&a){let l=i.getLineNumber(),d=i.getColumnNumber();if(l!==null&&d!==null){let c=n(a,l,d);c&&(s=i.toString().replace(`${a}:${l}:${d}`,`${c.source}:${c.line}:${c.column}`))}}o+=`
	at ${s??i.toString()}`}return`${t.name||"Error"}: ${t.message||""}${o}`}static async installFullHandler(t){let e=t.get(be),n=t.get(Ee),o=t.get(Do),i=t.get(Rl),s=t.get(sa),a=n.getProxy(V.MainThreadExtensionService),l=n.getProxy(V.MainThreadErrors),d=await o.getExtensionRegistry(),c=await o.getExtensionPathIndex(),u=new WeakMap,f=r._resolveSourceLocation;function g(C,_){if(u.has(C))return u.get(C).stack;let R="",O,U;for(let Y of _){let Z;if(U=Y.getFileName(),f&&U){let ee=Y.getLineNumber(),oe=Y.getColumnNumber();if(ee!==null&&oe!==null){let ke=f(U,ee,oe);ke&&(Z=Y.toString().replace(`${U}:${ee}:${oe}`,`${ke.source}:${ke.line}:${ke.column}`),U=ke.source)}}R+=`
	at ${Z??Y.toString()}`,!O&&U&&(O=c.findSubstr(E.file(U)))}let ie=`${C.name||"Error"}: ${C.message||""}${R}`;return u.set(C,{extensionIdentifier:O?.identifier,stack:ie}),ie}let I=Symbol("prepareStackTrace wrapped"),h=g;Object.defineProperty(Error,"prepareStackTrace",{configurable:!1,get(){return h},set(C){if(C===g||!C||C[I]){h=C||g;return}h=function(_,R){return g(_,R),C.call(Error,_,R)},Object.assign(h,{[I]:!0})}}),mf(C=>{pf.is(C)||e.error(C);let _=bi(C),R;if(C instanceof nu?R=C.extension:R=u.get(C)?.extensionIdentifier,!!R)if(pf.is(C)){let O=d.getExtensionDescription(R);O&&s.report(C.name,O,`${C.message}
 FROM: ${C.stack}`)}else{a.$onExtensionRuntimeError(R,_);let O=i.onExtensionError(R,C);e.trace("forwarded error to extension?",O,R)}}),Fc.addListener(C=>{l.$onUnexpectedError(C)})}},mx=class r{constructor(t,e,n,o,i){this._hostUtils=n,this._rpcProtocol=new sb(t,null,o),e=r._transform(e,this._rpcProtocol);let s=new ka(...oF());s.set(Et,{_serviceBrand:void 0,...e,messagePorts:i}),s.set(Ee,new yb(this._rpcProtocol)),s.set(Aa,new Eb(o)),s.set(GL,n);let a=new Ib(s,!0);a.invokeFunction(px.installEarlyHandler),this._logService=a.invokeFunction(l=>l.get(be)),On("code/extHost/didCreateServices"),this._hostUtils.pid?this._logService.info(`Extension host with pid ${this._hostUtils.pid} started`):this._logService.info("Extension host started"),this._logService.trace("initData",e),this._extensionService=a.invokeFunction(l=>l.get(Do)),this._extensionService.initialize(),a.invokeFunction(px.installFullHandler)}async asBrowserUri(t){let e=this._rpcProtocol.getProxy(V.MainThreadExtensionService);return E.revive(await e.$asBrowserUri(t))}terminate(t){this._extensionService.terminate(t)}static _transform(t,e){t.extensions.allExtensions.forEach(o=>{o.extensionLocation=E.revive(e.transformIncomingURIs(o.extensionLocation))}),t.environment.appRoot=E.revive(e.transformIncomingURIs(t.environment.appRoot));let n=t.environment.extensionDevelopmentLocationURI;return n&&(t.environment.extensionDevelopmentLocationURI=n.map(o=>E.revive(e.transformIncomingURIs(o)))),t.environment.extensionTestsLocationURI=E.revive(e.transformIncomingURIs(t.environment.extensionTestsLocationURI)),t.environment.globalStorageHome=E.revive(e.transformIncomingURIs(t.environment.globalStorageHome)),t.environment.workspaceStorageHome=E.revive(e.transformIncomingURIs(t.environment.workspaceStorageHome)),t.nlsBaseUrl=E.revive(e.transformIncomingURIs(t.nlsBaseUrl)),t.logsLocation=E.revive(e.transformIncomingURIs(t.logsLocation)),t.workspace=e.transformIncomingURIs(t.workspace),t}};var Gz=(function(t){let e=n=>{globalThis.removeEventListener("message",e);let o=n.data;Object.defineProperties(globalThis,{postMessage:{value(i,s){o.postMessage(i,s)}},onmessage:{get(){return o.onmessage},set(i){o.onmessage=i}}}),o.addEventListener("message",i=>{globalThis.dispatchEvent(new MessageEvent("message",{data:i.data,ports:i.ports?[...i.ports]:void 0}))}),o.start(),globalThis.Worker=class{constructor(){throw new TypeError("Nested workers from within nested worker are NOT supported.")}},importScripts(t)};globalThis.addEventListener("message",e)}).toString(),fx=class extends EventTarget{constructor(e,n,o){super();this.onmessage=null;this.onmessageerror=null;this.onerror=null;let i=`((${Gz})('${n}'))`,s=new Blob([i],{type:"application/javascript"}),a=URL.createObjectURL(s),l=new MessageChannel,d=a,c={type:"_newWorker",id:d,port:l.port2,url:a,options:o};e(c,[l.port2]),this.postMessage=l.port1.postMessage.bind(l.port1),this.terminate=()=>{e({type:"_terminateWorker",id:d}),URL.revokeObjectURL(a),l.port1.close(),l.port2.close()},Object.defineProperties(this,{onmessage:{get(){return l.port1.onmessage},set(u){l.port1.onmessage=u}},onmessageerror:{get(){return l.port1.onmessageerror},set(u){l.port1.onmessageerror=u}}}),l.port1.addEventListener("messageerror",u=>{let f=new MessageEvent("messageerror",{data:u.data});this.dispatchEvent(f)}),l.port1.addEventListener("message",u=>{let f=new MessageEvent("message",{data:u.data});this.dispatchEvent(f)}),l.port1.start()}};var J0e=new w("inOutput",!1),j0e=new w("activeLogOutput",!1),Q0e=new w("activeLogOutput.isLog",!1),X0e=new w("activeLogOutput.levelSettable",!1),Y0e=new w("activeLogOutput.level",""),Z0e=new w("activeLogOutput.levelIsDefault",!1),eUe=new w("outputView.scrollLock",!1),tUe=new w("activeOutputChannel",""),nUe=new w("output.filter.trace",!0),oUe=new w("output.filter.debug",!0),rUe=new w("output.filter.info",!0),iUe=new w("output.filter.warning",!0),sUe=new w("output.filter.error",!0),aUe=new w("outputFilterFocus",!1),lUe=new w("output.filter.categories",""),dUe=N("outputService");var zz={OutputChannels:"workbench.contributions.outputChannels"};function qz(r){return Array.isArray(r.source)}var zL=class extends K{constructor(){super(...arguments);this.channels=new Map;this._onDidRegisterChannel=this._register(new D);this.onDidRegisterChannel=this._onDidRegisterChannel.event;this._onDidRemoveChannel=this._register(new D);this.onDidRemoveChannel=this._onDidRemoveChannel.event;this._onDidUpdateChannelFiles=this._register(new D);this.onDidUpdateChannelSources=this._onDidUpdateChannelFiles.event}registerChannel(e){this.channels.has(e.id)||(this.channels.set(e.id,e),this._onDidRegisterChannel.fire(e.id))}getChannels(){let e=[];return this.channels.forEach(n=>e.push(n)),e}getChannel(e){return this.channels.get(e)}updateChannelSources(e,n){let o=this.channels.get(e);o&&qz(o)&&(o.source=n,this._onDidUpdateChannelFiles.fire(o))}removeChannel(e){let n=this.channels.get(e);n&&(this.channels.delete(e),this._onDidRemoveChannel.fire(n))}};ht.add(zz.OutputChannels,new zL);var gx=class extends iu{constructor(e,n,o,i,s){super();this.id=e;this.name=n;this.logger=o;this.proxy=i;this.extension=s;this.offset=0;this.visible=!1;this.setLevel(o.getLevel()),this._register(o.onDidChangeLogLevel(a=>this.setLevel(a))),this._register(ae(()=>this.proxy.$dispose(this.id)))}get logLevel(){return this.getLevel()}appendLine(e){this.append(e+`
`)}append(e){this.info(e)}clear(){let e=this.offset;this.logger.flush(),this.proxy.$update(this.id,3,e)}replace(e){let n=this.offset;this.info(e),this.proxy.$update(this.id,2,n),this.visible&&this.logger.flush()}show(e,n){this.logger.flush(),this.proxy.$reveal(this.id,!!(typeof e=="boolean"?e:n))}hide(){this.proxy.$close(this.id)}log(e,n){this.offset+=ce.fromString(n).byteLength,tF(this.logger,e,n),this.visible&&(this.logger.flush(),this.proxy.$update(this.id,1))}},qL=class extends gx{appendLine(t){this.append(t)}},bm=class{constructor(t,e,n,o,i,s){this.initData=e;this.extHostFileSystem=n;this.extHostFileSystemInfo=o;this.loggerService=i;this.logService=s;this.extensionLogDirectoryCreationPromise=new et;this.logOutputChannels=new et;this.namePool=1;this.channels=new Map;this.visibleChannelId=null;this.proxy=t.getProxy(V.MainThreadOutputService),this.outputsLocation=this.extHostFileSystemInfo.extUri.joinPath(e.logsLocation,`output_logging_${KB(new Date).replace(/-|:|\.\d+Z$/g,"")}`)}$setVisibleChannel(t){this.visibleChannelId=t;for(let[e,n]of this.channels)n.visible=e===this.visibleChannelId}createOutputChannel(t,e,n){if(t=t.trim(),!t)throw new Error("illegal argument `name`. must not be falsy");let o=typeof e=="object"&&e.log,i=Me(e)?e:void 0;if(Me(i)&&!i.trim())throw new Error("illegal argument `languageId`. must not be empty");let s=new te,a,l=this.initData.environment.extensionLogLevel?.find(([c])=>Ue.equals(n.identifier,c))?.[1],d;if(o){let c=this.extHostFileSystemInfo.extUri.joinPath(this.initData.logsLocation,n.identifier.value);d=this.extHostFileSystemInfo.extUri.joinPath(c,`${t.replace(/[\\/:\*\?"<>\|]/g,"")}.log`);let u=this.logOutputChannels.get(d);if(u)return u;let f=this.loggerService.getRegisteredLogger(d);f?.logLevel!==void 0&&(l=f.logLevel),a=this.doCreateLogOutputChannel(t,d,l,n,s)}else a=this.doCreateOutputChannel(t,i,n,s);if(a.then(c=>{this.channels.set(c.id,c),c.visible=c.id===this.visibleChannelId,s.add(ae(()=>{this.channels.delete(c.id),d&&this.logOutputChannels.delete(d)}))}),d){let c=this.createExtHostLogOutputChannel(t,l??this.logService.getLevel(),a,s);return this.logOutputChannels.set(d,c),c}return this.createExtHostOutputChannel(t,a,s)}async doCreateOutputChannel(t,e,n,o){this.outputDirectoryPromise||(this.outputDirectoryPromise=this.extHostFileSystem.value.createDirectory(this.outputsLocation).then(()=>this.outputsLocation));let i=await this.outputDirectoryPromise,s=this.extHostFileSystemInfo.extUri.joinPath(i,`${this.namePool++}-${t.replace(/[\\/:\*\?"<>\|]/g,"")}.log`),a=o.add(this.loggerService.createLogger(s,{logLevel:"always",donotRotate:!0,donotUseFormatters:!0,hidden:!0})),l=await this.proxy.$register(t,s,e,n.identifier.value);return o.add(ae(()=>this.loggerService.deregisterLogger(s))),new gx(l,t,a,this.proxy,n)}async doCreateLogOutputChannel(t,e,n,o,i){await this.createExtensionLogDirectory(e);let s=`${o.identifier.value}.${this.extHostFileSystemInfo.extUri.basename(e)}`,a=i.add(this.loggerService.createLogger(e,{id:s,name:t,logLevel:n,extensionId:o.identifier.value}));return i.add(ae(()=>this.loggerService.deregisterLogger(e))),new qL(s,t,a,this.proxy,o)}createExtensionLogDirectory(t){let e=this.extHostFileSystemInfo.extUri.dirname(t),n=this.extensionLogDirectoryCreationPromise.get(e);return n||this.extensionLogDirectoryCreationPromise.set(e,n=(async()=>{try{await this.extHostFileSystem.value.createDirectory(e)}catch(o){if(lu(o)!=="EntryExists")throw o}})()),n}createExtHostOutputChannel(t,e,n){let o=()=>{if(n.isDisposed)throw new Error("Channel has been closed")};return e.then(i=>n.add(i)),{get name(){return t},append(i){o(),e.then(s=>s.append(i))},appendLine(i){o(),e.then(s=>s.appendLine(i))},clear(){o(),e.then(i=>i.clear())},replace(i){o(),e.then(s=>s.replace(i))},show(i,s){o(),e.then(a=>a.show(i,s))},hide(){o(),e.then(i=>i.hide())},dispose(){n.dispose()}}}createExtHostLogOutputChannel(t,e,n,o){let i=()=>{if(o.isDisposed)throw new Error("Channel has been closed")},s=o.add(new D);function a(l){e=l,s.fire(l)}return n.then(l=>{l.logLevel!==e&&a(l.logLevel),o.add(l.onDidChangeLogLevel(d=>a(d)))}),{...this.createExtHostOutputChannel(t,n,o),get logLevel(){return e},onDidChangeLogLevel:s.event,trace(l,...d){i(),n.then(c=>c.trace(l,...d))},debug(l,...d){i(),n.then(c=>c.debug(l,...d))},info(l,...d){i(),n.then(c=>c.info(l,...d))},warn(l,...d){i(),n.then(c=>c.warn(l,...d))},error(l,...d){i(),n.then(c=>c.error(l,...d))}}}};bm=L([P(0,Ee),P(1,Et),P(2,Dl),P(3,Er),P(4,Zo),P(5,be)],bm);var hx=N("IExtHostOutputService");var os=class{constructor(t,e){this._logService=e;this._provider=new Map;this._proxy=t.getProxy(V.MainThreadDecorations)}static{this._handlePool=0}static{this._maxEventSize=250}registerFileDecorationProvider(t,e){let n=os._handlePool++;this._provider.set(n,{provider:t,extensionDescription:e}),this._proxy.$registerDecorationProvider(n,e.identifier.value);let o=t.onDidChangeFileDecorations&&t.onDidChangeFileDecorations(i=>{if(!i){this._proxy.$onDidChange(n,null);return}let s=Rn(i);if(s.length<=os._maxEventSize){this._proxy.$onDidChange(n,s);return}this._logService.warn("[Decorations] CAPPING events from decorations provider",e.identifier.value,s.length);let a=s.map(c=>({uri:c,rank:IU(c.path,"/")})),l=c0(a,(c,u)=>c.rank-u.rank||Vr(c.uri.path,u.uri.path)),d=[];e:for(let c of l){let u;for(let f of c){let g=Ci(f.uri.path);if(u!==g&&(u=g,d.push(f.uri)>=os._maxEventSize))break e}}this._proxy.$onDidChange(n,d)});return new Ce(()=>{o?.dispose(),this._proxy.$unregisterDecorationProvider(n),this._provider.delete(n)})}async $provideDecorations(t,e,n){if(!this._provider.has(t))return Object.create(null);let o=Object.create(null),{provider:i,extensionDescription:s}=this._provider.get(t);return await Promise.all(e.map(async a=>{try{let{uri:l,id:d}=a,c=await Promise.resolve(i.provideFileDecoration(E.revive(l),n));if(!c)return;try{qd.validate(c),c.badge&&typeof c.badge!="string"&&H(s,"codiconDecoration"),o[d]=[c.propagate,c.tooltip,c.badge,c.color]}catch(u){this._logService.warn(`INVALID decoration from extension '${s.identifier.value}': ${u}`)}}catch(l){this._logService.error(l)}})),o}};os=L([P(0,Ee),P(1,be)],os);var vx=N("IExtHostDecorations");var bx=class{constructor(t){this.values=t,this.prefixSum=new Uint32Array(t.length),this.prefixSumValidIndex=new Int32Array(1),this.prefixSumValidIndex[0]=-1}getCount(){return this.values.length}insertValues(t,e){t=ad(t);let n=this.values,o=this.prefixSum,i=e.length;return i===0?!1:(this.values=new Uint32Array(n.length+i),this.values.set(n.subarray(0,t),0),this.values.set(n.subarray(t),t+i),this.values.set(e,t),t-1<this.prefixSumValidIndex[0]&&(this.prefixSumValidIndex[0]=t-1),this.prefixSum=new Uint32Array(this.values.length),this.prefixSumValidIndex[0]>=0&&this.prefixSum.set(o.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}setValue(t,e){return t=ad(t),e=ad(e),this.values[t]===e?!1:(this.values[t]=e,t-1<this.prefixSumValidIndex[0]&&(this.prefixSumValidIndex[0]=t-1),!0)}removeValues(t,e){t=ad(t),e=ad(e);let n=this.values,o=this.prefixSum;if(t>=n.length)return!1;let i=n.length-t;return e>=i&&(e=i),e===0?!1:(this.values=new Uint32Array(n.length-e),this.values.set(n.subarray(0,t),0),this.values.set(n.subarray(t+e),t),this.prefixSum=new Uint32Array(this.values.length),t-1<this.prefixSumValidIndex[0]&&(this.prefixSumValidIndex[0]=t-1),this.prefixSumValidIndex[0]>=0&&this.prefixSum.set(o.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}getTotalSum(){return this.values.length===0?0:this._getPrefixSum(this.values.length-1)}getPrefixSum(t){return t<0?0:(t=ad(t),this._getPrefixSum(t))}_getPrefixSum(t){if(t<=this.prefixSumValidIndex[0])return this.prefixSum[t];let e=this.prefixSumValidIndex[0]+1;e===0&&(this.prefixSum[0]=this.values[0],e++),t>=this.values.length&&(t=this.values.length-1);for(let n=e;n<=t;n++)this.prefixSum[n]=this.prefixSum[n-1]+this.values[n];return this.prefixSumValidIndex[0]=Math.max(this.prefixSumValidIndex[0],t),this.prefixSum[t]}getIndexOf(t){t=Math.floor(t),this.getTotalSum();let e=0,n=this.values.length-1,o=0,i=0,s=0;for(;e<=n;)if(o=e+(n-e)/2|0,i=this.prefixSum[o],s=i-this.values[o],t<s)n=o-1;else if(t>=i)e=o+1;else break;return new KL(o,t-s)}};var KL=class{constructor(t,e){this.index=t;this.remainder=e;this._prefixSumIndexOfResultBrand=void 0;this.index=t,this.remainder=e}};var Ix=class{constructor(t,e,n,o){this._uri=t,this._lines=e,this._eol=n,this._versionId=o,this._lineStarts=null,this._cachedTextValue=null}dispose(){this._lines.length=0}get version(){return this._versionId}getText(){return this._cachedTextValue===null&&(this._cachedTextValue=this._lines.join(this._eol)),this._cachedTextValue}onEvents(t){t.eol&&t.eol!==this._eol&&(this._eol=t.eol,this._lineStarts=null);let e=t.changes;for(let n of e)this._acceptDeleteRange(n.range),this._acceptInsertText(new In(n.range.startLineNumber,n.range.startColumn),n.text);this._versionId=t.versionId,this._cachedTextValue=null}_ensureLineStarts(){if(!this._lineStarts){let t=this._eol.length,e=this._lines.length,n=new Uint32Array(e);for(let o=0;o<e;o++)n[o]=this._lines[o].length+t;this._lineStarts=new bx(n)}}_setLineText(t,e){this._lines[t]=e,this._lineStarts&&this._lineStarts.setValue(t,this._lines[t].length+this._eol.length)}_acceptDeleteRange(t){if(t.startLineNumber===t.endLineNumber){if(t.startColumn===t.endColumn)return;this._setLineText(t.startLineNumber-1,this._lines[t.startLineNumber-1].substring(0,t.startColumn-1)+this._lines[t.startLineNumber-1].substring(t.endColumn-1));return}this._setLineText(t.startLineNumber-1,this._lines[t.startLineNumber-1].substring(0,t.startColumn-1)+this._lines[t.endLineNumber-1].substring(t.endColumn-1)),this._lines.splice(t.startLineNumber,t.endLineNumber-t.startLineNumber),this._lineStarts&&this._lineStarts.removeValues(t.startLineNumber,t.endLineNumber-t.startLineNumber)}_acceptInsertText(t,e){if(e.length===0)return;let n=Wv(e);if(n.length===1){this._setLineText(t.lineNumber-1,this._lines[t.lineNumber-1].substring(0,t.column-1)+n[0]+this._lines[t.lineNumber-1].substring(t.column-1));return}n[n.length-1]+=this._lines[t.lineNumber-1].substring(t.column-1),this._setLineText(t.lineNumber-1,this._lines[t.lineNumber-1].substring(0,t.column-1)+n[0]);let o=new Uint32Array(n.length-1);for(let i=1;i<n.length;i++)this._lines.splice(t.lineNumber+i-1,0,n[i]),o[i-1]=n[i].length+this._eol.length;this._lineStarts&&this._lineStarts.insertValues(t.lineNumber,o)}};var JL=new Map;function zW(r,t){t?JL.set(r,t):JL.delete(r)}function Kz(r){return JL.get(r)}var yx=class extends Ix{constructor(e,n,o,i,s,a,l,d,c=!0){super(n,o,i,s);this._proxy=e;this._languageId=a;this._isDirty=l;this._encoding=d;this._strictInstanceofChecks=c;this._isDisposed=!1}dispose(){kn(!this._isDisposed),this._isDisposed=!0,this._isDirty=!1}equalLines(e){return Zt(this._lines,e)}get document(){if(!this._document){let e=this;this._document={get uri(){return e._uri},get fileName(){return e._uri.fsPath},get isUntitled(){return e._uri.scheme===X.untitled},get languageId(){return e._languageId},get version(){return e._versionId},get isClosed(){return e._isDisposed},get isDirty(){return e._isDirty},get encoding(){return e._encoding},save(){return e._save()},getText(n){return n?e._getTextInRange(n):e.getText()},get eol(){return e._eol===`
`?1:2},get lineCount(){return e._lines.length},lineAt(n){return e._lineAt(n)},offsetAt(n){return e._offsetAt(n)},positionAt(n){return e._positionAt(n)},validateRange(n){return e._validateRange(n)},validatePosition(n){return e._validatePosition(n)},getWordRangeAtPosition(n,o){return e._getWordRangeAtPosition(n,o)},[Symbol.for("debug.description")](){return`TextDocument(${e._uri.toString()})`}}}return Object.freeze(this._document)}_acceptLanguageId(e){kn(!this._isDisposed),this._languageId=e}_acceptIsDirty(e){kn(!this._isDisposed),this._isDirty=e}_acceptEncoding(e){kn(!this._isDisposed),this._encoding=e}_save(){return this._isDisposed?Promise.reject(new Error("Document has been closed")):this._proxy.$trySaveDocument(this._uri)}_getTextInRange(e){let n=this._validateRange(e);if(n.isEmpty)return"";if(n.isSingleLine)return this._lines[n.start.line].substring(n.start.character,n.end.character);let o=this._eol,i=n.start.line,s=n.end.line,a=[];a.push(this._lines[i].substring(n.start.character));for(let l=i+1;l<s;l++)a.push(this._lines[l]);return a.push(this._lines[s].substring(0,n.end.character)),a.join(o)}_lineAt(e){let n;if(e instanceof we?n=e.line:typeof e=="number"?n=e:!this._strictInstanceofChecks&&we.isPosition(e)&&(n=e.line),typeof n!="number"||n<0||n>=this._lines.length||Math.floor(n)!==n)throw new Error("Illegal value for `line`");return new jL(n,this._lines[n],n===this._lines.length-1)}_offsetAt(e){return e=this._validatePosition(e),this._ensureLineStarts(),this._lineStarts.getPrefixSum(e.line-1)+e.character}_positionAt(e){e=Math.floor(e),e=Math.max(0,e),this._ensureLineStarts();let n=this._lineStarts.getIndexOf(e),o=this._lines[n.index].length;return new we(n.index,Math.min(n.remainder,o))}_validateRange(e){if(this._strictInstanceofChecks){if(!(e instanceof Se))throw new Error("Invalid argument")}else if(!Se.isRange(e))throw new Error("Invalid argument");let n=this._validatePosition(e.start),o=this._validatePosition(e.end);return n===e.start&&o===e.end?e:new Se(n.line,n.character,o.line,o.character)}_validatePosition(e){if(this._strictInstanceofChecks){if(!(e instanceof we))throw new Error("Invalid argument")}else if(!we.isPosition(e))throw new Error("Invalid argument");if(this._lines.length===0)return e.with(0,0);let{line:n,character:o}=e,i=!1;if(n<0)n=0,o=0,i=!0;else if(n>=this._lines.length)n=this._lines.length-1,o=this._lines[n].length,i=!0;else{let s=this._lines[n].length;o<0?(o=0,i=!0):o>s&&(o=s,i=!0)}return i?new we(n,o):e}_getWordRangeAtPosition(e,n){let o=this._validatePosition(e);if(!n)n=Kz(this._languageId);else if(Vv(n))throw new Error(`[getWordRangeAtPosition]: ignoring custom regexp '${n.source}' because it matches the empty string.`);let i=WP(o.character+1,VP(n),this._lines[o.line],0);if(i)return new Se(o.line,i.startColumn-1,o.line,i.endColumn-1)}},jL=class{constructor(t,e,n){this._line=t,this._text=e,this._isLastLine=n}get lineNumber(){return this._line}get text(){return this._text}get range(){return new Se(this._line,0,this._line,this._text.length)}get rangeIncludingLineBreak(){return this._isLastLine?this.range:new Se(this._line,0,this._line+1,0)}get firstNonWhitespaceCharacterIndex(){return/^(\s*)/.exec(this._text)[1].length}get isEmptyOrWhitespace(){return this.firstNonWhitespaceCharacterIndex===this._text.length}};var Ul=class{constructor(t){this._prefix=t,this._lastId=0}nextId(){return this._prefix+ ++this._lastId}},hFe=new Ul("id#");var Ex=class r{static{this._Keys=new Ul("TextEditorDecorationType")}constructor(t,e,n){let o=r._Keys.nextId();t.$registerTextEditorDecorationType(e.identifier,o,CE.from(n)),this.value=Object.freeze({key:o,dispose(){t.$removeTextEditorDecorationType(o)}})}},QL=class{constructor(t,e){this._collectedEdits=[];this._setEndOfLine=void 0;this._finalized=!1;this._document=t,this._documentVersionId=t.version,this._undoStopBefore=e.undoStopBefore,this._undoStopAfter=e.undoStopAfter}finalize(){return this._finalized=!0,{documentVersionId:this._documentVersionId,edits:this._collectedEdits,setEndOfLine:this._setEndOfLine,undoStopBefore:this._undoStopBefore,undoStopAfter:this._undoStopAfter}}_throwIfFinalized(){if(this._finalized)throw new Error("Edit is only valid while callback runs")}replace(t,e){this._throwIfFinalized();let n=null;if(t instanceof we)n=new Se(t,t);else if(t instanceof Se)n=t;else throw new Error("Unrecognized location");this._pushEdit(n,e,!1)}insert(t,e){this._throwIfFinalized(),this._pushEdit(new Se(t,t),e,!0)}delete(t){this._throwIfFinalized();let e=null;if(t instanceof Se)e=t;else throw new Error("Unrecognized location");this._pushEdit(e,null,!0)}_pushEdit(t,e,n){let o=this._document.validateRange(t);this._collectedEdits.push({range:o,text:e,forceMoveMarkers:n})}setEndOfLine(t){if(this._throwIfFinalized(),t!==1&&t!==2)throw Be("endOfLine");this._setEndOfLine=t}},XL=class{constructor(t,e,n,o){this._proxy=t,this._id=e,this._accept(n),this._logService=o;let i=this;this.value={get tabSize(){return i._tabSize},set tabSize(s){i._setTabSize(s)},get indentSize(){return i._indentSize},set indentSize(s){i._setIndentSize(s)},get insertSpaces(){return i._insertSpaces},set insertSpaces(s){i._setInsertSpaces(s)},get cursorStyle(){return i._cursorStyle},set cursorStyle(s){i._setCursorStyle(s)},get lineNumbers(){return i._lineNumbers},set lineNumbers(s){i._setLineNumbers(s)}}}_accept(t){this._tabSize=t.tabSize,this._indentSize=t.indentSize,this._originalIndentSize=t.originalIndentSize,this._insertSpaces=t.insertSpaces,this._cursorStyle=t.cursorStyle,this._lineNumbers=lc.to(t.lineNumbers)}_validateTabSize(t){if(t==="auto")return"auto";if(typeof t=="number"){let e=Math.floor(t);return e>0?e:null}if(typeof t=="string"){let e=parseInt(t,10);return isNaN(e)?null:e>0?e:null}return null}_setTabSize(t){let e=this._validateTabSize(t);if(e!==null){if(typeof e=="number"){if(this._tabSize===e)return;this._tabSize=e}this._warnOnError("setTabSize",this._proxy.$trySetOptions(this._id,{tabSize:e}))}}_validateIndentSize(t){if(t==="tabSize")return"tabSize";if(typeof t=="number"){let e=Math.floor(t);return e>0?e:null}if(typeof t=="string"){let e=parseInt(t,10);return isNaN(e)?null:e>0?e:null}return null}_setIndentSize(t){let e=this._validateIndentSize(t);if(e!==null){if(typeof e=="number"){if(this._originalIndentSize===e)return;this._indentSize=e,this._originalIndentSize=e}this._warnOnError("setIndentSize",this._proxy.$trySetOptions(this._id,{indentSize:e}))}}_validateInsertSpaces(t){return t==="auto"?"auto":t==="false"?!1:!!t}_setInsertSpaces(t){let e=this._validateInsertSpaces(t);if(typeof e=="boolean"){if(this._insertSpaces===e)return;this._insertSpaces=e}this._warnOnError("setInsertSpaces",this._proxy.$trySetOptions(this._id,{insertSpaces:e}))}_setCursorStyle(t){this._cursorStyle!==t&&(this._cursorStyle=t,this._warnOnError("setCursorStyle",this._proxy.$trySetOptions(this._id,{cursorStyle:t})))}_setLineNumbers(t){this._lineNumbers!==t&&(this._lineNumbers=t,this._warnOnError("setLineNumbers",this._proxy.$trySetOptions(this._id,{lineNumbers:lc.from(t)})))}assign(t){let e={},n=!1;if(typeof t.tabSize<"u"){let o=this._validateTabSize(t.tabSize);o==="auto"?(n=!0,e.tabSize=o):typeof o=="number"&&this._tabSize!==o&&(this._tabSize=o,n=!0,e.tabSize=o)}if(typeof t.indentSize<"u"){let o=this._validateIndentSize(t.indentSize);o==="tabSize"?(n=!0,e.indentSize=o):typeof o=="number"&&this._originalIndentSize!==o&&(this._indentSize=o,this._originalIndentSize=o,n=!0,e.indentSize=o)}if(typeof t.insertSpaces<"u"){let o=this._validateInsertSpaces(t.insertSpaces);o==="auto"?(n=!0,e.insertSpaces=o):this._insertSpaces!==o&&(this._insertSpaces=o,n=!0,e.insertSpaces=o)}typeof t.cursorStyle<"u"&&this._cursorStyle!==t.cursorStyle&&(this._cursorStyle=t.cursorStyle,n=!0,e.cursorStyle=t.cursorStyle),typeof t.lineNumbers<"u"&&this._lineNumbers!==t.lineNumbers&&(this._lineNumbers=t.lineNumbers,n=!0,e.lineNumbers=lc.from(t.lineNumbers)),n&&this._warnOnError("setOptions",this._proxy.$trySetOptions(this._id,e))}_warnOnError(t,e){e.catch(n=>{this._logService.warn(`ExtHostTextEditorOptions '${t}' failed:'`),this._logService.warn(n)})}},Sx=class{constructor(t,e,n,o,i,s,a,l){this.id=t;this._proxy=e;this._logService=n;this._disposed=!1;this._hasDecorationsForKey=new Set;this._selections=i,this._options=new XL(this._proxy,this.id,s,n),this._visibleRanges=a,this._viewColumn=l;let d=this;this.value=Object.freeze({get document(){return o.value},set document(c){throw new Nr("document")},get selection(){return d._selections&&d._selections[0]},set selection(c){if(!(c instanceof Nn))throw Be("selection");d._selections=[c],d._trySetSelection()},get selections(){return d._selections},set selections(c){if(!Array.isArray(c)||c.some(u=>!(u instanceof Nn)))throw Be("selections");c.length===0&&(c=[new Nn(0,0,0,0)]),d._selections=c,d._trySetSelection()},get visibleRanges(){return d._visibleRanges},set visibleRanges(c){throw new Nr("visibleRanges")},get diffInformation(){return d._diffInformation},get options(){return d._options.value},set options(c){d._disposed||d._options.assign(c)},get viewColumn(){return d._viewColumn},set viewColumn(c){throw new Nr("viewColumn")},edit(c,u={undoStopBefore:!0,undoStopAfter:!0}){if(d._disposed)return Promise.reject(new Error("TextEditor#edit not possible on closed editors"));let f=new QL(o.value,u);return c(f),d._applyEdit(f)},insertSnippet(c,u,f={undoStopBefore:!0,undoStopAfter:!0}){if(d._disposed)return Promise.reject(new Error("TextEditor#insertSnippet not possible on closed editors"));let g;if(!u||Array.isArray(u)&&u.length===0)g=d._selections.map(I=>j.from(I));else if(u instanceof we){let{lineNumber:I,column:h}=st.from(u);g=[{startLineNumber:I,startColumn:h,endLineNumber:I,endColumn:h}]}else if(u instanceof Se)g=[j.from(u)];else{g=[];for(let I of u)if(I instanceof Se)g.push(j.from(I));else{let{lineNumber:h,column:C}=st.from(I);g.push({startLineNumber:h,startColumn:C,endLineNumber:h,endColumn:C})}}return f.keepWhitespace===void 0&&(f.keepWhitespace=!1),e.$tryInsertSnippet(t,o.value.version,c.value,g,f)},setDecorations(c,u){let f=u.length===0;f&&!d._hasDecorationsForKey.has(c.key)||(f?d._hasDecorationsForKey.delete(c.key):d._hasDecorationsForKey.add(c.key),d._runOnProxy(()=>{if(ZR(u))return e.$trySetDecorations(t,c.key,ek(u));{let g=new Array(4*u.length);for(let I=0,h=u.length;I<h;I++){let C=u[I];g[4*I]=C.start.line+1,g[4*I+1]=C.start.character+1,g[4*I+2]=C.end.line+1,g[4*I+3]=C.end.character+1}return e.$trySetDecorationsFast(t,c.key,g)}}))},revealRange(c,u){d._runOnProxy(()=>e.$tryRevealRange(t,j.from(c),u||0))},show(c){e.$tryShowEditor(t,Vt.from(c))},hide(){e.$tryHideEditor(t)},[Symbol.for("debug.description")](){return`TextEditor(${this.document.uri.toString()})`},async showSideHint(c,u,f){let g={text:f.text,languageId:f.languageId,decorations:f.decorations.map(({type:{key:I,options:h},rangesOrOptions:C})=>({key:I,options:CE.from(h),rangesOrOptions:ek(C)}))};await e.$showSideHint(t,st.from(c),u,g)},hideSideHint(){return e.$hideSideHint(t)},showTabToJumpWidget(c,u){let f=c+1;return e.$showTabToJumpWidget(t,f,u)},hideTabToJumpWidget(){return e.$hideTabToJumpWidget(t)},showInlineEdits(c){let u=c.map(f=>un.from(f));return e.$showInlineEdits(t,u)},clearInlineEdits(){return e.$clearInlineEdits(t)}})}dispose(){kn(!this._disposed),this._disposed=!0}_acceptOptions(t){kn(!this._disposed),this._options._accept(t)}_acceptVisibleRanges(t){kn(!this._disposed),this._visibleRanges=t}_acceptViewColumn(t){kn(!this._disposed),this._viewColumn=t}_acceptSelections(t){kn(!this._disposed),this._selections=t}_acceptDiffInformation(t){kn(!this._disposed),this._diffInformation=t}async _trySetSelection(){let t=this._selections.map(oo.from);return await this._runOnProxy(()=>this._proxy.$trySetSelections(this.id,t)),this.value}_applyEdit(t){let e=t.finalize();if(e.edits.length===0&&!e.setEndOfLine)return Promise.resolve(!0);let n=e.edits.map(i=>i.range);n.sort((i,s)=>i.end.line===s.end.line?i.end.character===s.end.character?i.start.line===s.start.line?i.start.character-s.start.character:i.start.line-s.start.line:i.end.character-s.end.character:i.end.line-s.end.line);for(let i=0,s=n.length-1;i<s;i++){let a=n[i].end;if(n[i+1].start.isBefore(a))return Promise.reject(new Error("Overlapping ranges are not allowed!"))}let o=e.edits.map(i=>({range:j.from(i.range),text:i.text,forceMoveMarkers:i.forceMoveMarkers}));return this._proxy.$tryApplyEdits(this.id,e.documentVersionId,o,{setEndOfLine:typeof e.setEndOfLine=="number"?oc.from(e.setEndOfLine):void 0,undoStopBefore:e.undoStopBefore,undoStopAfter:e.undoStopAfter})}_runOnProxy(t){return this._disposed?(this._logService.warn("TextEditor is closed/disposed"),Promise.resolve(void 0)):t().then(()=>this,e=>(e instanceof Error&&e.name==="DISPOSED"||this._logService.warn(e),null))}_setNudge(t,e,n){if(n.length<1)throw new Error("Expected at least one button");this._currentNudgeCallbacks=void 0,this._runOnProxy(()=>this._proxy.$setNudge(this.id,oo.from(t),e,n.map(o=>Dk.from(o)))).then(()=>{this._currentNudgeCallbacks=n.map(o=>o.callback)})}_clearNudge(){this._currentNudgeCallbacks=void 0,this._runOnProxy(()=>this._proxy.$clearNudge(this.id))}_onNudgeButtonPressed(t){if(this._currentNudgeCallbacks===void 0){this._logService.warn("Nudge button pressed but no nudge callbacks set");return}if(t<0||t>=this._currentNudgeCallbacks.length){this._logService.error("Nudge button pressed but button index is out of range");return}this._currentNudgeCallbacks[t]()}};var YL=class{constructor(t){this.value=t;this._count=0}ref(){this._count++}unref(){return--this._count===0}},Im=class{constructor(t,e){this._extHostRpc=t;this._logService=e;this._activeEditorId=null;this._editors=new Map;this._documents=new et;this._onDidAddDocuments=new D;this._onDidRemoveDocuments=new D;this._onDidChangeVisibleTextEditors=new D;this._onDidChangeActiveTextEditor=new D;this.onDidAddDocuments=this._onDidAddDocuments.event;this.onDidRemoveDocuments=this._onDidRemoveDocuments.event;this.onDidChangeVisibleTextEditors=this._onDidChangeVisibleTextEditors.event;this.onDidChangeActiveTextEditor=this._onDidChangeActiveTextEditor.event}$acceptDocumentsAndEditorsDelta(t){this.acceptDocumentsAndEditorsDelta(t)}acceptDocumentsAndEditorsDelta(t){let e=[],n=[],o=[];if(t.removedDocuments)for(let i of t.removedDocuments){let s=E.revive(i),a=this._documents.get(s);a?.unref()&&(this._documents.delete(s),e.push(a.value))}if(t.addedDocuments)for(let i of t.addedDocuments){let s=E.revive(i.uri),a=this._documents.get(s);if(a&&s.scheme!==X.vscodeNotebookCell&&s.scheme!==X.vscodeInteractiveInput)throw new Error(`document '${s} already exists!'`);a||(a=new YL(new yx(this._extHostRpc.getProxy(V.MainThreadDocuments),s,i.lines,i.EOL,i.versionId,i.languageId,i.isDirty,i.encoding)),this._documents.set(s,a),n.push(a.value)),a.ref()}if(t.removedEditors)for(let i of t.removedEditors){let s=this._editors.get(i);this._editors.delete(i),s&&o.push(s)}if(t.addedEditors)for(let i of t.addedEditors){let s=E.revive(i.documentUri);kn(this._documents.has(s),`document '${s}' does not exist`),kn(!this._editors.has(i.id),`editor '${i.id}' already exists!`);let a=this._documents.get(s).value,l=new Sx(i.id,this._extHostRpc.getProxy(V.MainThreadTextEditors),this._logService,new xt(()=>a.document),i.selections.map(oo.to),i.options,i.visibleRanges.map(d=>j.to(d)),typeof i.editorPosition=="number"?Vt.to(i.editorPosition):void 0);this._editors.set(i.id,l)}t.newActiveEditor!==void 0&&(kn(t.newActiveEditor===null||this._editors.has(t.newActiveEditor),`active editor '${t.newActiveEditor}' does not exist`),this._activeEditorId=t.newActiveEditor),Hn(e),Hn(o),t.removedDocuments&&this._onDidRemoveDocuments.fire(e),t.addedDocuments&&this._onDidAddDocuments.fire(n),(t.removedEditors||t.addedEditors)&&this._onDidChangeVisibleTextEditors.fire(this.allEditors().map(i=>i.value)),t.newActiveEditor!==void 0&&this._onDidChangeActiveTextEditor.fire(this.activeEditor())}getDocument(t){return this._documents.get(t)?.value}allDocuments(){return Lt.map(this._documents.values(),t=>t.value)}getEditor(t){return this._editors.get(t)}activeEditor(t){if(!this._activeEditorId)return;let e=this._editors.get(this._activeEditorId);return t?e:e?.value}allEditors(){return[...this._editors.values()]}};Im=L([P(0,Ee),P(1,be)],Im);var fi=N("IExtHostDocumentsAndEditors");var Jz={type:"object",additionalProperties:!1,properties:{type:{type:"string",description:p(13573,null)},required:{type:"array",items:{type:"string"}},properties:{type:"object",description:p(13574,null),additionalProperties:{$ref:"http://json-schema.org/draft-07/schema#"}},when:{type:"string",markdownDescription:p(13575,null),default:""}}},qW;(t=>{function r(e,n,o){if(!e)return;let i=Me(e.type)?e.type:void 0;if(!i||i.length===0){o.error(p(13577,null));return}let s=[];if(Array.isArray(e.required))for(let a of e.required)Me(a)&&s.push(a);return{extensionId:n.value,taskType:i,required:s,properties:e.properties?St(e.properties):{},when:e.when?Ut.deserialize(e.when):void 0}}t.from=r})(qW||={});var jz=II.registerExtensionPoint({extensionPoint:"taskDefinitions",activationEventsGenerator:function*(r){for(let t of r)t.type&&(yield`onTaskType:${t.type}`)},jsonSchema:{description:p(13576,null),type:"array",items:Jz}}),ZL=class{constructor(){this._onDefinitionsChanged=new D;this.onDefinitionsChanged=this._onDefinitionsChanged.event;this.taskTypes=Object.create(null),this.readyPromise=new Promise((t,e)=>{jz.setHandler((n,o)=>{this._schema=void 0;try{for(let i of o.removed){let s=i.value;for(let a of s)this.taskTypes&&a.type&&this.taskTypes[a.type]&&delete this.taskTypes[a.type]}for(let i of o.added){let s=i.value;for(let a of s){let l=qW.from(a,i.description.identifier,i.collector);l&&(this.taskTypes[l.taskType]=l)}}(o.removed.length>0||o.added.length>0)&&this._onDefinitionsChanged.fire()}catch{}t(void 0)})})}onReady(){return this.readyPromise}get(t){return this.taskTypes[t]}all(){return Object.keys(this.taskTypes).map(t=>this.taskTypes[t])}getJsonSchema(){if(this._schema===void 0){let t=[];for(let e of this.all()){let n={type:"object",additionalProperties:!1};e.required.length>0&&(n.required=e.required.slice(0)),e.properties!==void 0?n.properties=St(e.properties):n.properties=Object.create(null),n.properties.type={type:"string",enum:[e.taskType]},t.push(n)}this._schema={oneOf:t}}return this._schema}},KW=new ZL;var Qz={IconContribution:"base.contributions.icons"},Xz;(t=>{function r(e,n){let o=e.defaults;for(;Tt.isThemeIcon(o);){let i=ym.getIcon(o.id);if(!i)return;o=i.defaults}return o}t.getDefinition=r})(Xz||={});var Yz;(e=>{function r(n){return{weight:n.weight,style:n.style,src:n.src.map(o=>({format:o.format,location:o.location.toString()}))}}e.toJSONObject=r;function t(n){let o=i=>Me(i)?i:void 0;if(n&&Array.isArray(n.src)&&n.src.every(i=>Me(i.format)&&Me(i.location)))return{weight:o(n.weight),style:o(n.style),src:n.src.map(i=>({format:i.format,location:E.parse(i.location)}))}}e.fromJSONObject=t})(Yz||={});var Zz=/^([\w_-]+)$/;var eq=p(2621,null),eM=class extends K{constructor(){super();this._onDidChange=this._register(new D);this.onDidChange=this._onDidChange.event;this.iconSchema={definitions:{icons:{type:"object",properties:{fontId:{type:"string",description:p(2618,null),pattern:Zz.source,patternErrorMessage:eq},fontCharacter:{type:"string",description:p(2617,null)}},additionalProperties:!1,defaultSnippets:[{body:{fontCharacter:"\\\\e030"}}]}},type:"object",properties:{}};this.iconReferenceSchema={type:"string",pattern:`^${Tt.iconNameExpression}$`,enum:[],enumDescriptions:[]};this.iconsById={},this.iconFontsById={}}registerIcon(e,n,o,i){let s=this.iconsById[e];if(s){if(o&&!s.description){s.description=o,this.iconSchema.properties[e].markdownDescription=`${o} $(${e})`;let d=this.iconReferenceSchema.enum.indexOf(e);d!==-1&&(this.iconReferenceSchema.enumDescriptions[d]=o),this._onDidChange.fire()}return s}let a={id:e,description:o,defaults:n,deprecationMessage:i};this.iconsById[e]=a;let l={$ref:"#/definitions/icons"};return i&&(l.deprecationMessage=i),o&&(l.markdownDescription=`${o}: $(${e})`),this.iconSchema.properties[e]=l,this.iconReferenceSchema.enum.push(e),this.iconReferenceSchema.enumDescriptions.push(o||""),this._onDidChange.fire(),{id:e}}deregisterIcon(e){delete this.iconsById[e],delete this.iconSchema.properties[e];let n=this.iconReferenceSchema.enum.indexOf(e);n!==-1&&(this.iconReferenceSchema.enum.splice(n,1),this.iconReferenceSchema.enumDescriptions.splice(n,1)),this._onDidChange.fire()}getIcons(){return Object.keys(this.iconsById).map(e=>this.iconsById[e])}getIcon(e){return this.iconsById[e]}getIconSchema(){return this.iconSchema}getIconReferenceSchema(){return this.iconReferenceSchema}registerIconFont(e,n){let o=this.iconFontsById[e];return o||(this.iconFontsById[e]=n,this._onDidChange.fire(),n)}deregisterIconFont(e){delete this.iconFontsById[e]}getIconFont(e){return this.iconFontsById[e]}toString(){let e=(s,a)=>s.id.localeCompare(a.id),n=s=>{for(;Tt.isThemeIcon(s.defaults);)s=this.iconsById[s.defaults.id];return`codicon codicon-${s?s.id:""}`},o=[];o.push("| preview     | identifier                        | default codicon ID                | description"),o.push("| ----------- | --------------------------------- | --------------------------------- | --------------------------------- |");let i=Object.keys(this.iconsById).map(s=>this.iconsById[s]);for(let s of i.filter(a=>!!a.description).sort(e))o.push(`|<i class="${n(s)}"></i>|${s.id}|${Tt.isThemeIcon(s.defaults)?s.defaults.id:s.id}|${s.description||""}|`);o.push("| preview     | identifier                        "),o.push("| ----------- | --------------------------------- |");for(let s of i.filter(a=>!Tt.isThemeIcon(a.defaults)).sort(e))o.push(`|<i class="${n(s)}"></i>|${s.id}|`);return o.join(`
`)}},ym=new eM;ht.add(Qz.IconContribution,ym);function Sc(r,t,e,n){return ym.registerIcon(r,t,e,n)}function tq(){let r=EF();for(let t in r){let e="\\"+r[t].toString(16);ym.registerIcon(t,{fontCharacter:e})}}tq();var jW="vscode://schemas/icons",QW=ht.as(wd.JSONContribution);QW.registerSchema(jW,ym.getIconSchema());var JW=new ho(()=>QW.notifySchemaChanged(jW),200);ym.onDidChange(()=>{JW.isScheduled()||JW.schedule()});var l2e=Sc("widget-close",fe.close,p(2622,null)),d2e=Sc("goto-previous-location",fe.arrowUp,p(2620,null)),c2e=Sc("goto-next-location",fe.arrowDown,p(2619,null)),u2e=Tt.modify(fe.sync,"spin"),p2e=Tt.modify(fe.loading,"spin");var XW="settings",y2e=new w("taskRunning",!1,p(13580,null)),E2e=new w("taskTerminalActive",!1,p(13582,null)),S2e=od(13581,"Tasks"),nM=(n=>(n[n.Escape=1]="Escape",n[n.Strong=2]="Strong",n[n.Weak=3]="Weak",n))(nM||{});(t=>{function r(e){if(!e)return 2;switch(e.toLowerCase()){case"escape":return 1;case"strong":return 2;case"weak":return 3;default:return 2}}t.from=r})(nM||={});var nq;(t=>t.defaults={cwd:"${workspaceFolder}"})(nq||={});var oM=(n=>(n[n.Always=1]="Always",n[n.Silent=2]="Silent",n[n.Never=3]="Never",n))(oM||{});(t=>{function r(e){switch(e.toLowerCase()){case"always":return 1;case"silent":return 2;case"never":return 3;default:return 1}}t.fromString=r})(oM||={});var rM=(n=>(n[n.Never=1]="Never",n[n.OnProblem=2]="OnProblem",n[n.Always=3]="Always",n))(rM||{});(t=>{function r(e){switch(e.toLowerCase()){case"always":return 3;case"never":return 1;case"onproblem":return 2;default:return 2}}t.fromString=r})(rM||={});var iM=(n=>(n[n.Shared=1]="Shared",n[n.Dedicated=2]="Dedicated",n[n.New=3]="New",n))(iM||{});(t=>{function r(e){switch(e.toLowerCase()){case"shared":return 1;case"dedicated":return 2;case"new":return 3;default:return 1}}t.fromString=r})(iM||={});var oq;(t=>t.defaults={echo:!0,reveal:1,revealProblems:1,focus:!1,panel:1,showReuseMessage:!0,clear:!1,preserveTerminalName:!1})(oq||={});var sM=(n=>(n[n.Shell=1]="Shell",n[n.Process=2]="Process",n[n.CustomExecution=3]="CustomExecution",n))(sM||{});(e=>{function r(n){switch(n.toLowerCase()){case"shell":return 1;case"process":return 2;case"customExecution":return 3;default:return 2}}e.fromString=r;function t(n){switch(n){case 1:return"shell";case 2:return"process";case 3:return"customExecution";default:return"process"}}e.toString=t})(sM||={});var rq;(t=>{function r(e){return Me(e)?e:e.value}t.value=r})(rq||={});var iq;(s=>{s.Clean={_id:"clean",isDefault:!1},s.Build={_id:"build",isDefault:!1},s.Rebuild={_id:"rebuild",isDefault:!1},s.Test={_id:"test",isDefault:!1};function o(a){return a===s.Clean._id||a===s.Build._id||a===s.Rebuild._id||a===s.Test._id}s.is=o;function i(a){if(a!==void 0)return Me(a)?o(a)?{_id:a,isDefault:!1}:void 0:a}s.from=i})(iq||={});var sq;(s=>{s.Workspace="workspace",s.Extension="extension",s.InMemory="inMemory",s.WorkspaceFile="workspaceFile",s.User="user";function i(a){switch(a){case s.User:return 2;case s.WorkspaceFile:return 5;default:return 6}}s.toConfigurationTarget=i})(sq||={});var aq;(t=>t.defaults={reevaluateOnRerun:!0,runOn:1,instanceLimit:1,instancePolicy:"prompt"})(aq||={});var aM=(e=>(e[e.Process=1]="Process",e[e.Terminal=2]="Terminal",e))(aM||{});(t=>t._default=2)(aM||={});var lq;(d=>{function r(c){return{taskId:c._id,taskName:c.configurationProperties.name,runType:c.configurationProperties.isBackground?"background":"singleRun",group:c.configurationProperties.group,__task:c}}function t(c,u,f){return{...r(c),kind:"start",terminalId:u,resolvedVariables:f}}d.start=t;function e(c,u,f){return{...r(c),kind:"processStarted",terminalId:u,processId:f}}d.processStarted=e;function n(c,u,f,g){return{...r(c),kind:"processEnded",terminalId:u,exitCode:f,durationMs:g}}d.processEnded=n;function o(c,u,f){return{...r(c),kind:"inactive",terminalId:u,durationMs:f}}d.inactive=o;function i(c,u,f){return{...r(c),kind:"terminated",exitReason:f,terminalId:u}}d.terminated=i;function s(c,u,f){return{...r(u),kind:c,terminalId:f}}d.general=s;function a(c,u,f){return{...r(c),kind:"problemMatcherEnded",hasErrors:u}}d.problemMatcherEnded=a;function l(){return{kind:"changed"}}d.changed=l})(lq||={});var tM;(e=>{function r(n){let o=Object.keys(n).sort(),i="";for(let s of o){let a=n[s];a instanceof Object?a=r(a):typeof a=="string"&&(a=a.replace(/,/g,",,")),i+=s+","+a+","}return i}function t(n){let i={_key:r(n),type:n.taskType};return Object.assign(i,n),i}e.create=t})(tM||={});var dq;(t=>{function r(e,n){let o=KW.get(e.type);if(o===void 0){let l=St(e);return delete l._key,tM.create(l)}let i=Object.create(null);i.type=o.taskType;let s=new Set;o.required.forEach(l=>s.add(l));let a=o.properties;for(let l of Object.keys(a)){let d=e[l];if(d!=null)i[l]=d;else if(s.has(l)){let c=a[l];if(c.default!==void 0)i[l]=St(c.default);else switch(c.type){case"boolean":i[l]=!1;break;case"number":case"integer":i[l]=0;break;case"string":i[l]="";break;default:n.error(p(13579,null,JSON.stringify(e,void 0,0),l));return}}}return tM.create(i)}t.createTaskIdentifier=r})(dq||={});var x2e=Sc("rerun-task",fe.refresh,p(13578,null));var lM;(e=>{function r(n){if(n!=null)return n}e.from=r;function t(n){if(n!=null)return n}e.to=t})(lM||={});var dM;(e=>{function r(n){if(n!=null)return n}e.from=r;function t(n){if(n!=null)return n}e.to=t})(dM||={});var YW;(e=>{function r(n){if(n!=null)return n}e.from=r;function t(n){if(n!=null)return n}e.to=t})(YW||={});var xx;(n=>{function r(o){if(o){let i=o;return i&&!!i.process}else return!1}n.is=r;function t(o){if(o==null)return;let i={process:o.process,args:o.args};return o.options&&(i.options=YW.from(o.options)),i}n.from=t;function e(o){if(o!=null)return new $i(o.process,o.args,o.options)}n.to=e})(xx||={});var ZW;(e=>{function r(n){if(n!=null)return n}e.from=r;function t(n){if(n!=null)return n}e.to=t})(ZW||={});var Cx;(n=>{function r(o){if(o){let i=o;return i&&(!!i.commandLine||!!i.command)}else return!1}n.is=r;function t(o){if(o==null)return;let i={};return o.commandLine!==void 0?i.commandLine=o.commandLine:(i.command=o.command,i.args=o.args),o.options&&(i.options=ZW.from(o.options)),i}n.from=t;function e(o){if(!(o==null||o.command===void 0&&o.commandLine===void 0))return o.commandLine?new oi(o.commandLine,o.options):new oi(o.command,o.args?o.args:[],o.options)}n.to=e})(Cx||={});var Fl;(n=>{function r(o){if(o){let i=o;return i&&i.customExecution==="customExecution"}else return!1}n.is=r;function t(o){return{customExecution:"customExecution"}}n.from=t;function e(o,i){return i.get(o)}n.to=e})(Fl||={});var cq;(t=>{function r(e,n){let o;return e.scope!==void 0&&typeof e.scope!="number"?o=e.scope.uri:e.scope!==void 0&&typeof e.scope=="number"&&(e.scope===2&&n&&n.workspaceFile?o=n.workspaceFile:o=XW),{id:e._id,workspaceFolder:o}}t.from=r})(cq||={});var e5;(t=>{function r(e){if(e!=null)return{_id:e.id,isDefault:e.isDefault}}t.from=r})(e5||={});var xc;(n=>{function r(o,i){if(o==null)return[];let s=[];for(let a of o){let l=t(a,i);l&&s.push(l)}return s}n.fromMany=r;function t(o,i){if(o==null)return;let s;o.execution instanceof $i?s=xx.from(o.execution):o.execution instanceof oi?s=Cx.from(o.execution):o.execution&&o.execution instanceof Gd&&(s=Fl.from(o.execution));let a=lM.from(o.definition),l;return o.scope?typeof o.scope=="number"?l=o.scope:l=o.scope.uri:l=2,!a||!l?void 0:{_id:o._id,definition:a,name:o.name,source:{extensionId:i.identifier.value,label:o.source,scope:l},execution:s,isBackground:o.isBackground,group:e5.from(o.group),presentationOptions:dM.from(o.presentationOptions),problemMatchers:Rn(o.problemMatchers),hasDefinedMatchers:o.hasDefinedMatchers,runOptions:o.runOptions?o.runOptions:{reevaluateOnRerun:!0},detail:o.detail}}n.from=t;async function e(o,i,s){if(o==null)return;let a;xx.is(o.execution)?a=xx.to(o.execution):Cx.is(o.execution)?a=Cx.to(o.execution):Fl.is(o.execution)&&(a=Fl.to(o._id,s));let l=lM.to(o.definition),d;if(o.source&&(o.source.scope!==void 0?typeof o.source.scope=="number"?d=o.source.scope:d=await i.resolveWorkspaceFolder(E.revive(o.source.scope)):d=2),!l||!d)return;let c=new _n(l,d,o.name,o.source.label,a,o.problemMatchers);return o.isBackground!==void 0&&(c.isBackground=o.isBackground),o.group!==void 0&&(c.group=yn.from(o.group._id),c.group&&o.group.isDefault&&(c.group=new yn(c.group.id,c.group.label),o.group.isDefault===!0&&(c.group.isDefault=o.group.isDefault))),o.presentationOptions&&(c.presentationOptions=dM.to(o.presentationOptions)),o._id&&(c._id=o._id),o.detail&&(c.detail=o.detail),c}n.to=e})(xc||={});var t5;(e=>{function r(n){return n}e.from=r;function t(n){if(n)return Object.assign(Object.create(null),n)}e.to=t})(t5||={});var Uh=class{constructor(t,e,n){this._id=e;this._task=n;this.#e=t}#e;get task(){return this._task}terminate(){this.#e.terminateTask(this)}fireDidStartProcess(t){}fireDidEndProcess(t){}get terminal(){return this._terminal}set terminal(t){this._terminal=t}},Nh=class{constructor(t,e,n,o,i,s,a,l){this._onDidExecuteTask=new D;this._onDidTerminateTask=new D;this._onDidTaskProcessStarted=new D;this._onDidTaskProcessEnded=new D;this._onDidStartTaskProblemMatchers=new D;this._onDidEndTaskProblemMatchers=new D;this._proxy=t.getProxy(V.MainThreadTask),this._workspaceProvider=n,this._editorService=o,this._configurationService=i,this._terminalService=s,this._handleCounter=0,this._handlers=new Map,this._taskExecutions=new Map,this._taskExecutionPromises=new Map,this._providedCustomExecutions2=new Map,this._notProvidedCustomExecutions=new Set,this._activeCustomExecutions2=new Map,this._logService=a,this._deprecationService=l,this._proxy.$registerSupportedExecutions(!0)}registerTaskProvider(t,e,n){if(!n)return new Ce(()=>{});let o=this.nextHandle();return this._handlers.set(o,{type:e,provider:n,extension:t}),this._proxy.$registerTaskProvider(o,e),new Ce(()=>{this._handlers.delete(o),this._proxy.$unregisterTaskProvider(o)})}registerTaskSystem(t,e){this._proxy.$registerTaskSystem(t,e)}fetchTasks(t){return this._proxy.$fetchTasks(t5.from(t)).then(async e=>{let n=[];for(let o of e){let i=await xc.to(o,this._workspaceProvider,this._providedCustomExecutions2);i&&n.push(i)}return n})}get taskExecutions(){let t=[];return this._taskExecutions.forEach(e=>t.push(e)),t}terminateTask(t){if(!(t instanceof Uh))throw new Error("No valid task execution provided");return this._proxy.$terminateTask(t._id)}get onDidStartTask(){return this._onDidExecuteTask.event}async $onDidStartTask(t,e,n){let o=this._providedCustomExecutions2.get(t.id);o&&(this._activeCustomExecutions2.set(t.id,o),this._terminalService.attachPtyToTerminal(e,await o.callback(n))),this._lastStartedTask=t.id;let i=await this.getTaskExecution(t),s=this._terminalService.getTerminalById(e)?.value;i&&(i.terminal=s),this._onDidExecuteTask.fire({execution:i})}get onDidEndTask(){return this._onDidTerminateTask.event}async $OnDidEndTask(t){if(!this._taskExecutionPromises.has(t.id))return;let e=await this.getTaskExecution(t);this._taskExecutionPromises.delete(t.id),this._taskExecutions.delete(t.id),this.customExecutionComplete(t),this._onDidTerminateTask.fire({execution:e})}get onDidStartTaskProcess(){return this._onDidTaskProcessStarted.event}async $onDidStartTaskProcess(t){let e=await this.getTaskExecution(t.id);this._onDidTaskProcessStarted.fire({execution:e,processId:t.processId})}get onDidEndTaskProcess(){return this._onDidTaskProcessEnded.event}async $onDidEndTaskProcess(t){let e=await this.getTaskExecution(t.id);this._onDidTaskProcessEnded.fire({execution:e,exitCode:t.exitCode})}get onDidStartTaskProblemMatchers(){return this._onDidStartTaskProblemMatchers.event}async $onDidStartTaskProblemMatchers(t){let e;try{e=await this.getTaskExecution(t.execution.id)}catch{return}this._onDidStartTaskProblemMatchers.fire({execution:e})}get onDidEndTaskProblemMatchers(){return this._onDidEndTaskProblemMatchers.event}async $onDidEndTaskProblemMatchers(t){let e;try{e=await this.getTaskExecution(t.execution.id)}catch{return}this._onDidEndTaskProblemMatchers.fire({execution:e,hasErrors:t.hasErrors})}$provideTasks(t,e){let n=this._handlers.get(t);if(!n)return Promise.reject(new Error("no handler found"));let o=[],i=dn(()=>n.provider.provideTasks(De.None)).then(s=>this.provideTasksInternal(e,o,n,s));return new Promise(s=>{i.then(a=>{Promise.all(o).then(()=>{s(a)})})})}async $resolveTask(t,e){let n=this._handlers.get(t);if(!n)return Promise.reject(new Error("no handler found"));if(e.definition.type!==n.type)throw new Error(`Unexpected: Task of type [${e.definition.type}] cannot be resolved by provider of type [${n.type}].`);let o=await xc.to(e,this._workspaceProvider,this._providedCustomExecutions2);if(!o)throw new Error("Unexpected: Task cannot be resolved.");let i=await n.provider.resolveTask(o,De.None);if(!i)return;this.checkDeprecation(i,n);let s=xc.from(i,n.extension);if(!s)throw new Error("Unexpected: Task cannot be resolved.");if(i.definition!==o.definition)throw new Error("Unexpected: The resolved task definition must be the same object as the original task definition. The task definition cannot be changed.");return Fl.is(s.execution)&&await this.addCustomExecution(s,i,!0),await this.resolveTaskInternal(s)}nextHandle(){return this._handleCounter++}async addCustomExecution(t,e,n){let o=await this._proxy.$createTaskId(t);!n&&!this._providedCustomExecutions2.has(o)&&(this._notProvidedCustomExecutions.add(o),this._activeCustomExecutions2.set(o,e.execution)),this._providedCustomExecutions2.set(o,e.execution)}async getTaskExecution(t,e){if(typeof t=="string"){let i=this._taskExecutionPromises.get(t);if(!i)throw new dr("Unexpected: The specified task is missing an execution");return i}let n=this._taskExecutionPromises.get(t.id);if(n)return n;let o;return e?o=Promise.resolve(new Uh(this,t.id,e)):o=xc.to(t.task,this._workspaceProvider,this._providedCustomExecutions2).then(i=>{if(!i)throw new dr("Unexpected: Task does not exist.");return new Uh(this,t.id,i)}),this._taskExecutionPromises.set(t.id,o),o.then(i=>(this._taskExecutions.set(t.id,i),i))}checkDeprecation(t,e){t._deprecated&&this._deprecationService.report("Task.constructor",e.extension,"Use the Task constructor that takes a `scope` instead.")}customExecutionComplete(t){this._activeCustomExecutions2.get(t.id)&&this._activeCustomExecutions2.delete(t.id),this._notProvidedCustomExecutions.has(t.id)&&this._lastStartedTask!==t.id&&(this._providedCustomExecutions2.delete(t.id),this._notProvidedCustomExecutions.delete(t.id));let n=this._notProvidedCustomExecutions.values(),o=n.next();for(;!o.done;)!this._activeCustomExecutions2.has(o.value)&&this._lastStartedTask!==o.value&&(this._providedCustomExecutions2.delete(o.value),this._notProvidedCustomExecutions.delete(o.value)),o=n.next()}};Nh=L([P(0,Ee),P(1,Et),P(2,_o),P(3,fi),P(4,Po),P(5,ui),P(6,be),P(7,sa)],Nh);var Em=class extends Nh{constructor(t,e,n,o,i,s,a,l){super(t,e,n,o,i,s,a,l),this.registerTaskSystem(X.vscodeRemote,{scheme:X.vscodeRemote,authority:"",platform:T_(0)})}async executeTask(t,e){if(!e.execution)throw new Error("Tasks to execute must include an execution");let n=xc.from(e,t);if(n===void 0)throw new Error("Task is not valid");if(Fl.is(n.execution))await this.addCustomExecution(n,e,!1);else throw new Yl;let o=await this.getTaskExecution(await this._proxy.$getTaskExecution(n),e);return this._proxy.$executeTask(n).catch(i=>{throw new Error(i)}),o}provideTasksInternal(t,e,n,o){let i=[];if(o)for(let s of o){if(this.checkDeprecation(s,n),!s.definition||!t[s.definition.type]){let l=s.source?s.source:"No task source";this._logService.warn(`The task [${l}, ${s.name}] uses an undefined task type. The task will be ignored in the future.`)}let a=xc.from(s,n.extension);a&&Fl.is(a.execution)?(i.push(a),e.push(this.addCustomExecution(a,s,!0))):this._logService.warn("Only custom execution tasks supported.")}return{tasks:i,extension:n.extension}}async resolveTaskInternal(t){if(Fl.is(t.execution))return t;this._logService.warn("Only custom execution tasks supported.")}async $resolveVariables(t,e){return{process:void 0,variables:Object.create(null)}}async $jsonTasksSupported(){return!1}async $findExecutable(t,e,n){}};Em=L([P(0,Ee),P(1,Et),P(2,_o),P(3,fi),P(4,Po),P(5,ui),P(6,be),P(7,sa)],Em);var Tx=N("IExtHostTask");var _x=class{constructor(){this.pendingRequests=new Map;this.queue=[];this._onError=new D;this._onExit=new D;this.sequence=1}get onError(){return this._onError.event}get onExit(){return this._onExit.event}onMessage(t){this.messageCallback&&this._onError.fire(new Error("attempt to set more than one 'Message' callback")),this.messageCallback=t}onEvent(t){this.eventCallback&&this._onError.fire(new Error("attempt to set more than one 'Event' callback")),this.eventCallback=t}onRequest(t){this.requestCallback&&this._onError.fire(new Error("attempt to set more than one 'Request' callback")),this.requestCallback=t}sendResponse(t){t.seq>0?this._onError.fire(new Error(`attempt to send more than one response for command ${t.command}`)):this.internalSend("response",t)}sendRequest(t,e,n,o){let i={command:t};if(e&&Object.keys(e).length>0&&(i.arguments=e),this.internalSend("request",i),typeof o=="number"){let s=setTimeout(()=>{clearTimeout(s);let a=this.pendingRequests.get(i.seq);if(a){this.pendingRequests.delete(i.seq);let l={type:"response",seq:0,request_seq:i.seq,success:!1,command:t,message:p(8642,null,o,t)};a(l)}},o)}return n&&this.pendingRequests.set(i.seq,n),i.seq}acceptMessage(t){this.messageCallback?this.messageCallback(t):(this.queue.push(t),this.queue.length===1&&this.processQueue())}needsTaskBoundaryBetween(t,e){return t.type!=="event"||e.type!=="event"}async processQueue(){let t;for(;this.queue.length;){if((!t||this.needsTaskBoundaryBetween(this.queue[0],t))&&await Qn(0),t=this.queue.shift(),!t)return;switch(t.type){case"event":this.eventCallback?.(t);break;case"request":this.requestCallback?.(t);break;case"response":{let e=t,n=this.pendingRequests.get(e.request_seq);n&&(this.pendingRequests.delete(e.request_seq),n(e));break}}}}internalSend(t,e){e.type=t,e.seq=this.sequence++,this.sendMessage(e)}async cancelPendingRequests(){if(this.pendingRequests.size===0)return Promise.resolve();let t=new Map;this.pendingRequests.forEach((e,n)=>t.set(n,e)),await Qn(500),t.forEach((e,n)=>{e({type:"response",seq:0,request_seq:n,success:!1,command:"canceled",message:"canceled"}),this.pendingRequests.delete(n)})}getPendingRequestIds(){return Array.from(this.pendingRequests.keys())}dispose(){this._onError.dispose(),this._onExit.dispose(),this.queue=[]}};function n5(r){return r.type&&(r.label||r.program||r.runtime)}var uq=/^[a-zA-Z][a-zA-Z0-9\+\-\.]+:/;function pq(r){return!!(r&&r.match(uq))}function o5(r){if(typeof r.path=="string"&&!(typeof r.sourceReference=="number"&&r.sourceReference>0)){if(pq(r.path))return E.parse(r.path);if(fs(r.path))return E.file(r.path)}return r.path}function r5(r){if(typeof r.path=="object"){let t=E.revive(r.path);if(t)return t.scheme===X.file?t.fsPath:t.toString()}return r.path}function i5(r,t){let e=t?o5:r5,n=St(r);return a5(n,(o,i)=>{o&&i&&(i.path=e(i))}),n}function s5(r,t){let e=t?o5:r5,n=St(r);return a5(n,(o,i)=>{!o&&i&&(i.path=e(i))}),n}function a5(r,t){switch(r.type){case"event":{let e=r;switch(e.event){case"output":t(!1,e.body.source);break;case"loadedSource":t(!1,e.body.source);break;case"breakpoint":t(!1,e.body.breakpoint.source);break;default:break}break}case"request":{let e=r;switch(e.command){case"setBreakpoints":t(!0,e.arguments.source);break;case"breakpointLocations":t(!0,e.arguments.source);break;case"source":t(!0,e.arguments.source);break;case"gotoTargets":t(!0,e.arguments.source);break;case"launchVSCode":e.arguments.args.forEach(n=>t(!1,n));break;default:break}break}case"response":{let e=r;if(e.success&&e.body)switch(e.command){case"stackTrace":e.body.stackFrames.forEach(n=>t(!1,n.source));break;case"loadedSources":e.body.sources.forEach(n=>t(!1,n));break;case"scopes":e.body.scopes.forEach(n=>t(!1,n.source));break;case"setFunctionBreakpoints":e.body.breakpoints.forEach(n=>t(!1,n.source));break;case"setBreakpoints":e.body.breakpoints.forEach(n=>t(!1,n.source));break;case"disassemble":e.body?.instructions.forEach(o=>t(!1,o.location));break;case"locations":t(!1,e.body?.source);break;default:break}break}}}var aa=N("IExtHostEditorTabs"),Px=class{constructor(t,e,n){this._activeTabIdGetter=n,this._parentGroup=e,this.acceptDtoUpdate(t)}get apiObject(){if(!this._apiObject){let t=this,e={get isActive(){return t._dto.id===t._activeTabIdGetter()},get label(){return t._dto.label},get input(){return t._input},get isDirty(){return t._dto.isDirty},get isPinned(){return t._dto.isPinned},get isPreview(){return t._dto.isPreview},get group(){return t._parentGroup.apiObject}};this._apiObject=Object.freeze(e)}return this._apiObject}get tabId(){return this._dto.id}acceptDtoUpdate(t){this._dto=t,this._input=this._initInput()}_initInput(){switch(this._dto.input.kind){case 1:return new pl(E.revive(this._dto.input.uri));case 2:return new Hs(E.revive(this._dto.input.original),E.revive(this._dto.input.modified));case 3:return new ep(E.revive(this._dto.input.base),E.revive(this._dto.input.input1),E.revive(this._dto.input.input2),E.revive(this._dto.input.result));case 6:return new ml(E.revive(this._dto.input.uri),this._dto.input.viewType);case 7:return new tp(this._dto.input.viewType);case 4:return new fl(E.revive(this._dto.input.uri),this._dto.input.notebookType);case 5:return new gl(E.revive(this._dto.input.original),E.revive(this._dto.input.modified),this._dto.input.notebookType);case 8:return new np;case 9:return new op(E.revive(this._dto.input.uri),E.revive(this._dto.input.inputBoxUri));case 10:return new rp;case 11:return new ip(this._dto.input.diffEditors.map(t=>new Hs(E.revive(t.original),E.revive(t.modified))));default:return}}},cM=class{constructor(t,e){this._tabs=[];this._activeTabId="";this._dto=t,this._activeGroupIdGetter=e;for(let n of t.tabs)n.isActive&&(this._activeTabId=n.id),this._tabs.push(new Px(n,this,()=>this.activeTabId()))}get apiObject(){if(!this._apiObject){let t=this,e={get isActive(){return t._dto.groupId===t._activeGroupIdGetter()},get viewColumn(){return Vt.to(t._dto.viewColumn)},get activeTab(){return t._tabs.find(n=>n.tabId===t._activeTabId)?.apiObject},get tabs(){return Object.freeze(t._tabs.map(n=>n.apiObject))}};this._apiObject=Object.freeze(e)}return this._apiObject}get groupId(){return this._dto.groupId}get tabs(){return this._tabs}acceptGroupDtoUpdate(t){this._dto=t}acceptTabOperation(t){if(t.kind===0){let n=new Px(t.tabDto,this,()=>this.activeTabId());return this._tabs.splice(t.index,0,n),t.tabDto.isActive&&(this._activeTabId=n.tabId),n}else if(t.kind===1){let n=this._tabs.splice(t.index,1)[0];if(!n)throw new Error(`Tab close updated received for index ${t.index} which does not exist`);return n.tabId===this._activeTabId&&(this._activeTabId=""),n}else if(t.kind===3){if(t.oldIndex===void 0)throw new Error("Invalid old index on move IPC");let n=this._tabs.splice(t.oldIndex,1)[0];if(!n)throw new Error(`Tab move updated received for index ${t.oldIndex} which does not exist`);return this._tabs.splice(t.index,0,n),n}let e=this._tabs.find(n=>n.tabId===t.tabDto.id);if(!e)throw new Error("INVALID tab");return t.tabDto.isActive?this._activeTabId=t.tabDto.id:this._activeTabId===t.tabDto.id&&!t.tabDto.isActive&&(this._activeTabId=""),e.acceptDtoUpdate(t.tabDto),e}activeTabId(){return this._activeTabId}},Sm=class{constructor(t){this._onDidChangeTabs=new D;this._onDidChangeTabGroups=new D;this._extHostTabGroups=[];this._proxy=t.getProxy(V.MainThreadEditorTabs)}get tabGroups(){if(!this._apiObject){let t=this,e={onDidChangeTabGroups:t._onDidChangeTabGroups.event,onDidChangeTabs:t._onDidChangeTabs.event,get all(){return Object.freeze(t._extHostTabGroups.map(n=>n.apiObject))},get activeTabGroup(){let n=t._activeGroupId;return Ur(t._extHostTabGroups.find(i=>i.groupId===n)?.apiObject)},close:async(n,o)=>{let i=Array.isArray(n)?n:[n];return i.length?mq(i[0])?this._closeGroups(i,o):this._closeTabs(i,o):!0}};this._apiObject=Object.freeze(e)}return this._apiObject}$acceptEditorTabModel(t){let e=new Set(this._extHostTabGroups.map(d=>d.groupId)),n=new Set(t.map(d=>d.groupId)),o=e_(e,n),i=this._extHostTabGroups.filter(d=>o.removed.includes(d.groupId)).map(d=>d.apiObject),s=[],a=[];this._extHostTabGroups=t.map(d=>{let c=new cM(d,()=>this._activeGroupId);return o.added.includes(c.groupId)?s.push(c.apiObject):a.push(c.apiObject),c});let l=Ur(t.find(d=>d.isActive===!0)?.groupId);l!==void 0&&this._activeGroupId!==l&&(this._activeGroupId=l),this._onDidChangeTabGroups.fire(Object.freeze({opened:s,closed:i,changed:a}))}$acceptTabGroupUpdate(t){let e=this._extHostTabGroups.find(n=>n.groupId===t.groupId);if(!e)throw new Error("Update Group IPC call received before group creation.");e.acceptGroupDtoUpdate(t),t.isActive&&(this._activeGroupId=t.groupId),this._onDidChangeTabGroups.fire(Object.freeze({changed:[e.apiObject],opened:[],closed:[]}))}$acceptTabOperation(t){let e=this._extHostTabGroups.find(o=>o.groupId===t.groupId);if(!e)throw new Error("Update Tabs IPC call received before group creation.");let n=e.acceptTabOperation(t);switch(t.kind){case 0:this._onDidChangeTabs.fire(Object.freeze({opened:[n.apiObject],closed:[],changed:[]}));return;case 1:this._onDidChangeTabs.fire(Object.freeze({opened:[],closed:[n.apiObject],changed:[]}));return;case 3:case 2:this._onDidChangeTabs.fire(Object.freeze({opened:[],closed:[],changed:[n.apiObject]}));return}}_findExtHostTabFromApi(t){for(let e of this._extHostTabGroups)for(let n of e.tabs)if(n.apiObject===t)return n}_findExtHostTabGroupFromApi(t){return this._extHostTabGroups.find(e=>e.apiObject===t)}async _closeTabs(t,e){let n=[];for(let o of t){let i=this._findExtHostTabFromApi(o);if(!i)throw new Error("Tab close: Invalid tab not found!");n.push(i.tabId)}return this._proxy.$closeTab(n,e)}async _closeGroups(t,e){let n=[];for(let o of t){let i=this._findExtHostTabGroupFromApi(o);if(!i)throw new Error("Group close: Invalid group not found!");n.push(i.groupId)}return this._proxy.$closeGroup(n,e)}};Sm=L([P(0,Ee)],Sm);function mq(r){return r.tabs!==void 0}var UHe={6:p(14895,null),4:p(14896,null),3:p(14897,null),1:p(14898,null),2:p(14899,null),5:p(14900,null),0:p(14901,null)};var FHe={4:p(14892,null),2:p(14893,null),8:p(14891,null)};var gq=0,l5=new WeakMap,Cc=N("IExtHostTesting"),xm=class extends K{constructor(e,n,o,i){super();this.logService=n;this.commands=o;this.editors=i;this.resultsChangedEmitter=this._register(new D);this.controllers=new Map;this.defaultProfilesChangedEmitter=this._register(new D);this.followupProviders=new Set;this.testFollowups=new Map;this.onResultsChanged=this.resultsChangedEmitter.event;this.results=[];this.proxy=e.getProxy(V.MainThreadTesting),this.observer=new gM(this.proxy),this.runTracker=new pM(this.proxy,n),o.registerArgumentProcessor({processArgument:s=>{switch(s?.$mid){case 16:{let a=s,l=a.tests[a.tests.length-1].item.extId;return this.controllers.get(nt.root(l))?.collection.tree.get(l)?.actual??Yk(s)}case 18:{let{test:a,message:l}=s,d=a.item.extId;return{test:this.controllers.get(nt.root(d))?.collection.tree.get(d)?.actual??Yk({$mid:16,tests:[a]}),message:Ep.to(l)}}default:return s}}}),o.registerCommand(!1,"testing.getExplorerSelection",async()=>{let s=await o.executeCommand("_testing.getExplorerSelection"),a=l=>{let d=this.controllers.get(nt.root(l));if(d)return nt.isRoot(l)?d.controller:d.collection.tree.get(l)?.actual};return{include:s?.include.map(a).filter(lo)||[],exclude:s?.exclude.map(a).filter(lo)||[]}})}createTestController(e,n,o,i){if(this.controllers.has(n))throw new Error(`Attempt to insert a duplicate controller with ID "${n}"`);let s=new te,a=s.add(new pS(n,o,this.editors));a.root.label=o;let l=new Map,d=new Set,c=this.proxy,u=()=>{let I=0;i&&(I|=2);let h=g.relatedCodeProvider;return h&&(h?.provideRelatedTests&&(I|=8),h?.provideRelatedCode&&(I|=4)),I},f={items:a.root.children,get label(){return o},set label(I){o=I,a.root.label=I,c.$updateController(n,{label:o})},get refreshHandler(){return i},set refreshHandler(I){i=I,c.$updateController(n,{capabilities:u()})},get id(){return n},get relatedCodeProvider(){return g.relatedCodeProvider},set relatedCodeProvider(I){H(e,"testRelatedCode"),g.relatedCodeProvider=I,c.$updateController(n,{capabilities:u()})},createRunProfile:(I,h,C,_,R,O)=>{let U=zr(I);for(;l.has(U);)U++;return new wx(this.proxy,l,d,this.defaultProfilesChangedEmitter.event,n,U,I,h,C,_,R,O)},createTestItem(I,h,C){return new oa(n,I,h,C)},createTestRun:(I,h,C=!0)=>this.runTracker.createTestRun(e,n,a,I,h,C),invalidateTestResults:I=>{if(I===void 0)this.proxy.$markTestRetired(void 0);else{let h=I instanceof Array?I:[I];this.proxy.$markTestRetired(h.map(C=>nt.fromExtHostTestItem(C,n).toString()))}},set resolveHandler(I){a.resolveHandler=I},get resolveHandler(){return a.resolveHandler},dispose:()=>{s.dispose()}},g={controller:f,collection:a,profiles:l,extension:e,activeProfiles:d};return c.$registerTestController(n,o,u()),s.add(ae(()=>c.$unregisterTestController(n))),this.controllers.set(n,g),s.add(ae(()=>this.controllers.delete(n))),s.add(a.onDidGenerateDiff(I=>c.$publishDiff(n,I.map(FI.serialize)))),f}createTestObserver(){return this.observer.checkout()}async runTests(e,n=De.None){let o=d5(e);if(!o)throw new Error("The request passed to `vscode.test.runTests` must include a profile");let i=this.controllers.get(o.controllerId);if(!i)throw new Error("Controller not found");await this.proxy.$runTests({preserveFocus:e.preserveFocus??!0,group:Sp.from(o.kind),targets:[{testIds:e.include?.map(s=>nt.fromExtHostTestItem(s,i.collection.root.id).toString())??[i.collection.root.id],profileId:o.profileId,controllerId:o.controllerId}],exclude:e.exclude?.map(s=>s.id)},n)}registerTestFollowupProvider(e){return this.followupProviders.add(e),{dispose:()=>{this.followupProviders.delete(e)}}}async $getTestsRelatedToCode(e,n,o){let i=this.editors.getDocument(E.revive(e));if(!i)return[];let s=st.to(n),a=[];return await Promise.all([...this.controllers.values()].map(async l=>{let d;try{d=await l.relatedCodeProvider?.provideRelatedTests?.(i.document,s,o)}catch(c){o.isCancellationRequested||this.logService.warn(`Error thrown while providing related tests for ${l.controller.label}`,c)}if(d){for(let c of d)a.push(nt.fromExtHostTestItem(c,l.controller.id).toString());l.collection.flushDiff()}})),a}async $getCodeRelatedToTest(e,n){let o=this.controllers.get(nt.root(e));if(!o)return[];let i=o.collection.tree.get(e);return i?(await o.relatedCodeProvider?.provideRelatedCode?.(i.actual,n))?.map(no.from)??[]:[]}$syncTests(){for(let{collection:e}of this.controllers.values())e.flushDiff();return Promise.resolve()}async $getCoverageDetails(e,n,o){return(await this.runTracker.getCoverageDetails(e,n,o))?.map(nh.fromDetails)}async $disposeRun(e){this.runTracker.disposeTestRun(e)}$configureRunProfile(e,n){this.controllers.get(e)?.profiles.get(n)?.configureHandler?.()}$setDefaultRunProfiles(e){let n=new Map;for(let[o,i]of Object.entries(e)){let s=this.controllers.get(o);if(!s)continue;let a=new Map,l=i.filter(c=>!s.activeProfiles.has(c)),d=[...s.activeProfiles].filter(c=>!i.includes(c));for(let c of l)a.set(c,!0),s.activeProfiles.add(c);for(let c of d)a.set(c,!1),s.activeProfiles.delete(c);a.size&&n.set(o,a)}this.defaultProfilesChangedEmitter.fire(n)}async $refreshTests(e,n){await this.controllers.get(e)?.controller.refreshHandler?.(n)}$publishTestResults(e){this.results=Object.freeze(e.map(n=>{let o=hk.to(n),i=n.tasks.findIndex(s=>s.hasCoverage);return i!==-1&&(o.getDetailedCoverage=(s,a=De.None)=>this.proxy.$getCoverageDetails(n.id,i,s,a).then(l=>l.map(nh.to))),l5.set(o,n.id),o}).concat(this.results).sort((n,o)=>o.completedAt-n.completedAt).slice(0,32)),this.resultsChangedEmitter.fire()}async $expandTest(e,n){let o=this.controllers.get(nt.fromString(e).controllerId)?.collection;o&&(await o.expand(e,n<0?1/0:n),o.flushDiff())}$acceptDiff(e){this.observer.applyDiff(e.map(n=>FI.deserialize({asCanonicalUri:o=>o},n)))}async $runControllerTests(e,n){return Promise.all(e.map(o=>this.runControllerTestRequest(o,!1,n)))}async $startContinuousRun(e,n){let o=new We(n),i=await Promise.all(e.map(s=>this.runControllerTestRequest(s,!0,o.token)));return!n.isCancellationRequested&&!i.some(s=>s.error)&&await new Promise(s=>n.onCancellationRequested(s)),o.dispose(!0),i}async $provideTestFollowups(e,n){let o=this.results.find(a=>l5.get(a)===e.resultId),i=o&&vq(nt.fromString(e.extId),o?.results);if(!i)return[];let s=[];return await Promise.all([...this.followupProviders].map(async a=>{try{let l=await a.provideFollowup(o,i,e.taskIndex,e.messageIndex,n);l&&(s=s.concat(l))}catch(l){this.logService.error("Error thrown while providing followup for test message",l)}})),n.isCancellationRequested?[]:s.map(a=>{let l=gq++;return this.testFollowups.set(l,a),{title:a.title,id:l}})}$disposeTestFollowups(e){for(let n of e)this.testFollowups.delete(n)}$executeTestFollowup(e){let n=this.testFollowups.get(e);return n?this.commands.executeCommand(n.command,...n.arguments||[]):Promise.resolve()}$cancelExtensionTestRun(e,n){e===void 0?this.runTracker.cancelAllRuns():this.runTracker.cancelRunById(e,n)}getMetadataForRun(e){for(let n of this.runTracker.trackers){let o=n.getTaskIdForRun(e);if(o)return{taskId:o,runId:n.id}}}async runControllerTestRequest(e,n,o){let i=this.controllers.get(e.controllerId);if(!i)return{};let{collection:s,profiles:a,extension:l}=i,d=a.get(e.profileId);if(!d)return{};let c=e.testIds.map(I=>s.tree.get(I)).filter(lo),u=e.excludeExtIds.map(I=>i.collection.tree.get(I)).filter(lo).filter(I=>c.some(h=>h.fullId.compare(I.fullId)===2));if(!c.length)return{};let f=new sl(c.some(I=>I.actual instanceof $p)?void 0:c.map(I=>I.actual),u.map(I=>I.actual),d,n),g=$H(e)&&this.runTracker.prepareForMainThreadTestRun(l,f,Dx.fromInternal(e,i.collection),d,o);try{return await d.runHandler(f,o),{}}catch(I){return{error:String(I)}}finally{g&&g.hasRunningTasks&&!o.isCancellationRequested&&await He.toPromise(g.onEnd)}}};xm=L([P(0,Ee),P(1,be),P(2,Ko),P(3,fi)],xm);var hq=1e4;var uM=class extends K{constructor(e,n,o,i,s,a){super();this.dto=e;this.proxy=n;this.logService=o;this.profile=i;this.extension=s;this.state=0;this.running=0;this.tasks=new Map;this.sharedTestIds=new Set;this.endEmitter=this._register(new D);this.publishedCoverage=new Map;this.onEnd=this.endEmitter.event;this.cts=this._register(new We(a));let l=this._register(new ho(()=>this.forciblyEndTasks(),hq));this._register(this.cts.token.onCancellationRequested(()=>l.schedule()));let d=new D;this.onDidDispose=d.event,this._register(ae(()=>{d.fire(),d.dispose()}))}get hasRunningTasks(){return this.running>0}get id(){return this.dto.id}getTaskIdForRun(e){for(let[n,{run:o}]of this.tasks)if(o===e)return n}cancel(e){e?this.tasks.get(e)?.cts.cancel():this.state===0?(this.cts.cancel(),this.state=1):this.state===1&&this.forciblyEndTasks()}async getCoverageDetails(e,n,o){let[,i]=nt.fromString(e).path,s=this.publishedCoverage.get(e);if(!s)return[];let{report:a,extIds:l}=s,d=this.tasks.get(i);if(!d)throw new Error("unreachable: run task was not found");let c;if(n&&a instanceof Fs){let f=l.indexOf(n);if(f===-1)return[];c=a.includesTests[f]}return await(c?this.profile?.loadDetailedCoverageForTest?.(d.run,a,c,o):this.profile?.loadDetailedCoverage?.(d.run,a,o))??[]}createRun(e){let n=this.dto.id,o=this.dto.controllerId,i=ct(),s=u=>(f,...g)=>{if(l){this.logService.warn(`Setting the state of test "${f.id}" is a no-op after the run ends.`);return}this.ensureTestIsKnown(f),u(f,...g)},a=(u,f)=>{let g=f instanceof Array?f.map(Ep.from):[Ep.from(f)];if(u.uri&&u.range){let I={range:j.from(u.range),uri:u.uri};for(let h of g)h.location=h.location||I}this.proxy.$appendTestMessagesInRun(n,i,nt.fromExtHostTestItem(u,o).toString(),g)},l=!1,d=this._register(new We(this.cts.token)),c={isPersisted:this.dto.isPersisted,token:d.token,name:e,onDidDispose:this.onDidDispose,addCoverage:u=>{if(l)return;let f=u instanceof Fs?u.includesTests:[];if(f.length)for(let h of f)this.ensureTestIsKnown(h);let g=u.uri.toString(),I=new nt([n,i,g]).toString();this.publishedCoverage.set(I,{report:u,extIds:f.map(h=>nt.fromExtHostTestItem(h,o).toString())}),this.proxy.$appendCoverage(n,i,nh.fromFile(o,I,u))},enqueued:s(u=>{this.proxy.$updateTestStateInRun(n,i,nt.fromExtHostTestItem(u,o).toString(),1)}),skipped:s(u=>{this.proxy.$updateTestStateInRun(n,i,nt.fromExtHostTestItem(u,o).toString(),5)}),started:s(u=>{this.proxy.$updateTestStateInRun(n,i,nt.fromExtHostTestItem(u,o).toString(),2)}),errored:s((u,f,g)=>{a(u,f),this.proxy.$updateTestStateInRun(n,i,nt.fromExtHostTestItem(u,o).toString(),6,g)}),failed:s((u,f,g)=>{a(u,f),this.proxy.$updateTestStateInRun(n,i,nt.fromExtHostTestItem(u,o).toString(),4,g)}),passed:s((u,f)=>{this.proxy.$updateTestStateInRun(n,i,nt.fromExtHostTestItem(u,this.dto.controllerId).toString(),3,f)}),appendOutput:(u,f,g)=>{l||(g&&this.ensureTestIsKnown(g),this.proxy.$appendOutputToRun(n,i,ce.fromString(u),f&&no.from(f),g&&nt.fromExtHostTestItem(g,o).toString()))},end:()=>{l||(l=!0,this.proxy.$finishedTestRunTask(n,i),--this.running||this.markEnded())}};return this.running++,this.tasks.set(i,{run:c,cts:d}),this.proxy.$startedTestRunTask(n,{id:i,ctrlId:this.dto.controllerId,name:e||this.extension.displayName||this.extension.identifier.value,running:!0}),c}forciblyEndTasks(){for(let{run:e}of this.tasks.values())e.end()}markEnded(){this.state!==2&&(this.state=2,this.endEmitter.fire())}ensureTestIsKnown(e){if(!(e instanceof oa))throw new $a(e.id);if(this.sharedTestIds.has(nt.fromExtHostTestItem(e,this.dto.controllerId).toString()))return;let n=[],o=this.dto.colllection.root;for(;;){let i=es.from(e);if(n.unshift(i),this.sharedTestIds.has(i.extId)||(this.sharedTestIds.add(i.extId),e===o))break;e=e.parent||o}this.proxy.$addTestsToRun(this.dto.controllerId,this.dto.id,n)}dispose(){this.markEnded(),super.dispose()}},pM=class{constructor(t,e){this.proxy=t;this.logService=e;this.tracked=new Map;this.trackedById=new Map}get trackers(){return this.tracked.values()}getCoverageDetails(t,e,n){let o=nt.root(t);return this.trackedById.get(o)?.getCoverageDetails(t,e,n)||[]}disposeTestRun(t){this.trackedById.get(t)?.dispose(),this.trackedById.delete(t);for(let[e,{id:n}]of this.tracked)n===t&&this.tracked.delete(e)}prepareForMainThreadTestRun(t,e,n,o,i){return this.getTracker(e,n,o,t,i)}cancelRunById(t,e){this.trackedById.get(t)?.cancel(e)}cancelAllRuns(){for(let t of this.tracked.values())t.cancel()}createTestRun(t,e,n,o,i,s){let a=this.tracked.get(o);if(a)return a.createRun(i);let l=Dx.fromPublic(e,n,o,s),d=d5(o);this.proxy.$startedExtensionTestRun({controllerId:e,continuous:!!o.continuous,profile:d&&{group:Sp.from(d.kind),id:d.profileId},exclude:o.exclude?.map(u=>nt.fromExtHostTestItem(u,n.root.id).toString())??[],id:l.id,include:o.include?.map(u=>nt.fromExtHostTestItem(u,n.root.id).toString())??[n.root.id],preserveFocus:o.preserveFocus??!0,persist:s});let c=this.getTracker(o,l,o.profile,t);return He.once(c.onEnd)(()=>{this.proxy.$finishedExtensionTestRun(l.id)}),c.createRun(i)}getTracker(t,e,n,o,i){let s=new uM(e,this.proxy,this.logService,n,o,i);return this.tracked.set(t,s),this.trackedById.set(s.id,s),s}},d5=r=>{if(r.profile){if(!(r.profile instanceof wx))throw new Error("TestRunRequest.profile is not an instance created from TestController.createRunProfile");return r.profile}},Dx=class r{constructor(t,e,n,o){this.controllerId=t;this.id=e;this.isPersisted=n;this.colllection=o}static fromPublic(t,e,n,o){return new r(t,ct(),o,e)}static fromInternal(t,e){return new r(t.controllerId,t.runId,!0,e)}},mM=class{constructor(t){this.emitter=t;this.added=new Set;this.updated=new Set;this.removed=new Set;this.alreadyRemoved=new Set}get isEmpty(){return this.added.size===0&&this.removed.size===0&&this.updated.size===0}add(t){this.added.add(t)}update(t){Object.assign(t.revived,es.toPlain(t.item)),this.added.has(t)||this.updated.add(t)}remove(t){if(this.added.delete(t))return;this.updated.delete(t);let e=nt.parentId(t.item.extId);if(e&&this.alreadyRemoved.has(e.toString())){this.alreadyRemoved.add(t.item.extId);return}this.removed.add(t)}getChangeEvent(){let{added:t,updated:e,removed:n}=this;return{get added(){return[...t].map(o=>o.revived)},get updated(){return[...e].map(o=>o.revived)},get removed(){return[...n].map(o=>o.revived)}}}complete(){this.isEmpty||this.emitter.fire(this.getChangeEvent())}},fM=class extends MI{constructor(){super(...arguments);this.changeEmitter=new D;this.onDidChangeTests=this.changeEmitter.event}get rootTests(){return this.roots}getMirroredTestDataById(e){return this.items.get(e)}getMirroredTestDataByReference(e){return this.items.get(e.id)}createItem(e,n){return{...e,revived:es.toPlain(e.item),depth:n?n.depth+1:0,children:new Set}}createChangeCollector(){return new mM(this.changeEmitter)}},gM=class{constructor(t){this.proxy=t}checkout(){this.current||(this.current=this.createObserverData());let t=this.current;return t.observers++,{onDidChangeTest:t.tests.onDidChangeTests,get tests(){return[...t.tests.rootTests].map(e=>e.revived)},dispose:Wc(()=>{--t.observers===0&&(this.proxy.$unsubscribeFromDiffs(),this.current=void 0)})}}getMirroredTestDataByReference(t){return this.current?.tests.getMirroredTestDataByReference(t)}applyDiff(t){this.current?.tests.apply(t)}createObserverData(){let t=new fM({asCanonicalUri:e=>e});return this.proxy.$subscribeToDiffs(),{observers:0,tests:t}}},Fh=(r,t,e,n)=>{e?Object.assign(e,n):t.$updateTestRunConfig(r.controllerId,r.profileId,n)},wx=class extends Qu{constructor(e,n,o,i,s,a,l,d,c,u=!1,f=void 0,g=!1){super(s,a,d);this._label=l;this.runHandler=c;this._tag=f;this._supportsContinuousRun=g;this.#e=e,this.#s=n,this.#t=o,this.#n=i,n.set(a,this);let I=Sp.from(d);u&&o.add(a),this.#o={profileId:a,controllerId:s,tag:f?Ar.namespace(this.controllerId,f.id):null,label:l,group:I,isDefault:u,hasConfigurationHandler:!1,supportsContinuousRun:g},queueMicrotask(()=>{this.#o&&(this.#e.$publishTestRunProfile(this.#o),this.#o=void 0)})}#e;#t;#n;#o;#s;get label(){return this._label}set label(e){e!==this._label&&(this._label=e,Fh(this,this.#e,this.#o,{label:e}))}get supportsContinuousRun(){return this._supportsContinuousRun}set supportsContinuousRun(e){e!==this._supportsContinuousRun&&(this._supportsContinuousRun=e,Fh(this,this.#e,this.#o,{supportsContinuousRun:e}))}get isDefault(){return this.#t.has(this.profileId)}set isDefault(e){e!==this.isDefault&&(e?this.#t.add(this.profileId):this.#t.delete(this.profileId),Fh(this,this.#e,this.#o,{isDefault:e}))}get tag(){return this._tag}set tag(e){e?.id!==this._tag?.id&&(this._tag=e,Fh(this,this.#e,this.#o,{tag:e?Ar.namespace(this.controllerId,e.id):null}))}get configureHandler(){return this._configureHandler}set configureHandler(e){e!==this._configureHandler&&(this._configureHandler=e,Fh(this,this.#e,this.#o,{hasConfigurationHandler:!!e}))}get onDidChangeDefault(){return He.chain(this.#n,e=>e.map(n=>n.get(this.controllerId)?.get(this.profileId)).filter(lo))}dispose(){this.#s?.delete(this.profileId)&&(this.#s=void 0,this.#e.$removeTestProfile(this.controllerId,this.profileId)),this.#o=void 0}};function vq(r,t){for(let e=0;e<r.path.length;e++){let n=t.find(o=>o.id===r.path[e]);if(!n)return;if(e===r.path.length-1)return n;t=n.children}}var UBe=N("configurationResolverService"),hM=(B=>(B.Unknown="unknown",B.Env="env",B.Config="config",B.Command="command",B.Input="input",B.ExtensionInstallFolder="extensionInstallFolder",B.WorkspaceFolder="workspaceFolder",B.Cwd="cwd",B.WorkspaceFolderBasename="workspaceFolderBasename",B.UserHome="userHome",B.LineNumber="lineNumber",B.ColumnNumber="columnNumber",B.SelectedText="selectedText",B.File="file",B.FileWorkspaceFolder="fileWorkspaceFolder",B.FileWorkspaceFolderBasename="fileWorkspaceFolderBasename",B.RelativeFile="relativeFile",B.RelativeFileDirname="relativeFileDirname",B.FileDirname="fileDirname",B.FileExtname="fileExtname",B.FileBasename="fileBasename",B.FileBasenameNoExtension="fileBasenameNoExtension",B.FileDirnameBasename="fileDirnameBasename",B.ExecPath="execPath",B.ExecInstallFolder="execInstallFolder",B.PathSeparator="pathSeparator",B.PathSeparatorAlias="/",B))(hM||{}),c5=Object.values(hM).filter(r=>typeof r=="string"),io=class extends dr{constructor(e,n){super(n);this.variable=e}};var Hh=class r{constructor(t){this.locations=new Map;this.newReplacementNotifiers=new Set;typeof t=="string"?(this.stringRoot=!0,this.root={value:t}):(this.stringRoot=!1,this.root=structuredClone(t))}static{this.VARIABLE_LHS="${"}static parse(t){if(t instanceof r)return t;let e=new r(t);return e.applyPlatformSpecificKeys(),e.parseObject(e.root),e}applyPlatformSpecificKeys(){let t=this.root,e=Rt?"windows":hn?"osx":zn?"linux":void 0;e&&t&&typeof t=="object"&&t.hasOwnProperty(e)&&Object.keys(t[e]).forEach(n=>t[n]=t[e][n]),delete t.windows,delete t.osx,delete t.linux}parseVariable(t,e){if(t[e]!=="$"||t[e+1]!=="{")return;let n=e+2,o=1;for(;n<t.length;){if(t[n]==="{")o++;else if(t[n]==="}"&&(o--,o===0))break;n++}if(o!==0)return;let i=t.slice(e,n+1),s=t.substring(e+2,n),a=s.indexOf(":");return a===-1?{replacement:{id:i,name:s,inner:s},end:n}:{replacement:{id:i,inner:s,name:s.slice(0,a),arg:s.slice(a+1)},end:n}}parseObject(t){if(!(typeof t!="object"||t===null)){if(Array.isArray(t)){for(let e=0;e<t.length;e++){let n=t[e];typeof n=="string"?this.parseString(t,e,n):this.parseObject(n)}return}for(let[e,n]of Object.entries(t))this.parseString(t,e,e,!0),typeof n=="string"?this.parseString(t,e,n):this.parseObject(n)}}parseString(t,e,n,o,i){let s=0;for(;s<n.length;){let a=n.indexOf("${",s);if(a===-1)break;let l=this.parseVariable(n,a);if(l){if(s=l.end+1,i?.includes(l.replacement.id))continue;let d=this.locations.get(l.replacement.id)||{locations:[],replacement:l.replacement},c={object:t,propertyName:e,replaceKeyName:o};d.locations.push(c),this.locations.set(l.replacement.id,d),d.resolved?this._resolveAtLocation(l.replacement,c,d.resolved,i):this.newReplacementNotifiers.forEach(u=>u(l.replacement))}else s=a+2}}*unresolved(){let t=new Map,e=n=>{t.set(n.id,n)};for(let n of this.locations.values())n.resolved===void 0&&t.set(n.replacement.id,n.replacement);for(this.newReplacementNotifiers.add(e);;){let n=Lt.first(t);if(!n)break;let[o,i]=n;yield i,t.delete(o)}this.newReplacementNotifiers.delete(e)}resolved(){return Lt.map(Lt.filter(this.locations.values(),t=>!!t.resolved),t=>[t.replacement,t.resolved])}resolve(t,e){typeof e!="object"&&(e={value:String(e)});let n=this.locations.get(t.id);if(n&&(n.resolved=e,e.value!==void 0))for(let o of n.locations||Lt.empty())this._resolveAtLocation(t,o,e)}_resolveAtLocation(t,{replaceKeyName:e,propertyName:n,object:o},i,s=[]){if(i.value!==void 0){if(s.push(t.id),e&&typeof n=="string"){let a=o[n],l=n.replaceAll(t.id,i.value);delete o[n],o[l]=a,this._renameKeyInLocations(o,n,l),this.parseString(o,l,i.value,!0,s)}else o[n]=o[n].replaceAll(t.id,i.value),this.parseString(o,n,i.value,!1,s);s.pop()}}_renameKeyInLocations(t,e,n){for(let o of this.locations.values())for(let i of o.locations)i.object===t&&i.propertyName===e&&(i.propertyName=n)}toObject(){return this.stringRoot?this.root.value:this.root}};var Rx=class{constructor(t,e,n,o){this._contributedVariables=new Map;this.resolvableVariables=new Set(c5);this._context=t,this._labelService=e,this._userHomePromise=n,o&&(this._envVariablesPromise=o.then(i=>this.prepareEnv(i)))}prepareEnv(t){if(Rt){let e=Object.create(null);return Object.keys(t).forEach(n=>{e[n.toLowerCase()]=t[n]}),e}return t}async resolveWithEnvironment(t,e,n){let o=Hh.parse(n);for(let i of o.unresolved()){let s=await this.evaluateSingleVariable(i,e?.uri,t);s!==void 0&&o.resolve(i,String(s))}return o.toObject()}async resolveAsync(t,e){let n=Hh.parse(e);for(let o of n.unresolved()){let i=await this.evaluateSingleVariable(o,t?.uri);i!==void 0&&n.resolve(o,String(i))}return n.toObject()}resolveWithInteractionReplace(t,e){throw new Error("resolveWithInteractionReplace not implemented.")}resolveWithInteraction(t,e){throw new Error("resolveWithInteraction not implemented.")}contributeVariable(t,e){if(this._contributedVariables.has(t))throw new Error("Variable "+t+" is contributed twice.");this.resolvableVariables.add(t),this._contributedVariables.set(t,e)}fsPath(t){return this._labelService?this._labelService.getUriLabel(t,{noPrefix:!0}):t.fsPath}async evaluateSingleVariable(t,e,n,o){let i={env:n!==void 0?this.prepareEnv(n):await this._envVariablesPromise,userHome:n!==void 0?void 0:await this._userHomePromise},{name:s,arg:a}=t,l=u=>{let f=this._context.getFilePath();if(f)return vu(f);throw new io(u,p(16411,null,t.id))},d=u=>{let f=l(u);if(this._context.getWorkspaceFolderPathForFile){let g=this._context.getWorkspaceFolderPathForFile();if(g)return vu(g)}throw new io(u,p(16412,null,t.id,Cn(f)))},c=u=>{if(a){let f=this._context.getFolderUri(a);if(f)return f;throw new io(u,p(16409,null,u,a))}if(e)return e;throw this._context.getWorkspaceFolderCount()>1?new io(u,p(16417,null,u)):new io(u,p(16416,null,u))};switch(s){case"env":if(a){if(i.env){let u=i.env[Rt?a.toLowerCase():a];if(Me(u))return u}return""}throw new io("env",p(16422,null,t.id));case"config":if(a){let u=this._context.getConfigurationValue(e,a);if(Ft(u))throw new io("config",p(16419,null,t.id,a));if(mt(u))throw new io("config",p(16418,null,t.id,a));return u}throw new io("config",p(16421,null,t.id));case"command":return this.resolveFromMap("command",t.id,a,o,"command");case"input":return this.resolveFromMap("input",t.id,a,o,"input");case"extensionInstallFolder":if(a){let u=await this._context.getExtension(a);if(!u)throw new io("extensionInstallFolder",p(16420,null,t.id,a));return this.fsPath(u.extensionLocation)}throw new io("extensionInstallFolder",p(16423,null,t.id));default:switch(s){case"workspaceRoot":case"workspaceFolder":{let u=c("workspaceFolder");return u?vu(this.fsPath(u)):void 0}case"cwd":{if(!e&&!a)return us();let u=c("cwd");return u?vu(this.fsPath(u)):void 0}case"workspaceRootFolderName":case"workspaceFolderBasename":{let u=c("workspaceFolderBasename");return u?vu(Cn(this.fsPath(u))):void 0}case"userHome":if(i.userHome)return i.userHome;throw new io("userHome",p(16415,null,t.id));case"lineNumber":{let u=this._context.getLineNumber();if(u)return u;throw new io("lineNumber",p(16413,null,t.id))}case"columnNumber":{let u=this._context.getColumnNumber();if(u)return u;throw new Error(p(16410,null,t.id))}case"selectedText":{let u=this._context.getSelectedText();if(u)return u;throw new io("selectedText",p(16414,null,t.id))}case"file":return l("file");case"fileWorkspaceFolder":return d("fileWorkspaceFolder");case"fileWorkspaceFolderBasename":return Cn(d("fileWorkspaceFolderBasename"));case"relativeFile":return e||a?gs(this.fsPath(c("relativeFile")),l("relativeFile")):l("relativeFile");case"relativeFileDirname":{let u=Ci(l("relativeFileDirname"));if(e||a){let f=gs(this.fsPath(c("relativeFileDirname")),u);return f.length===0?".":f}return u}case"fileDirname":return Ci(l("fileDirname"));case"fileExtname":return hs(l("fileExtname"));case"fileBasename":return Cn(l("fileBasename"));case"fileBasenameNoExtension":{let u=Cn(l("fileBasenameNoExtension"));return u.slice(0,u.length-hs(u).length)}case"fileDirnameBasename":return Cn(Ci(l("fileDirnameBasename")));case"execPath":{let u=this._context.getExecPath();return u||t.id}case"execInstallFolder":{let u=this._context.getAppRoot();return u||t.id}case"pathSeparator":case"/":return Bn;default:try{return this.resolveFromMap("unknown",t.id,a,o,void 0)}catch{return t.id}}}}resolveFromMap(t,e,n,o,i){if(n&&o){let s=i===void 0?o[n]:o[i+":"+n];if(typeof s=="string")return s;throw new io(t,p(16424,null,e))}return e}};var Bh=N("IExtHostVariableResolverProvider"),vM=class extends Rx{constructor(t,e,n,o,i,s,a){function l(){if(n){let d=n.activeEditor();if(d)return d.document.uri;let c=o.tabGroups.all.find(u=>u.isActive)?.activeTab;if(c!==void 0){if(c.input instanceof Hs||c.input instanceof gl)return c.input.modified;if(c.input instanceof pl||c.input instanceof fl||c.input instanceof ml)return c.input.uri}}}super({getFolderUri:d=>{let c=s.folders.filter(u=>u.name===d);if(c&&c.length>0)return c[0].uri},getWorkspaceFolderCount:()=>s.folders.length,getConfigurationValue:(d,c)=>i.getConfiguration(void 0,d).get(c),getAppRoot:()=>us(),getExecPath:()=>Hr.VSCODE_EXEC_PATH,getFilePath:()=>{let d=l();if(d)return fr(d.fsPath)},getWorkspaceFolderPathForFile:()=>{if(e){let d=l();if(d){let c=e.getWorkspaceFolder(d);if(c)return fr(c.uri.fsPath)}}},getSelectedText:()=>{if(n){let d=n.activeEditor();if(d&&!d.selection.isEmpty)return d.document.getText(d.selection)}},getLineNumber:()=>{if(n){let d=n.activeEditor();if(d)return String(d.selection.end.line+1)}},getColumnNumber:()=>{if(n){let d=n.activeEditor();if(d)return String(d.selection.end.character+1)}},getExtension:d=>t.getExtension(d)},void 0,a?Promise.resolve(a):void 0,Promise.resolve(Hr))}},Cm=class extends K{constructor(e,n,o,i,s){super();this.extensionService=e;this.workspaceService=n;this.editorService=o;this.configurationService=i;this.editorTabs=s;this._resolver=new xt(async()=>{let e=await this.configurationService.getConfigProvider(),o={folders:await this.workspaceService.getWorkspaceFolders2()||[]};return this._register(this.workspaceService.onDidChangeWorkspace(async i=>{o.folders=await this.workspaceService.getWorkspaceFolders2()||[]})),new vM(this.extensionService,this.workspaceService,this.editorService,this.editorTabs,e,o,this.homeDir())})}getResolver(){return this._resolver.value}homeDir(){}};Cm=L([P(0,Do),P(1,_o),P(2,fi),P(3,Po),P(4,aa)],Cm);var kx=N("IExtHostDebugService"),Vh=class extends K{constructor(e,n,o,i,s,a,l,d){super();this._workspaceService=n;this._extensionService=o;this._configurationService=i;this._editorTabs=s;this._variableResolver=a;this._commands=l;this._testing=d;this._debugSessions=new Map;this._debugVisualizationTreeItemIdsCounter=0;this._debugVisualizationProviders=new Map;this._debugVisualizationTrees=new Map;this._debugVisualizationTreeItemIds=new WeakMap;this._debugVisualizationElements=new Map;this._visualizers=new Map;this._visualizerIdCounter=0;this._configProviderHandleCounter=0,this._configProviders=[],this._adapterFactoryHandleCounter=0,this._adapterFactories=[],this._trackerFactoryHandleCounter=0,this._trackerFactories=[],this._debugAdapters=new Map,this._debugAdaptersTrackers=new Map,this._onDidStartDebugSession=this._register(new D),this._onDidTerminateDebugSession=this._register(new D),this._onDidChangeActiveDebugSession=this._register(new D),this._onDidReceiveDebugSessionCustomEvent=this._register(new D),this._debugServiceProxy=e.getProxy(V.MainThreadDebugService),this._onDidChangeBreakpoints=this._register(new D),this._onDidChangeActiveStackItem=this._register(new D),this._activeDebugConsole=new IM(this._debugServiceProxy),this._breakpoints=new Map,this._extensionService.getExtensionRegistry().then(c=>{this._register(c.onDidChange(u=>{this.registerAllDebugTypes(c)})),this.registerAllDebugTypes(c)}),this._telemetryProxy=e.getProxy(V.MainThreadTelemetry)}get onDidStartDebugSession(){return this._onDidStartDebugSession.event}get onDidTerminateDebugSession(){return this._onDidTerminateDebugSession.event}get onDidChangeActiveDebugSession(){return this._onDidChangeActiveDebugSession.event}get activeDebugSession(){return this._activeDebugSession?.api}get onDidReceiveDebugSessionCustomEvent(){return this._onDidReceiveDebugSessionCustomEvent.event}get activeDebugConsole(){return this._activeDebugConsole.value}async $getVisualizerTreeItem(e,n){let o=this.hydrateVisualizationContext(n);if(!o)return;let i=await this._debugVisualizationTrees.get(e)?.getTreeItem?.(o);return i?this.convertVisualizerTreeItem(e,i):void 0}registerDebugVisualizationTree(e,n,o){let i=Ue.toKey(e.identifier),s=this.extensionVisKey(i,n);if(this._debugVisualizationProviders.has(s))throw new Error(`A debug visualization provider with id '${n}' is already registered`);return this._debugVisualizationTrees.set(s,o),this._debugServiceProxy.$registerDebugVisualizerTree(s,!!o.editItem),ae(()=>{this._debugServiceProxy.$unregisterDebugVisualizerTree(s),this._debugVisualizationTrees.delete(n)})}async $getVisualizerTreeItemChildren(e,n){let o=this._debugVisualizationElements.get(n)?.item;return o?(await this._debugVisualizationTrees.get(e)?.getChildren?.(o))?.map(s=>this.convertVisualizerTreeItem(e,s))||[]:[]}async $editVisualizerTreeItem(e,n){let o=this._debugVisualizationElements.get(e);if(!o)return;let i=await this._debugVisualizationTrees.get(o.provider)?.editItem?.(o.item,n);return this.convertVisualizerTreeItem(o.provider,i||o.item)}$disposeVisualizedTree(e){let n=this._debugVisualizationElements.get(e);if(!n)return;let o=[n.children];for(let i of o)if(i)for(let s of i)o.push(this._debugVisualizationElements.get(s)?.children),this._debugVisualizationElements.delete(s)}convertVisualizerTreeItem(e,n){let o=this._debugVisualizationTreeItemIds.get(n);return o||(o=this._debugVisualizationTreeItemIdsCounter++,this._debugVisualizationTreeItemIds.set(n,o),this._debugVisualizationElements.set(o,{provider:e,item:n})),_k.from(n,o)}asDebugSourceUri(e,n){let o=e;if(typeof o.sourceReference=="number"&&o.sourceReference>0){let i=`debug:${encodeURIComponent(o.path||"")}`,s="?";return n&&(i+=`${s}session=${encodeURIComponent(n.id)}`,s="&"),i+=`${s}ref=${o.sourceReference}`,E.parse(i)}else{if(o.path)return E.file(o.path);throw new Error("cannot create uri from DAP 'source' object; properties 'path' and 'sourceReference' are both missing.")}}registerAllDebugTypes(e){let n=[];for(let o of e.getAllExtensionDescriptions())if(o.contributes){let i=o.contributes.debuggers;if(i&&i.length>0)for(let s of i)n5(s)&&n.push(s.type)}this._debugServiceProxy.$registerDebugTypes(n)}get activeStackItem(){return this._activeStackItem}get onDidChangeActiveStackItem(){return this._onDidChangeActiveStackItem.event}get onDidChangeBreakpoints(){return this._onDidChangeBreakpoints.event}get breakpoints(){let e=[];return this._breakpoints.forEach(n=>e.push(n)),e}async $resolveDebugVisualizer(e,n){let o=this._visualizers.get(e);if(!o)throw new Error(`No debug visualizer found with id '${e}'`);let{v:i,provider:s,extensionId:a}=o;if(i.visualization||(i=await s.resolveDebugVisualization?.(i,n)||i,o.v=i),!i.visualization)throw new Error(`No visualization returned from resolveDebugVisualization in '${s}'`);return this.serializeVisualization(a,i.visualization)}async $executeDebugVisualizerCommand(e){let n=this._visualizers.get(e);if(!n)throw new Error(`No debug visualizer found with id '${e}'`);let o=n.v.visualization;o&&"command"in o&&this._commands.executeCommand(o.command,...o.arguments||[])}hydrateVisualizationContext(e){let n=this._debugSessions.get(e.sessionId);return n&&{session:n.api,variable:e.variable,containerId:e.containerId,frameId:e.frameId,threadId:e.threadId}}async $provideDebugVisualizers(e,n,o,i){let s=this.hydrateVisualizationContext(o),a=this.extensionVisKey(e,n),l=this._debugVisualizationProviders.get(a);if(!s||!l)return[];let d=await l.provideDebugVisualization(s,i);return d?d.map(c=>{let u=++this._visualizerIdCounter;this._visualizers.set(u,{v:c,provider:l,extensionId:e});let f=c.iconPath?this.getIconPathOrClass(c.iconPath):void 0;return{id:u,name:c.name,iconClass:f?.iconClass,iconPath:f?.iconPath,visualization:this.serializeVisualization(e,c.visualization)}}):[]}$disposeDebugVisualizers(e){for(let n of e)this._visualizers.delete(n)}registerDebugVisualizationProvider(e,n,o){if(!e.contributes?.debugVisualizers?.some(a=>a.id===n))throw new Error(`Extensions may only call registerDebugVisualizationProvider() for renderers they contribute (got ${n})`);let i=Ue.toKey(e.identifier),s=this.extensionVisKey(i,n);if(this._debugVisualizationProviders.has(s))throw new Error(`A debug visualization provider with id '${n}' is already registered`);return this._debugVisualizationProviders.set(s,o),this._debugServiceProxy.$registerDebugVisualizer(i,n),ae(()=>{this._debugServiceProxy.$unregisterDebugVisualizer(i,n),this._debugVisualizationProviders.delete(n)})}addBreakpoints(e){let n=e.filter(s=>{let a=s.id;return this._breakpoints.has(a)?!1:(this._breakpoints.set(a,s),!0)});this.fireBreakpointChanges(n,[],[]);let o=[],i=new Map;for(let s of n)if(s instanceof ri){let a=i.get(s.location.uri.toString());a||(a={type:"sourceMulti",uri:s.location.uri,lines:[]},i.set(s.location.uri.toString(),a),o.push(a)),a.lines.push({id:s.id,enabled:s.enabled,condition:s.condition,hitCondition:s.hitCondition,logMessage:s.logMessage,line:s.location.range.start.line,character:s.location.range.start.character,mode:s.mode})}else s instanceof ii&&o.push({type:"function",id:s.id,enabled:s.enabled,hitCondition:s.hitCondition,logMessage:s.logMessage,condition:s.condition,functionName:s.functionName,mode:s.mode});return this._debugServiceProxy.$registerBreakpoints(o)}removeBreakpoints(e){let n=e.filter(a=>this._breakpoints.delete(a.id));this.fireBreakpointChanges([],n,[]);let o=n.filter(a=>a instanceof ri).map(a=>a.id),i=n.filter(a=>a instanceof ii).map(a=>a.id),s=n.filter(a=>a instanceof Hd).map(a=>a.id);return this._debugServiceProxy.$unregisterBreakpoints(o,i,s)}startDebugging(e,n,o){let i=o.testRun&&this._testing.getMetadataForRun(o.testRun);return this._debugServiceProxy.$startDebugging(e?e.uri:void 0,n,{parentSessionID:o.parentSession?o.parentSession.id:void 0,lifecycleManagedByParent:o.lifecycleManagedByParent,repl:o.consoleMode===1?"mergeWithParent":"separate",noDebug:o.noDebug,compact:o.compact,suppressSaveBeforeStart:o.suppressSaveBeforeStart,testRun:i&&{runId:i.runId,taskId:i.taskId},suppressDebugStatusbar:o.suppressDebugStatusbar??o.debugUI?.simple,suppressDebugToolbar:o.suppressDebugToolbar??o.debugUI?.simple,suppressDebugView:o.suppressDebugView??o.debugUI?.simple})}stopDebugging(e){return this._debugServiceProxy.$stopDebugging(e?e.id:void 0)}registerDebugConfigurationProvider(e,n,o){if(!n)return new Ce(()=>{});let i=this._configProviderHandleCounter++;return this._configProviders.push({type:e,handle:i,provider:n}),this._debugServiceProxy.$registerDebugConfigurationProvider(e,o,!!n.provideDebugConfigurations,!!n.resolveDebugConfiguration,!!n.resolveDebugConfigurationWithSubstitutedVariables,i),new Ce(()=>{this._configProviders=this._configProviders.filter(s=>s.provider!==n),this._debugServiceProxy.$unregisterDebugConfigurationProvider(i)})}registerDebugAdapterDescriptorFactory(e,n,o){if(!o)return new Ce(()=>{});if(!this.definesDebugType(e,n))throw new Error(`a DebugAdapterDescriptorFactory can only be registered from the extension that defines the '${n}' debugger.`);if(this.getAdapterDescriptorFactoryByType(n))throw new Error("a DebugAdapterDescriptorFactory can only be registered once per a type.");let i=this._adapterFactoryHandleCounter++;return this._adapterFactories.push({type:n,handle:i,factory:o}),this._debugServiceProxy.$registerDebugAdapterDescriptorFactory(n,i),new Ce(()=>{this._adapterFactories=this._adapterFactories.filter(s=>s.factory!==o),this._debugServiceProxy.$unregisterDebugAdapterDescriptorFactory(i)})}registerDebugAdapterTrackerFactory(e,n){if(!n)return new Ce(()=>{});let o=this._trackerFactoryHandleCounter++;return this._trackerFactories.push({type:e,handle:o,factory:n}),new Ce(()=>{this._trackerFactories=this._trackerFactories.filter(i=>i.factory!==n)})}async $runInTerminal(e,n){return Promise.resolve(void 0)}async $substituteVariables(e,n){let o,i=await this.getFolder(e);return i&&(o={uri:i.uri,name:i.name,index:i.index}),(await this._variableResolver.getResolver()).resolveAsync(o,n)}createDebugAdapter(e,n){if(e instanceof Ns)return new EM(e.implementation)}createSignService(){}async $startDASession(e,n){let o=this,i=await this.getSession(n);return this.getAdapterDescriptor(this.getAdapterDescriptorFactoryByType(i.type),i).then(s=>{if(!s)throw new Error(`Couldn't find a debug adapter descriptor for debug type '${i.type}' (extension might have failed to activate)`);let a=this.createDebugAdapter(s,i);if(!a)throw new Error(`Couldn't create a debug adapter for type '${i.type}'.`);let l=a;return this._debugAdapters.set(e,l),this.getDebugAdapterTrackers(i).then(d=>(d&&this._debugAdaptersTrackers.set(e,d),l.onMessage(async c=>{if(c.type==="request"&&c.command==="handshake"){let u=c,f={type:"response",seq:0,command:u.command,request_seq:u.seq,success:!0};this._signService||(this._signService=this.createSignService());try{if(this._signService){let g=await this._signService.sign(u.arguments.value);f.body={signature:g},l.sendResponse(f)}else throw new Error("no signer")}catch(g){f.success=!1,f.message=g.message,l.sendResponse(f)}}else{d&&d.onDidSendMessage&&d.onDidSendMessage(c);try{c=s5(c,!0)}catch(u){let f=c.type+"_"+(c.command??c.event??"");throw this._telemetryProxy.$publicLog2("debugProtocolMessageError",{type:f,from:i.type}),u}o._debugServiceProxy.$acceptDAMessage(e,c)}}),l.onError(c=>{d&&d.onError&&d.onError(c),this._debugServiceProxy.$acceptDAError(e,c.name,c.message,c.stack)}),l.onExit(c=>{d&&d.onExit&&d.onExit(c??void 0,void 0),this._debugServiceProxy.$acceptDAExit(e,c??void 0,void 0)}),d&&d.onWillStartSession&&d.onWillStartSession(),l.startSession()))})}$sendDAMessage(e,n){n=i5(n,!1);let o=this._debugAdaptersTrackers.get(e);o&&o.onWillReceiveMessage&&o.onWillReceiveMessage(n),this._debugAdapters.get(e)?.sendMessage(n)}$stopDASession(e){let n=this._debugAdaptersTrackers.get(e);this._debugAdaptersTrackers.delete(e),n&&n.onWillStopSession&&n.onWillStopSession();let o=this._debugAdapters.get(e);return this._debugAdapters.delete(e),o?o.stopSession():Promise.resolve(void 0)}$acceptBreakpointsDelta(e){let n=[],o=[],i=[];if(e.added)for(let s of e.added){let a=s.id;if(a&&!this._breakpoints.has(a)){let l;if(s.type==="function")l=new ii(s.functionName,s.enabled,s.condition,s.hitCondition,s.logMessage,s.mode);else if(s.type==="data")l=new Hd(s.label,s.dataId,s.canPersist,s.enabled,s.hitCondition,s.condition,s.logMessage,s.mode);else{let d=E.revive(s.uri);l=new ri(new qt(d,new we(s.line,s.character)),s.enabled,s.condition,s.hitCondition,s.logMessage,s.mode)}tB(l,a),this._breakpoints.set(a,l),n.push(l)}}if(e.removed)for(let s of e.removed){let a=this._breakpoints.get(s);a&&(this._breakpoints.delete(s),o.push(a))}if(e.changed){for(let s of e.changed)if(s.id){let a=this._breakpoints.get(s.id);if(a){if(a instanceof ii&&s.type==="function"){let l=a;l.enabled=s.enabled,l.condition=s.condition,l.hitCondition=s.hitCondition,l.logMessage=s.logMessage,l.functionName=s.functionName}else if(a instanceof ri&&s.type==="source"){let l=a;l.enabled=s.enabled,l.condition=s.condition,l.hitCondition=s.hitCondition,l.logMessage=s.logMessage,l.location=new qt(E.revive(s.uri),new we(s.line,s.character))}i.push(a)}}}this.fireBreakpointChanges(n,o,i)}async $acceptStackFrameFocus(e){let n;if(e){let o=await this.getSession(e.sessionId);e.kind==="thread"?n=new Ku(o.api,e.threadId):n=new qu(o.api,e.threadId,e.frameId)}this._activeStackItem=n,this._onDidChangeActiveStackItem.fire(this._activeStackItem)}$provideDebugConfigurations(e,n,o){return dn(async()=>{let i=this.getConfigProviderByHandle(e);if(!i)throw new Error("no DebugConfigurationProvider found");if(!i.provideDebugConfigurations)throw new Error("DebugConfigurationProvider has no method provideDebugConfigurations");let s=await this.getFolder(n);return i.provideDebugConfigurations(s,o)}).then(i=>{if(!i)throw new Error("nothing returned from DebugConfigurationProvider.provideDebugConfigurations");return i})}$resolveDebugConfiguration(e,n,o,i){return dn(async()=>{let s=this.getConfigProviderByHandle(e);if(!s)throw new Error("no DebugConfigurationProvider found");if(!s.resolveDebugConfiguration)throw new Error("DebugConfigurationProvider has no method resolveDebugConfiguration");let a=await this.getFolder(n);return s.resolveDebugConfiguration(a,o,i)})}$resolveDebugConfigurationWithSubstitutedVariables(e,n,o,i){return dn(async()=>{let s=this.getConfigProviderByHandle(e);if(!s)throw new Error("no DebugConfigurationProvider found");if(!s.resolveDebugConfigurationWithSubstitutedVariables)throw new Error("DebugConfigurationProvider has no method resolveDebugConfigurationWithSubstitutedVariables");let a=await this.getFolder(n);return s.resolveDebugConfigurationWithSubstitutedVariables(a,o,i)})}async $provideDebugAdapter(e,n){let o=this.getAdapterDescriptorFactoryByHandle(e);if(!o)return Promise.reject(new Error("no adapter descriptor factory found for handle"));let i=await this.getSession(n);return this.getAdapterDescriptor(o,i).then(s=>{if(!s)throw new Error(`Couldn't find a debug adapter descriptor for debug type '${i.type}'`);return this.convertToDto(s)})}async $acceptDebugSessionStarted(e){let n=await this.getSession(e);this._onDidStartDebugSession.fire(n.api)}async $acceptDebugSessionTerminated(e){let n=await this.getSession(e);n&&(this._onDidTerminateDebugSession.fire(n.api),this._debugSessions.delete(n.id))}async $acceptDebugSessionActiveChanged(e){this._activeDebugSession=e?await this.getSession(e):void 0,this._onDidChangeActiveDebugSession.fire(this._activeDebugSession?.api)}async $acceptDebugSessionNameChanged(e,n){(await this.getSession(e))?._acceptNameChanged(n)}async $acceptDebugSessionCustomEvent(e,n){let i={session:(await this.getSession(e)).api,event:n.event,body:n.body};this._onDidReceiveDebugSessionCustomEvent.fire(i)}convertToDto(e){if(e instanceof el)return this.convertExecutableToDto(e);if(e instanceof Ms)return this.convertServerToDto(e);if(e instanceof tl)return this.convertPipeServerToDto(e);if(e instanceof Ns)return this.convertImplementationToDto(e);throw new Error("convertToDto unexpected type")}convertExecutableToDto(e){return{type:"executable",command:e.command,args:e.args,options:e.options}}convertServerToDto(e){return{type:"server",port:e.port,host:e.host}}convertPipeServerToDto(e){return{type:"pipeServer",path:e.path}}convertImplementationToDto(e){return{type:"implementation"}}getAdapterDescriptorFactoryByType(e){let n=this._adapterFactories.filter(o=>o.type===e);if(n.length>0)return n[0].factory}getAdapterDescriptorFactoryByHandle(e){let n=this._adapterFactories.filter(o=>o.handle===e);if(n.length>0)return n[0].factory}getConfigProviderByHandle(e){let n=this._configProviders.filter(o=>o.handle===e);if(n.length>0)return n[0].provider}definesDebugType(e,n){if(e.contributes){let o=e.contributes.debuggers;if(o&&o.length>0){for(let i of o)if(i.label&&i.type&&i.type===n)return!0}}return!1}getDebugAdapterTrackers(e){let o=e.configuration.type,i=this._trackerFactories.filter(s=>s.type===o||s.type==="*").map(s=>dn(()=>s.factory.createDebugAdapterTracker(e.api)).then(a=>a,a=>null));return Promise.race([Promise.all(i).then(s=>{let a=pt(s);if(a.length>0)return new yM(a)}),new Promise(s=>setTimeout(()=>s(void 0),1e3))]).catch(s=>{})}async getAdapterDescriptor(e,n){let o=n.configuration.debugServer;if(typeof o=="number")return Promise.resolve(new Ms(o));if(e){let s=await this._extensionService.getExtensionRegistry();return dn(()=>e.createDebugAdapterDescriptor(n.api,this.daExecutableFromPackage(n,s))).then(a=>{if(a)return a})}let i=await this._extensionService.getExtensionRegistry();return Promise.resolve(this.daExecutableFromPackage(n,i))}daExecutableFromPackage(e,n){}fireBreakpointChanges(e,n,o){(e.length>0||n.length>0||o.length>0)&&this._onDidChangeBreakpoints.fire(Object.freeze({added:e,removed:n,changed:o}))}async getSession(e){if(e)if(typeof e=="string"){let n=this._debugSessions.get(e);if(n)return n}else{let n=this._debugSessions.get(e.id);if(!n){let o=await this.getFolder(e.folderUri),i=e.parent?this._debugSessions.get(e.parent):void 0;n=new bM(this._debugServiceProxy,e.id,e.type,e.name,o,e.configuration,i?.api),this._debugSessions.set(n.id,n),this._debugServiceProxy.$sessionCached(n.id)}return n}throw new Error("cannot find session")}getFolder(e){if(e){let n=E.revive(e);return this._workspaceService.resolveWorkspaceFolder(n)}return Promise.resolve(void 0)}extensionVisKey(e,n){return`${e}\0${n}`}serializeVisualization(e,n){if(n){if("title"in n&&"command"in n)return{type:0};if("treeId"in n)return{type:1,id:`${e}\0${n.treeId}`};throw new Error("Unsupported debug visualization type")}}getIconPathOrClass(e){let n=this.getIconUris(e),o,i;return"id"in n?i=Tt.asClassName(n):o=n,{iconPath:o,iconClass:i}}getIconUris(e){if(e instanceof En)return{id:e.id};let n=typeof e=="object"&&"dark"in e?e.dark:e,o=typeof e=="object"&&"light"in e?e.light:e;return{dark:typeof n=="string"?E.file(n):n,light:typeof o=="string"?E.file(o):o}}};Vh=L([P(0,Ee),P(1,_o),P(2,Do),P(3,Po),P(4,aa),P(5,Bh),P(6,Ko),P(7,Cc)],Vh);var bM=class{constructor(t,e,n,o,i,s,a){this._debugServiceProxy=t;this._id=e;this._type=n;this._name=o;this._workspaceFolder=i;this._configuration=s;this._parentSession=a}get api(){let t=this;return this.apiSession??=Object.freeze({id:t._id,type:t._type,get name(){return t._name},set name(e){t._name=e,t._debugServiceProxy.$setDebugSessionName(t._id,e)},parentSession:t._parentSession,workspaceFolder:t._workspaceFolder,configuration:t._configuration,customRequest(e,n){return t._debugServiceProxy.$customDebugAdapterRequest(t._id,e,n)},getDebugProtocolBreakpoint(e){return t._debugServiceProxy.$getDebugProtocolBreakpoint(t._id,e.id)}})}get id(){return this._id}get type(){return this._type}_acceptNameChanged(t){this._name=t}get configuration(){return this._configuration}},IM=class{constructor(t){this.value=Object.freeze({append(e){t.$appendDebugConsole(e)},appendLine(e){this.append(e+`
`)}})}},yM=class{constructor(t){this.trackers=t}onWillStartSession(){this.trackers.forEach(t=>t.onWillStartSession?t.onWillStartSession():void 0)}onWillReceiveMessage(t){this.trackers.forEach(e=>e.onWillReceiveMessage?e.onWillReceiveMessage(t):void 0)}onDidSendMessage(t){this.trackers.forEach(e=>e.onDidSendMessage?e.onDidSendMessage(t):void 0)}onWillStopSession(){this.trackers.forEach(t=>t.onWillStopSession?t.onWillStopSession():void 0)}onError(t){this.trackers.forEach(e=>e.onError?e.onError(t):void 0)}onExit(t,e){this.trackers.forEach(n=>n.onExit?n.onExit(t,e):void 0)}},EM=class extends _x{constructor(e){super();this.implementation=e;e.onDidSendMessage(n=>{this.acceptMessage(n)})}startSession(){return Promise.resolve(void 0)}sendMessage(e){this.implementation.handleMessage(e)}stopSession(){return this.implementation.dispose(),Promise.resolve(void 0)}},Tm=class extends Vh{constructor(t,e,n,o,i,s,a,l){super(t,e,n,o,i,s,a,l)}};Tm=L([P(0,Ee),P(1,_o),P(2,Do),P(3,Po),P(4,aa),P(5,Bh),P(6,Ko),P(7,Cc)],Tm);function bq(r){return"uri"in r&&"ranges"in r&&"preview"in r}function Iq(r){return r.folderOptions.map(t=>({folder:t.folder,excludes:t.excludes.map(e=>typeof e=="string"?e:e.pattern),includes:t.includes,useGlobalIgnoreFiles:t.useIgnoreFiles.global,useIgnoreFiles:t.useIgnoreFiles.local,useParentIgnoreFiles:t.useIgnoreFiles.parent,followSymlinks:t.followSymlinks,maxResults:r.maxResults,session:r.session}))}var _m=class{constructor(t){this.provider=t}provideFileSearchResults(t,e,n){return(async()=>{let i=Iq(e);return Promise.all(i.map(s=>this.provider.provideFileSearchResults({pattern:t},s,n)))})().then(i=>pt(i).flat())}};function yq(r){return r.folderOptions.map(t=>({folder:t.folder,excludes:t.excludes.map(e=>typeof e=="string"?e:e.pattern),includes:t.includes,useGlobalIgnoreFiles:t.useIgnoreFiles.global,useIgnoreFiles:t.useIgnoreFiles.local,useParentIgnoreFiles:t.useIgnoreFiles.parent,followSymlinks:t.followSymlinks,maxResults:r.maxResults,previewOptions:Eq(r.previewOptions),maxFileSize:r.maxFileSize,encoding:t.encoding,afterContext:r.surroundingContext,beforeContext:r.surroundingContext}))}function Eq(r){return{matchLines:r?.matchLines??lh.matchLines,charsPerLine:r?.charsPerLine??lh.charsPerLine}}function Sq(r){if(bq(r)){let t=Rn(r.ranges).map((e,n)=>{let i=Rn(r.preview.matches)[n];return{sourceRange:e,previewRange:i}});return new qo(r.uri,t,r.preview.text)}else return new Cl(r.uri,r.text,r.lineNumber)}var Ax=class{constructor(t){this.provider=t}provideTextSearchResults(t,e,n,o){let i=l=>{xq(l)&&n.report(Sq(l))};return(async()=>pt(await Promise.all(yq(e).map(l=>this.provider.provideTextSearchResults(t,l,{report:d=>i(d)},o)))).reduce((l,d)=>({limitHit:l.limitHit||d.limitHit}),{limitHit:!1}))().then(l=>({limitHit:l.limitHit,message:pt(Rn(l.message))}))}};function xq(r){if(Cq(r)){if(Array.isArray(r.ranges)){if(!Array.isArray(r.preview.matches))return console.warn("INVALID - A text search provider match's`ranges` and`matches` properties must have the same type."),!1;if(r.preview.matches.length!==r.ranges.length)return console.warn("INVALID - A text search provider match's`ranges` and`matches` properties must have the same length."),!1}else if(Array.isArray(r.preview.matches))return console.warn("INVALID - A text search provider match's`ranges` and`matches` properties must have the same length."),!1}return!0}function Cq(r){return!!r.preview}var Pm=class extends Oo{constructor(t,e,n=()=>!1){let o=new Jf(n,()=>!1);super(o);let i=new et;t.forEach((s,a)=>{let l=s.folder.with({query:"",fragment:""});i.has(l)?i.get(l).push({fq:s,i:a}):i.set(l,[{fq:s,i:a}])}),i.forEach((s,a)=>{let l=new Map;for(let d of s){let c=e(d.fq,d.i);l.set(this.encodeKey(d.fq.folder),c)}super.set(a,l)})}findQueryFragmentAwareSubstr(t){let e=super.findSubstr(t.with({query:"",fragment:""}));if(!e)return;let n=this.encodeKey(t);return e.get(n)}forEachFolderQueryInfo(t){return this.forEach(e=>e.forEach(n=>t(n)))}encodeKey(t){let e="";return t.query&&(e+=t.query),t.fragment&&(e+="#"+t.fragment),e}};var SM=class{constructor(t,e,n){this.config=t;this.provider=e;this.sessionLifecycle=n;this.isLimitHit=!1;this.resultCount=0;this.isCanceled=!1;this.filePattern=t.filePattern;let o=t.ignoreGlobCase?{ignoreCase:!0}:void 0;this.includePattern=t.includePattern&&ei(t.includePattern,o),this.maxResults=t.maxResults||void 0,this.exists=t.exists,this.activeCancellationTokens=new Set,this.globalExcludePattern=t.excludePattern&&ei(t.excludePattern,o)}cancel(){this.isCanceled=!0,this.activeCancellationTokens.forEach(t=>t.cancel()),this.activeCancellationTokens=new Set}search(t){let e=this.config.folderQueries||[];return new Promise((n,o)=>{let i=s=>{this.resultCount++,t(s)};if(this.isCanceled)return n({limitHit:this.isLimitHit});this.config.extraFileResources&&this.config.extraFileResources.forEach(s=>{let a=s.toString(),l=Cn(a);this.globalExcludePattern&&this.globalExcludePattern(a,l)||this.matchFile(i,{base:s,basename:l})}),this.doSearch(e,i).then(s=>{n({limitHit:this.isLimitHit,stats:s||void 0})},s=>{o(new Error(Gr(s)))})})}async doSearch(t,e){let n=new We,o=t.map(c=>this.getSearchOptionsForFolder(c)),i=this.provider instanceof _m?this.sessionLifecycle?.tokenSource.token:this.sessionLifecycle?.obj,s={folderOptions:o,maxResults:this.config.maxResults??jE,session:i},a=c=>{let u=new Pp(this.config,c),f=!u.hasSiblingExcludeClauses();return{queryTester:u,noSiblingsClauses:f,folder:c.folder,tree:this.initDirectoryTree()}},l=new Pm(t,a),d;try{this.activeCancellationTokens.add(n),d=uo.create();let c=await this.provider.provideFileSearchResults(this.config.filePattern||"",s,n.token),u=d.elapsed(),f=uo.create();return this.isCanceled&&!this.isLimitHit||(c&&c.forEach(g=>{let I=l.findQueryFragmentAwareSubstr(g),h=qe.relative(I.folder.path,g.path);if(I.noSiblingsClauses){let C=Cn(g.path);this.matchFile(e,{base:I.folder,relativePath:h,basename:C});return}this.addDirectoryEntries(I.tree,I.folder,h,e)}),this.isCanceled&&!this.isLimitHit)?null:(l.forEachFolderQueryInfo(g=>{this.matchDirectoryTree(g.tree,g.queryTester,e)}),{providerTime:u,postProcessTime:f.elapsed()})}finally{n.dispose(),this.activeCancellationTokens.delete(n)}}getSearchOptionsForFolder(t){let e=Tl(this.config.includePattern,t.includePattern),n=t.excludePattern?.map(i=>({folder:i.folder,patterns:Tl(this.config.excludePattern,i.pattern)}));n?.length||(n=[{folder:void 0,patterns:Tl(this.config.excludePattern,void 0)}]);let o=QE(n);return{folder:t.folder,excludes:o,includes:e,useIgnoreFiles:{local:!t.disregardIgnoreFiles,parent:!t.disregardParentIgnoreFiles,global:!t.disregardGlobalIgnoreFiles},followSymlinks:!t.ignoreSymlinks}}initDirectoryTree(){let t={rootEntries:[],pathToEntries:Object.create(null)};return t.pathToEntries["."]=t.rootEntries,t}addDirectoryEntries({pathToEntries:t},e,n,o){if(this.filePattern&&zv(n,this.filePattern,this.config.ignoreGlobCase)){let s=Cn(this.filePattern);this.matchFile(o,{base:e,relativePath:this.filePattern,basename:s})}function i(s){let a=Cn(s),l=Ci(s),d=t[l];d||(d=t[l]=[],i(l)),d.push({base:e,relativePath:s,basename:a})}i(n)}matchDirectoryTree({rootEntries:t,pathToEntries:e},n,o){let i=this,s=this.filePattern,a=this.config.ignoreGlobCase;function l(d){let c=EB(()=>d.map(u=>u.basename));for(let u=0,f=d.length;u<f;u++){let g=d[u],{relativePath:I,basename:h}=g;if(n.matchesExcludesSync(I,h,zv(s,h,a)?void 0:c))continue;let C=e[I];if(C)l(C);else{if(zv(I,s,a))continue;i.matchFile(o,g)}if(i.isLimitHit)break}}l(t)}matchFile(t,e){(!this.includePattern||e.relativePath&&this.includePattern(e.relativePath,e.basename))&&((this.exists||this.maxResults&&this.resultCount>=this.maxResults)&&(this.isLimitHit=!0,this.cancel()),this.isLimitHit||t(e))}},xM=class{constructor(){this._obj=new Object,this.tokenSource=new We}get obj(){if(this._obj)return this._obj;throw new Error("Session object has been dereferenced.")}cancel(){this.tokenSource.cancel(),this._obj=void 0}},Ox=class r{constructor(){this.sessions=new Map}static{this.BATCH_SIZE=512}fileSearch(t,e,n,o){let i=this.getSessionTokenSource(t.cacheKey),s=new SM(t,e,i),a=0,l=d=>{a+=d.length,n(d.map(c=>this.rawMatchToSearchItem(c)))};return this.doSearch(s,r.BATCH_SIZE,l,o).then(d=>({limitHit:d.limitHit,stats:d.stats?{fromCache:!1,type:"fileSearchProvider",resultCount:a,detailStats:d.stats}:void 0,messages:[]}))}clearCache(t){this.sessions.get(t)?.cancel(),this.sessions.delete(t)}getSessionTokenSource(t){if(t)return this.sessions.has(t)||this.sessions.set(t,new xM),this.sessions.get(t)}rawMatchToSearchItem(t){return t.relativePath?{resource:Qt(t.base,t.relativePath)}:{resource:t.base}}doSearch(t,e,n,o){let i=o.onCancellationRequested(()=>{t.cancel()}),s=l=>{l&&(a.push(l),e>0&&a.length>=e&&(n(a),a=[]))},a=[];return t.search(s).then(l=>(a.length&&n(a),i.dispose(),l),l=>(a.length&&n(a),i.dispose(),Promise.reject(l)))}};var Wh=class{constructor(t,e,n){this.queryProviderPair=t;this.fileUtils=e;this.processType=n;this.collector=null;this.isLimitHit=!1;this.resultCount=0}get query(){return this.queryProviderPair.query}search(t,e,n){let o=this.query.folderQueries||[],i=new We(e);return new Promise((s,a)=>{this.collector=new CM(t);let l=!1,d=(c,u)=>{if(!(c instanceof uc)&&!l&&!this.isLimitHit){let f=this.resultSize(c);c instanceof qo&&typeof this.query.maxResults=="number"&&this.resultCount+f>this.query.maxResults&&(this.isLimitHit=!0,l=!0,i.cancel(),c=this.trimResultToSize(c,this.query.maxResults-this.resultCount));let g=this.resultSize(c);this.resultCount+=g;let I=c instanceof qo;(g>0||!I)&&this.collector.add(c,u)}};this.doSearch(o,d,i.token,n).then(c=>{i.dispose(),this.collector.flush(),s({limitHit:this.isLimitHit||c?.limitHit,messages:this.getMessagesFromResults(c),stats:{type:this.processType}})},c=>{i.dispose();let u=Gr(c);a(new Error(u))})})}getMessagesFromResults(t){return t?.message?Array.isArray(t.message)?t.message:[t.message]:[]}resultSize(t){return t instanceof qo?Array.isArray(t.ranges)?t.ranges.length:1:0}trimResultToSize(t,e){return new qo(t.uri,t.ranges.slice(0,e),t.previewText)}async doSearch(t,e,n,o){let i=new Pm(t,(u,f)=>({queryTester:new Pp(this.query,u),folder:u.folder,folderIdx:f}),()=>!0),s=[],a={report:u=>{if(u instanceof uc)o?.(u);else{if(u.uri===void 0)throw Error("Text search result URI is undefined. Please check provider implementation.");let f=i.findQueryFragmentAwareSubstr(u.uri);if(f?.folder?.scheme){let g=f.folder.scheme===X.file?yB(()=>this.fileUtils.readdir(bs(u.uri))):void 0,I=Lf(f.folder,u.uri);if(I){let h=f.queryTester.includedInQuery(I,Cn(I),g);br(h)?s.push(h.then(C=>{C&&e(u,f.folderIdx)})):h&&e(u,f.folderIdx)}}}}},d={folderOptions:t.map(u=>this.getSearchOptionsForFolder(u)),maxFileSize:this.query.maxFileSize,maxResults:this.query.maxResults??jE,previewOptions:this.query.previewOptions??lh,surroundingContext:this.query.surroundingContext??0};"usePCRE2"in this.query&&(d.usePCRE2=this.query.usePCRE2);let c;return this.queryProviderPair.query.type===3?c=await this.queryProviderPair.provider.provideAITextSearchResults(this.queryProviderPair.query.contentPattern,d,a,n):c=await this.queryProviderPair.provider.provideTextSearchResults(Tq(this.queryProviderPair.query.contentPattern),d,a,n),s.length&&await Promise.all(s),c}getSearchOptionsForFolder(t){let e=Tl(this.query.includePattern,t.includePattern),n=t.excludePattern?.map(s=>({folder:s.folder,patterns:Tl(this.query.excludePattern,s.pattern)}));(!n||n.length===0)&&(n=[{folder:void 0,patterns:Tl(this.query.excludePattern,void 0)}]);let o=QE(n);return{folder:E.from(t.folder),excludes:o,includes:e,useIgnoreFiles:{local:!t.disregardIgnoreFiles,parent:!t.disregardParentIgnoreFiles,global:!t.disregardGlobalIgnoreFiles},followSymlinks:!t.ignoreSymlinks,encoding:(t.fileEncoding&&this.fileUtils.toCanonicalName(t.fileEncoding))??"",ignoreGlobCase:this.query.ignoreGlobCase||t.ignoreGlobCase}}};function Tq(r){return{isCaseSensitive:r.isCaseSensitive||!1,isRegExp:r.isRegExp||!1,isWordMatch:r.isWordMatch||!1,isMultiline:r.isMultiline||!1,pattern:r.pattern}}var CM=class{constructor(t){this._onResult=t;this._currentFolderIdx=-1;this._currentFileMatch=null;this._batchedCollector=new TM(512,e=>this.sendItems(e))}add(t,e){this._currentFileMatch&&(this._currentFolderIdx!==e||!Wr(this._currentUri,t.uri))&&(this.pushToCollector(),this._currentFileMatch=null),this._currentFileMatch||(this._currentFolderIdx=e,this._currentUri=t.uri,this._currentFileMatch={resource:t.uri,results:[]}),this._currentFileMatch.results.push(_q(t))}pushToCollector(){let t=this._currentFileMatch&&this._currentFileMatch.results?this._currentFileMatch.results.length:0;this._batchedCollector.addItem(this._currentFileMatch,t)}flush(){this.pushToCollector(),this._batchedCollector.flush()}sendItems(t){this._onResult(t)}};function _q(r){return r instanceof qo?{previewText:r.previewText,rangeLocations:r.ranges.map(t=>({preview:{startLineNumber:t.previewRange.start.line,startColumn:t.previewRange.start.character,endLineNumber:t.previewRange.end.line,endColumn:t.previewRange.end.character},source:{startLineNumber:t.sourceRange.start.line,startColumn:t.sourceRange.start.character,endLineNumber:t.sourceRange.end.line,endColumn:t.sourceRange.end.character}}))}:{text:r.text,lineNumber:r.lineNumber}}var TM=class r{constructor(t,e){this.maxBatchSize=t;this.cb=e;this.totalNumberCompleted=0;this.batch=[];this.batchSize=0}static{this.TIMEOUT=4e3}static{this.START_BATCH_AFTER_COUNT=50}addItem(t,e){t&&this.addItemToBatch(t,e)}addItems(t,e){t&&this.addItemsToBatch(t,e)}addItemToBatch(t,e){this.batch.push(t),this.batchSize+=e,this.onUpdate()}addItemsToBatch(t,e){this.batch=this.batch.concat(t),this.batchSize+=e,this.onUpdate()}onUpdate(){this.totalNumberCompleted<r.START_BATCH_AFTER_COUNT?this.flush():this.batchSize>=this.maxBatchSize?this.flush():this.timeoutHandle||(this.timeoutHandle=setTimeout(()=>{this.flush()},r.TIMEOUT))}flush(){this.batchSize&&(this.totalNumberCompleted+=this.batchSize,this.cb(this.batch),this.batch=[],this.batchSize=0,this.timeoutHandle&&(clearTimeout(this.timeoutHandle),this.timeoutHandle=void 0))}};var Lx=N("IExtHostSearch"),Dm=class{constructor(t,e,n){this.extHostRpc=t;this._uriTransformer=e;this._logService=n;this._onDidFinishSearch=new D;this.onDidFinishSearch=this._onDidFinishSearch.event;this._proxy=this.extHostRpc.getProxy(V.MainThreadSearch),this._handlePool=0,this._textSearchProvider=new Map,this._textSearchUsedSchemes=new Set,this._aiTextSearchProvider=new Map,this._aiTextSearchUsedSchemes=new Set,this._fileSearchProvider=new Map,this._fileSearchUsedSchemes=new Set,this._fileSearchManager=new Ox}_transformScheme(t){return this._uriTransformer.transformOutgoingScheme(t)}registerTextSearchProviderOld(t,e){if(this._textSearchUsedSchemes.has(t))throw new Error(`a text search provider for the scheme '${t}' is already registered`);this._textSearchUsedSchemes.add(t);let n=this._handlePool++;return this._textSearchProvider.set(n,new Ax(e)),this._proxy.$registerTextSearchProvider(n,this._transformScheme(t)),ae(()=>{this._textSearchUsedSchemes.delete(t),this._textSearchProvider.delete(n),this._proxy.$unregisterProvider(n)})}registerTextSearchProvider(t,e){if(this._textSearchUsedSchemes.has(t))throw new Error(`a text search provider for the scheme '${t}' is already registered`);this._textSearchUsedSchemes.add(t);let n=this._handlePool++;return this._textSearchProvider.set(n,e),this._proxy.$registerTextSearchProvider(n,this._transformScheme(t)),ae(()=>{this._textSearchUsedSchemes.delete(t),this._textSearchProvider.delete(n),this._proxy.$unregisterProvider(n)})}registerAITextSearchProvider(t,e){if(this._aiTextSearchUsedSchemes.has(t))throw new Error(`an AI text search provider for the scheme '${t}'is already registered`);this._aiTextSearchUsedSchemes.add(t);let n=this._handlePool++;return this._aiTextSearchProvider.set(n,e),this._proxy.$registerAITextSearchProvider(n,this._transformScheme(t)),ae(()=>{this._aiTextSearchUsedSchemes.delete(t),this._aiTextSearchProvider.delete(n),this._proxy.$unregisterProvider(n)})}registerFileSearchProviderOld(t,e){if(this._fileSearchUsedSchemes.has(t))throw new Error(`a file search provider for the scheme '${t}' is already registered`);this._fileSearchUsedSchemes.add(t);let n=this._handlePool++;return this._fileSearchProvider.set(n,new _m(e)),this._proxy.$registerFileSearchProvider(n,this._transformScheme(t)),ae(()=>{this._fileSearchUsedSchemes.delete(t),this._fileSearchProvider.delete(n),this._proxy.$unregisterProvider(n)})}registerFileSearchProvider(t,e){if(this._fileSearchUsedSchemes.has(t))throw new Error(`a file search provider for the scheme '${t}' is already registered`);this._fileSearchUsedSchemes.add(t);let n=this._handlePool++;return this._fileSearchProvider.set(n,e),this._proxy.$registerFileSearchProvider(n,this._transformScheme(t)),ae(()=>{this._fileSearchUsedSchemes.delete(t),this._fileSearchProvider.delete(n),this._proxy.$unregisterProvider(n)})}$provideFileSearchResults(t,e,n,o){let i=_M(n),s=this._fileSearchProvider.get(t);if(s)return this._fileSearchManager.fileSearch(i,s,a=>{this._proxy.$handleFileMatch(t,e,a.map(l=>l.resource))},o);throw new Error("unknown provider: "+t)}async doInternalFileSearchWithCustomCallback(t,e,n){return{messages:[]}}$clearCache(t){return this._fileSearchManager.clearCache(t),Promise.resolve(void 0)}$provideTextSearchResults(t,e,n,o){let i=this._textSearchProvider.get(t);if(!i||!i.provideTextSearchResults)throw new Error(`Unknown Text Search Provider ${t}`);let s=_M(n);return this.createTextSearchManager(s,i).search(l=>this._proxy.$handleTextMatch(t,e,l),o)}$provideAITextSearchResults(t,e,n,o){let i=this._aiTextSearchProvider.get(t);if(!i||!i.provideAITextSearchResults)throw new Error(`Unknown AI Text Search Provider ${t}`);let s=_M(n);return this.createAITextSearchManager(s,i).search(l=>this._proxy.$handleTextMatch(t,e,l),o,l=>this._proxy.$handleKeywordResult(t,e,l))}$enableExtensionHostSearch(){}$handleSearchCompleted(t){this._onDidFinishSearch.fire(t)}async $getAIName(t){let e=this._aiTextSearchProvider.get(t);if(!(!e||!e.provideAITextSearchResults))return e.name??"AI"}createTextSearchManager(t,e){return new Wh({query:t,provider:e},{readdir:n=>Promise.resolve([]),toCanonicalName:n=>n},"textSearchProvider")}createAITextSearchManager(t,e){return new Wh({query:t,provider:e},{readdir:n=>Promise.resolve([]),toCanonicalName:n=>n},"aiTextSearchProvider")}};Dm=L([P(0,Ee),P(1,Aa),P(2,be)],Dm);function _M(r){return{...r,folderQueries:r.folderQueries&&r.folderQueries.map(Pq),extraFileResources:r.extraFileResources&&r.extraFileResources.map(t=>E.revive(t))}}function Pq(r){return nn(r)}var wm=class extends K{constructor(e){super();this._onDidSuspend=this._register(new D);this.onDidSuspend=this._onDidSuspend.event;this._onDidResume=this._register(new D);this.onDidResume=this._onDidResume.event;this._onDidChangeOnBatteryPower=this._register(new D);this.onDidChangeOnBatteryPower=this._onDidChangeOnBatteryPower.event;this._onDidChangeThermalState=this._register(new D);this.onDidChangeThermalState=this._onDidChangeThermalState.event;this._onDidChangeSpeedLimit=this._register(new D);this.onDidChangeSpeedLimit=this._onDidChangeSpeedLimit.event;this._onWillShutdown=this._register(new D);this.onWillShutdown=this._onWillShutdown.event;this._onDidLockScreen=this._register(new D);this.onDidLockScreen=this._onDidLockScreen.event;this._onDidUnlockScreen=this._register(new D);this.onDidUnlockScreen=this._onDidUnlockScreen.event;this._proxy=e.getProxy(V.MainThreadPower)}$onDidSuspend(){this._onDidSuspend.fire()}$onDidResume(){this._onDidResume.fire()}$onDidChangeOnBatteryPower(e){this._onDidChangeOnBatteryPower.fire(e)}$onDidChangeThermalState(e){this._onDidChangeThermalState.fire(e)}$onDidChangeSpeedLimit(e){this._onDidChangeSpeedLimit.fire(e)}$onWillShutdown(){this._onWillShutdown.fire()}$onDidLockScreen(){this._onDidLockScreen.fire()}$onDidUnlockScreen(){this._onDidUnlockScreen.fire()}getSystemIdleState(e){return this._proxy.$getSystemIdleState(e)}getSystemIdleTime(){return this._proxy.$getSystemIdleTime()}getCurrentThermalState(){return this._proxy.$getCurrentThermalState()}isOnBatteryPower(){return this._proxy.$isOnBatteryPower()}async startPowerSaveBlocker(e){let n=await this._proxy.$startPowerSaveBlocker(e),o=this._proxy,i=n>=0,s=!1;return{id:n,get isStarted(){return i&&!s},dispose:()=>{i&&!s&&(s=!0,o.$stopPowerSaveBlocker(n))}}}};wm=L([P(0,Ee)],wm);var Mx=N("IExtHostPower");var Rm=class extends hb{constructor(t,e){super(e.logLevel,e.logsLocation,e.loggers.map(n=>nn(n))),this._proxy=t.getProxy(V.MainThreadLogger)}$setLogLevel(t,e){e?this.setLogLevel(E.revive(e),t):this.setLogLevel(t)}setVisibility(t,e){super.setVisibility(t,e),this._proxy.$setVisibility(t,e)}doCreateLogger(t,e,n){return new PM(this._proxy,t,e,n)}};Rm=L([P(0,Ee),P(1,Et)],Rm);var PM=class extends iu{constructor(e,n,o,i){super(i?.logLevel==="always");this.proxy=e;this.file=n;this.isLoggerCreated=!1;this.buffer=[];this.setLevel(o),this.proxy.$createLogger(n,i).then(()=>{this.doLog(this.buffer),this.isLoggerCreated=!0})}log(e,n){let o=[[e,n]];this.isLoggerCreated?this.doLog(o):this.buffer.push(...o)}doLog(e){this.proxy.$log(this.file,e)}flush(){this.proxy.$flush(this.file)}};var Hx=N("IExtHostTerminalShellIntegration"),km=class extends K{constructor(e,n){super();this._extHostTerminalService=n;this._activeShellIntegrations=new Map;this._onDidChangeTerminalShellIntegration=this._register(new D);this.onDidChangeTerminalShellIntegration=this._onDidChangeTerminalShellIntegration.event;this._onDidStartTerminalShellExecution=this._register(new D);this.onDidStartTerminalShellExecution=this._onDidStartTerminalShellExecution.event;this._onDidEndTerminalShellExecution=this._register(new D);this.onDidEndTerminalShellExecution=this._onDidEndTerminalShellExecution.event;this._onDidRejectTerminalShellIntegrationInjection=new D;this.onDidRejectTerminalShellIntegrationInjection=this._onDidRejectTerminalShellIntegrationInjection.event;this._proxy=e.getProxy(V.MainThreadTerminalShellIntegration),this._register(ae(()=>{for(let[o,i]of this._activeShellIntegrations)i.dispose();this._activeShellIntegrations.clear()}))}$shellIntegrationChange(e,n){let o=this._extHostTerminalService.getTerminalById(e);if(!o)return;let i=o.value,s=this._activeShellIntegrations.get(e);s||(s=new DM(o.value,n,this._onDidStartTerminalShellExecution),this._activeShellIntegrations.set(e,s),s.store.add(o.onWillDispose(()=>this._activeShellIntegrations.get(e)?.dispose())),s.store.add(s.onDidRequestShellExecution(a=>this._proxy.$executeCommand(e,a))),s.store.add(s.onDidRequestEndExecution(a=>this._onDidEndTerminalShellExecution.fire(a))),s.store.add(s.onDidRequestChangeShellIntegration(a=>this._onDidChangeTerminalShellIntegration.fire(a))),o.shellIntegration=s.value),this._onDidChangeTerminalShellIntegration.fire({terminal:i,shellIntegration:s.value})}$shellExecutionStart(e,n,o,i,s,a){this._activeShellIntegrations.has(e)||this.$shellIntegrationChange(e,n);let l={value:o,confidence:i,isTrusted:s};this._activeShellIntegrations.get(e)?.startShellExecution(l,this._convertCwdToUri(a))}$shellExecutionEnd(e,n,o,i,s){let a={value:n,confidence:o,isTrusted:i};this._activeShellIntegrations.get(e)?.endShellExecution(a,s)}$shellExecutionData(e,n){this._activeShellIntegrations.get(e)?.emitData(n)}$shellEnvChange(e,n,o,i){this._activeShellIntegrations.get(e)?.setEnv(n,o,i)}$cwdChange(e,n){this._activeShellIntegrations.get(e)?.setCwd(this._convertCwdToUri(n))}$closeTerminal(e){this._activeShellIntegrations.get(e)?.dispose(),this._activeShellIntegrations.delete(e)}$shellIntegrationInjectionFailed(e,n){let o=this._extHostTerminalService.getTerminalById(e);o&&this._onDidRejectTerminalShellIntegrationInjection.fire({terminal:o.value,reason:n})}_convertCwdToUri(e){return e?E.file(e):void 0}};km=L([P(0,Ee),P(1,ui)],km);var DM=class extends K{constructor(e,n,o){super();this._terminal=e;this._onDidStartTerminalShellExecution=o;this._pendingExecutions=[];this.store=this._register(new te);this._onDidRequestChangeShellIntegration=this._register(new D);this.onDidRequestChangeShellIntegration=this._onDidRequestChangeShellIntegration.event;this._onDidRequestShellExecution=this._register(new D);this.onDidRequestShellExecution=this._onDidRequestShellExecution.event;this._onDidRequestEndExecution=this._register(new D);this.onDidRequestEndExecution=this._onDidRequestEndExecution.event;this._onDidRequestNewExecution=this._register(new D);this.onDidRequestNewExecution=this._onDidRequestNewExecution.event;let i=this;this.value={get cwd(){return i._cwd},get env(){if(i._env)return Object.freeze({isTrusted:i._env.isTrusted,value:Object.freeze({...i._env.value})})},executeCommand(s,a){if(!n)throw new Error("This terminal does not support the executeCommand API.");let l=s;if(a)for(let u of a)!u.match(/["'`]/)&&u.match(/\s/)?l+=` "${u}"`:l+=` ${u}`;i._onDidRequestShellExecution.fire(l);let d={value:l,confidence:2,isTrusted:!0};return i.requestNewShellExecution(d,i._cwd).value}}}get currentExecution(){return this._currentExecution}requestNewShellExecution(e,n){let o=new Ux(e,n??this._cwd);return Nx(e.value).length>1&&(this._currentExecutionProperties={isMultiLine:!0,unresolvedCommandLines:Nx(e.value)}),this._pendingExecutions.push(o),this._onDidRequestNewExecution.fire(e.value),o}startShellExecution(e,n){if(this._pendingEndingExecution&&(this._onDidRequestEndExecution.fire({terminal:this._terminal,shellIntegration:this.value,execution:this._pendingEndingExecution.value,exitCode:void 0}),this._pendingEndingExecution=void 0),this._currentExecution){if(this._currentExecutionProperties?.isMultiLine&&this._currentExecutionProperties.unresolvedCommandLines){let i=u5(this._currentExecutionProperties.unresolvedCommandLines,e);if(i){this._currentExecutionProperties.unresolvedCommandLines=i.unresolvedCommandLines;return}}this._currentExecution.endExecution(void 0),this._currentExecution.flush(),this._onDidRequestEndExecution.fire({terminal:this._terminal,shellIntegration:this.value,execution:this._currentExecution.value,exitCode:void 0})}let o;if(e.confidence===2)for(let[i,s]of this._pendingExecutions.entries())if(s.value.commandLine.value===e.value){o=s,this._currentExecutionProperties={isMultiLine:!1,unresolvedCommandLines:void 0},o=s,this._pendingExecutions.splice(i,1);break}else{let a=u5(Nx(s.value.commandLine.value),e);if(a){this._currentExecutionProperties={isMultiLine:!0,unresolvedCommandLines:a.unresolvedCommandLines},o=s,this._pendingExecutions.splice(i,1);break}}else o=this._pendingExecutions.shift();o||(o=new Ux(e,n??this._cwd)),this._currentExecution=o,this._onDidStartTerminalShellExecution.fire({terminal:this._terminal,shellIntegration:this.value,execution:this._currentExecution.value})}emitData(e){this._currentExecution?.emitData(e)}endShellExecution(e,n){if(!(this._currentExecutionProperties?.isMultiLine&&this._currentExecutionProperties.unresolvedCommandLines&&this._currentExecutionProperties.unresolvedCommandLines.length>0)&&this._currentExecution){let o=this._currentExecutionProperties?.isMultiLine?this._currentExecution.value.commandLine:e;this._currentExecution.endExecution(o);let i=this._currentExecution;this._pendingEndingExecution=i,this._currentExecution=void 0,i.flush().then(()=>{this._pendingEndingExecution===i&&(this._onDidRequestEndExecution.fire({terminal:this._terminal,shellIntegration:this.value,execution:i.value,exitCode:n}),this._pendingEndingExecution=void 0)})}}setEnv(e,n,o){let i={};for(let s=0;s<e.length;s++)i[e[s]]=n[s];this._env={value:i,isTrusted:o},this._fireChangeEvent()}setCwd(e){let n=!1;E.isUri(this._cwd)?n=!E.isUri(e)||this._cwd.toString()!==e.toString():this._cwd!==e&&(n=!0),n&&(this._cwd=e,this._fireChangeEvent())}_fireChangeEvent(){this._onDidRequestChangeShellIntegration.fire({terminal:this._terminal,shellIntegration:this.value})}},Ux=class{constructor(t,e){this._commandLine=t;this.cwd=e;this._isEnded=!1;this._dataStream=new Fx;let n=this;this.value={get commandLine(){return n._commandLine},get cwd(){return n.cwd},read(){return n._createDataStream()}}}_createDataStream(){if(!this._dataStream){if(this._isEnded)return Yc.EMPTY;this._dataStream=new Fx}return this._dataStream.createIterable()}emitData(t){this._isEnded||this._dataStream?.emitData(t)}endExecution(t){t&&(this._commandLine=t),this._dataStream?.endExecution(),this._isEnded=!0}async flush(){this._dataStream&&(await this._dataStream.flush(),this._dataStream.dispose(),this._dataStream=void 0)}},Fx=class extends K{constructor(){super(...arguments);this._iterables=[];this._emitters=[]}createIterable(){this._barrier||(this._barrier=new Ln);let e=this._barrier,n=new Yc(async o=>{this._emitters.push(o),await e.wait()});return this._iterables.push(n),n}emitData(e){for(let n of this._emitters)n.emitOne(e)}endExecution(){this._barrier?.open()}async flush(){await Promise.all(this._iterables.map(e=>e.toPromise()))}};function Nx(r){return r.split(`
`).map(t=>t.trim()).filter(t=>t.length>0)}function u5(r,t){if(r.length===0)return!1;let e=[...r],n=Nx(t.value);if(e&&e.length>0){for(;e.length>0&&e[0]===n[0];)e.shift(),n.shift();if(n.length===0)return{unresolvedCommandLines:e}}return!1}var Vx=N("IExtHostDataChannels"),Bx=class{constructor(){this._channels=new Map}createDataChannel(t,e){H(t,"dataChannels");let n=this._channels.get(e);return n||(n=new wM(e),this._channels.set(e,n)),n}$onDidReceiveData(t,e){let n=this._channels.get(t);n&&n._fireDidReceiveData(e)}},wM=class extends K{constructor(e){super();this.channelId=e;this._onDidReceiveData=new D;this.onDidReceiveData=this._onDidReceiveData.event;this._register(this._onDidReceiveData)}_fireDidReceiveData(e){this._onDidReceiveData.fire({data:e})}toString(){return`DataChannel(${this.channelId})`}};var $x=N("IExtHostMeteredConnection"),Wx=class extends K{constructor(){super();this._isConnectionMetered=!1;this._onDidChangeIsConnectionMetered=this._register(new D);this.onDidChangeIsConnectionMetered=this._onDidChangeIsConnectionMetered.event}get isConnectionMetered(){return this._isConnectionMetered}$initializeIsConnectionMetered(e){this._isConnectionMetered=e}$onDidChangeIsConnectionMetered(e){this._isConnectionMetered!==e&&(this._isConnectionMetered=e,this._onDidChangeIsConnectionMetered.fire(e))}};var Gx="vscode.git";function p5(r){switch(r){case 0:return 0;case 1:return 1;case 2:return 2;default:throw new Error(`Unknown GitRefType: ${r}`)}}function RM(r){return{name:r.name,commit:r.commit,type:p5(r.type),remote:r.remote,upstream:r.upstream?Dq(r.upstream):void 0,ahead:r.ahead,behind:r.behind}}function Dq(r){return{remote:r.remote,name:r.name,commit:r.commit}}var zx=N("IExtHostGitExtensionService"),Hl=class extends K{constructor(e,n){super();this._extHostExtensionService=n;this._repositories=new Map;this._repositoryByUri=new et;this._disposables=this._register(new te);this._proxy=e.getProxy(V.MainThreadGitExtension)}static{this._handlePool=0}async $isGitExtensionAvailable(){return!!(await this._extHostExtensionService.getExtensionRegistry()).getExtensionDescription(Gx)}async $openRepository(e){let n=await this._ensureGitApi();if(!n)return;let o=await n.openRepository(E.revive(e));if(!o)return;let i=this._repositoryByUri.get(o.rootUri);if(i!==void 0)return{handle:i,rootUri:o.rootUri,state:{HEAD:o.state.HEAD?RM(o.state.HEAD):void 0}};let s=o.state;s.HEAD===void 0&&(await He.toPromise(s.onDidChange,this._disposables),s=o.state);let a=Hl._handlePool++;return this._repositories.set(a,o),this._repositoryByUri.set(o.rootUri,a),this._disposables.add(o.state.onDidChange(()=>{this._proxy.$onDidChangeRepository(a)})),{handle:a,rootUri:o.rootUri,state:{HEAD:o.state.HEAD?RM(o.state.HEAD):void 0}}}async $getRefs(e,n,o){let i=this._repositories.get(e);if(!i)return[];try{return(await i.getRefs(n,o)).map(l=>!l.name||!l.commit?void 0:{id:l.type===0?`refs/heads/${l.name}`:l.type===1?`refs/remotes/${l.remote}/${l.name}`:`refs/tags/${l.name}`,name:l.name,type:p5(l.type),revision:l.commit}).filter(l=>!!l)}catch{return[]}}async $getRepositoryState(e){let n=this._repositories.get(e);if(!n)return;let o=n.state;return{HEAD:o.HEAD?RM(o.HEAD):void 0}}async _ensureGitApi(){if(this._gitApi)return this._gitApi;try{await this._extHostExtensionService.activateByIdWithErrors(new Ue(Gx),{startup:!1,extensionId:new Ue(Gx),activationEvent:"api"});let e=this._extHostExtensionService.getExtensionExports(new Ue(Gx));e&&typeof e.getAPI=="function"&&(this._gitApi=e.getAPI(1))}catch{}return this._gitApi}dispose(){this._disposables.dispose(),super.dispose()}};Hl=L([P(0,Ee),P(1,Do)],Hl);rt(mm,pm,1);rt(Zo,Rm,1);rt(sa,vm,1);rt(Ko,zp,0);rt(vc,Kp,0);rt(Qp,Ol,0);rt(Po,kp,0);rt(Dl,Mo,0);rt(Cc,xm,0);rt(kx,Tm,0);rt(vx,os,0);rt(fi,Im,0);rt(gm,fm,0);rt(Er,Pb,0);rt(hx,bm,1);rt(Lx,Dm,0);rt(Np,Mp,0);rt(Tx,Em,0);rt(ui,qp,0);rt(Hx,km,0);rt(Bp,Hp,0);rt(gc,kl,0);rt(Mx,wm,0);rt(hc,Al,0);rt(_o,Dp,0);rt(um,cm,0);rt(aa,Sm,0);rt(Bh,Cm,0);rt(Vx,Bx,0);rt($x,Wx,0);rt(zx,Hl,1);var qx=class extends K{constructor(t,e=[]){super(),this.logger=new gb([t,...e]),this._register(t.onDidChangeLogLevel(n=>this.setLevel(n)))}get onDidChangeLogLevel(){return this.logger.onDidChangeLogLevel}setLevel(t){this.logger.setLevel(t)}getLevel(){return this.logger.getLevel()}trace(t,...e){this.logger.trace(t,...e)}debug(t,...e){this.logger.debug(t,...e)}info(t,...e){this.logger.info(t,...e)}warn(t,...e){this.logger.warn(t,...e)}error(t,...e){this.logger.error(t,...e)}flush(){this.logger.flush()}};var Am=class extends qx{constructor(t,e,n){let o=n.remote.isRemote?"remoteexthost":t?"workerexthost":"exthost",i=n.remote.isRemote?p(3203,null):t?p(3204,null):p(3202,null);super(e.createLogger(o,{name:i}))}};Am=L([P(1,Zo),P(2,Et)],Am);function kM(r,t,e,n,o,i){if(Array.isArray(r)){let s=0;for(let a of r){let l=kM(a,t,e,n,o,i);if(l===10)return l;l>s&&(s=l)}return s}else{if(typeof r=="string")return n?r==="*"?5:r===e?10:0:0;if(r){let{language:s,pattern:a,scheme:l,hasAccessToAllModels:d,notebookType:c}=r;if(!n&&!d)return 0;c&&o&&(t=o);let u=0;if(l)if(l===t.scheme)u=10;else if(l==="*")u=5;else return 0;if(s)if(s===e)u=10;else if(s==="*")u=Math.max(u,5);else return 0;if(c)if(c===i)u=10;else if(c==="*"&&i!==void 0)u=Math.max(u,5);else return 0;if(a){let f;if(typeof a=="string"?f=a:f={...a,base:fr(a.base)},f===t.fsPath||Zr(f,t.fsPath))u=10;else return 0}return u}else return 0}}function AM(r){return typeof r=="string"?!1:Array.isArray(r)?r.some(AM):!!r.notebookType}var OM=(o=>(o[o.None=0]="None",o[o.Indent=1]="Indent",o[o.IndentOutdent=2]="IndentOutdent",o[o.Outdent=3]="Outdent",o))(OM||{});var LM=(e=>(e[e.SelectionTopCenter=1]="SelectionTopCenter",e[e.SelectionNearbyActive=2]="SelectionNearbyActive",e))(LM||{}),MM=(e=>(e[e.Primary=1]="Primary",e[e.Dropdown=2]="Dropdown",e))(MM||{});var q3e=N("editSessionIdentityService"),NM=(n=>(n[n.Complete=100]="Complete",n[n.Partial=50]="Partial",n[n.None=0]="None",n))(NM||{});var Kx=class{constructor(t){this._relatedInformationProviders=new Map;this._nextHandle=0;this._proxy=t.getProxy(V.MainThreadAiRelatedInformation)}async $provideAiRelatedInformation(t,e,n){if(this._relatedInformationProviders.size===0)throw new Error("No related information providers registered");let o=this._relatedInformationProviders.get(t);if(!o)throw new Error("related information provider not found");return await o.provideRelatedInformation(e,n)??[]}getRelatedInformation(t,e,n){return this._proxy.$getAiRelatedInformation(e,n)}registerRelatedInformationProvider(t,e,n){let o=this._nextHandle;return this._nextHandle++,this._relatedInformationProviders.set(o,n),this._proxy.$registerAiRelatedInformationProvider(o,e),new Ce(()=>{this._proxy.$unregisterAiRelatedInformationProvider(o),this._relatedInformationProviders.delete(o)})}};var Jx=class{constructor(t){this._settingsSearchProviders=new Map;this._nextHandle=0;this._proxy=t.getProxy(V.MainThreadAiSettingsSearch)}async $startSearch(t,e,n,o){if(this._settingsSearchProviders.size===0)throw new Error("No related information providers registered");let i=this._settingsSearchProviders.get(t);if(!i)throw new Error("Settings search provider not found");let s=new Ma(a=>{this._proxy.$handleSearchResult(t,wk.fromSettingsSearchResult(a))});return i.provideSettingsSearchResults(e,n,s,o)}registerSettingsSearchProvider(t,e){let n=this._nextHandle;return this._nextHandle++,this._settingsSearchProviders.set(n,e),this._proxy.$registerAiSettingsSearchProvider(n),new Ce(()=>{this._proxy.$unregisterAiSettingsSearchProvider(n),this._settingsSearchProviders.delete(n)})}};function m5(r){for(let t=0,e=r.length;t<e;t+=4){let n=r[t+0],o=r[t+1],i=r[t+2],s=r[t+3];r[t+0]=s,r[t+1]=i,r[t+2]=o,r[t+3]=n}}function Rq(r){let t=new Uint8Array(r.buffer,r.byteOffset,r.length*4);return Lv()||m5(t),ce.wrap(t)}function kq(r){let t=r.buffer;if(Lv()||m5(t),t.byteOffset%4===0)return new Uint32Array(t.buffer,t.byteOffset,t.length/4);{let e=new Uint8Array(t.byteLength);return e.set(t),new Uint32Array(e.buffer,e.byteOffset,e.length/4)}}function jx(r){let t=new Uint32Array(Aq(r)),e=0;if(t[e++]=r.id,r.type==="full")t[e++]=1,t[e++]=r.data.length,t.set(r.data,e),e+=r.data.length;else{t[e++]=2,t[e++]=r.deltas.length;for(let n of r.deltas)t[e++]=n.start,t[e++]=n.deleteCount,n.data?(t[e++]=n.data.length,t.set(n.data,e),e+=n.data.length):t[e++]=0}return Rq(t)}function Aq(r){let t=0;if(t+=2,r.type==="full")t+=1+r.data.length;else{t+=1,t+=3*r.deltas.length;for(let e of r.deltas)e.data&&(t+=e.data.length)}return t}function UM(r){let t=kq(r),e=0,n=t[e++];if(t[e++]===1){let a=t[e++],l=t.subarray(e,e+a);return e+=a,{id:n,type:"full",data:l}}let i=t[e++],s=[];for(let a=0;a<i;a++){let l=t[e++],d=t[e++],c=t[e++],u;c>0&&(u=t.subarray(e,e+c),e+=c),s[a]={start:l,deleteCount:d,data:u}}return{id:n,type:"delta",deltas:s}}var Oq=[new Oe("vscode.executeDocumentHighlights","_executeDocumentHighlights","Execute document highlight provider.",[re.Uri,re.Position],new Re("A promise that resolves to an array of DocumentHighlight-instances.",gi(nc.to))),new Oe("vscode.executeDocumentSymbolProvider","_executeDocumentSymbolProvider","Execute document symbol provider.",[re.Uri],new Re("A promise that resolves to an array of SymbolInformation and DocumentSymbol instances.",(r,t)=>{if(gf(r))return;class e extends nr{constructor(){super(...arguments);this.containerName=""}static to(i){let s=new e(i.name,rr.to(i.kind),i.containerName||"",new qt(t[0],j.to(i.range)));return s.detail=i.detail,s.range=s.location.range,s.selectionRange=j.to(i.selectionRange),s.children=i.children?i.children.map(e.to):[],s}}return r.map(e.to)})),new Oe("vscode.executeFormatDocumentProvider","_executeFormatDocumentProvider","Execute document format provider.",[re.Uri,new re("options","Formatting options",r=>!0,r=>r)],new Re("A promise that resolves to an array of TextEdits.",gi(un.to))),new Oe("vscode.executeFormatRangeProvider","_executeFormatRangeProvider","Execute range format provider.",[re.Uri,re.Range,new re("options","Formatting options",r=>!0,r=>r)],new Re("A promise that resolves to an array of TextEdits.",gi(un.to))),new Oe("vscode.executeFormatOnTypeProvider","_executeFormatOnTypeProvider","Execute format on type provider.",[re.Uri,re.Position,new re("ch","Trigger character",r=>typeof r=="string",r=>r),new re("options","Formatting options",r=>!0,r=>r)],new Re("A promise that resolves to an array of TextEdits.",gi(un.to))),new Oe("vscode.executeDefinitionProvider","_executeDefinitionProvider","Execute all definition providers.",[re.Uri,re.Position],new Re("A promise that resolves to an array of Location or LocationLink instances.",Bl)),new Oe("vscode.experimental.executeDefinitionProvider_recursive","_executeDefinitionProvider_recursive","Execute all definition providers.",[re.Uri,re.Position],new Re("A promise that resolves to an array of Location or LocationLink instances.",Bl)),new Oe("vscode.executeTypeDefinitionProvider","_executeTypeDefinitionProvider","Execute all type definition providers.",[re.Uri,re.Position],new Re("A promise that resolves to an array of Location or LocationLink instances.",Bl)),new Oe("vscode.experimental.executeTypeDefinitionProvider_recursive","_executeTypeDefinitionProvider_recursive","Execute all type definition providers.",[re.Uri,re.Position],new Re("A promise that resolves to an array of Location or LocationLink instances.",Bl)),new Oe("vscode.executeDeclarationProvider","_executeDeclarationProvider","Execute all declaration providers.",[re.Uri,re.Position],new Re("A promise that resolves to an array of Location or LocationLink instances.",Bl)),new Oe("vscode.experimental.executeDeclarationProvider_recursive","_executeDeclarationProvider_recursive","Execute all declaration providers.",[re.Uri,re.Position],new Re("A promise that resolves to an array of Location or LocationLink instances.",Bl)),new Oe("vscode.executeImplementationProvider","_executeImplementationProvider","Execute all implementation providers.",[re.Uri,re.Position],new Re("A promise that resolves to an array of Location or LocationLink instances.",Bl)),new Oe("vscode.experimental.executeImplementationProvider_recursive","_executeImplementationProvider_recursive","Execute all implementation providers.",[re.Uri,re.Position],new Re("A promise that resolves to an array of Location or LocationLink instances.",Bl)),new Oe("vscode.executeReferenceProvider","_executeReferenceProvider","Execute all reference providers.",[re.Uri,re.Position],new Re("A promise that resolves to an array of Location-instances.",gi(no.to))),new Oe("vscode.experimental.executeReferenceProvider","_executeReferenceProvider_recursive","Execute all reference providers.",[re.Uri,re.Position],new Re("A promise that resolves to an array of Location-instances.",gi(no.to))),new Oe("vscode.executeHoverProvider","_executeHoverProvider","Execute all hover providers.",[re.Uri,re.Position],new Re("A promise that resolves to an array of Hover-instances.",gi(Ip.to))),new Oe("vscode.experimental.executeHoverProvider_recursive","_executeHoverProvider_recursive","Execute all hover providers.",[re.Uri,re.Position],new Re("A promise that resolves to an array of Hover-instances.",gi(Ip.to))),new Oe("vscode.executeSelectionRangeProvider","_executeSelectionRangeProvider","Execute selection range provider.",[re.Uri,new re("position","A position in a text document",r=>Array.isArray(r)&&r.every(t=>we.isPosition(t)),r=>r.map(st.from))],new Re("A promise that resolves to an array of ranges.",r=>r.map(t=>{let e;for(let n of t.reverse())e=new Wi(j.to(n),e);return e}))),new Oe("vscode.executeWorkspaceSymbolProvider","_executeWorkspaceSymbolProvider","Execute all workspace symbol providers.",[re.String.with("query","Search string")],new Re("A promise that resolves to an array of SymbolInformation-instances.",r=>r.map(Sl.to))),new Oe("vscode.prepareCallHierarchy","_executePrepareCallHierarchy","Prepare call hierarchy at a position inside a document",[re.Uri,re.Position],new Re("A promise that resolves to an array of CallHierarchyItem-instances",r=>r.map(Zs.to))),new Oe("vscode.provideIncomingCalls","_executeProvideIncomingCalls","Compute incoming calls for an item",[re.CallHierarchyItem],new Re("A promise that resolves to an array of CallHierarchyIncomingCall-instances",r=>r.map(nk.to))),new Oe("vscode.provideOutgoingCalls","_executeProvideOutgoingCalls","Compute outgoing calls for an item",[re.CallHierarchyItem],new Re("A promise that resolves to an array of CallHierarchyOutgoingCall-instances",r=>r.map(ok.to))),new Oe("vscode.prepareRename","_executePrepareRename","Execute the prepareRename of rename provider.",[re.Uri,re.Position],new Re("A promise that resolves to a range and placeholder text.",r=>{if(r)return{range:j.to(r.range),placeholder:r.text}})),new Oe("vscode.executeDocumentRenameProvider","_executeDocumentRenameProvider","Execute rename provider.",[re.Uri,re.Position,re.String.with("newName","The new symbol name")],new Re("A promise that resolves to a WorkspaceEdit.",r=>{if(r){if(r.rejectReason)throw new Error(r.rejectReason);return ro.to(r)}})),new Oe("vscode.executeLinkProvider","_executeLinkProvider","Execute document link provider.",[re.Uri,re.Number.with("linkResolveCount","Number of links that should be resolved, only when links are unresolved.").optional()],new Re("A promise that resolves to an array of DocumentLink-instances.",r=>r.map(ea.to))),new Oe("vscode.provideDocumentSemanticTokensLegend","_provideDocumentSemanticTokensLegend","Provide semantic tokens legend for a document",[re.Uri],new Re("A promise that resolves to SemanticTokensLegend.",r=>{if(r)return new zd(r.tokenTypes,r.tokenModifiers)})),new Oe("vscode.provideDocumentSemanticTokens","_provideDocumentSemanticTokens","Provide semantic tokens for a document",[re.Uri],new Re("A promise that resolves to SemanticTokens.",r=>{if(!r)return;let t=UM(r);if(t.type==="full")return new si(t.data,void 0)})),new Oe("vscode.provideDocumentRangeSemanticTokensLegend","_provideDocumentRangeSemanticTokensLegend","Provide semantic tokens legend for a document range",[re.Uri,re.Range.optional()],new Re("A promise that resolves to SemanticTokensLegend.",r=>{if(r)return new zd(r.tokenTypes,r.tokenModifiers)})),new Oe("vscode.provideDocumentRangeSemanticTokens","_provideDocumentRangeSemanticTokens","Provide semantic tokens for a document range",[re.Uri,re.Range],new Re("A promise that resolves to SemanticTokens.",r=>{if(!r)return;let t=UM(r);if(t.type==="full")return new si(t.data,void 0)})),new Oe("vscode.executeCompletionItemProvider","_executeCompletionItemProvider","Execute completion item provider.",[re.Uri,re.Position,re.String.with("triggerCharacter","Trigger completion when the user types the character, like `,` or `(`").optional(),re.Number.with("itemResolveCount","Number of completions to resolve (too large numbers slow down completions)").optional()],new Re("A promise that resolves to a CompletionList-instance.",(r,t,e)=>{if(!r)return new ti([]);let n=r.suggestions.map(o=>lk.to(o,e));return new ti(n,r.incomplete)})),new Oe("vscode.executeSignatureHelpProvider","_executeSignatureHelpProvider","Execute signature help provider.",[re.Uri,re.Position,re.String.with("triggerCharacter","Trigger signature help when the user types the character, like `,` or `(`").optional()],new Re("A promise that resolves to SignatureHelp.",r=>{if(r)return yp.to(r)})),new Oe("vscode.executeCodeLensProvider","_executeCodeLensProvider","Execute code lens provider.",[re.Uri,re.Number.with("itemResolveCount","Number of lenses that should be resolved and returned. Will only return resolved lenses, will impact performance)").optional()],new Re("A promise that resolves to an array of CodeLens-instances.",(r,t,e)=>gi(n=>new Ka(j.to(n.range),n.command&&e.fromInternal(n.command)))(r))),new Oe("vscode.executeCodeActionProvider","_executeCodeActionProvider","Execute code action provider.",[re.Uri,new re("rangeOrSelection","Range in a text document. Some refactoring provider requires Selection object.",r=>Se.isRange(r),r=>Nn.isSelection(r)?oo.from(r):j.from(r)),re.String.with("kind","Code action kind to return code actions for").optional(),re.Number.with("itemResolveCount","Number of code actions to resolve (too large numbers slow down code actions)").optional()],new Re("A promise that resolves to an array of Command-instances.",(r,t,e)=>gi(n=>{if(n._isSynthetic){if(!n.command)throw new Error("Synthetic code actions must have a command");return e.fromInternal(n.command)}else{let o=new Vi(n.title,n.kind?new yt(n.kind):void 0);return n.edit&&(o.edit=ro.to(n.edit)),n.command&&(o.command=e.fromInternal(n.command)),o.isPreferred=n.isPreferred,o}})(r))),new Oe("vscode.executeDocumentColorProvider","_executeDocumentColorProvider","Execute document color provider.",[re.Uri],new Re("A promise that resolves to an array of ColorInformation objects.",r=>r?r.map(t=>new Ya(j.to(t.range),ac.to(t.color))):[])),new Oe("vscode.executeColorPresentationProvider","_executeColorPresentationProvider","Execute color presentation provider.",[new re("color","The color to show and insert",r=>r instanceof ni,ac.from),new re("context","Context object with uri and range",r=>!0,r=>({uri:r.uri,range:j.from(r.range)}))],new Re("A promise that resolves to an array of ColorPresentation objects.",r=>r?r.map(Xg.to):[])),new Oe("vscode.executeInlayHintProvider","_executeInlayHintProvider","Execute inlay hints provider",[re.Uri,re.Range],new Re("A promise that resolves to an array of Inlay objects",(r,t,e)=>r.map(dk.to.bind(void 0,e)))),new Oe("vscode.executeFoldingRangeProvider","_executeFoldingRangeProvider","Execute folding range provider",[re.Uri],new Re("A promise that resolves to an array of FoldingRange objects",(r,t)=>{if(r)return r.map(Zg.to)})),new Oe("vscode.resolveNotebookContentProviders","_resolveNotebookContentProvider","Resolve Notebook Content Providers",[],new Re("A promise that resolves to an array of NotebookContentProvider static info objects.",gi(r=>({viewType:r.viewType,displayName:r.displayName,options:{transientOutputs:r.options.transientOutputs,transientCellMetadata:r.options.transientCellMetadata,transientDocumentMetadata:r.options.transientDocumentMetadata},filenamePattern:r.filenamePattern.map(t=>th.to(t))})))),new Oe("vscode.executeInlineValueProvider","_executeInlineValueProvider","Execute inline value provider",[re.Uri,re.Range,new re("context","An InlineValueContext",r=>r&&typeof r.frameId=="number"&&r.stoppedLocation instanceof Se,r=>Qg.from(r))],new Re("A promise that resolves to an array of InlineValue objects",r=>r.map(jg.to))),new Oe("vscode.open","_workbench.open","Opens the provided resource in the editor. Can be a text or binary file, or an http(s) URL. If you need more control over the options for opening a text file, use vscode.window.showTextDocument instead.",[new re("uriOrString","Uri-instance or string (only http/https)",r=>E.isUri(r)||typeof r=="string"&&OU(r,X.http,X.https),r=>r),new re("columnOrOptions","Either the column in which to open or editor options, see vscode.TextDocumentShowOptions",r=>r===void 0||typeof r=="number"||typeof r=="object",r=>r&&(typeof r=="number"?[Vt.from(r),void 0]:[Vt.from(r.viewColumn),eh.from(r)])).optional(),re.String.with("label","").optional()],Re.Void),new Oe("vscode.openWith","_workbench.openWith","Opens the provided resource with a specific editor.",[re.Uri.with("resource","Resource to open"),re.String.with("viewId","Custom editor view id. This should be the viewType string for custom editors or the notebookType string for notebooks. Use 'default' to use Windsurf's default text editor"),new re("columnOrOptions","Either the column in which to open or editor options, see vscode.TextDocumentShowOptions",r=>r===void 0||typeof r=="number"||typeof r=="object",r=>r&&(typeof r=="number"?[Vt.from(r),void 0]:[Vt.from(r.viewColumn),eh.from(r)])).optional()],Re.Void),new Oe("vscode.diff","_workbench.diff","Opens the provided resources in the diff editor to compare their contents.",[re.Uri.with("left","Left-hand side resource of the diff editor"),re.Uri.with("right","Right-hand side resource of the diff editor"),re.String.with("title","Human readable title for the diff editor").optional(),new re("columnOrOptions","Either the column in which to open or editor options, see vscode.TextDocumentShowOptions",r=>r===void 0||typeof r=="object",r=>r&&[Vt.from(r.viewColumn),eh.from(r)]).optional()],Re.Void),new Oe("vscode.changes","_workbench.changes","Opens a list of resources in the changes editor to compare their contents.",[re.String.with("title","Human readable title for the changes editor"),new re("resourceList","List of resources to compare",r=>{for(let t of r){if(t.length!==3)return!1;let[e,n,o]=t;if(!E.isUri(e)||!E.isUri(n)&&n!==void 0&&n!==null||!E.isUri(o)&&o!==void 0&&o!==null)return!1}return!0},r=>r)],Re.Void),new Oe("vscode.prepareTypeHierarchy","_executePrepareTypeHierarchy","Prepare type hierarchy at a position inside a document",[re.Uri,re.Position],new Re("A promise that resolves to an array of TypeHierarchyItem-instances",r=>r.map(ta.to))),new Oe("vscode.provideSupertypes","_executeProvideSupertypes","Compute supertypes for an item",[re.TypeHierarchyItem],new Re("A promise that resolves to an array of TypeHierarchyItem-instances",r=>r.map(ta.to))),new Oe("vscode.provideSubtypes","_executeProvideSubtypes","Compute subtypes for an item",[re.TypeHierarchyItem],new Re("A promise that resolves to an array of TypeHierarchyItem-instances",r=>r.map(ta.to))),new Oe("vscode.revealTestInExplorer","_revealTestInExplorer","Reveals a test instance in the explorer",[re.TestItem],Re.Void),new Oe("vscode.startContinuousTestRun","testing.startContinuousRunFromExtension","Starts running the given tests with continuous run mode.",[re.TestProfile,re.Arr(re.TestItem)],Re.Void),new Oe("vscode.stopContinuousTestRun","testing.stopContinuousRunFromExtension","Stops running the given tests with continuous run mode.",[re.Arr(re.TestItem)],Re.Void),new Oe("vscode.experimental.editSession.continue","_workbench.editSessions.actions.continueEditSession","Continue the current edit session in a different workspace",[re.Uri.with("workspaceUri","The target workspace to continue the current edit session in")],Re.Void),new Oe("setContext","_setContext","Set a custom context key value that can be used in when clauses.",[re.String.with("name","The context key name"),new re("value","The context key value",()=>!0,r=>r)],Re.Void),new Oe("vscode.editorChat.start","inlineChat.start","Invoke a new editor chat session",[new re("Run arguments","",r=>!0,r=>{if(r)return{initialRange:r.initialRange?j.from(r.initialRange):void 0,initialSelection:Nn.isSelection(r.initialSelection)?oo.from(r.initialSelection):void 0,message:r.message,attachments:r.attachments,autoSend:r.autoSend,position:r.position?st.from(r.position):void 0,resolveOnResponse:r.resolveOnResponse}})],Re.Void),new Oe("vscode.extensionPromptFileProvider","_listExtensionPromptFiles","Get all extension-contributed prompt files (custom agents, instructions, and prompt files).",[],new Re("A promise that resolves to an array of objects containing uri and type.",r=>r?r.map(t=>({uri:E.revive(t.uri),type:t.type})):[]))],Qx=class{static register(t){Oq.forEach(t.registerApiCommand,t),this._registerValidateWhenClausesCommand(t)}static _registerValidateWhenClausesCommand(t){t.registerCommand(!1,"_validateWhenClauses",YU)}};function gi(r){return t=>{if(Array.isArray(t))return t.map(r)}}function Bl(r){if(!Array.isArray(r))return;let t=[];for(let e of r)JF(e)?t.push(bp.to(e)):t.push(no.to(e));return t}var Om=class{constructor(t,e){this._proxy=t.getProxy(V.MainThreadBulkEdits),this._versionInformationProvider={getTextDocumentVersion:n=>e.getDocument(n)?.version,getNotebookDocumentVersion:()=>{}}}applyWorkspaceEdit(t,e,n){let o=new Wt(ro.from(t,this._versionInformationProvider));return this._proxy.$tryApplyWorkspaceEdit(o,void 0,n?.isRefactoring??!1)}};Om=L([P(0,Ee)],Om);function f5(r){return!!r&&E.isUri(r.sessionResource)&&r.$mid===19}var Lq;(u=>{let r;(R=>(R[R.Streaming=0]="Streaming",R[R.WaitingForConfirmation=1]="WaitingForConfirmation",R[R.Executing=2]="Executing",R[R.WaitingForPostApproval=3]="WaitingForPostApproval",R[R.Completed=4]="Completed",R[R.Cancelled=5]="Cancelled"))(r=u.StateKind||={});function t(f,g){if(f.kind==="toolInvocationSerialized")return f.isConfirmed===void 0||typeof f.isConfirmed=="boolean"?{type:f.isConfirmed?4:0}:f.isConfirmed;let I=f.state.read(g);if(!(I.type===0||I.type===1))return I.type===5?{type:I.reason}:I.confirmed}u.executionConfirmedOrDenied=t;function e(f,g){let I=t(f);if(I)return Promise.resolve(I);let h=new te;return new Promise(C=>{g&&h.add(g.onCancellationRequested(()=>{C({type:0})})),h.add(ki(_=>{let R=t(f,_);R&&(h.dispose(),C(R))}))}).finally(()=>{h.dispose()})}u.awaitConfirmation=e;function n(f,g){let I=f.state.read(g);if(I.type===4)return I.postConfirmed||{type:1};if(I.type===5)return{type:I.reason}}function o(f,g){let I=f?.state.get();return I?.type===1||I?.type===3?(I.confirm(g),!0):!1}u.confirmWith=o;function i(f,g){let I=n(f);if(I)return Promise.resolve(I);let h=new te;return new Promise(C=>{g&&h.add(g.onCancellationRequested(()=>{C({type:0})})),h.add(ki(_=>{let R=n(f,_);R&&(h.dispose(),C(R))}))}).finally(()=>{h.dispose()})}u.awaitPostConfirmation=i;function s(f,g){if(f.kind==="toolInvocationSerialized")return f.resultDetails;let I=f.state.read(g);if(I.type===4||I.type===3)return I.resultDetails}u.resultDetails=s;function a(f,g){if(f.kind==="toolInvocationSerialized")return!0;let I=f.state.read(g);return I.type===4||I.type===5}u.isComplete=a;function l(f,g){return f.kind==="toolInvocationSerialized"?!1:f.state.read(g).type===0}u.isStreaming=l;function d(f,g){if(f.kind==="toolInvocationSerialized")return;let I=f.state.read(g);if(I.type!==0)return I.parameters}u.getParameters=d;function c(f,g){if(f.kind==="toolInvocationSerialized")return;let I=f.state.read(g);if(I.type!==0)return I.confirmationMessages}u.getConfirmationMessages=c})(Lq||={});var Mq;(o=>{function r(i){return i.kind==="sent"}o.isSent=r;function t(i){return i.kind==="rejected"}o.isRejected=t;function e(i){return i.kind==="queued"}o.isQueued=e;function n(i){if(i.kind!=="sent")throw new Error(`Expected ChatSendResult to be 'sent', but was '${i.kind}'`)}o.assertSent=n})(Mq||={});var Lm=N("IChatService");var Mm=class{constructor(t,e,n,o,i,s,a){this._extension=t;this._request=e;this._proxy=n;this._commandsConverter=o;this._sessionDisposables=i;this._pendingCarouselResolvers=s;this._token=a;this._stopWatch=uo.create(!1);this._isClosed=!1}close(){this._isClosed=!0}get timings(){return{firstProgress:this._firstProgress,totalElapsed:this._stopWatch.elapsed()}}get apiObject(){if(!this._apiObject){let n=function(l){if(t._isClosed){let d=new Error("Response stream has been closed");throw Error.captureStackTrace(d,l),d}},s=function(l,d){if(o.push(d!==void 0?[l,d]:l)===1&&queueMicrotask(()=>{let u=i;i=[],t._proxy.$handleProgressChunk(t._request.requestId,o).finally(()=>{u.forEach(f=>f())}),o.length=0}),d!==void 0)return new Promise(u=>{i.push(u)})},t=this;this._stopWatch.reset();let e=0,o=[],i=[],a=(l,d)=>{if(typeof this._firstProgress>"u"&&(l.kind==="markdownContent"||l.kind==="markdownVuln"||l.kind==="beginToolInvocation")&&(this._firstProgress=this._stopWatch.elapsed()),d){let c=e++,u=s(l,c),f={report:g=>{u.then(()=>{zt.isMarkdownString(g.value)?s(sh.from(g),c):s(ic.from(g),c)})}};Promise.all([u,d(f)]).then(([g,I])=>{s(bk.from(I),c)})}else s(l)};this._apiObject=Object.freeze({clearToPreviousToolInvocation(l){return n(this.markdown),s({kind:"clearToPreviousToolInvocation",reason:l}),this},markdown(l){n(this.markdown);let d=new Bs(l),c=zg.from(d);return a(c),this},markdownWithVulnerabilities(l,d){n(this.markdown),d&&H(t._extension,"chatParticipantAdditions");let c=new Ji(l,d),u=OE.from(c);return a(u),this},codeblockUri(l,d){n(this.codeblockUri),H(t._extension,"chatParticipantAdditions");let c=new zs(l,d),u=AE.from(c);return a(u),this},filetree(l,d){n(this.filetree);let c=new Ws(l,d),u=qg.from(c);return a(u),this},anchor(l,d){let c=new ji(l,d);return this.push(c)},button(l){n(this.anchor);let d=new Gs(l),c=Kg.from(d,t._commandsConverter,t._sessionDisposables);return a(c),this},progress(l,d){n(this.progress);let c=new hl(l,d),u=d?UE.from(c):rh.from(c);return a(u,d),this},thinkingProgress(l){n(this.thinkingProgress),H(t._extension,"chatParticipantAdditions");let d=new ai(l.text??"",l.id,l.metadata),c=ih.from(d);return a(c),this},hookProgress(l,d,c){n(this.hookProgress),H(t._extension,"chatParticipantAdditions");let u=new $s(l,d,c),f=NE.from(u);return a(f),this},warning(l){n(this.progress),H(t._extension,"chatParticipantAdditions");let d=new Qi(l),c=sh.from(d);return a(c),this},reference(l,d){return this.reference2(l,d)},reference2(l,d,c){if(n(this.reference),typeof l=="object"&&"variableName"in l&&H(t._extension,"chatParticipantAdditions"),typeof l=="object"&&"variableName"in l&&!l.value){let u=t._request.variables.variables.find(f=>f.name===l.variableName);if(u){let f;if(u.references?.length)f=u.references.map(g=>({kind:"reference",reference:{variableName:l.variableName,value:g.reference}}));else{let g=new Dr(l,d,c);f=[ic.from(g)]}return f.forEach(g=>a(g)),this}}else{let u=new Dr(l,d,c),f=ic.from(u);a(f)}return this},codeCitation(l,d,c){n(this.codeCitation),H(t._extension,"chatParticipantAdditions");let u=new qs(l,d,c),f=WE.from(u);a(f)},textEdit(l,d){n(this.textEdit),H(t._extension,"chatParticipantAdditions");let c=new Yi(l,d);c.isDone=d===!0?!0:void 0;let u=FE.from(c);return a(u),this},notebookEdit(l,d){n(this.notebookEdit),H(t._extension,"chatParticipantAdditions");let c=new Js(l,d),u=BE.from(c);return a(u),this},workspaceEdit(l){n(this.workspaceEdit),H(t._extension,"chatParticipantAdditions");let d=new Il(l),c=VE.from(d);return a(c),this},async externalEdit(l,d){n(this.externalEdit);let c=Array.isArray(l)?l:[l],u=e++,f=ct();await s({kind:"externalEdits",start:!0,resources:c,undoStopId:f},u);try{return await d(),f}finally{await s({kind:"externalEdits",start:!1,resources:c,undoStopId:f},u)}},confirmation(l,d,c,u){n(this.confirmation),H(t._extension,"chatParticipantAdditions");let f=new Vs(l,d,c,u),g=LE.from(f);return a(g),this},async questionCarousel(l,d=!0){n(this.questionCarousel),H(t._extension,"chatParticipantAdditions");let c=ct(),u=new Xi(l,d),f=ME.from(u);f.resolveId=c;let g=new jn;return t._pendingCarouselResolvers.has(t._request.requestId)||t._pendingCarouselResolvers.set(t._request.requestId,new Map),t._pendingCarouselResolvers.get(t._request.requestId).set(c,g),a(f),eu(g.p,t._token)},beginToolInvocation(l,d,c){n(this.beginToolInvocation),H(t._extension,"chatParticipantAdditions");let u={kind:"beginToolInvocation",toolCallId:l,toolName:d,streamData:c?{partialInput:c.partialInput}:void 0,subagentInvocationId:c?.subagentInvocationId};return a(u),this},updateToolInvocation(l,d){n(this.updateToolInvocation),H(t._extension,"chatParticipantAdditions");let c={kind:"updateToolInvocation",toolCallId:l,streamData:{partialInput:d.partialInput}};return a(c),this},push(l){if(n(this.push),(l instanceof Yi||l instanceof Js||l instanceof Ji||l instanceof Qi||l instanceof Vs||l instanceof Xi||l instanceof qs||l instanceof Ks||l instanceof vl||l instanceof Jd||l instanceof ai||l instanceof bl||l instanceof hl)&&H(t._extension,"chatParticipantAdditions"),l instanceof Dr)this.reference2(l.value,l.iconPath,l.options);else if(l instanceof hl){let d=l.task?UE.from(l):rh.from(l);a(d,l.task)}else if(l instanceof ai){let d=ih.from(l);a(d)}else if(l instanceof ji){let d=vp.from(l);if(l.resolve){H(t._extension,"chatParticipantAdditions"),d.resolveId=ct();let c=new We;l.resolve(c.token).then(()=>{let u=vp.from(l);t._proxy.$handleAnchorResolve(t._request.requestId,d.resolveId,u)}).then(()=>c.dispose(),()=>c.dispose()),t._sessionDisposables.add(ae(()=>c.dispose(!0)))}a(d)}else{if(l instanceof Jd)return this.externalEdit(l.uris,l.callback).then(c=>l.didGetApplied(c)),this;{let d=xp.from(l,t._commandsConverter,t._sessionDisposables);a(d)}}return this},usage(l){n(this.usage),H(t._extension,"chatParticipantAdditions");let d={kind:"usage",promptTokens:l.promptTokens,completionTokens:l.completionTokens,promptTokenDetails:l.promptTokenDetails};return a(d),this}})}return this._apiObject}},Xx=class r extends K{constructor(e,n,o,i,s,a,l,d){super();this._logService=n;this._commands=o;this._documents=i;this._editorsAndDocuments=s;this._languageModels=a;this._diagnostics=l;this._tools=d;this._agents=new Map;this._participantDetectionProviders=new Map;this._promptFileProviders=new Map;this._sessionDisposables=this._register(new Ev);this._completionDisposables=this._register(new Fr);this._inFlightRequests=new Set;this._pendingCarouselResolvers=new Map;this._onDidChangeChatRequestTools=this._register(new D);this.onDidChangeChatRequestTools=this._onDidChangeChatRequestTools.event;this._onDidDisposeChatSession=this._register(new D);this.onDidDisposeChatSession=this._onDidDisposeChatSession.event;this._onDidChangeActiveChatPanelSessionResource=this._register(new D);this.onDidChangeActiveChatPanelSessionResource=this._onDidChangeActiveChatPanelSessionResource.event;this._proxy=e.getProxy(V.MainThreadChatAgents2),o.registerArgumentProcessor({processArgument:c=>f5(c)?null:c})}static{this._idPool=0}static{this._participantDetectionProviderIdPool=0}static{this._contributionsProviderIdPool=0}get activeChatPanelSessionResource(){return this._activeChatPanelSessionResource}async transferActiveChat(e){await this._proxy.$transferActiveChatSession(e)}createChatAgent(e,n,o){let i=r._idPool++,s=new Yx(e,n,this._proxy,i,o);return this._agents.set(i,s),this._proxy.$registerAgent(i,e.identifier,n,{},void 0),s.apiAgent}createDynamicChatAgent(e,n,o,i){let s=r._idPool++,a=new Yx(e,n,this._proxy,s,i);return this._agents.set(s,a),this._proxy.$registerAgent(s,e.identifier,n,{isSticky:!0},o),a.apiAgent}registerChatParticipantDetectionProvider(e,n){let o=r._participantDetectionProviderIdPool++;return this._participantDetectionProviders.set(o,new FM(e,n)),this._proxy.$registerChatParticipantDetectionProvider(o),ae(()=>{this._participantDetectionProviders.delete(o),this._proxy.$unregisterChatParticipantDetectionProvider(o)})}registerPromptFileProvider(e,n,o){let i=r._contributionsProviderIdPool++;this._promptFileProviders.set(i,{extension:e,provider:o}),this._proxy.$registerPromptFileProvider(i,n,e.identifier);let s=new te,a;switch(n){case"agent":a=o.onDidChangeCustomAgents;break;case"instructions":a=o.onDidChangeInstructions;break;case"prompt":a=o.onDidChangePromptFiles;break;case"skill":a=o.onDidChangeSkills;break}return a&&s.add(a(()=>{this._proxy.$onDidChangePromptFiles(i)})),s.add(ae(()=>{this._promptFileProviders.delete(i),this._proxy.$unregisterPromptFileProvider(i)})),s}async $providePromptFiles(e,n,o,i){let s=this._promptFileProviders.get(e);if(!s)return;let a=s.provider,l;switch(n){case"agent":l=await a.provideCustomAgents(o,i)??void 0;break;case"instructions":l=await a.provideInstructions(o,i)??void 0;break;case"prompt":l=await a.providePromptFiles(o,i)??void 0;break;case"skill":l=await a.provideSkills(o,i)??void 0;break}return l}async $detectChatParticipant(e,n,o,i,s){let a=this._participantDetectionProviders.get(e);if(!a)return;let{request:l,location:d,history:c}=await this._createRequest(n,o,a.extension),u=await this.getModelForRequest(l,a.extension),f=await this.getToolsForRequest(a.extension,l.userSelectedTools,u.id,s),g=cc.to(l,d,u,this.getDiagnosticsWhenEnabled(a.extension),f,a.extension,this._logService);return a.provider.provideParticipantDetection(g,{history:c,yieldRequested:!1},{participants:i.participants,location:Cp.to(i.location)},s)}async _createRequest(e,n,o){let i=nn(e),s=await this.prepareHistoryTurns(o,i.agentId,n),a;if(i.locationData?.type==="editor"){let l=this._documents.getDocument(i.locationData.document),d=this._editorsAndDocuments.getEditor(i.locationData.id);a=new dp(d.value,l,oo.to(i.locationData.selection),j.to(i.locationData.wholeRange))}else if(i.locationData?.type==="notebook"){let l=this._documents.getDocument(i.locationData.sessionInputUri);a=new cp(l)}else i.locationData?.type,"terminal";return{request:i,location:a,history:s}}async getModelForRequest(e,n){let o;if(e.userSelectedModelId&&(o=await this._languageModels.getLanguageModelByIdentifier(n,e.userSelectedModelId)),!o&&(o=await this._languageModels.getDefaultLanguageModel(n),!o))throw new Error("Language model unavailable");return o}async $setRequestTools(e,n){let o=[...this._inFlightRequests].find(s=>s.requestId===e);if(!o)return;o.extRequest.tools.clear();let i=await this.getToolsForRequest(o.extension,n,o.extRequest.model.id,De.None);for(let[s,a]of i)o.extRequest.tools.set(s,a);this._onDidChangeChatRequestTools.fire(o.extRequest)}$setYieldRequested(e,n){let o=[...this._inFlightRequests].find(i=>i.requestId===e);o&&(o.yieldRequested=n)}async $invokeAgent(e,n,o,i){let s=this._agents.get(e);if(!s)throw new Error(`[CHAT](${e}) CANNOT invoke agent because the agent is not registered`);let a,l;try{let{request:d,location:c,history:u}=await this._createRequest(n,o,s.extension),f=this._sessionDisposables.get(d.sessionResource);f||(f=new te,this._sessionDisposables.set(d.sessionResource,f)),a=new Mm(s.extension,d,this._proxy,this._commands.converter,f,this._pendingCarouselResolvers,i);let g=await this.getModelForRequest(d,s.extension),I=await this.getToolsForRequest(s.extension,d.userSelectedTools,g.id,i),h=cc.to(d,c,g,this.getDiagnosticsWhenEnabled(s.extension),I,s.extension,this._logService);l={requestId:n.requestId,extRequest:h,extension:s.extension,hooks:d.hooks,yieldRequested:!1},this._inFlightRequests.add(l);let C;o.chatSessionContext&&(C={chatSessionItem:{resource:E.revive(o.chatSessionContext.chatSessionResource),label:o.chatSessionContext.isUntitled?"Untitled Session":"Session"},isUntitled:o.chatSessionContext.isUntitled,initialSessionOptions:o.chatSessionContext.initialSessionOptions});let _={history:u,chatSessionContext:C,get yieldRequested(){return l?.yieldRequested??!1}},R=s.invoke(h,_,a.apiObject,i);return await Nq(1e3,Promise.resolve(R).then(O=>{if(O?.metadata)try{JSON.stringify(O.metadata)}catch(ie){let Y=`result.metadata MUST be JSON.stringify-able. Got error: ${ie.message}`;return this._logService.error(`[${s.extension.identifier.value}] [@${s.id}] ${Y}`,s.extension),{errorDetails:{message:Y},timings:a?.timings,nextQuestion:O.nextQuestion}}let U;return O?.errorDetails&&(U={...O.errorDetails,responseIsIncomplete:!0}),(U?.responseIsRedacted||U?.isQuotaExceeded||U?.isRateLimited||U?.confirmationButtons||U?.code)&&H(s.extension,"chatParticipantPrivate"),{errorDetails:U,timings:a?.timings,metadata:O?.metadata,nextQuestion:O?.nextQuestion,details:O?.details}}),i)}catch(d){this._logService.error(d,s.extension),d instanceof zo&&d.cause&&(d=d.cause);let c=d instanceof Error&&d.name==="ChatQuotaExceeded",u=d instanceof Error&&d.name==="ChatRateLimited";return{errorDetails:{message:Gr(d),responseIsIncomplete:!0,isQuotaExceeded:c,isRateLimited:u}}}finally{l&&this._inFlightRequests.delete(l);let d=this._pendingCarouselResolvers.get(n.requestId);if(d){for(let c of d.values())c.complete(void 0);this._pendingCarouselResolvers.delete(n.requestId)}a?.close()}}getDiagnosticsWhenEnabled(e){return $e(e,"chatReferenceDiagnostic")?this._diagnostics.getDiagnostics():[]}async getToolsForRequest(e,n,o,i){if(!n)return new Map;let s=new Map;for(let a of this._tools.getTools(e))typeof n[a.name]=="boolean"&&s.set(a,n[a.name]);return s}async prepareHistoryTurns(e,n,o){let i=[];for(let s of o.history){let a=Tp.to(s.result),l=n===s.request.agentId||g5(s.request.agentId)&&g5(n)?a:{...a,metadata:void 0},d=[],c=[];for(let I of s.request.variables.variables)if(I.kind==="tool")c.push(sc.to(I));else if(I.kind==="toolset")c.push(...I.value.map(sc.to));else{let h=$E.to(I,this.getDiagnosticsWhenEnabled(e),this._logService);h&&d.push(h)}let u=$e(e,"chatParticipantPrivate")?s.request.editedFileEvents:void 0,f=new js(s.request.message,s.request.command,d,s.request.agentId,c,u,s.request.requestId);i.push(f);let g=pt(s.response.map(I=>xp.toContent(I,this._commands.converter)));i.push(new lp(g,l,s.request.agentId,s.request.command))}return i}$releaseSession(e){let n=E.revive(e);this._sessionDisposables.deleteAndDispose(n);let o=Fa.parseLocalSessionId(n);o&&this._onDidDisposeChatSession.fire(o)}$acceptActiveChatSession(e){let n=e?E.revive(e):void 0;this._activeChatPanelSessionResource?.toString()!==n?.toString()&&(this._activeChatPanelSessionResource=n,this._onDidChangeActiveChatPanelSessionResource.fire(n))}async $provideFollowups(e,n,o,i,s){let a=this._agents.get(n);if(!a)return Promise.resolve([]);let l=nn(e),d=await this.prepareHistoryTurns(a.extension,a.id,i),c=Tp.to(o);return(await a.provideFollowups(c,{history:d,yieldRequested:!1},s)).filter(u=>{let f=!u.participant||Lt.some(this._agents.values(),g=>g.id===u.participant&&Ue.equals(g.extension.identifier,a.extension.identifier));return f||this._logService.warn(`[@${a.id}] ChatFollowup refers to an unknown participant: ${u.participant}`),f}).map(u=>RE.from(u,l))}$acceptFeedback(e,n,o){let i=this._agents.get(e);if(!i)return;let s=Tp.to(n),a;switch(o.direction){case 0:a=0;break;case 1:a=1;break}let l={result:s,kind:a,unhelpfulReason:$e(i.extension,"chatParticipantAdditions")?o.reason:void 0};i.acceptFeedback(Object.freeze(l))}$handleQuestionCarouselAnswer(e,n,o){let i=this._pendingCarouselResolvers.get(e);if(!i)return;let s=i.get(n);s&&(s.complete(o),i.delete(n)),i.size===0&&this._pendingCarouselResolvers.delete(e)}$acceptAction(e,n,o){let i=this._agents.get(e);if(!i||o.action.kind==="vote")return;let s=Ek.to(n,o,this._commands.converter);s&&i.acceptAction(Object.freeze(s))}async $invokeCompletionProvider(e,n,o){let i=this._agents.get(e);if(!i)return[];let s=this._completionDisposables.get(e);return s?s.clear():(s=new te,this._completionDisposables.set(e,s)),(await i.invokeCompletionProvider(n,o)).map(l=>yk.from(l,this._commands.converter,s))}async $provideChatTitle(e,n,o){let i=this._agents.get(e);if(!i)return;let s=await this.prepareHistoryTurns(i.extension,i.id,{history:n});return await i.provideTitle({history:s,yieldRequested:!1},o)}async $provideChatSummary(e,n,o){let i=this._agents.get(e);if(!i)return;let s=await this.prepareHistoryTurns(i.extension,i.id,{history:n});return await i.provideSummary({history:s,yieldRequested:!1},o)}},FM=class{constructor(t,e){this.extension=t;this.provider=e}},Yx=class{constructor(t,e,n,o,i){this.extension=t;this.id=e;this._proxy=n;this._handle=o;this._requestHandler=i;this._onDidReceiveFeedback=new D;this._onDidPerformAction=new D;this._pauseStateEmitter=new D}acceptFeedback(t){this._onDidReceiveFeedback.fire(t)}acceptAction(t){this._onDidPerformAction.fire(t)}setChatRequestPauseState(t){this._pauseStateEmitter.fire(t)}async invokeCompletionProvider(t,e){return this._agentVariableProvider?await this._agentVariableProvider.provider.provideCompletionItems(t,e)??[]:[]}async provideFollowups(t,e,n){if(!this._followupProvider)return[];let o=await this._followupProvider.provideFollowups(t,e,n);return o?o.filter(i=>!(i&&"commandId"in i)).filter(i=>!(i&&"message"in i)):[]}async provideTitle(t,e){if(this._titleProvider)return await this._titleProvider.provideChatTitle(t,e)??void 0}async provideSummary(t,e){if(this._summarizer)return await this._summarizer.provideChatSummary(t,e)??void 0}get apiAgent(){let t=!1,e=!1,n=()=>{t||e||(e=!0,queueMicrotask(()=>{this._proxy.$updateAgent(this._handle,{icon:this._iconPath?this._iconPath instanceof E?this._iconPath:"light"in this._iconPath?this._iconPath.light:void 0:void 0,iconDark:this._iconPath&&"dark"in this._iconPath?this._iconPath.dark:void 0,themeIcon:this._iconPath instanceof En?this._iconPath:void 0,hasFollowups:this._followupProvider!==void 0,helpTextPrefix:!this._helpTextPrefix||typeof this._helpTextPrefix=="string"?this._helpTextPrefix:ye.from(this._helpTextPrefix),helpTextPostfix:!this._helpTextPostfix||typeof this._helpTextPostfix=="string"?this._helpTextPostfix:ye.from(this._helpTextPostfix),supportIssueReporting:this._supportIssueReporting,additionalWelcomeMessage:!this._additionalWelcomeMessage||typeof this._additionalWelcomeMessage=="string"?this._additionalWelcomeMessage:ye.from(this._additionalWelcomeMessage)}),e=!1}))},o=this;return{get id(){return o.id},get iconPath(){return o._iconPath},set iconPath(i){o._iconPath=i,n()},get requestHandler(){return o._requestHandler},set requestHandler(i){yv(typeof i=="function","Invalid request handler"),o._requestHandler=i},get followupProvider(){return o._followupProvider},set followupProvider(i){o._followupProvider=i,n()},get helpTextPrefix(){return H(o.extension,"defaultChatParticipant"),o._helpTextPrefix},set helpTextPrefix(i){H(o.extension,"defaultChatParticipant"),o._helpTextPrefix=i,n()},get helpTextPostfix(){return H(o.extension,"defaultChatParticipant"),o._helpTextPostfix},set helpTextPostfix(i){H(o.extension,"defaultChatParticipant"),o._helpTextPostfix=i,n()},get supportIssueReporting(){return H(o.extension,"chatParticipantPrivate"),o._supportIssueReporting},set supportIssueReporting(i){H(o.extension,"chatParticipantPrivate"),o._supportIssueReporting=i,n()},get onDidReceiveFeedback(){return o._onDidReceiveFeedback.event},set participantVariableProvider(i){if(H(o.extension,"chatParticipantAdditions"),o._agentVariableProvider=i,i){if(!i.triggerCharacters.length)throw new Error("triggerCharacters are required");o._proxy.$registerAgentCompletionsProvider(o._handle,o.id,i.triggerCharacters)}else o._proxy.$unregisterAgentCompletionsProvider(o._handle,o.id)},get participantVariableProvider(){return H(o.extension,"chatParticipantAdditions"),o._agentVariableProvider},set additionalWelcomeMessage(i){H(o.extension,"defaultChatParticipant"),o._additionalWelcomeMessage=i,n()},get additionalWelcomeMessage(){return H(o.extension,"defaultChatParticipant"),o._additionalWelcomeMessage},set titleProvider(i){H(o.extension,"defaultChatParticipant"),o._titleProvider=i,n()},get titleProvider(){return H(o.extension,"defaultChatParticipant"),o._titleProvider},set summarizer(i){H(o.extension,"defaultChatParticipant"),o._summarizer=i},get summarizer(){return H(o.extension,"defaultChatParticipant"),o._summarizer},get onDidChangePauseState(){return H(o.extension,"chatParticipantAdditions"),o._pauseStateEmitter.event},onDidPerformAction:$e(this.extension,"chatParticipantAdditions")?this._onDidPerformAction.event:void 0,dispose(){t=!0,o._followupProvider=void 0,o._onDidReceiveFeedback.dispose(),o._onDidPerformAction.dispose(),o._pauseStateEmitter.dispose(),o._proxy.$unregisterAgent(o._handle)}}}invoke(t,e,n,o){return this._requestHandler(t,e,n,o)}};function Nq(r,t,e){return new Promise((n,o)=>{let i=e.onCancellationRequested(async()=>{i.dispose(),await Qn(r),n(void 0)});t.then(n,o).finally(()=>i.dispose())})}function g5(r){return r.startsWith("github.copilot")}var Zx=class{constructor(t,e){this.webviews=e;this._renderers=new Map;this._proxy=t.getProxy(V.MainThreadChatOutputRenderer)}registerChatOutputRenderer(t,e,n){if(this._renderers.has(e))throw new Error(`Chat output renderer already registered for: ${e}`);return this._renderers.set(e,{extension:t,renderer:n}),this._proxy.$registerChatOutputRenderer(e,t.identifier,t.extensionLocation),new Ce(()=>{this._renderers.delete(e),this._proxy.$unregisterChatOutputRenderer(e)})}async $renderChatOutput(t,e,n,o,i){let s=this._renderers.get(t);if(!s)throw new Error(`No chat output renderer registered for: ${t}`);let a=this.webviews.createNewWebview(o,{},s.extension),l=Object.freeze({webview:a,onDidDispose:a._onDidDispose});return s.renderer.renderChatOutput(Object.freeze({mime:e,value:n.buffer}),l,{},i)}};var BM=class{#e;#t;#n;#o;#s;#i;#l;#a;#d;#c;#r;constructor(t,e,n){this.resource=t,this.#e=e,this.#r=n}get label(){return this.#e}set label(t){this.#e!==t&&(this.#e=t,this.#r())}get iconPath(){return this.#t}set iconPath(t){this.#t!==t&&(this.#t=t,this.#r())}get description(){return this.#n}set description(t){this.#n!==t&&(this.#n=t,this.#r())}get badge(){return this.#o}set badge(t){this.#o!==t&&(this.#o=t,this.#r())}get status(){return this.#s}set status(t){this.#s!==t&&(this.#s=t,this.#r())}get archived(){return this.#i}set archived(t){this.#i!==t&&(this.#i=t,this.#r())}get tooltip(){return this.#l}set tooltip(t){this.#l!==t&&(this.#l=t,this.#r())}get timing(){return this.#a}set timing(t){this.#a!==t&&(this.#a=t,this.#r())}get changes(){return this.#d}set changes(t){this.#d!==t&&(this.#d=t,this.#r())}get metadata(){return this.#c}set metadata(t){if(t!==void 0)try{JSON.stringify(t)}catch{throw new Error("metadata must be JSON-serializable")}Xt(this.#c,t)||(this.#c=t,this.#r())}};function Fq(r,t){let e={addedOrUpdated:new et,removed:new ur};for(let[n,o]of t)r.get(n)!==o&&e.addedOrUpdated.set(n,o);for(let n of r.keys())t.has(n)||e.removed.add(n);return e}function Hq(r){return{addedOrUpdated:r.addedOrUpdated?Array.from(r.addedOrUpdated.values(),_p.from):[],removed:r.removed?Array.from(r.removed.keys()):[]}}var eC=class{#e=new et;#t;#n;constructor(t,e){this.#t=e,this.#n=t}get size(){return this.#e.size}replace(t){if(!t.length&&!this.#e.size)return;let e=new et(t.map(o=>[o.resource,o])),n=Fq(this.#e,e);!n.addedOrUpdated?.size&&!n.removed?.size||(this.#e=e,this.#t.$updateChatSessionItems(this.#n,Hq(n)))}forEach(t,e){for(let[n,o]of this.#e)t.call(e,o,this)}add(t){let e=this.#e.get(t.resource);e&&e===t||(this.#e.set(t.resource,t),this.#t.$addOrUpdateChatSessionItem(this.#n,_p.from(t)))}delete(t){this.#e.delete(t)&&this.#t.$updateChatSessionItems(this.#n,{addedOrUpdated:[],removed:[t]})}get(t){return this.#e.get(t)}[Symbol.iterator](){return this.#e.entries()}},VM=class{constructor(t,e,n,o,i,s){this.session=t;this.extension=e;this.proxy=o;this.commandsConverter=i;this.sessionDisposables=s;this._pendingCarouselResolvers=new Map;this._stream=new Mm(e,n,o,i,s,this._pendingCarouselResolvers,De.None)}get activeResponseStream(){return this._stream}getActiveRequestStream(t){return new Mm(this.extension,t,this.proxy,this.commandsConverter,this.sessionDisposables,this._pendingCarouselResolvers,De.None)}},Vl=class extends K{constructor(e,n,o,i){super();this.commands=e;this._languageModels=n;this._extHostRpc=o;this._logService=i;this._itemControllerHandlePool=0;this._chatSessionItemControllers=new Map;this._contentProviderHandlePool=0;this._chatSessionContentProviders=new Map;this._extHostChatSessions=new et;this._providerOptionGroups=new Map;this._proxy=this._extHostRpc.getProxy(V.MainThreadChatSessions),e.registerArgumentProcessor({processArgument:s=>{if(s&&s.$mid===25){let a=s.session.resource;for(let{controller:l}of this._chatSessionItemControllers.values()){let d=l.items.get(a);if(d)return d}return this._logService.warn(`No chat session found with uri: ${a}`),s}return s}})}static{this._sessionHandlePool=0}registerChatSessionItemProvider(e,n,o){let i=this._itemControllerHandlePool++,s=new te,a=s.add(new D),l=new eC(i,this._proxy),d={id:n,items:l,createChatSessionItem:(c,u)=>{throw new Error("Not implemented for providers")},onDidChangeChatSessionItemState:a.event,newChatSessionItemHandler:void 0,dispose:()=>{s.dispose()},refreshHandler:async c=>{let u=await o.provideChatSessionItems(c)??[];l.replace(u)}};return this._chatSessionItemControllers.set(i,{chatSessionType:n,controller:d,extension:e,disposable:s,onDidChangeChatSessionItemStateEmitter:a}),this._proxy.$registerChatSessionItemController(i,n),o.onDidChangeChatSessionItems&&s.add(o.onDidChangeChatSessionItems(()=>{this._logService.trace(`ExtHostChatSessions. Provider items changed for ${n}`),d.refreshHandler(De.None)})),o.onDidCommitChatSessionItem&&s.add(o.onDidCommitChatSessionItem(c=>{let{original:u,modified:f}=c;this._proxy.$onDidCommitChatSessionItem(i,u.resource,f.resource)})),{dispose:()=>{this._chatSessionItemControllers.delete(i),s.dispose(),this._proxy.$unregisterChatSessionItemController(i)}}}createChatSessionItemController(e,n,o){let i=this._itemControllerHandlePool++,s=new te,a=!1,l,d=s.add(new D),c=new eC(i,this._proxy),u=Object.freeze({id:n,refreshHandler:async f=>{if(a)throw new Error("ChatSessionItemController has been disposed");this._logService.trace(`ExtHostChatSessions. Controller(${n}).refresh()`),await o(f)},items:c,onDidChangeChatSessionItemState:d.event,createChatSessionItem:(f,g)=>{if(a)throw new Error("ChatSessionItemController has been disposed");let I=new BM(f,g,()=>{c.get(f)===I&&this._proxy.$addOrUpdateChatSessionItem(i,_p.from(I))});return I},get newChatSessionItemHandler(){return l},set newChatSessionItemHandler(f){l=f},dispose:()=>{a=!0,s.dispose()}});return this._chatSessionItemControllers.set(i,{controller:u,extension:e,disposable:s,chatSessionType:n,onDidChangeChatSessionItemStateEmitter:d}),this._proxy.$registerChatSessionItemController(i,n),s.add(ae(()=>{this._chatSessionItemControllers.delete(i),this._proxy.$unregisterChatSessionItemController(i)})),u}registerChatSessionContentProvider(e,n,o,i,s){let a=this._contentProviderHandlePool++,l=new te;return this._chatSessionContentProviders.set(a,{provider:i,extension:e,capabilities:s,disposable:l}),this._proxy.$registerChatSessionContentProvider(a,n),i.onDidChangeChatSessionOptions&&l.add(i.onDidChangeChatSessionOptions(d=>{this._proxy.$onDidChangeChatSessionOptions(a,d.resource,d.updates)})),i.onDidChangeChatSessionProviderOptions&&l.add(i.onDidChangeChatSessionProviderOptions(()=>{this._proxy.$onDidChangeChatSessionProviderOptions(a)})),new Ce(()=>{this._chatSessionContentProviders.delete(a),l.dispose(),this._proxy.$unregisterChatSessionContentProvider(a)})}async $provideChatSessionContent(e,n,o){let i=this._chatSessionContentProviders.get(e);if(!i)throw new Error(`No provider for handle ${e}`);let s=E.revive(n),a=await i.provider.provideChatSessionContent(s,o);if(o.isCancellationRequested)throw new Bt;let l=new te,d=Vl._sessionHandlePool++,c=s.toString(),u=new VM(a,i.extension,{sessionResource:s,requestId:"ongoing",agentId:c,message:"",variables:{variables:[]},location:"panel"},{$handleProgressChunk:(I,h)=>this._proxy.$handleProgressChunk(e,s,I,h),$handleAnchorResolve:(I,h,C)=>{this._proxy.$handleAnchorResolve(e,s,I,h,C)}},this.commands.converter,l),f=l.add(new We);this._extHostChatSessions.set(s,{sessionObj:u,disposeCts:f}),a.activeResponseCallback&&Promise.resolve(a.activeResponseCallback(u.activeResponseStream.apiObject,f.token)).finally(()=>{this._proxy.$handleProgressComplete(e,s,"ongoing")});let{capabilities:g}=i;return{id:d+"",resource:E.revive(s),title:a.title,hasActiveResponseCallback:!!a.activeResponseCallback,hasRequestHandler:!!a.requestHandler,supportsInterruption:!!g?.supportsInterruptions,options:a.options,history:a.history.map(I=>I instanceof js?this.convertRequestTurn(I):this.convertResponseTurn(I,l))}}async $provideHandleOptionsChange(e,n,o,i){let s=E.revive(n),a=this._chatSessionContentProviders.get(e);if(!a){this._logService.warn(`No provider for handle ${e}`);return}if(!a.provider.provideHandleOptionsChange){this._logService.debug(`Provider for handle ${e} does not implement provideHandleOptionsChange`);return}try{let l=o.map(d=>({optionId:d.optionId,value:d.value===void 0?void 0:typeof d.value=="string"?d.value:d.value.id}));await a.provider.provideHandleOptionsChange(s,l,i)}catch(l){this._logService.error(`Error calling provideHandleOptionsChange for handle ${e}, sessionResource ${s}:`,l)}}async $provideChatSessionProviderOptions(e,n){let o=this._chatSessionContentProviders.get(e);if(!o){this._logService.warn(`No provider for handle ${e} when requesting chat session options`);return}let i=o.provider;if(i.provideChatSessionProviderOptions)try{let s=await i.provideChatSessionProviderOptions(n);if(!s)return;let{optionGroups:a,newSessionOptions:l}=s;return a&&this._providerOptionGroups.set(e,a),{optionGroups:a,newSessionOptions:l}}catch(s){this._logService.error(`Error calling provideChatSessionProviderOptions for handle ${e}:`,s);return}}async $interruptChatSessionActiveResponse(e,n,o){this._extHostChatSessions.get(E.revive(n))?.disposeCts.cancel()}async $disposeChatSessionContent(e,n){let o=this._extHostChatSessions.get(E.revive(n));if(!o){this._logService.warn(`No chat session found for resource: ${n}`);return}o.disposeCts.cancel(),o.sessionObj.sessionDisposables.dispose(),this._extHostChatSessions.delete(E.revive(n))}async $invokeChatSessionRequestHandler(e,n,o,i,s){let a=this._extHostChatSessions.get(E.revive(n));if(!a||!a.sessionObj.session.requestHandler)return{};let l=cc.to(o,void 0,await this.getModelForRequest(o,a.sessionObj.extension),[],new Map,a.sessionObj.extension,this._logService),d=a.sessionObj.getActiveRequestStream(o);return await a.sessionObj.session.requestHandler(l,{history:i,yieldRequested:!1},d.apiObject,s),{}}async getModelForRequest(e,n){let o;if(e.userSelectedModelId&&(o=await this._languageModels.getLanguageModelByIdentifier(n,e.userSelectedModelId)),!o&&(o=await this._languageModels.getDefaultLanguageModel(n),!o))throw new Error("Language model unavailable");return o}convertRequestTurn(e){let n=e.references.map(o=>this.convertReferenceToVariable(o));return{type:"request",id:e.id,prompt:e.prompt,participant:e.participant,command:e.command,variableData:n.length>0?{variables:n}:void 0,modelId:e.modelId}}convertReferenceToVariable(e){let n=e.value&&typeof e.value=="object"&&"uri"in e.value&&"range"in e.value?kr.from(e.value):e.value,o=e.range?{start:e.range[0],endExclusive:e.range[1]}:void 0;if(n&&n instanceof yl&&Array.isArray(n.diagnostics)&&n.diagnostics.length&&n.diagnostics[0][1].length){let a=Ys.from(n.diagnostics[0][1][0]),l={filterRange:{startLineNumber:a.startLineNumber,startColumn:a.startColumn,endLineNumber:a.endLineNumber,endColumn:a.endColumn},filterSeverity:a.severity,filterUri:n.diagnostics[0][0],problemMessage:n.diagnostics[0][1][0].message};return qD.toEntry(l)}if(qt.isLocation(e.value)&&e.name.startsWith("sym:")){let a=kr.from(e.value);return{id:e.id,name:e.name,fullName:e.name.substring(4),value:{uri:e.value.uri,range:a.range},symbolKind:6,icon:MD.toIcon(6),kind:"symbol",range:o}}if(E.isUri(n)&&e.name.startsWith("prompt:")&&e.id.startsWith("vscode.prompt.file")&&e.id.endsWith(n.toString()))return{id:e.id,name:`prompt:${tn(n)}`,value:n,kind:"promptFile",modelDescription:"Prompt instructions file",isRoot:!0,automaticallyAdded:!1,range:o};let i=E.isUri(n)||n&&typeof n=="object"&&"uri"in n,s=i&&E.isUri(n)&&n.path.endsWith("/");return{id:e.id,name:e.name,value:n,modelDescription:e.modelDescription,range:o,kind:s?"directory":i?"file":"generic"}}convertResponseTurn(e,n){return{type:"response",parts:pt(e.response.map(i=>xp.from(i,this.commands.converter,n))),participant:e.participant}}async $invokeOptionGroupSearch(e,n,o,i){let s=this._providerOptionGroups.get(e);if(!s)return this._logService.warn(`No option groups found for provider handle ${e}`),[];let a=s.find(l=>l.id===n);if(!a||!a.onSearch)return this._logService.warn(`No onSearch callback found for option group ${n}`),[];try{return await a.onSearch(o,i)??[]}catch(l){return this._logService.error(`Error calling onSearch for option group ${n}:`,l),[]}}async $refreshChatSessionItems(e,n){let o=this._chatSessionItemControllers.get(e);if(!o){this._logService.warn(`No controller found for handle ${e}`);return}await o.controller.refreshHandler(n)}async $newChatSessionItem(e,n,o){let i=this._chatSessionItemControllers.get(e);if(!i){this._logService.warn(`No controller found for handle ${e}`);return}let s=i.controller.newChatSessionItemHandler;if(!s)return;let a=await this.getModelForRequest(n,i.extension),l=cc.to(n,void 0,a,[],new Map,i.extension,this._logService),d=await s({request:l},o);if(d)return _p.from(d)}$onDidChangeChatSessionItemState(e,n,o){let i=this._chatSessionItemControllers.get(e);if(!i){this._logService.warn(`No controller found for handle ${e}`);return}let s=E.revive(n),a=i.controller.items.get(s);if(!a){this._logService.warn(`No item found for session resource ${s.toString()}`);return}a.archived=o,i.onDidChangeChatSessionItemStateEmitter.fire(a)}};Vl=L([P(2,Ee),P(3,be)],Vl);var tC=class{constructor(t){this._items=new Map;this._proxy=t.getProxy(V.MainThreadChatStatus)}createChatStatusItem(t,e){let n=Bq(t.identifier,e);if(this._items.has(n))throw new Error(`Chat status item '${e}' already exists`);let o={id:n,title:"",description:"",detail:""},i=!1,s=!1,a=()=>{if(i)throw new Error("Chat status item is disposed");s&&this._proxy.$setEntry(e,o)},l=Object.freeze({id:e,get title(){return o.title},set title(d){o.title=d,a()},get description(){return o.description},set description(d){o.description=d,a()},get detail(){return o.detail},set detail(d){o.detail=d,a()},show:()=>{s=!0,a()},hide:()=>{s=!1,this._proxy.$disposeEntry(e)},dispose:()=>{i=!0,this._proxy.$disposeEntry(e),this._items.delete(n)}});return this._items.set(n,l),l}};function Bq(r,t){return`${Ue.toKey(r)}.${t}`}var nC=class{constructor(t){let e=t.getProxy(V.MainThreadClipboard);this.value=Object.freeze({readText(){return e.$readText()},writeText(n){return e.$writeText(n)}})}};var h5="vscode-cdn.net",Vq=`vscode-resource.${h5}`,$h=`'self' https://*.${h5}`;function Wl(r,t){return r.scheme===X.http||r.scheme===X.https?r:(t&&t.authority&&t.isRemote&&r.scheme===X.file&&(r=E.from({scheme:X.vscodeRemote,authority:t.authority,path:r.path})),E.from({scheme:X.https,authority:`${r.scheme}+${Wq(r.authority)}.${Vq}`,path:r.path,fragment:r.fragment,query:r.query}))}function Wq(r){return r.replace(/./g,t=>{let e=t.charCodeAt(0);return e>=97&&e<=122||e>=65&&e<=90||e>=48&&e<=57?t:"-"+e.toString(16).padStart(4,"0")})}var oC=class{constructor(t,e,n){this._proxy=t;this._editors=e;this._remoteInfo=n;this._handlePool=0;this._disposables=new te;this._insets=new Map;this._disposables.add(e.onDidChangeVisibleTextEditors(()=>{let o=e.getVisibleTextEditors();for(let i of this._insets.values())o.indexOf(i.editor)<0&&i.inset.dispose()}))}dispose(){this._insets.forEach(t=>t.inset.dispose()),this._disposables.dispose()}createWebviewEditorInset(t,e,n,o,i){let s;for(let g of this._editors.getVisibleTextEditors(!0))if(g.value===t){s=g;break}if(!s)throw new Error("not a visible editor");let a=this,l=this._handlePool++,d=new D,c=new D,u=new class{constructor(){this._html="";this._options=Object.create(null)}asWebviewUri(g){return Wl(g,a._remoteInfo)}get cspSource(){return $h}set options(g){this._options=g,a._proxy.$setOptions(l,g)}get options(){return this._options}set html(g){this._html=g,a._proxy.$setHtml(l,g)}get html(){return this._html}get onDidReceiveMessage(){return d.event}postMessage(g){return a._proxy.$postMessage(l,g)}},f=new class{constructor(){this.editor=t;this.line=e;this.height=n;this.webview=u;this.onDidDispose=c.event}dispose(){a._insets.delete(l)&&(a._proxy.$disposeEditorInset(l),c.fire(),c.dispose(),d.dispose())}};return this._proxy.$createEditorInset(l,s.id,s.value.document.uri,e+1,n,o||{},i.identifier,i.extensionLocation),this._insets.set(l,{editor:t,inset:f,onDidReceiveMessage:d}),f}$onDidDispose(t){let e=this._insets.get(t);e&&e.inset.dispose()}$onDidReceiveMessage(t,e){this._insets.get(t)?.onDidReceiveMessage.fire(e)}};var rC=class r{constructor(t){this.providers=new Map;this._proxy=t.getProxy(V.MainThreadCodeMapper)}static{this._providerHandlePool=0}async $mapCode(t,e,n){let o=this.providers.get(t);if(!o)throw new Error(`Received request to map code for unknown provider handle ${t}`);let i={textEdit:(l,d)=>{d=Rn(d),this._proxy.$handleProgress(e.requestId,{uri:l,edits:d.map(un.from)})},notebookEdit:(l,d)=>{d=Rn(d),this._proxy.$handleProgress(e.requestId,{uri:l,edits:d.map(HE.from)})}},s={location:e.location,chatRequestId:e.chatRequestId,chatRequestModel:e.chatRequestModel,chatSessionId:e.chatSessionResource?Fa.parseLocalSessionId(E.revive(e.chatSessionResource)):void 0,codeBlocks:e.codeBlocks.map(l=>({code:l.code,resource:E.revive(l.resource),markdownBeforeBlock:l.markdownBeforeBlock}))};return await o.provideMappedEdits(s,i,n)??null}registerMappedEditsProvider(t,e){let n=r._providerHandlePool++;return this._proxy.$registerCodeMapperProvider(n,t.displayName??t.name),this.providers.set(n,e),{dispose:()=>this._proxy.$unregisterCodeMapperProvider(n)}}};var iC=class{constructor(t){this._proxy=t.getProxy(V.MainThreadWindsurfAudio)}async getAverageVolume(){return this._proxy.$getAverageVolume()}async startAudioRecording(){return this._proxy.$startAudioRecording()}async stopAudioRecording(){return(await this._proxy.$stopAudioRecording()).buffer}};function v5(r,t,e){let n=r.getProxy(V.MainThreadComments);class o{constructor(){this._commentControllers=new Map;this._commentControllersByExtension=new Xn;t.registerArgumentProcessor({processArgument:h=>{if(h&&h.$mid===6){let C=this._commentControllers.get(h.handle);return C?C.value:h}else if(h&&h.$mid===7){let C=h,_=this._commentControllers.get(C.commentControlHandle);if(!_)return C;let R=_.getCommentThread(C.commentThreadHandle);return R?R.value:C}else if(h&&(h.$mid===9||h.$mid===8)){let C=this._commentControllers.get(h.thread.commentControlHandle);if(!C)return h;let _=C.getCommentThread(h.thread.commentThreadHandle);return _?h.$mid===8?_.value:{thread:_.value,text:h.text}:h}else if(h&&h.$mid===10){let C=this._commentControllers.get(h.thread.commentControlHandle);if(!C)return h;let _=C.getCommentThread(h.thread.commentThreadHandle);if(!_)return h;let R=h.commentUniqueId,O=_.getCommentByUniqueId(R);return O||h}else if(h&&h.$mid===11){let C=this._commentControllers.get(h.thread.commentControlHandle);if(!C)return h;let _=C.getCommentThread(h.thread.commentThreadHandle);if(!_)return h;let R=h.text,O=h.commentUniqueId,U=_.getCommentByUniqueId(O);return U?(typeof U.body=="string"?U.body=R:U.body=new zt(R),U):h}return h}})}static{this.handlePool=0}createCommentController(h,C,_){let R=o.handlePool++,O=new s(h,R,C,_);this._commentControllers.set(O.handle,O);let U=this._commentControllersByExtension.get(h.identifier)||[];return U.push(O),this._commentControllersByExtension.set(h.identifier,U),O.value}async $createCommentThreadTemplate(h,C,_,R){let O=this._commentControllers.get(h);O&&O.$createCommentThreadTemplate(C,_,R)}async $setActiveComment(h,C){let _=this._commentControllers.get(h);_&&_.$setActiveComment(C??void 0)}async $updateCommentThreadTemplate(h,C,_){let R=this._commentControllers.get(h);R&&R.$updateCommentThreadTemplate(C,_)}$deleteCommentThread(h,C){this._commentControllers.get(h)?.$deleteCommentThread(C)}async $updateCommentThread(h,C,_){this._commentControllers.get(h)?.$updateCommentThread(C,_)}async $provideCommentingRanges(h,C,_){let R=this._commentControllers.get(h);if(!R||!R.commentingRangeProvider)return Promise.resolve(void 0);let O=await e.ensureDocumentData(E.revive(C));return dn(async()=>{let U=await R.commentingRangeProvider?.provideCommentingRanges(O.document,_),ie;return Array.isArray(U)?ie={ranges:U,fileComments:!1}:U?ie={ranges:U.ranges||[],fileComments:U.enableFileComments||!1}:ie=U??void 0,ie}).then(U=>{let ie;return U&&(ie={ranges:U.ranges.map(Y=>j.from(Y)),fileComments:U.fileComments}),ie})}$toggleReaction(h,C,_,R,O){let U=this._commentControllers.get(h);return!U||!U.reactionHandler?Promise.resolve(void 0):dn(()=>{let ie=U.getCommentThread(C);if(ie){let Y=ie.getCommentByUniqueId(R.uniqueIdInThread);if(U!==void 0&&Y&&U.reactionHandler)return U.reactionHandler(Y,d(O))}return Promise.resolve(void 0)})}}let g=class g{constructor(h,C,_,R,O,U,ie,Y,Z){this._commentControllerHandle=C;this._id=_;this._uri=R;this._range=O;this._comments=U;this.extensionDescription=ie;this._isTemplate=Y;this.handle=g._handlePool++;this.commentHandle=0;this.modifications=Object.create(null);this._onDidUpdateCommentThread=new D;this.onDidUpdateCommentThread=this._onDidUpdateCommentThread.event;this._canReply=!0;this._commentsMap=new Map;this._acceptInputDisposables=new An;this._acceptInputDisposables.value=new te,this._id===void 0&&(this._id=`${h}.${this.handle}`),n.$createCommentThread(C,this.handle,this._id,this._uri,j.from(this._range),this._comments.map(oe=>a(this,oe,this._commentsMap,this.extensionDescription)),ie.identifier,this._isTemplate,Z),this._localDisposables=[],this._isDiposed=!1,this._localDisposables.push(this.onDidUpdateCommentThread(()=>{this.eventuallyUpdateCommentThread()})),this._localDisposables.push({dispose:()=>{n.$deleteCommentThread(C,this.handle)}});let ee=this;this.value={get uri(){return ee.uri},get range(){return ee.range},set range(oe){ee.range=oe},get comments(){return ee.comments},set comments(oe){ee.comments=oe},get collapsibleState(){return ee.collapsibleState},set collapsibleState(oe){ee.collapsibleState=oe},get canReply(){return ee.canReply},set canReply(oe){ee.canReply=oe},get contextValue(){return ee.contextValue},set contextValue(oe){ee.contextValue=oe},get label(){return ee.label},set label(oe){ee.label=oe},get state(){return ee.state},set state(oe){ee.state=oe},reveal:(oe,ke)=>ee.reveal(oe,ke),hide:()=>ee.hide(),dispose:()=>{ee.dispose()}}}static{this._handlePool=0}set threadId(h){this._id=h}get threadId(){return this._id}get id(){return this._id}get resource(){return this._uri}get uri(){return this._uri}set range(h){(h===void 0!=(this._range===void 0)||!h||!this._range||!h.isEqual(this._range))&&(this._range=h,this.modifications.range=h,this._onDidUpdateCommentThread.fire())}get range(){return this._range}set canReply(h){this._canReply!==h&&(this._canReply=h,this.modifications.canReply=h,this._onDidUpdateCommentThread.fire())}get canReply(){return this._canReply}get label(){return this._label}set label(h){this._label=h,this.modifications.label=h,this._onDidUpdateCommentThread.fire()}get contextValue(){return this._contextValue}set contextValue(h){this._contextValue=h,this.modifications.contextValue=h,this._onDidUpdateCommentThread.fire()}get comments(){return this._comments}set comments(h){this._comments=h,this.modifications.comments=h,this._onDidUpdateCommentThread.fire()}get collapsibleState(){return this._collapseState}set collapsibleState(h){this._collapseState!==h&&(this._collapseState=h,this.modifications.collapsibleState=h,this._onDidUpdateCommentThread.fire())}get state(){return this._state}set state(h){this._state=h,typeof h=="object"?(H(this.extensionDescription,"commentThreadApplicability"),this.modifications.state=h.resolved,this.modifications.applicability=h.applicability):this.modifications.state=h,this._onDidUpdateCommentThread.fire()}get isDisposed(){return this._isDiposed}updateIsTemplate(){this._isTemplate&&(this._isTemplate=!1,this.modifications.isTemplate=!1)}eventuallyUpdateCommentThread(){if(this._isDiposed)return;this.updateIsTemplate(),this._acceptInputDisposables.value||(this._acceptInputDisposables.value=new te);let h=_=>Object.prototype.hasOwnProperty.call(this.modifications,_),C={};h("range")&&(C.range=j.from(this._range)),h("label")&&(C.label=this.label),h("contextValue")&&(C.contextValue=this.contextValue??null),h("comments")&&(C.comments=this._comments.map(_=>a(this,_,this._commentsMap,this.extensionDescription))),h("collapsibleState")&&(C.collapseState=c(this._collapseState)),h("canReply")&&(C.canReply=this.canReply),h("state")&&(C.state=u(this._state)),h("applicability")&&(C.applicability=f(this._state)),h("isTemplate")&&(C.isTemplate=this._isTemplate),this.modifications={},n.$updateCommentThread(this._commentControllerHandle,this.handle,this._id,this._uri,C)}getCommentByUniqueId(h){for(let C of this._commentsMap){let _=C[0],R=C[1];if(h===R)return _}}async reveal(h,C){H(this.extensionDescription,"commentReveal");let _;h&&h.body!==void 0?_=h:C=C??h;let R=_?this._commentsMap.get(_):void 0;R??=this._commentsMap.get(this._comments[0]);let O=!0,U=!1;return C?.focus===1?(U=!0,O=!1):C?.focus===2&&(O=!1),n.$revealCommentThread(this._commentControllerHandle,this.handle,R,{preserveFocus:O,focusReply:U})}async hide(){return n.$hideCommentThread(this._commentControllerHandle,this.handle)}dispose(){this._isDiposed=!0,this._acceptInputDisposables.dispose(),this._onDidUpdateCommentThread.dispose(),this._localDisposables.forEach(h=>h.dispose())}};L([Ih(100)],g.prototype,"eventuallyUpdateCommentThread",1);let i=g;class s{constructor(h,C,_,R){this._extension=h;this._handle=C;this._id=_;this._label=R;this._threads=new Map;n.$registerCommentController(this.handle,_,R,this._extension.identifier.value);let O=this;this.value=Object.freeze({id:O.id,label:O.label,get options(){return O.options},set options(U){O.options=U},get commentingRangeProvider(){return O.commentingRangeProvider},set commentingRangeProvider(U){O.commentingRangeProvider=U},get reactionHandler(){return O.reactionHandler},set reactionHandler(U){O.reactionHandler=U},get activeCommentThread(){return O.activeCommentThread},createCommentThread(U,ie,Y){return O.createCommentThread(U,ie,Y).value},dispose:()=>{O.dispose()}}),this._localDisposables=[],this._localDisposables.push({dispose:()=>{n.$unregisterCommentController(this.handle)}})}get id(){return this._id}get label(){return this._label}get handle(){return this._handle}get commentingRangeProvider(){return this._commentingRangeProvider}set commentingRangeProvider(h){this._commentingRangeProvider=h,h?.resourceHints&&H(this._extension,"commentingRangeHint"),n.$updateCommentingRanges(this.handle,h?.resourceHints)}get reactionHandler(){return this._reactionHandler}set reactionHandler(h){this._reactionHandler=h,n.$updateCommentControllerFeatures(this.handle,{reactionHandler:!!h})}get options(){return this._options}set options(h){this._options=h,n.$updateCommentControllerFeatures(this.handle,{options:this._options})}get activeComment(){return H(this._extension,"activeComment"),this._activeComment}get activeCommentThread(){return H(this._extension,"activeComment"),this._activeThread?.value}createCommentThread(h,C,_){let R=new i(this.id,this.handle,void 0,h,C,_,this._extension,!1);return this._threads.set(R.handle,R),R}$setActiveComment(h){if(!h){this._activeComment=void 0,this._activeThread=void 0;return}let C=this._threads.get(h.commentThreadHandle);C&&(this._activeComment=h.uniqueIdInThread?C.getCommentByUniqueId(h.uniqueIdInThread):void 0,this._activeThread=C)}$createCommentThreadTemplate(h,C,_){let R=new i(this.id,this.handle,void 0,E.revive(h),j.to(C),[],this._extension,!0,_);return R.collapsibleState=1,this._threads.set(R.handle,R),R}$updateCommentThreadTemplate(h,C){let _=this._threads.get(h);_&&(_.range=j.to(C))}$updateCommentThread(h,C){let _=this._threads.get(h);if(!_)return;(O=>Object.prototype.hasOwnProperty.call(C,O))("collapseState")&&(_.collapsibleState=c(C.collapseState))}$deleteCommentThread(h){this._threads.get(h)?.dispose(),this._threads.delete(h)}getCommentThread(h){return this._threads.get(h)}dispose(){this._threads.forEach(h=>{h.dispose()}),this._localDisposables.forEach(h=>h.dispose())}}function a(I,h,C,_){let R=C.get(h);return R||(R=++I.commentHandle,C.set(h,R)),h.state!==void 0&&H(_,"commentsDraftState"),h.reactions?.some(O=>O.reactors!==void 0)&&H(_,"commentReactor"),{mode:h.mode,contextValue:h.contextValue,uniqueIdInThread:R,body:typeof h.body=="string"?h.body:ye.from(h.body),userName:h.author.name,userIconPath:h.author.iconPath,label:h.label,commentReactions:h.reactions?h.reactions.map(O=>l(O)):void 0,state:h.state,timestamp:h.timestamp?.toJSON()}}function l(I){return{label:I.label,iconPath:I.iconPath?Jg(I.iconPath):void 0,count:I.count,hasReacted:I.authorHasReacted,reactors:I.reactors&&I.reactors.length>0&&typeof I.reactors[0]!="string"?I.reactors.map(h=>h.name):I.reactors}}function d(I){return{label:I.label||"",count:I.count||0,iconPath:I.iconPath?E.revive(I.iconPath):"",authorHasReacted:I.hasReacted||!1,reactors:I.reactors?.map(h=>({name:h}))}}function c(I){if(I!==void 0)switch(I){case 1:return 1;case 0:return 0}return 0}function u(I){let h;if(typeof I=="object"?h=I.resolved:h=I,h!==void 0)switch(h){case 0:return 0;case 1:return 1}return 0}function f(I){let h;if(typeof I=="object"&&(h=I.applicability),h!==void 0)switch(h){case 0:return 0;case 1:return 1}return 0}return new o}var sC={},It={exports:sC};(function(r,t){if(typeof sC=="object"&&typeof It=="object")It.exports=t();else if(typeof define=="function"&&define.amd)define([],t);else{var e=t();for(var n in e)(typeof sC=="object"?sC:r)[n]=e[n]}})(typeof self<"u"?self:void 0,(function(){return(function(r){var t={};function e(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return r[n].call(o.exports,o,o.exports,e),o.l=!0,o.exports}return e.m=r,e.c=t,e.d=function(n,o,i){e.o(n,o)||Object.defineProperty(n,o,{enumerable:!0,get:i})},e.r=function(n){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"__esModule",{value:!0})},e.t=function(n,o){if(1&o&&(n=e(n)),8&o||4&o&&typeof n=="object"&&n&&n.__esModule)return n;var i=Object.create(null);if(e.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:n}),2&o&&typeof n!="string")for(var s in n)e.d(i,s,function(a){return n[a]}.bind(null,s));return i},e.n=function(n){var o=n&&n.__esModule?function(){return n.default}:function(){return n};return e.d(o,"a",o),o},e.o=function(n,o){return Object.prototype.hasOwnProperty.call(n,o)},e.p="",e(e.s=0)})([function(r,t,e){(function(n){var o;t=r.exports=_t,o=typeof n=="object"&&n.env&&n.env.NODE_DEBUG&&/\bsemver\b/i.test(n.env.NODE_DEBUG)?function(){var F=Array.prototype.slice.call(arguments,0);F.unshift("SEMVER"),console.log.apply(console,F)}:function(){},t.SEMVER_SPEC_VERSION="2.0.0";var i=256,s=Number.MAX_SAFE_INTEGER||9007199254740991,a=t.re=[],l=t.src=[],d=0,c=d++;l[c]="0|[1-9]\\d*";var u=d++;l[u]="[0-9]+";var f=d++;l[f]="\\d*[a-zA-Z-][a-zA-Z0-9-]*";var g=d++;l[g]="("+l[c]+")\\.("+l[c]+")\\.("+l[c]+")";var I=d++;l[I]="("+l[u]+")\\.("+l[u]+")\\.("+l[u]+")";var h=d++;l[h]="(?:"+l[c]+"|"+l[f]+")";var C=d++;l[C]="(?:"+l[u]+"|"+l[f]+")";var _=d++;l[_]="(?:-("+l[h]+"(?:\\."+l[h]+")*))";var R=d++;l[R]="(?:-?("+l[C]+"(?:\\."+l[C]+")*))";var O=d++;l[O]="[0-9A-Za-z-]+";var U=d++;l[U]="(?:\\+("+l[O]+"(?:\\."+l[O]+")*))";var ie=d++,Y="v?"+l[g]+l[_]+"?"+l[U]+"?";l[ie]="^"+Y+"$";var Z="[v=\\s]*"+l[I]+l[R]+"?"+l[U]+"?",ee=d++;l[ee]="^"+Z+"$";var oe=d++;l[oe]="((?:<|>)?=?)";var ke=d++;l[ke]=l[u]+"|x|X|\\*";var B=d++;l[B]=l[c]+"|x|X|\\*";var Xe=d++;l[Xe]="[v=\\s]*("+l[B]+")(?:\\.("+l[B]+")(?:\\.("+l[B]+")(?:"+l[_]+")?"+l[U]+"?)?)?";var it=d++;l[it]="[v=\\s]*("+l[ke]+")(?:\\.("+l[ke]+")(?:\\.("+l[ke]+")(?:"+l[R]+")?"+l[U]+"?)?)?";var Qe=d++;l[Qe]="^"+l[oe]+"\\s*"+l[Xe]+"$";var q=d++;l[q]="^"+l[oe]+"\\s*"+l[it]+"$";var z=d++;l[z]="(?:^|[^\\d])(\\d{1,16})(?:\\.(\\d{1,16}))?(?:\\.(\\d{1,16}))?(?:$|[^\\d])";var de=d++;l[de]="(?:~>?)";var pe=d++;l[pe]="(\\s*)"+l[de]+"\\s+",a[pe]=new RegExp(l[pe],"g");var ge=d++;l[ge]="^"+l[de]+l[Xe]+"$";var Le=d++;l[Le]="^"+l[de]+l[it]+"$";var Je=d++;l[Je]="(?:\\^)";var Ge=d++;l[Ge]="(\\s*)"+l[Je]+"\\s+",a[Ge]=new RegExp(l[Ge],"g");var ft=d++;l[ft]="^"+l[Je]+l[Xe]+"$";var kt=d++;l[kt]="^"+l[Je]+l[it]+"$";var ot=d++;l[ot]="^"+l[oe]+"\\s*("+Z+")$|^$";var rn=d++;l[rn]="^"+l[oe]+"\\s*("+Y+")$|^$";var vn=d++;l[vn]="(\\s*)"+l[oe]+"\\s*("+Z+"|"+l[Xe]+")",a[vn]=new RegExp(l[vn],"g");var so=d++;l[so]="^\\s*("+l[Xe]+")\\s+-\\s+("+l[Xe]+")\\s*$";var ua=d++;l[ua]="^\\s*("+l[it]+")\\s+-\\s+("+l[it]+")\\s*$";var pa=d++;l[pa]="(<|>)?=?\\s*\\*";for(var xe=0;xe<35;xe++)o(xe,l[xe]),a[xe]||(a[xe]=new RegExp(l[xe]));function Mr(F,J){if(F instanceof _t)return F;if(typeof F!="string"||F.length>i||!(J?a[ee]:a[ie]).test(F))return null;try{return new _t(F,J)}catch{return null}}function _t(F,J){if(F instanceof _t){if(F.loose===J)return F;F=F.version}else if(typeof F!="string")throw new TypeError("Invalid Version: "+F);if(F.length>i)throw new TypeError("version is longer than "+i+" characters");if(!(this instanceof _t))return new _t(F,J);o("SemVer",F,J),this.loose=J;var Q=F.trim().match(J?a[ee]:a[ie]);if(!Q)throw new TypeError("Invalid Version: "+F);if(this.raw=F,this.major=+Q[1],this.minor=+Q[2],this.patch=+Q[3],this.major>s||this.major<0)throw new TypeError("Invalid major version");if(this.minor>s||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>s||this.patch<0)throw new TypeError("Invalid patch version");Q[4]?this.prerelease=Q[4].split(".").map((function(Ae){if(/^[0-9]+$/.test(Ae)){var Fe=+Ae;if(Fe>=0&&Fe<s)return Fe}return Ae})):this.prerelease=[],this.build=Q[5]?Q[5].split("."):[],this.format()}t.parse=Mr,t.valid=function(F,J){var Q=Mr(F,J);return Q?Q.version:null},t.clean=function(F,J){var Q=Mr(F.trim().replace(/^[=v]+/,""),J);return Q?Q.version:null},t.SemVer=_t,_t.prototype.format=function(){return this.version=this.major+"."+this.minor+"."+this.patch,this.prerelease.length&&(this.version+="-"+this.prerelease.join(".")),this.version},_t.prototype.toString=function(){return this.version},_t.prototype.compare=function(F){return o("SemVer.compare",this.version,this.loose,F),F instanceof _t||(F=new _t(F,this.loose)),this.compareMain(F)||this.comparePre(F)},_t.prototype.compareMain=function(F){return F instanceof _t||(F=new _t(F,this.loose)),se(this.major,F.major)||se(this.minor,F.minor)||se(this.patch,F.patch)},_t.prototype.comparePre=function(F){if(F instanceof _t||(F=new _t(F,this.loose)),this.prerelease.length&&!F.prerelease.length)return-1;if(!this.prerelease.length&&F.prerelease.length)return 1;if(!this.prerelease.length&&!F.prerelease.length)return 0;var J=0;do{var Q=this.prerelease[J],Ae=F.prerelease[J];if(o("prerelease compare",J,Q,Ae),Q===void 0&&Ae===void 0)return 0;if(Ae===void 0)return 1;if(Q===void 0)return-1;if(Q!==Ae)return se(Q,Ae)}while(++J)},_t.prototype.inc=function(F,J){switch(F){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",J);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",J);break;case"prepatch":this.prerelease.length=0,this.inc("patch",J),this.inc("pre",J);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",J),this.inc("pre",J);break;case"major":this.minor===0&&this.patch===0&&this.prerelease.length!==0||this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":this.patch===0&&this.prerelease.length!==0||this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":if(this.prerelease.length===0)this.prerelease=[0];else{for(var Q=this.prerelease.length;--Q>=0;)typeof this.prerelease[Q]=="number"&&(this.prerelease[Q]++,Q=-2);Q===-1&&this.prerelease.push(0)}J&&(this.prerelease[0]===J?isNaN(this.prerelease[1])&&(this.prerelease=[J,0]):this.prerelease=[J,0]);break;default:throw new Error("invalid increment argument: "+F)}return this.format(),this.raw=this.version,this},t.inc=function(F,J,Q,Ae){typeof Q=="string"&&(Ae=Q,Q=void 0);try{return new _t(F,Q).inc(J,Ae).version}catch{return null}},t.diff=function(F,J){if(lr(F,J))return null;var Q=Mr(F),Ae=Mr(J);if(Q.prerelease.length||Ae.prerelease.length){for(var Fe in Q)if((Fe==="major"||Fe==="minor"||Fe==="patch")&&Q[Fe]!==Ae[Fe])return"pre"+Fe;return"prerelease"}for(var Fe in Q)if((Fe==="major"||Fe==="minor"||Fe==="patch")&&Q[Fe]!==Ae[Fe])return Fe},t.compareIdentifiers=se;var ar=/^[0-9]+$/;function se(F,J){var Q=ar.test(F),Ae=ar.test(J);return Q&&Ae&&(F=+F,J=+J),Q&&!Ae?-1:Ae&&!Q?1:F<J?-1:F>J?1:0}function je(F,J,Q){return new _t(F,Q).compare(new _t(J,Q))}function zl(F,J,Q){return je(F,J,Q)>0}function ql(F,J,Q){return je(F,J,Q)<0}function lr(F,J,Q){return je(F,J,Q)===0}function ls(F,J,Q){return je(F,J,Q)!==0}function Kl(F,J,Q){return je(F,J,Q)>=0}function Lc(F,J,Q){return je(F,J,Q)<=0}function Jl(F,J,Q,Ae){var Fe;switch(J){case"===":typeof F=="object"&&(F=F.version),typeof Q=="object"&&(Q=Q.version),Fe=F===Q;break;case"!==":typeof F=="object"&&(F=F.version),typeof Q=="object"&&(Q=Q.version),Fe=F!==Q;break;case"":case"=":case"==":Fe=lr(F,Q,Ae);break;case"!=":Fe=ls(F,Q,Ae);break;case">":Fe=zl(F,Q,Ae);break;case">=":Fe=Kl(F,Q,Ae);break;case"<":Fe=ql(F,Q,Ae);break;case"<=":Fe=Lc(F,Q,Ae);break;default:throw new TypeError("Invalid operator: "+J)}return Fe}function Ro(F,J){if(F instanceof Ro){if(F.loose===J)return F;F=F.value}if(!(this instanceof Ro))return new Ro(F,J);o("comparator",F,J),this.loose=J,this.parse(F),this.semver===ma?this.value="":this.value=this.operator+this.semver.version,o("comp",this)}t.rcompareIdentifiers=function(F,J){return se(J,F)},t.major=function(F,J){return new _t(F,J).major},t.minor=function(F,J){return new _t(F,J).minor},t.patch=function(F,J){return new _t(F,J).patch},t.compare=je,t.compareLoose=function(F,J){return je(F,J,!0)},t.rcompare=function(F,J,Q){return je(J,F,Q)},t.sort=function(F,J){return F.sort((function(Q,Ae){return t.compare(Q,Ae,J)}))},t.rsort=function(F,J){return F.sort((function(Q,Ae){return t.rcompare(Q,Ae,J)}))},t.gt=zl,t.lt=ql,t.eq=lr,t.neq=ls,t.gte=Kl,t.lte=Lc,t.cmp=Jl,t.Comparator=Ro;var ma={};function Yt(F,J){if(F instanceof Yt)return F.loose===J?F:new Yt(F.raw,J);if(F instanceof Ro)return new Yt(F.value,J);if(!(this instanceof Yt))return new Yt(F,J);if(this.loose=J,this.raw=F,this.set=F.split(/\s*\|\|\s*/).map((function(Q){return this.parseRange(Q.trim())}),this).filter((function(Q){return Q.length})),!this.set.length)throw new TypeError("Invalid SemVer Range: "+F);this.format()}function Gn(F){return!F||F.toLowerCase()==="x"||F==="*"}function jl(F,J,Q,Ae,Fe,gn,Ye,Dn,pn,wn,Jo,mn,xn){return((J=Gn(Q)?"":Gn(Ae)?">="+Q+".0.0":Gn(Fe)?">="+Q+"."+Ae+".0":">="+J)+" "+(Dn=Gn(pn)?"":Gn(wn)?"<"+(+pn+1)+".0.0":Gn(Jo)?"<"+pn+"."+(+wn+1)+".0":mn?"<="+pn+"."+wn+"."+Jo+"-"+mn:"<="+Dn)).trim()}function Mc(F,J){for(var Q=0;Q<F.length;Q++)if(!F[Q].test(J))return!1;if(J.prerelease.length){for(Q=0;Q<F.length;Q++)if(o(F[Q].semver),F[Q].semver!==ma&&F[Q].semver.prerelease.length>0){var Ae=F[Q].semver;if(Ae.major===J.major&&Ae.minor===J.minor&&Ae.patch===J.patch)return!0}return!1}return!0}function Ql(F,J,Q){try{J=new Yt(J,Q)}catch{return!1}return J.test(F)}function Nc(F,J,Q,Ae){var Fe,gn,Ye,Dn,pn;switch(F=new _t(F,Ae),J=new Yt(J,Ae),Q){case">":Fe=zl,gn=Lc,Ye=ql,Dn=">",pn=">=";break;case"<":Fe=ql,gn=Kl,Ye=zl,Dn="<",pn="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(Ql(F,J,Ae))return!1;for(var wn=0;wn<J.set.length;++wn){var Jo=J.set[wn],mn=null,xn=null;if(Jo.forEach((function(ao){ao.semver===ma&&(ao=new Ro(">=0.0.0")),mn=mn||ao,xn=xn||ao,Fe(ao.semver,mn.semver,Ae)?mn=ao:Ye(ao.semver,xn.semver,Ae)&&(xn=ao)})),mn.operator===Dn||mn.operator===pn||(!xn.operator||xn.operator===Dn)&&gn(F,xn.semver)||xn.operator===pn&&Ye(F,xn.semver))return!1}return!0}Ro.prototype.parse=function(F){var J=this.loose?a[ot]:a[rn],Q=F.match(J);if(!Q)throw new TypeError("Invalid comparator: "+F);this.operator=Q[1],this.operator==="="&&(this.operator=""),Q[2]?this.semver=new _t(Q[2],this.loose):this.semver=ma},Ro.prototype.toString=function(){return this.value},Ro.prototype.test=function(F){return o("Comparator.test",F,this.loose),this.semver===ma||(typeof F=="string"&&(F=new _t(F,this.loose)),Jl(F,this.operator,this.semver,this.loose))},Ro.prototype.intersects=function(F,J){if(!(F instanceof Ro))throw new TypeError("a Comparator is required");var Q;if(this.operator==="")return Q=new Yt(F.value,J),Ql(this.value,Q,J);if(F.operator==="")return Q=new Yt(this.value,J),Ql(F.semver,Q,J);var Ae=!(this.operator!==">="&&this.operator!==">"||F.operator!==">="&&F.operator!==">"),Fe=!(this.operator!=="<="&&this.operator!=="<"||F.operator!=="<="&&F.operator!=="<"),gn=this.semver.version===F.semver.version,Ye=!(this.operator!==">="&&this.operator!=="<="||F.operator!==">="&&F.operator!=="<="),Dn=Jl(this.semver,"<",F.semver,J)&&(this.operator===">="||this.operator===">")&&(F.operator==="<="||F.operator==="<"),pn=Jl(this.semver,">",F.semver,J)&&(this.operator==="<="||this.operator==="<")&&(F.operator===">="||F.operator===">");return Ae||Fe||gn&&Ye||Dn||pn},t.Range=Yt,Yt.prototype.format=function(){return this.range=this.set.map((function(F){return F.join(" ").trim()})).join("||").trim(),this.range},Yt.prototype.toString=function(){return this.range},Yt.prototype.parseRange=function(F){var J=this.loose;F=F.trim(),o("range",F,J);var Q=J?a[ua]:a[so];F=F.replace(Q,jl),o("hyphen replace",F),F=F.replace(a[vn],"$1$2$3"),o("comparator trim",F,a[vn]),F=(F=(F=F.replace(a[pe],"$1~")).replace(a[Ge],"$1^")).split(/\s+/).join(" ");var Ae=J?a[ot]:a[rn],Fe=F.split(" ").map((function(gn){return(function(Ye,Dn){return o("comp",Ye),Ye=(function(pn,wn){return pn.trim().split(/\s+/).map((function(Jo){return(function(mn,xn){o("caret",mn,xn);var ao=xn?a[kt]:a[ft];return mn.replace(ao,(function(ue,ze,Ze,At,Mt){var sn;return o("caret",mn,ue,ze,Ze,At,Mt),Gn(ze)?sn="":Gn(Ze)?sn=">="+ze+".0.0 <"+(+ze+1)+".0.0":Gn(At)?sn=ze==="0"?">="+ze+"."+Ze+".0 <"+ze+"."+(+Ze+1)+".0":">="+ze+"."+Ze+".0 <"+(+ze+1)+".0.0":Mt?(o("replaceCaret pr",Mt),Mt.charAt(0)!=="-"&&(Mt="-"+Mt),sn=ze==="0"?Ze==="0"?">="+ze+"."+Ze+"."+At+Mt+" <"+ze+"."+Ze+"."+(+At+1):">="+ze+"."+Ze+"."+At+Mt+" <"+ze+"."+(+Ze+1)+".0":">="+ze+"."+Ze+"."+At+Mt+" <"+(+ze+1)+".0.0"):(o("no pr"),sn=ze==="0"?Ze==="0"?">="+ze+"."+Ze+"."+At+" <"+ze+"."+Ze+"."+(+At+1):">="+ze+"."+Ze+"."+At+" <"+ze+"."+(+Ze+1)+".0":">="+ze+"."+Ze+"."+At+" <"+(+ze+1)+".0.0"),o("caret return",sn),sn}))})(Jo,wn)})).join(" ")})(Ye,Dn),o("caret",Ye),Ye=(function(pn,wn){return pn.trim().split(/\s+/).map((function(Jo){return(function(mn,xn){var ao=xn?a[Le]:a[ge];return mn.replace(ao,(function(ue,ze,Ze,At,Mt){var sn;return o("tilde",mn,ue,ze,Ze,At,Mt),Gn(ze)?sn="":Gn(Ze)?sn=">="+ze+".0.0 <"+(+ze+1)+".0.0":Gn(At)?sn=">="+ze+"."+Ze+".0 <"+ze+"."+(+Ze+1)+".0":Mt?(o("replaceTilde pr",Mt),Mt.charAt(0)!=="-"&&(Mt="-"+Mt),sn=">="+ze+"."+Ze+"."+At+Mt+" <"+ze+"."+(+Ze+1)+".0"):sn=">="+ze+"."+Ze+"."+At+" <"+ze+"."+(+Ze+1)+".0",o("tilde return",sn),sn}))})(Jo,wn)})).join(" ")})(Ye,Dn),o("tildes",Ye),Ye=(function(pn,wn){return o("replaceXRanges",pn,wn),pn.split(/\s+/).map((function(Jo){return(function(mn,xn){mn=mn.trim();var ao=xn?a[q]:a[Qe];return mn.replace(ao,(function(ue,ze,Ze,At,Mt,sn){o("xRange",mn,ue,ze,Ze,At,Mt,sn);var df=Gn(Ze),fa=df||Gn(At),Xl=fa||Gn(Mt);return ze==="="&&Xl&&(ze=""),df?ue=ze===">"||ze==="<"?"<0.0.0":"*":ze&&Xl?(fa&&(At=0),Xl&&(Mt=0),ze===">"?(ze=">=",fa?(Ze=+Ze+1,At=0,Mt=0):Xl&&(At=+At+1,Mt=0)):ze==="<="&&(ze="<",fa?Ze=+Ze+1:At=+At+1),ue=ze+Ze+"."+At+"."+Mt):fa?ue=">="+Ze+".0.0 <"+(+Ze+1)+".0.0":Xl&&(ue=">="+Ze+"."+At+".0 <"+Ze+"."+(+At+1)+".0"),o("xRange return",ue),ue}))})(Jo,wn)})).join(" ")})(Ye,Dn),o("xrange",Ye),Ye=(function(pn,wn){return o("replaceStars",pn,wn),pn.trim().replace(a[pa],"")})(Ye,Dn),o("stars",Ye),Ye})(gn,J)})).join(" ").split(/\s+/);return this.loose&&(Fe=Fe.filter((function(gn){return!!gn.match(Ae)}))),Fe=Fe.map((function(gn){return new Ro(gn,J)}))},Yt.prototype.intersects=function(F,J){if(!(F instanceof Yt))throw new TypeError("a Range is required");return this.set.some((function(Q){return Q.every((function(Ae){return F.set.some((function(Fe){return Fe.every((function(gn){return Ae.intersects(gn,J)}))}))}))}))},t.toComparators=function(F,J){return new Yt(F,J).set.map((function(Q){return Q.map((function(Ae){return Ae.value})).join(" ").trim().split(" ")}))},Yt.prototype.test=function(F){if(!F)return!1;typeof F=="string"&&(F=new _t(F,this.loose));for(var J=0;J<this.set.length;J++)if(Mc(this.set[J],F))return!0;return!1},t.satisfies=Ql,t.maxSatisfying=function(F,J,Q){var Ae=null,Fe=null;try{var gn=new Yt(J,Q)}catch{return null}return F.forEach((function(Ye){gn.test(Ye)&&(Ae&&Fe.compare(Ye)!==-1||(Fe=new _t(Ae=Ye,Q)))})),Ae},t.minSatisfying=function(F,J,Q){var Ae=null,Fe=null;try{var gn=new Yt(J,Q)}catch{return null}return F.forEach((function(Ye){gn.test(Ye)&&(Ae&&Fe.compare(Ye)!==1||(Fe=new _t(Ae=Ye,Q)))})),Ae},t.validRange=function(F,J){try{return new Yt(F,J).range||"*"}catch{return null}},t.ltr=function(F,J,Q){return Nc(F,J,"<",Q)},t.gtr=function(F,J,Q){return Nc(F,J,">",Q)},t.outside=Nc,t.prerelease=function(F,J){var Q=Mr(F,J);return Q&&Q.prerelease.length?Q.prerelease:null},t.intersects=function(F,J,Q){return F=new Yt(F,Q),J=new Yt(J,Q),F.intersects(J)},t.coerce=function(F){if(F instanceof _t)return F;if(typeof F!="string")return null;var J=F.match(a[z]);return J==null?null:Mr((J[1]||"0")+"."+(J[2]||"0")+"."+(J[3]||"0"))}}).call(this,e(1))},function(r,t){var e,n,o=r.exports={};function i(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function a(C){if(e===setTimeout)return setTimeout(C,0);if((e===i||!e)&&setTimeout)return e=setTimeout,setTimeout(C,0);try{return e(C,0)}catch{try{return e.call(null,C,0)}catch{return e.call(this,C,0)}}}(function(){try{e=typeof setTimeout=="function"?setTimeout:i}catch{e=i}try{n=typeof clearTimeout=="function"?clearTimeout:s}catch{n=s}})();var l,d=[],c=!1,u=-1;function f(){c&&l&&(c=!1,l.length?d=l.concat(d):u=-1,d.length&&g())}function g(){if(!c){var C=a(f);c=!0;for(var _=d.length;_;){for(l=d,d=[];++u<_;)l&&l[u].run();u=-1,_=d.length}l=null,c=!1,(function(R){if(n===clearTimeout)return clearTimeout(R);if((n===s||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(R);try{n(R)}catch{try{return n.call(null,R)}catch{return n.call(this,R)}}})(C)}}function I(C,_){this.fun=C,this.array=_}function h(){}o.nextTick=function(C){var _=new Array(arguments.length-1);if(arguments.length>1)for(var R=1;R<arguments.length;R++)_[R-1]=arguments[R];d.push(new I(C,_)),d.length!==1||c||a(g)},I.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=h,o.addListener=h,o.once=h,o.off=h,o.removeListener=h,o.removeAllListeners=h,o.emit=h,o.prependListener=h,o.prependOnceListener=h,o.listeners=function(C){return[]},o.binding=function(C){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(C){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}}])}));var Y7e=It.exports.SEMVER_SPEC_VERSION,Z7e=It.exports.parse,$q=It.exports.valid,e6e=It.exports.coerce,t6e=It.exports.clean,n6e=It.exports.inc,o6e=It.exports.major,r6e=It.exports.minor,i6e=It.exports.patch,s6e=It.exports.prerelease,a6e=It.exports.gt,l6e=It.exports.gte,d6e=It.exports.lt,c6e=It.exports.lte,u6e=It.exports.eq,p6e=It.exports.neq,m6e=It.exports.cmp,f6e=It.exports.compare,g6e=It.exports.rcompare,h6e=It.exports.compareIdentifiers,v6e=It.exports.rcompareIdentifiers,b6e=It.exports.compareBuild,I6e=It.exports.sort,y6e=It.exports.rsort,E6e=It.exports.diff,S6e=It.exports.validRange,x6e=It.exports.satisfies,C6e=It.exports.maxSatisfying,T6e=It.exports.minSatisfying,_6e=It.exports.minVersion,P6e=It.exports.gtr,D6e=It.exports.ltr,w6e=It.exports.outside,R6e=It.exports.intersects,k6e=It.exports.SemVer,A6e=It.exports.Comparator,O6e=It.exports.Range;var b5=/^(\^|>=)?((\d+)|x)\.((\d+)|x)\.((\d+)|x)(\-.*)?$/,zq=/^-(\d{4})(\d{2})(\d{2})(\d{2})?(\d{2})?$/;function qq(r){return r=r.trim(),r==="*"||b5.test(r)}function WM(r){if(!qq(r))return null;if(r=r.trim(),r==="*")return{hasCaret:!1,hasGreaterEquals:!1,majorBase:0,majorMustEqual:!1,minorBase:0,minorMustEqual:!1,patchBase:0,patchMustEqual:!1,preRelease:null};let t=r.match(b5);return t?{hasCaret:t[1]==="^",hasGreaterEquals:t[1]===">=",majorBase:t[2]==="x"?0:parseInt(t[2],10),majorMustEqual:t[2]!=="x",minorBase:t[4]==="x"?0:parseInt(t[4],10),minorMustEqual:t[4]!=="x",patchBase:t[6]==="x"?0:parseInt(t[6],10),patchMustEqual:t[6]!=="x",preRelease:t[8]||null}:null}function $M(r){if(!r)return null;let t=r.majorBase,e=r.majorMustEqual,n=r.minorBase,o=r.minorMustEqual,i=r.patchBase,s=r.patchMustEqual;r.hasCaret&&(t===0||(o=!1),s=!1);let a=0;if(r.preRelease){let l=zq.exec(r.preRelease);if(l){let[,d,c,u,f,g]=l;a=Date.UTC(Number(d),Number(c)-1,Number(u),Number(f)||0,Number(g)||0)}}return{majorBase:t,majorMustEqual:e,minorBase:n,minorMustEqual:o,patchBase:i,patchMustEqual:s,isMinimum:r.hasGreaterEquals,notBefore:a}}var GM=class{constructor(){this.buffers=[]}add(t){let e=this.buffers.indexOf(t);return e<0&&(e=this.buffers.length,this.buffers.push(t)),e}};function I5(r,t){if(t.serializeBuffersForPostMessage){let e=new GM,o=JSON.stringify(r,(s,a)=>{if(a instanceof ArrayBuffer)return{$$vscode_array_buffer_reference$$:!0,index:e.add(a)};if(ArrayBuffer.isView(a)){let l=Kq(a);if(l)return{$$vscode_array_buffer_reference$$:!0,index:e.add(a.buffer),view:{type:l,byteLength:a.byteLength,byteOffset:a.byteOffset}}}return a}),i=e.buffers.map(s=>{let a=new Uint8Array(s);return ce.wrap(a)});return{message:o,buffers:i}}else return{message:JSON.stringify(r),buffers:[]}}function Kq(r){switch(r.constructor.name){case"Int8Array":return 1;case"Uint8Array":return 2;case"Uint8ClampedArray":return 3;case"Int16Array":return 4;case"Uint16Array":return 5;case"Int32Array":return 6;case"Uint32Array":return 7;case"Float32Array":return 8;case"Float64Array":return 9;case"BigInt64Array":return 10;case"BigUint64Array":return 11}}function y5(r,t){let e=t.map(i=>{let s=new ArrayBuffer(i.byteLength);return new Uint8Array(s).set(i.buffer),s}),n=t.length?(i,s)=>{if(s&&typeof s=="object"&&s.$$vscode_array_buffer_reference$$){let a=s,{index:l}=a,d=e[l];if(a.view)switch(a.view.type){case 1:return new Int8Array(d,a.view.byteOffset,a.view.byteLength/Int8Array.BYTES_PER_ELEMENT);case 2:return new Uint8Array(d,a.view.byteOffset,a.view.byteLength/Uint8Array.BYTES_PER_ELEMENT);case 3:return new Uint8ClampedArray(d,a.view.byteOffset,a.view.byteLength/Uint8ClampedArray.BYTES_PER_ELEMENT);case 4:return new Int16Array(d,a.view.byteOffset,a.view.byteLength/Int16Array.BYTES_PER_ELEMENT);case 5:return new Uint16Array(d,a.view.byteOffset,a.view.byteLength/Uint16Array.BYTES_PER_ELEMENT);case 6:return new Int32Array(d,a.view.byteOffset,a.view.byteLength/Int32Array.BYTES_PER_ELEMENT);case 7:return new Uint32Array(d,a.view.byteOffset,a.view.byteLength/Uint32Array.BYTES_PER_ELEMENT);case 8:return new Float32Array(d,a.view.byteOffset,a.view.byteLength/Float32Array.BYTES_PER_ELEMENT);case 9:return new Float64Array(d,a.view.byteOffset,a.view.byteLength/Float64Array.BYTES_PER_ELEMENT);case 10:return new BigInt64Array(d,a.view.byteOffset,a.view.byteLength/BigInt64Array.BYTES_PER_ELEMENT);case 11:return new BigUint64Array(d,a.view.byteOffset,a.view.byteLength/BigUint64Array.BYTES_PER_ELEMENT);default:throw new Error("Unknown array buffer view type")}return d}return s}:void 0;return{message:JSON.parse(r,n),arrayBuffers:e}}var zM=class{constructor(t,e,n,o,i,s,a){this.#l="";this.#d=!1;this.#c=!1;this._onMessageEmitter=new D;this.onDidReceiveMessage=this._onMessageEmitter.event;this.#p=new D;this._onDidDispose=this.#p.event;this.#e=t,this.#t=e,this.#a=n,this.#o=o,this.#s=i,this.#i=s,this.#r=la(s),this.#u=Jq(s),this.#n=a}#e;#t;#n;#o;#s;#i;#l;#a;#d;#c;#r;#u;#p;dispose(){this.#d=!0,this.#p.fire(),this.#p.dispose(),this._onMessageEmitter.dispose()}asWebviewUri(t){return this.#c=!0,Wl(t,this.#o)}get cspSource(){let t=this.#i.extensionLocation;if(t.scheme===X.https||t.scheme===X.http){let e=t.toString();return e.endsWith("/")||(e+="/"),e+" "+$h}return $h}get html(){return this.assertNotDisposed(),this.#l}set html(t){this.assertNotDisposed(),this.#l!==t&&(this.#l=t,this.#u&&!this.#c&&/(["'])vscode-resource:([^\s'"]+?)(["'])/i.test(t)&&(this.#c=!0,this.#n.report("Webview vscode-resource: uris",this.#i,"Please migrate to use the 'webview.asWebviewUri' api instead: https://aka.ms/vscode-webview-use-aswebviewuri")),this.#t.$setHtml(this.#e,this.rewriteOldResourceUrlsIfNeeded(t)))}get options(){return this.assertNotDisposed(),this.#a}set options(t){this.assertNotDisposed(),Xt(this.#a,t)||this.#t.$setOptions(this.#e,qM(this.#i,this.#s,t)),this.#a=t}async postMessage(t){if(this.#d)return!1;let e=I5(t,{serializeBuffersForPostMessage:this.#r});return this.#t.$postMessage(this.#e,e.message,...e.buffers)}assertNotDisposed(){if(this.#d)throw new Error("Webview is disposed")}rewriteOldResourceUrlsIfNeeded(t){if(!this.#u)return t;let e=this.#i.extensionLocation?.scheme===X.vscodeRemote,n=this.#i.extensionLocation.scheme===X.vscodeRemote?this.#i.extensionLocation.authority:void 0;return t.replace(/(["'])(?:vscode-resource):(\/\/([^\s\/'"]+?)(?=\/))?([^\s'"]+?)(["'])/gi,(o,i,s,a,l,d)=>{let c=E.from({scheme:a||"file",path:decodeURIComponent(l)}),u=Wl(c,{isRemote:e,authority:n}).toString();return`${i}${u}${d}`}).replace(/(["'])(?:vscode-webview-resource):(\/\/[^\s\/'"]+\/([^\s\/'"]+?)(?=\/))?([^\s'"]+?)(["'])/gi,(o,i,s,a,l,d)=>{let c=E.from({scheme:a||"file",path:decodeURIComponent(l)}),u=Wl(c,{isRemote:e,authority:n}).toString();return`${i}${u}${d}`})}};function la(r){try{let t=$M(WM(r.engines.vscode));return!!t&&t.majorBase>=1&&t.minorBase>=57}catch{return!1}}function Jq(r){try{let t=$M(WM(r.engines.vscode));return t?t.majorBase<1||t.majorBase===1&&t.minorBase<60:!1}catch{return!1}}var aC=class extends K{constructor(e,n,o,i,s){super();this.remoteInfo=n;this.workspace=o;this._logService=i;this._deprecationService=s;this._webviews=new Map;this._webviewProxy=e.getProxy(V.MainThreadWebviews)}dispose(){super.dispose();for(let e of this._webviews.values())e.dispose();this._webviews.clear()}$onMessage(e,n,o){let i=this.getWebview(e);if(i){let{message:s}=y5(n,o.value);i._onMessageEmitter.fire(s)}}$onMissingCsp(e,n){this._logService.warn(`${n} created a webview without a content security policy: https://aka.ms/vscode-webview-missing-csp`)}createNewWebview(e,n,o){let i=new zM(e,this._webviewProxy,jq(n),this.remoteInfo,this.workspace,o,this._deprecationService);this._webviews.set(e,i);let s=i._onDidDispose(()=>{s.dispose(),this.deleteWebview(e)});return i}deleteWebview(e){this._webviews.delete(e)}getWebview(e){return this._webviews.get(e)}};function Tc(r){return{id:r.identifier,location:r.extensionLocation}}function qM(r,t,e){return{enableCommandUris:e.enableCommandUris,enableScripts:e.enableScripts,enableForms:e.enableForms,enableFullscreen:e.enableFullscreen,portMapping:e.portMapping,localResourceRoots:e.localResourceRoots||Qq(r,t)}}function jq(r){return{enableCommandUris:r.enableCommandUris,enableScripts:r.enableScripts,enableForms:r.enableForms,enableFullscreen:r.enableFullscreen,portMapping:r.portMapping,localResourceRoots:r.localResourceRoots?.map(t=>E.from(t))}}function Qq(r,t){return[...(t?.getWorkspaceFolders()||[]).map(e=>e.uri),r.extensionLocation]}var wo=class r{constructor(t){this.id=t;this._data=new Map;this._idPool=1}static{this.enableDebugLogging=!1}add(t){let e=this._idPool++;return this._data.set(e,t),this.logDebugInfo(),e}get(t,e){return this._data.has(t)?this._data.get(t)[e]:void 0}delete(t){this._data.delete(t),this.logDebugInfo()}logDebugInfo(){r.enableDebugLogging&&console.log(`${this.id} cache size - ${this._data.size}`)}};var KM=class{constructor(t,e){this.document=t;this._storagePath=e;this._backupCounter=1;this._edits=new wo("custom documents")}addEdit(t){return this._edits.add([t])}async undo(t,e){await this.getEdit(t).undo(),e||this.disposeBackup()}async redo(t,e){await this.getEdit(t).redo(),e||this.disposeBackup()}disposeEdits(t){for(let e of t)this._edits.delete(e)}getNewBackupUri(){if(!this._storagePath)throw new Error("Backup requires a valid storage path");let t=Zq(this.document.uri)+this._backupCounter++;return Qt(this._storagePath,t)}updateBackup(t){this._backup?.delete(),this._backup=t}disposeBackup(){this._backup?.delete(),this._backup=void 0}getEdit(t){let e=this._edits.get(t,0);if(!e)throw new Error("No edit found");return e}},JM=class{constructor(){this._documents=new Map}get(t,e){return this._documents.get(this.key(t,e))}add(t,e,n){let o=this.key(t,e.uri);if(this._documents.has(o))throw new Error(`Document already exists for viewType:${t} resource:${e.uri}`);let i=new KM(e,n);return this._documents.set(o,i),i}delete(t,e){let n=this.key(t,e);this._documents.delete(n)}key(t,e){return`${t}@@@${e}`}};var jM=class{constructor(){this._providers=new Map}addTextProvider(t,e,n){return this.add(t,{type:0,extension:e,provider:n})}addCustomProvider(t,e,n){return this.add(t,{type:1,extension:e,provider:n})}get(t){return this._providers.get(t)}add(t,e){if(this._providers.has(t))throw new Error(`Provider for viewType:${t} already registered`);return this._providers.set(t,e),new Ce(()=>this._providers.delete(t))}},dC=class{constructor(t,e,n,o,i){this._extHostDocuments=e;this._extensionStoragePaths=n;this._extHostWebview=o;this._extHostWebviewPanels=i;this._editorProviders=new jM;this._documents=new JM;this._proxy=t.getProxy(V.MainThreadCustomEditors)}registerCustomEditorProvider(t,e,n,o){let i=new te;return Xq(n)?(i.add(this._editorProviders.addTextProvider(e,t,n)),this._proxy.$registerTextEditorProvider(Tc(t),e,o.webviewOptions||{},{supportsMove:!!n.moveCustomTextEditor},la(t))):(i.add(this._editorProviders.addCustomProvider(e,t,n)),lC(n)&&i.add(n.onDidChangeCustomDocument(s=>{let a=this.getCustomDocumentEntry(e,s.document.uri);if(Yq(s)){let l=a.addEdit(s);this._proxy.$onDidEdit(s.document.uri,e,l,s.label)}else this._proxy.$onContentChange(s.document.uri,e)})),this._proxy.$registerCustomEditorProvider(Tc(t),e,o.webviewOptions||{},!!o.supportsMultipleEditorsPerDocument,la(t))),Ce.from(i,new Ce(()=>{this._proxy.$unregisterEditorProvider(e)}))}async $createCustomDocument(t,e,n,o,i){let s=this._editorProviders.get(e);if(!s)throw new Error(`No provider found for '${e}'`);if(s.type!==1)throw new Error(`Invalid provide type for '${e}'`);let a=E.revive(t),l=await s.provider.openCustomDocument(a,{backupId:n,untitledDocumentData:o?.buffer},i),d;return lC(s.provider)&&this._extensionStoragePaths&&(d=this._extensionStoragePaths.workspaceValue(s.extension)??this._extensionStoragePaths.globalValue(s.extension)),this._documents.add(e,l,d),{editable:lC(s.provider)}}async $disposeCustomDocument(t,e){let n=this._editorProviders.get(e);if(!n)throw new Error(`No provider found for '${e}'`);if(n.type!==1)throw new Error(`Invalid provider type for '${e}'`);let o=E.revive(t),{document:i}=this.getCustomDocumentEntry(e,o);this._documents.delete(e,o),i.dispose()}async $resolveCustomEditor(t,e,n,o,i,s){let a=this._editorProviders.get(n);if(!a)throw new Error(`No provider found for '${n}'`);let l=Vt.to(i),d=this._extHostWebview.createNewWebview(e,o.contentOptions,a.extension),c=this._extHostWebviewPanels.createNewWebviewPanel(e,n,o.title,l,o.options,d,o.active),u=E.revive(t);switch(a.type){case 1:{let{document:f}=this.getCustomDocumentEntry(n,u);return a.provider.resolveCustomEditor(f,c,s)}case 0:{let f=this._extHostDocuments.getDocument(u);return a.provider.resolveCustomTextEditor(f,c,s)}default:throw new Error("Unknown webview provider type")}}$disposeEdits(t,e,n){this.getCustomDocumentEntry(e,t).disposeEdits(n)}async $onMoveCustomEditor(t,e,n){let o=this._editorProviders.get(n);if(!o)throw new Error(`No provider found for '${n}'`);if(!o.provider.moveCustomTextEditor)throw new Error(`Provider does not implement move '${n}'`);let i=this._extHostWebviewPanels.getWebviewPanel(t);if(!i)throw new Error("No webview found");let s=E.revive(e),a=this._extHostDocuments.getDocument(s);await o.provider.moveCustomTextEditor(a,i,De.None)}async $undo(t,e,n,o){return this.getCustomDocumentEntry(e,t).undo(n,o)}async $redo(t,e,n,o){return this.getCustomDocumentEntry(e,t).redo(n,o)}async $revert(t,e,n){let o=this.getCustomDocumentEntry(e,t);await this.getCustomEditorProvider(e).revertCustomDocument(o.document,n),o.disposeBackup()}async $onSave(t,e,n){let o=this.getCustomDocumentEntry(e,t);await this.getCustomEditorProvider(e).saveCustomDocument(o.document,n),o.disposeBackup()}async $onSaveAs(t,e,n,o){let i=this.getCustomDocumentEntry(e,t);return this.getCustomEditorProvider(e).saveCustomDocumentAs(i.document,E.revive(n),o)}async $backup(t,e,n){let o=this.getCustomDocumentEntry(e,t),s=await this.getCustomEditorProvider(e).backupCustomDocument(o.document,{destination:o.getNewBackupUri()},n);return o.updateBackup(s),s.id}getCustomDocumentEntry(t,e){let n=this._documents.get(t,E.revive(e));if(!n)throw new Error("No custom document found");return n}getCustomEditorProvider(t){let n=this._editorProviders.get(t)?.provider;if(!n||!lC(n))throw new Error("Custom document is not editable");return n}};function lC(r){return!!r.onDidChangeCustomDocument}function Xq(r){return typeof r.resolveCustomTextEditor=="function"}function Yq(r){return typeof r.undo=="function"&&typeof r.redo=="function"}function Zq(r){let t=r.scheme===X.file||r.scheme===X.untitled?r.fsPath:r.toString();return zr(t)+""}var cC=class r{constructor(t,e,n,o,i,s,a,l){this._name=t;this._owner=e;this._maxDiagnosticsTotal=n;this._maxDiagnosticsPerFile=o;this._modelVersionIdProvider=i;this._isDisposed=!1;this._maxDiagnosticsTotal=Math.max(o,n),this.#n=new et(d=>s.getComparisonKey(d)),this.#e=a,this.#t=l}#e;#t;#n;dispose(){this._isDisposed||(this.#t.fire([...this.#n.keys()]),this.#e?.$clear(this._owner),this.#n.clear(),this._isDisposed=!0)}get name(){return this._checkDisposed(),this._name}set(t,e){if(!t){this.clear();return}this._checkDisposed();let n=[];if(E.isUri(t)){if(!e){this.delete(t);return}this.#n.set(t,pt(e)),n=[t]}else if(Array.isArray(t)){n=[];let s;t=[...t].sort(r._compareIndexedTuplesByUri);for(let a of t){let[l,d]=a;if((!s||l.toString()!==s.toString())&&(s&&this.#n.get(s).length===0&&this.#n.delete(s),s=l,n.push(l),this.#n.set(l,[])),d)this.#n.get(l)?.push(...pt(d));else{let c=this.#n.get(l);c&&(c.length=0)}}}if(this.#t.fire(n),!this.#e)return;let o=[],i=0;for(let s of n){let a=[],l=this.#n.get(s);if(l)if(l.length>this._maxDiagnosticsPerFile){a=[];let d=[0,1,2,3];e:for(let c=0;c<4;c++)for(let u of l)if(u.severity===d[c]&&a.push({...Ys.from(u),modelVersionId:this._modelVersionIdProvider(s)})===this._maxDiagnosticsPerFile)break e;a.push({severity:2,message:p(3196,null,l.length-this._maxDiagnosticsPerFile),startLineNumber:a[a.length-1].startLineNumber,startColumn:a[a.length-1].startColumn,endLineNumber:a[a.length-1].endLineNumber,endColumn:a[a.length-1].endColumn})}else a=l.map(d=>({...Ys.from(d),modelVersionId:this._modelVersionIdProvider(s)}));if(o.push([s,a]),i+=a.length,i>this._maxDiagnosticsTotal)break}this.#e.$changeMany(this._owner,o)}delete(t){this._checkDisposed(),this.#t.fire([t]),this.#n.delete(t),this.#e?.$changeMany(this._owner,[[t,void 0]])}clear(){this._checkDisposed(),this.#t.fire([...this.#n.keys()]),this.#n.clear(),this.#e?.$clear(this._owner)}forEach(t,e){this._checkDisposed();for(let[n,o]of this)t.call(e,n,o,this)}*[Symbol.iterator](){this._checkDisposed();for(let t of this.#n.keys())yield[t,this.get(t)]}get(t){this._checkDisposed();let e=this.#n.get(t);return Array.isArray(e)?Object.freeze(e.slice(0)):[]}has(t){return this._checkDisposed(),Array.isArray(this.#n.get(t))}_checkDisposed(){if(this._isDisposed)throw new Error("illegal state - object is disposed")}static _compareIndexedTuplesByUri(t,e){return t[0].toString()<e[0].toString()?-1:t[0].toString()>e[0].toString()?1:0}},Or=class{constructor(t,e,n,o){this._logService=e;this._fileSystemInfoService=n;this._extHostDocumentsAndEditors=o;this._collections=new Map;this._onDidChangeDiagnostics=new Tv({merge:t=>t.flat(),delay:50});this.onDidChangeDiagnostics=He.map(this._onDidChangeDiagnostics.event,Or._mapper);this._proxy=t.getProxy(V.MainThreadDiagnostics)}static{this._idPool=0}static{this._maxDiagnosticsPerFile=1e3}static{this._maxDiagnosticsTotal=1.1*this._maxDiagnosticsPerFile}static _mapper(t){let e=new et;for(let n of t)e.set(n,n);return{uris:Object.freeze(Array.from(e.values()))}}createDiagnosticCollection(t,e){let{_collections:n,_proxy:o,_onDidChangeDiagnostics:i,_logService:s,_fileSystemInfoService:a,_extHostDocumentsAndEditors:l}=this,d=new class{$changeMany(f,g){o.$changeMany(f,g),s.trace("[DiagnosticCollection] change many (extension, owner, uris)",t.value,f,g.length===0?"CLEARING":g)}$clear(f){o.$clear(f),s.trace("[DiagnosticCollection] remove all (extension, owner)",t.value,f)}$getDiagnosticsWithFixes(f,g){return o.$getDiagnosticsWithFixes(f,g)}$clearCodeActions(){o.$clearCodeActions()}$applyCodeAction(f){o.$applyCodeAction(f)}dispose(){o.dispose()}},c;if(!e)e="_generated_diagnostic_collection_name_#"+Or._idPool++,c=e;else if(!n.has(e))c=e;else{this._logService.warn(`DiagnosticCollection with name '${e}' does already exist.`);do c=e+Or._idPool++;while(n.has(c))}return new class extends cC{constructor(){super(e,c,Or._maxDiagnosticsTotal,Or._maxDiagnosticsPerFile,f=>l.getDocument(f)?.version,a.extUri,d,i),n.set(c,this)}dispose(){super.dispose(),n.delete(c)}}}getDiagnostics(t){if(t)return this._getDiagnostics(t);{let e=new Map,n=[];for(let o of this._collections.values())o.forEach((i,s)=>{let a=e.get(i.toString());typeof a>"u"&&(a=n.length,e.set(i.toString(),a),n.push([i,[]])),n[a][1]=n[a][1].concat(...s)});return n}}async getDiagnosticsWithFixes(t){if(t){let e=this._getDiagnostics(t);return this._getFixesForDiagnostics(t,e)}else{let e=this.getDiagnostics(),n=[];for(let[o,i]of e){let s=await this._getFixesForDiagnostics(o,i);n.push([o,s])}return n}}_getDiagnostics(t){let e=[];for(let n of this._collections.values())n.has(t)&&(e=e.concat(n.get(t)));return e}async _getFixesForDiagnostics(t,e){let n=[];this._proxy.$clearCodeActions();for(let o of e){let i=await this._proxy.$getDiagnosticsWithFixes(t,j.from(o.range));n.push({diagnostic:o,fixes:i??[]})}return n}applyCodeAction(t){this._proxy.$applyCodeAction(t)}clearCodeActions(){this._proxy.$clearCodeActions()}$acceptMarkersChange(t){if(!this._mirrorCollection){let e="_generated_mirror",n=new cC(e,e,Number.MAX_SAFE_INTEGER,Number.MAX_SAFE_INTEGER,o=>{},this._fileSystemInfoService.extUri,void 0,this._onDidChangeDiagnostics);this._collections.set(e,n),this._mirrorCollection=n}for(let[e,n]of t)this._mirrorCollection.set(E.revive(e),n.map(Ys.to))}};Or=L([P(1,be),P(2,Er)],Or);var uC=class{constructor(t){this._proxy=t.getProxy(V.MainThreadDialogs)}showOpenDialog(t){return this._proxy.$showOpenDialog(t).then(e=>e?e.map(n=>E.revive(n)):void 0)}showSaveDialog(t){return this._proxy.$showSaveDialog(t).then(e=>e?E.revive(e):void 0)}};var pC=class r{constructor(t,e,n){this._documentsAndEditors=e;this._logService=n;this._documentContentProviders=new Map;this._proxy=t.getProxy(V.MainThreadDocumentContentProviders)}static{this._handlePool=0}registerTextDocumentContentProvider(t,e){if(Object.keys(X).indexOf(t)>=0)throw new Error(`scheme '${t}' already registered`);let n=r._handlePool++;this._documentContentProviders.set(n,e),this._proxy.$registerTextContentProvider(n,t);let o;if(typeof e.onDidChange=="function"){let i;o=e.onDidChange(async s=>{if(s.scheme!==t){this._logService.warn(`Provider for scheme '${t}' is firing event for schema '${s.scheme}' which will be IGNORED`);return}if(!this._documentsAndEditors.getDocument(s))return;i&&await i;let a=this.$provideTextDocumentContent(n,s).then(async l=>{if(!l&&typeof l!="string")return;let d=this._documentsAndEditors.getDocument(s);if(!d)return;let c=Wv(l);if(!d.equalLines(c))return this._proxy.$onVirtualDocumentChange(s,l)}).catch(Ct).finally(()=>{i===a&&(i=void 0)});i=a})}return new Ce(()=>{this._documentContentProviders.delete(n)&&this._proxy.$unregisterTextContentProvider(n),o&&(o.dispose(),o=void 0)})}$provideTextDocumentContent(t,e){let n=this._documentContentProviders.get(t);return n?Promise.resolve(n.provideTextDocumentContent(E.revive(e),De.None)):Promise.reject(new Error(`unsupported uri-scheme: ${e.scheme}`))}};var mC=class{constructor(t,e,n,o={timeout:1500,errors:3}){this._logService=t;this._documents=e;this._mainThreadBulkEdits=n;this._thresholds=o;this._callbacks=new co;this._badListeners=new WeakMap}dispose(){this._callbacks.clear()}getOnWillSaveTextDocumentEvent(t){return(e,n,o)=>{let s={dispose:this._callbacks.push([e,n,t])};return Array.isArray(o)&&o.push(s),s}}async $participateInSave(t,e){let n=E.revive(t),o=!1,i=setTimeout(()=>o=!0,this._thresholds.timeout),s=[];try{for(let a of[...this._callbacks]){if(o)break;let l=this._documents.getDocument(n),d=await this._deliverEventAsyncAndBlameBadListeners(a,{document:l,reason:Yg.to(e)});s.push(d)}}finally{clearTimeout(i)}return s}_deliverEventAsyncAndBlameBadListeners([t,e,n],o){let i=this._badListeners.get(t);return typeof i=="number"&&i>this._thresholds.errors?Promise.resolve(!1):this._deliverEventAsync(n,t,e,o).then(()=>!0,s=>{if(this._logService.error(`onWillSaveTextDocument-listener from extension '${n.identifier.value}' threw ERROR`),this._logService.error(s),!(s instanceof Error)||s.message!=="concurrent_edits"){let a=this._badListeners.get(t);this._badListeners.set(t,a?a+1:1),typeof a=="number"&&a>this._thresholds.errors&&this._logService.info(`onWillSaveTextDocument-listener from extension '${n.identifier.value}' will now be IGNORED because of timeouts and/or errors`)}return!1})}_deliverEventAsync(t,e,n,o){let i=[],s=Date.now(),{document:a,reason:l}=o,{version:d}=a,c=Object.freeze({document:a,reason:l,waitUntil(u){if(Object.isFrozen(i))throw Hc("waitUntil can not be called async");i.push(Promise.resolve(u))}});try{e.apply(n,[c])}catch(u){return Promise.reject(u)}return Object.freeze(i),new Promise((u,f)=>{let g=setTimeout(()=>f(new Error("timeout")),this._thresholds.timeout);return Promise.all(i).then(I=>{this._logService.debug(`onWillSaveTextDocument-listener from extension '${t.identifier.value}' finished after ${Date.now()-s}ms`),clearTimeout(g),u(I)}).catch(I=>{clearTimeout(g),f(I)})}).then(u=>{let f={edits:[]};for(let g of u)if(Array.isArray(g)&&g.every(I=>I instanceof Tn))for(let{newText:I,newEol:h,range:C}of g)f.edits.push({resource:a.uri,versionId:void 0,textEdit:{range:C&&j.from(C),text:I,eol:h&&oc.from(h)}});if(f.edits.length!==0)return d===a.version?this._mainThreadBulkEdits.$tryApplyWorkspaceEdit(new Wt(f)):Promise.reject(new Error("concurrent_edits"))})}};var fC=class{constructor(t,e){this._toDispose=new te;this._onDidAddDocument=this._toDispose.add(new D);this._onDidRemoveDocument=this._toDispose.add(new D);this._onDidChangeDocument=this._toDispose.add(new D);this._onDidChangeDocumentWithReason=this._toDispose.add(new D);this._onDidSaveDocument=this._toDispose.add(new D);this.onDidAddDocument=this._onDidAddDocument.event;this.onDidRemoveDocument=this._onDidRemoveDocument.event;this.onDidChangeDocument=this._onDidChangeDocument.event;this.onDidChangeDocumentWithReason=this._onDidChangeDocumentWithReason.event;this.onDidSaveDocument=this._onDidSaveDocument.event;this._documentLoader=new Map;this._proxy=t.getProxy(V.MainThreadDocuments),this._documentsAndEditors=e,this._documentsAndEditors.onDidRemoveDocuments(n=>{for(let o of n)this._onDidRemoveDocument.fire(o.document)},void 0,this._toDispose),this._documentsAndEditors.onDidAddDocuments(n=>{for(let o of n)this._onDidAddDocument.fire(o.document)},void 0,this._toDispose)}dispose(){this._toDispose.dispose()}getAllDocumentData(){return[...this._documentsAndEditors.allDocuments()]}getDocumentData(t){if(!t)return;let e=this._documentsAndEditors.getDocument(t);if(e)return e}getDocument(t){let e=this.getDocumentData(t);if(!e?.document)throw new Error(`Unable to retrieve document from URI '${t}'`);return e.document}ensureDocumentData(t,e){let n=this._documentsAndEditors.getDocument(t);if(n&&(!e?.encoding||n.document.encoding===e.encoding))return Promise.resolve(n);let o=this._documentLoader.get(t.toString());return o?e?.encoding&&(o=o.then(i=>i.document.encoding!==e.encoding?this.ensureDocumentData(t,e):i)):(o=this._proxy.$tryOpenDocument(t,e).then(i=>{this._documentLoader.delete(t.toString());let s=E.revive(i);return Ur(this._documentsAndEditors.getDocument(s))},i=>(this._documentLoader.delete(t.toString()),Promise.reject(i))),this._documentLoader.set(t.toString(),o)),o}createDocumentData(t){return this._proxy.$tryCreateDocument(t).then(e=>E.revive(e))}$acceptModelLanguageChanged(t,e){let n=E.revive(t),o=this._documentsAndEditors.getDocument(n);if(!o)throw new Error("unknown document");this._onDidRemoveDocument.fire(o.document),o._acceptLanguageId(e),this._onDidAddDocument.fire(o.document)}$acceptModelSaved(t){let e=E.revive(t),n=this._documentsAndEditors.getDocument(e);if(!n)throw new Error("unknown document");this.$acceptDirtyStateChanged(t,!1),this._onDidSaveDocument.fire(n.document)}$acceptDirtyStateChanged(t,e){let n=E.revive(t),o=this._documentsAndEditors.getDocument(n);if(!o)throw new Error("unknown document");o._acceptIsDirty(e),this._onDidChangeDocument.fire({document:o.document,contentChanges:[],reason:void 0}),this._onDidChangeDocumentWithReason.fire({document:o.document,contentChanges:[],reason:void 0,detailedReason:void 0})}$acceptEncodingChanged(t,e){let n=E.revive(t),o=this._documentsAndEditors.getDocument(n);if(!o)throw new Error("unknown document");o._acceptEncoding(e),this._onDidChangeDocument.fire({document:o.document,contentChanges:[],reason:void 0}),this._onDidChangeDocumentWithReason.fire({document:o.document,contentChanges:[],reason:void 0,detailedReason:void 0})}$acceptModelChanged(t,e,n){let o=E.revive(t),i=this._documentsAndEditors.getDocument(o);if(!i)throw new Error("unknown document");i._acceptIsDirty(n),i.onEvents(e);let s;e.isUndoing?s=1:e.isRedoing&&(s=2),this._onDidChangeDocument.fire(jf({document:i.document,contentChanges:e.changes.map(a=>({range:j.to(a.range),rangeOffset:a.rangeOffset,rangeLength:a.rangeLength,text:a.text})),reason:s})),this._onDidChangeDocumentWithReason.fire(jf({document:i.document,contentChanges:e.changes.map(a=>({range:j.to(a.range),rangeOffset:a.rangeOffset,rangeLength:a.rangeLength,text:a.text})),reason:s,detailedReason:e.detailedReason?{source:e.detailedReason.source,metadata:e.detailedReason}:void 0}))}setWordDefinitionFor(t,e){zW(t,e)}};var gC=class{constructor(t){this._provider=new Map;this._onDidChange=new D;this.onDidChange=this._onDidChange.event;this._allKnownModels=new Set;this._handlePool=0;this._proxy=t.getProxy(V.MainThreadEmbeddings)}registerEmbeddingsProvider(t,e,n){if(this._allKnownModels.has(e))throw new Error("An embeddings provider for this model is already registered");let o=this._handlePool++;return this._proxy.$registerEmbeddingProvider(o,e),this._provider.set(o,{id:e,provider:n}),ae(()=>{this._allKnownModels.delete(e),this._proxy.$unregisterEmbeddingProvider(o),this._provider.delete(o)})}async computeEmbeddings(t,e,n){n??=De.None;let o=!1;typeof e=="string"&&(e=[e],o=!0);let i=await this._proxy.$computeEmbeddings(t,e,n);if(i.length!==e.length)throw new Error;if(o){if(i.length!==1)throw new Error;return i[0]}return i}async $provideEmbeddings(t,e,n){let o=this._provider.get(t);if(!o)return[];let i=await o.provider.provideEmbeddings(e,n);return i||[]}get embeddingsModels(){return Array.from(this._allKnownModels)}$acceptEmbeddingModels(t){this._allKnownModels=new Set(t),this._onDidChange.fire()}};var hC=class{constructor(t){this._AiEmbeddingVectorProviders=new Map;this._nextHandle=0;this._proxy=t.getProxy(V.MainThreadAiEmbeddingVector)}async $provideAiEmbeddingVector(t,e,n){if(this._AiEmbeddingVectorProviders.size===0)throw new Error("No embedding vector providers registered");let o=this._AiEmbeddingVectorProviders.get(t);if(!o)throw new Error("Embedding vector provider not found");let i=await o.provideEmbeddingVector(e,n);if(!i)throw new Error("Embedding vector provider returned undefined");return i}registerEmbeddingVectorProvider(t,e,n){let o=this._nextHandle;return this._nextHandle++,this._AiEmbeddingVectorProviders.set(o,n),this._proxy.$registerAiEmbeddingVectorProvider(e,o),new Ce(()=>{this._proxy.$unregisterAiEmbeddingVectorProvider(o),this._AiEmbeddingVectorProviders.delete(o)})}};var XM=class{constructor(t,e,n){let o=new Uint8Array(t*e);for(let i=0,s=t*e;i<s;i++)o[i]=n;this._data=o,this.rows=t,this.cols=e}get(t,e){return this._data[t*this.cols+e]}set(t,e,n){this._data[t*this.cols+e]=n}},zh=class{constructor(t){let e=0,n=0;for(let i=0,s=t.length;i<s;i++){let[a,l,d]=t[i];l>e&&(e=l),a>n&&(n=a),d>n&&(n=d)}e++,n++;let o=new XM(n,e,0);for(let i=0,s=t.length;i<s;i++){let[a,l,d]=t[i];o.set(a,l,d)}this._states=o,this._maxCharCode=e}nextState(t,e){return e<0||e>=this._maxCharCode?0:this._states.get(t,e)}},QM=null;function eK(){return QM===null&&(QM=new zh([[1,104,2],[1,72,2],[1,102,6],[1,70,6],[2,116,3],[2,84,3],[3,116,4],[3,84,4],[4,112,5],[4,80,5],[5,115,9],[5,83,9],[5,58,10],[6,105,7],[6,73,7],[7,108,8],[7,76,8],[8,101,9],[8,69,9],[9,58,10],[10,47,11],[11,47,12]])),QM}var Gh=null;function tK(){if(Gh===null){Gh=new Yp(0);let r=` 	<>'"\u3001\u3002\uFF61\uFF64\uFF0C\uFF0E\uFF1A\uFF1B\u2018\u3008\u300C\u300E\u3014\uFF08\uFF3B\uFF5B\uFF62\uFF63\uFF5D\uFF3D\uFF09\u3015\u300F\u300D\u3009\u2019\uFF40\uFF5E\u2026|`;for(let e=0;e<r.length;e++)Gh.set(r.charCodeAt(e),1);let t=".,;:";for(let e=0;e<t.length;e++)Gh.set(t.charCodeAt(e),2)}return Gh}var vC=class r{static _createLink(t,e,n,o,i){let s=i-1;do{let a=e.charCodeAt(s);if(t.get(a)!==2)break;s--}while(s>o);if(o>0){let a=e.charCodeAt(o-1),l=e.charCodeAt(s);(a===40&&l===41||a===91&&l===93||a===123&&l===125)&&s--}return{range:{startLineNumber:n,startColumn:o+1,endLineNumber:n,endColumn:s+2},url:e.substring(o,s+1)}}static computeLinks(t,e=eK()){let n=tK(),o=[];for(let i=1,s=t.getLineCount();i<=s;i++){let a=t.getLineContent(i),l=a.length,d=0,c=0,u=0,f=1,g=!1,I=!1,h=!1,C=!1;for(;d<l;){let _=!1,R=a.charCodeAt(d);if(f===13){let O;switch(R){case 40:g=!0,O=0;break;case 41:O=g?0:1;break;case 91:h=!0,I=!0,O=0;break;case 93:h=!1,O=I?0:1;break;case 123:C=!0,O=0;break;case 125:O=C?0:1;break;case 39:case 34:case 96:u===R?O=1:u===39||u===34||u===96?O=0:O=1;break;case 42:O=u===42?1:0;break;case 32:O=h?0:1;break;default:O=n.get(R)}O===1&&(o.push(r._createLink(n,a,i,c,d)),_=!0)}else if(f===12){let O;R===91?(I=!0,O=0):O=n.get(R),O===1?_=!0:f=13}else f=e.nextState(f,R),f===0&&(_=!0);_&&(f=1,g=!1,I=!1,C=!1,c=d+1,u=R),d++}f===13&&o.push(r._createLink(n,a,i,c,l))}return o}};var YM=class{constructor(){this._schemes=[]}add(t){this._stateMachine=void 0,this._schemes.push(t)}delete(t){let e=this._schemes.indexOf(t);e>=0&&(this._schemes.splice(e,1),this._stateMachine=void 0)}_initStateMachine(){if(!this._stateMachine){let t=this._schemes.sort(),e=[],n,o,i=14,s=14;for(let a of t){let l=n?xU(n,a):0;for(l===0?o=1:o=s;l<a.length;l++)l+1===a.length?(i=s,s=9):s+=1,e.push([o,a.toUpperCase().charCodeAt(l),s]),e.push([o,a.toLowerCase().charCodeAt(l),s]),o=s;n=a,s=i}e.push([9,58,10]),e.push([10,47,12]),this._stateMachine=new zh(e)}}provideDocumentLinks(t){this._initStateMachine();let e=[],n=vC.computeLinks({getLineContent(o){return t.lineAt(o-1).text},getLineCount(){return t.lineCount}},this._stateMachine);for(let o of n){let i=ea.to(o);i.target&&e.push(i)}return e}},bC=class r{constructor(t,e){this._extHostLanguageFeatures=e;this._linkProvider=new YM;this._fsProvider=new Map;this._registeredSchemes=new Set;this._watches=new Map;this._handlePool=0;this._proxy=t.getProxy(V.MainThreadFileSystem)}dispose(){this._linkProviderRegistration?.dispose()}registerFileSystemProvider(t,e,n,o={}){if(r._validateFileSystemProvider(n),this._registeredSchemes.has(e))throw new Error(`a provider for the scheme '${e}' is already registered`);this._linkProviderRegistration||(this._linkProviderRegistration=this._extHostLanguageFeatures.registerDocumentLinkProvider(t,"*",this._linkProvider));let i=this._handlePool++;this._linkProvider.add(e),this._registeredSchemes.add(e),this._fsProvider.set(i,n);let s=2;o.isCaseSensitive&&(s+=1024),o.isReadonly&&(s+=2048),typeof n.copy=="function"&&(s+=8),typeof n.open=="function"&&typeof n.close=="function"&&typeof n.read=="function"&&typeof n.write=="function"&&(H(t,"fsChunks"),s+=4);let a;o.isReadonly&&qr(o.isReadonly)&&o.isReadonly.value!==""&&(a={value:o.isReadonly.value,isTrusted:o.isReadonly.isTrusted,supportThemeIcons:o.isReadonly.supportThemeIcons,supportHtml:o.isReadonly.supportHtml,baseUri:o.isReadonly.baseUri,uris:o.isReadonly.uris}),this._proxy.$registerFileSystemProvider(i,e,s,a).catch(d=>{console.error(`FAILED to register filesystem provider of ${t.identifier.value}-extension for the scheme ${e}`),console.error(d)});let l=n.onDidChangeFile(d=>{let c=[];for(let u of d){let{uri:f,type:g}=u;if(f.scheme!==e)continue;let I;switch(g){case 1:I=0;break;case 2:I=1;break;case 3:I=2;break;default:throw new Error("Unknown FileChangeType")}c.push({resource:f,type:I})}this._proxy.$onFileSystemChange(i,c)});return ae(()=>{l.dispose(),this._linkProvider.delete(e),this._registeredSchemes.delete(e),this._fsProvider.delete(i),this._proxy.$unregisterProvider(i)})}static _validateFileSystemProvider(t){if(!t)throw new Error("MISSING provider");if(typeof t.watch!="function")throw new Error("Provider does NOT implement watch");if(typeof t.stat!="function")throw new Error("Provider does NOT implement stat");if(typeof t.readDirectory!="function")throw new Error("Provider does NOT implement readDirectory");if(typeof t.createDirectory!="function")throw new Error("Provider does NOT implement createDirectory");if(typeof t.readFile!="function")throw new Error("Provider does NOT implement readFile");if(typeof t.writeFile!="function")throw new Error("Provider does NOT implement writeFile");if(typeof t.delete!="function")throw new Error("Provider does NOT implement delete");if(typeof t.rename!="function")throw new Error("Provider does NOT implement rename")}static _asIStat(t){let{type:e,ctime:n,mtime:o,size:i,permissions:s}=t;return{type:e,ctime:n,mtime:o,size:i,permissions:s}}$stat(t,e){return Promise.resolve(this._getFsProvider(t).stat(E.revive(e))).then(n=>r._asIStat(n))}$readdir(t,e){return Promise.resolve(this._getFsProvider(t).readDirectory(E.revive(e)))}$readFile(t,e){return Promise.resolve(this._getFsProvider(t).readFile(E.revive(e))).then(n=>ce.wrap(n))}$writeFile(t,e,n,o){return Promise.resolve(this._getFsProvider(t).writeFile(E.revive(e),n.buffer,o))}$delete(t,e,n){return Promise.resolve(this._getFsProvider(t).delete(E.revive(e),n))}$rename(t,e,n,o){return Promise.resolve(this._getFsProvider(t).rename(E.revive(e),E.revive(n),o))}$copy(t,e,n,o){let i=this._getFsProvider(t);if(!i.copy)throw new Error('FileSystemProvider does not implement "copy"');return Promise.resolve(i.copy(E.revive(e),E.revive(n),o))}$mkdir(t,e){return Promise.resolve(this._getFsProvider(t).createDirectory(E.revive(e)))}$watch(t,e,n,o){let i=this._getFsProvider(t).watch(E.revive(n),o);this._watches.set(e,i)}$unwatch(t,e){let n=this._watches.get(e);n&&(n.dispose(),this._watches.delete(e))}$open(t,e,n){let o=this._getFsProvider(t);if(!o.open)throw new Error('FileSystemProvider does not implement "open"');return Promise.resolve(o.open(E.revive(e),n))}$close(t,e){let n=this._getFsProvider(t);if(!n.close)throw new Error('FileSystemProvider does not implement "close"');return Promise.resolve(n.close(e))}$read(t,e,n,o){let i=this._getFsProvider(t);if(!i.read)throw new Error('FileSystemProvider does not implement "read"');let s=ce.alloc(o);return Promise.resolve(i.read(e,n,s.buffer,0,o)).then(a=>s.slice(0,a))}$write(t,e,n,o){let i=this._getFsProvider(t);if(!i.write)throw new Error('FileSystemProvider does not implement "write"');return Promise.resolve(i.write(e,n,o.buffer,0,o.byteLength))}_getFsProvider(t){let e=this._fsProvider.get(t);if(!e){let n=new Error;throw n.name="ENOPRO",n.message="no provider",n}return e}};var E5=class r extends K{constructor(e,n,o,i){super();this.onFileChanges=e;this.onLogMessage=n;this.verboseLogging=o;this.options=i;this.watcherDisposables=this._register(new An);this.requests=void 0;this.restartCounter=0}static{this.MAX_RESTARTS=5}init(){let e=new te;this.watcherDisposables.value=e,this.watcher=this.createWatcher(e),this.watcher.setVerboseLogging(this.verboseLogging),e.add(this.watcher.onDidChangeFile(n=>this.onFileChanges(n))),e.add(this.watcher.onDidLogMessage(n=>this.onLogMessage(n))),e.add(this.watcher.onDidError(n=>this.onError(n.error,n.request)))}onError(e,n){this.canRestart(e,n)?this.restartCounter<r.MAX_RESTARTS&&this.requests?(this.error(`restarting watcher after unexpected error: ${e}`),this.restart(this.requests)):this.error(`gave up attempting to restart watcher after unexpected error: ${e}`):this.error(e)}canRestart(e,n){return!(!this.options.restartOnError||n||e.indexOf("No space left on device")!==-1||e.indexOf("EMFILE")!==-1)}restart(e){this.restartCounter++,this.init(),this.watch(e)}async watch(e){this.requests=e,await this.watcher?.watch(e)}async setVerboseLogging(e){this.verboseLogging=e,await this.watcher?.setVerboseLogging(e)}error(e){this.onLogMessage({type:"error",message:`[File Watcher (${this.options.type})] ${e}`})}trace(e){this.onLogMessage({type:"trace",message:`[File Watcher (${this.options.type})] ${e}`})}dispose(){return this.watcher=void 0,super.dispose()}};function S5(r,t){return typeof t=="string"&&!t.startsWith(ws)&&!fs(t)?{base:r,pattern:t}:t}var ZM=class{constructor(t,e,n,o,i,s,a,l){this.session=Math.random();this._onDidCreate=new D;this._onDidChange=new D;this._onDidDelete=new D;this._config=0,l.ignoreCreateEvents&&(this._config+=1),l.ignoreChangeEvents&&(this._config+=2),l.ignoreDeleteEvents&&(this._config+=4);let d=typeof a=="string"?!((n.getCapabilities(X.file)??0)&1024):n.extUri.ignorePathCasing(E.revive(a.baseUri)),c=ei(a,{ignoreCase:d}),u=typeof a=="string",f=!1,g=s(I=>{if(!(typeof I.session=="number"&&I.session!==this.session)&&!(f&&typeof I.session>"u")){if(!l.ignoreCreateEvents)for(let h of I.created){let C=E.revive(h);c(C.fsPath)&&(!u||o.getWorkspaceFolder(C))&&this._onDidCreate.fire(C)}if(!l.ignoreChangeEvents)for(let h of I.changed){let C=E.revive(h);c(C.fsPath)&&(!u||o.getWorkspaceFolder(C))&&this._onDidChange.fire(C)}if(!l.ignoreDeleteEvents)for(let h of I.deleted){let C=E.revive(h);c(C.fsPath)&&(!u||o.getWorkspaceFolder(C))&&this._onDidDelete.fire(C)}}});this._disposable=Ce.from(this.ensureWatching(t,o,e,i,a,l,!1),this._onDidCreate,this._onDidChange,this._onDidDelete,g)}get ignoreCreateEvents(){return!!(this._config&1)}get ignoreChangeEvents(){return!!(this._config&2)}get ignoreDeleteEvents(){return!!(this._config&4)}ensureWatching(t,e,n,o,i,s,a){let l=Ce.from();if(typeof i=="string"||s.ignoreChangeEvents&&s.ignoreCreateEvents&&s.ignoreDeleteEvents)return l;let d=t.getProxy(V.MainThreadFileSystemEventService),c=!1;(i.pattern.includes(ws)||i.pattern.includes(RI))&&(c=!0);let u=[],f,g;if(a)(s.ignoreChangeEvents||s.ignoreCreateEvents||s.ignoreDeleteEvents)&&(g=14,s.ignoreChangeEvents&&(g&=-3),s.ignoreCreateEvents&&(g&=-5),s.ignoreDeleteEvents&&(g&=-9));else if(c&&u.length===0){let I=e.getWorkspaceFolder(E.revive(i.baseUri)),h=n.getConfiguration("files",I).get("watcherExclude");if(h)for(let C in h)C&&h[C]===!0&&u.push(C)}else if(!c){let I=e.getWorkspaceFolder(E.revive(i.baseUri));if(I){let h=n.getConfiguration("files",I).get("watcherExclude");if(h){for(let C in h)if(C&&h[C]===!0){let _=`${ld(C,"/")}/${ws}`;f||(f=[]),f.push(S5(I.uri.fsPath,_))}}if(!f||f.length===0)return l}}return d.$watch(o.identifier.value,this.session,i.baseUri,{recursive:c,excludes:u,includes:f,filter:g},!!a),Ce.from({dispose:()=>d.$unwatch(this.session)})}dispose(){this._disposable.dispose()}get onDidCreate(){return this._onDidCreate.event}get onDidChange(){return this._onDidChange.event}get onDidDelete(){return this._onDidDelete.event}},eN=class{constructor(t){this._events=t;this._created=new xt(()=>this._events.created.map(E.revive));this._changed=new xt(()=>this._events.changed.map(E.revive));this._deleted=new xt(()=>this._events.deleted.map(E.revive));this.session=this._events.session}get created(){return this._created.value}get changed(){return this._changed.value}get deleted(){return this._deleted.value}},IC=class{constructor(t,e,n){this._mainContext=t;this._logService=e;this._extHostDocumentsAndEditors=n;this._onFileSystemEvent=new D;this._onDidRenameFile=new D;this._onDidCreateFile=new D;this._onDidDeleteFile=new D;this._onWillRenameFile=new yi;this._onWillCreateFile=new yi;this._onWillDeleteFile=new yi;this.onDidRenameFile=this._onDidRenameFile.event;this.onDidCreateFile=this._onDidCreateFile.event;this.onDidDeleteFile=this._onDidDeleteFile.event}createFileSystemWatcher(t,e,n,o,i,s){return new ZM(this._mainContext,e,n,t,o,this._onFileSystemEvent.event,To.from(i),s)}$onFileEvent(t){this._onFileSystemEvent.fire(new eN(t))}$onDidRunFileOperation(t,e){switch(t){case 2:this._onDidRenameFile.fire(Object.freeze({files:e.map(n=>({oldUri:E.revive(n.source),newUri:E.revive(n.target)}))}));break;case 1:this._onDidDeleteFile.fire(Object.freeze({files:e.map(n=>E.revive(n.target))}));break;case 0:case 3:this._onDidCreateFile.fire(Object.freeze({files:e.map(n=>E.revive(n.target))}));break;default:}}getOnWillRenameFileEvent(t){return this._createWillExecuteEvent(t,this._onWillRenameFile)}getOnWillCreateFileEvent(t){return this._createWillExecuteEvent(t,this._onWillCreateFile)}getOnWillDeleteFileEvent(t){return this._createWillExecuteEvent(t,this._onWillDeleteFile)}_createWillExecuteEvent(t,e){return(n,o,i)=>{let s=function(l){n.call(o,l)};return s.extension=t,e.event(s,void 0,i)}}async $onWillRunFileOperation(t,e,n,o){switch(t){case 2:return await this._fireWillEvent(this._onWillRenameFile,{files:e.map(i=>({oldUri:E.revive(i.source),newUri:E.revive(i.target)}))},n,o);case 1:return await this._fireWillEvent(this._onWillDeleteFile,{files:e.map(i=>E.revive(i.target))},n,o);case 0:case 3:return await this._fireWillEvent(this._onWillCreateFile,{files:e.map(i=>E.revive(i.target))},n,o)}}async _fireWillEvent(t,e,n,o){let i=new Set,s=[];if(await t.fireAsync(e,o,async(l,d)=>{let c=Date.now(),u=await Promise.resolve(l);u instanceof Go&&(s.push([d.extension,u]),i.add(d.extension.displayName??d.extension.identifier.value)),Date.now()-c>n&&this._logService.warn("SLOW file-participant",d.extension.identifier)}),o.isCancellationRequested||s.length===0)return;let a={edits:[]};for(let[,l]of s){let{edits:d}=ro.from(l,{getTextDocumentVersion:c=>this._extHostDocumentsAndEditors.getDocument(c)?.version,getNotebookDocumentVersion:()=>{}});a.edits=a.edits.concat(d)}return{edit:a,extensionNames:Array.from(i)}}};var yC=class{constructor(t,e,n,o,i){this._extHostNotebooks=e;this._textDocumentsAndEditors=n;this._commands=o;let s=new Oe("interactive.open","_interactive.open","Open interactive window and return notebook editor and input URI",[new re("showOptions","Show Options",a=>!0,a=>a),new re("resource","Interactive resource Uri",a=>!0,a=>a),new re("controllerId","Notebook controller Id",a=>!0,a=>a),new re("title","Interactive editor title",a=>!0,a=>a)],new Re("Notebook and input URI",a=>{if(i.debug("[ExtHostInteractive] open iw with notebook editor id",a.notebookEditorId),a.notebookEditorId!==void 0){let l=this._extHostNotebooks.getEditorById(a.notebookEditorId);return i.debug("[ExtHostInteractive] notebook editor found",l.id),{notebookUri:E.revive(a.notebookUri),inputUri:E.revive(a.inputUri),notebookEditor:l.apiEditor}}return i.debug("[ExtHostInteractive] notebook editor not found, uris for the interactive document",a.notebookUri,a.inputUri),{notebookUri:E.revive(a.notebookUri),inputUri:E.revive(a.inputUri)}}));this._commands.registerApiCommand(s)}$willAddInteractiveDocument(t,e,n,o){this._textDocumentsAndEditors.acceptDocumentsAndEditorsDelta({addedDocuments:[{EOL:e,lines:[""],languageId:n,uri:t,isDirty:!1,versionId:1,encoding:"utf8"}]})}$willRemoveInteractiveDocument(t,e){this._textDocumentsAndEditors.acceptDocumentsAndEditorsDelta({removedDocuments:[t]})}};var EC=class{constructor(t){this._handlePool=0;this._proxy=t.getProxy(V.MainThreadLabelService)}$registerResourceLabelFormatter(t){let e=this._handlePool++;return this._proxy.$registerResourceLabelFormatter(e,t),ae(()=>{this._proxy.$unregisterResourceLabelFormatter(e)})}};var SC=class r extends Ke{constructor(t,e,n,o){super(t,e,n,o),this.selectionStartLineNumber=t,this.selectionStartColumn=e,this.positionLineNumber=n,this.positionColumn=o}toString(){return"["+this.selectionStartLineNumber+","+this.selectionStartColumn+" -> "+this.positionLineNumber+","+this.positionColumn+"]"}equalsSelection(t){return r.selectionsEqual(this,t)}static selectionsEqual(t,e){return t.selectionStartLineNumber===e.selectionStartLineNumber&&t.selectionStartColumn===e.selectionStartColumn&&t.positionLineNumber===e.positionLineNumber&&t.positionColumn===e.positionColumn}getDirection(){return this.selectionStartLineNumber===this.startLineNumber&&this.selectionStartColumn===this.startColumn?0:1}setEndPosition(t,e){return this.getDirection()===0?new r(this.startLineNumber,this.startColumn,t,e):new r(t,e,this.startLineNumber,this.startColumn)}getPosition(){return new In(this.positionLineNumber,this.positionColumn)}getSelectionStart(){return new In(this.selectionStartLineNumber,this.selectionStartColumn)}setStartPosition(t,e){return this.getDirection()===0?new r(t,e,this.endLineNumber,this.endColumn):new r(this.endLineNumber,this.endColumn,t,e)}static fromPositions(t,e=t){return new r(t.lineNumber,t.column,e.lineNumber,e.column)}static fromRange(t,e){return e===0?new r(t.startLineNumber,t.startColumn,t.endLineNumber,t.endColumn):new r(t.endLineNumber,t.endColumn,t.startLineNumber,t.startColumn)}static liftSelection(t){return new r(t.selectionStartLineNumber,t.selectionStartColumn,t.positionLineNumber,t.positionColumn)}static selectionsArrEqual(t,e){if(t&&!e||!t&&e)return!1;if(!t&&!e)return!0;if(t.length!==e.length)return!1;for(let n=0,o=t.length;n<o;n++)if(!this.selectionsEqual(t[n],e[n]))return!1;return!0}static isISelection(t){return!!t&&typeof t.selectionStartLineNumber=="number"&&typeof t.selectionStartColumn=="number"&&typeof t.positionLineNumber=="number"&&typeof t.positionColumn=="number"}static createWithDirection(t,e,n,o,i){return i===0?new r(t,e,n,o):new r(n,o,t,e)}};var xC=class r{constructor(t,e){this._documents=t;this._provider=e}async provideDocumentSymbols(t,e){let n=this._documents.getDocument(t),o=await this._provider.provideDocumentSymbols(n,e);if(!gf(o))return o[0]instanceof or?o.map(tk.from):r._asDocumentSymbolTree(o)}static _asDocumentSymbolTree(t){t=t.slice(0).sort((o,i)=>{let s=o.location.range.start.compareTo(i.location.range.start);return s===0&&(s=i.location.range.end.compareTo(o.location.range.end)),s});let e=[],n=[];for(let o of t){let i={name:o.name||"!!MISSING: name!!",kind:rr.from(o.kind),tags:o.tags?.map(Qs.from)||[],detail:"",containerName:o.containerName,range:j.from(o.location.range),selectionRange:j.from(o.location.range),children:[]};for(;;){if(n.length===0){n.push(i),e.push(i);break}let s=n[n.length-1];if(Ke.containsRange(s.range,i.range)&&!Ke.equalsRange(s.range,i.range)){s.children?.push(i),n.push(i);break}n.pop()}}return e}},Nm=class{constructor(t,e,n,o,i,s){this._documents=t;this._commands=e;this._provider=n;this._extension=o;this._extTelemetry=i;this._logService=s;this._cache=new wo("CodeLens");this._disposables=new Map}async provideCodeLenses(t,e){let n=this._documents.getDocument(t),o=await this._provider.provideCodeLenses(n,e);if(!o||e.isCancellationRequested)return;let i=this._cache.add(o),s=new te;this._disposables.set(i,s);let a={cacheId:i,lenses:[]};for(let l=0;l<o.length;l++){if(!Se.isRange(o[l].range)){console.warn("INVALID code lens, range is not defined",this._extension.identifier.value);continue}a.lenses.push({cacheId:[i,l],range:j.from(o[l].range),command:this._commands.toInternal(o[l].command,s)})}return a}async resolveCodeLens(t,e){let n=t.cacheId&&this._cache.get(...t.cacheId);if(!n)return;let o;if(typeof this._provider.resolveCodeLens!="function"||n.isResolved?o=n:o=await this._provider.resolveCodeLens(n,e),o||(o=n),e.isCancellationRequested)return;let i=t.cacheId&&this._disposables.get(t.cacheId[0]);if(i){if(!o.command){let s=new Error("INVALID code lens resolved, lacks command: "+this._extension.identifier.value);this._extTelemetry.onExtensionError(this._extension.identifier,s),this._logService.error(s);return}return t.command=this._commands.toInternal(o.command,i),t}}releaseCodeLenses(t){this._disposables.get(t)?.dispose(),this._disposables.delete(t),this._cache.delete(t)}};function BC(r){return Array.isArray(r)?r.map(bp.from):r?[bp.from(r)]:[]}var CC=class{constructor(t,e){this._documents=t;this._provider=e}async provideDefinition(t,e,n){let o=this._documents.getDocument(t),i=st.to(e),s=await this._provider.provideDefinition(o,i,n);return BC(s)}},TC=class{constructor(t,e){this._documents=t;this._provider=e}async provideDeclaration(t,e,n){let o=this._documents.getDocument(t),i=st.to(e),s=await this._provider.provideDeclaration(o,i,n);return BC(s)}},_C=class{constructor(t,e){this._documents=t;this._provider=e}async provideImplementation(t,e,n){let o=this._documents.getDocument(t),i=st.to(e),s=await this._provider.provideImplementation(o,i,n);return BC(s)}},PC=class{constructor(t,e){this._documents=t;this._provider=e}async provideTypeDefinition(t,e,n){let o=this._documents.getDocument(t),i=st.to(e),s=await this._provider.provideTypeDefinition(o,i,n);return BC(s)}},qh=class r{constructor(t,e){this._documents=t;this._provider=e;this._hoverCounter=0;this._hoverMap=new Map}static{this.HOVER_MAP_MAX_SIZE=10}async provideHover(t,e,n,o){let i=this._documents.getDocument(t),s=st.to(e),a;if(n&&n.verbosityRequest){let u=n.verbosityRequest.previousHover.id,f=this._hoverMap.get(u);if(!f)throw new Error(`Hover with id ${u} not found`);let g={verbosityDelta:n.verbosityRequest.verbosityDelta,previousHover:f};a=await this._provider.provideHover(i,s,o,g)}else a=await this._provider.provideHover(i,s,o);if(!a||gf(a.contents))return;a.range||(a.range=i.getWordRangeAtPosition(s)),a.range||(a.range=new Se(s,s));let l=Ip.from(a),d=this._hoverCounter;if(this._hoverMap.size===r.HOVER_MAP_MAX_SIZE){let u=Math.min(...this._hoverMap.keys());this._hoverMap.delete(u)}return this._hoverMap.set(d,a),this._hoverCounter+=1,{...l,id:d}}releaseHover(t){this._hoverMap.delete(t)}},DC=class{constructor(t,e){this._documents=t;this._provider=e}async provideEvaluatableExpression(t,e,n){let o=this._documents.getDocument(t),i=st.to(e),s=await this._provider.provideEvaluatableExpression(o,i,n);if(s)return rk.from(s)}},wC=class{constructor(t,e){this._documents=t;this._provider=e}async provideInlineValues(t,e,n,o){let i=this._documents.getDocument(t),s=await this._provider.provideInlineValues(i,j.to(e),Qg.to(n),o);if(Array.isArray(s))return s.map(a=>jg.from(a))}},RC=class{constructor(t,e){this._documents=t;this._provider=e}async provideDocumentHighlights(t,e,n){let o=this._documents.getDocument(t),i=st.to(e),s=await this._provider.provideDocumentHighlights(o,i,n);if(Array.isArray(s))return s.map(nc.from)}},kC=class{constructor(t,e,n){this._documents=t;this._provider=e;this._logService=n}async provideMultiDocumentHighlights(t,e,n,o){let i=this._documents.getDocument(t),s=n.map(d=>{try{return this._documents.getDocument(d)}catch(c){this._logService.error("Error: Unable to retrieve document from URI: "+d+". Error message: "+c);return}}).filter(d=>d!==void 0),a=st.to(e),l=await this._provider.provideMultiDocumentHighlights(i,a,s,o);if(Array.isArray(l))return l.map(ik.from)}},AC=class{constructor(t,e){this._documents=t;this._provider=e}async provideLinkedEditingRanges(t,e,n){let o=this._documents.getDocument(t),i=st.to(e),s=await this._provider.provideLinkedEditingRanges(o,i,n);if(s&&Array.isArray(s.ranges))return{ranges:pt(s.ranges.map(j.from)),wordPattern:s.wordPattern}}},OC=class{constructor(t,e){this._documents=t;this._provider=e}async provideReferences(t,e,n,o){let i=this._documents.getDocument(t),s=st.to(e),a=await this._provider.provideReferences(i,s,n,o);if(Array.isArray(a))return a.map(no.from)}},Um=class r{constructor(t,e,n,o,i,s,a){this._documents=t;this._commands=e;this._diagnostics=n;this._provider=o;this._logService=i;this._extension=s;this._apiDeprecation=a;this._cache=new wo("CodeAction");this._disposables=new Map}static{this._maxCodeActionsPerFile=1e3}async provideCodeActions(t,e,n,o){let i=this._documents.getDocument(t),s=SC.isISelection(e)?oo.to(e):j.to(e),a=[];for(let g of this._diagnostics.getDiagnostics(t))if(s.intersection(g.range)&&a.push(g)>r._maxCodeActionsPerFile)break;let l={diagnostics:a,only:n.only?new yt(n.only):void 0,triggerKind:vk.to(n.trigger)},d=await this._provider.provideCodeActions(i,s,l,o);if(!va(d)||o.isCancellationRequested)return;let c=this._cache.add(d),u=new te;this._disposables.set(c,u);let f=[];for(let g=0;g<d.length;g++){let I=d[g];if(I)if(r._isCommand(I)&&!(I instanceof Vi))this._apiDeprecation.report("CodeActionProvider.provideCodeActions - return commands",this._extension,"Return 'CodeAction' instances instead."),f.push({_isSynthetic:!0,title:I.title,command:this._commands.toInternal(I,u)});else{let h=I;l.only&&(h.kind?l.only.contains(h.kind)||this._logService.warn(`${this._extension.identifier.value} - Code actions of kind '${l.only.value}' requested but returned code action is of kind '${h.kind.value}'. Code action will be dropped. Please check 'CodeActionContext.only' to only return requested code actions.`):this._logService.warn(`${this._extension.identifier.value} - Code actions of kind '${l.only.value}' requested but returned code action does not have a 'kind'. Code action will be dropped. Please set 'CodeAction.kind'.`));let C=h.ranges??[];f.push({cacheId:[c,g],title:h.title,command:h.command&&this._commands.toInternal(h.command,u),diagnostics:h.diagnostics&&h.diagnostics.map(Ys.from),edit:h.edit&&ro.from(h.edit,void 0),kind:h.kind&&h.kind.value,isPreferred:h.isPreferred,isAI:$e(this._extension,"codeActionAI")?h.isAI:!1,ranges:$e(this._extension,"codeActionRanges")?pt(C.map(j.from)):void 0,disabled:h.disabled?.reason})}}return{cacheId:c,actions:f}}async resolveCodeAction(t,e){let[n,o]=t,i=this._cache.get(n,o);if(!i||r._isCommand(i))return{};if(!this._provider.resolveCodeAction)return{};let s=await this._provider.resolveCodeAction(i,e)??i,a;s.edit&&(a=ro.from(s.edit,void 0));let l;if(s.command){let d=this._disposables.get(n);d&&(l=this._commands.toInternal(s.command,d))}return{edit:a,command:l}}releaseCodeActions(t){this._disposables.get(t)?.dispose(),this._disposables.delete(t),this._cache.delete(t)}static _isCommand(t){return typeof t.command=="string"&&typeof t.title=="string"}},_c=class{constructor(t,e,n,o,i){this._proxy=t;this._documents=e;this._provider=n;this._handle=o;this._extension=i;this._editsCache=new wo("DocumentPasteEdit.edits")}async prepareDocumentPaste(t,e,n,o){if(!this._provider.prepareDocumentPaste)return;this._cachedPrepare=void 0;let i=this._documents.getDocument(t),s=e.map(u=>j.to(u)),a=dc.toDataTransfer(n,()=>{throw new bv});if(await this._provider.prepareDocumentPaste(i,s,a,o),o.isCancellationRequested)return;let l=Array.from(a).filter(([,u])=>!(u instanceof dl)),d=new Map,c=await Promise.all(Array.from(l,async([u,f])=>{let g=ct();return d.set(g,f),[u,await tc.from(u,f,g)]}));return this._cachedPrepare=d,{items:c}}async providePasteEdits(t,e,n,o,i,s){if(!this._provider.provideDocumentPasteEdits)return[];let a=this._documents.getDocument(e),l=n.map(g=>j.to(g)),d=o.items.map(([g,I])=>{let h=this._cachedPrepare?.get(I.id);return h?[g,h]:[g,tc.to(g,I,async C=>(await this._proxy.$resolvePasteFileData(this._handle,t,C)).buffer)]}),c=new _r(d),u=await this._provider.provideDocumentPasteEdits(a,l,c,{only:i.only?new Pr(i.only):void 0,triggerKind:i.triggerKind},s);if(!u||s.isCancellationRequested)return[];let f=this._editsCache.add(u);return u.map((g,I)=>({_cacheId:[f,I],title:g.title??p(3200,null,this._extension.displayName||this._extension.name),kind:g.kind,yieldTo:g.yieldTo?.map(h=>h.value),insertText:typeof g.insertText=="string"?g.insertText:{snippet:g.insertText.value},additionalEdit:g.additionalEdit?ro.from(g.additionalEdit,void 0):void 0}))}async resolvePasteEdit(t,e){let[n,o]=t,i=this._editsCache.get(n,o);if(!i||!this._provider.resolveDocumentPasteEdit)return{};let s=await this._provider.resolveDocumentPasteEdit(i,e)??i;return{insertText:s.insertText,additionalEdit:s.additionalEdit?ro.from(s.additionalEdit,void 0):void 0}}releasePasteEdits(t){this._editsCache.delete(t)}},LC=class{constructor(t,e){this._documents=t;this._provider=e}async provideDocumentFormattingEdits(t,e,n){let o=this._documents.getDocument(t),i=await this._provider.provideDocumentFormattingEdits(o,e,n);if(Array.isArray(i))return i.map(un.from)}},Kh=class{constructor(t,e){this._documents=t;this._provider=e}async provideDocumentRangeFormattingEdits(t,e,n,o){let i=this._documents.getDocument(t),s=j.to(e),a=await this._provider.provideDocumentRangeFormattingEdits(i,s,n,o);if(Array.isArray(a))return a.map(un.from)}async provideDocumentRangesFormattingEdits(t,e,n,o){yv(typeof this._provider.provideDocumentRangesFormattingEdits=="function","INVALID invocation of `provideDocumentRangesFormattingEdits`");let i=this._documents.getDocument(t),s=e.map(j.to),a=await this._provider.provideDocumentRangesFormattingEdits(i,s,n,o);if(Array.isArray(a))return a.map(un.from)}},MC=class{constructor(t,e){this._documents=t;this._provider=e;this.autoFormatTriggerCharacters=[]}async provideOnTypeFormattingEdits(t,e,n,o,i){let s=this._documents.getDocument(t),a=st.to(e),l=await this._provider.provideOnTypeFormattingEdits(s,a,n,o,i);if(Array.isArray(l))return l.map(un.from)}},Fm=class{constructor(t,e){this._provider=t;this._logService=e;this._cache=new wo("WorkspaceSymbols")}async provideWorkspaceSymbols(t,e){let n=await this._provider.provideWorkspaceSymbols(t,e);if(!va(n))return{symbols:[]};let o=this._cache.add(n),i={cacheId:o,symbols:[]};for(let s=0;s<n.length;s++){let a=n[s];if(!a||!a.name){this._logService.warn("INVALID SymbolInformation",a);continue}i.symbols.push({...Sl.from(a),cacheId:[o,s]})}return i}async resolveWorkspaceSymbol(t,e){if(typeof this._provider.resolveWorkspaceSymbol!="function"||!t.cacheId)return t;let n=this._cache.get(...t.cacheId);if(n){let o=await this._provider.resolveWorkspaceSymbol(n,e);return o&&yr(t,Sl.from(o),!0)}}releaseWorkspaceSymbols(t){this._cache.delete(t)}},Hm=class r{constructor(t,e,n){this._documents=t;this._provider=e;this._logService=n}static supportsResolving(t){return typeof t.prepareRename=="function"}async provideRenameEdits(t,e,n,o){let i=this._documents.getDocument(t),s=st.to(e);try{let a=await this._provider.provideRenameEdits(i,s,n,o);return a?ro.from(a):void 0}catch(a){let l=r._asMessage(a);return l?{rejectReason:l,edits:void 0}:Promise.reject(a)}}async resolveRenameLocation(t,e,n){if(typeof this._provider.prepareRename!="function")return Promise.resolve(void 0);let o=this._documents.getDocument(t),i=st.to(e);try{let s=await this._provider.prepareRename(o,i,n),a,l;if(Se.isRange(s)?(a=s,l=o.getText(s)):mt(s)&&(a=s.range,l=s.placeholder),!a||!l)return;if(a.start.line>i.line||a.end.line<i.line){this._logService.warn("INVALID rename location: position line must be within range start/end lines");return}return{range:j.from(a),text:l}}catch(s){let a=r._asMessage(s);return a?{rejectReason:a,range:void 0,text:void 0}:Promise.reject(s)}}static _asMessage(t){return typeof t=="string"?t:t instanceof Error&&typeof t.message=="string"?t.message:void 0}},Jh=class r{constructor(t,e,n){this._documents=t;this._provider=e;this._logService=n}static{this.languageTriggerKindToVSCodeTriggerKind={0:0,1:1}}async supportsAutomaticNewSymbolNamesTriggerKind(){return this._provider.supportsAutomaticTriggerKind}async provideNewSymbolNames(t,e,n,o){let i=this._documents.getDocument(t),s=j.to(e);try{let a=r.languageTriggerKindToVSCodeTriggerKind[n],l=await this._provider.provideNewSymbolNames(i,s,a,o);return l?l.map(d=>typeof d=="string"?{newSymbolName:d}:{newSymbolName:d.newSymbolName,tags:d.tags}):void 0}catch(a){this._logService.error(r._asMessage(a)??JSON.stringify(a,null,"	"));return}}static _asMessage(t){return typeof t=="string"?t:t instanceof Error&&typeof t.message=="string"?t.message:void 0}},jh=class{constructor(t,e){this.resultId=t;this.tokens=e}},Qh=class r{constructor(t,e){this._documents=t;this._provider=e;this._nextResultId=1;this._previousResults=new Map}async provideDocumentSemanticTokens(t,e,n){let o=this._documents.getDocument(t),i=e!==0?this._previousResults.get(e):null,s=typeof i?.resultId=="string"&&typeof this._provider.provideDocumentSemanticTokensEdits=="function"?await this._provider.provideDocumentSemanticTokensEdits(o,i.resultId,n):await this._provider.provideDocumentSemanticTokens(o,n);return i&&this._previousResults.delete(e),s?(s=r._fixProvidedSemanticTokens(s),this._send(r._convertToEdits(i,s),s)):null}async releaseDocumentSemanticColoring(t){this._previousResults.delete(t)}static _fixProvidedSemanticTokens(t){return r._isSemanticTokens(t)?r._isCorrectSemanticTokens(t)?t:new si(new Uint32Array(t.data),t.resultId):r._isSemanticTokensEdits(t)?r._isCorrectSemanticTokensEdits(t)?t:new cl(t.edits.map(e=>new Ju(e.start,e.deleteCount,e.data?new Uint32Array(e.data):e.data)),t.resultId):t}static _isSemanticTokens(t){return t&&!!t.data}static _isCorrectSemanticTokens(t){return t.data instanceof Uint32Array}static _isSemanticTokensEdits(t){return t&&Array.isArray(t.edits)}static _isCorrectSemanticTokensEdits(t){for(let e of t.edits)if(!(e.data instanceof Uint32Array))return!1;return!0}static _convertToEdits(t,e){if(!r._isSemanticTokens(e)||!t||!t.tokens)return e;let n=t.tokens,o=n.length,i=e.data,s=i.length,a=0,l=Math.min(o,s);for(;a<l&&n[a]===i[a];)a++;if(a===o&&a===s)return new cl([],e.resultId);let d=0,c=l-a;for(;d<c&&n[o-d-1]===i[s-d-1];)d++;return new cl([{start:a,deleteCount:o-a-d,data:i.subarray(a,s-d)}],e.resultId)}_send(t,e){if(r._isSemanticTokens(t)){let n=this._nextResultId++;return this._previousResults.set(n,new jh(t.resultId,t.data)),jx({id:n,type:"full",data:t.data})}if(r._isSemanticTokensEdits(t)){let n=this._nextResultId++;return r._isSemanticTokens(e)?this._previousResults.set(n,new jh(e.resultId,e.data)):this._previousResults.set(n,new jh(t.resultId)),jx({id:n,type:"delta",deltas:(t.edits||[]).map(o=>({start:o.start,deleteCount:o.deleteCount,data:o.data}))})}return null}},NC=class{constructor(t,e){this._documents=t;this._provider=e}async provideDocumentRangeSemanticTokens(t,e,n){let o=this._documents.getDocument(t),i=await this._provider.provideDocumentRangeSemanticTokens(o,j.to(e),n);return i?this._send(i):null}_send(t){return jx({id:0,type:"full",data:t.data})}},Pc=class r{constructor(t,e,n,o,i){this._documents=t;this._commands=e;this._provider=n;this._apiDeprecation=o;this._extension=i;this._cache=new wo("CompletionItem");this._disposables=new Map}static supportsResolving(t){return typeof t.resolveCompletionItem=="function"}async provideCompletionItems(t,e,n,o){let i=this._documents.getDocument(t),s=st.to(e),a=i.getWordRangeAtPosition(s)||new Se(s,s),l=a.with({end:s}),d=new uo,c=await this._provider.provideCompletionItems(i,s,o,sk.to(n));if(!c||o.isCancellationRequested)return;let u=Array.isArray(c)?new ti(c):c,f=r.supportsResolving(this._provider)?this._cache.add(u.items):this._cache.add([]),g=new te;this._disposables.set(f,g);let I=[],h={x:f,b:I,a:{replace:j.from(a),insert:j.from(l)},c:u.isIncomplete||void 0,d:d.elapsed()};for(let C=0;C<u.items.length;C++){let _=u.items[C],R=this._convertCompletionItem(_,[f,C],l,a);I.push(R)}return h}async resolveCompletionItem(t,e){if(typeof this._provider.resolveCompletionItem!="function")return;let n=this._cache.get(...t);if(!n)return;let o=this._convertCompletionItem(n,t),i=await this._provider.resolveCompletionItem(n,e);if(!i)return;let s=this._convertCompletionItem(i,t);return(o.h!==s.h||o.i!==s.i)&&this._apiDeprecation.report("CompletionItem.insertText",this._extension,"extension MAY NOT change 'insertText' of a CompletionItem during resolve"),(o.n!==s.n||o.o!==s.o||!Xt(o.p,s.p))&&this._apiDeprecation.report("CompletionItem.command",this._extension,"extension MAY NOT change 'command' of a CompletionItem during resolve"),{...o,d:s.d,c:s.c,l:s.l,h:s.h,i:s.i,n:s.n,o:s.o,p:s.p}}releaseCompletionItems(t){this._disposables.get(t)?.dispose(),this._disposables.delete(t),this._cache.delete(t)}_convertCompletionItem(t,e,n,o){let i=this._disposables.get(e[0]);if(!i)throw Error("DisposableStore is missing...");let s=this._commands.toInternal(t.command,i),a={x:e,a:t.label,b:t.kind!==void 0?_E.from(t.kind):void 0,m:t.tags&&t.tags.map(TE.from),c:t.detail,d:typeof t.documentation>"u"?void 0:ye.fromStrict(t.documentation),e:t.sortText!==t.label?t.sortText:void 0,f:t.filterText!==t.label?t.filterText:void 0,g:t.preselect||void 0,i:t.keepWhitespace?1:0,k:t.commitCharacters?.join(""),l:t.additionalTextEdits&&t.additionalTextEdits.map(un.from),n:s?.$ident,o:s?.id,p:s?.$ident?void 0:s?.arguments};t.textEdit?(this._apiDeprecation.report("CompletionItem.textEdit",this._extension,"Use 'CompletionItem.insertText' and 'CompletionItem.range' instead."),a.h=t.textEdit.newText):typeof t.insertText=="string"?a.h=t.insertText:t.insertText instanceof Un&&(a.h=t.insertText.value,a.i|=4);let l;return t.textEdit?l=t.textEdit.range:t.range&&(l=t.range),Se.isRange(l)?a.j=j.from(l):l&&(!n?.isEqual(l.inserting)||!o?.isEqual(l.replacing))&&(a.j={insert:j.from(l.inserting),replace:j.from(l.replacing)}),a}},hi=class{constructor(t,e,n,o){this._extension=t;this._documents=e;this._provider=n;this._commands=o;this._references=new tN;this.languageTriggerKindToVSCodeTriggerKind={0:1,1:0};this._isAdditionsProposedApiEnabled=$e(this._extension,"inlineCompletionsAdditions")}get supportsHandleEvents(){return $e(this._extension,"inlineCompletionsAdditions")&&(typeof this._provider.handleDidShowCompletionItem=="function"||typeof this._provider.handleDidPartiallyAcceptCompletionItem=="function"||typeof this._provider.handleDidRejectCompletionItem=="function"||typeof this._provider.handleEndOfLifetime=="function")}get supportsSetModelId(){return $e(this._extension,"inlineCompletionsAdditions")&&typeof this._provider.setCurrentModelId=="function"}get supportsSetProviderOption(){return $e(this._extension,"inlineCompletionsAdditions")&&typeof this._provider.setProviderOptionValue=="function"}get modelInfo(){if(this._isAdditionsProposedApiEnabled)return this._provider.modelInfo?{models:this._provider.modelInfo.models,currentModelId:this._provider.modelInfo.currentModelId}:void 0}setCurrentModelId(t){this._isAdditionsProposedApiEnabled&&this._provider.setCurrentModelId?.(t)}get providerOptions(){if(this._isAdditionsProposedApiEnabled)return this._provider.providerOptions?.map(t=>({id:t.id,label:t.label,values:t.values.map(e=>({id:e.id,label:e.label})),currentValueId:t.currentValueId}))}setProviderOption(t,e){this._isAdditionsProposedApiEnabled&&this._provider.setProviderOptionValue?.(t,e)}async provideInlineCompletions(t,e,n,o){let i=this._documents.getDocument(t),s=st.to(e),a=await this._provider.provideInlineCompletionItems(i,s,{selectedCompletionInfo:n.selectedSuggestionInfo?{range:j.to(n.selectedSuggestionInfo.range),text:n.selectedSuggestionInfo.text,additionalInfo:n.selectedSuggestionInfo.additionalSuggestionInfo}:void 0,triggerKind:this.languageTriggerKindToVSCodeTriggerKind[n.triggerKind],activeCompletionId:n.activeCompletionId,intellisenseSuggestions:n.intellisenseSuggestions?.map(h=>({range:j.to(h.range),text:h.text,additionalInfo:h.additionalSuggestionInfo})),requestUuid:n.requestUuid,requestIssuedDateTime:n.requestIssuedDateTime,earliestShownDateTime:n.earliestShownDateTime,changeHint:n.changeHint},o);if(!a)return;let{resultItems:l,list:d}=Array.isArray(a)?{resultItems:a,list:void 0}:{resultItems:a.items,list:a},c=this._isAdditionsProposedApiEnabled?Array.isArray(a)?[]:a.commands||[]:[],u=this._isAdditionsProposedApiEnabled&&!Array.isArray(a)?a.enableForwardStability:void 0,f;return{pid:this._references.createReferenceId({dispose(){f?.dispose()},items:l,list:d}),languageId:i.languageId,items:l.map((h,C)=>{let _;h.command&&(f||(f=new te),_=this._commands.toInternal(h.command,f));let R;h.action&&(f||(f=new te),R=this._commands.toInternal(h.action,f));let O=h.insertText;return{insertText:O===void 0?void 0:typeof O=="string"?O:{snippet:O.value},range:h.range?j.from(h.range):void 0,showRange:this._isAdditionsProposedApiEnabled&&h.showRange?j.from(h.showRange):void 0,command:_,gutterMenuLinkAction:R,idx:C,completeBracketPairs:this._isAdditionsProposedApiEnabled?h.completeBracketPairs:!1,isInlineEdit:this._isAdditionsProposedApiEnabled?h.isInlineEdit:!1,showInlineEditMenu:this._isAdditionsProposedApiEnabled?h.showInlineEditMenu:!1,hint:h.displayLocation&&this._isAdditionsProposedApiEnabled?{range:j.from(h.displayLocation.range),content:h.displayLocation.label,style:h.displayLocation.kind?Tk.from(h.displayLocation.kind):1}:void 0,warning:h.warning&&this._isAdditionsProposedApiEnabled?{message:ye.from(h.warning.message),icon:h.warning.icon?ci.fromThemeIcon(h.warning.icon):void 0}:void 0,correlationId:this._isAdditionsProposedApiEnabled?h.correlationId:void 0,suggestionId:void 0,uri:this._isAdditionsProposedApiEnabled&&h.uri?h.uri:void 0,supportsRename:this._isAdditionsProposedApiEnabled?h.supportsRename:!1,jumpToPosition:this._isAdditionsProposedApiEnabled&&h.jumpToPosition?st.from(h.jumpToPosition):void 0}}),commands:c.map(h=>(f||(f=new te),ak.from(h,this._commands,f))),suppressSuggestions:!1,enableForwardStability:u}}disposeCompletions(t,e){let n=this._references.get(t);if(this._provider.handleListEndOfLifetime&&this._isAdditionsProposedApiEnabled&&n?.list){let i=function(s){switch(s.kind){case"lostRace":return{kind:3};case"tokenCancellation":return{kind:2};case"other":return{kind:0};case"empty":return{kind:1};case"notTaken":return{kind:4};default:return{kind:0}}};this._provider.handleListEndOfLifetime(n.list,i(e))}this._references.disposeReferenceId(t)?.dispose()}handleDidShowCompletionItem(t,e,n){let o=this._references.get(t)?.items[e];o&&this._provider.handleDidShowCompletionItem&&this._isAdditionsProposedApiEnabled&&this._provider.handleDidShowCompletionItem(o,n)}handlePartialAccept(t,e,n,o){let i=this._references.get(t)?.items[e];i&&this._provider.handleDidPartiallyAcceptCompletionItem&&this._isAdditionsProposedApiEnabled&&(this._provider.handleDidPartiallyAcceptCompletionItem(i,n),this._provider.handleDidPartiallyAcceptCompletionItem(i,xk.to(o)))}handleEndOfLifetime(t,e,n){let o=this._references.get(t)?.items[e];if(o&&this._provider.handleEndOfLifetime&&this._isAdditionsProposedApiEnabled){let i=Ck.to(n,s=>this._references.get(s.pid)?.items[s.idx]);this._provider.handleEndOfLifetime(o,i)}}handleRejection(t,e){let n=this._references.get(t)?.items[e];n&&this._provider.handleDidRejectCompletionItem&&this._isAdditionsProposedApiEnabled&&this._provider.handleDidRejectCompletionItem(n)}},tN=class{constructor(){this._references=new Map;this._idPool=1}createReferenceId(t){let e=this._idPool++;return this._references.set(e,t),e}disposeReferenceId(t){let e=this._references.get(t);return this._references.delete(t),e}get(t){return this._references.get(t)}},Xh=class{constructor(t,e){this._documents=t;this._provider=e;this._cache=new wo("SignatureHelp")}async provideSignatureHelp(t,e,n,o){let i=this._documents.getDocument(t),s=st.to(e),a=this.reviveContext(n),l=await this._provider.provideSignatureHelp(i,s,o,a);if(l){let d=this._cache.add([l]);return{...yp.from(l),id:d}}}reviveContext(t){let e;if(t.activeSignatureHelp){let n=yp.to(t.activeSignatureHelp),o=this._cache.get(t.activeSignatureHelp.id,0);o?(e=o,e.activeSignature=n.activeSignature,e.activeParameter=n.activeParameter):e=n}return{...t,activeSignatureHelp:e}}releaseSignatureHelp(t){this._cache.delete(t)}},Bm=class{constructor(t,e,n,o,i){this._documents=t;this._commands=e;this._provider=n;this._logService=o;this._extension=i;this._cache=new wo("InlayHints");this._disposables=new Map}async provideInlayHints(t,e,n){let o=this._documents.getDocument(t),i=j.to(e),s=await this._provider.provideInlayHints(o,i,n);if(!Array.isArray(s)||s.length===0){this._logService.trace(`[InlayHints] NO inlay hints from '${this._extension.identifier.value}' for range ${JSON.stringify(e)}`);return}if(n.isCancellationRequested)return;let a=this._cache.add(s);this._disposables.set(a,new te);let l={hints:[],cacheId:a};for(let d=0;d<s.length;d++)this._isValidInlayHint(s[d],i)&&l.hints.push(this._convertInlayHint(s[d],[a,d]));return this._logService.trace(`[InlayHints] ${l.hints.length} inlay hints from '${this._extension.identifier.value}' for range ${JSON.stringify(e)}`),l}async resolveInlayHint(t,e){if(typeof this._provider.resolveInlayHint!="function")return;let n=this._cache.get(...t);if(!n)return;let o=await this._provider.resolveInlayHint(n,e);if(o&&this._isValidInlayHint(o))return this._convertInlayHint(o,t)}releaseHints(t){this._disposables.get(t)?.dispose(),this._disposables.delete(t),this._cache.delete(t)}_isValidInlayHint(t,e){return t.label.length===0||Array.isArray(t.label)&&t.label.every(n=>n.value.length===0)?(console.log("INVALID inlay hint, empty label",t),!1):!(e&&!e.contains(t.position))}_convertInlayHint(t,e){let n=this._disposables.get(e[0]);if(!n)throw Error("DisposableStore is missing...");let o={label:"",cacheId:e,tooltip:ye.fromStrict(t.tooltip),position:st.from(t.position),textEdits:t.textEdits&&t.textEdits.map(un.from),kind:t.kind&&PE.from(t.kind),paddingLeft:t.paddingLeft,paddingRight:t.paddingRight};if(typeof t.label=="string")o.label=t.label;else{let i=[];o.label=i;for(let s of t.label){if(!s.value){console.warn("INVALID inlay hint, empty label part",this._extension.identifier.value);continue}let a={label:s.value,tooltip:ye.fromStrict(s.tooltip)};qt.isLocation(s.location)&&(a.location=no.from(s.location)),s.command&&(a.command=this._commands.toInternal(s.command,n)),i.push(a)}}return o}},Vm=class r{constructor(t,e){this._documents=t;this._provider=e;this._cache=new wo("DocumentLink")}async provideLinks(t,e){let n=this._documents.getDocument(t),o=await this._provider.provideDocumentLinks(n,e);if(!(!Array.isArray(o)||o.length===0)&&!e.isCancellationRequested){if(typeof this._provider.resolveDocumentLink!="function")return{links:o.filter(r._validateLink).map(ea.from)};{let i=this._cache.add(o),s={links:[],cacheId:i};for(let a=0;a<o.length;a++){if(!r._validateLink(o[a]))continue;let l=ea.from(o[a]);l.cacheId=[i,a],s.links.push(l)}return s}}}static _validateLink(t){return t.target&&t.target.path.length>5e4?(console.warn("DROPPING link because it is too long"),!1):!0}async resolveLink(t,e){if(typeof this._provider.resolveDocumentLink!="function")return;let n=this._cache.get(...t);if(!n)return;let o=await this._provider.resolveDocumentLink(n,e);if(!(!o||!r._validateLink(o)))return ea.from(o)}releaseLinks(t){this._cache.delete(t)}},Yh=class{constructor(t,e){this._documents=t;this._provider=e}async provideColors(t,e){let n=this._documents.getDocument(t),o=await this._provider.provideDocumentColors(n,e);return Array.isArray(o)?o.map(s=>({color:ac.from(s.color),range:j.from(s.range)})):[]}async provideColorPresentations(t,e,n){let o=this._documents.getDocument(t),i=j.to(e.range),s=ac.to(e.color),a=await this._provider.provideColorPresentations(s,{document:o,range:i},n);if(Array.isArray(a))return a.map(Xg.from)}},UC=class{constructor(t,e){this._documents=t;this._provider=e}async provideFoldingRanges(t,e,n){let o=this._documents.getDocument(t),i=await this._provider.provideFoldingRanges(o,e,n);if(Array.isArray(i))return i.map(Zg.from)}},FC=class{constructor(t,e,n){this._documents=t;this._provider=e;this._logService=n}async provideSelectionRanges(t,e,n){let o=this._documents.getDocument(t),i=e.map(st.to),s=await this._provider.provideSelectionRanges(o,i,n);if(!va(s))return[];if(s.length!==i.length)return this._logService.warn("BAD selection ranges, provider must return ranges for each position"),[];let a=[];for(let l=0;l<i.length;l++){let d=[];a.push(d);let c=i[l],u=s[l];for(;;){if(!u.range.contains(c))throw new Error("INVALID selection range, must contain the previous range");if(d.push(ck.from(u)),!u.parent)break;c=u.range,u=u.parent}}return a}},Dc=class{constructor(t,e){this._documents=t;this._provider=e;this._idPool=new Ul("");this._cache=new Map}async prepareSession(t,e,n){let o=this._documents.getDocument(t),i=st.to(e),s=await this._provider.prepareCallHierarchy(o,i,n);if(!s)return;let a=this._idPool.nextId();return this._cache.set(a,new Map),Array.isArray(s)?s.map(l=>this._cacheAndConvertItem(a,l)):[this._cacheAndConvertItem(a,s)]}async provideCallsTo(t,e,n){let o=this._itemFromCache(t,e);if(!o)throw new Error("missing call hierarchy item");let i=await this._provider.provideCallHierarchyIncomingCalls(o,n);if(i)return i.map(s=>({from:this._cacheAndConvertItem(t,s.from),fromRanges:s.fromRanges.map(a=>j.from(a))}))}async provideCallsFrom(t,e,n){let o=this._itemFromCache(t,e);if(!o)throw new Error("missing call hierarchy item");let i=await this._provider.provideCallHierarchyOutgoingCalls(o,n);if(i)return i.map(s=>({to:this._cacheAndConvertItem(t,s.to),fromRanges:s.fromRanges.map(a=>j.from(a))}))}releaseSession(t){this._cache.delete(t)}_cacheAndConvertItem(t,e){let n=this._cache.get(t),o=Zs.from(e,t,n.size.toString(36));return n.set(o._itemId,e),o}_itemFromCache(t,e){return this._cache.get(t)?.get(e)}},wc=class{constructor(t,e){this._documents=t;this._provider=e;this._idPool=new Ul("");this._cache=new Map}async prepareSession(t,e,n){let o=this._documents.getDocument(t),i=st.to(e),s=await this._provider.prepareTypeHierarchy(o,i,n);if(!s)return;let a=this._idPool.nextId();return this._cache.set(a,new Map),Array.isArray(s)?s.map(l=>this._cacheAndConvertItem(a,l)):[this._cacheAndConvertItem(a,s)]}async provideSupertypes(t,e,n){let o=this._itemFromCache(t,e);if(!o)throw new Error("missing type hierarchy item");let i=await this._provider.provideTypeHierarchySupertypes(o,n);if(i)return i.map(s=>this._cacheAndConvertItem(t,s))}async provideSubtypes(t,e,n){let o=this._itemFromCache(t,e);if(!o)throw new Error("missing type hierarchy item");let i=await this._provider.provideTypeHierarchySubtypes(o,n);if(i)return i.map(s=>this._cacheAndConvertItem(t,s))}releaseSession(t){this._cache.delete(t)}_cacheAndConvertItem(t,e){let n=this._cache.get(t),o=ta.from(e,t,n.size.toString(36));return n.set(o._itemId,e),o}_itemFromCache(t,e){return this._cache.get(t)?.get(e)}},Wm=class{constructor(t,e,n,o,i){this._proxy=t;this._documents=e;this._provider=n;this._handle=o;this._extension=i;this._cache=new wo("DocumentDropEdit")}async provideDocumentOnDropEdits(t,e,n,o,i){let s=this._documents.getDocument(e),a=st.to(n),l=dc.toDataTransfer(o,async f=>(await this._proxy.$resolveDocumentOnDropFileData(this._handle,t,f)).buffer),d=await this._provider.provideDocumentDropEdits(s,a,l,i);if(!d)return;let c=Rn(d),u=this._cache.add(c);return c.map((f,g)=>({_cacheId:[u,g],title:f.title??p(3199,null,this._extension.displayName||this._extension.name),kind:f.kind?.value,yieldTo:f.yieldTo?.map(I=>I.value),insertText:typeof f.insertText=="string"?f.insertText:{snippet:f.insertText.value},additionalEdit:f.additionalEdit?ro.from(f.additionalEdit,void 0):void 0}))}async resolveDropEdit(t,e){let[n,o]=t,i=this._cache.get(n,o);if(!i||!this._provider.resolveDocumentDropEdit)return{};let s=await this._provider.resolveDocumentDropEdit(i,e)??i;return{additionalEdit:s.additionalEdit?ro.from(s.additionalEdit,void 0):void 0}}releaseDropEdits(t){this._cache.delete(t)}},Rc=class{constructor(t,e){this.adapter=t;this.extension=e}},HC=class r extends K{constructor(e,n,o,i,s,a,l,d){super();this._uriTransformer=n;this._documents=o;this._commands=i;this._diagnostics=s;this._logService=a;this._apiDeprecation=l;this._extensionTelemetry=d;this._adapter=new Map;this._onDidChangeInlineCompletionsUnificationState=this._register(new D);this.onDidChangeInlineCompletionsUnificationState=this._onDidChangeInlineCompletionsUnificationState.event;this._proxy=e.getProxy(V.MainThreadLanguageFeatures),this._inlineCompletionsUnificationState={codeUnification:!1,modelUnification:!1,extensionUnification:!1,expAssignments:[]}}static{this._handlePool=0}get inlineCompletionsUnificationState(){return this._inlineCompletionsUnificationState}_transformDocumentSelector(e,n){return di.from(e,this._uriTransformer,n)}_createDisposable(e){return new Ce(()=>{this._adapter.delete(e),this._proxy.$unregister(e)})}_nextHandle(){return r._handlePool++}async _withAdapter(e,n,o,i,s,a=!1){let l=this._adapter.get(e);if(!l||!(l.adapter instanceof n))return i;let d=Date.now();a||this._logService.trace(`[${l.extension.identifier.value}] INVOKE provider '${o.toString().replace(/[\r\n]/g,"")}'`);let c=o(l.adapter,l.extension),u=!1,f;return Promise.resolve(c).catch(g=>{Fn(g)||(u=!0,g instanceof Error?f={name:g.name,message:g.message}:typeof g=="string"?f={name:"Error",message:g}:f={name:"UnknownError",message:String(g)},this._logService.error(`[${l.extension.identifier.value}] provider FAILED`),this._logService.error(g),this._extensionTelemetry.onExtensionError(l.extension.identifier,g))}).finally(()=>{let g=Date.now()-d;if(!a){this._logService.trace(`[${l.extension.identifier.value}] provider DONE after ${g}ms`);let I=n.name.replace("Adapter","");this._fireLanguageFeatureTelemetry(l.extension.identifier.value,I,g,u,f)}}),De.isCancellationToken(s)?rb(c,s):c}_fireLanguageFeatureTelemetry(e,n,o,i,s){let a={extensionId:e,method:n,durationMs:String(o),success:String(!i)};s&&(a.errorName=s.name,a.errorMessage=s.message.substring(0,5e3)),this._commands.executeCommand(LW.FIRE_LSP_TELEMETRY_EVENT.id,a,o).catch(()=>{})}_addNewAdapter(e,n){let o=this._nextHandle();return this._adapter.set(o,new Rc(e,n)),o}static _extLabel(e){return e.displayName||e.name}static _extId(e){return e.identifier.value}registerDocumentSymbolProvider(e,n,o,i){let s=this._addNewAdapter(new xC(this._documents,o),e),a=i&&i.label||r._extLabel(e);return this._proxy.$registerDocumentSymbolProvider(s,this._transformDocumentSelector(n,e),a),this._createDisposable(s)}$provideDocumentSymbols(e,n,o){return this._withAdapter(e,xC,i=>i.provideDocumentSymbols(E.revive(n),o),void 0,o)}registerCodeLensProvider(e,n,o){let i=this._nextHandle(),s=typeof o.onDidChangeCodeLenses=="function"?this._nextHandle():void 0;this._adapter.set(i,new Rc(new Nm(this._documents,this._commands.converter,o,e,this._extensionTelemetry,this._logService),e)),this._proxy.$registerCodeLensSupport(i,this._transformDocumentSelector(n,e),s);let a=this._createDisposable(i);if(s!==void 0){let l=o.onDidChangeCodeLenses(d=>this._proxy.$emitCodeLensEvent(s));a=Ce.from(a,l)}return a}$provideCodeLenses(e,n,o){return this._withAdapter(e,Nm,i=>i.provideCodeLenses(E.revive(n),o),void 0,o,n.scheme==="output")}$resolveCodeLens(e,n,o){return this._withAdapter(e,Nm,i=>i.resolveCodeLens(n,o),void 0,void 0,!0)}$releaseCodeLenses(e,n){this._withAdapter(e,Nm,o=>Promise.resolve(o.releaseCodeLenses(n)),void 0,void 0,!0)}registerDefinitionProvider(e,n,o){let i=this._addNewAdapter(new CC(this._documents,o),e);return this._proxy.$registerDefinitionSupport(i,this._transformDocumentSelector(n,e)),this._createDisposable(i)}$provideDefinition(e,n,o,i){return this._withAdapter(e,CC,s=>s.provideDefinition(E.revive(n),o,i),[],i)}registerDeclarationProvider(e,n,o){let i=this._addNewAdapter(new TC(this._documents,o),e);return this._proxy.$registerDeclarationSupport(i,this._transformDocumentSelector(n,e)),this._createDisposable(i)}$provideDeclaration(e,n,o,i){return this._withAdapter(e,TC,s=>s.provideDeclaration(E.revive(n),o,i),[],i)}registerImplementationProvider(e,n,o){let i=this._addNewAdapter(new _C(this._documents,o),e);return this._proxy.$registerImplementationSupport(i,this._transformDocumentSelector(n,e)),this._createDisposable(i)}$provideImplementation(e,n,o,i){return this._withAdapter(e,_C,s=>s.provideImplementation(E.revive(n),o,i),[],i)}registerTypeDefinitionProvider(e,n,o){let i=this._addNewAdapter(new PC(this._documents,o),e);return this._proxy.$registerTypeDefinitionSupport(i,this._transformDocumentSelector(n,e)),this._createDisposable(i)}$provideTypeDefinition(e,n,o,i){return this._withAdapter(e,PC,s=>s.provideTypeDefinition(E.revive(n),o,i),[],i)}registerHoverProvider(e,n,o,i){let s=this._addNewAdapter(new qh(this._documents,o),e);return this._proxy.$registerHoverProvider(s,this._transformDocumentSelector(n,e)),this._createDisposable(s)}$provideHover(e,n,o,i,s){return this._withAdapter(e,qh,a=>a.provideHover(E.revive(n),o,i,s),void 0,s)}$releaseHover(e,n){this._withAdapter(e,qh,o=>Promise.resolve(o.releaseHover(n)),void 0,void 0,!0)}registerEvaluatableExpressionProvider(e,n,o,i){let s=this._addNewAdapter(new DC(this._documents,o),e);return this._proxy.$registerEvaluatableExpressionProvider(s,this._transformDocumentSelector(n,e)),this._createDisposable(s)}$provideEvaluatableExpression(e,n,o,i){return this._withAdapter(e,DC,s=>s.provideEvaluatableExpression(E.revive(n),o,i),void 0,i)}registerInlineValuesProvider(e,n,o,i){let s=typeof o.onDidChangeInlineValues=="function"?this._nextHandle():void 0,a=this._addNewAdapter(new wC(this._documents,o),e);this._proxy.$registerInlineValuesProvider(a,this._transformDocumentSelector(n,e),s);let l=this._createDisposable(a);if(s!==void 0){let d=o.onDidChangeInlineValues(c=>this._proxy.$emitInlineValuesEvent(s));l=Ce.from(l,d)}return l}$provideInlineValues(e,n,o,i,s){return this._withAdapter(e,wC,a=>a.provideInlineValues(E.revive(n),o,i,s),void 0,s)}registerDocumentHighlightProvider(e,n,o){let i=this._addNewAdapter(new RC(this._documents,o),e);return this._proxy.$registerDocumentHighlightProvider(i,this._transformDocumentSelector(n,e)),this._createDisposable(i)}registerMultiDocumentHighlightProvider(e,n,o){let i=this._addNewAdapter(new kC(this._documents,o,this._logService),e);return this._proxy.$registerMultiDocumentHighlightProvider(i,this._transformDocumentSelector(n,e)),this._createDisposable(i)}$provideDocumentHighlights(e,n,o,i){return this._withAdapter(e,RC,s=>s.provideDocumentHighlights(E.revive(n),o,i),void 0,i)}$provideMultiDocumentHighlights(e,n,o,i,s){return this._withAdapter(e,kC,a=>a.provideMultiDocumentHighlights(E.revive(n),o,i.map(l=>E.revive(l)),s),void 0,s)}registerLinkedEditingRangeProvider(e,n,o){let i=this._addNewAdapter(new AC(this._documents,o),e);return this._proxy.$registerLinkedEditingRangeProvider(i,this._transformDocumentSelector(n,e)),this._createDisposable(i)}$provideLinkedEditingRanges(e,n,o,i){return this._withAdapter(e,AC,async s=>{let a=await s.provideLinkedEditingRanges(E.revive(n),o,i);if(a)return{ranges:a.ranges,wordPattern:a.wordPattern?r._serializeRegExp(a.wordPattern):void 0}},void 0,i)}registerReferenceProvider(e,n,o){let i=this._addNewAdapter(new OC(this._documents,o),e);return this._proxy.$registerReferenceSupport(i,this._transformDocumentSelector(n,e)),this._createDisposable(i)}$provideReferences(e,n,o,i,s){return this._withAdapter(e,OC,a=>a.provideReferences(E.revive(n),o,i,s),void 0,s)}registerCodeActionProvider(e,n,o,i){let s=new te,a=this._addNewAdapter(new Um(this._documents,this._commands.converter,this._diagnostics,o,this._logService,e,this._apiDeprecation),e);return this._proxy.$registerCodeActionSupport(a,this._transformDocumentSelector(n,e),{providedKinds:i?.providedCodeActionKinds?.map(l=>l.value),documentation:i?.documentation?.map(l=>({kind:l.kind.value,command:this._commands.converter.toInternal(l.command,s)}))},r._extLabel(e),r._extId(e),!!o.resolveCodeAction),s.add(this._createDisposable(a)),s}$provideCodeActions(e,n,o,i,s){return this._withAdapter(e,Um,a=>a.provideCodeActions(E.revive(n),o,i,s),void 0,s)}$resolveCodeAction(e,n,o){return this._withAdapter(e,Um,i=>i.resolveCodeAction(n,o),{},void 0)}$releaseCodeActions(e,n){this._withAdapter(e,Um,o=>Promise.resolve(o.releaseCodeActions(n)),void 0,void 0,!0)}registerDocumentFormattingEditProvider(e,n,o){let i=this._addNewAdapter(new LC(this._documents,o),e);return this._proxy.$registerDocumentFormattingSupport(i,this._transformDocumentSelector(n,e),e.identifier,e.displayName||e.name),this._createDisposable(i)}$provideDocumentFormattingEdits(e,n,o,i){return this._withAdapter(e,LC,s=>s.provideDocumentFormattingEdits(E.revive(n),o,i),void 0,i)}registerDocumentRangeFormattingEditProvider(e,n,o){let i=typeof o.provideDocumentRangesFormattingEdits=="function",s=this._addNewAdapter(new Kh(this._documents,o),e);return this._proxy.$registerRangeFormattingSupport(s,this._transformDocumentSelector(n,e),e.identifier,e.displayName||e.name,i),this._createDisposable(s)}$provideDocumentRangeFormattingEdits(e,n,o,i,s){return this._withAdapter(e,Kh,a=>a.provideDocumentRangeFormattingEdits(E.revive(n),o,i,s),void 0,s)}$provideDocumentRangesFormattingEdits(e,n,o,i,s){return this._withAdapter(e,Kh,a=>a.provideDocumentRangesFormattingEdits(E.revive(n),o,i,s),void 0,s)}registerOnTypeFormattingEditProvider(e,n,o,i){let s=this._addNewAdapter(new MC(this._documents,o),e);return this._proxy.$registerOnTypeFormattingSupport(s,this._transformDocumentSelector(n,e),i,e.identifier),this._createDisposable(s)}$provideOnTypeFormattingEdits(e,n,o,i,s,a){return this._withAdapter(e,MC,l=>l.provideOnTypeFormattingEdits(E.revive(n),o,i,s,a),void 0,a)}registerWorkspaceSymbolProvider(e,n){let o=this._addNewAdapter(new Fm(n,this._logService),e);return this._proxy.$registerNavigateTypeSupport(o,typeof n.resolveWorkspaceSymbol=="function"),this._createDisposable(o)}$provideWorkspaceSymbols(e,n,o){return this._withAdapter(e,Fm,i=>i.provideWorkspaceSymbols(n,o),{symbols:[]},o)}$resolveWorkspaceSymbol(e,n,o){return this._withAdapter(e,Fm,i=>i.resolveWorkspaceSymbol(n,o),void 0,void 0)}$releaseWorkspaceSymbols(e,n){this._withAdapter(e,Fm,o=>o.releaseWorkspaceSymbols(n),void 0,void 0,!0)}registerRenameProvider(e,n,o){let i=this._addNewAdapter(new Hm(this._documents,o,this._logService),e);return this._proxy.$registerRenameSupport(i,this._transformDocumentSelector(n,e),Hm.supportsResolving(o)),this._createDisposable(i)}$provideRenameEdits(e,n,o,i,s){return this._withAdapter(e,Hm,a=>a.provideRenameEdits(E.revive(n),o,i,s),void 0,s)}$resolveRenameLocation(e,n,o,i){return this._withAdapter(e,Hm,s=>s.resolveRenameLocation(E.revive(n),o,i),void 0,i)}registerNewSymbolNamesProvider(e,n,o){let i=this._addNewAdapter(new Jh(this._documents,o,this._logService),e);return this._proxy.$registerNewSymbolNamesProvider(i,this._transformDocumentSelector(n,e)),this._createDisposable(i)}$supportsAutomaticNewSymbolNamesTriggerKind(e){return this._withAdapter(e,Jh,n=>n.supportsAutomaticNewSymbolNamesTriggerKind(),!1,void 0)}$provideNewSymbolNames(e,n,o,i,s){return this._withAdapter(e,Jh,a=>a.provideNewSymbolNames(E.revive(n),o,i,s),void 0,s)}registerDocumentSemanticTokensProvider(e,n,o,i){let s=this._addNewAdapter(new Qh(this._documents,o),e),a=typeof o.onDidChangeSemanticTokens=="function"?this._nextHandle():void 0;this._proxy.$registerDocumentSemanticTokensProvider(s,this._transformDocumentSelector(n,e),i,a);let l=this._createDisposable(s);if(a){let d=o.onDidChangeSemanticTokens(c=>this._proxy.$emitDocumentSemanticTokensEvent(a));l=Ce.from(l,d)}return l}$provideDocumentSemanticTokens(e,n,o,i){return this._withAdapter(e,Qh,s=>s.provideDocumentSemanticTokens(E.revive(n),o,i),null,i)}$releaseDocumentSemanticTokens(e,n){this._withAdapter(e,Qh,o=>o.releaseDocumentSemanticColoring(n),void 0,void 0,!0)}registerDocumentRangeSemanticTokensProvider(e,n,o,i){let s=this._addNewAdapter(new NC(this._documents,o),e),a=typeof o.onDidChangeSemanticTokens=="function"?this._nextHandle():void 0;this._proxy.$registerDocumentRangeSemanticTokensProvider(s,this._transformDocumentSelector(n,e),i,a);let l=this._createDisposable(s);if(a){let d=o.onDidChangeSemanticTokens(c=>this._proxy.$emitDocumentRangeSemanticTokensEvent(a));l=Ce.from(l,d)}return l}$provideDocumentRangeSemanticTokens(e,n,o,i){return this._withAdapter(e,NC,s=>s.provideDocumentRangeSemanticTokens(E.revive(n),o,i),null,i)}registerCompletionItemProvider(e,n,o,i){let s=this._addNewAdapter(new Pc(this._documents,this._commands.converter,o,this._apiDeprecation,e),e);return this._proxy.$registerCompletionsProvider(s,this._transformDocumentSelector(n,e),i,Pc.supportsResolving(o),e.identifier),this._createDisposable(s)}$provideCompletionItems(e,n,o,i,s){return this._withAdapter(e,Pc,a=>a.provideCompletionItems(E.revive(n),o,i,s),void 0,s)}$resolveCompletionItem(e,n,o){return this._withAdapter(e,Pc,i=>i.resolveCompletionItem(n,o),void 0,o)}$releaseCompletionItems(e,n){this._withAdapter(e,Pc,o=>o.releaseCompletionItems(n),void 0,void 0,!0)}registerInlineCompletionsProvider(e,n,o,i){let s=new hi(e,this._documents,o,this._commands.converter),a=this._addNewAdapter(s,e),l=this._createDisposable(a),d=$e(e,"inlineCompletionsAdditions")&&typeof o.onDidChange=="function";if(d){let f=o.onDidChange(g=>this._proxy.$emitInlineCompletionsChange(a,g?{data:g.data}:void 0));l=Ce.from(l,f)}let c=$e(e,"inlineCompletionsAdditions")&&typeof o.onDidChangeModelInfo=="function";if(c){let f=o.onDidChangeModelInfo(g=>this._proxy.$emitInlineCompletionModelInfoChange(a,s.modelInfo));l=Ce.from(l,f)}let u=$e(e,"inlineCompletionsAdditions")&&typeof o.onDidChangeProviderOptions=="function";if(u){let f=o.onDidChangeProviderOptions(g=>this._proxy.$emitInlineCompletionProviderOptionsChange(a,s.providerOptions));l=Ce.from(l,f)}return this._proxy.$registerInlineCompletionsSupport(a,this._transformDocumentSelector(n,e),s.supportsHandleEvents,Ue.toKey(e.identifier.value),e.version,i?.groupId?Ue.toKey(i.groupId):void 0,i?.yieldTo?.map(f=>Ue.toKey(f))||[],i?.displayName,i?.debounceDelayMs,i?.excludes?.map(f=>Ue.toKey(f))||[],d,s.supportsSetModelId,s.modelInfo,c,s.supportsSetProviderOption,s.providerOptions,u),l}$provideInlineCompletions(e,n,o,i,s){return this._withAdapter(e,hi,a=>a.provideInlineCompletions(E.revive(n),o,i,s),void 0,void 0)}$handleInlineCompletionDidShow(e,n,o,i){this._withAdapter(e,hi,async s=>{s.handleDidShowCompletionItem(n,o,i)},void 0,void 0,!0)}$handleInlineCompletionPartialAccept(e,n,o,i,s){this._withAdapter(e,hi,async a=>{a.handlePartialAccept(n,o,i,s)},void 0,void 0,!0)}$handleInlineCompletionEndOfLifetime(e,n,o,i){this._withAdapter(e,hi,async s=>{s.handleEndOfLifetime(n,o,i)},void 0,void 0,!0)}$handleInlineCompletionRejection(e,n,o){this._withAdapter(e,hi,async i=>{i.handleRejection(n,o)},void 0,void 0,!0)}$freeInlineCompletionsList(e,n,o){this._withAdapter(e,hi,async i=>{i.disposeCompletions(n,o)},void 0,void 0,!0)}$acceptInlineCompletionsUnificationState(e){this._inlineCompletionsUnificationState=e,this._onDidChangeInlineCompletionsUnificationState.fire()}$handleInlineCompletionSetCurrentModelId(e,n){this._withAdapter(e,hi,async o=>{o.setCurrentModelId(n)},void 0,void 0)}$handleInlineCompletionSetProviderOption(e,n,o){this._withAdapter(e,hi,async i=>{i.setProviderOption(n,o)},void 0,void 0)}registerSignatureHelpProvider(e,n,o,i){let s=Array.isArray(i)?{triggerCharacters:i,retriggerCharacters:[]}:i,a=this._addNewAdapter(new Xh(this._documents,o),e);return this._proxy.$registerSignatureHelpProvider(a,this._transformDocumentSelector(n,e),s),this._createDisposable(a)}$provideSignatureHelp(e,n,o,i,s){return this._withAdapter(e,Xh,a=>a.provideSignatureHelp(E.revive(n),o,i,s),void 0,s)}$releaseSignatureHelp(e,n){this._withAdapter(e,Xh,o=>o.releaseSignatureHelp(n),void 0,void 0,!0)}registerInlayHintsProvider(e,n,o){let i=typeof o.onDidChangeInlayHints=="function"?this._nextHandle():void 0,s=this._addNewAdapter(new Bm(this._documents,this._commands.converter,o,this._logService,e),e);this._proxy.$registerInlayHintsProvider(s,this._transformDocumentSelector(n,e),typeof o.resolveInlayHint=="function",i,r._extLabel(e));let a=this._createDisposable(s);if(i!==void 0){let l=o.onDidChangeInlayHints(d=>this._proxy.$emitInlayHintsEvent(i));a=Ce.from(a,l)}return a}$provideInlayHints(e,n,o,i){return this._withAdapter(e,Bm,s=>s.provideInlayHints(E.revive(n),o,i),void 0,i)}$resolveInlayHint(e,n,o){return this._withAdapter(e,Bm,i=>i.resolveInlayHint(n,o),void 0,o)}$releaseInlayHints(e,n){this._withAdapter(e,Bm,o=>o.releaseHints(n),void 0,void 0,!0)}registerDocumentLinkProvider(e,n,o){let i=this._addNewAdapter(new Vm(this._documents,o),e);return this._proxy.$registerDocumentLinkProvider(i,this._transformDocumentSelector(n,e),typeof o.resolveDocumentLink=="function"),this._createDisposable(i)}$provideDocumentLinks(e,n,o){return this._withAdapter(e,Vm,i=>i.provideLinks(E.revive(n),o),void 0,o,n.scheme==="output")}$resolveDocumentLink(e,n,o){return this._withAdapter(e,Vm,i=>i.resolveLink(n,o),void 0,void 0,!0)}$releaseDocumentLinks(e,n){this._withAdapter(e,Vm,o=>o.releaseLinks(n),void 0,void 0,!0)}registerColorProvider(e,n,o){let i=this._addNewAdapter(new Yh(this._documents,o),e);return this._proxy.$registerDocumentColorProvider(i,this._transformDocumentSelector(n,e)),this._createDisposable(i)}$provideDocumentColors(e,n,o){return this._withAdapter(e,Yh,i=>i.provideColors(E.revive(n),o),[],o)}$provideColorPresentations(e,n,o,i){return this._withAdapter(e,Yh,s=>s.provideColorPresentations(E.revive(n),o,i),void 0,i)}registerFoldingRangeProvider(e,n,o){let i=this._nextHandle(),s=typeof o.onDidChangeFoldingRanges=="function"?this._nextHandle():void 0;this._adapter.set(i,new Rc(new UC(this._documents,o),e)),this._proxy.$registerFoldingRangeProvider(i,this._transformDocumentSelector(n,e),e.identifier,s);let a=this._createDisposable(i);if(s!==void 0){let l=o.onDidChangeFoldingRanges(()=>this._proxy.$emitFoldingRangeEvent(s));a=Ce.from(a,l)}return a}$provideFoldingRanges(e,n,o,i){return this._withAdapter(e,UC,s=>s.provideFoldingRanges(E.revive(n),o,i),void 0,i)}registerSelectionRangeProvider(e,n,o){let i=this._addNewAdapter(new FC(this._documents,o,this._logService),e);return this._proxy.$registerSelectionRangeProvider(i,this._transformDocumentSelector(n,e)),this._createDisposable(i)}$provideSelectionRanges(e,n,o,i){return this._withAdapter(e,FC,s=>s.provideSelectionRanges(E.revive(n),o,i),[],i)}registerCallHierarchyProvider(e,n,o){let i=this._addNewAdapter(new Dc(this._documents,o),e);return this._proxy.$registerCallHierarchyProvider(i,this._transformDocumentSelector(n,e)),this._createDisposable(i)}$prepareCallHierarchy(e,n,o,i){return this._withAdapter(e,Dc,s=>Promise.resolve(s.prepareSession(E.revive(n),o,i)),void 0,i)}$provideCallHierarchyIncomingCalls(e,n,o,i){return this._withAdapter(e,Dc,s=>s.provideCallsTo(n,o,i),void 0,i)}$provideCallHierarchyOutgoingCalls(e,n,o,i){return this._withAdapter(e,Dc,s=>s.provideCallsFrom(n,o,i),void 0,i)}$releaseCallHierarchy(e,n){this._withAdapter(e,Dc,o=>Promise.resolve(o.releaseSession(n)),void 0,void 0,!0)}registerTypeHierarchyProvider(e,n,o){let i=this._addNewAdapter(new wc(this._documents,o),e);return this._proxy.$registerTypeHierarchyProvider(i,this._transformDocumentSelector(n,e)),this._createDisposable(i)}$prepareTypeHierarchy(e,n,o,i){return this._withAdapter(e,wc,s=>Promise.resolve(s.prepareSession(E.revive(n),o,i)),void 0,i)}$provideTypeHierarchySupertypes(e,n,o,i){return this._withAdapter(e,wc,s=>s.provideSupertypes(n,o,i),void 0,i)}$provideTypeHierarchySubtypes(e,n,o,i){return this._withAdapter(e,wc,s=>s.provideSubtypes(n,o,i),void 0,i)}$releaseTypeHierarchy(e,n){this._withAdapter(e,wc,o=>Promise.resolve(o.releaseSession(n)),void 0,void 0,!0)}registerDocumentOnDropEditProvider(e,n,o,i){let s=this._nextHandle();return this._adapter.set(s,new Rc(new Wm(this._proxy,this._documents,o,s,e),e)),this._proxy.$registerDocumentOnDropEditProvider(s,this._transformDocumentSelector(n,e),i?{supportsResolve:!!o.resolveDocumentDropEdit,dropMimeTypes:i.dropMimeTypes,providedDropKinds:i.providedDropEditKinds?.map(a=>a.value)}:void 0),this._createDisposable(s)}$provideDocumentOnDropEdits(e,n,o,i,s,a){return this._withAdapter(e,Wm,l=>Promise.resolve(l.provideDocumentOnDropEdits(n,E.revive(o),i,s,a)),void 0,void 0)}$resolveDropEdit(e,n,o){return this._withAdapter(e,Wm,i=>i.resolveDropEdit(n,o),{},void 0)}$releaseDocumentOnDropEdits(e,n){this._withAdapter(e,Wm,o=>Promise.resolve(o.releaseDropEdits(n)),void 0,void 0,!0)}registerDocumentPasteEditProvider(e,n,o,i){let s=this._nextHandle();return this._adapter.set(s,new Rc(new _c(this._proxy,this._documents,o,s,e),e)),this._proxy.$registerPasteEditProvider(s,this._transformDocumentSelector(n,e),{supportsCopy:!!o.prepareDocumentPaste,supportsPaste:!!o.provideDocumentPasteEdits,supportsResolve:!!o.resolveDocumentPasteEdit,providedPasteEditKinds:i.providedPasteEditKinds?.map(a=>a.value),copyMimeTypes:i.copyMimeTypes,pasteMimeTypes:i.pasteMimeTypes}),this._createDisposable(s)}$prepareDocumentPaste(e,n,o,i,s){return this._withAdapter(e,_c,a=>a.prepareDocumentPaste(E.revive(n),o,i,s),void 0,s)}$providePasteEdits(e,n,o,i,s,a,l){return this._withAdapter(e,_c,d=>d.providePasteEdits(n,E.revive(o),i,s,a,l),void 0,l)}$resolvePasteEdit(e,n,o){return this._withAdapter(e,_c,i=>i.resolvePasteEdit(n,o),{},void 0)}$releasePasteEdits(e,n){this._withAdapter(e,_c,o=>Promise.resolve(o.releasePasteEdits(n)),void 0,void 0,!0)}static _serializeRegExp(e){return{pattern:e.source,flags:e.flags}}static _serializeIndentationRule(e){return{decreaseIndentPattern:r._serializeRegExp(e.decreaseIndentPattern),increaseIndentPattern:r._serializeRegExp(e.increaseIndentPattern),indentNextLinePattern:e.indentNextLinePattern?r._serializeRegExp(e.indentNextLinePattern):void 0,unIndentedLinePattern:e.unIndentedLinePattern?r._serializeRegExp(e.unIndentedLinePattern):void 0}}static _serializeOnEnterRule(e){return{beforeText:r._serializeRegExp(e.beforeText),afterText:e.afterText?r._serializeRegExp(e.afterText):void 0,previousLineText:e.previousLineText?r._serializeRegExp(e.previousLineText):void 0,action:e.action}}static _serializeOnEnterRules(e){return e.map(r._serializeOnEnterRule)}static _serializeAutoClosingPair(e){return{open:e.open,close:e.close,notIn:e.notIn?e.notIn.map(n=>ec.toString(n)):void 0}}static _serializeAutoClosingPairs(e){return e.map(r._serializeAutoClosingPair)}setLanguageConfiguration(e,n,o){let{wordPattern:i}=o;if(i&&Vv(i))throw new Error(`Invalid language configuration: wordPattern '${i}' is not allowed to match the empty string.`);i?this._documents.setWordDefinitionFor(n,i):this._documents.setWordDefinitionFor(n,void 0),o.__electricCharacterSupport&&this._apiDeprecation.report("LanguageConfiguration.__electricCharacterSupport",e,"Do not use."),o.__characterPairSupport&&this._apiDeprecation.report("LanguageConfiguration.__characterPairSupport",e,"Do not use.");let s=this._nextHandle(),a={comments:o.comments,brackets:o.brackets,wordPattern:o.wordPattern?r._serializeRegExp(o.wordPattern):void 0,indentationRules:o.indentationRules?r._serializeIndentationRule(o.indentationRules):void 0,onEnterRules:o.onEnterRules?r._serializeOnEnterRules(o.onEnterRules):void 0,__electricCharacterSupport:o.__electricCharacterSupport,__characterPairSupport:o.__characterPairSupport,autoClosingPairs:o.autoClosingPairs?r._serializeAutoClosingPairs(o.autoClosingPairs):void 0};return this._proxy.$setLanguageConfiguration(s,n,a),this._createDisposable(s)}$setWordDefinitions(e){for(let n of e)this._documents.setWordDefinitionFor(n.languageId,new RegExp(n.regexSource,n.regexFlags))}};var x5=N("notebookService");var C5=N("codeMapperService");var nN="vscode_editFile",VC="vscode_editFile_internal",T5={id:VC,displayName:"",modelDescription:"",source:So.Internal},$m=class{constructor(t,e,n){this.chatService=t;this.codeMapperService=e;this.notebookService=n}async invoke(t,e,n,o){if(!t.context)throw new Error("toolInvocationToken is required for this tool");let i=t.parameters,s=E.revive(i.uri),a=$w.parse(s)?.notebook||s,l=this.chatService.getSession(t.context.sessionResource),d=l.getRequests().at(-1);l.acceptResponseProgress(d,{kind:"markdownContent",content:new Yn("\n````\n")}),l.acceptResponseProgress(d,{kind:"codeblockUri",uri:a,isEdit:!0}),l.acceptResponseProgress(d,{kind:"markdownContent",content:new Yn("\n````\n")}),this.notebookService.hasSupportedNotebooks(a)&&this.notebookService.getNotebookTextModel(a)?l.acceptResponseProgress(d,{kind:"notebookEdit",edits:[],uri:a}):l.acceptResponseProgress(d,{kind:"textEdit",edits:[],uri:a});let c=l.editingSession;if(!c)throw new Error("This tool must be called from within an editing session");let u=await this.codeMapperService.mapCode({codeBlocks:[{code:i.code,resource:a,markdownBeforeBlock:"Editing file"}],location:"tool",chatRequestId:t.chatRequestId,chatRequestModel:t.modelId,chatSessionResource:t.context.sessionResource},{textEdit:(g,I)=>{l.acceptResponseProgress(d,{kind:"textEdit",uri:g,edits:I})},notebookEdit(g,I){l.acceptResponseProgress(d,{kind:"notebookEdit",uri:g,edits:I})}},o);if(this.notebookService.hasSupportedNotebooks(a)&&this.notebookService.getNotebookTextModel(a)?l.acceptResponseProgress(d,{kind:"notebookEdit",uri:a,edits:[],done:!0}):l.acceptResponseProgress(d,{kind:"textEdit",uri:a,edits:[],done:!0}),u?.errorMessage)throw new Error(u.errorMessage);let f;return await new Promise(g=>{let I=!1;f=ki(h=>{let _=c.entries.read(h)?.find(R=>R.modifiedURI.toString()===a.toString());_&&(_.isCurrentlyBeingModifiedBy.read(h)?I=!0:I&&g(!0))})}).finally(()=>{f.dispose()}),{content:[{kind:"text",value:"The file was edited successfully"}]}}async prepareToolInvocation(t,e){return{presentation:"hidden"}}};$m=L([P(0,Lm),P(1,C5),P(2,x5)],$m);var WC=class{constructor(t,e,n,o,i){this.questions=t;this.allowSkip=e;this.resolveId=n;this.data=o;this.isUsed=i;this.kind="questionCarousel";this.completion=new jn}toJSON(){return{kind:this.kind,questions:this.questions,allowSkip:this.allowSkip,resolveId:this.resolveId,data:this.data,isUsed:this.isUsed}}};var _5="vscode_askQuestions",P5={header:50,question:200},D5={header:75,question:300};function w5(r,t){if(r!==void 0)return r.length>t?r.slice(0,t-3)+"...":r}function rK(){let t={type:"object",properties:{questions:{type:"array",description:"List of questions to ask the user. Order is preserved.",items:{type:"object",properties:{header:{type:"string",description:"Short identifier for the question. Must be unique so answers can be mapped back to the question.",maxLength:P5.header},question:{type:"string",description:"The question text to display to the user. Keep it concise, ideally one sentence.",maxLength:P5.question},multiSelect:{type:"boolean",description:"Allow selecting multiple options when options are provided."},allowFreeformInput:{type:"boolean",description:"Allow freeform text answers in addition to option selection."},options:{type:"array",description:"Optional list of selectable answers. If omitted, the question is free text.",items:{type:"object",properties:{label:{type:"string",description:"Display label and value for the option."},description:{type:"string",description:"Optional secondary text shown with the option."},recommended:{type:"boolean",description:"Mark this option as the recommended default."}},required:["label"]}}},required:["header","question"]},minItems:1}},required:["questions"]};return{id:_5,toolReferenceName:"askQuestions",legacyToolReferenceFullNames:[_5,"vscode/askQuestions"],canBeReferencedInPrompt:!1,icon:Tt.fromId(fe.question.id),displayName:p(7443,null),userDescription:p(7444,null),modelDescription:"Use this tool to ask the user a small number of clarifying questions before proceeding. Provide the questions array with concise headers and prompts. Use options for fixed choices, set multiSelect when multiple selections are allowed, and set allowFreeformInput to let users supply their own answer.",source:So.Internal,inputSchema:t}}var oN=rK(),Gm=class extends K{constructor(e,n,o){super();this.chatService=e;this.telemetryService=n;this.logService=o}async invoke(e,n,o,i){let s=uo.create(!0),a=e.parameters,{questions:l}=a;if(this.logService.trace(`[AskQuestionsTool] Invoking with ${l?.length??0} question(s)`),!l||l.length===0)throw new Error(p(7441,null));let d=e.context?.sessionResource,c=e.chatRequestId,{request:u,sessionResource:f}=this.getRequest(d,c);if(!f||!u)return this.logService.warn("[AskQuestionsTool] Missing chat context; marking all questions as skipped."),this.createSkippedResult(l);let{carousel:g,idToHeaderMap:I}=this.toQuestionCarousel(l);this.chatService.appendProgress(u,g);let h=await eu(g.completion.p,i);if(i.isCancellationRequested)throw new Bt;o.report({message:p(7442,null)});let C=this.convertCarouselAnswers(l,h?.answers,I),{answeredCount:_,skippedCount:R,freeTextCount:O,recommendedAvailableCount:U,recommendedSelectedCount:ie}=this.collectMetrics(l,C);this.sendTelemetry(e.chatRequestId,l.length,_,R,O,U,ie,s.elapsed());let Y=JSON.stringify(C);return this.logService.trace(`[AskQuestionsTool] Returning tool result with metrics: questions=${l.length}, answered=${_}, skipped=${R}, freeText=${O}, recommendedAvailable=${U}, recommendedSelected=${ie}`),{content:[{kind:"text",value:Y}]}}async prepareToolInvocation(e,n){let o=e.parameters,{questions:i}=o;if(!i||i.length===0)throw new Error(p(7441,null));for(let c of i){if(c.options&&c.options.length===1)throw new Error(p(7436,null,c.header));c.question=w5(c.question,D5.question)??c.question}let s=i.length,a=i.map(c=>c.header).join(", "),l=s===1?p(7439,null,a):p(7437,null,s,a),d=s===1?p(7440,null,a):p(7438,null,s,a);return{invocationMessage:new Yn(l),pastTenseMessage:new Yn(d)}}getRequest(e,n){if(!e)return{request:void 0,sessionResource:void 0};let o=this.chatService.getSession(e),i;return o&&(n&&(i=o.getRequests().find(s=>s.id===n)),i||(i=o.getRequests().at(-1))),i?{request:i,sessionResource:e}:{request:void 0,sessionResource:e}}toQuestionCarousel(e){let n=new Map,o=e.map(i=>this.toChatQuestion(i,n));return{carousel:new WC(o,!0,ct()),idToHeaderMap:n}}toChatQuestion(e,n){let o;!e.options||e.options.length===0?o="text":e.multiSelect?o="multiSelect":o="singleSelect";let i;if(e.options){let l=e.options.filter(d=>d.recommended);l.length>0&&(i=e.multiSelect?l.map(d=>d.label):l[0].label)}let s=ct();n.set(s,e.header);let a=w5(e.header,D5.header)??e.header;return{id:s,type:o,title:a,message:e.question,options:e.options?.map(l=>({id:l.label,label:l.description?`${l.label} - ${l.description}`:l.label,value:l.label})),defaultValue:i,allowFreeformInput:e.allowFreeformInput??!1}}convertCarouselAnswers(e,n,o){let i={answers:{}};n&&(this.logService.trace(`[AskQuestionsTool] Carousel answer keys: ${Object.keys(n).join(", ")}`),this.logService.trace(`[AskQuestionsTool] Question headers: ${e.map(a=>a.header).join(", ")}`));let s=new Map;for(let[a,l]of o)s.set(l,a);for(let a of e){if(!n){i.answers[a.header]={selected:[],freeText:null,skipped:!0};continue}let l=s.get(a.header),d=l?n[l]:void 0;if(this.logService.trace(`[AskQuestionsTool] Processing question "${a.header}" (internal ID: ${l}), raw answer: ${JSON.stringify(d)}, type: ${typeof d}`),d===void 0)i.answers[a.header]={selected:[],freeText:null,skipped:!0};else if(typeof d=="string")a.options?.some(c=>c.label===d)?i.answers[a.header]={selected:[d],freeText:null,skipped:!1}:i.answers[a.header]={selected:[],freeText:d,skipped:!1};else if(Array.isArray(d))i.answers[a.header]={selected:d.map(c=>String(c)),freeText:null,skipped:!1};else if(typeof d=="object"&&d!==null){let c=d,u=typeof c.freeformValue=="string"&&c.freeformValue?c.freeformValue:null,f=Array.isArray(c.selectedValues)?c.selectedValues.map(h=>String(h)):void 0,g=c.selectedValue,I=typeof c.label=="string"?c.label:void 0;f?i.answers[a.header]={selected:f,freeText:u,skipped:!1}:typeof g=="string"?a.options?.some(h=>h.label===g)?i.answers[a.header]={selected:[g],freeText:u,skipped:!1}:i.answers[a.header]={selected:[],freeText:u??g,skipped:!1}:Array.isArray(g)?i.answers[a.header]={selected:g.map(h=>String(h)),freeText:u,skipped:!1}:g==null?u?i.answers[a.header]={selected:[],freeText:u,skipped:!1}:i.answers[a.header]={selected:[],freeText:null,skipped:!0}:u?i.answers[a.header]={selected:[],freeText:u,skipped:!1}:I?i.answers[a.header]={selected:[I],freeText:null,skipped:!1}:(this.logService.warn(`[AskQuestionsTool] Unknown answer object format for "${a.header}": ${JSON.stringify(d)}`),i.answers[a.header]={selected:[],freeText:null,skipped:!0})}else this.logService.warn(`[AskQuestionsTool] Unknown answer format for "${a.header}": ${typeof d}`),i.answers[a.header]={selected:[],freeText:null,skipped:!0}}return i}collectMetrics(e,n){let o=Object.values(n.answers),i=o.filter(c=>!c.skipped).length,s=o.filter(c=>c.skipped).length,a=o.filter(c=>c.freeText!==null).length,l=e.filter(c=>c.options?.some(u=>u.recommended)).length,d=e.filter(c=>{let u=n.answers[c.header],f=c.options?.find(g=>g.recommended);return u&&!u.skipped&&f&&u.selected.includes(f.label)}).length;return{answeredCount:i,skippedCount:s,freeTextCount:a,recommendedAvailableCount:l,recommendedSelectedCount:d}}createSkippedResult(e){let n={};for(let o of e)n[o.header]={selected:[],freeText:null,skipped:!0};return{content:[{kind:"text",value:JSON.stringify({answers:n})}]}}sendTelemetry(e,n,o,i,s,a,l,d){this.telemetryService.publicLog2("askQuestionsToolInvoked",{requestId:e,questionCount:n,answeredCount:o,skippedCount:i,freeTextCount:s,recommendedAvailableCount:a,recommendedSelectedCount:l,duration:d})}};Gm=L([P(0,Lm),P(1,Li),P(2,be)],Gm);var iK="vscode_get_confirmation",sK="vscode_get_confirmation_with_options",R5={id:iK,displayName:"Confirmation Tool",modelDescription:"A tool that demonstrates different types of confirmations. Takes a title, message, and confirmation type (basic or terminal).",source:So.Internal,inputSchema:{type:"object",properties:{title:{type:"string",description:"Title for the confirmation dialog"},message:{type:"string",description:"Message to show in the confirmation dialog"},confirmationType:{type:"string",enum:["basic","terminal"],description:"Type of confirmation to show - basic for simple confirmation, terminal for terminal command confirmation"},terminalCommand:{type:"string",description:'Terminal command to show (only used when confirmationType is "terminal")'}},required:["title","message","confirmationType"],additionalProperties:!1}},k5={id:sK,displayName:"Confirmation Tool with Options",modelDescription:"A tool that demonstrates different types of confirmations. Takes a title, message, and buttons.",source:So.Internal,inputSchema:{type:"object",properties:{title:{type:"string",description:"Title for the confirmation dialog"},message:{type:"string",description:"Message to show in the confirmation dialog"},buttons:{type:"array",items:{type:"string"},description:"Custom button labels to display."}},required:["title","message","buttons"],additionalProperties:!1}},$C=class{async prepareToolInvocation(t,e){let n=t.parameters;if(!n.title||!n.message)throw new Error("Missing required parameters for ConfirmationTool");let o=n.confirmationType??"basic",i;return o==="terminal"?i={kind:"terminal",commandLine:{original:n.terminalCommand??""},language:"bash"}:i=void 0,{confirmationMessages:{title:n.title,message:new Yn(n.message),allowAutoConfirm:!(n.buttons||[]).length,customButtons:n.buttons},toolSpecificData:i,presentation:"hiddenAfterComplete"}}async invoke(t,e,n,o){return t.selectedCustomButton?{content:[{kind:"text",value:t.selectedCustomButton}]}:{content:[{kind:"text",value:"yes"}]}}};var GC=class r{constructor(t,e){this.storageService=e;this.id=r.COMMON_PREFIX+t}static{this.applicationMementos=new Map}static{this.profileMementos=new Map}static{this.workspaceMementos=new Map}static{this.COMMON_PREFIX="memento/"}getMemento(t,e){switch(t){case 1:{let n=r.workspaceMementos.get(this.id);return n||(n=new Zh(this.id,t,e,this.storageService),r.workspaceMementos.set(this.id,n)),n.getMemento()}case 0:{let n=r.profileMementos.get(this.id);return n||(n=new Zh(this.id,t,e,this.storageService),r.profileMementos.set(this.id,n)),n.getMemento()}case-1:{let n=r.applicationMementos.get(this.id);return n||(n=new Zh(this.id,t,e,this.storageService),r.applicationMementos.set(this.id,n)),n.getMemento()}}}onDidChangeValue(t,e){return this.storageService.onDidChangeValue(t,this.id,e)}saveMemento(){r.workspaceMementos.get(this.id)?.save(),r.profileMementos.get(this.id)?.save(),r.applicationMementos.get(this.id)?.save()}reloadMemento(t){let e;switch(t){case-1:e=r.applicationMementos.get(this.id);break;case 0:e=r.profileMementos.get(this.id);break;case 1:e=r.workspaceMementos.get(this.id);break}e?.reload()}static clear(t){switch(t){case 1:r.workspaceMementos.clear();break;case 0:r.profileMementos.clear();break;case-1:r.applicationMementos.clear();break}}},Zh=class{constructor(t,e,n,o){this.id=t;this.scope=e;this.target=n;this.storageService=o;this.mementoObj=this.doLoad()}doLoad(){try{return this.storageService.getObject(this.id,this.scope,{})}catch(t){Ct(`[memento]: failed to parse contents: ${t} (id: ${this.id}, scope: ${this.scope}, contents: ${this.storageService.get(this.id,this.scope)})`)}return{}}getMemento(){return this.mementoObj}reload(){for(let t of Object.getOwnPropertyNames(this.mementoObj))delete this.mementoObj[t];Object.assign(this.mementoObj,this.doLoad())}save(){qc(this.mementoObj)?this.storageService.remove(this.id,this.scope):this.storageService.store(this.id,this.mementoObj,this.scope,this.target)}};var A5=N("chatTodoListService"),ev=class{constructor(t){this.memento=new GC("chat-todo-list",t)}getSessionData(t){return this.memento.getMemento(1,1)[this.toKey(t)]||[]}setSessionData(t,e){let n=this.memento.getMemento(1,1);n[this.toKey(t)]=e,this.memento.saveMemento()}getTodoList(t){return this.getSessionData(t)}setTodoList(t,e){this.setSessionData(t,e)}migrateTodoList(t,e){let n=this.getSessionData(t);if(n.length>0){this.setSessionData(e,n);let o=this.memento.getMemento(1,1);delete o[this.toKey(t)],this.memento.saveMemento()}}toKey(t){return o2(t)}};ev=L([P(0,Ps)],ev);var zC=class extends K{constructor(e){super();this._onDidUpdateTodos=this._register(new D);this.onDidUpdateTodos=this._onDidUpdateTodos.event;this.todoListStorage=new ev(e)}getTodos(e){return this.todoListStorage.getTodoList(e)}setTodos(e,n){this.todoListStorage.setTodoList(e,n),this._onDidUpdateTodos.fire(e)}migrateTodos(e,n){this.todoListStorage.migrateTodoList(e,n),this._onDidUpdateTodos.fire(n)}};zC=L([P(0,Ps)],zC);var rN="manage_todo_list";function iN(){let r={type:"object",properties:{todoList:{type:"array",description:"Complete array of all todo items. Must include ALL items - both existing and new.",items:{type:"object",properties:{id:{type:"number",description:"Unique identifier for the todo. Use sequential numbers starting from 1."},title:{type:"string",description:"Concise action-oriented todo label (3-7 words). Displayed in UI."},status:{type:"string",enum:["not-started","in-progress","completed"],description:"not-started: Not begun | in-progress: Currently working (max 1) | completed: Fully finished with no blockers"}},required:["id","title","status"]}}},required:["todoList"]};return{id:rN,toolReferenceName:"todo",legacyToolReferenceFullNames:["todos"],canBeReferencedInPrompt:!0,icon:Tt.fromId(fe.checklist.id),displayName:p(7475,null),userDescription:p(7476,null),modelDescription:`Manage a structured todo list to track progress and plan tasks throughout your coding session. Use this tool VERY frequently to ensure task visibility and proper planning.

When to use this tool:
- Complex multi-step work requiring planning and tracking
- When user provides multiple tasks or requests (numbered/comma-separated)
- After receiving new instructions that require multiple steps
- BEFORE starting work on any todo (mark as in-progress)
- IMMEDIATELY after completing each todo (mark completed individually)
- When breaking down larger tasks into smaller actionable steps
- To give users visibility into your progress and planning

When NOT to use:
- Single, trivial tasks that can be completed in one step
- Purely conversational/informational requests
- When just reading files or performing simple searches

CRITICAL workflow:
1. Plan tasks by writing todo list with specific, actionable items
2. Mark ONE todo as in-progress before starting work
3. Complete the work for that specific todo
4. Mark that todo as completed IMMEDIATELY
5. Move to next todo and repeat

Todo states:
- not-started: Todo not yet begun
- in-progress: Currently working (limit ONE at a time)
- completed: Finished successfully

IMPORTANT: Mark todos completed as soon as they are done. Do not batch completions.`,source:So.Internal,inputSchema:r}}var bJe=iN(),zm=class extends K{constructor(e,n,o){super();this.chatTodoListService=e;this.logService=n;this.telemetryService=o}async invoke(e,n,o,i){let s=e.parameters,a=e.context?.sessionResource;if(!a&&s.operation==="read"&&s.chatSessionResource)try{a=E.parse(s.chatSessionResource)}catch(l){this.logService.error("ManageTodoListTool: Invalid chatSessionResource URI",l)}if(!a)return{content:[{kind:"text",value:"Error: No session resource available"}]};this.logService.debug(`ManageTodoListTool: Invoking with options ${JSON.stringify(s)}`);try{return s.operation==="read"?this.handleReadOperation(a):this.handleWriteOperation(s,a)}catch(l){return{content:[{kind:"text",value:`Error: ${l instanceof Error?l.message:"Unknown error"}`}]}}}async prepareToolInvocation(e,n){let o=e.parameters,i=e.chatSessionResource;if(!i)return;let s=this.chatTodoListService.getTodos(i),a;o.operation==="read"?a=p(7471,null):o.todoList&&(a=this.generatePastTenseMessage(s,o.todoList));let d=(o.todoList??s).map(c=>({id:c.id.toString(),title:c.title,status:c.status}));return{pastTenseMessage:new Yn(a??p(7474,null)),toolSpecificData:{kind:"todoList",todoList:d}}}generatePastTenseMessage(e,n){if(e.length===0)return n.length===1?p(7470,null):p(7469,null,n.length);let o=new Map(e.map(l=>[l.id,l])),i=n.filter(l=>{let d=o.get(l.id);return d&&d.status!=="in-progress"&&l.status==="in-progress"});if(i.length>0){let l=i[0],d=n.length,c=n.findIndex(u=>u.id===l.id)+1;return p(7472,null,l.title,c,d)}let s=n.filter(l=>{let d=o.get(l.id);return d&&d.status!=="completed"&&l.status==="completed"});if(s.length>0){let l=s[0],d=n.length,c=n.findIndex(u=>u.id===l.id)+1;return p(7468,null,l.title,c,d)}let a=n.filter(l=>!o.has(l.id));return a.length>0?a.length===1?p(7467,null):p(7466,null,a.length):p(7473,null)}handleRead(e,n){return e.length===0?"No todo list found.":`# Todo List

${this.formatTodoListAsMarkdownTaskList(e)}`}handleReadOperation(e){let n=this.chatTodoListService.getTodos(e),o=this.handleRead(n,e),i=this.calculateStatusCounts(n);return this.telemetryService.publicLog2("todoListToolInvoked",{operation:"read",notStartedCount:i.notStartedCount,inProgressCount:i.inProgressCount,completedCount:i.completedCount}),{content:[{kind:"text",value:o}]}}handleWriteOperation(e,n){if(!e.todoList)return{content:[{kind:"text",value:"Error: todoList is required for write operation"}]};let o=e.todoList.map(d=>({id:d.id,title:d.title,status:d.status})),i=this.chatTodoListService.getTodos(n),s=this.calculateTodoChanges(i,o);this.chatTodoListService.setTodos(n,o);let a=this.calculateStatusCounts(o),l=[];return o.length<3?l.push("Warning: Small todo list (<3 items). This task might not need a todo list."):o.length>10&&l.push("Warning: Large todo list (>10 items). Consider keeping the list focused and actionable."),s>3&&l.push("Warning: Did you mean to update so many todos at the same time? Consider working on them one by one."),this.telemetryService.publicLog2("todoListToolInvoked",{operation:"write",notStartedCount:a.notStartedCount,inProgressCount:a.inProgressCount,completedCount:a.completedCount}),{content:[{kind:"text",value:`Successfully wrote todo list${l.length?`

`+l.join(`
`):""}`}],toolMetadata:{warnings:l}}}calculateStatusCounts(e){let n=e.filter(s=>s.status==="not-started").length,o=e.filter(s=>s.status==="in-progress").length,i=e.filter(s=>s.status==="completed").length;return{notStartedCount:n,inProgressCount:o,completedCount:i}}formatTodoListAsMarkdownTaskList(e){return e.length===0?"":e.map(n=>{let o;switch(n.status){case"completed":o="[x]";break;case"in-progress":o="[-]";break;default:o="[ ]";break}return[`- ${o} ${n.title}`].join(`
`)}).join(`
`)}calculateTodoChanges(e,n){let o=0,i=Math.min(e.length,n.length);for(let d=0;d<i;d++){let c=e[d],u=n[d];(c.title!==u.title||c.status!==u.status)&&o++}let s=Math.max(0,n.length-e.length),a=Math.max(0,e.length-n.length);return s+a+o}};zm=L([P(0,A5),P(1,be),P(2,Li)],zm);var L5=N("chatAgentService"),qC=class extends K{constructor(e,n){super();this.contextKeyService=e;this.configurationService=n;this._agents=new Map;this._onDidChangeAgents=this._register(new D);this.onDidChangeAgents=this._onDidChangeAgents.event;this._agentsContextKeys=new Set;this._hasToolsAgent=!1;this._chatParticipantDetectionProviders=new Map;this._agentCompletionProviders=new Map;this._hasDefaultAgent=Yr.enabled.bindTo(this.contextKeyService),this._extensionAgentRegistered=Yr.extensionParticipantRegistered.bindTo(this.contextKeyService),this._defaultAgentRegistered=Yr.panelParticipantRegistered.bindTo(this.contextKeyService),this._register(e.onDidChangeContext(o=>{o.affectsSome(this._agentsContextKeys)&&this._updateContextKeys()}))}static{this.AGENT_LEADER="@"}registerAgent(e,n){if(this.getAgent(e))throw new Error(`Agent already registered: ${JSON.stringify(e)}`);let i=this,s=n.slashCommands;n={...n,get slashCommands(){return s.filter(l=>!l.when||i.contextKeyService.contextMatchesRules(Ut.deserialize(l.when)))}};let a={data:n};return this._agents.set(e,a),this._updateAgentsContextKeys(),this._updateContextKeys(),this._onDidChangeAgents.fire(void 0),ae(()=>{this._agents.delete(e),this._updateAgentsContextKeys(),this._updateContextKeys(),this._onDidChangeAgents.fire(void 0)})}_updateAgentsContextKeys(){this._agentsContextKeys.clear();for(let e of this._agents.values())if(e.data.when){let n=Ut.deserialize(e.data.when);for(let o of n?.keys()||[])this._agentsContextKeys.add(o)}}_updateContextKeys(){let e=!1,n=!1,o=!1;for(let i of this.getAgents())i.isDefault&&(i.isCore||(e=!0),i.id==="chat.setup"||i.id==="github.copilot.editsAgent"?o=!0:n=!0);this._defaultAgentRegistered.set(n),this._extensionAgentRegistered.set(e),o!==this._hasToolsAgent&&(this._hasToolsAgent=o,this._onDidChangeAgents.fire(this.getDefaultAgent("panel","agent")))}registerAgentImplementation(e,n){let o=this._agents.get(e);if(!o)throw new Error(`Unknown agent: ${JSON.stringify(e)}`);if(o.impl)throw new Error(`Agent already has implementation: ${JSON.stringify(e)}`);return o.data.isDefault&&this._hasDefaultAgent.set(!0),o.impl=n,this._onDidChangeAgents.fire(new qm(o.data,n)),ae(()=>{o.impl=void 0,this._onDidChangeAgents.fire(void 0),o.data.isDefault&&this._hasDefaultAgent.set(Lt.some(this._agents.values(),i=>i.data.isDefault&&!!i.impl))})}registerDynamicAgent(e,n){e.isDynamic=!0;let o={data:e,impl:n};return this._agents.set(e.id,o),this._onDidChangeAgents.fire(new qm(e,n)),ae(()=>{this._agents.delete(e.id),this._onDidChangeAgents.fire(void 0)})}registerAgentCompletionProvider(e,n){return this._agentCompletionProviders.set(e,n),{dispose:()=>{this._agentCompletionProviders.delete(e)}}}async getAgentCompletionItems(e,n,o){return await this._agentCompletionProviders.get(e)?.(n,o)??[]}updateAgent(e,n){let o=this._agents.get(e);if(!o?.impl)throw new Error(`No activated agent with id ${JSON.stringify(e)} registered`);o.data.metadata={...o.data.metadata,...n},this._onDidChangeAgents.fire(new qm(o.data,o.impl))}getDefaultAgent(e,n="ask"){return this._preferExtensionAgent(this.getActivatedAgents().filter(o=>n&&!o.modes.includes(n)?!1:!!o.isDefault&&o.locations.includes(e)))}get hasToolsAgent(){return!!this.configurationService.getValue("chat.agent.enabled")}getContributedDefaultAgent(e){return this._preferExtensionAgent(this.getAgents().filter(n=>!!n.isDefault&&n.locations.includes(e)))}_preferExtensionAgent(e){return l0(e,n=>!n.isCore)??e.at(-1)}getAgent(e,n=!1){if(!(!this._agentIsEnabled(e)&&!n))return this._agents.get(e)?.data}_agentIsEnabled(e){let n=typeof e=="string"?this._agents.get(e):e;return!n?.data.when||this.contextKeyService.contextMatchesRules(Ut.deserialize(n.data.when))}getAgentByFullyQualifiedId(e){let n=Lt.find(this._agents.values(),o=>aK(o.data)===e)?.data;if(!(n&&!this._agentIsEnabled(n.id)))return n}getAgents(){return Array.from(this._agents.values()).map(e=>e.data).filter(e=>this._agentIsEnabled(e.id))}getActivatedAgents(){return Array.from(this._agents.values()).filter(e=>!!e.impl).filter(e=>this._agentIsEnabled(e.data.id)).map(e=>new qm(e.data,e.impl))}getAgentsByName(e){return this._preferExtensionAgents(this.getAgents().filter(n=>n.name===e))}_preferExtensionAgents(e){let n=e.filter(o=>!o.isCore);return n.length>0?n:e}agentHasDupeName(e){let n=this.getAgent(e);return n?this.getAgentsByName(n.name).filter(o=>o.extensionId.value!==n.extensionId.value).length>0:!1}async invokeAgent(e,n,o,i,s){let a=this._agents.get(e);if(!a?.impl)throw new Error(`No activated agent with id "${e}"`);return await a.impl.invoke(n,o,i,s)}setRequestTools(e,n,o){let i=this._agents.get(e);if(!i?.impl)throw new Error(`No activated agent with id "${e}"`);i.impl.setRequestTools?.(n,o)}setYieldRequested(e,n,o){let i=this._agents.get(e);i?.impl&&i.impl.setYieldRequested?.(n,o)}async getFollowups(e,n,o,i,s){let a=this._agents.get(e);return a?.impl?.provideFollowups?a.impl.provideFollowups(n,o,i,s):[]}async getChatTitle(e,n,o){let i=this._agents.get(e);if(i?.impl?.provideChatTitle)return i.impl.provideChatTitle(n,o)}async getChatSummary(e,n,o){let i=this._agents.get(e);if(i?.impl?.provideChatSummary)return i.impl.provideChatSummary(n,o)}registerChatParticipantDetectionProvider(e,n){return this._chatParticipantDetectionProviders.set(e,n),ae(()=>{this._chatParticipantDetectionProviders.delete(e)})}hasChatParticipantDetectionProviders(){return this._chatParticipantDetectionProviders.size>0}async detectAgentOrCommand(e,n,o,i){let s=Lt.first(this._chatParticipantDetectionProviders.values());if(!s)return;let a=this.getAgents().reduce((u,f)=>{if(f.locations.includes(o.location)){u.push({participant:f.id,disambiguation:f.disambiguation??[]});for(let g of f.slashCommands)u.push({participant:f.id,command:g.name,disambiguation:g.disambiguation??[]})}return u},[]),l=await s.provideParticipantDetection(e,n,{...o,participants:a},i);if(!l)return;let d=this.getAgent(l.participant);if(!d)return;if(!l.command)return{agent:d};let c=d?.slashCommands.find(u=>u.name===l.command);if(c)return{agent:d,command:c}}};qC=L([P(0,Ir),P(1,to)],qC);var qm=class{constructor(t,e){this.data=t;this.impl=e}get id(){return this.data.id}get name(){return this.data.name??""}get fullName(){return this.data.fullName??""}get description(){return this.data.description??""}get extensionId(){return this.data.extensionId}get extensionVersion(){return this.data.extensionVersion}get extensionPublisherId(){return this.data.extensionPublisherId}get extensionPublisherDisplayName(){return this.data.publisherDisplayName}get extensionDisplayName(){return this.data.extensionDisplayName}get isDefault(){return this.data.isDefault}get isCore(){return this.data.isCore}get metadata(){return this.data.metadata}get slashCommands(){return this.data.slashCommands}get locations(){return this.data.locations}get modes(){return this.data.modes}get disambiguation(){return this.data.disambiguation}async invoke(t,e,n,o){return this.impl.invoke(t,e,n,o)}setRequestTools(t,e){this.impl.setRequestTools?.(t,e)}setYieldRequested(t,e){this.impl.setYieldRequested?.(t,e)}async provideFollowups(t,e,n,o){return this.impl.provideFollowups?this.impl.provideFollowups(t,e,n,o):[]}toJSON(){return this.data}},FJe=N("chatAgentNameService"),KC=class{constructor(t){this.languageModelsService=t}getAgentNameRestriction(t){if(t.isCore)return!0;let e=this.checkAgentNameRestriction(t.name,t).get(),n=!t.fullName||this.checkAgentNameRestriction(t.fullName.replace(/\s/g,""),t).get();return e&&n}checkAgentNameRestriction(t,e){return this.languageModelsService.restrictedChatParticipants.map(o=>o[t.toLowerCase()]).map(o=>o?o.some(i=>Jn(i,i.includes(".")?e.extensionId.value:e.extensionPublisherId)):!0)}};KC=L([P(0,_I)],KC);function aK(r){return`${r.extensionId.value}.${r.id}`}var M5=N("labelService");var JC=N("IPromptsService");var{basename:dK,dirname:N5}=qe,cK=".prompt.md",uK=".instructions.md",pK=".chatmode.md",mK=".agent.md",fK="SKILL.md";var gK="copilot-instructions.md",hK=".github/prompts",vK=".github/instructions";var U5=".github/agents",jC=".claude/agents",sN=".claude/rules";var bK=[{path:".github/skills",source:"github-workspace",storage:"local"},{path:".agents/skills",source:"agents-workspace",storage:"local"},{path:".claude/skills",source:"claude-workspace",storage:"local"},{path:"~/.copilot/skills",source:"copilot-personal",storage:"user"},{path:"~/.agents/skills",source:"agents-personal",storage:"user"},{path:"~/.claude/skills",source:"claude-personal",storage:"user"}],IK=[{path:vK,source:"github-workspace",storage:"local"},{path:sN,source:"claude-workspace",storage:"local"},{path:"~/.copilot/instructions",source:"copilot-personal",storage:"user"},{path:"~/"+sN,source:"claude-personal",storage:"user"}],yK=[{path:hK,source:"github-workspace",storage:"local"}],EK=[{path:U5,source:"github-workspace",storage:"local"},{path:jC,source:"claude-workspace",storage:"local"},{path:"~/"+jC,source:"claude-personal",storage:"user"}],SK=[{path:".github/hooks",source:"github-workspace",storage:"local"},{path:".claude/settings.local.json",source:"claude-workspace-local",storage:"local"},{path:".claude/settings.json",source:"claude-workspace",storage:"local"},{path:"~/.claude/settings.json",source:"claude-personal",storage:"user"}];function xK(r){let t=N5(r.path);return t.endsWith("/"+U5)||t.endsWith("/"+jC)}function F5(r){return N5(r.path).endsWith("/"+jC)}function aN(r){return r.path.includes("/"+sN+"/")}function CK(r){let t=dK(r.path);if(t.endsWith(cK))return"prompt";if(t.endsWith(uK)||t===gK)return"instructions";if(t.endsWith(pK)||t.endsWith(mK))return"agent";if(t.toLowerCase()===fK.toLowerCase())return"skill";if(t.endsWith(".md")&&t!=="README.md"&&xK(r))return"agent";if(t.endsWith(".md")&&t!=="README.md"&&aN(r))return"instructions";if(t.toLowerCase().endsWith(".json"))return"hook"}function lN(r){return CK(r)!==void 0}function H5(r){switch(r){case"instructions":return IK;case"prompt":return yK;case"agent":return EK;case"skill":return bK;case"hook":return SK;default:throw new Error("Unknown prompt type")}}var vi;(U=>{U.PROMPT_LOCATIONS_KEY="chat.promptFilesLocations",U.INSTRUCTIONS_LOCATION_KEY="chat.instructionsFilesLocations",U.MODE_LOCATION_KEY="chat.modeFilesLocations",U.AGENTS_LOCATION_KEY="chat.agentFilesLocations",U.SKILLS_LOCATION_KEY="chat.agentSkillsLocations",U.HOOKS_LOCATION_KEY="chat.hookFilesLocations",U.PROMPT_FILES_SUGGEST_KEY="chat.promptFilesRecommendations",U.USE_COPILOT_INSTRUCTION_FILES="github.copilot.chat.codeGeneration.useInstructionFiles",U.USE_AGENT_MD="chat.useAgentsMdFile",U.USE_NESTED_AGENT_MD="chat.useNestedAgentsMdFiles",U.USE_CLAUDE_MD="chat.useClaudeMdFile",U.USE_AGENT_SKILLS="chat.useAgentSkills",U.USE_CHAT_HOOKS="chat.useHooks",U.USE_CLAUDE_HOOKS="chat.useClaudeHooks",U.USE_SKILL_ADHERENCE_PROMPT="chat.experimental.useSkillAdherencePrompt",U.INCLUDE_APPLYING_INSTRUCTIONS="chat.includeApplyingInstructions",U.INCLUDE_REFERENCED_INSTRUCTIONS="chat.includeReferencedInstructions";function _(ie,Y){let Z=TK(Y),ee=ie.getValue(Z);if(!(ee==null||Array.isArray(ee))&&typeof ee=="object"){let oe={};for(let[ke,B]of Object.entries(ee)){let Xe=ke.trim(),it=B5(B);it!==void 0&&Xe&&(oe[Xe]=it)}return oe}}U.getLocationsValue=_;function R(ie,Y){let Z=_(ie,Y),ee=H5(Y);if(Z&&typeof Z=="object"){let oe=[],ke=new Set(ee.map(B=>B.path));for(let B of ee)Z[B.path]!==!1&&oe.push(B);for(let[B,Xe]of Object.entries(Z)){if(Xe===!1||ke.has(B))continue;let it=_K(B)?"user":"local";oe.push({path:B,source:it==="local"?"config-personal":"config-workspace",storage:it})}return oe}return[]}U.promptSourceFolders=R;function O(ie,Y){let Z=ie.getValue(U.PROMPT_FILES_SUGGEST_KEY,{resource:Y});if(!Z||typeof Z!="object"||Array.isArray(Z))return;let ee={};for(let[oe,ke]of Object.entries(Z)){let B=oe.trim();if(!B)continue;if(typeof ke=="boolean"){ee[B]=ke;continue}if(typeof ke=="string"){let it=ke.trim();it&&(ee[B]=it);continue}let Xe=B5(ke);Xe!==void 0&&(ee[B]=Xe)}return Object.keys(ee).length>0?ee:void 0}U.getPromptFilesRecommendationsValue=O})(vi||={});function TK(r){switch(r){case"instructions":return vi.INSTRUCTIONS_LOCATION_KEY;case"prompt":return vi.PROMPT_LOCATIONS_KEY;case"agent":return vi.AGENTS_LOCATION_KEY;case"skill":return vi.SKILLS_LOCATION_KEY;case"hook":return vi.HOOKS_LOCATION_KEY;default:throw new Error("Unknown prompt type")}}function B5(r){if(typeof r=="boolean")return r;if(typeof r=="string"){let t=r.trim().toLowerCase();return t==="true"?!0:t==="false"?!1:void 0}}function _K(r){return r.startsWith("~/")}var QC=class r{constructor(t,e){this.start=t;this.endExclusive=e;if(t>e)throw new Nt(`Invalid range: ${this.toString()}`)}static fromTo(t,e){return new r(t,e)}static equals(t,e){return t.start===e.start&&t.endExclusive===e.endExclusive}static addRange(t,e){let n=0;for(;n<e.length&&e[n].endExclusive<t.start;)n++;let o=n;for(;o<e.length&&e[o].start<=t.endExclusive;)o++;if(n===o)e.splice(n,0,t);else{let i=Math.min(t.start,e[n].start),s=Math.max(t.endExclusive,e[o-1].endExclusive);e.splice(n,o-n,new r(i,s))}}static tryCreate(t,e){if(!(t>e))return new r(t,e)}static ofLength(t){return new r(0,t)}static ofStartAndLength(t,e){return new r(t,t+e)}static emptyAt(t){return new r(t,t)}get isEmpty(){return this.start===this.endExclusive}delta(t){return new r(this.start+t,this.endExclusive+t)}deltaStart(t){return new r(this.start+t,this.endExclusive)}deltaEnd(t){return new r(this.start,this.endExclusive+t)}get length(){return this.endExclusive-this.start}toString(){return`[${this.start}, ${this.endExclusive})`}equals(t){return this.start===t.start&&this.endExclusive===t.endExclusive}containsRange(t){return this.start<=t.start&&t.endExclusive<=this.endExclusive}contains(t){return this.start<=t&&t<this.endExclusive}join(t){return new r(Math.min(this.start,t.start),Math.max(this.endExclusive,t.endExclusive))}intersect(t){let e=Math.max(this.start,t.start),n=Math.min(this.endExclusive,t.endExclusive);if(e<=n)return new r(e,n)}intersectionLength(t){let e=Math.max(this.start,t.start),n=Math.min(this.endExclusive,t.endExclusive);return Math.max(0,n-e)}intersects(t){let e=Math.max(this.start,t.start),n=Math.min(this.endExclusive,t.endExclusive);return e<n}intersectsOrTouches(t){let e=Math.max(this.start,t.start),n=Math.min(this.endExclusive,t.endExclusive);return e<=n}isBefore(t){return this.endExclusive<=t.start}isAfter(t){return this.start>=t.endExclusive}slice(t){return t.slice(this.start,this.endExclusive)}substring(t){return t.substring(this.start,this.endExclusive)}clip(t){if(this.isEmpty)throw new Nt(`Invalid clipping range: ${this.toString()}`);return Math.max(this.start,Math.min(this.endExclusive-1,t))}clipCyclic(t){if(this.isEmpty)throw new Nt(`Invalid clipping range: ${this.toString()}`);return t<this.start?this.endExclusive-(this.start-t)%this.length:t>=this.endExclusive?this.start+(t-this.start)%this.length:t}map(t){let e=[];for(let n=this.start;n<this.endExclusive;n++)e.push(t(n));return e}forEach(t){for(let e=this.start;e<this.endExclusive;e++)t(e)}joinRightTouching(t){if(this.endExclusive!==t.start)throw new Nt(`Invalid join: ${this.toString()} and ${t.toString()}`);return new r(this.start,t.endExclusive)}withMargin(t,e){return e===void 0&&(e=t),new r(this.start-t,this.endExclusive+e)}};function PK(){return{applyingInstructionsCount:0,referencedInstructionsCount:0,agentInstructionsCount:0,listedInstructionsCount:0,totalInstructionsCount:0,claudeRulesCount:0,claudeMdCount:0,claudeAgentsCount:0}}var Km=class{constructor(t,e,n,o,i,s,a,l,d,c,u,f,g){this._modeKind=t;this._enabledTools=e;this._enabledSubagents=n;this._sessionResource=o;this._promptsService=i;this._logService=s;this._labelService=a;this._configurationService=l;this._workspaceService=d;this._fileService=c;this._remoteAgentService=u;this._telemetryService=f;this._languageModelToolsService=g;this._parseResults=new et}async _parseInstructionsFile(t,e){if(this._parseResults.has(t))return this._parseResults.get(t);try{let n=await this._promptsService.parseNew(t,e);return this._parseResults.set(t,n),n}catch(n){this._logService.error(`[InstructionsContextComputer] Failed to parse instruction file: ${t}`,n);return}}async collect(t,e){let n=await this._promptsService.getInstructionFiles(e,this._sessionResource);this._logService.trace(`[InstructionsContextComputer] ${n.length} instruction files available.`);let o=PK(),i=this._getContext(t);await this.addApplyingInstructions(n,i,t,o,e),await this._addReferencedInstructions(t,o,e),await this._addAgentInstructions(t,o,e);let s=await this._getInstructionsWithPatternsList(n,t,o,e);s&&(t.add(s),o.listedInstructionsCount++),this.sendTelemetry(o)}sendTelemetry(t){t.totalInstructionsCount=t.agentInstructionsCount+t.referencedInstructionsCount+t.applyingInstructionsCount+t.listedInstructionsCount,this._telemetryService.publicLog2("instructionsCollected",t)}async addApplyingInstructions(t,e,n,o,i){if(!this._configurationService.getValue(vi.INCLUDE_APPLYING_INSTRUCTIONS)&&this._modeKind!=="edit"){this._logService.trace("[InstructionsContextComputer] includeApplyingInstructions is disabled and agent kind is not Edit. No applying instructions will be added.");return}for(let{uri:a}of t){let l=await this._parseInstructionsFile(a,i);if(!l){this._logService.trace(`[InstructionsContextComputer] Unable to read: ${a}`);continue}let d=l.header?.applyTo,c=l.header?.paths,u=aN(a),f=u?c?.join(", ")??"**":d;if(!f){this._logService.trace(`[InstructionsContextComputer] No 'applyTo' found: ${a}`);continue}if(e.instructions.has(a)){this._logService.trace(`[InstructionsContextComputer] Skipping already processed instruction file: ${a}`);continue}let g=this._matches(e.files,f);if(g){this._logService.trace(`[InstructionsContextComputer] Match for ${a} with ${g.pattern}${g.file?` for file ${g.file}`:""}`);let I=g.file?p(7215,null,f,this._labelService.getUriLabel(g.file,{relative:!0})):p(7213,null);n.add(Kb(a,"vscode.prompt.instructions.root",I,!0)),o.applyingInstructionsCount++,u&&o.claudeRulesCount++}else this._logService.trace(`[InstructionsContextComputer] No match for ${a} with ${f}`)}}_getContext(t){let e=new ur,n=new ur;for(let o of t.asArray())if(lg(o))n.add(o.value);else{let i=KD.toUri(o);i&&e.add(i)}return{files:e,instructions:n}}async _addAgentInstructions(t,e,n){let o={logInfo:l=>this._logService.trace(`[InstructionsContextComputer] ${l}`)},i=await this._promptsService.listAgentInstructions(n,o),s=new Sd,a=new Sd;for(let{uri:l,type:d}of i){let c=Kb(l,"vscode.prompt.instructions.root",void 0,!0);s.add(c),d==="copilotInstructionsMd"&&a.add(c),e.agentInstructionsCount++,d==="claudeMd"&&e.claudeMdCount++,o.logInfo(`Agent instruction file added: ${l.toString()}`)}if(a.length>0){await this._addReferencedInstructions(a,e,n);for(let l of a.asArray())t.add(l)}for(let l of s.asArray())t.add(l)}_getApplyToPattern(t,e){if(t)return t;if(e&&e.length>0)return e.join(", ")}_matches(t,e){let n=ku(e,","),o=i=>{if(i=i.trim(),i.length!==0){if(i==="**"||i==="**/*"||i==="*")return{pattern:i};!i.startsWith("/")&&!i.startsWith("**/")&&(i="**/"+i);for(let s of t)if(Zr(i,s.path,{ignoreCase:!0}))return{pattern:i,file:s}}};for(let i of n){let s=o(i);if(s)return s}}_getTool(t){if(!this._enabledTools)return;let e=this._languageModelToolsService.getToolByName(t);if(e&&this._enabledTools[e.id])return{tool:e,variable:`#tool:${this._languageModelToolsService.getFullReferenceName(e)}`}}async _getInstructionsWithPatternsList(t,e,n,o){let i=this._getTool("readFile"),s=this._getTool(gg.runSubagent),l=(await this._remoteAgentService.getEnvironment())?.os,d=I=>DK(I,l),c=[];if(i){let h=this._configurationService.getValue(vi.USE_NESTED_AGENT_MD)?this._promptsService.listNestedAgentMDs(o):Promise.resolve([]);c.push("<instructions>"),c.push("Here is a list of instruction files that contain rules for working with this codebase."),c.push("These files are important for understanding the codebase structure, conventions, and best practices."),c.push("Please make sure to follow the rules specified in these files when working with the codebase."),c.push(`If the file is not already available as attachment, use the ${i.variable} tool to acquire it.`),c.push("Make sure to acquire the instructions before working with the codebase.");let C=!1;for(let{uri:U}of t){let ie=await this._parseInstructionsFile(U,o);if(ie){if(c.push("<instruction>"),ie.header){let{description:Y,applyTo:Z,paths:ee}=ie.header;Y&&c.push(`<description>${Y}</description>`),c.push(`<file>${d(U)}</file>`);let oe=this._getApplyToPattern(Z,ee);oe&&c.push(`<applyTo>${oe}</applyTo>`)}else c.push(`<file>${d(U)}</file>`);c.push("</instruction>"),C=!0}}let _=await h;for(let{uri:U}of _){let ie=this._labelService.getUriLabel(bs(U),{relative:!0}),Y=ie.trim().length===0?p(7212,null):p(7211,null,ie);c.push("<instruction>"),c.push(`<description>${Y}</description>`),c.push(`<file>${d(U)}</file>`),c.push("</instruction>"),C=!0}C?c.push("</instructions>","",""):c.length=0;let O=(await this._promptsService.findAgentSkills(o,this._sessionResource))?.filter(U=>!U.disableModelInvocation);if(O&&O.length>0){let U=this._configurationService.getValue(vi.USE_SKILL_ADHERENCE_PROMPT);c.push("<skills>"),U?(c.push("Skills provide specialized capabilities, domain knowledge, and refined workflows for producing high-quality outputs. Each skill folder contains tested instructions for specific domains like testing strategies, API design, or performance optimization. Multiple skills can be combined when a task spans different domains."),c.push(`BLOCKING REQUIREMENT: When a skill applies to the user's request, you MUST load and read the SKILL.md file IMMEDIATELY as your first action, BEFORE generating any other response or taking action on the task. Use ${i.variable} to load the relevant skill(s).`),c.push("NEVER just mention or reference a skill in your response without actually reading it first. If a skill is relevant, load it before proceeding."),c.push("How to determine if a skill applies:"),c.push("1. Review the available skills below and match their descriptions against the user's request"),c.push("2. If any skill's domain overlaps with the task, load that skill immediately"),c.push("3. When multiple skills apply (e.g., a flowchart in documentation), load all relevant skills"),c.push("Examples:"),c.push(`- "Help me write unit tests for this module" -> Load the testing skill via ${i.variable} FIRST, then proceed`),c.push(`- "Optimize this slow function" -> Load the performance-profiling skill via ${i.variable} FIRST, then proceed`),c.push('- "Add a discount code field to checkout" -> Load both the checkout-flow and form-validation skills FIRST'),c.push("Available skills:")):(c.push("Here is a list of skills that contain domain specific knowledge on a variety of topics."),c.push("Each skill comes with a description of the topic and a file path that contains the detailed instructions."),c.push(`When a user asks you to perform a task that falls within the domain of a skill, use the ${i.variable} tool to acquire the full instructions from the file URI.`));for(let ie of O)c.push("<skill>"),c.push(`<name>${ie.name}</name>`),ie.description&&c.push(`<description>${ie.description}</description>`),c.push(`<file>${d(ie.uri)}</file>`),c.push("</skill>");c.push("</skills>","","")}}if(s&&this._configurationService.getValue("chat.customAgentInSubagent.enabled")){let I=(()=>{if(!this._enabledSubagents||this._enabledSubagents.includes("*"))return C=>C.visibility.agentInvocable;{let C=this._enabledSubagents;return _=>C.includes(_.name)}})(),h=await this._promptsService.getCustomAgents(o,this._sessionResource);if(h.length>0){c.push("<agents>"),c.push("Here is a list of agents that can be used when running a subagent."),c.push("Each agent has optionally a description with the agent's purpose and expertise. When asked to run a subagent, choose the most appropriate agent from this list."),c.push(`Use the ${s.variable} tool with the agent name to run the subagent.`);for(let C of h)I(C)&&(c.push("<agent>"),c.push(`<name>${C.name}</name>`),C.description&&c.push(`<description>${C.description}</description>`),C.argumentHint&&c.push(`<argumentHint>${C.argumentHint}</argumentHint>`),c.push("</agent>"),F5(C.uri)&&n.claudeAgentsCount++);c.push("</agents>","","")}}if(c.length===0)return;let u=c.join(`
`),f=[],g=I=>{if(I){let h=u.indexOf(I.variable);for(;h>=0;)f.push(a2(I.tool,new QC(h,h+I.variable.length))),h=u.indexOf(I.variable,h+1)}};return g(i),g(s),s2(u,!0,f)}async _addReferencedInstructions(t,e,n){if(!this._configurationService.getValue(vi.INCLUDE_REFERENCED_INSTRUCTIONS)&&this._modeKind!=="edit"){this._logService.trace("[InstructionsContextComputer] includeReferencedInstructions is disabled and agent kind is not Edit. No referenced instructions will be added.");return}let i=new ur,s=[];for(let l of t.asArray())lg(l)&&(i.has(l.value)||(s.push(l.value),i.add(l.value)));let a=s.pop();for(;a;){let l=await this._parseInstructionsFile(a,n);if(l&&l.body){let d=[];for(let c of l.body.fileReferences){let u=l.body.resolveFilePath(c.content);u&&!i.has(u)&&(lN(u)||this._workspaceService.getWorkspaceFolder(u)!==void 0)&&(d.push({resource:u}),i.add(u))}if(d.length>0){let c=await this._fileService.resolveAll(d);for(let u=0;u<c.length;u++){let f=c[u],g=d[u].resource;if(f.success&&f.stat?.isFile){lN(g)&&s.push(g);let I=p(7214,null,tn(a));t.add(Kb(g,"vscode.prompt.instructions",I,!0)),e.referencedInstructionsCount++,this._logService.trace(`[InstructionsContextComputer] ${g.toString()} added, referenced by ${a.toString()}`)}}}}a=s.pop()}}};Km=L([P(4,JC),P(5,be),P(6,M5),P(7,to),P(8,Di),P(9,hd),P(10,lm),P(11,Li),P(12,Dd)],Km);function DK(r,t){if(r.scheme===X.file||r.scheme===X.vscodeRemote){let e=r.fsPath;return t!==void 0?t===1?e.replace(/\//g,"\\"):e.replace(/\\/g,"/"):e}return r.toString()}function XC(r){return{content:[{kind:"text",value:r}]}}var wK=`Launch a new agent to handle complex, multi-step tasks autonomously. This tool is good at researching complex questions, searching for code, and executing multi-step tasks. When you are searching for a keyword or file and are not confident that you will find the right match in the first few tries, use this agent to perform the search for you.

- Agents do not run async or in the background, you will wait for the agent's result.
- When the agent is done, it will return a single message back to you. The result returned by the agent is not visible to the user. To show the user the result, you should send a text message back to the user with a concise summary of the result.
- Each agent invocation is stateless. You will not be able to send additional messages to the agent, nor will the agent be able to communicate with you outside of its final report. Therefore, your prompt should contain a highly detailed task description for the agent to perform autonomously and you should specify exactly what information the agent should return back to you in its final and only message to you.
- The agent's outputs should generally be trusted
- Clearly tell the agent whether you expect it to write code or just to do research (search, file reads, web fetches, etc.), since it is not aware of the user's intent`,da=class extends K{constructor(e,n,o,i,s,a,l,d,c){super();this.chatAgentService=e;this.chatService=n;this.languageModelToolsService=o;this.languageModelsService=i;this.logService=s;this.toolsService=a;this.configurationService=l;this.promptsService=d;this.instantiationService=c;this._resolvedModels=new Map;this.onDidUpdateToolData=He.filter(this.configurationService.onDidChangeConfiguration,u=>u.affectsConfiguration("chat.customAgentInSubagent.enabled"))}static{this.Id="runSubagent"}getToolData(){let e=wK,n={type:"object",properties:{prompt:{type:"string",description:"A detailed description of the task for the agent to perform"},description:{type:"string",description:"A short (3-5 word) description of the task"}},required:["prompt","description"]};return this.configurationService.getValue("chat.customAgentInSubagent.enabled")&&(n.properties.agentName={type:"string",description:"Optional name of a specific agent to invoke. If not provided, uses the current agent."},e+=`
- If the user asks for a certain agent, you MUST provide that EXACT agent name (case-sensitive) to invoke that specific agent.`),{id:da.Id,toolReferenceName:gg.runSubagent,icon:Tt.fromId(fe.organization.id),displayName:p(7477,null),userDescription:p(7478,null),modelDescription:e,source:So.Internal,inputSchema:n}}async invoke(e,n,o,i){let s=e.parameters;if(this.logService.debug(`RunSubagentTool: Invoking with prompt: ${s.prompt.substring(0,100)}...`),!e.context)throw new Error("toolInvocationToken is required for this tool");let a=this.chatService.getSession(e.context.sessionResource);if(!a)throw new Error("Chat model not found for session");let l=a.getRequests().at(-1),d=new te;try{let c=this.chatAgentService.getDefaultAgent("panel","agent");if(!c)return XC("Error: No default agent available");let u=e.modelId,f=e.userSelectedTools,g,I,h,C=s.agentName;if(C)if(I=await this.getSubAgentByName(C),I){let B=this._resolvedModels.get(e.callId);if(B)this._resolvedModels.delete(e.callId),u=B.modeModelId,h=B.resolvedModelName;else{let Qe=this.resolveSubagentModel(I,e.modelId);u=Qe.modeModelId,h=Qe.resolvedModelName}let Xe=I.tools;if(Xe){let Qe=this.languageModelToolsService.toToolAndToolSetEnablementMap(Xe,void 0);f={};for(let[q,z]of Qe)A2(q)||(f[q.id]=z)}let it=I.agentInstructions;g=it&&{name:C,content:it.content,toolReferences:this.toolsService.toToolReferences(it.toolReferences),metadata:it.metadata}}else throw new Error(`Requested agent '${C}' not found. Try again with the correct agent name, or omit the agentName to use the current agent.`);else{let B=this._resolvedModels.get(e.callId);B?(this._resolvedModels.delete(e.callId),h=B.resolvedModelName):h=(u?this.languageModelsService.lookupLanguageModel(u):void 0)?.name}let _=[],R=e.callId??`subagent-${ct()}`,O=!1,U=B=>{for(let Xe of B)Xe.kind==="textEdit"||Xe.kind==="notebookEdit"||Xe.kind==="codeblockUri"?(Xe.kind==="codeblockUri"&&!O&&(O=!0,a.acceptResponseProgress(l,{kind:"markdownContent",content:new Yn("```\n")})),Xe.kind==="codeblockUri"?a.acceptResponseProgress(l,{...Xe,subAgentInvocationId:R}):a.acceptResponseProgress(l,Xe)):Xe.kind==="hook"?a.acceptResponseProgress(l,{...Xe,subAgentInvocationId:R}):Xe.kind==="markdownContent"&&(O&&(a.acceptResponseProgress(l,{kind:"markdownContent",content:new Yn("\n```\n\n")}),O=!1),_.push(Xe.content.value))};f&&(f[da.Id]=!1,f[rN]=!1,f.copilot_askQuestions=!1);let ie=new Sd;await this.instantiationService.createInstance(Km,"agent",f,void 0,e.context.sessionResource).collect(ie,i);let Z;try{Z=(await this.promptsService.getHooks(i,e.context.sessionResource))?.hooks}catch(B){this.logService.warn("[ChatService] Failed to collect hooks:",B)}let ee={sessionResource:e.context.sessionResource,requestId:e.callId??`subagent-${Date.now()}`,agentId:c.id,message:s.prompt,variables:{variables:ie.asArray()},location:"panel",subAgentInvocationId:e.callId,subAgentName:C,userSelectedModelId:u,userSelectedTools:f,modeInstructions:g,parentRequestId:e.chatRequestId,hooks:Z,hasHooksEnabled:!!Z&&Object.values(Z).some(B=>B.length>0)};d.add(this.languageModelToolsService.onDidInvokeTool(B=>{B.subagentInvocationId===R&&(_.length=0)}));let oe=await this.chatAgentService.invokeAgent(c.id,ee,U,[],i);if(oe.errorDetails)return XC(`Agent error: ${oe.errorDetails.message}`);let ke=_.join("").replace(/^\n*```\n+```\n*/g,"").trim()||"Agent completed with no output";return e.toolSpecificData?.kind==="subagent"&&(e.toolSpecificData.result=ke,e.toolSpecificData.modelName=h),{content:[{kind:"text",value:ke}],toolMetadata:{subAgentInvocationId:R,description:s.description,agentName:ee.subAgentName,modelName:h}}}catch(c){let u=`Error invoking subagent: ${c instanceof Error?c.message:"Unknown error"}`;return this.logService.error(u,c),XC(u)}finally{d.dispose()}}async getSubAgentByName(e){return(await this.promptsService.getCustomAgents(De.None)).find(o=>o.name===e)}resolveSubagentModel(e,n){let o=n;if(e){let s=e.model;if(s)e:for(let a of s){let l=this.languageModelsService.lookupLanguageModelByQualifiedName(a);if(l?.identifier){o=l.identifier;break e}}if(o&&o!==n){let a=n?this.languageModelsService.lookupLanguageModel(n):void 0,l=this.languageModelsService.lookupLanguageModel(o),d=a?.multiplierNumeric,c=l?.multiplierNumeric;d!==void 0&&c!==void 0&&c>d&&(this.logService.warn(`[RunSubagentTool] Subagent '${e.name}' requested model '${l?.name}' (multiplier: ${c}) which has a larger multiplier than the main agent model '${a?.name}' (multiplier: ${d}). Falling back to the main agent model.`),o=n)}}let i=o?this.languageModelsService.lookupLanguageModel(o):void 0;return{modeModelId:o,resolvedModelName:i?.name}}async prepareToolInvocation(e,n){let o=e.parameters,i=o.agentName?await this.getSubAgentByName(o.agentName):void 0,s=this.resolveSubagentModel(i,e.modelId);return this._resolvedModels.set(e.toolCallId,s),{invocationMessage:o.description,toolSpecificData:{kind:"subagent",description:o.description,agentName:i?.name,prompt:o.prompt,modelName:s.resolvedModelName}}}};da=L([P(0,L5),P(1,Lm),P(2,Dd),P(3,_I),P(4,be),P(5,Dd),P(6,to),P(7,JC),P(8,ko)],da);var YC=class extends K{static{this.ID="chat.builtinTools"}constructor(t,e){super();let n=e.createInstance($m);this._register(t.registerTool(T5,n));let o=this._register(e.createInstance(Gm));this._register(t.registerTool(oN,o)),this._register(t.vscodeToolSet.addTool(oN));let i=iN(),s=this._register(e.createInstance(zm));this._register(t.registerTool(i,s));let a=e.createInstance($C);this._register(t.registerTool(R5,a)),this._register(t.registerTool(k5,a));let l=this._register(e.createInstance(da)),d,c,u=()=>{d?.dispose(),c?.dispose(),t.flushToolUpdates();let f=l.getToolData();d=t.registerTool(f,l),c=t.agentToolSet.addTool(f)};u(),this._register(l.onDidUpdateToolData(u)),this._register({dispose:()=>{d?.dispose(),c?.dispose()}})}};YC=L([P(0,Dd),P(1,ko)],YC);var V5="vscode_fetchWebPage_internal";var dN=N("commandService"),tv=new class{constructor(){this._commands=new Map;this._onDidRegisterCommand=new D;this.onDidRegisterCommand=this._onDidRegisterCommand.event}registerCommand(r,t){if(!r)throw new Error("invalid command");if(typeof r=="string"){if(!t)throw new Error("invalid command");return this.registerCommand({id:r,handler:t})}if(r.metadata&&Array.isArray(r.metadata.args)){let s=[];for(let l of r.metadata.args)s.push(l.constraint);let a=r.handler;r.handler=function(l,...d){return _0(d,s),a(l,...d)}}let{id:e}=r,n=this._commands.get(e);n||(n=new co,this._commands.set(e,n));let o=n.unshift(r),i=ae(()=>{o(),this._commands.get(e)?.isEmpty()&&this._commands.delete(e)});return this._onDidRegisterCommand.fire(e),bf(i)}registerCommandAlias(r,t){return tv.registerCommand(r,(e,...n)=>e.get(dN).executeCommand(t,...n))}getCommand(r){let t=this._commands.get(r);if(!(!t||t.isEmpty()))return Lt.first(t)}getCommands(){let r=new Map;for(let t of this._commands.keys()){let e=this.getCommand(t);e&&r.set(t,e)}return r}};tv.registerCommand("noop",()=>{});var nv=class{constructor(){this._keyCodeToStr=[],this._strToKeyCode=Object.create(null)}define(t,e){this._keyCodeToStr[t]=e,this._strToKeyCode[e.toLowerCase()]=t}keyCodeToStr(t){return this._keyCodeToStr[t]}strToKeyCode(t){return this._strToKeyCode[t.toLowerCase()]||0}},ZC=new nv,cN=new nv,uN=new nv,RK=new Array(230),kK={},AK={},OK=[],LK=Object.create(null),MK=Object.create(null);var W5=[],pN=[];for(let r=0;r<=193;r++)W5[r]=-1;for(let r=0;r<=132;r++)pN[r]=-1;(function(){let t=[[1,0,"None",0,"unknown",0,"VK_UNKNOWN","",""],[1,1,"Hyper",0,"",0,"","",""],[1,2,"Super",0,"",0,"","",""],[1,3,"Fn",0,"",0,"","",""],[1,4,"FnLock",0,"",0,"","",""],[1,5,"Suspend",0,"",0,"","",""],[1,6,"Resume",0,"",0,"","",""],[1,7,"Turbo",0,"",0,"","",""],[1,8,"Sleep",0,"",0,"VK_SLEEP","",""],[1,9,"WakeUp",0,"",0,"","",""],[0,10,"KeyA",31,"A",65,"VK_A","",""],[0,11,"KeyB",32,"B",66,"VK_B","",""],[0,12,"KeyC",33,"C",67,"VK_C","",""],[0,13,"KeyD",34,"D",68,"VK_D","",""],[0,14,"KeyE",35,"E",69,"VK_E","",""],[0,15,"KeyF",36,"F",70,"VK_F","",""],[0,16,"KeyG",37,"G",71,"VK_G","",""],[0,17,"KeyH",38,"H",72,"VK_H","",""],[0,18,"KeyI",39,"I",73,"VK_I","",""],[0,19,"KeyJ",40,"J",74,"VK_J","",""],[0,20,"KeyK",41,"K",75,"VK_K","",""],[0,21,"KeyL",42,"L",76,"VK_L","",""],[0,22,"KeyM",43,"M",77,"VK_M","",""],[0,23,"KeyN",44,"N",78,"VK_N","",""],[0,24,"KeyO",45,"O",79,"VK_O","",""],[0,25,"KeyP",46,"P",80,"VK_P","",""],[0,26,"KeyQ",47,"Q",81,"VK_Q","",""],[0,27,"KeyR",48,"R",82,"VK_R","",""],[0,28,"KeyS",49,"S",83,"VK_S","",""],[0,29,"KeyT",50,"T",84,"VK_T","",""],[0,30,"KeyU",51,"U",85,"VK_U","",""],[0,31,"KeyV",52,"V",86,"VK_V","",""],[0,32,"KeyW",53,"W",87,"VK_W","",""],[0,33,"KeyX",54,"X",88,"VK_X","",""],[0,34,"KeyY",55,"Y",89,"VK_Y","",""],[0,35,"KeyZ",56,"Z",90,"VK_Z","",""],[0,36,"Digit1",22,"1",49,"VK_1","",""],[0,37,"Digit2",23,"2",50,"VK_2","",""],[0,38,"Digit3",24,"3",51,"VK_3","",""],[0,39,"Digit4",25,"4",52,"VK_4","",""],[0,40,"Digit5",26,"5",53,"VK_5","",""],[0,41,"Digit6",27,"6",54,"VK_6","",""],[0,42,"Digit7",28,"7",55,"VK_7","",""],[0,43,"Digit8",29,"8",56,"VK_8","",""],[0,44,"Digit9",30,"9",57,"VK_9","",""],[0,45,"Digit0",21,"0",48,"VK_0","",""],[1,46,"Enter",3,"Enter",13,"VK_RETURN","",""],[1,47,"Escape",9,"Escape",27,"VK_ESCAPE","",""],[1,48,"Backspace",1,"Backspace",8,"VK_BACK","",""],[1,49,"Tab",2,"Tab",9,"VK_TAB","",""],[1,50,"Space",10,"Space",32,"VK_SPACE","",""],[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,"",0,"","",""],[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","",""],[1,64,"F1",59,"F1",112,"VK_F1","",""],[1,65,"F2",60,"F2",113,"VK_F2","",""],[1,66,"F3",61,"F3",114,"VK_F3","",""],[1,67,"F4",62,"F4",115,"VK_F4","",""],[1,68,"F5",63,"F5",116,"VK_F5","",""],[1,69,"F6",64,"F6",117,"VK_F6","",""],[1,70,"F7",65,"F7",118,"VK_F7","",""],[1,71,"F8",66,"F8",119,"VK_F8","",""],[1,72,"F9",67,"F9",120,"VK_F9","",""],[1,73,"F10",68,"F10",121,"VK_F10","",""],[1,74,"F11",69,"F11",122,"VK_F11","",""],[1,75,"F12",70,"F12",123,"VK_F12","",""],[1,76,"PrintScreen",0,"",0,"","",""],[1,77,"ScrollLock",84,"ScrollLock",145,"VK_SCROLL","",""],[1,78,"Pause",7,"PauseBreak",19,"VK_PAUSE","",""],[1,79,"Insert",19,"Insert",45,"VK_INSERT","",""],[1,80,"Home",14,"Home",36,"VK_HOME","",""],[1,81,"PageUp",11,"PageUp",33,"VK_PRIOR","",""],[1,82,"Delete",20,"Del",46,"VK_DELETE","Delete",""],[1,83,"End",13,"End",35,"VK_END","",""],[1,84,"PageDown",12,"PageDown",34,"VK_NEXT","",""],[1,85,"ArrowRight",17,"RightArrow",39,"VK_RIGHT","Right",""],[1,86,"ArrowLeft",15,"LeftArrow",37,"VK_LEFT","Left",""],[1,87,"ArrowDown",18,"DownArrow",40,"VK_DOWN","Down",""],[1,88,"ArrowUp",16,"UpArrow",38,"VK_UP","Up",""],[1,89,"NumLock",83,"NumLock",144,"VK_NUMLOCK","",""],[1,90,"NumpadDivide",113,"NumPad_Divide",111,"VK_DIVIDE","",""],[1,91,"NumpadMultiply",108,"NumPad_Multiply",106,"VK_MULTIPLY","",""],[1,92,"NumpadSubtract",111,"NumPad_Subtract",109,"VK_SUBTRACT","",""],[1,93,"NumpadAdd",109,"NumPad_Add",107,"VK_ADD","",""],[1,94,"NumpadEnter",3,"",0,"","",""],[1,95,"Numpad1",99,"NumPad1",97,"VK_NUMPAD1","",""],[1,96,"Numpad2",100,"NumPad2",98,"VK_NUMPAD2","",""],[1,97,"Numpad3",101,"NumPad3",99,"VK_NUMPAD3","",""],[1,98,"Numpad4",102,"NumPad4",100,"VK_NUMPAD4","",""],[1,99,"Numpad5",103,"NumPad5",101,"VK_NUMPAD5","",""],[1,100,"Numpad6",104,"NumPad6",102,"VK_NUMPAD6","",""],[1,101,"Numpad7",105,"NumPad7",103,"VK_NUMPAD7","",""],[1,102,"Numpad8",106,"NumPad8",104,"VK_NUMPAD8","",""],[1,103,"Numpad9",107,"NumPad9",105,"VK_NUMPAD9","",""],[1,104,"Numpad0",98,"NumPad0",96,"VK_NUMPAD0","",""],[1,105,"NumpadDecimal",112,"NumPad_Decimal",110,"VK_DECIMAL","",""],[0,106,"IntlBackslash",97,"OEM_102",226,"VK_OEM_102","",""],[1,107,"ContextMenu",58,"ContextMenu",93,"","",""],[1,108,"Power",0,"",0,"","",""],[1,109,"NumpadEqual",0,"",0,"","",""],[1,110,"F13",71,"F13",124,"VK_F13","",""],[1,111,"F14",72,"F14",125,"VK_F14","",""],[1,112,"F15",73,"F15",126,"VK_F15","",""],[1,113,"F16",74,"F16",127,"VK_F16","",""],[1,114,"F17",75,"F17",128,"VK_F17","",""],[1,115,"F18",76,"F18",129,"VK_F18","",""],[1,116,"F19",77,"F19",130,"VK_F19","",""],[1,117,"F20",78,"F20",131,"VK_F20","",""],[1,118,"F21",79,"F21",132,"VK_F21","",""],[1,119,"F22",80,"F22",133,"VK_F22","",""],[1,120,"F23",81,"F23",134,"VK_F23","",""],[1,121,"F24",82,"F24",135,"VK_F24","",""],[1,122,"Open",0,"",0,"","",""],[1,123,"Help",0,"",0,"","",""],[1,124,"Select",0,"",0,"","",""],[1,125,"Again",0,"",0,"","",""],[1,126,"Undo",0,"",0,"","",""],[1,127,"Cut",0,"",0,"","",""],[1,128,"Copy",0,"",0,"","",""],[1,129,"Paste",0,"",0,"","",""],[1,130,"Find",0,"",0,"","",""],[1,131,"AudioVolumeMute",117,"AudioVolumeMute",173,"VK_VOLUME_MUTE","",""],[1,132,"AudioVolumeUp",118,"AudioVolumeUp",175,"VK_VOLUME_UP","",""],[1,133,"AudioVolumeDown",119,"AudioVolumeDown",174,"VK_VOLUME_DOWN","",""],[1,134,"NumpadComma",110,"NumPad_Separator",108,"VK_SEPARATOR","",""],[0,135,"IntlRo",115,"ABNT_C1",193,"VK_ABNT_C1","",""],[1,136,"KanaMode",0,"",0,"","",""],[0,137,"IntlYen",0,"",0,"","",""],[1,138,"Convert",0,"",0,"","",""],[1,139,"NonConvert",0,"",0,"","",""],[1,140,"Lang1",0,"",0,"","",""],[1,141,"Lang2",0,"",0,"","",""],[1,142,"Lang3",0,"",0,"","",""],[1,143,"Lang4",0,"",0,"","",""],[1,144,"Lang5",0,"",0,"","",""],[1,145,"Abort",0,"",0,"","",""],[1,146,"Props",0,"",0,"","",""],[1,147,"NumpadParenLeft",0,"",0,"","",""],[1,148,"NumpadParenRight",0,"",0,"","",""],[1,149,"NumpadBackspace",0,"",0,"","",""],[1,150,"NumpadMemoryStore",0,"",0,"","",""],[1,151,"NumpadMemoryRecall",0,"",0,"","",""],[1,152,"NumpadMemoryClear",0,"",0,"","",""],[1,153,"NumpadMemoryAdd",0,"",0,"","",""],[1,154,"NumpadMemorySubtract",0,"",0,"","",""],[1,155,"NumpadClear",131,"Clear",12,"VK_CLEAR","",""],[1,156,"NumpadClearEntry",0,"",0,"","",""],[1,0,"",5,"Ctrl",17,"VK_CONTROL","",""],[1,0,"",4,"Shift",16,"VK_SHIFT","",""],[1,0,"",6,"Alt",18,"VK_MENU","",""],[1,0,"",57,"Meta",91,"VK_COMMAND","",""],[1,157,"ControlLeft",5,"",0,"VK_LCONTROL","",""],[1,158,"ShiftLeft",4,"",0,"VK_LSHIFT","",""],[1,159,"AltLeft",6,"",0,"VK_LMENU","",""],[1,160,"MetaLeft",57,"",0,"VK_LWIN","",""],[1,161,"ControlRight",5,"",0,"VK_RCONTROL","",""],[1,162,"ShiftRight",4,"",0,"VK_RSHIFT","",""],[1,163,"AltRight",6,"",0,"VK_RMENU","",""],[1,164,"MetaRight",57,"",0,"VK_RWIN","",""],[1,165,"BrightnessUp",0,"",0,"","",""],[1,166,"BrightnessDown",0,"",0,"","",""],[1,167,"MediaPlay",0,"",0,"","",""],[1,168,"MediaRecord",0,"",0,"","",""],[1,169,"MediaFastForward",0,"",0,"","",""],[1,170,"MediaRewind",0,"",0,"","",""],[1,171,"MediaTrackNext",124,"MediaTrackNext",176,"VK_MEDIA_NEXT_TRACK","",""],[1,172,"MediaTrackPrevious",125,"MediaTrackPrevious",177,"VK_MEDIA_PREV_TRACK","",""],[1,173,"MediaStop",126,"MediaStop",178,"VK_MEDIA_STOP","",""],[1,174,"Eject",0,"",0,"","",""],[1,175,"MediaPlayPause",127,"MediaPlayPause",179,"VK_MEDIA_PLAY_PAUSE","",""],[1,176,"MediaSelect",128,"LaunchMediaPlayer",181,"VK_MEDIA_LAUNCH_MEDIA_SELECT","",""],[1,177,"LaunchMail",129,"LaunchMail",180,"VK_MEDIA_LAUNCH_MAIL","",""],[1,178,"LaunchApp2",130,"LaunchApp2",183,"VK_MEDIA_LAUNCH_APP2","",""],[1,179,"LaunchApp1",0,"",0,"VK_MEDIA_LAUNCH_APP1","",""],[1,180,"SelectTask",0,"",0,"","",""],[1,181,"LaunchScreenSaver",0,"",0,"","",""],[1,182,"BrowserSearch",120,"BrowserSearch",170,"VK_BROWSER_SEARCH","",""],[1,183,"BrowserHome",121,"BrowserHome",172,"VK_BROWSER_HOME","",""],[1,184,"BrowserBack",122,"BrowserBack",166,"VK_BROWSER_BACK","",""],[1,185,"BrowserForward",123,"BrowserForward",167,"VK_BROWSER_FORWARD","",""],[1,186,"BrowserStop",0,"",0,"VK_BROWSER_STOP","",""],[1,187,"BrowserRefresh",0,"",0,"VK_BROWSER_REFRESH","",""],[1,188,"BrowserFavorites",0,"",0,"VK_BROWSER_FAVORITES","",""],[1,189,"ZoomToggle",0,"",0,"","",""],[1,190,"MailReply",0,"",0,"","",""],[1,191,"MailForward",0,"",0,"","",""],[1,192,"MailSend",0,"",0,"","",""],[1,0,"",114,"KeyInComposition",229,"","",""],[1,0,"",116,"ABNT_C2",194,"VK_ABNT_C2","",""],[1,0,"",96,"OEM_8",223,"VK_OEM_8","",""],[1,0,"",0,"",0,"VK_KANA","",""],[1,0,"",0,"",0,"VK_HANGUL","",""],[1,0,"",0,"",0,"VK_JUNJA","",""],[1,0,"",0,"",0,"VK_FINAL","",""],[1,0,"",0,"",0,"VK_HANJA","",""],[1,0,"",0,"",0,"VK_KANJI","",""],[1,0,"",0,"",0,"VK_CONVERT","",""],[1,0,"",0,"",0,"VK_NONCONVERT","",""],[1,0,"",0,"",0,"VK_ACCEPT","",""],[1,0,"",0,"",0,"VK_MODECHANGE","",""],[1,0,"",0,"",0,"VK_SELECT","",""],[1,0,"",0,"",0,"VK_PRINT","",""],[1,0,"",0,"",0,"VK_EXECUTE","",""],[1,0,"",0,"",0,"VK_SNAPSHOT","",""],[1,0,"",0,"",0,"VK_HELP","",""],[1,0,"",0,"",0,"VK_APPS","",""],[1,0,"",0,"",0,"VK_PROCESSKEY","",""],[1,0,"",0,"",0,"VK_PACKET","",""],[1,0,"",0,"",0,"VK_DBE_SBCSCHAR","",""],[1,0,"",0,"",0,"VK_DBE_DBCSCHAR","",""],[1,0,"",0,"",0,"VK_ATTN","",""],[1,0,"",0,"",0,"VK_CRSEL","",""],[1,0,"",0,"",0,"VK_EXSEL","",""],[1,0,"",0,"",0,"VK_EREOF","",""],[1,0,"",0,"",0,"VK_PLAY","",""],[1,0,"",0,"",0,"VK_ZOOM","",""],[1,0,"",0,"",0,"VK_NONAME","",""],[1,0,"",0,"",0,"VK_PA1","",""],[1,0,"",0,"",0,"VK_OEM_CLEAR","",""]],e=[],n=[];for(let o of t){let[i,s,a,l,d,c,u,f,g]=o;if(n[s]||(n[s]=!0,OK[s]=a,LK[a]=s,MK[a.toLowerCase()]=s,i&&(W5[s]=l,l!==0&&l!==3&&!UK(l)&&(pN[l]=s))),!e[l]){if(e[l]=!0,!d)throw new Error(`String representation missing for key code ${l} around scan code ${a}`);ZC.define(l,d),cN.define(l,f||d),uN.define(l,g||f||d)}c&&(RK[c]=l),a&&(AK[a]=c),u&&(kK[u]=l)}pN[3]=46})();var NK;(s=>{function r(a){return ZC.keyCodeToStr(a)}s.toString=r;function t(a){return ZC.strToKeyCode(a)}s.fromString=t;function e(a){return cN.keyCodeToStr(a)}s.toUserSettingsUS=e;function n(a){return uN.keyCodeToStr(a)}s.toUserSettingsGeneral=n;function o(a){return cN.strToKeyCode(a)||uN.strToKeyCode(a)}s.fromUserSettings=o;function i(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";case 20:return"Delete"}return ZC.keyCodeToStr(a)}s.toElectronAccelerator=i})(NK||={});function UK(r){return r===5||r===4||r===6||r===57}function fN(r,t){if(typeof r=="number"){if(r===0)return null;let e=(r&65535)>>>0,n=(r&4294901760)>>>16;return n!==0?new Jm([eT(e,t),eT(n,t)]):new Jm([eT(e,t)])}else{let e=[];for(let n=0;n<r.length;n++)e.push(eT(r[n],t));return new Jm(e)}}function eT(r,t){let e=!!(r&2048),n=!!(r&256),o=t===2?n:e,i=!!(r&1024),s=!!(r&512),a=t===2?e:n,l=r&255;return new mN(o,i,s,a,l)}var mN=class r{constructor(t,e,n,o,i){this.ctrlKey=t;this.shiftKey=e;this.altKey=n;this.metaKey=o;this.keyCode=i}equals(t){return t instanceof r&&this.ctrlKey===t.ctrlKey&&this.shiftKey===t.shiftKey&&this.altKey===t.altKey&&this.metaKey===t.metaKey&&this.keyCode===t.keyCode}getHashCode(){let t=this.ctrlKey?"1":"0",e=this.shiftKey?"1":"0",n=this.altKey?"1":"0",o=this.metaKey?"1":"0";return`K${t}${e}${n}${o}${this.keyCode}`}isModifierKey(){return this.keyCode===0||this.keyCode===5||this.keyCode===57||this.keyCode===6||this.keyCode===4}toKeybinding(){return new Jm([this])}isDuplicateModifierCase(){return this.ctrlKey&&this.keyCode===5||this.shiftKey&&this.keyCode===4||this.altKey&&this.keyCode===6||this.metaKey&&this.keyCode===57}};var Jm=class{constructor(t){if(t.length===0)throw Be("chords");this.chords=t}getHashCode(){let t="";for(let e=0,n=this.chords.length;e<n;e++)e!==0&&(t+=";"),t+=this.chords[e].getHashCode();return t}equals(t){if(t===null||this.chords.length!==t.chords.length)return!1;for(let e=0;e<this.chords.length;e++)if(!this.chords[e].equals(t.chords[e]))return!1;return!0}};var gN=class r{constructor(){this._coreKeybindings=new co,this._extensionKeybindings=[],this._cachedMergedKeybindings=null}static bindToCurrentPlatform(t){if(xi===1){if(t&&t.win)return t.win}else if(xi===2){if(t&&t.mac)return t.mac}else if(t&&t.linux)return t.linux;return t}registerKeybindingRule(t){let e=r.bindToCurrentPlatform(t),n=new te;if(e&&e.primary){let o=fN(e.primary,xi);o&&n.add(this._registerDefaultKeybinding(o,t.id,t.args,t.weight,0,t.when))}if(e&&Array.isArray(e.secondary))for(let o=0,i=e.secondary.length;o<i;o++){let s=e.secondary[o],a=fN(s,xi);a&&n.add(this._registerDefaultKeybinding(a,t.id,t.args,t.weight,-o-1,t.when))}return n}setExtensionKeybindings(t){let e=[],n=0;for(let o of t)o.keybinding&&(e[n++]={keybinding:o.keybinding,command:o.id,commandArgs:o.args,when:o.when,weight1:o.weight,weight2:0,extensionId:o.extensionId||null,isBuiltinExtension:o.isBuiltinExtension||!1});this._extensionKeybindings=e,this._cachedMergedKeybindings=null}registerCommandAndKeybindingRule(t){return Kc(this.registerKeybindingRule(t),tv.registerCommand(t))}_registerDefaultKeybinding(t,e,n,o,i,s){let a=this._coreKeybindings.push({keybinding:t,command:e,commandArgs:n,when:s,weight1:o,weight2:i,extensionId:null,isBuiltinExtension:!1});return this._cachedMergedKeybindings=null,ae(()=>{a(),this._cachedMergedKeybindings=null})}getDefaultKeybindings(){return this._cachedMergedKeybindings||(this._cachedMergedKeybindings=Array.from(this._coreKeybindings).concat(this._extensionKeybindings),this._cachedMergedKeybindings.sort(HK)),this._cachedMergedKeybindings.slice(0)}},$5=new gN,FK={EditorModes:"platform.keybindingsRegistry"};ht.add(FK.EditorModes,$5);function HK(r,t){if(r.weight1!==t.weight1)return r.weight1-t.weight1;if(r.command&&t.command){if(r.command<t.command)return-1;if(r.command>t.command)return 1}return r.weight2-t.weight2}function BK(r){return r.command!==void 0}var $l=class r{static{this._instances=new Map}static{this.CommandPalette=new r("CommandPalette")}static{this.DebugBreakpointsContext=new r("DebugBreakpointsContext")}static{this.DebugCallStackContext=new r("DebugCallStackContext")}static{this.DebugConsoleContext=new r("DebugConsoleContext")}static{this.DebugVariablesContext=new r("DebugVariablesContext")}static{this.NotebookVariablesContext=new r("NotebookVariablesContext")}static{this.DebugHoverContext=new r("DebugHoverContext")}static{this.DebugWatchContext=new r("DebugWatchContext")}static{this.DebugToolBar=new r("DebugToolBar")}static{this.DebugToolBarStop=new r("DebugToolBarStop")}static{this.DebugDisassemblyContext=new r("DebugDisassemblyContext")}static{this.DebugCallStackToolbar=new r("DebugCallStackToolbar")}static{this.DebugCreateConfiguration=new r("DebugCreateConfiguration")}static{this.DebugScopesContext=new r("DebugScopesContext")}static{this.EditorContext=new r("EditorContext")}static{this.SimpleEditorContext=new r("SimpleEditorContext")}static{this.EditorContent=new r("EditorContent")}static{this.EditorLineNumberContext=new r("EditorLineNumberContext")}static{this.EditorContextCopy=new r("EditorContextCopy")}static{this.EditorContextPeek=new r("EditorContextPeek")}static{this.EditorContextShare=new r("EditorContextShare")}static{this.EditorTitle=new r("EditorTitle")}static{this.ModalEditorTitle=new r("ModalEditorTitle")}static{this.CompactWindowEditorTitle=new r("CompactWindowEditorTitle")}static{this.EditorTitleRun=new r("EditorTitleRun")}static{this.EditorTitleContext=new r("EditorTitleContext")}static{this.EditorTitleContextShare=new r("EditorTitleContextShare")}static{this.EmptyEditorGroup=new r("EmptyEditorGroup")}static{this.EmptyEditorGroupContext=new r("EmptyEditorGroupContext")}static{this.EditorTabsBarContext=new r("EditorTabsBarContext")}static{this.EditorTabsBarShowTabsSubmenu=new r("EditorTabsBarShowTabsSubmenu")}static{this.EditorTabsBarShowTabsZenModeSubmenu=new r("EditorTabsBarShowTabsZenModeSubmenu")}static{this.EditorActionsPositionSubmenu=new r("EditorActionsPositionSubmenu")}static{this.EditorSplitMoveSubmenu=new r("EditorSplitMoveSubmenu")}static{this.ExplorerContext=new r("ExplorerContext")}static{this.ExplorerContextShare=new r("ExplorerContextShare")}static{this.ExtensionContext=new r("ExtensionContext")}static{this.ExtensionEditorContextMenu=new r("ExtensionEditorContextMenu")}static{this.GlobalActivity=new r("GlobalActivity")}static{this.GlobalEditorActions=new r("GlobalEditorActions")}static{this.CommandCenter=new r("CommandCenter")}static{this.CommandCenterCenter=new r("CommandCenterCenter")}static{this.LayoutControlMenuSubmenu=new r("LayoutControlMenuSubmenu")}static{this.LayoutControlMenu=new r("LayoutControlMenu")}static{this.MenubarMainMenu=new r("MenubarMainMenu")}static{this.MenubarAppearanceMenu=new r("MenubarAppearanceMenu")}static{this.MenubarDebugMenu=new r("MenubarDebugMenu")}static{this.MenubarEditMenu=new r("MenubarEditMenu")}static{this.MenubarCopy=new r("MenubarCopy")}static{this.MenubarFileMenu=new r("MenubarFileMenu")}static{this.MenubarGoMenu=new r("MenubarGoMenu")}static{this.MenubarHelpMenu=new r("MenubarHelpMenu")}static{this.MenubarLayoutMenu=new r("MenubarLayoutMenu")}static{this.MenubarNewBreakpointMenu=new r("MenubarNewBreakpointMenu")}static{this.PanelAlignmentMenu=new r("PanelAlignmentMenu")}static{this.PanelPositionMenu=new r("PanelPositionMenu")}static{this.ActivityBarPositionMenu=new r("ActivityBarPositionMenu")}static{this.AuxiliaryActivityBarPositionMenu=new r("AuxiliaryActivityBarPositionMenu")}static{this.NotificationsCenterPositionMenu=new r("NotificationsCenterPositionMenu")}static{this.MenubarPreferencesMenu=new r("MenubarPreferencesMenu")}static{this.MenubarRecentMenu=new r("MenubarRecentMenu")}static{this.MenubarSelectionMenu=new r("MenubarSelectionMenu")}static{this.MenubarShare=new r("MenubarShare")}static{this.MenubarSwitchEditorMenu=new r("MenubarSwitchEditorMenu")}static{this.MenubarSwitchGroupMenu=new r("MenubarSwitchGroupMenu")}static{this.MenubarTerminalMenu=new r("MenubarTerminalMenu")}static{this.MenubarTerminalSuggestStatusMenu=new r("MenubarTerminalSuggestStatusMenu")}static{this.MenubarViewMenu=new r("MenubarViewMenu")}static{this.MenubarHomeMenu=new r("MenubarHomeMenu")}static{this.OpenEditorsContext=new r("OpenEditorsContext")}static{this.OpenEditorsContextShare=new r("OpenEditorsContextShare")}static{this.ProblemsPanelContext=new r("ProblemsPanelContext")}static{this.SCMInputBox=new r("SCMInputBox")}static{this.SCMChangeContext=new r("SCMChangeContext")}static{this.SCMResourceContext=new r("SCMResourceContext")}static{this.SCMResourceContextShare=new r("SCMResourceContextShare")}static{this.SCMResourceFolderContext=new r("SCMResourceFolderContext")}static{this.SCMResourceGroupContext=new r("SCMResourceGroupContext")}static{this.SCMSourceControl=new r("SCMSourceControl")}static{this.SCMSourceControlInline=new r("SCMSourceControlInline")}static{this.SCMSourceControlTitle=new r("SCMSourceControlTitle")}static{this.SCMHistoryTitle=new r("SCMHistoryTitle")}static{this.SCMHistoryItemContext=new r("SCMHistoryItemContext")}static{this.SCMHistoryItemChangeContext=new r("SCMHistoryItemChangeContext")}static{this.SCMHistoryItemRefContext=new r("SCMHistoryItemRefContext")}static{this.SCMArtifactGroupContext=new r("SCMArtifactGroupContext")}static{this.SCMArtifactContext=new r("SCMArtifactContext")}static{this.SCMQuickDiffDecorations=new r("SCMQuickDiffDecorations")}static{this.SCMTitle=new r("SCMTitle")}static{this.SearchContext=new r("SearchContext")}static{this.SearchActionMenu=new r("SearchActionContext")}static{this.StatusBarWindowIndicatorMenu=new r("StatusBarWindowIndicatorMenu")}static{this.StatusBarRemoteIndicatorMenu=new r("StatusBarRemoteIndicatorMenu")}static{this.StickyScrollContext=new r("StickyScrollContext")}static{this.TestItem=new r("TestItem")}static{this.TestItemGutter=new r("TestItemGutter")}static{this.TestProfilesContext=new r("TestProfilesContext")}static{this.TestMessageContext=new r("TestMessageContext")}static{this.TestMessageContent=new r("TestMessageContent")}static{this.TestPeekElement=new r("TestPeekElement")}static{this.TestPeekTitle=new r("TestPeekTitle")}static{this.TestCallStack=new r("TestCallStack")}static{this.TestCoverageFilterItem=new r("TestCoverageFilterItem")}static{this.TouchBarContext=new r("TouchBarContext")}static{this.TitleBar=new r("TitleBar")}static{this.TitleBarContext=new r("TitleBarContext")}static{this.TitleBarTitleContext=new r("TitleBarTitleContext")}static{this.TunnelContext=new r("TunnelContext")}static{this.TunnelPrivacy=new r("TunnelPrivacy")}static{this.TunnelProtocol=new r("TunnelProtocol")}static{this.TunnelPortInline=new r("TunnelInline")}static{this.TunnelTitle=new r("TunnelTitle")}static{this.TunnelLocalAddressInline=new r("TunnelLocalAddressInline")}static{this.TunnelOriginInline=new r("TunnelOriginInline")}static{this.ViewItemContext=new r("ViewItemContext")}static{this.ViewContainerTitle=new r("ViewContainerTitle")}static{this.ViewContainerTitleContext=new r("ViewContainerTitleContext")}static{this.ViewTitle=new r("ViewTitle")}static{this.ViewTitleContext=new r("ViewTitleContext")}static{this.CommentEditorActions=new r("CommentEditorActions")}static{this.CommentThreadTitle=new r("CommentThreadTitle")}static{this.CommentThreadActions=new r("CommentThreadActions")}static{this.CommentThreadAdditionalActions=new r("CommentThreadAdditionalActions")}static{this.CommentThreadTitleContext=new r("CommentThreadTitleContext")}static{this.CommentThreadCommentContext=new r("CommentThreadCommentContext")}static{this.CommentTitle=new r("CommentTitle")}static{this.CommentActions=new r("CommentActions")}static{this.CommentsViewThreadActions=new r("CommentsViewThreadActions")}static{this.InteractiveToolbar=new r("InteractiveToolbar")}static{this.InteractiveCellTitle=new r("InteractiveCellTitle")}static{this.InteractiveCellDelete=new r("InteractiveCellDelete")}static{this.InteractiveCellExecute=new r("InteractiveCellExecute")}static{this.InteractiveInputExecute=new r("InteractiveInputExecute")}static{this.InteractiveInputConfig=new r("InteractiveInputConfig")}static{this.ReplInputExecute=new r("ReplInputExecute")}static{this.IssueReporter=new r("IssueReporter")}static{this.NotebookToolbar=new r("NotebookToolbar")}static{this.NotebookToolbarContext=new r("NotebookToolbarContext")}static{this.NotebookStickyScrollContext=new r("NotebookStickyScrollContext")}static{this.NotebookCellTitle=new r("NotebookCellTitle")}static{this.NotebookCellDelete=new r("NotebookCellDelete")}static{this.NotebookCellInsert=new r("NotebookCellInsert")}static{this.NotebookCellBetween=new r("NotebookCellBetween")}static{this.NotebookCellListTop=new r("NotebookCellTop")}static{this.NotebookCellExecute=new r("NotebookCellExecute")}static{this.NotebookCellExecuteGoTo=new r("NotebookCellExecuteGoTo")}static{this.NotebookCellExecutePrimary=new r("NotebookCellExecutePrimary")}static{this.NotebookDiffCellInputTitle=new r("NotebookDiffCellInputTitle")}static{this.NotebookDiffDocumentMetadata=new r("NotebookDiffDocumentMetadata")}static{this.NotebookDiffCellMetadataTitle=new r("NotebookDiffCellMetadataTitle")}static{this.NotebookDiffCellOutputsTitle=new r("NotebookDiffCellOutputsTitle")}static{this.NotebookOutputToolbar=new r("NotebookOutputToolbar")}static{this.NotebookOutlineFilter=new r("NotebookOutlineFilter")}static{this.NotebookOutlineActionMenu=new r("NotebookOutlineActionMenu")}static{this.NotebookEditorLayoutConfigure=new r("NotebookEditorLayoutConfigure")}static{this.NotebookKernelSource=new r("NotebookKernelSource")}static{this.BulkEditTitle=new r("BulkEditTitle")}static{this.BulkEditContext=new r("BulkEditContext")}static{this.TimelineItemContext=new r("TimelineItemContext")}static{this.TimelineTitle=new r("TimelineTitle")}static{this.TimelineTitleContext=new r("TimelineTitleContext")}static{this.TimelineFilterSubMenu=new r("TimelineFilterSubMenu")}static{this.AccountsContext=new r("AccountsContext")}static{this.SidebarTitle=new r("SidebarTitle")}static{this.PanelTitle=new r("PanelTitle")}static{this.AuxiliaryBarTitle=new r("AuxiliaryBarTitle")}static{this.TerminalInstanceContext=new r("TerminalInstanceContext")}static{this.TerminalEditorInstanceContext=new r("TerminalEditorInstanceContext")}static{this.TerminalNewDropdownContext=new r("TerminalNewDropdownContext")}static{this.TerminalTabContext=new r("TerminalTabContext")}static{this.TerminalTabEmptyAreaContext=new r("TerminalTabEmptyAreaContext")}static{this.TerminalStickyScrollContext=new r("TerminalStickyScrollContext")}static{this.WebviewContext=new r("WebviewContext")}static{this.InlineCompletionsActions=new r("InlineCompletionsActions")}static{this.InlineEditsActions=new r("InlineEditsActions")}static{this.NewFile=new r("NewFile")}static{this.MergeInput1Toolbar=new r("MergeToolbar1Toolbar")}static{this.MergeInput2Toolbar=new r("MergeToolbar2Toolbar")}static{this.MergeBaseToolbar=new r("MergeBaseToolbar")}static{this.MergeInputResultToolbar=new r("MergeToolbarResultToolbar")}static{this.InlineSuggestionToolbar=new r("InlineSuggestionToolbar")}static{this.InlineEditToolbar=new r("InlineEditToolbar")}static{this.ChatContext=new r("ChatContext")}static{this.ChatCodeBlock=new r("ChatCodeblock")}static{this.ChatCompareBlock=new r("ChatCompareBlock")}static{this.ChatMessageTitle=new r("ChatMessageTitle")}static{this.ChatWelcomeContext=new r("ChatWelcomeContext")}static{this.ChatMessageFooter=new r("ChatMessageFooter")}static{this.ChatExecute=new r("ChatExecute")}static{this.ChatExecuteQueue=new r("ChatExecuteQueue")}static{this.ChatInput=new r("ChatInput")}static{this.ChatInputSide=new r("ChatInputSide")}static{this.ChatModePicker=new r("ChatModePicker")}static{this.ChatEditingWidgetToolbar=new r("ChatEditingWidgetToolbar")}static{this.ChatEditingSessionChangesToolbar=new r("ChatEditingSessionChangesToolbar")}static{this.ChatEditingEditorContent=new r("ChatEditingEditorContent")}static{this.ChatEditingEditorHunk=new r("ChatEditingEditorHunk")}static{this.ChatEditingDeletedNotebookCell=new r("ChatEditingDeletedNotebookCell")}static{this.ChatInputAttachmentToolbar=new r("ChatInputAttachmentToolbar")}static{this.ChatEditingWidgetModifiedFilesToolbar=new r("ChatEditingWidgetModifiedFilesToolbar")}static{this.ChatInputResourceAttachmentContext=new r("ChatInputResourceAttachmentContext")}static{this.ChatInputSymbolAttachmentContext=new r("ChatInputSymbolAttachmentContext")}static{this.ChatInlineResourceAnchorContext=new r("ChatInlineResourceAnchorContext")}static{this.ChatInlineSymbolAnchorContext=new r("ChatInlineSymbolAnchorContext")}static{this.ChatMessageCheckpoint=new r("ChatMessageCheckpoint")}static{this.ChatMessageRestoreCheckpoint=new r("ChatMessageRestoreCheckpoint")}static{this.ChatNewMenu=new r("ChatNewMenu")}static{this.ChatEditingCodeBlockContext=new r("ChatEditingCodeBlockContext")}static{this.ChatTitleBarMenu=new r("ChatTitleBarMenu")}static{this.ChatAttachmentsContext=new r("ChatAttachmentsContext")}static{this.ChatTipContext=new r("ChatTipContext")}static{this.ChatTipToolbar=new r("ChatTipToolbar")}static{this.ChatToolOutputResourceToolbar=new r("ChatToolOutputResourceToolbar")}static{this.ChatTextEditorMenu=new r("ChatTextEditorMenu")}static{this.ChatToolOutputResourceContext=new r("ChatToolOutputResourceContext")}static{this.ChatMultiDiffContext=new r("ChatMultiDiffContext")}static{this.ChatConfirmationMenu=new r("ChatConfirmationMenu")}static{this.ChatEditorInlineMenu=new r("ChatEditorInlineGutter")}static{this.ChatEditorInlineExecute=new r("ChatEditorInputExecute")}static{this.ChatEditorInlineInputSide=new r("ChatEditorInputSide")}static{this.InlineChatEditorAffordance=new r("InlineChatEditorAffordance")}static{this.InlineChatInput=new r("InlineChatInput")}static{this.AccessibleView=new r("AccessibleView")}static{this.MultiDiffEditorContent=new r("MultiDiffEditorContent")}static{this.MultiDiffEditorFileToolbar=new r("MultiDiffEditorFileToolbar")}static{this.DiffEditorHunkToolbar=new r("DiffEditorHunkToolbar")}static{this.DiffEditorSelectionToolbar=new r("DiffEditorSelectionToolbar")}static{this.BrowserNavigationToolbar=new r("BrowserNavigationToolbar")}static{this.BrowserActionsToolbar=new r("BrowserActionsToolbar")}static{this.AgentSessionsViewerFilterSubMenu=new r("AgentSessionsViewerFilterSubMenu")}static{this.AgentSessionsContext=new r("AgentSessionsContext")}static{this.AgentSessionSectionContext=new r("AgentSessionSectionContext")}static{this.AgentSessionsCreateSubMenu=new r("AgentSessionsCreateSubMenu")}static{this.AgentSessionsToolbar=new r("AgentSessionsToolbar")}static{this.AgentSessionItemToolbar=new r("AgentSessionItemToolbar")}static{this.AgentSessionSectionToolbar=new r("AgentSessionSectionToolbar")}static{this.AgentsTitleBarControlMenu=new r("AgentsTitleBarControlMenu")}static{this.ChatViewSessionTitleNavigationToolbar=new r("ChatViewSessionTitleNavigationToolbar")}static{this.ChatViewSessionTitleToolbar=new r("ChatViewSessionTitleToolbar")}static{this.ChatContextUsageActions=new r("ChatContextUsageActions")}static for(t){return r._instances.get(t)??new r(t)}constructor(t){if(r._instances.has(t))throw new TypeError(`MenuId with identifier '${t}' already exists. Use MenuId.for(ident) or a unique identifier`);r._instances.set(t,this),this.id=t}},hXe=N("menuService"),kc=class r{constructor(t){this.id=t;this.has=e=>e===t}static{this._all=new Map}static for(t){let e=this._all.get(t);return e||(e=new r(t),this._all.set(t,e)),e}static merge(t){let e=new Set;for(let n of t)n instanceof r&&e.add(n.id);return e}},vXe=new class{constructor(){this._commands=new Map;this._menuItems=new Map;this._onDidChangeMenu=new _v({merge:kc.merge});this.onDidChangeMenu=this._onDidChangeMenu.event}addCommand(r){return this._commands.set(r.id,r),this._onDidChangeMenu.fire(kc.for($l.CommandPalette)),bf(ae(()=>{this._commands.delete(r.id)&&this._onDidChangeMenu.fire(kc.for($l.CommandPalette))}))}getCommand(r){return this._commands.get(r)}getCommands(){let r=new Map;return this._commands.forEach((t,e)=>r.set(e,t)),r}appendMenuItem(r,t){let e=this._menuItems.get(r);e||(e=new co,this._menuItems.set(r,e));let n=e.push(t);return this._onDidChangeMenu.fire(kc.for(r)),bf(ae(()=>{n(),this._onDidChangeMenu.fire(kc.for(r))}))}appendMenuItems(r){let t=new te;for(let{id:e,item:n}of r)t.add(this.appendMenuItem(e,n));return t}getMenuItems(r){let t;return this._menuItems.has(r)?t=[...this._menuItems.get(r)]:t=[],r===$l.CommandPalette&&this._appendImplicitItems(t),t}_appendImplicitItems(r){let t=new Set;for(let e of r)BK(e)&&(t.add(e.command.id),e.alt&&t.add(e.alt.id));this._commands.forEach((e,n)=>{t.has(n)||r.push({command:e})})}};var Ac=class{constructor(t,e,n,o,i,s,a){this.hideActions=o;this.menuKeybinding=i;this._commandService=a;this.id=t.id,this.label=Ac.label(t,n),this.tooltip=(typeof t.tooltip=="string"?t.tooltip:t.tooltip?.value)??"",this.enabled=!t.precondition||s.contextMatchesRules(t.precondition),this.checked=void 0;let l;if(t.toggled){let d=t.toggled.condition?t.toggled:{condition:t.toggled};this.checked=s.contextMatchesRules(d.condition),this.checked&&d.tooltip&&(this.tooltip=typeof d.tooltip=="string"?d.tooltip:d.tooltip.value),this.checked&&Tt.isThemeIcon(d.icon)&&(l=d.icon),this.checked&&d.title&&(this.label=typeof d.title=="string"?d.title:d.title.value)}l||(l=Tt.isThemeIcon(t.icon)?t.icon:void 0),this.item=t,this.alt=e?new Ac(e,void 0,n,o,void 0,s,a):void 0,this._options=n,this.class=l&&Tt.asClassName(l)}static label(t,e){return e?.renderShortTitle&&t.shortTitle?typeof t.shortTitle=="string"?t.shortTitle:t.shortTitle.value:typeof t.title=="string"?t.title:t.title.value}run(...t){let e=[];return this._options?.args?e=[...e,...this._options.args]:this._options?.arg&&(e=[...e,this._options.arg]),this._options?.shouldForwardArgs&&(e=[...e,...t]),this._commandService.executeCommand(this.id,...e)}};Ac=L([P(5,Ir),P(6,dN)],Ac);var SXe=N("IExtensionGalleryManifestService");var OXe=od(9531,"Extensions");var hN=N("extensionsWorkbenchService");var tT=class extends K{constructor(e,n){super();this.containers=e;this._register(n.onChange(this.update,this))}set extension(e){this.containers.forEach(n=>n.extension=e)}update(e){for(let n of this.containers)e&&n.extension?nH(n.extension.identifier,e.identifier)&&(n.extension.server&&e.server&&n.extension.server!==e.server?n.updateWhenCounterExtensionChanges&&n.update():n.extension=e):n.update()}};tT=L([P(1,hN)],tT);var LXe=new w("defaultExtensionViews",!0),MXe=new w("hasOutdatedExtensions",!1),NXe=new w("hasGallery",!1),UXe=new w("extensionsGalleryStatus","unavailable"),FXe=new w("extensionResultListFocused ",!0),HXe=new w("searchMcpServers",!1),BXe=new w("searchAgentPlugins",!1);var VXe=new $l("extensionsSearchActionsMenu"),WXe=new $l("extensionsFilterSubMenu");var vN="vscode_searchExtensions_internal",aYe={id:vN,toolReferenceName:"extensions",legacyToolReferenceFullNames:["extensions"],icon:Tt.fromId(fe.extensions.id),displayName:p(9544,null),modelDescription:"This is a tool for browsing Visual Studio Code Extensions Marketplace. It allows the model to search for extensions and retrieve detailed information about them. The model should use this tool whenever it needs to discover extensions or resolve information about known ones. To use the tool, the model has to provide the category of the extensions, relevant search keywords, or known extension IDs. Note that search results may include false positives, so reviewing and filtering is recommended.",userDescription:p(9546,null),source:So.Internal,inputSchema:{type:"object",properties:{category:{type:"string",description:"The category of extensions to search for",enum:ab},keywords:{type:"array",items:{type:"string"},description:"The keywords to search for"},ids:{type:"array",items:{type:"string"},description:"The ids of the extensions to search for"}}}},nT=class{constructor(t){this.extensionWorkbenchService=t}async invoke(t,e,n,o){let i=t.parameters;if(!i.keywords?.length&&!i.category&&!i.ids?.length)return{content:[{kind:"text",value:p(9545,null)}]};let s=new Map,a=c=>{for(let u of c)u.deprecationInfo||u.isMalicious||s.set(u.identifier.id.toLowerCase(),{id:u.identifier.id,name:u.displayName,description:u.description,installed:u.state===1,installCount:u.installCount??0,rating:u.rating??0,categories:u.categories??[],tags:u.gallery?.tags??[]})},l=async c=>{let u=await this.extensionWorkbenchService.queryGallery({text:c,pageSize:10,sortBy:"InstallCount"},o);u.firstPage.length&&a(u.firstPage)};if(i.ids?.length){let c=await this.extensionWorkbenchService.getExtensions(i.ids.map(u=>({id:u})),o);a(c)}if(i.keywords?.length)for(let c of i.keywords??[])if(c==="featured")await l("featured");else{let u=i.category?`category:"${i.category}"`:"";u=c?`${u} ${c}`.trim():u,await l(u)}else await l(`category:"${i.category}"`);let d=Array.from(s.values());return{content:[{kind:"text",value:`Here are the list of extensions:
${JSON.stringify(d)}
. Important: Use the following format to display extensions to the user because there is a renderer available to parse these extensions in this format and display them with all details. So, do not describe about the extensions to the user.
\`\`\`vscode-extensions
extensionId1,extensionId2
\`\`\`
.`}],toolResultDetails:{input:JSON.stringify(i),output:[{type:"embed",isText:!0,value:JSON.stringify(d.map(c=>c.id))}]}}}};nT=L([P(0,hN)],nT);var oT=class{constructor(t){this._data=t}update(t){this._data=t,this._apiObject=void 0,this._apiObjectWithChatParticipantAdditions=void 0}get data(){return this._data}get apiObject(){return this._apiObject||(this._apiObject=Object.freeze({name:this._data.id,description:this._data.modelDescription,inputSchema:this._data.inputSchema,tags:this._data.tags??[],source:void 0})),this._apiObject}get apiObjectWithChatParticipantAdditions(){return this._apiObjectWithChatParticipantAdditions||(this._apiObjectWithChatParticipantAdditions=Object.freeze({name:this._data.id,description:this._data.modelDescription,inputSchema:this._data.inputSchema,tags:this._data.tags??[],source:Pk.to(this._data.source)})),this._apiObjectWithChatParticipantAdditions}},rT=class{constructor(t,e){this._languageModels=e;this._registeredTools=new Map;this._tokenCountFuncs=new Map;this._allTools=new Map;this._proxy=t.getProxy(V.MainThreadLanguageModelTools),this._proxy.$getTools().then(n=>{for(let o of n)this._allTools.set(o.id,new oT(nn(o)))})}async $countTokensForInvocation(t,e,n){let o=this._tokenCountFuncs.get(t);if(!o)throw new Error(`Tool invocation call ${t} not found`);return await o(e,n)}async invokeTool(t,e,n,o){let i=typeof e=="string"?e:e.name,s=ct();n.tokenizationOptions&&this._tokenCountFuncs.set(s,n.tokenizationOptions.countTokens);try{if(n.toolInvocationToken&&!k2(n.toolInvocationToken))throw new Error("Invalid tool invocation token");if((i===VC||i===nN)&&!$e(t,"chatParticipantPrivate"))throw new Error(`Invalid tool: ${i}`);let a=await this._proxy.$invokeTool({toolId:i,callId:s,parameters:n.input,tokenBudget:n.tokenizationOptions?.tokenBudget,context:n.toolInvocationToken,chatRequestId:$e(t,"chatParticipantPrivate")?n.chatRequestId:void 0,chatInteractionId:$e(t,"chatParticipantPrivate")?n.chatInteractionId:void 0,subAgentInvocationId:$e(t,"chatParticipantPrivate")?n.subAgentInvocationId:void 0,chatStreamToolCallId:$e(t,"chatParticipantAdditions")?n.chatStreamToolCallId:void 0,preToolUseResult:$e(t,"chatParticipantPrivate")?n.preToolUseResult:void 0},o),l=a instanceof Wt?a.value:a;return zE.to(nn(l))}finally{this._tokenCountFuncs.delete(s)}}$onDidChangeTools(t){let e=new Set(this._allTools.keys());for(let n of t){e.delete(n.id);let o=this._allTools.get(n.id);o?o.update(n):this._allTools.set(n.id,new oT(nn(n)))}for(let n of e)this._allTools.delete(n)}getTools(t){let e=$e(t,"chatParticipantPrivate");return Array.from(this._allTools.values()).map(n=>e?n.apiObjectWithChatParticipantAdditions:n.apiObject).filter(n=>{switch(n.name){case VC:case nN:case V5:case vN:return $e(t,"chatParticipantPrivate");default:return!0}})}async $invokeTool(t,e){let n=this._registeredTools.get(t.toolId);if(!n)throw new Error(`Unknown tool ${t.toolId}`);let o={input:t.parameters,toolInvocationToken:nn(t.context)};$e(n.extension,"chatParticipantPrivate")&&(o.chatRequestId=t.chatRequestId,o.chatInteractionId=t.chatInteractionId,o.chatSessionResource=E.revive(t.context?.sessionResource),o.subAgentInvocationId=t.subAgentInvocationId),$e(n.extension,"chatParticipantAdditions")&&t.modelId&&(o.model=await this.getModel(t.modelId,n.extension)),$e(n.extension,"chatParticipantAdditions")&&t.chatStreamToolCallId&&(o.chatStreamToolCallId=t.chatStreamToolCallId),t.tokenBudget!==void 0&&(o.tokenizationOptions={tokenBudget:t.tokenBudget,countTokens:this._tokenCountFuncs.get(t.callId)||((a,l=De.None)=>this._proxy.$countTokensForInvocation(t.callId,a,l))});let i;if($e(n.extension,"toolProgress")){let a;i={report:l=>{l.increment!==void 0&&(a=(a??0)+l.increment),this._proxy.$acceptToolProgress(t.callId,{message:ye.fromStrict(l.message),progress:a===void 0?void 0:a/100})}}}let s=await eu(Promise.resolve(n.tool.invoke(o,e,i)),e);if(!s)throw new Bt;return zE.from(s,n.extension)}async getModel(t,e){let n;if(t&&(n=await this._languageModels.getLanguageModelByIdentifier(e,t)),!n&&(n=await this._languageModels.getDefaultLanguageModel(e),!n))throw new Error("Language model unavailable");return n}async $handleToolStream(t,e,n){let o=this._registeredTools.get(t);if(!o)throw new Error(`Unknown tool ${t}`);if(!o.tool.handleToolStream)return;H(o.extension,"chatParticipantAdditions");let i={rawInput:e.rawInput,chatRequestId:e.chatRequestId,chatSessionResource:e.chatSessionResource,chatInteractionId:e.chatInteractionId},s=await o.tool.handleToolStream(i,n);if(s)return{invocationMessage:ye.fromStrict(s.invocationMessage)}}async $prepareToolInvocation(t,e,n){let o=this._registeredTools.get(t);if(!o)throw new Error(`Unknown tool ${t}`);let i={input:e.parameters,chatRequestId:e.chatRequestId,chatSessionResource:e.chatSessionResource,chatInteractionId:e.chatInteractionId,forceConfirmationReason:e.forceConfirmationReason};if(e.forceConfirmationReason&&H(o.extension,"chatParticipantPrivate"),o.tool.prepareInvocation){let s=await o.tool.prepareInvocation(i,n);return s?((s.pastTenseMessage||s.presentation)&&H(o.extension,"chatParticipantPrivate"),{confirmationMessages:s.confirmationMessages?{title:typeof s.confirmationMessages.title=="string"?s.confirmationMessages.title:ye.from(s.confirmationMessages.title),message:typeof s.confirmationMessages.message=="string"?s.confirmationMessages.message:ye.from(s.confirmationMessages.message)}:void 0,invocationMessage:ye.fromStrict(s.invocationMessage),pastTenseMessage:ye.fromStrict(s.pastTenseMessage),presentation:s.presentation}):void 0}}registerTool(t,e,n){return this._registeredTools.set(e,{extension:t,tool:n}),this._proxy.$registerTool(e,typeof n.handleToolStream=="function"),ae(()=>{this._registeredTools.delete(e),this._proxy.$unregisterTool(e)})}registerToolDefinition(t,e,n){H(t,"languageModelToolSupportsModel");let o=e.name,i={id:o,displayName:e.displayName,toolReferenceName:e.toolReferenceName,userDescription:e.userDescription,modelDescription:e.description,inputSchema:e.inputSchema,source:{type:"extension",label:t.displayName??t.name,extensionId:t.identifier},icon:ci.from(e.icon),models:e.models,toolSet:e.toolSet};return this._registeredTools.set(o,{extension:t,tool:n}),this._proxy.$registerToolWithDefinition(t.identifier,i,typeof n.handleToolStream=="function"),ae(()=>{this._registeredTools.delete(o),this._proxy.$unregisterTool(o)})}};var iT=class{constructor(t,e,n,o){this._documents=e;this._commands=n;this._uriTransformer=o;this._languageIds=[];this._handlePool=0;this._ids=new Set;this._proxy=t.getProxy(V.MainThreadLanguages)}$acceptLanguageIds(t){this._languageIds=t}async getLanguages(){return this._languageIds.slice(0)}async changeLanguage(t,e){await this._proxy.$changeLanguage(t,e);let n=this._documents.getDocumentData(t);if(!n)throw new Error(`document '${t.toString()}' NOT found`);return n.document}async tokenAtPosition(t,e){let n=t.version,o=st.from(e),i=await this._proxy.$tokensAtPosition(t.uri,o),s={type:0,range:t.getWordRangeAtPosition(e)??new Se(e.line,e.character,e.line,e.character)};if(!i)return s;let a={range:j.to(i.range),type:YR.to(i.type)};return!a.range.contains(e)||n!==t.version?s:a}createLanguageStatusItem(t,e,n){let o=this._handlePool++,i=this._proxy,s=this._ids,a=`${t.identifier.value}/${e}`;if(s.has(a))throw new Error(`LanguageStatusItem with id '${e}' ALREADY exists`);s.add(a);let l={selector:n,id:e,name:t.displayName??t.name,severity:0,command:void 0,text:"",detail:"",busy:!1},d,c=new te,u=()=>{if(d?.dispose(),!s.has(a)){console.warn(`LanguageStatusItem (${e}) from ${t.identifier.value} has been disposed and CANNOT be updated anymore`);return}d=BU(()=>{c.clear(),this._proxy.$setLanguageStatus(o,{id:a,name:l.name??t.displayName??t.name,source:t.displayName??t.name,selector:di.from(l.selector,this._uriTransformer),label:l.text,detail:l.detail??"",severity:l.severity===2?tt.Error:l.severity===1?tt.Warning:tt.Info,command:l.command&&this._commands.toInternal(l.command,c),accessibilityInfo:l.accessibilityInformation,busy:l.busy})},0)},f={dispose(){c.dispose(),d?.dispose(),i.$removeLanguageStatus(o),s.delete(a)},get id(){return l.id},get name(){return l.name},set name(g){l.name=g,u()},get selector(){return l.selector},set selector(g){l.selector=g,u()},get text(){return l.text},set text(g){l.text=g,u()},set text2(g){H(t,"languageStatusText"),l.text=g,u()},get text2(){return H(t,"languageStatusText"),l.text},get detail(){return l.detail},set detail(g){l.detail=g,u()},get severity(){return l.severity},set severity(g){l.severity=g,u()},get accessibilityInformation(){return l.accessibilityInformation},set accessibilityInformation(g){l.accessibilityInformation=g,u()},get command(){return l.command},set command(g){l.command=g,u()},get busy(){return l.busy},set busy(g){l.busy=g,u()}};return u(),f}};function VK(r){return r&&r.title}var jm=class{constructor(t,e){this._logService=e;this._proxy=t.getProxy(V.MainThreadMessageService)}showMessage(t,e,n,o,i){let s={source:{identifier:t.identifier,label:t.displayName||t.name}},a;typeof o=="string"||VK(o)?a=[o,...i]:(s.modal=o?.modal,s.useCustom=o?.useCustom,s.detail=o?.detail,a=i),s.useCustom&&H(t,"resolvers");let l=[],d=!1;for(let c=0;c<a.length;c++){let u=a[c];if(typeof u=="string")l.push({title:u,handle:c,isCloseAffordance:!1});else if(typeof u=="object"){let{title:f,isCloseAffordance:g}=u;l.push({title:f,isCloseAffordance:!!g,handle:c}),g&&(d?this._logService.warn(`[${t.identifier}] Only one message item can have 'isCloseAffordance':`,u):d=!0)}else this._logService.warn(`[${t.identifier}] Invalid message item:`,u)}return this._proxy.$showMessage(e,n,s,l).then(c=>{if(typeof c=="number")return a[c]})}};jm=L([P(1,be)],jm);var ov=class{constructor(t,e,n,o){this.start=t;this.deletedCount=e;this.deletedItems=n;this.items=o}asApiEvent(){return{range:new $n(this.start,this.start+this.deletedCount),addedCells:this.items.map(t=>t.apiCell),removedCells:this.deletedItems}}},Qm=class{constructor(t,e,n){this.notebook=t;this._extHostDocument=e;this._cellData=n;this.handle=n.handle,this.uri=E.revive(n.uri),this.cellKind=n.cellKind,this._outputs=n.outputs.map(Xs.to),this._internalMetadata=n.internalMetadata??{},this._metadata=Object.freeze(n.metadata??{}),this._previousResult=Object.freeze(hp.to(n.internalMetadata??{}))}static asModelAddData(t){return{EOL:t.eol,lines:t.source,languageId:t.language,uri:t.uri,isDirty:!1,versionId:1,encoding:"utf8"}}get internalMetadata(){return this._internalMetadata}get apiCell(){if(!this._apiCell){let t=this,e=this._extHostDocument.getDocument(this.uri);if(!e)throw new Error(`MISSING extHostDocument for notebook cell: ${this.uri}`);let n={get index(){return t.notebook.getCellIndex(t)},notebook:t.notebook.apiNotebook,kind:Wg.to(this._cellData.cellKind),document:e.document,get mime(){return t._mime},set mime(o){t._mime=o},get outputs(){return t._outputs.slice(0)},get metadata(){return t._metadata},get executionSummary(){return t._previousResult}};this._apiCell=Object.freeze(n)}return this._apiCell}setOutputs(t){this._outputs=t.map(Xs.to)}setOutputItems(t,e,n){let o=n.map(rc.to),i=this._outputs.find(s=>s.id===t);if(i&&(e||(i.items.length=0),i.items.push(...o),i.items.length>1&&i.items.every(s=>Nb(s.mime)))){let s=new Map,a=[];i.items.forEach(l=>{let d;s.has(l.mime)?d=s.get(l.mime):(d=[],s.set(l.mime,d),a.push(l.mime)),d.push(l.data)}),i.items.length=0,a.forEach(l=>{let d=VH(s.get(l));i.items.push({mime:l,data:d.data.buffer})})}}setMetadata(t){this._metadata=Object.freeze(t)}setInternalMetadata(t){this._internalMetadata=t,this._previousResult=Object.freeze(hp.to(t))}setMime(t){}},sT=class r{constructor(t,e,n,o,i){this._proxy=t;this._textDocumentsAndEditors=e;this._textDocuments=n;this.uri=o;this.handle=r._handlePool++;this._cells=[];this._versionId=0;this._isDirty=!1;this._disposed=!1;this._notebookType=i.viewType,this._metadata=Object.freeze(i.metadata??Object.create(null)),this._spliceNotebookCells([[0,0,i.cells]],!0,void 0),this._versionId=i.versionId}static{this._handlePool=0}dispose(){this._disposed=!0}get versionId(){return this._versionId}get apiNotebook(){if(!this._notebook){let t=this,e={get uri(){return t.uri},get version(){return t._versionId},get notebookType(){return t._notebookType},get isDirty(){return t._isDirty},get isUntitled(){return t.uri.scheme===X.untitled},get isClosed(){return t._disposed},get metadata(){return t._metadata},get cellCount(){return t._cells.length},cellAt(n){return n=t._validateIndex(n),t._cells[n].apiCell},getCells(n){return(n?t._getCells(n):t._cells).map(i=>i.apiCell)},save(){return t._save()},[Symbol.for("debug.description")](){return`NotebookDocument(${this.uri.toString()})`}};this._notebook=Object.freeze(e)}return this._notebook}acceptDocumentPropertiesChanged(t){t.metadata&&(this._metadata=Object.freeze({...this._metadata,...t.metadata}))}acceptDirty(t){this._isDirty=t}acceptModelChanged(t,e,n){this._versionId=t.versionId,this._isDirty=e,this.acceptDocumentPropertiesChanged({metadata:n});let o={notebook:this.apiNotebook,metadata:n,cellChanges:[],contentChanges:[]},i=[];for(let a of t.rawEvents)a.kind===1?this._spliceNotebookCells(a.changes,!1,o.contentChanges):a.kind===2?this._moveCells(a.index,a.length,a.newIdx,o.contentChanges):a.kind===8?(this._setCellOutputs(a.index,a.outputs),i.push({cell:this._cells[a.index].apiCell,outputs:this._cells[a.index].apiCell.outputs})):a.kind===9?(this._setCellOutputItems(a.index,a.outputId,a.append,a.outputItems),i.push({cell:this._cells[a.index].apiCell,outputs:this._cells[a.index].apiCell.outputs})):a.kind===5?(this._changeCellLanguage(a.index,a.language),i.push({cell:this._cells[a.index].apiCell,document:this._cells[a.index].apiCell.document})):a.kind===10?i.push({cell:this._cells[a.index].apiCell,document:this._cells[a.index].apiCell.document}):a.kind===13?this._changeCellMime(a.index,a.mime):a.kind===7?(this._changeCellMetadata(a.index,a.metadata),i.push({cell:this._cells[a.index].apiCell,metadata:this._cells[a.index].apiCell.metadata})):a.kind===12&&(this._changeCellInternalMetadata(a.index,a.internalMetadata),i.push({cell:this._cells[a.index].apiCell,executionSummary:this._cells[a.index].apiCell.executionSummary}));let s=new Map;for(let a=0;a<i.length;a++){let l=i[a],d=s.get(l.cell);if(d===void 0){let c=o.cellChanges.push({document:void 0,executionSummary:void 0,metadata:void 0,outputs:void 0,...l});s.set(l.cell,c-1)}else o.cellChanges[d]={...o.cellChanges[d],...l}}return Object.freeze(o),Object.freeze(o.cellChanges),Object.freeze(o.contentChanges),o}_validateIndex(t){return t=t|0,t<0?0:t>=this._cells.length?this._cells.length-1:t}_validateRange(t){let e=t.start|0,n=t.end|0;return e<0&&(e=0),n>this._cells.length&&(n=this._cells.length),t.with({start:e,end:n})}_getCells(t){t=this._validateRange(t);let e=[];for(let n=t.start;n<t.end;n++)e.push(this._cells[n]);return e}async _save(){return this._disposed?Promise.reject(new Error("Notebook has been closed")):this._proxy.$trySaveNotebook(this.uri)}_spliceNotebookCells(t,e,n){if(this._disposed)return;let o=[],i=[],s=[];if(t.reverse().forEach(a=>{let d=a[2].map(f=>{let g=new Qm(this,this._textDocumentsAndEditors,f);return e||i.push(Qm.asModelAddData(f)),g}),c=new ov(a[0],a[1],[],d),u=this._cells.splice(a[0],a[1],...d);for(let f of u)s.push(f.uri),c.deletedItems.push(f.apiCell);o.push(c)}),this._textDocumentsAndEditors.acceptDocumentsAndEditorsDelta({addedDocuments:i,removedDocuments:s}),n)for(let a of o)n.push(a.asApiEvent())}_moveCells(t,e,n,o){let i=this._cells.splice(t,e);this._cells.splice(n,0,...i);let s=[new ov(t,e,i.map(a=>a.apiCell),[]),new ov(n,0,[],i)];for(let a of s)o.push(a.asApiEvent())}_setCellOutputs(t,e){this._cells[t].setOutputs(e)}_setCellOutputItems(t,e,n,o){this._cells[t].setOutputItems(e,n,o)}_changeCellLanguage(t,e){let n=this._cells[t];n.apiCell.document.languageId!==e&&this._textDocuments.$acceptModelLanguageChanged(n.uri,e)}_changeCellMime(t,e){let n=this._cells[t];n.apiCell.mime=e}_changeCellMetadata(t,e){this._cells[t].setMetadata(e)}_changeCellInternalMetadata(t,e){this._cells[t].setInternalMetadata(e)}getCellFromApiCell(t){return this._cells.find(e=>e.apiCell===t)}getCellFromIndex(t){return this._cells[t]}getCell(t){return this._cells.find(e=>e.handle===t)}getCellIndex(t){return this._cells.indexOf(t)}};var Oc=class r{constructor(t,e,n,o,i,s,a){this.id=t;this._proxy=e;this.notebookData=n;this._visibleRanges=o;this._selections=i;this._viewColumn=s;this.viewType=a;this._visible=!1}static{this.apiEditorsToExtHost=new WeakMap}get apiEditor(){if(!this._editor){let t=this;this._editor={get notebook(){return t.notebookData.apiNotebook},get selection(){return t._selections[0]},set selection(e){this.selections=[e]},get selections(){return t._selections},set selections(e){if(!Array.isArray(e)||!e.every($n.isNotebookRange))throw Be("selections");t._selections=e.length===0?[new $n(0,0)]:e,t._trySetSelections(t._selections)},get visibleRanges(){return t._visibleRanges},revealRange(e,n){t._proxy.$tryRevealRange(t.id,ir.from(e),n??0)},get viewColumn(){return t._viewColumn},get replOptions(){if(t.viewType==="repl")return{appendIndex:this.notebook.cellCount-1}},[Symbol.for("debug.description")](){return`NotebookEditor(${this.notebook.uri.toString()})`}},r.apiEditorsToExtHost.set(this._editor,this)}return this._editor}get visible(){return this._visible}_acceptVisibility(t){this._visible=t}_acceptVisibleRanges(t){this._visibleRanges=t}_acceptSelections(t){this._selections=t}_trySetSelections(t){this._proxy.$trySetSelections(this.id,t.map(ir.from))}_acceptViewColumn(t){this._viewColumn=t}};var Xm=class{constructor(t,e){this.piece=t,this.color=e,this.size_left=0,this.lf_left=0,this.parent=this,this.left=this,this.right=this}next(){if(this.right!==_e)return aT(this.right);let t=this;for(;t.parent!==_e&&t.parent.left!==t;)t=t.parent;return t.parent===_e?_e:t.parent}prev(){if(this.left!==_e)return IN(this.left);let t=this;for(;t.parent!==_e&&t.parent.right!==t;)t=t.parent;return t.parent===_e?_e:t.parent}detach(){this.parent=null,this.left=null,this.right=null}};var _e=new Xm(null,0);_e.parent=_e;_e.left=_e;_e.right=_e;_e.color=0;function aT(r){for(;r.left!==_e;)r=r.left;return r}function IN(r){for(;r.right!==_e;)r=r.right;return r}function yN(r){return r===_e?0:r.size_left+r.piece.length+yN(r.right)}function EN(r){return r===_e?0:r.lf_left+r.piece.lineFeedCnt+EN(r.right)}function bN(){_e.parent=_e}function iv(r,t){let e=t.right;e.size_left+=t.size_left+(t.piece?t.piece.length:0),e.lf_left+=t.lf_left+(t.piece?t.piece.lineFeedCnt:0),t.right=e.left,e.left!==_e&&(e.left.parent=t),e.parent=t.parent,t.parent===_e?r.root=e:t.parent.left===t?t.parent.left=e:t.parent.right=e,e.left=t,t.parent=e}function sv(r,t){let e=t.left;t.left=e.right,e.right!==_e&&(e.right.parent=t),e.parent=t.parent,t.size_left-=e.size_left+(e.piece?e.piece.length:0),t.lf_left-=e.lf_left+(e.piece?e.piece.lineFeedCnt:0),t.parent===_e?r.root=e:t===t.parent.right?t.parent.right=e:t.parent.left=e,e.right=t,t.parent=e}function av(r,t){let e,n;if(t.left===_e?(n=t,e=n.right):t.right===_e?(n=t,e=n.left):(n=aT(t.right),e=n.right),n===r.root){r.root=e,e.color=0,t.detach(),bN(),r.root.parent=_e;return}let o=n.color===1;if(n===n.parent.left?n.parent.left=e:n.parent.right=e,n===t?(e.parent=n.parent,rv(r,e)):(n.parent===t?e.parent=n:e.parent=n.parent,rv(r,e),n.left=t.left,n.right=t.right,n.parent=t.parent,n.color=t.color,t===r.root?r.root=n:t===t.parent.left?t.parent.left=n:t.parent.right=n,n.left!==_e&&(n.left.parent=n),n.right!==_e&&(n.right.parent=n),n.size_left=t.size_left,n.lf_left=t.lf_left,rv(r,n)),t.detach(),e.parent.left===e){let s=yN(e),a=EN(e);if(s!==e.parent.size_left||a!==e.parent.lf_left){let l=s-e.parent.size_left,d=a-e.parent.lf_left;e.parent.size_left=s,e.parent.lf_left=a,rs(r,e.parent,l,d)}}if(rv(r,e.parent),o){bN();return}let i;for(;e!==r.root&&e.color===0;)e===e.parent.left?(i=e.parent.right,i.color===1&&(i.color=0,e.parent.color=1,iv(r,e.parent),i=e.parent.right),i.left.color===0&&i.right.color===0?(i.color=1,e=e.parent):(i.right.color===0&&(i.left.color=0,i.color=1,sv(r,i),i=e.parent.right),i.color=e.parent.color,e.parent.color=0,i.right.color=0,iv(r,e.parent),e=r.root)):(i=e.parent.left,i.color===1&&(i.color=0,e.parent.color=1,sv(r,e.parent),i=e.parent.left),i.left.color===0&&i.right.color===0?(i.color=1,e=e.parent):(i.left.color===0&&(i.right.color=0,i.color=1,iv(r,i),i=e.parent.left),i.color=e.parent.color,e.parent.color=0,i.left.color=0,sv(r,e.parent),e=r.root));e.color=0,bN()}function SN(r,t){for(rv(r,t);t!==r.root&&t.parent.color===1;)if(t.parent===t.parent.parent.left){let e=t.parent.parent.right;e.color===1?(t.parent.color=0,e.color=0,t.parent.parent.color=1,t=t.parent.parent):(t===t.parent.right&&(t=t.parent,iv(r,t)),t.parent.color=0,t.parent.parent.color=1,sv(r,t.parent.parent))}else{let e=t.parent.parent.left;e.color===1?(t.parent.color=0,e.color=0,t.parent.parent.color=1,t=t.parent.parent):(t===t.parent.left&&(t=t.parent,sv(r,t)),t.parent.color=0,t.parent.parent.color=1,iv(r,t.parent.parent))}r.root.color=0}function rs(r,t,e,n){for(;t!==r.root&&t!==_e;)t.parent.left===t&&(t.parent.size_left+=e,t.parent.lf_left+=n),t=t.parent}function rv(r,t){let e=0,n=0;if(t!==r.root){for(;t!==r.root&&t===t.parent.right;)t=t.parent;if(t!==r.root)for(t=t.parent,e=yN(t.left)-t.size_left,n=EN(t.left)-t.lf_left,t.size_left+=e,t.lf_left+=n;t!==r.root&&(e!==0||n!==0);)t.parent.left===t&&(t.parent.size_left+=e,t.parent.lf_left+=n),t=t.parent}}var ca=65535;function G5(r){let t;return r[r.length-1]<65536?t=new Uint16Array(r.length):t=new Uint32Array(r.length),t.set(r,0),t}var xN=class{constructor(t,e,n,o,i){this.lineStarts=t;this.cr=e;this.lf=n;this.crlf=o;this.isBasicASCII=i}};function is(r,t=!0){let e=[0],n=1;for(let o=0,i=r.length;o<i;o++){let s=r.charCodeAt(o);s===13?o+1<i&&r.charCodeAt(o+1)===10?(e[n++]=o+2,o++):e[n++]=o+1:s===10&&(e[n++]=o+1)}return t?G5(e):e}function z5(r,t){r.length=0,r[0]=0;let e=1,n=0,o=0,i=0,s=!0;for(let l=0,d=t.length;l<d;l++){let c=t.charCodeAt(l);c===13?l+1<d&&t.charCodeAt(l+1)===10?(i++,r[e++]=l+2,l++):(n++,r[e++]=l+1):c===10?(o++,r[e++]=l+1):s&&c!==9&&(c<32||c>126)&&(s=!1)}let a=new xN(G5(r),n,o,i,s);return r.length=0,a}var go=class{constructor(t,e,n,o,i){this.bufferIndex=t,this.start=e,this.end=n,this.lineFeedCnt=o,this.length=i}},ss=class{constructor(t,e){this.buffer=t,this.lineStarts=e}},CN=class{constructor(t,e){this._pieces=[],this._tree=t,this._BOM=e,this._index=0,t.root!==_e&&t.iterate(t.root,n=>(n!==_e&&this._pieces.push(n.piece),!0))}read(){return this._pieces.length===0?this._index===0?(this._index++,this._BOM):null:this._index>this._pieces.length-1?null:this._index===0?this._BOM+this._tree.getPieceContent(this._pieces[this._index++]):this._tree.getPieceContent(this._pieces[this._index++])}},TN=class{constructor(t){this._limit=t,this._cache=[]}get(t){for(let e=this._cache.length-1;e>=0;e--){let n=this._cache[e];if(n.nodeStartOffset<=t&&n.nodeStartOffset+n.node.piece.length>=t)return n}return null}get2(t){for(let e=this._cache.length-1;e>=0;e--){let n=this._cache[e];if(n.nodeStartLineNumber&&n.nodeStartLineNumber<t&&n.nodeStartLineNumber+n.node.piece.lineFeedCnt>=t)return n}return null}set(t){this._cache.length>=this._limit&&this._cache.shift(),this._cache.push(t)}validate(t){let e=!1,n=this._cache;for(let o=0;o<n.length;o++){let i=n[o];if(i.node.parent===null||i.nodeStartOffset>=t){n[o]=null,e=!0;continue}}if(e){let o=[];for(let i of n)i!==null&&o.push(i);this._cache=o}}},lT=class{constructor(t,e,n){this.create(t,e,n)}create(t,e,n){this._buffers=[new ss("",[0])],this._lastChangeBufferPos={line:0,column:0},this.root=_e,this._lineCnt=1,this._length=0,this._EOL=e,this._EOLLength=e.length,this._EOLNormalized=n;let o=null;for(let i=0,s=t.length;i<s;i++)if(t[i].buffer.length>0){t[i].lineStarts||(t[i].lineStarts=is(t[i].buffer));let a=new go(i+1,{line:0,column:0},{line:t[i].lineStarts.length-1,column:t[i].buffer.length-t[i].lineStarts[t[i].lineStarts.length-1]},t[i].lineStarts.length-1,t[i].buffer.length);this._buffers.push(t[i]),o=this.rbInsertRight(o,a)}this._searchCache=new TN(1),this._lastVisitedLine={lineNumber:0,value:""},this.computeBufferMetadata()}normalizeEOL(t){let e=ca,n=e-Math.floor(e/3),o=n*2,i="",s=0,a=[];if(this.iterate(this.root,l=>{let d=this.getNodeContent(l),c=d.length;if(s<=n||s+c<o)return i+=d,s+=c,!0;let u=i.replace(/\r\n|\r|\n/g,t);return a.push(new ss(u,is(u))),i=d,s=c,!0}),s>0){let l=i.replace(/\r\n|\r|\n/g,t);a.push(new ss(l,is(l)))}this.create(a,t,!0)}getEOL(){return this._EOL}setEOL(t){this._EOL=t,this._EOLLength=this._EOL.length,this.normalizeEOL(t)}createSnapshot(t){return new CN(this,t)}equal(t){if(this.getLength()!==t.getLength()||this.getLineCount()!==t.getLineCount())return!1;let e=0;return this.iterate(this.root,o=>{if(o===_e)return!0;let i=this.getNodeContent(o),s=i.length,a=t.nodeAt(e),l=t.nodeAt(e+s),d=t.getValueInRange2(a,l);return e+=s,i===d})}getOffsetAt(t,e){let n=0,o=this.root;for(;o!==_e;)if(o.left!==_e&&o.lf_left+1>=t)o=o.left;else if(o.lf_left+o.piece.lineFeedCnt+1>=t){n+=o.size_left;let i=this.getAccumulatedValue(o,t-o.lf_left-2);return n+=i+e-1}else t-=o.lf_left+o.piece.lineFeedCnt,n+=o.size_left+o.piece.length,o=o.right;return n}getPositionAt(t){t=Math.floor(t),t=Math.max(0,t);let e=this.root,n=0,o=t;for(;e!==_e;)if(e.size_left!==0&&e.size_left>=t)e=e.left;else if(e.size_left+e.piece.length>=t){let i=this.getIndexOf(e,t-e.size_left);if(n+=e.lf_left+i.index,i.index===0){let s=this.getOffsetAt(n+1,1),a=o-s;return new In(n+1,a+1)}return new In(n+1,i.remainder+1)}else if(t-=e.size_left+e.piece.length,n+=e.lf_left+e.piece.lineFeedCnt,e.right===_e){let i=this.getOffsetAt(n+1,1),s=o-t-i;return new In(n+1,s+1)}else e=e.right;return new In(1,1)}getValueInRange(t,e){if(t.startLineNumber===t.endLineNumber&&t.startColumn===t.endColumn)return"";let n=this.nodeAt2(t.startLineNumber,t.startColumn),o=this.nodeAt2(t.endLineNumber,t.endColumn),i=this.getValueInRange2(n,o);return e?e!==this._EOL||!this._EOLNormalized?i.replace(/\r\n|\r|\n/g,e):e===this.getEOL()&&this._EOLNormalized?i:i.replace(/\r\n|\r|\n/g,e):i}getValueInRange2(t,e){if(t.node===e.node){let a=t.node,l=this._buffers[a.piece.bufferIndex].buffer,d=this.offsetInBuffer(a.piece.bufferIndex,a.piece.start);return l.substring(d+t.remainder,d+e.remainder)}let n=t.node,o=this._buffers[n.piece.bufferIndex].buffer,i=this.offsetInBuffer(n.piece.bufferIndex,n.piece.start),s=o.substring(i+t.remainder,i+n.piece.length);for(n=n.next();n!==_e;){let a=this._buffers[n.piece.bufferIndex].buffer,l=this.offsetInBuffer(n.piece.bufferIndex,n.piece.start);if(n===e.node){s+=a.substring(l,l+e.remainder);break}else s+=a.substr(l,n.piece.length);n=n.next()}return s}getLinesContent(){let t=[],e=0,n="",o=!1;return this.iterate(this.root,i=>{if(i===_e)return!0;let s=i.piece,a=s.length;if(a===0)return!0;let l=this._buffers[s.bufferIndex].buffer,d=this._buffers[s.bufferIndex].lineStarts,c=s.start.line,u=s.end.line,f=d[c]+s.start.column;if(o&&(l.charCodeAt(f)===10&&(f++,a--),t[e++]=n,n="",o=!1,a===0))return!0;if(c===u)return!this._EOLNormalized&&l.charCodeAt(f+a-1)===13?(o=!0,n+=l.substr(f,a-1)):n+=l.substr(f,a),!0;n+=this._EOLNormalized?l.substring(f,Math.max(f,d[c+1]-this._EOLLength)):l.substring(f,d[c+1]).replace(/(\r\n|\r|\n)$/,""),t[e++]=n;for(let g=c+1;g<u;g++)n=this._EOLNormalized?l.substring(d[g],d[g+1]-this._EOLLength):l.substring(d[g],d[g+1]).replace(/(\r\n|\r|\n)$/,""),t[e++]=n;return!this._EOLNormalized&&l.charCodeAt(d[u]+s.end.column-1)===13?(o=!0,s.end.column===0?e--:n=l.substr(d[u],s.end.column-1)):n=l.substr(d[u],s.end.column),!0}),o&&(t[e++]=n,n=""),t[e++]=n,t}getLength(){return this._length}getLineCount(){return this._lineCnt}getLineContent(t){return this._lastVisitedLine.lineNumber===t?this._lastVisitedLine.value:(this._lastVisitedLine.lineNumber=t,t===this._lineCnt?this._lastVisitedLine.value=this.getLineRawContent(t):this._EOLNormalized?this._lastVisitedLine.value=this.getLineRawContent(t,this._EOLLength):this._lastVisitedLine.value=this.getLineRawContent(t).replace(/(\r\n|\r|\n)$/,""),this._lastVisitedLine.value)}_getCharCode(t){if(t.remainder===t.node.piece.length){let e=t.node.next();if(!e)return 0;let n=this._buffers[e.piece.bufferIndex],o=this.offsetInBuffer(e.piece.bufferIndex,e.piece.start);return n.buffer.charCodeAt(o)}else{let e=this._buffers[t.node.piece.bufferIndex],o=this.offsetInBuffer(t.node.piece.bufferIndex,t.node.piece.start)+t.remainder;return e.buffer.charCodeAt(o)}}getLineCharCode(t,e){let n=this.nodeAt2(t,e+1);return this._getCharCode(n)}getLineLength(t){if(t===this.getLineCount()){let e=this.getOffsetAt(t,1);return this.getLength()-e}return this.getOffsetAt(t+1,1)-this.getOffsetAt(t,1)-this._EOLLength}getCharCode(t){let e=this.nodeAt(t);return this._getCharCode(e)}getNearestChunk(t){let e=this.nodeAt(t);if(e.remainder===e.node.piece.length){let n=e.node.next();if(!n||n===_e)return"";let o=this._buffers[n.piece.bufferIndex],i=this.offsetInBuffer(n.piece.bufferIndex,n.piece.start);return o.buffer.substring(i,i+n.piece.length)}else{let n=this._buffers[e.node.piece.bufferIndex],o=this.offsetInBuffer(e.node.piece.bufferIndex,e.node.piece.start),i=o+e.remainder,s=o+e.node.piece.length;return n.buffer.substring(i,s)}}findMatchesInNode(t,e,n,o,i,s,a,l,d,c,u){let f=this._buffers[t.piece.bufferIndex],g=this.offsetInBuffer(t.piece.bufferIndex,t.piece.start),I=this.offsetInBuffer(t.piece.bufferIndex,i),h=this.offsetInBuffer(t.piece.bufferIndex,s),C,_={line:0,column:0},R,O;e._wordSeparators?(R=f.buffer.substring(I,h),O=U=>U+I,e.reset(0)):(R=f.buffer,O=U=>U,e.reset(I));do if(C=e.next(R),C){if(O(C.index)>=h)return c;this.positionInBuffer(t,O(C.index)-g,_);let U=this.getLineFeedCnt(t.piece.bufferIndex,i,_),ie=_.line===i.line?_.column-i.column+o:_.column+1,Y=ie+C[0].length;if(u[c++]=mA(new Ke(n+U,ie,n+U,Y),C,l),O(C.index)+C[0].length>=h||c>=d)return c}while(C);return c}findMatchesLineByLine(t,e,n,o){let i=[],s=0,a=new vS(e.wordSeparators,e.regex),l=this.nodeAt2(t.startLineNumber,t.startColumn);if(l===null)return[];let d=this.nodeAt2(t.endLineNumber,t.endColumn);if(d===null)return[];let c=this.positionInBuffer(l.node,l.remainder),u=this.positionInBuffer(d.node,d.remainder);if(l.node===d.node)return this.findMatchesInNode(l.node,a,t.startLineNumber,t.startColumn,c,u,e,n,o,s,i),i;let f=t.startLineNumber,g=l.node;for(;g!==d.node;){let h=this.getLineFeedCnt(g.piece.bufferIndex,c,g.piece.end);if(h>=1){let _=this._buffers[g.piece.bufferIndex].lineStarts,R=this.offsetInBuffer(g.piece.bufferIndex,g.piece.start),O=_[c.line+h],U=f===t.startLineNumber?t.startColumn:1;if(s=this.findMatchesInNode(g,a,f,U,c,this.positionInBuffer(g,O-R),e,n,o,s,i),s>=o)return i;f+=h}let C=f===t.startLineNumber?t.startColumn-1:0;if(f===t.endLineNumber){let _=this.getLineContent(f).substring(C,t.endColumn-1);return s=this._findMatchesInLine(e,a,_,t.endLineNumber,C,s,i,n,o),i}if(s=this._findMatchesInLine(e,a,this.getLineContent(f).substr(C),f,C,s,i,n,o),s>=o)return i;f++,l=this.nodeAt2(f,1),g=l.node,c=this.positionInBuffer(l.node,l.remainder)}if(f===t.endLineNumber){let h=f===t.startLineNumber?t.startColumn-1:0,C=this.getLineContent(f).substring(h,t.endColumn-1);return s=this._findMatchesInLine(e,a,C,t.endLineNumber,h,s,i,n,o),i}let I=f===t.startLineNumber?t.startColumn:1;return s=this.findMatchesInNode(d.node,a,f,I,c,u,e,n,o,s,i),i}_findMatchesInLine(t,e,n,o,i,s,a,l,d){let c=t.wordSeparators;if(!l&&t.simpleSearch){let f=t.simpleSearch,g=f.length,I=n.length,h=-g;for(;(h=n.indexOf(f,h+g))!==-1;)if((!c||fA(c,n,I,h,g))&&(a[s++]=new Ed(new Ke(o,h+1+i,o,h+1+g+i),null),s>=d))return s;return s}let u;e.reset(0);do if(u=e.next(n),u&&(a[s++]=mA(new Ke(o,u.index+1+i,o,u.index+1+u[0].length+i),u,l),s>=d))return s;while(u);return s}insert(t,e,n=!1){if(this._EOLNormalized=this._EOLNormalized&&n,this._lastVisitedLine.lineNumber=0,this._lastVisitedLine.value="",this.root!==_e){let{node:o,remainder:i,nodeStartOffset:s}=this.nodeAt(t),a=o.piece,l=a.bufferIndex,d=this.positionInBuffer(o,i);if(o.piece.bufferIndex===0&&a.end.line===this._lastChangeBufferPos.line&&a.end.column===this._lastChangeBufferPos.column&&s+a.length===t&&e.length<ca){this.appendToNode(o,e),this.computeBufferMetadata();return}if(s===t)this.insertContentToNodeLeft(e,o),this._searchCache.validate(t);else if(s+o.piece.length>t){let c=[],u=new go(a.bufferIndex,d,a.end,this.getLineFeedCnt(a.bufferIndex,d,a.end),this.offsetInBuffer(l,a.end)-this.offsetInBuffer(l,d));if(this.shouldCheckCRLF()&&this.endWithCR(e)&&this.nodeCharCodeAt(o,i)===10){let h={line:u.start.line+1,column:0};u=new go(u.bufferIndex,h,u.end,this.getLineFeedCnt(u.bufferIndex,h,u.end),u.length-1),e+=`
`}if(this.shouldCheckCRLF()&&this.startWithLF(e))if(this.nodeCharCodeAt(o,i-1)===13){let h=this.positionInBuffer(o,i-1);this.deleteNodeTail(o,h),e="\r"+e,o.piece.length===0&&c.push(o)}else this.deleteNodeTail(o,d);else this.deleteNodeTail(o,d);let f=this.createNewPieces(e);u.length>0&&this.rbInsertRight(o,u);let g=o;for(let I=0;I<f.length;I++)g=this.rbInsertRight(g,f[I]);this.deleteNodes(c)}else this.insertContentToNodeRight(e,o)}else{let o=this.createNewPieces(e),i=this.rbInsertLeft(null,o[0]);for(let s=1;s<o.length;s++)i=this.rbInsertRight(i,o[s])}this.computeBufferMetadata()}delete(t,e){if(this._lastVisitedLine.lineNumber=0,this._lastVisitedLine.value="",e<=0||this.root===_e)return;let n=this.nodeAt(t),o=this.nodeAt(t+e),i=n.node,s=o.node;if(i===s){let f=this.positionInBuffer(i,n.remainder),g=this.positionInBuffer(i,o.remainder);if(n.nodeStartOffset===t){if(e===i.piece.length){let I=i.next();av(this,i),this.validateCRLFWithPrevNode(I),this.computeBufferMetadata();return}this.deleteNodeHead(i,g),this._searchCache.validate(t),this.validateCRLFWithPrevNode(i),this.computeBufferMetadata();return}if(n.nodeStartOffset+i.piece.length===t+e){this.deleteNodeTail(i,f),this.validateCRLFWithNextNode(i),this.computeBufferMetadata();return}this.shrinkNode(i,f,g),this.computeBufferMetadata();return}let a=[],l=this.positionInBuffer(i,n.remainder);this.deleteNodeTail(i,l),this._searchCache.validate(t),i.piece.length===0&&a.push(i);let d=this.positionInBuffer(s,o.remainder);this.deleteNodeHead(s,d),s.piece.length===0&&a.push(s);let c=i.next();for(let f=c;f!==_e&&f!==s;f=f.next())a.push(f);let u=i.piece.length===0?i.prev():i;this.deleteNodes(a),this.validateCRLFWithNextNode(u),this.computeBufferMetadata()}insertContentToNodeLeft(t,e){let n=[];if(this.shouldCheckCRLF()&&this.endWithCR(t)&&this.startWithLF(e)){let s=e.piece,a={line:s.start.line+1,column:0},l=new go(s.bufferIndex,a,s.end,this.getLineFeedCnt(s.bufferIndex,a,s.end),s.length-1);e.piece=l,t+=`
`,rs(this,e,-1,-1),e.piece.length===0&&n.push(e)}let o=this.createNewPieces(t),i=this.rbInsertLeft(e,o[o.length-1]);for(let s=o.length-2;s>=0;s--)i=this.rbInsertLeft(i,o[s]);this.validateCRLFWithPrevNode(i),this.deleteNodes(n)}insertContentToNodeRight(t,e){this.adjustCarriageReturnFromNext(t,e)&&(t+=`
`);let n=this.createNewPieces(t),o=this.rbInsertRight(e,n[0]),i=o;for(let s=1;s<n.length;s++)i=this.rbInsertRight(i,n[s]);this.validateCRLFWithPrevNode(o)}positionInBuffer(t,e,n){let o=t.piece,i=t.piece.bufferIndex,s=this._buffers[i].lineStarts,l=s[o.start.line]+o.start.column+e,d=o.start.line,c=o.end.line,u=0,f=0,g=0;for(;d<=c&&(u=d+(c-d)/2|0,g=s[u],u!==c);)if(f=s[u+1],l<g)c=u-1;else if(l>=f)d=u+1;else break;return n?(n.line=u,n.column=l-g,null):{line:u,column:l-g}}getLineFeedCnt(t,e,n){if(n.column===0)return n.line-e.line;let o=this._buffers[t].lineStarts;if(n.line===o.length-1)return n.line-e.line;let i=o[n.line+1],s=o[n.line]+n.column;if(i>s+1)return n.line-e.line;let a=s-1;return this._buffers[t].buffer.charCodeAt(a)===13?n.line-e.line+1:n.line-e.line}offsetInBuffer(t,e){return this._buffers[t].lineStarts[e.line]+e.column}deleteNodes(t){for(let e=0;e<t.length;e++)av(this,t[e])}createNewPieces(t){if(t.length>ca){let c=[];for(;t.length>ca;){let f=t.charCodeAt(ca-1),g;f===13||f>=55296&&f<=56319?(g=t.substring(0,ca-1),t=t.substring(ca-1)):(g=t.substring(0,ca),t=t.substring(ca));let I=is(g);c.push(new go(this._buffers.length,{line:0,column:0},{line:I.length-1,column:g.length-I[I.length-1]},I.length-1,g.length)),this._buffers.push(new ss(g,I))}let u=is(t);return c.push(new go(this._buffers.length,{line:0,column:0},{line:u.length-1,column:t.length-u[u.length-1]},u.length-1,t.length)),this._buffers.push(new ss(t,u)),c}let e=this._buffers[0].buffer.length,n=is(t,!1),o=this._lastChangeBufferPos;if(this._buffers[0].lineStarts[this._buffers[0].lineStarts.length-1]===e&&e!==0&&this.startWithLF(t)&&this.endWithCR(this._buffers[0].buffer)){this._lastChangeBufferPos={line:this._lastChangeBufferPos.line,column:this._lastChangeBufferPos.column+1},o=this._lastChangeBufferPos;for(let c=0;c<n.length;c++)n[c]+=e+1;this._buffers[0].lineStarts=this._buffers[0].lineStarts.concat(n.slice(1)),this._buffers[0].buffer+="_"+t,e+=1}else{if(e!==0)for(let c=0;c<n.length;c++)n[c]+=e;this._buffers[0].lineStarts=this._buffers[0].lineStarts.concat(n.slice(1)),this._buffers[0].buffer+=t}let i=this._buffers[0].buffer.length,s=this._buffers[0].lineStarts.length-1,a=i-this._buffers[0].lineStarts[s],l={line:s,column:a},d=new go(0,o,l,this.getLineFeedCnt(0,o,l),i-e);return this._lastChangeBufferPos=l,[d]}getLinesRawContent(){return this.getContentOfSubTree(this.root)}getLineRawContent(t,e=0){let n=this.root,o="",i=this._searchCache.get2(t);if(i){n=i.node;let s=this.getAccumulatedValue(n,t-i.nodeStartLineNumber-1),a=this._buffers[n.piece.bufferIndex].buffer,l=this.offsetInBuffer(n.piece.bufferIndex,n.piece.start);if(i.nodeStartLineNumber+n.piece.lineFeedCnt===t)o=a.substring(l+s,l+n.piece.length);else{let d=this.getAccumulatedValue(n,t-i.nodeStartLineNumber);return a.substring(l+s,l+d-e)}}else{let s=0,a=t;for(;n!==_e;)if(n.left!==_e&&n.lf_left>=t-1)n=n.left;else if(n.lf_left+n.piece.lineFeedCnt>t-1){let l=this.getAccumulatedValue(n,t-n.lf_left-2),d=this.getAccumulatedValue(n,t-n.lf_left-1),c=this._buffers[n.piece.bufferIndex].buffer,u=this.offsetInBuffer(n.piece.bufferIndex,n.piece.start);return s+=n.size_left,this._searchCache.set({node:n,nodeStartOffset:s,nodeStartLineNumber:a-(t-1-n.lf_left)}),c.substring(u+l,u+d-e)}else if(n.lf_left+n.piece.lineFeedCnt===t-1){let l=this.getAccumulatedValue(n,t-n.lf_left-2),d=this._buffers[n.piece.bufferIndex].buffer,c=this.offsetInBuffer(n.piece.bufferIndex,n.piece.start);o=d.substring(c+l,c+n.piece.length);break}else t-=n.lf_left+n.piece.lineFeedCnt,s+=n.size_left+n.piece.length,n=n.right}for(n=n.next();n!==_e;){let s=this._buffers[n.piece.bufferIndex].buffer;if(n.piece.lineFeedCnt>0){let a=this.getAccumulatedValue(n,0),l=this.offsetInBuffer(n.piece.bufferIndex,n.piece.start);return o+=s.substring(l,l+a-e),o}else{let a=this.offsetInBuffer(n.piece.bufferIndex,n.piece.start);o+=s.substr(a,n.piece.length)}n=n.next()}return o}computeBufferMetadata(){let t=this.root,e=1,n=0;for(;t!==_e;)e+=t.lf_left+t.piece.lineFeedCnt,n+=t.size_left+t.piece.length,t=t.right;this._lineCnt=e,this._length=n,this._searchCache.validate(this._length)}getIndexOf(t,e){let n=t.piece,o=this.positionInBuffer(t,e),i=o.line-n.start.line;if(this.offsetInBuffer(n.bufferIndex,n.end)-this.offsetInBuffer(n.bufferIndex,n.start)===e){let s=this.getLineFeedCnt(t.piece.bufferIndex,n.start,o);if(s!==i)return{index:s,remainder:0}}return{index:i,remainder:o.column}}getAccumulatedValue(t,e){if(e<0)return 0;let n=t.piece,o=this._buffers[n.bufferIndex].lineStarts,i=n.start.line+e+1;return i>n.end.line?o[n.end.line]+n.end.column-o[n.start.line]-n.start.column:o[i]-o[n.start.line]-n.start.column}deleteNodeTail(t,e){let n=t.piece,o=n.lineFeedCnt,i=this.offsetInBuffer(n.bufferIndex,n.end),s=e,a=this.offsetInBuffer(n.bufferIndex,s),l=this.getLineFeedCnt(n.bufferIndex,n.start,s),d=l-o,c=a-i,u=n.length+c;t.piece=new go(n.bufferIndex,n.start,s,l,u),rs(this,t,c,d)}deleteNodeHead(t,e){let n=t.piece,o=n.lineFeedCnt,i=this.offsetInBuffer(n.bufferIndex,n.start),s=e,a=this.getLineFeedCnt(n.bufferIndex,s,n.end),l=this.offsetInBuffer(n.bufferIndex,s),d=a-o,c=i-l,u=n.length+c;t.piece=new go(n.bufferIndex,s,n.end,a,u),rs(this,t,c,d)}shrinkNode(t,e,n){let o=t.piece,i=o.start,s=o.end,a=o.length,l=o.lineFeedCnt,d=e,c=this.getLineFeedCnt(o.bufferIndex,o.start,d),u=this.offsetInBuffer(o.bufferIndex,e)-this.offsetInBuffer(o.bufferIndex,i);t.piece=new go(o.bufferIndex,o.start,d,c,u),rs(this,t,u-a,c-l);let f=new go(o.bufferIndex,n,s,this.getLineFeedCnt(o.bufferIndex,n,s),this.offsetInBuffer(o.bufferIndex,s)-this.offsetInBuffer(o.bufferIndex,n)),g=this.rbInsertRight(t,f);this.validateCRLFWithPrevNode(g)}appendToNode(t,e){this.adjustCarriageReturnFromNext(e,t)&&(e+=`
`);let n=this.shouldCheckCRLF()&&this.startWithLF(e)&&this.endWithCR(t),o=this._buffers[0].buffer.length;this._buffers[0].buffer+=e;let i=is(e,!1);for(let g=0;g<i.length;g++)i[g]+=o;if(n){let g=this._buffers[0].lineStarts[this._buffers[0].lineStarts.length-2];this._buffers[0].lineStarts.pop(),this._lastChangeBufferPos={line:this._lastChangeBufferPos.line-1,column:o-g}}this._buffers[0].lineStarts=this._buffers[0].lineStarts.concat(i.slice(1));let s=this._buffers[0].lineStarts.length-1,a=this._buffers[0].buffer.length-this._buffers[0].lineStarts[s],l={line:s,column:a},d=t.piece.length+e.length,c=t.piece.lineFeedCnt,u=this.getLineFeedCnt(0,t.piece.start,l),f=u-c;t.piece=new go(t.piece.bufferIndex,t.piece.start,l,u,d),this._lastChangeBufferPos=l,rs(this,t,e.length,f)}nodeAt(t){let e=this.root,n=this._searchCache.get(t);if(n)return{node:n.node,nodeStartOffset:n.nodeStartOffset,remainder:t-n.nodeStartOffset};let o=0;for(;e!==_e;)if(e.size_left>t)e=e.left;else if(e.size_left+e.piece.length>=t){o+=e.size_left;let i={node:e,remainder:t-e.size_left,nodeStartOffset:o};return this._searchCache.set(i),i}else t-=e.size_left+e.piece.length,o+=e.size_left+e.piece.length,e=e.right;return null}nodeAt2(t,e){let n=this.root,o=0;for(;n!==_e;)if(n.left!==_e&&n.lf_left>=t-1)n=n.left;else if(n.lf_left+n.piece.lineFeedCnt>t-1){let i=this.getAccumulatedValue(n,t-n.lf_left-2),s=this.getAccumulatedValue(n,t-n.lf_left-1);return o+=n.size_left,{node:n,remainder:Math.min(i+e-1,s),nodeStartOffset:o}}else if(n.lf_left+n.piece.lineFeedCnt===t-1){let i=this.getAccumulatedValue(n,t-n.lf_left-2);if(i+e-1<=n.piece.length)return{node:n,remainder:i+e-1,nodeStartOffset:o};e-=n.piece.length-i;break}else t-=n.lf_left+n.piece.lineFeedCnt,o+=n.size_left+n.piece.length,n=n.right;for(n=n.next();n!==_e;){if(n.piece.lineFeedCnt>0){let i=this.getAccumulatedValue(n,0),s=this.offsetOfNode(n);return{node:n,remainder:Math.min(e-1,i),nodeStartOffset:s}}else if(n.piece.length>=e-1){let i=this.offsetOfNode(n);return{node:n,remainder:e-1,nodeStartOffset:i}}else e-=n.piece.length;n=n.next()}return null}nodeCharCodeAt(t,e){if(t.piece.lineFeedCnt<1)return-1;let n=this._buffers[t.piece.bufferIndex],o=this.offsetInBuffer(t.piece.bufferIndex,t.piece.start)+e;return n.buffer.charCodeAt(o)}offsetOfNode(t){if(!t)return 0;let e=t.size_left;for(;t!==this.root;)t.parent.right===t&&(e+=t.parent.size_left+t.parent.piece.length),t=t.parent;return e}shouldCheckCRLF(){return!(this._EOLNormalized&&this._EOL===`
`)}startWithLF(t){if(typeof t=="string")return t.charCodeAt(0)===10;if(t===_e||t.piece.lineFeedCnt===0)return!1;let e=t.piece,n=this._buffers[e.bufferIndex].lineStarts,o=e.start.line,i=n[o]+e.start.column;return o===n.length-1||n[o+1]>i+1?!1:this._buffers[e.bufferIndex].buffer.charCodeAt(i)===10}endWithCR(t){return typeof t=="string"?t.charCodeAt(t.length-1)===13:t===_e||t.piece.lineFeedCnt===0?!1:this.nodeCharCodeAt(t,t.piece.length-1)===13}validateCRLFWithPrevNode(t){if(this.shouldCheckCRLF()&&this.startWithLF(t)){let e=t.prev();this.endWithCR(e)&&this.fixCRLF(e,t)}}validateCRLFWithNextNode(t){if(this.shouldCheckCRLF()&&this.endWithCR(t)){let e=t.next();this.startWithLF(e)&&this.fixCRLF(t,e)}}fixCRLF(t,e){let n=[],o=this._buffers[t.piece.bufferIndex].lineStarts,i;t.piece.end.column===0?i={line:t.piece.end.line-1,column:o[t.piece.end.line]-o[t.piece.end.line-1]-1}:i={line:t.piece.end.line,column:t.piece.end.column-1};let s=t.piece.length-1,a=t.piece.lineFeedCnt-1;t.piece=new go(t.piece.bufferIndex,t.piece.start,i,a,s),rs(this,t,-1,-1),t.piece.length===0&&n.push(t);let l={line:e.piece.start.line+1,column:0},d=e.piece.length-1,c=this.getLineFeedCnt(e.piece.bufferIndex,l,e.piece.end);e.piece=new go(e.piece.bufferIndex,l,e.piece.end,c,d),rs(this,e,-1,-1),e.piece.length===0&&n.push(e);let u=this.createNewPieces(`\r
`);this.rbInsertRight(t,u[0]);for(let f=0;f<n.length;f++)av(this,n[f])}adjustCarriageReturnFromNext(t,e){if(this.shouldCheckCRLF()&&this.endWithCR(t)){let n=e.next();if(this.startWithLF(n)){if(t+=`
`,n.piece.length===1)av(this,n);else{let o=n.piece,i={line:o.start.line+1,column:0},s=o.length-1,a=this.getLineFeedCnt(o.bufferIndex,i,o.end);n.piece=new go(o.bufferIndex,i,o.end,a,s),rs(this,n,-1,-1)}return!0}}return!1}iterate(t,e){if(t===_e)return e(_e);let n=this.iterate(t.left,e);return n&&e(t)&&this.iterate(t.right,e)}getNodeContent(t){if(t===_e)return"";let e=this._buffers[t.piece.bufferIndex],n=t.piece,o=this.offsetInBuffer(n.bufferIndex,n.start),i=this.offsetInBuffer(n.bufferIndex,n.end);return e.buffer.substring(o,i)}getPieceContent(t){let e=this._buffers[t.bufferIndex],n=this.offsetInBuffer(t.bufferIndex,t.start),o=this.offsetInBuffer(t.bufferIndex,t.end);return e.buffer.substring(n,o)}rbInsertRight(t,e){let n=new Xm(e,1);if(n.left=_e,n.right=_e,n.parent=_e,n.size_left=0,n.lf_left=0,this.root===_e)this.root=n,n.color=0;else if(t.right===_e)t.right=n,n.parent=t;else{let i=aT(t.right);i.left=n,n.parent=i}return SN(this,n),n}rbInsertLeft(t,e){let n=new Xm(e,1);if(n.left=_e,n.right=_e,n.parent=_e,n.size_left=0,n.lf_left=0,this.root===_e)this.root=n,n.color=0;else if(t.left===_e)t.left=n,n.parent=t;else{let o=IN(t.left);o.right=n,n.parent=o}return SN(this,n),n}getContentOfSubTree(t){let e="";return this.iterate(t,n=>(e+=this.getNodeContent(n),!0)),e}};function dT(r){let t=0,e=0,n=0,o=0;for(let i=0,s=r.length;i<s;i++){let a=r.charCodeAt(i);a===13?(t===0&&(e=i),t++,i+1<s&&r.charCodeAt(i+1)===10?(o|=2,i++):o|=3,n=i+1):a===10&&(o|=1,t===0&&(e=i),t++,n=i+1)}return t===0&&(e=r.length),[t,e,r.length-n,o]}var _N;function WK(){return _N||(_N=new TextDecoder("UTF-16LE")),_N}function q5(r,t,e){let n=new Uint16Array(r.buffer,t,e);return e>0&&(n[0]===65279||n[0]===65534)?$K(r,t,e):WK().decode(n)}function $K(r,t,e){let n=[],o=0;for(let i=0;i<e;i++){let s=A0(r,t);t+=2,n[o++]=String.fromCharCode(s)}return n.join("")}function cT(r){return r.replace(/\n/g,"\\n").replace(/\r/g,"\\r")}var uT=class r{constructor(t,e,n,o){this.oldPosition=t;this.oldText=e;this.newPosition=n;this.newText=o}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}toString(){return this.oldText.length===0?`(insert@${this.oldPosition} "${cT(this.newText)}")`:this.newText.length===0?`(delete@${this.oldPosition} "${cT(this.oldText)}")`:`(replace@${this.oldPosition} "${cT(this.oldText)}" with "${cT(this.newText)}")`}static _writeStringSize(t){return 4+2*t.length}static _writeString(t,e,n){let o=e.length;Ef(t,o,n),n+=4;for(let i=0;i<o;i++)O0(t,e.charCodeAt(i),n),n+=2;return n}static _readString(t,e){let n=yf(t,e);return e+=4,q5(t,e,n)}writeSize(){return 8+r._writeStringSize(this.oldText)+r._writeStringSize(this.newText)}write(t,e){return Ef(t,this.oldPosition,e),e+=4,Ef(t,this.newPosition,e),e+=4,e=r._writeString(t,this.oldText,e),e=r._writeString(t,this.newText,e),e}static read(t,e,n){let o=yf(t,e);e+=4;let i=yf(t,e);e+=4;let s=r._readString(t,e);e+=r._writeStringSize(s);let a=r._readString(t,e);return e+=r._writeStringSize(a),n.push(new r(o,s,i,a)),e}};var pT=class r extends K{constructor(e,n,o,i,s,a,l){super();this._onDidChangeContent=this._register(new D);this._BOM=n,this._mightContainNonBasicASCII=!a,this._mightContainRTL=i,this._mightContainUnusualLineTerminators=s,this._pieceTree=new lT(e,o,l)}get onDidChangeContent(){return this._onDidChangeContent.event}equals(e){return!(e instanceof r)||this._BOM!==e._BOM||this.getEOL()!==e.getEOL()?!1:this._pieceTree.equal(e._pieceTree)}mightContainRTL(){return this._mightContainRTL}mightContainUnusualLineTerminators(){return this._mightContainUnusualLineTerminators}resetMightContainUnusualLineTerminators(){this._mightContainUnusualLineTerminators=!1}mightContainNonBasicASCII(){return this._mightContainNonBasicASCII}getBOM(){return this._BOM}getEOL(){return this._pieceTree.getEOL()}createSnapshot(e){return this._pieceTree.createSnapshot(e?this._BOM:"")}getOffsetAt(e,n){return this._pieceTree.getOffsetAt(e,n)}getPositionAt(e){return this._pieceTree.getPositionAt(e)}getRangeAt(e,n){let o=e+n,i=this.getPositionAt(e),s=this.getPositionAt(o);return new Ke(i.lineNumber,i.column,s.lineNumber,s.column)}getValueInRange(e,n=0){if(e.isEmpty())return"";let o=this._getEndOfLine(n);return this._pieceTree.getValueInRange(e,o)}getValueLengthInRange(e,n=0){if(e.isEmpty())return 0;if(e.startLineNumber===e.endLineNumber)return e.endColumn-e.startColumn;let o=this.getOffsetAt(e.startLineNumber,e.startColumn),i=this.getOffsetAt(e.endLineNumber,e.endColumn),s=0,a=this._getEndOfLine(n),l=this.getEOL();if(a.length!==l.length){let d=a.length-l.length,c=e.endLineNumber-e.startLineNumber;s=d*c}return i-o+s}getCharacterCountInRange(e,n=0){if(this._mightContainNonBasicASCII){let o=0,i=e.startLineNumber,s=e.endLineNumber;for(let a=i;a<=s;a++){let l=this.getLineContent(a),d=a===i?e.startColumn-1:0,c=a===s?e.endColumn-1:l.length;for(let u=d;u<c;u++)cd(l.charCodeAt(u))?(o=o+1,u=u+1):o=o+1}return o+=this._getEndOfLine(n).length*(s-i),o}return this.getValueLengthInRange(e,n)}getNearestChunk(e){return this._pieceTree.getNearestChunk(e)}getLength(){return this._pieceTree.getLength()}getLineCount(){return this._pieceTree.getLineCount()}getLinesContent(){return this._pieceTree.getLinesContent()}getLineContent(e){return this._pieceTree.getLineContent(e)}getLineCharCode(e,n){return this._pieceTree.getLineCharCode(e,n)}getCharCode(e){return this._pieceTree.getCharCode(e)}getLineLength(e){return this._pieceTree.getLineLength(e)}getLineMinColumn(e){return 1}getLineMaxColumn(e){return this.getLineLength(e)+1}getLineFirstNonWhitespaceColumn(e){let n=$v(this.getLineContent(e));return n===-1?0:n+1}getLineLastNonWhitespaceColumn(e){let n=EU(this.getLineContent(e));return n===-1?0:n+2}_getEndOfLine(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._pieceTree.setEOL(e)}applyEdits(e,n,o){let i=this._mightContainRTL,s=this._mightContainUnusualLineTerminators,a=this._mightContainNonBasicASCII,l=!0,d=[];for(let C=0;C<e.length;C++){let _=e[C];l&&_._isTracked&&(l=!1);let R=_.range;if(_.text){let Z=!0;a||(Z=!CU(_.text),a=Z),!i&&Z&&(i=Kv(_.text)),!s&&Z&&(s=Jv(_.text))}let O="",U=0,ie=0,Y=0;if(_.text){let Z;[U,ie,Y,Z]=dT(_.text);let ee=this.getEOL(),oe=ee===`\r
`?2:1;Z===0||Z===oe?O=_.text:O=_.text.replace(/\r\n|\r|\n/g,ee)}d[C]={sortIndex:C,identifier:_.identifier||null,range:R,rangeOffset:this.getOffsetAt(R.startLineNumber,R.startColumn),rangeLength:this.getValueLengthInRange(R),text:O,eolCount:U,firstLineLength:ie,lastLineLength:Y,forceMoveMarkers:!!_.forceMoveMarkers,isAutoWhitespaceEdit:_.isAutoWhitespaceEdit||!1}}d.sort(r._sortOpsAscending);let c=!1;for(let C=0,_=d.length-1;C<_;C++){let R=d[C].range.getEndPosition(),O=d[C+1].range.getStartPosition();if(O.isBeforeOrEqual(R)){if(O.isBefore(R))throw new Error("Overlapping ranges are not allowed!");c=!0}}l&&(d=this._reduceOperations(d));let u=o||n?r._getInverseEditRanges(d):[],f=[];if(n)for(let C=0;C<d.length;C++){let _=d[C],R=u[C];if(_.isAutoWhitespaceEdit&&_.range.isEmpty())for(let O=R.startLineNumber;O<=R.endLineNumber;O++){let U="";O===R.startLineNumber&&(U=this.getLineContent(_.range.startLineNumber),$v(U)!==-1)||f.push({lineNumber:O,oldContent:U})}}let g=null;if(o){let C=0;g=[];for(let _=0;_<d.length;_++){let R=d[_],O=u[_],U=this.getValueInRange(R.range),ie=R.rangeOffset+C;C+=R.text.length-U.length,g[_]={sortIndex:R.sortIndex,identifier:R.identifier,range:O,text:U,textChange:new uT(R.rangeOffset,U,ie,R.text)}}c||g.sort((_,R)=>_.sortIndex-R.sortIndex)}this._mightContainRTL=i,this._mightContainUnusualLineTerminators=s,this._mightContainNonBasicASCII=a;let I=this._doApplyEdits(d),h=null;if(n&&f.length>0){f.sort((C,_)=>_.lineNumber-C.lineNumber),h=[];for(let C=0,_=f.length;C<_;C++){let R=f[C].lineNumber;if(C>0&&f[C-1].lineNumber===R)continue;let O=f[C].oldContent,U=this.getLineContent(R);U.length===0||U===O||$v(U)!==-1||h.push(R)}}return this._onDidChangeContent.fire(),new $b(g,I,h)}_reduceOperations(e){return e.length<1e3?e:[this._toSingleEditOperation(e)]}_toSingleEditOperation(e){let n=!1,o=e[0].range,i=e[e.length-1].range,s=new Ke(o.startLineNumber,o.startColumn,i.endLineNumber,i.endColumn),a=o.startLineNumber,l=o.startColumn,d=[];for(let I=0,h=e.length;I<h;I++){let C=e[I],_=C.range;n=n||C.forceMoveMarkers,d.push(this.getValueInRange(new Ke(a,l,_.startLineNumber,_.startColumn))),C.text.length>0&&d.push(C.text),a=_.endLineNumber,l=_.endColumn}let c=d.join(""),[u,f,g]=dT(c);return{sortIndex:0,identifier:e[0].identifier,range:s,rangeOffset:this.getOffsetAt(s.startLineNumber,s.startColumn),rangeLength:this.getValueLengthInRange(s,0),text:c,eolCount:u,firstLineLength:f,lastLineLength:g,forceMoveMarkers:n,isAutoWhitespaceEdit:!1}}_doApplyEdits(e){e.sort(r._sortOpsDescending);let n=[];for(let o=0;o<e.length;o++){let i=e[o],s=i.range.startLineNumber,a=i.range.startColumn,l=i.range.endLineNumber,d=i.range.endColumn;if(s===l&&a===d&&i.text.length===0)continue;i.text?(this._pieceTree.delete(i.rangeOffset,i.rangeLength),this._pieceTree.insert(i.rangeOffset,i.text,!0)):this._pieceTree.delete(i.rangeOffset,i.rangeLength);let c=new Ke(s,a,l,d);n.push({range:c,rangeLength:i.rangeLength,text:i.text,rangeOffset:i.rangeOffset,forceMoveMarkers:i.forceMoveMarkers})}return n}findMatchesLineByLine(e,n,o,i){return this._pieceTree.findMatchesLineByLine(e,n,o,i)}getPieceTree(){return this._pieceTree}static _getInverseEditRange(e,n){let o=e.startLineNumber,i=e.startColumn,[s,a,l]=dT(n),d;if(n.length>0){let c=s+1;c===1?d=new Ke(o,i,o,i+a):d=new Ke(o,i,o+c-1,l+1)}else d=new Ke(o,i,o,i);return d}static _getInverseEditRanges(e){let n=[],o=0,i=0,s=null;for(let a=0,l=e.length;a<l;a++){let d=e[a],c,u;s?s.range.endLineNumber===d.range.startLineNumber?(c=o,u=i+(d.range.startColumn-s.range.endColumn)):(c=o+(d.range.startLineNumber-s.range.endLineNumber),u=d.range.startColumn):(c=d.range.startLineNumber,u=d.range.startColumn);let f;if(d.text.length>0){let g=d.eolCount+1;g===1?f=new Ke(c,u,c,u+d.firstLineLength):f=new Ke(c,u,c+g-1,d.lastLineLength+1)}else f=new Ke(c,u,c,u);o=f.endLineNumber,i=f.endColumn,n.push(f),s=d}return n}static _sortOpsAscending(e,n){let o=Ke.compareRangesUsingEnds(e.range,n.range);return o===0?e.sortIndex-n.sortIndex:o}static _sortOpsDescending(e,n){let o=Ke.compareRangesUsingEnds(e.range,n.range);return o===0?n.sortIndex-e.sortIndex:-o}};var PN=class{constructor(t,e,n,o,i,s,a,l,d){this._chunks=t;this._bom=e;this._cr=n;this._lf=o;this._crlf=i;this._containsRTL=s;this._containsUnusualLineTerminators=a;this._isBasicASCII=l;this._normalizeEOL=d}_getEOL(t){let e=this._cr+this._lf+this._crlf,n=this._cr+this._crlf;return e===0?t===1?`
`:`\r
`:n>e/2?`\r
`:`
`}create(t){let e=this._getEOL(t),n=this._chunks;if(this._normalizeEOL&&(e===`\r
`&&(this._cr>0||this._lf>0)||e===`
`&&(this._cr>0||this._crlf>0)))for(let i=0,s=n.length;i<s;i++){let a=n[i].buffer.replace(/\r\n|\r|\n/g,e),l=is(a);n[i]=new ss(a,l)}let o=new pT(n,this._bom,e,this._containsRTL,this._containsUnusualLineTerminators,this._isBasicASCII,this._normalizeEOL);return{textBuffer:o,disposable:o}}getFirstLineText(t){return this._chunks[0].buffer.substr(0,t).split(/\r\n|\r|\n/)[0]}},lv=class{constructor(){this.chunks=[],this.BOM="",this._hasPreviousChar=!1,this._previousChar=0,this._tmpLineStarts=[],this.cr=0,this.lf=0,this.crlf=0,this.containsRTL=!1,this.containsUnusualLineTerminators=!1,this.isBasicASCII=!0}acceptChunk(t){if(t.length===0)return;this.chunks.length===0&&_U(t)&&(this.BOM=TU,t=t.substr(1));let e=t.charCodeAt(t.length-1);e===13||e>=55296&&e<=56319?(this._acceptChunk1(t.substr(0,t.length-1),!1),this._hasPreviousChar=!0,this._previousChar=e):(this._acceptChunk1(t,!1),this._hasPreviousChar=!1,this._previousChar=e)}_acceptChunk1(t,e){!e&&t.length===0||(this._hasPreviousChar?this._acceptChunk2(String.fromCharCode(this._previousChar)+t):this._acceptChunk2(t))}_acceptChunk2(t){let e=z5(this._tmpLineStarts,t);this.chunks.push(new ss(t,e.lineStarts)),this.cr+=e.cr,this.lf+=e.lf,this.crlf+=e.crlf,e.isBasicASCII||(this.isBasicASCII=!1,this.containsRTL||(this.containsRTL=Kv(t)),this.containsUnusualLineTerminators||(this.containsUnusualLineTerminators=Jv(t)))}finish(t=!0){return this._finish(),new PN(this.chunks,this.BOM,this.cr,this.lf,this.crlf,this.containsRTL,this.containsUnusualLineTerminators,this.isBasicASCII,t)}_finish(){if(this.chunks.length===0&&this._acceptChunk1("",!0),this._hasPreviousChar){this._hasPreviousChar=!1;let t=this.chunks[this.chunks.length-1];t.buffer+=String.fromCharCode(this._previousChar);let e=is(t.buffer);t.lineStarts=e,this._previousChar===13&&this.cr++}}};var mT=class extends K{constructor(e,n,o){super();this._source=e;this._inputTextBuffer=n;this._outputs=o;this._outputTextBuffers=void 0}_getFullModelRange(e){let n=e.getLineCount();return new Ke(1,1,n,this._getLineMaxColumn(e,n))}_getLineMaxColumn(e,n){if(n<1||n>e.getLineCount())throw new Error("Illegal value for lineNumber");return e.getLineLength(n)+1}get inputTextBuffer(){if(!this._inputTextBuffer){let e=new lv;e.acceptChunk(this._source);let n=e.finish(!0),{textBuffer:o,disposable:i}=n.create(1);this._inputTextBuffer=o,this._register(i)}return this._inputTextBuffer}get outputTextBuffers(){return this._outputTextBuffers||(this._outputTextBuffers=this._outputs.map(e=>{let n=new lv;n.acceptChunk(e);let o=n.finish(!0),{textBuffer:i,disposable:s}=o.create(1);return this._register(s),i})),this._outputTextBuffers}findInInputs(e){let o=new Eh(e,!1,!1,null).parseSearchRequest();if(!o)return[];let i=this._getFullModelRange(this.inputTextBuffer);return this.inputTextBuffer.findMatchesLineByLine(i,o,!0,5e3)}findInOutputs(e){let o=new Eh(e,!1,!1,null).parseSearchRequest();return o?this.outputTextBuffers.map(i=>{let s=i.findMatchesLineByLine(this._getFullModelRange(i),o,!0,5e3);if(s.length!==0)return{textBuffer:i,matches:s}}).filter(i=>!!i):[]}};function DN(r,t){let e=-1,n=[],o=[];return r.forEach(s=>{s.range.startLineNumber!==e&&o.length>0&&(n.push([...o]),o=[]),o.push(s),e=s.range.endLineNumber}),o.length>0&&n.push([...o]),n.map(s=>{let a=[],l=s[0].range.startLineNumber,d=s[s.length-1].range.endLineNumber;for(let c=l;c<=d;c++)a.push(t.getLineContent(c));return new KE(a.join(`
`)+`
`,s.map(c=>new Ke(c.range.startLineNumber-1,c.range.startColumn-1,c.range.endLineNumber-1,c.range.endColumn-1)))})}var Uet=Object.freeze({id:"application",order:100,title:p(4613,null),type:"object"}),K5=Object.freeze({id:"workbench",order:7,title:p(4621,null),type:"object"}),zK=Object.freeze({id:"security",scope:1,title:p(4619,null),type:"object",order:7}),Fet=Object.freeze({id:"problems",title:p(4615,null),type:"object",order:101}),qK=Object.freeze({id:"window",order:8,title:p(4620,null),type:"object"}),KK={ConfigurationMigration:"base.contributions.configuration.migration"},wN=class{constructor(){this.migrations=[];this._onDidRegisterConfigurationMigrations=new D;this.onDidRegisterConfigurationMigration=this._onDidRegisterConfigurationMigrations.event}registerConfigurationMigrations(t){this.migrations.push(...t)}},vT=new wN;ht.add(KK.ConfigurationMigration,vT);var fT=class extends K{constructor(e,n){super();this.configurationService=e;this.workspaceService=n;this._register(this.workspaceService.onDidChangeWorkspaceFolders(async o=>{for(let i of o.added)await this.migrateConfigurationsForFolder(i,vT.migrations)})),this.migrateConfigurations(vT.migrations),this._register(vT.onDidRegisterConfigurationMigration(o=>this.migrateConfigurations(o)))}static{this.ID="workbench.contrib.configurationMigration"}async migrateConfigurations(e){await this.migrateConfigurationsForFolder(void 0,e);for(let n of this.workspaceService.getWorkspace().folders)await this.migrateConfigurationsForFolder(n,e)}async migrateConfigurationsForFolder(e,n){await Promise.all([n.map(o=>this.migrateConfigurationsForFolderAndOverride(o,e?.uri))])}async migrateConfigurationsForFolderAndOverride(e,n){let o=this.configurationService.inspect(e.key,{resource:n}),i=this.workspaceService.getWorkbenchState()===3?[["user",2],["userLocal",3],["userRemote",4],["workspace",5],["workspaceFolder",6]]:[["user",2],["userLocal",3],["userRemote",4],["workspace",5]];for(let[s,a]of i){let l=o[s];if(!l)continue;let d=[];if(l.value!==void 0){let c=await this.runMigration(e,s,l.value,n,void 0);for(let u of c??[])d.push([u,[]])}for(let{identifiers:c,value:u}of l.overrides??[])if(u!==void 0){let f=await this.runMigration(e,s,u,n,c);for(let g of f??[])d.push([g,c])}d.length&&await Promise.allSettled(d.map(async([[c,u],f])=>this.configurationService.updateValue(c,u.value,{resource:n,overrideIdentifiers:f},a)))}}async runMigration(e,n,o,i,s){let a=d=>{let u=this.configurationService.inspect(d,{resource:i})[n];if(u)return s?u.overrides?.find(({identifiers:f})=>Xt(f,s))?.value:u.value},l=await e.migrateFn(o,a);return Array.isArray(l)?l:[[e.key,l]]}};fT=L([P(0,to),P(1,Di)],fT);var gT=class extends K{constructor(e){super();this.remoteAgentService=e;this._ready=new jn;this.ready=this._ready.p;this.create()}static{this.ID="workbench.contrib.dynamicWorkbenchSecurityConfiguration"}async create(){try{await this.doCreate()}finally{this._ready.complete()}}async doCreate(){if(!Rt&&(await this.remoteAgentService.getEnvironment())?.os!==1)return;ht.as($o.Configuration).registerConfiguration({...zK,properties:{"security.allowedUNCHosts":{type:"array",items:{type:"string",pattern:"^[^\\\\]+$",patternErrorMessage:p(4617,null)},default:[],markdownDescription:p(4616,null),scope:3},"security.restrictUNCAccess":{type:"boolean",default:!0,markdownDescription:p(4618,null),scope:3}}})}};gT=L([P(0,lm)],gT);var dv="window.newWindowProfile",hT=class extends K{constructor(e,n){super();this.userDataProfilesService=e;this.configurationService=n;this.registerNewWindowProfileConfiguration(),this._register(this.userDataProfilesService.onDidChangeProfiles(o=>this.registerNewWindowProfileConfiguration())),this.setNewWindowProfile(),this.checkAndResetNewWindowProfileConfig(),this._register(n.onDidChangeConfiguration(o=>{o.source!==7&&o.affectsConfiguration(dv)&&this.setNewWindowProfile()})),this._register(this.userDataProfilesService.onDidChangeProfiles(()=>this.checkAndResetNewWindowProfileConfig()))}static{this.ID="workbench.contrib.dynamicWindowConfiguration"}registerNewWindowProfileConfiguration(){let e=ht.as($o.Configuration),n={...qK,properties:{[dv]:{type:["string","null"],default:null,enum:[...this.userDataProfilesService.profiles.map(o=>o.name),null],enumItemLabels:[...this.userDataProfilesService.profiles.map(()=>""),p(4612,null)],description:p(4614,null),scope:1}}};this.configurationNode?e.updateConfigurations({add:[n],remove:[this.configurationNode]}):e.registerConfiguration(n),this.configurationNode=n}setNewWindowProfile(){let e=this.configurationService.getValue(dv);this.newWindowProfile=e?this.userDataProfilesService.profiles.find(n=>n.name===e):void 0}checkAndResetNewWindowProfileConfig(){let e=this.configurationService.getValue(dv);if(!e)return;let n=this.newWindowProfile?this.userDataProfilesService.profiles.find(o=>o.id===this.newWindowProfile.id):void 0;e!==n?.name&&this.configurationService.updateValue(dv,n?.name)}};hT=L([P(0,J2),P(1,to)],hT);var Xet=N("editorResolverService");var JK=ht.as($o.Configuration),jK={...K5,properties:{"workbench.editorAssociations":{type:"object",markdownDescription:p(16471,null),additionalProperties:{type:"string"}}}};JK.registerConfiguration(jK);function J5(r,t){if(new Set([X.extension,X.webviewPanel,X.vscodeWorkspaceTrust,X.vscodeSettings]).has(t.scheme))return!1;let o=typeof r=="string"&&r.indexOf(qe.sep)>=0?`${t.scheme}:${t.path}`:tn(t);return Zr(r,o,{ignoreCase:!0})}var bT=class r{constructor(t,e,n,o,i,s,a){this._textDocumentsAndEditors=n;this._textDocuments=o;this._extHostFileSystem=i;this._extHostSearch=s;this._logService=a;this._notebookStatusBarItemProviders=new Map;this._documents=new et;this._editors=new Map;this._onDidChangeActiveNotebookEditor=new D;this.onDidChangeActiveNotebookEditor=this._onDidChangeActiveNotebookEditor.event;this._visibleNotebookEditors=[];this._onDidOpenNotebookDocument=new D;this.onDidOpenNotebookDocument=this._onDidOpenNotebookDocument.event;this._onDidCloseNotebookDocument=new D;this.onDidCloseNotebookDocument=this._onDidCloseNotebookDocument.event;this._onDidChangeVisibleNotebookEditors=new D;this.onDidChangeVisibleNotebookEditors=this._onDidChangeVisibleNotebookEditors.event;this._statusBarCache=new wo("NotebookCellStatusBarCache");this._handlePool=0;this._notebookSerializer=new Map;this._notebookProxy=t.getProxy(V.MainThreadNotebook),this._notebookDocumentsProxy=t.getProxy(V.MainThreadNotebookDocuments),this._notebookEditorsProxy=t.getProxy(V.MainThreadNotebookEditors),this._commandsConverter=e.converter,e.registerArgumentProcessor({processArgument:l=>{if(l&&l.$mid===13){let d=l.notebookEditor?.notebookUri,c=l.cell.handle,f=this._documents.get(d)?.getCell(c);if(f)return f.apiCell}if(l&&l.$mid===14){let d=l.uri,c=this._documents.get(d);if(c)return c.apiNotebook}return l}}),r._registerApiCommands(e)}static{this._notebookStatusBarItemProviderHandlePool=0}get activeNotebookEditor(){return this._activeNotebookEditor?.apiEditor}get visibleNotebookEditors(){return this._visibleNotebookEditors.map(t=>t.apiEditor)}getEditorById(t){let e=this._editors.get(t);if(!e)throw new Error(`unknown text editor: ${t}. known editors: ${[...this._editors.keys()]} `);return e}getIdByEditor(t){for(let[e,n]of this._editors)if(n.apiEditor===t)return e}get notebookDocuments(){return[...this._documents.values()]}getNotebookDocument(t,e){let n=this._documents.get(t);if(!n&&!e)throw new Error(`NO notebook document for '${t}'`);return n}static _convertNotebookRegistrationData(t,e){if(!e)return;let n=e.filenamePattern.map(o=>th.from(o)).filter(o=>o!==void 0);if(e.filenamePattern&&!n){console.warn(`Notebook content provider view options file name pattern is invalid ${e.filenamePattern}`);return}return{extension:t.identifier,providerDisplayName:t.displayName||t.name,displayName:e.displayName,filenamePattern:n,priority:e.exclusive?"exclusive":void 0}}registerNotebookCellStatusBarItemProvider(t,e,n){let o=r._notebookStatusBarItemProviderHandlePool++,i=typeof n.onDidChangeCellStatusBarItems=="function"?r._notebookStatusBarItemProviderHandlePool++:void 0;this._notebookStatusBarItemProviders.set(o,n),this._notebookProxy.$registerNotebookCellStatusBarItemProvider(o,i,e);let s;return i!==void 0&&(s=n.onDidChangeCellStatusBarItems(a=>this._notebookProxy.$emitCellStatusBarEvent(i))),new Ce(()=>{this._notebookStatusBarItemProviders.delete(o),this._notebookProxy.$unregisterNotebookCellStatusBarItemProvider(o,i),s?.dispose()})}async createNotebookDocument(t){let e=await this._notebookDocumentsProxy.$tryCreateNotebook({viewType:t.viewType,content:t.content&&xl.from(t.content)});return E.revive(e)}async openNotebookDocument(t){let e=this._documents.get(t);if(e)return e.apiNotebook;let n=await this._notebookDocumentsProxy.$tryOpenNotebook(t),o=this._documents.get(E.revive(n));return Ur(o?.apiNotebook)}async showNotebookDocument(t,e){let n;typeof e=="object"?n={position:Vt.from(e.viewColumn),preserveFocus:e.preserveFocus,selections:e.selections&&e.selections.map(ir.from),pinned:typeof e.preview=="boolean"?!e.preview:void 0,label:typeof e.asRepl=="string"?e.asRepl:typeof e.asRepl=="object"?e.asRepl.label:void 0}:n={preserveFocus:!1,pinned:!0};let o=e?.asRepl?"repl":t.notebookType,i=await this._notebookEditorsProxy.$tryShowNotebookDocument(t.uri,o,n),s=i&&this._editors.get(i)?.apiEditor;if(s)return s;throw i?new Error(`Could NOT open editor for "${t.uri.toString()}" because another editor opened in the meantime.`):new Error(`Could NOT open editor for "${t.uri.toString()}".`)}async $provideNotebookCellStatusBarItems(t,e,n,o){let i=this._notebookStatusBarItemProviders.get(t),s=E.revive(e),a=this._documents.get(s);if(!a||!i)return;let l=a.getCellFromIndex(n);if(!l)return;let d=await i.provideCellStatusBarItems(l.apiCell,o);if(!d)return;let c=new te,u=this._statusBarCache.add([c]),g=(Array.isArray(d)?d:[d]).map(I=>pk.from(I,this._commandsConverter,c));return{cacheId:u,items:g}}$releaseNotebookCellStatusBarItems(t){this._statusBarCache.delete(t)}registerNotebookSerializer(t,e,n,o,i){if(Ti(e))throw new Error("viewType cannot be empty or just whitespace");let s=this._handlePool++;return this._notebookSerializer.set(s,{viewType:e,serializer:n,options:o}),this._notebookProxy.$registerNotebookSerializer(s,{id:t.identifier,location:t.extensionLocation},e,fk.from(o),r._convertNotebookRegistrationData(t,i)),ae(()=>{this._notebookProxy.$unregisterNotebookSerializer(s)})}async $dataToNotebook(t,e,n){let o=this._notebookSerializer.get(t);if(!o)throw new Error("NO serializer found");let i=await o.serializer.deserializeNotebook(e.buffer,n);return new Wt(xl.from(i))}async $notebookToData(t,e,n){let o=this._notebookSerializer.get(t);if(!o)throw new Error("NO serializer found");let i=await o.serializer.serializeNotebook(xl.to(e.value),n);return ce.wrap(i)}async $saveNotebook(t,e,n,o,i){let s=E.revive(e),a=this._notebookSerializer.get(t);this.trace(`enter saveNotebook(versionId: ${n}, ${s.toString()})`);try{if(!a)throw new cv("NO serializer found");let l=this._documents.get(s);if(!l)throw new cv("Document NOT found");if(l.versionId!==n)throw new cv("Document version mismatch, expected: "+n+", actual: "+l.versionId);if(!this._extHostFileSystem.value.isWritableFileSystem(s.scheme))throw new Oa(p(3205,null,this._resourceForError(s)),6);let d={metadata:gP(l.apiNotebook.metadata,I=>!(a.options?.transientDocumentMetadata??{})[I]),cells:[]};for(let I of l.apiNotebook.getCells()){let h=new Fi(I.kind,I.document.getText(),I.document.languageId,I.mime,a.options?.transientOutputs?[]:[...I.outputs],I.metadata,I.executionSummary);h.metadata=gP(I.metadata,C=>!(a.options?.transientCellMetadata??{})[C]),d.cells.push(h)}if(await this._validateWriteFile(s,o),i.isCancellationRequested)throw new Bt;let c=await a.serializer.serializeNotebook(d,i);if(i.isCancellationRequested)throw new Bt;this.trace(`serialized versionId: ${n} ${s.toString()}`),await this._extHostFileSystem.value.writeFile(s,c),this.trace(`Finished write versionId: ${n} ${s.toString()}`);let u=this._extHostFileSystem.getFileSystemProviderExtUri(s.scheme),f=await this._extHostFileSystem.value.stat(s),g={name:u.basename(s),isFile:(f.type&1)!==0,isDirectory:(f.type&2)!==0,isSymbolicLink:(f.type&64)!==0,mtime:f.mtime,ctime:f.ctime,size:f.size,readonly:!!((f.permissions??0)&1)||!this._extHostFileSystem.value.isWritableFileSystem(s.scheme),locked:!!((f.permissions??0)&2),executable:!!((f.permissions??0)&4),etag:bP({mtime:f.mtime,size:f.size})};return this.trace(`exit saveNotebook(versionId: ${n}, ${s.toString()})`),g}catch(l){if(l instanceof Oa)return{...l,message:l.message};throw l}}async $searchInNotebooks(t,e,n,o,i){let s=this._notebookSerializer.get(t)?.serializer;if(!s)return{limitHit:!1,results:[]};let a=new ur;await(async(f,g,I)=>{await Promise.all(f.map(async h=>await Promise.all(h.filenamePatterns.map(C=>{let _={_reason:I._reason,folderQueries:I.folderQueries,includePattern:I.includePattern,excludePattern:I.excludePattern,maxResults:I.maxResults,type:1,filePattern:C};return this._extHostSearch.doInternalFileSearchWithCustomCallback(_,g,R=>{R.forEach(O=>{a.has(O)||o.some(ie=>h.isFromSettings&&!ie.isFromSettings?!1:ie.filenamePatterns.some(Y=>J5(Y,O)))||a.add(O)})}).catch(R=>{if(R.code==="ENOENT")return console.warn("Could not find notebook search results, ignoring notebook results."),{limitHit:!1,messages:[]};throw R})}))))})(n,i,e);let d=new et,c=!1,u=Array.from(a).map(async f=>{let g=[];try{if(i.isCancellationRequested)return;if(e.maxResults&&[...d.values()].reduce((_,R)=>_+R.cellResults.length,0)>e.maxResults){c=!0;return}let I=[],h=this._documents.get(f);if(h)h.apiNotebook.getCells().forEach(R=>I.push({input:R.document.getText(),outputs:R.outputs.flatMap(O=>O.items.map(U=>U.data.toString()))}));else{let _=await this._extHostFileSystem.value.readFile(f),R=ce.fromString(_.toString()),O=await s.deserializeNotebook(R.buffer,i);if(i.isCancellationRequested)return;xl.from(O).cells.forEach(ie=>I.push({input:ie.source,outputs:ie.outputs.flatMap(Y=>Y.items.map(Z=>Z.valueBytes.toString()))}))}if(i.isCancellationRequested)return;I.forEach((_,R)=>{let O=e.contentPattern.pattern,U=new mT(_.input,void 0,_.outputs),ie=U.findInInputs(O),Y=U.findInOutputs(O),Z=Y.flatMap(ee=>DN(ee.matches,ee.textBuffer)).map((ee,oe)=>(ee.webviewIndex=oe,ee));if(ie.length>0||Y.length>0){let ee={index:R,contentResults:DN(ie,U.inputTextBuffer),webviewResults:Z};g.push(ee)}});let C={resource:f,cellResults:g};d.set(f,C);return}catch{return}});return await Promise.all(u),{limitHit:c,results:[...d.values()]}}async _validateWriteFile(t,e){let n=await this._extHostFileSystem.value.stat(t);if(typeof e?.mtime=="number"&&typeof e.etag=="string"&&e.etag!==aF&&typeof n.mtime=="number"&&typeof n.size=="number"&&e.mtime<n.mtime&&e.etag!==bP({mtime:e.mtime,size:n.size}))throw new Oa(p(3206,null),3,e)}_resourceForError(t){return t.scheme===X.file?t.fsPath:t.toString()}_createExtHostEditor(t,e,n){if(this._editors.has(e))throw new Error(`editor with id ALREADY EXSIST: ${e}`);let o=new Oc(e,this._notebookEditorsProxy,t,n.visibleRanges.map(ir.to),n.selections.map(ir.to),typeof n.viewColumn=="number"?Vt.to(n.viewColumn):void 0,n.viewType);this._editors.set(e,o)}$acceptDocumentAndEditorsDelta(t){if(t.value.removedDocuments)for(let n of t.value.removedDocuments){let o=E.revive(n),i=this._documents.get(o);i&&(i.dispose(),this._documents.delete(o),this._textDocumentsAndEditors.$acceptDocumentsAndEditorsDelta({removedDocuments:i.apiNotebook.getCells().map(s=>s.document.uri)}),this._onDidCloseNotebookDocument.fire(i.apiNotebook));for(let s of this._editors.values())s.notebookData.uri.toString()===o.toString()&&this._editors.delete(s.id)}if(t.value.addedDocuments){let n=[];for(let o of t.value.addedDocuments){let i=E.revive(o.uri);if(this._documents.has(i))throw new Error(`adding EXISTING notebook ${i} `);let s=new sT(this._notebookDocumentsProxy,this._textDocumentsAndEditors,this._textDocuments,i,o);n.push(...o.cells.map(a=>Qm.asModelAddData(a))),this._documents.get(i)?.dispose(),this._documents.set(i,s),this._textDocumentsAndEditors.$acceptDocumentsAndEditorsDelta({addedDocuments:n}),this._onDidOpenNotebookDocument.fire(s.apiNotebook)}}if(t.value.addedEditors)for(let n of t.value.addedEditors){if(this._editors.has(n.id))return;let o=E.revive(n.documentUri),i=this._documents.get(o);i&&this._createExtHostEditor(i,n.id,n)}let e=[];if(t.value.removedEditors)for(let n of t.value.removedEditors){let o=this._editors.get(n);o&&(this._editors.delete(n),this._activeNotebookEditor?.id===o.id&&(this._activeNotebookEditor=void 0),e.push(o))}if(t.value.visibleEditors){this._visibleNotebookEditors=t.value.visibleEditors.map(o=>this._editors.get(o)).filter(o=>!!o);let n=new Set;this._visibleNotebookEditors.forEach(o=>n.add(o.id));for(let o of this._editors.values()){let i=n.has(o.id);o._acceptVisibility(i)}this._visibleNotebookEditors=[...this._editors.values()].map(o=>o).filter(o=>o.visible),this._onDidChangeVisibleNotebookEditors.fire(this.visibleNotebookEditors)}t.value.newActiveEditor===null?this._activeNotebookEditor=void 0:t.value.newActiveEditor&&(this._editors.get(t.value.newActiveEditor)||console.error(`FAILED to find active notebook editor ${t.value.newActiveEditor}`),this._activeNotebookEditor=this._editors.get(t.value.newActiveEditor)),t.value.newActiveEditor!==void 0&&this._onDidChangeActiveNotebookEditor.fire(this._activeNotebookEditor?.apiEditor)}static _registerApiCommands(t){let e=re.String.with("notebookType","A notebook type"),n=new Oe("vscode.executeDataToNotebook","_executeDataToNotebook","Invoke notebook serializer",[e,new re("data","Bytes to convert to data",i=>i instanceof Uint8Array,i=>ce.wrap(i))],new Re("Notebook Data",i=>xl.to(i.value))),o=new Oe("vscode.executeNotebookToData","_executeNotebookToData","Invoke notebook serializer",[e,new re("NotebookData","Notebook data to convert to bytes",i=>!0,i=>new Wt(xl.from(i)))],new Re("Bytes",i=>i.buffer));t.registerApiCommand(n),t.registerApiCommand(o)}trace(t){this._logService.trace(`[Extension Host Notebook] ${t}`)}},cv=class extends Error{constructor(t){super(t),this.name="NotebookSaveError"}};var IT=class{constructor(t,e,n,o={timeout:1500,errors:3}){this._logService=t;this._notebooksAndEditors=e;this._mainThreadBulkEdits=n;this._thresholds=o;this._onWillSaveNotebookDocumentEvent=new yi}dispose(){}getOnWillSaveNotebookDocumentEvent(t){return(e,n,o)=>{let i=function(a){e.call(n,a)};return i.extension=t,this._onWillSaveNotebookDocumentEvent.event(i,void 0,o)}}async $participateInSave(t,e,n){let o=E.revive(t),i=this._notebooksAndEditors.getNotebookDocument(o);if(!i)throw new Error("Unable to resolve notebook document");let s=[];if(await this._onWillSaveNotebookDocumentEvent.fireAsync({notebook:i.apiNotebook,reason:Yg.to(e)},n,async(l,d)=>{let c=Date.now(),u=await await Promise.resolve(l);Date.now()-c>this._thresholds.timeout&&this._logService.warn("onWillSaveNotebookDocument-listener from extension",d.extension.identifier),!n.isCancellationRequested&&u&&(u instanceof Go?s.push(u):this._logService.warn("onWillSaveNotebookDocument-listener from extension",d.extension.identifier,"ignored due to invalid data"))}),n.isCancellationRequested)return!1;if(s.length===0)return!0;let a={edits:[]};for(let l of s){let{edits:d}=ro.from(l);a.edits=a.edits.concat(d)}return this._mainThreadBulkEdits.$tryApplyWorkspaceEdit(new Wt(a))}};var yT=class{constructor(t){this._notebooksAndEditors=t;this._onDidSaveNotebookDocument=new D;this.onDidSaveNotebookDocument=this._onDidSaveNotebookDocument.event;this._onDidChangeNotebookDocument=new D;this.onDidChangeNotebookDocument=this._onDidChangeNotebookDocument.event}$acceptModelChanged(t,e,n,o){let s=this._notebooksAndEditors.getNotebookDocument(E.revive(t)).acceptModelChanged(e.value,n,o);this._onDidChangeNotebookDocument.fire(s)}$acceptDirtyStateChanged(t,e){this._notebooksAndEditors.getNotebookDocument(E.revive(t)).acceptDirty(e)}$acceptModelSaved(t){let e=this._notebooksAndEditors.getNotebookDocument(E.revive(t));this._onDidSaveNotebookDocument.fire(e.apiNotebook)}};var Ym=class{constructor(t,e){this._logService=t;this._notebooksAndEditors=e;this._onDidChangeNotebookEditorSelection=new D;this._onDidChangeNotebookEditorVisibleRanges=new D;this.onDidChangeNotebookEditorSelection=this._onDidChangeNotebookEditorSelection.event;this.onDidChangeNotebookEditorVisibleRanges=this._onDidChangeNotebookEditorVisibleRanges.event}$acceptEditorPropertiesChanged(t,e){this._logService.debug("ExtHostNotebook#$acceptEditorPropertiesChanged",t,e);let n=this._notebooksAndEditors.getEditorById(t);e.visibleRanges&&n._acceptVisibleRanges(e.visibleRanges.ranges.map(ir.to)),e.selections&&n._acceptSelections(e.selections.selections.map(ir.to)),e.visibleRanges&&this._onDidChangeNotebookEditorVisibleRanges.fire({notebookEditor:n.apiEditor,visibleRanges:n.apiEditor.visibleRanges}),e.selections&&this._onDidChangeNotebookEditorSelection.fire(Object.freeze({notebookEditor:n.apiEditor,selections:n.apiEditor.selections}))}$acceptEditorViewColumns(t){for(let e in t)this._notebooksAndEditors.getEditorById(e)._acceptViewColumn(Vt.to(t[e]))}};Ym=L([P(0,be)],Ym);var lnt=N("INotebookExecutionService");var j5=100;var unt=N("INotebookKernelService"),pnt=N("INotebookKernelHistoryService");var Zm=class{constructor(t,e,n,o,i){this._initData=e;this._extHostNotebook=n;this._commands=o;this._logService=i;this._activeExecutions=new et;this._activeNotebookExecutions=new et;this._kernelDetectionTask=new Map;this._kernelDetectionTaskHandlePool=0;this._kernelSourceActionProviders=new Map;this._kernelSourceActionProviderHandlePool=0;this._kernelData=new Map;this._handlePool=0;this.id=0;this.variableStore={};this._proxy=t.getProxy(V.MainThreadNotebookKernels);let s=new Oe("notebook.selectKernel","_notebook.selectKernel","Trigger kernel picker for specified notebook editor widget",[new re("options","Select kernel options",l=>!0,l=>{if(l&&"notebookEditor"in l&&"id"in l){let d=this._extHostNotebook.getIdByEditor(l.notebookEditor);return{id:l.id,extension:l.extension,notebookEditorId:d}}else if(l&&"notebookEditor"in l){let d=this._extHostNotebook.getIdByEditor(l.notebookEditor);if(d===void 0)throw new Error(`Cannot invoke 'notebook.selectKernel' for unrecognized notebook editor ${l.notebookEditor.notebook.uri.toString()}`);return"skipIfAlreadySelected"in l?{notebookEditorId:d,skipIfAlreadySelected:l.skipIfAlreadySelected}:{notebookEditorId:d}}return l})],Re.Void),a=new Oe("vscode.executeNotebookVariableProvider","_executeNotebookVariableProvider","Execute notebook variable provider",[re.Uri],new Re("A promise that resolves to an array of variables",(l,d)=>l.map(c=>({variable:{name:c.name,value:c.value,expression:c.expression,type:c.type,language:c.language},hasNamedChildren:c.hasNamedChildren,indexedChildrenCount:c.indexedChildrenCount}))));this._commands.registerApiCommand(s),this._commands.registerApiCommand(a)}createNotebookController(t,e,n,o,i,s){for(let Y of this._kernelData.values())if(Y.controller.id===e&&Ue.equals(t.identifier,Y.extensionId))throw new Error(`notebook controller with id '${e}' ALREADY exist`);let a=this._handlePool++,l=this;this._logService.trace(`NotebookController[${a}], CREATED by ${t.identifier.value}, ${e}`);let d=()=>console.warn(`NO execute handler from notebook controller '${g.id}' of extension: '${t.identifier}'`),c=!1,u=new D,f=new D,g={id:ET(t.identifier,e),notebookType:n,extensionId:t.identifier,extensionLocation:t.extensionLocation,label:o||t.identifier.value,preloads:s?s.map(wE.from):[]},I=i??d,h,C,_;this._proxy.$addKernel(a,g).catch(Y=>{console.log(Y),c=!0});let R=0,O=()=>{if(c)return;let Y=++R;Promise.resolve().then(()=>{Y===R&&this._proxy.$updateKernel(a,g)})},U=new et,ie={get id(){return e},get notebookType(){return g.notebookType},onDidChangeSelectedNotebooks:u.event,get label(){return g.label},set label(Y){g.label=Y??t.displayName??t.name,O()},get detail(){return g.detail??""},set detail(Y){g.detail=Y,O()},get description(){return g.description??""},set description(Y){g.description=Y,O()},get supportedLanguages(){return g.supportedLanguages},set supportedLanguages(Y){g.supportedLanguages=Y,O()},get supportsExecutionOrder(){return g.supportsExecutionOrder??!1},set supportsExecutionOrder(Y){g.supportsExecutionOrder=Y,O()},get rendererScripts(){return g.preloads?g.preloads.map(wE.to):[]},get executeHandler(){return I},set executeHandler(Y){I=Y??d},get interruptHandler(){return h},set interruptHandler(Y){h=Y,g.supportsInterrupt=!!Y,O()},set variableProvider(Y){H(t,"notebookVariableProvider"),_?.dispose(),C=Y,g.hasVariableProvider=!!Y,_=Y?.onDidChangeVariables(Z=>l._proxy.$variablesUpdated(Z.uri)),O()},get variableProvider(){return C},createNotebookCellExecution(Y){if(c)throw new Error("notebook controller is DISPOSED");if(!U.has(Y.notebook.uri))throw l._logService.trace(`NotebookController[${a}] NOT associated to notebook, associated to THESE notebooks:`,Array.from(U.keys()).map(Z=>Z.toString())),new Error(`notebook controller is NOT associated to notebook: ${Y.notebook.uri.toString()}`);return l._createNotebookCellExecution(Y,ET(t.identifier,this.id))},createNotebookExecution(Y){if(H(t,"notebookExecution"),c)throw new Error("notebook controller is DISPOSED");if(!U.has(Y.uri))throw l._logService.trace(`NotebookController[${a}] NOT associated to notebook, associated to THESE notebooks:`,Array.from(U.keys()).map(Z=>Z.toString())),new Error(`notebook controller is NOT associated to notebook: ${Y.uri.toString()}`);return l._createNotebookExecution(Y,ET(t.identifier,this.id))},dispose:()=>{c||(this._logService.trace(`NotebookController[${a}], DISPOSED`),c=!0,this._kernelData.delete(a),u.dispose(),f.dispose(),_?.dispose(),this._proxy.$removeKernel(a))},updateNotebookAffinity(Y,Z){Z===-1&&H(t,"notebookControllerAffinityHidden"),l._proxy.$updateNotebookPriority(a,Y.uri,Z)},onDidReceiveMessage:f.event,postMessage(Y,Z){return H(t,"notebookMessaging"),l._proxy.$postMessage(a,Z&&l._extHostNotebook.getIdByEditor(Z),Y)},asWebviewUri(Y){return H(t,"notebookMessaging"),Wl(Y,l._initData.remote)}};return this._kernelData.set(a,{extensionId:t.identifier,controller:ie,onDidReceiveMessage:f,onDidChangeSelection:u,associatedNotebooks:U}),ie}getIdByController(t){for(let[e,n]of this._kernelData)if(n.controller===t)return ET(n.extensionId,t.id);return null}createNotebookControllerDetectionTask(t,e){let n=this._kernelDetectionTaskHandlePool++,o=this;this._logService.trace(`NotebookControllerDetectionTask[${n}], CREATED by ${t.identifier.value}`),this._proxy.$addKernelDetectionTask(n,e);let i={dispose:()=>{this._kernelDetectionTask.delete(n),o._proxy.$removeKernelDetectionTask(n)}};return this._kernelDetectionTask.set(n,i),i}registerKernelSourceActionProvider(t,e,n){let o=this._kernelSourceActionProviderHandlePool++,i=typeof n.onDidChangeNotebookKernelSourceActions=="function"?o:void 0,s=this;this._kernelSourceActionProviders.set(o,n),this._logService.trace(`NotebookKernelSourceActionProvider[${o}], CREATED by ${t.identifier.value}`),this._proxy.$addKernelSourceActionProvider(o,o,e);let a;return i!==void 0&&(a=n.onDidChangeNotebookKernelSourceActions(l=>this._proxy.$emitNotebookKernelSourceActionsChangeEvent(i))),{dispose:()=>{this._kernelSourceActionProviders.delete(o),s._proxy.$removeKernelSourceActionProvider(o,o),a?.dispose()}}}async $provideKernelSourceActions(t,e){let n=this._kernelSourceActionProviders.get(t);if(n){let o=new te;return(await n.provideNotebookKernelSourceActions(e)??[]).map(s=>mk.from(s,this._commands.converter,o))}return[]}$acceptNotebookAssociation(t,e,n){let o=this._kernelData.get(t);if(o){let i=this._extHostNotebook.getNotebookDocument(E.revive(e));n?o.associatedNotebooks.set(i.uri,!0):o.associatedNotebooks.delete(i.uri),this._logService.trace(`NotebookController[${t}] ASSOCIATE notebook`,i.uri.toString(),n),o.onDidChangeSelection.fire({selected:n,notebook:i.apiNotebook})}}async $executeCells(t,e,n){let o=this._kernelData.get(t);if(!o)return;let i=this._extHostNotebook.getNotebookDocument(E.revive(e)),s=[];for(let a of n){let l=i.getCell(a);l&&s.push(l.apiCell)}try{this._logService.trace(`NotebookController[${t}] EXECUTE cells`,i.uri.toString(),s.length),await o.controller.executeHandler.call(o.controller,s,i.apiNotebook,o.controller)}catch(a){this._logService.error(`NotebookController[${t}] execute cells FAILED`,a),console.error(a)}}async $cancelCells(t,e,n){let o=this._kernelData.get(t);if(!o)return;let i=this._extHostNotebook.getNotebookDocument(E.revive(e));if(o.controller.interruptHandler)await o.controller.interruptHandler.call(o.controller,i.apiNotebook);else for(let s of n){let a=i.getCell(s);a&&this._activeExecutions.get(a.uri)?.cancel()}if(o.controller.interruptHandler){let s=this._activeNotebookExecutions.get(i.uri);this._activeNotebookExecutions.delete(i.uri),n.length&&Array.isArray(s)&&s.length&&s.forEach(a=>a.dispose())}}async $provideVariables(t,e,n,o,i,s,a){let l=this._kernelData.get(t);if(!l)return;let d=this._extHostNotebook.getNotebookDocument(E.revive(n)),c=l.controller.variableProvider;if(!c)return;let u;if(o!==void 0){if(u=this.variableStore[o],!u)return}else this.variableStore={};let f=i==="named"?1:2,g=c.provideVariables(d.apiNotebook,u,f,s,a),I=0;for await(let h of g){if(a.isCancellationRequested)return;let C={id:this.id++,name:h.variable.name,value:h.variable.value,type:h.variable.type,interfaces:h.variable.interfaces,language:h.variable.language,expression:h.variable.expression,hasNamedChildren:h.hasNamedChildren,indexedChildrenCount:h.indexedChildrenCount,extensionId:l.extensionId.value};if(this.variableStore[C.id]=h.variable,this._proxy.$receiveVariable(e,C),I++>=j5)return}}$acceptKernelMessageFromRenderer(t,e,n){let o=this._kernelData.get(t);if(!o)return;let i=this._extHostNotebook.getEditorById(e);o.onDidReceiveMessage.fire(Object.freeze({editor:i.apiEditor,message:n}))}_createNotebookCellExecution(t,e){if(t.index<0)throw new Error("CANNOT execute cell that has been REMOVED from notebook");let o=this._extHostNotebook.getNotebookDocument(t.notebook.uri).getCellFromApiCell(t);if(!o)throw new Error("invalid cell");if(this._activeExecutions.has(o.uri))throw new Error(`duplicate execution for ${o.uri}`);let i=new RN(e,o,this._proxy);this._activeExecutions.set(o.uri,i);let s=i.onDidChangeState(()=>{i.state===2&&(i.dispose(),s.dispose(),this._activeExecutions.delete(o.uri))});return i.asApiObject()}_createNotebookExecution(t,e){let n=this._extHostNotebook.getNotebookDocument(t.uri),o=t.getCells().find(a=>{let l=n.getCellFromApiCell(a);return l&&this._activeExecutions.has(l.uri)});if(o)throw new Error(`duplicate cell execution for ${o.document.uri}`);if(this._activeNotebookExecutions.has(n.uri))throw new Error(`duplicate notebook execution for ${n.uri}`);let i=new kN(e,n,this._proxy),s=i.onDidChangeState(()=>{i.state===2&&(i.dispose(),s.dispose(),this._activeNotebookExecutions.delete(n.uri))});return this._activeNotebookExecutions.set(n.uri,[i,s]),i.asApiObject()}};Zm=L([P(4,be)],Zm);var RN=class r extends K{constructor(e,n,o){super();this._cell=n;this._proxy=o;this._handle=r.HANDLE++;this._onDidChangeState=this._register(new D);this.onDidChangeState=this._onDidChangeState.event;this._state=0;this._tokenSource=this._register(new We);this._collector=new AN(10,i=>this.update(i)),this._executionOrder=n.internalMetadata.executionOrder,this._proxy.$createExecution(this._handle,e,this._cell.notebook.uri,this._cell.handle)}static{this.HANDLE=0}get state(){return this._state}cancel(){this._tokenSource.cancel()}async updateSoon(e){await this._collector.addItem(e)}async update(e){let n=Array.isArray(e)?e:[e];return this._proxy.$updateExecution(this._handle,new Wt(n))}verifyStateForOutput(){if(this._state===0)throw new Error("Must call start before modifying cell output");if(this._state===2)throw new Error("Cannot modify cell output after calling resolve")}cellIndexToHandle(e){let n=this._cell;if(e&&(n=this._cell.notebook.getCellFromApiCell(e)),!n)throw new Error("INVALID cell");return n.handle}validateAndConvertOutputs(e){return e.map(n=>{let o=Hi.ensureUniqueMimeTypes(n.items,!0);return o===n.items?Xs.from(n):Xs.from({items:o,id:n.id,metadata:n.metadata})})}async updateOutputs(e,n,o){let i=this.cellIndexToHandle(n),s=this.validateAndConvertOutputs(Rn(e));return this.updateSoon({editType:1,cellHandle:i,append:o,outputs:s})}async updateOutputItems(e,n,o){return e=Hi.ensureUniqueMimeTypes(Rn(e),!0),this.updateSoon({editType:2,items:e.map(rc.from),outputId:n.id,append:o})}asApiObject(){let e=this;return Object.freeze({get token(){return e._tokenSource.token},get cell(){return e._cell.apiCell},get executionOrder(){return e._executionOrder},set executionOrder(o){e._executionOrder=o,e.update([{editType:3,executionOrder:e._executionOrder}])},start(o){if(e._state===2||e._state===1)throw new Error("Cannot call start again");e._state=1,e._onDidChangeState.fire(),e.update({editType:3,runStartTime:o})},end(o,i,s){if(e._state===2)throw new Error("Cannot call resolve twice");e._state=2,e._onDidChangeState.fire(),e._collector.flush();let a=QK(s);e._proxy.$completeExecution(e._handle,new Wt({runEndTime:i,lastRunSuccess:o,error:a}))},clearOutput(o){return e.verifyStateForOutput(),e.updateOutputs([],o,!1)},appendOutput(o,i){return e.verifyStateForOutput(),e.updateOutputs(o,i,!0)},replaceOutput(o,i){return e.verifyStateForOutput(),e.updateOutputs(o,i,!1)},appendOutputItems(o,i){return e.verifyStateForOutput(),e.updateOutputItems(o,i,!0)},replaceOutputItems(o,i){return e.verifyStateForOutput(),e.updateOutputItems(o,i,!1)}})}};function QK(r){let t=o=>o?{startLineNumber:o.start.line,startColumn:o.start.character,endLineNumber:o.end.line,endColumn:o.end.character}:void 0,e=o=>({uri:o.uri,position:o.position,label:o.label});return r?{name:r.name,message:r.message,stack:r.stack instanceof Array?r.stack.map(o=>e(o)):r.stack,location:t(r.location),uri:r.uri}:void 0}var kN=class r extends K{constructor(e,n,o){super();this._notebook=n;this._proxy=o;this._handle=r.HANDLE++;this._onDidChangeState=this._register(new D);this.onDidChangeState=this._onDidChangeState.event;this._state=0;this._tokenSource=this._register(new We);this._proxy.$createNotebookExecution(this._handle,e,this._notebook.uri)}static{this.HANDLE=0}get state(){return this._state}cancel(){this._tokenSource.cancel()}asApiObject(){return Object.freeze({start:()=>{if(this._state===2||this._state===1)throw new Error("Cannot call start again");this._state=1,this._onDidChangeState.fire(),this._proxy.$beginNotebookExecution(this._handle)},end:()=>{if(this._state===2)throw new Error("Cannot call resolve twice");this._state=2,this._onDidChangeState.fire(),this._proxy.$completeNotebookExecution(this._handle)}})}},AN=class{constructor(t,e){this.delay=t;this.callback=e;this.batch=[];this.startedTimer=Date.now()}addItem(t){return this.batch.push(t),this.currentDeferred||(this.currentDeferred=new jn,this.startedTimer=Date.now(),Qn(this.delay).then(()=>this.flush())),Date.now()-this.startedTimer>this.delay?this.flush():this.currentDeferred.p}flush(){if(this.batch.length===0||!this.currentDeferred)return Promise.resolve();let t=this.currentDeferred;this.currentDeferred=void 0;let e=this.batch;return this.batch=[],this.callback(e).finally(()=>t.complete())}};function ET(r,t){return`${r.value}/${t}`}var ST=class{constructor(t,e){this._extHostNotebook=e;this._rendererMessageEmitters=new Map;this.proxy=t.getProxy(V.MainThreadNotebookRenderers)}$postRendererMessage(t,e,n){let o=this._extHostNotebook.getEditorById(t);this._rendererMessageEmitters.get(e)?.fire({editor:o.apiEditor,message:n})}createRendererMessaging(t,e){if(!t.contributes?.notebookRenderer?.some(o=>o.id===e))throw new Error(`Extensions may only call createRendererMessaging() for renderers they contribute (got ${e})`);return{onDidReceiveMessage:(o,i,s)=>this.getOrCreateEmitterFor(e).event(o,i,s),postMessage:(o,i)=>{Oc.apiEditorsToExtHost.has(o)&&([o,i]=[i,o]);let s=i&&Oc.apiEditorsToExtHost.get(i);return this.proxy.$postMessage(s?.id,e,o)}}}getOrCreateEmitterFor(t){let e=this._rendererMessageEmitters.get(t);return e||(e=new D({onDidRemoveLastListener:()=>{e?.dispose(),this._rendererMessageEmitters.delete(t)}}),this._rendererMessageEmitters.set(t,e),e)}};var xT=class{constructor(t){this.handlers=new Map;this.proxy=t.getProxy(V.MainThreadProfileContentHandlers)}registerProfileContentHandler(t,e,n){if(H(t,"profileContentHandlers"),this.handlers.has(e))throw new Error(`Handler with id '${e}' already registered`);return this.handlers.set(e,n),this.proxy.$registerProfileContentHandler(e,n.name,n.description,t.identifier.value),ae(()=>{this.handlers.delete(e),this.proxy.$unregisterProfileContentHandler(e)})}async $saveProfile(t,e,n,o){let i=this.handlers.get(t);if(!i)throw new Error(`Unknown handler with id: ${t}`);return i.saveProfile(e,n,o)}async $readProfile(t,e,n){let o=this.handlers.get(t);if(!o)throw new Error(`Unknown handler with id: ${t}`);return o.readProfile(Me(e)?e:E.revive(e),n)}};var CT=class r{constructor(t,e){this.uriTransformer=e;this.providers=new Map;this.proxy=t.getProxy(V.MainThreadQuickDiff)}static{this.handlePool=0}$provideOriginalResource(t,e,n){let o=E.revive(e),i=this.providers.get(t);return i?dn(()=>i.provideOriginalResource(o,n)).then(s=>s||null):Promise.resolve(null)}registerQuickDiffProvider(t,e,n,o,i,s){let a=r.handlePool++;this.providers.set(a,n);let l=Ue.toKey(t.identifier);return this.proxy.$registerQuickDiffProvider(a,di.from(e,this.uriTransformer),`${l}.${o}`,i,s),{dispose:()=>{this.proxy.$unregisterQuickDiffProvider(a),this.providers.delete(a)}}}};function Q5(r,t,e){let n=r.getProxy(V.MainThreadQuickOpen);class o{constructor(d,c){this._sessions=new Map;this._instances=0;this._workspace=d,this._commands=c}showQuickPick(d,c,u,f=De.None){this._onDidSelectItem=void 0;let g=Promise.resolve(c),I=++this._instances,h=n.$show(I,{title:u?.title,placeHolder:u?.placeHolder,prompt:u?.prompt,matchOnDescription:u?.matchOnDescription,matchOnDetail:u?.matchOnDetail,ignoreFocusLost:u?.ignoreFocusOut,canPickMany:u?.canPickMany},f),C={},_=h.then(()=>C);return Promise.race([_,g]).then(R=>{if(R!==C)return g.then(O=>{let U=[];for(let ie=0;ie<O.length;ie++){let Y=O[ie];typeof Y=="string"?U.push({label:Y,handle:ie}):Y.kind===-1?U.push({type:"separator",label:Y.label}):(Y.tooltip&&H(d,"quickPickItemTooltip"),U.push({label:Y.label,iconPathDto:ci.from(Y.iconPath),description:Y.description,detail:Y.detail,picked:Y.picked,alwaysShow:Y.alwaysShow,tooltip:ye.fromStrict(Y.tooltip),resourceUri:Y.resourceUri,handle:ie}))}return u&&typeof u.onDidSelectItem=="function"&&(this._onDidSelectItem=ie=>{u.onDidSelectItem(O[ie])}),n.$setItems(I,U),h.then(ie=>{if(typeof ie=="number")return O[ie];if(Array.isArray(ie))return ie.map(Y=>O[Y])})})}).then(void 0,R=>{if(!Fn(R))return n.$setError(I,R),Promise.reject(R)})}$onItemSelected(d){this._onDidSelectItem?.(d)}showInput(d,c=De.None){return this._validateInput=d?.validateInput,n.$input(d,typeof this._validateInput=="function",c).then(void 0,u=>{if(!Fn(u))return Promise.reject(u)})}async $validateInput(d){if(!this._validateInput)return;let c=await this._validateInput(d);if(!c||typeof c=="string")return c;let u;switch(c.severity){case 1:u=tt.Info;break;case 2:u=tt.Warning;break;case 3:u=tt.Error;break;default:u=c.message?tt.Error:tt.Ignore;break}return{content:c.message,severity:u}}async showWorkspaceFolderPick(d,c=De.None){let u=await this._commands.executeCommand("_workbench.pickWorkspaceFolder",[d]);if(!u)return;let f=await this._workspace.getWorkspaceFolders2();if(f)return f.find(g=>g.uri.toString()===u.uri.toString())}createQuickPick(d){let c=new s(d,()=>this._sessions.delete(c._id));return this._sessions.set(c._id,c),c}createInputBox(d){let c=new a(d,()=>this._sessions.delete(c._id));return this._sessions.set(c._id,c),c}$onDidChangeValue(d,c){this._sessions.get(d)?._fireDidChangeValue(c)}$onDidAccept(d){this._sessions.get(d)?._fireDidAccept()}$onDidChangeActive(d,c){let u=this._sessions.get(d);u instanceof s&&u._fireDidChangeActive(c)}$onDidChangeSelection(d,c){let u=this._sessions.get(d);u instanceof s&&u._fireDidChangeSelection(c)}$onDidTriggerButton(d,c,u){this._sessions.get(d)?._fireDidTriggerButton(c,u)}$onDidTriggerItemButton(d,c,u,f){let g=this._sessions.get(d);g instanceof s&&g._fireDidTriggerItemButton(c,u,f)}$onDidHide(d){this._sessions.get(d)?._fireDidHide()}}class i{constructor(d,c){this._extension=d;this._onDidDispose=c;this._id=s._nextId++;this._visible=!1;this._expectingHide=!1;this._enabled=!0;this._busy=!1;this._ignoreFocusOut=!0;this._value="";this._valueSelection=void 0;this._buttons=[];this._handlesToButtons=new Map;this._onDidAcceptEmitter=new D;this._onDidChangeValueEmitter=new D;this._onDidTriggerButtonEmitter=new D;this._onDidHideEmitter=new D;this._pendingUpdate={id:this._id};this._disposed=!1;this._disposables=[this._onDidTriggerButtonEmitter,this._onDidHideEmitter,this._onDidAcceptEmitter,this._onDidChangeValueEmitter];this.onDidChangeValue=this._onDidChangeValueEmitter.event;this.onDidAccept=this._onDidAcceptEmitter.event;this.onDidTriggerButton=this._onDidTriggerButtonEmitter.event;this.onDidHide=this._onDidHideEmitter.event}static{this._nextId=1}get title(){return this._title}set title(d){this._title=d,this.update({title:d})}get step(){return this._steps}set step(d){this._steps=d,this.update({step:d})}get totalSteps(){return this._totalSteps}set totalSteps(d){this._totalSteps=d,this.update({totalSteps:d})}get enabled(){return this._enabled}set enabled(d){this._enabled=d,this.update({enabled:d})}get busy(){return this._busy}set busy(d){this._busy=d,this.update({busy:d})}get ignoreFocusOut(){return this._ignoreFocusOut}set ignoreFocusOut(d){this._ignoreFocusOut=d,this.update({ignoreFocusOut:d})}get value(){return this._value}set value(d){this._value=d,this.update({value:d})}get valueSelection(){return this._valueSelection}set valueSelection(d){this._valueSelection=d,this.update({valueSelection:d})}get placeholder(){return this._placeholder}set placeholder(d){this._placeholder=d,this.update({placeholder:d})}get buttons(){return this._buttons}set buttons(d){this._buttons=d.slice(),this._handlesToButtons.clear(),d.forEach((c,u)=>{let f=c===Bi.Back?-1:u;this._handlesToButtons.set(f,c)}),this.update({buttons:d.map((c,u)=>({iconPathDto:ci.from(c.iconPath),tooltip:c.tooltip,handle:c===Bi.Back?-1:u,location:typeof c.location=="number"?c.location:void 0,toggle:typeof c.toggle=="object"&&typeof c.toggle.checked=="boolean"?{checked:c.toggle.checked}:void 0}))})}show(){this._visible=!0,this._expectingHide=!0,this.update({visible:!0})}hide(){this._visible=!1,this.update({visible:!1})}_fireDidAccept(){this._onDidAcceptEmitter.fire()}_fireDidChangeValue(d){this._value=d,this._onDidChangeValueEmitter.fire(d)}_fireDidTriggerButton(d,c){let u=this._handlesToButtons.get(d);u&&(c!==void 0&&u.toggle&&(u.toggle.checked=c),this._onDidTriggerButtonEmitter.fire(u))}_fireDidHide(){this._expectingHide&&(this._expectingHide=this._visible,this._onDidHideEmitter.fire())}dispose(){this._disposed||(this._disposed=!0,this._fireDidHide(),this._disposables=Hn(this._disposables),this._updateTimeout&&(clearTimeout(this._updateTimeout),this._updateTimeout=void 0),this._onDidDispose(),n.$dispose(this._id))}update(d){if(!this._disposed){for(let c of Object.keys(d)){let u=d[c];this._pendingUpdate[c]=u===void 0?null:u}"visible"in this._pendingUpdate?(this._updateTimeout&&(clearTimeout(this._updateTimeout),this._updateTimeout=void 0),this.dispatchUpdate()):this._visible&&!this._updateTimeout&&(this._updateTimeout=setTimeout(()=>{this._updateTimeout=void 0,this.dispatchUpdate()},0))}}dispatchUpdate(){n.$createOrUpdate(this._pendingUpdate),this._pendingUpdate={id:this._id}}}class s extends i{constructor(c,u){super(c,u);this._items=[];this._handlesToItems=new Map;this._itemsToHandles=new Map;this._canSelectMany=!1;this._matchOnDescription=!0;this._matchOnDetail=!0;this._sortByLabel=!0;this._keepScrollPosition=!1;this._activeItems=[];this._onDidChangeActiveEmitter=new D;this._selectedItems=[];this._onDidChangeSelectionEmitter=new D;this._onDidTriggerItemButtonEmitter=new D;this.onDidChangeActive=this._onDidChangeActiveEmitter.event;this.onDidChangeSelection=this._onDidChangeSelectionEmitter.event;this.onDidTriggerItemButton=this._onDidTriggerItemButtonEmitter.event;this._disposables.push(this._onDidChangeActiveEmitter,this._onDidChangeSelectionEmitter,this._onDidTriggerItemButtonEmitter),this.update({type:"quickPick"})}get items(){return this._items}set items(c){this._items=c.slice(),this._handlesToItems.clear(),this._itemsToHandles.clear(),c.forEach((f,g)=>{this._handlesToItems.set(g,f),this._itemsToHandles.set(f,g)});let u=[];for(let f=0;f<c.length;f++){let g=c[f];g.kind===-1?u.push({type:"separator",label:g.label}):(g.tooltip&&H(this._extension,"quickPickItemTooltip"),u.push({handle:f,label:g.label,iconPathDto:ci.from(g.iconPath),description:g.description,detail:g.detail,picked:g.picked,alwaysShow:g.alwaysShow,tooltip:ye.fromStrict(g.tooltip),resourceUri:g.resourceUri,buttons:g.buttons?.map((I,h)=>({iconPathDto:ci.from(I.iconPath),tooltip:I.tooltip,handle:h,toggle:typeof I.toggle=="object"&&typeof I.toggle.checked=="boolean"?{checked:I.toggle.checked}:void 0}))}))}this.update({items:u})}get canSelectMany(){return this._canSelectMany}set canSelectMany(c){this._canSelectMany=c,this.update({canSelectMany:c})}get matchOnDescription(){return this._matchOnDescription}set matchOnDescription(c){this._matchOnDescription=c,this.update({matchOnDescription:c})}get matchOnDetail(){return this._matchOnDetail}set matchOnDetail(c){this._matchOnDetail=c,this.update({matchOnDetail:c})}get sortByLabel(){return this._sortByLabel}set sortByLabel(c){this._sortByLabel=c,this.update({sortByLabel:c})}get keepScrollPosition(){return this._keepScrollPosition}set keepScrollPosition(c){this._keepScrollPosition=c,this.update({keepScrollPosition:c})}get prompt(){return this._prompt}set prompt(c){this._prompt=c,this.update({prompt:c})}get activeItems(){return this._activeItems}set activeItems(c){this._activeItems=c.filter(u=>this._itemsToHandles.has(u)),this.update({activeItems:this._activeItems.map(u=>this._itemsToHandles.get(u))})}get selectedItems(){return this._selectedItems}set selectedItems(c){this._selectedItems=c.filter(u=>this._itemsToHandles.has(u)),this.update({selectedItems:this._selectedItems.map(u=>this._itemsToHandles.get(u))})}_fireDidChangeActive(c){let u=pt(c.map(f=>this._handlesToItems.get(f)));this._activeItems=u,this._onDidChangeActiveEmitter.fire(u)}_fireDidChangeSelection(c){let u=pt(c.map(f=>this._handlesToItems.get(f)));this._selectedItems=u,this._onDidChangeSelectionEmitter.fire(u)}_fireDidTriggerItemButton(c,u,f){let g=this._handlesToItems.get(c);if(!g||!g.buttons||!g.buttons.length)return;let I=g.buttons[u];I&&(f!==void 0&&I.toggle&&(I.toggle.checked=f),this._onDidTriggerItemButtonEmitter.fire({button:I,item:g}))}}class a extends i{constructor(c,u){super(c,u);this._password=!1;this.update({type:"inputBox"})}get password(){return this._password}set password(c){this._password=c,this.update({password:c})}get prompt(){return this._prompt}set prompt(c){this._prompt=c,this.update({prompt:c})}get validationMessage(){return this._validationMessage}set validationMessage(c){this._validationMessage=c,c?typeof c=="string"?this.update({validationMessage:c,severity:tt.Error}):this.update({validationMessage:c.message,severity:c.severity??tt.Error}):this.update({validationMessage:void 0,severity:tt.Ignore})}}return new o(t,e)}var X5=new xt(()=>{let r=Xp.Collator(void 0,{numeric:!0,sensitivity:"base"}).value;return{collator:r,collatorIsNumeric:r.resolvedOptions().numeric}}),Bot=new xt(()=>({collator:Xp.Collator(void 0,{numeric:!0}).value})),Vot=new xt(()=>({collator:Xp.Collator(void 0,{numeric:!0,sensitivity:"accent"}).value}));function XK(r,t,e=!1){let n=r||"",o=t||"",i=X5.value.collator.compare(n,o);return X5.value.collatorIsNumeric&&i===0&&n!==o?n<o?-1:1:i}function YK(r,t,e=!1){return e||(r=r&&r.toLowerCase(),t=t&&t.toLowerCase()),r===t?0:r<t?-1:1}function uv(r,t,e=!1){let n=r.split(Bn),o=t.split(Bn),i=n.length-1,s=o.length-1,a,l;for(let d=0;;d++){if(a=i===d,l=s===d,a&&l)return XK(n[d],o[d],e);if(a)return-1;if(l)return 1;let c=YK(n[d],o[d],e);if(c!==0)return c}}function Y5(r){return r instanceof E}function ZK(r,t){return r.scheme===X.file&&t.scheme===X.file&&zn?r.toString()===t.toString():r.toString().toLowerCase()===t.toString().toLowerCase()}function ON(r){if(r)return typeof r.iconPath=="string"?E.file(r.iconPath):E.isUri(r.iconPath)||Tt.isThemeIcon(r.iconPath)?r.iconPath:void 0}function as(r){if(r){if(E.isUri(r))return r;if(Tt.isThemeIcon(r))return r;{let t=r;return{light:t.light,dark:t.dark}}}else return}function Z5(r){let t=as(r.authorIcon),e=Array.isArray(r.tooltip)?ye.fromMany(r.tooltip):r.tooltip?ye.from(r.tooltip):void 0,n=r.references?.map(o=>({...o,icon:as(o.icon)}));return{...r,authorIcon:t,references:n,tooltip:e}}function LN(r){return r?{...r,icon:as(r.icon)}:void 0}function MN(r,t){if(!r.iconPath&&!t.iconPath)return 0;if(r.iconPath){if(!t.iconPath)return 1}else return-1;let e=typeof r.iconPath=="string"?r.iconPath:E.isUri(r.iconPath)?r.iconPath.fsPath:r.iconPath.id,n=typeof t.iconPath=="string"?t.iconPath:E.isUri(t.iconPath)?t.iconPath.fsPath:t.iconPath.id;return uv(e,n)}function eJ(r,t){let e=0;if(r.strikeThrough!==t.strikeThrough)return r.strikeThrough?1:-1;if(r.faded!==t.faded)return r.faded?1:-1;if(r.tooltip!==t.tooltip)return(r.tooltip||"").localeCompare(t.tooltip||"");if(e=MN(r,t),e!==0)return e;if(r.light&&t.light)e=MN(r.light,t.light);else{if(r.light)return 1;if(t.light)return-1}if(e!==0)return e;if(r.dark&&t.dark)e=MN(r.dark,t.dark);else{if(r.dark)return 1;if(t.dark)return-1}return e}function tJ(r,t){if(r.command!==t.command)return r.command<t.command?-1:1;if(r.title!==t.title)return r.title<t.title?-1:1;if(r.tooltip!==t.tooltip){if(r.tooltip!==void 0&&t.tooltip!==void 0)return r.tooltip<t.tooltip?-1:1;if(r.tooltip!==void 0)return 1;if(t.tooltip!==void 0)return-1}if(r.arguments===t.arguments)return 0;if(r.arguments)if(t.arguments){if(r.arguments.length!==t.arguments.length)return r.arguments.length-t.arguments.length}else return 1;else return-1;for(let e=0;e<r.arguments.length;e++){let n=r.arguments[e],o=t.arguments[e];if(n!==o&&!(Y5(n)&&Y5(o)&&ZK(n,o)))return n<o?-1:1}return 0}function e3(r,t){let e=uv(r.resourceUri.fsPath,t.resourceUri.fsPath,!0);if(e!==0)return e;if(r.command&&t.command)e=tJ(r.command,t.command);else{if(r.command)return 1;if(t.command)return-1}if(e!==0)return e;if(r.decorations&&t.decorations)e=eJ(r.decorations,t.decorations);else{if(r.decorations)return 1;if(t.decorations)return-1}if(e!==0)return e;if(r.multiFileDiffEditorModifiedUri&&t.multiFileDiffEditorModifiedUri)e=uv(r.multiFileDiffEditorModifiedUri.fsPath,t.multiFileDiffEditorModifiedUri.fsPath,!0);else{if(r.multiFileDiffEditorModifiedUri)return 1;if(t.multiFileDiffEditorModifiedUri)return-1}if(e!==0)return e;if(r.multiDiffEditorOriginalUri&&t.multiDiffEditorOriginalUri)e=uv(r.multiDiffEditorOriginalUri.fsPath,t.multiDiffEditorOriginalUri.fsPath,!0);else{if(r.multiDiffEditorOriginalUri)return 1;if(t.multiDiffEditorOriginalUri)return-1}return e}function nJ(r,t){for(let e=0;e<r.length;e++)if(r[e]!==t[e])return!1;return!0}function oJ(r,t){return r.command===t.command&&r.title===t.title&&r.tooltip===t.tooltip&&(r.arguments&&t.arguments?nJ(r.arguments,t.arguments):r.arguments===t.arguments)}function rJ(r,t){return Zt(r,t,oJ)}var NN=class{constructor(t,e,n,o,i){this._extension=t;this._sourceControlHandle=o;this._documentUri=i;this._value="";this._onDidChange=new D;this._placeholder="";this._enabled=!0;this._visible=!0;this.#t=e,this.#e=n}#e;#t;get value(){return this._value}set value(t){t=t??"",this.#e.$setInputBoxValue(this._sourceControlHandle,t),this.updateValue(t)}get onDidChange(){return this._onDidChange.event}get placeholder(){return this._placeholder}set placeholder(t){this.#e.$setInputBoxPlaceholder(this._sourceControlHandle,t),this._placeholder=t}get validateInput(){return H(this._extension,"scmValidation"),this._validateInput}set validateInput(t){if(H(this._extension,"scmValidation"),t&&typeof t!="function")throw new Error(`[${this._extension.identifier.value}]: Invalid SCM input box validation function`);this._validateInput=t,this.#e.$setValidationProviderIsEnabled(this._sourceControlHandle,!!t)}get enabled(){return this._enabled}set enabled(t){t=!!t,this._enabled!==t&&(this._enabled=t,this.#e.$setInputBoxEnablement(this._sourceControlHandle,t))}get visible(){return this._visible}set visible(t){t=!!t,this._visible!==t&&(this._visible=t,this.#e.$setInputBoxVisibility(this._sourceControlHandle,t))}get document(){return H(this._extension,"scmTextDocument"),this.#t.getDocument(this._documentUri)}showValidationMessage(t,e){H(this._extension,"scmValidation"),this.#e.$showValidationMessage(this._sourceControlHandle,t,Rk.from(e))}$onInputBoxValueChange(t){this.updateValue(t)}updateValue(t){this._value=t,this._onDidChange.fire(t)}},UN=class r{constructor(t,e,n,o,i,s,a){this._proxy=t;this._commands=e;this._sourceControlHandle=n;this._id=o;this._label=i;this.multiDiffEditorEnableViewChanges=s;this._extension=a;this._resourceHandlePool=0;this._resourceStates=[];this._resourceStatesMap=new Map;this._resourceStatesCommandsMap=new Map;this._resourceStatesDisposablesMap=new Map;this._onDidUpdateResourceStates=new D;this.onDidUpdateResourceStates=this._onDidUpdateResourceStates.event;this._disposed=!1;this._onDidDispose=new D;this.onDidDispose=this._onDidDispose.event;this._handlesSnapshot=[];this._resourceSnapshot=[];this._contextValue=void 0;this._hideWhenEmpty=void 0;this.handle=r._handlePool++}static{this._handlePool=0}get disposed(){return this._disposed}get id(){return this._id}get label(){return this._label}set label(t){this._label=t,this._proxy.$updateGroupLabel(this._sourceControlHandle,this.handle,t)}get contextValue(){return this._contextValue}set contextValue(t){this._contextValue=t,this._proxy.$updateGroup(this._sourceControlHandle,this.handle,this.features)}get hideWhenEmpty(){return this._hideWhenEmpty}set hideWhenEmpty(t){this._hideWhenEmpty=t,this._proxy.$updateGroup(this._sourceControlHandle,this.handle,this.features)}get features(){return{contextValue:this.contextValue,hideWhenEmpty:this.hideWhenEmpty}}get resourceStates(){return[...this._resourceStates]}set resourceStates(t){this._resourceStates=[...t],this._onDidUpdateResourceStates.fire()}getResourceState(t){return this._resourceStatesMap.get(t)}$executeResourceCommand(t,e){let n=this._resourceStatesCommandsMap.get(t);return n?dn(()=>this._commands.executeCommand(n.command,...n.arguments||[],e)):Promise.resolve(void 0)}_takeResourceStateSnapshot(){let t=[...this._resourceStates].sort(e3),n=YT(this._resourceSnapshot,t,e3).map(s=>{let a=s.toInsert.map(l=>{let d=this._resourceHandlePool++;this._resourceStatesMap.set(d,l);let c=l.resourceUri,u;if(l.command)if(l.command.command==="vscode.open"||l.command.command==="vscode.diff"||l.command.command==="vscode.changes"){let ee=new te;u=this._commands.converter.toInternal(l.command,ee),this._resourceStatesDisposablesMap.set(d,ee)}else this._resourceStatesCommandsMap.set(d,l.command);let f=$e(this._extension,"scmMultiDiffEditor"),g=f?l.multiDiffEditorOriginalUri:void 0,I=f?l.multiFileDiffEditorModifiedUri:void 0,h=ON(l.decorations),C=l.decorations&&ON(l.decorations.light)||h,_=l.decorations&&ON(l.decorations.dark)||h,R=[C,_],O=l.decorations&&l.decorations.tooltip||"",U=l.decorations&&!!l.decorations.strikeThrough,ie=l.decorations&&!!l.decorations.faded,Y=l.contextValue||"";return{rawResource:[d,c,R,O,U,ie,Y,u,g,I],handle:d}});return{start:s.start,deleteCount:s.deleteCount,toInsert:a}}),o=n.map(({start:s,deleteCount:a,toInsert:l})=>[s,a,l.map(d=>d.rawResource)]),i=n.reverse();for(let{start:s,deleteCount:a,toInsert:l}of i){let d=l.map(u=>u.handle),c=this._handlesSnapshot.splice(s,a,...d);for(let u of c)this._resourceStatesMap.delete(u),this._resourceStatesCommandsMap.delete(u),this._resourceStatesDisposablesMap.get(u)?.dispose(),this._resourceStatesDisposablesMap.delete(u)}return this._resourceSnapshot=t,o}dispose(){this._disposed=!0,this._onDidDispose.fire(),this._onDidUpdateResourceStates.dispose(),this._onDidDispose.dispose()}},pv=class pv{constructor(t,e,n,o,i,s,a,l,d,c){this._extension=t;this._commands=o;this._id=i;this._label=s;this._rootUri=a;this._onDidDispose=new D;this.onDidDispose=this._onDidDispose.event;this._groups=new Map;this._contextValue=void 0;this._count=void 0;this._quickDiffProvider=void 0;this._secondaryQuickDiffProvider=void 0;this._historyProviderDisposable=new An;this._artifactProviderDisposable=new An;this._commitTemplate=void 0;this._acceptInputDisposables=new An;this._acceptInputCommand=void 0;this._actionButtonDisposables=new te;this._generateCommitMessageButtonDisposables=new An;this._statusBarDisposables=new te;this._statusBarCommands=void 0;this._selected=!1;this._onDidChangeSelection=new D;this.onDidChangeSelection=this._onDidChangeSelection.event;this._artifactCommandsDisposables=new Fr;this.handle=pv._handlePool++;this.createdResourceGroups=new Map;this.updatedResourceGroups=new Set;this.#e=n;let u=E.from({scheme:X.vscodeSourceControl,path:`${i}/scm${this.handle}/input`,query:a?`rootUri=${encodeURIComponent(a.toString())}`:void 0});this._inputBox=new NN(t,e,this.#e,this.handle,u),this.#e.$registerSourceControl(this.handle,c?.handle,i,s,a,as(l),d,u),this.onDidDisposeParent=c?c.onDidDispose:He.None}static{this._handlePool=0}#e;get id(){return this._id}get label(){return this._label}get rootUri(){return this._rootUri}get contextValue(){return H(this._extension,"scmProviderOptions"),this._contextValue}set contextValue(t){H(this._extension,"scmProviderOptions"),this._contextValue!==t&&(this._contextValue=t,this.#e.$updateSourceControl(this.handle,{contextValue:t}))}get inputBox(){return this._inputBox}get count(){return this._count}set count(t){this._count!==t&&(this._count=t,this.#e.$updateSourceControl(this.handle,{count:t}))}get quickDiffProvider(){return this._quickDiffProvider}set quickDiffProvider(t){this._quickDiffProvider=t;let e;$e(this._extension,"quickDiffProvider")&&(e=t?.label),this.#e.$updateSourceControl(this.handle,{hasQuickDiffProvider:!!t,quickDiffLabel:e})}get secondaryQuickDiffProvider(){return H(this._extension,"quickDiffProvider"),this._secondaryQuickDiffProvider}set secondaryQuickDiffProvider(t){H(this._extension,"quickDiffProvider"),this._secondaryQuickDiffProvider=t;let e=t?.label;this.#e.$updateSourceControl(this.handle,{hasSecondaryQuickDiffProvider:!!t,secondaryQuickDiffLabel:e})}get historyProvider(){return H(this._extension,"scmHistoryProvider"),this._historyProvider}set historyProvider(t){H(this._extension,"scmHistoryProvider"),this._historyProvider=t,this._historyProviderDisposable.value=new te,this.#e.$updateSourceControl(this.handle,{hasHistoryProvider:!!t}),t&&(this._historyProviderDisposable.value.add(t.onDidChangeCurrentHistoryItemRefs(()=>{let e=LN(t?.currentHistoryItemRef),n=LN(t?.currentHistoryItemRemoteRef),o=LN(t?.currentHistoryItemBaseRef);this.#e.$onDidChangeHistoryProviderCurrentHistoryItemRefs(this.handle,e,n,o)})),this._historyProviderDisposable.value.add(t.onDidChangeHistoryItemRefs(e=>{if(e.added.length===0&&e.modified.length===0&&e.removed.length===0)return;let n=e.added.map(s=>({...s,icon:as(s.icon)})),o=e.modified.map(s=>({...s,icon:as(s.icon)})),i=e.removed.map(s=>({...s,icon:as(s.icon)}));this.#e.$onDidChangeHistoryProviderHistoryItemRefs(this.handle,{added:n,modified:o,removed:i,silent:e.silent})})))}get artifactProvider(){return H(this._extension,"scmArtifactProvider"),this._artifactProvider}set artifactProvider(t){H(this._extension,"scmArtifactProvider"),this._artifactProvider=t,this._artifactProviderDisposable.value=new te,this.#e.$updateSourceControl(this.handle,{hasArtifactProvider:!!t}),t&&this._artifactProviderDisposable.value.add(t.onDidChangeArtifacts(e=>{e.length!==0&&this.#e.$onDidChangeArtifacts(this.handle,e)}))}get commitTemplate(){return this._commitTemplate}set commitTemplate(t){t!==this._commitTemplate&&(this._commitTemplate=t,this.#e.$updateSourceControl(this.handle,{commitTemplate:t}))}get acceptInputCommand(){return this._acceptInputCommand}set acceptInputCommand(t){this._acceptInputDisposables.value=new te,this._acceptInputCommand=t;let e=this._commands.converter.toInternal(t,this._acceptInputDisposables.value);this.#e.$updateSourceControl(this.handle,{acceptInputCommand:e})}get actionButton(){return H(this._extension,"scmActionButton"),this._actionButton}get generateCommitMessageButton(){return this._generateCommitMessageButton}set actionButton(t){if(H(this._extension,"scmActionButton"),bu(this._actionButton,t))return;let e=this._actionButtonDisposables;this._actionButtonDisposables=new te,this._actionButton=t;let n=t!==void 0?{command:{...this._commands.converter.toInternal(t.command,this._actionButtonDisposables),shortTitle:t.command.shortTitle},secondaryCommands:t.secondaryCommands?.map(o=>o.map(i=>this._commands.converter.toInternal(i,this._actionButtonDisposables))),enabled:t.enabled}:null;this.#e.$updateSourceControl(this.handle,{actionButton:n}).finally(()=>e.dispose())}set generateCommitMessageButton(t){this._generateCommitMessageButtonDisposables.value=new te,this._generateCommitMessageButton=t;let e=t!==void 0?{repoRootUri:t.repoRootUri,isGenerating:t.isGenerating,enabled:t.enabled}:void 0;this.#e.$updateSourceControl(this.handle,{generateCommitMessageButton:e??null})}get statusBarCommands(){return this._statusBarCommands}set statusBarCommands(t){if(this._statusBarCommands&&t&&rJ(this._statusBarCommands,t))return;let e=this._statusBarDisposables;this._statusBarDisposables=new te,this._statusBarCommands=t;let n=(t||[]).map(o=>this._commands.converter.toInternal(o,this._statusBarDisposables));this.#e.$updateSourceControl(this.handle,{statusBarCommands:n}).finally(()=>e.dispose())}get selected(){return this._selected}createResourceGroup(t,e,n){let o=$e(this._extension,"scmMultiDiffEditor")&&n?.multiDiffEditorEnableViewChanges===!0,i=new UN(this.#e,this._commands,this.handle,t,e,o,this._extension),s=He.once(i.onDidDispose)(()=>this.createdResourceGroups.delete(i));return this.createdResourceGroups.set(i,s),this.eventuallyAddResourceGroups(),i}eventuallyAddResourceGroups(){let t=[],e=[];for(let[n,o]of this.createdResourceGroups){o.dispose();let i=n.onDidUpdateResourceStates(()=>{this.updatedResourceGroups.add(n),this.eventuallyUpdateResourceStates()});He.once(n.onDidDispose)(()=>{this.updatedResourceGroups.delete(n),i.dispose(),this._groups.delete(n.handle),this.#e.$unregisterGroup(this.handle,n.handle)}),t.push([n.handle,n.id,n.label,n.features,n.multiDiffEditorEnableViewChanges]);let s=n._takeResourceStateSnapshot();s.length>0&&e.push([n.handle,s]),this._groups.set(n.handle,n)}this.#e.$registerGroups(this.handle,t,e),this.createdResourceGroups.clear()}eventuallyUpdateResourceStates(){let t=[];this.updatedResourceGroups.forEach(e=>{let n=e._takeResourceStateSnapshot();n.length!==0&&t.push([e.handle,n])}),t.length>0&&this.#e.$spliceResourceStates(this.handle,t),this.updatedResourceGroups.clear()}getResourceGroup(t){return this._groups.get(t)}setSelectionState(t){this._selected=t,this._onDidChangeSelection.fire(t)}async provideArtifacts(t,e){let n=new te,i=(await this.artifactProvider?.provideArtifacts(t,e))?.map(s=>({...s,icon:as(s.icon),command:s.command?this._commands.converter.toInternal(s.command,n):void 0}));return this._artifactCommandsDisposables.get(t)?.dispose(),this._artifactCommandsDisposables.set(t,n),i}dispose(){this._acceptInputDisposables.dispose(),this._actionButtonDisposables.dispose(),this._statusBarDisposables.dispose(),this._generateCommitMessageButtonDisposables.dispose(),this._historyProviderDisposable.dispose(),this._artifactProviderDisposable.dispose(),this._artifactCommandsDisposables.dispose(),this._groups.forEach(t=>t.dispose()),this.#e.$unregisterSourceControl(this.handle),this._onDidChangeSelection.dispose(),this._onDidDispose.fire(),this._onDidDispose.dispose()}};L([Ih(100)],pv.prototype,"eventuallyAddResourceGroups",1),L([Ih(100)],pv.prototype,"eventuallyUpdateResourceStates",1);var FN=pv,ef=class{constructor(t,e,n,o){this._commands=e;this._extHostDocuments=n;this.logService=o;this._sourceControls=new Map;this._sourceControlsByExtension=new Xn;this._onDidChangeActiveProvider=new D;this._proxy=t.getProxy(V.MainThreadSCM),this._telemetry=t.getProxy(V.MainThreadTelemetry),e.registerArgumentProcessor({processArgument:i=>{if(i&&i.$mid===3){let s=this._sourceControls.get(i.sourceControlHandle);if(!s)return i;let a=s.getResourceGroup(i.groupHandle);return a?a.getResourceState(i.handle):i}else if(i&&i.$mid===4){let s=this._sourceControls.get(i.sourceControlHandle);return s?s.getResourceGroup(i.groupHandle):i}else if(i&&i.$mid===5){let s=this._sourceControls.get(i.handle);return s||i}return i}})}get onDidChangeActiveProvider(){return this._onDidChangeActiveProvider.event}createSourceControl(t,e,n,o,i,s,a){this.logService.trace("ExtHostSCM#createSourceControl",t.identifier.value,e,n,o),this._telemetry.$publicLog2("api/scm/createSourceControl",{extensionId:t.identifier.value});let l=a?Lt.find(this._sourceControls.values(),u=>u===a):void 0,d=new FN(t,this._extHostDocuments,this._proxy,this._commands,e,n,o,i,s,l);this._sourceControls.set(d.handle,d);let c=this._sourceControlsByExtension.get(t.identifier)||[];return c.push(d),this._sourceControlsByExtension.set(t.identifier,c),d}getLastInputBox(t){this.logService.trace("ExtHostSCM#getLastInputBox",t.identifier.value);let e=this._sourceControlsByExtension.get(t.identifier),n=e&&e[e.length-1];return n&&n.inputBox}$provideOriginalResource(t,e,n){let o=E.revive(e);this.logService.trace("ExtHostSCM#$provideOriginalResource",t,o.toString());let i=this._sourceControls.get(t);return!i||!i.quickDiffProvider||!i.quickDiffProvider.provideOriginalResource?Promise.resolve(null):dn(()=>i.quickDiffProvider.provideOriginalResource(o,n)).then(s=>s||null)}$provideSecondaryOriginalResource(t,e,n){let o=E.revive(e);this.logService.trace("ExtHostSCM#$provideSecondaryOriginalResource",t,o.toString());let i=this._sourceControls.get(t);return!i||!i.secondaryQuickDiffProvider||!i.secondaryQuickDiffProvider.provideOriginalResource?Promise.resolve(null):dn(()=>i.secondaryQuickDiffProvider.provideOriginalResource(o,n)).then(s=>s||null)}$onInputBoxValueChange(t,e){this.logService.trace("ExtHostSCM#$onInputBoxValueChange",t);let n=this._sourceControls.get(t);return n&&n.inputBox.$onInputBoxValueChange(e),Promise.resolve(void 0)}$executeResourceCommand(t,e,n,o){this.logService.trace("ExtHostSCM#$executeResourceCommand",t,e,n);let i=this._sourceControls.get(t);if(!i)return Promise.resolve(void 0);let s=i.getResourceGroup(e);return s?s.$executeResourceCommand(n,o):Promise.resolve(void 0)}$validateInput(t,e,n){this.logService.trace("ExtHostSCM#$validateInput",t);let o=this._sourceControls.get(t);return!o||!o.inputBox.validateInput?Promise.resolve(void 0):dn(()=>o.inputBox.validateInput(e,n)).then(i=>{if(!i)return Promise.resolve(void 0);let s=ye.fromStrict(i.message);return s?Promise.resolve([s,i.type]):Promise.resolve(void 0)})}$setSelectedSourceControl(t){return this.logService.trace("ExtHostSCM#$setSelectedSourceControl",t),this._selectedSourceControlHandle===t||(t!==void 0&&this._sourceControls.get(t)?.setSelectionState(!0),this._selectedSourceControlHandle!==void 0&&this._sourceControls.get(this._selectedSourceControlHandle)?.setSelectionState(!1),this._selectedSourceControlHandle=t),Promise.resolve(void 0)}async $resolveHistoryItem(t,e,n){try{let i=await this._sourceControls.get(t)?.historyProvider?.resolveHistoryItem(e,n);return i?Z5(i):void 0}catch(o){this.logService.error("ExtHostSCM#$resolveHistoryItem",o);return}}async $resolveHistoryItemChatContext(t,e,n){try{return await this._sourceControls.get(t)?.historyProvider?.resolveHistoryItemChatContext(e,n)??void 0}catch(o){this.logService.error("ExtHostSCM#$resolveHistoryItemChatContext",o);return}}async $resolveHistoryItemChangeRangeChatContext(t,e,n,o,i){try{return await this._sourceControls.get(t)?.historyProvider?.resolveHistoryItemChangeRangeChatContext?.(e,n,o,i)??void 0}catch(s){this.logService.error("ExtHostSCM#$resolveHistoryItemChangeRangeChatContext",s);return}}async $resolveHistoryItemRefsCommonAncestor(t,e,n){try{return await this._sourceControls.get(t)?.historyProvider?.resolveHistoryItemRefsCommonAncestor(e,n)??void 0}catch(o){this.logService.error("ExtHostSCM#$resolveHistoryItemRefsCommonAncestor",o);return}}async $provideHistoryItemRefs(t,e,n){try{return(await this._sourceControls.get(t)?.historyProvider?.provideHistoryItemRefs(e,n))?.map(s=>({...s,icon:as(s.icon)}))??void 0}catch(o){this.logService.error("ExtHostSCM#$provideHistoryItemRefs",o);return}}async $provideHistoryItems(t,e,n){try{return(await this._sourceControls.get(t)?.historyProvider?.provideHistoryItems(e,n))?.map(s=>Z5(s))??void 0}catch(o){this.logService.error("ExtHostSCM#$provideHistoryItems",o);return}}async $provideHistoryItemChanges(t,e,n,o){try{return await this._sourceControls.get(t)?.historyProvider?.provideHistoryItemChanges(e,n,o)??void 0}catch(i){this.logService.error("ExtHostSCM#$provideHistoryItemChanges",i);return}}async $provideArtifactGroups(t,e){try{return(await this._sourceControls.get(t)?.artifactProvider?.provideArtifactGroups(e))?.map(i=>({...i,icon:as(i.icon)}))}catch(n){this.logService.error("ExtHostSCM#$provideArtifactGroups",n);return}}async $provideArtifacts(t,e,n){try{return this._sourceControls.get(t)?.provideArtifacts(e,n)}catch(o){this.logService.error("ExtHostSCM#$provideArtifacts",o);return}}};ef=L([P(3,be)],ef);var TT=class r{constructor(t,e){this.uriTransformer=e;this.providers=new Map;this.proxy=t.getProxy(V.MainThreadShare)}static{this.handlePool=0}async $provideShare(t,e,n){return await this.providers.get(t)?.provideShare({selection:j.to(e.selection),resourceUri:E.revive(e.resourceUri)},n)??void 0}registerShareProvider(t,e){let n=r.handlePool++;return this.providers.set(n,e),this.proxy.$registerShareProvider(n,di.from(t,this.uriTransformer),e.id,e.label,e.priority),{dispose:()=>{this.proxy.$unregisterShareProvider(n),this.providers.delete(n)}}}};var _T=class r{constructor(t){this.providers=new Map;this.sessions=new Map;this.synthesizers=new Map;this.proxy=t.getProxy(V.MainThreadSpeech)}static{this.ID_POOL=1}async $createSpeechToTextSession(t,e,n){let o=this.providers.get(t);if(!o)return;let i=new te,s=new We;this.sessions.set(e,s);let a=await o.provideSpeechToTextSession(s.token,n?{language:n}:void 0);a&&(i.add(a.onDidChange(l=>{s.token.isCancellationRequested||this.proxy.$emitSpeechToTextEvent(e,l)})),i.add(s.token.onCancellationRequested(()=>i.dispose())))}async $cancelSpeechToTextSession(t){this.sessions.get(t)?.dispose(!0),this.sessions.delete(t)}async $createTextToSpeechSession(t,e,n){let o=this.providers.get(t);if(!o)return;let i=new te,s=new We;this.sessions.set(e,s);let a=await o.provideTextToSpeechSession(s.token,n?{language:n}:void 0);a&&(this.synthesizers.set(e,a),i.add(a.onDidChange(l=>{s.token.isCancellationRequested||this.proxy.$emitTextToSpeechEvent(e,l)})),i.add(s.token.onCancellationRequested(()=>i.dispose())))}async $synthesizeSpeech(t,e){this.synthesizers.get(t)?.synthesize(e)}async $cancelTextToSpeechSession(t){this.sessions.get(t)?.dispose(!0),this.sessions.delete(t),this.synthesizers.delete(t)}async $createKeywordRecognitionSession(t,e){let n=this.providers.get(t);if(!n)return;let o=new te,i=new We;this.sessions.set(e,i);let s=await n.provideKeywordRecognitionSession(i.token);s&&(o.add(s.onDidChange(a=>{i.token.isCancellationRequested||this.proxy.$emitKeywordRecognitionEvent(e,a)})),o.add(i.token.onCancellationRequested(()=>o.dispose())))}async $cancelKeywordRecognitionSession(t){this.sessions.get(t)?.dispose(!0),this.sessions.delete(t)}registerProvider(t,e,n){let o=r.ID_POOL++;return this.providers.set(o,n),this.proxy.$registerProvider(o,e,{extension:t,displayName:t.value}),ae(()=>{this.proxy.$unregisterProvider(o),this.providers.delete(o)})}};var HN=class r{constructor(t,e,n,o,i,s=1,a,l){this._onDispose=l;this._disposed=!1;this._text="";this._staleCommandRegistrations=new te;if(this.#e=t,this.#t=e,i&&o){this._entryId=YH(o.identifier,i);let d=n.get(this._entryId);d&&(s=d.alignLeft?1:2,a=d.priority,this._visible=!0,this.name=d.name,this.text=d.text,this.tooltip=d.tooltip,this.command=d.command,this.accessibilityInformation=d.accessibilityInformation)}else this._entryId=String(r.ID_GEN++);this._extension=o,this._id=i,this._alignment=s,this._priority=this.validatePriority(a)}static{this.ID_GEN=0}static{this.ALLOWED_BACKGROUND_COLORS=new Map([["statusBarItem.errorBackground",new Os("statusBarItem.errorForeground")],["statusBarItem.warningBackground",new Os("statusBarItem.warningForeground")]])}#e;#t;validatePriority(t){if(jo(t))return t===Number.POSITIVE_INFINITY?Number.MAX_VALUE:t===Number.NEGATIVE_INFINITY?-Number.MAX_VALUE:t}get id(){return this._id??this._extension.identifier.value}get entryId(){return this._entryId}get alignment(){return this._alignment}get priority(){return this._priority}get text(){return this._text}get name(){return this._name}get tooltip(){return this._tooltip}get tooltip2(){return this._extension&&H(this._extension,"statusBarItemTooltip"),this._tooltip2}get color(){return this._color}get backgroundColor(){return this._backgroundColor}get command(){return this._command?.fromApi}get accessibilityInformation(){return this._accessibilityInformation}get progressValue(){return this._progressValue}set text(t){this._text=t,this.update()}set name(t){this._name=t,this.update()}set tooltip(t){this._tooltip=t,this.update()}set tooltip2(t){this._extension&&H(this._extension,"statusBarItemTooltip"),this._tooltip2=t,this.update()}set color(t){this._color=t,this.update()}set backgroundColor(t){t&&!r.ALLOWED_BACKGROUND_COLORS.has(t.id)&&(t=void 0),this._backgroundColor=t,this.update()}set command(t){this._command?.fromApi!==t&&(this._latestCommandRegistration&&this._staleCommandRegistrations.add(this._latestCommandRegistration),this._latestCommandRegistration=new te,typeof t=="string"?this._command={fromApi:t,internal:this.#t.toInternal({title:"",command:t},this._latestCommandRegistration)}:t?this._command={fromApi:t,internal:this.#t.toInternal(t,this._latestCommandRegistration)}:this._command=void 0,this.update())}set accessibilityInformation(t){this._accessibilityInformation=t,this.update()}set progressValue(t){this._progressValue=t,this.update()}show(){this._visible=!0,this.update()}hide(){clearTimeout(this._timeoutHandle),this._visible=!1,this.#e.$disposeEntry(this._entryId)}update(){this._disposed||!this._visible||(clearTimeout(this._timeoutHandle),this._timeoutHandle=setTimeout(()=>{this._timeoutHandle=void 0;let t;this._extension?this._id?t=`${this._extension.identifier.value}.${this._id}`:t=this._extension.identifier.value:t=this._id;let e;this._name?e=this._name:e=p(3207,null,this._extension.displayName||this._extension.name);let n=this._color;this._backgroundColor&&(n=r.ALLOWED_BACKGROUND_COLORS.get(this._backgroundColor.id));let o,i;typeof this._tooltip2=="function"?(o=ye.fromStrict(this._tooltip),i=!0):(o=ye.fromStrict(this._tooltip2??this._tooltip),i=!1),this.#e.$setEntry(this._entryId,t,this._extension?.identifier.value,e,this._text,o,i,this._command?.internal,n,this._backgroundColor,this._alignment===1,this._priority,this._accessibilityInformation,this._progressValue),this._staleCommandRegistrations.clear()},0))}dispose(){this.hide(),this._staleCommandRegistrations.dispose(),this._latestCommandRegistration?.dispose(),this._onDispose?.(),this._disposed=!0}},BN=class{constructor(t){this._messages=[];this._item=t.createStatusBarEntry(void 0,"status.extensionMessage",1,Number.MIN_VALUE),this._item.name=p(3208,null)}dispose(){this._messages.length=0,this._item.dispose()}setMessage(t){let e={message:t};return this._messages.unshift(e),this._update(),new Ce(()=>{let n=this._messages.indexOf(e);n>=0&&(this._messages.splice(n,1),this._update())})}_update(){this._messages.length>0?(this._item.text=this._messages[0].message,this._item.show()):this._item.hide()}},PT=class{constructor(t,e){this._entries=new Map;this._existingItems=new Map;this._proxy=t.getProxy(V.MainThreadStatusBar),this._commands=e,this._statusMessage=new BN(this)}$acceptStaticEntries(t){for(let e of t)this._existingItems.set(e.entryId,e)}async $provideTooltip(t,e){let n=this._entries.get(t);if(!n)return;let o=typeof n.tooltip2=="function"?await n.tooltip2(e):n.tooltip2;return e.isCancellationRequested?void 0:ye.fromStrict(o)}createStatusBarEntry(t,e,n,o){let i=new HN(this._proxy,this._commands,this._existingItems,t,e,n,o,()=>this._entries.delete(i.entryId));return this._entries.set(i.entryId,i),i}setStatusBarMessage(t,e){let n=this._statusMessage.setMessage(t),o;return typeof e=="number"?o=setTimeout(()=>n.dispose(),e):typeof e<"u"&&e.then(()=>n.dispose(),()=>n.dispose()),new Ce(()=>{n.dispose(),clearTimeout(o)})}};var DT=class extends K{constructor(e,n){super();this._extHostDocumentsAndEditors=n;this._onDidChangeTextEditorSelection=new D;this._onDidChangeTextEditorOptions=new D;this._onDidChangeTextEditorVisibleRanges=new D;this._onDidChangeTextEditorViewColumn=new D;this._onDidChangeTextEditorDiffInformation=new D;this._onDidChangeActiveTextEditor=new D;this._onDidChangeVisibleTextEditors=new D;this._onDidTextEditorMouseUp=new D;this.onDidChangeTextEditorSelection=this._onDidChangeTextEditorSelection.event;this.onDidChangeTextEditorOptions=this._onDidChangeTextEditorOptions.event;this.onDidChangeTextEditorVisibleRanges=this._onDidChangeTextEditorVisibleRanges.event;this.onDidChangeTextEditorViewColumn=this._onDidChangeTextEditorViewColumn.event;this.onDidChangeTextEditorDiffInformation=this._onDidChangeTextEditorDiffInformation.event;this.onDidChangeActiveTextEditor=this._onDidChangeActiveTextEditor.event;this.onDidChangeVisibleTextEditors=this._onDidChangeVisibleTextEditors.event;this.onDidTextEditorMouseUp=this._onDidTextEditorMouseUp.event;this._proxy=e.getProxy(V.MainThreadTextEditors),this._register(this._extHostDocumentsAndEditors.onDidChangeVisibleTextEditors(o=>this._onDidChangeVisibleTextEditors.fire(o))),this._register(this._extHostDocumentsAndEditors.onDidChangeActiveTextEditor(o=>this._onDidChangeActiveTextEditor.fire(o)))}getActiveTextEditor(){return this._extHostDocumentsAndEditors.activeEditor()}getVisibleTextEditors(e){let n=this._extHostDocumentsAndEditors.allEditors();return e?n:n.map(o=>o.value)}async showTextDocument(e,n,o){let i;typeof n=="number"?i={position:Vt.from(n),preserveFocus:o}:typeof n=="object"?i={position:Vt.from(n.viewColumn),preserveFocus:n.preserveFocus,selection:typeof n.selection=="object"?j.from(n.selection):void 0,pinned:typeof n.preview=="boolean"?!n.preview:void 0}:i={preserveFocus:!1};let s=await this._proxy.$tryShowTextDocument(e.uri,i),a=s&&this._extHostDocumentsAndEditors.getEditor(s);if(a)return a.value;throw s?new Error(`Could NOT open editor for "${e.uri.toString()}" because another editor opened in the meantime.`):new Error(`Could NOT open editor for "${e.uri.toString()}".`)}createTextEditorDecorationType(e,n){return new Ex(this._proxy,e,n).value}$acceptEditorPropertiesChanged(e,n){let o=this._extHostDocumentsAndEditors.getEditor(e);if(!o)throw new Error("unknown text editor");if(n.options&&o._acceptOptions(n.options),n.selections){let i=n.selections.selections.map(oo.to);o._acceptSelections(i)}if(n.visibleRanges){let i=pt(n.visibleRanges.map(j.to));o._acceptVisibleRanges(i)}if(n.options&&this._onDidChangeTextEditorOptions.fire({textEditor:o.value,options:{...n.options,lineNumbers:lc.to(n.options.lineNumbers)}}),n.selections){let i=Zd.fromValue(n.selections.source),s=n.selections.selections.map(oo.to);this._onDidChangeTextEditorSelection.fire({textEditor:o.value,selections:s,kind:i})}if(n.visibleRanges){let i=pt(n.visibleRanges.map(j.to));this._onDidChangeTextEditorVisibleRanges.fire({textEditor:o.value,visibleRanges:i})}}$acceptEditorPositionData(e){for(let n in e){let o=this._extHostDocumentsAndEditors.getEditor(n);if(!o)throw new Error("Unknown text editor");let i=Vt.to(e[n]);o.value.viewColumn!==i&&(o._acceptViewColumn(i),this._onDidChangeTextEditorViewColumn.fire({textEditor:o.value,viewColumn:i}))}}$acceptEditorDiffInformation(e,n){let o=this._extHostDocumentsAndEditors.getEditor(e);if(!o)throw new Error("unknown text editor");if(!n){o._acceptDiffInformation(void 0),this._onDidChangeTextEditorDiffInformation.fire({textEditor:o.value,diffInformation:void 0});return}let i=this,s=n.map(a=>{let l=E.revive(a.original),d=E.revive(a.modified),c=a.changes.map(u=>{let[f,g,I,h]=u,C;return f===g?C=1:I===h?C=2:C=3,{original:{startLineNumber:f,endLineNumberExclusive:g},modified:{startLineNumber:I,endLineNumberExclusive:h},kind:C}});return Object.freeze({documentVersion:a.documentVersion,original:l,modified:d,changes:c,get isStale(){return i._extHostDocumentsAndEditors.getDocument(d)?.version!==a.documentVersion}})});o._acceptDiffInformation(s),this._onDidChangeTextEditorDiffInformation.fire({textEditor:o.value,diffInformation:s})}getDiffInformation(e){return Promise.resolve(this._proxy.$getDiffInformation(e))}_getEditor(e){for(let n of this._extHostDocumentsAndEditors.allEditors())if(n.value===e)return n}setTextEditorNudge(e,n,o,i){let s=this._getEditor(e);s&&s._setNudge(n,o,i)}clearTextEditorNudge(e){let n=this._getEditor(e);n&&n._clearNudge()}$onNudgeButtonPressed(e,n){let o=this._extHostDocumentsAndEditors.getEditor(e);o&&o._onNudgeButtonPressed(n)}$acceptEditorMouseUp(e){let n=this._extHostDocumentsAndEditors.getEditor(e);n&&this._onDidTextEditorMouseUp.fire({textEditor:n.value})}};var tf=class{constructor(t){this._actual=new Bd(2),this._onDidChangeActiveColorTheme=new D}get activeColorTheme(){return this._actual}$onColorThemeChange(t){let e;switch(t){case"light":e=1;break;case"hcDark":e=3;break;case"hcLight":e=4;break;default:e=2}this._actual=new Bd(e),this._onDidChangeActiveColorTheme.fire(this._actual)}get onDidChangeActiveColorTheme(){return this._onDidChangeActiveColorTheme.event}};tf=L([P(0,Ee)],tf);var Bit=N("IExtHostTimeline"),wT=class{constructor(t,e){this._providers=new Map;this._itemsBySourceAndUriMap=new Map;this._proxy=t.getProxy(V.MainThreadTimeline),e.registerArgumentProcessor({processArgument:(n,o)=>{if(n&&n.$mid===12)if(this._providers.get(n.source)&&o&&$e(o,"timeline")){let i=n.uri===void 0?void 0:E.revive(n.uri);return this._itemsBySourceAndUriMap.get(n.source)?.get(t3(i))?.get(n.handle)}else return;return n}})}async $getTimeline(t,e,n,o){return this._providers.get(t)?.provider.provideTimeline(E.revive(e),n,o)}registerTimelineProvider(t,e,n,o){let i=new te,s=this.convertTimelineItem(e.id,o,i).bind(this),a;e.onDidChange&&(a=e.onDidChange(d=>this._proxy.$emitTimelineChangeEvent({uri:void 0,reset:!0,...d,id:e.id}),this));let l=this._itemsBySourceAndUriMap;return this.registerTimelineProviderCore({...e,scheme:t,onDidChange:void 0,async provideTimeline(d,c,u){c?.resetCache&&(i.clear(),l.get(e.id)?.clear());let f=await e.provideTimeline(d,c,u);if(f==null)return;let g=s(d,c);return{...f,source:e.id,items:f.items.map(g)}},dispose(){for(let d of l.values())d.get(e.id)?.clear();a?.dispose(),i.dispose()}},n)}convertTimelineItem(t,e,n){return(o,i)=>{let s;if(i?.cacheResults){let a=this._itemsBySourceAndUriMap.get(t);a===void 0&&(a=new Map,this._itemsBySourceAndUriMap.set(t,a));let l=t3(o);s=a.get(l),s===void 0&&(s=new Map,a.set(l,s))}return a=>{let{iconPath:l,...d}=a,c=`${t}|${a.id??a.timestamp}`;s?.set(c,a);let u,f,g;a.iconPath&&(l instanceof En?g={id:l.id,color:l.color}:E.isUri(l)?(u=l,f=l):{light:u,dark:f}=l);let I;return zt.isMarkdownString(d.tooltip)?I=ye.from(d.tooltip):Me(d.tooltip)?I=d.tooltip:zt.isMarkdownString(d.detail)?(console.warn("Using deprecated TimelineItem.detail, migrate to TimelineItem.tooltip"),I=ye.from(d.detail)):Me(d.detail)&&(console.warn("Using deprecated TimelineItem.detail, migrate to TimelineItem.tooltip"),I=d.detail),{...d,id:d.id??void 0,handle:c,source:t,command:a.command?e.toInternal(a.command,n):void 0,icon:u,iconDark:f,themeIcon:g,tooltip:I,accessibilityInformation:a.accessibilityInformation}}}}registerTimelineProviderCore(t,e){if(this._providers.get(t.id))throw new Error(`Timeline Provider ${t.id} already exists.`);return this._proxy.$registerTimelineProvider({id:t.id,label:t.label,scheme:t.scheme}),this._providers.set(t.id,{provider:t,extension:e}),ae(()=>{for(let o of this._itemsBySourceAndUriMap.values())o.get(t.id)?.clear();this._providers.delete(t.id),this._proxy.$unregisterTimelineProvider(t.id),t.dispose()})}};function t3(r){return r?.toString()}var Zit=p(4875,null),est=Sc("default-view-icon",fe.window,p(4872,null)),$N;(e=>(e.ViewContainersRegistry="workbench.registry.view.containers",e.ViewsRegistry="workbench.registry.view"))($N||={});var VN=class extends K{constructor(){super(...arguments);this._onDidRegister=this._register(new D);this.onDidRegister=this._onDidRegister.event;this._onDidDeregister=this._register(new D);this.onDidDeregister=this._onDidDeregister.event;this.viewContainers=new Map;this.defaultViewContainers=[]}get all(){return[...this.viewContainers.values()].flat()}registerViewContainer(e,n,o){let i=this.get(e.id);if(i)return i;let s=e;return s.openCommandActionDescriptor=o?.doNotRegisterOpenCommand?void 0:s.openCommandActionDescriptor??{id:s.id},r_(this.viewContainers,n,[]).push(s),o?.isDefault&&this.defaultViewContainers.push(s),this._onDidRegister.fire({viewContainer:s,viewContainerLocation:n}),s}deregisterViewContainer(e){for(let n of this.viewContainers.keys()){let o=this.viewContainers.get(n),i=o?.indexOf(e);if(i!==-1){o?.splice(i,1),o.length===0&&this.viewContainers.delete(n),this._onDidDeregister.fire({viewContainer:e,viewContainerLocation:n});return}}}get(e){return this.all.filter(n=>n.id===e)[0]}getViewContainers(e){return[...this.viewContainers.get(e)||[]]}getViewContainerLocation(e){return[...this.viewContainers.keys()].filter(n=>this.getViewContainers(n).filter(o=>o?.id===e.id).length>0)[0]}getDefaultViewContainers(e){return this.defaultViewContainers.filter(n=>this.getViewContainerLocation(n)===e)}};ht.add($N.ViewContainersRegistry,new VN);function iJ(r,t){let e=r.group??"9_more",n=t.group??"9_more";return e!==n?e.localeCompare(n):(r.order??5)-(t.order??5)}var WN=class extends K{constructor(){super(...arguments);this._onViewsRegistered=this._register(new D);this.onViewsRegistered=this._onViewsRegistered.event;this._onViewsDeregistered=this._register(new D);this.onViewsDeregistered=this._onViewsDeregistered.event;this._onDidChangeContainer=this._register(new D);this.onDidChangeContainer=this._onDidChangeContainer.event;this._onDidChangeViewWelcomeContent=this._register(new D);this.onDidChangeViewWelcomeContent=this._onDidChangeViewWelcomeContent.event;this._viewContainers=[];this._views=new Map;this._viewWelcomeContents=new Vc}registerViews(e,n){this.registerViews2([{views:e,viewContainer:n}])}registerViews2(e){e.forEach(({views:n,viewContainer:o})=>this.addViews(n,o)),this._onViewsRegistered.fire(e)}deregisterViews(e,n){let o=this.removeViews(e,n);o.length&&this._onViewsDeregistered.fire({views:o,viewContainer:n})}moveViews(e,n){for(let o of this._views.keys())if(o!==n){let i=this.removeViews(e,o);i.length&&(this.addViews(i,n),this._onDidChangeContainer.fire({views:i,from:o,to:n}))}}getViews(e){return this._views.get(e)||[]}getView(e){for(let n of this._viewContainers){let o=(this._views.get(n)||[]).filter(i=>i.id===e)[0];if(o)return o}return null}getViewContainer(e){for(let n of this._viewContainers)if((this._views.get(n)||[]).filter(i=>i.id===e)[0])return n;return null}registerViewWelcomeContent(e,n){return this._viewWelcomeContents.add(e,n),this._onDidChangeViewWelcomeContent.fire(e),ae(()=>{this._viewWelcomeContents.delete(e,n),this._onDidChangeViewWelcomeContent.fire(e)})}registerViewWelcomeContent2(e,n){let o=new Map;for(let[i,s]of n)this._viewWelcomeContents.add(e,s),o.set(i,ae(()=>{this._viewWelcomeContents.delete(e,s),this._onDidChangeViewWelcomeContent.fire(e)}));return this._onDidChangeViewWelcomeContent.fire(e),o}getViewWelcomeContent(e){let n=[];return this._viewWelcomeContents.forEach(e,o=>n.push(o)),n.sort(iJ)}addViews(e,n){let o=this._views.get(n);o||(o=[],this._views.set(n,o),this._viewContainers.push(n));for(let i of e){if(this.getView(i.id)!==null)throw new Error(p(4873,null,i.id));o.push(i)}}removeViews(e,n){let o=this._views.get(n);if(!o)return[];let i=[],s=[];for(let a of o)e.includes(a)?i.push(a):s.push(a);return i.length&&(s.length?this._views.set(n,s):(this._views.delete(n),this._viewContainers.splice(this._viewContainers.indexOf(n),1))),i}};ht.add($N.ViewsRegistry,new WN);var tst=N("viewDescriptorService");var Lr=class extends Error{constructor(e){super(p(4874,null,e));this.name="NoTreeViewError"}static is(e){return!!e&&e.name==="NoTreeViewError"}};var RT=class{constructor(){this._dragOperations=new Map}removeDragOperationTransfer(t){if(t&&this._dragOperations.has(t)){let e=this._dragOperations.get(t);return this._dragOperations.delete(t),e}}addDragOperationTransfer(t,e){this._dragOperations.set(t,e)}};function n3(r,t){if(Me(r))return{label:r};if(r&&typeof r=="object"&&r.label){let e;if(Array.isArray(r.highlights)&&(e=r.highlights.filter((n=>n.length===2&&typeof n[0]=="number"&&typeof n[1]=="number")),e=e.length?e:void 0),Me(r.label))return{label:r.label,highlights:e};if(zt.isMarkdownString(r.label))return H(t,"treeItemMarkdownLabel"),{label:ye.from(r.label),highlights:e}}}var kT=class extends K{constructor(e,n,o){super();this._proxy=e;this._commands=n;this._logService=o;this._treeViews=new Map;this._treeDragAndDropService=new RT;function i(s){return s&&s.$treeViewId&&(s.$treeItemHandle||s.$selectedTreeItems||s.$focusedTreeItem)}n.registerArgumentProcessor({processArgument:s=>i(s)?this._convertArgument(s):Array.isArray(s)&&s.length>0?s.map(a=>i(a)?this._convertArgument(a):a):s})}registerTreeDataProvider(e,n,o){let i=this.createTreeView(e,{treeDataProvider:n},o);return{dispose:()=>i.dispose()}}createTreeView(e,n,o){if(!n||!n.treeDataProvider)throw new Error("Options with treeDataProvider is mandatory");let i=n.dragAndDropController?.dropMimeTypes??[],s=n.dragAndDropController?.dragMimeTypes??[],a=!!n.dragAndDropController?.handleDrag,l=!!n.dragAndDropController?.handleDrop,d=this._createExtHostTreeView(e,n,o),c={showCollapseAll:!!n.showCollapseAll,canSelectMany:!!n.canSelectMany,dropMimeTypes:i,dragMimeTypes:s,hasHandleDrag:a,hasHandleDrop:l,manuallyManageCheckboxes:!!n.manageCheckboxStateManually},u=this._proxy.$registerTreeViewDataProvider(e,c),f={get onDidCollapseElement(){return d.onDidCollapseElement},get onDidExpandElement(){return d.onDidExpandElement},get selection(){return d.selectedElements},get onDidChangeSelection(){return d.onDidChangeSelection},get activeItem(){return H(o,"treeViewActiveItem"),d.focusedElement},get onDidChangeActiveItem(){return H(o,"treeViewActiveItem"),d.onDidChangeActiveItem},get visible(){return d.visible},get onDidChangeVisibility(){return d.onDidChangeVisibility},get onDidChangeCheckboxState(){return d.onDidChangeCheckboxState},get message(){return d.message},set message(g){qr(g)&&H(o,"treeViewMarkdownMessage"),d.message=g},get title(){return d.title},set title(g){d.title=g},get description(){return d.description},set description(g){d.description=g},get badge(){return d.badge},set badge(g){g!==void 0&&hR.isViewBadge(g)?d.badge={value:Math.floor(Math.abs(g.value)),tooltip:g.tooltip}:g===void 0&&(d.badge=void 0)},reveal:(g,I)=>d.reveal(g,I),dispose:async()=>{await u,this._treeViews.get(e)===d&&(this._treeViews.delete(e),this._proxy.$disposeTree(e)),d.dispose()}};return this._register(f),f}async $getChildren(e,n){let o=this._treeViews.get(e);if(!o)return Promise.reject(new Lr(e));if(!n){let s=await o.getChildren();return s?[[0,...s]]:void 0}let i=[];for(let s=0;s<n.length;s++){let a=n[s],l=await o.getChildren(a);l&&i.push([s,...l])}return i}async $handleDrop(e,n,o,i,s,a,l,d){let c=this._treeViews.get(e);if(!c)return Promise.reject(new Lr(e));let u=dc.toDataTransfer(o,async f=>(await this._proxy.$resolveDropFileData(e,n,f)).buffer);return l===e&&d&&await this._addAdditionalTransferItems(u,c,d,s,a),c.onDrop(u,i,s)}async _addAdditionalTransferItems(e,n,o,i,s){let a=this._treeDragAndDropService.removeDragOperationTransfer(s);if(a)(await a)?.forEach((l,d)=>{l&&e.set(d,l)});else if(s&&n.handleDrag){let l=n.handleDrag(o,e,i);this._treeDragAndDropService.addDragOperationTransfer(s,l),await l}return e}async $handleDrag(e,n,o,i){let s=this._treeViews.get(e);if(!s)return Promise.reject(new Lr(e));let a=await this._addAdditionalTransferItems(new _r,s,n,i,o);if(!(!a||i.isCancellationRequested))return dc.from(a)}async $hasResolve(e){let n=this._treeViews.get(e);if(!n)throw new Lr(e);return n.hasResolve}$resolve(e,n,o){let i=this._treeViews.get(e);if(!i)throw new Lr(e);return i.resolveTreeItem(n,o)}$setExpanded(e,n,o){let i=this._treeViews.get(e);if(!i)throw new Lr(e);i.setExpanded(n,o)}$setSelectionAndFocus(e,n,o){let i=this._treeViews.get(e);if(!i)throw new Lr(e);i.setSelectionAndFocus(n,o)}$setVisible(e,n){let o=this._treeViews.get(e);if(!o){if(!n)return;throw new Lr(e)}o.setVisible(n)}$changeCheckboxState(e,n){let o=this._treeViews.get(e);if(!o)throw new Lr(e);o.setCheckboxState(n)}_createExtHostTreeView(e,n,o){let i=this._register(new GN(e,n,this._proxy,this._commands.converter,this._logService,o));return this._treeViews.set(e,i),i}_convertArgument(e){let n=this._treeViews.get(e.$treeViewId),o=e;return n&&o.$treeItemHandle?n.getExtensionElement(o.$treeItemHandle):n&&e.$focusedTreeItem?n.focusedElement:null}},GN=class r extends K{constructor(e,n,o,i,s,a){super();this._viewId=e;this._proxy=o;this._commands=i;this._logService=s;this._extension=a;this._roots=void 0;this._elements=new Map;this._nodes=new Map;this._childrenFetchTokens=new Map;this._globalFetchTokenCounter=0;this._visible=!1;this._selectedHandles=[];this._focusedHandle=void 0;this._onDidExpandElement=this._register(new D);this.onDidExpandElement=this._onDidExpandElement.event;this._onDidCollapseElement=this._register(new D);this.onDidCollapseElement=this._onDidCollapseElement.event;this._onDidChangeSelection=this._register(new D);this.onDidChangeSelection=this._onDidChangeSelection.event;this._onDidChangeActiveItem=this._register(new D);this.onDidChangeActiveItem=this._onDidChangeActiveItem.event;this._onDidChangeVisibility=this._register(new D);this.onDidChangeVisibility=this._onDidChangeVisibility.event;this._onDidChangeCheckboxState=this._register(new D);this.onDidChangeCheckboxState=this._onDidChangeCheckboxState.event;this._onDidChangeData=this._register(new D);this._refreshPromise=Promise.resolve();this._refreshQueue=Promise.resolve();this._nodesToClear=new Set;this._message="";this._title="";this._refreshCancellationSource=new We;if(a.contributes&&a.contributes.views)for(let u in a.contributes.views)for(let f of a.contributes.views[u])f.id===e&&(this._title=f.name);this._dataProvider=n.treeDataProvider,this._dndController=n.dragAndDropController,this._dataProvider.onDidChangeTreeData&&this._register(this._dataProvider.onDidChangeTreeData(u=>{Array.isArray(u)&&u.length===0||this._onDidChangeData.fire({message:!1,element:u})}));let l,d,c=He.debounce(this._onDidChangeData.event,(u,f)=>(u||(u={message:!1,elements:[]}),f.element!==!1&&(l||(l=new Promise(g=>d=g),this._refreshPromise=this._refreshPromise.then(()=>l)),Array.isArray(f.element)?u.elements.push(...f.element):u.elements.push(f.element)),f.message&&(u.message=!0),u),200,!0);this._register(c(({message:u,elements:f})=>{f.length&&(f=cr(f),this._refreshQueue=this._refreshQueue.then(()=>{let g=d;l=null;let I=Array.from(this._nodesToClear);return this._nodesToClear.clear(),this._debugLogRefresh("start",f,I),this._refresh(f).then(()=>(this._debugLogRefresh("done",f,I),this._clearNodes(I),g())).catch(h=>{let C=h instanceof Error?h.message:JSON.stringify(h);return this._debugLogRefresh("error",f,I),this._clearNodes(I),this._logService.error(`Unable to refresh tree view ${this._viewId}: ${C}`),g()})})),u&&this._proxy.$setMessage(this._viewId,ye.fromStrict(this._message)??"")}))}static{this.LABEL_HANDLE_PREFIX="0"}static{this.ID_HANDLE_PREFIX="1"}static{this.ROOT_FETCH_KEY=Symbol("extHostTreeViewRoot")}get visible(){return this._visible}get selectedElements(){return this._selectedHandles.map(e=>this.getExtensionElement(e)).filter(e=>!Ft(e))}get focusedElement(){return this._focusedHandle?this.getExtensionElement(this._focusedHandle):void 0}_debugCollectHandles(e){let n=[];for(let i of e){if(!i){n.push("<root>");continue}let s=this._nodes.get(i);s&&n.push(s.item.handle)}let o=this._roots?.map(i=>i.item.handle)??[];return{changed:n,roots:o}}_debugLogRefresh(e,n,o){if(this._isDebugLogging())try{let i=this._debugCollectHandles(n);i.clearing=o.map(l=>l.item.handle);let s=i.changed.length,a=o.length;this._logService.debug(`[TreeView:${this._viewId}] refresh ${e} changed=${s} nodesToClear=${a} elements.size=${this._elements.size} nodes.size=${this._nodes.size} handles=${JSON.stringify(i)}`)}catch{this._logService.debug(`[TreeView:${this._viewId}] refresh ${e} (snapshot failed)`)}}_isDebugLogging(){try{let e=this._logService.getLevel();return e===2||e===1}catch{return!1}}async getChildren(e){let n=e?this.getExtensionElement(e):void 0;if(e&&!n)return this._logService.error(`No tree item with id '${e}' found.`),Promise.resolve([]);let o=this._getChildrenNodes(e);return o||(o=await this._fetchChildrenNodes(n)),o?o.map(i=>i.item):void 0}getExtensionElement(e){return this._elements.get(e)}reveal(e,n){n=n||{select:!0,focus:!1};let o=Ft(n.select)?!0:n.select,i=Ft(n.focus)?!1:n.focus,s=Ft(n.expand)?!1:n.expand;return typeof this._dataProvider.getParent!="function"?Promise.reject(new Error("Required registered TreeDataProvider to implement 'getParent' method to access 'reveal' method")):e?this._refreshPromise.then(()=>this._resolveUnknownParentChain(e)).then(a=>this._resolveTreeNode(e,a[a.length-1]).then(l=>this._proxy.$reveal(this._viewId,{item:l.item,parentChain:a.map(d=>d.item)},{select:o,focus:i,expand:s})),a=>this._logService.error(a)):this._proxy.$reveal(this._viewId,void 0,{select:o,focus:i,expand:s})}get message(){return this._message}set message(e){this._message=e,this._onDidChangeData.fire({message:!0,element:!1})}get title(){return this._title}set title(e){this._title=e,this._proxy.$setTitle(this._viewId,e,this._description)}get description(){return this._description}set description(e){this._description=e,this._proxy.$setTitle(this._viewId,this._title,e)}get badge(){return this._badge}set badge(e){this._badge?.value===e?.value&&this._badge?.tooltip===e?.tooltip||(this._badge=oh.from(e),this._proxy.$setBadge(this._viewId,e))}setExpanded(e,n){let o=this.getExtensionElement(e);o&&(n?this._onDidExpandElement.fire(Object.freeze({element:o})):this._onDidCollapseElement.fire(Object.freeze({element:o})))}setSelectionAndFocus(e,n){let o=!Zt(this._selectedHandles,e);this._selectedHandles=e;let i=this._focusedHandle!==n;this._focusedHandle=n,o&&this._onDidChangeSelection.fire(Object.freeze({selection:this.selectedElements})),i&&this._onDidChangeActiveItem.fire(Object.freeze({activeItem:this.focusedElement}))}setVisible(e){e!==this._visible&&(this._visible=e,this._onDidChangeVisibility.fire(Object.freeze({visible:this._visible})))}async setCheckboxState(e){let n=(await Promise.all(e.map(async o=>{let i=this.getExtensionElement(o.treeItemHandle);return i?{extensionItem:i,treeItem:await this._dataProvider.getTreeItem(i),newState:o.newState?1:0}:Promise.resolve(void 0)}))).filter(o=>o!==void 0);n.forEach(o=>{o.treeItem.checkboxState=o.newState?1:0}),this._onDidChangeCheckboxState.fire({items:n.map(o=>[o.extensionItem,o.newState])})}async handleDrag(e,n,o){let i=[];for(let s of e){let a=this.getExtensionElement(s);a&&i.push(a)}if(!(!this._dndController?.handleDrag||i.length===0))return await this._dndController.handleDrag(i,n,o),n}get hasHandleDrag(){return!!this._dndController?.handleDrag}async onDrop(e,n,o){let i=n?this.getExtensionElement(n):void 0;if(!(!i&&n||!this._dndController?.handleDrop))return dn(()=>this._dndController?.handleDrop?this._dndController.handleDrop(i,e,o):void 0)}get hasResolve(){return!!this._dataProvider.resolveTreeItem}async resolveTreeItem(e,n){if(!this._dataProvider.resolveTreeItem)return;let o=this._elements.get(e);if(o){let i=this._nodes.get(o);if(i){let s=await this._dataProvider.resolveTreeItem(i.extensionItem,o,n)??i.extensionItem;return this._validateTreeItem(s),i.item.tooltip=this._getTooltip(s.tooltip),i.item.command=this._getCommand(i.disposableStore,s.command),i.item}}}_resolveUnknownParentChain(e){return this._resolveParent(e).then(n=>n?this._resolveUnknownParentChain(n).then(o=>this._resolveTreeNode(n,o[o.length-1]).then(i=>(o.push(i),o))):Promise.resolve([]))}_resolveParent(e){let n=this._nodes.get(e);return n?Promise.resolve(n.parent?this._elements.get(n.parent.item.handle):void 0):dn(()=>this._dataProvider.getParent(e))}async _resolveTreeNode(e,n){let o=this._nodes.get(e);if(o)return o;let i=await dn(()=>this._dataProvider.getTreeItem(e)),s=this._createHandle(e,i,n,!0);await this.getChildren(n?n.item.handle:void 0);let a=this.getExtensionElement(s);if(a){let l=this._nodes.get(a);if(l)return l}throw this._logService.error(`[TreeView:${this._viewId}] Failed to resolve tree node for element ${s}`),this._proxy.$logResolveTreeNodeFailure(this._extension.identifier.value),new Error(`Cannot resolve tree item for element ${s} from extension ${this._extension.identifier.value}`)}_getChildrenNodes(e){if(e){let n;if(typeof e=="string"){let o=this.getExtensionElement(e);n=o?this._nodes.get(o):void 0}else n=e;return n&&n.children||void 0}return this._roots}_getFetchKey(e){return e??r.ROOT_FETCH_KEY}async _fetchChildrenNodes(e){this._addChildrenToClear(e);let n=this._getFetchKey(e),o=++this._globalFetchTokenCounter;this._childrenFetchTokens.set(n,o);let i=new We(this._refreshCancellationSource.token);try{let s=await this._dataProvider.getChildren(e);if(this._childrenFetchTokens.get(n)!==o)return;let a=e?this._nodes.get(e):void 0;if(i.token.isCancellationRequested)return;let l=pt(s||[]),d=await Promise.all(pt(l).map(u=>this._dataProvider.getTreeItem(u)));if(this._childrenFetchTokens.get(n)!==o||i.token.isCancellationRequested)return;let c=d.map((u,f)=>u?this._createAndRegisterTreeNode(l[f],u,a):null);return this._childrenFetchTokens.get(n)!==o?void 0:pt(c)}finally{i.dispose()}}_refresh(e){if(e.some(o=>!o))return this._refreshCancellationSource.dispose(!0),this._refreshCancellationSource=new We,this._addChildrenToClear(),this._proxy.$refresh(this._viewId);{let o=this._getHandlesToRefresh(e);if(o.length)return this._refreshHandles(o)}return Promise.resolve(void 0)}_getHandlesToRefresh(e){let n=new Set,o=e.map(s=>this._nodes.get(s));for(let s of o)if(s&&!n.has(s.item.handle)){let a=s;for(;a&&a.parent&&o.findIndex(l=>a&&a.parent&&l&&l.item.handle===a.parent.item.handle)===-1;){let l=this._elements.get(a.parent.item.handle);a=l?this._nodes.get(l):void 0}a&&!a.parent&&n.add(s.item.handle)}let i=[];return n.forEach(s=>{let a=this._elements.get(s);if(a){let l=this._nodes.get(a);l&&(!l.parent||!n.has(l.parent.item.handle))&&i.push(s)}}),i}_refreshHandles(e){let n={};return Promise.all(e.map(o=>this._refreshNode(o).then(i=>{i&&(n[o]=i.item)}))).then(()=>Object.keys(n).length?this._proxy.$refresh(this._viewId,n):void 0)}_refreshNode(e){let n=this.getExtensionElement(e);if(n){let o=this._nodes.get(n);if(o)return this._addChildrenToClear(n),dn(()=>this._dataProvider.getTreeItem(n)).then(i=>{if(i){let s=this._createTreeNode(n,i,o.parent);return this._updateNodeCache(n,s,o,o.parent),o.dispose(),s}return null})}return Promise.resolve(null)}_createAndRegisterTreeNode(e,n,o){let i=n.id?`${r.ID_HANDLE_PREFIX}/${n.id}`:void 0;if(i){let a=this._elements.get(i);if(a){if(a!==e)throw new Error(p(3211,null,n.id));let l=this._nodes.get(a);if(l){let d=this._createTreeNode(e,n,o);return this._updateNodeCache(e,d,l,o),l.dispose(),d}}}let s=this._createTreeNode(e,n,o);return this._addNodeToCache(e,s),this._addNodeToParentCache(s,o),s}_getTooltip(e){return zt.isMarkdownString(e)?ye.from(e):e}_getCommand(e,n){return n?{...this._commands.toInternal(n,e),originalId:n.command}:void 0}_getCheckbox(e){if(e.checkboxState===void 0)return;let n,o,i;return typeof e.checkboxState=="number"?n=e.checkboxState:(n=e.checkboxState.state,o=e.checkboxState.tooltip,i=e.checkboxState.accessibilityInformation),{isChecked:n===1,tooltip:o,accessibilityInformation:i}}_validateTreeItem(e){if(!Gi.isTreeItem(e,this._extension))throw new Error(`Extension ${this._extension.identifier.value} has provided an invalid tree item.`)}_createTreeNode(e,n,o){this._validateTreeItem(n);let i=this._register(new te),s=this._createHandle(e,n,o),a=this._getLightIconPath(n);return{item:{handle:s,parentHandle:o?o.item.handle:void 0,label:n3(n.label,this._extension),description:n.description,resourceUri:n.resourceUri,tooltip:this._getTooltip(n.tooltip),command:this._getCommand(i,n.command),contextValue:n.contextValue,icon:a,iconDark:this._getDarkIconPath(n)||a,themeIcon:this._getThemeIcon(n),collapsibleState:Ft(n.collapsibleState)?0:n.collapsibleState,accessibilityInformation:n.accessibilityInformation,checkbox:this._getCheckbox(n)},extensionItem:n,parent:o,children:void 0,disposableStore:i,dispose(){i.dispose()}}}_getThemeIcon(e){return e.iconPath instanceof En?e.iconPath:void 0}_createHandle(e,{id:n,label:o,resourceUri:i},s,a){if(n)return`${r.ID_HANDLE_PREFIX}/${n}`;let l=n3(o,this._extension),d=s?s.item.handle:r.LABEL_HANDLE_PREFIX,c="";l&&(qr(l.label)?c=l.label.value:c=l.label);let u=c||(i?tn(i):"");u=u.indexOf("/")!==-1?u.replace("/","//"):u;let f=this._nodes.has(e)?this._nodes.get(e).item.handle:void 0,g=this._getChildrenNodes(s)||[],I,h=0;do{if(I=`${d}/${h}:${u}`,a||!this._elements.has(I)||f===I)break;h++}while(h<=g.length);return I}_getLightIconPath(e){if(e.iconPath&&!(e.iconPath instanceof En))return typeof e.iconPath=="string"||E.isUri(e.iconPath)?this._getIconPath(e.iconPath):this._getIconPath(e.iconPath.light)}_getDarkIconPath(e){if(e.iconPath&&!(e.iconPath instanceof En)&&e.iconPath.dark)return this._getIconPath(e.iconPath.dark)}_getIconPath(e){return E.isUri(e)?e:E.file(e)}_addNodeToCache(e,n){this._elements.set(n.item.handle,e),this._nodes.set(e,n)}_updateNodeCache(e,n,o,i){this._elements.delete(n.item.handle),this._nodes.delete(e),n.item.handle!==o.item.handle&&this._elements.delete(o.item.handle),this._addNodeToCache(e,n);let s=this._getChildrenNodes(i)||[],a=s.filter(l=>l.item.handle===o.item.handle)[0];a&&s.splice(s.indexOf(a),1,n)}_addNodeToParentCache(e,n){n?(n.children||(n.children=[]),n.children.push(e)):(this._roots||(this._roots=[]),this._roots.push(e))}_addChildrenToClear(e){if(e){let n=this._nodes.get(e);if(n){if(n.children)for(let o of n.children){this._nodesToClear.add(o);let i=this._elements.get(o.item.handle);i&&(this._addChildrenToClear(i),this._nodes.delete(i),this._elements.delete(o.item.handle))}n.children=void 0}}else this._addAllToClear()}_addAllToClear(){this._roots=void 0,this._nodes.forEach(e=>{this._nodesToClear.add(e)}),this._nodes.clear(),this._elements.clear(),this._childrenFetchTokens.clear()}_clearNodes(e){Hn(e)}_clearAll(){this._roots=void 0,this._elements.clear(),Hn(this._nodes.values()),this._nodes.clear(),Hn(this._nodesToClear),this._nodesToClear.clear(),this._childrenFetchTokens.clear()}dispose(){super.dispose(),this._refreshCancellationSource.dispose(),this._clearAll()}};var AT=class r{constructor(t){this._openers=new Map;this._proxy=t.getProxy(V.MainThreadUriOpeners)}static{this.supportedSchemes=new Set([X.http,X.https])}registerExternalUriOpener(t,e,n,o){if(this._openers.has(e))throw new Error(`Opener with id '${e}' already registered`);let i=o.schemes.find(s=>!r.supportedSchemes.has(s));if(i)throw new Error(`Scheme '${i}' is not supported. Only http and https are currently supported.`);return this._openers.set(e,n),this._proxy.$registerUriOpener(e,o.schemes,t,o.label),ae(()=>{this._openers.delete(e),this._proxy.$unregisterUriOpener(e)})}async $canOpenUri(t,e,n){let o=this._openers.get(t);if(!o)throw new Error(`Unknown opener with id: ${t}`);let i=E.revive(e);return o.canOpenExternalUri(i,n)}async $openUri(t,e,n){let o=this._openers.get(t);if(!o)throw new Error(`Unknown opener id: '${t}'`);return o.openExternalUri(E.revive(e.resolvedUri),{sourceUri:E.revive(e.sourceUri)},n)}};var zN=class extends K{constructor(e,n,o,i){super();this.#a=void 0;this.#d=!0;this.#r=!1;this.#u=this._register(new D);this.onDidDispose=this.#u.event;this.#p=this._register(new D);this.onDidChangeViewState=this.#p.event;this.#e=e,this.#t=n,this.#o=o,this.#n=i.viewType,this.#s=i.panelOptions,this.#a=i.viewColumn,this.#i=i.title,this.#c=i.active}#e;#t;#n;#o;#s;#i;#l;#a;#d;#c;#r;#u;#p;dispose(){this.#r||(this.#r=!0,this.#u.fire(),this.#t.$disposeWebview(this.#e),this.#o.dispose(),super.dispose())}get webview(){return this.assertNotDisposed(),this.#o}get viewType(){return this.assertNotDisposed(),this.#n}get title(){return this.assertNotDisposed(),this.#i}set title(e){this.assertNotDisposed(),this.#i!==e&&(this.#i=e,this.#t.$setTitle(this.#e,e))}get iconPath(){return this.assertNotDisposed(),this.#l}set iconPath(e){this.assertNotDisposed(),this.#l!==e&&(this.#l=e,E.isUri(e)?this.#t.$setIconPath(this.#e,{light:e,dark:e}):this.#t.$setIconPath(this.#e,e))}get options(){return this.#s}get viewColumn(){if(this.assertNotDisposed(),!(typeof this.#a=="number"&&this.#a<0))return this.#a}get active(){return this.assertNotDisposed(),this.#c}get visible(){return this.assertNotDisposed(),this.#d}_updateViewState(e){this.#r||(this.active!==e.active||this.visible!==e.visible||this.viewColumn!==e.viewColumn)&&(this.#c=e.active,this.#d=e.visible,this.#a=e.viewColumn,this.#p.fire({webviewPanel:this}))}reveal(e,n){this.assertNotDisposed(),this.#t.$reveal(this.#e,{viewColumn:typeof e>"u"?void 0:Vt.from(e),preserveFocus:!!n})}assertNotDisposed(){if(this.#r)throw new Error("Webview is disposed")}},OT=class r extends K{constructor(e,n,o){super();this.webviews=n;this.workspace=o;this._webviewPanels=new Map;this._serializers=new Map;this._proxy=e.getProxy(V.MainThreadWebviewPanels)}static newHandle(){return ct()}dispose(){super.dispose(),this._webviewPanels.forEach(e=>e.dispose()),this._webviewPanels.clear()}createWebviewPanel(e,n,o,i,s={}){let a=typeof i=="object"?i.viewColumn:i,l={viewColumn:Vt.from(a),preserveFocus:typeof i=="object"&&!!i.preserveFocus},d=la(e),c=r.newHandle();this._proxy.$createWebviewPanel(Tc(e),c,n,{title:o,panelOptions:sJ(s),webviewOptions:qM(e,this.workspace,s),serializeBuffersForPostMessage:d},l);let u=this.webviews.createNewWebview(c,s,e);return this.createNewWebviewPanel(c,n,o,a,s,u,!0)}$onDidChangeWebviewPanelViewStates(e){let n=Object.keys(e);n.sort((o,i)=>{let s=e[o],a=e[i];return s.active?1:a.active?-1:+s.visible-+a.visible});for(let o of n){let i=this.getWebviewPanel(o);if(!i)continue;let s=e[o];i._updateViewState({active:s.active,visible:s.visible,viewColumn:Vt.to(s.position)})}}async $onDidDisposeWebviewPanel(e){this.getWebviewPanel(e)?.dispose(),this._webviewPanels.delete(e),this.webviews.deleteWebview(e)}registerWebviewPanelSerializer(e,n,o){if(this._serializers.has(n))throw new Error(`Serializer for '${n}' already registered`);return this._serializers.set(n,{serializer:o,extension:e}),this._proxy.$registerSerializer(n,{serializeBuffersForPostMessage:la(e)}),new Ce(()=>{this._serializers.delete(n),this._proxy.$unregisterSerializer(n)})}async $deserializeWebviewPanel(e,n,o,i){let s=this._serializers.get(n);if(!s)throw new Error(`No serializer found for '${n}'`);let{serializer:a,extension:l}=s,d=this.webviews.createNewWebview(e,o.webviewOptions,l),c=this.createNewWebviewPanel(e,n,o.title,i,o.panelOptions,d,o.active);await a.deserializeWebviewPanel(c,o.state)}createNewWebviewPanel(e,n,o,i,s,a,l){let d=new zN(e,this._proxy,a,{viewType:n,title:o,viewColumn:i,panelOptions:s,active:l});return this._webviewPanels.set(e,d),d}getWebviewPanel(e){return this._webviewPanels.get(e)}};function sJ(r){return{enableFindWidget:r.enableFindWidget,retainContextWhenHidden:r.retainContextWhenHidden}}var qN=class extends K{constructor(e,n,o,i,s,a){super();this.#s=!1;this.#c=this._register(new D);this.onDidChangeVisibility=this.#c.event;this.#r=this._register(new D);this.onDidDispose=this.#r.event;this.#n=o,this.#l=i,this.#e=e,this.#t=n,this.#o=s,this.#i=a}#e;#t;#n;#o;#s;#i;#l;#a;#d;dispose(){this.#s||(this.#s=!0,this.#r.fire(),this.#o.dispose(),super.dispose())}#c;#r;get title(){return this.assertNotDisposed(),this.#l}set title(e){this.assertNotDisposed(),this.#l!==e&&(this.#l=e,this.#t.$setWebviewViewTitle(this.#e,e))}get description(){return this.assertNotDisposed(),this.#a}set description(e){this.assertNotDisposed(),this.#a!==e&&(this.#a=e,this.#t.$setWebviewViewDescription(this.#e,e))}get visible(){return this.#i}get webview(){return this.#o}get viewType(){return this.#n}_setVisible(e){e===this.#i||this.#s||(this.#i=e,this.#c.fire())}get badge(){return this.assertNotDisposed(),this.#d}set badge(e){this.assertNotDisposed(),!(e?.value===this.#d?.value&&e?.tooltip===this.#d?.tooltip)&&(this.#d=oh.from(e),this.#t.$setWebviewViewBadge(this.#e,e))}show(e){this.assertNotDisposed(),this.#t.$show(this.#e,!!e)}assertNotDisposed(){if(this.#s)throw new Error("Webview is disposed")}},LT=class{constructor(t,e){this._extHostWebview=e;this._viewProviders=new Map;this._webviewViews=new Map;this._proxy=t.getProxy(V.MainThreadWebviewViews)}registerWebviewViewProvider(t,e,n,o){if(this._viewProviders.has(e))throw new Error(`View provider for '${e}' already registered`);return this._viewProviders.set(e,{provider:n,extension:t}),this._proxy.$registerWebviewViewProvider(Tc(t),e,{retainContextWhenHidden:o?.retainContextWhenHidden,serializeBuffersForPostMessage:la(t)}),new Ce(()=>{this._viewProviders.delete(e),this._proxy.$unregisterWebviewViewProvider(e)})}async $resolveWebviewView(t,e,n,o,i){let s=this._viewProviders.get(e);if(!s)throw new Error(`No view provider found for '${e}'`);let{provider:a,extension:l}=s,d=this._extHostWebview.createNewWebview(t,{},l),c=new qN(t,this._proxy,e,n,d,!0);this._webviewViews.set(t,c),await a.resolveWebviewView(c,{state:o},i)}async $onDidChangeWebviewViewVisibility(t,e){this.getWebviewView(t)._setVisible(e)}async $disposeWebviewView(t){let e=this.getWebviewView(t);this._webviewViews.delete(t),e.dispose(),this._extHostWebview.deleteWebview(t)}getWebviewView(t){let e=this._webviewViews.get(t);if(!e)throw new Error("No webview found");return e}};var MT=class{constructor(t){this._proxy=t.getProxy(V.MainThreadWindsurfAuthService)}async setDeviceFingerprint(t){await this._proxy.$setDeviceFingerprint(t)}async setSessionId(t){await this._proxy.$setSessionId(t)}async setWindsurfAuthStatus(t){await this._proxy.$setWindsurfAuthStatus(t)}async setProfileUrl(t){await this._proxy.$setProfileUrl(t)}async setEligibleDevinAccountsState(t){await this._proxy.$setEligibleDevinAccountsState(t)}};var o3="1.48.2";var NT=class{constructor(t){this._proxy=t.getProxy(V.MainThreadWindsurfProductInfo)}setLanguageServerPort(t){this._proxy.$setLanguageServerPort(t)}setCsrfToken(t){this._proxy.$setCsrfToken(t)}setWorktreeLanguageServerInfo(t){this._proxy.$setWorktreeLanguageServerInfo(t)}getExtensionMetadata(){return Ll}getWindsurfIdeVersion(t){return this._proxy.$getWindsurfIdeVersion(t)}get languageServerVersion(){return o3}onboardedInCurrentAppSession(){return this._proxy.$onboardedInCurrentAppSession()}};var KN=(e=>(e.ACCEPT="accept",e.REJECT="reject",e))(KN||{});var UT=class{constructor(t){this._documentUndoRedoElements=new Map;this._proxy=t.getProxy(V.MainThreadWindsurfUndoRedo)}pushToEditStack(t,e,n,o,i=!1){let s=ct();this._documentUndoRedoElements.set(s,{undo:n,redo:o}),t.length===1?this._proxy.$pushResourceUndoItem(s,e,t[0],i):this._proxy.$pushWorkspaceUndoItem(s,e,t,i)}$executeUndo(t){let e=this._documentUndoRedoElements.get(t);e&&e.undo()}$executeRedo(t){let e=this._documentUndoRedoElements.get(t);e&&e.redo()}$dispose(t){this._documentUndoRedoElements.delete(t)}async getAllElements(){return(await this._proxy.$getAllElements()).map(e=>({uri:E.revive(e.resource),label:e.label,code:e.code,isPast:e.isPast,changes:e.changes,metadata:e.metadata}))}};var FT=class{constructor(t){this._proxy=t.getProxy(V.MainThreadWindsurfCascade)}registerCascadeMemoryProvider(t){this._cascadeMemoryProvider=t}async closePanel(){await this._proxy.$closePanel()}async openPanel(){await this._proxy.$openPanel()}async togglePanel(){await this._proxy.$togglePanel()}async getFocusState(){return this._proxy.$getFocusState()}async showCascadeStarterPromptQuickPick(){await this._proxy.$showCascadeStarterPromptQuickPick()}async getCascadeStarterPrompts(){return this._proxy.$getCascadeStarterPrompts()}async $getMemories(){return this._cascadeMemoryProvider?this._cascadeMemoryProvider.getMemories():[]}async $deleteMemory(t){this._cascadeMemoryProvider&&this._cascadeMemoryProvider.deleteMemory(t)}};var JN=(o=>(o[o.NotStarted=0]="NotStarted",o[o.InProgress=1]="InProgress",o[o.Completed=2]="Completed",o[o.Skipped=3]="Skipped",o))(JN||{});var HT=class{constructor(t){this._proxy=t.getProxy(V.MainThreadWindsurfProductEducation)}async hideOnboardingItem(){await this._proxy.$hideOnboardingItem()}async showOnboardingItem(t){await this._proxy.$showOnboardingItem(t)}async updateOnboardingState(t){await this._proxy.$updateOnboardingState(t)}async updateOnboardingSteps(t){await this._proxy.$updateOnboardingSteps(t)}async resetProductEducation(){await this._proxy.$resetOnboardingState()}async getOnboardingState(){return this._proxy.$getOnboardingState()}async initialize(){await this._proxy.$initialize()}};var jN=(n=>(n[n.INFO=1]="INFO",n[n.WARNING=2]="WARNING",n[n.ERROR=3]="ERROR",n))(jN||{});var BT=class extends K{constructor(e){super();this._onDidDragToCascade=this._register(new D);this.onDidDragToCascade=this._onDidDragToCascade.event;this._proxy=e.getProxy(V.MainThreadWindsurfFiles)}async forceResolveFromFile(e){await this._proxy.$forceResolveFromFile(e)}$handleCascadeDragAndDrop(e){let n=e.map(o=>({...o,uri:E.revive(o.uri),range:o.range?j.to(o.range):void 0}));this._onDidDragToCascade.fire(n)}};var VT=class{constructor(t){this._proxy=t.getProxy(V.MainThreadWindsurfDevContainers)}registerWindsurfDevContainerContext(t){this._proxy.$registerDevContainerContext(t)}};var QN=(e=>(e.Credits="credits",e.Quota="quota",e))(QN||{}),XN=(o=>(o.Keybindings="keybindings",o.Settings="settings",o.PlanInfo="planInfo",o.BugReport="bugReport",o))(XN||{}),YN=(_=>(_.WINDSURF_SETTINGS="Windsurf Settings",_.EDITOR="Editor",_.CASCADE="Cascade",_.GENERAL="General",_.ADVANCED="Advanced",_.SHORTCUTS="Shortcuts",_.USER_INTERFACE="User Interface",_.WINDSURF_TAB="Windsurf Tab",_.CASCADE_CONFIGURATION="Cascade Configuration",_.NOTIFICATIONS="Notifications",_.PLAN_INFORMATION="Plan Information",_.CUSTOMIZATIONS="Customizations",_.PLUGINS="Plugins / Model Context Protocols (MCPs)",_.BROWSER="Browser",_.LIFEGUARD="Lifeguard",_.ACP="Agents",_.DEVIN_TERMINAL="Devin for Terminal",_))(YN||{});function r3(r,t){let e=new rm(r);return e.tabToJump===0&&(e.tabToJump=t?.hasTabToJump?1:2),e.cascadeWebSearch===0&&(e.cascadeWebSearch=t?.cascadeWebSearchEnabled?1:2),e.cascadeAutoExecutionPolicy===0&&(e.cascadeAutoExecutionPolicy=1),t?.cascadeWebSearchEnabled?e.cascadeWebRequestsAutoExecutionPolicy===0&&(e.cascadeWebRequestsAutoExecutionPolicy=2):e.cascadeWebRequestsAutoExecutionPolicy=1,e.annotationsConfig===0&&(e.annotationsConfig=2),e.supercompleteAggression===0&&(e.supercompleteAggression=2),e}function aJ(r){let t="";for(let e=0;e<r.length;e++)t+=String.fromCharCode(r[e]);return btoa(t)}function lJ(r){let t=atob(r),e=new Uint8Array(t.length);for(let n=0;n<t.length;n++)e[n]=t.charCodeAt(n);return e}function ZN(r,t){return new t().fromBinary(lJ(r))}function i3(r){return aJ(r.toBinary())}var WT=class{constructor(t){this._proxy=t.getProxy(V.MainThreadWindsurfSettings)}async setWindsurfPlanInformation(t){await this._proxy.$setWindsurfPlanInformation(t)}resolveUnspecifiedSettings(t,e){let n=ZN(t,rm),o=e?ZN(e,Dh):void 0,i=r3(n,o);return{userSettingsProtoBinaryBase64:i3(i)}}};var $T=class{constructor(t){this._proxy=t.getProxy(V.MainThreadWindsurfMcp)}async updateMcpServers(t){await this._proxy.$updateMcpServers(t)}};var dJ="ACP connection",nf=class{constructor(t,e){this._logService=e;this._connectors=new Map;this._proxy=t.getProxy(V.MainThreadWindsurfAcp)}registerConnection(t){return this._logService.trace("ExtHostWindsurfAcp#registerConnection",t.id),this._connectors.set(t.id,t),this._proxy.$registerConnection({id:t.id,transport:t.transport,capabilities:t.capabilities}),ae(()=>{this._logService.trace("ExtHostWindsurfAcp#unregisterConnection",t.id),this._connectors.delete(t.id),this._proxy.$unregisterConnection(t.id)})}updateConnectionStatus(t,e){this._proxy.$updateConnectionStatus(t,e)}registerAvailableConnector(t){return this._proxy.$registerAvailableConnector(t),ae(()=>{this._proxy.$unregisterAvailableConnector(t.id)})}handleClientRequest(t,e){return this._logService.trace("ExtHostWindsurfAcp#handleClientRequest",t,e.method),this._proxy.$handleClientRequest(t,e)}async $request(t,e){this._logService.trace("ExtHostWindsurfAcp#$request",t,e.method);let n=this._connectors.get(t);if(!n)throw this._logService.error(`ExtHostWindsurfAcp#$request connection '${t}' not found`),new Error(`${dJ} '${t}' not found. Available connections: ${Array.from(this._connectors.keys()).join(", ")}`);return n.sendRequest(e,De.None)}};nf=L([P(1,be)],nf);var GT=class{constructor(t){this._proxy=t.getProxy(V.MainThreadWindsurfAnnotations)}setAnnotation(t){this._proxy.$setAnnotation(t)}removeAnnotation(t){this._proxy.$removeAnnotation(t)}async getAnnotations(){return(await this._proxy.$getAnnotations()).map(e=>({...e,uri:E.revive(e.uri)}))}async showAnnotation(t){return this._proxy.$showAnnotation(t)}};var of=class extends K{constructor(e,n){super();this._commands=n;this._handlePool=0;this._providers=new Map;this._itemPool=0;this._globalItems=new Map;this._providerItems=new Map;this._proxy=e.getProxy(V.MainThreadChatContext)}async $provideWorkspaceChatContext(e,n){this._clearProviderItems(e);let o=this._providers.get(e);if(!o||o.type!=="workspace")throw new Error("Workspace context provider not found");let i=o.provider,s=await i.provideWorkspaceChatContext?.(n)??await i.provideChatContext?.(n)??[];return this._convertItems(e,s)}async $provideExplicitChatContext(e,n){this._clearProviderItems(e);let o=this._providers.get(e);if(!o||o.type!=="explicit")throw new Error("Explicit context provider not found");let i=o.provider,s=await i.provideExplicitChatContext?.(n)??await i.provideChatContext?.(n)??[];return this._convertItems(e,s)}async $resolveExplicitChatContext(e,n,o){let i=this._providers.get(e);if(!i||i.type!=="explicit")throw new Error("Explicit context provider not found");let s=i.provider,a=this._globalItems.get(n.handle);if(!a)throw new Error("Chat context item not found");return this._doResolve((s.resolveExplicitChatContext??s.resolveChatContext)?.bind(s),n,a,o)}async $provideResourceChatContext(e,n,o){let i=this._providers.get(e);if(!i||i.type!=="resource")throw new Error("Resource context provider not found");let s=i.provider,a=await s.provideResourceChatContext?.({resource:E.revive(n.resource)},o)??await s.provideChatContext?.({resource:E.revive(n.resource)},o);if(!a)return;if(a.label===void 0&&a.resourceUri===void 0)throw new Error("ChatContextItem must have either a label or a resourceUri");let d={handle:this._addTrackedItem(e,a),icon:a.icon,label:a.label,resourceUri:a.resourceUri,modelDescription:a.modelDescription,tooltip:a.tooltip?ye.from(a.tooltip):void 0,value:n.withValue?a.value:void 0,command:a.command?{id:a.command.command}:void 0};if(n.withValue&&!d.value){let c=await(s.resolveResourceChatContext??s.resolveChatContext)?.bind(s)(a,o);d.value=c?.value,d.tooltip=c?.tooltip?ye.from(c.tooltip):d.tooltip}return d}async $resolveResourceChatContext(e,n,o){let i=this._providers.get(e);if(!i||i.type!=="resource")throw new Error("Resource context provider not found");let s=i.provider,a=this._globalItems.get(n.handle);if(!a)throw new Error("Chat context item not found");return this._doResolve((s.resolveResourceChatContext??s.resolveChatContext)?.bind(s),n,a,o)}async $executeChatContextItemCommand(e){let n=this._globalItems.get(e);if(!n)throw new Error("Chat context item not found");if(!n.command)throw new Error("Chat context item has no command");let o=n.command.arguments?[n,...n.command.arguments]:[n];await this._commands.executeCommand(n.command.command,...o)}registerChatWorkspaceContextProvider(e,n){let o=this._handlePool++,i=new te;return this._providers.set(o,{type:"workspace",provider:n,disposables:i}),this._listenForWorkspaceContextChanges(o,n,i),this._proxy.$registerChatWorkspaceContextProvider(o,e),{dispose:()=>{this._providers.delete(o),this._clearProviderItems(o),this._providerItems.delete(o),this._proxy.$unregisterChatContextProvider(o),i.dispose()}}}registerChatExplicitContextProvider(e,n){let o=this._handlePool++,i=new te;return this._providers.set(o,{type:"explicit",provider:n,disposables:i}),this._proxy.$registerChatExplicitContextProvider(o,e),{dispose:()=>{this._providers.delete(o),this._clearProviderItems(o),this._providerItems.delete(o),this._proxy.$unregisterChatContextProvider(o),i.dispose()}}}registerChatResourceContextProvider(e,n,o){let i=this._handlePool++,s=new te;return this._providers.set(i,{type:"resource",provider:o,disposables:s}),this._proxy.$registerChatResourceContextProvider(i,n,di.from(e)),{dispose:()=>{this._providers.delete(i),this._clearProviderItems(i),this._providerItems.delete(i),this._proxy.$unregisterChatContextProvider(i),s.dispose()}}}registerChatContextProvider(e,n,o){let i=[];if(o.provideWorkspaceChatContext){let s={onDidChangeWorkspaceChatContext:o.onDidChangeWorkspaceChatContext,provideWorkspaceChatContext:a=>o.provideWorkspaceChatContext(a)};i.push(this.registerChatWorkspaceContextProvider(n,s))}if(o.provideChatContextExplicit){let s={provideExplicitChatContext:a=>o.provideChatContextExplicit(a),resolveExplicitChatContext:o.resolveChatContext?(a,l)=>o.resolveChatContext(a,l):a=>a};i.push(this.registerChatExplicitContextProvider(n,s))}if(o.provideChatContextForResource&&e){let s={provideResourceChatContext:(a,l)=>o.provideChatContextForResource(a,l),resolveResourceChatContext:o.resolveChatContext?(a,l)=>o.resolveChatContext(a,l):a=>a};i.push(this.registerChatResourceContextProvider(e,n,s))}return{dispose:()=>{for(let s of i)s.dispose()}}}_clearProviderItems(e){let n=this._providerItems.get(e);if(n){for(let o of n)this._globalItems.delete(o);n.clear()}}_addTrackedItem(e,n){let o=this._itemPool++;return this._globalItems.set(o,n),this._providerItems.has(e)||this._providerItems.set(e,new Set),this._providerItems.get(e).add(o),o}_convertItems(e,n){let o=[];for(let i of n){if(i.label===void 0&&i.resourceUri===void 0)throw new Error("ChatContextItem must have either a label or a resourceUri");let s=this._addTrackedItem(e,i);o.push({handle:s,icon:i.icon,label:i.label,resourceUri:i.resourceUri,modelDescription:i.modelDescription,tooltip:i.tooltip?ye.from(i.tooltip):void 0,value:i.value,command:i.command?{id:i.command.command}:void 0})}return o}async _doResolve(e,n,o,i){let s=await e(o,i);return s?{handle:n.handle,icon:s.icon,label:s.label,resourceUri:s.resourceUri,modelDescription:s.modelDescription,tooltip:s.tooltip?ye.from(s.tooltip):void 0,value:s.value,command:s.command?{id:s.command.command}:void 0}:n}_listenForWorkspaceContextChanges(e,n,o){if(!n.onDidChangeWorkspaceChatContext)return;let i=async()=>{let s=await n.provideWorkspaceChatContext?.(De.None)??await n.provideChatContext?.(De.None),a=this._convertItems(e,s??[]);return this._proxy.$updateWorkspaceContextItems(e,a)};o.add(n.onDidChangeWorkspaceChatContext(async()=>i())),i()}dispose(){super.dispose();for(let{disposables:e}of this._providers.values())e.dispose()}};of=L([P(0,Ee),P(1,Ko)],of);var rf=class extends K{constructor(e){super();this._nextHandle=0;this._activeProgress=new Map;this._proxy=e.getProxy(V.MainThreadChatDebug)}_progressKey(e,n){return`${e}:${E.revive(n).toString()}`}_cleanupProgress(e){let n=this._activeProgress.get(e);n&&(n.dispose(),this._activeProgress.delete(e))}registerChatDebugLogProvider(e){if(this._provider)throw new Error("A ChatDebugLogProvider is already registered.");this._provider=e;let n=this._nextHandle++;return this._proxy.$registerChatDebugLogProvider(n),ae(()=>{this._provider=void 0;for(let[o,i]of this._activeProgress)o.startsWith(`${n}:`)&&(i.dispose(),this._activeProgress.delete(o));this._proxy.$unregisterChatDebugLogProvider(n)})}async $provideChatDebugLog(e,n,o){if(!this._provider)return;let i=this._progressKey(e,n);this._cleanupProgress(i);let s=new te;this._activeProgress.set(i,s);let a=s.add(new D);s.add(a.event(l=>{let d=this._serializeEvent(l);d.sessionResource||(d.sessionResource=n),this._proxy.$acceptChatDebugEvent(e,d)})),s.add(o.onCancellationRequested(()=>{this._cleanupProgress(i)}));try{let l={report:u=>a.fire(u)},d=E.revive(n),c=await this._provider.provideChatDebugLog(d,l,o);return c?c.map(u=>this._serializeEvent(u)):void 0}catch(l){throw this._cleanupProgress(i),l}}_serializeEvent(e){let n={id:e.id,sessionResource:e.sessionResource,created:e.created.getTime(),parentEventId:e.parentEventId};switch(e._kind){case"toolCall":{let i=e;return{...n,kind:"toolCall",toolName:i.toolName,toolCallId:i.toolCallId,input:i.input,output:i.output,result:i.result===0?"success":i.result===1?"error":void 0,durationInMillis:i.durationInMillis}}case"modelTurn":{let i=e;return{...n,kind:"modelTurn",model:i.model,requestName:i.requestName,inputTokens:i.inputTokens,outputTokens:i.outputTokens,totalTokens:i.totalTokens,durationInMillis:i.durationInMillis}}case"generic":{let i=e;return{...n,kind:"generic",name:i.name,details:i.details,level:i.level,category:i.category}}case"subagentInvocation":{let i=e;return{...n,kind:"subagentInvocation",agentName:i.agentName,description:i.description,status:i.status===0?"running":i.status===1?"completed":i.status===2?"failed":void 0,durationInMillis:i.durationInMillis,toolCallCount:i.toolCallCount,modelTurnCount:i.modelTurnCount}}case"userMessage":{let i=e;return{...n,kind:"userMessage",message:i.message,sections:i.sections.map(s=>({name:s.name,content:s.content}))}}case"agentResponse":{let i=e;return{...n,kind:"agentResponse",message:i.message,sections:i.sections.map(s=>({name:s.name,content:s.content}))}}default:{let i=e,s=i.name,a=i.details;return{...n,kind:"generic",name:typeof s=="string"?s:"",details:typeof a=="string"?a:void 0,level:i.level??1,category:i.category}}}}async $resolveChatDebugLogEvent(e,n,o){if(!this._provider?.resolveChatDebugLogEvent)return;let i=await this._provider.resolveChatDebugLogEvent(n,o);if(!i)return;switch(i._kind){case"text":return{kind:"text",value:i.value};case"messageContent":{let a=i;return{kind:"message",type:a.type===0?"user":"agent",message:a.message,sections:a.sections.map(l=>({name:l.name,content:l.content}))}}case"userMessage":{let a=i;return{kind:"message",type:"user",message:a.message,sections:a.sections.map(l=>({name:l.name,content:l.content}))}}case"agentResponse":{let a=i;return{kind:"message",type:"agent",message:a.message,sections:a.sections.map(l=>({name:l.name,content:l.content}))}}case"toolCallContent":{let a=i;return{kind:"toolCall",toolName:a.toolName,result:a.result===0?"success":a.result===1?"error":void 0,durationInMillis:a.durationInMillis,input:a.input,output:a.output}}case"modelTurnContent":{let a=i;return{kind:"modelTurn",requestName:a.requestName,model:a.model,status:a.status,durationInMillis:a.durationInMillis,timeToFirstTokenInMillis:a.timeToFirstTokenInMillis,maxInputTokens:a.maxInputTokens,maxOutputTokens:a.maxOutputTokens,inputTokens:a.inputTokens,outputTokens:a.outputTokens,cachedTokens:a.cachedTokens,totalTokens:a.totalTokens,errorMessage:a.errorMessage,sections:a.sections?.map(l=>({name:l.name,content:l.content}))}}default:return}}dispose(){for(let e of this._activeProgress.values())e.dispose();this._activeProgress.clear(),super.dispose()}};rf=L([P(0,Ee)],rf);function s3(r){let t=r.get(Et),e=r.get(Er),n=r.get(Dl),o=r.get(Do),i=r.get(_o),s=r.get(Rl),a=r.get(Po),l=r.get(Aa),d=r.get(Ee),c=r.get(Np),u=r.get(Fp),f=r.get(Zo),g=r.get(be),I=r.get(Bp),h=r.get(sa),C=r.get(gc),_=r.get(Mx),R=r.get(hc),O=r.get(um),U=r.get(aa),ie=r.get(gm),Y=r.get(vc),Z=r.get(jp),ee=r.get(Qp),oe=r.get(Vx),ke=r.get($x),B=r.get(zx);d.set(me.ExtHostFileSystemInfo,e),d.set(me.ExtHostLogLevelServiceShape,f),d.set(me.ExtHostWorkspace,i),d.set(me.ExtHostConfiguration,a),d.set(me.ExtHostExtensionService,o),d.set(me.ExtHostStorage,c),d.set(me.ExtHostTunnelService,I),d.set(me.ExtHostWindow,C),d.set(me.ExtHostPower,_),d.set(me.ExtHostUrls,R),d.set(me.ExtHostSecretState,O),d.set(me.ExtHostTelemetry,s),d.set(me.ExtHostEditorTabs,U),d.set(me.ExtHostManagedSockets,ie),d.set(me.ExtHostProgress,Y),d.set(me.ExtHostAuthentication,Z),d.set(me.ExtHostChatProvider,ee),d.set(me.ExtHostDataChannels,oe),d.set(me.ExtHostMeteredConnection,ke),d.set(me.ExtHostGitExtension,B);let Xe=d.set(me.ExtHostDecorations,r.get(vx)),it=d.set(me.ExtHostDocumentsAndEditors,r.get(fi)),Qe=d.set(me.ExtHostCommands,r.get(Ko)),q=d.set(me.ExtHostTerminalService,r.get(ui)),z=d.set(me.ExtHostTerminalShellIntegration,r.get(Hx)),de=d.set(me.ExtHostDebugService,r.get(kx)),pe=d.set(me.ExtHostSearch,r.get(Lx)),ge=d.set(me.ExtHostTask,r.get(Tx)),Le=d.set(me.ExtHostOutputService,r.get(hx)),Je=d.set(me.ExtHostLocalization,r.get(mm)),Ge=d.set(me.ExtHostDocuments,new fC(d,it)),ft=d.set(me.ExtHostDocumentContentProviders,new pC(d,it,g)),kt=d.set(me.ExtHostDocumentSaveParticipant,new mC(g,Ge,d.getProxy(V.MainThreadBulkEdits))),ot=d.set(me.ExtHostNotebook,new bT(d,Qe,it,Ge,n,pe,g)),rn=d.set(me.ExtHostNotebookDocuments,new yT(ot)),vn=d.set(me.ExtHostNotebookEditors,new Ym(g,ot)),so=d.set(me.ExtHostNotebookKernels,new Zm(d,t,ot,Qe,g)),ua=d.set(me.ExtHostNotebookRenderers,new ST(d,ot)),pa=d.set(me.ExtHostNotebookDocumentSaveParticipant,new IT(g,ot,d.getProxy(V.MainThreadBulkEdits))),xe=d.set(me.ExtHostEditors,new DT(d,it)),Mr=d.set(me.ExtHostTreeViews,new kT(d.getProxy(V.MainThreadTreeViews),Qe,g)),_t=d.set(me.ExtHostEditorInsets,new oC(d.getProxy(V.MainThreadEditorInsets),xe,t.remote)),ar=d.set(me.ExtHostDiagnostics,new Or(d,g,e,it)),se=d.set(me.ExtHostLanguages,new iT(d,Ge,Qe.converter,l)),je=d.set(me.ExtHostLanguageFeatures,new HC(d,l,Ge,Qe,ar,g,h,s)),zl=d.set(me.ExtHostCodeMapper,new rC(d)),ql=d.set(me.ExtHostFileSystem,new bC(d,je)),lr=d.set(me.ExtHostFileSystemEventService,new IC(d,g,it)),ls=d.set(me.ExtHostQuickOpen,Q5(d,i,Qe)),Kl=d.set(me.ExtHostSCM,new ef(d,Qe,Ge,g)),Lc=d.set(me.ExtHostQuickDiff,new CT(d,l)),Jl=d.set(me.ExtHostShare,new TT(d,l)),Ro=d.set(me.ExtHostComments,v5(d,Qe,Ge)),ma=d.set(me.ExtHostLabelService,new EC(d)),Yt=d.set(me.ExtHostTheming,new tf(d)),Gn=d.set(me.ExtHostTimeline,new wT(d,Qe)),jl=d.set(me.ExtHostWebviews,new aC(d,t.remote,i,g,h)),Mc=d.set(me.ExtHostWebviewPanels,new OT(d,jl,i)),Ql=d.set(me.ExtHostCustomEditors,new dC(d,Ge,u,jl,Mc)),Nc=d.set(me.ExtHostWebviewViews,new LT(d,jl)),F=d.set(me.ExtHostTesting,r.get(Cc)),J=d.set(me.ExtHostUriOpeners,new AT(d)),Q=d.set(me.ExtHostProfileContentHandlers,new xT(d)),Ae=d.set(me.ExtHostChatOutputRenderer,new Zx(d,jl));d.set(me.ExtHostInteractive,new yC(d,ot,it,Qe,g));let Fe=d.set(me.ExtHostLanguageModelTools,new rT(d,ee)),gn=d.set(me.ExtHostChatSessions,new Vl(Qe,ee,d,g)),Ye=d.set(me.ExtHostChatAgents2,new Xx(d,g,Qe,Ge,it,ee,ar,Fe)),Dn=d.set(me.ExtHostChatContext,new of(d,Qe)),pn=d.set(me.ExtHostChatDebug,new rf(d)),wn=d.set(me.ExtHostAiRelatedInformation,new Kx(d)),Jo=d.set(me.ExtHostAiEmbeddingVector,new hC(d)),mn=d.set(me.ExtHostAiSettingsSearch,new Jx(d)),xn=d.set(me.ExtHostStatusBar,new PT(d,Qe.converter)),ao=d.set(me.ExtHostSpeech,new _T(d)),ue=d.set(me.ExtHostEmbeddings,new gC(d)),ze=d.set(me.ExtHostWindsurfAuthService,new MT(d)),Ze=d.set(me.ExtHostWindsurfProductInfo,new NT(d)),At=d.set(me.ExtHostWindsurfUndoRedo,new UT(d)),Mt=d.set(me.ExtHostWindsurfCascade,new FT(d)),sn=d.set(me.ExtHostWindsurfProductEducation,new HT(d)),df=d.set(me.ExtHostWindsurfSettings,new WT(d)),fa=d.set(me.ExtHostWindsurfFiles,new BT(d)),Xl=d.set(me.ExtHostWindsurfDevContainers,new VT(d)),m3=d.set(me.ExtHostWindsurfMcp,new $T(d)),fv=d.set(me.ExtHostWindsurfAcp,new nf(d,g)),W=d.set(me.ExtHostWindsurfAudio,new iC(d)),gv=d.set(me.ExtHostWindsurfAnnotations,new GT(d)),f3=Object.values(me);d.assertRegistered(f3);let g3=new Om(d,it),h3=new nC(d),qT=new jm(d,g),o0=new uC(d),v3=new tC(d);return Qx.register(Qe),function(k,ga,KT){function he(y){return(x,A,Te)=>{let ut=y(fn=>{try{x.call(A,fn)}catch(Y3){ff(new nu(k.identifier,Y3,"FAILED to handle event"))}});return Te?.push(ut),ut}}let Ot=(function(){let y=!k.isUnderDevelopment;function x(){y||(g.info(`Extension '${k.identifier.value}' uses a document selector without scheme. Learn more about this: https://go.microsoft.com/fwlink/?linkid=872305`),y=!0)}return function A(Te){if(Array.isArray(Te))Te.forEach(A);else if(typeof Te=="string")x();else{let ut=Te;typeof ut.scheme>"u"&&x(),typeof ut.exclusive=="boolean"&&H(k,"documentFiltersExclusive")}return Te}})(),b3={getSession(y,x,A){return(typeof A?.forceNewSession=="object"&&A.forceNewSession.learnMore||typeof A?.createIfNone=="object"&&A.createIfNone.learnMore)&&H(k,"authLearnMore"),A?.authorizationServer&&H(k,"authIssuers"),Z.getSession(k,y,x,A)},getAccounts(y){return Z.getAccounts(y)},async hasSession(y,x){return H(k,"authSession"),!!await Z.getSession(k,y,x,{silent:!0})},get onDidChangeSessions(){return he(Z.getExtensionScopedSessionsEvent(k.identifier.value))},registerAuthenticationProvider(y,x,A,Te){return Te?.supportedAuthorizationServers&&H(k,"authIssuers"),Z.registerAuthenticationProvider(y,x,A,Te)}},I3={registerCommand(y,x,A){return Qe.registerCommand(!0,y,x,A,void 0,k)},registerTextEditorCommand(y,x,A){return Qe.registerCommand(!0,y,(...Te)=>{let ut=xe.getActiveTextEditor();if(!ut){g.warn("Cannot execute "+y+" because there is no active text editor.");return}return ut.edit(fn=>{x.apply(A,[ut,fn,...Te])}).then(fn=>{fn||g.warn("Edits from command "+y+" were not applied.")},fn=>{g.warn("An error occurred while running command "+y,fn)})},void 0,void 0,k)},registerDiffInformationCommand:(y,x,A)=>(H(k,"diffCommand"),Qe.registerCommand(!0,y,async(...Te)=>{let ut=it.activeEditor(!0);if(!ut){g.warn("Cannot execute "+y+" because there is no active text editor.");return}let fn=await xe.getDiffInformation(ut.id);x.apply(A,[fn,...Te])},void 0,void 0,k)),executeCommand(y,...x){return Qe.executeCommand(y,...x)},getCommands(y=!1){return Qe.getCommands(y)}},r0={get machineId(){return t.telemetryInfo.machineId},get devDeviceId(){return H(k,"devDeviceId"),t.telemetryInfo.devDeviceId??t.telemetryInfo.machineId},get isAppPortable(){return t.environment.isPortable??!1},get sessionId(){return t.telemetryInfo.sessionId},get language(){return t.environment.appLanguage},get appName(){return t.environment.appName},get appRoot(){return t.environment.appRoot?.fsPath??""},get appHost(){return t.environment.appHost},get uriScheme(){return t.environment.appUriScheme},get clipboard(){return h3.value},get shell(){return q.getDefaultShell(!1)},get onDidChangeShell(){return he(q.onDidChangeShell)},get isTelemetryEnabled(){return s.getTelemetryConfiguration()},get onDidChangeTelemetryEnabled(){return he(s.onDidChangeTelemetryEnabled)},get telemetryConfiguration(){return H(k,"telemetry"),s.getTelemetryDetails()},get onDidChangeTelemetryConfiguration(){return H(k,"telemetry"),he(s.onDidChangeTelemetryConfiguration)},get isMeteredConnection(){return H(k,"envIsConnectionMetered"),ke.isConnectionMetered},get onDidChangeMeteredConnection(){return H(k,"envIsConnectionMetered"),he(ke.onDidChangeIsConnectionMetered)},get isNewAppInstall(){return Zk(t.telemetryInfo.firstSessionDate)},createTelemetryLogger(y,x){return hh.validateSender(y),s.instantiateLogger(k,y,x)},async openExternal(y,x){return C.openUri(y,{allowTunneling:t.remote.isRemote??(t.remote.authority?await I.hasTunnelProvider():!1),allowContributedOpeners:x?.allowContributedOpeners})},async asExternalUri(y){if(y.scheme===t.environment.appUriScheme)return R.createAppUri(y);try{return await C.asExternalUri(y,{allowTunneling:!!t.remote.authority})}catch(x){if(Qv(y,X.http)||Qv(y,X.https))return y;throw x}},get remoteName(){return Nf(t.remote.authority)},get remoteAuthority(){return H(k,"resolvers"),t.remote.authority},get uiKind(){return t.uiKind},get logLevel(){return g.getLevel()},get onDidChangeLogLevel(){return he(g.onDidChangeLogLevel)},get appQuality(){return H(k,"resolvers"),t.quality},get appCommit(){return H(k,"resolvers"),t.commit},getDataChannel(y){return H(k,"dataChannels"),oe.createDataChannel(k,y)},get power(){return H(k,"environmentPower"),{get onDidSuspend(){return he(_.onDidSuspend)},get onDidResume(){return he(_.onDidResume)},get onDidChangeOnBatteryPower(){return he(_.onDidChangeOnBatteryPower)},get onDidChangeThermalState(){return he(_.onDidChangeThermalState)},get onDidChangeSpeedLimit(){return he(_.onDidChangeSpeedLimit)},get onWillShutdown(){return he(_.onWillShutdown)},get onDidLockScreen(){return he(_.onDidLockScreen)},get onDidUnlockScreen(){return he(_.onDidUnlockScreen)},getSystemIdleState(y){return _.getSystemIdleState(y)},getSystemIdleTime(){return _.getSystemIdleTime()},getCurrentThermalState(){return _.getCurrentThermalState()},isOnBatteryPower(){return _.isOnBatteryPower()},async startPowerSaveBlocker(y){let x=await _.startPowerSaveBlocker(y);return{id:x.id,get isStarted(){return x.isStarted},dispose(){x.dispose()}}}}}};t.environment.extensionTestsLocationURI||Object.freeze(r0);let y3={createTestController(y,x,A){return F.createTestController(k,y,x,A)},createTestObserver(){return H(k,"testObserver"),F.createTestObserver()},runTests(y){return H(k,"testObserver"),F.runTests(y)},registerTestFollowupProvider(y){return H(k,"testObserver"),F.registerTestFollowupProvider(y)},get onDidChangeTestResults(){return H(k,"testObserver"),he(F.onResultsChanged)},get testResults(){return H(k,"testObserver"),F.results}},hv=t.remote.isRemote?2:1,E3={getExtension(y,x){$e(k,"extensionsAny")||(x=!1);let A=ga.mine.getExtensionDescription(y);if(A)return new Nl(o,k.identifier,A,hv,!1);if(x){let Te=ga.all.getExtensionDescription(y);if(Te)return new Nl(o,k.identifier,Te,hv,!0)}},get all(){let y=[];for(let x of ga.mine.getAllExtensionDescriptions())y.push(new Nl(o,k.identifier,x,hv,!1));return y},get allAcrossExtensionHosts(){H(k,"extensionsAny");let y=new vo(ga.mine.getAllExtensionDescriptions().map(A=>A.identifier)),x=[];for(let A of ga.all.getAllExtensionDescriptions()){let Te=!y.has(A.identifier);x.push(new Nl(o,k.identifier,A,hv,Te))}return x},get onDidChange(){return $e(k,"extensionsAny")?he(He.any(ga.mine.onDidChange,ga.all.onDidChange)):he(ga.mine.onDidChange)}},S3={createDiagnosticCollection(y){return ar.createDiagnosticCollection(k.identifier,y)},get onDidChangeDiagnostics(){return he(ar.onDidChangeDiagnostics)},getDiagnostics:y=>ar.getDiagnostics(y),getDiagnosticsWithFixes:y=>ar.getDiagnosticsWithFixes(y),applyCodeAction:async y=>ar.applyCodeAction(y),clearCodeActions:()=>ar.clearCodeActions(),getLanguages(){return se.getLanguages()},setTextDocumentLanguage(y,x){return se.changeLanguage(y.uri,x)},match(y,x){let A=uk.from(y),Te;return AM(A)&&(Te=ot.notebookDocuments.find(ut=>ut.apiNotebook.getCells().find(fn=>fn.document===x))?.apiNotebook),kM(A,x.uri,x.languageId,!0,Te?.uri,Te?.notebookType)},registerCodeActionsProvider(y,x,A){return je.registerCodeActionProvider(k,Ot(y),x,A)},registerDocumentPasteEditProvider(y,x,A){return je.registerDocumentPasteEditProvider(k,Ot(y),x,A)},registerCodeLensProvider(y,x){return je.registerCodeLensProvider(k,Ot(y),x)},registerDefinitionProvider(y,x){return je.registerDefinitionProvider(k,Ot(y),x)},registerDeclarationProvider(y,x){return je.registerDeclarationProvider(k,Ot(y),x)},registerImplementationProvider(y,x){return je.registerImplementationProvider(k,Ot(y),x)},registerTypeDefinitionProvider(y,x){return je.registerTypeDefinitionProvider(k,Ot(y),x)},registerHoverProvider(y,x){return je.registerHoverProvider(k,Ot(y),x,k.identifier)},registerEvaluatableExpressionProvider(y,x){return je.registerEvaluatableExpressionProvider(k,Ot(y),x,k.identifier)},registerInlineValuesProvider(y,x){return je.registerInlineValuesProvider(k,Ot(y),x,k.identifier)},registerDocumentHighlightProvider(y,x){return je.registerDocumentHighlightProvider(k,Ot(y),x)},registerMultiDocumentHighlightProvider(y,x){return je.registerMultiDocumentHighlightProvider(k,Ot(y),x)},registerLinkedEditingRangeProvider(y,x){return je.registerLinkedEditingRangeProvider(k,Ot(y),x)},registerReferenceProvider(y,x){return je.registerReferenceProvider(k,Ot(y),x)},registerRenameProvider(y,x){return je.registerRenameProvider(k,Ot(y),x)},registerNewSymbolNamesProvider(y,x){return H(k,"newSymbolNamesProvider"),je.registerNewSymbolNamesProvider(k,Ot(y),x)},registerDocumentSymbolProvider(y,x,A){return je.registerDocumentSymbolProvider(k,Ot(y),x,A)},registerWorkspaceSymbolProvider(y){return je.registerWorkspaceSymbolProvider(k,y)},registerDocumentFormattingEditProvider(y,x){return je.registerDocumentFormattingEditProvider(k,Ot(y),x)},registerDocumentRangeFormattingEditProvider(y,x){return je.registerDocumentRangeFormattingEditProvider(k,Ot(y),x)},registerOnTypeFormattingEditProvider(y,x,A,...Te){return je.registerOnTypeFormattingEditProvider(k,Ot(y),x,[A].concat(Te))},registerDocumentSemanticTokensProvider(y,x,A){return je.registerDocumentSemanticTokensProvider(k,Ot(y),x,A)},registerDocumentRangeSemanticTokensProvider(y,x,A){return je.registerDocumentRangeSemanticTokensProvider(k,Ot(y),x,A)},registerSignatureHelpProvider(y,x,A,...Te){return typeof A=="object"?je.registerSignatureHelpProvider(k,Ot(y),x,A):je.registerSignatureHelpProvider(k,Ot(y),x,typeof A>"u"?[]:[A,...Te])},registerCompletionItemProvider(y,x,...A){return je.registerCompletionItemProvider(k,Ot(y),x,A)},registerInlineCompletionItemProvider(y,x,A){return x.handleDidShowCompletionItem&&H(k,"inlineCompletionsAdditions"),x.handleDidPartiallyAcceptCompletionItem&&H(k,"inlineCompletionsAdditions"),A&&H(k,"inlineCompletionsAdditions"),je.registerInlineCompletionsProvider(k,Ot(y),x,A)},get inlineCompletionsUnificationState(){return H(k,"inlineCompletionsAdditions"),je.inlineCompletionsUnificationState},onDidChangeCompletionsUnificationState(y,x,A){return H(k,"inlineCompletionsAdditions"),he(je.onDidChangeInlineCompletionsUnificationState)(y,x,A)},registerDocumentLinkProvider(y,x){return je.registerDocumentLinkProvider(k,Ot(y),x)},registerColorProvider(y,x){return je.registerColorProvider(k,Ot(y),x)},registerFoldingRangeProvider(y,x){return je.registerFoldingRangeProvider(k,Ot(y),x)},registerSelectionRangeProvider(y,x){return je.registerSelectionRangeProvider(k,y,x)},registerCallHierarchyProvider(y,x){return je.registerCallHierarchyProvider(k,y,x)},registerTypeHierarchyProvider(y,x){return je.registerTypeHierarchyProvider(k,y,x)},setLanguageConfiguration:(y,x)=>je.setLanguageConfiguration(k,y,x),getTokenInformationAtPosition(y,x){return H(k,"tokenInformation"),se.tokenAtPosition(y,x)},registerInlayHintsProvider(y,x){return je.registerInlayHintsProvider(k,y,x)},createLanguageStatusItem(y,x){return se.createLanguageStatusItem(k,y,x)},registerDocumentDropEditProvider(y,x,A){return je.registerDocumentOnDropEditProvider(k,y,x,A)}},x3={get activeTextEditor(){return xe.getActiveTextEditor()},get visibleTextEditors(){return xe.getVisibleTextEditors()},get activeTerminal(){return q.activeTerminal},get terminals(){return q.terminals},async showTextDocument(y,x,A){E.isUri(y)&&y.scheme===X.vscodeRemote&&!y.authority&&h.report("workspace.showTextDocument",k,"A URI of 'vscode-remote' scheme requires an authority.");let Te=await(E.isUri(y)?Promise.resolve(i0.openTextDocument(y)):Promise.resolve(y));return xe.showTextDocument(Te,x,A)},createTextEditorDecorationType(y){return xe.createTextEditorDecorationType(k,y)},onDidChangeActiveTextEditor(y,x,A){return he(xe.onDidChangeActiveTextEditor)(y,x,A)},onDidChangeVisibleTextEditors(y,x,A){return he(xe.onDidChangeVisibleTextEditors)(y,x,A)},onDidChangeTextEditorSelection(y,x,A){return he(xe.onDidChangeTextEditorSelection)(y,x,A)},onDidChangeTextEditorOptions(y,x,A){return he(xe.onDidChangeTextEditorOptions)(y,x,A)},onDidChangeTextEditorVisibleRanges(y,x,A){return he(xe.onDidChangeTextEditorVisibleRanges)(y,x,A)},onDidChangeTextEditorViewColumn(y,x,A){return he(xe.onDidChangeTextEditorViewColumn)(y,x,A)},onDidChangeTextEditorDiffInformation(y,x,A){return H(k,"textEditorDiffInformation"),he(xe.onDidChangeTextEditorDiffInformation)(y,x,A)},onDidTextEditorMouseUp(y,x,A){return H(k,"windsurfEditorNudge"),he(xe.onDidTextEditorMouseUp)(y,x,A)},onDidCloseTerminal(y,x,A){return he(q.onDidCloseTerminal)(y,x,A)},onDidOpenTerminal(y,x,A){return he(q.onDidOpenTerminal)(y,x,A)},onDidChangeActiveTerminal(y,x,A){return he(q.onDidChangeActiveTerminal)(y,x,A)},onDidChangeTerminalDimensions(y,x,A){return H(k,"terminalDimensions"),he(q.onDidChangeTerminalDimensions)(y,x,A)},onDidChangeTerminalState(y,x,A){return he(q.onDidChangeTerminalState)(y,x,A)},onDidWriteTerminalData(y,x,A){return H(k,"terminalDataWriteEvent"),he(q.onDidWriteTerminalData)(y,x,A)},onDidExecuteTerminalCommand(y,x,A){return H(k,"terminalExecuteCommandEvent"),he(q.onDidExecuteTerminalCommand)(y,x,A)},onDidChangeTerminalShellIntegration(y,x,A){return he(z.onDidChangeTerminalShellIntegration)(y,x,A)},onDidStartTerminalShellExecution(y,x,A){return he(z.onDidStartTerminalShellExecution)(y,x,A)},onDidEndTerminalShellExecution(y,x,A){return he(z.onDidEndTerminalShellExecution)(y,x,A)},onDidRejectTerminalShellIntegrationInjection(y,x,A){return he(z.onDidRejectTerminalShellIntegrationInjection)(y,x,A)},get state(){return C.getState()},onDidChangeWindowState(y,x,A){return he(C.onDidChangeWindowState)(y,x,A)},showInformationMessage(y,...x){return qT.showMessage(k,tt.Info,y,x[0],x.slice(1))},showWarningMessage(y,...x){return qT.showMessage(k,tt.Warning,y,x[0],x.slice(1))},showErrorMessage(y,...x){return qT.showMessage(k,tt.Error,y,x[0],x.slice(1))},showQuickPick(y,x,A){return ls.showQuickPick(k,y,x,A)},showWorkspaceFolderPick(y){return ls.showWorkspaceFolderPick(y)},showInputBox(y,x){return ls.showInput(y,x)},showOpenDialog(y){return o0.showOpenDialog(y)},showSaveDialog(y){return o0.showSaveDialog(y)},createStatusBarItem(y,x,A){let Te,ut,fn;return typeof y=="string"?(Te=y,ut=x,fn=A):(ut=y,fn=x),xn.createStatusBarEntry(k,Te,ut,fn)},setStatusBarMessage(y,x){return xn.setStatusBarMessage(y,x)},withScmProgress(y){return h.report("window.withScmProgress",k,"Use 'withProgress' instead."),Y.withProgress(k,{location:1},(x,A)=>y({report(Te){}}))},withProgress(y,x){return Y.withProgress(k,y,x)},createOutputChannel(y,x){return Le.createOutputChannel(y,x,k)},createWebviewPanel(y,x,A,Te){return Mc.createWebviewPanel(k,y,x,A,Te)},createWebviewTextEditorInset(y,x,A,Te){return H(k,"editorInsets"),_t.createWebviewEditorInset(y,x,A,Te,k)},createTerminal(y,x,A){if(typeof y=="object"){let Te=y;return!$e(k,"terminalTitle")&&"titleTemplate"in y&&y.titleTemplate!==void 0&&(console.error(`[${k.identifier.value}] \`titleTemplate\` was provided to window.createTerminal but is ignored because the \`terminalTitle\` proposed API is not enabled.`),Te={...y,titleTemplate:void 0}),"pty"in Te?q.createExtensionTerminal(Te):q.createTerminalFromOptions(Te)}return q.createTerminal(y,x,A)},registerTerminalLinkProvider(y){return q.registerLinkProvider(y)},registerTerminalProfileProvider(y,x){return q.registerProfileProvider(k,y,x)},registerTerminalCompletionProvider(y,...x){return H(k,"terminalCompletionProvider"),q.registerTerminalCompletionProvider(k,y,...x)},registerTerminalQuickFixProvider(y,x){return H(k,"terminalQuickFixProvider"),q.registerTerminalQuickFixProvider(y,k.identifier.value,x)},registerTreeDataProvider(y,x){return Mr.registerTreeDataProvider(y,x,k)},createTreeView(y,x){return Mr.createTreeView(y,x,k)},registerWebviewPanelSerializer:(y,x)=>Mc.registerWebviewPanelSerializer(k,y,x),registerCustomEditorProvider:(y,x,A={})=>Ql.registerCustomEditorProvider(k,y,x,A),registerFileDecorationProvider(y){return Xe.registerFileDecorationProvider(y,k)},registerUriHandler(y){return R.registerUriHandler(k,y)},createQuickPick(){return ls.createQuickPick(k)},createInputBox(){return ls.createInputBox(k)},get activeColorTheme(){return Yt.activeColorTheme},onDidChangeActiveColorTheme(y,x,A){return he(Yt.onDidChangeActiveColorTheme)(y,x,A)},registerWebviewViewProvider(y,x,A){return Nc.registerWebviewViewProvider(k,y,x,A?.webviewOptions)},get activeNotebookEditor(){return ot.activeNotebookEditor},onDidChangeActiveNotebookEditor(y,x,A){return he(ot.onDidChangeActiveNotebookEditor)(y,x,A)},get visibleNotebookEditors(){return ot.visibleNotebookEditors},get onDidChangeVisibleNotebookEditors(){return he(ot.onDidChangeVisibleNotebookEditors)},onDidChangeNotebookEditorSelection(y,x,A){return he(vn.onDidChangeNotebookEditorSelection)(y,x,A)},onDidChangeNotebookEditorVisibleRanges(y,x,A){return he(vn.onDidChangeNotebookEditorVisibleRanges)(y,x,A)},showNotebookDocument(y,x){return ot.showNotebookDocument(y,x)},registerExternalUriOpener(y,x,A){return H(k,"externalUriOpener"),J.registerExternalUriOpener(k.identifier,y,x,A)},registerProfileContentHandler(y,x){return H(k,"profileContentHandlers"),Q.registerProfileContentHandler(k,y,x)},registerQuickDiffProvider(y,x,A,Te,ut){return H(k,"quickDiffProvider"),Lc.registerQuickDiffProvider(k,Ot(y),x,A,Te,ut)},get tabGroups(){return U.tabGroups},registerShareProvider(y,x){return H(k,"shareProvider"),Jl.registerShareProvider(Ot(y),x)},get nativeHandle(){return H(k,"nativeWindowHandle"),C.nativeHandle},createChatStatusItem:y=>(H(k,"chatStatusItem"),v3.createChatStatusItem(k,y)),setTextEditorNudge(y,x,A,Te){xe.setTextEditorNudge(y,x,A,Te)},clearTextEditorNudge(y){xe.clearTextEditorNudge(y)},get activeChatPanelSessionResource(){return H(k,"chatParticipantPrivate"),Ye.activeChatPanelSessionResource},onDidChangeActiveChatPanelSessionResource:(y,x,A)=>(H(k,"chatParticipantPrivate"),he(Ye.onDidChangeActiveChatPanelSessionResource)(y,x,A))},C3={setAuthStatus(y){return ze.setWindsurfAuthStatus(y)},setProfileUrl(y){return ze.setProfileUrl(y)},setDeviceFingerprint(y){return ze.setDeviceFingerprint(y)},setSessionId(y){return ze.setSessionId(y)},setEligibleDevinAccountsState(y){return ze.setEligibleDevinAccountsState(y)}},T3={startAudioRecording(){return W.startAudioRecording()},stopAudioRecording(){return W.stopAudioRecording()},getAverageVolume(){return W.getAverageVolume()}},_3={hideOnboardingItem(){return sn.hideOnboardingItem()},showOnboardingItem(y){return sn.showOnboardingItem(y)},updateOnboardingState(y){return sn.updateOnboardingState(y)},resetOnboardingState(){return sn.resetProductEducation()},updateOnboardingSteps(y){return sn.updateOnboardingSteps(y)},getOnboardingState(){return sn.getOnboardingState()},initialize(){return sn.initialize()}},P3={setWindsurfPlanInformation(y){return df.setWindsurfPlanInformation(y)},resolveUnspecifiedSettings(y,x){return df.resolveUnspecifiedSettings(y,x)}},D3={updateMcpServers(y){return m3.updateMcpServers(y)}},w3={registerConnection(y){return fv.registerConnection(y)},updateConnectionStatus(y,x){fv.updateConnectionStatus(y,x)},registerAvailableConnector(y){return fv.registerAvailableConnector(y)},handleClientRequest(y,x){return fv.handleClientRequest(y,x)}},i0={get rootPath(){return h.report("workspace.rootPath",k,"Please use 'workspace.workspaceFolders' instead. More details: https://aka.ms/vscode-eliminating-rootpath"),i.getPath()},set rootPath(y){throw new Nr("rootPath")},getWorkspaceFolder(y){return i.getWorkspaceFolder(y)},get workspaceFolders(){return i.getWorkspaceFolders()},get name(){return i.name},set name(y){throw new Nr("name")},get workspaceFile(){return i.workspaceFile},set workspaceFile(y){throw new Nr("workspaceFile")},get isAgentSessionsWorkspace(){return H(k,"agentSessionsWorkspace"),!!t.environment.isSessionsWindow},updateWorkspaceFolders:(y,x,...A)=>i.updateWorkspaceFolders(k,y,x||0,...A),onDidChangeWorkspaceFolders:function(y,x,A){return he(i.onDidChangeWorkspace)(y,x,A)},asRelativePath:(y,x)=>i.getRelativePath(y,x),findFiles:(y,x,A,Te)=>i.findFiles(y,x,A,k.identifier,Te),findFiles2:(y,x,A)=>(H(k,"findFiles2"),i.findFiles2(y,x,k.identifier,A)),findTextInFiles:(y,x,A,Te)=>{H(k,"findTextInFiles");let ut,fn;return typeof x=="object"?(ut=x,fn=A):(ut={},fn=x,Te=A),i.findTextInFiles(y,ut||{},fn,k.identifier,Te)},findTextInFiles2:(y,x,A)=>(H(k,"findTextInFiles2"),H(k,"textSearchProvider2"),i.findTextInFiles2(y,x,k.identifier,A)),save:y=>i.save(y),saveAs:y=>i.saveAs(y),saveAll:y=>i.saveAll(y),applyEdit(y,x){return g3.applyWorkspaceEdit(y,k,x)},createFileSystemWatcher:(y,x,A,Te)=>{let ut={ignoreCreateEvents:!!x,ignoreChangeEvents:!!A,ignoreDeleteEvents:!!Te};return lr.createFileSystemWatcher(i,KT,e,k,y,ut)},get textDocuments(){return Ge.getAllDocumentData().map(y=>y.document)},set textDocuments(y){throw new Nr("textDocuments")},openTextDocument(y,x){let A;if(x=x??y,typeof y=="string")A=Promise.resolve(E.file(y));else if(E.isUri(y))A=Promise.resolve(y);else if(!x||typeof x=="object")A=Ge.createDocumentData(x);else throw new Error("illegal argument - uriOrFileNameOrOptions");return A.then(Te=>(g.trace(`openTextDocument from ${k.identifier}`),Te.scheme===X.vscodeRemote&&!Te.authority&&h.report("workspace.openTextDocument",k,"A URI of 'vscode-remote' scheme requires an authority."),Ge.ensureDocumentData(Te,x).then(ut=>ut.document)))},onDidOpenTextDocument:(y,x,A)=>he(Ge.onDidAddDocument)(y,x,A),onDidCloseTextDocument:(y,x,A)=>he(Ge.onDidRemoveDocument)(y,x,A),onDidChangeTextDocument:(y,x,A)=>$e(k,"textDocumentChangeReason")?he(Ge.onDidChangeDocumentWithReason)(y,x,A):he(Ge.onDidChangeDocument)(y,x,A),onDidFinishSearch:(y,x,A)=>he(pe.onDidFinishSearch)(y,x,A),onDidSaveTextDocument:(y,x,A)=>he(Ge.onDidSaveDocument)(y,x,A),onWillSaveTextDocument:(y,x,A)=>he(kt.getOnWillSaveTextDocumentEvent(k))(y,x,A),get notebookDocuments(){return ot.notebookDocuments.map(y=>y.apiNotebook)},async openNotebookDocument(y,x){let A;if(E.isUri(y))A=y,await ot.openNotebookDocument(y);else if(typeof y=="string")A=E.revive(await ot.createNotebookDocument({viewType:y,content:x}));else throw new Error("Invalid arguments");return ot.getNotebookDocument(A).apiNotebook},onDidSaveNotebookDocument(y,x,A){return he(rn.onDidSaveNotebookDocument)(y,x,A)},onDidChangeNotebookDocument(y,x,A){return he(rn.onDidChangeNotebookDocument)(y,x,A)},onWillSaveNotebookDocument(y,x,A){return he(pa.getOnWillSaveNotebookDocumentEvent(k))(y,x,A)},get onDidOpenNotebookDocument(){return he(ot.onDidOpenNotebookDocument)},get onDidCloseNotebookDocument(){return he(ot.onDidCloseNotebookDocument)},registerNotebookSerializer(y,x,A,Te){return ot.registerNotebookSerializer(k,y,x,A,$e(k,"notebookLiveShare")?Te:void 0)},onDidChangeConfiguration:(y,x,A)=>he(KT.onDidChangeConfiguration)(y,x,A),getConfiguration(y,x){return x=arguments.length===1?void 0:x,KT.getConfiguration(y,x,k)},registerTextDocumentContentProvider(y,x){return ft.registerTextDocumentContentProvider(y,x)},registerTaskProvider:(y,x)=>(h.report("window.registerTaskProvider",k,"Use the corresponding function on the 'tasks' namespace instead"),ge.registerTaskProvider(k,y,x)),registerFileSystemProvider(y,x,A){return Kc(ql.registerFileSystemProvider(k,y,x,A),n.addFileSystemProvider(y,x,A))},get fs(){return n.value},registerFileSearchProvider:(y,x)=>(H(k,"fileSearchProvider"),pe.registerFileSearchProviderOld(y,x)),registerTextSearchProvider:(y,x)=>(H(k,"textSearchProvider"),pe.registerTextSearchProviderOld(y,x)),registerAITextSearchProvider:(y,x)=>(H(k,"aiTextSearchProvider"),H(k,"textSearchProvider2"),pe.registerAITextSearchProvider(y,x)),registerFileSearchProvider2:(y,x)=>(H(k,"fileSearchProvider2"),pe.registerFileSearchProvider(y,x)),registerTextSearchProvider2:(y,x)=>(H(k,"textSearchProvider2"),pe.registerTextSearchProvider(y,x)),registerRemoteAuthorityResolver:(y,x)=>(H(k,"resolvers"),o.registerRemoteAuthorityResolver(y,x)),registerResourceLabelFormatter:y=>(H(k,"resolvers"),ma.$registerResourceLabelFormatter(y)),getRemoteExecServer:y=>(H(k,"resolvers"),o.getRemoteExecServer(y)),onDidCreateFiles:(y,x,A)=>he(lr.onDidCreateFile)(y,x,A),onDidDeleteFiles:(y,x,A)=>he(lr.onDidDeleteFile)(y,x,A),onDidRenameFiles:(y,x,A)=>he(lr.onDidRenameFile)(y,x,A),onWillCreateFiles:(y,x,A)=>he(lr.getOnWillCreateFileEvent(k))(y,x,A),onWillDeleteFiles:(y,x,A)=>he(lr.getOnWillDeleteFileEvent(k))(y,x,A),onWillRenameFiles:(y,x,A)=>he(lr.getOnWillRenameFileEvent(k))(y,x,A),openTunnel:y=>(H(k,"tunnels"),I.openTunnel(k,y).then(x=>{if(!x)throw new Error("cannot open tunnel");return x})),get tunnels(){return H(k,"tunnels"),I.getTunnels()},onDidChangeTunnels:(y,x,A)=>(H(k,"tunnels"),he(I.onDidChangeTunnels)(y,x,A)),registerPortAttributesProvider:(y,x)=>(H(k,"portsAttributes"),I.registerPortsAttributesProvider(y,x)),registerTunnelProvider:(y,x)=>(H(k,"tunnelFactory"),I.registerTunnelProvider(y,x)),registerTimelineProvider:(y,x)=>(H(k,"timeline"),Gn.registerTimelineProvider(y,x,k.identifier,Qe.converter)),get isTrusted(){return i.trusted},requestResourceTrust:y=>(H(k,"workspaceTrust"),i.requestResourceTrust(y)),requestWorkspaceTrust:y=>(H(k,"workspaceTrust"),i.requestWorkspaceTrust(y)),isResourceTrusted:y=>(H(k,"workspaceTrust"),i.isResourceTrusted(y)),onDidChangeWorkspaceTrustedFolders:(y,x,A)=>(H(k,"workspaceTrust"),he(i.onDidChangeWorkspaceTrustedFolders)(y,x,A)),onDidGrantWorkspaceTrust:(y,x,A)=>he(i.onDidGrantWorkspaceTrust)(y,x,A),registerEditSessionIdentityProvider:(y,x)=>(H(k,"editSessionIdentityProvider"),i.registerEditSessionIdentityProvider(y,x)),onWillCreateEditSessionIdentity:(y,x,A)=>(H(k,"editSessionIdentityProvider"),he(i.getOnWillCreateEditSessionIdentityEvent(k))(y,x,A)),registerCanonicalUriProvider:(y,x)=>(H(k,"canonicalUriProvider"),i.registerCanonicalUriProvider(y,x)),getCanonicalUri:(y,x,A)=>(H(k,"canonicalUriProvider"),i.provideCanonicalUri(y,x,A)),decode(y,x){return i.decode(y,x)},encode(y,x){return i.encode(y,x)}},R3={get inputBox(){return h.report("scm.inputBox",k,"Use 'SourceControl.inputBox' instead"),Kl.getLastInputBox(k)},createSourceControl(y,x,A,Te,ut,fn){return(Te||ut||fn)&&H(k,"scmProviderOptions"),Kl.createSourceControl(k,y,x,A,Te,ut,fn)}},k3={createCommentController(y,x){return Ro.createCommentController(k,y,x)}},A3={get activeDebugSession(){return de.activeDebugSession},get activeDebugConsole(){return de.activeDebugConsole},get breakpoints(){return de.breakpoints},get activeStackItem(){return de.activeStackItem},registerDebugVisualizationProvider(y,x){return H(k,"debugVisualization"),de.registerDebugVisualizationProvider(k,y,x)},registerDebugVisualizationTreeProvider(y,x){return H(k,"debugVisualization"),de.registerDebugVisualizationTree(k,y,x)},onDidStartDebugSession(y,x,A){return he(de.onDidStartDebugSession)(y,x,A)},onDidTerminateDebugSession(y,x,A){return he(de.onDidTerminateDebugSession)(y,x,A)},onDidChangeActiveDebugSession(y,x,A){return he(de.onDidChangeActiveDebugSession)(y,x,A)},onDidReceiveDebugSessionCustomEvent(y,x,A){return he(de.onDidReceiveDebugSessionCustomEvent)(y,x,A)},onDidChangeBreakpoints(y,x,A){return he(de.onDidChangeBreakpoints)(y,x,A)},onDidChangeActiveStackItem(y,x,A){return he(de.onDidChangeActiveStackItem)(y,x,A)},registerDebugConfigurationProvider(y,x,A){return de.registerDebugConfigurationProvider(y,x,A||1)},registerDebugAdapterDescriptorFactory(y,x){return de.registerDebugAdapterDescriptorFactory(k,y,x)},registerDebugAdapterTrackerFactory(y,x){return de.registerDebugAdapterTrackerFactory(y,x)},startDebugging(y,x,A){return!A||typeof A=="object"&&"configuration"in A?de.startDebugging(y,x,{parentSession:A}):de.startDebugging(y,x,A||{})},stopDebugging(y){return de.stopDebugging(y)},addBreakpoints(y){return de.addBreakpoints(y)},removeBreakpoints(y){return de.removeBreakpoints(y)},asDebugSourceUri(y,x){return de.asDebugSourceUri(y,x)}},O3={registerTaskProvider:(y,x)=>ge.registerTaskProvider(k,y,x),fetchTasks:y=>ge.fetchTasks(y),executeTask:y=>ge.executeTask(k,y),get taskExecutions(){return ge.taskExecutions},onDidStartTask:(y,x,A)=>{let Te=ut=>{$e(k,"taskExecutionTerminal")||ut?.execution?.terminal!==void 0&&(ut.execution.terminal=void 0);let fn={...ut,execution:ut.execution};return y.call(x,fn)};return he(ge.onDidStartTask)(Te,x,A)},onDidEndTask:(y,x,A)=>he(ge.onDidEndTask)(y,x,A),onDidStartTaskProcess:(y,x,A)=>he(ge.onDidStartTaskProcess)(y,x,A),onDidEndTaskProcess:(y,x,A)=>he(ge.onDidEndTaskProcess)(y,x,A),onDidStartTaskProblemMatchers:(y,x,A)=>(H(k,"taskProblemMatcherStatus"),he(ge.onDidStartTaskProblemMatchers)(y,x,A)),onDidEndTaskProblemMatchers:(y,x,A)=>(H(k,"taskProblemMatcherStatus"),he(ge.onDidEndTaskProblemMatchers)(y,x,A))},L3={createNotebookController(y,x,A,Te,ut){return so.createNotebookController(k,y,x,A,Te,$e(k,"notebookMessaging")?ut:void 0)},registerNotebookCellStatusBarItemProvider:(y,x)=>ot.registerNotebookCellStatusBarItemProvider(k,y,x),createRendererMessaging(y){return ua.createRendererMessaging(k,y)},createNotebookControllerDetectionTask(y){return H(k,"notebookKernelSource"),so.createNotebookControllerDetectionTask(k,y)},registerKernelSourceActionProvider(y,x){return H(k,"notebookKernelSource"),so.registerKernelSourceActionProvider(k,y,x)}},M3={t(...y){if(typeof y[0]=="string"){let x=y.shift(),A=!y||typeof y[0]!="object"?y:y[0];return Je.getMessage(k.identifier.value,{message:x,args:A})}return Je.getMessage(k.identifier.value,y[0])},get bundle(){return Je.getBundle(k.identifier.value)},get uri(){return Je.getBundleUri(k.identifier.value)}},N3={transferActiveChat(y){return H(k,"interactive"),Ye.transferActiveChat(y)}},U3={getRelatedInformation(y,x){return H(k,"aiRelatedInformation"),wn.getRelatedInformation(k,y,x)},registerRelatedInformationProvider(y,x){return H(k,"aiRelatedInformation"),wn.registerRelatedInformationProvider(k,y,x)},registerEmbeddingVectorProvider(y,x){return H(k,"aiRelatedInformation"),Jo.registerEmbeddingVectorProvider(k,y,x)},registerSettingsSearchProvider(y){return H(k,"aiSettingsSearch"),mn.registerSettingsSearchProvider(k,y)}},F3={registerMappedEditsProvider(y,x){return H(k,"mappedEditsProvider"),{dispose(){}}},registerMappedEditsProvider2(y){return H(k,"mappedEditsProvider"),zl.registerMappedEditsProvider(k,y)},createChatParticipant(y,x){return Ye.createChatAgent(k,y,x)},createDynamicChatParticipant(y,x,A){return H(k,"chatParticipantPrivate"),Ye.createDynamicChatAgent(k,y,x,A)},registerChatParticipantDetectionProvider(y){return H(k,"chatParticipantPrivate"),Ye.registerChatParticipantDetectionProvider(k,y)},onDidDisposeChatSession:(y,x,A)=>(H(k,"chatParticipantPrivate"),he(Ye.onDidDisposeChatSession)(y,x,A)),registerChatSessionItemProvider:(y,x)=>(H(k,"chatSessionsProvider"),gn.registerChatSessionItemProvider(k,y,x)),createChatSessionItemController:(y,x)=>(H(k,"chatSessionsProvider"),gn.createChatSessionItemController(k,y,x)),registerChatSessionContentProvider(y,x,A,Te){return H(k,"chatSessionsProvider"),gn.registerChatSessionContentProvider(k,y,A,x,Te)},registerChatOutputRenderer:(y,x)=>(H(k,"chatOutputRenderer"),Ae.registerChatOutputRenderer(k,y,x)),registerChatWorkspaceContextProvider(y,x){return H(k,"chatContextProvider"),Dn.registerChatWorkspaceContextProvider(`${k.id}-${y}`,x)},registerChatExplicitContextProvider(y,x){return H(k,"chatContextProvider"),Dn.registerChatExplicitContextProvider(`${k.id}-${y}`,x)},registerChatResourceContextProvider(y,x,A){return H(k,"chatContextProvider"),Dn.registerChatResourceContextProvider(Ot(y),`${k.id}-${x}`,A)},registerChatContextProvider(y,x,A){return H(k,"chatContextProvider"),Dn.registerChatContextProvider(y?Ot(y):void 0,`${k.id}-${x}`,A)},registerCustomAgentProvider(y){return H(k,"chatPromptFiles"),Ye.registerPromptFileProvider(k,"agent",y)},registerInstructionsProvider(y){return H(k,"chatPromptFiles"),Ye.registerPromptFileProvider(k,"instructions",y)},registerPromptFileProvider(y){return H(k,"chatPromptFiles"),Ye.registerPromptFileProvider(k,"prompt",y)},registerSkillProvider(y){return H(k,"chatPromptFiles"),Ye.registerPromptFileProvider(k,"skill",y)},registerChatDebugLogProvider(y){return H(k,"chatDebug"),pn.registerChatDebugLogProvider(y)}},H3={selectChatModels:y=>ee.selectLanguageModels(k,y??{}),onDidChangeChatModels:(y,x,A)=>ee.onDidChangeProviders(y,x,A),registerLanguageModelChatProvider:(y,x)=>ee.registerLanguageModelChatProvider(k,y,x),get isModelProxyAvailable(){return H(k,"languageModelProxy"),ee.isModelProxyAvailable},onDidChangeModelProxyAvailability:(y,x,A)=>(H(k,"languageModelProxy"),ee.onDidChangeModelProxyAvailability(y,x,A)),getModelProxy:()=>(H(k,"languageModelProxy"),ee.getModelProxy(k)),registerLanguageModelProxyProvider:y=>(H(k,"chatParticipantPrivate"),ee.registerLanguageModelProxyProvider(k,y)),get embeddingModels(){return H(k,"embeddings"),ue.embeddingsModels},onDidChangeEmbeddingModels:(y,x,A)=>(H(k,"embeddings"),ue.onDidChange(y,x,A)),registerEmbeddingsProvider(y,x){return H(k,"embeddings"),ue.registerEmbeddingsProvider(k,y,x)},async computeEmbeddings(y,x,A){return H(k,"embeddings"),ue.computeEmbeddings(y,x,A)},registerTool(y,x){return Fe.registerTool(k,y,x)},registerToolDefinition(y,x){return Fe.registerToolDefinition(k,y,x)},invokeTool(y,x,A){return typeof y!="string"&&H(k,"chatParticipantAdditions"),Fe.invokeTool(k,y,x,A)},get tools(){return Fe.getTools(k)},fileIsIgnored(y,x){return ee.fileIsIgnored(k,y,x)},registerIgnoredFileProvider(y){return ee.registerIgnoredFileProvider(k,y)},registerMcpServerDefinitionProvider(y,x){return{dispose(){}}},get mcpServerDefinitions(){return[]},onDidChangeMcpServerDefinitions:()=>({dispose(){}}),startMcpGateway(){return Promise.resolve(void 0)},onDidChangeChatRequestTools(...y){return H(k,"chatParticipantAdditions"),he(Ye.onDidChangeChatRequestTools)(...y)}},B3={registerSpeechProvider(y,x){return H(k,"speech"),ao.registerProvider(k.identifier,y,x)}},V3=()=>Ze.getExtensionMetadata(),W3=y=>Ze.getWindsurfIdeVersion(y),$3=()=>Ze.onboardedInCurrentAppSession(),G3={setPort:y=>Ze.setLanguageServerPort(y),setCsrfToken:y=>Ze.setCsrfToken(y),version:Ze.languageServerVersion,setChildLanguageServerInfo:y=>Ze.setWorktreeLanguageServerInfo(y)},z3={pushToEditStack:(y,x,A,Te,ut=!1)=>At.pushToEditStack(y,x,A,Te,ut),getAllElements:()=>At.getAllElements()},q3={openPanel(){return Mt.openPanel()},closePanel(){return Mt.closePanel()},togglePanel(){return Mt.togglePanel()},getFocusState(){return Mt.getFocusState()},showCascadeStarterPromptQuickPick(){return Mt.showCascadeStarterPromptQuickPick()},getCascadeStarterPrompts(){return Mt.getCascadeStarterPrompts()},registerCascadeMemoryProvider(y){return Mt.registerCascadeMemoryProvider(y)}},K3={startAddedExtensionsOnDisk(){return o.$startAddedExtensionsOnDisk()},getAllExtensionIdsFromDisk(){return o.$getAllExtensionIdsFromDisk()},installFromDirectory(y){return o.$installFromDirectory(y)}},J3={forceResolveFromFile(...y){return fa.forceResolveFromFile(y)},onDidDragToCascade:fa.onDidDragToCascade},j3={registerWindsurfDevContainerContext(y){return Xl.registerWindsurfDevContainerContext(y)}},Q3={setText(y){Qe.executeCommand("windsurf.updateDebugInfoWidget",y)}},X3={setAnnotation(y){return gv.setAnnotation(y)},removeAnnotation(y){return gv.removeAnnotation(y)},getAnnotations(){return gv.getAnnotations()},showAnnotation(y){return gv.showAnnotation(y)}};return{version:t.version,ai:U3,authentication:b3,commands:I3,comments:k3,chat:F3,debug:A3,env:r0,extensions:E3,interactive:N3,l10n:M3,languages:S3,lm:H3,notebooks:L3,scm:R3,speech:B3,tasks:O3,tests:y3,windsurfAuth:C3,windsurfProductEducation:_3,windsurfSettings:P3,windsurfMcp:D3,windsurfAcp:w3,window:x3,workspace:i0,Cascade:q3,Breakpoint:Ls,TerminalOutputAnchor:rR,ChatResultFeedbackKind:hE,ChatVariableLevel:RR,ChatCompletionItem:ay,ChatReferenceDiagnostic:yl,CallHierarchyIncomingCall:Gu,CallHierarchyItem:ll,CallHierarchyOutgoingCall:zu,CancellationError:Bt,CancellationTokenSource:We,CandidatePortSource:k_,CodeAction:Vi,CodeActionKind:yt,CodeActionTriggerKind:Py,CodeLens:Ka,Color:ni,ColorInformation:Ya,ColorPresentation:Za,ColorThemeKind:aE,CommentMode:IR,CommentState:yR,CommentThreadCollapsibleState:Zy,CommentThreadState:eE,CommentThreadApplicability:tE,CommentThreadFocus:nE,CompletionItem:Qa,CompletionItemKind:Ng,CompletionItemTag:Ry,CompletionList:ti,CompletionTriggerKind:wy,ConfigurationTarget:Ky,CustomExecution:Gd,DebugAdapterExecutable:el,DebugAdapterInlineImplementation:Ns,DebugAdapterNamedPipeServer:tl,DebugAdapterServer:Ms,DebugConfigurationProviderTriggerKind:Mw,DebugConsoleMode:oE,DebugVisualization:ey,DecorationRangeBehavior:Vy,Diagnostic:Rs,DiagnosticRelatedInformation:Ui,DiagnosticSeverity:Od,DiagnosticTag:Ag,Disposable:Ce,DocumentHighlight:za,DocumentHighlightKind:_y,MultiDocumentHighlight:qa,DocumentLink:Xa,DocumentSymbol:or,EndOfLine:Nd,EnvironmentVariableMutatorType:Ty,EvaluatableExpression:nl,InlineValueText:ol,InlineValueVariableLookup:rl,InlineValueEvaluatableExpression:il,InlineCompletionTriggerKind:Jy,InlineCompletionsDisposeReasonKind:jy,EventEmitter:D,ExtensionKind:sE,ExtensionMode:pE,ExternalUriOpenerPriority:TR,FileChangeType:Xy,FileDecoration:qd,FileDecoration2:qd,FileSystemError:vt,FileType:au,FilePermission:Xf,FoldingRange:Wu,FoldingRangeKind:Yy,FunctionBreakpoint:ii,InlineCompletionItem:Fu,InlineCompletionList:Hu,Hover:Ud,VerboseHover:Ga,HoverVerbosityAction:iR,IndentAction:OM,Location:qt,MarkdownString:zt,OverviewRulerLane:UD,ParameterInformation:Mu,PortAutoForwardAction:PR,Position:we,ProcessExecution:$i,ProgressLocation:Ug,QuickInputButtonLocation:ER,QuickInputButtons:Bi,Range:Se,RelativePattern:zi,Selection:Nn,SelectionRange:Wi,SemanticTokens:si,SemanticTokensBuilder:ZI,SemanticTokensEdit:Ju,SemanticTokensEdits:cl,SemanticTokensLegend:zd,ShellExecution:oi,ShellQuoting:gR,SignatureHelp:Uu,SignatureHelpTriggerKind:sR,SignatureInformation:Nu,SnippetString:Un,SourceBreakpoint:ri,StandardTokenType:Fg,StatusBarAlignment:My,SymbolInformation:nr,SymbolKind:Lu,SymbolTag:Lg,Task:_n,TaskEventKind:mR,TaskGroup:yn,TaskPanelKind:fR,TaskRevealKind:pR,TaskScope:Gy,TerminalLink:$I,TerminalQuickFixTerminalCommand:zI,TerminalQuickFixOpener:GI,TerminalLocation:cR,TerminalProfile:qI,TerminalExitReason:lR,TerminalShellExecutionCommandLineConfidence:$y,TerminalCompletionItem:KI,TerminalCompletionItemKind:uR,TerminalCompletionList:JI,TerminalShellType:dR,TextDocumentSaveReason:Uy,TextEdit:Tn,SnippetTextEdit:ks,TextEditorCursorStyle:OD,TextEditorChangeKind:Hy,TextEditorLineNumbersStyle:Ny,TextEditorRevealType:Fy,TextEditorSelectionChangeKind:Zd,SyntaxTokenType:ec,TextDocumentChangeReason:By,ThemeColor:Os,ThemeIcon:En,TreeItem:Gi,TreeItemCheckboxState:qy,TreeItemCollapsibleState:zy,TypeHierarchyItem:ul,UIKind:Pv,Uri:E,ViewColumn:Ly,WorkspaceEdit:Go,DocumentPasteTriggerKind:vR,DocumentDropEdit:Bu,DocumentDropOrPasteEditKind:Pr,DocumentPasteEdit:XI,InlayHint:ja,InlayHintLabelPart:Ja,InlayHintKind:aR,RemoteAuthorityResolverError:Ki,ResolvedAuthority:WI,ManagedResolvedAuthority:al,SourceControlInputBoxValidationType:Wy,ExtensionRuntime:mE,TimelineItem:$u,NotebookRange:$n,NotebookCellKind:Og,NotebookCellExecutionState:SR,NotebookCellData:Fi,NotebookData:Ld,NotebookRendererScript:ju,NotebookCellStatusBarAlignment:lE,NotebookEditorRevealType:dE,NotebookCellOutput:Hi,NotebookCellOutputItem:Md,CellErrorStackFrame:ty,NotebookCellStatusBarItem:ny,NotebookControllerAffinity:xR,NotebookControllerAffinity2:cE,NotebookEdit:xo,NotebookKernelSourceAction:oy,NotebookVariablesRequestKind:uE,PortAttributes:iy,LinkedEditingRanges:ry,TestResultState:CR,TestRunRequest:sl,TestMessage:qi,TestMessageStackFrame:sy,TestTag:Us,TestRunProfileKind:fE,TextSearchCompleteMessageType:ah,DataTransfer:_r,DataTransferItem:Fd,TestCoverageCount:$d,FileCoverage:Fs,StatementCoverage:Xu,BranchCoverage:Yu,DeclarationCoverage:Zu,WorkspaceTrustState:_R,LanguageStatusSeverity:Dy,QuickPickItemKind:rE,InputBoxValidationSeverity:iE,TabInputText:pl,TabInputTextDiff:Hs,TabInputTextMerge:ep,TabInputCustom:ml,TabInputNotebook:fl,TabInputNotebookDiff:gl,TabInputWebview:tp,TabInputTerminal:np,TabInputInteractiveWindow:op,TabInputChat:rp,TabInputTextMultiDiff:ip,TelemetryTrustedValue:Va,LogLevel:vb,EditSessionIdentityMatch:NM,InteractiveSessionVoteDirection:DR,ChatCopyKind:wR,ChatSessionChangedFile:Ey,ChatSessionChangedFile2:Sy,ChatEditingSessionActionOutcome:gE,InteractiveEditorResponseFeedbackKind:AR,DebugStackFrame:qu,DebugThread:Ku,RelatedInformationType:HR,SpeechToTextStatus:VR,TextToSpeechStatus:WR,PartialAcceptTriggerKind:ky,InlineCompletionEndOfLifeReasonKind:Ay,InlineCompletionDisplayLocationKind:Oy,KeywordRecognitionStatus:$R,ChatImageMimeType:FR,ChatResponseMarkdownPart:Bs,ChatResponseFileTreePart:Ws,ChatResponseAnchorPart:ji,ChatResponseProgressPart:jd,ChatResponseProgressPart2:hl,ChatResponseThinkingProgressPart:ai,ChatResponseHookPart:$s,ChatResponseReferencePart:Dr,ChatResponseReferencePart2:Dr,ChatResponseCodeCitationPart:qs,ChatResponseCodeblockUriPart:zs,ChatResponseWarningPart:Qi,ChatResponseTextEditPart:Yi,ChatResponseNotebookEditPart:Js,ChatResponseWorkspaceEditPart:Il,ChatResponseMarkdownWithVulnerabilitiesPart:Ji,ChatResponseCommandButtonPart:Gs,ChatResponseConfirmationPart:Vs,ChatQuestion:ap,ChatQuestionType:vE,ChatResponseQuestionCarouselPart:Xi,ChatResponseMovePart:Ks,ChatResponseExtensionsPart:vl,ChatResponseExternalEditPart:Jd,ChatResponsePullRequestPart:bl,ChatResponseMultiDiffPart:Kd,ChatResponseReferencePartStatusKind:MR,ChatResponseClearToPreviousToolInvocationReason:NR,ChatRequestTurn:js,ChatRequestTurn2:js,ChatResponseTurn:lp,ChatResponseTurn2:dy,ChatSubagentToolInvocationData:sp,ChatToolInvocationPart:Qd,ChatLocation:bE,ChatSessionStatus:OR,ChatDebugLogLevel:LR,ChatDebugToolCallResult:IE,ChatDebugToolCallEvent:cy,ChatDebugModelTurnEvent:uy,ChatDebugGenericEvent:py,ChatDebugSubagentInvocationEvent:my,ChatDebugUserMessageEvent:gy,ChatDebugAgentResponseEvent:hy,ChatDebugMessageSection:fy,ChatDebugEventTextContent:vy,ChatDebugMessageContentType:yE,ChatDebugEventMessageContent:by,ChatDebugEventToolCallContent:Iy,ChatDebugEventModelTurnContent:yy,ChatRequestEditorData:dp,ChatRequestNotebookData:cp,ChatReferenceBinaryData:up,ChatRequestEditedFileEventKind:kR,LanguageModelChatMessageRole:Bg,LanguageModelChatMessage:pp,LanguageModelChatMessage2:mp,LanguageModelToolResultPart:Zi,LanguageModelToolResultPart2:Zi,LanguageModelTextPart:Kt,LanguageModelTextPart2:Kt,LanguageModelPartAudience:EE,ToolResultAudience:EE,LanguageModelToolCallPart:wr,LanguageModelThinkingPart:li,LanguageModelError:zo,LanguageModelToolResult:El,LanguageModelToolResult2:xy,LanguageModelDataPart:Pn,LanguageModelDataPart2:Pn,LanguageModelToolExtensionSource:fp,LanguageModelToolMCPSource:gp,ExtendedLanguageModelToolResult:Cy,LanguageModelChatToolMode:SE,LanguageModelPromptTsxPart:Rr,NewSymbolName:YI,NewSymbolNameTag:bR,NewSymbolNameTriggerKind:Qy,ExcludeSettingOptions:qE,TextSearchContext2:Cl,TextSearchMatch2:qo,AISearchKeyword:uc,TextSearchCompleteMessageTypeNew:ah,ChatErrorLevel:UR,McpHttpServerDefinition:Yd,McpHttpServerDefinition2:Yd,McpStdioServerDefinition:Xd,McpStdioServerDefinition2:Xd,McpToolAvailability:GR,McpToolInvocationContentData:ly,SettingsSearchResultKind:BR,TextEditorNudgePosition:LM,WindsurfNudgeButtonType:MM,DiffZoneResolutionType:KN,getWindsurfExtensionMetadata:V3,getWindsurfIdeVersion:W3,onboardedInCurrentAppSession:$3,windsurfAudio:T3,WindsurfEditStack:z3,WindsurfOnboardingState:JN,CommandPopupNotificationType:jN,WindsurfExtensionManager:K3,WindsurfFiles:J3,WindsurfSettingsCategory:YN,WindsurfStatusBarSettingTabType:XN,WindsurfBillingStrategy:QN,WindsurfDevContainers:j3,DebugPanel:Q3,WindsurfAnnotations:X3,windsurfLanguageServer:G3}}}var sf=class{constructor(t,e,n,o,i,s,a){this._apiFactory=t;this._extensionRegistry=e;this._instaService=n;this._extHostConfiguration=o;this._extHostExtensionService=i;this._initData=s;this._logService=a;this._factories=new Map,this._alternatives=[]}async install(){this._installInterceptor(),On("code/extHost/willWaitForConfig");let t=await this._extHostConfiguration.getConfigProvider();On("code/extHost/didWaitForConfig");let e=await this._extHostExtensionService.getExtensionPathIndex();this.register(new e0(this._apiFactory,e,this._extensionRegistry,t,this._logService)),this.register(this._instaService.createInstance(Gl)),this._initData.remote.isRemote&&this.register(this._instaService.createInstance(mv,e,this._initData.environment.appUriScheme))}register(t){if("nodeModuleName"in t)if(Array.isArray(t.nodeModuleName))for(let e of t.nodeModuleName)this._factories.set(e,t);else this._factories.set(t.nodeModuleName,t);typeof t.alternativeModuleName=="function"&&this._alternatives.push(e=>t.alternativeModuleName(e))}};sf=L([P(2,ko),P(3,Po),P(4,Do),P(5,Et),P(6,be)],sf);var Gl=class{static{this.aliased=new Map([["vscode-ripgrep","@vscode/ripgrep"],["vscode-windows-registry","@vscode/windows-registry"]])}constructor(t){if(t.environment.appRoot&&Gl.aliased.size){let e=hr(this.forceForwardSlashes(t.environment.appRoot.fsPath)),n="[a-z0-9_.-]",o=`@${n}+\\/${n}+|${n}+`,i="node_modules|node_modules\\.asar(?:\\.unpacked)?";this.re=new RegExp(`^(${e}/${i}\\/)(${o})(.*)$`,"i")}}alternativeModuleName(t){if(!this.re)return;let e=this.re.exec(this.forceForwardSlashes(t));if(!e)return;let[,n,o,i]=e,s=Gl.aliased.get(o);if(s!==void 0)return console.warn(`${o} as been renamed to ${s}, please update your imports`),n+s+i}forceForwardSlashes(t){return t.replace(/\\/g,"/")}};Gl=L([P(0,Et)],Gl);var e0=class{constructor(t,e,n,o,i){this._apiFactory=t;this._extensionPaths=e;this._extensionRegistry=n;this._configProvider=o;this._logService=i;this.nodeModuleName="vscode";this._extApiImpl=new Xn}load(t,e){let n=this._extensionPaths.findSubstr(e);if(n){let o=this._extApiImpl.get(n.identifier);return o||(o=this._apiFactory(n,this._extensionRegistry,this._configProvider),this._extApiImpl.set(n.identifier,o)),o}if(!this._defaultApiImpl){let o="";this._extensionPaths.forEach((i,s)=>o+=`	${s} -> ${i.identifier.value}
`),this._logService.warn(`Could not identify extension for 'vscode' require call from ${e}. These are the extension path mappings: 
${o}`),this._defaultApiImpl=this._apiFactory(oH,this._extensionRegistry,this._configProvider)}return this._defaultApiImpl}},mv=class{constructor(t,e,n){this._extensionPaths=t;this._appUriScheme=e;this.nodeModuleName=["open","opn"];this._mainThreadTelemetry=n.getProxy(V.MainThreadTelemetry);let o=n.getProxy(V.MainThreadWindow);this._impl=(i,s)=>{let a=E.parse(i);return s?this.callOriginal(i,s):a.scheme==="http"||a.scheme==="https"?o.$openUri(a,i,{allowTunneling:!0}):a.scheme==="mailto"||a.scheme===this._appUriScheme?o.$openUri(a,i,{}):this.callOriginal(i,s)}}load(t,e,n){let o=this._extensionPaths.findSubstr(e);return o&&(this._extensionId=o.identifier.value,this.sendShimmingTelemetry()),this._original=n(t),this._impl}callOriginal(t,e){return this.sendNoForwardTelemetry(),this._original(t,e)}sendShimmingTelemetry(){this._extensionId&&this._mainThreadTelemetry.$publicLog2("shimming.open",{extension:this._extensionId})}sendNoForwardTelemetry(){this._extensionId&&this._mainThreadTelemetry.$publicLog2("shimming.open.call.noForward",{extension:this._extensionId})}};mv=L([P(2,Ee)],mv);var af=class{constructor(t,e){this._mainThreadConsole=t.getProxy(V.MainThreadConsole),this._includeStack=e.consoleForward.includeStack,this._logNative=e.consoleForward.logNative,this._wrapConsoleMethod("info","log"),this._wrapConsoleMethod("log","log"),this._wrapConsoleMethod("warn","warn"),this._wrapConsoleMethod("debug","debug"),this._wrapConsoleMethod("error","error")}_wrapConsoleMethod(t,e){let n=this,o=console[t];Object.defineProperty(console,t,{set:()=>{},get:()=>function(){n._handleConsoleCall(t,e,o,arguments)}})}_handleConsoleCall(t,e,n,o){this._mainThreadConsole.$logExtensionHostMessage({type:"__$console",severity:e,arguments:uJ(o,this._includeStack)}),this._logNative&&this._nativeConsoleLogMessage(t,n,o)}};af=L([P(0,Ee),P(1,Et)],af);var cJ=1e5;function uJ(r,t){let e=[];if(r.length)for(let n=0;n<r.length;n++){let o=r[n];if(typeof o>"u")o="undefined";else if(o instanceof Error){let i=o;i.stack?o=i.stack:o=i.toString()}e.push(o)}if(t){let n=new Error().stack;n&&e.push({__$stack:n.split(`
`).slice(3).join(`
`)})}try{let n=fP(e);return n.length>cJ?"Output omitted for a large object that exceeds the limits":n}catch(n){return`Output omitted for an object that cannot be inspected ('${n.toString()}')`}}var lf=class extends af{constructor(t,e){super(t,e)}_nativeConsoleLogMessage(t,e,n){e.apply(console,n)}};lf=L([P(0,Ee),P(1,Et)],lf);var t0=class extends sf{_installInterceptor(){}getModule(t,e){for(let n of this._alternatives){let o=n(t);if(o){t=o;break}}if(this._factories.has(t))return this._factories.get(t).load(t,e,()=>{throw new Error("CANNOT LOAD MODULE from here.")})}},zT=class extends Ml{constructor(){super(...arguments);this.extensionRuntime=2}async _beforeAlmostReadyToRunExtensions(){this._instaService.createInstance(lf);let e=this._instaService.invokeFunction(s3);this._fakeModules=this._instaService.createInstance(t0,e,{mine:this._myRegistry,all:this._globalRegistry}),await this._fakeModules.install(),performance.mark("code/extHost/didInitAPI"),await this._waitForDebuggerAttachment()}_getEntryPoint(e){return e.browser}async _loadCommonJSModule(e,n,o){n=n.with({path:pJ(n.path,".js")});let i=e?.identifier.value;i&&performance.mark(`code/extHost/willFetchExtensionCode/${i}`);let s=E.revive(await this._mainThreadExtensionsProxy.$asBrowserUri(n)),a=await fetch(s.toString(!0));if(i&&performance.mark(`code/extHost/didFetchExtensionCode/${i}`),a.status!==200)throw new Error(a.statusText);let l=await a.text(),d=`${n.toString(!0)}#vscode-extension`,c=`${l}
//# sourceURL=${d}`,u;try{u=new Function("module","exports","require",c)}catch(h){throw console.error(i?`Loading code for extension ${i} failed: ${h.message}`:`Loading code failed: ${h.message}`),console.error(`${n.toString(!0)}${typeof h.line=="number"?` line ${h.line}`:""}${typeof h.column=="number"?` column ${h.column}`:""}`),console.error(h),h}e&&await this._extHostLocalizationService.initializeLocalizedMessages(e);let f={},g={exports:f},I=h=>{let C=this._fakeModules.getModule(h,n);if(C===void 0)throw new Error(`Cannot load module '${h}'`);return C};try{return o.codeLoadingStart(),i&&performance.mark(`code/extHost/willLoadExtensionCode/${i}`),u(g,f,I),g.exports!==f?g.exports:f}finally{i&&performance.mark(`code/extHost/didLoadExtensionCode/${i}`),o.codeLoadingStop()}}_loadESMModule(e,n,o){throw new Error("ESM modules are not supported in the web worker extension host")}async $setRemoteEnvironment(e){}async _waitForDebuggerAttachment(e=5e3){if(!this._initData.environment.isExtensionDevelopmentDebug)return;let n=Date.now()+e;for(;Date.now()<n&&!("__jsDebugIsReady"in globalThis);)await Qn(10)}};function pJ(r,t){return hs(r)?r:r+t}rt(be,new Ao(Am,[!0],!0));rt(jp,Jp,0);rt(Do,zT,0);rt(Fp,Up,0);rt(Rl,new Ao(Gp,[!0],!0));var d3=self.close.bind(self);self.close=()=>console.trace("'close' has been blocked");var c3=postMessage.bind(self);self.postMessage=()=>console.trace("'postMessage' has been blocked");function a3(r){return/^(file|vscode-remote):/i.test(r)}var l3=fetch.bind(self);function mJ(r){self.fetch=async function(t,e){return t instanceof Request||a3(String(t))&&(t=(await r(E.parse(String(t)))).toString(!0)),l3(t,e)},self.XMLHttpRequest=class extends XMLHttpRequest{open(t,e,n,o,i){(async()=>(a3(e.toString())&&(e=(await r(E.parse(e.toString()))).toString(!0)),super.open(t,e,n??!0,o,i)))()}}}self.importScripts=()=>{throw new Error("'importScripts' has been blocked")};self.addEventListener=()=>console.trace("'addEventListener' has been blocked");self.AMDLoader=void 0;self.NLSLoaderPlugin=void 0;self.define=void 0;self.require=void 0;self.webkitRequestFileSystem=void 0;self.webkitRequestFileSystemSync=void 0;self.webkitResolveLocalFileSystemSyncURL=void 0;self.webkitResolveLocalFileSystemURL=void 0;if(self.Worker){let r=self.Worker;Worker=function(t,e){if(/^file:/i.test(t.toString()))t=Xv.uriToBrowserUri(E.parse(t.toString())).toString(!0);else if(/^vscode-remote:/i.test(t.toString()))throw new Error("Creating workers from remote extensions is currently not supported.");let o=`(${(function(l){function d(f){return typeof f=="string"||f instanceof URL?String(f).replace(/^file:\/\//i,"vscode-file://vscode-app"):f}let c=fetch.bind(self);self.fetch=function(f,g){return f instanceof Request?c(f,g):c(d(f),g)},self.XMLHttpRequest=class extends XMLHttpRequest{open(f,g,I,h,C){return super.open(f,d(g),I??!0,h,C)}};let u=importScripts.bind(self);self.importScripts=(...f)=>{u(...f.map(d))},u(l)}).toString()}('${t}'))`;e=e||{},e.name=`${name} -> ${e.name||Cn(t.toString())}`;let i=new Blob([o],{type:"application/javascript"}),s=URL.createObjectURL(i);return new r(s,e)}}else self.Worker=class extends fx{constructor(r,t){super(c3,r,{name:Cn(r.toString()),...t})}};var fJ=new class{constructor(){this.pid=void 0}exit(r){d3()}},n0=class{constructor(){let t=new MessageChannel,e=new D,n=!1;c3(t.port2,[t.port2]),t.port1.onmessage=o=>{let{data:i}=o;if(!(i instanceof ArrayBuffer)){console.warn("UNKNOWN data received",i);return}let s=ce.wrap(new Uint8Array(i,0,i.byteLength));if(W0(s,2)){n=!0,u3("received terminate message from renderer");return}e.fire(s)},this.protocol={onMessage:e.event,send:o=>{if(!n){let i=o.buffer.buffer.slice(o.buffer.byteOffset,o.buffer.byteOffset+o.buffer.byteLength);t.port1.postMessage(i,[i])}}}}};function gJ(r){return new Promise(t=>{let e=r.onMessage(n=>{e.dispose();let o=JSON.parse(n.toString());r.send(I_(0)),t({protocol:r,initData:o})});r.send(I_(1))})}var u3=r=>d3();function hJ(r){return!!r&&typeof r=="object"&&r.type==="vscode.init"&&r.data instanceof Map}function p3(){On("code/extHost/willConnectToRenderer");let r=new n0;return{onmessage(t){hJ(t)&&gJ(r.protocol).then(e=>{On("code/extHost/didWaitForInitData");let n=new mx(e.protocol,e.initData,fJ,null,t.data);mJ(o=>n.asBrowserUri(o)),u3=o=>n.terminate(o)})}}}var vJ=p3();self.onmessage=r=>vJ.onmessage(r.data);
//# sourceMappingURL=https://cdn.windsurf.com/sourcemaps/c46c49e94b4d3f41181204d59809d8f1b2c48d68/core/vs/workbench/api/worker/extensionHostWorkerMain.js.map
