/*!--------------------------------------------------------
 * 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 cB=Object.create;var Ay=Object.defineProperty;var O1=Object.getOwnPropertyDescriptor;var dB=Object.getOwnPropertyNames;var uB=Object.getPrototypeOf,pB=Object.prototype.hasOwnProperty;var _=(r,n)=>()=>(r&&(n=r(r=0)),n);var mB=(r,n)=>()=>(n||r((n={exports:{}}).exports,n),n.exports);var fB=(r,n,e,t)=>{if(n&&typeof n=="object"||typeof n=="function")for(let i of dB(n))!pB.call(r,i)&&i!==e&&Ay(r,i,{get:()=>n[i],enumerable:!(t=O1(n,i))||t.enumerable});return r};var k1=(r,n,e)=>(e=r!=null?cB(uB(r)):{},fB(n||!r||!r.__esModule?Ay(e,"default",{value:r,enumerable:!0}):e,r));var D=(r,n,e,t)=>{for(var i=t>1?void 0:t?O1(n,e):n,o=r.length-1,s;o>=0;o--)(s=r[o])&&(i=(t?s(n,e,i):s(i))||i);return t&&i&&Ay(n,e,i),i},S=(r,n)=>(e,t)=>n(e,t,r);function xy(r){let n=[];typeof r=="number"&&n.push("code/timeOrigin",r);function e(i,o){n.push(i,o?.startTime??Date.now())}function t(){let i=[];for(let o=0;o<n.length;o+=2)i.push({name:n[o],startTime:n[o+1]});return i}return{mark:e,getMarks:t}}function vB(){if(typeof performance=="object"&&typeof performance.mark=="function"&&!performance.nodeTiming)return typeof performance.timeOrigin!="number"&&!performance.timing?xy():{mark(r,n){performance.mark(r,n)},getMarks(){let r=performance.timeOrigin;typeof r!="number"&&(r=(performance.timing.navigationStart||performance.timing.redirectStart||performance.timing.fetchStart)??0);let n=[{name:"code/timeOrigin",startTime:Math.round(r)}];for(let e of performance.getEntriesByType("mark"))n.push({name:e.name,startTime:Math.round(r+e.startTime)});return n}};if(typeof process=="object"){let r=performance?.timeOrigin;return xy(r)}else return console.trace("perf-util loaded in UNKNOWN environment"),xy()}function EB(r){return r.MonacoPerformanceMarks||(r.MonacoPerformanceMarks=vB()),r.MonacoPerformanceMarks}var U1,tt,sg,Bi=_(()=>{U1=EB(globalThis),tt=U1.mark,sg=U1.getMarks});var ky=mB((cG,V1)=>{"use strict";function wB(r,n){var e=r;n.slice(0,-1).forEach(function(i){e=e[i]||{}});var t=n[n.length-1];return t in e}function W1(r){return typeof r=="number"||/^0x[0-9a-f]+$/i.test(r)?!0:/^[-+]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(r)}function B1(r,n){return n==="constructor"&&typeof r[n]=="function"||n==="__proto__"}V1.exports=function(r,n){n||(n={});var e={bools:{},strings:{},unknownFn:null};typeof n.unknown=="function"&&(e.unknownFn=n.unknown),typeof n.boolean=="boolean"&&n.boolean?e.allBools=!0:[].concat(n.boolean).filter(Boolean).forEach(function(O){e.bools[O]=!0});var t={};function i(O){return t[O].some(function(B){return e.bools[B]})}Object.keys(n.alias||{}).forEach(function(O){t[O]=[].concat(n.alias[O]),t[O].forEach(function(B){t[B]=[O].concat(t[O].filter(function(he){return B!==he}))})}),[].concat(n.string).filter(Boolean).forEach(function(O){e.strings[O]=!0,t[O]&&[].concat(t[O]).forEach(function(B){e.strings[B]=!0})});var o=n.default||{},s={_:[]};function a(O,B){return e.allBools&&/^--[^=]+$/.test(B)||e.strings[O]||e.bools[O]||t[O]}function l(O,B,he){for(var Q=O,le=0;le<B.length-1;le++){var ne=B[le];if(B1(Q,ne))return;Q[ne]===void 0&&(Q[ne]={}),(Q[ne]===Object.prototype||Q[ne]===Number.prototype||Q[ne]===String.prototype)&&(Q[ne]={}),Q[ne]===Array.prototype&&(Q[ne]=[]),Q=Q[ne]}var De=B[B.length-1];B1(Q,De)||((Q===Object.prototype||Q===Number.prototype||Q===String.prototype)&&(Q={}),Q===Array.prototype&&(Q=[]),Q[De]===void 0||e.bools[De]||typeof Q[De]=="boolean"?Q[De]=he:Array.isArray(Q[De])?Q[De].push(he):Q[De]=[Q[De],he])}function c(O,B,he){if(!(he&&e.unknownFn&&!a(O,he)&&e.unknownFn(he)===!1)){var Q=!e.strings[O]&&W1(B)?Number(B):B;l(s,O.split("."),Q),(t[O]||[]).forEach(function(le){l(s,le.split("."),Q)})}}Object.keys(e.bools).forEach(function(O){c(O,o[O]===void 0?!1:o[O])});var u=[];r.indexOf("--")!==-1&&(u=r.slice(r.indexOf("--")+1),r=r.slice(0,r.indexOf("--")));for(var p=0;p<r.length;p++){var m=r[p],h,E;if(/^--.+=/.test(m)){var y=m.match(/^--([^=]+)=([\s\S]*)$/);h=y[1];var P=y[2];e.bools[h]&&(P=P!=="false"),c(h,P,m)}else if(/^--no-.+/.test(m))h=m.match(/^--no-(.+)/)[1],c(h,!1,m);else if(/^--.+/.test(m))h=m.match(/^--(.+)/)[1],E=r[p+1],E!==void 0&&!/^(-|--)[^-]/.test(E)&&!e.bools[h]&&!e.allBools&&(!t[h]||!i(h))?(c(h,E,m),p+=1):/^(true|false)$/.test(E)?(c(h,E==="true",m),p+=1):c(h,e.strings[h]?"":!0,m);else if(/^-[^-]+/.test(m)){for(var T=m.slice(1,-1).split(""),k=!1,U=0;U<T.length;U++){if(E=m.slice(U+2),E==="-"){c(T[U],E,m);continue}if(/[A-Za-z]/.test(T[U])&&E[0]==="="){c(T[U],E.slice(1),m),k=!0;break}if(/[A-Za-z]/.test(T[U])&&/-?\d+(\.\d*)?(e-?\d+)?$/.test(E)){c(T[U],E,m),k=!0;break}if(T[U+1]&&T[U+1].match(/\W/)){c(T[U],m.slice(U+2),m),k=!0;break}else c(T[U],e.strings[T[U]]?"":!0,m)}h=m.slice(-1)[0],!k&&h!=="-"&&(r[p+1]&&!/^(-|--)[^-]/.test(r[p+1])&&!e.bools[h]&&(!t[h]||!i(h))?(c(h,r[p+1],m),p+=1):r[p+1]&&/^(true|false)$/.test(r[p+1])?(c(h,r[p+1]==="true",m),p+=1):c(h,e.strings[h]?"":!0,m))}else if((!e.unknownFn||e.unknownFn(m)!==!1)&&s._.push(e.strings._||!W1(m)?m:Number(m)),n.stopEarly){s._.push.apply(s._,r.slice(p+1));break}}return Object.keys(o).forEach(function(O){wB(s,O.split("."))||(l(s,O.split("."),o[O]),(t[O]||[]).forEach(function(B){l(s,B.split("."),o[O])}))}),n["--"]?s["--"]=u.slice():u.forEach(function(O){s._.push(O)}),s}});function TB(r){return r.replace(bB,function(n,e,t,i,o,s){if(i)return"";if(o){let a=o.length;return o[a-1]===`
`?o[a-2]==="\r"?`\r
`:`
`:""}else return s?n.substring(1):n})}function lg(r){let n=TB(r);try{return JSON.parse(n)}catch{let t=n.replace(/,\s*([}\]])/g,"$1");return JSON.parse(t)}}var bB,Ny=_(()=>{bB=/("[^"\\]*(?:\\.[^"\\]*)*")|('[^'\\]*(?:\\.[^'\\]*)*')|(\/\*[^\/\*]*(?:(?:\*|\/)[^\/\*]*)*?\*\/)|(\/{2,}.*?(?:(?:\r?\n)|$))|(,\s*[}\]])/g});function G1(r){return`${PB}-${r}`}var PB,H1=_(()=>{PB=".devin-migration-force-reset"});import{execFileSync as z1}from"child_process";import{existsSync as dt,readFileSync as op,writeFileSync as Gi,mkdirSync as Wl,renameSync as dg,unlinkSync as Xn,rmSync as ur,cpSync as CB,readdirSync as Fy,statSync as Y1,statfsSync as AB,linkSync as RB,promises as ha}from"fs";import{homedir as us}from"os";import{join as _e,dirname as rp,relative as cg}from"path";function xB(r){if(!r||typeof r!="object"||Array.isArray(r))return!1;let n=r;return typeof n.migratedAt=="string"&&typeof n.version=="string"}function DB(r){if(!r||typeof r!="object"||Array.isArray(r))return!1;let n=r;return n.reason==="insufficient_disk"&&typeof n.requiredBytes=="number"&&typeof n.availableBytes=="number"&&typeof n.checkedAt=="string"&&typeof n.schemaVersion=="number"}function Q1(r){if(!r||typeof r!="object"||Array.isArray(r))return!1;let n=r;return typeof n.pid=="number"&&typeof n.startedAt=="string"}function kB(r){return dt(r)&&Fy(r).some(n=>n!==fi)}function mg(){switch(process.platform){case"win32":{let r=process.env.APPDATA;if(r)return r;let n=process.env.USERPROFILE;if(typeof n!="string")throw new Error("Windows: Unexpected undefined %USERPROFILE% environment variable");return _e(n,"AppData","Roaming")}case"darwin":return _e(us(),"Library","Application Support");case"linux":return process.env.XDG_CONFIG_HOME||_e(us(),".config");default:throw new Error("Platform not supported")}}function wo(r,n){let e=r+".tmp";Gi(e,JSON.stringify(n,null,"	")),dg(e,r)}function Wy(r){if(dt(r))try{let n=JSON.parse(op(r,"utf8"));return xB(n)?n:void 0}catch{return}}function Ly(r){return Wy(r)!==void 0}function My(r,n,e,t){let i=0,o=t??r;try{let s=Fy(r,{withFileTypes:!0});for(let a of s){let l=_e(r,a.name),c=cg(o,l).replace(/\\/g,"/");if(!(t===void 0&&n?.has(a.name))&&!e?.has(c)){if(a.isDirectory())i+=My(l,void 0,e,o);else if(a.isFile())try{i+=Y1(l).size}catch{}}}}catch{}return i}function q1(r){try{let n=dt(r)?r:rp(r),e=AB(n);return e.bavail*e.bsize}catch{return-1}}function nR(r,n,e,t){let i=[];if(r!==n){let u=r.replace(/\\/g,"/"),p=n.replace(/\\/g,"/");i.push([u,p]),r!==u&&(i.push([r,n]),i.push([r.replace(/\\/g,"\\\\"),n.replace(/\\/g,"\\\\")]))}let o=us(),s=_e(o,e)+"/",a=_e(o,t)+"/",l=s.replace(/\\/g,"/"),c=a.replace(/\\/g,"/");if(i.push([l,c]),s!==l){let u=_e(o,e)+"\\",p=_e(o,t)+"\\";i.push([u,p]),i.push([u.replace(/\\/g,"\\\\"),p.replace(/\\/g,"\\\\")])}return i}async function NB(r,n){let t=(await import("@vscode/sqlite3")).default.Database,i=By(r,"state.vscdb");for(let o of i)try{await LB(t,o,n)}catch(s){console.warn(`[migration] Failed to fix paths in ${o}: ${s}`)}}function LB(r,n,e){return new Promise((t,i)=>{let o=new r(n,s=>{if(s){i(s);return}o.serialize(()=>{for(let[a,l]of e){o.run("UPDATE ItemTable SET value = REPLACE(value, ?, ?) WHERE value LIKE ?",[a,l,`%${a}%`]);let c=a.replace(/ /g,"%20"),u=l.replace(/ /g,"%20");c!==a&&o.run("UPDATE ItemTable SET value = REPLACE(value, ?, ?) WHERE value LIKE ?",[c,u,`%${c}%`])}}),o.close(a=>{a?i(a):t()})})})}function rR(r,n){let e=!0,t=By(r,"storage.json");for(let i of t)try{let o=op(i,"utf8"),s=!1;for(let[a,l]of n){o.includes(a)&&(o=o.split(a).join(l),s=!0);let c=a.replace(/ /g,"%20"),u=l.replace(/ /g,"%20");c!==a&&o.includes(c)&&(o=o.split(c).join(u),s=!0)}s&&Gi(i,o,"utf8")}catch(o){console.warn(`[migration] Failed to fix paths in ${i}: ${o}`),e=!1}return e}function MB(r,n,e,t){let i=nR(n,r,e,t);return rR(r,i)}function By(r,n){let e=[];try{let t=Fy(r,{withFileTypes:!0});for(let i of t){let o=_e(r,i.name);i.isDirectory()?e.push(...By(o,n)):i.name===n&&e.push(o)}}catch{}return e}function UB(r){if(!r||r===process.pid)return!1;try{return process.kill(r,0),!0}catch(n){return n?.code==="EPERM"}}function FB(r,n){try{Wl(r,{recursive:!0})}catch{return}let e=_e(r,`${$1}-${n}`),t=`${e}.tmp.${process.pid}`,i={pid:process.pid,startedAt:new Date().toISOString()},o=()=>{try{Gi(t,JSON.stringify(i))}catch{return!1}try{return RB(t,e),!0}catch{return!1}finally{try{Xn(t)}catch{}}};if(o())return{lockPath:e};let s=!1;try{let a=JSON.parse(op(e,"utf8"));if(Q1(a)){let l=Date.now()-new Date(a.startedAt).getTime(),c=isNaN(l)||l>Z1,u=UB(a.pid);s=c||!u}else s=K1(e)}catch{s=K1(e)}if(s){try{Xn(e)}catch{}return o()?{lockPath:e}:void 0}}function K1(r){try{return Date.now()-Y1(r).mtimeMs>Z1}catch{return!1}}function Vi(r){try{Xn(r.lockPath)}catch{}}function iR(r){try{let n=op(r.lockPath,"utf8"),e=JSON.parse(n);if(Q1(e)){let t={...e,startedAt:new Date().toISOString()},i=`${r.lockPath}.refresh.${process.pid}`;Gi(i,JSON.stringify(t)),dg(i,r.lockPath)}}catch{}}async function WB(r,n){if(process.platform!=="darwin")return;let t=process.getBuiltinModule("node:module").createRequire(import.meta.url)("keytar"),i=`${r} Safe Storage`,o=`${n} Safe Storage`,s=`${r} Key`,a=`${n} Key`,l;try{l=await t.getPassword(i,s)}catch{console.log(`[migration] Keychain migration skipped \u2014 old entry '${i}' not found or not accessible`);return}if(!l){console.log(`[migration] No password found in old keychain entry '${i}'`);return}try{if(await t.getPassword(o,a)!==null){console.log(`[migration] Keychain entry '${o}' (account '${a}') already exists \u2014 skipping to avoid overwriting`);return}}catch{console.log(`[migration] Failed to check keychain entry '${o}' \u2014 user may need to re-login`);return}try{await t.setPassword(o,a,l),console.log(`[migration] Successfully migrated keychain entry from '${i}' to '${o}'`)}catch{console.log(`[migration] Failed to write keychain entry '${o}' \u2014 user may need to re-login`)}}function j1(r,n){try{let e=z1("secret-tool",["lookup","xdg:schema",r,"application",n],{stdio:["pipe","pipe","pipe"]});return e&&e.length>0?{kind:"found",secret:e}:{kind:"not-found"}}catch(e){let t=e,i=t.stderr?t.stderr.toString():"";return t.code!=="ENOENT"&&t.status===1&&i.trim()===""?{kind:"not-found"}:{kind:"error"}}}function BB(r,n){if(process.platform!=="linux")return;let e="chrome_libsecret_os_crypt_password_v2",t=j1(e,r);if(t.kind!=="found"){console.log(`[migration] libsecret migration skipped \u2014 old entry (application='${r}') not found or not accessible`);return}let i=j1(e,n);if(i.kind==="found"){console.log(`[migration] libsecret entry (application='${n}') already exists \u2014 skipping to avoid overwriting`);return}if(i.kind==="error"){console.log(`[migration] Failed to check libsecret entry (application='${n}') \u2014 user may need to re-login`);return}try{z1("secret-tool",["store","--label","Chromium Safe Storage","xdg:schema",e,"application",n],{input:t.secret,stdio:["pipe","pipe","pipe"]}),console.log(`[migration] Successfully migrated libsecret entry from application='${r}' to application='${n}'`)}catch{console.log(`[migration] Failed to write libsecret entry (application='${n}') \u2014 user may need to re-login`)}}function oR(r){let{nameShort:n,dataFolderName:e,oldDataFolderName:t,oldNameShort:i}=r;if(!t||!i)return!1;let o=mg(),s=_e(o,G1(n));if(!dt(s))return!1;if(process.env.VSCODE_DEV){try{Xn(s)}catch{}return!1}let a=_e(o,n),l=_e(us(),e);try{ur(a,{recursive:!0,force:!0})}catch(c){console.error(`[migration] reset: failed to remove ${a}: ${c}`)}try{ur(l,{recursive:!0,force:!0})}catch(c){console.error(`[migration] reset: failed to remove ${l}: ${c}`)}try{ur(a+pg,{recursive:!0,force:!0})}catch{}for(let c of[`${X1}-${n}`,`${ug}-${n}`,`${$1}-${n}`])try{Xn(_e(o,c))}catch{}if(dt(a))return console.error(`[migration] reset: ${a} still exists after cleanup; keeping sentinel to retry on next launch.`),!1;try{Xn(s)}catch(c){console.error(`[migration] reset: failed to remove sentinel ${s}: ${c}`)}return console.log("[migration] Force reset complete; standard first-launch migration will re-run."),!0}function sR(r){let{nameShort:n,dataFolderName:e,oldDataFolderName:t,oldNameShort:i,version:o}=r;if(!t||!i)return{migrationResult:{migrated:!1,freshInstall:!1,skippedExistingData:!1,skippedDiskSpace:!1}};if(i===n&&t===e)return{migrationResult:{migrated:!1,freshInstall:!1,skippedExistingData:!1,skippedDiskSpace:!1}};let s=mg(),a=_e(s,i),l=_e(s,n),c=_e(us(),t),u=_e(us(),e),p=_e(c,"extensions"),m=_e(u,"extensions"),h=_e(l,sp),E=Wy(h);if(E)return{migrationResult:{migrated:!1,freshInstall:!1,skippedExistingData:!1,skippedDiskSpace:!1,migratedAt:E.migratedAt}};let y=_e(s,`${X1}-${n}`);if(dt(y))try{let T=JSON.parse(op(y,"utf8"));if(DB(T)&&T.schemaVersion===J1){let k=T,U=q1(s);if(U>=0&&U<k.requiredBytes)return k.checkedAt=new Date().toISOString(),k.availableBytes=U,wo(y,k),{migrationResult:{migrated:!1,freshInstall:!1,skippedExistingData:!1,skippedDiskSpace:!0}};Xn(y)}else try{Xn(y)}catch{}}catch{try{Xn(y)}catch{}}let P=FB(s,n);if(!P)return{migrationResult:{migrated:!1,freshInstall:!1,skippedExistingData:!1,skippedDiskSpace:!1,skippedConcurrent:!0}};try{if(Ly(h))return Vi(P),{migrationResult:{migrated:!1,freshInstall:!1,skippedExistingData:!1,skippedDiskSpace:!1}};if(!dt(a)){Wl(l,{recursive:!0});let ht={migratedAt:new Date().toISOString(),freshInstall:!0,version:o};return wo(h,ht),Vi(P),{migrationResult:{migrated:!1,freshInstall:!0,skippedExistingData:!1,skippedDiskSpace:!1}}}let T=_e(l,fi),k=l+pg,U=_e(m,fi),O=_e(s,`${ug}-${n}`);if(dt(O)){if(console.log(`[migration] Skipped: previous migration attempt failed (marker at ${O})`),dt(k))try{ur(k,{recursive:!0,force:!0})}catch{}return Vi(P),{migrationResult:{migrated:!1,freshInstall:!1,skippedExistingData:!1,skippedDiskSpace:!1,error:`Previous migration attempt failed (marker at ${O})`}}}dt(k)&&(ur(k,{recursive:!0,force:!0}),dt(l)&&dt(T)&&ur(l,{recursive:!0,force:!0}),dt(U)&&ur(m,{recursive:!0,force:!0}));let B=dt(_e(u,ip)),he=dt(l)&&!dt(T),Q=kB(m)&&!dt(U)&&!B;if(he){let ht={migratedAt:new Date().toISOString(),skippedExistingDevinData:!0,version:o};return wo(h,ht),Vi(P),{migrationResult:{migrated:!1,freshInstall:!1,skippedExistingData:!0,skippedDiskSpace:!1}}}let le=My(a,eR,tR);dt(p)&&!Q&&(le+=My(p));let ne=Math.ceil(le*OB),De=q1(s);if(De>=0&&De<ne){let ht={reason:"insufficient_disk",requiredBytes:ne,availableBytes:De,checkedAt:new Date().toISOString(),schemaVersion:J1};return wo(y,ht),Vi(P),{migrationResult:{migrated:!1,freshInstall:!1,skippedExistingData:!1,skippedDiskSpace:!0}}}return dt(l)&&ur(l,{recursive:!0,force:!0}),dt(m)&&dt(U)&&ur(m,{recursive:!0,force:!0}),Q||(Wl(m,{recursive:!0}),Gi(U,new Date().toISOString())),Wl(l,{recursive:!0}),Gi(T,new Date().toISOString()),{migrationResult:{migrated:!1,freshInstall:!1,skippedExistingData:!1,skippedDiskSpace:!1},pendingMigration:{oldDataDir:a,newDataDir:l,oldExtensionsDir:p,newExtensionsDir:m,newDataFolderDir:u,oldDataFolderName:t,dataFolderName:e,nameShort:n,nameLong:r.nameLong,oldNameLong:r.nameLong.replace(n,i),oldNameShort:i,version:o,hasExistingNewExtData:Q,isArgvPrecopy:B,lockHandle:P,totalBytes:le}}}catch(T){try{let k=_e(l,fi);dt(l)&&dt(k)&&!Ly(h)&&ur(l,{recursive:!0,force:!0});let U=_e(m,fi);dt(m)&&dt(U)&&ur(m,{recursive:!0,force:!0})}catch{}return Vi(P),console.error(`[migration] prepareMigration failed: ${T}`),{migrationResult:{migrated:!1,freshInstall:!1,skippedExistingData:!1,skippedDiskSpace:!1,error:String(T)}}}}async function Uy(r,n,e,t,i,o){await ha.mkdir(n,{recursive:!0});let s=await ha.readdir(r,{withFileTypes:!0}),a=o??r;for(let l of s){let c=_e(r,l.name),u=cg(a,c).replace(/\\/g,"/");if(o===void 0&&t?.has(l.name)||i?.has(u))continue;let p=_e(n,l.name);if(l.isDirectory())await Uy(c,p,e,void 0,i,a);else if(l.isSymbolicLink()){let m=await ha.readlink(c);await ha.symlink(m,p)}else if(l.isFile()){let m=await ha.stat(c);await ha.copyFile(c,p),await ha.utimes(p,m.atime,m.mtime),e&&e(m.size,c)}}}async function aR(r,n,e){let{oldDataDir:t,newDataDir:i,oldExtensionsDir:o,newExtensionsDir:s,newDataFolderDir:a,oldDataFolderName:l,dataFolderName:c,version:u,hasExistingNewExtData:p,lockHandle:m}=r,h=_e(i,fi),E=_e(s,fi),y=_e(i,sp),P=0,T=B=>{n&&n(P,r.totalBytes,B)};try{await Uy(t,i,(B,he)=>{P+=B,T(cg(t,he))},eR,tR)}catch(B){return console.error(`[migration] User data copy failed: ${B}`),VB(i,"User data copy failed",B),GB(i,s,E,r.nameShort,B),Vi(m),{migrated:!1,freshInstall:!1,skippedExistingData:!1,skippedDiskSpace:!1,error:String(B)}}let k=[];if(dt(o)&&!p)try{await Uy(o,s,(B,he)=>{P+=B,T(_e("extensions",cg(o,he)))})}catch(B){console.error(`[migration] Extensions copy failed (non-fatal): ${B}`),k.push(`extensions: ${B}`)}try{MB(i,t,l,c)}catch(B){console.error(`[migration] JSON fixup failed (non-fatal): ${B}`),k.push(`jsonFixup: ${B}`)}try{process.platform==="darwin"&&e&&e(),await WB(r.oldNameLong,r.nameLong),BB(r.oldNameShort,r.nameShort)}catch(B){console.error(`[migration] Keychain migration failed (non-fatal): ${B}`),k.push(`keychain: ${B}`)}let U=new Date().toISOString(),O={migratedAt:U,fromDir:t,version:u,...p?{skippedExistingExtensions:!0}:{},fixupIncomplete:!0};wo(y,O);try{Xn(h)}catch{}try{Xn(E)}catch{}try{Xn(_e(a,ip))}catch{}return Vi(m),{migrated:!0,freshInstall:!1,skippedExistingData:!1,skippedDiskSpace:!1,migratedAt:U,...k.length>0?{error:k.join("; ")}:{}}}function VB(r,n,e){try{let t=_e(rp(r),"migration-error.log"),i=e instanceof Error?e.stack||e.message:String(e);Gi(t,`[${new Date().toISOString()}] ${n}:
${i}
`)}catch{}}function GB(r,n,e,t,i){let o=r+pg;try{dt(r)&&dg(r,o)}catch{try{ur(r,{recursive:!0,force:!0})}catch{}}if(dt(e))try{ur(n,{recursive:!0,force:!0})}catch{}try{let s=_e(rp(r),`${ug}-${t}`);wo(s,{reason:"migration_failed",error:String(i),failedAt:new Date().toISOString()})}catch{}}function lR(r,n){let{newDataDir:e,newExtensionsDir:t,nameShort:i,lockHandle:o}=r,s=_e(t,fi),a=e+pg;try{let l=_e(rp(e),"migration-error.log"),c=n instanceof Error?n.stack||n.message:String(n);Gi(l,`[${new Date().toISOString()}] Migration setup failed:
${c}
`)}catch{}try{dt(e)&&dg(e,a)}catch{try{ur(e,{recursive:!0,force:!0})}catch{}}if(dt(s))try{ur(t,{recursive:!0,force:!0})}catch{}try{let l=_e(rp(e),`${ug}-${i}`);wo(l,{reason:"migration_setup_failed",error:String(n),failedAt:new Date().toISOString()})}catch{}Vi(o)}function cR(r){let{newDataDir:n,newExtensionsDir:e,newDataFolderDir:t,version:i,lockHandle:o}=r,s=_e(n,sp),a=_e(n,fi),l=_e(e,fi),c={migratedAt:new Date().toISOString(),freshInstall:!0,version:i,userSkipped:!0};wo(s,c);try{Xn(a)}catch{}try{Xn(l)}catch{}if(r.isArgvPrecopy){try{Xn(_e(t,"argv.json"))}catch{}let u=_e(t,ip);try{Xn(u)}catch{}}return Vi(o),{migrated:!1,freshInstall:!0,skippedExistingData:!1,skippedDiskSpace:!1}}async function dR(r){let{nameShort:n,dataFolderName:e,oldDataFolderName:t,oldNameShort:i}=r;if(!t||!i||i===n&&t===e)return;let o=mg(),s=_e(o,n),a=_e(s,sp),l=Wy(a);if(!(!l||!l.fixupIncomplete||!l.fromDir))try{let c=nR(l.fromDir,s,t,e);rR(s,c),await NB(s,c);let{fixupIncomplete:u,...p}=l;wo(a,p)}catch(c){console.warn(`[migration] Async SQLite fixup failed, will retry on next launch: ${c}`)}}function uR(r){let{dataFolderName:n,oldDataFolderName:e,oldNameShort:t,nameShort:i}=r;if(!e||!t||t===i&&e===n||process.env.VSCODE_DEV||process.env.VSCODE_PORTABLE||process.env.VSCODE_APPDATA||process.argv.some(h=>h.startsWith("--user-data-dir")))return;let o=_e(us(),e),s=_e(us(),n),a=_e(o,"argv.json"),l=_e(s,"argv.json"),c=mg(),u=_e(c,i),p=_e(u,sp),m=_e(u,fi);if(!Ly(p)&&!(dt(u)&&!dt(m))){if(!dt(a)){if(!dt(s))try{Wl(s,{recursive:!0}),Gi(_e(s,ip),new Date().toISOString())}catch{}return}try{let h=dt(s);Wl(s,{recursive:!0}),CB(a,l),h||Gi(_e(s,ip),new Date().toISOString())}catch(h){console.warn(`[migration] Failed to copy argv.json: ${h}`)}}}var sp,fi,ug,X1,J1,ip,$1,pg,OB,Z1,eR,tR,Vy=_(()=>{H1();sp=".devin-migration-complete",fi=".devin-migration-in-progress",ug=".devin-migration-failed",X1=".devin-migration-insufficient-disk",J1=5,ip=".devin-argv-precopy",$1=".devin-migration.lock",pg=".failed",OB=1.1,Z1=3600*1e3;eR=new Set(["Cache","CachedConfigurations","CachedData","CachedExtensionVSIXs","CachedProfilesData","Code Cache","GPUCache","DawnGraphiteCache","DawnWebGPUCache","GrShaderCache","ShaderCache","blob_storage","logs","crashpad","Crashpad"]),tR=new Set(["User/History","Partitions/vscode-browser/Cache"])});import{homedir as lp}from"os";import{resolve as Gy,isAbsolute as Hy,join as bo}from"path";function jy(){return Ky}function pR(){Ky=void 0}function zy(r){ap=r}function Yy(r,n){ps=r,n&&!process.env.VSCODE_EXTENSIONS&&(process.env.VSCODE_EXTENSIONS=bo(lp(),n,"extensions"))}function fg(r,n,e){if(!e&&ps!==void 0)return ps;let t=qy(r,n),i=[t];Hy(t)||i.unshift(Jy);let o=Gy(...i);if(e&&!HB(r)){try{let s=sR(e);if(ap=s.migrationResult,s.pendingMigration)Ky=s.pendingMigration;else if((ap.skippedDiskSpace||ap.error||ap.skippedConcurrent)&&e.oldNameShort){e.oldDataFolderName&&!process.env.VSCODE_EXTENSIONS&&(process.env.VSCODE_EXTENSIONS=bo(lp(),e.oldDataFolderName,"extensions"));let a=qy(r,e.oldNameShort),l=[a];return Hy(a)||l.unshift(Jy),ps=Gy(...l),ps}}catch(s){if(console.error(`[migration] Unexpected error during migration: ${s}`),e.oldNameShort){e.oldDataFolderName&&!process.env.VSCODE_EXTENSIONS&&(process.env.VSCODE_EXTENSIONS=bo(lp(),e.oldDataFolderName,"extensions"));let a=qy(r,e.oldNameShort),l=[a];return Hy(a)||l.unshift(Jy),ps=Gy(...l),ps}}ps=o}return o}function HB(r){return!!(process.env.VSCODE_DEV||process.env.VSCODE_PORTABLE||process.env.VSCODE_APPDATA||r["user-data-dir"])}function qy(r,n){process.env.VSCODE_DEV&&(process.isEmbeddedApp?n="sessions-oss-dev":n="code-oss-dev");let e=process.env.VSCODE_PORTABLE;if(e)return bo(e,"user-data");let t=process.env.VSCODE_APPDATA;if(t)return bo(t,n);let i=r["user-data-dir"];if(i)return i;switch(process.platform){case"win32":if(t=process.env.APPDATA,!t){let o=process.env.USERPROFILE;if(typeof o!="string")throw new Error("Windows: Unexpected undefined %USERPROFILE% environment variable");t=bo(o,"AppData","Roaming")}break;case"darwin":t=bo(lp(),"Library","Application Support");break;case"linux":t=process.env.XDG_CONFIG_HOME||bo(lp(),".config");break;default:throw new Error("Platform not supported")}return bo(t,n)}var Jy,ap,ps,Ky,Qy=_(()=>{Vy();Jy=process.env.VSCODE_CWD||process.cwd()});function Xy(){return globalThis._VSCODE_NLS_MESSAGES}function cp(){return globalThis._VSCODE_NLS_LANGUAGE}function gg(r,n){let e;return n.length===0?e=r:e=r.replace(/\{(\d+)\}/g,(t,i)=>{let o=n[parseInt(i)],s=t;return typeof o=="string"?s=o:(typeof o=="number"||typeof o=="boolean"||o===void 0||o===null)&&(s=String(o)),s}),JB&&(e="\uFF3B"+e.replace(/[aouei]/g,"$&$&")+"\uFF3D"),e}function v(r,n,...e){return gg(typeof r=="number"?mR(r,n):n,e)}function mR(r,n){let e=Xy()?.[r];if(typeof e!="string"){if(typeof n=="string")return n;throw new Error(`!!! NLS MISSING: ${r} !!!`)}return e}function $y(r,n,...e){let t;typeof r=="number"?t=mR(r,n):t=n;let i=gg(t,e);return{value:i,original:n===t?i:gg(n,e)}}var JB,We=_(()=>{JB=cp()==="pseudo"||typeof document<"u"&&document.location&&typeof document.location.hash=="string"&&document.location.hash.indexOf("pseudo=true")>=0});function Eg(r){switch(r){case 0:return"Web";case 1:return"Mac";case 2:return"Linux";case 3:return"Windows"}}function nS(r){return parseFloat(r)>=25}var Ia,up,pp,dp,gR,hR,Zy,qB,IR,vR,KB,hg,Ig,fR,ER,To,Po,Tr,yR,jB,vg,q,$,fe,yg,Sg,$n,zB,SR,_R,Co,Hi,Ur,YB,eS,QB,wR,Yt,tS,bR,TR,PR,_G,ce=_(()=>{We();Ia="en",up=!1,pp=!1,dp=!1,gR=!1,hR=!1,Zy=!1,qB=!1,IR=!1,vR=!1,KB=!1,Ig=Ia,fR=Ia,Po=globalThis;typeof Po.vscode<"u"&&typeof Po.vscode.process<"u"?Tr=Po.vscode.process:typeof process<"u"&&typeof process?.versions?.node=="string"&&(Tr=process);yR=typeof Tr?.versions?.electron=="string",jB=yR&&Tr?.type==="renderer";if(typeof Tr=="object"){up=Tr.platform==="win32",pp=Tr.platform==="darwin",dp=Tr.platform==="linux",gR=dp&&!!Tr.env.SNAP&&!!Tr.env.SNAP_REVISION,qB=yR,vR=!!Tr.env.CI||!!Tr.env.BUILD_ARTIFACTSTAGINGDIRECTORY||!!Tr.env.GITHUB_WORKSPACE,hg=Ia,Ig=Ia;let r=Tr.env.VSCODE_NLS_CONFIG;if(r)try{let n=JSON.parse(r);hg=n.userLocale,fR=n.osLocale,Ig=n.resolvedLanguage||Ia,ER=n.languagePack?.translationsConfigFile}catch{}hR=!0}else typeof navigator=="object"&&!jB?(To=navigator.userAgent,up=To.indexOf("Windows")>=0,pp=To.indexOf("Macintosh")>=0,IR=(To.indexOf("Macintosh")>=0||To.indexOf("iPad")>=0||To.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,dp=To.indexOf("Linux")>=0,KB=To?.indexOf("Mobi")>=0,Zy=!0,Ig=cp()||Ia,hg=navigator.language.toLowerCase(),fR=hg):console.error("Unable to resolve platform.");vg=0;pp?vg=1:up?vg=3:dp&&(vg=2);q=up,$=pp,fe=dp,yg=gR,Sg=hR,$n=Zy,zB=Zy&&typeof Po.importScripts=="function",SR=zB?Po.origin:void 0,_R=vR,Co=vg,Hi=To,Ur=Ig;(t=>{function r(){return Ur}t.value=r;function n(){return Ur.length===2?Ur==="en":Ur.length>=3?Ur[0]==="e"&&Ur[1]==="n"&&Ur[2]==="-":!1}t.isDefaultVariant=n;function e(){return Ur==="en"}t.isDefault=e})(YB||={});eS=ER,QB=typeof Po.postMessage=="function"&&!Po.importScripts,wR=(()=>{if(QB){let r=[];Po.addEventListener("message",e=>{if(e.data&&e.data.vscodeScheduleAsyncWork)for(let t=0,i=r.length;t<i;t++){let o=r[t];if(o.id===e.data.vscodeScheduleAsyncWork){r.splice(t,1),o.callback();return}}});let n=0;return e=>{let t=++n;r.push({id:t,callback:e}),Po.postMessage({vscodeScheduleAsyncWork:t},"*")}}return r=>setTimeout(r)})(),Yt=pp||IR?2:up?1:3,tS=!!(Hi&&Hi.indexOf("Chrome")>=0),bR=!!(Hi&&Hi.indexOf("Firefox")>=0),TR=!!(!tS&&Hi&&Hi.indexOf("Safari")>=0),PR=!!(Hi&&Hi.indexOf("Edg/")>=0),_G=!!(Hi&&Hi.indexOf("Android")>=0)});var va,rS,Fr,En,_g,CR,gi=_(()=>{ce();rS=globalThis.vscode;if(typeof rS<"u"&&typeof rS.process<"u"){let r=rS.process;va={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"?va={get platform(){return process.platform},get arch(){return process.arch},get env(){return process.env},cwd(){return process.env.VSCODE_CWD||process.cwd()}}:va={get platform(){return q?"win32":$?"darwin":"linux"},get arch(){},get env(){return{}},cwd(){return"/"}};Fr=va.cwd,En=va.env,_g=va.platform,CR=va.arch});function n4(r,n){if(r===null||typeof r!="object")throw new wg(n,"Object",r)}function tn(r,n){if(typeof r!="string")throw new wg(n,"string",r)}function Ge(r){return r===Rn||r===Pr}function iS(r){return r===Rn}function Ro(r){return r>=XB&&r<=ZB||r>=$B&&r<=e4}function bg(r,n,e,t){let i="",o=0,s=-1,a=0,l=0;for(let c=0;c<=r.length;++c){if(c<r.length)l=r.charCodeAt(c);else{if(t(l))break;l=Rn}if(t(l)){if(!(s===c-1||a===1))if(a===2){if(i.length<2||o!==2||i.charCodeAt(i.length-1)!==Ea||i.charCodeAt(i.length-2)!==Ea){if(i.length>2){let u=i.lastIndexOf(e);u===-1?(i="",o=0):(i=i.slice(0,u),o=i.length-1-i.lastIndexOf(e)),s=c,a=0;continue}else if(i.length!==0){i="",o=0,s=c,a=0;continue}}n&&(i+=i.length>0?`${e}..`:"..",o=2)}else i.length>0?i+=`${e}${r.slice(s+1,c)}`:i=r.slice(s+1,c),o=c-s-1;s=c,a=0}else l===Ea&&a!==-1?++a:a=-1}return i}function r4(r){return r?`${r[0]==="."?"":"."}${r}`:""}function RR(r,n){n4(n,"pathObject");let e=n.dir||n.root,t=n.base||`${n.name||""}${r4(n.ext)}`;return e?e===n.root?`${e}${t}`:`${e}${r}${t}`:t}var XB,$B,ZB,e4,Ea,Rn,Pr,Ao,t4,wg,Cr,Ct,i4,Se,kt,fs,H,Nt,Tg,ze,Pe,Vl,TG,PG,CG,nn,Pg,Ne=_(()=>{gi();XB=65,$B=97,ZB=90,e4=122,Ea=46,Rn=47,Pr=92,Ao=58,t4=63,wg=class extends Error{constructor(n,e,t){let i;typeof e=="string"&&e.indexOf("not ")===0?(i="must not be",e=e.replace(/^not /,"")):i="must be";let o=n.indexOf(".")!==-1?"property":"argument",s=`The "${n}" ${o} ${i} of type ${e}`;s+=`. Received type ${typeof t}`,super(s),this.code="ERR_INVALID_ARG_TYPE"}};Cr=_g==="win32";Ct={resolve(...r){let n="",e="",t=!1;for(let i=r.length-1;i>=-1;i--){let o;if(i>=0){if(o=r[i],tn(o,`paths[${i}]`),o.length===0)continue}else n.length===0?o=Fr():(o=En[`=${n}`]||Fr(),(o===void 0||o.slice(0,2).toLowerCase()!==n.toLowerCase()&&o.charCodeAt(2)===Pr)&&(o=`${n}\\`));let s=o.length,a=0,l="",c=!1,u=o.charCodeAt(0);if(s===1)Ge(u)&&(a=1,c=!0);else if(Ge(u))if(c=!0,Ge(o.charCodeAt(1))){let p=2,m=p;for(;p<s&&!Ge(o.charCodeAt(p));)p++;if(p<s&&p!==m){let h=o.slice(m,p);for(m=p;p<s&&Ge(o.charCodeAt(p));)p++;if(p<s&&p!==m){for(m=p;p<s&&!Ge(o.charCodeAt(p));)p++;(p===s||p!==m)&&(l=`\\\\${h}\\${o.slice(m,p)}`,a=p)}}}else a=1;else Ro(u)&&o.charCodeAt(1)===Ao&&(l=o.slice(0,2),a=2,s>2&&Ge(o.charCodeAt(2))&&(c=!0,a=3));if(l.length>0)if(n.length>0){if(l.toLowerCase()!==n.toLowerCase())continue}else n=l;if(t){if(n.length>0)break}else if(e=`${o.slice(a)}\\${e}`,t=c,c&&n.length>0)break}return e=bg(e,!t,"\\",Ge),t?`${n}\\${e}`:`${n}${e}`||"."},normalize(r){tn(r,"path");let n=r.length;if(n===0)return".";let e=0,t,i=!1,o=r.charCodeAt(0);if(n===1)return iS(o)?"\\":r;if(Ge(o))if(i=!0,Ge(r.charCodeAt(1))){let a=2,l=a;for(;a<n&&!Ge(r.charCodeAt(a));)a++;if(a<n&&a!==l){let c=r.slice(l,a);for(l=a;a<n&&Ge(r.charCodeAt(a));)a++;if(a<n&&a!==l){for(l=a;a<n&&!Ge(r.charCodeAt(a));)a++;if(a===n)return`\\\\${c}\\${r.slice(l)}\\`;a!==l&&(t=`\\\\${c}\\${r.slice(l,a)}`,e=a)}}}else e=1;else Ro(o)&&r.charCodeAt(1)===Ao&&(t=r.slice(0,2),e=2,n>2&&Ge(r.charCodeAt(2))&&(i=!0,e=3));let s=e<n?bg(r.slice(e),!i,"\\",Ge):"";if(s.length===0&&!i&&(s="."),s.length>0&&Ge(r.charCodeAt(n-1))&&(s+="\\"),!i&&t===void 0&&r.includes(":")){if(s.length>=2&&Ro(s.charCodeAt(0))&&s.charCodeAt(1)===Ao)return`.\\${s}`;let a=r.indexOf(":");do if(a===n-1||Ge(r.charCodeAt(a+1)))return`.\\${s}`;while((a=r.indexOf(":",a+1))!==-1)}return t===void 0?i?`\\${s}`:s:i?`${t}\\${s}`:`${t}${s}`},isAbsolute(r){tn(r,"path");let n=r.length;if(n===0)return!1;let e=r.charCodeAt(0);return Ge(e)||n>2&&Ro(e)&&r.charCodeAt(1)===Ao&&Ge(r.charCodeAt(2))},join(...r){if(r.length===0)return".";let n,e;for(let o=0;o<r.length;++o){let s=r[o];tn(s,"path"),s.length>0&&(n===void 0?n=e=s:n+=`\\${s}`)}if(n===void 0)return".";let t=!0,i=0;if(typeof e=="string"&&Ge(e.charCodeAt(0))){++i;let o=e.length;o>1&&Ge(e.charCodeAt(1))&&(++i,o>2&&(Ge(e.charCodeAt(2))?++i:t=!1))}if(t){for(;i<n.length&&Ge(n.charCodeAt(i));)i++;i>=2&&(n=`\\${n.slice(i)}`)}return Ct.normalize(n)},relative(r,n){if(tn(r,"from"),tn(n,"to"),r===n)return"";let e=Ct.resolve(r),t=Ct.resolve(n);if(e===t||(r=e.toLowerCase(),n=t.toLowerCase(),r===n))return"";if(e.length!==r.length||t.length!==n.length){let E=e.split("\\"),y=t.split("\\");E[E.length-1]===""&&E.pop(),y[y.length-1]===""&&y.pop();let P=E.length,T=y.length,k=P<T?P:T,U;for(U=0;U<k&&E[U].toLowerCase()===y[U].toLowerCase();U++);return U===0?t:U===k?T>k?y.slice(U).join("\\"):P>k?"..\\".repeat(P-1-U)+"..":"":"..\\".repeat(P-U)+y.slice(U).join("\\")}let i=0;for(;i<r.length&&r.charCodeAt(i)===Pr;)i++;let o=r.length;for(;o-1>i&&r.charCodeAt(o-1)===Pr;)o--;let s=o-i,a=0;for(;a<n.length&&n.charCodeAt(a)===Pr;)a++;let l=n.length;for(;l-1>a&&n.charCodeAt(l-1)===Pr;)l--;let c=l-a,u=s<c?s:c,p=-1,m=0;for(;m<u;m++){let E=r.charCodeAt(i+m);if(E!==n.charCodeAt(a+m))break;E===Pr&&(p=m)}if(m!==u){if(p===-1)return t}else{if(c>u){if(n.charCodeAt(a+m)===Pr)return t.slice(a+m+1);if(m===2)return t.slice(a+m)}s>u&&(r.charCodeAt(i+m)===Pr?p=m:m===2&&(p=3)),p===-1&&(p=0)}let h="";for(m=i+p+1;m<=o;++m)(m===o||r.charCodeAt(m)===Pr)&&(h+=h.length===0?"..":"\\..");return a+=p,h.length>0?`${h}${t.slice(a,l)}`:(t.charCodeAt(a)===Pr&&++a,t.slice(a,l))},toNamespacedPath(r){if(typeof r!="string"||r.length===0)return r;let n=Ct.resolve(r);if(n.length<=2)return r;if(n.charCodeAt(0)===Pr){if(n.charCodeAt(1)===Pr){let e=n.charCodeAt(2);if(e!==t4&&e!==Ea)return`\\\\?\\UNC\\${n.slice(2)}`}}else if(Ro(n.charCodeAt(0))&&n.charCodeAt(1)===Ao&&n.charCodeAt(2)===Pr)return`\\\\?\\${n}`;return n},dirname(r){tn(r,"path");let n=r.length;if(n===0)return".";let e=-1,t=0,i=r.charCodeAt(0);if(n===1)return Ge(i)?r:".";if(Ge(i)){if(e=t=1,Ge(r.charCodeAt(1))){let a=2,l=a;for(;a<n&&!Ge(r.charCodeAt(a));)a++;if(a<n&&a!==l){for(l=a;a<n&&Ge(r.charCodeAt(a));)a++;if(a<n&&a!==l){for(l=a;a<n&&!Ge(r.charCodeAt(a));)a++;if(a===n)return r;a!==l&&(e=t=a+1)}}}}else Ro(i)&&r.charCodeAt(1)===Ao&&(e=n>2&&Ge(r.charCodeAt(2))?3:2,t=e);let o=-1,s=!0;for(let a=n-1;a>=t;--a)if(Ge(r.charCodeAt(a))){if(!s){o=a;break}}else s=!1;if(o===-1){if(e===-1)return".";o=e}return r.slice(0,o)},basename(r,n){n!==void 0&&tn(n,"suffix"),tn(r,"path");let e=0,t=-1,i=!0,o;if(r.length>=2&&Ro(r.charCodeAt(0))&&r.charCodeAt(1)===Ao&&(e=2),n!==void 0&&n.length>0&&n.length<=r.length){if(n===r)return"";let s=n.length-1,a=-1;for(o=r.length-1;o>=e;--o){let l=r.charCodeAt(o);if(Ge(l)){if(!i){e=o+1;break}}else a===-1&&(i=!1,a=o+1),s>=0&&(l===n.charCodeAt(s)?--s===-1&&(t=o):(s=-1,t=a))}return e===t?t=a:t===-1&&(t=r.length),r.slice(e,t)}for(o=r.length-1;o>=e;--o)if(Ge(r.charCodeAt(o))){if(!i){e=o+1;break}}else t===-1&&(i=!1,t=o+1);return t===-1?"":r.slice(e,t)},extname(r){tn(r,"path");let n=0,e=-1,t=0,i=-1,o=!0,s=0;r.length>=2&&r.charCodeAt(1)===Ao&&Ro(r.charCodeAt(0))&&(n=t=2);for(let a=r.length-1;a>=n;--a){let l=r.charCodeAt(a);if(Ge(l)){if(!o){t=a+1;break}continue}i===-1&&(o=!1,i=a+1),l===Ea?e===-1?e=a:s!==1&&(s=1):e!==-1&&(s=-1)}return e===-1||i===-1||s===0||s===1&&e===i-1&&e===t+1?"":r.slice(e,i)},format:RR.bind(null,"\\"),parse(r){tn(r,"path");let n={root:"",dir:"",base:"",ext:"",name:""};if(r.length===0)return n;let e=r.length,t=0,i=r.charCodeAt(0);if(e===1)return Ge(i)?(n.root=n.dir=r,n):(n.base=n.name=r,n);if(Ge(i)){if(t=1,Ge(r.charCodeAt(1))){let p=2,m=p;for(;p<e&&!Ge(r.charCodeAt(p));)p++;if(p<e&&p!==m){for(m=p;p<e&&Ge(r.charCodeAt(p));)p++;if(p<e&&p!==m){for(m=p;p<e&&!Ge(r.charCodeAt(p));)p++;p===e?t=p:p!==m&&(t=p+1)}}}}else if(Ro(i)&&r.charCodeAt(1)===Ao){if(e<=2)return n.root=n.dir=r,n;if(t=2,Ge(r.charCodeAt(2))){if(e===3)return n.root=n.dir=r,n;t=3}}t>0&&(n.root=r.slice(0,t));let o=-1,s=t,a=-1,l=!0,c=r.length-1,u=0;for(;c>=t;--c){if(i=r.charCodeAt(c),Ge(i)){if(!l){s=c+1;break}continue}a===-1&&(l=!1,a=c+1),i===Ea?o===-1?o=c:u!==1&&(u=1):o!==-1&&(u=-1)}return a!==-1&&(o===-1||u===0||u===1&&o===a-1&&o===s+1?n.base=n.name=r.slice(s,a):(n.name=r.slice(s,o),n.base=r.slice(s,a),n.ext=r.slice(o,a))),s>0&&s!==t?n.dir=r.slice(0,s-1):n.dir=n.root,n},sep:"\\",delimiter:";",win32:null,posix:null},i4=(()=>{if(Cr){let r=/\\/g;return()=>{let n=Fr().replace(r,"/");return n.slice(n.indexOf("/"))}}return()=>Fr()})(),Se={resolve(...r){let n="",e=!1;for(let t=r.length-1;t>=0&&!e;t--){let i=r[t];tn(i,`paths[${t}]`),i.length!==0&&(n=`${i}/${n}`,e=i.charCodeAt(0)===Rn)}if(!e){let t=i4();n=`${t}/${n}`,e=t.charCodeAt(0)===Rn}return n=bg(n,!e,"/",iS),e?`/${n}`:n.length>0?n:"."},normalize(r){if(tn(r,"path"),r.length===0)return".";let n=r.charCodeAt(0)===Rn,e=r.charCodeAt(r.length-1)===Rn;return r=bg(r,!n,"/",iS),r.length===0?n?"/":e?"./":".":(e&&(r+="/"),n?`/${r}`:r)},isAbsolute(r){return tn(r,"path"),r.length>0&&r.charCodeAt(0)===Rn},join(...r){if(r.length===0)return".";let n=[];for(let e=0;e<r.length;++e){let t=r[e];tn(t,"path"),t.length>0&&n.push(t)}return n.length===0?".":Se.normalize(n.join("/"))},relative(r,n){if(tn(r,"from"),tn(n,"to"),r===n||(r=Se.resolve(r),n=Se.resolve(n),r===n))return"";let e=1,t=r.length,i=t-e,o=1,s=n.length-o,a=i<s?i:s,l=-1,c=0;for(;c<a;c++){let p=r.charCodeAt(e+c);if(p!==n.charCodeAt(o+c))break;p===Rn&&(l=c)}if(c===a)if(s>a){if(n.charCodeAt(o+c)===Rn)return n.slice(o+c+1);if(c===0)return n.slice(o+c)}else i>a&&(r.charCodeAt(e+c)===Rn?l=c:c===0&&(l=0));let u="";for(c=e+l+1;c<=t;++c)(c===t||r.charCodeAt(c)===Rn)&&(u+=u.length===0?"..":"/..");return`${u}${n.slice(o+l)}`},toNamespacedPath(r){return r},dirname(r){if(tn(r,"path"),r.length===0)return".";let n=r.charCodeAt(0)===Rn,e=-1,t=!0;for(let i=r.length-1;i>=1;--i)if(r.charCodeAt(i)===Rn){if(!t){e=i;break}}else t=!1;return e===-1?n?"/":".":n&&e===1?"//":r.slice(0,e)},basename(r,n){n!==void 0&&tn(n,"suffix"),tn(r,"path");let e=0,t=-1,i=!0,o;if(n!==void 0&&n.length>0&&n.length<=r.length){if(n===r)return"";let s=n.length-1,a=-1;for(o=r.length-1;o>=0;--o){let l=r.charCodeAt(o);if(l===Rn){if(!i){e=o+1;break}}else a===-1&&(i=!1,a=o+1),s>=0&&(l===n.charCodeAt(s)?--s===-1&&(t=o):(s=-1,t=a))}return e===t?t=a:t===-1&&(t=r.length),r.slice(e,t)}for(o=r.length-1;o>=0;--o)if(r.charCodeAt(o)===Rn){if(!i){e=o+1;break}}else t===-1&&(i=!1,t=o+1);return t===-1?"":r.slice(e,t)},extname(r){tn(r,"path");let n=-1,e=0,t=-1,i=!0,o=0;for(let s=r.length-1;s>=0;--s){let a=r[s];if(a==="/"){if(!i){e=s+1;break}continue}t===-1&&(i=!1,t=s+1),a==="."?n===-1?n=s:o!==1&&(o=1):n!==-1&&(o=-1)}return n===-1||t===-1||o===0||o===1&&n===t-1&&n===e+1?"":r.slice(n,t)},format:RR.bind(null,"/"),parse(r){tn(r,"path");let n={root:"",dir:"",base:"",ext:"",name:""};if(r.length===0)return n;let e=r.charCodeAt(0)===Rn,t;e?(n.root="/",t=1):t=0;let i=-1,o=0,s=-1,a=!0,l=r.length-1,c=0;for(;l>=t;--l){let u=r.charCodeAt(l);if(u===Rn){if(!a){o=l+1;break}continue}s===-1&&(a=!1,s=l+1),u===Ea?i===-1?i=l:c!==1&&(c=1):i!==-1&&(c=-1)}if(s!==-1){let u=o===0&&e?1:o;i===-1||c===0||c===1&&i===s-1&&i===o+1?n.base=n.name=r.slice(u,s):(n.name=r.slice(u,i),n.base=r.slice(u,s),n.ext=r.slice(i,s))}return o>0?n.dir=r.slice(0,o-1):e&&(n.dir="/"),n},sep:"/",delimiter:":",win32:null,posix:null};Se.win32=Ct.win32=Ct;Se.posix=Ct.posix=Se;kt=Cr?Ct.normalize:Se.normalize,fs=Cr?Ct.isAbsolute:Se.isAbsolute,H=Cr?Ct.join:Se.join,Nt=Cr?Ct.resolve:Se.resolve,Tg=Cr?Ct.relative:Se.relative,ze=Cr?Ct.dirname:Se.dirname,Pe=Cr?Ct.basename:Se.basename,Vl=Cr?Ct.extname:Se.extname,TG=Cr?Ct.format:Se.format,PG=Cr?Ct.parse:Se.parse,CG=Cr?Ct.toNamespacedPath:Se.toNamespacedPath,nn=Cr?Ct.sep:Se.sep,Pg=Cr?Ct.delimiter:Se.delimiter});function kR(r,n){let e=Object.create(null);for(let t of r){let i=n(t),o=e[i];o||(o=e[i]=[]),o.push(t)}return e}var DR,OR,xR,oS=_(()=>{xR=class{constructor(n,e){this.toKey=e;this._map=new Map;this[DR]="SetWithKey";for(let t of n)this.add(t)}get size(){return this._map.size}add(n){let e=this.toKey(n);return this._map.set(e,n),this}delete(n){return this._map.delete(this.toKey(n))}has(n){return this._map.has(this.toKey(n))}*entries(){for(let n of this._map.values())yield[n,n]}keys(){return this.values()}*values(){for(let n of this._map.values())yield n}clear(){this._map.clear()}forEach(n,e){this._map.forEach(t=>n.call(e,t,t,this))}[(OR=Symbol.iterator,DR=Symbol.toStringTag,OR)](){return this.values()}}});function Rg(r){Hl.setUnexpectedErrorHandler(r)}function NR(r){if(!r||typeof r!="object")return!1;let n=r;return n.code==="EPIPE"&&n.syscall?.toUpperCase()==="WRITE"}function vt(r){mp(r)||Hl.onUnexpectedError(r)}function mp(r){return r instanceof Gt?!0:r instanceof Error&&r.name===Cg&&r.message===Cg}function Ji(){let r=new Error(Cg);return r.name=r.message,r}function xg(r){return r?new Error(`Illegal state: ${r}`):new Error("Illegal state")}function cn(r){return r?r.message?r.message:r.stack?r.stack.split(`
`)[0]:String(r):"Error"}var sS,Hl,Cg,Gt,Ag,Gl,Ar,hi,rt=_(()=>{sS=class{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(n){setTimeout(()=>{throw n.stack?Ar.isErrorNoTelemetry(n)?new Ar(n.message+`

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

`+n.stack):n},0)}}addListener(n){return this.listeners.push(n),()=>{this._removeListener(n)}}emit(n){this.listeners.forEach(e=>{e(n)})}_removeListener(n){this.listeners.splice(this.listeners.indexOf(n),1)}setUnexpectedErrorHandler(n){this.unexpectedErrorHandler=n}getUnexpectedErrorHandler(){return this.unexpectedErrorHandler}onUnexpectedError(n){this.unexpectedErrorHandler(n),this.emit(n)}onUnexpectedExternalError(n){this.unexpectedErrorHandler(n)}},Hl=new sS;Cg="Canceled";Gt=class extends Error{constructor(){super(Cg),this.name=this.message}},Ag=class r extends Error{static{this._name="PendingMigrationError"}static is(n){return n instanceof r||n instanceof Error&&n.name===r._name}constructor(n){super(n),this.name=r._name}};Gl=class extends Error{constructor(){super(...arguments);this.isExpected=!0}},Ar=class r extends Error{constructor(n){super(n),this.name="CodeExpectedError"}static fromError(n){if(n instanceof r)return n;let e=new r;return e.message=n.message,e.stack=n.stack,e}static isErrorNoTelemetry(n){return n.name==="CodeExpectedError"}},hi=class r extends Error{constructor(n){super(n||"An unexpected bug occurred."),Object.setPrototypeOf(this,r.prototype)}}});function xo(r,n){let e=this,t=!1,i;return function(){if(t)return i;if(t=!0,n)try{i=r.apply(e,arguments)}finally{n()}else i=r.apply(e,arguments);return i}}var Jl=_(()=>{});function o4(r,n,e=0,t=r.length){let i=e,o=t;for(;i<o;){let s=Math.floor((i+o)/2);n(r[s])?i=s+1:o=s}return i-1}function UR(r,n,e=0,t=r.length){let i=e,o=t;for(;i<o;){let s=Math.floor((i+o)/2);n(r[s])?o=s:i=s+1}return i}var MR,FR=_(()=>{MR=class r{constructor(n){this._array=n;this._findLastMonotonousLastIdx=0}static{this.assertInvariants=!1}findLastMonotonous(n){if(r.assertInvariants){if(this._prevFindLastPredicate){for(let t of this._array)if(this._prevFindLastPredicate(t)&&!n(t))throw new Error("MonotonousArray: current predicate must be weaker than (or equal to) the previous predicate.")}this._prevFindLastPredicate=n}let e=o4(this._array,n,this._findLastMonotonousLastIdx);return this._findLastMonotonousLastIdx=e+1,e===-1?void 0:this._array[e]}}});function gs(r,n,e=(t,i)=>t===i){if(r===n)return!0;if(!r||!n||r.length!==n.length)return!1;for(let t=0,i=r.length;t<i;t++)if(!e(r[t],n[t]))return!1;return!0}function BR(r,n,e){return s4(r.length,t=>e(r[t],n))}function s4(r,n){let e=0,t=r-1;for(;e<=t;){let i=(e+t)/2|0,o=n(i);if(o<0)e=i+1;else if(o>0)t=i-1;else return i}return-(e+1)}function Dg(r,n,e){if(r=r|0,r>=n.length)throw new TypeError("invalid index");let t=n[Math.floor(n.length*Math.random())],i=[],o=[],s=[];for(let a of n){let l=e(a,t);l<0?i.push(a):l>0?o.push(a):s.push(a)}return r<i.length?Dg(r,i,e):r<i.length+s.length?s[0]:Dg(r-(i.length+s.length),o,e)}function VR(r,n,e){if(e===0)return[];let t=r.slice(0,e).sort(n);return a4(r,n,t,e,r.length),t}function a4(r,n,e,t,i){for(let o=e.length;t<i;t++){let s=r[t];if(n(s,e[o-1])<0){e.pop();let a=UR(e,l=>n(s,l)<0);e.splice(a,0,s)}}}function wt(r){return r.filter(n=>!!n)}function Zn(r,n=e=>e){let e=new Set;return r.filter(t=>{let i=n(t);return e.has(i)?!1:(e.add(i),!0)})}function aS(r,n){return r.push(n),()=>l4(r,n)}function l4(r,n){let e=r.indexOf(n);if(e>-1)return r.splice(e,1),n}function lS(r,n){let e;if(typeof n=="number"){let t=n;e=()=>{let i=Math.sin(t++)*179426549;return i-Math.floor(i)}}else e=Math.random;for(let t=r.length-1;t>0;t-=1){let i=Math.floor(e()*(t+1)),o=r[t];r[t]=r[i],r[i]=o}}function GR(r){return r[Math.floor(Math.random()*r.length)]}function JR(r,n){return(e,t)=>n(r(e),r(t))}var HR,qR,WR,dn=_(()=>{FR();rt();(a=>{function r(l){return l<0}a.isLessThan=r;function n(l){return l<=0}a.isLessThanOrEqual=n;function e(l){return l>0}a.isGreaterThan=e;function t(l){return l===0}a.isNeitherLessOrGreaterThan=t,a.greaterThan=1,a.lessThan=-1,a.neitherLessOrGreaterThan=0})(HR||={});qR=(r,n)=>r-n,WR=class r{constructor(n){this.iterate=n}static{this.empty=new r(n=>{})}forEach(n){this.iterate(e=>(n(e),!0))}toArray(){let n=[];return this.iterate(e=>(n.push(e),!0)),n}filter(n){return new r(e=>this.iterate(t=>n(t)?e(t):!0))}map(n){return new r(e=>this.iterate(t=>e(n(t))))}some(n){let e=!1;return this.iterate(t=>(e=n(t),!e)),e}findFirst(n){let e;return this.iterate(t=>n(t)?(e=t,!1):!0),e}findLast(n){let e;return this.iterate(t=>(n(t)&&(e=t),!0)),e}findLastMaxBy(n){let e,t=!0;return this.iterate(i=>((t||HR.isGreaterThan(n(i,e)))&&(t=!1,e=i),!0)),e}}});function QR(r){let n=[];return r.forEach((e,t)=>{n.push(`${t} => ${e}`)}),`Map(${r.size}) {${n.join(", ")}}`}function XR(r){let n=[];return r.forEach(e=>{n.push(e)}),`Set(${r.size}) {${n.join(", ")}}`}function c4(r){return Array.isArray(r)}var cS,jR,Lt,zR,ql,YR,dS,uS,qi,Og,er=_(()=>{cS=class{constructor(n,e){this.uri=n;this.value=e}};Lt=class r{constructor(n,e){this[jR]="ResourceMap";if(n instanceof r)this.map=new Map(n.map),this.toKey=e??r.defaultToKey;else if(c4(n)){this.map=new Map,this.toKey=e??r.defaultToKey;for(let[t,i]of n)this.set(t,i)}else this.map=new Map,this.toKey=n??r.defaultToKey}static{this.defaultToKey=n=>n.toString()}set(n,e){return this.map.set(this.toKey(n),new cS(n,e)),this}get(n){return this.map.get(this.toKey(n))?.value}has(n){return this.map.has(this.toKey(n))}get size(){return this.map.size}clear(){this.map.clear()}delete(n){return this.map.delete(this.toKey(n))}forEach(n,e){typeof e<"u"&&(n=n.bind(e));for(let[t,i]of this.map)n(i.value,i.uri,this)}*values(){for(let n of this.map.values())yield n.value}*keys(){for(let n of this.map.values())yield n.uri}*entries(){for(let n of this.map.values())yield[n.uri,n.value]}*[(jR=Symbol.toStringTag,Symbol.iterator)](){for(let[,n]of this.map)yield[n.uri,n.value]}},ql=class{constructor(n,e){this[zR]="ResourceSet";!n||typeof n=="function"?this._map=new Lt(n):(this._map=new Lt(e),n.forEach(this.add,this))}get size(){return this._map.size}add(n){return this._map.set(n,n),this}clear(){this._map.clear()}delete(n){return this._map.delete(n)}forEach(n,e){this._map.forEach((t,i)=>n.call(e,i,i,this))}has(n){return this._map.has(n)}entries(){return this._map.entries()}keys(){return this._map.keys()}values(){return this._map.keys()}[(zR=Symbol.toStringTag,Symbol.iterator)](){return this.keys()}},dS=class{constructor(){this[YR]="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(n){return this._map.has(n)}get(n,e=0){let t=this._map.get(n);if(t)return e!==0&&this.touch(t,e),t.value}set(n,e,t=0){let i=this._map.get(n);if(i)i.value=e,t!==0&&this.touch(i,t);else{switch(i={key:n,value:e,next:void 0,previous:void 0},t){case 0:this.addItemLast(i);break;case 1:this.addItemFirst(i);break;case 2:this.addItemLast(i);break;default:this.addItemLast(i);break}this._map.set(n,i),this._size++}return this}delete(n){return!!this.remove(n)}remove(n){let e=this._map.get(n);if(e)return this._map.delete(n),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 n=this._head;return this._map.delete(n.key),this.removeItem(n),this._size--,n.value}forEach(n,e){let t=this._state,i=this._head;for(;i;){if(e?n.bind(e)(i.value,i.key,this):n(i.value,i.key,this),this._state!==t)throw new Error("LinkedMap got modified during iteration.");i=i.next}}keys(){let n=this,e=this._state,t=this._head,i={[Symbol.iterator](){return i},next(){if(n._state!==e)throw new Error("LinkedMap got modified during iteration.");if(t){let o={value:t.key,done:!1};return t=t.next,o}else return{value:void 0,done:!0}}};return i}values(){let n=this,e=this._state,t=this._head,i={[Symbol.iterator](){return i},next(){if(n._state!==e)throw new Error("LinkedMap got modified during iteration.");if(t){let o={value:t.value,done:!1};return t=t.next,o}else return{value:void 0,done:!0}}};return i}entries(){let n=this,e=this._state,t=this._head,i={[Symbol.iterator](){return i},next(){if(n._state!==e)throw new Error("LinkedMap got modified during iteration.");if(t){let o={value:[t.key,t.value],done:!1};return t=t.next,o}else return{value:void 0,done:!0}}};return i}[(YR=Symbol.toStringTag,Symbol.iterator)](){return this.entries()}trimOld(n){if(n>=this.size)return;if(n===0){this.clear();return}let e=this._head,t=this.size;for(;e&&t>n;)this._map.delete(e.key),e=e.next,t--;this._head=e,this._size=t,e&&(e.previous=void 0),this._state++}trimNew(n){if(n>=this.size)return;if(n===0){this.clear();return}let e=this._tail,t=this.size;for(;e&&t>n;)this._map.delete(e.key),e=e.previous,t--;this._tail=e,this._size=t,e&&(e.next=void 0),this._state++}addItemFirst(n){if(!this._head&&!this._tail)this._tail=n;else if(this._head)n.next=this._head,this._head.previous=n;else throw new Error("Invalid list");this._head=n,this._state++}addItemLast(n){if(!this._head&&!this._tail)this._head=n;else if(this._tail)n.previous=this._tail,this._tail.next=n;else throw new Error("Invalid list");this._tail=n,this._state++}removeItem(n){if(n===this._head&&n===this._tail)this._head=void 0,this._tail=void 0;else if(n===this._head){if(!n.next)throw new Error("Invalid list");n.next.previous=void 0,this._head=n.next}else if(n===this._tail){if(!n.previous)throw new Error("Invalid list");n.previous.next=void 0,this._tail=n.previous}else{let e=n.next,t=n.previous;if(!e||!t)throw new Error("Invalid list");e.previous=t,t.next=e}n.next=void 0,n.previous=void 0,this._state++}touch(n,e){if(!this._head||!this._tail)throw new Error("Invalid list");if(!(e!==1&&e!==2)){if(e===1){if(n===this._head)return;let t=n.next,i=n.previous;n===this._tail?(i.next=void 0,this._tail=i):(t.previous=i,i.next=t),n.previous=void 0,n.next=this._head,this._head.previous=n,this._head=n,this._state++}else if(e===2){if(n===this._tail)return;let t=n.next,i=n.previous;n===this._head?(t.previous=void 0,this._head=t):(t.previous=i,i.next=t),n.next=void 0,n.previous=this._tail,this._tail.next=n,this._tail=n,this._state++}}}toJSON(){let n=[];return this.forEach((e,t)=>{n.push([t,e])}),n}fromJSON(n){this.clear();for(let[e,t]of n)this.set(e,t)}},uS=class extends dS{constructor(n,e=1){super(),this._limit=n,this._ratio=Math.min(Math.max(0,e),1)}get limit(){return this._limit}set limit(n){this._limit=n,this.checkTrim()}get ratio(){return this._ratio}set ratio(n){this._ratio=Math.min(Math.max(0,n),1),this.checkTrim()}get(n,e=2){return super.get(n,e)}peek(n){return super.get(n,0)}set(n,e){return super.set(n,e,2),this}checkTrim(){this.size>this._limit&&this.trim(Math.round(this._limit*this._ratio))}},qi=class extends uS{constructor(n,e=1){super(n,e)}trim(n){this.trimOld(n)}set(n,e){return super.set(n,e),this.checkTrim(),this}},Og=class{constructor(){this.map=new Map}add(n,e){let t=this.map.get(n);t||(t=new Set,this.map.set(n,t)),t.add(e)}delete(n,e){let t=this.map.get(n);t&&(t.delete(e),t.size===0&&this.map.delete(n))}forEach(n,e){let t=this.map.get(n);t&&t.forEach(e)}get(n){let e=this.map.get(n);return e||new Set}}});function kg(r,n){if(!r)throw new Error(n?`Assertion failed (${n})`:"Assertion Failed")}function Kl(r,n="unexpected state"){if(!r)throw typeof n=="string"?new hi(`Assertion Failed: ${n}`):n}var jl=_(()=>{rt()});function Ye(r){return typeof r=="string"}function ut(r){return typeof r=="object"&&r!==null&&!Array.isArray(r)&&!(r instanceof RegExp)&&!(r instanceof Date)}function $R(r){let n=Object.getPrototypeOf(Uint8Array);return typeof r=="object"&&r instanceof n}function Ii(r){return typeof r=="number"&&!isNaN(r)}function ZR(r){return!!r&&typeof r[Symbol.iterator]=="function"}function Ng(r){return r===!0||r===!1}function Qr(r){return typeof r>"u"}function ex(r){return!Qt(r)}function Qt(r){return Qr(r)||r===null}function tx(r,n){if(!r)throw new Error(n?`Unexpected type, expected '${n}'`:"Unexpected type")}function Ki(r){return Kl(r!=null,"Argument is `undefined` or `null`."),r}function Lg(r){if(!ut(r))return!1;for(let n in r)if(u4.call(r,n))return!1;return!0}function fp(r){return typeof r=="function"}function Xr(r,n){for(let e in n)if(!(e in r))return!1;return!0}var u4,qe=_(()=>{jl();u4=Object.prototype.hasOwnProperty});var ji,gp=_(()=>{qe();(he=>{function r(Q){return!!Q&&typeof Q=="object"&&typeof Q[Symbol.iterator]=="function"}he.is=r;let n=Object.freeze([]);function e(){return n}he.empty=e;function*t(Q){yield Q}he.single=t;function i(Q){return r(Q)?Q:t(Q)}he.wrap=i;function o(Q){return Q??n}he.from=o;function*s(Q){for(let le=Q.length-1;le>=0;le--)yield Q[le]}he.reverse=s;function a(Q){return!Q||Q[Symbol.iterator]().next().done===!0}he.isEmpty=a;function l(Q){return Q[Symbol.iterator]().next().value}he.first=l;function c(Q,le){let ne=0;for(let De of Q)if(le(De,ne++))return!0;return!1}he.some=c;function u(Q,le){let ne=0;for(let De of Q)if(!le(De,ne++))return!1;return!0}he.every=u;function p(Q,le){for(let ne of Q)if(le(ne))return ne}he.find=p;function*m(Q,le){for(let ne of Q)le(ne)&&(yield ne)}he.filter=m;function*h(Q,le){let ne=0;for(let De of Q)yield le(De,ne++)}he.map=h;function*E(Q,le){let ne=0;for(let De of Q)yield*le(De,ne++)}he.flatMap=E;function*y(...Q){for(let le of Q)ZR(le)?yield*le:yield le}he.concat=y;function P(Q,le,ne){let De=ne;for(let ht of Q)De=le(De,ht);return De}he.reduce=P;function T(Q){let le=0;for(let ne of Q)le++;return le}he.length=T;function*k(Q,le,ne=Q.length){for(le<-Q.length&&(le=0),le<0&&(le+=Q.length),ne<0?ne+=Q.length:ne>Q.length&&(ne=Q.length);le<ne;le++)yield Q[le]}he.slice=k;function U(Q,le=Number.POSITIVE_INFINITY){let ne=[];if(le===0)return[ne,Q];let De=Q[Symbol.iterator]();for(let ht=0;ht<le;ht++){let Zt=De.next();if(Zt.done)return[ne,he.empty()];ne.push(Zt.value)}return[ne,{[Symbol.iterator](){return De}}]}he.consume=U;async function O(Q){let le=[];for await(let ne of Q)le.push(ne);return le}he.asyncToArray=O;async function B(Q){let le=[];for await(let ne of Q)le=le.concat(ne);return le}he.asyncToArrayFlat=B})(ji||={})});function m4(r){Yl=r}function hp(r){return Yl?.trackDisposable(r),r}function Ip(r){Yl?.markAsDisposed(r)}function ya(r,n){Yl?.setParent(r,n)}function f4(r,n){if(Yl)for(let e of r)Yl.setParent(e,n)}function Mg(r){return typeof r=="object"&&r!==null&&typeof r.dispose=="function"&&r.dispose.length===0}function At(r){if(ji.is(r)){let n=[];for(let e of r)if(e)try{e.dispose()}catch(t){n.push(t)}if(n.length===1)throw n[0];if(n.length>1)throw new AggregateError(n,"Encountered errors while disposing of store");return Array.isArray(r)?[]:r}else if(r)return r.dispose(),r}function rx(...r){let n=oe(()=>At(r));return f4(r,n),n}function oe(r){return new pS(r)}function ix(r,n){return r.then(e=>(n.isDisposed?e.dispose():n.add(e),e))}var p4,Yl,nx,pS,ue,M,yn,xn,te=_(()=>{dn();oS();er();Jl();gp();rt();p4=!1,Yl=null,nx=class r{constructor(){this.livingDisposables=new Map}static{this.idx=0}getDisposableData(n){let e=this.livingDisposables.get(n);return e||(e={parent:null,source:null,isSingleton:!1,value:n,idx:r.idx++},this.livingDisposables.set(n,e)),e}trackDisposable(n){let e=this.getDisposableData(n);e.source||(e.source=new Error().stack)}setParent(n,e){let t=this.getDisposableData(n);t.parent=e}markAsDisposed(n){this.livingDisposables.delete(n)}markAsSingleton(n){this.getDisposableData(n).isSingleton=!0}getRootParent(n,e){let t=e.get(n);if(t)return t;let i=n.parent?this.getRootParent(this.getDisposableData(n.parent),e):n;return e.set(n,i),i}getTrackedDisposables(){let n=new Map;return[...this.livingDisposables.entries()].filter(([,t])=>t.source!==null&&!this.getRootParent(t,n).isSingleton).flatMap(([t])=>t)}computeLeakingDisposables(n=10,e){let t;if(e)t=e;else{let l=new Map,c=[...this.livingDisposables.values()].filter(p=>p.source!==null&&!this.getRootParent(p,l).isSingleton);if(c.length===0)return;let u=new Set(c.map(p=>p.value));if(t=c.filter(p=>!(p.parent&&u.has(p.parent))),t.length===0)throw new Error("There are cyclic diposable chains!")}if(!t)return;function i(l){function c(p,m){for(;p.length>0&&m.some(h=>typeof h=="string"?h===p[0]:p[0].match(h));)p.shift()}let u=l.source.split(`
`).map(p=>p.trim().replace("at ","")).filter(p=>p!=="");return c(u,["Error",/^trackDisposable \(.*\)$/,/^DisposableTracker.trackDisposable \(.*\)$/]),u.reverse()}let o=new Og;for(let l of t){let c=i(l);for(let u=0;u<=c.length;u++)o.add(c.slice(0,u).join(`
`),l)}t.sort(JR(l=>l.idx,qR));let s="",a=0;for(let l of t.slice(0,n)){a++;let c=i(l),u=[];for(let p=0;p<c.length;p++){let m=c[p];m=`(shared with ${o.get(c.slice(0,p+1).join(`
`)).size}/${t.length} leaks) at ${m}`;let E=o.get(c.slice(0,p).join(`
`)),y=kR([...E].map(P=>i(P)[p]),P=>P);delete y[c[p]];for(let[P,T]of Object.entries(y))T&&u.unshift(`    - stacktraces of ${T.length} other leaks continue with ${P}`);u.unshift(m)}s+=`


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

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


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

`),{leaks:t,details:s}}};if(p4){let r="__is_disposable_tracked__";m4(new class{trackDisposable(n){let e=new Error("Potentially leaked disposable").stack;setTimeout(()=>{n[r]||console.log(e)},3e3)}setParent(n,e){if(n&&n!==M.None)try{n[r]=!0}catch{}}markAsDisposed(n){if(n&&n!==M.None)try{n[r]=!0}catch{}}markAsSingleton(n){}})}pS=class{constructor(n){this._isDisposed=!1,this._fn=n,hp(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,Ip(this),this._fn()}}};ue=class r{constructor(){this._toDispose=new Set;this._isDisposed=!1;hp(this)}static{this.DISABLE_DISPOSED_WARNING=!1}dispose(){this._isDisposed||(Ip(this),this._isDisposed=!0,this.clear())}get isDisposed(){return this._isDisposed}clear(){if(this._toDispose.size!==0)try{At(this._toDispose)}finally{this._toDispose.clear()}}add(n){if(!n||n===M.None)return n;if(n===this)throw new Error("Cannot register a disposable on itself!");return ya(n,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(n),n}delete(n){if(n){if(n===this)throw new Error("Cannot dispose a disposable on itself!");this._toDispose.delete(n),n.dispose()}}deleteAndLeak(n){n&&this._toDispose.delete(n)&&ya(n,null)}assertNotDisposed(){this._isDisposed&&vt(new hi("Object disposed"))}},M=class{constructor(){this._store=new ue;hp(this),ya(this._store,this)}static{this.None=Object.freeze({dispose(){}})}dispose(){Ip(this),this._store.dispose()}_register(n){if(n===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(n)}},yn=class{constructor(){this._isDisposed=!1;hp(this)}get value(){return this._isDisposed?void 0:this._value}set value(n){this._isDisposed||n===this._value||(this._value?.dispose(),n&&ya(n,this),this._value=n)}clear(){this.value=void 0}dispose(){this._isDisposed=!0,Ip(this),this._value?.dispose(),this._value=void 0}clearAndLeak(){let n=this._value;return this._value=void 0,n&&ya(n,null),n}},xn=class{constructor(n=new Map){this._isDisposed=!1;this._store=n,hp(this)}dispose(){Ip(this),this._isDisposed=!0,this.clearAndDisposeAll()}clearAndDisposeAll(){if(this._store.size)try{At(this._store.values())}finally{this._store.clear()}}has(n){return this._store.has(n)}get size(){return this._store.size}get(n){return this._store.get(n)}set(n,e,t=!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),t||this._store.get(n)?.dispose(),this._store.set(n,e),ya(e,this)}deleteAndDispose(n){this._store.get(n)?.dispose(),this._store.delete(n)}deleteAndLeak(n){let e=this._store.get(n);return e&&ya(e,null),this._store.delete(n),e}keys(){return this._store.keys()}values(){return this._store.values()}[Symbol.iterator](){return this._store[Symbol.iterator]()}}});var Wt,Ql,mS=_(()=>{Wt=class r{static{this.Undefined=new r(void 0)}constructor(n){this.element=n,this.next=r.Undefined,this.prev=r.Undefined}},Ql=class{constructor(){this._first=Wt.Undefined;this._last=Wt.Undefined;this._size=0}get size(){return this._size}isEmpty(){return this._first===Wt.Undefined}clear(){let n=this._first;for(;n!==Wt.Undefined;){let e=n.next;n.prev=Wt.Undefined,n.next=Wt.Undefined,n=e}this._first=Wt.Undefined,this._last=Wt.Undefined,this._size=0}unshift(n){return this._insert(n,!1)}push(n){return this._insert(n,!0)}_insert(n,e){let t=new Wt(n);if(this._first===Wt.Undefined)this._first=t,this._last=t;else if(e){let o=this._last;this._last=t,t.prev=o,o.next=t}else{let o=this._first;this._first=t,t.next=o,o.prev=t}this._size+=1;let i=!1;return()=>{i||(i=!0,this._remove(t))}}shift(){if(this._first!==Wt.Undefined){let n=this._first.element;return this._remove(this._first),n}}pop(){if(this._last!==Wt.Undefined){let n=this._last.element;return this._remove(this._last),n}}peek(){if(this._last!==Wt.Undefined)return this._last.element}_remove(n){if(n.prev!==Wt.Undefined&&n.next!==Wt.Undefined){let e=n.prev;e.next=n.next,n.next.prev=e}else n.prev===Wt.Undefined&&n.next===Wt.Undefined?(this._first=Wt.Undefined,this._last=Wt.Undefined):n.next===Wt.Undefined?(this._last=this._last.prev,this._last.next=Wt.Undefined):n.prev===Wt.Undefined&&(this._first=this._first.next,this._first.prev=Wt.Undefined);this._size-=1}*[Symbol.iterator](){let n=this._first;for(;n!==Wt.Undefined;)yield n.element,n=n.next}}});var g4,Rr,Sa=_(()=>{g4=globalThis.performance.now.bind(globalThis.performance),Rr=class r{static create(n){return new r(n)}constructor(n){this._now=n===!1?Date.now:g4,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}}});function ES(r,n){n instanceof ue?n.add(r):Array.isArray(n)&&n.push(r)}function ax(r,n){if(n instanceof ue)n.delete(r);else if(Array.isArray(n)){let e=n.indexOf(r);e!==-1&&n.splice(e,1)}r.dispose()}var ox,h4,x,fS,sx,gS,vp,hS,IS,I4,Xl,v4,E4,C,vS,_a,Ug,Ep,ae=_(()=>{oS();rt();Jl();te();mS();Sa();ox=!1,h4=!1;(lr=>{lr.None=()=>M.None;function n(J){if(h4){let{onDidAddListener:W}=J,se=vp.create(),ie=0;J.onDidAddListener=()=>{++ie===2&&(console.warn("snapshotted emitter LIKELY used public and SHOULD HAVE BEEN created with DisposableStore. snapshotted here"),se.print()),W?.()}}}function e(J,W,se){return h(J,()=>{},0,void 0,W??!0,void 0,se)}lr.defer=e;function t(J){return(W,se=null,ie)=>{let ge=!1,xe;return xe=J(Ve=>{if(!ge)return xe?xe.dispose():ge=!0,W.call(se,Ve)},null,ie),ge&&xe.dispose(),xe}}lr.once=t;function i(J,W){return lr.once(lr.filter(J,W))}lr.onceIf=i;function o(J,W,se){return p((ie,ge=null,xe)=>J(Ve=>ie.call(ge,W(Ve)),null,xe),se)}lr.map=o;function s(J,W,se){return p((ie,ge=null,xe)=>J(Ve=>{W(Ve),ie.call(ge,Ve)},null,xe),se)}lr.forEach=s;function a(J,W,se){return p((ie,ge=null,xe)=>J(Ve=>W(Ve)&&ie.call(ge,Ve),null,xe),se)}lr.filter=a;function l(J){return J}lr.signal=l;function c(...J){return(W,se=null,ie)=>{let ge=rx(...J.map(xe=>xe(Ve=>W.call(se,Ve))));return m(ge,ie)}}lr.any=c;function u(J,W,se,ie){let ge=se;return o(J,xe=>(ge=W(ge,xe),ge),ie)}lr.reduce=u;function p(J,W){let se,ie={onWillAddFirstListener(){se=J(ge.fire,ge)},onDidRemoveLastListener(){se?.dispose()}};W||n(ie);let ge=new C(ie);return W?.add(ge),ge.event}function m(J,W){return W instanceof Array?W.push(J):W&&W.add(J),J}function h(J,W,se=100,ie=!1,ge=!1,xe,Ve){let Pt,It,vn,Cn=0,cr,nt={leakWarningThreshold:xe,onWillAddFirstListener(){Pt=J(Qu=>{Cn++,It=W(It,Qu),ie&&!vn&&(Fi.fire(It),It=void 0),cr=()=>{let Xu=It;It=void 0,vn=void 0,(!ie||Cn>1)&&Fi.fire(Xu),Cn=0},typeof se=="number"?(vn&&clearTimeout(vn),vn=setTimeout(cr,se)):vn===void 0&&(vn=null,queueMicrotask(cr))})},onWillRemoveListener(){ge&&Cn>0&&cr?.()},onDidRemoveLastListener(){cr=void 0,Pt.dispose()}};Ve||n(nt);let Fi=new C(nt);return Ve?.add(Fi),Fi.event}lr.debounce=h;function E(J,W=0,se,ie){return lr.debounce(J,(ge,xe)=>ge?(ge.push(xe),ge):[xe],W,void 0,se??!0,void 0,ie)}lr.accumulate=E;function y(J,W,se=100,ie=!0,ge=!0,xe,Ve){let Pt,It,vn,Cn=0,cr={leakWarningThreshold:xe,onWillAddFirstListener(){Pt=J(Fi=>{Cn++,It=W(It,Fi),vn===void 0&&(ie&&(nt.fire(It),It=void 0,Cn=0),typeof se=="number"?vn=setTimeout(()=>{ge&&Cn>0&&nt.fire(It),It=void 0,vn=void 0,Cn=0},se):(vn=0,queueMicrotask(()=>{ge&&Cn>0&&nt.fire(It),It=void 0,vn=void 0,Cn=0})))})},onDidRemoveLastListener(){Pt.dispose()}};Ve||n(cr);let nt=new C(cr);return Ve?.add(nt),nt.event}lr.throttle=y;function P(J,W=(ie,ge)=>ie===ge,se){let ie=!0,ge;return a(J,xe=>{let Ve=ie||!W(xe,ge);return ie=!1,ge=xe,Ve},se)}lr.latch=P;function T(J,W,se){return[lr.filter(J,W,se),lr.filter(J,ie=>!W(ie),se)]}lr.split=T;function k(J,W=!1,se=[],ie){let ge=se.slice(),xe=J(It=>{ge?ge.push(It):Pt.fire(It)});ie&&ie.add(xe);let Ve=()=>{ge?.forEach(It=>Pt.fire(It)),ge=null},Pt=new C({onWillAddFirstListener(){xe||(xe=J(It=>Pt.fire(It)),ie&&ie.add(xe))},onDidAddFirstListener(){ge&&(W?setTimeout(Ve):Ve())},onDidRemoveLastListener(){xe&&xe.dispose(),xe=null}});return ie&&ie.add(Pt),Pt.event}lr.buffer=k;function U(J,W){return(ie,ge,xe)=>{let Ve=W(new B);return J(function(Pt){let It=Ve.evaluate(Pt);It!==O&&ie.call(ge,It)},void 0,xe)}}lr.chain=U;let O=Symbol("HaltChainable");class B{constructor(){this.steps=[]}map(W){return this.steps.push(W),this}forEach(W){return this.steps.push(se=>(W(se),se)),this}filter(W){return this.steps.push(se=>W(se)?se:O),this}reduce(W,se){let ie=se;return this.steps.push(ge=>(ie=W(ie,ge),ie)),this}latch(W=(se,ie)=>se===ie){let se=!0,ie;return this.steps.push(ge=>{let xe=se||!W(ge,ie);return se=!1,ie=ge,xe?ge:O}),this}evaluate(W){for(let se of this.steps)if(W=se(W),W===O)break;return W}}function he(J,W,se=ie=>ie){let ie=(...Pt)=>Ve.fire(se(...Pt)),ge=()=>J.on(W,ie),xe=()=>J.removeListener(W,ie),Ve=new C({onWillAddFirstListener:ge,onDidRemoveLastListener:xe});return Ve.event}lr.fromNodeEventEmitter=he;function Q(J,W,se=ie=>ie){let ie=(...Pt)=>Ve.fire(se(...Pt)),ge=()=>J.addEventListener(W,ie),xe=()=>J.removeEventListener(W,ie),Ve=new C({onWillAddFirstListener:ge,onDidRemoveLastListener:xe});return Ve.event}lr.fromDOMEventEmitter=Q;function le(J,W){let se,ie,ge=new Promise(xe=>{ie=t(J)(xe),ES(ie,W),se=()=>{ax(ie,W)}});return ge.cancel=se,W&&ge.finally(()=>ax(ie,W)),ge}lr.toPromise=le;function ne(J,W){return J(se=>W.fire(se))}lr.forward=ne;function De(J,W,se){return W(se),J(ie=>W(ie))}lr.runAndSubscribe=De;class ht{constructor(W,se){this._observable=W;this._counter=0;this._hasChanged=!1;let ie={onWillAddFirstListener:()=>{W.addObserver(this),this._observable.reportChanges()},onDidRemoveLastListener:()=>{W.removeObserver(this)}};se||n(ie),this.emitter=new C(ie),se&&se.add(this.emitter)}beginUpdate(W){this._counter++}handlePossibleChange(W){}handleChange(W,se){this._hasChanged=!0}endUpdate(W){this._counter--,this._counter===0&&(this._observable.reportChanges(),this._hasChanged&&(this._hasChanged=!1,this.emitter.fire(this._observable.get())))}}function Zt(J,W){return new ht(J,W).emitter.event}lr.fromObservable=Zt;function ar(J){return(W,se,ie)=>{let ge=0,xe=!1,Ve={beginUpdate(){ge++},endUpdate(){ge--,ge===0&&(J.reportChanges(),xe&&(xe=!1,W.call(se)))},handlePossibleChange(){},handleChange(){xe=!0}};J.addObserver(Ve),J.reportChanges();let Pt={dispose(){J.removeObserver(Ve)}};return ES(Pt,ie),Pt}}lr.fromObservableLight=ar})(x||={});fS=class r{constructor(n){this.listenerCount=0;this.invocationCount=0;this.elapsedOverall=0;this.durations=[];this.name=`${n}_${r._idPool++}`,r.all.add(this)}static{this.all=new Set}static{this._idPool=0}start(n){this._stopWatch=new Rr,this.listenerCount=n}stop(){if(this._stopWatch){let n=this._stopWatch.elapsed();this.durations.push(n),this.elapsedOverall+=n,this.invocationCount+=1,this._stopWatch=void 0}}},sx=-1,gS=class r{constructor(n,e,t=(r._idPool++).toString(16).padStart(3,"0")){this._errorHandler=n;this.threshold=e;this.name=t;this._warnCountdown=0}static{this._idPool=1}dispose(){this._stacks?.clear()}check(n,e){let t=this.threshold;if(t<=0||e<t)return;this._stacks||(this._stacks=new Map);let i=this._stacks.get(n.value)||0;if(this._stacks.set(n.value,i+1),this._warnCountdown-=1,this._warnCountdown<=0){this._warnCountdown=t*.5;let[o,s]=this.getMostFrequentStack(),a=`[${this.name}] potential listener LEAK detected, having ${e} listeners already. MOST frequent listener (${s}):`;console.warn(a),console.warn(o);let l=new hS(a,o);this._errorHandler(l)}return()=>{let o=this._stacks.get(n.value)||0;this._stacks.set(n.value,o-1)}}getMostFrequentStack(){if(!this._stacks)return;let n,e=0;for(let[t,i]of this._stacks)(!n||e<i)&&(n=[t,i],e=i);return n}},vp=class r{constructor(n){this.value=n}static create(){let n=new Error;return new r(n.stack??"")}print(){console.warn(this.value.split(`
`).slice(2).join(`
`))}},hS=class extends Error{constructor(n,e){super(n),this.name="ListenerLeakError",this.stack=e}},IS=class extends Error{constructor(n,e){super(n),this.name="ListenerRefusalError",this.stack=e}},I4=0,Xl=class{constructor(n){this.value=n;this.id=I4++}},v4=2,E4=(r,n)=>{if(r instanceof Xl)n(r);else for(let e=0;e<r.length;e++){let t=r[e];t&&n(t)}},C=class{constructor(n){this._size=0;this._options=n,this._leakageMon=sx>0||this._options?.leakWarningThreshold?new gS(n?.onListenerError??vt,this._options?.leakWarningThreshold??sx):void 0,this._perfMon=this._options?._profName?new fS(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(ox){let n=this._listeners;queueMicrotask(()=>{E4(n,e=>e.stack?.print())})}this._listeners=void 0,this._size=0}this._options?.onDidRemoveLastListener?.(),this._leakageMon?.dispose()}}get event(){return this._event??=(n,e,t)=>{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 c=this._leakageMon.getMostFrequentStack()??["UNKNOWN stack",-1],u=new IS(`${l}. HINT: Stack shows most frequent listener (${c[1]}-times)`,c[0]);return(this._options?.onListenerError||vt)(u),M.None}if(this._disposed)return M.None;e&&(n=n.bind(e));let i=new Xl(n),o,s;this._leakageMon&&this._size>=Math.ceil(this._leakageMon.threshold*.2)&&(i.stack=vp.create(),o=this._leakageMon.check(i.stack,this._size+1)),ox&&(i.stack=s??vp.create()),this._listeners?this._listeners instanceof Xl?(this._deliveryQueue??=new vS,this._listeners=[this._listeners,i]):this._listeners.push(i):(this._options?.onWillAddFirstListener?.(this),this._listeners=i,this._options?.onDidAddFirstListener?.(this)),this._options?.onDidAddListener?.(this),this._size++;let a=oe(()=>{o?.(),this._removeListener(i)});return ES(a,t),a},this._event}_removeListener(n){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,t=e.indexOf(n);if(t===-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[t]=void 0;let i=this._deliveryQueue.current===this;if(this._size*v4<=e.length){let o=0;for(let s=0;s<e.length;s++)e[s]?e[o++]=e[s]:i&&o<this._deliveryQueue.end&&(this._deliveryQueue.end--,o<this._deliveryQueue.i&&this._deliveryQueue.i--);e.length=o}}_deliver(n,e){if(!n)return;let t=this._options?.onListenerError||vt;if(!t){n.value(e);return}try{n.value(e)}catch(i){t(i)}}_deliverQueue(n){let e=n.current._listeners;for(;n.i<n.end;)this._deliver(e[n.i++],n.value);n.reset()}fire(n){if(this._deliveryQueue?.current&&(this._deliverQueue(this._deliveryQueue),this._perfMon?.stop()),this._perfMon?.start(this._size),this._listeners)if(this._listeners instanceof Xl)this._deliver(this._listeners,n);else{let e=this._deliveryQueue;e.enqueue(this,n,this._listeners.length),this._deliverQueue(e)}this._perfMon?.stop()}hasListeners(){return this._size>0}},vS=class{constructor(){this.i=-1;this.end=0}enqueue(n,e,t){this.i=0,this.end=t,this.current=n,this.value=e}reset(){this.i=this.end,this.current=void 0,this.value=void 0}},_a=class extends C{constructor(e){super(e);this._isPaused=0;this._eventQueue=new Ql;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))}},Ug=class{constructor(){this.hasListeners=!1;this.events=[];this.emitter=new C({onWillAddFirstListener:()=>this.onFirstListenerAdd(),onDidRemoveLastListener:()=>this.onLastListenerRemove()})}get event(){return this.emitter.event}add(n){let e={event:n,listener:null};return this.events.push(e),this.hasListeners&&this.hook(e),oe(xo(()=>{this.hasListeners&&this.unhook(e);let i=this.events.indexOf(e);this.events.splice(i,1)}))}onFirstListenerAdd(){this.hasListeners=!0,this.events.forEach(n=>this.hook(n))}onLastListenerRemove(){this.hasListeners=!1,this.events.forEach(n=>this.unhook(n))}hook(n){n.listener=n.event(e=>this.emitter.fire(e))}unhook(n){n.listener?.dispose(),n.listener=null}dispose(){this.emitter.dispose();for(let n of this.events)n.listener?.dispose();this.events=[]}},Ep=class{constructor(){this.listening=!1;this.inputEvent=x.None;this.inputEventListener=M.None;this.emitter=new C({onDidAddFirstListener:()=>{this.listening=!0,this.inputEventListener=this.inputEvent(this.emitter.fire,this.emitter)},onDidRemoveLastListener:()=>{this.listening=!1,this.inputEventListener.dispose()}});this.event=this.emitter.event}set input(n){this.inputEvent=n,this.listening&&(this.inputEventListener.dispose(),this.inputEventListener=n(this.emitter.fire,this.emitter))}dispose(){this.inputEventListener.dispose(),this.emitter.dispose()}}});var lx,Le,$l,st,Bt=_(()=>{ae();te();lx=Object.freeze(function(r,n){let e=setTimeout(r.bind(n),0);return{dispose(){clearTimeout(e)}}});(t=>{function r(i){return i===t.None||i===t.Cancelled||i instanceof $l?!0:!i||typeof i!="object"?!1:typeof i.isCancellationRequested=="boolean"&&typeof i.onCancellationRequested=="function"}t.isCancellationToken=r,t.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:x.None}),t.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:lx})})(Le||={});$l=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?lx:(this._emitter||(this._emitter=new C),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=null)}},st=class{constructor(n){this._token=void 0;this._parentListener=void 0;this._parentListener=n&&n.onCancellationRequested(this.cancel,this)}get token(){return this._token||(this._token=new $l),this._token}cancel(){this._token?this._token instanceof $l&&this._token.cancel():this._token=Le.Cancelled}dispose(n=!1){n&&this.cancel(),this._parentListener?.dispose(),this._token?this._token instanceof $l&&this._token.dispose():this._token=Le.None}}});var vi=_(()=>{});function y4(r){return r}var Fg,cx=_(()=>{Bt();Fg=class{constructor(n,e){this.lastCache=void 0;this.lastArgKey=void 0;typeof n=="function"?(this._fn=n,this._computeKey=y4):(this._fn=e,this._computeKey=n.getCacheKey)}get(n){let e=this._computeKey(n);return this.lastArgKey!==e&&(this.lastArgKey=e,this.lastCache=this._fn(n)),this.lastCache}}});var Gn,hs=_(()=>{Gn=class{constructor(n){this.executor=n;this._state=0}get hasValue(){return this._state===2}get value(){if(this._state===0){this._state=1;try{this._value=this.executor()}catch(n){this._error=n}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 dx=_(()=>{});function gx(r){return!r||typeof r!="string"?!0:r.trim().length===0}function Is(r){return r.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g,"\\$&")}function yS(r,n=" "){let e=SS(r,n);return Ei(e,n)}function SS(r,n){if(!r||!n)return r;let e=n.length,t=0;if(e===1){let i=n.charCodeAt(0);for(;t<r.length&&r.charCodeAt(t)===i;)t++}else for(;r.startsWith(n,t);)t+=e;return r.substring(t)}function Ei(r,n){if(!r||!n)return r;let e=n.length,t=r.length;if(e===1){let o=t,s=n.charCodeAt(0);for(;o>0&&r.charCodeAt(o-1)===s;)o--;return r.substring(0,o)}let i=t;for(;i>0&&r.endsWith(n,i);)i-=e;return r.substring(0,i)}function yp(r,n){return r<n?-1:r>n?1:0}function Wg(r,n,e=0,t=r.length,i=0,o=n.length){for(;e<t&&i<o;e++,i++){let l=r.charCodeAt(e),c=n.charCodeAt(i);if(l<c)return-1;if(l>c)return 1}let s=t-e,a=o-i;return s<a?-1:s>a?1:0}function Sp(r,n){return wa(r,n,0,r.length,0,n.length)}function wa(r,n,e=0,t=r.length,i=0,o=n.length){for(;e<t&&i<o;e++,i++){let l=r.charCodeAt(e),c=n.charCodeAt(i);if(l===c)continue;if(l>=128||c>=128)return Wg(r.toLowerCase(),n.toLowerCase(),e,t,i,o);ux(l)&&(l-=32),ux(c)&&(c-=32);let u=l-c;if(u!==0)return u}let s=t-e,a=o-i;return s<a?-1:s>a?1:0}function ux(r){return r>=97&&r<=122}function _S(r){return r>=65&&r<=90}function Hn(r,n){return r.length===n.length&&wa(r,n)===0}function zi(r,n){let e=n.length;return e<=r.length&&wa(r,n,0,e)===0}function hx(r,n){let e=r.length,t=e-n.length;return t>=0&&wa(r,n,t,e)===0}function Ix(r){return 55296<=r&&r<=56319}function wS(r){return 56320<=r&&r<=57343}function vx(r,n){return(r-55296<<10)+(n-56320)+65536}function b4(){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 S4,_4,w4,vH,EH,px,mx,fx,Sn=_(()=>{cx();vi();hs();dx();S4=/(?:\x1b\[|\x9b)[=?>!]?[\d;:]*["$#'* ]?[a-zA-Z@^`{}|~]/,_4=/(?:\x1b\]|\x9d).*?(?:\x1b\\|\x07|\x9c)/,w4=/\x1b(?:[ #%\(\)\*\+\-\.\/]?[a-zA-Z0-9\|}~@])/,vH=new RegExp("(?:"+[S4.source,_4.source,w4.source].join("|")+")","g"),EH=String.fromCharCode(65279),px=class r{static{this._INSTANCE=null}static getInstance(){return r._INSTANCE||(r._INSTANCE=new r),r._INSTANCE}constructor(){this._data=b4()}getGraphemeBreakType(n){if(n<32)return n===10?3:n===13?2:4;if(n<127)return 0;let e=this._data,t=e.length/3,i=1;for(;i<=t;)if(n<e[3*i])i=2*i;else if(n>e[3*i+1])i=2*i+1;else return e[3*i+2];return 0}};mx=class r{constructor(n){this.confusableDictionary=n}static{this.ambiguousCharacterData=new Gn(()=>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 Fg(n=>{let e=n.split(",");function t(p){let m=new Map;for(let h=0;h<p.length;h+=2)m.set(p[h],p[h+1]);return m}function i(p,m){let h=new Map(p);for(let[E,y]of m)h.set(E,y);return h}function o(p,m){if(!p)return m;let h=new Map;for(let[E,y]of p)m.has(E)&&h.set(E,y);return h}let s=this.ambiguousCharacterData.value,a=e.filter(p=>!p.startsWith("_")&&Object.hasOwn(s,p));a.length===0&&(a=["_default"]);let l;for(let p of a){let m=t(s[p]);l=o(l,m)}let c=t(s._common),u=i(c,l);return new r(u)})}static getInstance(n){return r.cache.get(Array.from(n).join(","))}static{this._locales=new Gn(()=>Object.keys(r.ambiguousCharacterData.value).filter(n=>!n.startsWith("_")))}static getLocales(){return r._locales.value}isAmbiguous(n){return this.confusableDictionary.has(n)}containsAmbiguousCharacter(n){for(let e=0;e<n.length;e++){let t=n.codePointAt(e);if(typeof t=="number"&&this.isAmbiguous(t))return!0}return!1}getPrimaryConfusable(n){return this.confusableDictionary.get(n)}getConfusableCodePoints(){return new Set(this.confusableDictionary.keys())}},fx=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(n){return r.getData().has(n)}static containsInvisibleCharacter(n){for(let e=0;e<n.length;e++){let t=n.codePointAt(e);if(typeof t=="number"&&(r.isInvisibleCharacter(t)||t===32))return!0}return!1}static get codePoints(){return r.getData()}}});function vs(r){return r===47||r===92}function Yi(r){return r.replace(/[\\/]/g,Se.sep)}function Ex(r){return r.indexOf("/")===-1&&(r=Yi(r)),/^[a-zA-Z]:(\/|$)/.test(r)&&(r="/"+r),r}function bS(r,n=Se.sep){if(!r)return"";let e=r.length,t=r.charCodeAt(0);if(vs(t)){if(vs(r.charCodeAt(1))&&!vs(r.charCodeAt(2))){let o=3,s=o;for(;o<e&&!vs(r.charCodeAt(o));o++);if(s!==o&&!vs(r.charCodeAt(o+1))){for(o+=1;o<e;o++)if(vs(r.charCodeAt(o)))return r.slice(0,o+1).replace(/[\\/]/g,n)}}return n}else if(Vg(t)&&r.charCodeAt(1)===58)return vs(r.charCodeAt(2))?r.slice(0,2)+n:r.slice(0,2);let i=r.indexOf("://");if(i!==-1){for(i+=3;i<e;i++)if(vs(r.charCodeAt(i)))return r.slice(0,i+1)}return""}function yx(r){if(!q||!r||r.length<5)return!1;let n=r.charCodeAt(0);if(n!==92||(n=r.charCodeAt(1),n!==92))return!1;let e=2,t=e;for(;e<r.length&&(n=r.charCodeAt(e),n!==92);e++);return!(t===e||(n=r.charCodeAt(e+1),isNaN(n)||n===92))}function Sx(r,n=q){let e=n?T4:P4;return!(!r||r.length===0||/^\s+$/.test(r)||(e.lastIndex=0,e.test(r))||n&&C4.test(r)||r==="."||r===".."||n&&r[r.length-1]==="."||n&&r.length!==r.trim().length||r.length>255)}function Es(r,n,e){let t=r===n;return!e||t?t:!r||!n?!1:Hn(r,n)}function Oo(r,n,e,t=nn){if(r===n)return!0;if(!r||!n||n.length>r.length)return!1;if(e){if(!zi(r,n))return!1;if(n.length===r.length)return!0;let o=n.length;return n.charAt(n.length-1)===t&&o--,r.charAt(o)===t}return n.charAt(n.length-1)!==t&&(n+=t),r.indexOf(n)===0}function Vg(r){return r>=65&&r<=90||r>=97&&r<=122}function Gg(r,n){return q&&r.endsWith(":")&&(r+=nn),fs(r)||(r=H(n,r)),r=kt(r),TS(r)}function TS(r){return q?(r=Ei(r,nn),r.endsWith(":")&&(r+=nn)):(r=Ei(r,nn),r||(r=nn)),r}function PS(r){let n=kt(r);return q?r.length>3?!1:CS(n)&&(r.length===2||n.charCodeAt(2)===92):n===Se.sep}function CS(r,n=q){return n?Vg(r.charCodeAt(0))&&r.charCodeAt(1)===58:!1}function Zl(r){let n=r.split(":"),e,t,i;for(let o of n){let s=Number(o);Ii(s)?t===void 0?t=s:i===void 0&&(i=s):e=e?[e,o].join(":"):o}if(!e)throw new Error("Format for `--goto` should be: `FILE:LINE(:COLUMN)`");return{path:e,line:t!==void 0?t:void 0,column:i!==void 0?i:t!==void 0?1:void 0}}function ba(r,n,e=8){let t="";for(let o=0;o<e;o++){let s;o===0&&q&&!n&&(e===3||e===4)?s=R4:s=A4,t+=s.charAt(Math.floor(Math.random()*s.length))}let i;return n?i=`${n}-${t}`:i=t,r?H(r,i):i}var T4,P4,C4,A4,R4,xr=_(()=>{vi();Ne();ce();Sn();qe();T4=/[\\/:\*\?"<>\|]/g,P4=/[/]/g,C4=/^(con|prn|aux|clock\$|nul|lpt[0-9]|com[0-9])(\.(.*?))?$/i;A4="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",R4="BDEFGHIJKMOQRSTUVWXYZbdefghijkmoqrstuvwxyz0123456789"});var Hg=_(()=>{});function N4(r,n){if(!r.scheme&&n)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${r.authority}", path: "${r.path}", query: "${r.query}", fragment: "${r.fragment}"}`);if(r.scheme&&!D4.test(r.scheme)){let e=[...r.scheme.matchAll(/[^\w\d+.-]/gu)],t=e.length>0?` Found '${e[0][0]}' at index ${e[0].index} (${e.length} total)`:"";throw new Error(`[UriError]: Scheme contains illegal characters.${t} (len:${r.scheme.length})`)}if(r.path){if(r.authority){if(!O4.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(k4.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 L4(r,n){return!r&&!n?"file":r}function M4(r,n){switch(r){case"https":case"http":case"file":n?n[0]!==yi&&(n=yi+n):n=yi;break}return n}function _x(r,n,e){let t,i=-1;for(let o=0;o<r.length;o++){let s=r.charCodeAt(o);if(s>=97&&s<=122||s>=65&&s<=90||s>=48&&s<=57||s===45||s===46||s===95||s===126||n&&s===47||e&&s===91||e&&s===93||e&&s===58)i!==-1&&(t+=encodeURIComponent(r.substring(i,o)),i=-1),t!==void 0&&(t+=r.charAt(o));else{t===void 0&&(t=r.substr(0,o));let a=Px[s];a!==void 0?(i!==-1&&(t+=encodeURIComponent(r.substring(i,o)),i=-1),t+=a):i===-1&&(i=o)}}return i!==-1&&(t+=encodeURIComponent(r.substring(i))),t!==void 0?t:r}function F4(r){let n;for(let e=0;e<r.length;e++){let t=r.charCodeAt(e);t===35||t===63?(n===void 0&&(n=r.substr(0,e)),n+=Px[t]):n!==void 0&&(n+=r[e])}return n!==void 0?n:r}function _p(r,n){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?n?e=r.path.substr(1):e=r.path[1].toLowerCase()+r.path.substr(2):e=r.path,q&&(e=e.replace(/\//g,"\\")),e}function AS(r,n){let e=n?F4:_x,t="",{scheme:i,authority:o,path:s,query:a,fragment:l}=r;if(i&&(t+=i,t+=":"),(o||i==="file")&&(t+=yi,t+=yi),o){let c=o.indexOf("@");if(c!==-1){let u=o.substr(0,c);o=o.substr(c+1),c=u.lastIndexOf(":"),c===-1?t+=e(u,!1,!1):(t+=e(u.substr(0,c),!1,!1),t+=":",t+=e(u.substr(c+1),!1,!0)),t+="@"}o=o.toLowerCase(),c=o.lastIndexOf(":"),c===-1?t+=e(o,!1,!0):(t+=e(o.substr(0,c),!1,!0),t+=o.substr(c))}if(s){if(s.length>=3&&s.charCodeAt(0)===47&&s.charCodeAt(2)===58){let c=s.charCodeAt(1);c>=65&&c<=90&&(s=`/${String.fromCharCode(c+32)}:${s.substr(3)}`)}else if(s.length>=2&&s.charCodeAt(1)===58){let c=s.charCodeAt(0);c>=65&&c<=90&&(s=`${String.fromCharCode(c+32)}:${s.substr(2)}`)}t+=e(s,!0,!1)}return a&&(t+="?",t+=e(a,!1,!1)),l&&(t+="#",t+=n?l:_x(l,!1,!1)),t}function Cx(r){try{return decodeURIComponent(r)}catch{return r.length>3?r.substr(0,3)+Cx(r.substr(3)):r}}function Jg(r){return r.match(wx)?r.replace(wx,n=>Cx(n)):r}var D4,O4,k4,Mt,yi,U4,A,Tx,ys,Px,wx,Ie=_(()=>{vi();Hg();Ne();ce();D4=/^\w[\w\d+.-]*$/,O4=/^\//,k4=/^\/\//;Mt="",yi="/",U4=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/,A=class r{static isUri(n){return n instanceof r?!0:!n||typeof n!="object"?!1:typeof n.authority=="string"&&typeof n.fragment=="string"&&typeof n.path=="string"&&typeof n.query=="string"&&typeof n.scheme=="string"&&typeof n.fsPath=="string"&&typeof n.with=="function"&&typeof n.toString=="function"}constructor(n,e,t,i,o,s=!1){typeof n=="object"?(this.scheme=n.scheme||Mt,this.authority=n.authority||Mt,this.path=n.path||Mt,this.query=n.query||Mt,this.fragment=n.fragment||Mt):(this.scheme=L4(n,s),this.authority=e||Mt,this.path=M4(this.scheme,t||Mt),this.query=i||Mt,this.fragment=o||Mt,N4(this,s))}get fsPath(){return _p(this,!1)}with(n){if(!n)return this;let{scheme:e,authority:t,path:i,query:o,fragment:s}=n;return e===void 0?e=this.scheme:e===null&&(e=Mt),t===void 0?t=this.authority:t===null&&(t=Mt),i===void 0?i=this.path:i===null&&(i=Mt),o===void 0?o=this.query:o===null&&(o=Mt),s===void 0?s=this.fragment:s===null&&(s=Mt),e===this.scheme&&t===this.authority&&i===this.path&&o===this.query&&s===this.fragment?this:new ys(e,t,i,o,s)}static parse(n,e=!1){let t=U4.exec(n);return t?new ys(t[2]||Mt,Jg(t[4]||Mt),Jg(t[5]||Mt),Jg(t[7]||Mt),Jg(t[9]||Mt),e):new ys(Mt,Mt,Mt,Mt,Mt)}static file(n){let e=Mt;if(q&&(n=n.replace(/\\/g,yi)),n[0]===yi&&n[1]===yi){let t=n.indexOf(yi,2);t===-1?(e=n.substring(2),n=yi):(e=n.substring(2,t),n=n.substring(t)||yi)}return new ys("file",e,n,Mt,Mt)}static from(n,e){return new ys(n.scheme,n.authority,n.path,n.query,n.fragment,e)}static joinPath(n,...e){if(!n.path)throw new Error("[UriError]: cannot call joinPath on URI without path");let t;return q&&n.scheme==="file"?t=r.file(Ct.join(_p(n,!0),...e)).path:t=Se.join(n.path,...e),n.with({path:t})}toString(n=!1){return AS(this,n)}toJSON(){return this}static revive(n){if(n){if(n instanceof r)return n;{let e=new ys(n);return e._formatted=n.external??null,e._fsPath=n._sep===Tx?n.fsPath??null:null,e}}else return n}[Symbol.for("debug.description")](){return`URI(${this.toString()})`}},Tx=q?1:void 0,ys=class extends A{constructor(){super(...arguments);this._formatted=null;this._fsPath=null}get fsPath(){return this._fsPath||(this._fsPath=_p(this,!1)),this._fsPath}toString(e=!1){return e?AS(this,!0):(this._formatted||(this._formatted=AS(this,!1)),this._formatted)}toJSON(){let e={$mid:1};return this._fsPath&&(e.fsPath=this._fsPath,e._sep=Tx),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}},Px={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"};wx=/(%[0-9A-Za-z][0-9A-Za-z])+/g});function W4(r,n){return A.isUri(r)?Hn(r.scheme,n):zi(r,n+":")}function DS(r,...n){return n.some(e=>W4(r,e))}function V4(r){return`${r.quality??"oss"}-${r.commit??"dev"}`}var Y,B4,RS,OS,ec,xS,gt,Ax,Rx,tc,at=_(()=>{rt();ce();Sn();Ie();Ne();(we=>(we.inMemory="inmemory",we.vscode="vscode",we.internal="private",we.walkThrough="walkThrough",we.walkThroughSnippet="walkThroughSnippet",we.http="http",we.https="https",we.file="file",we.mailto="mailto",we.untitled="untitled",we.data="data",we.command="command",we.vscodeRemote="vscode-remote",we.vscodeRemoteResource="vscode-remote-resource",we.vscodeManagedRemoteResource="vscode-managed-remote-resource",we.vscodeUserData="vscode-userdata",we.vscodeCustomEditor="vscode-custom-editor",we.vscodeNotebookCell="vscode-notebook-cell",we.vscodeNotebookCellMetadata="vscode-notebook-cell-metadata",we.vscodeNotebookCellMetadataDiff="vscode-notebook-cell-metadata-diff",we.vscodeNotebookCellOutput="vscode-notebook-cell-output",we.vscodeNotebookCellOutputDiff="vscode-notebook-cell-output-diff",we.vscodeNotebookMetadata="vscode-notebook-metadata",we.vscodeInteractiveInput="vscode-interactive-input",we.vscodeSettings="vscode-settings",we.vscodeWorkspaceTrust="vscode-workspace-trust",we.vscodeTerminal="vscode-terminal",we.vscodeChatCodeBlock="vscode-chat-code-block",we.vscodeChatCodeCompareBlock="vscode-chat-code-compare-block",we.vscodeChatEditor="vscode-chat-editor",we.vscodeChatInput="chatSessionInput",we.vscodeLocalChatSession="vscode-chat-session",we.webviewPanel="webview-panel",we.vscodeWebview="vscode-webview",we.vscodeBrowser="vscode-browser",we.extension="extension",we.vscodeFileResource="vscode-file",we.tmp="tmp",we.vsls="vsls",we.vscodeSourceControl="vscode-scm",we.commentsInput="comment",we.codeSetting="code-setting",we.outputChannel="output",we.accessibleView="accessible-view",we.chatEditingSnapshotScheme="chat-editing-snapshot-text-model",we.chatEditingModel="chat-editing-text-model",we.copilotPr="copilot-pr"))(Y||={});B4="tkn",RS=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(n){this._preferredWebSchema=n}setDelegate(n){this._delegate=n}setServerRootPath(n,e){this._serverRootPath=Se.join(e??"/",V4(n))}getServerRootPath(){return this._serverRootPath}get _remoteResourcesPath(){return Se.join(this._serverRootPath,Y.vscodeRemoteResource)}set(n,e,t){this._hosts[n]=e,this._ports[n]=t}setConnectionToken(n,e){this._connectionTokens[n]=e}getPreferredWebSchema(){return this._preferredWebSchema}rewrite(n){if(this._delegate)try{return this._delegate(n)}catch(a){return vt(a),n}let e=n.authority,t=this._hosts[e];t&&t.indexOf(":")!==-1&&t.indexOf("[")===-1&&(t=`[${t}]`);let i=this._ports[e],o=this._connectionTokens[e],s=`path=${encodeURIComponent(n.path)}`;return typeof o=="string"&&(s+=`&${B4}=${encodeURIComponent(o)}`),A.from({scheme:$n?this._preferredWebSchema:Y.vscodeRemoteResource,authority:`${t}:${i}`,path:this._remoteResourcesPath,query:s})}},OS=new RS;ec="vscode-app",xS=class r{static{this.FALLBACK_AUTHORITY=ec}asBrowserUri(n){let e=this.toUri(n);return this.uriToBrowserUri(e)}uriToBrowserUri(n){return n.scheme===Y.vscodeRemote?OS.rewrite(n):n.scheme===Y.file&&(Sg||SR===`${Y.vscodeFileResource}://${r.FALLBACK_AUTHORITY}`)?n.with({scheme:Y.vscodeFileResource,authority:n.authority||r.FALLBACK_AUTHORITY,query:null,fragment:null}):n}asFileUri(n){let e=this.toUri(n);return this.uriToFileUri(e)}uriToFileUri(n){return n.scheme===Y.vscodeFileResource?n.with({scheme:Y.file,authority:n.authority!==r.FALLBACK_AUTHORITY?n.authority:null,query:null,fragment:null}):n}toUri(n){if(A.isUri(n))return n;if(globalThis._VSCODE_FILE_ROOT){let e=globalThis._VSCODE_FILE_ROOT;if(/^\w[\w\d+.-]*:\/\//.test(e))return A.joinPath(A.parse(e,!0),n);let t=H(e,n);return A.file(t)}throw new Error("Cannot determine URI for module id!")}},gt=new xS,Ax=Object.freeze({"Cache-Control":"no-cache, no-store"}),Rx=Object.freeze({"Document-Policy":"include-js-call-stacks-in-crash-reports"});(o=>{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"}]]);o.CoopAndCoep=Object.freeze(r.get("3"));let e="vscode-coi";function t(s){let a;typeof s=="string"?a=new URL(s).searchParams:s instanceof URL?a=s.searchParams:A.isUri(s)&&(a=new URL(s.toString(!0)).searchParams);let l=a?.get(e);if(l)return r.get(l)}o.getHeadersFromQuery=t;function i(s,a,l){if(!globalThis.crossOriginIsolated)return;let c=a&&l?"3":l?"2":"1";s instanceof URLSearchParams?s.set(e,c):s[e]=c}o.addSearchParam=i})(tc||={})});function Dn(r){return _p(r,!0)}var Ta,Qe,lt,nc,wp,kS,FH,G4,pr,Dx,Ox,be,qg,WH,BH,kx,tr,xx,rc,VH,H4,Ut=_(()=>{vi();xr();at();Ne();ce();Sn();Ie();Ta=class{constructor(n){this._ignorePathCasing=n}compare(n,e,t=!1){return n===e?0:yp(this.getComparisonKey(n,t),this.getComparisonKey(e,t))}isEqual(n,e,t=!1){return n===e?!0:!n||!e?!1:this.getComparisonKey(n,t)===this.getComparisonKey(e,t)}getComparisonKey(n,e=!1){return n.with({path:this._ignorePathCasing(n)?n.path.toLowerCase():void 0,fragment:e?null:void 0}).toString()}ignorePathCasing(n){return this._ignorePathCasing(n)}isEqualOrParent(n,e,t=!1){if(n.scheme===e.scheme){if(n.scheme===Y.file)return Oo(Dn(n),Dn(e),this._ignorePathCasing(n))&&n.query===e.query&&(t||n.fragment===e.fragment);if(tr(n.authority,e.authority))return Oo(n.path,e.path,this._ignorePathCasing(n),"/")&&n.query===e.query&&(t||n.fragment===e.fragment)}return!1}joinPath(n,...e){return A.joinPath(n,...e)}basenameOrAuthority(n){return pr(n)||n.authority}basename(n){return Se.basename(n.path)}extname(n){return Se.extname(n.path)}dirname(n){if(n.path.length===0)return n;let e;return n.scheme===Y.file?e=A.file(ze(Dn(n))).path:(e=Se.dirname(n.path),n.authority&&e.length&&e.charCodeAt(0)!==47&&(console.error(`dirname("${n.toString})) resulted in a relative path`),e="/")),n.with({path:e})}normalizePath(n){if(!n.path.length)return n;let e;return n.scheme===Y.file?e=A.file(kt(Dn(n))).path:e=Se.normalize(n.path),n.with({path:e})}relativePath(n,e){if(n.scheme!==e.scheme||!tr(n.authority,e.authority))return;if(n.scheme===Y.file){let o=Tg(Dn(n),Dn(e));return q?Yi(o):o}let t=n.path||"/",i=e.path||"/";if(this._ignorePathCasing(n)){let o=0;for(let s=Math.min(t.length,i.length);o<s&&!(t.charCodeAt(o)!==i.charCodeAt(o)&&t.charAt(o).toLowerCase()!==i.charAt(o).toLowerCase());o++);t=i.substr(0,o)+t.substr(o)}return Se.relative(t,i)}resolvePath(n,e){if(n.scheme===Y.file){let t=A.file(Nt(Dn(n),e));return n.with({authority:t.authority,path:t.path})}return e=Ex(e),n.with({path:Se.resolve(n.path,e)})}isAbsolutePath(n){return!!n.path&&n.path[0]==="/"}isEqualAuthority(n,e){return n===e||n!==void 0&&e!==void 0&&Hn(n,e)}hasTrailingPathSeparator(n,e=nn){if(n.scheme===Y.file){let t=Dn(n);return t.length>bS(t).length&&t[t.length-1]===e}else{let t=n.path;return t.length>1&&t.charCodeAt(t.length-1)===47&&!/^[a-zA-Z]:(\/$|\\$)/.test(n.fsPath)}}removeTrailingPathSeparator(n,e=nn){return xx(n,e)?n.with({path:n.path.substr(0,n.path.length-1)}):n}addTrailingPathSeparator(n,e=nn){let t=!1;if(n.scheme===Y.file){let i=Dn(n);t=i!==void 0&&i.length===bS(i).length&&i[i.length-1]===e}else{e="/";let i=n.path;t=i.length===1&&i.charCodeAt(i.length-1)===47}return!t&&!xx(n,e)?n.with({path:n.path+"/"}):n}},Qe=new Ta(()=>!1),lt=new Ta(r=>r.scheme===Y.file?!fe:!0),nc=new Ta(r=>!0),wp=Qe.isEqual.bind(Qe),kS=Qe.isEqualOrParent.bind(Qe),FH=Qe.getComparisonKey.bind(Qe),G4=Qe.basenameOrAuthority.bind(Qe),pr=Qe.basename.bind(Qe),Dx=Qe.extname.bind(Qe),Ox=Qe.dirname.bind(Qe),be=Qe.joinPath.bind(Qe),qg=Qe.normalizePath.bind(Qe),WH=Qe.relativePath.bind(Qe),BH=Qe.resolvePath.bind(Qe),kx=Qe.isAbsolutePath.bind(Qe),tr=Qe.isEqualAuthority.bind(Qe),xx=Qe.hasTrailingPathSeparator.bind(Qe),rc=Qe.removeTrailingPathSeparator.bind(Qe),VH=Qe.addTrailingPathSeparator.bind(Qe);(o=>{o.META_DATA_LABEL="label",o.META_DATA_DESCRIPTION="description",o.META_DATA_SIZE="size",o.META_DATA_MIME="mime";function i(s){let a=new Map;s.path.substring(s.path.indexOf(";")+1,s.path.lastIndexOf(";")).split(";").forEach(u=>{let[p,m]=u.split(":");p&&m&&a.set(p,m)});let c=s.path.substring(0,s.path.indexOf(";"));return c&&a.set(o.META_DATA_MIME,c),a}o.parseMetaData=i})(H4||={})});var Nx,Lx=_(()=>{Nx=Symbol("MicrotaskDelay")});function Xg(r){return!!r&&typeof r.then=="function"}function Si(r){let n=new st,e=r(n.token),t=!1,i=new Promise((o,s)=>{let a=n.token.onCancellationRequested(()=>{t=!0,a.dispose(),s(new Gt)});Promise.resolve(e).then(l=>{a.dispose(),n.dispose(),t?Mg(l)&&l.dispose():o(l)},l=>{a.dispose(),n.dispose(),s(l)})});return new class{cancel(){n.cancel(),n.dispose()}then(o,s){return i.then(o,s)}catch(o){return this.then(void 0,o)}finally(o){return i.finally(o)}}}function MS(r,n,e){let t,i=setTimeout(()=>{t?.(void 0),e?.()},n);return Promise.race([r.finally(()=>clearTimeout(i)),new Promise(o=>t=o)])}function Fx(){let r,n;return{promise:new Promise((t,i)=>{r=t,n=i}),resolve:r,reject:n}}function bt(r,n){return n?new Promise((e,t)=>{let i=setTimeout(()=>{o.dispose(),e()},r),o=n.onCancellationRequested(()=>{clearTimeout(i),o.dispose(),t(new Gt)})}):Si(e=>bt(r,e))}function $g(r,n=0,e){let t=setTimeout(()=>{r(),e&&i.dispose()},n),i=oe(()=>{clearTimeout(t),e?.delete(i)});return e?.add(i),i}function Wx(r,n=t=>!!t,e=null){let t=0,i=r.length,o=()=>{if(t>=i)return Promise.resolve(e);let s=r[t++];return Promise.resolve(s()).then(l=>n(l)?Promise.resolve(l):o())};return o()}async function Bx(r,n,e){let t;for(let i=0;i<e;i++)try{return await r()}catch(o){t=o,await bt(n)}throw t}var bp,J4,q4,Pa,Jn,Qi,Tp,$r,ic,Pp,jg,On,zg,Yg,oc,Cp,Kg,NS,Qg,un,Ft,Mx,LS,Ux,Ce=_(()=>{Bt();rt();ae();te();Ut();ce();Lx();hs();bp=class{constructor(){this.activePromise=null,this.queuedPromise=null,this.queuedPromiseFactory=null,this.cancellationTokenSource=new st}queue(n){if(this.cancellationTokenSource.token.isCancellationRequested)return Promise.reject(new Error("Throttler is disposed"));if(this.activePromise){if(this.queuedPromiseFactory=n,!this.queuedPromise){let e=()=>{if(this.queuedPromise=null,this.cancellationTokenSource.token.isCancellationRequested)return;let t=this.queue(this.queuedPromiseFactory);return this.queuedPromiseFactory=null,t};this.queuedPromise=new Promise(t=>{this.activePromise.then(e,e).then(t)})}return new Promise((e,t)=>{this.queuedPromise.then(e,t)})}return this.activePromise=n(this.cancellationTokenSource.token),new Promise((e,t)=>{this.activePromise.then(i=>{this.activePromise=null,e(i)},i=>{this.activePromise=null,t(i)})})}dispose(){this.cancellationTokenSource.cancel()}},J4=(r,n)=>{let e=!0,t=setTimeout(()=>{e=!1,n()},r);return{isTriggered:()=>e,dispose:()=>{clearTimeout(t),e=!1}}},q4=r=>{let n=!0;return queueMicrotask(()=>{n&&(n=!1,r())}),{isTriggered:()=>n,dispose:()=>{n=!1}}},Pa=class{constructor(n){this.defaultDelay=n;this.deferred=null,this.completionPromise=null,this.doResolve=null,this.doReject=null,this.task=null}trigger(n,e=this.defaultDelay){this.task=n,this.cancelTimeout(),this.completionPromise||(this.completionPromise=new Promise((i,o)=>{this.doResolve=i,this.doReject=o}).then(()=>{if(this.completionPromise=null,this.doResolve=null,this.task){let i=this.task;return this.task=null,i()}}));let t=()=>{this.deferred=null,this.doResolve?.(null)};return this.deferred=e===Nx?q4(t):J4(e,t),this.completionPromise}isTriggered(){return!!this.deferred?.isTriggered()}cancel(){this.cancelTimeout(),this.completionPromise&&(this.doReject?.(new Gt),this.completionPromise=null)}cancelTimeout(){this.deferred?.dispose(),this.deferred=null}dispose(){this.cancel()}},Jn=class{constructor(n){this.delayer=new Pa(n),this.throttler=new bp}trigger(n,e){return this.delayer.trigger(()=>this.throttler.queue(n),e)}isTriggered(){return this.delayer.isTriggered()}cancel(){this.delayer.cancel()}dispose(){this.delayer.dispose(),this.throttler.dispose()}},Qi=class{constructor(){this._isOpen=!1,this._promise=new Promise((n,e)=>{this._completePromise=n})}isOpen(){return this._isOpen}open(){this._isOpen=!0,this._completePromise(!0)}wait(){return this._promise}};Tp=class{constructor(n){this._size=0;this._isDisposed=!1;this.maxDegreeOfParalellism=n,this.outstandingPromises=[],this.runningPromises=0,this._onDrained=new C}whenIdle(){return this.size>0?x.toPromise(this.onDrained):Promise.resolve()}get onDrained(){return this._onDrained.event}get size(){return this._size}queue(n){if(this._isDisposed)throw new Error("Object has been disposed");return this._size++,new Promise((e,t)=>{this.outstandingPromises.push({factory:n,c:e,e:t}),this.consume()})}consume(){for(;this.outstandingPromises.length&&this.runningPromises<this.maxDegreeOfParalellism;){let n=this.outstandingPromises.shift();this.runningPromises++;let e=n.factory();e.then(n.c,n.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()}},$r=class extends Tp{constructor(){super(1)}},ic=class{constructor(){this.queues=new Map;this.drainers=new Set;this.drainListeners=void 0;this.drainListenerCount=0}async whenDrained(){if(this.isDrained())return;let n=new un;return this.drainers.add(n),n.p}isDrained(){for(let[,n]of this.queues)if(n.size>0)return!1;return!0}queueSize(n,e=Qe){let t=e.getComparisonKey(n);return this.queues.get(t)?.size??0}queueFor(n,e,t=Qe){let i=t.getComparisonKey(n),o=this.queues.get(i);if(!o){o=new $r;let s=this.drainListenerCount++,a=x.once(o.onDrained)(()=>{o?.dispose(),this.queues.delete(i),this.onDidQueueDrain(),this.drainListeners?.deleteAndDispose(s),this.drainListeners?.size===0&&(this.drainListeners.dispose(),this.drainListeners=void 0)});this.drainListeners||(this.drainListeners=new xn),this.drainListeners.set(s,a),this.queues.set(i,o)}return o.queue(e)}onDidQueueDrain(){this.isDrained()&&this.releaseDrainers()}releaseDrainers(){for(let n of this.drainers)n.complete();this.drainers.clear()}dispose(){for(let[,n]of this.queues)n.dispose();this.queues.clear(),this.releaseDrainers(),this.drainListeners?.dispose()}},Pp=class{constructor(n,e){this._isDisposed=!1;this._token=void 0,typeof n=="function"&&typeof e=="number"&&this.setIfNotSet(n,e)}dispose(){this.cancel(),this._isDisposed=!0}cancel(){this._token!==void 0&&(clearTimeout(this._token),this._token=void 0)}cancelAndSet(n,e){if(this._isDisposed)throw new hi("Calling 'cancelAndSet' on a disposed TimeoutTimer");this.cancel(),this._token=setTimeout(()=>{this._token=void 0,n()},e)}setIfNotSet(n,e){if(this._isDisposed)throw new hi("Calling 'setIfNotSet' on a disposed TimeoutTimer");this._token===void 0&&(this._token=setTimeout(()=>{this._token=void 0,n()},e))}},jg=class{constructor(){this.disposable=void 0;this.isDisposed=!1}cancel(){this.disposable?.dispose(),this.disposable=void 0}cancelAndSet(n,e,t=globalThis){if(this.isDisposed)throw new hi("Calling 'cancelAndSet' on a disposed IntervalTimer");this.cancel();let i=t.setInterval(()=>{n()},e);this.disposable=oe(()=>{t.clearInterval(i),this.disposable=void 0})}dispose(){this.cancel(),this.isDisposed=!0}},On=class{constructor(n,e){this.timeoutToken=void 0,this.runner=n,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(n=this.timeout){this.cancel(),this.timeoutToken=setTimeout(this.timeoutHandler,n)}get delay(){return this.timeout}set delay(n){this.timeout=n}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?.()}},zg=class{constructor(n,e){e%1e3!==0&&console.warn(`ProcessTimeRunOnceScheduler resolution is 1s, ${e}ms is not a multiple of 1000ms.`),this.runner=n,this.timeout=e,this.counter=0,this.intervalToken=void 0,this.intervalHandler=this.onInterval.bind(this)}dispose(){this.cancel(),this.runner=null}cancel(){this.isScheduled()&&(clearInterval(this.intervalToken),this.intervalToken=void 0)}schedule(n=this.timeout){n%1e3!==0&&console.warn(`ProcessTimeRunOnceScheduler resolution is 1s, ${n}ms is not a multiple of 1000ms.`),this.cancel(),this.counter=Math.ceil(n/1e3),this.intervalToken=setInterval(this.intervalHandler,1e3)}isScheduled(){return this.intervalToken!==void 0}onInterval(){this.counter--,!(this.counter>0)&&(clearInterval(this.intervalToken),this.intervalToken=void 0,this.runner?.())}},Yg=class extends On{constructor(e,t){super(e,t);this.units=[]}work(e){this.units.push(e),this.isScheduled()||this.schedule()}doRun(){let e=this.units;this.units=[],this.runner?.(e)}dispose(){this.units=[],super.dispose()}},oc=class extends M{constructor(e,t){super();this.options=e;this.handler=t;this.pendingWork=[];this.throttler=this._register(new yn);this.disposed=!1;this.lastExecutionTime=0}get pending(){return this.pendingWork.length}work(e){if(this.disposed)return!1;if(typeof this.options.maxBufferedWork=="number"){if(this.throttler.value){if(this.pending+e.length>this.options.maxBufferedWork)return!1}else if(this.pending+e.length-this.options.maxWorkChunkSize>this.options.maxBufferedWork)return!1}for(let i of e)this.pendingWork.push(i);let t=Date.now()-this.lastExecutionTime;return!this.throttler.value&&(!this.options.waitThrottleDelayBetweenWorkUnits||t>=this.options.throttleDelay)?this.doWork():!this.throttler.value&&this.options.waitThrottleDelayBetweenWorkUnits&&this.scheduleThrottler(Math.max(this.options.throttleDelay-t,0)),!0}doWork(){this.lastExecutionTime=Date.now(),this.handler(this.pendingWork.splice(0,this.options.maxWorkChunkSize)),this.pendingWork.length>0&&this.scheduleThrottler()}scheduleThrottler(e=this.options.throttleDelay){this.throttler.value=new On(()=>{this.throttler.clear(),this.doWork()},e),this.throttler.value.schedule()}dispose(){super.dispose(),this.pendingWork.length=0,this.disposed=!0}};(function(){let r=globalThis;typeof r.requestIdleCallback!="function"||typeof r.cancelIdleCallback!="function"?Kg=(n,e,t)=>{wR(()=>{if(i)return;let o=Date.now()+15;e(Object.freeze({didTimeout:!0,timeRemaining(){return Math.max(0,o-Date.now())}}))});let i=!1;return{dispose(){i||(i=!0)}}}:Kg=(n,e,t)=>{let i=n.requestIdleCallback(e,typeof t=="number"?{timeout:t}:void 0),o=!1;return{dispose(){o||(o=!0,n.cancelIdleCallback(i))}}},Cp=(n,e)=>Kg(globalThis,n,e)})();NS=class{constructor(n,e){this._didRun=!1;this._executor=()=>{try{this._value=e()}catch(t){this._error=t}finally{this._didRun=!0}},this._handle=Kg(n,()=>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}},Qg=class extends NS{constructor(n){super(globalThis,n)}};un=class r{static fromPromise(n){let e=new r;return e.settleWith(n),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((n,e)=>{this.completeCallback=n,this.errorCallback=e})}complete(n){return this.isSettled?Promise.resolve():new Promise(e=>{this.completeCallback(n),this.outcome={outcome:0,value:n},e()})}error(n){return this.isSettled?Promise.resolve():new Promise(e=>{this.errorCallback(n),this.outcome={outcome:1,value:n},e()})}settleWith(n){return n.then(e=>this.complete(e),e=>this.error(e))}cancel(){return this.error(new Gt)}};(e=>{async function r(t){let i,o=await Promise.all(t.map(s=>s.then(a=>a,a=>{i||(i=a)})));if(typeof i<"u")throw i;return o}e.settled=r;function n(t){return new Promise(async(i,o)=>{try{await t(i,o)}catch(s){o(s)}})}e.withAsyncBody=n})(Ft||={});Mx=class r{static fromArray(n){return new r(e=>{e.emitMany(n)})}static fromPromise(n){return new r(async e=>{e.emitMany(await n)})}static fromPromisesResolveOrder(n){return new r(async e=>{await Promise.all(n.map(async t=>e.emitOne(await t)))})}static merge(n){return new r(async e=>{await Promise.all(n.map(async t=>{for await(let i of t)e.emitOne(i)}))})}static{this.EMPTY=r.fromArray([])}constructor(n,e){this._state=0,this._results=[],this._error=null,this._onReturn=e,this._onStateChanged=new C,queueMicrotask(async()=>{let t={emitOne:i=>this.emitOne(i),emitMany:i=>this.emitMany(i),reject:i=>this.reject(i)};try{await Promise.resolve(n(t)),this.resolve()}catch(i){this.reject(i)}finally{t.emitOne=void 0,t.emitMany=void 0,t.reject=void 0}})}[Symbol.asyncIterator](){let n=0;return{next:async()=>{do{if(this._state===2)throw this._error;if(n<this._results.length)return{done:!1,value:this._results[n++]};if(this._state===1)return{done:!0,value:void 0};await x.toPromise(this._onStateChanged.event)}while(!0)},return:async()=>(this._onReturn?.(),{done:!0,value:void 0})}}static map(n,e){return new r(async t=>{for await(let i of n)t.emitOne(e(i))})}map(n){return r.map(this,n)}static filter(n,e){return new r(async t=>{for await(let i of n)e(i)&&t.emitOne(i)})}filter(n){return r.filter(this,n)}static coalesce(n){return r.filter(n,e=>!!e)}coalesce(){return r.coalesce(this)}static async toPromise(n){let e=[];for await(let t of n)e.push(t);return e}toPromise(){return r.toPromise(this)}emitOne(n){this._state===0&&(this._results.push(n),this._onStateChanged.fire())}emitMany(n){this._state===0&&(this._results=this._results.concat(n),this._onStateChanged.fire())}resolve(){this._state===0&&(this._state=1,this._onStateChanged.fire())}reject(n){this._state===0&&(this._state=2,this._error=n,this._onStateChanged.fire())}},LS=class{constructor(){this._unsatisfiedConsumers=[];this._unconsumedValues=[]}get hasFinalValue(){return!!this._finalValue}produce(n){if(this._ensureNoFinalValue(),this._unsatisfiedConsumers.length>0){let e=this._unsatisfiedConsumers.shift();this._resolveOrRejectDeferred(e,n)}else this._unconsumedValues.push(n)}produceFinal(n){this._ensureNoFinalValue(),this._finalValue=n;for(let e of this._unsatisfiedConsumers)this._resolveOrRejectDeferred(e,n);this._unsatisfiedConsumers.length=0}_ensureNoFinalValue(){if(this._finalValue)throw new hi("ProducerConsumer: cannot produce after final value has been set")}_resolveOrRejectDeferred(n,e){e.ok?n.complete(e.value):n.error(e.error)}consume(){if(this._unconsumedValues.length>0||this._finalValue){let n=this._unconsumedValues.length>0?this._unconsumedValues.shift():this._finalValue;return n.ok?Promise.resolve(n.value):Promise.reject(n.error)}else{let n=new un;return this._unsatisfiedConsumers.push(n),n.p}}},Ux=class r{constructor(n,e){this._onReturn=e;this._producerConsumer=new LS;this._iterator={next:()=>this._producerConsumer.consume(),return:()=>(this._onReturn?.(),Promise.resolve({done:!0,value:void 0})),throw:async n=>(this._finishError(n),{done:!0,value:void 0})};queueMicrotask(async()=>{let t=n({emitOne:i=>this._producerConsumer.produce({ok:!0,value:{done:!1,value:i}}),emitMany:i=>{for(let o of i)this._producerConsumer.produce({ok:!0,value:{done:!1,value:o}})},reject:i=>this._finishError(i)});if(!this._producerConsumer.hasFinalValue)try{await t,this._finishOk()}catch(i){this._finishError(i)}})}static fromArray(n){return new r(e=>{e.emitMany(n)})}static fromPromise(n){return new r(async e=>{e.emitMany(await n)})}static fromPromisesResolveOrder(n){return new r(async e=>{await Promise.all(n.map(async t=>e.emitOne(await t)))})}static merge(n){return new r(async e=>{await Promise.all(n.map(async t=>{for await(let i of t)e.emitOne(i)}))})}static{this.EMPTY=r.fromArray([])}static map(n,e){return new r(async t=>{for await(let i of n)t.emitOne(e(i))})}static tee(n){let e,t,i=new un,o=async()=>{if(!(!e||!t))try{for await(let l of n)e.emitOne(l),t.emitOne(l)}catch(l){e.reject(l),t.reject(l)}finally{i.complete()}},s=new r(async l=>(e=l,o(),i.p)),a=new r(async l=>(t=l,o(),i.p));return[s,a]}map(n){return r.map(this,n)}static coalesce(n){return r.filter(n,e=>!!e)}coalesce(){return r.coalesce(this)}static filter(n,e){return new r(async t=>{for await(let i of n)e(i)&&t.emitOne(i)})}filter(n){return r.filter(this,n)}_finishOk(){this._producerConsumer.hasFinalValue||this._producerConsumer.produceFinal({ok:!0,value:{done:!0,value:void 0}})}_finishError(n){this._producerConsumer.hasFinalValue||this._producerConsumer.produceFinal({ok:!1,error:n})}[Symbol.asyncIterator](){return this._iterator}}});function Xi(r){return Vx(r,"NFC",K4)}function z4(r){return Vx(r,"NFD",j4)}function Vx(r,n,e){if(!r)return r;let t=e.get(r);if(t)return t;let i;return Y4.test(r)?i=r.normalize(n):i=r,e.set(r,i),i}var K4,j4,Y4,oJ,Ap=_(()=>{er();K4=new qi(1e4);j4=new qi(1e4);Y4=/[^\u0000-\u0080]/;oJ=(function(){let r=new qi(1e4),n=/[\u0300-\u036f]/g;return function(e){let t=r.get(e);if(t)return t;let i=z4(e).replace(n,""),o=(i.length===e.length?i:e).toLowerCase();return r.set(e,o),o}})()});import*as Oe from"fs";import{tmpdir as Q4}from"os";import{promisify as Rp}from"util";async function Jx(r,n=0,e){if(PS(r))throw new Error("rimraf - will refuse to recursively delete root");return n===0?US(r):X4(r,e)}async function X4(r,n=ba(Q4())){try{try{await Oe.promises.rename(r,n)}catch(e){return e.code==="ENOENT"?void 0:US(r)}US(n).catch(()=>{})}catch(e){if(e.code!=="ENOENT")throw e}}async function US(r){return Oe.promises.rm(r,{recursive:!0,force:!0,maxRetries:3})}async function Zg(r,n){try{return await Gx(r,n)}catch(e){if(e.code==="ENOENT"&&q&&PS(r))try{return await Gx(`${r}.`,n)}catch{}throw e}}async function Gx(r,n){return Z4(await(n?$4(r):Oe.promises.readdir(r)))}async function $4(r){try{return await Oe.promises.readdir(r,{withFileTypes:!0})}catch(t){t.code!=="ENOENT"&&console.warn("[node.js fs] readdir with filetypes failed with error: ",t)}let n=[],e=await Zg(r);for(let t of e){let i=!1,o=!1,s=!1;try{let a=await Oe.promises.lstat(H(r,t));i=a.isFile(),o=a.isDirectory(),s=a.isSymbolicLink()}catch(a){a.code!=="ENOENT"&&console.warn("[node.js fs] unexpected error from lstat after readdir: ",a)}n.push({name:t,isFile:()=>i,isDirectory:()=>o,isSymbolicLink:()=>s})}return n}function Z4(r){return r.map(n=>typeof n=="string"?$?Xi(n):n:(n.name=$?Xi(n.name):n.name,n))}async function e5(r){let n=await Zg(r),e=[];for(let t of n)await hn.existsDirectory(H(r,t))&&e.push(t);return e}function qx(r,n=1e3){return new Promise(e=>{let t=!1,i=setInterval(()=>{t||(t=!0,Oe.access(r,o=>{t=!1,o&&(clearInterval(i),e(void 0))}))},n)})}function n5(r,n,e){return t5.queueFor(A.file(r),()=>{let t=o5(e);return new Promise((i,o)=>i5(r,n,t,s=>s?o(s):i()))},lt)}function r5(r){Kx=r}function i5(r,n,e,t){if(!Kx)return Oe.writeFile(r,n,{mode:e.mode,flag:e.flag},t);Oe.open(r,e.flag,e.mode,(i,o)=>{if(i)return t(i);Oe.writeFile(o,n,s=>{if(s)return Oe.close(o,()=>t(s));Oe.fdatasync(o,a=>(a&&(console.warn("[node.js fs] fdatasync is now disabled for this session because it failed: ",a),r5(!1)),Oe.close(o,l=>t(l))))})})}function o5(r){return r?{mode:typeof r.mode=="number"?r.mode:438,flag:typeof r.flag=="string"?r.flag:"w"}:{mode:438,flag:"w"}}async function s5(r,n,e=6e4){if(r!==n)try{q&&typeof e=="number"?await jx(r,n,Date.now(),e):await Oe.promises.rename(r,n)}catch(t){if(r.toLowerCase()!==n.toLowerCase()&&t.code==="EXDEV"||r.endsWith("."))await zx(r,n,{preserveSymlinks:!1}),await Jx(r,1);else throw t}}async function jx(r,n,e,t,i=0){try{return await Oe.promises.rename(r,n)}catch(o){if(o.code!=="EACCES"&&o.code!=="EPERM"&&o.code!=="EBUSY")throw o;if(Date.now()-e>=t)throw console.error(`[node.js fs] rename failed after ${i} retries with error: ${o}`),o;if(i===0){let s=!1;try{let{stat:a}=await hn.stat(n);a.isFile()||(s=!0)}catch{}if(s)throw o}return await bt(Math.min(100,i*10)),jx(r,n,e,t,i+1)}}async function zx(r,n,e){return Yx(r,n,{root:{source:r,target:n},options:e,handledSourcePaths:new Set})}async function Yx(r,n,e){if(e.handledSourcePaths.has(r))return;e.handledSourcePaths.add(r);let{stat:t,symbolicLink:i}=await hn.stat(r);if(i){if(e.options.preserveSymlinks)try{return await c5(r,n,e)}catch{}if(i.dangling)return}return t.isDirectory()?a5(r,n,t.mode&Hx,e):l5(r,n,t.mode&Hx)}async function a5(r,n,e,t){await Oe.promises.mkdir(n,{recursive:!0,mode:e});let i=await Zg(r);for(let o of i)await Yx(H(r,o),H(n,o),t)}async function l5(r,n,e){await Oe.promises.copyFile(r,n),await Oe.promises.chmod(n,e)}async function c5(r,n,e){let t=await Oe.promises.readlink(r);Oo(t,e.root.source,!fe)&&(t=H(e.root.target,t.substr(e.root.source.length+1))),await Oe.promises.symlink(t,n)}async function d5(r){try{return await Rp(Oe.realpath)(r)}catch{let n=u5(r);return await Oe.promises.access(n,Oe.constants.R_OK),n}}function u5(r){return Ei(kt(r),nn)}var hn,t5,Kx,Hx,re,pn=_(()=>{Ce();xr();Ap();Ne();ce();Ut();Ie();Sn();(t=>{async function r(i){let o;try{if(o=await Oe.promises.lstat(i),!o.isSymbolicLink())return{stat:o}}catch{}try{return{stat:await Oe.promises.stat(i),symbolicLink:o?.isSymbolicLink()?{dangling:!1}:void 0}}catch(s){if(s.code==="ENOENT"&&o)return{stat:o,symbolicLink:{dangling:!0}};if(q&&s.code==="EACCES")try{return{stat:await Oe.promises.stat(await Oe.promises.readlink(i)),symbolicLink:{dangling:!1}}}catch(a){if(a.code==="ENOENT"&&o)return{stat:o,symbolicLink:{dangling:!0}};throw a}throw s}}t.stat=r;async function n(i){try{let{stat:o,symbolicLink:s}=await t.stat(i);return o.isFile()&&s?.dangling!==!0}catch{}return!1}t.existsFile=n;async function e(i){try{let{stat:o,symbolicLink:s}=await t.stat(i);return o.isDirectory()&&s?.dangling!==!0}catch{}return!1}t.existsDirectory=e})(hn||={});t5=new ic;Kx=!0;Hx=511;re=new class{get read(){return(r,n,e,t,i)=>new Promise((o,s)=>{Oe.read(r,n,e,t,i,(a,l,c)=>a?s(a):o({bytesRead:l,buffer:c}))})}get write(){return(r,n,e,t,i)=>new Promise((o,s)=>{Oe.write(r,n,e,t,i,(a,l,c)=>a?s(a):o({bytesWritten:l,buffer:c}))})}get fdatasync(){return Rp(Oe.fdatasync)}get open(){return Rp(Oe.open)}get close(){return Rp(Oe.close)}get ftruncate(){return Rp(Oe.ftruncate)}async exists(r){try{return await Oe.promises.access(r),!0}catch{return!1}}get readdir(){return Zg}get readDirsInDir(){return e5}get writeFile(){return n5}get rm(){return Jx}get rename(){return s5}get copy(){return zx}get realpath(){return d5}}});function Qx(){let r=Xx();return r?Array.from(r):[]}function Xx(){return process.uncHostAllowlist}function No(r){if(process.platform!=="win32")return;let n=Xx();if(n)if(typeof r=="string")n.add(r.toLowerCase());else for(let e of g5(r))No(e)}function g5(r){let n=new Set;if(Array.isArray(r))for(let e of r)typeof e=="string"&&n.add(e);return Array.from(n)}function eh(r){if(typeof r!="string")return;let n=["\\\\.\\UNC\\","\\\\?\\UNC\\","\\\\"],e;for(let t of n){if(r.indexOf(t)!==0)continue;let o=r.indexOf("\\",t.length);if(o===-1)continue;let s=r.substring(t.length,o);if(s){e=s;break}}return e}function $x(){process.platform==="win32"&&(process.restrictUNCAccess=!1)}function Zx(){return process.platform!=="win32"?!0:process.restrictUNCAccess===!1}var ac=_(()=>{});var eD,TJ,Dp=_(()=>{We();eD="/etc/vscode/policy.json",TJ={Extensions:{name:{key:"extensionsConfigurationTitle",value:v(141,null)}},IntegratedTerminal:{name:{key:"terminalIntegratedConfigurationTitle",value:v(144,null)}},InteractiveSession:{name:{key:"interactiveSessionConfigurationTitle",value:v(142,null)}},Telemetry:{name:{key:"telemetryConfigurationTitle",value:v(143,null)}},Update:{name:{key:"updateConfigurationTitle",value:v(145,null)}}}});function h5(r,n,e){n[_i.DI_TARGET]===n?n[_i.DI_DEPENDENCIES].push({id:r,index:e}):(n[_i.DI_DEPENDENCIES]=[{id:r,index:e}],n[_i.DI_TARGET]=n)}function V(r){if(_i.serviceIds.has(r))return _i.serviceIds.get(r);let n=function(e,t,i){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");h5(n,e,i)};return n.toString=()=>r,_i.serviceIds.set(r,n),n}var _i,rn,de=_(()=>{(i=>{i.serviceIds=new Map,i.DI_TARGET="$di$target",i.DI_DEPENDENCIES="$di$dependencies";function t(o){return o[i.DI_DEPENDENCIES]||[]}i.getServiceDependencies=t})(_i||={});rn=V("instantiationService")});function th(r){let n=r;return n&&typeof n=="object"&&(!n.overrideIdentifier||typeof n.overrideIdentifier=="string")&&(!n.resource||n.resource instanceof A)}function tD(r){let n=r;return n&&typeof n=="object"&&(!n.overrideIdentifiers||Array.isArray(n.overrideIdentifiers))&&!n.overrideIdentifier&&(!n.resource||n.resource instanceof A)}function nh(r,n){let e=Object.create(null);for(let t in r)WS(e,t,r[t],n);return e}function WS(r,n,e,t){let i=n.split("."),o=i.pop(),s=r;for(let a=0;a<i.length;a++){let l=i[a],c=s[l];switch(typeof c){case"undefined":c=s[l]=Object.create(null);break;case"object":if(c===null){t(`Ignoring ${n} as ${i.slice(0,a+1).join(".")} is null`);return}break;default:t(`Ignoring ${n} as ${i.slice(0,a+1).join(".")} is ${JSON.stringify(c)}`);return}s=c}if(typeof s=="object"&&s!==null)try{s[o]=e}catch{t(`Ignoring ${n} as ${i.join(".")} is ${JSON.stringify(s)}`)}else t(`Ignoring ${n} as ${i.join(".")} is ${JSON.stringify(s)}`)}function nD(r,n){let e=n.split(".");rD(r,e)}function rD(r,n){if(!r)return;let e=r,t=n.shift();if(n.length===0){delete e[t];return}if(Object.keys(e).indexOf(t)!==-1){let i=e[t];typeof i=="object"&&!Array.isArray(i)&&(rD(i,n),Object.keys(i).length===0&&delete e[t])}}function Op(r,n,e){function t(s,a){let l=s;for(let c of a){if(typeof l!="object"||l===null)return;l=l[c]}return l}let i=n.split("."),o=t(r,i);return typeof o>"u"?e:o}function iD(r){return r.replace(/^\[/,"").replace(/]$/g,"").replace(/\]\[/g,", ")}var Ae,_t=_(()=>{jl();qe();Ie();de();Ae=V("configurationService")});function oD(r){let n=!1,e=new Map,t=new Map;if(I5(r,u=>{if(r===u)return!0;let p=JSON.stringify(u);if(p.length<30)return!0;let m=e.get(p);if(!m){let h={schemas:[u]};return e.set(p,h),t.set(u,h),!0}return m.schemas.push(u),t.set(u,m),n=!0,!1}),e.clear(),!n)return JSON.stringify(r);let o="$defs";for(;r.hasOwnProperty(o);)o+="_";let s=[];function a(u){return JSON.stringify(u,(p,m)=>{if(m!==u){let h=t.get(m);if(h&&h.schemas.length>1)return h.id||(h.id=`_${s.length}`,s.push(h.schemas[0])),{$ref:`#/${o}/${h.id}`}}return m})}let l=a(r),c=[];for(let u=0;u<s.length;u++)c.push(`"_${u}":${a(s[u])}`);return c.length?`${l.substring(0,l.length-1)},"${o}":{${c.join(",")}}}`:l}function lc(r){return typeof r=="object"&&r!==null}function I5(r,n){if(!r||typeof r!="object")return;let e=(...l)=>{for(let c of l)lc(c)&&s.push(c)},t=(...l)=>{for(let c of l)if(lc(c))for(let u in c){let p=c[u];lc(p)&&s.push(p)}},i=(...l)=>{for(let c of l)if(Array.isArray(c))for(let u of c)lc(u)&&s.push(u)},o=l=>{if(Array.isArray(l))for(let c of l)lc(c)&&s.push(c);else lc(l)&&s.push(l)},s=[r],a=s.pop();for(;a;)n(a)&&(e(a.additionalItems,a.additionalProperties,a.not,a.contains,a.propertyNames,a.if,a.then,a.else,a.unevaluatedItems,a.unevaluatedProperties),t(a.definitions,a.$defs,a.properties,a.patternProperties,a.dependencies,a.dependentSchemas),i(a.anyOf,a.allOf,a.oneOf,a.prefixItems),o(a.items)),a=s.pop()}var sD=_(()=>{});var BS,Ht,wi=_(()=>{jl();qe();BS=class{constructor(){this.data=new Map}add(n,e){kg(Ye(n)),kg(ut(e)),kg(!this.data.has(n),"There is already an extension with this id"),this.data.set(n,e)}knows(n){return this.data.has(n)}as(n){return this.data.get(n)||null}dispose(){this.data.forEach(n=>{fp(n.dispose)&&n.dispose()}),this.data.clear()}},Ht=new BS});function aD(r){return r.length>0&&r.charAt(r.length-1)==="#"?r.substring(0,r.length-1):r}var GS,VS,E5,lD=_(()=>{ae();sD();te();wi();GS={JSONContribution:"base.contributions.json"};VS=class extends M{constructor(){super(...arguments);this.schemasById={};this.schemaAssociations={};this._onDidChangeSchema=this._register(new C);this.onDidChangeSchema=this._onDidChangeSchema.event;this._onDidChangeSchemaAssociations=this._register(new C);this.onDidChangeSchemaAssociations=this._onDidChangeSchemaAssociations.event}registerSchema(e,t,i){let o=aD(e);this.schemasById[o]=t,this._onDidChangeSchema.fire(e),i&&i.add(oe(()=>{delete this.schemasById[o],this._onDidChangeSchema.fire(e)}))}registerSchemaAssociation(e,t){let i=aD(e);return this.schemaAssociations[i]||(this.schemaAssociations[i]=[]),this.schemaAssociations[i].includes(t)||(this.schemaAssociations[i].push(t),this._onDidChangeSchemaAssociations.fire()),oe(()=>{let o=this.schemaAssociations[i];if(o){let s=o.indexOf(t);s!==-1&&(o.splice(s,1),o.length===0&&delete this.schemaAssociations[i],this._onDidChangeSchemaAssociations.fire())}})}notifySchemaChanged(e){this._onDidChangeSchema.fire(e)}getSchemaContributions(){return{schemas:this.schemasById}}getSchemaContent(e){let t=this.schemasById[e];return t?oD(t):void 0}hasSchemaContent(e){return!!this.schemasById[e]}getSchemaAssociations(){return this.schemaAssociations}},E5=new VS;Ht.add(GS.JSONContribution,E5)});var Dr,HS,qn,kp=_(()=>{gi();HS=globalThis.vscode;if(typeof HS<"u"&&typeof HS.context<"u"){let r=HS.context.configuration();if(r)Dr=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(Dr=globalThis._VSCODE_PRODUCT_JSON,En.VSCODE_DEV&&Object.assign(Dr,{nameShort:`${Dr.nameShort} Dev`,nameLong:`${Dr.nameLong} Dev`,dataFolderName:`${Dr.dataFolderName}-dev`,serverDataFolderName:Dr.serverDataFolderName?`${Dr.serverDataFolderName}-dev`:void 0}),!Dr.version){let r=globalThis._VSCODE_PACKAGE_JSON;Object.assign(Dr,{version:r.version})}}else Dr={nameShort:"Devin",nameLong:"Devin",applicationName:"devin-desktop",aliasName:"surf",dataFolderName:".devin",oldDataFolderName:".windsurf",oldNameShort:"Windsurf",win32MutexName:"devin-desktop",licenseName:"MIT",licenseUrl:"https://windsurf.com/terms-of-service-individual",serverLicenseUrl:"https://windsurf.com/terms-of-service-individual",serverGreeting:[],serverLicense:[],serverLicensePrompt:"",serverApplicationName:"devin-server",serverDataFolderName:".devin-server",tunnelApplicationName:"devin-tunnel",win32DirName:"Devin",win32NameVersion:"Devin",win32RegValueName:"Devin",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:"Devin",win32TunnelServiceMutex:"devin-tunnelservice",win32TunnelMutex:"devin-tunnel",darwinBundleIdentifier:"com.exafunction.windsurf",darwinProfileUUID:"35631911-548E-4245-8C30-A1A0C65DCF7E",darwinProfilePayloadUUID:"53671443-8AE4-4FCA-B901-991F8B03A158",linuxIconName:"devin-desktop",snapName:"windsurf",licenseFileName:"LICENSE.txt",reportIssueUrl:"https://windsurf.com/redirect/windsurf/feedback?referrer=extension",nodejsRepository:"https://nodejs.org",urlProtocol:"devin",oldUrlProtocol:"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:"Devin",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:"0d4bf12ed4a7597cb8ae9016fe8474468aad98a2",windsurfVersion:"3.4.27",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:"0d4bf12ed4a7597cb8ae9016fe8474468aad98a2",date:"2026-07-06T08:10:26.411Z"},Object.keys(Dr).length===0&&Object.assign(Dr,{version:"1.104.2-dev",nameShort:"Devin Dev",nameLong:"Devin 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:[]}});qn=Dr});function y5(r,n){return r===n?!0:!r||!n?!1:typeof r=="string"||typeof n=="string"?r===n:r.id===n.id}function cc(r){let n=[];if($i.test(r)){let e=cD.exec(r);for(;e?.length;){let t=e[1].trim();t&&n.push(t),e=cD.exec(r)}}return Zn(n)}function uD(r){return r.reduce((n,e)=>`${n}[${e}]`,"")}function S5(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}}function _5(r,n,e){return r.trim()?$i.test(r)?v(1848,null,r):dh.getConfigurationProperties()[r]!==void 0&&(!e||!w5.has(e.toLowerCase()))?v(1846,null,r):n.policy?.name&&dh.getPolicyConfigurations().get(n.policy?.name)!==void 0?v(1845,null,r,n.policy?.name,dh.getPolicyConfigurations().get(n.policy?.name)):null:v(1847,null)}var _n,rh,ih,oh,sh,ah,lh,Np,Ca,ch,JS,dD,cD,Ss,$i,dh,w5,Lo=_(()=>{dn();ae();qe();We();_t();lD();wi();te();kp();_n={Configuration:"base.contributions.configuration"};rh={properties:{},patternProperties:{}},ih={properties:{},patternProperties:{}},oh={properties:{},patternProperties:{}},sh={properties:{},patternProperties:{}},ah={properties:{},patternProperties:{}},lh={properties:{},patternProperties:{}},Np={properties:{},patternProperties:{}},Ca="vscode://schemas/settings/resourceLanguage",ch=Ht.as(GS.JSONContribution),JS=class extends M{constructor(){super();this.registeredConfigurationDefaults=[];this.overrideIdentifiers=new Set;this._onDidSchemaChange=this._register(new C);this.onDidSchemaChange=this._onDidSchemaChange.event;this._onDidUpdateConfiguration=this._register(new C);this.onDidUpdateConfiguration=this._onDidUpdateConfiguration.event;this.configurationDefaultsOverrides=new Map,this.defaultLanguageConfigurationOverridesNode={id:"defaultOverrides",title:v(1850,null),properties:{}},this.configurationContributors=[this.defaultLanguageConfigurationOverridesNode],this.resourceLanguageSettingsSchema={properties:{},patternProperties:{},additionalProperties:!0,allowTrailingCommas:!0,allowComments:!0},this.configurationProperties={},this.policyConfigurations=new Map,this.excludedConfigurationProperties={},ch.registerSchema(Ca,this.resourceLanguageSettingsSchema),this.registerOverridePropertyPatternKey()}registerConfiguration(e,t=!0){return this.registerConfigurations([e],t),e}registerConfigurations(e,t=!0){let i=new Set;this.doRegisterConfigurations(e,t,i),ch.registerSchema(Ca,this.resourceLanguageSettingsSchema),this._onDidSchemaChange.fire(),this._onDidUpdateConfiguration.fire({properties:i})}deregisterConfigurations(e){let t=new Set;this.doDeregisterConfigurations(e,t),ch.registerSchema(Ca,this.resourceLanguageSettingsSchema),this._onDidSchemaChange.fire(),this._onDidUpdateConfiguration.fire({properties:t})}updateConfigurations({add:e,remove:t}){let i=new Set;this.doDeregisterConfigurations(t,i),this.doRegisterConfigurations(e,!1,i),ch.registerSchema(Ca,this.resourceLanguageSettingsSchema),this._onDidSchemaChange.fire(),this._onDidUpdateConfiguration.fire({properties:i})}registerDefaultConfigurations(e){let t=new Set;this.doRegisterDefaultConfigurations(e,t),this._onDidSchemaChange.fire(),this._onDidUpdateConfiguration.fire({properties:t,defaultsOverrides:!0})}doRegisterDefaultConfigurations(e,t){this.registeredConfigurationDefaults.push(...e);let i=[];for(let{overrides:o,source:s}of e)for(let a in o){t.add(a);let l=this.configurationDefaultsOverrides.get(a)??this.configurationDefaultsOverrides.set(a,{configurationDefaultOverrides:[]}).get(a),c=o[a];if(l.configurationDefaultOverrides.push({value:c,source:s}),$i.test(a)){let u=this.mergeDefaultConfigurationsForOverrideIdentifier(a,c,s,l.configurationDefaultOverrideValue);if(!u)continue;l.configurationDefaultOverrideValue=u,this.updateDefaultOverrideProperty(a,u,s),i.push(...cc(a))}else{let u=this.mergeDefaultConfigurationsForConfigurationProperty(a,c,s,l.configurationDefaultOverrideValue);if(!u)continue;l.configurationDefaultOverrideValue=u;let p=this.configurationProperties[a];p&&(this.updatePropertyDefaultValue(a,p),this.updateSchema(a,p))}}this.doRegisterOverrideIdentifiers(i)}deregisterDefaultConfigurations(e){let t=new Set;this.doDeregisterDefaultConfigurations(e,t),this._onDidSchemaChange.fire(),this._onDidUpdateConfiguration.fire({properties:t,defaultsOverrides:!0})}doDeregisterDefaultConfigurations(e,t){for(let i of e){let o=this.registeredConfigurationDefaults.indexOf(i);o!==-1&&this.registeredConfigurationDefaults.splice(o,1)}for(let{overrides:i,source:o}of e)for(let s in i){let a=this.configurationDefaultsOverrides.get(s);if(!a)continue;let l=a.configurationDefaultOverrides.findIndex(c=>o?y5(c.source,o):c.value===i[s]);if(l!==-1){if(a.configurationDefaultOverrides.splice(l,1),a.configurationDefaultOverrides.length===0&&this.configurationDefaultsOverrides.delete(s),$i.test(s)){let c;for(let u of a.configurationDefaultOverrides)c=this.mergeDefaultConfigurationsForOverrideIdentifier(s,u.value,u.source,c);c&&!Lg(c.value)?(a.configurationDefaultOverrideValue=c,this.updateDefaultOverrideProperty(s,c,o)):(this.configurationDefaultsOverrides.delete(s),delete this.configurationProperties[s],delete this.defaultLanguageConfigurationOverridesNode.properties[s])}else{let c;for(let p of a.configurationDefaultOverrides)c=this.mergeDefaultConfigurationsForConfigurationProperty(s,p.value,p.source,c);a.configurationDefaultOverrideValue=c;let u=this.configurationProperties[s];u&&(this.updatePropertyDefaultValue(s,u),this.updateSchema(s,u))}t.add(s)}}this.updateOverridePropertyPatternKey()}updateDefaultOverrideProperty(e,t,i){let o={section:{id:this.defaultLanguageConfigurationOverridesNode.id,title:this.defaultLanguageConfigurationOverridesNode.title,order:this.defaultLanguageConfigurationOverridesNode.order,extensionInfo:this.defaultLanguageConfigurationOverridesNode.extensionInfo},type:"object",default:t.value,description:v(1849,null,iD(e)),$ref:Ca,defaultDefaultValue:t.value,source:i,defaultValueSource:i};this.configurationProperties[e]=o,this.defaultLanguageConfigurationOverridesNode.properties[e]=o}mergeDefaultConfigurationsForOverrideIdentifier(e,t,i,o){let s=o?.value||{},a=o?.source??new Map;if(!(a instanceof Map)){console.error("objectConfigurationSources is not a Map");return}for(let l of Object.keys(t)){let c=t[l];if(ut(c)&&(Qr(s[l])||ut(s[l]))){if(s[l]={...s[l]??{},...c},i)for(let p in c)a.set(`${l}.${p}`,i)}else s[l]=c,i?a.set(l,i):a.delete(l)}return{value:s,source:a}}mergeDefaultConfigurationsForConfigurationProperty(e,t,i,o){let s=this.configurationProperties[e],a=o?.value??s?.defaultDefaultValue,l=i;if(ut(t)&&(s!==void 0&&s.type==="object"||s===void 0&&(Qr(a)||ut(a)))){if(l=o?.source??new Map,!(l instanceof Map)){console.error("defaultValueSource is not a Map");return}for(let u in t)i&&l.set(`${e}.${u}`,i);t={...ut(a)?a:{},...t}}return{value:t,source:l}}deltaConfiguration(e){let t=!1,i=new Set;e.removedDefaults&&(this.doDeregisterDefaultConfigurations(e.removedDefaults,i),t=!0),e.addedDefaults&&(this.doRegisterDefaultConfigurations(e.addedDefaults,i),t=!0),e.removedConfigurations&&this.doDeregisterConfigurations(e.removedConfigurations,i),e.addedConfigurations&&this.doRegisterConfigurations(e.addedConfigurations,!1,i),this._onDidSchemaChange.fire(),this._onDidUpdateConfiguration.fire({properties:i,defaultsOverrides:t})}notifyConfigurationSchemaUpdated(...e){this._onDidSchemaChange.fire()}registerOverrideIdentifiers(e){this.doRegisterOverrideIdentifiers(e),this._onDidSchemaChange.fire()}doRegisterOverrideIdentifiers(e){for(let t of e)this.overrideIdentifiers.add(t);this.updateOverridePropertyPatternKey()}doRegisterConfigurations(e,t,i){e.forEach(o=>{this.validateAndRegisterProperties(o,t,o.extensionInfo,o.restrictedProperties,void 0,i),this.configurationContributors.push(o),this.registerJSONConfiguration(o)})}doDeregisterConfigurations(e,t){let i=o=>{if(o.properties)for(let s in o.properties){t.add(s);let a=this.configurationProperties[s];a?.policy?.name&&this.policyConfigurations.delete(a.policy.name),delete this.configurationProperties[s],this.removeFromSchema(s,o.properties[s])}o.allOf?.forEach(s=>i(s))};for(let o of e){i(o);let s=this.configurationContributors.indexOf(o);s!==-1&&this.configurationContributors.splice(s,1)}}validateAndRegisterProperties(e,t=!0,i,o,s=4,a){s=Qt(e.scope)?s:e.scope;let l=e.properties;if(l)for(let u in l){let p=l[u];if(p.section={id:e.id,title:e.title,order:e.order,extensionInfo:e.extensionInfo},t&&_5(u,p,i?.id)){delete l[u];continue}p.source=i,p.defaultDefaultValue=l[u].default,this.updatePropertyDefaultValue(u,p),$i.test(u)?p.scope=void 0:(p.scope=Qt(p.scope)?s:p.scope,p.restricted=Qt(p.restricted)?!!o?.includes(u):p.restricted),p.experiment?p.tags?.some(E=>E.toLowerCase()==="onexp")||(p.tags=p.tags??[],p.tags.push("onExP")):p.tags?.some(E=>E.toLowerCase()==="onexp")&&(console.error(`Invalid tag 'onExP' found for property '${u}'. Please use 'experiment' property instead.`),p.experiment={mode:"startup"});let m=l[u].hasOwnProperty("included")&&!l[u].included,h=l[u].policy?.name;m?(this.excludedConfigurationProperties[u]=l[u],h&&(this.policyConfigurations.set(h,u),a.add(u)),delete l[u]):(a.add(u),h&&this.policyConfigurations.set(h,u),this.configurationProperties[u]=l[u],!l[u].deprecationMessage&&l[u].markdownDeprecationMessage&&(l[u].deprecationMessage=l[u].markdownDeprecationMessage))}let c=e.allOf;if(c)for(let u of c)this.validateAndRegisterProperties(u,t,i,o,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[t,i]of this.configurationDefaultsOverrides)i.configurationDefaultOverrideValue&&e.set(t,i.configurationDefaultOverrideValue);return e}registerJSONConfiguration(e){let t=i=>{let o=i.properties;if(o)for(let a in o)this.updateSchema(a,o[a]);i.allOf?.forEach(t)};t(e)}updateSchema(e,t){switch(rh.properties[e]=t,t.scope){case 1:ih.properties[e]=t;break;case 2:sh.properties[e]=t;break;case 3:oh.properties[e]=t;break;case 7:ah.properties[e]=t;break;case 4:lh.properties[e]=t;break;case 5:Np.properties[e]=t;break;case 6:Np.properties[e]=t,this.resourceLanguageSettingsSchema.properties[e]=t;break}}removeFromSchema(e,t){switch(delete rh.properties[e],t.scope){case 1:delete ih.properties[e];break;case 2:delete sh.properties[e];break;case 3:delete oh.properties[e];break;case 7:delete ah.properties[e];break;case 4:delete lh.properties[e];break;case 5:case 6:delete Np.properties[e],delete this.resourceLanguageSettingsSchema.properties[e];break}}updateOverridePropertyPatternKey(){for(let e of this.overrideIdentifiers.values()){let t=`[${e}]`,i={type:"object",description:v(1851,null),errorMessage:v(1852,null),$ref:Ca};this.updatePropertyDefaultValue(t,i),rh.properties[t]=i,ih.properties[t]=i,oh.properties[t]=i,sh.properties[t]=i,ah.properties[t]=i,lh.properties[t]=i,Np.properties[t]=i}}registerOverridePropertyPatternKey(){let e={type:"object",description:v(1851,null),errorMessage:v(1852,null),$ref:Ca};rh.patternProperties[Ss]=e,ih.patternProperties[Ss]=e,oh.patternProperties[Ss]=e,sh.patternProperties[Ss]=e,ah.patternProperties[Ss]=e,lh.patternProperties[Ss]=e,Np.patternProperties[Ss]=e,this._onDidSchemaChange.fire()}updatePropertyDefaultValue(e,t){let i=this.configurationDefaultsOverrides.get(e)?.configurationDefaultOverrideValue,o,s;i&&(!t.disallowConfigurationDefault||!i.source)&&(o=i.value,s=i.source),Qr(o)&&(o=t.defaultDefaultValue,s=void 0),Qr(o)&&(o=S5(t.type)),t.default=o,t.defaultValueSource=s}},dD="\\[([^\\]]+)\\]",cD=new RegExp(dD,"g"),Ss=`^(${dD})+$`,$i=new RegExp(Ss);dh=new JS;Ht.add(_n.Configuration,dh);w5=new Set(qn.defaultChatAgent?[qn.defaultChatAgent.extensionId,qn.defaultChatAgent.chatExtensionId].map(r=>r.toLowerCase()):[])});var b5,mD=_(()=>{ce();Dp();We();Lo();wi();b5=Ht.as(_n.Configuration);b5.registerConfiguration({id:"update",order:15,title:v(2701,null),type:"object",properties:{"update.mode":{type:"string",enum:["none","manual","start","default"],default:"default",scope:1,description:v(2702,null),tags:["usesOnlineServices"],enumDescriptions:[v(2698,null),v(2697,null),v(2700,null),v(2693,null)],policy:{name:"UpdateMode",category:"Update",minimumVersion:"1.67",localization:{description:{key:"updateMode",value:v(2702,null)},enumDescriptions:[{key:"none",value:v(2698,null)},{key:"manual",value:v(2697,null)},{key:"start",value:v(2700,null)},{key:"default",value:v(2693,null)}]}}},"update.channel":{type:"string",default:"default",scope:1,description:v(2702,null),deprecationMessage:v(2694,null,"update.mode")},"update.enableWindowsBackgroundUpdates":{type:"boolean",default:!0,scope:1,title:v(2696,null),description:v(2695,null),included:q&&!$n},"update.showReleaseNotes":{type:"boolean",default:!0,scope:1,description:v(2699,null),tags:["usesOnlineServices"]}}})});import{spawn as qS}from"child_process";import{app as KS}from"electron";import{lstatSync as fD}from"fs";function P5(){let n=process.execPath.match(/^(.*\/[^/]+\.app)(\/|$)/);return n?n[1]:void 0}function C5(r){try{return fD(r).isDirectory()}catch(n){if(n.code==="ENOENT"||n.code==="ENOTDIR")return!1;throw n}}function A5(r){try{return fD(r),!0}catch(n){if(n.code==="ENOENT"||n.code==="ENOTDIR")return!1;throw n}}function R5(r,n,e,t,i,o){let a=c=>c.split("'").join("'\\''"),l=o.map(c=>`'${a(c)}'`).join(" ");return["#!/bin/bash","",`PARENT_PID=${r}`,`OLD_APP_PATH='${a(n)}'`,`NEW_APP_PATH='${a(e)}'`,`OLD_BUNDLE_NAME='${a(t)}'`,`NEW_BUNDLE_NAME='${a(i)}'`,`LAUNCH_ARGS=(${l})`,"","# Wait for the parent process to exit before renaming.","WAIT_COUNT=0",'while kill -0 "$PARENT_PID" 2>/dev/null; do',"  sleep 0.5","  WAIT_COUNT=$((WAIT_COUNT + 1))",'  if [ "$WAIT_COUNT" -ge 120 ]; then','    /usr/bin/open -n -a "$OLD_APP_PATH" --args --windsurf-skip-bundle-rename "${LAUNCH_ARGS[@]}"',"    exit 1","  fi","done","","# The TypeScript preflight only schedules this rename when nothing","# existed at the destination. If something appeared there during the","# wait window (TOCTOU), do NOT mv onto/into it (mv would move the","# running bundle into a symlinked directory or clobber a file).","# Mirror the preflight policy exactly: a real .app directory -> hand","# off to it; a symlink (incl. symlink-to-dir) or stray file ->","# relaunch the old bundle with the skip flag. `-d` follows symlinks,",'# so a real directory is "-d AND not -L" (matching lstatSync). If the',"# real bundle is present but cannot be launched (partial/corrupt),","# fall through to the old-bundle fallback so the user is never left","# without a running app (matching generateOpenExistingBundleHelperScript).",'if [ -e "$NEW_APP_PATH" ] || [ -L "$NEW_APP_PATH" ]; then','  if [ -d "$NEW_APP_PATH" ] && [ ! -L "$NEW_APP_PATH" ]; then','    if /usr/bin/open -n -a "$NEW_APP_PATH" --args "${LAUNCH_ARGS[@]}"; then',"      exit 0","    fi","  fi",'  /usr/bin/open -n -a "$OLD_APP_PATH" --args --windsurf-skip-bundle-rename "${LAUNCH_ARGS[@]}"',"  exit 1","fi","","# Attempt atomic rename of the .app bundle. On failure, hand off to a","# real Devin.app if one is now present and launchable; otherwise (not a","# real dir, or open failed) relaunch the old bundle with the skip flag","# so the user is never left without a running app.",'if ! /bin/mv "$OLD_APP_PATH" "$NEW_APP_PATH"; then','  if [ -d "$NEW_APP_PATH" ] && [ ! -L "$NEW_APP_PATH" ]; then','    if /usr/bin/open -n -a "$NEW_APP_PATH" --args "${LAUNCH_ARGS[@]}"; then',"      exit 1","    fi","  fi",'  /usr/bin/open -n -a "$OLD_APP_PATH" --args --windsurf-skip-bundle-rename "${LAUNCH_ARGS[@]}"',"  exit 1","fi","","# Touch to trigger LaunchServices re-registration",'/usr/bin/touch "$NEW_APP_PATH" || true',"","# Force LaunchServices to re-index the new bundle",'/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -f "$NEW_APP_PATH" 2>/dev/null || true',"","# Fix shell command symlinks that pointed inside the old .app bundle.","# Covers ~/.codeium/windsurf/bin/ (surf, windsurf, devin-desktop, etc.)","# and ~/.local/bin/ (devin, devin-insiders, etc.).",'for SYMLINK_DIR in "$HOME/.codeium/windsurf/bin" "$HOME/.local/bin"; do','  if [ -d "$SYMLINK_DIR" ]; then','    for symlink in "$SYMLINK_DIR"/*; do','      if [ -L "$symlink" ]; then','        target=$(/usr/bin/readlink "$symlink")','        case "$target" in','          "$OLD_APP_PATH"/*)','            new_target="${NEW_APP_PATH}${target:${#OLD_APP_PATH}}"','            if [ -f "$new_target" ]; then','              /bin/ln -sf "$new_target" "$symlink" 2>/dev/null || true',"            fi","            ;;","        esac","      fi","    done","  fi","done","","# Dock update: use plistlib to update URLs, display labels, and remove","# stale bookmark data so macOS regenerates it. Best-effort.","set +e","",'DOCK_PLIST="$HOME/Library/Preferences/com.apple.dock.plist"','if [ -f "$DOCK_PLIST" ]; then',"  DOCK_PY=$(/usr/bin/mktemp)",`  cat > "$DOCK_PY" << 'DOCK_PYEOF'`,"import plistlib, sys, urllib.parse, os, tempfile","dock_plist, old_name, new_name = sys.argv[1], sys.argv[2], sys.argv[3]",'old_label = old_name.rsplit(".app", 1)[0]','new_label = new_name.rsplit(".app", 1)[0]',"old_encoded = urllib.parse.quote(old_name)","new_encoded = urllib.parse.quote(new_name)",'with open(dock_plist, "rb") as f:',"    dock = plistlib.load(f)","changed = False",'for section in ("persistent-apps", "persistent-others", "recent-apps"):',"    for item in dock.get(section, []):",'        td = item.get("tile-data", {})','        fd = td.get("file-data", {})','        url = fd.get("_CFURLString", "")',"        if old_name in url or old_encoded in url:",'            fd["_CFURLString"] = url.replace(old_name, new_name).replace(old_encoded, new_encoded)','            fd.pop("_CFURLAliasData", None)','            td.pop("book", None)','            lbl = td.get("file-label", "")',"            if old_label in lbl:",'                td["file-label"] = lbl.replace(old_label, new_label)',"            changed = True","if changed:","    tmp_fd, tmp = tempfile.mkstemp(dir=os.path.dirname(dock_plist))","    try:",'        with os.fdopen(tmp_fd, "wb") as f:',"            plistlib.dump(dock, f, fmt=plistlib.FMT_BINARY)","        os.replace(tmp, dock_plist)","    except BaseException:","        os.unlink(tmp)","        raise","DOCK_PYEOF",'  /usr/bin/python3 "$DOCK_PY" "$DOCK_PLIST" "$OLD_BUNDLE_NAME" "$NEW_BUNDLE_NAME"',"  DOCK_EXIT=$?",'  /bin/rm -f "$DOCK_PY"','  if [ "$DOCK_EXIT" -eq 0 ]; then',"    /usr/bin/killall Dock 2>/dev/null || true","  fi","fi","","# Relaunch from the new path with original arguments",'/usr/bin/open -n -a "$NEW_APP_PATH" --args "${LAUNCH_ARGS[@]}"',"exit 0"].join(`
`)}function x5(r,n,e,t){let o=a=>a.split("'").join("'\\''"),s=t.map(a=>`'${o(a)}'`).join(" ");return["#!/bin/bash","",`PARENT_PID=${r}`,`EXISTING_APP_PATH='${o(n)}'`,`OLD_APP_PATH='${o(e)}'`,`LAUNCH_ARGS=(${s})`,"","# Wait for the parent process to exit before relaunching.","WAIT_COUNT=0",'while kill -0 "$PARENT_PID" 2>/dev/null; do',"  sleep 0.5","  WAIT_COUNT=$((WAIT_COUNT + 1))",'  if [ "$WAIT_COUNT" -ge 120 ]; then',"    break","  fi","done","","# Open the already-installed bundle with the original arguments. If it","# cannot be launched (corrupt/partial bundle, etc.), fall back to the","# original bundle so the user is never left without a running app.",'if ! /usr/bin/open -n -a "$EXISTING_APP_PATH" --args "${LAUNCH_ARGS[@]}"; then','  /usr/bin/open -n -a "$OLD_APP_PATH" --args --windsurf-skip-bundle-rename "${LAUNCH_ARGS[@]}"',"  exit 1","fi","exit 0"].join(`
`)}function D5(r,n,e){let i=s=>s.split("'").join("'\\''"),o=e.map(s=>`'${i(s)}'`).join(" ");return["#!/bin/bash","",`PARENT_PID=${r}`,`OLD_APP_PATH='${i(n)}'`,`LAUNCH_ARGS=(${o})`,"","# Wait for the parent process to exit before relaunching.","WAIT_COUNT=0",'while kill -0 "$PARENT_PID" 2>/dev/null; do',"  sleep 0.5","  WAIT_COUNT=$((WAIT_COUNT + 1))",'  if [ "$WAIT_COUNT" -ge 120 ]; then',"    break","  fi","done","",'/usr/bin/open -n -a "$OLD_APP_PATH" --args --windsurf-skip-bundle-rename "${LAUNCH_ARGS[@]}"',"exit 0"].join(`
`)}function gD(){if(process.platform!=="darwin"||process.env.VSCODE_DEV||process.argv.includes("--windsurf-skip-bundle-rename"))return!1;let r=P5();if(!r)return!1;let n=Pe(r),e=T5.get(n);if(!e)return!1;let t=ze(r),i=H(t,e),o=process.argv.slice(1),s,a;try{s=C5(i),a=!s&&A5(i)}catch{return!1}if(s){let u=x5(process.pid,i,r,o);return qS("/bin/bash",["-c",u],{detached:!0,stdio:"ignore"}).unref(),KS.quit(),!0}if(a){let u=D5(process.pid,r,o);return qS("/bin/bash",["-c",u],{detached:!0,stdio:"ignore"}).unref(),KS.quit(),!0}let l=R5(process.pid,r,i,n,e,o);return qS("/bin/bash",["-c",l],{detached:!0,stdio:"ignore"}).unref(),KS.quit(),!0}var dc,T5,hD=_(()=>{Ne();dc="Devin",T5=new Map([["Windsurf.app",`${dc}.app`],["Windsurf - Insiders.app",`${dc} - Insiders.app`],["Windsurf - Next.app",`${dc} - Next.app`],["Windsurf - EU.app",`${dc} - EU.app`],["Windsurf - Fed.app",`${dc} - Fed.app`],["Windsurf - Secure.app",`${dc} - Secure.app`]])});function jS(r,n){return n&&(r.stack||r.stacktrace)?v(119,null,vD(r),ID(r.stack)||ID(r.stacktrace)):vD(r)}function ID(r){return Array.isArray(r)?r.join(`
`):r}function vD(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"?v(118,null,r.message):r.message||v(116,null)}function Kn(r=null,n=!1){if(!r)return v(116,null);if(Array.isArray(r)){let e=wt(r),t=Kn(e[0],n);return e.length>1?v(117,null,t,e.length):t}if(Ye(r))return r;if(r.detail){let e=r.detail;if(e.error)return jS(e.error,n);if(e.exception)return jS(e.exception,n)}return r.stack?jS(r,n):r.message?r.message:v(116,null)}var _s=_(()=>{dn();qe();We()});function Mo(r,n){let{os:e,tildify:t,relative:i}=n;if(i){let a=O5(r,i,e);if(typeof a=="string")return a}let o=r.fsPath;if(e===1&&!q?o=o.replace(/\//g,"\\"):e!==1&&q&&(o=o.replace(/\\/g,"/")),e!==1&&t?.userHome){let a=t.userHome.fsPath,l;r.scheme!==t.userHome.scheme&&r.path[0]===Se.sep&&r.path[1]!==Se.sep?l=t.userHome.with({path:r.path}).fsPath:l=o,o=k5(l,a,e)}return(e===1?Ct:Se).normalize(Mp(o,e===1))}function O5(r,n,e){let t=e===1?Ct:Se,i=e===3?Qe:nc,o=n.getWorkspace(),s=o.folders.at(0);if(!s)return;r.scheme!==s.uri.scheme&&r.path[0]===Se.sep&&r.path[1]!==Se.sep&&(r=s.uri.with({path:r.path}));let a=n.getWorkspaceFolder(r);if(!a)return;let l;if(i.isEqual(a.uri,r)?l="":l=i.relativePath(a.uri,r)??"",l&&(l=t.normalize(l)),o.folders.length>1&&!n.noPrefix){let c=a.name?a.name:i.basenameOrAuthority(a.uri);l=l?`${c} \u2022 ${l}`:c}return l}function Mp(r,n=q){return CS(r,n)?r.charAt(0).toUpperCase()+r.slice(1):r}function k5(r,n,e=Yt){if(e===1||!r||!n)return r;let t=zS.original===n?zS.normalized:void 0;t||(t=n,q&&(t=Yi(t)),t=`${Ei(t,Se.sep)}${Se.sep}`,zS={original:n,normalized:t});let i=r;return q&&(i=Yi(i)),(e===3?i.startsWith(t):zi(i,t))?`~/${i.substr(t.length)}`:r}function yD(r,n){return $||n?r.replace(/\(&&\w\)|&&/g,"").replace(/&/g,$?"&":"&&"):r.replace(/&&|&/g,e=>e==="&"?"&&":"&")}function Up(r,n){let e=r.replace(/\(&&\w\)|&&/g,"");if(n)return e;if($)return{withMnemonic:e,withoutMnemonic:e};let t;return q?t=r.replace(/&&|&/g,i=>i==="&"?"&&":"&"):t=r.replace(/&&/g,"_"),{withMnemonic:t,withoutMnemonic:e}}function SD(r){if(r.endsWith("]")){let n=r.lastIndexOf(" [",r.length-2);if(n!==-1){let e=ED(r.substring(0,n)),t=r.substring(n);return{name:e.name+t,parentPath:e.parentPath}}}return ED(r)}function ED(r){let n=r.indexOf("/")!==-1?Se:Ct,e=n.basename(r),t=n.dirname(r);return e.length?{name:e,parentPath:t}:{name:t,parentPath:""}}var zS,Uo=_(()=>{xr();Ne();ce();Ut();Sn();zS=Object.create(null)});function Fp(r){let n=r;return n?[n.on,n.pause,n.resume,n.destroy].every(e=>typeof e=="function"):!1}function uh(r){let n=r;return n?Fp(n.stream)&&Array.isArray(n.buffer)&&typeof n.ended=="boolean":!1}function ws(r,n){return new YS(r,n)}function _D(r,n){let e=[],t;for(;(t=r.read())!==null;)e.push(t);return n(e)}function wD(r,n,e){let t=[],i;for(;(i=r.read())!==null&&t.length<e;)t.push(i);return i===null&&t.length>0?n(t):{read:()=>{if(t.length>0)return t.shift();if(typeof i<"u"){let o=i;return i=void 0,o}return r.read()}}}function ph(r,n){return new Promise((e,t)=>{let i=[];uc(r,{onData:o=>{n&&i.push(o)},onError:o=>{n?t(o):e(void 0)},onEnd:()=>{e(n?n(i):void 0)}})})}function uc(r,n,e){r.on("error",t=>{e?.isCancellationRequested||n.onError(t)}),r.on("end",()=>{e?.isCancellationRequested||n.onEnd()}),r.on("data",t=>{e?.isCancellationRequested||n.onData(t)})}function bD(r,n){return new Promise((e,t)=>{let i=new ue,o=[],s=c=>{if(o.push(c),o.length>n)return i.dispose(),r.pause(),e({stream:r,buffer:o,ended:!1})},a=c=>(i.dispose(),t(c)),l=()=>(i.dispose(),e({stream:r,buffer:o,ended:!0}));i.add(oe(()=>r.removeListener("error",a))),r.on("error",a),i.add(oe(()=>r.removeListener("end",l))),r.on("end",l),i.add(oe(()=>r.removeListener("data",s))),r.on("data",s)})}function TD(r){let n=!1;return{read:()=>n?null:(n=!0,r)}}function mh(r,n,e){let t=ws(e);return uc(r,{onData:i=>t.write(n.data(i)),onError:i=>t.error(n.error?n.error(i):i),onEnd:()=>t.end()}),t}var YS,pc=_(()=>{rt();te();YS=class{constructor(n,e){this.reducer=n;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(n){if(!this.state.destroyed){if(this.state.flowing)this.emitData(n);else if(this.buffer.data.push(n),typeof this.options?.highWaterMark=="number"&&this.buffer.data.length>this.options.highWaterMark)return new Promise(e=>this.pendingWritePromises.push(e))}}error(n){this.state.destroyed||(this.state.flowing?this.emitError(n):this.buffer.error.push(n))}end(n){this.state.destroyed||(typeof n<"u"&&this.write(n),this.state.flowing?(this.emitEnd(),this.destroy()):this.state.ended=!0)}emitData(n){this.listeners.data.slice(0).forEach(e=>e(n))}emitError(n){this.listeners.error.length===0?vt(n):this.listeners.error.slice(0).forEach(e=>e(n))}emitEnd(){this.listeners.end.slice(0).forEach(n=>n())}on(n,e){if(!this.state.destroyed)switch(n){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(n,e){if(this.state.destroyed)return;let t;switch(n){case"data":t=this.listeners.data;break;case"end":t=this.listeners.end;break;case"error":t=this.listeners.error;break}if(t){let i=t.indexOf(e);i>=0&&t.splice(i,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 n=[...this.pendingWritePromises];this.pendingWritePromises.length=0,n.forEach(e=>e())}flowErrors(){if(this.listeners.error.length>0){for(let n of this.buffer.error)this.emitError(n);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 M5(r,n,e=0){let t=n.byteLength,i=r.byteLength;if(t===0)return 0;if(t===1)return r.indexOf(n[0],e);if(t>i-e)return-1;let o=L5.value;o.fill(n.length);for(let c=0;c<n.length;c++)o[n[c]]=n.length-c-1;let s=e+n.length-1,a=s,l=-1;for(;s<i;)if(r[s]===n[a]){if(a===0){l=s;break}s--,a--}else s+=Math.max(n.length-a,o[r[s]]),a=n.length-1;return l}function U5(r,n){return r[n]*2**24+r[n+1]*2**16+r[n+2]*2**8+r[n+3]}function F5(r,n,e){r[e+3]=n,n=n>>>8,r[e+2]=n,n=n>>>8,r[e+1]=n,n=n>>>8,r[e]=n}function W5(r,n){return r[n+0]<<0>>>0|r[n+1]<<8>>>0|r[n+2]<<16>>>0|r[n+3]<<24>>>0}function B5(r,n,e){r[e+0]=n&255,n=n>>>8,r[e+1]=n&255,n=n>>>8,r[e+2]=n&255,n=n>>>8,r[e+3]=n&255}function V5(r,n){return r[n]}function G5(r,n,e){r[e]=n}function CD(r){return _D(r,n=>ee.concat(n))}function AD(r){return TD(r)}function Ra(r){return ph(r,n=>ee.concat(n))}async function RD(r){return r.ended?ee.concat(r.buffer):ee.concat([...r.buffer,await Ra(r.stream)])}function xD(r){return mh(r,{data:n=>typeof n=="string"?ee.fromString(n):ee.wrap(n)},n=>ee.concat(n))}function DD(r){return ws(n=>ee.concat(n),r)}function OD({buffer:r}){let n="";for(let e=0;e<r.length;e++){let t=r[e];n+=PD[t>>>4],n+=PD[t&15]}return n}var Wp,L5,QS,XS,ee,PD,Et=_(()=>{hs();pc();Wp=typeof Buffer<"u",L5=new Gn(()=>new Uint8Array(256)),ee=class r{static alloc(n){return Wp?new r(Buffer.allocUnsafe(n)):new r(new Uint8Array(n))}static wrap(n){return Wp&&!Buffer.isBuffer(n)&&(n=Buffer.from(n.buffer,n.byteOffset,n.byteLength)),new r(n)}static fromString(n,e){return!(e?.dontUseNodeBuffer||!1)&&Wp?new r(Buffer.from(n)):(QS||(QS=new TextEncoder),new r(QS.encode(n)))}static fromByteArray(n){let e=r.alloc(n.length);for(let t=0,i=n.length;t<i;t++)e.buffer[t]=n[t];return e}static concat(n,e){if(typeof e>"u"){e=0;for(let o=0,s=n.length;o<s;o++)e+=n[o].byteLength}let t=r.alloc(e),i=0;for(let o=0,s=n.length;o<s;o++){let a=n[o];t.set(a,i),i+=a.byteLength}return t}static isNativeBuffer(n){return Wp&&Buffer.isBuffer(n)}constructor(n){this.buffer=n,this.byteLength=this.buffer.byteLength}clone(){let n=r.alloc(this.byteLength);return n.set(this),n}toString(){return Wp?this.buffer.toString():(XS||(XS=new TextDecoder(void 0,{ignoreBOM:!0})),XS.decode(this.buffer))}slice(n,e){return new r(this.buffer.subarray(n,e))}set(n,e){if(n instanceof r)this.buffer.set(n.buffer,e);else if(n instanceof Uint8Array)this.buffer.set(n,e);else if(n instanceof ArrayBuffer)this.buffer.set(new Uint8Array(n),e);else if(ArrayBuffer.isView(n))this.buffer.set(new Uint8Array(n.buffer,n.byteOffset,n.byteLength),e);else throw new Error("Unknown argument 'array'")}readUInt32BE(n){return U5(this.buffer,n)}writeUInt32BE(n,e){F5(this.buffer,n,e)}readUInt32LE(n){return W5(this.buffer,n)}writeUInt32LE(n,e){B5(this.buffer,n,e)}readUInt8(n){return V5(this.buffer,n)}writeUInt8(n,e){G5(this.buffer,n,e)}indexOf(n,e=0){return M5(this.buffer,n instanceof r?n.buffer:n,e)}equals(n){return this===n?!0:this.byteLength!==n.byteLength?!1:this.buffer.every((e,t)=>e===n.buffer[t])}};PD="0123456789abcdef"});var kD=_(()=>{qe();te();Bt()});function ye(r,n,e){let t=null,i=null;if(typeof e.value=="function"?(t="value",i=e.value,i.length!==0&&console.warn("Memoize should only be used in functions with zero parameters")):typeof e.get=="function"&&(t="get",i=e.get),!i)throw new Error("not supported");let o=`$memoize$${n}`;e[t]=function(...s){return this.hasOwnProperty(o)||Object.defineProperty(this,o,{configurable:!1,enumerable:!1,writable:!1,value:i.apply(this,s)}),this[o]}}var bs=_(()=>{kD()});function ND(r){return JSON.stringify(r,H5)}function LD(r){let n=JSON.parse(r);return n=bi(n),n}function H5(r,n){return n instanceof RegExp?{$mid:2,source:n.source,flags:n.flags}:n}function bi(r,n=0){if(!r||n>200)return r;if(typeof r=="object"){switch(r.$mid){case 1:return A.revive(r);case 2:return new RegExp(r.source,r.flags);case 17:return new Date(r.source)}if(r instanceof ee||r instanceof Uint8Array)return r;if(Array.isArray(r))for(let e=0;e<r.length;++e)r[e]=bi(r[e],n+1);else for(let e in r)Object.hasOwnProperty.call(r,e)&&(r[e]=bi(r[e],n+1))}return r}var Bp=_(()=>{Et();Ie();Hg()});function gc(r){switch(r){case 100:return"req";case 101:return"cancel";case 102:return"subscribe";case 103:return"unsubscribe"}}function fh(r){switch(r){case 200:return"init";case 201:return"reply:";case 202:case 203:return"replyErr:";case 204:return"event:"}}function mc(r){let n=0;for(let e=0;;e+=7){let t=r.read(1);if(n|=(t.buffer[0]&127)<<e,!(t.buffer[0]&128))return n}}function fc(r,n){if(n===0){r.write(J5);return}let e=0;for(let i=n;i!==0;i=i>>>7)e++;let t=ee.alloc(e);for(let i=0;n!==0;i++)t.buffer[i]=n&127,n=n>>>7,n>0&&(t.buffer[i]|=128);r.write(t)}function Ts(r){let n=ee.alloc(1);return n.writeUInt8(r,0),n}function hc(r,n){if(typeof n>"u")r.write(xa.Undefined);else if(typeof n=="string"){let e=ee.fromString(n);r.write(xa.String),fc(r,e.byteLength),r.write(e)}else if(ee.isNativeBuffer(n)){let e=ee.wrap(n);r.write(xa.Buffer),fc(r,e.byteLength),r.write(e)}else if(n instanceof ee)r.write(xa.VSBuffer),fc(r,n.byteLength),r.write(n);else if(Array.isArray(n)){r.write(xa.Array),fc(r,n.length);for(let e of n)hc(r,e)}else if(typeof n=="number"&&(n|0)===n)r.write(xa.Uint),fc(r,n);else{let e=ee.fromString(JSON.stringify(n));r.write(xa.Object),fc(r,e.byteLength),r.write(e)}}function Ic(r){switch(r.read(1).readUInt8(0)){case 0:return;case 1:return r.read(mc(r)).toString();case 2:return r.read(mc(r)).buffer;case 3:return r.read(mc(r));case 4:{let e=mc(r),t=[];for(let i=0;i<e;i++)t.push(Ic(r));return t}case 5:return JSON.parse(r.read(mc(r)).toString());case 6:return mc(r)}}function Jp(r){return{call(n,e,t){return r.then(i=>i.call(n,e,t))},listen(n,e){let t=new Ep;return r.then(i=>t.input=i.listen(n,e)),t.event}}}function MD(r){let n=!1;return{call(e,t,i){return n?r.call(e,t,i):bt(0).then(()=>n=!0).then(()=>r.call(e,t,i))},listen(e,t){if(n)return r.listen(e,t);let i=new Ep;return bt(0).then(()=>n=!0).then(()=>i.input=r.listen(e,t)),i.event}}}var J5,Vp,Gp,xa,Hp,Da,vc,Ec,gh,it,Zi=_(()=>{dn();Ce();Et();Bt();bs();rt();ae();Jl();te();Bp();Sn();qe();J5=Ts(0);Vp=class{constructor(n){this.buffer=n;this.pos=0}read(n){let e=this.buffer.slice(this.pos,this.pos+n);return this.pos+=e.byteLength,e}},Gp=class{constructor(){this.buffers=[]}get buffer(){return ee.concat(this.buffers)}write(n){this.buffers.push(n)}};xa={Undefined:Ts(0),String:Ts(1),Buffer:Ts(2),VSBuffer:Ts(3),Array:Ts(4),Object:Ts(5),Uint:Ts(6)};Hp=class{constructor(n,e,t=null,i=1e3){this.protocol=n;this.ctx=e;this.logger=t;this.timeoutDelay=i;this.channels=new Map;this.activeRequests=new Map;this.pendingRequests=new Map;this.protocolListener=this.protocol.onMessage(o=>this.onRawMessage(o)),this.sendResponse({type:200})}registerChannel(n,e){this.channels.set(n,e),setTimeout(()=>this.flushPendingRequests(n),0)}sendResponse(n){switch(n.type){case 200:{let e=this.send([n.type]);this.logger?.logOutgoing(e,0,1,fh(n.type));return}case 201:case 202:case 204:case 203:{let e=this.send([n.type,n.id],n.data);this.logger?.logOutgoing(e,n.id,1,fh(n.type),n.data);return}}}send(n,e=void 0){let t=new Gp;return hc(t,n),hc(t,e),this.sendBuffer(t.buffer)}sendBuffer(n){try{return this.protocol.send(n),n.byteLength}catch{return 0}}onRawMessage(n){let e=new Vp(n),t=Ic(e),i=Ic(e),o=t[0];switch(o){case 100:return this.logger?.logIncoming(n.byteLength,t[1],1,`${gc(o)}: ${t[2]}.${t[3]}`,i),this.onPromise({type:o,id:t[1],channelName:t[2],name:t[3],arg:i});case 102:return this.logger?.logIncoming(n.byteLength,t[1],1,`${gc(o)}: ${t[2]}.${t[3]}`,i),this.onEventListen({type:o,id:t[1],channelName:t[2],name:t[3],arg:i});case 101:return this.logger?.logIncoming(n.byteLength,t[1],1,`${gc(o)}`),this.disposeActiveRequest({type:o,id:t[1]});case 103:return this.logger?.logIncoming(n.byteLength,t[1],1,`${gc(o)}`),this.disposeActiveRequest({type:o,id:t[1]})}}onPromise(n){let e=this.channels.get(n.channelName);if(!e){this.collectPendingRequest(n);return}let t=new st,i;try{i=e.call(this.ctx,n.name,n.arg,t.token)}catch(a){i=Promise.reject(a)}let o=n.id;i.then(a=>{this.sendResponse({id:o,data:a,type:201})},a=>{a instanceof Error?this.sendResponse({id:o,data:{message:a.message,name:a.name,stack:a.stack?a.stack.split(`
`):void 0},type:202}):this.sendResponse({id:o,data:a,type:203})}).finally(()=>{s.dispose(),this.activeRequests.delete(n.id)});let s=oe(()=>t.cancel());this.activeRequests.set(n.id,s)}onEventListen(n){let e=this.channels.get(n.channelName);if(!e){this.collectPendingRequest(n);return}let t=n.id,o=e.listen(this.ctx,n.name,n.arg)(s=>this.sendResponse({id:t,data:s,type:204}));this.activeRequests.set(n.id,o)}disposeActiveRequest(n){let e=this.activeRequests.get(n.id);e&&(e.dispose(),this.activeRequests.delete(n.id))}collectPendingRequest(n){let e=this.pendingRequests.get(n.channelName);e||(e=[],this.pendingRequests.set(n.channelName,e));let t=setTimeout(()=>{console.error(`Unknown channel: ${n.channelName}`),n.type===100&&this.sendResponse({id:n.id,data:{name:"Unknown channel",message:`Channel name '${n.channelName}' timed out after ${this.timeoutDelay}ms`,stack:void 0},type:202})},this.timeoutDelay);e.push({request:n,timeoutTimer:t})}flushPendingRequests(n){let e=this.pendingRequests.get(n);if(e){for(let t of e)switch(clearTimeout(t.timeoutTimer),t.request.type){case 100:this.onPromise(t.request);break;case 102:this.onEventListen(t.request);break}this.pendingRequests.delete(n)}}dispose(){this.protocolListener&&(this.protocolListener.dispose(),this.protocolListener=null),At(this.activeRequests.values()),this.activeRequests.clear()}},Da=class{constructor(n,e=null){this.protocol=n;this.isDisposed=!1;this.state=0;this.activeRequests=new Set;this.handlers=new Map;this.lastRequestId=0;this._onDidInitialize=new C;this.onDidInitialize=this._onDidInitialize.event;this.protocolListener=this.protocol.onMessage(t=>this.onBuffer(t)),this.logger=e}getChannel(n){let e=this;return{call(t,i,o){return e.isDisposed?Promise.reject(new Gt):e.requestPromise(n,t,i,o)},listen(t,i){return e.isDisposed?x.None:e.requestEvent(n,t,i)}}}requestPromise(n,e,t,i=Le.None){let o=this.lastRequestId++,a={id:o,type:100,channelName:n,name:e,arg:t};if(i.isCancellationRequested)return Promise.reject(new Gt);let l,c;return new Promise((p,m)=>{if(i.isCancellationRequested)return m(new Gt);let h=()=>{let P=T=>{switch(T.type){case 201:this.handlers.delete(o),p(T.data);break;case 202:{this.handlers.delete(o);let k=new Error(T.data.message);k.stack=Array.isArray(T.data.stack)?T.data.stack.join(`
`):T.data.stack,k.name=T.data.name,m(k);break}case 203:this.handlers.delete(o),m(T.data);break}};this.handlers.set(o,P),this.sendRequest(a)},E=null;this.state===1?h():(E=Si(P=>this.whenInitialized()),E.then(()=>{E=null,h()}));let y=()=>{E?(E.cancel(),E=null):this.sendRequest({id:o,type:101}),m(new Gt)};l=i.onCancellationRequested(y),c={dispose:xo(()=>{y(),l.dispose()})},this.activeRequests.add(c)}).finally(()=>{l?.dispose(),this.activeRequests.delete(c)})}requestEvent(n,e,t){let i=this.lastRequestId++,s={id:i,type:102,channelName:n,name:e,arg:t},a=null,l=new C({onWillAddFirstListener:()=>{let u=()=>{this.activeRequests.add(l),this.sendRequest(s)};this.state===1?u():(a=Si(p=>this.whenInitialized()),a.then(()=>{a=null,u()}))},onDidRemoveLastListener:()=>{a?(a.cancel(),a=null):(this.activeRequests.delete(l),this.sendRequest({id:i,type:103})),this.handlers.delete(i)}}),c=u=>l.fire(u.data);return this.handlers.set(i,c),l.event}sendRequest(n){switch(n.type){case 100:case 102:{let e=this.send([n.type,n.id,n.channelName,n.name],n.arg);this.logger?.logOutgoing(e,n.id,0,`${gc(n.type)}: ${n.channelName}.${n.name}`,n.arg);return}case 101:case 103:{let e=this.send([n.type,n.id]);this.logger?.logOutgoing(e,n.id,0,gc(n.type));return}}}send(n,e=void 0){let t=new Gp;return hc(t,n),hc(t,e),this.sendBuffer(t.buffer)}sendBuffer(n){try{return this.protocol.send(n),n.byteLength}catch{return 0}}onBuffer(n){let e=new Vp(n),t=Ic(e),i=Ic(e),o=t[0];switch(o){case 200:return this.logger?.logIncoming(n.byteLength,0,0,fh(o)),this.onResponse({type:t[0]});case 201:case 202:case 204:case 203:return this.logger?.logIncoming(n.byteLength,t[1],0,fh(o),i),this.onResponse({type:t[0],id:t[1],data:i})}}onResponse(n){if(n.type===200){this.state=1,this._onDidInitialize.fire();return}this.handlers.get(n.id)?.(n)}get onDidInitializePromise(){return x.toPromise(this.onDidInitialize)}whenInitialized(){return this.state===1?Promise.resolve():this.onDidInitializePromise}dispose(){this.isDisposed=!0,this.protocolListener&&(this.protocolListener.dispose(),this.protocolListener=null),At(this.activeRequests.values()),this.activeRequests.clear(),this._onDidInitialize.dispose()}};D([ye],Da.prototype,"onDidInitializePromise",1);vc=class{constructor(n,e,t){this.channels=new Map;this._connections=new Set;this._onDidAddConnection=new C;this.onDidAddConnection=this._onDidAddConnection.event;this._onDidRemoveConnection=new C;this.onDidRemoveConnection=this._onDidRemoveConnection.event;this.disposables=new ue;this.disposables.add(n(({protocol:i,onDidClientDisconnect:o})=>{let s=x.once(i.onMessage);this.disposables.add(s(a=>{let l=new Vp(a),c=Ic(l),u=new Hp(i,c,e,t),p=new Da(i,e);this.channels.forEach((h,E)=>u.registerChannel(E,h));let m={channelServer:u,channelClient:p,ctx:c};this._connections.add(m),this._onDidAddConnection.fire(m),this.disposables.add(o(()=>{u.dispose(),p.dispose(),this._connections.delete(m),this._onDidRemoveConnection.fire(m)}))}))}))}get connections(){let n=[];return this._connections.forEach(e=>n.push(e)),n}getChannel(n,e){let t=this;return{call(i,o,s){let a;if(fp(e)){let c=GR(t.connections.filter(e));a=c?Promise.resolve(c):x.toPromise(x.filter(t.onDidAddConnection,e))}else a=e.routeCall(t,i,o);let l=a.then(c=>c.channelClient.getChannel(n));return Jp(l).call(i,o,s)},listen(i,o){if(fp(e))return t.getMulticastEvent(n,e,i,o);let s=e.routeEvent(t,i,o).then(a=>a.channelClient.getChannel(n));return Jp(s).listen(i,o)}}}getMulticastEvent(n,e,t,i){let o=this,s,a=new C({onWillAddFirstListener:()=>{s=new ue;let l=new Ug,c=new Map,u=m=>{let E=m.channelClient.getChannel(n).listen(t,i),y=l.add(E);c.set(m,y)},p=m=>{let h=c.get(m);h&&(h.dispose(),c.delete(m))};o.connections.filter(e).forEach(u),x.filter(o.onDidAddConnection,e)(u,void 0,s),o.onDidRemoveConnection(p,void 0,s),l.event(a.fire,a,s),s.add(l)},onDidRemoveLastListener:()=>{s?.dispose(),s=void 0}});return o.disposables.add(a),a.event}registerChannel(n,e){this.channels.set(n,e);for(let t of this._connections)t.channelServer.registerChannel(n,e)}dispose(){this.disposables.dispose();for(let n of this._connections)n.channelClient.dispose(),n.channelServer.dispose();this._connections.clear(),this.channels.clear(),this._onDidAddConnection.dispose(),this._onDidRemoveConnection.dispose()}},Ec=class{constructor(n,e,t=null){let i=new Gp;hc(i,e),n.send(i.buffer),this.channelClient=new Da(n,t),this.channelServer=new Hp(n,e,t)}getChannel(n){return this.channelClient.getChannel(n)}registerChannel(n,e){this.channelServer.registerChannel(n,e)}dispose(){this.channelClient.dispose(),this.channelServer.dispose()}};gh=class{constructor(n){this.fn=n}routeCall(n){return this.route(n)}routeEvent(n){return this.route(n)}async route(n){for(let e of n.connections)if(await Promise.resolve(this.fn(e.ctx)))return Promise.resolve(e);return await x.toPromise(n.onDidAddConnection),await this.route(n)}};(i=>{function r(o,s,a){let l=o,c=a?.disableMarshalling,u=new Map;for(let p in l)e(p)&&u.set(p,x.buffer(l[p],!0,void 0,s));return new class{listen(p,m,h){let E=u.get(m);if(E)return E;let y=l[m];if(typeof y=="function"){if(t(m))return y.call(l,h);if(e(m))return u.set(m,x.buffer(l[m],!0,void 0,s)),u.get(m)}throw new Ar(`Event not found: ${m}`)}call(p,m,h){let E=l[m];if(typeof E=="function"){if(!c&&Array.isArray(h))for(let P=0;P<h.length;P++)h[P]=bi(h[P]);let y=E.apply(l,h);return y instanceof Promise||(y=Promise.resolve(y)),y}throw new Ar(`Method not found: ${m}`)}}}i.fromService=r;function n(o,s){let a=s?.disableMarshalling;return new Proxy({},{get(l,c){if(typeof c=="string")return s?.properties?.has(c)?s.properties.get(c):t(c)?function(u){return o.listen(c,u)}:e(c)?o.listen(c):async function(...u){let p;s&&!Qt(s.context)?p=[s.context,...u]:p=u;let m=await o.call(c,p);return a?m:bi(m)};throw new Ar(`Property not found: ${String(c)}`)}})}i.toService=n;function e(o){return o[0]==="o"&&o[1]==="n"&&_S(o.charCodeAt(2))}function t(o){return/^onDynamic/.test(o)&&_S(o.charCodeAt(9))}})(it||={})});function UD(r){return q5.test(r)}var q5,Me,Xt=_(()=>{q5=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;Me=(function(){if(typeof crypto.randomUUID=="function")return crypto.randomUUID.bind(crypto);let r=new Uint8Array(16),n=[];for(let e=0;e<256;e++)n.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 t=0,i="";return i+=n[r[t++]],i+=n[r[t++]],i+=n[r[t++]],i+=n[r[t++]],i+="-",i+=n[r[t++]],i+=n[r[t++]],i+="-",i+=n[r[t++]],i+=n[r[t++]],i+="-",i+=n[r[t++]],i+=n[r[t++]],i+="-",i+=n[r[t++]],i+=n[r[t++]],i+=n[r[t++]],i+=n[r[t++]],i+=n[r[t++]],i+=n[r[t++]],i}})()});function Ps(){return $S||($S=ee.alloc(0)),$S}function FD(r){switch(r){case 0:return"None";case 1:return"Regular";case 2:return"Control";case 3:return"Ack";case 5:return"Disconnect";case 6:return"ReplayRequest";case 7:return"PauseWriting";case 8:return"ResumeWriting";case 9:return"KeepAlive"}}var n_,$S,qp,Wr,Kp,jp,zp,Yp,Oa,ZS,e_,t_,hh,r_=_(()=>{Et();ae();te();Zi();(s=>{s.enableDiagnostics=!1,s.records=[];let e=new WeakMap,t=0;function i(a,l){if(!e.has(a)){let c=String(++t);e.set(a,c)}return e.get(a)}function o(a,l,c,u){}s.traceSocketEvent=o})(n_||={});$S=null;qp=class{get byteLength(){return this._totalLength}constructor(){this._chunks=[],this._totalLength=0}acceptChunk(n){this._chunks.push(n),this._totalLength+=n.byteLength}read(n){return this._read(n,!0)}peek(n){return this._read(n,!1)}_read(n,e){if(n===0)return Ps();if(n>this._totalLength)throw new Error("Cannot read so many bytes!");if(this._chunks[0].byteLength===n){let s=this._chunks[0];return e&&(this._chunks.shift(),this._totalLength-=n),s}if(this._chunks[0].byteLength>n){let s=this._chunks[0].slice(0,n);return e&&(this._chunks[0]=this._chunks[0].slice(n),this._totalLength-=n),s}let t=ee.alloc(n),i=0,o=0;for(;n>0;){let s=this._chunks[o];if(s.byteLength>n){let a=s.slice(0,n);t.set(a,i),i+=n,e&&(this._chunks[o]=s.slice(n),this._totalLength-=n),n-=n}else t.set(s,i),i+=s.byteLength,e?(this._chunks.shift(),this._totalLength-=s.byteLength):o++,n-=s.byteLength}return t}};Wr=class{constructor(n,e,t,i){this.type=n;this.id=e;this.ack=t;this.data=i;this.writtenTime=0}get size(){return this.data.byteLength}},Kp=class extends M{constructor(e){super();this._onMessage=this._register(new C);this.onMessage=this._onMessage.event;this._state={readHead:!0,readLen:13,messageType:0,id:0,ack:0};this._socket=e,this._isDisposed=!1,this._incomingData=new qp,this._register(this._socket.onData(t=>this.acceptChunk(t))),this.lastReadTime=Date.now()}acceptChunk(e){if(!(!e||e.byteLength===0))for(this.lastReadTime=Date.now(),this._incomingData.acceptChunk(e);this._incomingData.byteLength>=this._state.readLen;){let t=this._incomingData.read(this._state.readLen);if(this._state.readHead)this._state.readHead=!1,this._state.readLen=t.readUInt32BE(9),this._state.messageType=t.readUInt8(0),this._state.id=t.readUInt32BE(1),this._state.ack=t.readUInt32BE(5),this._socket.traceSocketEvent("protocolHeaderRead",{messageType:FD(this._state.messageType),id:this._state.id,ack:this._state.ack,messageSize:this._state.readLen});else{let i=this._state.messageType,o=this._state.id,s=this._state.ack;if(this._state.readHead=!0,this._state.readLen=13,this._state.messageType=0,this._state.id=0,this._state.ack=0,this._socket.traceSocketEvent("protocolMessageRead",t),this._onMessage.fire(new Wr(i,o,s,t)),this._isDisposed)break}}}readEntireBuffer(){return this._incomingData.read(this._incomingData.byteLength)}dispose(){this._isDisposed=!0,super.dispose()}},jp=class{constructor(n){this._writeNowTimeout=null;this._isDisposed=!1,this._isPaused=!1,this._socket=n,this._data=[],this._totalLength=0,this.lastWriteTime=0}dispose(){try{this.flush()}catch{}this._isDisposed=!0}drain(){return this.flush(),this._socket.drain()}flush(){this._writeNow()}pause(){this._isPaused=!0}resume(){this._isPaused=!1,this._scheduleWriting()}write(n){if(this._isDisposed)return;n.writtenTime=Date.now(),this.lastWriteTime=Date.now();let e=ee.alloc(13);e.writeUInt8(n.type,0),e.writeUInt32BE(n.id,1),e.writeUInt32BE(n.ack,5),e.writeUInt32BE(n.data.byteLength,9),this._socket.traceSocketEvent("protocolHeaderWrite",{messageType:FD(n.type),id:n.id,ack:n.ack,messageSize:n.data.byteLength}),this._socket.traceSocketEvent("protocolMessageWrite",n.data),this._writeSoon(e,n.data)}_bufferAdd(n,e){let t=this._totalLength===0;return this._data.push(n,e),this._totalLength+=n.byteLength+e.byteLength,t}_bufferTake(){let n=ee.concat(this._data,this._totalLength);return this._data.length=0,this._totalLength=0,n}_writeSoon(n,e){this._bufferAdd(n,e)&&this._scheduleWriting()}_scheduleWriting(){this._writeNowTimeout||(this._writeNowTimeout=setTimeout(()=>{this._writeNowTimeout=null,this._writeNow()}))}_writeNow(){if(this._totalLength===0||this._isPaused)return;let n=this._bufferTake();this._socket.traceSocketEvent("protocolWrite",{byteLength:n.byteLength}),this._socket.write(n)}},zp=class extends M{constructor(e){super();this._onMessage=this._register(new C);this.onMessage=this._onMessage.event;this._onDidDispose=this._register(new C);this.onDidDispose=this._onDidDispose.event;this._socket=e,this._socketWriter=this._register(new jp(this._socket)),this._socketReader=this._register(new Kp(this._socket)),this._register(this._socketReader.onMessage(t=>{t.type===1&&this._onMessage.fire(t.data)})),this._register(this._socket.onClose(()=>this._onDidDispose.fire()))}drain(){return this._socketWriter.drain()}getSocket(){return this._socket}sendDisconnect(){}send(e){this._socketWriter.write(new Wr(1,0,0,e))}},Yp=class r extends Ec{constructor(e,t,i=null){super(e,t,i);this.protocol=e}static fromSocket(e,t){return new r(new zp(e),t)}get onDidDispose(){return this.protocol.onDidDispose}dispose(){super.dispose();let e=this.protocol.getSocket();this.protocol.sendDisconnect(),this.protocol.dispose(),e.end()}},Oa=class{constructor(){this._hasListeners=!1;this._isDeliveringMessages=!1;this._bufferedMessages=[];this._emitter=new C({onWillAddFirstListener:()=>{this._hasListeners=!0,queueMicrotask(()=>this._deliverMessages())},onDidRemoveLastListener:()=>{this._hasListeners=!1}}),this.event=this._emitter.event}_deliverMessages(){if(!this._isDeliveringMessages){for(this._isDeliveringMessages=!0;this._hasListeners&&this._bufferedMessages.length>0;)this._emitter.fire(this._bufferedMessages.shift());this._isDeliveringMessages=!1}}fire(n){this._hasListeners?this._bufferedMessages.length>0?this._bufferedMessages.push(n):this._emitter.fire(n):this._bufferedMessages.push(n)}flushBuffer(){this._bufferedMessages=[]}},ZS=class{constructor(n){this.data=n,this.next=null}},e_=class{constructor(){this._first=null,this._last=null}length(){let n=0,e=this._first;for(;e;)e=e.next,n++;return n}peek(){return this._first?this._first.data:null}toArray(){let n=[],e=0,t=this._first;for(;t;)n[e++]=t.data,t=t.next;return n}pop(){if(this._first){if(this._first===this._last){this._first=null,this._last=null;return}this._first=this._first.next}}push(n){let e=new ZS(n);if(!this._first){this._first=e,this._last=e;return}this._last.next=e,this._last=e}},t_=class r{static{this._HISTORY_LENGTH=10}static{this._INSTANCE=null}static getInstance(){return r._INSTANCE||(r._INSTANCE=new r),r._INSTANCE}constructor(){this.lastRuns=[];let n=Date.now();for(let e=0;e<r._HISTORY_LENGTH;e++)this.lastRuns[e]=n-1e3*e;setInterval(()=>{for(let e=r._HISTORY_LENGTH;e>=1;e--)this.lastRuns[e]=this.lastRuns[e-1];this.lastRuns[0]=Date.now()},1e3)}load(){let n=Date.now(),e=(1+r._HISTORY_LENGTH)*1e3,t=0;for(let i=0;i<r._HISTORY_LENGTH;i++)n-this.lastRuns[i]<=e&&t++;return 1-t/r._HISTORY_LENGTH}hasHighLoad(){return this.load()>=.5}},hh=class{constructor(n){this._onControlMessage=new Oa;this.onControlMessage=this._onControlMessage.event;this._onMessage=new Oa;this.onMessage=this._onMessage.event;this._onDidDispose=new Oa;this.onDidDispose=this._onDidDispose.event;this._onSocketClose=new Oa;this.onSocketClose=this._onSocketClose.event;this._onSocketTimeout=new Oa;this.onSocketTimeout=this._onSocketTimeout.event;this._loadEstimator=n.loadEstimator??t_.getInstance(),this._shouldSendKeepAlive=n.sendKeepAlive??!0,this._isReconnecting=!1,this._outgoingUnackMsg=new e_,this._outgoingMsgId=0,this._outgoingAckId=0,this._outgoingAckTimeout=null,this._incomingMsgId=0,this._incomingAckId=0,this._incomingMsgLastTime=0,this._incomingAckTimeout=null,this._lastReplayRequestTime=0,this._lastSocketTimeoutTime=Date.now(),this._socketDisposables=new ue,this._socket=n.socket,this._socketWriter=this._socketDisposables.add(new jp(this._socket)),this._socketReader=this._socketDisposables.add(new Kp(this._socket)),this._socketDisposables.add(this._socketReader.onMessage(e=>this._receiveMessage(e))),this._socketDisposables.add(this._socket.onClose(e=>this._onSocketClose.fire(e))),n.initialChunk&&this._socketReader.acceptChunk(n.initialChunk),this._shouldSendKeepAlive?this._keepAliveInterval=setInterval(()=>{this._sendKeepAlive()},5e3):this._keepAliveInterval=null}get unacknowledgedCount(){return this._outgoingMsgId-this._outgoingAckId}dispose(){this._outgoingAckTimeout&&(clearTimeout(this._outgoingAckTimeout),this._outgoingAckTimeout=null),this._incomingAckTimeout&&(clearTimeout(this._incomingAckTimeout),this._incomingAckTimeout=null),this._keepAliveInterval&&(clearInterval(this._keepAliveInterval),this._keepAliveInterval=null),this._socketDisposables.dispose()}drain(){return this._socketWriter.drain()}sendDisconnect(){if(!this._didSendDisconnect){this._didSendDisconnect=!0;let n=new Wr(5,0,0,Ps());this._socketWriter.write(n),this._socketWriter.flush()}}sendPause(){let n=new Wr(7,0,0,Ps());this._socketWriter.write(n)}sendResume(){let n=new Wr(8,0,0,Ps());this._socketWriter.write(n)}pauseSocketWriting(){this._socketWriter.pause()}getSocket(){return this._socket}getMillisSinceLastIncomingData(){return Date.now()-this._socketReader.lastReadTime}beginAcceptReconnection(n,e){this._isReconnecting=!0,this._socketDisposables.dispose(),this._socketDisposables=new ue,this._onControlMessage.flushBuffer(),this._onSocketClose.flushBuffer(),this._onSocketTimeout.flushBuffer(),this._socket.dispose(),this._lastReplayRequestTime=0,this._lastSocketTimeoutTime=Date.now(),this._socket=n,this._socketWriter=this._socketDisposables.add(new jp(this._socket)),this._socketReader=this._socketDisposables.add(new Kp(this._socket)),this._socketDisposables.add(this._socketReader.onMessage(t=>this._receiveMessage(t))),this._socketDisposables.add(this._socket.onClose(t=>this._onSocketClose.fire(t))),this._socketReader.acceptChunk(e)}endAcceptReconnection(){this._isReconnecting=!1,this._incomingAckId=this._incomingMsgId;let n=new Wr(3,0,this._incomingAckId,Ps());this._socketWriter.write(n);let e=this._outgoingUnackMsg.toArray();for(let t=0,i=e.length;t<i;t++)this._socketWriter.write(e[t]);this._recvAckCheck()}acceptDisconnect(){this._onDidDispose.fire()}_receiveMessage(n){if(n.ack>this._outgoingAckId){this._outgoingAckId=n.ack;do{let e=this._outgoingUnackMsg.peek();if(e&&e.id<=n.ack)this._outgoingUnackMsg.pop();else break}while(!0)}switch(n.type){case 0:break;case 1:{if(n.id>this._incomingMsgId)if(n.id!==this._incomingMsgId+1){let e=Date.now();e-this._lastReplayRequestTime>1e4&&(this._lastReplayRequestTime=e,this._socketWriter.write(new Wr(6,0,0,Ps())))}else this._incomingMsgId=n.id,this._incomingMsgLastTime=Date.now(),this._sendAckCheck(),this._onMessage.fire(n.data);break}case 2:{this._onControlMessage.fire(n.data);break}case 3:break;case 5:{this._onDidDispose.fire();break}case 6:{let e=this._outgoingUnackMsg.toArray();for(let t=0,i=e.length;t<i;t++)this._socketWriter.write(e[t]);this._recvAckCheck();break}case 7:{this._socketWriter.pause();break}case 8:{this._socketWriter.resume();break}case 9:break}}readEntireBuffer(){return this._socketReader.readEntireBuffer()}flush(){this._socketWriter.flush()}send(n){let e=++this._outgoingMsgId;this._incomingAckId=this._incomingMsgId;let t=new Wr(1,e,this._incomingAckId,n);this._outgoingUnackMsg.push(t),this._isReconnecting||(this._socketWriter.write(t),this._recvAckCheck())}sendControl(n){let e=new Wr(2,0,0,n);this._socketWriter.write(e)}_sendAckCheck(){if(this._incomingMsgId<=this._incomingAckId||this._incomingAckTimeout)return;let n=Date.now()-this._incomingMsgLastTime;if(n>=2e3){this._sendAck();return}this._incomingAckTimeout=setTimeout(()=>{this._incomingAckTimeout=null,this._sendAckCheck()},2e3-n+5)}_recvAckCheck(){if(this._outgoingMsgId<=this._outgoingAckId||this._outgoingAckTimeout||this._isReconnecting)return;let n=this._outgoingUnackMsg.peek(),e=Date.now()-n.writtenTime,t=Date.now()-this._socketReader.lastReadTime,i=Date.now()-this._lastSocketTimeoutTime;if(e>=2e4&&t>=2e4&&i>=2e4&&!this._loadEstimator.hasHighLoad()){this._lastSocketTimeoutTime=Date.now(),this._onSocketTimeout.fire({unacknowledgedMsgCount:this._outgoingUnackMsg.length(),timeSinceOldestUnacknowledgedMsg:e,timeSinceLastReceivedSomeData:t});return}let o=Math.max(2e4-e,2e4-t,2e4-i,500);this._outgoingAckTimeout=setTimeout(()=>{this._outgoingAckTimeout=null,this._recvAckCheck()},o)}_sendAck(){if(this._incomingMsgId<=this._incomingAckId)return;this._incomingAckId=this._incomingMsgId;let n=new Wr(3,0,this._incomingAckId,Ps());this._socketWriter.write(n)}_sendKeepAlive(){this._incomingAckId=this._incomingMsgId;let n=new Wr(9,0,this._incomingAckId,Ps());this._socketWriter.write(n)}}});import{createHash as BD}from"crypto";import{createConnection as WD,createServer as z5}from"net";import{tmpdir as IK}from"os";import{createDeflateRaw as Y5,createInflateRaw as Q5}from"zlib";function vh(r,n,{debugLabel:e,skipWebSocketFrames:t=!1,disableWebSocketCompression:i=!1,enableMessageSplitting:o=!0}){if(r.headers.upgrade===void 0||r.headers.upgrade.toLowerCase()!=="websocket"){n.end("HTTP/1.1 400 Bad Request");return}let s=r.headers["sec-websocket-key"],a=BD("sha1");a.update(s+"258EAFA5-E914-47DA-95CA-C5AB0DC85B11");let c=["HTTP/1.1 101 Switching Protocols","Upgrade: websocket","Connection: Upgrade",`Sec-WebSocket-Accept: ${a.digest("base64")}`],u=!1;if(!t&&!i&&r.headers["sec-websocket-extensions"]){let p=Array.isArray(r.headers["sec-websocket-extensions"])?r.headers["sec-websocket-extensions"]:[r.headers["sec-websocket-extensions"]];for(let m of p)if(!/\b((server_max_window_bits)|(server_no_context_takeover)|(client_no_context_takeover))\b/.test(m)){if(/\b(permessage-deflate)\b/.test(m)){u=!0,c.push("Sec-WebSocket-Extensions: permessage-deflate");break}if(/\b(x-webkit-deflate-frame)\b/.test(m)){u=!0,c.push("Sec-WebSocket-Extensions: x-webkit-deflate-frame");break}}}return n.write(c.join(`\r
`)+`\r
\r
`),n.setTimeout(0),n.setNoDelay(!0),t?new Fo(n,e):new i_(new Fo(n,e),u,null,!0,o)}function $5(r,n){if(n===0)return;let e=r.byteLength>>>2;for(let l=0;l<e;l++){let c=r.readUInt32BE(l*4);r.writeUInt32BE(c^n,l*4)}let t=e*4,i=r.byteLength-t,o=n>>>24&255,s=n>>>16&255,a=n>>>8&255;i>=1&&r.writeUInt8(r.readUInt8(t)^o,t),i>=2&&r.writeUInt8(r.readUInt8(t+1)^s,t+1),i>=3&&r.writeUInt8(r.readUInt8(t+2)^a,t+2)}function VD(r,n,e){let i=BD("sha256").update(r).digest("hex").substr(0,8);if(process.platform==="win32")return`\\\\.\\pipe\\${i}-${e}-${n}-sock`;let o=e.substr(0,4),s=n.substr(0,6),a;return process.platform!=="darwin"&&Ih&&!process.env.VSCODE_PORTABLE?a=H(Ih,`vscode-${i}-${o}-${s}.sock`):a=H(r,`${o}-${s}.sock`),e9(a),a}function e9(r){let n=Z5[Co];typeof n=="number"&&r.length>=n&&console.warn(`WARNING: IPC handle "${r}" is longer than ${n} chars, try a shorter --user-data-dir`)}function GD(r){return new Promise((n,e)=>{let t=z5();t.on("error",e),t.listen(r,()=>{t.removeListener("error",e),n(new l_(t))})})}function HD(r,n){return new Promise((e,t)=>{let i,o=()=>{i.removeListener("error",t),e(Yp.fromSocket(new Fo(i,`ipc-client${n}`),n))};typeof r=="string"?i=WD(r,o):i=WD(r,o),i.once("error",t)})}var X5,Fo,i_,o_,s_,a_,Ih,Z5,l_,yc=_(()=>{Et();rt();ae();te();Ne();ce();Xt();Zi();r_();X5=3e4,Fo=class{constructor(n,e=""){this._canWrite=!0;this.debugLabel=e,this.socket=n,this.traceSocketEvent("created",{type:"NodeSocket"}),this._errorListener=i=>{if(this.traceSocketEvent("error",{code:i?.code,message:i?.message}),i){if(i.code==="EPIPE")return;vt(i)}},this.socket.on("error",this._errorListener);let t;this._closeListener=i=>{this.traceSocketEvent("close",{hadError:i}),this._canWrite=!1,t&&clearTimeout(t)},this.socket.on("close",this._closeListener),this._endListener=()=>{this.traceSocketEvent("nodeEndReceived"),this._canWrite=!1,t=setTimeout(()=>n.destroy(),X5)},this.socket.on("end",this._endListener)}traceSocketEvent(n,e){n_.traceSocketEvent(this.socket,this.debugLabel,n,e)}dispose(){this.socket.off("error",this._errorListener),this.socket.off("close",this._closeListener),this.socket.off("end",this._endListener),this.socket.destroy()}onData(n){let e=t=>{this.traceSocketEvent("read",t),n(ee.wrap(t))};return this.socket.on("data",e),{dispose:()=>this.socket.off("data",e)}}onClose(n){let e=t=>{n({type:0,hadError:t,error:void 0})};return this.socket.on("close",e),{dispose:()=>this.socket.off("close",e)}}onEnd(n){let e=()=>{n()};return this.socket.on("end",e),{dispose:()=>this.socket.off("end",e)}}write(n){if(!(this.socket.destroyed||!this._canWrite))try{this.traceSocketEvent("write",n),this.socket.write(n.buffer,e=>{if(e){if(e.code==="EPIPE")return;vt(e)}})}catch(e){if(e.code==="EPIPE")return;vt(e)}}end(){this.traceSocketEvent("nodeEndSent"),this.socket.end()}drain(){return this.traceSocketEvent("nodeDrainBegin"),new Promise((n,e)=>{if(this.socket.bufferSize===0){this.traceSocketEvent("nodeDrainEnd"),n();return}let t=()=>{this.socket.off("close",t),this.socket.off("end",t),this.socket.off("error",t),this.socket.off("timeout",t),this.socket.off("drain",t),this.traceSocketEvent("nodeDrainEnd"),n()};this.socket.on("close",t),this.socket.on("end",t),this.socket.on("error",t),this.socket.on("timeout",t),this.socket.on("drain",t)})}},i_=class extends M{constructor(e,t,i,o,s=!0){super();this._onData=this._register(new C);this._onClose=this._register(new C);this._isEnded=!1;this._state={state:1,readLen:2,fin:0,compressed:!1,firstFrameOfMessage:!0,mask:0,opcode:0};this.socket=e,this._maxSocketMessageLength=s?262144:1/0,this.traceSocketEvent("created",{type:"WebSocketNodeSocket",permessageDeflate:t,inflateBytesLength:i?.byteLength||0,recordInflateBytes:o}),this._flowManager=this._register(new o_(this,t,i,o,this._onData,(a,l)=>this._write(a,l))),this._register(this._flowManager.onError(a=>{console.error(a),vt(a),this._onClose.fire({type:0,hadError:!0,error:a})})),this._incomingData=new qp,this._register(this.socket.onData(a=>this._acceptChunk(a))),this._register(this.socket.onClose(async a=>{this._flowManager.isProcessingReadQueue()&&await x.toPromise(this._flowManager.onDidFinishProcessingReadQueue),this._onClose.fire(a)}))}get permessageDeflate(){return this._flowManager.permessageDeflate}get recordedInflateBytes(){return this._flowManager.recordedInflateBytes}setRecordInflateBytes(e){this._flowManager.setRecordInflateBytes(e)}traceSocketEvent(e,t){this.socket.traceSocketEvent(e,t)}dispose(){this._flowManager.isProcessingWriteQueue()?this._register(this._flowManager.onDidFinishProcessingWriteQueue(()=>{this.dispose()})):(this.socket.dispose(),super.dispose())}onData(e){return this._onData.event(e)}onClose(e){return this._onClose.event(e)}onEnd(e){return this.socket.onEnd(e)}write(e){let t=0;for(;t<e.byteLength;)this._flowManager.writeMessage(e.slice(t,Math.min(t+this._maxSocketMessageLength,e.byteLength)),{compressed:!0,opcode:2}),t+=this._maxSocketMessageLength}_write(e,{compressed:t,opcode:i}){if(this._isEnded)return;this.traceSocketEvent("webSocketNodeSocketWrite",e);let o=2;e.byteLength<126?o+=0:e.byteLength<2**16?o+=2:o+=8;let s=ee.alloc(o),a=t?64:0,l=i&15;if(s.writeUInt8(128|a|l,0),e.byteLength<126)s.writeUInt8(e.byteLength,1);else if(e.byteLength<2**16){s.writeUInt8(126,1);let c=1;s.writeUInt8(e.byteLength>>>8&255,++c),s.writeUInt8(e.byteLength>>>0&255,++c)}else{s.writeUInt8(127,1);let c=1;s.writeUInt8(0,++c),s.writeUInt8(0,++c),s.writeUInt8(0,++c),s.writeUInt8(0,++c),s.writeUInt8(e.byteLength>>>24&255,++c),s.writeUInt8(e.byteLength>>>16&255,++c),s.writeUInt8(e.byteLength>>>8&255,++c),s.writeUInt8(e.byteLength>>>0&255,++c)}this.socket.write(ee.concat([s,e]))}end(){this._isEnded=!0,this.socket.end()}_acceptChunk(e){if(e.byteLength!==0){for(this._incomingData.acceptChunk(e);this._incomingData.byteLength>=this._state.readLen;)if(this._state.state===1){let t=this._incomingData.peek(this._state.readLen),i=t.readUInt8(0),o=(i&128)>>>7,s=(i&64)>>>6,a=i&15,l=t.readUInt8(1),c=(l&128)>>>7,u=l&127;this._state.state=2,this._state.readLen=2+(c?4:0)+(u===126?2:0)+(u===127?8:0),this._state.fin=o,this._state.firstFrameOfMessage&&(this._state.compressed=!!s),this._state.firstFrameOfMessage=!!o,this._state.mask=0,this._state.opcode=a,this.traceSocketEvent("webSocketNodeSocketPeekedHeader",{headerSize:this._state.readLen,compressed:this._state.compressed,fin:this._state.fin,opcode:this._state.opcode})}else if(this._state.state===2){let t=this._incomingData.read(this._state.readLen),i=t.readUInt8(1),o=(i&128)>>>7,s=i&127,a=1;s===126?s=t.readUInt8(++a)*2**8+t.readUInt8(++a):s===127&&(s=t.readUInt8(++a)*0+t.readUInt8(++a)*0+t.readUInt8(++a)*0+t.readUInt8(++a)*0+t.readUInt8(++a)*2**24+t.readUInt8(++a)*2**16+t.readUInt8(++a)*2**8+t.readUInt8(++a));let l=0;o&&(l=t.readUInt8(++a)*2**24+t.readUInt8(++a)*2**16+t.readUInt8(++a)*2**8+t.readUInt8(++a)),this._state.state=3,this._state.readLen=s,this._state.mask=l,this.traceSocketEvent("webSocketNodeSocketPeekedHeader",{bodySize:this._state.readLen,compressed:this._state.compressed,fin:this._state.fin,mask:this._state.mask,opcode:this._state.opcode})}else if(this._state.state===3){let t=this._incomingData.read(this._state.readLen);this.traceSocketEvent("webSocketNodeSocketReadData",t),$5(t,this._state.mask),this.traceSocketEvent("webSocketNodeSocketUnmaskedData",t),this._state.state=1,this._state.readLen=2,this._state.mask=0,this._state.opcode<=2?this._flowManager.acceptFrame(t,this._state.compressed,!!this._state.fin):this._state.opcode===9&&this._flowManager.writeMessage(t,{compressed:!1,opcode:10})}}}async drain(){this.traceSocketEvent("webSocketNodeSocketDrainBegin"),this._flowManager.isProcessingWriteQueue()&&await x.toPromise(this._flowManager.onDidFinishProcessingWriteQueue),await this.socket.drain(),this.traceSocketEvent("webSocketNodeSocketDrainEnd")}},o_=class extends M{constructor(e,t,i,o,s,a){super();this._tracer=e;this._onData=s;this._writeFn=a;this._onError=this._register(new C);this.onError=this._onError.event;this._writeQueue=[];this._readQueue=[];this._onDidFinishProcessingReadQueue=this._register(new C);this.onDidFinishProcessingReadQueue=this._onDidFinishProcessingReadQueue.event;this._onDidFinishProcessingWriteQueue=this._register(new C);this.onDidFinishProcessingWriteQueue=this._onDidFinishProcessingWriteQueue.event;this._isProcessingWriteQueue=!1;this._isProcessingReadQueue=!1;t?(this._zlibInflateStream=this._register(new s_(this._tracer,o,i,{windowBits:15})),this._zlibDeflateStream=this._register(new a_(this._tracer,{windowBits:15})),this._register(this._zlibInflateStream.onError(l=>this._onError.fire(l))),this._register(this._zlibDeflateStream.onError(l=>this._onError.fire(l)))):(this._zlibInflateStream=null,this._zlibDeflateStream=null)}get permessageDeflate(){return!!(this._zlibInflateStream&&this._zlibDeflateStream)}get recordedInflateBytes(){return this._zlibInflateStream?this._zlibInflateStream.recordedInflateBytes:ee.alloc(0)}setRecordInflateBytes(e){this._zlibInflateStream?.setRecordInflateBytes(e)}writeMessage(e,t){this._writeQueue.push({data:e,options:t}),this._processWriteQueue()}async _processWriteQueue(){if(!this._isProcessingWriteQueue){for(this._isProcessingWriteQueue=!0;this._writeQueue.length>0;){let{data:e,options:t}=this._writeQueue.shift();if(this._zlibDeflateStream&&t.compressed){let i=await this._deflateMessage(this._zlibDeflateStream,e);this._writeFn(i,t)}else this._writeFn(e,{...t,compressed:!1})}this._isProcessingWriteQueue=!1,this._onDidFinishProcessingWriteQueue.fire()}}isProcessingWriteQueue(){return this._isProcessingWriteQueue}_deflateMessage(e,t){return new Promise((i,o)=>{e.write(t),e.flush(s=>i(s))})}acceptFrame(e,t,i){this._readQueue.push({data:e,isCompressed:t,isLastFrameOfMessage:i}),this._processReadQueue()}async _processReadQueue(){if(!this._isProcessingReadQueue){for(this._isProcessingReadQueue=!0;this._readQueue.length>0;){let e=this._readQueue.shift();if(this._zlibInflateStream&&e.isCompressed){let t=await this._inflateFrame(this._zlibInflateStream,e.data,e.isLastFrameOfMessage);this._onData.fire(t)}else this._onData.fire(e.data)}this._isProcessingReadQueue=!1,this._onDidFinishProcessingReadQueue.fire()}}isProcessingReadQueue(){return this._isProcessingReadQueue}_inflateFrame(e,t,i){return new Promise((o,s)=>{e.write(t),i&&e.write(ee.fromByteArray([0,0,255,255])),e.flush(a=>o(a))})}},s_=class extends M{constructor(e,t,i,o){super();this._tracer=e;this._onError=this._register(new C);this.onError=this._onError.event;this._recordedInflateBytes=[];this._pendingInflateData=[];this._recordInflateBytes=t,this._zlibInflate=Q5(o),this._zlibInflate.on("error",s=>{this._tracer.traceSocketEvent("zlibInflateError",{message:s?.message,code:s?.code}),this._onError.fire(s)}),this._zlibInflate.on("data",s=>{this._tracer.traceSocketEvent("zlibInflateData",s),this._pendingInflateData.push(ee.wrap(s))}),i&&(this._tracer.traceSocketEvent("zlibInflateInitialWrite",i.buffer),this._zlibInflate.write(i.buffer),this._zlibInflate.flush(()=>{this._tracer.traceSocketEvent("zlibInflateInitialFlushFired"),this._pendingInflateData.length=0}))}get recordedInflateBytes(){return this._recordInflateBytes?ee.concat(this._recordedInflateBytes):ee.alloc(0)}write(e){this._recordInflateBytes&&this._recordedInflateBytes.push(e.clone()),this._tracer.traceSocketEvent("zlibInflateWrite",e),this._zlibInflate.write(e.buffer)}setRecordInflateBytes(e){this._recordInflateBytes=e,e||(this._recordedInflateBytes.length=0)}flush(e){this._zlibInflate.flush(()=>{this._tracer.traceSocketEvent("zlibInflateFlushFired");let t=ee.concat(this._pendingInflateData);this._pendingInflateData.length=0,e(t)})}dispose(){this._recordedInflateBytes.length=0,this._pendingInflateData.length=0;try{this._zlibInflate.close()}catch{}super.dispose()}},a_=class extends M{constructor(e,t){super();this._tracer=e;this._onError=this._register(new C);this.onError=this._onError.event;this._pendingDeflateData=[];this._zlibDeflate=Y5({windowBits:15}),this._zlibDeflate.on("error",i=>{this._tracer.traceSocketEvent("zlibDeflateError",{message:i?.message,code:i?.code}),this._onError.fire(i)}),this._zlibDeflate.on("data",i=>{this._tracer.traceSocketEvent("zlibDeflateData",i),this._pendingDeflateData.push(ee.wrap(i))})}write(e){this._tracer.traceSocketEvent("zlibDeflateWrite",e.buffer),this._zlibDeflate.write(e.buffer)}flush(e){this._zlibDeflate.flush(2,()=>{this._tracer.traceSocketEvent("zlibDeflateFlushFired");let t=ee.concat(this._pendingDeflateData);this._pendingDeflateData.length=0,t=t.slice(0,t.byteLength-4),e(t)})}dispose(){this._pendingDeflateData.length=0;try{this._zlibDeflate.close()}catch{}super.dispose()}};Ih=process.env.XDG_RUNTIME_DIR,Z5={2:107,1:103};l_=class r extends vc{static toClientConnectionEvent(n){let e=x.fromNodeEventEmitter(n,"connection");return x.map(e,t=>({protocol:new zp(new Fo(t,"ipc-server-connection")),onDidClientDisconnect:x.once(x.fromNodeEventEmitter(t,"close"))}))}constructor(n){super(r.toClientConnectionEvent(n)),this.server=n}dispose(){super.dispose(),this.server&&(this.server.close(),this.server=null)}}});import Qp from"electron";var d_,Tt,Ti=_(()=>{rt();at();d_=class{constructor(){this.mapListenerToWrapper=new WeakMap}on(n,e){let t=(i,...o)=>{this.validateEvent(n,i)&&e(i,...o)};return this.mapListenerToWrapper.set(e,t),Qp.ipcMain.on(n,t),this}once(n,e){return Qp.ipcMain.once(n,(t,...i)=>{this.validateEvent(n,t)&&e(t,...i)}),this}handle(n,e){return Qp.ipcMain.handle(n,(t,...i)=>this.validateEvent(n,t)?e(t,...i):Promise.reject(`Invalid channel '${n}' or sender for ipcMain.handle() usage.`)),this}removeHandler(n){return Qp.ipcMain.removeHandler(n),this}removeListener(n,e){let t=this.mapListenerToWrapper.get(e);return t&&(Qp.ipcMain.removeListener(n,t),this.mapListenerToWrapper.delete(e)),this}validateEvent(n,e){if(!n?.startsWith("vscode:"))return vt(`Refused to handle ipcMain event for channel '${n}' because the channel is unknown.`),!1;let t=e.senderFrame,i=t?.url;if(!i||i==="about:blank")return!0;let o="unknown";try{o=new URL(i).host}catch{return vt(`Refused to handle ipcMain event for channel '${n}' because of a malformed URL '${i}'.`),!1}return process.env.VSCODE_DEV&&i===process.env.DEV_WINDOW_SRC&&(o==="localhost"||o.startsWith("localhost:"))?!0:o!==ec?(vt(`Refused to handle ipcMain event for channel '${n}' because of a bad origin of '${o}'.`),!1):t?.parent!==null?(vt(`Refused to handle ipcMain event for channel '${n}' because sender of origin '${o}' is not a main frame.`),!1):!0}},Tt=new d_});import*as Xp from"os";async function Eh(){if(Cs)return;if(!q){Cs={release:Xp.release(),buildNumber:0};return}let r,n;try{let e=await import("@vscode/windows-registry"),t="SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion",i=e.GetStringRegKey("HKEY_LOCAL_MACHINE",t,"CurrentBuild");i!==void 0&&(r=parseInt(i,10),isNaN(r)&&(r=void 0));let o=e.GetDWORDRegKey("HKEY_LOCAL_MACHINE",t,"CurrentMajorVersionNumber"),s=e.GetDWORDRegKey("HKEY_LOCAL_MACHINE",t,"CurrentMinorVersionNumber");o!==void 0&&s!==void 0&&i!==void 0&&(n=`${o}.${s}.${i}`)}catch{}finally{Cs={release:n||Xp.release(),buildNumber:r||t9()}}}async function JD(){return Cs||await Eh(),Cs.release}async function yh(){return Cs||await Eh(),Cs.buildNumber}function qD(){return Cs?.release??Xp.release()}function t9(){let r=/(\d+)\.(\d+)\.(\d+)/g.exec(Xp.release());return r&&r.length===4?parseInt(r[3],10):0}var Cs,Sc=_(()=>{ce()});var KD,jD,zD=_(()=>{KD="vscode:contextmenu",jD="vscode:onCloseContextMenu"});import{Menu as n9,MenuItem as u_}from"electron";function YD(){Tt.on(KD,(r,n,e,t,i)=>{let o=QD(r,t,e);o.popup({x:i?i.x:void 0,y:i?i.y:void 0,positioningItem:i?i.positioningItem:void 0,callback:()=>{o&&r.sender.send(jD,n)}})})}function QD(r,n,e){let t=new n9;return e.forEach(i=>{let o;i.type==="separator"?o=new u_({type:i.type}):Array.isArray(i.submenu)?o=new u_({submenu:QD(r,n,i.submenu),label:i.label}):o=new u_({label:i.label,type:i.type,accelerator:i.accelerator,checked:i.checked,enabled:i.enabled,visible:i.visible,click:(s,a,l)=>r.sender.send(n,i.id,l)}),t.append(o)}),t}var XD=_(()=>{Ti();zD()});var Sh,$D=_(()=>{Sh=class{constructor(n,e){this.sender=n;this.onMessage=e}send(n){try{this.sender.send("vscode:message",n.buffer)}catch{}}disconnect(){this.sender.send("vscode:disconnect",null)}}});function ZD(r,n){let e=x.fromNodeEventEmitter(Tt,n,(i,o)=>({event:i,message:o})),t=x.filter(e,({event:i})=>i.sender.id===r);return x.map(t,({message:i})=>i&&ee.wrap(i))}var _h,eO=_(()=>{Ti();Et();ae();te();Zi();$D();_h=class r extends vc{static{this.Clients=new Map}static getOnDidClientConnect(){let n=x.fromNodeEventEmitter(Tt,"vscode:hello",({sender:e})=>e);return x.map(n,e=>{let t=e.id;r.Clients.get(t)?.dispose();let o=new C;r.Clients.set(t,oe(()=>o.fire()));let s=ZD(t,"vscode:message"),a=x.any(x.signal(ZD(t,"vscode:disconnect")),o.event);return{protocol:new Sh(e,s),onDidClientDisconnect:a}})}constructor(){super(r.getOnDidClientConnect())}}});var p_,wh,tO=_(()=>{Et();ae();Zi();p_=class{constructor(n){this.port=n;this.onMessage=x.fromDOMEventEmitter(this.port,"message",e=>e.data?ee.wrap(e.data):ee.alloc(0)),n.start()}send(n){this.port.postMessage(n.buffer)}disconnect(){this.port.close()}},wh=class extends Ec{constructor(n,e){let t=new p_(n);super(t,e),this.protocol=t}dispose(){this.protocol.disconnect(),super.dispose()}}});var _c,m_=_(()=>{Ti();ae();Xt();tO();_c=class extends wh{constructor(n,e){super({addEventListener:(t,i)=>n.addListener(t,i),removeEventListener:(t,i)=>n.removeListener(t,i),postMessage:t=>n.postMessage(t),start:()=>n.start(),close:()=>n.close()},e)}}});function wn(r){return g_(r,0)}function g_(r,n){switch(typeof r){case"object":return r===null?Wo(349,n):Array.isArray(r)?i9(r,n):o9(r,n);case"string":return rO(r,n);case"boolean":return r9(r,n);case"number":return Wo(r,n);case"undefined":return Wo(937,n);default:return Wo(617,n)}}function Wo(r,n){return(n<<5)-n+r|0}function r9(r,n){return Wo(r?433:863,n)}function rO(r,n){n=Wo(149417,n);for(let e=0,t=r.length;e<t;e++)n=Wo(r.charCodeAt(e),n);return n}function i9(r,n){return n=Wo(104579,n),r.reduce((e,t)=>g_(t,e),n)}function o9(r,n){return n=Wo(181387,n),Object.keys(r).sort().reduce((e,t)=>(e=rO(t,e),g_(r[t],e)),n)}function f_(r,n,e=32){let t=e-n,i=~((1<<t)-1);return(r<<n|(i&r)>>>t)>>>0}function $p(r,n=32){return r instanceof ArrayBuffer?OD(ee.wrap(new Uint8Array(r))):(r>>>0).toString(16).padStart(n/4,"0")}var nO,eo=_(()=>{Et();Sn();nO=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(n){let e=n.length;if(e===0)return;let t=this._buff,i=this._buffLen,o=this._leftoverHighSurrogate,s,a;for(o!==0?(s=o,a=-1,o=0):(s=n.charCodeAt(0),a=0);;){let l=s;if(Ix(s))if(a+1<e){let c=n.charCodeAt(a+1);wS(c)?(a++,l=vx(s,c)):l=65533}else{o=s;break}else wS(s)&&(l=65533);if(i=this._push(t,i,l),a++,a<e)s=n.charCodeAt(a);else break}this._buffLen=i,this._leftoverHighSurrogate=o}_push(n,e,t){return t<128?n[e++]=t:t<2048?(n[e++]=192|(t&1984)>>>6,n[e++]=128|(t&63)>>>0):t<65536?(n[e++]=224|(t&61440)>>>12,n[e++]=128|(t&4032)>>>6,n[e++]=128|(t&63)>>>0):(n[e++]=240|(t&1835008)>>>18,n[e++]=128|(t&258048)>>>12,n[e++]=128|(t&4032)>>>6,n[e++]=128|(t&63)>>>0),e>=64&&(this._step(),e-=64,this._totalLen+=64,n[0]=n[64],n[1]=n[65],n[2]=n[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()),$p(this._h0)+$p(this._h1)+$p(this._h2)+$p(this._h3)+$p(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 n=8*this._totalLen;this._buffDV.setUint32(56,Math.floor(n/4294967296),!1),this._buffDV.setUint32(60,n%4294967296,!1),this._step()}_step(){let n=r._bigBlock32,e=this._buffDV;for(let p=0;p<64;p+=4)n.setUint32(p,e.getUint32(p,!1),!1);for(let p=64;p<320;p+=4)n.setUint32(p,f_(n.getUint32(p-12,!1)^n.getUint32(p-32,!1)^n.getUint32(p-56,!1)^n.getUint32(p-64,!1),1),!1);let t=this._h0,i=this._h1,o=this._h2,s=this._h3,a=this._h4,l,c,u;for(let p=0;p<80;p++)p<20?(l=i&o|~i&s,c=1518500249):p<40?(l=i^o^s,c=1859775393):p<60?(l=i&o|i&s|o&s,c=2400959708):(l=i^o^s,c=3395469782),u=f_(t,5)+l+a+c+n.getUint32(p*4,!1)&4294967295,a=s,s=o,o=f_(i,30),i=t,t=u;this._h0=this._h0+t&4294967295,this._h1=this._h1+i&4294967295,this._h2=this._h2+o&4294967295,this._h3=this._h3+s&4294967295,this._h4=this._h4+a&4294967295}}});var Ej,Zp,bh=_(()=>{de();Ej=V("encryptionService"),Zp=V("encryptionMainService")});var mr,kn,fr=_(()=>{de();mr=V("environmentService"),kn=mr});function iO(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 s9,a9,h_,Pj,Cj,Aj,oO=_(()=>{We();hs();ce();s9=60,a9=s9*60,h_=a9*24,Pj=h_*7,Cj=h_*30,Aj=h_*365});function l9(r,n){return Ph(r["inspect-extensions"],r["inspect-brk-extensions"],5870,n,r.debugId,r.extensionEnvironment)}function Ph(r,n,e,t,i,o){let a=Number(n||r)||(t?null:e),l=a?!!n:!1,c;if(o)try{c=JSON.parse(o)}catch{}return{port:a,break:l,debugId:i,env:c}}var sO,ot,aO=_(()=>{oO();bs();at();Ne();gi();Ut();Ie();sO=/^([^.]+\..+)[:=](.+)$/,ot=class{constructor(n,e,t){this._args=n;this.paths=e;this.productService=t}get appRoot(){return ze(gt.asFileUri("").fsPath)}get userHome(){return A.file(this.paths.homeDir)}get userDataPath(){return this.paths.userDataDir}get appSettingsHome(){return A.file(H(this.userDataPath,"User"))}get tmpDir(){return A.file(this.paths.tmpDir)}get cacheHome(){return A.file(this.userDataPath)}get stateResource(){return be(this.appSettingsHome,"globalStorage","storage.json")}get userRoamingDataHome(){return this.appSettingsHome.with({scheme:Y.vscodeUserData})}get userDataSyncHome(){return be(this.appSettingsHome,"sync")}get logsHome(){if(!this.args.logsPath){let n=iO(new Date).replace(/-|:|\.\d+Z$/g,"");this.args.logsPath=H(this.userDataPath,"logs",n)}return A.file(this.args.logsPath)}get sync(){return this.args.sync}get workspaceStorageHome(){return be(this.appSettingsHome,"workspaceStorage")}get localHistoryHome(){return be(this.appSettingsHome,"History")}get keyboardLayoutResource(){return be(this.userRoamingDataHome,"keyboardLayout.json")}get argvResource(){let n=En.VSCODE_PORTABLE;return n?A.file(H(n,"argv.json")):be(this.userHome,this.productService.dataFolderName,"argv.json")}get isExtensionDevelopment(){return!!this.args.extensionDevelopmentPath}get untitledWorkspacesHome(){return A.file(H(this.userDataPath,"Workspaces"))}get builtinWorkbenchModesHome(){return be(A.file(this.appRoot),"resources","workbenchModes")}get builtinExtensionsPath(){let n=this.args["builtin-extensions-dir"];return n?Nt(n):kt(H(gt.asFileUri("").fsPath,"..","extensions"))}get extensionsDownloadLocation(){let n=this.args["extensions-download-dir"];return n?A.file(Nt(n)):A.file(H(this.userDataPath,"CachedExtensionVSIXs"))}get extensionsPath(){let n=this.args["extensions-dir"];if(n)return Nt(n);let e=En.VSCODE_EXTENSIONS;if(e)return e;let t=En.VSCODE_PORTABLE;return t?H(t,"extensions"):be(this.userHome,this.productService.dataFolderName,"extensions").fsPath}get extensionDevelopmentLocationURI(){let n=this.args.extensionDevelopmentPath;if(Array.isArray(n))return n.map(e=>/^[^:/?#]+?:\/\//.test(e)?A.parse(e):A.file(kt(e)))}get extensionDevelopmentKind(){return this.args.extensionDevelopmentKind?.map(n=>n==="ui"||n==="workspace"||n==="web"?n:"workspace")}get extensionTestsLocationURI(){let n=this.args.extensionTestsPath;if(n)return/^[^:/?#]+?:\/\//.test(n)?A.parse(n):A.file(kt(n))}get disableExtensions(){if(this.args["disable-extensions"])return!0;let n=this.args["disable-extension"];if(n){if(typeof n=="string")return[n];if(Array.isArray(n)&&n.length>0)return n}return!1}get debugExtensionHost(){return l9(this.args,this.isBuilt)}get debugRenderer(){return!!this.args.debugRenderer}get isBuilt(){return!En.VSCODE_DEV}get verbose(){return!!this.args.verbose}get logLevel(){return this.args.log?.find(n=>!sO.test(n))}get extensionLogLevel(){let n=[];for(let e of this.args.log||[]){let t=sO.exec(e);t?.[1]&&t[2]&&n.push([t[1],t[2]])}return n.length?n:void 0}get serviceMachineIdResource(){return be(A.file(this.userDataPath),"machineid")}get crashReporterId(){return this.args["crash-reporter-id"]}get crashReporterDirectory(){return this.args["crash-reporter-directory"]}get disableTelemetry(){return!!this.args["disable-telemetry"]}get disableExperiments(){return!!this.args["disable-experiments"]}get disableWorkspaceTrust(){return!!this.args["disable-workspace-trust"]}get useInMemorySecretStorage(){return!!this.args["use-inmemory-secretstorage"]}get policyFile(){if(this.args["__enable-file-policy"]){let n=En.VSCODE_PORTABLE;return n?A.file(H(n,"policy.json")):be(this.userHome,this.productService.dataFolderName,"policy.json")}}get agentSessionsWorkspace(){return be(this.appSettingsHome,"agent-sessions.code-workspace")}get editSessionId(){return this.args.editSessionId}get exportPolicyData(){return this.args["export-policy-data"]}get continueOn(){return this.args.continueOn}set continueOn(n){this.args.continueOn=n}get args(){return this._args}};D([ye],ot.prototype,"appRoot",1),D([ye],ot.prototype,"userHome",1),D([ye],ot.prototype,"userDataPath",1),D([ye],ot.prototype,"appSettingsHome",1),D([ye],ot.prototype,"tmpDir",1),D([ye],ot.prototype,"cacheHome",1),D([ye],ot.prototype,"stateResource",1),D([ye],ot.prototype,"userRoamingDataHome",1),D([ye],ot.prototype,"userDataSyncHome",1),D([ye],ot.prototype,"sync",1),D([ye],ot.prototype,"workspaceStorageHome",1),D([ye],ot.prototype,"localHistoryHome",1),D([ye],ot.prototype,"keyboardLayoutResource",1),D([ye],ot.prototype,"argvResource",1),D([ye],ot.prototype,"isExtensionDevelopment",1),D([ye],ot.prototype,"untitledWorkspacesHome",1),D([ye],ot.prototype,"builtinWorkbenchModesHome",1),D([ye],ot.prototype,"builtinExtensionsPath",1),D([ye],ot.prototype,"extensionsDownloadLocation",1),D([ye],ot.prototype,"extensionsPath",1),D([ye],ot.prototype,"extensionDevelopmentLocationURI",1),D([ye],ot.prototype,"extensionDevelopmentKind",1),D([ye],ot.prototype,"extensionTestsLocationURI",1),D([ye],ot.prototype,"debugExtensionHost",1),D([ye],ot.prototype,"logLevel",1),D([ye],ot.prototype,"extensionLogLevel",1),D([ye],ot.prototype,"serviceMachineIdResource",1),D([ye],ot.prototype,"disableTelemetry",1),D([ye],ot.prototype,"disableExperiments",1),D([ye],ot.prototype,"disableWorkspaceTrust",1),D([ye],ot.prototype,"useInMemorySecretStorage",1),D([ye],ot.prototype,"policyFile",1),D([ye],ot.prototype,"agentSessionsWorkspace",1)});import{homedir as c9,tmpdir as d9}from"os";function lO(r,n){return Ph(r["inspect-ptyhost"],r["inspect-brk-ptyhost"],5877,n,r.extensionEnvironment)}function cO(r,n){return Ph(r["inspect-sharedprocess"],r["inspect-brk-sharedprocess"],5879,n,r.extensionEnvironment)}var Ch,Ah=_(()=>{aO();Qy();Ch=class extends ot{constructor(n,e){super(n,{homeDir:c9(),tmpDir:d9(),userDataDir:fg(n,e.nameShort)},e)}}});var Fe,Br,$t=_(()=>{bs();Ne();ce();yc();fr();Ah();de();Fe=mr,Br=class extends Ch{constructor(){super(...arguments);this._snapEnv={}}get backupHome(){return H(this.userDataPath,"Backups")}get mainIPCHandle(){return VD(this.userDataPath,"main",this.productService.version)}get mainLockfile(){return H(this.userDataPath,"code.lock")}get disableUpdates(){return!!this.args["disable-updates"]}get isPortable(){return!!process.env.VSCODE_PORTABLE}get crossOriginIsolated(){return!!this.args["enable-coi"]}get enableRDPDisplayTracking(){return!!this.args["enable-rdp-display-tracking"]}get codeCachePath(){return process.env.VSCODE_CODE_CACHE_PATH||void 0}get useCodeCache(){return!!this.codeCachePath}unsetSnapExportedVariables(){if(fe){for(let e in process.env)if(e.endsWith("_VSCODE_SNAP_ORIG")){let t=e.slice(0,-17);if(this._snapEnv[t])continue;process.env[t]&&(this._snapEnv[t]=process.env[t]),process.env[e]?process.env[t]=process.env[e]:delete process.env[t]}}}restoreSnapExportedVariables(){if(fe)for(let e in this._snapEnv)process.env[e]=this._snapEnv[e],delete this._snapEnv[e]}};D([ye],Br.prototype,"backupHome",1),D([ye],Br.prototype,"mainIPCHandle",1),D([ye],Br.prototype,"mainLockfile",1),D([ye],Br.prototype,"disableUpdates",1),D([ye],Br.prototype,"isPortable",1),D([ye],Br.prototype,"crossOriginIsolated",1),D([ye],Br.prototype,"enableRDPDisplayTracking",1),D([ye],Br.prototype,"codeCachePath",1),D([ye],Br.prototype,"useCodeCache",1)});function I_(...r){switch(r.length){case 1:return v(1876,null,r[0]);case 2:return v(1877,null,r[0],r[1]);case 3:return v(1878,null,r[0],r[1],r[2]);default:return}}var u9,p9,As,dO=_(()=>{vi();rt();We();u9=v(1875,null),p9=v(1874,null),As=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(n){switch(n.type){case 0:return"(";case 1:return")";case 2:return"!";case 3:return n.isTripleEq?"===":"==";case 4:return n.isTripleEq?"!==":"!=";case 5:return"<";case 6:return"<=";case 7:return">=";case 8:return">=";case 9:return"=~";case 10:return n.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 n.lexeme;case 18:return n.lexeme;case 19:return n.lexeme;case 20:return"EOF";default:throw xg(`unhandled token type: ${JSON.stringify(n)}; have you forgotten to add a case?`)}}static{this._regexFlags=new Set(["i","g","s","m","y","u"].map(n=>n.charCodeAt(0)))}static{this._keywords=new Map([["not",14],["in",13],["false",12],["true",11]])}get errors(){return this._errors}reset(n){return this._input=n,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(I_("==","=~"));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(I_("&&"));break;case 124:this._match(124)?this._addToken(16):this._error(I_("||"));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(n){return this._isAtEnd()||this._input.charCodeAt(this._current)!==n?!1:(this._current++,!0)}_advance(){return this._input.charCodeAt(this._current++)}_peek(){return this._isAtEnd()?0:this._input.charCodeAt(this._current)}_addToken(n){this._tokens.push({type:n,offset:this._start})}_error(n){let e=this._start,t=this._input.substring(this._start,this._current),i={type:19,offset:this._start,lexeme:t};this._errors.push({offset:e,lexeme:t,additionalInfo:n}),this._tokens.push(i)}_string(){this.stringRe.lastIndex=this._start;let n=this.stringRe.exec(this._input);if(n){this._current=this._start+n[0].length;let e=this._input.substring(this._start,this._current),t=r._keywords.get(e);t?this._addToken(t):this._tokens.push({type:17,lexeme:e,offset:this._start})}}_quotedString(){for(;this._peek()!==39&&!this._isAtEnd();)this._advance();if(this._isAtEnd()){this._error(u9);return}this._advance(),this._tokens.push({type:18,lexeme:this._input.substring(this._start+1,this._current-1),offset:this._start+1})}_regex(){let n=this._current,e=!1,t=!1;for(;;){if(n>=this._input.length){this._current=n,this._error(p9);return}let o=this._input.charCodeAt(n);if(e)e=!1;else if(o===47&&!t){n++;break}else o===91?t=!0:o===92?e=!0:o===93&&(t=!1);n++}for(;n<this._input.length&&r._regexFlags.has(this._input.charCodeAt(n));)n++;this._current=n;let i=this._input.substring(this._start,this._current);this._tokens.push({type:10,lexeme:i,offset:this._start})}_isAtEnd(){return this._current>=this._input.length}}});function em(r,n){return r.cmp(n)}function kh(r,n){if(typeof r=="string"){let e=parseFloat(r);isNaN(e)||(r=e)}return typeof r=="string"||typeof r=="number"?n(r):jn.INSTANCE}function mO(r){let n=null;for(let e=0,t=r.length;e<t;e++){let i=r[e].substituteConstants();if(r[e]!==i&&n===null){n=[];for(let o=0;o<e;o++)n[o]=r[o]}n!==null&&(n[e]=i)}return n===null?r:n}function fO(r,n){return r<n?-1:r>n?1:0}function La(r,n,e,t){return r<e?-1:r>e?1:n<t?-1:n>t?1:0}function pO(r){return r.type===9?r.expr:[r]}var bn,m9,f9,g9,h9,I9,uO,v9,E9,y9,S9,v_,Nn,jn,nr,ka,tm,Rh,xh,nm,Na,wc,rm,im,om,sm,E_,Dh,am,Oh,fz,gO=_(()=>{vi();ce();Sn();dO();de();We();rt();bn=new Map;bn.set("false",!1);bn.set("true",!0);bn.set("isMac",$);bn.set("isLinux",fe);bn.set("isWindows",q);bn.set("isWeb",$n);bn.set("isMacNative",$&&!$n);bn.set("isEdge",PR);bn.set("isFirefox",bR);bn.set("isChrome",tS);bn.set("isSafari",TR);m9=Object.prototype.hasOwnProperty,f9={regexParsingWithErrorRecovery:!0},g9=v(1855,null),h9=v(1856,null),I9=v(1858,null),uO=v(1854,null),v9=v(1861,null),E9=v(1862,null),y9=v(1859,null),S9=v(1860,null),v_=class r{constructor(n=f9){this._config=n;this._scanner=new As;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(n){if(n===""){this._parsingErrors.push({message:g9,offset:0,lexeme:"",additionalInfo:h9});return}this._tokens=this._scanner.reset(n).scan(),this._current=0,this._parsingErrors=[];try{let e=this._expr();if(!this._isAtEnd()){let t=this._peek(),i=t.type===17?E9:void 0;throw this._parsingErrors.push({message:v9,offset:t.offset,lexeme:As.getLexeme(t),additionalInfo:i}),r._parseError}return e}catch(e){if(e!==r._parseError)throw e;return}}_expr(){return this._or()}_or(){let n=[this._and()];for(;this._matchOne(16);){let e=this._and();n.push(e)}return n.length===1?n[0]:Nn.or(...n)}_and(){let n=[this._term()];for(;this._matchOne(15);){let e=this._term();n.push(e)}return n.length===1?n[0]:Nn.and(...n)}_term(){if(this._matchOne(2)){let n=this._peek();switch(n.type){case 11:return this._advance(),jn.INSTANCE;case 12:return this._advance(),nr.INSTANCE;case 0:{this._advance();let e=this._expr();return this._consume(1,uO),e?.negate()}case 17:return this._advance(),Na.create(n.lexeme);default:throw this._errExpectedButGot("KEY | true | false | '(' expression ')'",n)}}return this._primary()}_primary(){let n=this._peek();switch(n.type){case 11:return this._advance(),Nn.true();case 12:return this._advance(),Nn.false();case 0:{this._advance();let e=this._expr();return this._consume(1,uO),e}case 17:{let e=n.lexeme;if(this._advance(),this._matchOne(9)){let i=this._peek();if(!this._config.regexParsingWithErrorRecovery){if(this._advance(),i.type!==10)throw this._errExpectedButGot("REGEX",i);let o=i.lexeme,s=o.lastIndexOf("/"),a=s===o.length-1?void 0:this._removeFlagsGY(o.substring(s+1)),l;try{l=new RegExp(o.substring(1,s),a)}catch{throw this._errExpectedButGot("REGEX",i)}return sm.create(e,l)}switch(i.type){case 10:case 19:{let o=[i.lexeme];this._advance();let s=this._peek(),a=0;for(let m=0;m<i.lexeme.length;m++)i.lexeme.charCodeAt(m)===40?a++:i.lexeme.charCodeAt(m)===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 m=0;m<s.lexeme.length;m++)s.lexeme.charCodeAt(m)===40?a++:i.lexeme.charCodeAt(m)===41&&a--}if(a<0)break;o.push(As.getLexeme(s)),this._advance(),s=this._peek()}let l=o.join(""),c=l.lastIndexOf("/"),u=c===l.length-1?void 0:this._removeFlagsGY(l.substring(c+1)),p;try{p=new RegExp(l.substring(1,c),u)}catch{throw this._errExpectedButGot("REGEX",i)}return Nn.regex(e,p)}case 18:{let o=i.lexeme;this._advance();let s=null;if(!gx(o)){let a=o.indexOf("/"),l=o.lastIndexOf("/");if(a!==l&&a>=0){let c=o.slice(a+1,l),u=o[l+1]==="i"?"i":"";try{s=new RegExp(c,u)}catch{throw this._errExpectedButGot("REGEX",i)}}}if(s===null)throw this._errExpectedButGot("REGEX",i);return sm.create(e,s)}default:throw this._errExpectedButGot("REGEX",this._peek())}}if(this._matchOne(14)){this._consume(13,I9);let i=this._value();return Nn.notIn(e,i)}switch(this._peek().type){case 3:{this._advance();let i=this._value();if(this._previous().type===18)return Nn.equals(e,i);switch(i){case"true":return Nn.has(e);case"false":return Nn.not(e);default:return Nn.equals(e,i)}}case 4:{this._advance();let i=this._value();if(this._previous().type===18)return Nn.notEquals(e,i);switch(i){case"true":return Nn.not(e);case"false":return Nn.has(e);default:return Nn.notEquals(e,i)}}case 5:return this._advance(),im.create(e,this._value());case 6:return this._advance(),om.create(e,this._value());case 7:return this._advance(),wc.create(e,this._value());case 8:return this._advance(),rm.create(e,this._value());case 13:return this._advance(),Nn.in(e,this._value());default:return Nn.has(e)}}case 20:throw this._parsingErrors.push({message:y9,offset:n.offset,lexeme:"",additionalInfo:S9}),r._parseError;default:throw this._errExpectedButGot(`true | false | KEY 
	| KEY '=~' REGEX 
	| KEY ('==' | '!=' | '<' | '<=' | '>' | '>=' | 'in' | 'not' 'in') value`,this._peek())}}_value(){let n=this._peek();switch(n.type){case 17:case 18:return this._advance(),n.lexeme;case 11:return this._advance(),"true";case 12:return this._advance(),"false";case 13:return this._advance(),"in";default:return""}}_removeFlagsGY(n){return n.replaceAll(this._flagsGYRe,"")}_previous(){return this._tokens[this._current-1]}_matchOne(n){return this._check(n)?(this._advance(),!0):!1}_advance(){return this._isAtEnd()||this._current++,this._previous()}_consume(n,e){if(this._check(n))return this._advance();throw this._errExpectedButGot(e,this._peek())}_errExpectedButGot(n,e,t){let i=v(1857,null,n,As.getLexeme(e)),o=e.offset,s=As.getLexeme(e);return this._parsingErrors.push({message:i,offset:o,lexeme:s,additionalInfo:t}),r._parseError}_check(n){return this._peek().type===n}_peek(){return this._tokens[this._current]}_isAtEnd(){return this._peek().type===20}},Nn=class{static false(){return jn.INSTANCE}static true(){return nr.INSTANCE}static has(n){return ka.create(n)}static equals(n,e){return tm.create(n,e)}static notEquals(n,e){return nm.create(n,e)}static regex(n,e){return sm.create(n,e)}static in(n,e){return Rh.create(n,e)}static notIn(n,e){return xh.create(n,e)}static not(n){return Na.create(n)}static and(...n){return Dh.create(n,null,!0)}static or(...n){return am.create(n,null,!0)}static greater(n,e){return wc.create(n,e)}static greaterEquals(n,e){return rm.create(n,e)}static smaller(n,e){return im.create(n,e)}static smallerEquals(n,e){return om.create(n,e)}static{this._parser=new v_({regexParsingWithErrorRecovery:!1})}static deserialize(n){return n==null?void 0:this._parser.parse(n)}};jn=class r{constructor(){this.type=0}static{this.INSTANCE=new r}cmp(n){return this.type-n.type}equals(n){return n.type===this.type}substituteConstants(){return this}evaluate(n){return!1}serialize(){return"false"}keys(){return[]}map(n){return this}negate(){return nr.INSTANCE}},nr=class r{constructor(){this.type=1}static{this.INSTANCE=new r}cmp(n){return this.type-n.type}equals(n){return n.type===this.type}substituteConstants(){return this}evaluate(n){return!0}serialize(){return"true"}keys(){return[]}map(n){return this}negate(){return jn.INSTANCE}},ka=class r{constructor(n,e){this.key=n;this.negated=e;this.type=2}static create(n,e=null){let t=bn.get(n);return typeof t=="boolean"?t?nr.INSTANCE:jn.INSTANCE:new r(n,e)}cmp(n){return n.type!==this.type?this.type-n.type:fO(this.key,n.key)}equals(n){return n.type===this.type?this.key===n.key:!1}substituteConstants(){let n=bn.get(this.key);return typeof n=="boolean"?n?nr.INSTANCE:jn.INSTANCE:this}evaluate(n){return!!n.getValue(this.key)}serialize(){return this.key}keys(){return[this.key]}map(n){return n.mapDefined(this.key)}negate(){return this.negated||(this.negated=Na.create(this.key,this)),this.negated}},tm=class r{constructor(n,e,t){this.key=n;this.value=e;this.negated=t;this.type=4}static create(n,e,t=null){if(typeof e=="boolean")return e?ka.create(n,t):Na.create(n,t);let i=bn.get(n);return typeof i=="boolean"?e===(i?"true":"false")?nr.INSTANCE:jn.INSTANCE:new r(n,e,t)}cmp(n){return n.type!==this.type?this.type-n.type:La(this.key,this.value,n.key,n.value)}equals(n){return n.type===this.type?this.key===n.key&&this.value===n.value:!1}substituteConstants(){let n=bn.get(this.key);if(typeof n=="boolean"){let e=n?"true":"false";return this.value===e?nr.INSTANCE:jn.INSTANCE}return this}evaluate(n){return n.getValue(this.key)==this.value}serialize(){return`${this.key} == '${this.value}'`}keys(){return[this.key]}map(n){return n.mapEquals(this.key,this.value)}negate(){return this.negated||(this.negated=nm.create(this.key,this.value,this)),this.negated}},Rh=class r{constructor(n,e){this.key=n;this.valueKey=e;this.type=10;this.negated=null}static create(n,e){return new r(n,e)}cmp(n){return n.type!==this.type?this.type-n.type:La(this.key,this.valueKey,n.key,n.valueKey)}equals(n){return n.type===this.type?this.key===n.key&&this.valueKey===n.valueKey:!1}substituteConstants(){return this}evaluate(n){let e=n.getValue(this.valueKey),t=n.getValue(this.key);if(Array.isArray(e)){if(e.includes(t))return!0;if(q&&typeof t=="string"&&t.startsWith("file:///")){let i=t.toLowerCase();return e.some(o=>typeof o=="string"&&o.toLowerCase()===i)}return!1}if(typeof t=="string"&&typeof e=="object"&&e!==null){if(m9.call(e,t))return!0;if(q&&t.startsWith("file:///")){let i=t.toLowerCase();return Object.keys(e).some(o=>o.toLowerCase()===i)}return!1}return!1}serialize(){return`${this.key} in '${this.valueKey}'`}keys(){return[this.key,this.valueKey]}map(n){return n.mapIn(this.key,this.valueKey)}negate(){return this.negated||(this.negated=xh.create(this.key,this.valueKey)),this.negated}},xh=class r{constructor(n,e){this.key=n;this.valueKey=e;this.type=11;this._negated=Rh.create(n,e)}static create(n,e){return new r(n,e)}cmp(n){return n.type!==this.type?this.type-n.type:this._negated.cmp(n._negated)}equals(n){return n.type===this.type?this._negated.equals(n._negated):!1}substituteConstants(){return this}evaluate(n){return!this._negated.evaluate(n)}serialize(){return`${this.key} not in '${this.valueKey}'`}keys(){return this._negated.keys()}map(n){return n.mapNotIn(this.key,this.valueKey)}negate(){return this._negated}},nm=class r{constructor(n,e,t){this.key=n;this.value=e;this.negated=t;this.type=5}static create(n,e,t=null){if(typeof e=="boolean")return e?Na.create(n,t):ka.create(n,t);let i=bn.get(n);return typeof i=="boolean"?e===(i?"true":"false")?jn.INSTANCE:nr.INSTANCE:new r(n,e,t)}cmp(n){return n.type!==this.type?this.type-n.type:La(this.key,this.value,n.key,n.value)}equals(n){return n.type===this.type?this.key===n.key&&this.value===n.value:!1}substituteConstants(){let n=bn.get(this.key);if(typeof n=="boolean"){let e=n?"true":"false";return this.value===e?jn.INSTANCE:nr.INSTANCE}return this}evaluate(n){return n.getValue(this.key)!=this.value}serialize(){return`${this.key} != '${this.value}'`}keys(){return[this.key]}map(n){return n.mapNotEquals(this.key,this.value)}negate(){return this.negated||(this.negated=tm.create(this.key,this.value,this)),this.negated}},Na=class r{constructor(n,e){this.key=n;this.negated=e;this.type=3}static create(n,e=null){let t=bn.get(n);return typeof t=="boolean"?t?jn.INSTANCE:nr.INSTANCE:new r(n,e)}cmp(n){return n.type!==this.type?this.type-n.type:fO(this.key,n.key)}equals(n){return n.type===this.type?this.key===n.key:!1}substituteConstants(){let n=bn.get(this.key);return typeof n=="boolean"?n?jn.INSTANCE:nr.INSTANCE:this}evaluate(n){return!n.getValue(this.key)}serialize(){return`!${this.key}`}keys(){return[this.key]}map(n){return n.mapNot(this.key)}negate(){return this.negated||(this.negated=ka.create(this.key,this)),this.negated}};wc=class r{constructor(n,e,t){this.key=n;this.value=e;this.negated=t;this.type=12}static create(n,e,t=null){return kh(e,i=>new r(n,i,t))}cmp(n){return n.type!==this.type?this.type-n.type:La(this.key,this.value,n.key,n.value)}equals(n){return n.type===this.type?this.key===n.key&&this.value===n.value:!1}substituteConstants(){return this}evaluate(n){return typeof this.value=="string"?!1:parseFloat(n.getValue(this.key))>this.value}serialize(){return`${this.key} > ${this.value}`}keys(){return[this.key]}map(n){return n.mapGreater(this.key,this.value)}negate(){return this.negated||(this.negated=om.create(this.key,this.value,this)),this.negated}},rm=class r{constructor(n,e,t){this.key=n;this.value=e;this.negated=t;this.type=13}static create(n,e,t=null){return kh(e,i=>new r(n,i,t))}cmp(n){return n.type!==this.type?this.type-n.type:La(this.key,this.value,n.key,n.value)}equals(n){return n.type===this.type?this.key===n.key&&this.value===n.value:!1}substituteConstants(){return this}evaluate(n){return typeof this.value=="string"?!1:parseFloat(n.getValue(this.key))>=this.value}serialize(){return`${this.key} >= ${this.value}`}keys(){return[this.key]}map(n){return n.mapGreaterEquals(this.key,this.value)}negate(){return this.negated||(this.negated=im.create(this.key,this.value,this)),this.negated}},im=class r{constructor(n,e,t){this.key=n;this.value=e;this.negated=t;this.type=14}static create(n,e,t=null){return kh(e,i=>new r(n,i,t))}cmp(n){return n.type!==this.type?this.type-n.type:La(this.key,this.value,n.key,n.value)}equals(n){return n.type===this.type?this.key===n.key&&this.value===n.value:!1}substituteConstants(){return this}evaluate(n){return typeof this.value=="string"?!1:parseFloat(n.getValue(this.key))<this.value}serialize(){return`${this.key} < ${this.value}`}keys(){return[this.key]}map(n){return n.mapSmaller(this.key,this.value)}negate(){return this.negated||(this.negated=rm.create(this.key,this.value,this)),this.negated}},om=class r{constructor(n,e,t){this.key=n;this.value=e;this.negated=t;this.type=15}static create(n,e,t=null){return kh(e,i=>new r(n,i,t))}cmp(n){return n.type!==this.type?this.type-n.type:La(this.key,this.value,n.key,n.value)}equals(n){return n.type===this.type?this.key===n.key&&this.value===n.value:!1}substituteConstants(){return this}evaluate(n){return typeof this.value=="string"?!1:parseFloat(n.getValue(this.key))<=this.value}serialize(){return`${this.key} <= ${this.value}`}keys(){return[this.key]}map(n){return n.mapSmallerEquals(this.key,this.value)}negate(){return this.negated||(this.negated=wc.create(this.key,this.value,this)),this.negated}},sm=class r{constructor(n,e){this.key=n;this.regexp=e;this.type=7;this.negated=null}static create(n,e){return new r(n,e)}cmp(n){if(n.type!==this.type)return this.type-n.type;if(this.key<n.key)return-1;if(this.key>n.key)return 1;let e=this.regexp?this.regexp.source:"",t=n.regexp?n.regexp.source:"";return e<t?-1:e>t?1:0}equals(n){if(n.type===this.type){let e=this.regexp?this.regexp.source:"",t=n.regexp?n.regexp.source:"";return this.key===n.key&&e===t}return!1}substituteConstants(){return this}evaluate(n){let e=n.getValue(this.key);return this.regexp?this.regexp.test(e):!1}serialize(){let n=this.regexp?`/${this.regexp.source}/${this.regexp.flags}`:"/invalid/";return`${this.key} =~ ${n}`}keys(){return[this.key]}map(n){return n.mapRegex(this.key,this.regexp)}negate(){return this.negated||(this.negated=E_.create(this)),this.negated}},E_=class r{constructor(n){this._actual=n;this.type=8}static create(n){return new r(n)}cmp(n){return n.type!==this.type?this.type-n.type:this._actual.cmp(n._actual)}equals(n){return n.type===this.type?this._actual.equals(n._actual):!1}substituteConstants(){return this}evaluate(n){return!this._actual.evaluate(n)}serialize(){return`!(${this._actual.serialize()})`}keys(){return this._actual.keys()}map(n){return new r(this._actual.map(n))}negate(){return this._actual}};Dh=class r{constructor(n,e){this.expr=n;this.negated=e;this.type=6}static create(n,e,t){return r._normalizeArr(n,e,t)}cmp(n){if(n.type!==this.type)return this.type-n.type;if(this.expr.length<n.expr.length)return-1;if(this.expr.length>n.expr.length)return 1;for(let e=0,t=this.expr.length;e<t;e++){let i=em(this.expr[e],n.expr[e]);if(i!==0)return i}return 0}equals(n){if(n.type===this.type){if(this.expr.length!==n.expr.length)return!1;for(let e=0,t=this.expr.length;e<t;e++)if(!this.expr[e].equals(n.expr[e]))return!1;return!0}return!1}substituteConstants(){let n=mO(this.expr);return n===this.expr?this:r.create(n,this.negated,!1)}evaluate(n){for(let e=0,t=this.expr.length;e<t;e++)if(!this.expr[e].evaluate(n))return!1;return!0}static _normalizeArr(n,e,t){let i=[],o=!1;for(let s of n)if(s){if(s.type===1){o=!0;continue}if(s.type===0)return jn.INSTANCE;if(s.type===6){i.push(...s.expr);continue}i.push(s)}if(i.length===0&&o)return nr.INSTANCE;if(i.length!==0){if(i.length===1)return i[0];i.sort(em);for(let s=1;s<i.length;s++)i[s-1].equals(i[s])&&(i.splice(s,1),s--);if(i.length===1)return i[0];for(;i.length>1;){let s=i[i.length-1];if(s.type!==9)break;i.pop();let a=i.pop(),l=i.length===0,c=am.create(s.expr.map(u=>r.create([u,a],null,t)),null,l);c&&(i.push(c),i.sort(em))}if(i.length===1)return i[0];if(t){for(let s=0;s<i.length;s++)for(let a=s+1;a<i.length;a++)if(i[s].negate().equals(i[a]))return jn.INSTANCE;if(i.length===1)return i[0]}return new r(i,e)}}serialize(){return this.expr.map(n=>n.serialize()).join(" && ")}keys(){let n=[];for(let e of this.expr)n.push(...e.keys());return n}map(n){return new r(this.expr.map(e=>e.map(n)),null)}negate(){if(!this.negated){let n=[];for(let e of this.expr)n.push(e.negate());this.negated=am.create(n,this,!0)}return this.negated}},am=class r{constructor(n,e){this.expr=n;this.negated=e;this.type=9}static create(n,e,t){return r._normalizeArr(n,e,t)}cmp(n){if(n.type!==this.type)return this.type-n.type;if(this.expr.length<n.expr.length)return-1;if(this.expr.length>n.expr.length)return 1;for(let e=0,t=this.expr.length;e<t;e++){let i=em(this.expr[e],n.expr[e]);if(i!==0)return i}return 0}equals(n){if(n.type===this.type){if(this.expr.length!==n.expr.length)return!1;for(let e=0,t=this.expr.length;e<t;e++)if(!this.expr[e].equals(n.expr[e]))return!1;return!0}return!1}substituteConstants(){let n=mO(this.expr);return n===this.expr?this:r.create(n,this.negated,!1)}evaluate(n){for(let e=0,t=this.expr.length;e<t;e++)if(this.expr[e].evaluate(n))return!0;return!1}static _normalizeArr(n,e,t){let i=[],o=!1;if(n){for(let s=0,a=n.length;s<a;s++){let l=n[s];if(l){if(l.type===0){o=!0;continue}if(l.type===1)return nr.INSTANCE;if(l.type===9){i=i.concat(l.expr);continue}i.push(l)}}if(i.length===0&&o)return jn.INSTANCE;i.sort(em)}if(i.length!==0){if(i.length===1)return i[0];for(let s=1;s<i.length;s++)i[s-1].equals(i[s])&&(i.splice(s,1),s--);if(i.length===1)return i[0];if(t){for(let s=0;s<i.length;s++)for(let a=s+1;a<i.length;a++)if(i[s].negate().equals(i[a]))return nr.INSTANCE;if(i.length===1)return i[0]}return new r(i,e)}}serialize(){return this.expr.map(n=>n.serialize()).join(" || ")}keys(){let n=[];for(let e of this.expr)n.push(...e.keys());return n}map(n){return new r(this.expr.map(e=>e.map(n)),null)}negate(){if(!this.negated){let n=[];for(let e of this.expr)n.push(e.negate());for(;n.length>1;){let e=n.shift(),t=n.shift(),i=[];for(let o of pO(e))for(let s of pO(t))i.push(Dh.create([o,s],null,!1));n.unshift(r.create(i,null,!1))}this.negated=r.create(n,this,!0)}return this.negated}},Oh=class r extends ka{static{this._info=[]}static all(){return r._info.values()}constructor(n,e,t){super(n,null),this._defaultValue=e,typeof t=="object"?r._info.push({...t,key:n}):t!==!0&&r._info.push({key:n,description:t,type:e!=null?typeof e:void 0})}bindTo(n){return n.createKey(this.key,this._defaultValue)}getValue(n){return n.getContextKeyValue(this.key)}toNegated(){return this.negate()}isEqualTo(n){return tm.create(this.key,n)}notEqualsTo(n){return nm.create(this.key,n)}greater(n){return wc.create(this.key,n)}},fz=V("contextKeyService")});function to(){return new Date().toISOString()}function dm(r){return Ii(r)}function _9(r,n){return r!==0&&r<=n}function pm(r,n,e){switch(n){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 ${n}`)}}function bc(r,n=!1){let e="";for(let t=0;t<r.length;t++){let i=r[t];if(i instanceof Error&&(i=Kn(i,n)),typeof i=="object")try{i=JSON.stringify(i)}catch{}e+=(t>0?" ":"")+i}return e}function hO(r){if(r.verbose)return 1;if(typeof r.logLevel=="string"){let n=b9(r.logLevel.toLowerCase());if(n!==void 0)return n}return um}function w9(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"}}function b9(r){switch(r){case"trace":return 1;case"debug":return 2;case"info":return 3;case"warn":return 4;case"error":return 5;case"critical":return 5;case"off":return 0}}var z,Rs,um,lm,Ma,Nh,Lh,cm,y_,Mh,xz,me=_(()=>{We();_s();ae();eo();te();er();ce();Ut();qe();Ie();gO();de();z=V("logService"),Rs=V("loggerService");um=3;lm=class extends M{constructor(){super(...arguments);this.level=um;this._onDidChangeLogLevel=this._register(new C)}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 _9(this.level,e)}canLog(e){return this._store.isDisposed?!1:this.checkLogLevel(e)}},Ma=class extends lm{constructor(e){super();this.logAlways=e}checkLogLevel(e){return this.logAlways||super.checkLogLevel(e)}trace(e,...t){this.canLog(1)&&this.log(1,bc([e,...t],!0))}debug(e,...t){this.canLog(2)&&this.log(2,bc([e,...t]))}info(e,...t){this.canLog(3)&&this.log(3,bc([e,...t]))}warn(e,...t){this.canLog(4)&&this.log(4,bc([e,...t]))}error(e,...t){if(this.canLog(5))if(e instanceof Error){let i=Array.prototype.slice.call(arguments);i[0]=e.stack,this.log(5,bc(i))}else this.log(5,bc([e,...t]))}flush(){}},Nh=class extends lm{constructor(n=um){super(),this.setLevel(n),this.useColors=!q}trace(n,...e){this.canLog(1)&&(this.useColors?console.log(`\x1B[90m[main ${to()}]\x1B[0m`,n,...e):console.log(`[main ${to()}]`,n,...e))}debug(n,...e){this.canLog(2)&&(this.useColors?console.log(`\x1B[90m[main ${to()}]\x1B[0m`,n,...e):console.log(`[main ${to()}]`,n,...e))}info(n,...e){this.canLog(3)&&(this.useColors?console.log(`\x1B[90m[main ${to()}]\x1B[0m`,n,...e):console.log(`[main ${to()}]`,n,...e))}warn(n,...e){this.canLog(4)&&(this.useColors?console.warn(`\x1B[93m[main ${to()}]\x1B[0m`,n,...e):console.warn(`[main ${to()}]`,n,...e))}error(n,...e){this.canLog(5)&&(this.useColors?console.error(`\x1B[91m[main ${to()}]\x1B[0m`,n,...e):console.error(`[main ${to()}]`,n,...e))}flush(){}},Lh=class extends lm{constructor(e){super();this.loggers=e;e.length&&this.setLevel(e[0].getLevel())}setLevel(e){for(let t of this.loggers)t.setLevel(e);super.setLevel(e)}trace(e,...t){for(let i of this.loggers)i.trace(e,...t)}debug(e,...t){for(let i of this.loggers)i.debug(e,...t)}info(e,...t){for(let i of this.loggers)i.info(e,...t)}warn(e,...t){for(let i of this.loggers)i.warn(e,...t)}error(e,...t){for(let i of this.loggers)i.error(e,...t)}flush(){for(let e of this.loggers)e.flush()}dispose(){for(let e of this.loggers)e.dispose();super.dispose()}},cm=class extends M{constructor(e,t,i){super();this.logLevel=e;this.logsHome=t;this._loggers=new Lt;this._onDidChangeLoggers=this._register(new C);this.onDidChangeLoggers=this._onDidChangeLoggers.event;this._onDidChangeLogLevel=this._register(new C);this.onDidChangeLogLevel=this._onDidChangeLogLevel.event;this._onDidChangeVisibility=this._register(new C);this.onDidChangeVisibility=this._onDidChangeVisibility.event;if(i)for(let o of i)this._loggers.set(o.resource,{logger:void 0,info:o})}getLoggerEntry(e){return Ye(e)?[...this._loggers.values()].find(t=>t.info.id===e):this._loggers.get(e)}getLogger(e){return this.getLoggerEntry(e)?.logger}createLogger(e,t){let i=this.toResource(e),o=Ye(e)?e:t?.id??wn(i.toString()).toString(16),s=this._loggers.get(i)?.logger,a=t?.logLevel==="always"?1:t?.logLevel;s||(s=this.doCreateLogger(i,a??this.getLogLevel(i)??this.logLevel,{...t,id:o}));let l={logger:s,info:{resource:i,id:o,logLevel:a,name:t?.name,hidden:t?.hidden,group:t?.group,extensionId:t?.extensionId,when:t?.when}};return this.registerLogger(l.info),this._loggers.set(i,l),s}toResource(e){return Ye(e)?be(this.logsHome,`${e.replace(/[\\/:\*\?"<>\|]/g,"")}.log`):e}setLogLevel(e,t){if(A.isUri(e)){let i=e,o=t,s=this._loggers.get(i);s&&o!==s.info.logLevel&&(s.info.logLevel=o===this.logLevel?void 0:o,s.logger?.setLevel(o),this._loggers.set(s.info.resource,s),this._onDidChangeLogLevel.fire([i,o]))}else{this.logLevel=e;for(let[i,o]of this._loggers.entries())this._loggers.get(i)?.info.logLevel===void 0&&o.logger?.setLevel(this.logLevel);this._onDidChangeLogLevel.fire(this.logLevel)}}setVisibility(e,t){let i=this.getLoggerEntry(e);i&&t!==!i.info.hidden&&(i.info.hidden=!t,this._loggers.set(i.info.resource,i),this._onDidChangeVisibility.fire([i.info.resource,t]))}getLogLevel(e){let t;return e&&(t=this._loggers.get(e)?.info.logLevel),t??this.logLevel}registerLogger(e){let t=this._loggers.get(e.resource);t?t.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 t=this.toResource(e),i=this._loggers.get(t);i&&(i.logger&&i.logger.dispose(),this._loggers.delete(t),this._onDidChangeLoggers.fire({added:[],removed:[i.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()}},y_=class{constructor(){this.onDidChangeLogLevel=new C().event}setLevel(n){}getLevel(){return 3}trace(n,...e){}debug(n,...e){}info(n,...e){}warn(n,...e){}error(n,...e){}critical(n,...e){}dispose(){}flush(){}},Mh=class extends y_{};xz=new Oh("logLevel",w9(3))});var xs,Tc,S_=_(()=>{Ce();ae();te();Bp();qe();xs=class r extends M{constructor(e,t=Object.create(null)){super();this.database=e;this.options=t;this._onDidChangeStorage=this._register(new _a);this.onDidChangeStorage=this._onDidChangeStorage.event;this.state=0;this.cache=new Map;this.flushDelayer=this._register(new Jn(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((t,i)=>this.acceptExternal(i,t)),e.deleted?.forEach(t=>this.acceptExternal(t,void 0))}finally{this._onDidChangeStorage.resume()}}acceptExternal(e,t){if(this.state===2)return;let i=!1;Qt(t)?i=this.cache.delete(e):this.cache.get(e)!==t&&(this.cache.set(e,t),i=!0),i&&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,t){let i=this.cache.get(e);return Qt(i)?t:i}getBoolean(e,t){let i=this.get(e);return Qt(i)?t:i==="true"}getNumber(e,t){let i=this.get(e);return Qt(i)?t:parseInt(i,10)}getObject(e,t){let i=this.get(e);return Qt(i)?t:LD(i)}async set(e,t,i=!1){if(this.state===2)return;if(Qt(t))return this.delete(e,i);let o=ut(t)||Array.isArray(t)?ND(t):String(t);if(this.cache.get(e)!==o)return this.cache.set(e,o),this.pendingInserts.set(e,o),this.pendingDeletes.delete(e),this._onDidChangeStorage.fire({key:e,external:i}),this.doFlush()}async delete(e,t=!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:t}),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}},Tc=class{constructor(){this.onDidChangeItemsExternal=x.None;this.items=new Map}async getItems(){return this.items}async updateItems(n){n.insert?.forEach((e,t)=>this.items.set(t,e)),n.delete?.forEach(e=>this.items.delete(e))}async optimize(){}async close(){}}});var __,w_,Uh,b_,Bo,Pc,gr,Ua=_(()=>{dn();jl();vi();Sn();__=class{constructor(){this._value="";this._pos=0}reset(n){return this._value=n,this._pos=0,this}next(){return this._pos+=1,this}hasNext(){return this._pos<this._value.length-1}cmp(n){let e=n.charCodeAt(0),t=this._value.charCodeAt(this._pos);return e-t}value(){return this._value[this._pos]}},w_=class{constructor(n=!0){this._caseSensitive=n}reset(n){return this._value=n,this._from=0,this._to=0,this.next()}hasNext(){return this._to<this._value.length}next(){this._from=this._to;let n=!0;for(;this._to<this._value.length;this._to++)if(this._value.charCodeAt(this._to)===46)if(n)this._from++;else break;else n=!1;return this}cmp(n){return this._caseSensitive?Wg(n,this._value,0,n.length,this._from,this._to):wa(n,this._value,0,n.length,this._from,this._to)}value(){return this._value.substring(this._from,this._to)}},Uh=class{constructor(n=!0,e=!0){this._splitOnBackslash=n;this._caseSensitive=e}reset(n){this._from=0,this._to=0,this._value=n,this._valueLen=n.length;for(let e=n.length-1;e>=0;e--,this._valueLen--){let t=this._value.charCodeAt(e);if(!(t===47||this._splitOnBackslash&&t===92))break}return this.next()}hasNext(){return this._to<this._valueLen}next(){this._from=this._to;let n=!0;for(;this._to<this._valueLen;this._to++){let e=this._value.charCodeAt(this._to);if(e===47||this._splitOnBackslash&&e===92)if(n)this._from++;else break;else n=!1}return this}cmp(n){return this._caseSensitive?Wg(n,this._value,0,n.length,this._from,this._to):wa(n,this._value,0,n.length,this._from,this._to)}value(){return this._value.substring(this._from,this._to)}},b_=class{constructor(n,e){this._ignorePathCasing=n;this._ignoreQueryAndFragment=e;this._states=[];this._stateIdx=0}reset(n){return this._value=n,this._states=[],this._value.scheme&&this._states.push(1),this._value.authority&&this._states.push(2),this._value.path&&(this._pathIterator=new Uh(!1,!this._ignorePathCasing(n)),this._pathIterator.reset(n.path),this._pathIterator.value()&&this._states.push(3)),this._ignoreQueryAndFragment(n)||(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(n){if(this._states[this._stateIdx]===1)return Sp(n,this._value.scheme);if(this._states[this._stateIdx]===2)return Sp(n,this._value.authority);if(this._states[this._stateIdx]===3)return this._pathIterator.cmp(n);if(this._states[this._stateIdx]===4)return yp(n,this._value.query);if(this._states[this._stateIdx]===5)return yp(n,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}},Bo=class r{static{this.Val=Symbol("undefined_placeholder")}static wrap(n){return n===void 0?r.Val:n}static unwrap(n){return n===r.Val?void 0:n}},Pc=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 n=this.right;return this.right=n.left,n.left=this,this.updateHeight(),n.updateHeight(),n}rotateRight(){let n=this.left;return this.left=n.right,n.right=this,this.updateHeight(),n.updateHeight(),n}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}},gr=class r{static forUris(n=()=>!1,e=()=>!1){return new r(new b_(n,e))}static forPaths(n=!1){return new r(new Uh(void 0,!n))}static forStrings(){return new r(new __)}static forConfigKeys(){return new r(new w_)}constructor(n){this._iter=n}clear(){this._root=void 0}fill(n,e){if(e){let t=e.slice(0);lS(t);for(let i of t)this.set(i,n)}else{let t=n.slice(0);lS(t);for(let i of t)this.set(i[0],i[1])}}set(n,e){let t=this._iter.reset(n),i;this._root||(this._root=new Pc,this._root.segment=t.value());let o=[];for(i=this._root;;){let a=t.cmp(i.segment);if(a>0)i.left||(i.left=new Pc,i.left.segment=t.value()),o.push([-1,i]),i=i.left;else if(a<0)i.right||(i.right=new Pc,i.right.segment=t.value()),o.push([1,i]),i=i.right;else if(t.hasNext())t.next(),i.mid||(i.mid=new Pc,i.mid.segment=t.value()),o.push([0,i]),i=i.mid;else break}let s=Bo.unwrap(i.value);i.value=Bo.wrap(e),i.key=n;for(let a=o.length-1;a>=0;a--){let l=o[a][1];l.updateHeight();let c=l.balanceFactor();if(c<-1||c>1){let u=o[a][0],p=o[a+1][0];if(u===1&&p===1)o[a][1]=l.rotateLeft();else if(u===-1&&p===-1)o[a][1]=l.rotateRight();else if(u===1&&p===-1)l.right=o[a+1][1]=o[a+1][1].rotateRight(),o[a][1]=l.rotateLeft();else if(u===-1&&p===1)l.left=o[a+1][1]=o[a+1][1].rotateLeft(),o[a][1]=l.rotateRight();else throw new Error;if(a>0)switch(o[a-1][0]){case-1:o[a-1][1].left=o[a][1];break;case 1:o[a-1][1].right=o[a][1];break;case 0:o[a-1][1].mid=o[a][1];break}else this._root=o[0][1]}}return s}get(n){return Bo.unwrap(this._getNode(n)?.value)}_getNode(n){let e=this._iter.reset(n),t=this._root;for(;t;){let i=e.cmp(t.segment);if(i>0)t=t.left;else if(i<0)t=t.right;else if(e.hasNext())e.next(),t=t.mid;else break}return t}has(n){let e=this._getNode(n);return!(e?.value===void 0&&e?.mid===void 0)}delete(n){return this._delete(n,!1)}deleteSuperstr(n){return this._delete(n,!0)}_delete(n,e){let t=this._iter.reset(n),i=[],o=this._root;for(;o;){let s=t.cmp(o.segment);if(s>0)i.push([-1,o]),o=o.left;else if(s<0)i.push([1,o]),o=o.right;else if(t.hasNext())t.next(),i.push([0,o]),o=o.mid;else break}if(o){if(e?(o.left=void 0,o.mid=void 0,o.right=void 0,o.height=1):(o.key=void 0,o.value=void 0),!o.mid&&!o.value)if(o.left&&o.right){let s=[[1,o]],a=this._min(o.right,s);if(a.key){o.key=a.key,o.value=a.value,o.segment=a.segment;let l=a.right;if(s.length>1){let[u,p]=s[s.length-1];switch(u){case-1:p.left=l;break;case 0:Kl(!1);case 1:Kl(!1)}}else o.right=l;let c=this._balanceByStack(s);if(i.length>0){let[u,p]=i[i.length-1];switch(u){case-1:p.left=c;break;case 0:p.mid=c;break;case 1:p.right=c;break}}else this._root=c}}else{let s=o.left??o.right;if(i.length>0){let[a,l]=i[i.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(i)??this._root}}_min(n,e){for(;n.left;)e.push([-1,n]),n=n.left;return n}_balanceByStack(n){for(let e=n.length-1;e>=0;e--){let t=n[e][1];t.updateHeight();let i=t.balanceFactor();if(i>1?(t.right.balanceFactor()>=0||(t.right=t.right.rotateRight()),n[e][1]=t.rotateLeft()):i<-1&&(t.left.balanceFactor()<=0||(t.left=t.left.rotateLeft()),n[e][1]=t.rotateRight()),e>0)switch(n[e-1][0]){case-1:n[e-1][1].left=n[e][1];break;case 1:n[e-1][1].right=n[e][1];break;case 0:n[e-1][1].mid=n[e][1];break}else return n[0][1]}}findSubstr(n){let e=this._iter.reset(n),t=this._root,i;for(;t;){let o=e.cmp(t.segment);if(o>0)t=t.left;else if(o<0)t=t.right;else if(e.hasNext())e.next(),i=Bo.unwrap(t.value)||i,t=t.mid;else break}return t&&Bo.unwrap(t.value)||i}findSuperstr(n){return this._findSuperstrOrElement(n,!1)}_findSuperstrOrElement(n,e){let t=this._iter.reset(n),i=this._root;for(;i;){let o=t.cmp(i.segment);if(o>0)i=i.left;else if(o<0)i=i.right;else if(t.hasNext())t.next(),i=i.mid;else return i.mid?this._entries(i.mid):e?Bo.unwrap(i.value):void 0}}hasElementOrSubtree(n){return this._findSuperstrOrElement(n,!0)!==void 0}forEach(n){for(let[e,t]of this)n(t,e)}*[Symbol.iterator](){yield*this._entries(this._root)}_entries(n){let e=[];return this._dfsEntries(n,e),e[Symbol.iterator]()}_dfsEntries(n,e){n&&(n.left&&this._dfsEntries(n.left,e),n.value!==void 0&&e.push([n.key,Bo.unwrap(n.value)]),n.mid&&this._dfsEntries(n.mid,e),n.right&&this._dfsEntries(n.right,e))}_isBalanced(){let n=e=>{if(!e)return!0;let t=e.balanceFactor();return t<-1||t>1?!1:n(e.left)&&n(e.right)};return n(this._root)}}});function Fa(r){return r.create===!0}function Vr(r){return!!(r.capabilities&2)}function IO(r){return!!(r.capabilities&524288)}function mm(r){return!!(r.capabilities&8)}function Wh(r){return!!(r.capabilities&131072)}function vO(r){return!!(r.capabilities&262144)}function Go(r){return!!(r.capabilities&4)}function Bh(r){return!!(r.capabilities&16)}function Vh(r){return Vr(r)?!!(r.capabilities&16384):!1}function T_(r){return Vr(r)?!!(r.capabilities&32768):!1}function EO(r){return!!(r.capabilities&65536)}function hr(r,n){return Cc.create(r,n)}function Ho(r){return r||hr(v(2068,null),"Unknown")}function T9(r,n){return r.name=n?`${n} (FileSystemError)`:"FileSystemError",r}function fm(r){if(!r)return"Unknown";if(r instanceof Cc)return r.code;let n=/^(.+) \(FileSystemError\)$/.exec(r.name);if(!n)return"Unknown";switch(n[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 Ir(r){if(r instanceof mn)return r.fileOperationResult;switch(fm(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}}function yO(r,n,e){return!r||!n||r===n||n.length>r.length?!1:(n.charAt(n.length-1)!==nn&&(n+=nn),e?zi(r,n):r.indexOf(n)===0)}function P_(r){if(!(typeof r.size!="number"||typeof r.mtime!="number"))return r.mtime.toString(29)+r.size.toString(31)}var Be,Cc,Vo,Fh,mn,Ac,Rc,Gh,Hh,no,ct=_(()=>{Ua();Ne();Sn();qe();Ie();We();de();ce();at();hs();Be=V("fileService");Cc=class r extends Error{constructor(e,t){super(e);this.code=t}static create(e,t){let i=new r(e.toString(),t);return T9(i,t),i}};Vo=class{constructor(n,e,t){this.resource=n;this.operation=e;this.target=t}isOperation(n){return this.operation===n}},Fh=class r{constructor(n,e){this.ignorePathCasing=e;this.correlationId=void 0;this.added=new Gn(()=>{let n=gr.forUris(()=>this.ignorePathCasing);return n.fill(this.rawAdded.map(e=>[e,!0])),n});this.updated=new Gn(()=>{let n=gr.forUris(()=>this.ignorePathCasing);return n.fill(this.rawUpdated.map(e=>[e,!0])),n});this.deleted=new Gn(()=>{let n=gr.forUris(()=>this.ignorePathCasing);return n.fill(this.rawDeleted.map(e=>[e,!0])),n});this.rawAdded=[];this.rawUpdated=[];this.rawDeleted=[];for(let t of n){switch(t.type){case 1:this.rawAdded.push(t.resource);break;case 0:this.rawUpdated.push(t.resource);break;case 2:this.rawDeleted.push(t.resource);break}this.correlationId!==r.MIXED_CORRELATION&&(typeof t.cId=="number"?this.correlationId===void 0?this.correlationId=t.cId:this.correlationId!==t.cId&&(this.correlationId=r.MIXED_CORRELATION):this.correlationId!==void 0&&(this.correlationId=r.MIXED_CORRELATION))}}static{this.MIXED_CORRELATION=null}contains(n,...e){return this.doContains(n,{includeChildren:!1},...e)}affects(n,...e){return this.doContains(n,{includeChildren:!0},...e)}doContains(n,e,...t){if(!n)return!1;let i=t.length>0;return!!((!i||t.includes(1))&&(this.added.value.get(n)||e.includeChildren&&this.added.value.findSuperstr(n))||(!i||t.includes(0))&&(this.updated.value.get(n)||e.includeChildren&&this.updated.value.findSuperstr(n))||(!i||t.includes(2))&&(this.deleted.value.findSubstr(n)||e.includeChildren&&this.deleted.value.findSuperstr(n)))}gotAdded(){return this.rawAdded.length>0}gotDeleted(){return this.rawDeleted.length>0}gotUpdated(){return this.rawUpdated.length>0}correlates(n){return this.correlationId===n}hasCorrelation(){return typeof this.correlationId=="number"}};mn=class extends Error{constructor(e,t,i){super(e);this.fileOperationResult=t;this.options=i}},Ac=class extends mn{constructor(e,t,i,o){super(e,t,o);this.fileOperationResult=t;this.size=i}},Rc=class extends mn{constructor(e,t,i){super(e,2,i);this.stat=t}},Gh={OFF:"off",ON_EXIT:"onExit",ON_EXIT_AND_WINDOW_CLOSE:"onExitAndWindowClose"},Hh="";no=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(n){return Ii(n)||(n=0),n<r.KB?v(2063,null,n.toFixed(0)):n<r.MB?v(2065,null,(n/r.KB).toFixed(2)):n<r.GB?v(2066,null,(n/r.MB).toFixed(2)):n<r.TB?v(2064,null,(n/r.GB).toFixed(2)):v(2067,null,(n/r.TB).toFixed(2))}}});function Kt(r){let n=r;return typeof n?.id=="string"&&A.isUri(n.uri)}function Ds(r,n){if(typeof r=="string"||typeof r>"u")return typeof r=="string"?{id:Pe(r)}:n?P9:C9;let e=r;return e.configuration?{id:e.id,configPath:e.configuration}:e.folders.length===1?{id:e.id,uri:e.folders[0].uri}:{id:e.id}}function yt(r){let n=r;return typeof n?.id=="string"&&A.isUri(n.configPath)}function SO(r){let n=r;if(n?.uri)return{id:n.id,uri:A.revive(n.uri)};let e=r;if(e?.configPath)return{id:e.id,configPath:A.revive(e.configPath)};if(r?.id)return{id:r.id}}function A_(r,n){return lt.isEqualOrParent(r,n.untitledWorkspacesHome)}function ro(r){return(typeof r=="string"?Vl(r):Dx(r))===A9}var cY,P9,C9,Jh,gm,A9,_O,C_,Ln=_(()=>{We();Ne();Ua();Ut();Ie();de();at();cY=V("contextService");P9={id:"ext-dev"},C9={id:"empty-window"};Jh=class{constructor(n,e){this.raw=e;this.uri=n.uri,this.index=n.index,this.name=n.name}toResource(n){return be(this.uri,n)}toJSON(){return{uri:this.uri,name:this.name,index:this.index}}},gm="code-workspace",A9=`.${gm}`,_O=[{name:v(2754,null),extensions:[gm]}],C_="workspace.json"});var jt,Pi=_(()=>{de();jt=V("IUriIdentityService")});function wO(r){let n=r;return!!(n&&typeof n=="object"&&typeof n.id=="string"&&typeof n.isDefault=="boolean"&&typeof n.name=="string"&&A.isUri(n.location)&&A.isUri(n.globalStorageHome)&&A.isUri(n.settingsResource)&&A.isUri(n.keybindingsResource)&&A.isUri(n.tasksResource)&&A.isUri(n.snippetsHome)&&A.isUri(n.promptsHome)&&A.isUri(n.extensionsResource)&&A.isUri(n.mcpResource))}function qh(r,n,e,t,i,o){return{id:r,name:n,location:e,isDefault:!1,icon:i?.icon,globalStorageHome:o&&i?.useDefaultFlags?.globalState?o.globalStorageHome:be(e,"globalStorage"),settingsResource:o&&i?.useDefaultFlags?.settings?o.settingsResource:be(e,"settings.json"),keybindingsResource:o&&i?.useDefaultFlags?.keybindings?o.keybindingsResource:be(e,"keybindings.json"),tasksResource:o&&i?.useDefaultFlags?.tasks?o.tasksResource:be(e,"tasks.json"),snippetsHome:o&&i?.useDefaultFlags?.snippets?o.snippetsHome:be(e,"snippets"),promptsHome:o&&i?.useDefaultFlags?.prompts?o.promptsHome:be(e,"prompts"),extensionsResource:o&&i?.useDefaultFlags?.extensions?o.extensionsResource:be(e,"extensions.json"),mcpResource:o&&i?.useDefaultFlags?.mcp?o.mcpResource:be(e,"mcp.json"),cacheHome:be(t,r),useDefaultFlags:i?.useDefaultFlags,isTransient:i?.transient,workspaces:i?.workspaces}}var zn,xc,Ci=_(()=>{eo();ae();te();Ut();Ie();We();fr();ct();de();me();Ln();Pi();Ce();Xt();Sn();qe();zn=V("IUserDataProfilesService");xc=class extends M{constructor(e,t,i,o){super();this.environmentService=e;this.fileService=t;this.uriIdentityService=i;this.logService=o;this._onDidChangeProfiles=this._register(new C);this.onDidChangeProfiles=this._onDidChangeProfiles.event;this._onWillCreateProfile=this._register(new C);this.onWillCreateProfile=this._onWillCreateProfile.event;this._onWillRemoveProfile=this._register(new C);this.onWillRemoveProfile=this._onWillRemoveProfile.event;this._onDidResetWorkspaces=this._register(new C);this.onDidResetWorkspaces=this._onDidResetWorkspaces.event;this.profileCreationPromises=new Map;this.transientProfilesObject={profiles:[],emptyWindows:new Map};this.profilesHome=be(this.environmentService.userRoamingDataHome,"profiles"),this.profilesCacheHome=be(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(),t=[e];try{for(let o of this.getStoredProfiles()){if(this.isInvalidProfile(o)){this.logService.warn("Skipping the invalid stored profile",o.location||o.name);continue}let s=pr(o.location);t.push(qh(s,o.name,o.location,this.profilesCacheHome,{icon:o.icon,useDefaultFlags:o.useDefaultFlags},e))}}catch(o){this.logService.error(o)}let i=new Map;if(t.length)try{let o=this.getStoredProfileAssociations();if(o.workspaces)for(let[s,a]of Object.entries(o.workspaces)){let l=A.parse(s),c=t.find(u=>u.id===a);if(c){let u=c.workspaces?c.workspaces.slice(0):[];u.push(l),c.workspaces=u}}if(o.emptyWindows)for(let[s,a]of Object.entries(o.emptyWindows)){let l=t.find(c=>c.id===a);l&&i.set(s,l)}}catch(o){this.logService.error(o)}this._profilesObject={profiles:t,emptyWindows:i}}return this._profilesObject}isInvalidProfile(e){return!!(!e.name||!Ye(e.name)||!e.location||e.isSystem||this.uriIdentityService.extUri.basename(this.uriIdentityService.extUri.dirname(e.location))==="builtin")}createDefaultProfile(){let e=qh("__default__profile__",v(2707,null),this.environmentService.userRoamingDataHome,this.profilesCacheHome);return{...e,extensionsResource:this.getDefaultProfileExtensionsLocation()??e.extensionsResource,isDefault:!0}}async createTransientProfile(e){let t="Temp",i=new RegExp(`${Is(t)}\\s(\\d+)`),o=0;for(let a of this.profiles){let l=i.exec(a.name),c=l?parseInt(l[1]):0;o=c>o?c:o}let s=`${t} ${o+1}`;return this.createProfile(wn(Me()).toString(16),s,{transient:!0},e)}async createNamedProfile(e,t,i){return this.createProfile(wn(Me()).toString(16),e,t,i)}async createProfile(e,t,i,o){return await this.doCreateProfile(e,t,i,o)}async doCreateProfile(e,t,i,o){if(!Ye(t)||!t)throw new Error("Name of the profile is mandatory and must be of type `string`");let s=this.profileCreationPromises.get(t);return s||(s=(async()=>{try{if(this.profiles.find(p=>p.id===e||!p.isTransient&&!i?.transient&&p.name===t))throw new Error(`Profile with ${t} name already exists`);let l=o?this.getWorkspace(o):void 0;A.isUri(l)&&(i={...i,workspaces:[l]});let c=qh(e,t,this.uriIdentityService.extUri.joinPath(this.profilesHome,e),this.profilesCacheHome,i,this.defaultProfile);await this.fileService.createFolder(c.location);let u=[];return this._onWillCreateProfile.fire({profile:c,join(p){u.push(p)}}),await Ft.settled(u),l&&!A.isUri(l)&&this.updateEmptyWindowAssociation(l,c,!!c.isTransient),this.updateProfiles([c],[],[]),c}finally{this.profileCreationPromises.delete(t)}})(),this.profileCreationPromises.set(t,s)),s}async updateProfile(e,t){let i=[];for(let s of this.profiles){let a;if(e.id===s.id)s.isDefault?t.workspaces&&(a=s,a.workspaces=t.workspaces):a=qh(s.id,t.name??s.name,s.location,this.profilesCacheHome,{icon:t.icon===null?void 0:t.icon??s.icon,transient:t.transient??s.isTransient,useDefaultFlags:t.useDefaultFlags??s.useDefaultFlags,workspaces:t.workspaces??s.workspaces},this.defaultProfile);else if(t.workspaces){let l=s.workspaces?.filter(c=>!t.workspaces?.some(u=>this.uriIdentityService.extUri.isEqual(c,u)));s.workspaces?.length!==l?.length&&(a=s,a.workspaces=l)}a&&i.push(a)}if(!i.length)throw e.isDefault?new Error("Cannot update default profile"):new Error(`Profile '${e.name}' does not exist`);this.updateProfiles([],[],i);let o=this.profiles.find(s=>s.id===e.id);if(!o)throw new Error(`Profile '${e.name}' was not updated`);return o}async removeProfile(e){if(e.isDefault)throw new Error("Cannot remove default profile");let t=this.profiles.find(o=>o.id===e.id);if(!t)throw new Error(`Profile '${e.name}' does not exist`);let i=[];this._onWillRemoveProfile.fire({profile:t,join(o){i.push(o)}});try{await Promise.allSettled(i)}catch(o){this.logService.error(o)}this.updateProfiles([],[t],[]);try{await this.fileService.del(t.cacheHome,{recursive:!0})}catch(o){Ir(o)!==1&&this.logService.error(o)}}async setProfileForWorkspace(e,t){let i=this.profiles.find(s=>s.id===t.id);if(!i)throw new Error(`Profile '${t.name}' does not exist`);let o=this.getWorkspace(e);if(A.isUri(o)){let s=i.workspaces?[...i.workspaces]:[];s.some(a=>this.uriIdentityService.extUri.isEqual(a,o))||(s.push(o),await this.updateProfile(i,{workspaces:s}))}else this.updateEmptyWindowAssociation(o,i,!1),this.updateStoredProfiles(this.profiles)}unsetWorkspace(e,t=!1){let i=this.getWorkspace(e);if(A.isUri(i)){let o=this.getProfileForWorkspace(e);o&&this.updateProfile(o,{workspaces:o.workspaces?.filter(s=>!this.uriIdentityService.extUri.isEqual(s,i))})}else this.updateEmptyWindowAssociation(i,void 0,t),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(i){this.logService.error(i)}let t=await this.fileService.resolve(this.profilesHome);await Promise.all((t.children||[]).filter(i=>i.isDirectory&&this.profiles.every(o=>!this.uriIdentityService.extUri.isEqual(o.location,i.resource))).map(i=>this.fileService.del(i.resource,{recursive:!0})))}}catch(e){this.logService.error("Error deleting redundant profile folders",e)}try{let e=this.getStoredProfiles(),t=[];for(let i of this.getStoredProfiles())this.isInvalidProfile(i)?this.logService.warn(`Invalid user data profile found: ${i.name}`):t.push(i);e.length!==t.length&&this.saveStoredProfiles(t)}catch(e){this.logService.error("Error removing invalid stored profiles",e)}}async cleanUpTransientProfiles(){let e=this.transientProfilesObject.profiles.filter(t=>!this.isProfileAssociatedToWorkspace(t));await Promise.allSettled(e.map(t=>this.removeProfile(t)))}getProfileForWorkspace(e){let t=this.getWorkspace(e);return A.isUri(t)?this.profiles.find(i=>i.workspaces?.some(o=>this.uriIdentityService.extUri.isEqual(o,t))):this.profilesObject.emptyWindows.get(t)??this.transientProfilesObject.emptyWindows.get(t)}getWorkspace(e){return Kt(e)?e.uri:yt(e)?e.configPath:e.id}isProfileAssociatedToWorkspace(e){return!!(e.workspaces?.length||[...this.profilesObject.emptyWindows.values()].some(t=>this.uriIdentityService.extUri.isEqual(t.location,e.location))||[...this.transientProfilesObject.emptyWindows.values()].some(t=>this.uriIdentityService.extUri.isEqual(t.location,e.location)))}updateProfiles(e,t,i,o=!1){let s=[...this.profiles,...e],a=this.transientProfilesObject.profiles;this.transientProfilesObject.profiles=[];let l=[];for(let c of s){if(t.some(u=>c.id===u.id)){for(let u of[...this.profilesObject.emptyWindows.keys()])c.id===this.profilesObject.emptyWindows.get(u)?.id&&this.profilesObject.emptyWindows.delete(u);continue}if(!c.isDefault){c=i.find(p=>c.id===p.id)??c;let u=a.find(p=>c.id===p.id);if(c.isTransient)this.transientProfilesObject.profiles.push(c);else if(u){for(let[p,m]of this.transientProfilesObject.emptyWindows.entries())if(c.id===m.id){this.transientProfilesObject.emptyWindows.delete(p),this.profilesObject.emptyWindows.set(p,c);break}}}c.workspaces?.length===0&&(c.workspaces=void 0),l.push(c)}this.updateStoredProfiles(l),o||this.triggerProfilesChanges(e,t,i)}triggerProfilesChanges(e,t,i){this._onDidChangeProfiles.fire({added:e,removed:t,updated:i,all:this.profiles})}updateEmptyWindowAssociation(e,t,i){i=t?.isTransient?!0:i,i?t?this.transientProfilesObject.emptyWindows.set(e,t):this.transientProfilesObject.emptyWindows.delete(e):(this.transientProfilesObject.emptyWindows.delete(e),t?this.profilesObject.emptyWindows.set(e,t):this.profilesObject.emptyWindows.delete(e))}updateStoredProfiles(e){let t=[],i={},o={};for(let s of e)if(!s.isTransient&&(s.isDefault||t.push({location:s.location,name:s.name,icon:s.icon,useDefaultFlags:s.useDefaultFlags}),s.workspaces))for(let a of s.workspaces)i[a.toString()]=s.id;for(let[s,a]of this.profilesObject.emptyWindows.entries())o[s.toString()]=a.id;this.saveStoredProfileAssociations({workspaces:i,emptyWindows:o}),this.saveStoredProfiles(t),this._profilesObject=void 0}getStoredProfiles(){return[]}saveStoredProfiles(e){throw new Error("not implemented")}getStoredProfileAssociations(){return{}}saveStoredProfileAssociations(e){throw new Error("not implemented")}getDefaultProfileExtensionsLocation(){}};xc=D([S(0,mr),S(1,Be),S(2,jt),S(3,z)],xc)});function zh(r){let n=r.get(Jo);if(n)try{return JSON.parse(n)}catch{}return Object.create(null)}function jh(r){return r.isDefault||!!r.useDefaultFlags?.globalState}async function x9(r,n,e,t,i,o){let s=y=>{try{return JSON.parse(y)}catch{return y}},a=new Map,l=new Map;r.forEach((y,P)=>{a.set(P,y),l.set(P,s(y))});let c=new Map,u=new Map;n.forEach((y,P)=>{c.set(P,y),u.set(P,s(y))});let p=new Map,m=new Map;e.forEach((y,P)=>{p.set(P,y),m.set(P,s(y))}),console.group(t!==i?`Storage: Application (path: ${t})`:`Storage: Application & Profile (path: ${t}, default profile)`);let h=[];if(a.forEach((y,P)=>{h.push({key:P,value:y})}),console.table(h),console.groupEnd(),console.log(l),t!==i){console.group(`Storage: Profile (path: ${i}, profile specific)`);let y=[];c.forEach((P,T)=>{y.push({key:T,value:P})}),console.table(y),console.groupEnd(),console.log(u)}console.group(`Storage: Workspace (path: ${o})`);let E=[];p.forEach((y,P)=>{E.push({key:P,value:y})}),console.table(E),console.groupEnd(),console.log(m)}var hm,Jo,zY,Kh,Ba=_(()=>{Ce();ae();te();Bi();qe();S_();de();Ci();hm="__$__isNewStorageMarker",Jo="__$__targetStorageMarker",zY=V("storageService");Kh=class r extends M{constructor(e={flushInterval:r.DEFAULT_FLUSH_INTERVAL}){super();this._onDidChangeValue=this._register(new _a);this._onDidChangeTarget=this._register(new _a);this.onDidChangeTarget=this._onDidChangeTarget.event;this._onWillSaveState=this._register(new C);this.onWillSaveState=this._onWillSaveState.event;this.runFlushWhenIdle=this._register(new yn);this._workspaceKeyTargets=void 0;this._profileKeyTargets=void 0;this._applicationKeyTargets=void 0;this.flushWhenIdleScheduler=this._register(new On(()=>this.doFlushWhenIdle(),e.flushInterval))}static{this.DEFAULT_FLUSH_INTERVAL=60*1e3}onDidChangeValue(e,t,i){return x.filter(this._onDidChangeValue.event,o=>o.scope===e&&(t===void 0||o.key===t),i)}doFlushWhenIdle(){this.runFlushWhenIdle.value=Cp(()=>{this.shouldFlushWhenIdle()&&this.flush(),this.flushWhenIdleScheduler.schedule()})}shouldFlushWhenIdle(){return!0}stopFlushWhenIdle(){At([this.runFlushWhenIdle,this.flushWhenIdleScheduler])}initialize(){return this.initializationPromise||(this.initializationPromise=(async()=>{tt("code/willInitStorage");try{await this.doInitialize()}finally{tt("code/didInitStorage")}this.flushWhenIdleScheduler.schedule()})()),this.initializationPromise}emitDidChangeValue(e,t){let{key:i,external:o}=t;if(i===Jo){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:i,target:this.getKeyTargets(e)[i],external:o})}emitWillSaveState(e){this._onWillSaveState.fire({reason:e})}get(e,t,i){return this.getStorage(t)?.get(e,i)}getBoolean(e,t,i){return this.getStorage(t)?.getBoolean(e,i)}getNumber(e,t,i){return this.getStorage(t)?.getNumber(e,i)}getObject(e,t,i){return this.getStorage(t)?.getObject(e,i)}storeAll(e,t){this.withPausedEmitters(()=>{for(let i of e)this.store(i.key,i.value,i.scope,i.target,t)})}store(e,t,i,o,s=!1){if(Qt(t)){this.remove(e,i,s);return}this.withPausedEmitters(()=>{this.updateKeyTarget(e,i,o),this.getStorage(i)?.set(e,t,s)})}remove(e,t,i=!1){this.withPausedEmitters(()=>{this.updateKeyTarget(e,t,void 0),this.getStorage(t)?.delete(e,i)})}withPausedEmitters(e){this._onDidChangeValue.pause(),this._onDidChangeTarget.pause();try{e()}finally{this._onDidChangeValue.resume(),this._onDidChangeTarget.resume()}}keys(e,t){let i=[],o=this.getKeyTargets(e);for(let s of Object.keys(o))o[s]===t&&i.push(s);return i}updateKeyTarget(e,t,i,o=!1){let s=this.getKeyTargets(t);typeof i=="number"?s[e]!==i&&(s[e]=i,this.getStorage(t)?.set(Jo,JSON.stringify(s),o)):typeof s[e]=="number"&&(delete s[e],this.getStorage(t)?.set(Jo,JSON.stringify(s),o))}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 t=this.getStorage(e);return t?zh(t):Object.create(null)}isNew(e){return this.getBoolean(hm,e)===!0}async flush(e=0){this._onWillSaveState.fire({reason:e});let t=this.getStorage(-1),i=this.getStorage(0),o=this.getStorage(1);switch(e){case 0:await Ft.settled([t?.whenFlushed()??Promise.resolve(),i?.whenFlushed()??Promise.resolve(),o?.whenFlushed()??Promise.resolve()]);break;case 1:await Ft.settled([t?.flush(0)??Promise.resolve(),i?.flush(0)??Promise.resolve(),o?.flush(0)??Promise.resolve()]);break}}async log(){let e=this.getStorage(-1)?.items??new Map,t=this.getStorage(0)?.items??new Map,i=this.getStorage(1)?.items??new Map;return x9(e,t,i,this.getLogDetails(-1)??"",this.getLogDetails(0)??"",this.getLogDetails(1)??"")}async optimize(e){return await this.flush(),this.getStorage(e)?.optimize()}async switch(e,t){return this.emitWillSaveState(0),wO(e)?this.switchToProfile(e,t):this.switchToWorkspace(e,t)}canSwitchProfile(e,t){return!(e.id===t.id||jh(t)&&jh(e))}switchData(e,t,i){this.withPausedEmitters(()=>{let o=new Set;for(let[s,a]of e)o.add(s),t.get(s)!==a&&this.emitDidChangeValue(i,{key:s,external:!0});for(let[s]of t.items)o.has(s)||this.emitDidChangeValue(i,{key:s,external:!0})})}}});var Yh,Rt,vr=_(()=>{de();Yh=V("stateReadService"),Rt=V("stateService")});function Va(r){return!!r.workspaceUri}function Dc(r){return!!r.folderUri}function x_(r){return!!r.fileUri}function D9(r,n){if($n)return!1;let e=Os(r,n),t=r.getValue("window");return t?.menuStyle==="native"?!(!$&&!e):t?.menuStyle==="custom"?!1:e}function D_(r,n){return $n?!1:$?!0:D9(r,n)}function bO(r){let n=r.getValue("window.menuBarVisibility");return n==="default"||n==="compact"&&D_(r)||$&&Sg?"classic":n}function Os(r,n){return n||(n=TO(r)),n==="native"}function TO(r){if($n)return"custom";let n=r.getValue("window");if(n){if($&&n.nativeTabs===!0||$&&n.nativeFullScreen===!1)return"native";let i=n.titleBarStyle;if(i==="native"||i==="custom")return i}return"custom"}function O9(r){if($n||$||TO(r)==="native")return"native";let e=r.getValue("window")?.controlsStyle;return e==="custom"||e==="hidden"?e:"native"}function Im(r){if($n||Os(r))return!1;if(!$){let n=O9(r);if(n==="custom"||n==="hidden")return!1}return!0}function Qh(r){let n=r.getValue("window");return!n||typeof n.nativeFullScreen!="boolean"||n.nativeTabs?!0:n.nativeFullScreen!==!1}function CO(r=0){return 1.2**r}var R_,PO,AO,RO,O_,qo=_(()=>{ce();R_={WIDTH:400,WIDTH_WITH_VERTICAL_PANEL:600,HEIGHT:270};PO=35;AO={width:1200,height:800},RO={width:1440,height:900},O_={width:1024,height:768}});import k9 from"electron";var io,xO,oo=_(()=>{qo();io=function(r=1,n=!1){let e=n?RO:AO;return{width:e.width,height:e.height,mode:r}},xO=function(){let r=O_.width,n=O_.height,e=k9.screen.getPrimaryDisplay().workArea,t=Math.max(e.x+e.width/2-r/2,0),i=Math.max(e.y+e.height/2-n/2,0);return{x:t,y:i,width:r,height:n,mode:1}}});function Ns(r,n){let e=Math.pow(10,n);return Math.round(r*e)/e}var F,ks,Oc,Ls,k_=_(()=>{vi();F=class{constructor(n,e,t,i=1){this._rgbaBrand=void 0;this.r=Math.min(255,Math.max(0,n))|0,this.g=Math.min(255,Math.max(0,e))|0,this.b=Math.min(255,Math.max(0,t))|0,this.a=Ns(Math.max(Math.min(1,i),0),3)}static equals(n,e){return n.r===e.r&&n.g===e.g&&n.b===e.b&&n.a===e.a}},ks=class r{constructor(n,e,t,i){this._hslaBrand=void 0;this.h=Math.max(Math.min(360,n),0)|0,this.s=Ns(Math.max(Math.min(1,e),0),3),this.l=Ns(Math.max(Math.min(1,t),0),3),this.a=Ns(Math.max(Math.min(1,i),0),3)}static equals(n,e){return n.h===e.h&&n.s===e.s&&n.l===e.l&&n.a===e.a}static fromRGBA(n){let e=n.r/255,t=n.g/255,i=n.b/255,o=n.a,s=Math.max(e,t,i),a=Math.min(e,t,i),l=0,c=0,u=(a+s)/2,p=s-a;if(p>0){switch(c=Math.min(u<=.5?p/(2*u):p/(2-2*u),1),s){case e:l=(t-i)/p+(t<i?6:0);break;case t:l=(i-e)/p+2;break;case i:l=(e-t)/p+4;break}l*=60,l=Math.round(l)}return new r(l,c,u,o)}static _hue2rgb(n,e,t){return t<0&&(t+=1),t>1&&(t-=1),t<1/6?n+(e-n)*6*t:t<1/2?e:t<2/3?n+(e-n)*(2/3-t)*6:n}static toRGBA(n){let e=n.h/360,{s:t,l:i,a:o}=n,s,a,l;if(t===0)s=a=l=i;else{let c=i<.5?i*(1+t):i+t-i*t,u=2*i-c;s=r._hue2rgb(u,c,e+1/3),a=r._hue2rgb(u,c,e),l=r._hue2rgb(u,c,e-1/3)}return new F(Math.round(s*255),Math.round(a*255),Math.round(l*255),o)}},Oc=class r{constructor(n,e,t,i){this._hsvaBrand=void 0;this.h=Math.max(Math.min(360,n),0)|0,this.s=Ns(Math.max(Math.min(1,e),0),3),this.v=Ns(Math.max(Math.min(1,t),0),3),this.a=Ns(Math.max(Math.min(1,i),0),3)}static equals(n,e){return n.h===e.h&&n.s===e.s&&n.v===e.v&&n.a===e.a}static fromRGBA(n){let e=n.r/255,t=n.g/255,i=n.b/255,o=Math.max(e,t,i),s=Math.min(e,t,i),a=o-s,l=o===0?0:a/o,c;return a===0?c=0:o===e?c=((t-i)/a%6+6)%6:o===t?c=(i-e)/a+2:c=(e-t)/a+4,new r(Math.round(c*60),l,o,n.a)}static toRGBA(n){let{h:e,s:t,v:i,a:o}=n,s=i*t,a=s*(1-Math.abs(e/60%2-1)),l=i-s,[c,u,p]=[0,0,0];return e<60?(c=s,u=a):e<120?(c=a,u=s):e<180?(u=s,p=a):e<240?(u=a,p=s):e<300?(c=a,p=s):e<=360&&(c=s,p=a),c=Math.round((c+l)*255),u=Math.round((u+l)*255),p=Math.round((p+l)*255),new F(c,u,p,o)}},Ls=class r{static fromHex(n){return r.Format.CSS.parseHex(n)||r.red}static equals(n,e){return!n&&!e?!0:!n||!e?!1:n.equals(e)}get hsla(){return this._hsla?this._hsla:ks.fromRGBA(this.rgba)}get hsva(){return this._hsva?this._hsva:Oc.fromRGBA(this.rgba)}constructor(n){if(n)if(n instanceof F)this.rgba=n;else if(n instanceof ks)this._hsla=n,this.rgba=ks.toRGBA(n);else if(n instanceof Oc)this._hsva=n,this.rgba=Oc.toRGBA(n);else throw new Error("Invalid color ctor argument");else throw new Error("Color needs a value")}equals(n){return!!n&&F.equals(this.rgba,n.rgba)&&ks.equals(this.hsla,n.hsla)&&Oc.equals(this.hsva,n.hsva)}getRelativeLuminance(){let n=r._relativeLuminanceForComponent(this.rgba.r),e=r._relativeLuminanceForComponent(this.rgba.g),t=r._relativeLuminanceForComponent(this.rgba.b),i=.2126*n+.7152*e+.0722*t;return Ns(i,4)}reduceRelativeLuminace(n,e){let{r:t,g:i,b:o}=n.rgba,s=this.getContrastRatio(n);for(;s<e&&(t>0||i>0||o>0);)t-=Math.max(0,Math.ceil(t*.1)),i-=Math.max(0,Math.ceil(i*.1)),o-=Math.max(0,Math.ceil(o*.1)),s=this.getContrastRatio(new r(new F(t,i,o)));return new r(new F(t,i,o))}increaseRelativeLuminace(n,e){let{r:t,g:i,b:o}=n.rgba,s=this.getContrastRatio(n);for(;s<e&&(t<255||i<255||o<255);)t=Math.min(255,t+Math.ceil((255-t)*.1)),i=Math.min(255,i+Math.ceil((255-i)*.1)),o=Math.min(255,o+Math.ceil((255-o)*.1)),s=this.getContrastRatio(new r(new F(t,i,o)));return new r(new F(t,i,o))}static _relativeLuminanceForComponent(n){let e=n/255;return e<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4)}getContrastRatio(n){let e=this.getRelativeLuminance(),t=n.getRelativeLuminance();return e>t?(e+.05)/(t+.05):(t+.05)/(e+.05)}isDarker(){return(this.rgba.r*299+this.rgba.g*587+this.rgba.b*114)/1e3<128}isLighter(){return(this.rgba.r*299+this.rgba.g*587+this.rgba.b*114)/1e3>=128}isLighterThan(n){let e=this.getRelativeLuminance(),t=n.getRelativeLuminance();return e>t}isDarkerThan(n){let e=this.getRelativeLuminance(),t=n.getRelativeLuminance();return e<t}ensureConstrast(n,e){let t=this.getRelativeLuminance(),i=n.getRelativeLuminance();if(this.getContrastRatio(n)<e){if(i<t){let l=this.reduceRelativeLuminace(n,e),c=this.getContrastRatio(l);if(c<e){let u=this.increaseRelativeLuminace(n,e),p=this.getContrastRatio(u);return c>p?l:u}return l}let s=this.increaseRelativeLuminace(n,e),a=this.getContrastRatio(s);if(a<e){let l=this.reduceRelativeLuminace(n,e),c=this.getContrastRatio(l);return a>c?s:l}return s}return n}lighten(n){return new r(new ks(this.hsla.h,this.hsla.s,this.hsla.l+this.hsla.l*n,this.hsla.a))}darken(n){return new r(new ks(this.hsla.h,this.hsla.s,this.hsla.l-this.hsla.l*n,this.hsla.a))}transparent(n){let{r:e,g:t,b:i,a:o}=this.rgba;return new r(new F(e,t,i,o*n))}isTransparent(){return this.rgba.a===0}isOpaque(){return this.rgba.a===1}opposite(){return new r(new F(255-this.rgba.r,255-this.rgba.g,255-this.rgba.b,this.rgba.a))}blend(n){let e=n.rgba,t=this.rgba.a,i=e.a,o=t+i*(1-t);if(o<1e-6)return r.transparent;let s=this.rgba.r*t/o+e.r*i*(1-t)/o,a=this.rgba.g*t/o+e.g*i*(1-t)/o,l=this.rgba.b*t/o+e.b*i*(1-t)/o;return new r(new F(s,a,l,o))}mix(n,e=.5){let t=Math.min(Math.max(e,0),1),i=this.rgba,o=n.rgba,s=i.r+(o.r-i.r)*t,a=i.g+(o.g-i.g)*t,l=i.b+(o.b-i.b)*t,c=i.a+(o.a-i.a)*t;return new r(new F(s,a,l,c))}makeOpaque(n){if(this.isOpaque()||n.rgba.a!==1)return this;let{r:e,g:t,b:i,a:o}=this.rgba;return new r(new F(n.rgba.r-o*(n.rgba.r-e),n.rgba.g-o*(n.rgba.g-t),n.rgba.b-o*(n.rgba.b-i),1))}flatten(...n){let e=n.reduceRight((t,i)=>r._flatten(i,t));return r._flatten(this,e)}static _flatten(n,e){let t=1-n.rgba.a;return new r(new F(t*e.rgba.r+n.rgba.a*n.rgba.r,t*e.rgba.g+n.rgba.a*n.rgba.g,t*e.rgba.b+n.rgba.a*n.rgba.b))}toString(){return this._toString||(this._toString=r.Format.CSS.format(this)),this._toString}toNumber32Bit(){return this._toNumber32Bit||(this._toNumber32Bit=(this.rgba.r<<24|this.rgba.g<<16|this.rgba.b<<8|this.rgba.a*255<<0)>>>0),this._toNumber32Bit}static getLighterColor(n,e,t){if(n.isLighterThan(e))return n;t=t||.5;let i=n.getRelativeLuminance(),o=e.getRelativeLuminance();return t=t*(o-i)/o,n.lighten(t)}static getDarkerColor(n,e,t){if(n.isDarkerThan(e))return n;t=t||.5;let i=n.getRelativeLuminance(),o=e.getRelativeLuminance();return t=t*(i-o)/i,n.darken(t)}static{this.white=new r(new F(255,255,255,1))}static{this.black=new r(new F(0,0,0,1))}static{this.red=new r(new F(255,0,0,1))}static{this.blue=new r(new F(0,0,255,1))}static{this.green=new r(new F(0,255,0,1))}static{this.cyan=new r(new F(0,255,255,1))}static{this.lightgrey=new r(new F(211,211,211,1))}static{this.transparent=new r(new F(0,0,0,0))}};(n=>{let r;(t=>{let e;(P=>{function i(T){return T.rgba.a===1?`rgb(${T.rgba.r}, ${T.rgba.g}, ${T.rgba.b})`:n.Format.CSS.formatRGBA(T)}P.formatRGB=i;function o(T){return`rgba(${T.rgba.r}, ${T.rgba.g}, ${T.rgba.b}, ${+T.rgba.a.toFixed(2)})`}P.formatRGBA=o;function s(T){return T.hsla.a===1?`hsl(${T.hsla.h}, ${Math.round(T.hsla.s*100)}%, ${Math.round(T.hsla.l*100)}%)`:n.Format.CSS.formatHSLA(T)}P.formatHSL=s;function a(T){return`hsla(${T.hsla.h}, ${Math.round(T.hsla.s*100)}%, ${Math.round(T.hsla.l*100)}%, ${T.hsla.a.toFixed(2)})`}P.formatHSLA=a;function l(T){let k=T.toString(16);return k.length!==2?"0"+k:k}function c(T){return`#${l(T.rgba.r)}${l(T.rgba.g)}${l(T.rgba.b)}`}P.formatHex=c;function u(T,k=!1){return k&&T.rgba.a===1?n.Format.CSS.formatHex(T):`#${l(T.rgba.r)}${l(T.rgba.g)}${l(T.rgba.b)}${l(Math.round(T.rgba.a*255))}`}P.formatHexA=u;function p(T){return T.isOpaque()?n.Format.CSS.formatHex(T):n.Format.CSS.formatRGBA(T)}P.format=p;function m(T){if(T==="transparent")return n.transparent;if(T.startsWith("#"))return E(T);if(T.startsWith("rgba(")){let k=T.match(/rgba\((?<r>(?:\+|-)?\d+), *(?<g>(?:\+|-)?\d+), *(?<b>(?:\+|-)?\d+), *(?<a>(?:\+|-)?\d+(\.\d+)?)\)/);if(!k)throw new Error("Invalid color format "+T);let U=parseInt(k.groups?.r??"0"),O=parseInt(k.groups?.g??"0"),B=parseInt(k.groups?.b??"0"),he=parseFloat(k.groups?.a??"0");return new n(new F(U,O,B,he))}if(T.startsWith("rgb(")){let k=T.match(/rgb\((?<r>(?:\+|-)?\d+), *(?<g>(?:\+|-)?\d+), *(?<b>(?:\+|-)?\d+)\)/);if(!k)throw new Error("Invalid color format "+T);let U=parseInt(k.groups?.r??"0"),O=parseInt(k.groups?.g??"0"),B=parseInt(k.groups?.b??"0");return new n(new F(U,O,B))}return h(T)}P.parse=m;function h(T){switch(T){case"aliceblue":return new n(new F(240,248,255,1));case"antiquewhite":return new n(new F(250,235,215,1));case"aqua":return new n(new F(0,255,255,1));case"aquamarine":return new n(new F(127,255,212,1));case"azure":return new n(new F(240,255,255,1));case"beige":return new n(new F(245,245,220,1));case"bisque":return new n(new F(255,228,196,1));case"black":return new n(new F(0,0,0,1));case"blanchedalmond":return new n(new F(255,235,205,1));case"blue":return new n(new F(0,0,255,1));case"blueviolet":return new n(new F(138,43,226,1));case"brown":return new n(new F(165,42,42,1));case"burlywood":return new n(new F(222,184,135,1));case"cadetblue":return new n(new F(95,158,160,1));case"chartreuse":return new n(new F(127,255,0,1));case"chocolate":return new n(new F(210,105,30,1));case"coral":return new n(new F(255,127,80,1));case"cornflowerblue":return new n(new F(100,149,237,1));case"cornsilk":return new n(new F(255,248,220,1));case"crimson":return new n(new F(220,20,60,1));case"cyan":return new n(new F(0,255,255,1));case"darkblue":return new n(new F(0,0,139,1));case"darkcyan":return new n(new F(0,139,139,1));case"darkgoldenrod":return new n(new F(184,134,11,1));case"darkgray":return new n(new F(169,169,169,1));case"darkgreen":return new n(new F(0,100,0,1));case"darkgrey":return new n(new F(169,169,169,1));case"darkkhaki":return new n(new F(189,183,107,1));case"darkmagenta":return new n(new F(139,0,139,1));case"darkolivegreen":return new n(new F(85,107,47,1));case"darkorange":return new n(new F(255,140,0,1));case"darkorchid":return new n(new F(153,50,204,1));case"darkred":return new n(new F(139,0,0,1));case"darksalmon":return new n(new F(233,150,122,1));case"darkseagreen":return new n(new F(143,188,143,1));case"darkslateblue":return new n(new F(72,61,139,1));case"darkslategray":return new n(new F(47,79,79,1));case"darkslategrey":return new n(new F(47,79,79,1));case"darkturquoise":return new n(new F(0,206,209,1));case"darkviolet":return new n(new F(148,0,211,1));case"deeppink":return new n(new F(255,20,147,1));case"deepskyblue":return new n(new F(0,191,255,1));case"dimgray":return new n(new F(105,105,105,1));case"dimgrey":return new n(new F(105,105,105,1));case"dodgerblue":return new n(new F(30,144,255,1));case"firebrick":return new n(new F(178,34,34,1));case"floralwhite":return new n(new F(255,250,240,1));case"forestgreen":return new n(new F(34,139,34,1));case"fuchsia":return new n(new F(255,0,255,1));case"gainsboro":return new n(new F(220,220,220,1));case"ghostwhite":return new n(new F(248,248,255,1));case"gold":return new n(new F(255,215,0,1));case"goldenrod":return new n(new F(218,165,32,1));case"gray":return new n(new F(128,128,128,1));case"green":return new n(new F(0,128,0,1));case"greenyellow":return new n(new F(173,255,47,1));case"grey":return new n(new F(128,128,128,1));case"honeydew":return new n(new F(240,255,240,1));case"hotpink":return new n(new F(255,105,180,1));case"indianred":return new n(new F(205,92,92,1));case"indigo":return new n(new F(75,0,130,1));case"ivory":return new n(new F(255,255,240,1));case"khaki":return new n(new F(240,230,140,1));case"lavender":return new n(new F(230,230,250,1));case"lavenderblush":return new n(new F(255,240,245,1));case"lawngreen":return new n(new F(124,252,0,1));case"lemonchiffon":return new n(new F(255,250,205,1));case"lightblue":return new n(new F(173,216,230,1));case"lightcoral":return new n(new F(240,128,128,1));case"lightcyan":return new n(new F(224,255,255,1));case"lightgoldenrodyellow":return new n(new F(250,250,210,1));case"lightgray":return new n(new F(211,211,211,1));case"lightgreen":return new n(new F(144,238,144,1));case"lightgrey":return new n(new F(211,211,211,1));case"lightpink":return new n(new F(255,182,193,1));case"lightsalmon":return new n(new F(255,160,122,1));case"lightseagreen":return new n(new F(32,178,170,1));case"lightskyblue":return new n(new F(135,206,250,1));case"lightslategray":return new n(new F(119,136,153,1));case"lightslategrey":return new n(new F(119,136,153,1));case"lightsteelblue":return new n(new F(176,196,222,1));case"lightyellow":return new n(new F(255,255,224,1));case"lime":return new n(new F(0,255,0,1));case"limegreen":return new n(new F(50,205,50,1));case"linen":return new n(new F(250,240,230,1));case"magenta":return new n(new F(255,0,255,1));case"maroon":return new n(new F(128,0,0,1));case"mediumaquamarine":return new n(new F(102,205,170,1));case"mediumblue":return new n(new F(0,0,205,1));case"mediumorchid":return new n(new F(186,85,211,1));case"mediumpurple":return new n(new F(147,112,219,1));case"mediumseagreen":return new n(new F(60,179,113,1));case"mediumslateblue":return new n(new F(123,104,238,1));case"mediumspringgreen":return new n(new F(0,250,154,1));case"mediumturquoise":return new n(new F(72,209,204,1));case"mediumvioletred":return new n(new F(199,21,133,1));case"midnightblue":return new n(new F(25,25,112,1));case"mintcream":return new n(new F(245,255,250,1));case"mistyrose":return new n(new F(255,228,225,1));case"moccasin":return new n(new F(255,228,181,1));case"navajowhite":return new n(new F(255,222,173,1));case"navy":return new n(new F(0,0,128,1));case"oldlace":return new n(new F(253,245,230,1));case"olive":return new n(new F(128,128,0,1));case"olivedrab":return new n(new F(107,142,35,1));case"orange":return new n(new F(255,165,0,1));case"orangered":return new n(new F(255,69,0,1));case"orchid":return new n(new F(218,112,214,1));case"palegoldenrod":return new n(new F(238,232,170,1));case"palegreen":return new n(new F(152,251,152,1));case"paleturquoise":return new n(new F(175,238,238,1));case"palevioletred":return new n(new F(219,112,147,1));case"papayawhip":return new n(new F(255,239,213,1));case"peachpuff":return new n(new F(255,218,185,1));case"peru":return new n(new F(205,133,63,1));case"pink":return new n(new F(255,192,203,1));case"plum":return new n(new F(221,160,221,1));case"powderblue":return new n(new F(176,224,230,1));case"purple":return new n(new F(128,0,128,1));case"rebeccapurple":return new n(new F(102,51,153,1));case"red":return new n(new F(255,0,0,1));case"rosybrown":return new n(new F(188,143,143,1));case"royalblue":return new n(new F(65,105,225,1));case"saddlebrown":return new n(new F(139,69,19,1));case"salmon":return new n(new F(250,128,114,1));case"sandybrown":return new n(new F(244,164,96,1));case"seagreen":return new n(new F(46,139,87,1));case"seashell":return new n(new F(255,245,238,1));case"sienna":return new n(new F(160,82,45,1));case"silver":return new n(new F(192,192,192,1));case"skyblue":return new n(new F(135,206,235,1));case"slateblue":return new n(new F(106,90,205,1));case"slategray":return new n(new F(112,128,144,1));case"slategrey":return new n(new F(112,128,144,1));case"snow":return new n(new F(255,250,250,1));case"springgreen":return new n(new F(0,255,127,1));case"steelblue":return new n(new F(70,130,180,1));case"tan":return new n(new F(210,180,140,1));case"teal":return new n(new F(0,128,128,1));case"thistle":return new n(new F(216,191,216,1));case"tomato":return new n(new F(255,99,71,1));case"turquoise":return new n(new F(64,224,208,1));case"violet":return new n(new F(238,130,238,1));case"wheat":return new n(new F(245,222,179,1));case"white":return new n(new F(255,255,255,1));case"whitesmoke":return new n(new F(245,245,245,1));case"yellow":return new n(new F(255,255,0,1));case"yellowgreen":return new n(new F(154,205,50,1));default:return null}}function E(T){let k=T.length;if(k===0||T.charCodeAt(0)!==35)return null;if(k===7){let U=16*y(T.charCodeAt(1))+y(T.charCodeAt(2)),O=16*y(T.charCodeAt(3))+y(T.charCodeAt(4)),B=16*y(T.charCodeAt(5))+y(T.charCodeAt(6));return new n(new F(U,O,B,1))}if(k===9){let U=16*y(T.charCodeAt(1))+y(T.charCodeAt(2)),O=16*y(T.charCodeAt(3))+y(T.charCodeAt(4)),B=16*y(T.charCodeAt(5))+y(T.charCodeAt(6)),he=16*y(T.charCodeAt(7))+y(T.charCodeAt(8));return new n(new F(U,O,B,he/255))}if(k===4){let U=y(T.charCodeAt(1)),O=y(T.charCodeAt(2)),B=y(T.charCodeAt(3));return new n(new F(16*U+U,16*O+O,16*B+B))}if(k===5){let U=y(T.charCodeAt(1)),O=y(T.charCodeAt(2)),B=y(T.charCodeAt(3)),he=y(T.charCodeAt(4));return new n(new F(16*U+U,16*O+O,16*B+B,(16*he+he)/255))}return null}P.parseHex=E;function y(T){switch(T){case 48:return 0;case 49:return 1;case 50:return 2;case 51:return 3;case 52:return 4;case 53:return 5;case 54:return 6;case 55:return 7;case 56:return 8;case 57:return 9;case 97:return 10;case 65:return 10;case 98:return 11;case 66:return 11;case 99:return 12;case 67:return 12;case 100:return 13;case 68:return 13;case 101:return 14;case 69:return 14;case 102:return 15;case 70:return 15}return 0}})(e=t.CSS||={})})(r=n.Format||={})})(Ls||={})});var He,In=_(()=>{de();He=V("productService")});var so,kc=_(()=>{de();so=V("themeMainService")});import N_ from"electron";function Nc(r,n,e,t){let i=r.get(so),o=r.get(He),s=r.get(Ae),a=r.get(Fe),l=s.getValue("window"),c={backgroundColor:i.getBackgroundColor(),minWidth:R_.WIDTH,minHeight:R_.HEIGHT,title:o.nameLong,show:n.mode!==0&&n.mode!==3,x:n.x,y:n.y,width:n.width,height:n.height,webPreferences:{...t,enableWebSQL:!1,spellcheck:!1,zoomFactor:CO(n.zoomLevel??l?.zoomLevel),autoplayPolicy:"user-gesture-required",enableBlinkFeatures:"HighlightAPI",sandbox:!0,enableDeprecatedPaste:!0},experimentalDarkMode:!0};if(q){let m=l?.border||"default";m==="system"&&(m="default"),m!=="default"&&(m==="off"?c.accentColor=!1:typeof m=="string"&&(c.accentColor=m))}if(fe?c.icon=H(a.appRoot,"resources/linux/code.png"):q&&(a.isBuilt?process.isEmbeddedApp&&(c.icon=H(a.appRoot,"resources/win32/sessions.ico")):c.icon=H(a.appRoot,"resources/win32/code_150x150.png")),$&&(c.acceptFirstMouse=!0,l?.clickThroughInactive===!1&&(c.acceptFirstMouse=!1)),e?.disableFullscreen?c.fullscreen=!1:$&&!Qh(s)&&(c.fullscreenable=!1),$&&l?.nativeTabs===!0&&(c.tabbingIdentifier=o.nameShort),!Os(s,e?.forceNativeTitlebar?"native":void 0)&&(c.titleBarStyle="hidden",$||(c.frame=!1),Im(s)))if($)c.titleBarOverlay=!0;else{let m=i.getWindowSplash(void 0)?.colorInfo.titleBarBackground??i.getBackgroundColor(),h=Ls.fromHex(m).isDarker()?"#FFFFFF":"#000000";c.titleBarOverlay={height:29,color:m,symbolColor:h}}return e?.alwaysOnTop&&(c.alwaysOnTop=!0),c}function $h(r){let n,e=Number.MIN_VALUE;for(let t of r)t.lastFocusTime>e&&(e=t.lastFocusTime,n=t);return n}function ao(){return N_.BrowserWindow.getAllWindows().filter(r=>!r.webContents.isOffscreen())}var Ke,Lc,zt=_(()=>{k_();Ne();ce();_t();$t();de();In();kc();qo();oo();Ke=V("windowsMainService");(t=>{function r(i,o,s=N_.screen.getAllDisplays()){if(i.trace(`window#validateWindowState: validating window state on ${s.length} display(s)`,o),typeof o.x!="number"||typeof o.y!="number"||typeof o.width!="number"||typeof o.height!="number"){i.trace("window#validateWindowState: unexpected type of state values");return}if(o.width<=0||o.height<=0){i.trace("window#validateWindowState: unexpected negative values");return}if(s.length===1){let c=e(s[0]);if(i.trace("window#validateWindowState: single monitor working area",c),c){let u=function(){!o||typeof o.x!="number"||typeof o.y!="number"||!c||(o.x<c.x&&(o.x=c.x),o.y<c.y&&(o.y=c.y))};u(),o.width>c.width&&(o.width=c.width),o.height>c.height&&(o.height=c.height),o.x>c.x+c.width-128&&(o.x=c.x+c.width-o.width),o.y>c.y+c.height-128&&(o.y=c.y+c.height-o.height),u()}return o}if(o.display&&o.mode===3){let c=s.find(u=>u.id===o.display);if(c&&typeof c.bounds?.x=="number"&&typeof c.bounds?.y=="number"){i.trace("window#validateWindowState: restoring fullscreen to previous display");let u=io(3);return u.x=c.bounds.x,u.y=c.bounds.y,u}}let a,l;try{a=N_.screen.getDisplayMatching({x:o.x,y:o.y,width:o.width,height:o.height}),l=e(a),i.trace("window#validateWindowState: multi-monitor working area",l)}catch(c){i.error("window#validateWindowState: error finding display for window state",c)}if(a&&n(o,a))return o;i.trace("window#validateWindowState: state is outside of the multi-monitor working area")}t.validateWindowState=r;function n(i,o){if(typeof i.x!="number"||typeof i.y!="number"||typeof i.width!="number"||typeof i.height!="number"||i.width<=0||i.height<=0)return!1;let s=e(o);return!!(s&&i.x+i.width>s.x&&i.y+i.height>s.y&&i.x<s.x+s.width&&i.y<s.y+s.height)}t.validateWindowStateOnDisplay=n;function e(i){if(i.workArea.width>0&&i.workArea.height>0)return i.workArea;if(i.bounds.width>0&&i.bounds.height>0)return i.bounds}})(Lc||={})});import Zr from"electron";var Te,lo,Vt=_(()=>{Ti();Ce();ae();te();ce();gi();qe();de();me();vr();oo();$t();zt();Te=V("lifecycleMainService"),lo=class extends M{constructor(e,t,i){super();this.logService=e;this.stateService=t;this.environmentMainService=i;this._onBeforeShutdown=this._register(new C);this.onBeforeShutdown=this._onBeforeShutdown.event;this._onWillShutdown=this._register(new C);this.onWillShutdown=this._onWillShutdown.event;this._onWillLoadWindow=this._register(new C);this.onWillLoadWindow=this._onWillLoadWindow.event;this._onBeforeCloseWindow=this._register(new C);this.onBeforeCloseWindow=this._onBeforeCloseWindow.event;this._quitRequested=!1;this._wasRestarted=!1;this._phase=1;this.windowToCloseRequest=new Set;this.oneTimeListenerTokenGenerator=0;this.windowCounter=0;this.pendingQuitPromise=void 0;this.pendingQuitPromiseResolve=void 0;this.pendingWillShutdownPromise=void 0;this.mapWindowIdToPendingUnload=new Map;this.phaseWhen=new Map;this.relaunchHandler=void 0;this.resolveRestarted(),this.when(2).then(()=>this.registerListeners())}static{this.QUIT_AND_RESTART_KEY="lifecycle.quitAndRestart"}get quitRequested(){return this._quitRequested}get wasRestarted(){return this._wasRestarted}get phase(){return this._phase}resolveRestarted(){this._wasRestarted=!!this.stateService.getItem(lo.QUIT_AND_RESTART_KEY),this._wasRestarted&&this.stateService.removeItem(lo.QUIT_AND_RESTART_KEY)}registerListeners(){let e=()=>{this._quitRequested||(this.trace("Lifecycle#app.on(before-quit)"),this._quitRequested=!0,this.trace("Lifecycle#onBeforeShutdown.fire()"),this._onBeforeShutdown.fire(),$&&this.windowCounter===0&&this.fireOnWillShutdown(1))};Zr.app.addListener("before-quit",e);let t=()=>{this.trace("Lifecycle#app.on(window-all-closed)"),(this._quitRequested||!$)&&Zr.app.quit()};Zr.app.addListener("window-all-closed",t),Zr.app.once("will-quit",i=>{this.trace("Lifecycle#app.on(will-quit) - begin"),i.preventDefault(),this.fireOnWillShutdown(1).finally(()=>{this.trace("Lifecycle#app.on(will-quit) - after fireOnWillShutdown"),this.resolvePendingQuitPromise(!1),Zr.app.removeListener("before-quit",e),Zr.app.removeListener("window-all-closed",t),this.trace("Lifecycle#app.on(will-quit) - calling app.quit()"),Zr.app.quit()})})}fireOnWillShutdown(e){if(this.pendingWillShutdownPromise)return this.pendingWillShutdownPromise;let t=this.logService;this.trace("Lifecycle#onWillShutdown.fire()");let i=[];return this._onWillShutdown.fire({reason:e,join(o,s){t.trace(`Lifecycle#onWillShutdown - begin '${o}'`),i.push(s.finally(()=>{t.trace(`Lifecycle#onWillShutdown - end '${o}'`)}))}}),this.pendingWillShutdownPromise=(async()=>{try{await Ft.settled(i)}catch(o){this.logService.error(o)}try{await this.stateService.close()}catch(o){this.logService.error(o)}})(),this.pendingWillShutdownPromise}set phase(e){if(e<this.phase)throw new Error("Lifecycle cannot go backwards");if(this._phase===e)return;this.trace(`lifecycle (main): phase changed (value: ${e})`),this._phase=e;let t=this.phaseWhen.get(this._phase);t&&(t.open(),this.phaseWhen.delete(this._phase))}async when(e){if(e<=this._phase)return;let t=this.phaseWhen.get(e);t||(t=new Qi,this.phaseWhen.set(e,t)),await t.wait()}registerWindow(e){let t=new ue;this.windowCounter++,t.add(e.onWillLoad(o=>this._onWillLoadWindow.fire({window:e,workspace:o.workspace,reason:o.reason})));let i=Ki(e.win);t.add(x.fromNodeEventEmitter(i,"close")(o=>{let s=e.id;this.windowToCloseRequest.delete(s)||(this.trace(`Lifecycle#window.on('close') - window ID ${e.id}`),o.preventDefault(),this.unload(e,1).then(a=>{if(a){this.windowToCloseRequest.delete(s);return}this.windowToCloseRequest.add(s),this.trace(`Lifecycle#onBeforeCloseWindow.fire() - window ID ${s}`),this._onBeforeCloseWindow.fire(e),e.close()}))})),t.add(x.fromNodeEventEmitter(i,"closed")(()=>{this.trace(`Lifecycle#window.on('closed') - window ID ${e.id}`),this.windowCounter--,t.dispose(),this.windowCounter===0&&(!$||this._quitRequested)&&this.fireOnWillShutdown(1)}))}registerAuxWindow(e){let t=Ki(e.win),i=new ue;i.add(x.fromNodeEventEmitter(t,"close")(o=>{this.trace(`Lifecycle#auxWindow.on('close') - window ID ${e.id}`),this._quitRequested&&(this.trace("Lifecycle#auxWindow.on('close') - preventDefault() because quit requested"),o.preventDefault())})),i.add(x.fromNodeEventEmitter(t,"closed")(()=>{this.trace(`Lifecycle#auxWindow.on('closed') - window ID ${e.id}`),i.dispose()}))}async reload(e,t){await this.unload(e,3)||e.reload(t)}unload(e,t){let i=this.mapWindowIdToPendingUnload.get(e.id);if(i)return i;let o=this.doUnload(e,t).finally(()=>{this.mapWindowIdToPendingUnload.delete(e.id)});return this.mapWindowIdToPendingUnload.set(e.id,o),o}async doUnload(e,t){if(!e.isReady)return!1;this.trace(`Lifecycle#unload() - window ID ${e.id}`);let i=this._quitRequested?2:t,o=await this.onBeforeUnloadWindowInRenderer(e,i);return o?(this.trace(`Lifecycle#unload() - veto in renderer (window ID ${e.id})`),this.handleWindowUnloadVeto(o)):(await this.onWillUnloadWindowInRenderer(e,i),!1)}handleWindowUnloadVeto(e){return e?(this.resolvePendingQuitPromise(!0),this._quitRequested=!1,!0):!1}resolvePendingQuitPromise(e){this.pendingQuitPromiseResolve&&(this.pendingQuitPromiseResolve(e),this.pendingQuitPromiseResolve=void 0,this.pendingQuitPromise=void 0)}onBeforeUnloadWindowInRenderer(e,t){return new Promise(i=>{let o=this.oneTimeListenerTokenGenerator++,s=`vscode:ok${o}`,a=`vscode:cancel${o}`;Tt.once(s,()=>{i(!1)}),Tt.once(a,()=>{i(!0)}),e.send("vscode:onBeforeUnload",{okChannel:s,cancelChannel:a,reason:t})})}onWillUnloadWindowInRenderer(e,t){return new Promise(i=>{let s=`vscode:reply${this.oneTimeListenerTokenGenerator++}`;Tt.once(s,()=>i()),e.send("vscode:onWillUnload",{replyChannel:s,reason:t})})}quit(e){return this.doQuit(e).then(t=>{if(!t&&e)try{if(q){let i=Fr();i!==process.cwd()&&process.chdir(i)}}catch(i){this.logService.error(i)}return t})}doQuit(e){return this.trace(`Lifecycle#quit() - begin (willRestart: ${e})`),this.pendingQuitPromise?(this.trace("Lifecycle#quit() - returning pending quit promise"),this.pendingQuitPromise):(e&&this.stateService.setItem(lo.QUIT_AND_RESTART_KEY,!0),this.pendingQuitPromise=new Promise(t=>{this.pendingQuitPromiseResolve=t,this.trace("Lifecycle#quit() - calling app.quit()"),Zr.app.quit()}),this.pendingQuitPromise)}trace(e){this.environmentMainService.args["enable-smoke-test-driver"]?this.logService.info(e):this.logService.trace(e)}setRelaunchHandler(e){this.relaunchHandler=e}async relaunch(e){this.trace("Lifecycle#relaunch()");let t=process.argv.slice(1);if(e?.addArgs&&t.push(...e.addArgs),e?.removeArgs)for(let s of e.removeArgs){let a=t.indexOf(s);a>=0&&t.splice(a,1)}let i=()=>{this.relaunchHandler?.handleRelaunch(e)||(this.trace("Lifecycle#relaunch() - calling app.relaunch()"),Zr.app.relaunch({args:t}))};Zr.app.once("quit",i),await this.quit(!0)&&Zr.app.removeListener("quit",i)}async kill(e){this.trace("Lifecycle#kill()"),await this.fireOnWillShutdown(2),await Promise.race([bt(1e3),(async()=>{for(let t of ao())if(t&&!t.isDestroyed()){let i;t.webContents&&!t.webContents.isDestroyed()?i=new Promise(o=>t.once("closed",o)):i=Promise.resolve(),t.destroy(),await i}})()]),Zr.app.exit(e)}};lo=D([S(0,z),S(1,Rt),S(2,Fe)],lo)});import*as L_ from"fs";var Ga,M_,OO=_(()=>{Ce();ae();er();Ne();pn();Ga=class r{constructor(n,e=Object.create(null)){this.path=n;this.name=Pe(this.path),this.logger=new M_(e.logging),this.whenConnected=this.connect(this.path)}static{this.IN_MEMORY_PATH=":memory:"}get onDidChangeItemsExternal(){return x.None}static{this.BUSY_OPEN_TIMEOUT=2e3}static{this.MAX_HOST_PARAMETERS=256}async getItems(){let n=await this.whenConnected,e=new Map;return(await this.all(n,"SELECT * FROM ItemTable")).forEach(i=>e.set(i.key,i.value)),this.logger.isTracing&&this.logger.trace(`[storage ${this.name}] getItems(): ${e.size} rows`),e}async updateItems(n){let e=await this.whenConnected;return this.doUpdateItems(e,n)}doUpdateItems(n,e){return this.logger.isTracing&&this.logger.trace(`[storage ${this.name}] updateItems(): insert(${e.insert?QR(e.insert):"0"}), delete(${e.delete?XR(e.delete):"0"})`),this.transaction(n,()=>{let t=e.insert,i=e.delete;if(t&&t.size>0){let o=[];o.push([]);let s=0;t.forEach((a,l)=>{let c=o[s];c.length>r.MAX_HOST_PARAMETERS&&(s++,c=[],o.push(c)),c.push(l,a)}),o.forEach(a=>{this.prepare(n,`INSERT INTO ItemTable VALUES ${new Array(a.length/2).fill("(?,?)").join(",")} ON CONFLICT (key) DO UPDATE SET value = excluded.value WHERE value != excluded.value`,l=>l.run(a),()=>{let l=[],c=0;return t.forEach((u,p)=>{l.push(p),c+=u.length}),`Keys: ${l.join(", ")} Length: ${c}`})})}if(i?.size){let o=[];o.push([]);let s=0;i.forEach(a=>{let l=o[s];l.length>r.MAX_HOST_PARAMETERS&&(s++,l=[],o.push(l)),l.push(a)}),o.forEach(a=>{this.prepare(n,`DELETE FROM ItemTable WHERE key IN (${new Array(a.length).fill("?").join(",")})`,l=>l.run(a),()=>{let l=[];return i.forEach(c=>{l.push(c)}),`Keys: ${l.join(", ")}`})})}})}async optimize(){this.logger.trace(`[storage ${this.name}] vacuum()`);let n=await this.whenConnected;return this.exec(n,"VACUUM")}async close(n){this.logger.trace(`[storage ${this.name}] close()`);let e=await this.whenConnected;return this.doClose(e,n)}doClose(n,e){return new Promise((t,i)=>{n.db.close(o=>(o&&this.handleSQLiteError(n,`[storage ${this.name}] close(): ${o}`),this.path===r.IN_MEMORY_PATH?t():!n.isErroneous&&!n.isInMemory?this.backup().then(t,s=>(this.logger.error(`[storage ${this.name}] backup(): ${s}`),t())):typeof e=="function"?L_.promises.unlink(this.path).then(()=>this.doConnect(this.path).then(s=>{let a=()=>this.doClose(s,void 0);return this.doUpdateItems(s,{insert:e()}).then(()=>a(),l=>(a(),Promise.reject(l)))})).then(t,i):i(o||new Error("Database has errors or is in-memory without recovery option"))))})}backup(){let n=this.toBackupPath(this.path);return re.copy(this.path,n,{preserveSymlinks:!1})}toBackupPath(n){return`${n}.backup`}async checkIntegrity(n){this.logger.trace(`[storage ${this.name}] checkIntegrity(full: ${n})`);let e=await this.whenConnected,t=await this.get(e,n?"PRAGMA integrity_check":"PRAGMA quick_check"),i=n?t.integrity_check:t.quick_check;return e.isErroneous?`${i} (last error: ${e.lastError})`:e.isInMemory?`${i} (in-memory!)`:i}async connect(n,e=!0){this.logger.trace(`[storage ${this.name}] open(${n}, retryOnBusy: ${e})`);try{return await this.doConnect(n)}catch(t){if(this.logger.error(`[storage ${this.name}] open(): Unable to open DB due to ${t}`),t.code==="SQLITE_BUSY"&&e)return await bt(r.BUSY_OPEN_TIMEOUT),this.connect(n,!1);try{await L_.promises.unlink(n);try{await re.rename(this.toBackupPath(n),n,!1)}catch{}return await this.doConnect(n)}catch(i){return this.logger.error(`[storage ${this.name}] open(): Unable to use backup due to ${i}`),this.doConnect(r.IN_MEMORY_PATH)}}}handleSQLiteError(n,e){n.isErroneous=!0,n.lastError=e,this.logger.error(e)}doConnect(n){return new Promise((e,t)=>{import("@vscode/sqlite3").then(i=>{let o=this.logger.isTracing?i.default.verbose().Database:i.default.Database,s={db:new o(n,a=>a?s.db&&a.code!=="SQLITE_CANTOPEN"?s.db.close(()=>t(a)):t(a):this.exec(s,["PRAGMA user_version = 1;","CREATE TABLE IF NOT EXISTS ItemTable (key TEXT UNIQUE ON CONFLICT REPLACE, value BLOB)"].join("")).then(()=>e(s),l=>s.db.close(()=>t(l)))),isInMemory:n===r.IN_MEMORY_PATH};s.db.on("error",a=>this.handleSQLiteError(s,`[storage ${this.name}] Error (event): ${a}`)),this.logger.isTracing&&s.db.on("trace",a=>this.logger.trace(`[storage ${this.name}] Trace (event): ${a}`))},t)})}exec(n,e){return new Promise((t,i)=>{n.db.exec(e,o=>o?(this.handleSQLiteError(n,`[storage ${this.name}] exec(): ${o}`),i(o)):t())})}get(n,e){return new Promise((t,i)=>{n.db.get(e,(o,s)=>o?(this.handleSQLiteError(n,`[storage ${this.name}] get(): ${o}`),i(o)):t(s))})}all(n,e){return new Promise((t,i)=>{n.db.all(e,(o,s)=>o?(this.handleSQLiteError(n,`[storage ${this.name}] all(): ${o}`),i(o)):t(s))})}transaction(n,e){return new Promise((t,i)=>{n.db.serialize(()=>{n.db.run("BEGIN TRANSACTION"),e(),n.db.run("END TRANSACTION",o=>o?(this.handleSQLiteError(n,`[storage ${this.name}] transaction(): ${o}`),i(o)):t())})})}prepare(n,e,t,i){let o=n.db.prepare(e),s=a=>{this.handleSQLiteError(n,`[storage ${this.name}] prepare(): ${a} (${e}). Details: ${i()}`)};o.on("error",s),t(o),o.finalize(a=>{a&&s(a),o.removeListener("error",s)})}},M_=class r{static{this.VSCODE_TRACE_STORAGE="VSCODE_TRACE_STORAGE"}constructor(n){n&&typeof n.logTrace=="function"&&process.env[r.VSCODE_TRACE_STORAGE]&&(this.logTrace=n.logTrace),n&&typeof n.logError=="function"&&(this.logError=n.logError)}get isTracing(){return!!this.logTrace}trace(n){this.logTrace?.(n)}error(n){this.logError?.(n)}}});var St,rX,U_,F_,kO,Zh,eI,vm,NO,Mc,tI,Em,Tn=_(()=>{de();St=V("telemetryService"),rX=V("customEndpointTelemetryService"),U_="telemetry.currentSessionDate",F_="telemetry.firstSessionDate",kO="telemetry.lastSessionDate",Zh="telemetry.machineId",eI="telemetry.sqmId",vm="telemetry.devDeviceId",NO="telemetry",Mc="telemetry.telemetryLevel",tI="telemetry.enableCrashReporter",Em="telemetry.enableTelemetry"});import*as LO from"fs";var ym,nI,rI,iI,oI,Sm,MO=_(()=>{dn();Ce();ae();te();Ne();Sa();Ie();pn();S_();OO();me();Ba();Tn();Ln();at();ym=class r extends M{constructor(e,t){super();this.logService=e;this.fileService=t;this._onDidChangeStorage=this._register(new C);this.onDidChangeStorage=this._onDidChangeStorage.event;this._onDidCloseStorage=this._register(new C);this.onDidCloseStorage=this._onDidCloseStorage.event;this._storage=this._register(new xs(new Tc,{hint:1}));this.initializePromise=void 0;this.whenInitPromise=new un;this.whenInit=this.whenInitPromise.p;this.state=0}static{this.LOG_SLOW_CLOSE_THRESHOLD=2e3}get storage(){return this._storage}isInMemory(){return this._storage.isInMemory()}init(){return this.initializePromise||(this.initializePromise=(async()=>{if(this.state===0)try{let e=this._register(await this.doCreate());this._storage.dispose(),this._storage=e,this._register(e.onDidChangeStorage(i=>this._onDidChangeStorage.fire(i))),await this.doInit(e);let t=e.getBoolean(hm);t===void 0?e.set(hm,!0):t&&e.set(hm,!1)}catch(e){this.logService.error(`[storage main] initialize(): Unable to init storage due to ${e}`)}finally{this.state=1,this.whenInitPromise.complete()}})()),this.initializePromise}createLoggingOptions(){return{logTrace:this.logService.getLevel()===1?e=>this.logService.trace(e):void 0,logError:e=>this.logService.error(e)}}doInit(e){return e.init()}get items(){return this._storage.items}get(e,t){return this._storage.get(e,t)}set(e,t){return this._storage.set(e,t)}delete(e){return this._storage.delete(e)}optimize(){return this._storage.optimize()}async close(){let e=new Rr(!1);await this.doClose(),e.stop(),e.elapsed()>r.LOG_SLOW_CLOSE_THRESHOLD&&await this.logSlowClose(e),this._onDidCloseStorage.fire()}async logSlowClose(e){if(this.path)try{let t=VR(Array.from(this._storage.items.entries()).map(([o,s])=>({key:o,length:s.length})),(o,s)=>s.length-o.length,5).map(o=>`${o.key}:${o.length}`).join(", "),i=(await this.fileService.stat(A.file(this.path))).size;this.logService.warn(`[storage main] detected slow close() operation: Time: ${e.elapsed()}ms, DB size: ${i}b, Large Keys: ${t}`)}catch(t){this.logService.error("[storage main] figuring out stats for slow DB on close() resulted in an error",t)}}async doClose(){this.initializePromise&&await this.initializePromise,this.state=2,await this._storage.close()}},nI=class r extends ym{constructor(e,t,i,o){super(i,o);this.profile=e;this.options=t}static{this.STORAGE_NAME="state.vscdb"}get path(){if(!this.options.useInMemoryStorage)return H(this.profile.globalStorageHome.with({scheme:Y.file}).fsPath,r.STORAGE_NAME)}async doCreate(){return new xs(new Ga(this.path??Ga.IN_MEMORY_PATH,{logging:this.createLoggingOptions()}),this.path?void 0:{hint:1})}},rI=class extends nI{},iI=class extends nI{constructor(n,e,t,i){super(e.defaultProfile,n,t,i)}async doInit(n){await super.doInit(n),this.updateTelemetryState(n)}updateTelemetryState(n){n.get(F_,void 0)===void 0&&n.set(F_,new Date().toUTCString());let t=n.get(U_,void 0),i=new Date().toUTCString();n.set(kO,typeof t>"u"?null:t),n.set(U_,i)}},oI=class r extends ym{constructor(e,t,i,o,s){super(i,s);this.workspace=e;this.options=t;this.environmentService=o}static{this.WORKSPACE_STORAGE_NAME="state.vscdb"}static{this.WORKSPACE_META_NAME="workspace.json"}get path(){if(!this.options.useInMemoryStorage)return H(this.environmentService.workspaceStorageHome.with({scheme:Y.file}).fsPath,this.workspace.id,r.WORKSPACE_STORAGE_NAME)}async doCreate(){let{storageFilePath:e,wasCreated:t}=await this.prepareWorkspaceStorageFolder();return new xs(new Ga(e,{logging:this.createLoggingOptions()}),{hint:this.options.useInMemoryStorage?1:t?0:void 0})}async prepareWorkspaceStorageFolder(){if(this.options.useInMemoryStorage)return{storageFilePath:Ga.IN_MEMORY_PATH,wasCreated:!0};let e=H(this.environmentService.workspaceStorageHome.with({scheme:Y.file}).fsPath,this.workspace.id),t=H(e,r.WORKSPACE_STORAGE_NAME);return await re.exists(e)?{storageFilePath:t,wasCreated:!1}:(await LO.promises.mkdir(e,{recursive:!0}),this.ensureWorkspaceStorageFolderMeta(e),{storageFilePath:t,wasCreated:!0})}async ensureWorkspaceStorageFolderMeta(e){let t;if(Kt(this.workspace)?t={folder:this.workspace.uri.toString()}:yt(this.workspace)&&(t={workspace:this.workspace.configPath.toString()}),t)try{let i=H(e,r.WORKSPACE_META_NAME);await re.exists(i)||await re.writeFile(i,JSON.stringify(t,void 0,2))}catch(i){this.logService.error(`[storage main] ensureWorkspaceStorageFolderMeta(): Unable to create workspace storage metadata due to ${i}`)}}},Sm=class extends ym{get path(){}async doCreate(){return new xs(new Tc,{hint:1})}}});var W_,_m,Fc,B_=_(()=>{Ce();Et();te();qe();fr();ct();me();W_=class extends M{constructor(e,t,i,o){super();this.storagePath=e;this.logService=i;this.fileService=o;this.storage=Object.create(null);this.lastSavedStorageContents="";this.initializing=void 0;this.closing=void 0;this.flushDelayer=this._register(new Jn(t===0?0:100))}init(){return this.initializing||(this.initializing=this.doInit()),this.initializing}async doInit(){try{this.lastSavedStorageContents=(await this.fileService.readFile(this.storagePath)).value.toString(),this.storage=JSON.parse(this.lastSavedStorageContents)}catch(e){e.fileOperationResult!==1&&this.logService.error(e)}}getItem(e,t){let i=this.storage[e];return Qt(i)?t:i}setItem(e,t){this.setItems([{key:e,data:t}])}setItems(e){let t=!1;for(let{key:i,data:o}of e)this.storage[i]!==o&&(Qt(o)?Qr(this.storage[i])||(this.storage[i]=void 0,t=!0):(this.storage[i]=o,t=!0));t&&this.save()}removeItem(e){Qr(this.storage[e])||(this.storage[e]=void 0,this.save())}async save(){if(!this.closing)return this.flushDelayer.trigger(()=>this.doSave())}async doSave(){if(!this.initializing)return;await this.initializing;let e=JSON.stringify(this.storage,null,4);if(e!==this.lastSavedStorageContents)try{await this.fileService.writeFile(this.storagePath,ee.fromString(e),{atomic:{postfix:".vsctmp"}}),this.lastSavedStorageContents=e}catch(t){this.logService.error(t)}}async close(){return this.closing||(this.closing=this.flushDelayer.trigger(()=>this.doSave(),0)),this.closing}},_m=class extends M{constructor(n,e,t,i){super(),this.fileStorage=this._register(new W_(e.stateResource,n,t,i))}async init(){await this.fileStorage.init()}getItem(n,e){return this.fileStorage.getItem(n,e)}};_m=D([S(1,mr),S(2,z),S(3,Be)],_m);Fc=class extends _m{setItem(n,e){this.fileStorage.setItem(n,e)}setItems(n){this.fileStorage.setItems(n)}removeItem(n){this.fileStorage.removeItem(n)}close(){return this.fileStorage.close()}}});var Ms,ei,sI,UO=_(()=>{Ie();fr();ct();me();vr();Pi();Ci();qe();B_();Ms=class extends xc{constructor(e,t,i,o,s){super(i,o,t,s);this.stateReadonlyService=e;this.nativeEnvironmentService=i}getStoredProfiles(){return this.stateReadonlyService.getItem(Ms.PROFILES_KEY,[]).map(t=>({...t,location:Ye(t.location)?this.uriIdentityService.extUri.joinPath(this.profilesHome,t.location):A.revive(t.location)}))}getStoredProfileAssociations(){return this.stateReadonlyService.getItem(Ms.PROFILE_ASSOCIATIONS_KEY,{})}getDefaultProfileExtensionsLocation(){return this.uriIdentityService.extUri.joinPath(A.file(this.nativeEnvironmentService.extensionsPath).with({scheme:this.profilesHome.scheme}),"extensions.json")}};Ms=D([S(0,Yh),S(1,jt),S(2,kn),S(3,Be),S(4,z)],Ms);ei=class extends Ms{constructor(e,t,i,o,s){super(e,t,i,o,s);this.stateService=e}saveStoredProfiles(e){e.length?this.stateService.setItem(ei.PROFILES_KEY,e.map(t=>({...t,location:this.uriIdentityService.extUri.relativePath(this.profilesHome,t.location)}))):this.stateService.removeItem(ei.PROFILES_KEY)}saveStoredProfileAssociations(e){e.emptyWindows||e.workspaces?this.stateService.setItem(ei.PROFILE_ASSOCIATIONS_KEY,e):this.stateService.removeItem(ei.PROFILE_ASSOCIATIONS_KEY)}};ei=D([S(0,Rt),S(1,jt),S(2,kn),S(3,Be),S(4,z)],ei);sI=class extends ei{constructor(n,e,t,i){super(new Fc(0,e,i,t),n,e,t,i)}async init(){return await this.stateService.init(),super.init()}};sI=D([S(0,jt),S(1,kn),S(2,Be),S(3,z)],sI)});var rr,Wc,Us=_(()=>{fr();ct();de();me();Pi();Ci();UO();vr();rr=zn,Wc=class extends ei{constructor(n,e,t,i,o){super(n,e,t,i,o)}getAssociatedEmptyWindows(){let n=[];for(let e of this.profilesObject.emptyWindows.keys())n.push({id:e});return n}};Wc=D([S(0,Rt),S(1,jt),S(2,kn),S(3,Be),S(4,z)],Wc)});var Ha,Bc,Fs,Vc,bm=_(()=>{Ie();ae();te();fr();ct();de();Vt();me();Ba();MO();Ci();Us();Pi();at();Ha=V("storageMainService"),Bc=class extends M{constructor(e,t,i,o,s,a){super();this.logService=e;this.environmentService=t;this.userDataProfilesService=i;this.lifecycleMainService=o;this.fileService=s;this.uriIdentityService=a;this.shutdownReason=void 0;this._onDidChangeProfileStorage=this._register(new C);this.onDidChangeProfileStorage=this._onDidChangeProfileStorage.event;this.mapProfileToStorage=new Map;this.mapWorkspaceToStorage=new Map;this.applicationStorage=this._register(this.createApplicationStorage()),this.registerListeners()}getStorageOptions(){return{useInMemoryStorage:!!this.environmentService.extensionTestsLocationURI}}registerListeners(){(async()=>(await this.lifecycleMainService.when(3),this.applicationStorage.init()))(),this._register(this.lifecycleMainService.onWillLoadWindow(e=>{e.window.profile&&this.profileStorage(e.window.profile).init(),e.workspace&&this.workspaceStorage(e.workspace).init()})),this._register(this.lifecycleMainService.onWillShutdown(e=>{this.logService.trace("storageMainService#onWillShutdown()"),this.shutdownReason=e.reason,e.join("applicationStorage",this.applicationStorage.close());for(let[,t]of this.mapProfileToStorage)e.join("profileStorage",t.close());for(let[,t]of this.mapWorkspaceToStorage)e.join("workspaceStorage",t.close())})),this._register(this.userDataProfilesService.onWillCreateProfile(e=>{e.join((async()=>{await this.fileService.exists(e.profile.globalStorageHome)||await this.fileService.createFolder(e.profile.globalStorageHome)})())})),this._register(this.userDataProfilesService.onWillRemoveProfile(e=>{let t=this.mapProfileToStorage.get(e.profile.id);t&&e.join(t.close())}))}createApplicationStorage(){this.logService.trace("StorageMainService: creating application storage");let e=new iI(this.getStorageOptions(),this.userDataProfilesService,this.logService,this.fileService);return this._register(x.once(e.onDidCloseStorage)(()=>{this.logService.trace("StorageMainService: closed application storage")})),e}profileStorage(e){if(jh(e))return this.applicationStorage;let t=this.mapProfileToStorage.get(e.id);if(!t){this.logService.trace(`StorageMainService: creating profile storage (${e.name})`),t=this._register(this.createProfileStorage(e)),this.mapProfileToStorage.set(e.id,t);let i=t.onDidChangeStorage(o=>this._onDidChangeProfileStorage.fire({...o,storage:t,profile:e}));x.once(t.onDidCloseStorage)(()=>{this.logService.trace(`StorageMainService: closed profile storage (${e.name})`),this.mapProfileToStorage.delete(e.id),i.dispose()})}return t}createProfileStorage(e){return this.shutdownReason===2?new Sm(this.logService,this.fileService):new rI(e,this.getStorageOptions(),this.logService,this.fileService)}workspaceStorage(e){let t=this.mapWorkspaceToStorage.get(e.id);return t||(this.logService.trace(`StorageMainService: creating workspace storage (${e.id})`),t=this._register(this.createWorkspaceStorage(e)),this.mapWorkspaceToStorage.set(e.id,t),x.once(t.onDidCloseStorage)(()=>{this.logService.trace(`StorageMainService: closed workspace storage (${e.id})`),this.mapWorkspaceToStorage.delete(e.id)})),t}createWorkspaceStorage(e){return this.shutdownReason===2?new Sm(this.logService,this.fileService):new oI(e,this.getStorageOptions(),this.logService,this.environmentService,this.fileService)}isUsed(e){let t=A.file(e);for(let i of[this.applicationStorage,...this.mapProfileToStorage.values(),...this.mapWorkspaceToStorage.values()])if(i.path&&this.uriIdentityService.extUri.isEqualOrParent(A.file(i.path),t))return!0;return!1}};Bc=D([S(0,z),S(1,mr),S(2,rr),S(3,Te),S(4,Be),S(5,jt)],Bc);Fs=V("applicationStorageMainService"),Vc=class extends Kh{constructor(e,t){super();this.userDataProfilesService=e;this.storageMainService=t;this.whenReady=this.storageMainService.applicationStorage.whenInit}doInitialize(){return this.storageMainService.applicationStorage.whenInit}getStorage(e){if(e===-1)return this.storageMainService.applicationStorage.storage}getLogDetails(e){if(e===-1)return this.userDataProfilesService.defaultProfile.globalStorageHome.with({scheme:Y.file}).fsPath}shouldFlushWhenIdle(){return!1}switch(){throw new Error("Migrating storage is unsupported from main process")}switchToProfile(){throw new Error("Switching storage profile is unsupported from main process")}switchToWorkspace(){throw new Error("Switching storage workspace is unsupported from main process")}hasScope(){throw new Error("Main process is never profile or workspace scoped")}};Vc=D([S(0,zn),S(1,Ha)],Vc)});import{app as U9}from"electron";var Tm,Gc,V_=_(()=>{Bt();ae();eo();te();Ie();Xt();_t();bh();$t();de();me();Ba();bm();zt();Tm=V("proxyAuthService"),Gc=class extends M{constructor(e,t,i,o,s,a){super();this.logService=e;this.windowsMainService=t;this.encryptionMainService=i;this.applicationStorageMainService=o;this.configurationService=s;this.environmentMainService=a;this.PROXY_CREDENTIALS_SERVICE_KEY="proxy-credentials://";this.pendingProxyResolves=new Map;this.currentDialog=void 0;this.cancelledAuthInfoHashes=new Set;this.sessionCredentials=new Map;this.registerListeners()}registerListeners(){let e=x.fromNodeEventEmitter(U9,"login",(t,i,o,s,a)=>({event:t,authInfo:{...s,attempt:o.firstAuthAttempt?1:2},callback:a}));this._register(e(this.onLogin,this))}async lookupAuthorization(e){return this.onLogin({authInfo:e})}async onLogin({event:e,authInfo:t,callback:i}){if(!t.isProxy)return;e?.preventDefault();let o=String(wn({scheme:t.scheme,host:t.host,port:t.port})),s,a=this.pendingProxyResolves.get(o);if(a)this.logService.trace("auth#onLogin (proxy) - pending proxy handling found"),s=await a;else{this.logService.trace("auth#onLogin (proxy) - no pending proxy handling found, starting new"),a=this.resolveProxyCredentials(t,o),this.pendingProxyResolves.set(o,a);try{s=await a}finally{this.pendingProxyResolves.delete(o)}}return i?.(s?.username,s?.password),s}async resolveProxyCredentials(e,t){this.logService.trace("auth#resolveProxyCredentials (proxy) - enter");try{let i=await this.doResolveProxyCredentials(e,t);if(i)return this.logService.trace("auth#resolveProxyCredentials (proxy) - got credentials"),i;this.logService.trace("auth#resolveProxyCredentials (proxy) - did not get credentials")}finally{this.logService.trace("auth#resolveProxyCredentials (proxy) - exit")}}async doResolveProxyCredentials(e,t){if(this.logService.trace("auth#doResolveProxyCredentials - enter",e),this.environmentMainService.extensionTestsLocationURI){try{let u=Buffer.from(e.realm,"base64").toString("utf-8");if(u.startsWith("{"))return JSON.parse(u)}catch{}return}let i=(this.configurationService.getValue("http.proxy")||"").trim()||(process.env.https_proxy||process.env.HTTPS_PROXY||process.env.http_proxy||process.env.HTTP_PROXY||"").trim()||void 0;if(i?.indexOf("@")!==-1){let u=A.parse(i),p=u.authority.indexOf("@");if(p!==-1){if(e.attempt>1){this.logService.trace("auth#doResolveProxyCredentials (proxy) - exit - ignoring previously used config/envvar credentials");return}this.logService.trace("auth#doResolveProxyCredentials (proxy) - exit - found config/envvar credentials to use");let m=u.authority.substring(0,p),h=m.indexOf(":");return h!==-1?{username:m.substring(0,h),password:m.substring(h+1)}:{username:m,password:""}}}let o=e.attempt===1&&this.sessionCredentials.get(t);if(o){this.logService.trace("auth#doResolveProxyCredentials (proxy) - exit - found session credentials to use");let{username:u,password:p}=o;return{username:u,password:p}}let s,a;try{let u=this.applicationStorageMainService.get(this.PROXY_CREDENTIALS_SERVICE_KEY+t,-1);if(u){let p=JSON.parse(await this.encryptionMainService.decrypt(u));s=p.username,a=p.password}}catch(u){this.logService.error(u)}if(e.attempt===1&&typeof s=="string"&&typeof a=="string")return this.logService.trace("auth#doResolveProxyCredentials (proxy) - exit - found stored credentials to use"),this.sessionCredentials.set(t,{username:s,password:a}),{username:s,password:a};let l=this.currentDialog,c=this.currentDialog=(async()=>{await l;let u=await this.showProxyCredentialsDialog(e,t,s,a);return this.currentDialog===c&&(this.currentDialog=void 0),u})();return c}async showProxyCredentialsDialog(e,t,i,o){if(this.cancelledAuthInfoHashes.has(t)){this.logService.trace("auth#doResolveProxyCredentials (proxy) - exit - login dialog was cancelled before, not showing again");return}let s=this.windowsMainService.getFocusedWindow()||this.windowsMainService.getLastActiveWindow();if(!s){this.logService.trace("auth#doResolveProxyCredentials (proxy) - exit - no opened window found to show dialog in");return}this.logService.trace(`auth#doResolveProxyCredentials (proxy) - asking window ${s.id} to handle proxy login`);let a=this.sessionCredentials.get(t),l={authInfo:e,username:a?.username??i,password:a?.password??o,replyChannel:`vscode:proxyAuthResponse:${Me()}`};s.sendWhenReady("vscode:openProxyAuthenticationDialog",Le.None,l);let c=await new Promise(u=>{let p=async(m,h,E)=>{if(h===l.replyChannel)if(this.logService.trace(`auth#doResolveProxyCredentials - exit - received credentials from window ${s.id}`),s.win?.webContents.off("ipc-message",p),E){let y={username:E.username,password:E.password};try{if(E.remember){let P=await this.encryptionMainService.encrypt(JSON.stringify(y));this.applicationStorageMainService.store(this.PROXY_CREDENTIALS_SERVICE_KEY+t,P,-1,1)}else this.applicationStorageMainService.remove(this.PROXY_CREDENTIALS_SERVICE_KEY+t,-1)}catch(P){this.logService.error(P)}u({username:y.username,password:y.password})}else this.cancelledAuthInfoHashes.add(t),u(void 0)};s.win?.webContents.on("ipc-message",p)});return this.sessionCredentials.set(t,c),c}};Gc=D([S(0,z),S(1,Ke),S(2,Zp),S(3,Fs),S(4,Ae),S(5,Fe)],Gc)});var co,Hc=_(()=>{de();co=V("backupMainService")});function WO(r){return typeof r?.backupFolder=="string"}function BO(r){let n=[];try{Array.isArray(r.workspaces)&&(n=r.workspaces.map(e=>({workspace:{id:e.id,configPath:A.parse(e.configURIPath)},remoteAuthority:e.remoteAuthority})))}catch{}return n}function VO(r){let n=[];try{Array.isArray(r.folders)&&(n=r.folders.map(e=>({folderUri:A.parse(e.folderUri),remoteAuthority:e.remoteAuthority})))}catch{}return n}var GO=_(()=>{Ie()});function HO(r){return r?.hasOwnProperty("folderUri")}var JO=_(()=>{});import{createHash as G_}from"crypto";function Ko(r){function n(){let e=r.scheme===Y.file?Dn(r):r.toString();return fe||(e=e.toLowerCase()),G_("md5").update(e).digest("hex")}return{id:n(),configPath:r}}function lI(r,n){function e(){if(r.scheme!==Y.file)return G_("md5").update(r.toString()).digest("hex");if(!n)return;let i;return fe?i=n.ino:$?i=n.birthtime.getTime():q&&(typeof n.birthtimeMs=="number"?i=Math.floor(n.birthtimeMs):i=n.birthtime.getTime()),G_("md5").update(r.fsPath).update(i?String(i):"").digest("hex")}let t=e();if(typeof t=="string")return{id:t,uri:r}}function Pm(){return{id:(Date.now()+Math.round(Math.random()*1e3)).toString()}}var dZ,cI=_(()=>{at();ce();Ut();dZ=128/4});import{createHash as W9}from"crypto";var jo,qO=_(()=>{xr();at();Ne();ce();Ut();pn();GO();_t();$t();vr();ct();me();JO();Ln();cI();jo=class{constructor(n,e,t,i){this.configurationService=e;this.logService=t;this.stateService=i;this.workspaces=[];this.folders=[];this.emptyWindows=[];this.backupUriComparer=lt;this.backupPathComparer={isEqual:(n,e)=>Es(n,e,!fe)};this.backupHome=n.backupHome}static{this.backupWorkspacesMetadataStorageKey="backupWorkspaces"}async initialize(){let n=this.stateService.getItem(jo.backupWorkspacesMetadataStorageKey)??{workspaces:[],folders:[],emptyWindows:[]};this.emptyWindows=await this.validateEmptyWorkspaces(n.emptyWindows),this.workspaces=await this.validateWorkspaces(BO(n)),this.folders=await this.validateFolders(VO(n)),this.storeWorkspacesMetadata()}getWorkspaceBackups(){return this.isHotExitOnExitAndWindowClose()?[]:this.workspaces.slice(0)}getFolderBackups(){return this.isHotExitOnExitAndWindowClose()?[]:this.folders.slice(0)}isHotExitEnabled(){return this.getHotExitConfig()!==Gh.OFF}isHotExitOnExitAndWindowClose(){return this.getHotExitConfig()===Gh.ON_EXIT_AND_WINDOW_CLOSE}getHotExitConfig(){return this.configurationService.getValue()?.files?.hotExit||Gh.ON_EXIT}getEmptyWindowBackups(){return this.emptyWindows.slice(0)}registerWorkspaceBackup(n,e){this.workspaces.some(i=>n.workspace.id===i.workspace.id)||(this.workspaces.push(n),this.storeWorkspacesMetadata());let t=H(this.backupHome,n.workspace.id);return e?this.moveBackupFolder(t,e).then(()=>t):t}async moveBackupFolder(n,e){if(await re.exists(n)&&await this.convertToEmptyWindowBackup(n),await re.exists(e))try{await re.rename(e,n,!1)}catch(t){this.logService.error(`Backup: Could not move backup folder to new location: ${t.toString()}`)}}registerFolderBackup(n){return this.folders.some(e=>this.backupUriComparer.isEqual(n.folderUri,e.folderUri))||(this.folders.push(n),this.storeWorkspacesMetadata()),H(this.backupHome,this.getFolderHash(n))}registerEmptyWindowBackup(n){return this.emptyWindows.some(e=>!!e.backupFolder&&this.backupPathComparer.isEqual(e.backupFolder,n.backupFolder))||(this.emptyWindows.push(n),this.storeWorkspacesMetadata()),H(this.backupHome,n.backupFolder)}async validateWorkspaces(n){if(!Array.isArray(n))return[];let e=new Set,t=[];for(let i of n){let o=i.workspace;if(!yt(o))return[];if(!e.has(o.id)){e.add(o.id);let s=H(this.backupHome,o.id);await this.doHasBackups(s)?o.configPath.scheme!==Y.file||await re.exists(o.configPath.fsPath)?t.push(i):await this.convertToEmptyWindowBackup(s):await this.deleteStaleBackup(s)}}return t}async validateFolders(n){if(!Array.isArray(n))return[];let e=[],t=new Set;for(let i of n){let o=i.folderUri,s=this.backupUriComparer.getComparisonKey(o);if(!t.has(s)){t.add(s);let a=H(this.backupHome,this.getFolderHash(i));await this.doHasBackups(a)?o.scheme!==Y.file||await re.exists(o.fsPath)?e.push(i):await this.convertToEmptyWindowBackup(a):await this.deleteStaleBackup(a)}}return e}async validateEmptyWorkspaces(n){if(!Array.isArray(n))return[];let e=[],t=new Set;for(let i of n){let o=i.backupFolder;if(typeof o!="string")return[];if(!t.has(o)){t.add(o);let s=H(this.backupHome,o);await this.doHasBackups(s)?e.push(i):await this.deleteStaleBackup(s)}}return e}async deleteStaleBackup(n){try{await re.rm(n,1)}catch(e){this.logService.error(`Backup: Could not delete stale backup: ${e.toString()}`)}}prepareNewEmptyWindowBackup(){let n=Pm();for(;this.emptyWindows.some(e=>!!e.backupFolder&&this.backupPathComparer.isEqual(e.backupFolder,n.id));)n=Pm();return{backupFolder:n.id}}async convertToEmptyWindowBackup(n){let e=this.prepareNewEmptyWindowBackup(),t=H(this.backupHome,e.backupFolder);try{await re.rename(n,t,!1)}catch(i){return this.logService.error(`Backup: Could not rename backup folder: ${i.toString()}`),!1}return this.emptyWindows.push(e),!0}async getDirtyWorkspaces(){let n=[];for(let e of this.workspaces)await this.hasBackups(e)&&n.push(e);for(let e of this.folders)await this.hasBackups(e)&&n.push(e);return n}hasBackups(n){let e;return WO(n)?e=H(this.backupHome,n.backupFolder):HO(n)?e=H(this.backupHome,this.getFolderHash(n)):e=H(this.backupHome,n.workspace.id),this.doHasBackups(e)}async doHasBackups(n){try{let e=await re.readdir(n);for(let t of e)try{if((await re.readdir(H(n,t))).length>0)return!0}catch{}}catch{}return!1}storeWorkspacesMetadata(){let n={workspaces:this.workspaces.map(({workspace:e,remoteAuthority:t})=>{let i={id:e.id,configURIPath:e.configPath.toString()};return t&&(i.remoteAuthority=t),i}),folders:this.folders.map(({folderUri:e,remoteAuthority:t})=>{let i={folderUri:e.toString()};return t&&(i.remoteAuthority=t),i}),emptyWindows:this.emptyWindows.map(({backupFolder:e,remoteAuthority:t})=>{let i={backupFolder:e};return t&&(i.remoteAuthority=t),i})};this.stateService.setItem(jo.backupWorkspacesMetadataStorageKey,n)}getFolderHash(n){let e=n.folderUri,t;return e.scheme===Y.file?t=fe?e.fsPath:e.fsPath.toLowerCase():t=e.toString().toLowerCase(),W9("md5").update(t).digest("hex")}};jo=D([S(0,Fe),S(1,Ae),S(2,z),S(3,Rt)],jo)});function Cm(r,n,e=B9){let t=r.find((m,h)=>m.length>0&&m[0]!=="-"&&n.hasOwnProperty(m)&&n[m].type==="subcommand"),i={},o=["_"],s=[],a={},l;for(let m in n){let h=n[m];h.type==="subcommand"?m===t&&(l=h):(h.alias&&(i[m]=h.alias),h.type==="string"||h.type==="string[]"?(o.push(m),h.deprecates&&o.push(...h.deprecates)):h.type==="boolean"&&(s.push(m),h.deprecates&&s.push(...h.deprecates)),h.global&&(a[m]=h))}if(l&&t){let m=a;for(let P in l.options)m[P]=l.options[P];let h=r.filter(P=>P!==t),E=e.getSubcommandReporter?e.getSubcommandReporter(t):void 0,y=Cm(h,m,E);return{[t]:y,_:[]}}let c=(0,KO.default)(r,{string:o,boolean:s,alias:i}),u={},p=c;u._=c._.map(m=>String(m)).filter(m=>m.length>0),delete p._;for(let m in n){let h=n[m];if(h.type==="subcommand")continue;h.alias&&delete p[h.alias];let E=p[m];if(h.deprecates)for(let y of h.deprecates)p.hasOwnProperty(y)&&(E||(E=p[y],E&&e.onDeprecatedOption(y,h.deprecationMessage||v(1896,null,m))),delete p[y]);if(typeof E<"u"){if(h.type==="string[]"){if(Array.isArray(E)||(E=[E]),!h.allowEmptyValue){let y=E.filter(P=>P.length>0);y.length!==E.length&&(e.onEmptyValue(m),E=y.length>0?y:void 0)}}else h.type==="string"&&(Array.isArray(E)?(E=E.pop(),e.onMultipleValues(m,E)):!E&&!h.allowEmptyValue&&(e.onEmptyValue(m),E=void 0));u[m]=E,h.deprecationMessage&&e.onDeprecatedOption(m,h.deprecationMessage)}delete p[m]}for(let m in p)e.onUnknownOption(m);return u}var KO,BZ,H_,dI,B9,J_=_(()=>{KO=k1(ky(),1);ce();We();BZ={o:v(1920,null),e:v(1905,null),t:v(1933,null),m:v(1916,null)},H_=["tunnel","serve-web"],dI={"serve-web":{type:"subcommand",description:"Run a server that displays the editor UI in browsers.",options:{"cli-data-dir":{type:"string",args:"dir",description:v(1895,null)},"disable-telemetry":{type:"boolean"},"telemetry-level":{type:"string"}}},tunnel:{type:"subcommand",description:"Make the current machine accessible from vscode.dev or other machines through a secure tunnel.",options:{"cli-data-dir":{type:"string",args:"dir",description:v(1895,null)},"disable-telemetry":{type:"boolean"},"telemetry-level":{type:"string"},user:{type:"subcommand",options:{login:{type:"subcommand",options:{provider:{type:"string"},"access-token":{type:"string"}}}}}}},diff:{type:"boolean",cat:"o",alias:"d",args:["file","file"],description:v(1897,null)},merge:{type:"boolean",cat:"o",alias:"m",args:["path1","path2","base","result"],description:v(1917,null)},add:{type:"boolean",cat:"o",alias:"a",args:"folder",description:v(1892,null)},remove:{type:"boolean",cat:"o",args:"folder",description:v(1924,null)},goto:{type:"boolean",cat:"o",alias:"g",args:"file:line[:character]",description:v(1906,null)},"new-window":{type:"boolean",cat:"o",alias:"n",description:v(1918,null)},"reuse-window":{type:"boolean",cat:"o",alias:"r",description:v(1925,null)},sessions:{type:"boolean",cat:"o",description:v(1926,null)},wait:{type:"boolean",cat:"o",alias:"w",description:v(1943,null)},waitMarkerFilePath:{type:"string"},locale:{type:"string",cat:"o",args:"locale",description:v(1913,null)},"user-data-dir":{type:"string",cat:"o",args:"dir",description:v(1940,null)},profile:{type:"string",cat:"o",args:"profileName",description:v(1923,null)},help:{type:"boolean",cat:"o",alias:"h",description:v(1907,null)},"extensions-dir":{type:"string",deprecates:["extensionHomePath"],cat:"e",args:"dir",description:v(1904,null)},"extensions-download-dir":{type:"string"},"builtin-extensions-dir":{type:"string"},"list-extensions":{type:"boolean",cat:"e",description:v(1912,null)},"show-versions":{type:"boolean",cat:"e",description:v(1927,null)},category:{type:"string",allowEmptyValue:!0,cat:"e",description:v(1894,null),args:"category"},"install-extension":{type:"string[]",cat:"e",args:"ext-id | path",description:v(1911,null)},"pre-release":{type:"boolean",cat:"e",description:v(1910,null)},"uninstall-extension":{type:"string[]",cat:"e",args:"ext-id",description:v(1935,null)},"update-extensions":{type:"boolean",cat:"e",description:v(1938,null)},"enable-proposed-api":{type:"string[]",allowEmptyValue:!0,cat:"e",args:"ext-id",description:v(1903,null)},"add-mcp":{type:"string[]",cat:"m",args:"json",description:v(1893,null)},version:{type:"boolean",cat:"t",alias:"v",description:v(1942,null)},verbose:{type:"boolean",cat:"t",global:!0,description:v(1941,null)},log:{type:"string[]",cat:"t",args:"level",global:!0,description:v(1915,null)},status:{type:"boolean",alias:"s",cat:"t",description:v(1928,null)},"prof-startup":{type:"boolean",cat:"t",description:v(1922,null)},"prof-append-timers":{type:"string"},"prof-duration-markers":{type:"string[]"},"prof-duration-markers-file":{type:"string"},"no-cached-data":{type:"boolean"},"prof-startup-prefix":{type:"string"},"prof-v8-extensions":{type:"boolean"},"disable-extensions":{type:"boolean",deprecates:["disableExtensions"],cat:"t",description:v(1900,null)},"disable-extension":{type:"string[]",cat:"t",args:"ext-id",description:v(1899,null)},sync:{type:"string",cat:"t",description:v(1934,null),args:["on | off"]},"inspect-extensions":{type:"string",allowEmptyValue:!0,deprecates:["debugPluginHost"],args:"port",cat:"t",description:v(1909,null)},"inspect-brk-extensions":{type:"string",allowEmptyValue:!0,deprecates:["debugBrkPluginHost"],args:"port",cat:"t",description:v(1908,null)},"disable-lcd-text":{type:"boolean",cat:"t",description:v(1902,null)},"disable-gpu":{type:"boolean",cat:"t",description:v(1901,null)},"disable-chromium-sandbox":{type:"boolean",cat:"t",description:v(1898,null)},sandbox:{type:"boolean"},"locate-shell-integration-path":{type:"string",cat:"t",args:["shell"],description:v(1914,null)},telemetry:{type:"boolean",cat:"t",description:v(1931,null)},remote:{type:"string",allowEmptyValue:!0},"folder-uri":{type:"string[]",cat:"o",args:"uri"},"file-uri":{type:"string[]",cat:"o",args:"uri"},"locate-extension":{type:"string[]"},extensionDevelopmentPath:{type:"string[]"},extensionDevelopmentKind:{type:"string[]"},extensionTestsPath:{type:"string"},extensionEnvironment:{type:"string"},debugId:{type:"string"},debugRenderer:{type:"boolean"},"inspect-ptyhost":{type:"string",allowEmptyValue:!0},"inspect-brk-ptyhost":{type:"string",allowEmptyValue:!0},"inspect-search":{type:"string",deprecates:["debugSearch"],allowEmptyValue:!0},"inspect-brk-search":{type:"string",deprecates:["debugBrkSearch"],allowEmptyValue:!0},"inspect-sharedprocess":{type:"string",allowEmptyValue:!0},"inspect-brk-sharedprocess":{type:"string",allowEmptyValue:!0},"export-default-configuration":{type:"string"},"export-policy-data":{type:"string",allowEmptyValue:!0},"install-source":{type:"string"},"enable-smoke-test-driver":{type:"boolean"},logExtensionHostCommunication:{type:"boolean"},"skip-release-notes":{type:"boolean"},"skip-welcome":{type:"boolean"},"disable-telemetry":{type:"boolean"},"disable-updates":{type:"boolean"},transient:{type:"boolean",cat:"t",description:v(1932,null)},"use-inmemory-secretstorage":{type:"boolean",deprecates:["disable-keytar"]},"password-store":{type:"string"},"disable-workspace-trust":{type:"boolean"},"disable-crash-reporter":{type:"boolean"},"crash-reporter-directory":{type:"string"},"crash-reporter-id":{type:"string"},"skip-add-to-recently-opened":{type:"boolean"},"open-url":{type:"boolean"},"file-write":{type:"boolean"},"file-chmod":{type:"boolean"},"install-builtin-extension":{type:"string[]"},force:{type:"boolean"},"do-not-sync":{type:"boolean"},"do-not-include-pack-dependencies":{type:"boolean"},trace:{type:"boolean"},"trace-memory-infra":{type:"boolean"},"trace-category-filter":{type:"string"},"trace-options":{type:"string"},"preserve-env":{type:"boolean"},"force-user-env":{type:"boolean"},"force-disable-user-env":{type:"boolean"},"open-devtools":{type:"boolean"},"disable-gpu-sandbox":{type:"boolean"},logsPath:{type:"string"},"__enable-file-policy":{type:"boolean"},editSessionId:{type:"string"},continueOn:{type:"string"},"enable-coi":{type:"boolean"},"unresponsive-sample-interval":{type:"string"},"unresponsive-sample-period":{type:"string"},"enable-rdp-display-tracking":{type:"boolean"},"disable-layout-restore":{type:"boolean"},"disable-experiments":{type:"boolean"},"no-proxy-server":{type:"boolean"},"no-sandbox":{type:"boolean",alias:"sandbox"},"proxy-server":{type:"string"},"proxy-bypass-list":{type:"string"},"proxy-pac-url":{type:"string"},"js-flags":{type:"string"},inspect:{type:"string",allowEmptyValue:!0},"inspect-brk":{type:"string",allowEmptyValue:!0},nolazy:{type:"boolean"},"force-device-scale-factor":{type:"string"},"force-renderer-accessibility":{type:"boolean"},"ignore-certificate-errors":{type:"boolean"},"allow-insecure-localhost":{type:"boolean"},"log-net-log":{type:"string"},vmodule:{type:"string"},_urls:{type:"string[]"},"disable-dev-shm-usage":{type:"boolean"},"profile-temp":{type:"boolean"},"ozone-platform":{type:"string"},"enable-tracing":{type:"string"},"trace-startup-format":{type:"string"},"trace-startup-file":{type:"string"},"trace-startup-duration":{type:"string"},"xdg-portal-required-version":{type:"string"},_:{type:"string[]"}},B9={onUnknownOption:()=>{},onMultipleValues:()=>{},onEmptyValue:()=>{},onDeprecatedOption:()=>{}}});var uI,jO=_(()=>{ae();te();uI=class extends M{constructor(){super(...arguments);this._onCloseEmitter=this._register(new C);this._onReloadEmitter=this._register(new C);this._onTerminateEmitter=this._register(new C);this._onAttachEmitter=this._register(new C)}static{this.ChannelName="extensionhostdebugservice"}call(e,t,i){switch(t){case"close":return Promise.resolve(this._onCloseEmitter.fire({sessionId:i[0]}));case"reload":return Promise.resolve(this._onReloadEmitter.fire({sessionId:i[0]}));case"terminate":return Promise.resolve(this._onTerminateEmitter.fire({sessionId:i[0]}));case"attach":return Promise.resolve(this._onAttachEmitter.fire({sessionId:i[0],port:i[1],subId:i[2]}))}throw new Error("Method not implemented.")}listen(e,t,i){switch(t){case"close":return this._onCloseEmitter.event;case"reload":return this._onReloadEmitter.event;case"terminate":return this._onTerminateEmitter.event;case"attach":return this._onAttachEmitter.event}throw new Error("Method not implemented.")}}});var pI,zO=_(()=>{Et();te();Xt();yc();J_();zt();jO();pI=class extends uI{constructor(e){super();this.windowsMainService=e}call(e,t,i){return t==="openExtensionDevelopmentHostWindow"?this.openExtensionDevelopmentHostWindow(i[0],i[1]):t==="attachToCurrentWindowRenderer"?this.attachToCurrentWindowRenderer(i[0]):super.call(e,t,i)}async attachToCurrentWindowRenderer(e){let t=this.windowsMainService.getWindowById(e);return t?.win?this.openCdp(t.win,!0):{success:!1}}async openExtensionDevelopmentHostWindow(e,t){let i=Cm(e,dI);i.debugRenderer=t;let o=i.extensionDevelopmentPath;if(!o)return{success:!1};let[s]=await this.windowsMainService.openExtensionDevelopmentHostWindow(o,{context:5,cli:i,forceProfile:i.profile,forceTempProfile:i["profile-temp"]});if(!t)return{success:!0};let a=s.win;return a?this.openCdp(a,!1):{success:!0}}async openCdpServer(e,t){let{createServer:i}=await import("http"),o=i((u,p)=>{if(u.url==="/json/list"||u.url==="/json"){p.setHeader("Content-Type","application/json"),p.end(JSON.stringify([{description:"VS Code Renderer",devtoolsFrontendUrl:"",id:e,title:"VS Code Renderer",type:"page",url:"vscode://renderer",webSocketDebuggerUrl:c}]));return}else if(u.url==="/json/version"){p.setHeader("Content-Type","application/json"),p.end(JSON.stringify({Browser:"VS Code Renderer","Protocol-Version":"1.3",webSocketDebuggerUrl:c}));return}p.statusCode=404,p.end()});await new Promise(u=>o.listen(0,"127.0.0.1",u));let s=o.address(),a=typeof s=="object"&&s?s.port:0,c=`${typeof s=="string"?s:`ws://127.0.0.1:${s?.port}`}/${e}`;return o.on("upgrade",(u,p)=>{if(!u.url?.includes(e)){p.end();return}let m=vh(u,p,{debugLabel:"extension-host-cdp-"+Me(),enableMessageSplitting:!1});m&&t(m)}),{server:o,wsUrl:c,port:a}}async openCdp(e,t){let i=e.webContents.debugger,o=i.isAttached()?1/0:0,s=Me(),a=t?`page-${s}`:void 0,{server:l,wsUrl:c,port:u}=await this.openCdpServer(s,p=>{o++===0&&i.attach();let m=new ue;m.add(p);let h=P=>{m.isDisposed||p.write(ee.fromString(JSON.stringify(P)))},E=(P,T,k,U)=>h({method:T,params:k,sessionId:U||a}),y=()=>{p.end(),m.dispose()};e.addListener("close",y),m.add(oe(()=>e.removeListener("close",y))),i.addListener("message",E),m.add(oe(()=>i.removeListener("message",E))),m.add(p.onData(P=>{let T;try{T=JSON.parse(P.toString())}catch(U){console.error("error reading cdp line",U);return}if(t){let U={targetId:s,type:"page",title:"VS Code Renderer",url:"vscode://renderer"};if(T.method==="Target.setDiscoverTargets"){h({id:T.id,sessionId:T.sessionId,result:{}}),h({method:"Target.targetCreated",sessionId:T.sessionId,params:{targetInfo:{...U,attached:!1,canAccessOpener:!1}}});return}if(T.method==="Target.attachToTarget"){h({id:T.id,sessionId:T.sessionId,result:{sessionId:a}}),h({method:"Target.attachedToTarget",params:{sessionId:a,targetInfo:{...U,attached:!0,canAccessOpener:!1},waitingForDebugger:!1}});return}if(T.method==="Target.setAutoAttach"||T.method==="Target.attachToBrowserTarget"){h({id:T.id,sessionId:T.sessionId,result:T.method==="Target.attachToBrowserTarget"?{sessionId:"browser"}:{}});return}if(T.method==="Target.getTargets"){h({id:T.id,sessionId:T.sessionId,result:{targetInfos:[{...U,attached:!0}]}});return}}let k=T.sessionId===a?void 0:T.sessionId;i.sendCommand(T.method,T.params,k).then(U=>h({id:T.id,sessionId:T.sessionId,result:U})).catch(U=>h({id:T.id,sessionId:T.sessionId,error:{code:0,message:U.message}}))})),m.add(p.onClose(()=>{--o===0&&i.detach()}))});return e.on("close",()=>l.close()),{rendererDebugAddr:c,success:!0,port:u}}}});function Rm(r){let n=r;return!!n?.hostName&&!!n?.errorMessage}var V9,Am,mI=_(()=>{de();V9="diagnosticsService",Am=V(V9)});function K_(r,n=!1){let e=0,t=r.length,i="",o=0,s=16,a=0;function l(y){let P=0,T=0;for(;P<y;){let k=r.charCodeAt(e);if(k>=48&&k<=57)T=T*16+k-48;else if(k>=65&&k<=70)T=T*16+k-65+10;else if(k>=97&&k<=102)T=T*16+k-97+10;else break;e++,P++}return P<y&&(T=-1),T}function c(y){e=y,i="",o=0,s=16,a=0}function u(){let y=e;if(r.charCodeAt(e)===48)e++;else for(e++;e<r.length&&Jc(r.charCodeAt(e));)e++;if(e<r.length&&r.charCodeAt(e)===46)if(e++,e<r.length&&Jc(r.charCodeAt(e)))for(e++;e<r.length&&Jc(r.charCodeAt(e));)e++;else return a=3,r.substring(y,e);let P=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&&Jc(r.charCodeAt(e))){for(e++;e<r.length&&Jc(r.charCodeAt(e));)e++;P=e}else a=3;return r.substring(y,P)}function p(){let y="",P=e;for(;;){if(e>=t){y+=r.substring(P,e),a=2;break}let T=r.charCodeAt(e);if(T===34){y+=r.substring(P,e),e++;break}if(T===92){if(y+=r.substring(P,e),e++,e>=t){a=2;break}switch(r.charCodeAt(e++)){case 34:y+='"';break;case 92:y+="\\";break;case 47:y+="/";break;case 98:y+="\b";break;case 102:y+="\f";break;case 110:y+=`
`;break;case 114:y+="\r";break;case 116:y+="	";break;case 117:{let U=l(4);U>=0?y+=String.fromCharCode(U):a=4;break}default:a=5}P=e;continue}if(T>=0&&T<=31)if(fI(T)){y+=r.substring(P,e),a=2;break}else a=6;e++}return y}function m(){if(i="",a=0,o=e,e>=t)return o=t,s=17;let y=r.charCodeAt(e);if(q_(y)){do e++,i+=String.fromCharCode(y),y=r.charCodeAt(e);while(q_(y));return s=15}if(fI(y))return e++,i+=String.fromCharCode(y),y===13&&r.charCodeAt(e)===10&&(e++,i+=`
`),s=14;switch(y){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++,i=p(),s=10;case 47:{let P=e-1;if(r.charCodeAt(e+1)===47){for(e+=2;e<t&&!fI(r.charCodeAt(e));)e++;return i=r.substring(P,e),s=12}if(r.charCodeAt(e+1)===42){e+=2;let T=t-1,k=!1;for(;e<T;){if(r.charCodeAt(e)===42&&r.charCodeAt(e+1)===47){e+=2,k=!0;break}e++}return k||(e++,a=1),i=r.substring(P,e),s=13}return i+=String.fromCharCode(y),e++,s=16}case 45:if(i+=String.fromCharCode(y),e++,e===t||!Jc(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 i+=u(),s=11;default:for(;e<t&&h(y);)e++,y=r.charCodeAt(e);if(o!==e){switch(i=r.substring(o,e),i){case"true":return s=8;case"false":return s=9;case"null":return s=7}return s=16}return i+=String.fromCharCode(y),e++,s=16}}function h(y){if(q_(y)||fI(y))return!1;switch(y){case 125:case 93:case 123:case 91:case 34:case 58:case 44:case 47:return!1}return!0}function E(){let y;do y=m();while(y>=12&&y<=15);return y}return{setPosition:c,getPosition:()=>e,scan:n?E:m,getToken:()=>s,getTokenValue:()=>i,getTokenOffset:()=>o,getTokenLength:()=>e-o,getTokenError:()=>a}}function q_(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 fI(r){return r===10||r===13||r===8232||r===8233}function Jc(r){return r>=48&&r<=57}function ti(r,n=[],e=gI.DEFAULT){let t=null,i=[],o=[];function s(l){Array.isArray(i)?i.push(l):t!==null&&(i[t]=l)}return qc(r,{onObjectBegin:()=>{let l={};s(l),o.push(i),i=l,t=null},onObjectProperty:l=>{t=l},onObjectEnd:()=>{i=o.pop()},onArrayBegin:()=>{let l=[];s(l),o.push(i),i=l,t=null},onArrayEnd:()=>{i=o.pop()},onLiteralValue:s,onError:(l,c,u)=>{n.push({error:l,offset:c,length:u})}},e),i[0]}function YO(r,n=[],e=gI.DEFAULT){let t={type:"array",offset:-1,length:-1,children:[],parent:void 0};function i(l){t.type==="property"&&(t.length=l-t.offset,t=t.parent)}function o(l){return t.children.push(l),l}qc(r,{onObjectBegin:l=>{t=o({type:"object",offset:l,length:-1,parent:t,children:[]})},onObjectProperty:(l,c,u)=>{t=o({type:"property",offset:c,length:-1,parent:t,children:[]}),t.children.push({type:"string",value:l,offset:c,length:u,parent:t})},onObjectEnd:(l,c)=>{t.length=l+c-t.offset,t=t.parent,i(l+c)},onArrayBegin:(l,c)=>{t=o({type:"array",offset:l,length:-1,parent:t,children:[]})},onArrayEnd:(l,c)=>{t.length=l+c-t.offset,t=t.parent,i(l+c)},onLiteralValue:(l,c,u)=>{o({type:Ws(l),offset:c,length:u,parent:t,value:l}),i(c+u)},onSeparator:(l,c,u)=>{t.type==="property"&&(l===":"?t.colonOffset=c:l===","&&i(c))},onError:(l,c,u)=>{n.push({error:l,offset:c,length:u})}},e);let a=t.children[0];return a&&delete a.parent,a}function j_(r,n){if(!r)return;let e=r;for(let t of n)if(typeof t=="string"){if(e.type!=="object"||!Array.isArray(e.children))return;let i=!1;for(let o of e.children)if(Array.isArray(o.children)&&o.children[0].value===t){e=o.children[1],i=!0;break}if(!i)return}else{let i=t;if(e.type!=="array"||i<0||!Array.isArray(e.children)||i>=e.children.length)return;e=e.children[i]}return e}function qc(r,n,e=gI.DEFAULT){let t=K_(r,!1);function i(ne){return ne?()=>ne(t.getTokenOffset(),t.getTokenLength()):()=>!0}function o(ne){return ne?De=>ne(De,t.getTokenOffset(),t.getTokenLength()):()=>!0}let s=i(n.onObjectBegin),a=o(n.onObjectProperty),l=i(n.onObjectEnd),c=i(n.onArrayBegin),u=i(n.onArrayEnd),p=o(n.onLiteralValue),m=o(n.onSeparator),h=i(n.onComment),E=o(n.onError),y=e&&e.disallowComments,P=e&&e.allowTrailingComma;function T(){for(;;){let ne=t.scan();switch(t.getTokenError()){case 4:k(14);break;case 5:k(15);break;case 3:k(13);break;case 1:y||k(11);break;case 2:k(12);break;case 6:k(16);break}switch(ne){case 12:case 13:y?k(10):h();break;case 16:k(1);break;case 15:case 14:break;default:return ne}}}function k(ne,De=[],ht=[]){if(E(ne),De.length+ht.length>0){let Zt=t.getToken();for(;Zt!==17;){if(De.indexOf(Zt)!==-1){T();break}else if(ht.indexOf(Zt)!==-1)break;Zt=T()}}}function U(ne){let De=t.getTokenValue();return ne?p(De):a(De),T(),!0}function O(){switch(t.getToken()){case 11:{let ne=0;try{ne=JSON.parse(t.getTokenValue()),typeof ne!="number"&&(k(2),ne=0)}catch{k(2)}p(ne);break}case 7:p(null);break;case 8:p(!0);break;case 9:p(!1);break;default:return!1}return T(),!0}function B(){return t.getToken()!==10?(k(3,[],[2,5]),!1):(U(!1),t.getToken()===6?(m(":"),T(),le()||k(4,[],[2,5])):k(5,[],[2,5]),!0)}function he(){s(),T();let ne=!1;for(;t.getToken()!==2&&t.getToken()!==17;){if(t.getToken()===5){if(ne||k(4,[],[]),m(","),T(),t.getToken()===2&&P)break}else ne&&k(6,[],[]);B()||k(4,[],[2,5]),ne=!0}return l(),t.getToken()!==2?k(7,[2],[]):T(),!0}function Q(){c(),T();let ne=!1;for(;t.getToken()!==4&&t.getToken()!==17;){if(t.getToken()===5){if(ne||k(4,[],[]),m(","),T(),t.getToken()===4&&P)break}else ne&&k(6,[],[]);le()||k(4,[],[4,5]),ne=!0}return u(),t.getToken()!==4?k(8,[4],[]):T(),!0}function le(){switch(t.getToken()){case 3:return Q();case 1:return he();case 10:return U(!0);default:return O()}}return T(),t.getToken()===17?e.allowEmptyContent?!0:(k(4,[],[]),!1):le()?(t.getToken()!==17&&k(9,[],[]),!0):(k(4,[],[]),!1)}function Ws(r){switch(typeof r){case"boolean":return"boolean";case"number":return"number";case"string":return"string";case"object":{if(r){if(Array.isArray(r))return"array"}else return"null";return"object"}default:return"null"}}var gI,Ai=_(()=>{(n=>n.DEFAULT={allowTrailingComma:!0})(gI||={})});var hI,Xe,xm=_(()=>{Sn();hI=(i=>(i[i.Ignore=0]="Ignore",i[i.Info=1]="Info",i[i.Warning=2]="Warning",i[i.Error=3]="Error",i))(hI||{});(a=>{let r="error",n="warning",e="warn",t="info",i="ignore";function o(l){return l?Hn(r,l)?3:Hn(n,l)||Hn(e,l)?2:Hn(t,l)?1:0:0}a.fromValue=o;function s(l){switch(l){case 3:return r;case 2:return n;case 1:return t;default:return i}}a.toString=s})(hI||={});Xe=hI});function Mn(r){if(!r||typeof r!="object"||r instanceof RegExp)return r;let n=Array.isArray(r)?[]:{};return Object.entries(r).forEach(([e,t])=>{n[e]=t&&typeof t=="object"?Mn(t):t}),n}function QO(r){if(!r||typeof r!="object")return r;let n=[r];for(;n.length>0;){let e=n.shift();Object.freeze(e);for(let t in e)if(XO.call(e,t)){let i=e[t];typeof i=="object"&&!Object.isFrozen(i)&&!$R(i)&&n.push(i)}}return r}function $O(r,n){return Y_(r,n,new Set)}function Y_(r,n,e){if(Qt(r))return r;let t=n(r);if(typeof t<"u")return t;if(Array.isArray(r)){let i=[];for(let o of r)i.push(Y_(o,n,e));return i}if(ut(r)){if(e.has(r))throw new Error("Cannot clone recursive data-structure");e.add(r);let i={};for(let o in r)XO.call(r,o)&&(i[o]=Y_(r[o],n,e));return e.delete(r),i}return r}function II(r,n,e=!0){return ut(r)?(ut(n)&&Object.keys(n).forEach(t=>{t in r?e&&(ut(r[t])&&ut(n[t])?II(r[t],n[t],e):r[t]=n[t]):r[t]=n[t]}),r):n}function Or(r,n){if(r===n)return!0;if(r==null||n===null||n===void 0||typeof r!=typeof n||typeof r!="object"||Array.isArray(r)!==Array.isArray(n))return!1;let e,t;if(Array.isArray(r)){if(r.length!==n.length)return!1;for(e=0;e<r.length;e++)if(!Or(r[e],n[e]))return!1}else{let i=[];for(t in r)i.push(t);i.sort();let o=[];for(t in n)o.push(t);if(o.sort(),!Or(i,o))return!1;for(e=0;e<i.length;e++)if(!Or(r[i[e]],n[i[e]]))return!1}return!0}function Q_(r){let n=new Set;return JSON.stringify(r,(e,t)=>{if(ut(t)||Array.isArray(t)){if(n.has(t))return"[Circular]";n.add(t)}return typeof t=="bigint"?`[BigInt ${t.toString()}]`:t})}function X_(r,n){let e=n.toLowerCase(),t=Object.keys(r).find(i=>i.toLowerCase()===e);return t?r[t]:r[n]}var XO,Gr=_(()=>{qe();XO=Object.prototype.hasOwnProperty});function vI(r,n){let e=Mn(r),t=(e.buttons??[]).map(a=>Up(a).withMnemonic),i=(r.buttons||[]).map((a,l)=>l),o=0,s=e.cancelId??t.length-1;if(t.length>1){let a=typeof s=="number"?t[s]:void 0;if(fe||$){if(typeof a=="string"&&t.length>1&&s!==1){t.splice(s,1),t.splice(1,0,a);let l=i[s];i.splice(s,1),i.splice(1,0,l),s=1}fe&&t.length>1&&(t=t.reverse(),i=i.reverse(),o=t.length-1,typeof a=="string"&&(s=o-1))}else if(q&&typeof a=="string"&&t.length>1&&s!==t.length-1){t.splice(s,1),t.push(a);let l=i[s];i.splice(s,1),i.push(l),s=t.length-1}}return e.buttons=t,e.defaultId=o,e.cancelId=s,e.noLink=!0,e.title=e.title||n.nameLong,{options:e,buttonIndeces:i}}var pee,mee,$_=_(()=>{Ut();xm();We();de();Uo();ce();Gr();pee=V("dialogService"),mee=V("fileDialogService")});import qa from"electron";var Hr,Kc,Ka=_(()=>{Ce();eo();Uo();te();Ap();ce();pn();We();$_();de();me();In();Ln();Hr=V("dialogMainService"),Kc=class{constructor(n,e){this.logService=n;this.productService=e;this.windowFileDialogLocks=new Map;this.windowDialogQueues=new Map;this.noWindowDialogueQueue=new $r}pickFileFolder(n,e){return this.doPick({...n,pickFolders:!0,pickFiles:!0,title:v(1885,null)},e)}pickFolder(n,e){let t={...n,pickFolders:!0,title:v(1887,null)};return q&&(t={...t,buttonLabel:Up(v(1890,null)).withMnemonic}),this.doPick(t,e)}pickFile(n,e){return this.doPick({...n,pickFiles:!0,title:v(1886,null)},e)}pickWorkspace(n,e){let t=v(1889,null),i=Up(v(1888,null)).withMnemonic,o=_O;return this.doPick({...n,pickFiles:!0,title:t,filters:o,buttonLabel:i},e)}async doPick(n,e){let t={title:n.title,buttonLabel:n.buttonLabel,filters:n.filters,defaultPath:n.defaultPath};(typeof n.pickFiles=="boolean"||typeof n.pickFolders=="boolean")&&(t.properties=void 0,n.pickFiles&&n.pickFolders&&(t.properties=["multiSelections","openDirectory","openFile","createDirectory"])),t.properties||(t.properties=["multiSelections",n.pickFolders?"openDirectory":"openFile","createDirectory"]),$&&t.properties.push("treatPackageAsDirectory");let i=await this.showOpenDialog(t,(e||qa.BrowserWindow.getFocusedWindow())??void 0);if(i?.filePaths&&i.filePaths.length>0)return i.filePaths}getWindowDialogQueue(n){if(n){let e=this.windowDialogQueues.get(n.id);return e||(e=new $r,this.windowDialogQueues.set(n.id,e)),e}else return this.noWindowDialogueQueue}showMessageBox(n,e){return this.getWindowDialogQueue(e).queue(async()=>{let{options:t,buttonIndeces:i}=vI(n,this.productService),o;return e?o=await qa.dialog.showMessageBox(e,t):o=await qa.dialog.showMessageBox(t),{response:i[o.response],checkboxChecked:o.checkboxChecked}})}async showSaveDialog(n,e){let t=this.acquireFileDialogLock(n,e);if(!t)return this.logService.error("[DialogMainService]: file save dialog is already or will be showing for the window with the same configuration"),{canceled:!0,filePath:""};try{return await this.getWindowDialogQueue(e).queue(async()=>{let i;return e?i=await qa.dialog.showSaveDialog(e,n):i=await qa.dialog.showSaveDialog(n),i.filePath=this.normalizePath(i.filePath),i})}finally{At(t)}}normalizePath(n){return n&&$&&(n=Xi(n)),n}normalizePaths(n){return n.map(e=>this.normalizePath(e))}async showOpenDialog(n,e){n.defaultPath&&(await re.exists(n.defaultPath)||(n.defaultPath=void 0));let t=this.acquireFileDialogLock(n,e);if(!t)return this.logService.error("[DialogMainService]: file open dialog is already or will be showing for the window with the same configuration"),{canceled:!0,filePaths:[]};try{return await this.getWindowDialogQueue(e).queue(async()=>{let i;return e?i=await qa.dialog.showOpenDialog(e,n):i=await qa.dialog.showOpenDialog(n),i.filePaths=this.normalizePaths(i.filePaths),i})}finally{At(t)}}acquireFileDialogLock(n,e){if(!e)return M.None;this.logService.trace("[DialogMainService]: request to acquire file dialog lock",n);let t=this.windowFileDialogLocks.get(e.id);t||(t=new Set,this.windowFileDialogLocks.set(e.id,t));let i=wn(n);if(!t.has(i))return this.logService.trace("[DialogMainService]: new file dialog lock created",n),t.add(i),oe(()=>{this.logService.trace("[DialogMainService]: file dialog lock disposed",n),t?.delete(i),t?.size===0&&this.windowFileDialogLocks.delete(e.id)})}};Kc=D([S(0,z),S(1,He)],Kc)});async function e0(r,n,e){for(let i of r){let o=i.openedWorkspace;if(yt(o)){let s=await e(o);if(s){if(s.folders.some(a=>lt.isEqualOrParent(n,a.uri)))return i}else if(lt.isEqualOrParent(n,o.configPath))return i}}let t=r.filter(i=>Kt(i.openedWorkspace)&&lt.isEqualOrParent(n,i.openedWorkspace.uri));if(t.length)return t.sort((i,o)=>-(i.openedWorkspace.uri.path.length-o.openedWorkspace.uri.path.length))[0]}function uo(r,n){for(let e of r)if(yt(e.openedWorkspace)&&lt.isEqual(e.openedWorkspace.configPath,n)||Kt(e.openedWorkspace)&&lt.isEqual(e.openedWorkspace.uri,n))return e}function t0(r,n){let e=t=>n.some(i=>lt.isEqual(A.file(i),A.file(t)));for(let t of r)if(t.config?.extensionDevelopmentPath?.some(i=>e(i)))return t}var EI=_(()=>{Ut();Ie();Ln()});function n0(r,n,e){let t,i,o,s,a;if(n){for(s=n.offset,a=s+n.length,o=s;o>0&&!Dm(r,o-1);)o--;let U=a;for(;U<r.length&&!Dm(r,U);)U++;i=r.substring(o,U),t=G9(i,e)}else i=r,t=0,o=0,s=0,a=r.length;let l=H9(e,r),c=!1,u=0,p;e.insertSpaces?p=Z_(" ",e.tabSize||4):p="	";let m=K_(i,!1),h=!1;function E(){return l+Z_(p,t+u)}function y(){let U=m.scan();for(c=!1;U===15||U===14;)c=c||U===14,U=m.scan();return h=U===16||m.getTokenError()!==0,U}let P=[];function T(U,O,B){!h&&O<a&&B>s&&r.substring(O,B)!==U&&P.push({offset:O,length:B-O,content:U})}let k=y();if(k!==17){let U=m.getTokenOffset()+o,O=Z_(p,t);T(O,o,U)}for(;k!==17;){let U=m.getTokenOffset()+m.getTokenLength()+o,O=y(),B="";for(;!c&&(O===12||O===13);){let Q=m.getTokenOffset()+o;T(" ",U,Q),U=m.getTokenOffset()+m.getTokenLength()+o,B=O===12?E():"",O=y()}if(O===2)k!==1&&(u--,B=E());else if(O===4)k!==3&&(u--,B=E());else{switch(k){case 3:case 1:u++,B=E();break;case 5:case 12:B=E();break;case 13:c?B=E():B=" ";break;case 6:B=" ";break;case 10:if(O===6){B="";break}case 7:case 8:case 9:case 11:case 2:case 4:O===12||O===13?B=" ":O!==5&&O!==17&&(h=!0);break;case 16:h=!0;break}c&&(O===12||O===13)&&(B=E())}let he=m.getTokenOffset()+o;T(B,U,he),k=O}return P}function Z_(r,n){let e="";for(let t=0;t<n;t++)e+=r;return e}function G9(r,n){let e=0,t=0,i=n.tabSize||4;for(;e<r.length;){let o=r.charAt(e);if(o===" ")t++;else if(o==="	")t+=i;else break;e++}return Math.floor(t/i)}function H9(r,n){for(let e=0;e<n.length;e++){let t=n.charAt(e);if(t==="\r")return e+1<n.length&&n.charAt(e+1)===`
`?`\r
`:"\r";if(t===`
`)return`
`}return r&&r.eol||`
`}function Dm(r,n){return`\r
`.indexOf(r.charAt(n))!==-1}var r0=_(()=>{Ai()});function tw(r,n,e,t,i){let o=n.slice(),a=YO(r,[]),l,c;for(;o.length>0&&(c=o.pop(),l=j_(a,o),l===void 0&&e!==void 0);)typeof c=="string"?e={[c]:e}:e=[e];if(l)if(l.type==="object"&&typeof c=="string"&&Array.isArray(l.children)){let u=j_(l,[c]);if(u!==void 0)if(e===void 0){if(!u.parent)throw new Error("Malformed AST");let p=l.children.indexOf(u.parent),m,h=u.parent.offset+u.parent.length;if(p>0){let E=l.children[p-1];m=E.offset+E.length}else m=l.offset+1,l.children.length>1&&(h=l.children[1].offset);return jc(r,{offset:m,length:h-m,content:""},t)}else return jc(r,{offset:u.offset,length:u.length,content:JSON.stringify(e)},t);else{if(e===void 0)return[];let p=`${JSON.stringify(c)}: ${JSON.stringify(e)}`,m=i?i(l.children.map(E=>E.children[0].value)):l.children.length,h;if(m>0){let E=l.children[m-1];h={offset:E.offset+E.length,length:0,content:","+p}}else l.children.length===0?h={offset:l.offset+1,length:0,content:p}:h={offset:l.offset+1,length:0,content:p+","};return jc(r,h,t)}}else if(l.type==="array"&&typeof c=="number"&&Array.isArray(l.children))if(e!==void 0){let u=`${JSON.stringify(e)}`,p;if(l.children.length===0||c===0)p={offset:l.offset+1,length:0,content:l.children.length===0?u:u+","};else{let m=c===-1||c>l.children.length?l.children.length:c,h=l.children[m-1];p={offset:h.offset+h.length,length:0,content:","+u}}return jc(r,p,t)}else{let u=c,p=l.children[u],m;if(l.children.length===1)m={offset:l.offset+1,length:l.length-2,content:""};else if(l.children.length-1===u){let h=l.children[u-1],E=h.offset+h.length,y=l.offset+l.length;m={offset:E,length:y-2-E,content:""}}else m={offset:p.offset,length:l.children[u+1].offset-p.offset,content:""};return jc(r,m,t)}else throw new Error(`Can not add ${typeof c!="number"?"index":"property"} to parent of type ${l.type}`);else return e===void 0?[]:jc(r,{offset:a?a.offset:0,length:a?a.length:0,content:JSON.stringify(e)},t)}function jc(r,n,e){let t=ew(r,n),i=n.offset,o=n.offset+n.content.length;if(n.length===0||n.content.length===0){for(;i>0&&!Dm(t,i-1);)i--;for(;o<t.length&&!Dm(t,o);)o++}let s=n0(t,{offset:i,length:o-i},e);for(let l=s.length-1;l>=0;l--){let c=s[l];t=ew(t,c),i=Math.min(i,c.offset),o=Math.max(o,c.offset+c.length),o+=c.content.length-c.length}let a=r.length-(t.length-o)-i;return[{offset:i,length:a,content:t.substring(i,o)}]}function ew(r,n){return r.substring(0,n.offset)+n.content+r.substring(n.offset+n.length)}function nw(r,n){let e=n.slice(0).sort((i,o)=>{let s=i.offset-o.offset;return s===0?i.length-o.length:s}),t=r.length;for(let i=e.length-1;i>=0;i--){let o=e[i];if(o.offset+o.length<=t)r=ew(r,o);else throw new Error("Overlapping edit");t=o.offset}return r}var rw=_(()=>{Ai();r0()});function zo(r){return r.scheme===Y.vscodeRemote?r.authority:void 0}var zc=_(()=>{at()});function yI(r){return r.hasOwnProperty("workspace")}function Om(r){return r.hasOwnProperty("folderUri")}function o0(r){return r.hasOwnProperty("fileUri")}function s0(r){return a0(r)||l0(r)}function a0(r){let n=r;return typeof n?.path=="string"&&(!n.name||typeof n.name=="string")}function l0(r){let n=r;return typeof n?.uri=="string"&&(!n.name||typeof n.name=="string")}function c0(r,n,e,t,i){if(r.scheme!==t.scheme)return{name:e,uri:r.toString(!0)};let o=n?void 0:i.relativePath(t,r);if(o!==void 0)o.length===0?o=".":q&&(o=i0(o));else if(r.scheme===Y.file)o=r.fsPath,q&&(o=i0(o));else if(i.isEqualAuthority(r.authority,t.authority))o=r.path;else return{name:e,uri:r.toString(!0)};return{name:e,path:o}}function i0(r){return r=Mp(r),yx(r)||(r=Yi(r)),r}function d0(r,n,e){let t=[],i=new Set,o=e.dirname(n);for(let s of r){let a;if(a0(s))s.path&&(a=e.resolvePath(o,s.path));else if(l0(s))try{a=A.parse(s.uri),a.path[0]!==Se.sep&&(a=a.with({path:Se.sep+a.path}))}catch(l){console.warn(l)}if(a){let l=e.getComparisonKey(a);if(!i.has(l)){i.add(l);let c=s.name||e.basenameOrAuthority(a);t.push(new Jh({uri:a,name:c,index:t.length},s))}}}return t}function q9(r){let n=r;return typeof n?.workspace=="object"&&typeof n.workspace.id=="string"&&typeof n.workspace.configPath=="string"}function K9(r){return typeof r?.folderUri=="string"}function j9(r){return typeof r?.fileUri=="string"}function u0(r,n){let e={workspaces:[],files:[]};if(r){let t=function(o,s){for(let a=0;a<o.length;a++)try{s(o[a],a)}catch(l){n.warn(`Error restoring recent entry ${JSON.stringify(o[a])}: ${l.toString()}. Skip entry.`)}},i=r;Array.isArray(i.entries)&&t(i.entries,o=>{let s=o.label,a=o.remoteAuthority;q9(o)?e.workspaces.push({label:s,remoteAuthority:a,workspace:{id:o.workspace.id,configPath:A.parse(o.workspace.configPath)}}):K9(o)?e.workspaces.push({label:s,remoteAuthority:a,folderUri:A.parse(o.folderUri)}):j9(o)&&e.files.push({label:s,remoteAuthority:a,fileUri:A.parse(o.fileUri)})})}return e}function p0(r){let n={entries:[]},e=(t,i)=>t&&t!==i.fsPath&&t!==i.path;for(let t of r.workspaces)Om(t)?n.entries.push({folderUri:t.folderUri.toString(),label:e(t.label,t.folderUri)?t.label:void 0,remoteAuthority:t.remoteAuthority}):n.entries.push({workspace:{id:t.workspace.id,configPath:t.workspace.configPath.toString()},label:e(t.label,t.workspace.configPath)?t.label:void 0,remoteAuthority:t.remoteAuthority});for(let t of r.files)n.entries.push({fileUri:t.fileUri.toString(),label:e(t.label,t.fileUri)?t.label:void 0,remoteAuthority:t.remoteAuthority});return n}var iw,SI=_(()=>{xr();Ai();rw();Uo();at();Ne();ce();Ut();Ie();de();zc();Ln();iw=V("workspacesService")});import*as ow from"fs";import z9 from"electron";var kr,Yc,Bs=_(()=>{ae();Ai();te();at();Ne();Ut();pn();We();Hc();Ka();$t();de();me();Us();EI();Ln();SI();cI();kr=V("workspacesManagementMainService"),Yc=class extends M{constructor(e,t,i,o,s){super();this.environmentMainService=e;this.logService=t;this.userDataProfilesMainService=i;this.backupMainService=o;this.dialogMainService=s;this._onDidDeleteUntitledWorkspace=this._register(new C);this.onDidDeleteUntitledWorkspace=this._onDidDeleteUntitledWorkspace.event;this._onDidEnterWorkspace=this._register(new C);this.onDidEnterWorkspace=this._onDidEnterWorkspace.event;this.untitledWorkspaces=[];this.untitledWorkspacesHome=this.environmentMainService.untitledWorkspacesHome}async initialize(){this.untitledWorkspaces=[];try{let e=(await re.readdir(this.untitledWorkspacesHome.with({scheme:Y.file}).fsPath)).map(t=>be(this.untitledWorkspacesHome,t,C_));for(let t of e){let i=Ko(t),o=await this.resolveLocalWorkspace(t);o?this.untitledWorkspaces.push({workspace:i,remoteAuthority:o.remoteAuthority}):await this.deleteUntitledWorkspace(i)}}catch(e){e.code!=="ENOENT"&&this.logService.warn(`Unable to read folders in ${this.untitledWorkspacesHome} (${e}).`)}}resolveLocalWorkspace(e){return this.doResolveLocalWorkspace(e,t=>ow.promises.readFile(t,"utf8"))}doResolveLocalWorkspace(e,t){if(this.isWorkspacePath(e)&&e.scheme===Y.file)try{let i=t(e.fsPath);return i instanceof Promise?i.then(o=>this.doResolveWorkspace(e,o),o=>{}):this.doResolveWorkspace(e,i)}catch{return}}isWorkspacePath(e){return A_(e,this.environmentMainService)||ro(e)}doResolveWorkspace(e,t){try{let i=this.doParseStoredWorkspace(e,t),o=Ko(e);return{id:o.id,configPath:o.configPath,folders:d0(i.folders,o.configPath,lt),remoteAuthority:i.remoteAuthority,transient:i.transient}}catch(i){this.logService.warn(i.toString())}}doParseStoredWorkspace(e,t){let i=ti(t);if(i&&Array.isArray(i.folders))i.folders=i.folders.filter(o=>s0(o));else throw new Error(`${e.toString(!0)} looks like an invalid workspace file.`);return i}async createUntitledWorkspace(e,t){let{workspace:i,storedWorkspace:o}=this.newUntitledWorkspace(e,t),s=i.configPath.fsPath;return await ow.promises.mkdir(ze(s),{recursive:!0}),await re.writeFile(s,JSON.stringify(o,null,"	")),this.untitledWorkspaces.push({workspace:i,remoteAuthority:t}),i}newUntitledWorkspace(e=[],t){let i=(Date.now()+Math.round(Math.random()*1e3)).toString(),o=be(this.untitledWorkspacesHome,i),s=be(o,C_),a=[];for(let l of e)a.push(c0(l.uri,!0,l.name,o,lt));return{workspace:Ko(s),storedWorkspace:{folders:a,remoteAuthority:t}}}async getWorkspaceIdentifier(e){return Ko(e)}isUntitledWorkspace(e){return A_(e.configPath,this.environmentMainService)}async deleteUntitledWorkspace(e){this.isUntitledWorkspace(e)&&(await this.doDeleteUntitledWorkspace(e),this.userDataProfilesMainService.unsetWorkspace(e),this._onDidDeleteUntitledWorkspace.fire(e))}async doDeleteUntitledWorkspace(e){let t=Dn(e.configPath);try{await re.rm(ze(t));let i=H(this.environmentMainService.workspaceStorageHome.with({scheme:Y.file}).fsPath,e.id);await re.exists(i)&&await re.writeFile(H(i,"obsolete"),""),this.untitledWorkspaces=this.untitledWorkspaces.filter(o=>o.workspace.id!==e.id)}catch(i){this.logService.warn(`Unable to delete untitled workspace ${t} (${i}).`)}}getUntitledWorkspaces(){return this.untitledWorkspaces}async enterWorkspace(e,t,i){if(!e?.win||!e.isReady||!await this.isValidTargetWorkspacePath(e,t,i))return;let s=await this.doEnterWorkspace(e,Ko(i));if(s)return this._onDidEnterWorkspace.fire({window:e,workspace:s.workspace}),s}async isValidTargetWorkspacePath(e,t,i){return i?yt(e.openedWorkspace)&&lt.isEqual(e.openedWorkspace.configPath,i)?!1:uo(t,i)?(await this.dialogMainService.showMessageBox({type:"info",buttons:[v(2765,null)],message:v(2767,null,pr(i)),detail:v(2766,null)},z9.BrowserWindow.getFocusedWindow()??void 0),!1):!0:!0}async doEnterWorkspace(e,t){if(!e.config)return;e.focus();let i;return e.config.extensionDevelopmentPath||(e.config.backupPath?i=await this.backupMainService.registerWorkspaceBackup({workspace:t,remoteAuthority:e.remoteAuthority},e.config.backupPath):i=this.backupMainService.registerWorkspaceBackup({workspace:t,remoteAuthority:e.remoteAuthority})),yt(e.openedWorkspace)&&this.isUntitledWorkspace(e.openedWorkspace)&&await this.deleteUntitledWorkspace(e.openedWorkspace),e.config.workspace=t,e.config.backupPath=i,{workspace:t,backupPath:i}}};Yc=D([S(0,Fe),S(1,z),S(2,rr),S(3,co),S(4,Hr)],Yc)});function m0(r,...n){let e=n.reduce((o,s)=>(o[s]=!0,o),{}),t=[/^ELECTRON_.+$/,/^VSCODE_(?!(PORTABLE|SHELL_LOGIN|ENV_REPLACE|ENV_APPEND|ENV_PREPEND)).+$/,/^SNAP(|_.*)$/,/^GDK_PIXBUF_.+$/];Object.keys(r).filter(o=>!e[o]).forEach(o=>{for(let s=0;s<t.length;s++)if(o.search(t[s])!==-1){delete r[o];break}})}function _I(r){r&&(delete r.DEBUG,fe&&delete r.LD_PRELOAD)}var km=_(()=>{ce()});import{MessageChannelMain as Y9,app as Q9,utilityProcess as X9}from"electron";import{StringDecoder as f0}from"string_decoder";function $9(r){return typeof r.responseWindowId=="number"}var Pn,Vs,ja=_(()=>{te();ae();me();Ce();at();zt();xm();Tn();Vt();km();Gr();ce();ac();Pn=class extends M{constructor(e,t,i){super();this.logService=e;this.telemetryService=t;this.lifecycleMainService=i;this.id=String(++Pn.ID_COUNTER);this._onStdout=this._register(new C);this.onStdout=this._onStdout.event;this._onStderr=this._register(new C);this.onStderr=this._onStderr.event;this._onMessage=this._register(new C);this.onMessage=this._onMessage.event;this._onSpawn=this._register(new C);this.onSpawn=this._onSpawn.event;this._onExit=this._register(new C);this.onExit=this._onExit.event;this._onCrash=this._register(new C);this.onCrash=this._onCrash.event;this.process=void 0;this.processPid=void 0;this.configuration=void 0}static{this.ID_COUNTER=0}static{this.all=new Map}static getAll(){return Array.from(Pn.all.values())}log(e,t){let i;switch(this.configuration?.correlationId?i=`[UtilityProcess id: ${this.configuration?.correlationId}, type: ${this.configuration?.type}, pid: ${this.processPid??"<none>"}]: ${e}`:i=`[UtilityProcess type: ${this.configuration?.type}, pid: ${this.processPid??"<none>"}]: ${e}`,t){case Xe.Error:this.logService.error(i);break;case Xe.Warning:this.logService.warn(i);break;case Xe.Info:this.logService.trace(i);break}}interpretExitCode(e){switch(e){case 0:return"Normal exit";case 1:return"General error";case 6:return"SIGABRT - Process aborted (likely memory corruption or assertion failure)";case 9:return"SIGKILL - Process killed (likely OOM killer)";case 11:return"SIGSEGV - Segmentation fault (memory access violation)";case 134:return"SIGABRT with core dump - Process aborted with core dump";case 137:return"SIGKILL with core dump - Process killed with core dump";case 139:return"SIGSEGV with core dump - Segmentation fault with core dump";default:return`Unknown exit code (${e})`}}logUtilityProcessCrash(e,t){let i=new Date().toISOString(),o=this.interpretExitCode(e);if(this.logService.error("=== UTILITY PROCESS CRASH REPORT ==="),this.logService.error(`Time: ${i}`),this.logService.error(`PID: ${this.processPid??"<none>"}, Exit Code: ${e} (${o}), Reason: ${t}`),this.logService.error(`Process Type: ${this.configuration?.type??"<unknown>"}`),this.logService.error(`Process ID: ${this.configuration?.correlationId??"<none>"}`),this.logService.error(`Entry Point: ${this.configuration?.entryPoint??"<unknown>"}`),typeof process<"u"&&process.memoryUsage)try{let a=process.memoryUsage();this.logService.error(`Main Process Memory: RSS=${Math.round(a.rss/1024/1024)}MB, Heap=${Math.round(a.heapUsed/1024/1024)}MB, External=${Math.round(a.external/1024/1024)}MB`)}catch(a){this.logService.error(`Could not retrieve memory information: ${a}`)}if(this.configuration?.args&&this.configuration.args.length>0&&this.logService.error(`Process Args: ${this.configuration.args.join(" ")}`),this.configuration?.env){let l=["NODE_ENV","ELECTRON_ENABLE_LOGGING","ELECTRON_RUN_AS_NODE"].filter(c=>this.configuration.env[c]).map(c=>`${c}=${this.configuration.env[c]}`).join(", ");l&&this.logService.error(`Relevant Environment: ${l}`)}this.logService.error("System Information:"),this.logService.error(`  - Node Version: ${process.version}`),this.logService.error(`  - Platform: ${process.platform}_${process.arch}`),this.logService.error(`  - Electron Version: ${process.versions.electron??"unknown"}`);let s=Pn.getAll();s.length>0&&(this.logService.error(`Active Utility Processes: ${s.length} processes`),this.logService.error("Sample Processes:"),s.slice(0,5).forEach(a=>{this.logService.error(`  - ${a.name} (PID: ${a.pid})`)})),this.logService.error("=== END UTILITY PROCESS CRASH REPORT ===")}validateCanStart(){return this.process?(this.log("Cannot start utility process because it is already running...",Xe.Error),!1):!0}start(e){let t=this.doStart(e);return t&&e.payload&&this.postMessage(e.payload)&&this.log("payload sent via postMessage()",Xe.Info),t}doStart(e){if(!this.validateCanStart())return!1;this.configuration=e;let t=`${this.configuration.type}-${this.id}`,i=gt.asFileUri("bootstrap-fork.js").fsPath,o=this.configuration.args??[],s=this.configuration.execArgv??[],a=this.configuration.allowLoadingUnsignedLibraries,l=this.configuration.respondToAuthRequestsFromMainProcess,c="pipe",u=this.createEnv(e);return this.log("creating new...",Xe.Info),this.process=X9.fork(i,o,{serviceName:t,env:u,execArgv:s,allowLoadingUnsignedLibraries:a,respondToAuthRequestsFromMainProcess:l,stdio:c}),this.registerListeners(this.process,this.configuration,t),!0}createEnv(e){let t=e.env?{...e.env}:{...Mn(process.env)};t.VSCODE_ESM_ENTRYPOINT=e.entryPoint,typeof e.parentLifecycleBound=="number"&&(t.VSCODE_PARENT_PID=String(e.parentLifecycleBound)),t.VSCODE_CRASH_REPORTER_PROCESS_TYPE=e.type,q&&(Zx()?t.NODE_DISABLE_UNC_ACCESS_CHECKS="1":t.NODE_UNC_HOST_ALLOWLIST=Qx().join("\\")),_I(t);for(let i of Object.keys(t))t[i]=String(t[i]);return t}registerListeners(e,t,i){if(e.stdout){let o=new f0("utf-8");this._register(x.fromNodeEventEmitter(e.stdout,"data")(s=>this._onStdout.fire(typeof s=="string"?s:o.write(s))))}if(e.stderr){let o=new f0("utf-8");this._register(x.fromNodeEventEmitter(e.stderr,"data")(s=>this._onStderr.fire(typeof s=="string"?s:o.write(s))))}this._register(x.fromNodeEventEmitter(e,"message")(o=>this._onMessage.fire(o))),this._register(x.fromNodeEventEmitter(e,"spawn")(()=>{this.processPid=e.pid,typeof e.pid=="number"&&Pn.all.set(e.pid,{pid:e.pid,name:$9(t)?`${t.name} [${t.responseWindowId}]`:t.name}),this.log("successfully created",Xe.Info),this._onSpawn.fire(e.pid)})),this._register(x.fromNodeEventEmitter(e,"exit")(o=>{this.log(`received exit event with code ${o}`,Xe.Info),this._onExit.fire({pid:this.processPid,code:o,signal:"unknown"}),this.onDidExitOrCrashOrKill()})),this._register(x.fromNodeEventEmitter(Q9,"child-process-gone",(o,s)=>({event:o,details:s}))(({details:o})=>{o.type==="Utility"&&o.name===i&&(this.log(`crashed with code ${o.exitCode} and reason '${o.reason}'`,Xe.Error),this.logUtilityProcessCrash(o.exitCode,o.reason),this.telemetryService.publicLog2("utilityprocesscrash",{type:t.type,reason:o.reason,code:o.exitCode}),this._onCrash.fire({pid:this.processPid,code:o.exitCode,reason:o.reason}),this.onDidExitOrCrashOrKill())}))}once(e,t){let i=this._register(this._onMessage.event(o=>{o===e&&(i.dispose(),t())}))}postMessage(e,t){return this.process?(this.process.postMessage(e,t),!0):!1}connect(e){let{port1:t,port2:i}=new Y9;return this.postMessage(e,[i]),t}enableInspectPort(){if(!this.process||typeof this.processPid!="number")return!1;this.log("enabling inspect port",Xe.Info);let e=process;return typeof e._debugProcess=="function"?(e._debugProcess(this.processPid),!0):!1}kill(){if(!this.process)return;this.log("attempting to kill the process...",Xe.Info),this.process.kill()?(this.log("successfully killed the process",Xe.Info),this.onDidExitOrCrashOrKill()):this.log("unable to kill the process",Xe.Warning)}onDidExitOrCrashOrKill(){typeof this.processPid=="number"&&Pn.all.delete(this.processPid),this.process=void 0}async waitForExit(e){this.process&&(this.log("waiting to exit...",Xe.Info),await Promise.race([x.toPromise(this.onExit),bt(e)]),this.process&&(this.log(`did not exit within ${e}ms, will kill it now...`,Xe.Info),this.kill()))}};Pn=D([S(0,z),S(1,St),S(2,Te)],Pn);Vs=class extends Pn{constructor(e,t,i,o){super(e,i,o);this.windowsMainService=t}start(e){let t=this.windowsMainService.getWindowById(e.responseWindowId);if(!t?.win||t.win.isDestroyed()||t.win.webContents.isDestroyed())return this.log("Refusing to start utility process because requesting window cannot be found or is destroyed...",Xe.Error),!0;if(!super.doStart(e))return!1;this.registerWindowListeners(t.win,e);let o=this.connect(e.payload);return t.win.webContents.postMessage(e.responseChannel,e.responseNonce,[o]),!0}registerWindowListeners(e,t){if(t.windowLifecycleBound){let i=t.windowLifecycleGraceTime,o=i&&i>0?()=>this.waitForExit(i):()=>this.kill();this._register(x.filter(this.lifecycleMainService.onWillLoadWindow,s=>s.window.win===e)(o)),this._register(x.fromNodeEventEmitter(e,"closed")(o))}}};Vs=D([S(0,z),S(1,Ke),S(2,St),S(3,Te)],Vs)});import{app as sw}from"electron";var Z9,Xc,Qc,aw=_(()=>{Ti();Bt();de();zt();Ln();Bs();qe();me();ja();Z9="diagnosticsMainService",Xc=V(Z9),Qc=class{constructor(n,e,t){this.windowsMainService=n;this.workspacesManagementMainService=e;this.logService=t}async getRemoteDiagnostics(n){let e=this.windowsMainService.getWindows();return(await Promise.all(e.map(async i=>{let o=i.remoteAuthority;if(!o)return;let s=`vscode:getDiagnosticInfoResponse${i.id}`,a={includeProcesses:n.includeProcesses,folders:n.includeWorkspaceMetadata?await this.getFolderURIs(i):void 0};return new Promise(l=>{i.sendWhenReady("vscode:getDiagnosticInfo",Le.None,{replyChannel:s,args:a}),Tt.once(s,(c,u)=>{u||l({hostName:o,errorMessage:`Unable to resolve connection to '${o}'.`}),l(u)}),setTimeout(()=>{l({hostName:o,errorMessage:`Connection to '${o}' could not be established`})},5e3)})}))).filter(i=>!!i)}async getMainDiagnostics(){this.logService.trace("Received request for main process info from other instance.");let n=[];for(let o of ao()){let s=this.windowsMainService.getWindowById(o.id);s?n.push(await this.codeWindowToInfo(s)):n.push(this.browserWindowToInfo(o))}let e=[];for(let{pid:o,name:s}of Pn.getAll())e.push({pid:o,name:s});let t=[],i=sw;return typeof i.getGPULogMessages=="function"&&(t=i.getGPULogMessages()),{mainPID:process.pid,mainArguments:process.argv.slice(1),windows:n,pidToNames:e,screenReader:!!sw.accessibilitySupportEnabled,gpuFeatureStatus:sw.getGPUFeatureStatus(),gpuLogMessages:t}}async codeWindowToInfo(n){let e=await this.getFolderURIs(n),t=Ki(n.win);return this.browserWindowToInfo(t,e,n.remoteAuthority)}browserWindowToInfo(n,e=[],t){return{id:n.id,pid:n.webContents.getOSProcessId(),title:n.getTitle(),folderURIs:e,remoteAuthority:t}}async getFolderURIs(n){let e=[],t=n.openedWorkspace;if(Kt(t))e.push(t.uri);else if(yt(t)){let i=await this.workspacesManagementMainService.resolveLocalWorkspace(t.configPath);i&&i.folders.forEach(s=>{e.push(s.uri)})}return e}};Qc=D([S(0,Ke),S(1,kr),S(2,z)],Qc)});import{safeStorage as e3,app as t3}from"electron";var Gs,$c,g0=_(()=>{ce();bh();me();Gs=e3,$c=class{constructor(n){this.logService=n;t3.commandLine.getSwitchValue("password-store")==="basic"&&(this.logService.trace("[EncryptionMainService] setting usePlainTextEncryption to true..."),Gs.setUsePlainTextEncryption?.(!0),this.logService.trace("[EncryptionMainService] set usePlainTextEncryption to true"))}async encrypt(n){this.logService.trace("[EncryptionMainService] Encrypting value...");try{let e=JSON.stringify(Gs.encryptString(n));return this.logService.trace("[EncryptionMainService] Encrypted value."),e}catch(e){throw this.logService.error(e),e}}async decrypt(n){let e;try{if(e=JSON.parse(n),!e.data)throw new Error(`[EncryptionMainService] Invalid encrypted value: ${n}`);let t=Buffer.from(e.data);this.logService.trace("[EncryptionMainService] Decrypting value...");let i=Gs.decryptString(t);return this.logService.trace("[EncryptionMainService] Decrypted value."),i}catch(t){throw this.logService.error(t),t}}isEncryptionAvailable(){this.logService.trace("[EncryptionMainService] Checking if encryption is available...");let n=Gs.isEncryptionAvailable();return this.logService.trace("[EncryptionMainService] Encryption is available: ",n),Promise.resolve(n)}getKeyStorageProvider(){if(q)return Promise.resolve("dpapi");if($)return Promise.resolve("keychain_access");if(Gs.getSelectedStorageBackend)try{this.logService.trace("[EncryptionMainService] Getting selected storage backend...");let n=Gs.getSelectedStorageBackend();return this.logService.trace("[EncryptionMainService] Selected storage backend: ",n),Promise.resolve(n)}catch(n){this.logService.error(n)}return Promise.resolve("unknown")}async setUsePlainTextEncryption(){if(q)throw new Error("Setting plain text encryption is not supported on Windows.");if($)throw new Error("Setting plain text encryption is not supported on macOS.");if(!Gs.setUsePlainTextEncryption)throw new Error("Setting plain text encryption is not supported.");this.logService.trace("[EncryptionMainService] Setting usePlainTextEncryption to true..."),Gs.setUsePlainTextEncryption(!0),this.logService.trace("[EncryptionMainService] Set usePlainTextEncryption to true")}};$c=D([S(0,z)],$c)});var Jr,za=_(()=>{de();Jr=V("auxiliaryWindowsMainService")});var lw,h0,wI=_(()=>{lw="browserView",h0=999});function a3(r){return r===5||r===4||r===6||r===57}var Nm,bI,cw,dw,pw,n3,mw,r3,i3,o3,I0,uw,s3,v0=_(()=>{Nm=class{constructor(){this._keyCodeToStr=[],this._strToKeyCode=Object.create(null)}define(n,e){this._keyCodeToStr[n]=e,this._strToKeyCode[e.toLowerCase()]=n}keyCodeToStr(n){return this._keyCodeToStr[n]}strToKeyCode(n){return this._strToKeyCode[n.toLowerCase()]||0}},bI=new Nm,cw=new Nm,dw=new Nm,pw=new Array(230),n3={},mw={},r3=[],i3=Object.create(null),o3=Object.create(null),I0=[],uw=[];for(let r=0;r<=193;r++)I0[r]=-1;for(let r=0;r<=132;r++)uw[r]=-1;(function(){let n=[[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=[],t=[];for(let i of n){let[o,s,a,l,c,u,p,m,h]=i;if(t[s]||(t[s]=!0,r3[s]=a,i3[a]=s,o3[a.toLowerCase()]=s,o&&(I0[s]=l,l!==0&&l!==3&&!a3(l)&&(uw[l]=s))),!e[l]){if(e[l]=!0,!c)throw new Error(`String representation missing for key code ${l} around scan code ${a}`);bI.define(l,c),cw.define(l,m||c),dw.define(l,h||m||c)}u&&(pw[u]=l),a&&(mw[a]=u),p&&(n3[p]=l)}uw[3]=46})();(s=>{function r(a){return bI.keyCodeToStr(a)}s.toString=r;function n(a){return bI.strToKeyCode(a)}s.fromString=n;function e(a){return cw.keyCodeToStr(a)}s.toUserSettingsUS=e;function t(a){return dw.keyCodeToStr(a)}s.toUserSettingsGeneral=t;function i(a){return cw.strToKeyCode(a)||dw.strToKeyCode(a)}s.fromUserSettings=i;function o(a){if(a>=98&&a<=113)return null;switch(a){case 16:return"Up";case 18:return"Down";case 15:return"Left";case 17:return"Right";case 20:return"Delete"}return bI.keyCodeToStr(a)}s.toElectronAccelerator=o})(s3||={})});var Lm,fw=_(()=>{at();Ie();Xt();(o=>{o.scheme=Y.vscodeBrowser;function n(s,a){let l=a??Me();return A.from({scheme:o.scheme,path:`/${l}`,query:s?`url=${encodeURIComponent(s)}`:void 0})}o.forUrl=n;function e(s){if(s.scheme!==o.scheme)return;let a=s.path.startsWith("/")?s.path.substring(1):s.path;if(!a)return;let l=s.query?new URLSearchParams(s.query).get("url")??"":"";return{id:a,url:l}}o.parse=e;function t(s){return e(s)?.id}o.getId=t;function i(s){return e(s)?.url}o.getUrl=i})(Lm||={})});var TI,gw,E0=_(()=>{ae();te();TI=class extends M{constructor(e,t){super();this.view=e;this.logService=t;this._sessions=this._register(new xn);this._electronDebugger=e.webContents.debugger,this._messageHandler=(i,o,s,a)=>{this.routeCDPEvent(o,s,a)}}async attach(){await this.initialize();let t=(await this._electronDebugger.sendCommand("Target.attachToTarget",{targetId:this._realTargetId,flatten:!0})).sessionId,i=new gw(t,this.view,this._electronDebugger);return this._sessions.set(t,i),i.onClose(()=>this._sessions.deleteAndDispose(t)),i}async getTargetInfo(){await this.initialize();let e=this.view.webContents.getURL()||"about:blank",t=this.view.webContents.getTitle()||e;return{targetId:this._realTargetId,type:"page",title:t,url:e,attached:this._sessions.size>0,canAccessOpener:!1,browserContextId:this.view.session.id}}initialize(){return this._initializePromise||(this._initializePromise=(async()=>{if(this.attachElectronDebugger(),await this.discoverRealTargetId(),!this._realTargetId)throw this._initializePromise=void 0,new Error("Could not discover real targetId for this WebContents")})()),this._initializePromise}async discoverRealTargetId(){try{let e=await this._electronDebugger.sendCommand("Target.getTargetInfo");this._realTargetId=e.targetInfo.targetId}catch(e){this.logService.error("[BrowserViewDebugger] Error discovering real targetId:",e)}}attachElectronDebugger(){this._electronDebugger.isAttached()||(this._electronDebugger.attach("1.3"),this._electronDebugger.on("message",this._messageHandler))}routeCDPEvent(e,t,i){if(!i)return;let o=this._sessions.get(i);o&&o.emitEvent({method:e,params:t,sessionId:i})}detachElectronDebugger(){if(this._electronDebugger.isAttached()){this._electronDebugger.removeListener("message",this._messageHandler);try{this._electronDebugger.detach()}catch(e){this.logService.error("[BrowserViewDebugger] Error detaching from WebContents:",e)}}}dispose(){this.detachElectronDebugger(),super.dispose()}},gw=class extends M{constructor(e,t,i){super();this.sessionId=e;this._view=t;this._electronDebugger=i;this._onEvent=this._register(new C);this.onEvent=this._onEvent.event;this.emitEvent=e=>this._onEvent.fire(e);this._onClose=this._register(new C);this.onClose=this._onClose.event;this._isDisposed=!1}async sendMessage(e,t,i){if(e==="Emulation.setDeviceMetricsOverride")return Promise.resolve({});let o=await this._electronDebugger.sendCommand(e,t,this.sessionId);return e==="Page.handleJavaScriptDialog"&&this._view.webContents.emit("-cancel-dialogs"),o}dispose(){this._isDisposed||(this._isDisposed=!0,this._electronDebugger.sendCommand("Target.detachFromTarget",{sessionId:this.sessionId}).catch(()=>{}),this._onClose.fire(),super.dispose())}}});import{WebContentsView as l3,webContents as c3}from"electron";var d3,ni,hw=_(()=>{at();te();ae();Et();wI();v0();zt();za();ce();fw();E0();me();d3=new Set([2079,2081,2100,3124,2102,...$?[]:[2103],2104,3128]),ni=class extends M{constructor(e,t,i,o,s,a,l){super();this.id=e;this.session=t;this.windowsMainService=s;this.auxiliaryWindowsMainService=a;this.logService=l;this._faviconRequestCache=new Map;this._lastScreenshot=void 0;this._lastFavicon=void 0;this._lastError=void 0;this._lastUserGestureTimestamp=-1/0;this._isSendingKeyEvent=!1;this._isDisposed=!1;this._onDidNavigate=this._register(new C);this.onDidNavigate=this._onDidNavigate.event;this._onDidChangeLoadingState=this._register(new C);this.onDidChangeLoadingState=this._onDidChangeLoadingState.event;this._onDidChangeFocus=this._register(new C);this.onDidChangeFocus=this._onDidChangeFocus.event;this._onDidChangeVisibility=this._register(new C);this.onDidChangeVisibility=this._onDidChangeVisibility.event;this._onDidChangeDevToolsState=this._register(new C);this.onDidChangeDevToolsState=this._onDidChangeDevToolsState.event;this._onDidKeyCommand=this._register(new C);this.onDidKeyCommand=this._onDidKeyCommand.event;this._onDidChangeTitle=this._register(new C);this.onDidChangeTitle=this._onDidChangeTitle.event;this._onDidChangeFavicon=this._register(new C);this.onDidChangeFavicon=this._onDidChangeFavicon.event;this._onDidRequestNewPage=this._register(new C);this.onDidRequestNewPage=this._onDidRequestNewPage.event;this._onDidFindInPage=this._register(new C);this.onDidFindInPage=this._onDidFindInPage.event;this._onDidContextMenu=this._register(new C);this.onDidContextMenu=this._onDidContextMenu.event;this._onDidClose=this._register(new C);this.onDidClose=this._onDidClose.event;let c={...o?.webPreferences,nodeIntegration:!1,contextIsolation:!0,sandbox:!0,webviewTag:!1,session:this.session.electronSession,preload:gt.asFileUri("vs/platform/browserView/electron-browser/preload-browserView.js").fsPath,type:"browserView"};this._view=new l3({webPreferences:c,...o?.webContents?{webContents:o.webContents}:{}}),this._view.setBackgroundColor("#FFFFFF"),this._view.webContents.setWindowOpenHandler(u=>{let p=(()=>{switch(u.disposition){case"background-tab":return"background";case"foreground-tab":return"foreground";case"new-window":return"newWindow";default:return}})();return!p||!this.consumePopupPermission(p)?{action:"deny"}:{action:"allow",createWindow:m=>{let h=i(m),E=Lm.forUrl(u.url,h.id);return this._onDidRequestNewPage.fire({resource:E,location:p,position:{x:m.x,y:m.y,width:m.width,height:m.height}}),h.webContents}}}),this._view.webContents.on("destroyed",()=>{this.dispose()}),this._debugger=new TI(this,this.logService),this._register(t.acquire()),this.setupEventListeners()}setupEventListeners(){let e=this._view.webContents;e.on("devtools-opened",()=>{this._onDidChangeDevToolsState.fire({isDevToolsOpen:!0})}),e.on("devtools-closed",()=>{this._onDidChangeDevToolsState.fire({isDevToolsOpen:!1})}),e.on("page-favicon-updated",async(o,s)=>{for(let a of s){this._faviconRequestCache.has(a)||this._faviconRequestCache.set(a,(async()=>{let l=await e.session.fetch(a,{cache:"force-cache"});if(!l.ok)throw new Error(`Failed to fetch favicon: ${l.status} ${l.statusText}`);let c=await l.headers.get("content-type"),u=await l.arrayBuffer();return`data:${c};base64,${Buffer.from(u).toString("base64")}`})());try{this._lastFavicon=await this._faviconRequestCache.get(a),this._onDidChangeFavicon.fire({favicon:this._lastFavicon});return}catch{}}this._lastFavicon&&(this._lastFavicon=void 0,this._onDidChangeFavicon.fire({favicon:this._lastFavicon}))}),e.on("page-title-updated",(o,s)=>{this._onDidChangeTitle.fire({title:s})});let t=()=>{this._onDidNavigate.fire({url:e.getURL(),title:e.getTitle(),canGoBack:e.navigationHistory.canGoBack(),canGoForward:e.navigationHistory.canGoForward()})},i=o=>{this._onDidChangeLoadingState.fire({loading:o,error:this._lastError})};e.on("did-start-loading",()=>{this._lastError=void 0,i(!0)}),e.on("did-stop-loading",()=>i(!1)),e.on("did-fail-load",(o,s,a,l,c)=>{if(c){if(s===-3){i(!1);return}this._lastError={url:l,errorCode:s,errorDescription:a},i(!1),this._onDidNavigate.fire({url:l,title:"",canGoBack:e.navigationHistory.canGoBack(),canGoForward:e.navigationHistory.canGoForward()})}}),e.on("did-finish-load",()=>i(!1)),e.on("render-process-gone",(o,s)=>{this._lastError={url:e.getURL(),errorCode:s.exitCode,errorDescription:`Render process gone: ${s.reason}`},i(!1)}),e.on("did-navigate",t),e.on("did-navigate-in-page",t),e.on("focus",()=>{this._onDidChangeFocus.fire({focused:!0})}),e.on("blur",()=>{this._onDidChangeFocus.fire({focused:!1})}),e.on("before-input-event",async(o,s)=>{s.type==="keyDown"&&!this._isSendingKeyEvent&&this.tryHandleCommand(s)&&o.preventDefault()}),e.on("input-event",(o,s)=>{switch(s.type){case"rawKeyDown":case"keyDown":case"mouseDown":case"pointerDown":case"pointerUp":case"touchEnd":this._lastUserGestureTimestamp=Date.now()}}),e.on("will-prevent-unload",o=>{o.preventDefault()}),e.on("found-in-page",(o,s)=>{this._onDidFindInPage.fire({activeMatchOrdinal:s.activeMatchOrdinal,matches:s.matches,selectionArea:s.selectionArea,finalUpdate:s.finalUpdate})}),e.on("context-menu",(o,s)=>{this._onDidContextMenu.fire({x:s.x,y:s.y,selectionText:s.selectionText,linkURL:s.linkURL})})}consumePopupPermission(e){switch(e){case"foreground":case"background":return!0;case"newWindow":return this._lastUserGestureTimestamp>Date.now()-1e3?(this._lastUserGestureTimestamp=-1/0,!0):!1}}get webContents(){return this._view.webContents}getState(){let e=this._view.webContents;return{url:e.getURL(),title:e.getTitle(),canGoBack:e.navigationHistory.canGoBack(),canGoForward:e.navigationHistory.canGoForward(),loading:e.isLoading(),focused:e.isFocused(),visible:this._view.getVisible(),isDevToolsOpen:e.isDevToolsOpened(),lastScreenshot:this._lastScreenshot,lastFavicon:this._lastFavicon,lastError:this._lastError,storageScope:this.session.storageScope}}toggleDevTools(){this._view.webContents.toggleDevTools()}layout(e){if(this._window?.win?.id!==e.windowId){let t=this.windowById(e.windowId);t&&(this._window?.win?.contentView.removeChildView(this._view),this._window=t,t.win?.contentView.addChildView(this._view))}this._view.webContents.setZoomFactor(e.zoomFactor),this._view.setBounds({x:Math.round(e.x*e.zoomFactor),y:Math.round(e.y*e.zoomFactor),width:Math.round(e.width*e.zoomFactor),height:Math.round(e.height*e.zoomFactor)})}setVisible(e){this._view.getVisible()!==e&&(!e&&this._view.webContents.isFocused()&&this._window?.win?.webContents.focus(),this._view.setVisible(e),this._onDidChangeVisibility.fire({visible:e}))}async loadURL(e){await this._view.webContents.loadURL(e)}getURL(){return this._view.webContents.getURL()}goBack(){this._view.webContents.navigationHistory.canGoBack()&&this._view.webContents.navigationHistory.goBack()}goForward(){this._view.webContents.navigationHistory.canGoForward()&&this._view.webContents.navigationHistory.goForward()}reload(){this._view.webContents.reload()}canGoBack(){return this._view.webContents.navigationHistory.canGoBack()}canGoForward(){return this._view.webContents.navigationHistory.canGoForward()}async captureScreenshot(e){let t=await this._view.webContents.capturePage(e?.rect,{stayHidden:!0,stayAwake:!0}),i=e?.format==="png"?t.toPNG():t.toJPEG(e?.quality??80),o=ee.wrap(i);return e?.rect||(this._lastScreenshot=o),o}async dispatchKeyEvent(e){let t={type:"keyDown",keyCode:e.key,modifiers:[]};e.ctrlKey&&t.modifiers.push("control"),e.shiftKey&&t.modifiers.push("shift"),e.altKey&&t.modifiers.push("alt"),e.metaKey&&t.modifiers.push("meta"),this._isSendingKeyEvent=!0;try{await this._view.webContents.sendInputEvent(t)}finally{this._isSendingKeyEvent=!1}}async setZoomFactor(e){await this._view.webContents.setZoomFactor(e)}async focus(){this._view.webContents.focus()}async findInPage(e,t){this._view.webContents.findInPage(e,{matchCase:t?.matchCase??!1,forward:t?.forward??!0,findNext:t?.recompute??!1})}async stopFindInPage(e){this._view.webContents.stopFindInPage(e?"keepSelection":"clearSelection")}async getSelectedText(){if(this._view.webContents.isLoading())return"";try{return await this._view.webContents.executeJavaScriptInIsolatedWorld(h0,[{code:'window.browserViewAPI?.getSelectedText?.() ?? ""'}])}catch{return""}}async clearStorage(){await this.session.electronSession.clearData()}allowClipboardWrite(){let e=this._view.webContents.id;this.session.allowClipboardWrite(e),this._register(oe(()=>{this.session.disallowClipboardWrite(e)}))}configureRequestHeaders(e,t){let i=this._view.webContents.id;this._view.webContents.session.webRequest.onBeforeSendHeaders({urls:t},(o,s)=>{if(o.webContentsId===i)for(let[a,l]of Object.entries(e))o.requestHeaders[a]=l;s({requestHeaders:o.requestHeaders})})}getWebContentsView(){return this._view}getTargetInfo(){return this._debugger.getTargetInfo()}attach(){return this._debugger.attach()}dispose(){this._isDisposed||(this._isDisposed=!0,this._debugger.dispose(),this._window?.win?.contentView.removeChildView(this._view),this._onDidClose.fire(),this._view.webContents.close({waitForBeforeUnload:!1}),super.dispose())}tryHandleCommand(e){let t=mw[e.code]||0,i=pw[t]||0,o=i>=15&&i<=18,s=i===9||i>=59&&i<=82||i>=117;if(e.alt&&!e.control&&!e.meta&&!s&&!o||!(e.control||e.alt||e.meta)&&!s)return!1;let c=$?e.meta:e.control,u=i|(c?2048:0)|(e.shift?1024:0)|(e.alt?512:0);return d3.has(u)?!1:(this._onDidKeyCommand.fire({key:e.key,keyCode:t,code:e.code,ctrlKey:e.control||!1,shiftKey:e.shift||!1,altKey:e.alt||!1,metaKey:e.meta||!1,repeat:e.isAutoRepeat||!1}),!0)}windowById(e){return this.codeWindowById(e)??this.auxiliaryWindowById(e)}codeWindowById(e){if(typeof e=="number")return this.windowsMainService.getWindowById(e)}auxiliaryWindowById(e){if(typeof e!="number")return;let t=c3.fromId(e);if(t)return this.auxiliaryWindowsMainService.getWindowByWebContents(t)}};ni=D([S(4,Ke),S(5,Jr),S(6,z)],ni)});import{session as Iw}from"electron";var y0,ri,S0=_(()=>{te();Ut();wI();y0=new Set(["pointerLock"]),ri=class r extends M{constructor(e,t,i){super();this.id=e;this.electronSession=t;this.storageScope=i;this.refs=0;this._clipboardWriteAllowed=new Set;if(r._sessions.has(e))throw new Error(`BrowserSession with id '${e}' already exists`);this.configureSession(),r.knownSessions.add(t),r._sessions.set(e,this)}static{this._sessions=new Map}static{this.knownSessions=new WeakSet}static isBrowserViewWebContents(e){return r.knownSessions.has(e.session)}static get(e){return r._sessions.get(e)}static getBrowserContextIds(){return[...r._sessions.keys()]}static getOrCreateGlobal(){let e=r._sessions.get("global");return e||new r("global",Iw.fromPartition("persist:vscode-browser"),"global")}static getOrCreateWorkspace(e,t){let i=`workspace:${e}`,o=r._sessions.get(i);if(o)return o;let s=be(t,e,"browserStorage");return new r(i,Iw.fromPath(s.fsPath),"workspace")}static getOrCreateEphemeral(e,t){if(t==="workspace"||t==="ephemeral")throw new Error(`Cannot create session with reserved type '${t}'`);let i=`${t??"ephemeral"}:${e}`,o=r._sessions.get(i);return o||new r(i,Iw.fromPartition(`vscode-browser-${t}${e}`),"ephemeral")}static getOrCreate(e,t,i,o){switch(t){case"global":return r.getOrCreateGlobal();case"workspace":if(o)return r.getOrCreateWorkspace(o,i);case"ephemeral":default:return r.getOrCreateEphemeral(e)}}configureSession(){this.electronSession.setPermissionRequestHandler((e,t,i)=>y0.has(t)||t==="clipboard-sanitized-write"&&e&&this._clipboardWriteAllowed.has(e.id)?i(!0):i(!1)),this.electronSession.setPermissionCheckHandler((e,t,i)=>!!(y0.has(t)||t==="clipboard-sanitized-write"&&e&&this._clipboardWriteAllowed.has(e.id)))}allowClipboardWrite(e){this._clipboardWriteAllowed.add(e)}disallowClipboardWrite(e){this._clipboardWriteAllowed.delete(e)}acquire(){return this.refs++,oe(()=>{this.refs--,this.refs===0&&this.dispose()})}dispose(){if(this.refs>0)throw new Error("Cannot dispose BrowserSession because it is still in use");r._sessions.delete(this.id),super.dispose()}}});var Um,Yo,PI,Mm,Hs,vw=_(()=>{Um={MethodNotFound:-32601,InvalidParams:-32602,InternalError:-32603,ServerError:-32e3},Yo=class extends Error{constructor(e,t){super(e);this.code=t;this.name="CDPError"}},PI=class extends Yo{constructor(n){super(`Method not found: ${n}`,Um.MethodNotFound),this.name="CDPMethodNotFoundError"}},Mm=class extends Yo{constructor(n){super(n,Um.InvalidParams),this.name="CDPInvalidParamsError"}},Hs=class extends Yo{constructor(n){super(n,Um.ServerError),this.name="CDPServerError"}}});var Js,Ew,CI=_(()=>{te();ae();Xt();vw();Js=class extends M{constructor(e){super();this.browserTarget=e;this.sessionId=`browser-session-${Me()}`;this._isAttachedToBrowserTarget=!1;this._autoAttach=!1;this._discover=!1;this._targets=this._register(new Ew);this._sessions=this._register(new xn);this._sessionTargetIds=new WeakMap;this._autoAttachments=new WeakMap;this._handlers=new Map([["Browser.addPrivacySandboxCoordinatorKeyConfig",()=>({})],["Browser.addPrivacySandboxEnrollmentOverride",()=>({})],["Browser.close",()=>({})],["Browser.getVersion",()=>this.browserTarget.getVersion()],["Browser.resetPermissions",()=>({})],["Browser.getWindowForTarget",(e,t)=>this.handleBrowserGetWindowForTarget(e,t)],["Browser.setDownloadBehavior",()=>({})],["Browser.setWindowBounds",()=>({})],["Target.activateTarget",e=>this.handleTargetActivateTarget(e)],["Target.attachToTarget",e=>this.handleTargetAttachToTarget(e)],["Target.closeTarget",e=>this.handleTargetCloseTarget(e)],["Target.createBrowserContext",()=>this.handleTargetCreateBrowserContext()],["Target.createTarget",e=>this.handleTargetCreateTarget(e)],["Target.detachFromTarget",e=>this.handleTargetDetachFromTarget(e)],["Target.disposeBrowserContext",e=>this.handleTargetDisposeBrowserContext(e)],["Target.getBrowserContexts",()=>this.handleTargetGetBrowserContexts()],["Target.getTargets",()=>this.handleTargetGetTargets()],["Target.setAutoAttach",e=>this.handleTargetSetAutoAttach(e)],["Target.setDiscoverTargets",e=>this.handleTargetSetDiscoverTargets(e)],["Target.attachToBrowserTarget",()=>this.handleTargetAttachToBrowserTarget()],["Target.getTargetInfo",e=>this.handleTargetGetTargetInfo(e)]]);this._onEvent=this._register(new C);this.onEvent=this._onEvent.event;this._onClose=this._register(new C);this.onClose=this._onClose.event;this._targets.onDidRegisterTarget(async({targetInfo:t})=>{this._discover&&this.sendBrowserEvent("Target.targetCreated",{targetInfo:t}),this._autoAttach&&await this.attachToTarget(t.targetId,!0)}),this._targets.onDidUnregisterTarget(({targetInfo:t})=>{let i=[];for(let[,o]of this._sessions)this._sessionTargetIds.get(o)===t.targetId&&i.push(o);for(let o of i)o.dispose();this._discover&&this.sendBrowserEvent("Target.targetDestroyed",{targetId:t.targetId})}),this._register(this.browserTarget.onTargetCreated(t=>this._targets.register(t))),this._register(this.browserTarget.onTargetDestroyed(t=>this._targets.unregister(t)));for(let t of this.browserTarget.getTargets())this._targets.register(t)}async sendMessage(e,t={},i){try{if(!i||i===this.sessionId||e.startsWith("Browser.")||e.startsWith("Target.")){let a=this._handlers.get(e);if(!a)throw new PI(e);return await a(t,i)}let o=this._sessions.get(i);if(!o)throw new Hs(`Session not found: ${i}`);return await o.sendMessage(e,t)??{}}catch(o){throw o instanceof Yo?o:new Hs(o instanceof Error?o.message:"Unknown error")}}handleBrowserGetWindowForTarget({targetId:e},t){let i=(t&&this.findTargetIdForSession(t))??e;if(!i)throw new Hs("Unable to resolve target");let o=this._targets.getById(i);return this.browserTarget.getWindowForTarget(o)}handleTargetGetBrowserContexts(){return{browserContextIds:this.browserTarget.getBrowserContexts()}}async handleTargetCreateBrowserContext(){return{browserContextId:await this.browserTarget.createBrowserContext()}}async handleTargetDisposeBrowserContext({browserContextId:e}){return await this.browserTarget.disposeBrowserContext(e),{}}handleTargetAttachToBrowserTarget(){return this._isAttachedToBrowserTarget=!0,{sessionId:this.sessionId}}handleTargetActivateTarget({targetId:e}){let t=this._targets.getById(e);return this.browserTarget.activateTarget(t)}async handleTargetSetAutoAttach({autoAttach:e=!1,flatten:t}){if(!t)throw new Mm("This implementation only supports auto-attach with flatten=true");return this._autoAttach=e,{}}async handleTargetSetDiscoverTargets({discover:e=!1}){if(e!==this._discover&&(this._discover=e,this._discover))for(let t of this._targets.getAllInfos())this.sendBrowserEvent("Target.targetCreated",{targetInfo:t});return{}}async handleTargetGetTargets(){return{targetInfos:this._targets.getAllInfos()}}async handleTargetGetTargetInfo({targetId:e}={}){return e?{targetInfo:await this._targets.getById(e).getTargetInfo()}:{targetInfo:await this.browserTarget.getTargetInfo()}}async handleTargetAttachToTarget({targetId:e,flatten:t}){if(!t)throw new Mm("This implementation only supports attachToTarget with flatten=true");return{sessionId:(await this.attachToTarget(e,!1)).sessionId}}async handleTargetDetachFromTarget({sessionId:e}){let t=this._sessions.get(e);if(!t)throw new Hs(`Session not found: ${e}`);return t.dispose(),{}}async handleTargetCreateTarget({url:e,browserContextId:t}){let i=await this.browserTarget.createTarget(e||"about:blank",t),o=await this._targets.register(i);return this._autoAttach&&await this.attachToTarget(o.targetId,!0),{targetId:o.targetId}}async handleTargetCloseTarget({targetId:e}){try{return await this.browserTarget.closeTarget(this._targets.getById(e)),{success:!0}}catch{return{success:!1}}}findTargetIdForSession(e){let t=this._sessions.get(e);if(t)return this._sessionTargetIds.get(t)}sendBrowserEvent(e,t){let i=this._isAttachedToBrowserTarget?this.sessionId:void 0;this._onEvent.fire({method:e,params:t,sessionId:i})}async attachToTarget(e,t){let i=this._targets.getById(e);if(t&&this._autoAttachments.has(i))return this._autoAttachments.get(i);let o=(async()=>{let s=await i.attach(),a=s.sessionId;this._sessions.set(a,s),this._sessionTargetIds.set(s,e);let l=await i.getTargetInfo();return s.onEvent(c=>{c.method.startsWith("Target.")||this._onEvent.fire({method:c.method,params:c.params,sessionId:a})}),s.onClose(()=>{this.sendBrowserEvent("Target.detachedFromTarget",{sessionId:a,targetId:e}),this._sessions.deleteAndDispose(a),this._sessionTargetIds.delete(s),this._autoAttachments.get(i)===o&&this._autoAttachments.delete(i)}),this.sendBrowserEvent("Target.attachedToTarget",{sessionId:a,targetInfo:{...l,attached:!0},waitingForDebugger:!1}),s})();return t&&this._autoAttachments.set(i,o),o}},Ew=class extends M{constructor(){super(...arguments);this._knownTargets=new WeakSet;this._targetInfos=new WeakMap;this._targetsByID=new Map;this._onDidRegisterTarget=this._register(new C);this.onDidRegisterTarget=this._onDidRegisterTarget.event;this._onDidUnregisterTarget=this._register(new C);this.onDidUnregisterTarget=this._onDidUnregisterTarget.event}getById(e){let t=this._targetsByID.get(e);if(!t)throw new Hs(`Unknown targetId: ${e}`);return t}*getAllInfos(){for(let e of this._targetsByID.values())yield this._targetInfos.get(e)}async register(e){if(this._knownTargets.has(e))return e.getTargetInfo();this._knownTargets.add(e);let t=await e.getTargetInfo();return this._knownTargets.has(e)&&(this._targetInfos.set(e,t),this._targetsByID.set(t.targetId,e),this._onDidRegisterTarget.fire({target:e,targetInfo:t})),t}async unregister(e){if(!this._knownTargets.has(e))return;this._knownTargets.delete(e);let t=this._targetInfos.get(e);t&&(this._targetInfos.delete(e),this._targetsByID.delete(t.targetId),this._onDidUnregisterTarget.fire({target:e,targetInfo:t}))}}});function _0(r,n){r.publicLog2("integratedBrowser.open",{source:n})}var w0=_(()=>{});var Qa,Ya,AI=_(()=>{ae();te();$t();de();hw();Xt();fw();zt();S0();In();CI();w0();Tn();Qa=V("browserViewMainService"),Ya=class extends M{constructor(e,t,i,o,s){super();this.environmentMainService=e;this.instantiationService=t;this.windowsMainService=i;this.productService=o;this.telemetryService=s;this.browserViews=this._register(new xn);this._onTargetCreated=this._register(new C);this.onTargetCreated=this._onTargetCreated.event;this._onTargetDestroyed=this._register(new C);this.onTargetDestroyed=this._onTargetDestroyed.event}static isBrowserViewWebContents(e){return ri.isBrowserViewWebContents(e)}createBrowserView(e,t,i){if(this.browserViews.has(e))throw new Error(`Browser view with id ${e} already exists`);let o=this.instantiationService.createInstance(ni,e,t,s=>this.createBrowserView(Me(),t,s),i);return this.browserViews.set(e,o),this._onTargetCreated.fire(o),x.once(o.onDidClose)(()=>{this._onTargetDestroyed.fire(o),this.browserViews.deleteAndDispose(e)}),o}async getOrCreateBrowserView(e,t,i){if(this.browserViews.has(e))return this.browserViews.get(e).getState();let o=ri.getOrCreate(e,t,this.environmentMainService.workspaceStorageHome,i);return this.createBrowserView(e,o).getState()}tryGetBrowserView(e){return this.browserViews.get(e)}getVersion(){return{protocolVersion:"1.3",product:`${this.productService.nameShort}/${this.productService.version}`,revision:this.productService.commit||"unknown",userAgent:"Electron",jsVersion:process.versions.v8}}getWindowForTarget(e){if(!(e instanceof ni))throw new Error("Can only get window for targets created by this service");let i=e.getWebContentsView().getBounds();return{windowId:1,bounds:{left:i.x,top:i.y,width:i.width,height:i.height,windowState:"normal"}}}async attach(){return new Js(this)}async getTargetInfo(){return{targetId:"browser",type:"browser",title:this.getVersion().product,url:"",attached:!0,canAccessOpener:!1}}getTargets(){return this.browserViews.values()}async createTarget(e,t){let i=Me(),o=t&&ri.get(t)||ri.getOrCreateEphemeral(i),s=this.createBrowserView(i,o);return _0(this.telemetryService,"cdpCreated"),this.windowsMainService.sendToFocused("vscode:runAction",{id:"vscode.open",args:[Lm.forUrl(e,i)]}),s}async activateTarget(e){if(!(e instanceof ni))throw new Error("Can only activate targets created by this service")}async closeTarget(e){if(!(e instanceof ni))throw new Error("Can only close targets created by this service");return await this.destroyBrowserView(e.id),!0}getBrowserContexts(){return ri.getBrowserContextIds()}async createBrowserContext(){return ri.getOrCreateEphemeral(Me(),"cdp-created").id}async disposeBrowserContext(e){if(!e.startsWith("cdp-created:"))throw new Error("Can only dispose browser contexts created via CDP");let t=ri.get(e);if(!t)throw new Error(`Browser context ${e} not found`);for(let i of this.browserViews.values())i.session===t&&await this.destroyBrowserView(i.id);t.dispose()}_getBrowserView(e){let t=this.browserViews.get(e);if(!t)throw new Error(`Browser view ${e} not found`);return t}onDynamicDidNavigate(e){return this._getBrowserView(e).onDidNavigate}onDynamicDidChangeLoadingState(e){return this._getBrowserView(e).onDidChangeLoadingState}onDynamicDidChangeFocus(e){return this._getBrowserView(e).onDidChangeFocus}onDynamicDidChangeVisibility(e){return this._getBrowserView(e).onDidChangeVisibility}onDynamicDidChangeDevToolsState(e){return this._getBrowserView(e).onDidChangeDevToolsState}onDynamicDidKeyCommand(e){return this._getBrowserView(e).onDidKeyCommand}onDynamicDidChangeTitle(e){return this._getBrowserView(e).onDidChangeTitle}onDynamicDidChangeFavicon(e){return this._getBrowserView(e).onDidChangeFavicon}onDynamicDidRequestNewPage(e){return this._getBrowserView(e).onDidRequestNewPage}onDynamicDidFindInPage(e){return this._getBrowserView(e).onDidFindInPage}onDynamicDidContextMenu(e){return this._getBrowserView(e).onDidContextMenu}onDynamicDidClose(e){return this._getBrowserView(e).onDidClose}async destroyBrowserView(e){return this.browserViews.deleteAndDispose(e)}async layout(e,t){return this._getBrowserView(e).layout(t)}async setVisible(e,t){return this._getBrowserView(e).setVisible(t)}async loadURL(e,t){return this._getBrowserView(e).loadURL(t)}async getURL(e){return this._getBrowserView(e).getURL()}async goBack(e){return this._getBrowserView(e).goBack()}async goForward(e){return this._getBrowserView(e).goForward()}async reload(e){return this._getBrowserView(e).reload()}async toggleDevTools(e){return this._getBrowserView(e).toggleDevTools()}async canGoBack(e){return this._getBrowserView(e).canGoBack()}async canGoForward(e){return this._getBrowserView(e).canGoForward()}async captureScreenshot(e,t){return this._getBrowserView(e).captureScreenshot(t)}async dispatchKeyEvent(e,t){return this._getBrowserView(e).dispatchKeyEvent(t)}async setZoomFactor(e,t){return this._getBrowserView(e).setZoomFactor(t)}async focus(e){return this._getBrowserView(e).focus()}async findInPage(e,t,i){return this._getBrowserView(e).findInPage(t,i)}async stopFindInPage(e,t){return this._getBrowserView(e).stopFindInPage(t)}async getSelectedText(e){return this._getBrowserView(e).getSelectedText()}async clearStorage(e){return this._getBrowserView(e).clearStorage()}async configureRequestHeaders(e,t,i){this._getBrowserView(e).configureRequestHeaders(t,i)}async allowClipboardWrite(e){this._getBrowserView(e).allowClipboardWrite()}async clearGlobalStorage(){await ri.getOrCreateGlobal().electronSession.clearData()}async clearWorkspaceStorage(e){await ri.getOrCreateWorkspace(e,this.environmentMainService.workspaceStorageHome).electronSession.clearData()}};Ya=D([S(0,Fe),S(1,rn),S(2,Ke),S(3,He),S(4,St)],Ya)});import{webContents as RI}from"electron";function T0(r){return r.browserViewId??r.webviewId}var yw,b0,Fm,Zc,P0=_(()=>{za();zt();de();te();AI();yw=V("browserElementsMainService"),b0=1e3,Fm=new Map;Zc=class extends M{constructor(e,t,i){super();this.windowsMainService=e;this.auxiliaryWindowsMainService=t;this.browserViewMainService=i}get windowId(){throw new Error("Not implemented in electron-main")}async getConsoleLogs(e,t){let i=T0(t);if(!i)return;let o=Fm.get(i);if(!(!o||o.length===0))return o.join(`
`)}async startConsoleSession(e,t,i,o){let s=this.windowById(e);if(!s?.win)return;let a=s.win.webContents,l;if(i.browserViewId&&(l=this.browserViewMainService.tryGetBrowserView(i.browserViewId)?.webContents),!l)return;let c=T0(i);if(!c)return;Fm.has(c)||Fm.set(c,[]);let u={0:"log",1:"warning",2:"error"},p=(y,P,T,k,U)=>{let B=`[${u[P]??"log"}] ${T}`,he=Fm.get(c)??[];he.push(B),he.length>b0&&he.splice(0,he.length-b0),Fm.set(c,he)},m=()=>{l?.off("console-message",p),l?.off("destroyed",E),a.off("ipc-message",h)},h=(y,P,T)=>{if(P===`vscode:cancelConsoleSession${o}`){if(o!==T)return;m()}},E=()=>{m()};l.on("console-message",p),l.on("destroyed",E),a.on("ipc-message",h),t.onCancellationRequested(m)}async findWebviewTarget(e,t){let{targetInfos:i}=await e.sendCommand("Target.getTargets");if(t.webviewId){let o="";for(let a of i)try{let l=new URL(a.url);if(l.searchParams.get("id")===t.webviewId){o=l.searchParams.get("extensionId")||"";break}}catch{}return o?i.find(a=>{try{let l=new URL(a.url),c=o==="ms-vscode.live-server"&&l.searchParams.get("serverWindowId")===t.webviewId,u=o==="vscode.simple-browser"&&l.searchParams.get("id")===t.webviewId&&l.searchParams.has("vscodeBrowserReqId");return!!(c||u)}catch{return!1}})?.targetId:void 0}if(t.browserViewId){let o=this.browserViewMainService.tryGetBrowserView(t.browserViewId)?.webContents;return i.find(a=>a.type!=="page"?!1:RI.fromDevToolsTargetId(a.targetId)===o)?.targetId}}async waitForWebviewTargets(e,t){let i=Date.now(),o=1e4;for(;Date.now()-i<o;){let s=await this.findWebviewTarget(e,t);if(s)return s;await new Promise(a=>setTimeout(a,500))}e.detach()}async startDebugSession(e,t,i,o){let s=this.windowById(e);if(!s?.win)return;let l=RI.getAllWebContents().find(u=>u.id===s.id);if(!l)return;let c=l.debugger;c.isAttached()||c.attach();try{if(!await this.waitForWebviewTargets(c,i))throw c.isAttached()&&c.detach(),new Error("No target found")}catch{throw c.isAttached()&&c.detach(),new Error("No target found")}s.win.webContents.on("ipc-message",async(u,p,m)=>{if(p===`vscode:cancelCurrentSession${o}`){if(o!==m)return;c.isAttached()&&c.detach(),s.win&&s.win.webContents.removeAllListeners("ipc-message")}})}async finishOverlay(e,t){e.isAttached()&&t&&(await e.sendCommand("Overlay.setInspectMode",{mode:"none",highlightConfig:{showInfo:!1,showStyles:!1}},t),await e.sendCommand("Overlay.hideHighlight",{},t),await e.sendCommand("Overlay.disable",{},t),e.detach())}async getElementData(e,t,i,o,s){let a=this.windowById(e);if(!a?.win)return;let c=RI.getAllWebContents().find(T=>T.id===a.id);if(!c)return;let u=c.debugger;u.isAttached()||u.attach();let p;try{let T=await this.findWebviewTarget(u,o),{sessionId:k}=await u.sendCommand("Target.attachToTarget",{targetId:T,flatten:!0});p=k,await u.sendCommand("DOM.enable",{},k),await u.sendCommand("CSS.enable",{},k),await u.sendCommand("Overlay.enable",{},k),await u.sendCommand("Debugger.enable",{},k),await u.sendCommand("Runtime.enable",{},k),await u.sendCommand("Runtime.evaluate",{expression:`(function() {
							const style = document.createElement('style');
							style.id = '__pseudoBlocker__';
							style.textContent = '*::before, *::after { pointer-events: none !important; }';
							document.head.appendChild(style);
						})();`},k),await u.sendCommand("Overlay.setInspectMode",{mode:"searchForNode",highlightConfig:{showInfo:!0,showRulers:!1,showStyles:!0,showAccessibilityInfo:!0,showExtensionLines:!1,contrastAlgorithm:"aa",contentColor:{r:173,g:216,b:255,a:.8},paddingColor:{r:150,g:200,b:255,a:.5},borderColor:{r:120,g:180,b:255,a:.7},marginColor:{r:200,g:220,b:255,a:.4},eventTargetColor:{r:130,g:160,b:255,a:.8},shapeColor:{r:130,g:160,b:255,a:.8},shapeMarginColor:{r:130,g:160,b:255,a:.5},gridHighlightConfig:{rowGapColor:{r:140,g:190,b:255,a:.3},rowHatchColor:{r:140,g:190,b:255,a:.7},columnGapColor:{r:140,g:190,b:255,a:.3},columnHatchColor:{r:140,g:190,b:255,a:.7},rowLineColor:{r:120,g:180,b:255},columnLineColor:{r:120,g:180,b:255},rowLineDash:!0,columnLineDash:!0},flexContainerHighlightConfig:{containerBorder:{color:{r:120,g:180,b:255},pattern:"solid"},itemSeparator:{color:{r:140,g:190,b:255},pattern:"solid"},lineSeparator:{color:{r:140,g:190,b:255},pattern:"solid"},mainDistributedSpace:{hatchColor:{r:140,g:190,b:255,a:.7},fillColor:{r:140,g:190,b:255,a:.4}},crossDistributedSpace:{hatchColor:{r:140,g:190,b:255,a:.7},fillColor:{r:140,g:190,b:255,a:.4}},rowGapSpace:{hatchColor:{r:140,g:190,b:255,a:.7},fillColor:{r:140,g:190,b:255,a:.4}},columnGapSpace:{hatchColor:{r:140,g:190,b:255,a:.7},fillColor:{r:140,g:190,b:255,a:.4}}},flexItemHighlightConfig:{baseSizeBox:{hatchColor:{r:130,g:170,b:255,a:.6}},baseSizeBorder:{color:{r:120,g:180,b:255},pattern:"solid"},flexibilityArrow:{color:{r:130,g:190,b:255}}}}},k)}catch(T){throw u.detach(),new Error("No target found",{cause:T})}if(!p)throw u.detach(),new Error("No target session id found");let m=await this.getNodeData(p,u,a.win,s);await this.finishOverlay(u,p);let h=c.getZoomFactor(),E={x:t.x+m.bounds.x,y:t.y+m.bounds.y,width:m.bounds.width,height:m.bounds.height},y={x:Math.max(E.x,t.x),y:Math.max(E.y,t.y),width:Math.max(0,Math.min(E.x+E.width,t.x+t.width)-Math.max(E.x,t.x)),height:Math.max(0,Math.min(E.y+E.height,t.y+t.height)-Math.max(E.y,t.y))},P={x:y.x*h,y:y.y*h,width:y.width*h,height:y.height*h};return{outerHTML:m.outerHTML,computedStyle:m.computedStyle,bounds:P,ancestors:m.ancestors,attributes:m.attributes,computedStyles:m.computedStyles,dimensions:m.dimensions,innerText:m.innerText}}async getNodeData(e,t,i,o){return new Promise((s,a)=>{let l=async(c,u,p)=>{if(u==="Overlay.inspectNodeRequested"){t.off("message",l),await t.sendCommand("Runtime.evaluate",{expression:`(() => {
										const style = document.getElementById('__pseudoBlocker__');
										if (style) style.remove();
									})();`},e);let m=p?.backendNodeId;if(!m)throw new Error("Missing backendNodeId in inspectNodeRequested event");try{await t.sendCommand("DOM.getDocument",{},e);let{nodeIds:h}=await t.sendCommand("DOM.pushNodesByBackendIdsToFrontend",{backendNodeIds:[m]},e);if(!h||h.length===0)throw new Error("Failed to get node IDs.");let E=h[0],{model:y}=await t.sendCommand("DOM.getBoxModel",{nodeId:E},e);if(!y)throw new Error("Failed to get box model.");let P=y.content,T=y.margin,k=Math.min(T[0],P[0]),U=Math.min(T[1],P[1]),O=Math.max(T[2]-T[0],P[2]-P[0]),B=Math.max(T[5]-T[1],P[5]-P[1]),he=await t.sendCommand("CSS.getMatchedStylesForNode",{nodeId:E},e);if(!he)throw new Error("Failed to get matched css.");let Q=this.formatMatchedStyles(he),{outerHTML:le}=await t.sendCommand("DOM.getOuterHTML",{nodeId:E},e);if(!le)throw new Error("Failed to get outerHTML.");let ne,De,ht,Zt;try{let{object:ar}=await t.sendCommand("DOM.resolveNode",{nodeId:E},e);if(ar?.objectId){let{result:J}=await t.sendCommand("Runtime.callFunctionOn",{objectId:ar.objectId,functionDeclaration:`function() {
										var chain = [];
										var el = this;
										while (el && el.nodeType === 1) {
											var entry = { tagName: el.tagName.toLowerCase() };
											if (el.id) { entry.id = el.id; }
											if (el.className && typeof el.className === 'string') {
												var cls = el.className.trim().split(/\\s+/).filter(Boolean);
												if (cls.length > 0) { entry.classNames = cls; }
											}
											chain.unshift(entry);
											el = el.parentElement;
										}
										return chain;
									}`,returnByValue:!0},e);J?.value&&Array.isArray(J.value)&&(ne=J.value);let{result:W}=await t.sendCommand("Runtime.callFunctionOn",{objectId:ar.objectId,functionDeclaration:`function() {
										var attrs = {};
										for (var i = 0; i < this.attributes.length; i++) {
											attrs[this.attributes[i].name] = this.attributes[i].value;
										}
										return attrs;
									}`,returnByValue:!0},e);W?.value&&(De=W.value);let{result:se}=await t.sendCommand("Runtime.callFunctionOn",{objectId:ar.objectId,functionDeclaration:"function() { return this.innerText; }",returnByValue:!0},e);if(se?.value){let ie=String(se.value).trim();Zt=ie.length>100?ie.substring(0,100)+"\u2026":ie}}let{computedStyle:lr}=await t.sendCommand("CSS.getComputedStyleForNode",{nodeId:E},e);if(lr){ht={};for(let J of lr)J.name&&typeof J.value=="string"&&(ht[J.name]=J.value)}}catch{}s({outerHTML:le,computedStyle:Q,bounds:{x:k,y:U,width:O,height:B},ancestors:ne,attributes:De,computedStyles:ht,dimensions:{top:U,left:k,width:O,height:B},innerText:Zt})}catch(h){t.off("message",l),t.detach(),a(h)}}};i.webContents.on("ipc-message",async(c,u,p)=>{if(u===`vscode:cancelElementSelection${o}`){if(o!==p)return;t.off("message",l),await this.finishOverlay(t,e),i.webContents.removeAllListeners("ipc-message")}}),t.on("message",l)})}formatMatchedStyles(e){let t=[];if(e.inlineStyle?.cssProperties?.length){t.push("/* Inline style */"),t.push("element {");for(let i of e.inlineStyle.cssProperties)i.name&&i.value&&t.push(`  ${i.name}: ${i.value};`);t.push(`}
`)}if(e.matchedCSSRules?.length)for(let i of e.matchedCSSRules){let o=i.rule,s=o.selectorList.selectors.map(a=>a.text).join(", ");t.push(`/* Matched Rule from ${o.origin} */`),t.push(`${s} {`);for(let a of o.style.cssProperties)a.name&&a.value&&t.push(`  ${a.name}: ${a.value};`);t.push(`}
`)}if(e.inherited?.length){let i=1;for(let o of e.inherited){let s=o.inlineStyle;s&&(t.push(`/* Inherited from ancestor level ${i} (inline) */`),t.push("element {"),t.push(s.cssText),t.push(`}
`));let a=o.matchedCSSRules||[];for(let l of a){let c=l.rule,u=c.selectorList.selectors.map(p=>p.text).join(", ");t.push(`/* Inherited from ancestor level ${i} (${c.origin}) */`),t.push(`${u} {`);for(let p of c.style.cssProperties)p.name&&p.value&&t.push(`  ${p.name}: ${p.value};`);t.push(`}
`)}i++}}return`
`+t.join(`
`)}windowById(e,t){return this.codeWindowById(e)??this.auxiliaryWindowById(e)??this.codeWindowById(t)}codeWindowById(e){if(typeof e=="number")return this.windowsMainService.getWindowById(e)}auxiliaryWindowById(e){if(typeof e!="number")return;let t=RI.fromId(e);if(t)return this.auxiliaryWindowsMainService.getWindowByWebContents(t)}};Zc=D([S(0,Ke),S(1,Jr),S(2,Qa)],Zc)});var Sw,C0=_(()=>{Sw="browserViewGroup"});var xI,ed,_w,ww=_(()=>{te();me();yc();Xt();Et();CI();vw();Ce();de();xI=V("browserViewCDPProxyServer"),ed=class extends M{constructor(e){super();this.logService=e;this.tokens=this._register(new _w);this.targets=new Map}async getWebSocketEndpointForTarget(e){await this.ensureServerStarted();let i=(await e.getTargetInfo()).targetId;this.targets.set(i,e);let o=await this.tokens.issueToken(i);return`ws://localhost:${this.port}/devtools/browser/${i}?token=${o}`}async removeTarget(e){let t=await e.getTargetInfo();this.targets.delete(t.targetId)}async ensureServerStarted(){if(this.server)return;let e=await import("http");this.server=e.createServer(),await new Promise((i,o)=>{this.server.listen(0,"127.0.0.1",()=>i()),this.server.once("error",o)});let t=this.server.address();this.port=t.port,this.server.on("request",(i,o)=>this.handleHttpRequest(i,o)),this.server.on("upgrade",(i,o)=>this.handleWebSocketUpgrade(i,o))}async handleHttpRequest(e,t){this.logService.debug(`[BrowserViewDebugProxy] HTTP request at ${e.url}`),t.writeHead(404),t.end()}handleWebSocketUpgrade(e,t){let[i,o]=(e.url||"").split("?"),s=i.match(/^\/devtools\/browser\/([^/?]+)$/);if(this.logService.debug(`[BrowserViewDebugProxy] WebSocket upgrade requested: ${i}`),!s){this.logService.warn(`[BrowserViewDebugProxy] Rejecting WebSocket on unknown path: ${i}`),t.write(`HTTP/1.1 404 Not Found\r
\r
`),t.end();return}let a=s[1],l=new URLSearchParams(o).get("token"),c=l&&this.tokens.consumeToken(l);if(!c||c!==a){t.write(`HTTP/1.1 401 Unauthorized\r
\r
`),t.end();return}let u=this.targets.get(a);if(!u){this.logService.warn(`[BrowserViewDebugProxy] Browser target not found: ${a}`),t.write(`HTTP/1.1 404 Not Found\r
\r
`),t.end();return}this.logService.debug(`[BrowserViewDebugProxy] WebSocket connected: ${i}`);let p=vh(e,t,{debugLabel:"browser-view-cdp-"+Me(),enableMessageSplitting:!1});if(!p)return;let m=new Js(u),h=this.wireWebSocket(p,m);this._register(h),this._register(p)}wireWebSocket(e,t){let i=new ue;return i.add(e.onData(o=>{try{let s=o.toString(),{id:a,method:l,params:c,sessionId:u}=JSON.parse(s);this.logService.debug(`[BrowserViewDebugProxy] <- ${s}`),t.sendMessage(l,c,u).then(p=>{let h=JSON.stringify({id:a,result:p,sessionId:u});this.logService.debug(`[BrowserViewDebugProxy] -> ${h}`),e.write(ee.fromString(h))}).catch(p=>{let m={id:a,error:{code:p instanceof Yo?p.code:Um.ServerError,message:p.message||"Unknown error"},sessionId:u},h=JSON.stringify(m);this.logService.debug(`[BrowserViewDebugProxy] -> ${h}`),e.write(ee.fromString(h))})}catch(s){this.logService.error("[BrowserViewDebugProxy] Error parsing message:",s),e.end()}})),i.add(t.onEvent(o=>{let s=JSON.stringify(o);this.logService.debug(`[BrowserViewDebugProxy] -> ${s}`),e.write(ee.fromString(s))})),i.add(t.onClose(()=>{this.logService.debug("[BrowserViewDebugProxy] WebSocket closing"),e.end()})),i.add(e.onClose(()=>{this.logService.debug("[BrowserViewDebugProxy] WebSocket closed"),t.dispose(),i.dispose()})),i}dispose(){this.server&&(this.server.close(),this.server=void 0),super.dispose()}};ed=D([S(0,z)],ed);_w=class extends M{constructor(){super(...arguments);this.tokens=new Map}async issueToken(e){let t=this.makeToken();return this.tokens.set(t,{details:Object.freeze(e),expiresAt:Date.now()+3e4}),this._register($g(()=>this.tokens.delete(t),3e4)),t}consumeToken(e){if(!e)return;let t=this.tokens.get(e);if(t)return this.tokens.delete(e),Date.now()<=t.expiresAt?t.details:void 0}makeToken(){let e=crypto.getRandomValues(new Uint8Array(32)),t=Array.from(e).map(s=>String.fromCharCode(s)).join("");return btoa(t).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/g,"")}}});var td,A0=_(()=>{te();ae();hw();CI();ww();AI();td=class extends M{constructor(e,t,i){super();this.id=e;this.browserViewMainService=t;this.cdpProxyServer=i;this.views=new Map;this.viewListeners=this._register(new ue);this.knownContextIds=new Set;this.ownedContextIds=new Set;this._onTargetCreated=this._register(new C);this.onTargetCreated=this._onTargetCreated.event;this._onTargetDestroyed=this._register(new C);this.onTargetDestroyed=this._onTargetDestroyed.event;this._onDidAddView=this._register(new C);this.onDidAddView=this._onDidAddView.event;this._onDidRemoveView=this._register(new C);this.onDidRemoveView=this._onDidRemoveView.event;this._onDidDestroy=this._register(new C);this.onDidDestroy=this._onDidDestroy.event}async addView(e){if(this.views.has(e))return;let t=this.browserViewMainService.tryGetBrowserView(e);if(!t)throw new Error(`Browser view ${e} not found`);this.views.set(t.id,t),this.knownContextIds.add(t.session.id),this._onDidAddView.fire({viewId:t.id}),this._onTargetCreated.fire(t),this.viewListeners.add(x.once(t.onDidClose)(()=>{this.removeView(e)}))}async removeView(e){let t=this.views.get(e);t&&this.views.delete(e)&&(!this.ownedContextIds.has(t.session.id)&&![...this.views.values()].some(i=>i.session.id===t.session.id)&&this.knownContextIds.delete(t.session.id),this._onDidRemoveView.fire({viewId:t.id}),this._onTargetDestroyed.fire(t))}getVersion(){return this.browserViewMainService.getVersion()}getWindowForTarget(e){return this.browserViewMainService.getWindowForTarget(e)}async attach(){return new Js(this)}async getTargetInfo(){return{targetId:this.id,type:"browser",title:this.getVersion().product,url:"",attached:!0,canAccessOpener:!1}}getTargets(){return this.views.values()}async createTarget(e,t){if(t&&!this.knownContextIds.has(t))throw new Error(`Unknown browser context ${t}`);let i=await this.browserViewMainService.createTarget(e,t);return i instanceof ni&&await this.addView(i.id),i}async activateTarget(e){return this.browserViewMainService.activateTarget(e)}async closeTarget(e){return e instanceof ni&&await this.removeView(e.id),this.browserViewMainService.closeTarget(e)}getBrowserContexts(){return[...this.knownContextIds]}async createBrowserContext(){let e=await this.browserViewMainService.createBrowserContext();return this.knownContextIds.add(e),this.ownedContextIds.add(e),e}async disposeBrowserContext(e){if(!this.ownedContextIds.has(e))throw new Error("Can only dispose browser contexts created by this group");for(let t of this.views.values())t.session.id===e&&await this.removeView(t.id);return this.knownContextIds.delete(e),this.ownedContextIds.delete(e),this.browserViewMainService.disposeBrowserContext(e)}async getDebugWebSocketEndpoint(){return this.cdpProxyServer.getWebSocketEndpointForTarget(this)}dispose(){this._onDidDestroy.fire(),this.cdpProxyServer.removeTarget(this),super.dispose()}};td=D([S(1,Qa),S(2,xI)],td)});var bw,nd,R0=_(()=>{te();ae();de();Xt();A0();bw=V("browserViewGroupMainService"),nd=class extends M{constructor(e){super();this.instantiationService=e;this.groups=this._register(new xn)}async createGroup(){let e=Me(),t=this.instantiationService.createInstance(td,e);return this.groups.set(e,t),x.once(t.onDidDestroy)(()=>{this.groups.deleteAndLeak(e)}),e}async destroyGroup(e){this.groups.deleteAndDispose(e)}async addViewToGroup(e,t){return this._getGroup(e).addView(t)}async removeViewFromGroup(e,t){return this._getGroup(e).removeView(t)}async getDebugWebSocketEndpoint(e){return this._getGroup(e).getDebugWebSocketEndpoint()}onDynamicDidAddView(e){return this._getGroup(e).onDidAddView}onDynamicDidRemoveView(e){return this._getGroup(e).onDidRemoveView}onDynamicDidDestroy(e){return this._getGroup(e).onDidDestroy}_getGroup(e){let t=this.groups.get(e);if(!t)throw new Error(`Browser view group ${e} not found`);return t}};nd=D([S(0,rn)],nd)});import u3 from"assert";function p3(r,n){let e=(l,c)=>{console.warn(v(1947,null,l,c))},t=l=>{console.warn(v(1945,null,l))},i=(l,c)=>{console.warn(v(1944,null,l,c))},o=l=>({onUnknownOption:c=>{H_.includes(l)||console.warn(v(1949,null,c,l))},onMultipleValues:e,onEmptyValue:t,onDeprecatedOption:i,getSubcommandReporter:H_.includes(l)?o:void 0}),a=Cm(r,dI,n?{onUnknownOption:l=>{console.warn(v(1948,null,l))},onMultipleValues:e,onEmptyValue:t,onDeprecatedOption:i,getSubcommandReporter:o}:void 0);return a.goto&&a._.forEach(l=>u3(/^(\w:)?[^:]+(:\d*){0,2}:?$/.test(l),v(1946,null))),a}function m3(r){let n=r.findIndex(e=>!/^-/.test(e));if(n>-1)return[...r.slice(0,n),...r.slice(n+1)]}function x0(r){let[,...n]=r;if(q&&n.length>0){let t=Nt(n[0]).toLowerCase(),i=ze(process.execPath).toLowerCase()+"\\";t.startsWith(i)&&t.endsWith("\\resources\\app\\out\\cli.js")&&n.shift()}process.env.VSCODE_DEV&&(n=m3(n)||[]);let e=!Ri(process.env);return p3(n,e)}function D0(r,...n){let e=r.indexOf("--");return e===-1?r.push(...n):r.splice(e,0,...n),r}function Ri(r){return r.VSCODE_CLI==="1"}var rd=_(()=>{Ne();ce();We();J_()});import*as Tw from"os";function h3({useAlternateBitness:r=!1}={}){return r?Wm===0?process.env["ProgramFiles(x86)"]||null:id===0&&process.env.ProgramW6432||null:process.env.ProgramFiles||null}async function DI({useAlternateBitness:r=!1,findPreview:n=!1}={}){let e=h3({useAlternateBitness:r});if(!e)return null;let t=H(e,"PowerShell");if(!await hn.existsDirectory(t))return null;let i=-1,o=null;for(let l of await re.readdir(t)){let c=-1;if(n){let p=l.indexOf("-");if(p<0)continue;let m=l.substring(0,p);if(!O0.test(m)||l.substring(p+1)!=="preview")continue;c=parseInt(m,10)}else{if(!O0.test(l))continue;c=parseInt(l,10)}if(c<=i)continue;let u=H(t,l,"pwsh.exe");await hn.existsFile(u)&&(o=u,i=c)}if(!o)return null;let s=e.includes("x86")?" (x86)":"",a=n?" Preview":"";return new Xa(o,`PowerShell${a}${s}`,!0)}async function k0({findPreview:r}={}){if(!process.env.LOCALAPPDATA)return null;let n=H(process.env.LOCALAPPDATA,"Microsoft","WindowsApps");if(!await hn.existsDirectory(n))return null;let{pwshMsixDirRegex:e,pwshMsixName:t}=r?{pwshMsixDirRegex:g3,pwshMsixName:"PowerShell Preview (Store)"}:{pwshMsixDirRegex:f3,pwshMsixName:"PowerShell (Store)"};for(let i of await re.readdir(n))if(e.test(i)){let o=H(n,i,"pwsh.exe");return new Xa(o,t)}return null}function I3(){let r=H(Tw.homedir(),".dotnet","tools","pwsh.exe");return new Xa(r,".NET Core PowerShell Global Tool")}function v3(){let r=H(Tw.homedir(),"scoop","apps"),n=H(r,"pwsh","current","pwsh.exe");return new Xa(n,"PowerShell (Scoop)")}function E3(){let r=H(process.env.windir,Wm===1&&id!==1?"SysNative":"System32","WindowsPowerShell","v1.0","powershell.exe");return new Xa(r,"Windows PowerShell",!0)}async function*y3(){let r=await DI();r&&(yield r),r=await DI({useAlternateBitness:!0}),r&&(yield r),r=await k0(),r&&(yield r),r=I3(),r&&(yield r),r=await DI({findPreview:!0}),r&&(yield r),r=await k0({findPreview:!0}),r&&(yield r),r=await DI({useAlternateBitness:!0,findPreview:!0}),r&&(yield r),r=await v3(),r&&(yield r),r=E3(),r&&(yield r)}async function*Pw(){for await(let r of y3())await r.exists()&&(yield r)}async function N0(){for await(let r of Pw())return r;return null}var O0,f3,g3,Wm,id,Xa,Cw=_(()=>{Ne();pn();O0=/^\d+$/,f3=/^Microsoft.PowerShell_.*/,g3=/^Microsoft.PowerShellPreview_.*/;switch(process.arch){case"ia32":Wm=1;break;case"arm":case"arm64":Wm=2;break;default:Wm=0;break}process.env.PROCESSOR_ARCHITEW6432?id=process.env.PROCESSOR_ARCHITEW6432==="ARM64"?2:0:process.env.PROCESSOR_ARCHITECTURE==="ARM64"?id=2:process.env.PROCESSOR_ARCHITECTURE==="X86"?id=1:id=0;Xa=class{constructor(n,e,t){this.exePath=n;this.displayName=e;this.knownToExist=t}async exists(){return this.knownToExist===void 0&&(this.knownToExist=await hn.existsFile(this.exePath)),this.knownToExist}}});import*as Aw from"child_process";import{promises as L0}from"fs";function OI(r=En){return r.comspec||"cmd.exe"}function M0(r){let n=[],e=!1,t=function(i){if(e){n.push(i);return}(!r.send(i,s=>{if(s&&console.error(s),e=!1,n.length>0){let a=n.slice(0);n=[],a.forEach(l=>t(l))}})||q)&&(e=!0)};return{send:t}}async function S3(r){if(await re.exists(r)){let n;try{n=await L0.stat(r)}catch(e){e.message.startsWith("EACCES")&&(n=await L0.lstat(r))}return n?!n.isDirectory():!1}return!1}async function Bm(r,n,e,t=En,i=S3){if(fs(r))return await i(r)?r:void 0;if(n===void 0&&(n=Fr()),ze(r)!=="."){let l=H(n,r);return await i(l)?l:void 0}let s=X_(t,"PATH");if(e===void 0&&Ye(s)&&(e=s.split(Pg)),e===void 0||e.length===0){let l=H(n,r);return await i(l)?l:void 0}for(let l of e){let c;if(fs(l)?c=H(l,r):c=H(n,l,r),q){let p=(X_(t,"PATHEXT")||".COM;.EXE;.BAT;.CMD").split(";").map(async m=>{let h=c+m;return await i(h)?h:void 0});for(let m of p){let h=await m;if(h)return h}}if(await i(c))return c}let a=H(n,r);return await i(a)?a:void 0}async function U0(r,n=!1){let e;if(q){let t=process.env.WINDIR||"C:\\Windows",i=H(t,"System32","taskkill.exe"),o=["/T"];n&&o.push("/F"),o.push("/PID",String(r)),e=Aw.spawn(i,o,{stdio:["ignore","pipe","pipe"]})}else{let t=gt.asFileUri("vs/base/node/terminateProcess.sh").fsPath;e=Aw.spawn("/bin/sh",[t,String(r),n?"9":"15"],{stdio:["ignore","pipe","pipe"]})}return new Promise((t,i)=>{let o=[];e.stdout.on("data",s=>o.push(s)),e.stderr.on("data",s=>o.push(s)),e.on("error",i),e.on("exit",s=>{s===0?t():i(new Error(`taskkill exited with code ${s}: ${Buffer.concat(o).toString()}`))})})}var od=_(()=>{Gr();Ne();ce();gi();km();qe();pn();at()});import{userInfo as _3}from"os";async function kI(r,n){return r===1?q?b3():OI(n):w3(r,n)}function w3(r,n){if(fe&&r===2||$&&r===3)return"/bin/bash";if(!Rw){let e;if(q)e="/bin/bash";else{if(e=n.SHELL,!e)try{e=_3().shell}catch{}e||(e="sh"),e==="/bin/false"&&(e="/bin/bash")}Rw=e}return Rw}async function b3(){return xw||(xw=(await N0()).exePath),xw}var Rw,xw,Dw=_(()=>{ce();Cw();od();Rw=null;xw=null});function W0(r,n,e){return Math.min(Math.max(r,n),e)}var B0=_(()=>{jl()});import{spawn as T3}from"child_process";async function sd(r,n,e,t){return e["force-disable-user-env"]?(n.trace("resolveShellEnv(): skipped (--force-disable-user-env)"),{}):q?(n.trace("resolveShellEnv(): skipped (Windows)"),{}):Ri(t)&&!e["force-user-env"]?(n.trace("resolveShellEnv(): skipped (VSCODE_CLI is set)"),{}):(Ri(t)?n.trace("resolveShellEnv(): running (--force-user-env)"):n.trace("resolveShellEnv(): running (macOS/Linux)"),Ow||(Ow=Ft.withAsyncBody(async(i,o)=>{let s=new st,a=1e4,l=r.getValue("application.shellEnvironmentResolutionTimeout");typeof l=="number"&&(a=W0(l,1,120)*1e3);let c=setTimeout(()=>{s.dispose(!0),o(new Error(v(2294,null)))},a);try{i(await P3(n,s.token))}catch(u){!mp(u)&&!s.token.isCancellationRequested?o(new Error(v(2292,null,Kn(u)))):i({})}finally{clearTimeout(c),s.dispose()}})),Ow)}async function P3(r,n){let e=process.env.ELECTRON_RUN_AS_NODE;r.trace("getUnixShellEnvironment#runAsNode",e);let t=process.env.ELECTRON_NO_ATTACH_CONSOLE;r.trace("getUnixShellEnvironment#noAttach",t);let i=Me().replace(/-/g,"").substr(0,12),o=new RegExp(i+"({.*})"+i),s={...process.env,ELECTRON_RUN_AS_NODE:"1",ELECTRON_NO_ATTACH_CONSOLE:"1",VSCODE_RESOLVING_ENVIRONMENT:"1"};r.trace("getUnixShellEnvironment#env",s);let a=await kI(Yt,s);return r.trace("getUnixShellEnvironment#shell",a),new Promise((l,c)=>{if(n.isCancellationRequested)return c(new Gt);let u=Pe(a),p,m,h="";/^(?:pwsh|powershell)(?:-preview)?$/.test(u)?(p=`& '${process.execPath}' ${h} -p '''${i}'' + JSON.stringify(process.env) + ''${i}'''`,m=["-Login","-Command"]):u==="nu"?(p=`^'${process.execPath}' ${h} -p '"${i}" + JSON.stringify(process.env) + "${i}"'`,m=["-i","-l","-c"]):u==="xonsh"?(p=`import os, json; print("${i}", json.dumps(dict(os.environ)), "${i}")`,m=["-i","-l","-c"]):(p=`'${process.execPath}' ${h} -p '"${i}" + JSON.stringify(process.env) + "${i}"'`,u==="tcsh"||u==="csh"?m=["-ic"]:m=["-i","-l","-c"]),r.trace("getUnixShellEnvironment#spawn",JSON.stringify(m),p);let E=T3(a,[...m,p],{detached:!0,stdio:["ignore","pipe","pipe"],env:s});n.onCancellationRequested(()=>(E.kill(),c(new Gt))),E.on("error",T=>{r.error("getUnixShellEnvironment#errorChildProcess",Kn(T)),c(T)});let y=[];E.stdout.on("data",T=>y.push(T));let P=[];E.stderr.on("data",T=>P.push(T)),E.on("close",(T,k)=>{let U=Buffer.concat(y).toString("utf8");r.trace("getUnixShellEnvironment#raw",U);let O=Buffer.concat(P).toString("utf8");if(O.trim()&&r.trace("getUnixShellEnvironment#stderr",O),T||k)return c(new Error(v(2293,null,T,k)));let B=o.exec(U),he=B?B[1]:"{}";try{let Q=JSON.parse(he);e?Q.ELECTRON_RUN_AS_NODE=e:delete Q.ELECTRON_RUN_AS_NODE,t?Q.ELECTRON_NO_ATTACH_CONSOLE=t:delete Q.ELECTRON_NO_ATTACH_CONSOLE,delete Q.VSCODE_RESOLVING_ENVIRONMENT,delete Q.XDG_RUNTIME_DIR,r.trace("getUnixShellEnvironment#result",Q),l(Q)}catch(Q){r.error("getUnixShellEnvironment#errorCaught",Kn(Q)),c(Q)}})})}var Ow,NI=_(()=>{Ne();We();Bt();_s();rt();ce();Xt();Dw();rd();Ce();B0()});var kw,V0,G0=_(()=>{de();kw=V("extensionHostStarter"),V0="extensionHostStarter"});var qs,H0=_(()=>{Ce();rt();ae();te();Vt();me();Tn();ja();zt();_t();qs=class extends M{constructor(e,t,i,o,s){super();this._logService=e;this._lifecycleMainService=t;this._windowsMainService=i;this._telemetryService=o;this._configurationService=s;this._extHosts=new Map;this._shutdown=!1;this._register(this._lifecycleMainService.onWillShutdown(a=>{this._shutdown=!0,a.join("extHostStarter",this._waitForAllExit(6e3))}))}static{this._lastId=0}dispose(){super.dispose()}_getExtHost(e){let t=this._extHosts.get(e);if(!t)throw new Error("Unknown extension host!");return t}onDynamicStdout(e){return this._getExtHost(e).onStdout}onDynamicStderr(e){return this._getExtHost(e).onStderr}onDynamicMessage(e){return this._getExtHost(e).onMessage}onDynamicExit(e){return this._getExtHost(e).onExit}async createExtensionHost(){if(this._shutdown)throw Ji();let e=String(++qs._lastId),t=new Vs(this._logService,this._windowsMainService,this._telemetryService,this._lifecycleMainService);this._extHosts.set(e,t);let i=t.onExit(({pid:o,code:s,signal:a})=>{i.dispose(),this._logService.info(`Extension host with pid ${o} exited with code: ${s}, signal: ${a}.`),setTimeout(()=>{t.dispose(),this._extHosts.delete(e)}),setTimeout(()=>{try{process.kill(o,0),this._logService.error(`Extension host with pid ${o} still exists, forcefully killing it...`),process.kill(o)}catch{}},1e3)});return{id:e}}async start(e,t){if(this._shutdown)throw Ji();let i=this._getExtHost(e),o=["--skipWorkspaceStorageLock"];return this._configurationService.getValue("extensions.supportNodeGlobalNavigator")&&o.push("--supportGlobalNavigator"),i.start({...t,type:"extensionHost",name:"extension-host",entryPoint:"vs/workbench/api/node/extensionHostProcess",args:o,execArgv:t.execArgv,allowLoadingUnsignedLibraries:!0,respondToAuthRequestsFromMainProcess:!0,windowLifecycleBound:!0,windowLifecycleGraceTime:6e3,correlationId:e}),{pid:await x.toPromise(i.onSpawn)}}async enableInspectPort(e){if(this._shutdown)throw Ji();let t=this._extHosts.get(e);return t?t.enableInspectPort():!1}async kill(e){if(this._shutdown)throw Ji();let t=this._extHosts.get(e);t&&t.kill()}async _killAllNow(){for(let[,e]of this._extHosts)e.kill()}async _waitForAllExit(e){let t=[];for(let[,i]of this._extHosts)t.push(i.waitForExit(e));return Ft.settled(t).then(()=>{})}};qs=D([S(0,z),S(1,Te),S(2,Ke),S(3,St),S(4,Ae)],qs)});var Vm,J0=_(()=>{de();Vm=V("externalTerminal")});var tse,ad,q0=_(()=>{de();tse=V("externalTerminal"),ad="Terminal.app"});import*as Ks from"child_process";function $a(r){let n={...r.env};return m0(n),n}function j0(r){return r.errno==="ENOENT"&&r.path?new Error(v(2057,null,r.path)):r}function Nw(r,n,e,t){let i="";r.on("error",o=>{e(j0(o))}),r.stderr?.on("data",o=>{i+=o.toString()}),r.on("exit",o=>{if(o===0)n(void 0);else if(i){let s=i.split(`
`,1);e(new Error(s[0]))}else e(new Error(v(2060,null,t,o)))})}function C3(r){let n="";for(let e of r)e.indexOf(" ")>=0?n+='"'+e+'"':n+=e,n+=" ";return n}var K0,Gm,xi,Hm,LI,Jm,z0=_(()=>{bs();at();Ne();ce();km();pn();od();We();q0();K0=v(2056,null),Gm=class{async getDefaultTerminalForPlatforms(){return{windows:Hm.getDefaultTerminalWindows(),linux:await Jm.getDefaultTerminalLinuxReady(),osx:ad}}},xi=class xi extends Gm{static{this.CMD="cmd.exe"}openTerminal(n,e){return this.spawnTerminal(Ks,n,OI(),e)}spawnTerminal(n,e,t,i){let o=e.windowsExec||xi.getDefaultTerminalWindows();i&&i[1]===":"&&(i=i[0].toUpperCase()+i.substr(1));let s=Pe(o,".exe").toLowerCase();if(s==="cmder")return n.spawn(o,i?[i]:void 0),Promise.resolve(void 0);let a=["/c","start","/wait"];return o.indexOf(" ")>=0&&a.push(o),a.push(o),s==="wt"&&a.push("-d ."),new Promise((l,c)=>{let u=$a(process),p=n.spawn(t,a,{cwd:i,env:u,detached:!0});p.on("error",c),p.on("exit",()=>l())})}async runInTerminal(n,e,t,i,o){let s=o.windowsExec||xi.getDefaultTerminalWindows(),a=await xi.getWtExePath();return new Promise((l,c)=>{let u=`"${e} - ${K0}"`,p=`"${t.join('" "')}" & pause`,m=Object.assign({},$a(process),i);Object.keys(m).filter(T=>m[T]===null).forEach(T=>delete m[T]);let h={cwd:e,env:m,windowsVerbatimArguments:!0},E,y;Pe(s,".exe")==="wt"?(E=s,y=["-d",".",xi.CMD,"/c",p]):a?(E=a,y=["-d",".",s,"/c",p]):(E=xi.CMD,y=["/c","start",u,"/wait",s,"/c",`"${p}"`]),Ks.spawn(E,y,h).on("error",T=>{c(j0(T))}),l(void 0)})}static getDefaultTerminalWindows(){if(!xi._DEFAULT_TERMINAL_WINDOWS){let n=!!process.env.hasOwnProperty("PROCESSOR_ARCHITEW6432");xi._DEFAULT_TERMINAL_WINDOWS=`${process.env.windir?process.env.windir:"C:\\Windows"}\\${n?"Sysnative":"System32"}\\cmd.exe`}return xi._DEFAULT_TERMINAL_WINDOWS}static async getWtExePath(){try{return await Bm("wt")}catch{return}}};D([ye],xi,"getWtExePath",1);Hm=xi,LI=class r extends Gm{static{this.OSASCRIPT="/usr/bin/osascript"}openTerminal(n,e){return this.spawnTerminal(Ks,n,e)}runInTerminal(n,e,t,i,o){let s=o.osxExec||ad;return new Promise((a,l)=>{if(s===ad||s==="iTerm.app"){let c=s===ad?"TerminalHelper":"iTermHelper",p=[gt.asFileUri(`vs/workbench/contrib/externalTerminal/node/${c}.scpt`).fsPath,"-t",n||K0,"-w",e];for(let h of t)p.push("-a"),p.push(h);if(i){let h=Object.assign({},$a(process),i);for(let E in h){let y=h[E];y===null?(p.push("-u"),p.push(E)):(p.push("-e"),p.push(`${E}=${y}`))}}let m=Ks.spawn(r.OSASCRIPT,p);Nw(m,a,l,s)}else if(s==="Ghostty.app"){let c=Object.assign({},$a(process),i),u=["-na","Ghostty.app","--args"];u.push("--working-directory="+e),u.push("--wait-after-command=true"),u.push("-e",...t);let p=Ks.spawn("/usr/bin/open",u,{env:c});Nw(p,a,l,s)}else l(new Error(v(2058,null,s)))})}spawnTerminal(n,e,t){let i=e.osxExec||ad;return new Promise((o,s)=>{let a=["-a",i];t&&a.push(t);let l=$a(process),c=n.spawn("/usr/bin/open",a,{cwd:t,env:l});c.on("error",s),c.on("exit",()=>o())})}},Jm=class r extends Gm{static{this.WAIT_MESSAGE=v(2059,null)}openTerminal(n,e){return this.spawnTerminal(Ks,n,e)}runInTerminal(n,e,t,i,o){let s=o.linuxExec?Promise.resolve(o.linuxExec):r.getDefaultTerminalLinuxReady();return new Promise((a,l)=>{s.then(c=>{if(Pe(c).toLowerCase()==="ghostty"){let h=[];e&&h.push(`--working-directory=${e}`),h.push("--wait-after-command=true"),t.length&&h.push("-e",...t),r.spawnTerminalWithEnv(c,h,e,i,a,l);return}let p=[];c.indexOf("gnome-terminal")>=0?p.push("-x"):p.push("-e"),p.push("bash"),p.push("-c");let m=`${C3(t)}; echo; read -p "${r.WAIT_MESSAGE}" -n1;`;p.push(`''${m}''`),r.spawnTerminalWithEnv(c,p,e,i,a,l)})})}static spawnTerminalWithEnv(n,e,t,i,o,s){let a=Object.assign({},$a(process),i);Object.keys(a).filter(c=>a[c]===null).forEach(c=>delete a[c]);let l=Ks.spawn(n,e,{cwd:t,env:a});Nw(l,o,s,n)}static async getDefaultTerminalLinuxReady(){if(!r._DEFAULT_TERMINAL_LINUX_READY)if(!fe)r._DEFAULT_TERMINAL_LINUX_READY=Promise.resolve("xterm");else{let n=await re.exists("/etc/debian_version");r._DEFAULT_TERMINAL_LINUX_READY=new Promise(e=>{n?e("x-terminal-emulator"):process.env.DESKTOP_SESSION==="gnome"||process.env.DESKTOP_SESSION==="gnome-classic"?e("gnome-terminal"):process.env.DESKTOP_SESSION==="kde-plasma"?e("konsole"):process.env.COLORTERM?e(process.env.COLORTERM):process.env.TERM?e(process.env.TERM):e("xterm")})}return r._DEFAULT_TERMINAL_LINUX_READY}spawnTerminal(n,e,t){let i=e.linuxExec?Promise.resolve(e.linuxExec):r.getDefaultTerminalLinuxReady();return new Promise((o,s)=>{i.then(a=>{let l=$a(process),u=Pe(a).toLowerCase()==="ghostty"&&t?[`--working-directory=${t}`]:[],p=n.spawn(a,u,{cwd:t,env:l});p.on("error",s),p.on("exit",()=>o())})})}}});function Q0(r,n){switch(r){case 0:return"";case 1:return`${UI}*?`;default:return`(?:${MI}|${UI}+${MI}${n?`|${MI}${UI}+`:""})*?`}}function X0(r,n){if(!r)return[];let e=[],t=!1,i=!1,o="";for(let s of r){switch(s){case n:if(!t&&!i){e.push(o),o="";continue}break;case"{":t=!0;break;case"}":t=!1;break;case"[":i=!0;break;case"]":i=!1;break}o+=s}return o&&e.push(o),e}function nk(r){if(!r)return"";let n="",e=X0(r,Y0);if(e.every(t=>t===ld))n=".*";else{let t=!1;e.forEach((i,o)=>{if(i===ld){if(t)return;n+=Q0(2,o===e.length-1)}else{let s=!1,a="",l=!1,c="";for(let u of i){if(u!=="}"&&s){a+=u;continue}if(l&&(u!=="]"||!c)){let p;u==="-"?p=u:(u==="^"||u==="!")&&!c?p="^":u===Y0?p="":p=Is(u),c+=p;continue}switch(u){case"{":s=!0;continue;case"[":l=!0;continue;case"}":{let m=`(?:${X0(a,",").map(h=>nk(h)).join("|")})`;n+=m,s=!1,a="";break}case"]":{n+="["+c+"]",l=!1,c="";break}case"?":n+=UI;continue;case"*":n+=Q0(1);continue;default:n+=Is(u)}}o<e.length-1&&(e[o+1]!==ld||o+2<e.length)&&(n+=MI)}t=i===ld})}return n}function Mw(r,n){if(!r)return po;let e;typeof r!="string"?e=r.pattern:e=r,e=e.trim();let t=n.ignoreCase??!1,i={...n,equals:t?Hn:(l,c)=>l===c,endsWith:t?hx:(l,c)=>l.endsWith(c),isEqualOrParent:(l,c)=>Oo(l,c,!fe||t)},o=`${t?e.toLowerCase():e}_${!!n.trimForExclusions}_${t}`,s=$0.get(o);if(s)return ek(s,r,i);let a;return R3.test(e)?s=L3(e.substring(4),e,i):(a=x3.exec(Lw(e,i)))?s=M3(a[1],e,i):(n.trimForExclusions?O3:D3).test(e)?s=U3(e,i):(a=k3.exec(Lw(e,i)))?s=tk(a[1].substring(1),e,!0,i):(a=N3.exec(Lw(e,i)))?s=tk(a[1],e,!1,i):s=F3(e,i),$0.set(o,s),ek(s,r,i)}function ek(r,n,e){if(typeof n=="string")return r;let t=function(i,o){return e.isEqualOrParent(i,n.base)?r(SS(i.substring(n.base.length),nn),o):null};return t.allBasenames=r.allBasenames,t.allPaths=r.allPaths,t.basenames=r.basenames,t.patterns=r.patterns,t}function Lw(r,n){return n.trimForExclusions&&r.endsWith("/**")?r.substring(0,r.length-2):r}function L3(r,n,e){return function(t,i){return typeof t=="string"&&e.endsWith(t,r)?n:null}}function M3(r,n,e){let t=`/${r}`,i=`\\${r}`,o=function(a,l){return typeof a!="string"?null:l?e.equals(l,r)?n:null:e.equals(a,r)||e.endsWith(a,t)||e.endsWith(a,i)?n:null},s=[r];return o.basenames=s,o.patterns=[n],o.allBasenames=s,o}function U3(r,n){let e=ik(r.slice(1,-1).split(",").map(a=>Mw(a,n)).filter(a=>a!==po),r),t=e.length;if(!t)return po;if(t===1)return e[0];let i=function(a,l){for(let c=0,u=e.length;c<u;c++)if(e[c](a,l))return r;return null},o=e.find(a=>!!a.allBasenames);o&&(i.allBasenames=o.allBasenames);let s=e.reduce((a,l)=>l.allPaths?a.concat(l.allPaths):a,[]);return s.length&&(i.allPaths=s),i}function tk(r,n,e,t){let i=nn===Se.sep,o=i?r:r.replace(A3,nn),s=nn+o,a=Se.sep+r,l;return e?l=function(c,u){return typeof c=="string"&&(t.equals(c,o)||t.endsWith(c,s)||!i&&(t.equals(c,r)||t.endsWith(c,a)))?n:null}:l=function(c,u){return typeof c=="string"&&(t.equals(c,o)||!i&&t.equals(c,r))?n:null},l.allPaths=[(e?"*/":"./")+r],l}function F3(r,n){try{let e=new RegExp(`^${nk(r)}$`,n.ignoreCase?"i":void 0);return function(t){return e.lastIndex=0,typeof t=="string"&&e.test(t)?r:null}}catch{return po}}function rk(r,n={}){if(!r)return Z0;if(typeof r=="string"||W3(r)){let e=Mw(r,n);if(e===po)return Z0;let t=function(i,o){return!!e(i,o)};return e.allBasenames&&(t.allBasenames=e.allBasenames),e.allPaths&&(t.allPaths=e.allPaths),t}return B3(r,n)}function W3(r){let n=r;return n?typeof n.base=="string"&&typeof n.pattern=="string":!1}function B3(r,n){let e=ik(Object.getOwnPropertyNames(r).map(a=>V3(a,r[a],n)).filter(a=>a!==po)),t=e.length;if(!t)return po;if(!e.some(a=>!!a.requiresSiblings)){if(t===1)return e[0];let a=function(u,p){let m;for(let h=0,E=e.length;h<E;h++){let y=e[h](u,p);if(typeof y=="string")return y;Xg(y)&&(m||(m=[]),m.push(y))}return m?(async()=>{for(let h of m){let E=await h;if(typeof E=="string")return E}return null})():null},l=e.find(u=>!!u.allBasenames);l&&(a.allBasenames=l.allBasenames);let c=e.reduce((u,p)=>p.allPaths?u.concat(p.allPaths):u,[]);return c.length&&(a.allPaths=c),a}let i=function(a,l,c){let u,p;for(let m=0,h=e.length;m<h;m++){let E=e[m];E.requiresSiblings&&c&&(l||(l=Pe(a)),u||(u=l.substring(0,l.length-Vl(a).length)));let y=E(a,l,u,c);if(typeof y=="string")return y;Xg(y)&&(p||(p=[]),p.push(y))}return p?(async()=>{for(let m of p){let h=await m;if(typeof h=="string")return h}return null})():null},o=e.find(a=>!!a.allBasenames);o&&(i.allBasenames=o.allBasenames);let s=e.reduce((a,l)=>l.allPaths?a.concat(l.allPaths):a,[]);return s.length&&(i.allPaths=s),i}function V3(r,n,e){if(n===!1)return po;let t=Mw(r,e);if(t===po)return po;if(typeof n=="boolean")return t;if(n){let i=n.when;if(typeof i=="string"){let o=(s,a,l,c)=>{if(!c||!t(s,a))return null;let u=i.replace("$(basename)",()=>l),p=c(u);return Xg(p)?p.then(m=>m?r:null):p?r:null};return o.requiresSiblings=!0,o}}return t}function ik(r,n){let e=r.filter(a=>!!a.basenames);if(e.length<2)return r;let t=e.reduce((a,l)=>{let c=l.basenames;return c?a.concat(c):a},[]),i;if(n){i=[];for(let a=0,l=t.length;a<l;a++)i.push(n)}else i=e.reduce((a,l)=>{let c=l.patterns;return c?a.concat(c):a},[]);let o=function(a,l){if(typeof a!="string")return null;if(!l){let u;for(u=a.length;u>0;u--){let p=a.charCodeAt(u-1);if(p===47||p===92)break}l=a.substring(u)}let c=t.indexOf(l);return c!==-1?i[c]:null};o.basenames=t,o.patterns=i,o.allBasenames=t;let s=r.filter(a=>!a.basenames);return s.push(o),s}function Uw(r,n){return gs(r,n,(e,t)=>typeof e=="string"&&typeof t=="string"?e===t:typeof e!="string"&&typeof t!="string"?e.base===t.base&&e.pattern===t.pattern:!1)}var ld,Y0,MI,UI,A3,R3,x3,D3,O3,k3,N3,$0,Z0,po,Fw=_(()=>{dn();Ce();vi();xr();er();Ne();ce();Sn();ld="**",Y0="/",MI="[/\\\\]",UI="[^/\\\\]",A3=/\//g;R3=/^\*\*\/\*\.[\w\.-]+$/,x3=/^\*\*\/([\w\.-]+)\/?$/,D3=/^{\*\*\/\*?[\w\.-]+\/?(,\*\*\/\*?[\w\.-]+\/?)*}$/,O3=/^{\*\*\/\*?[\w\.-]+(\/(\*\*)?)?(,\*\*\/\*?[\w\.-]+(\/(\*\*)?)?)*}$/,k3=/^\*\*((\/[\w\.-]+)+)\/?$/,N3=/^([\w\.-]+(\/[\w\.-]+)*)\/?$/,$0=new qi(1e4),Z0=function(){return!1},po=function(){return null}});function VI(r){return typeof r.correlationId=="number"}function sk(r){return r.recursive===!0}function GI(r){return r.map(n=>({type:n.type,resource:A.revive(n.resource),cId:n.cId}))}function ak(r){let n=new Ww;for(let e of r)n.processEvent(e);return n.coalesce()}function G3(r,n){return typeof n=="string"&&!n.startsWith(ld)&&!fs(n)?{base:r,pattern:n}:n}function Bw(r,n,e){let t=[];for(let i of n)t.push(rk(G3(r,i),{ignoreCase:e}));return t}function lk(r,n){if(typeof n=="number")switch(r.type){case 1:return(n&4)===0;case 2:return(n&8)===0;case 0:return(n&2)===0}return!1}function ck(r){if(typeof r=="number"){let n=[];return r&4&&n.push("Added"),r&8&&n.push("Deleted"),r&2&&n.push("Updated"),n.length===0?"<all>":`[${n.join(", ")}]`}return"<none>"}var FI,WI,BI,Ww,Za=_(()=>{Fw();te();Ne();ce();Ie();ct();FI=class r extends M{constructor(e,t,i,o){super();this.onFileChanges=e;this.onLogMessage=t;this.verboseLogging=i;this.options=o;this.watcherDisposables=this._register(new yn);this.requests=void 0;this.restartCounter=0}static{this.MAX_RESTARTS=5}init(){let e=new ue;this.watcherDisposables.value=e,this.watcher=this.createWatcher(e),this.watcher.setVerboseLogging(this.verboseLogging),e.add(this.watcher.onDidChangeFile(t=>this.onFileChanges(t))),e.add(this.watcher.onDidLogMessage(t=>this.onLogMessage(t))),e.add(this.watcher.onDidError(t=>this.onError(t.error,t.request)))}onError(e,t){this.canRestart(e,t)?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,t){return!(!this.options.restartOnError||t||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()}},WI=class extends FI{constructor(n,e,t){super(n,e,t,{type:"node.js",restartOnError:!1})}},BI=class extends FI{constructor(n,e,t){super(n,e,t,{type:"universal",restartOnError:!0})}};Ww=class{constructor(){this.coalesced=new Set;this.mapPathToChange=new Map}toKey(n){return fe?n.resource.fsPath:n.resource.fsPath.toLowerCase()}processEvent(n){let e=this.mapPathToChange.get(this.toKey(n)),t=!1;if(e){let i=e.type,o=n.type;e.resource.fsPath!==n.resource.fsPath&&(n.type===2||n.type===1)?t=!0:i===1&&o===2?(this.mapPathToChange.delete(this.toKey(n)),this.coalesced.delete(e)):i===2&&o===1?e.type=0:i===1&&o===0||(e.type=o)}else t=!0;t&&(this.coalesced.add(n),this.mapPathToChange.set(this.toKey(n),n))}coalesce(){let n=[],e=[];return Array.from(this.coalesced).filter(t=>t.type!==2?(n.push(t),!1):!0).sort((t,i)=>t.resource.fsPath.length-i.resource.fsPath.length).filter(t=>e.some(i=>yO(t.resource.fsPath,i,!fe))?!1:(e.push(t.resource.fsPath),!0)).concat(n)}}});var Gw,dk=_(()=>{Et();_s();rt();ae();te();pc();Xt();ct();Za();Gw="localFilesystem"});async function JI(r,n,e,t,i,o){let s;try{await H3(r,n,e,t,i,o)}catch(a){s=a}finally{s&&i.errorTransformer&&(s=i.errorTransformer(s)),typeof s<"u"&&e.error(s),e.end()}}async function H3(r,n,e,t,i,o){Hw(o);let s=await r.open(n,{create:!1});try{Hw(o);let a=0,l=0,c=i&&typeof i.length=="number"?i.length:void 0,u=ee.alloc(Math.min(i.bufferSize,typeof c=="number"?c:i.bufferSize)),p=i&&typeof i.position=="number"?i.position:0,m=0;do l=await r.read(s,p,u.buffer,m,u.byteLength-m),p+=l,m+=l,a+=l,typeof c=="number"&&(c-=l),m===u.byteLength&&(await e.write(t(u)),u=ee.alloc(Math.min(i.bufferSize,typeof c=="number"?c:i.bufferSize)),m=0);while(l>0&&(typeof c!="number"||c>0)&&Hw(o)&&J3(a,i));if(m>0){let h=m;typeof c=="number"&&(h=Math.min(m,c)),e.write(t(u.slice(0,h)))}}catch(a){throw Ho(a)}finally{await r.close(s)}}function Hw(r){if(r.isCancellationRequested)throw Ji();return!0}function J3(r,n){if(typeof n?.limits?.size=="number"&&r>n.limits.size)throw hr(v(2096,null),"EntryTooLarge");return!0}var Jw=_(()=>{Et();rt();We();ct()});var qI,uk=_(()=>{dn();Ce();rt();ae();xr();te();Ne();Za();me();qI=class extends M{constructor(e,t){super();this.logService=e;this.options=t;this._onDidChangeFile=this._register(new C);this.onDidChangeFile=this._onDidChangeFile.event;this._onDidWatchError=this._register(new C);this.onDidWatchError=this._onDidWatchError.event;this.universalWatchRequests=[];this.universalWatchRequestDelayer=this._register(new Jn(this.getRefreshWatchersDelay(this.universalWatchRequests.length)));this.nonRecursiveWatchRequests=[];this.nonRecursiveWatchRequestDelayer=this._register(new Jn(this.getRefreshWatchersDelay(this.nonRecursiveWatchRequests.length)))}watch(e,t){return t.recursive||this.options?.watcher?.forceUniversal?this.watchUniversal(e,t):this.watchNonRecursive(e,t)}getRefreshWatchersDelay(e){return e>200?500:0}watchUniversal(e,t){let i=this.toWatchRequest(e,t),o=aS(this.universalWatchRequests,i);return this.refreshUniversalWatchers(),oe(()=>{o(),this.refreshUniversalWatchers()})}toWatchRequest(e,t){let i={path:this.toWatchPath(e),excludes:t.excludes,includes:t.includes,recursive:t.recursive,filter:t.filter,correlationId:t.correlationId};if(sk(i)){let o=this.options?.watcher?.recursive?.usePolling;o===!0?i.pollingInterval=this.options?.watcher?.recursive?.pollingInterval??5e3:Array.isArray(o)&&o.includes(i.path)&&(i.pollingInterval=this.options?.watcher?.recursive?.pollingInterval??5e3)}return i}refreshUniversalWatchers(){this.universalWatchRequestDelayer.trigger(()=>this.doRefreshUniversalWatchers(),this.getRefreshWatchersDelay(this.universalWatchRequests.length)).catch(e=>vt(e))}doRefreshUniversalWatchers(){return this.universalWatcher||(this.universalWatcher=this._register(this.createUniversalWatcher(e=>this._onDidChangeFile.fire(GI(e)),e=>this.onWatcherLogMessage(e),this.logService.getLevel()===1)),this._register(this.logService.onDidChangeLogLevel(()=>{this.universalWatcher?.setVerboseLogging(this.logService.getLevel()===1)}))),this.universalWatcher.watch(this.universalWatchRequests)}watchNonRecursive(e,t){let i={path:this.toWatchPath(e),excludes:t.excludes,includes:t.includes,recursive:!1,filter:t.filter,correlationId:t.correlationId},o=aS(this.nonRecursiveWatchRequests,i);return this.refreshNonRecursiveWatchers(),oe(()=>{o(),this.refreshNonRecursiveWatchers()})}refreshNonRecursiveWatchers(){this.nonRecursiveWatchRequestDelayer.trigger(()=>this.doRefreshNonRecursiveWatchers(),this.getRefreshWatchersDelay(this.nonRecursiveWatchRequests.length)).catch(e=>vt(e))}doRefreshNonRecursiveWatchers(){return this.nonRecursiveWatcher||(this.nonRecursiveWatcher=this._register(this.createNonRecursiveWatcher(e=>this._onDidChangeFile.fire(GI(e)),e=>this.onWatcherLogMessage(e),this.logService.getLevel()===1)),this._register(this.logService.onDidChangeLogLevel(()=>{this.nonRecursiveWatcher?.setVerboseLogging(this.logService.getLevel()===1)}))),this.nonRecursiveWatcher.watch(this.nonRecursiveWatchRequests)}onWatcherLogMessage(e){e.type==="error"&&this._onDidWatchError.fire(e.message),this.logWatcherMessage(e)}logWatcherMessage(e){this.logService[e.type](e.message)}toFilePath(e){return kt(e.fsPath)}toWatchPath(e){let t=this.toFilePath(e);return TS(t)}}});function pk(r){let n=r;return n&&typeof n.type=="string"&&typeof n.severity=="string"}function q3(r){let n=[],e;try{let t=JSON.parse(r.arguments),i=t[t.length-1];i&&i.__$stack&&(t.pop(),e=i.__$stack),n.push(...t)}catch{n.push("Unable to log remote console arguments",r.arguments)}return{args:n,stack:e}}function K3(r){if(!r)return r;let n=r.indexOf(`
`);return n===-1?r:r.substring(0,n)}function mk(r,n){let{args:e,stack:t}=q3(r),i=typeof e[0]=="string"&&e.length===1,o=K3(t);o&&(o=`(${o.trim()})`);let s=[];if(typeof e[0]=="string"?o&&i?s=[`%c[${n}] %c${e[0]} %c${o}`,cd("blue"),cd(""),cd("grey")]:s=[`%c[${n}] %c${e[0]}`,cd("blue"),cd(""),...e.slice(1)]:s=[`%c[${n}]%`,cd("blue"),...e],o&&!i&&s.push(o),typeof console[r.severity]!="function")throw new Error("Unknown console method");console[r.severity].apply(console,s)}function cd(r){return`color: ${r}`}var fk=_(()=>{Ie()});import{fork as j3}from"child_process";var KI,gk=_(()=>{Ce();Et();Bt();fk();rt();ae();te();Gr();od();km();Zi();KI=class{constructor(n,e){this.modulePath=n;this.options=e;this.activeRequests=new Set;this.channels=new Map;this._onDidProcessExit=new C;this.onDidProcessExit=this._onDidProcessExit.event;let t=e.timeout||6e4;this.disposeDelayer=new Pa(t),this.child=null,this._client=null}getChannel(n){let e=this;return{call(t,i,o){return e.requestPromise(n,t,i,o)},listen(t,i){return e.requestEvent(n,t,i)}}}requestPromise(n,e,t,i=Le.None){if(!this.disposeDelayer)return Promise.reject(new Error("disposed"));if(i.isCancellationRequested)return Promise.reject(Ji());this.disposeDelayer.cancel();let o=this.getCachedChannel(n),s=Si(c=>o.call(e,t,c)),a=i.onCancellationRequested(()=>s.cancel()),l=oe(()=>s.cancel());return this.activeRequests.add(l),s.finally(()=>{a.dispose(),this.activeRequests.delete(l),this.activeRequests.size===0&&this.disposeDelayer&&this.disposeDelayer.trigger(()=>this.disposeClient())}),s}requestEvent(n,e,t){if(!this.disposeDelayer)return x.None;this.disposeDelayer.cancel();let i,o=new C({onWillAddFirstListener:()=>{i=this.getCachedChannel(n).listen(e,t)(o.fire,o),this.activeRequests.add(i)},onDidRemoveLastListener:()=>{this.activeRequests.delete(i),i.dispose(),this.activeRequests.size===0&&this.disposeDelayer&&this.disposeDelayer.trigger(()=>this.disposeClient())}});return o.event}get client(){if(!this._client){let n=this.options.args||[],e=Object.create(null);e.env={...Mn(process.env),VSCODE_PARENT_PID:String(process.pid)},this.options.env&&(e.env={...e.env,...this.options.env}),this.options.freshExecArgv&&(e.execArgv=[]),typeof this.options.debug=="number"&&(e.execArgv=["--nolazy","--inspect="+this.options.debug]),typeof this.options.debugBrk=="number"&&(e.execArgv=["--nolazy","--inspect-brk="+this.options.debugBrk]),e.execArgv===void 0&&(e.execArgv=process.execArgv.filter(p=>!/^--inspect(-brk)?=/.test(p)).filter(p=>!p.startsWith("--vscode-"))),_I(e.env),this.child=j3(this.modulePath,n,e);let t=new C,o=x.fromNodeEventEmitter(this.child,"message",p=>p)(p=>{if(pk(p)){mk(p,`IPC Library: ${this.options.serverName}`);return}t.fire(ee.wrap(Buffer.from(p,"base64")))}),s=this.options.useQueue?M0(this.child):this.child,a=p=>this.child?.connected&&s.send(p.buffer.toString("base64")),l=t.event,c={send:a,onMessage:l};this._client=new Da(c);let u=()=>this.disposeClient();process.once("exit",u),this.child.on("error",p=>console.warn('IPC "'+this.options.serverName+'" errored with '+p)),this.child.on("exit",(p,m)=>{process.removeListener("exit",u),o.dispose(),this.activeRequests.forEach(h=>At(h)),this.activeRequests.clear(),p!==0&&m!=="SIGTERM"&&console.warn('IPC "'+this.options.serverName+'" crashed with exit code '+p+" and signal "+m),this.disposeDelayer?.cancel(),this.disposeClient(),this._onDidProcessExit.fire({code:p,signal:m})})}return this._client}getCachedChannel(n){let e=this.channels.get(n);return e||(e=this.client.getChannel(n),this.channels.set(n,e)),e}disposeClient(){this._client&&(this.child&&(this.child.kill(),this.child=null),this._client=null,this.channels.clear())}dispose(){this._onDidProcessExit.dispose(),this.disposeDelayer?.cancel(),this.disposeDelayer=void 0,this.disposeClient(),this.activeRequests.clear()}}});var jI,hk=_(()=>{at();Zi();gk();Za();jI=class extends BI{constructor(n,e,t){super(n,e,t),this.init()}createWatcher(n){let e=n.add(new KI(gt.asFileUri("bootstrap-fork").fsPath,{serverName:"File Watcher",args:["--type=fileWatcher"],env:{VSCODE_ESM_ENTRYPOINT:"vs/platform/files/node/watcher/watcherMain",VSCODE_PIPE_LOGGING:"true",VSCODE_VERBOSE_LOGGING:"true"}}));return n.add(e.onDidProcessExit(({code:t,signal:i})=>this.onError(`terminated by itself with code ${t}, signal: ${i} (ETERM)`))),it.toService(MD(e.getChannel("watcher")))}}});import{watchFile as z3,unwatchFile as Y3}from"fs";var zI,Ik=_(()=>{te();Za();ae();ct();Ie();Ce();eo();rt();zI=class extends M{constructor(){super();this._onDidChangeFile=this._register(new C);this.onDidChangeFile=this._onDidChangeFile.event;this._onDidLogMessage=this._register(new C);this.onDidLogMessage=this._onDidLogMessage.event;this._onDidWatchFail=this._register(new C);this.onDidWatchFail=this._onDidWatchFail.event;this.correlatedWatchRequests=new Map;this.nonCorrelatedWatchRequests=new Map;this.suspendedWatchRequests=this._register(new xn);this.suspendedWatchRequestsWithPolling=new Set;this.updateWatchersDelayer=this._register(new Jn(this.getUpdateWatchersDelay()));this.suspendedWatchRequestPollingInterval=5007;this.joinWatch=new un;this.verboseLogging=!1;this._register(this.onDidWatchFail(e=>this.suspendWatchRequest({id:this.computeId(e),correlationId:this.isCorrelated(e)?e.correlationId:void 0,path:e.path})))}isCorrelated(e){return VI(e)}computeId(e){return this.isCorrelated(e)?e.correlationId:wn(e)}async watch(e){this.joinWatch.isSettled||this.joinWatch.complete(),this.joinWatch=new un;try{this.correlatedWatchRequests.clear(),this.nonCorrelatedWatchRequests.clear();for(let t of e)this.isCorrelated(t)?this.correlatedWatchRequests.set(t.correlationId,t):this.nonCorrelatedWatchRequests.set(this.computeId(t),t);for(let[t]of this.suspendedWatchRequests)!this.nonCorrelatedWatchRequests.has(t)&&!this.correlatedWatchRequests.has(t)&&(this.suspendedWatchRequests.deleteAndDispose(t),this.suspendedWatchRequestsWithPolling.delete(t));return await this.updateWatchers(!1)}finally{this.joinWatch.complete()}}updateWatchers(e){let t=[];for(let[i,o]of[...this.nonCorrelatedWatchRequests,...this.correlatedWatchRequests])this.suspendedWatchRequests.has(i)||t.push(o);return this.updateWatchersDelayer.trigger(()=>this.doWatch(t),e?this.getUpdateWatchersDelay():0).catch(i=>vt(i))}getUpdateWatchersDelay(){return 800}isSuspended(e){let t=this.computeId(e);return this.suspendedWatchRequestsWithPolling.has(t)?"polling":this.suspendedWatchRequests.has(t)}async suspendWatchRequest(e){if(this.suspendedWatchRequests.has(e.id))return;let t=new ue;this.suspendedWatchRequests.set(e.id,t),await this.joinWatch.p,!t.isDisposed&&(this.monitorSuspendedWatchRequest(e,t),this.updateWatchers(!0))}resumeWatchRequest(e){this.suspendedWatchRequests.deleteAndDispose(e.id),this.suspendedWatchRequestsWithPolling.delete(e.id),this.updateWatchers(!1)}monitorSuspendedWatchRequest(e,t){this.doMonitorWithExistingWatcher(e,t)?(this.trace(`reusing an existing recursive watcher to monitor ${e.path}`),this.suspendedWatchRequestsWithPolling.delete(e.id)):(this.doMonitorWithNodeJS(e,t),this.suspendedWatchRequestsWithPolling.add(e.id))}doMonitorWithExistingWatcher(e,t){let i=this.recursiveWatcher?.subscribe(e.path,(o,s)=>{t.isDisposed||(o?this.monitorSuspendedWatchRequest(e,t):s?.type===1&&this.onMonitoredPathAdded(e))});return i?(t.add(i),!0):!1}doMonitorWithNodeJS(e,t){let i=!1,o=(s,a)=>{if(t.isDisposed)return;let l=this.isPathNotFound(s),c=this.isPathNotFound(a),u=i;i=l,!l&&(c||u)&&this.onMonitoredPathAdded(e)};this.trace(`starting fs.watchFile() on ${e.path} (correlationId: ${e.correlationId})`);try{z3(e.path,{persistent:!1,interval:this.suspendedWatchRequestPollingInterval},o)}catch(s){this.warn(`fs.watchFile() failed with error ${s} on path ${e.path} (correlationId: ${e.correlationId})`)}t.add(oe(()=>{this.trace(`stopping fs.watchFile() on ${e.path} (correlationId: ${e.correlationId})`);try{Y3(e.path,o)}catch(s){this.warn(`fs.unwatchFile() failed with error ${s} on path ${e.path} (correlationId: ${e.correlationId})`)}}))}onMonitoredPathAdded(e){this.trace(`detected ${e.path} exists again, resuming watcher (correlationId: ${e.correlationId})`);let t={resource:A.file(e.path),type:1,cId:e.correlationId};this._onDidChangeFile.fire([t]),this.traceEvent(t,e),this.resumeWatchRequest(e)}isPathNotFound(e){return e.ctimeMs===0&&e.ino===0}async stop(){this.suspendedWatchRequests.clearAndDisposeAll(),this.suspendedWatchRequestsWithPolling.clear()}traceEvent(e,t){if(this.verboseLogging){let i=` >> normalized ${e.type===1?"[ADDED]":e.type===2?"[DELETED]":"[CHANGED]"} ${e.resource.fsPath}`;this.traceWithCorrelation(i,t)}}traceWithCorrelation(e,t){this.verboseLogging&&this.trace(`${e}${typeof t.correlationId=="number"?` <${t.correlationId}> `:""}`)}requestToString(e){return`${e.path} (excludes: ${e.excludes.length>0?e.excludes:"<none>"}, includes: ${e.includes&&e.includes.length>0?JSON.stringify(e.includes):"<all>"}, filter: ${ck(e.filter)}, correlationId: ${typeof e.correlationId=="number"?e.correlationId:"<none>"})`}async setVerboseLogging(e){this.verboseLogging=e}}});import{watch as Q3,promises as X3}from"fs";var YI,vk=_(()=>{Ce();Bt();xr();te();Ap();Ne();ce();Ut();Ie();pn();ct();Za();hs();YI=class r extends M{constructor(e,t,i,o,s,a){super();this.request=e;this.recursiveWatcher=t;this.onDidFilesChange=i;this.onDidWatchFail=o;this.onLogMessage=s;this.verboseLogging=a;this.throttledFileChangesEmitter=this._register(new oc({maxWorkChunkSize:100,throttleDelay:200,maxBufferedWork:1e4},e=>this.onDidFilesChange(e)));this.fileChangesAggregator=this._register(new Yg(e=>this.handleFileChanges(e),r.FILE_CHANGES_HANDLER_DELAY));this.cts=new st;this.realPath=new Gn(async()=>{let e=this.request.path;try{e=await re.realpath(this.request.path),this.request.path!==e&&this.trace(`correcting a path to watch that seems to be a symbolic link (original: ${this.request.path}, real: ${e})`)}catch{}return e});this._isReusingRecursiveWatcher=!1;this.didFail=!1;let l=!fe;this.excludes=Bw(this.request.path,this.request.excludes,l),this.includes=this.request.includes?Bw(this.request.path,this.request.includes,l):void 0,this.filter=VI(this.request)?this.request.filter:void 0,this.ready=this.watch()}static{this.FILE_DELETE_HANDLER_DELAY=100}static{this.FILE_CHANGES_HANDLER_DELAY=75}get isReusingRecursiveWatcher(){return this._isReusingRecursiveWatcher}get failed(){return this.didFail}async watch(){try{let e=await X3.stat(this.request.path);if(this.cts.token.isCancellationRequested)return;this._register(await this.doWatch(e.isDirectory()))}catch(e){e.code!=="ENOENT"?this.error(e):this.trace(`ignoring a path for watching who's stat info failed to resolve: ${this.request.path} (error: ${e})`),this.notifyWatchFailed()}}notifyWatchFailed(){this.didFail=!0,this.onDidWatchFail?.()}async doWatch(e){let t=new ue;return this.doWatchWithExistingWatcher(e,t)?(this.trace(`reusing an existing recursive watcher for ${this.request.path}`),this._isReusingRecursiveWatcher=!0):(this._isReusingRecursiveWatcher=!1,await this.doWatchWithNodeJS(e,t)),t}doWatchWithExistingWatcher(e,t){if(e)return!1;let i=A.file(this.request.path),o=this.recursiveWatcher?.subscribe(this.request.path,async(s,a)=>{t.isDisposed||(s?await ix(this.doWatch(e),t):a&&(typeof a.cId=="number"||typeof this.request.correlationId=="number")&&this.onFileChange({resource:i,type:a.type,cId:this.request.correlationId},!0))});return o?(t.add(o),!0):!1}async doWatchWithNodeJS(e,t){let i=await this.realPath.value;if(this.cts.token.isCancellationRequested)return;if($&&Oo(i,"/Volumes/",!0)){this.error(`Refusing to watch ${i} for changes using fs.watch() for possibly being a network share where watching is unreliable and unstable.`);return}let o=new st(this.cts.token);t.add(oe(()=>o.dispose(!0)));let s=new ue;t.add(s);try{let a=A.file(this.request.path),l=Pe(i),c=Q3(i);s.add(oe(()=>{c.removeAllListeners(),c.close()})),this.trace(`Started watching: '${i}'`);let u=new Set;if(e)try{for(let m of await re.readdir(i))u.add(m)}catch(m){this.error(m)}if(o.token.isCancellationRequested)return;let p=new Map;s.add(oe(()=>{for(let[,m]of p)m.dispose();p.clear()})),c.on("error",(m,h)=>{o.token.isCancellationRequested||(this.error(`Failed to watch ${i} for changes using fs.watch() (${m}, ${h})`),this.notifyWatchFailed())}),c.on("change",(m,h)=>{if(o.token.isCancellationRequested)return;this.verboseLogging&&this.traceWithCorrelation(`[raw] ["${m}"] ${h}`);let E="";if(h&&(E=h.toString(),$&&(E=Xi(E))),!(!E||m!=="change"&&m!=="rename"))if(e)if(m==="rename"){p.get(E)?.dispose();let y=setTimeout(async()=>{if(p.delete(E),Es(E,l,!fe)&&!await re.exists(i)){this.onWatchedPathDeleted(a);return}if(o.token.isCancellationRequested)return;let P=await this.existsChildStrictCase(H(i,E));if(o.token.isCancellationRequested)return;let T;P?u.has(E)?T=0:(T=1,u.add(E)):(u.delete(E),T=2),this.onFileChange({resource:be(a,E),type:T,cId:this.request.correlationId})},r.FILE_DELETE_HANDLER_DELAY);p.set(E,oe(()=>clearTimeout(y)))}else{let y;u.has(E)?y=0:(y=1,u.add(E)),this.onFileChange({resource:be(a,E),type:y,cId:this.request.correlationId})}else if(m==="rename"||!Es(E,l,!fe)){let y=setTimeout(async()=>{let P=await re.exists(i);o.token.isCancellationRequested||(P?(this.onFileChange({resource:a,type:0,cId:this.request.correlationId},!0),s.add(await this.doWatch(!1))):this.onWatchedPathDeleted(a))},r.FILE_DELETE_HANDLER_DELAY);s.clear(),s.add(oe(()=>clearTimeout(y)))}else this.onFileChange({resource:a,type:0,cId:this.request.correlationId},!0)})}catch(a){if(o.token.isCancellationRequested)return;this.error(`Failed to watch ${i} for changes using fs.watch() (${a.toString()})`),this.notifyWatchFailed()}}onWatchedPathDeleted(e){this.warn("Watcher shutdown because watched path got deleted"),this.onFileChange({resource:e,type:2,cId:this.request.correlationId},!0),this.fileChangesAggregator.flush(),this.notifyWatchFailed()}onFileChange(e,t=!1){this.cts.token.isCancellationRequested||(this.verboseLogging&&this.traceWithCorrelation(`${e.type===1?"[ADDED]":e.type===2?"[DELETED]":"[CHANGED]"} ${e.resource.fsPath}`),!t&&this.excludes.some(i=>i(e.resource.fsPath))?this.verboseLogging&&this.traceWithCorrelation(` >> ignored (excluded) ${e.resource.fsPath}`):!t&&this.includes&&this.includes.length>0&&!this.includes.some(i=>i(e.resource.fsPath))?this.verboseLogging&&this.traceWithCorrelation(` >> ignored (not included) ${e.resource.fsPath}`):this.fileChangesAggregator.work(e))}handleFileChanges(e){let t=ak(e),i=[];for(let s of t){if(lk(s,this.filter)){this.verboseLogging&&this.traceWithCorrelation(` >> ignored (filtered) ${s.resource.fsPath}`);continue}i.push(s)}if(i.length===0)return;if(this.verboseLogging)for(let s of i)this.traceWithCorrelation(` >> normalized ${s.type===1?"[ADDED]":s.type===2?"[DELETED]":"[CHANGED]"} ${s.resource.fsPath}`);this.throttledFileChangesEmitter.work(i)?this.throttledFileChangesEmitter.pending>0&&this.trace(`started throttling events due to large amount of file change events at once (pending: ${this.throttledFileChangesEmitter.pending}, most recent change: ${i[0].resource.fsPath}). Use 'files.watcherExclude' setting to exclude folders with lots of changing files (e.g. compilation output).`):this.warn(`started ignoring events due to too many file change events at once (incoming: ${i.length}, most recent change: ${i[0].resource.fsPath}). Use 'files.watcherExclude' setting to exclude folders with lots of changing files (e.g. compilation output).`)}async existsChildStrictCase(e){if(fe)return re.exists(e);try{let t=Pe(e);return(await re.readdir(ze(e))).some(o=>o===t)}catch(t){return this.trace(t),!1}}setVerboseLogging(e){this.verboseLogging=e}error(e){this.cts.token.isCancellationRequested||this.onLogMessage?.({type:"error",message:`[File Watcher (node.js)] ${e}`})}warn(e){this.cts.token.isCancellationRequested||this.onLogMessage?.({type:"warn",message:`[File Watcher (node.js)] ${e}`})}trace(e){!this.cts.token.isCancellationRequested&&this.verboseLogging&&this.onLogMessage?.({type:"trace",message:`[File Watcher (node.js)] ${e}`})}traceWithCorrelation(e){!this.cts.token.isCancellationRequested&&this.verboseLogging&&this.trace(`${e}${typeof this.request.correlationId=="number"?` <${this.request.correlationId}> `:""}`)}dispose(){this.cts.dispose(!0),super.dispose()}}});var QI,Ek=_(()=>{ae();Fw();Ik();ce();vk();Ce();te();QI=class extends zI{constructor(e){super();this.recursiveWatcher=e;this.onDidError=x.None;this._watchers=new Map;this.worker=this._register(new yn)}get watchers(){return this._watchers.values()}async doWatch(e){e=this.removeDuplicateRequests(e);let t=[],i=new Set(Array.from(this.watchers));for(let o of e){let s=this._watchers.get(this.requestToWatcherKey(o));s&&Uw(s.request.excludes,o.excludes)&&Uw(s.request.includes,o.includes)?i.delete(s):t.push(o)}t.length&&this.trace(`Request to start watching: ${t.map(o=>this.requestToString(o)).join(",")}`),i.size&&this.trace(`Request to stop watching: ${Array.from(i).map(o=>this.requestToString(o.request)).join(",")}`),this.worker.clear();for(let o of i)this.stopWatching(o);this.createWatchWorker().work(t)}createWatchWorker(){return this.worker.value=new oc({maxWorkChunkSize:100,throttleDelay:100,maxBufferedWork:Number.MAX_VALUE},e=>{for(let t of e)this.startWatching(t)}),this.worker.value}requestToWatcherKey(e){return typeof e.correlationId=="number"?e.correlationId:this.pathToWatcherKey(e.path)}pathToWatcherKey(e){return fe?e:e.toLowerCase()}startWatching(e){let t=new YI(e,this.recursiveWatcher,o=>this._onDidChangeFile.fire(o),()=>this._onDidWatchFail.fire(e),o=>this._onDidLogMessage.fire(o),this.verboseLogging),i={request:e,instance:t};this._watchers.set(this.requestToWatcherKey(e),i)}async stop(){await super.stop();for(let e of this.watchers)this.stopWatching(e)}stopWatching(e){this.trace("stopping file watcher",e),this._watchers.delete(this.requestToWatcherKey(e.request)),e.instance.dispose()}removeDuplicateRequests(e){let t=new Map;for(let i of e){let o=t.get(i.correlationId);o||(o=new Map,t.set(i.correlationId,o));let s=this.pathToWatcherKey(i.path);o.has(s)&&this.trace(`ignoring a request for watching who's path is already watched: ${this.requestToString(i)}`),o.set(s,i)}return Array.from(t.values()).flatMap(i=>Array.from(i.values()))}async setVerboseLogging(e){super.setVerboseLogging(e);for(let t of this.watchers)t.instance.setVerboseLogging(e)}trace(e,t){this.verboseLogging&&this._onDidLogMessage.fire({type:"trace",message:this.toMessage(e,t)})}warn(e){this._onDidLogMessage.fire({type:"warn",message:this.toMessage(e)})}toMessage(e,t){return t?`[File Watcher (node.js)] ${e} (${this.requestToString(t.request)})`:`[File Watcher (node.js)] ${e}`}}});var XI,yk=_(()=>{Za();Ek();XI=class extends WI{constructor(n,e,t){super(n,e,t),this.init()}createWatcher(n){return n.add(new QI(void 0))}}});import{constants as qw,promises as el}from"fs";var js,$I=_(()=>{Ce();er();Et();ae();xr();te();Ne();ce();Ut();pc();pn();We();ct();Jw();uk();hk();yk();js=class r extends qI{constructor(){super(...arguments);this.onDidChangeCapabilities=x.None;this.resourceLocks=new Lt(e=>lt.getComparisonKey(e));this.mapHandleToPos=new Map;this.mapHandleToLock=new Map;this.writeHandles=new Map}static{this.TRACE_LOG_RESOURCE_LOCKS=!1}get capabilities(){return this._capabilities||(this._capabilities=1040414,fe&&(this._capabilities|=1024)),this._capabilities}async stat(e){try{let{stat:t,symbolicLink:i}=await hn.stat(this.toFilePath(e)),o;return(t.mode&128)===0&&(o=2),(t.mode&qw.S_IXUSR||t.mode&qw.S_IXGRP||t.mode&qw.S_IXOTH)&&(o=(o??0)|4),{type:this.toType(t,i),ctime:t.birthtime.getTime(),mtime:t.mtime.getTime(),size:t.size,permissions:o}}catch(t){throw this.toFileSystemProviderError(t)}}async statIgnoreError(e){try{return await this.stat(e)}catch{return}}async realpath(e){let t=this.toFilePath(e);return re.realpath(t)}async readdir(e){try{let t=await re.readdir(this.toFilePath(e),{withFileTypes:!0}),i=[];return await Promise.all(t.map(async o=>{try{let s;o.isSymbolicLink()?s=(await this.stat(be(e,o.name))).type:s=this.toType(o),i.push([o.name,s])}catch(s){this.logService.trace(s)}})),i}catch(t){throw this.toFileSystemProviderError(t)}}toType(e,t){let i;return t?.dangling?i=0:e.isFile()?i=1:e.isDirectory()?i=2:i=0,t&&(i|=64),i}async createResourceLock(e){let t=this.toFilePath(e);this.traceLock(`[Disk FileSystemProvider]: createResourceLock() - request to acquire resource lock (${t})`);let i;for(;i=this.resourceLocks.get(e);)this.traceLock(`[Disk FileSystemProvider]: createResourceLock() - waiting for resource lock to be released (${t})`),await i.wait();let o=new Qi;return this.resourceLocks.set(e,o),this.traceLock(`[Disk FileSystemProvider]: createResourceLock() - new resource lock created (${t})`),oe(()=>{this.traceLock(`[Disk FileSystemProvider]: createResourceLock() - resource lock dispose() (${t})`),this.resourceLocks.get(e)===o&&(this.traceLock(`[Disk FileSystemProvider]: createResourceLock() - resource lock removed from resource-lock map (${t})`),this.resourceLocks.delete(e)),this.traceLock(`[Disk FileSystemProvider]: createResourceLock() - resource lock barrier open() (${t})`),o.open()})}async readFile(e,t){let i;try{t?.atomic&&(this.traceLock(`[Disk FileSystemProvider]: atomic read operation started (${this.toFilePath(e)})`),i=await this.createResourceLock(e));let o=this.toFilePath(e);return await el.readFile(o)}catch(o){throw this.toFileSystemProviderError(o)}finally{i?.dispose()}}traceLock(e){r.TRACE_LOG_RESOURCE_LOCKS&&this.logService.trace(e)}readFileStream(e,t,i){let o=ws(s=>ee.concat(s.map(a=>ee.wrap(a))).buffer);return JI(this,e,o,s=>s.buffer,{...t,bufferSize:256*1024},i),o}async writeFile(e,t,i){return i?.atomic!==!1&&i?.atomic?.postfix&&await this.canWriteFileAtomic(e)?this.doWriteFileAtomic(e,be(Ox(e),`${pr(e)}${i.atomic.postfix}`),t,i):this.doWriteFile(e,t,i)}async canWriteFileAtomic(e){try{let t=this.toFilePath(e),{symbolicLink:i}=await hn.stat(t);if(i)return!1}catch{}return!0}async doWriteFileAtomic(e,t,i,o){let s=new ue;try{s.add(await this.createResourceLock(e)),s.add(await this.createResourceLock(t)),await this.doWriteFile(t,i,{...o,create:!0,overwrite:!0},!0);try{await this.rename(t,e,{overwrite:!0})}catch(a){try{await this.delete(t,{recursive:!1,useTrash:!1,atomic:!1})}catch{}throw a}}finally{s.dispose()}}async doWriteFile(e,t,i,o){let s;try{let a=this.toFilePath(e);if(!i.create||!i.overwrite){if(await re.exists(a)){if(!i.overwrite)throw hr(v(2101,null),"EntryExists")}else if(!i.create)throw hr(v(2104,null),"EntryNotFound")}s=await this.open(e,{create:!0,append:i.append,unlock:i.unlock},o),await this.write(s,0,t,0,t.byteLength)}catch(a){throw await this.toFileSystemProviderWriteError(e,a)}finally{typeof s=="number"&&await this.close(s)}}static{this.canFlush=!0}static configureFlushOnWrite(e){r.canFlush=e}async open(e,t,i){let o=this.toFilePath(e),s;Fa(t)&&!i&&(s=await this.createResourceLock(e));let a;try{if(Fa(t)&&t.unlock)try{let{stat:l}=await hn.stat(o);l.mode&128||await el.chmod(o,l.mode|128)}catch(l){l.code!=="ENOENT"&&this.logService.trace(l)}if(q&&Fa(t)&&!t.append)try{a=await re.open(o,"r+"),await re.ftruncate(a,0)}catch(l){if(l.code!=="ENOENT"&&this.logService.trace(l),typeof a=="number"){try{await re.close(a)}catch(c){this.logService.trace(c)}a=void 0}}typeof a!="number"&&(a=await re.open(o,Fa(t)?t.append?"a":"w":"r"))}catch(l){throw s?.dispose(),Fa(t)?await this.toFileSystemProviderWriteError(e,l):this.toFileSystemProviderError(l)}if(this.mapHandleToPos.set(a,0),Fa(t)&&this.writeHandles.set(a,e),s){let l=this.mapHandleToLock.get(a);this.traceLock(`[Disk FileSystemProvider]: open() - storing lock for handle ${a} (${o})`),this.mapHandleToLock.set(a,s),l&&(this.traceLock(`[Disk FileSystemProvider]: open() - disposing a previous lock that was still stored on same handle ${a} (${o})`),l.dispose())}return a}async close(e){let t=this.mapHandleToLock.get(e);try{if(this.mapHandleToPos.delete(e),this.writeHandles.delete(e)&&r.canFlush)try{await re.fdatasync(e)}catch(i){r.configureFlushOnWrite(!1),this.logService.error(i)}return await re.close(e)}catch(i){throw this.toFileSystemProviderError(i)}finally{t&&(this.mapHandleToLock.get(e)===t&&(this.traceLock(`[Disk FileSystemProvider]: close() - resource lock removed from handle-lock map ${e}`),this.mapHandleToLock.delete(e)),this.traceLock(`[Disk FileSystemProvider]: close() - disposing lock for handle ${e}`),t.dispose())}}async read(e,t,i,o,s){let a=this.normalizePos(e,t),l=null;try{l=(await re.read(e,i,o,s,a)).bytesRead}catch(c){throw this.toFileSystemProviderError(c)}finally{this.updatePos(e,a,l)}return l}normalizePos(e,t){return t===this.mapHandleToPos.get(e)?null:t}updatePos(e,t,i){let o=this.mapHandleToPos.get(e);typeof o=="number"&&(typeof t=="number"||(typeof i=="number"?this.mapHandleToPos.set(e,o+i):this.mapHandleToPos.delete(e)))}async write(e,t,i,o,s){return Bx(()=>this.doWrite(e,t,i,o,s),100,3)}async doWrite(e,t,i,o,s){let a=this.normalizePos(e,t),l=null;try{l=(await re.write(e,i,o,s,a)).bytesWritten}catch(c){throw await this.toFileSystemProviderWriteError(this.writeHandles.get(e),c)}finally{this.updatePos(e,a,l)}return l}async mkdir(e){try{await el.mkdir(this.toFilePath(e))}catch(t){throw this.toFileSystemProviderError(t)}}async delete(e,t){try{let i=this.toFilePath(e);if(t.recursive){let o;t?.atomic!==!1&&t.atomic.postfix&&(o=H(ze(i),`${Pe(i)}${t.atomic.postfix}`)),await re.rm(i,1,o)}else try{await el.unlink(i)}catch(o){if(o.code==="EPERM"||o.code==="EISDIR"){let s=!1;try{let{stat:a,symbolicLink:l}=await hn.stat(i);s=a.isDirectory()&&!l}catch{}if(s)await el.rmdir(i);else throw o}else throw o}}catch(i){throw this.toFileSystemProviderError(i)}}async rename(e,t,i){let o=this.toFilePath(e),s=this.toFilePath(t);if(o!==s)try{await this.validateMoveCopy(e,t,"move",i.overwrite),await re.rename(o,s)}catch(a){throw(a.code==="EINVAL"||a.code==="EBUSY"||a.code==="ENAMETOOLONG")&&(a=new Error(v(2105,null,Pe(o),Pe(ze(s)),a.toString()))),this.toFileSystemProviderError(a)}}async copy(e,t,i){let o=this.toFilePath(e),s=this.toFilePath(t);if(o!==s)try{await this.validateMoveCopy(e,t,"copy",i.overwrite),await re.copy(o,s,{preserveSymlinks:!0})}catch(a){throw(a.code==="EINVAL"||a.code==="EBUSY"||a.code==="ENAMETOOLONG")&&(a=new Error(v(2099,null,Pe(o),Pe(ze(s)),a.toString()))),this.toFileSystemProviderError(a)}}async validateMoveCopy(e,t,i,o){let s=this.toFilePath(e),a=this.toFilePath(t),l=!1;if(this.capabilities&1024||(l=Es(s,a,!0)),l){if(i==="copy")throw hr(v(2100,null),"EntryExists");if(i==="move")return}let u=await this.statIgnoreError(e);if(!u)throw hr(v(2103,null),"EntryNotFound");let p=await this.statIgnoreError(t);if(p){if(!o)throw hr(v(2102,null),"EntryExists");(u.type&1)!==0&&(p.type&1)!==0||await this.delete(t,{recursive:!0,useTrash:!1,atomic:!1})}}async cloneFile(e,t){return this.doCloneFile(e,t,!1)}async doCloneFile(e,t,i){let o=this.toFilePath(e),s=this.toFilePath(t),a=!!(this.capabilities&1024);if(Es(o,s,!a))return;let l=new ue;try{l.add(await this.createResourceLock(e)),l.add(await this.createResourceLock(t)),i&&await el.mkdir(ze(s),{recursive:!0}),await el.copyFile(o,s)}catch(c){if(c.code==="ENOENT"&&!i)return this.doCloneFile(e,t,!0);throw this.toFileSystemProviderError(c)}finally{l.dispose()}}createUniversalWatcher(e,t,i){return new jI(o=>e(o),o=>t(o),i)}createNonRecursiveWatcher(e,t,i){return new XI(o=>e(o),o=>t(o),i)}toFileSystemProviderError(e){if(e instanceof Cc)return e;let t=e,i;switch(e.code){case"ENOENT":i="EntryNotFound";break;case"EISDIR":i="EntryIsADirectory";break;case"ENOTDIR":i="EntryNotADirectory";break;case"EEXIST":i="EntryExists";break;case"EPERM":case"EACCES":i="NoPermissions";break;case"ERR_UNC_HOST_NOT_ALLOWED":t=`${e.message}. Please update the 'security.allowedUNCHosts' setting if you want to allow this host.`,i="Unknown";break;default:i="Unknown"}return hr(t,i)}async toFileSystemProviderWriteError(e,t){let i=this.toFileSystemProviderError(t);if(e&&i.code==="NoPermissions")try{let{stat:o}=await hn.stat(this.toFilePath(e));o.mode&128||(i=hr(t,"EntryWriteLocked"))}catch(o){this.logService.trace(o)}return i}}});var ZI,ev,_k=_(()=>{ae();$I();te();Et();pc();Bt();ZI=class extends M{constructor(e,t){super();this.provider=e;this.logService=t;this.sessionToWatcher=new Map;this.watchRequests=new Map}call(e,t,i){let o=this.getUriTransformer(e);switch(t){case"stat":return this.stat(o,i[0]);case"realpath":return this.realpath(o,i[0]);case"readdir":return this.readdir(o,i[0]);case"open":return this.open(o,i[0],i[1]);case"close":return this.close(i[0]);case"read":return this.read(i[0],i[1],i[2]);case"readFile":return this.readFile(o,i[0],i[1]);case"write":return this.write(i[0],i[1],i[2],i[3],i[4]);case"writeFile":return this.writeFile(o,i[0],i[1],i[2]);case"rename":return this.rename(o,i[0],i[1],i[2]);case"copy":return this.copy(o,i[0],i[1],i[2]);case"cloneFile":return this.cloneFile(o,i[0],i[1]);case"mkdir":return this.mkdir(o,i[0]);case"delete":return this.delete(o,i[0],i[1]);case"watch":return this.watch(o,i[0],i[1],i[2],i[3]);case"unwatch":return this.unwatch(i[0],i[1])}throw new Error(`IPC Command ${t} not found`)}listen(e,t,i){let o=this.getUriTransformer(e);switch(t){case"fileChange":return this.onFileChange(o,i[0]);case"readFileStream":return this.onReadFileStream(o,i[0],i[1])}throw new Error(`Unknown event ${t}`)}stat(e,t){let i=this.transformIncoming(e,t,!0);return this.provider.stat(i)}realpath(e,t){let i=this.transformIncoming(e,t,!0);return this.provider.realpath(i)}readdir(e,t){let i=this.transformIncoming(e,t);return this.provider.readdir(i)}async readFile(e,t,i){let o=this.transformIncoming(e,t,!0),s=await this.provider.readFile(o,i);return ee.wrap(s)}onReadFileStream(e,t,i){let o=this.transformIncoming(e,t,!0),s=new st,a=new C({onDidRemoveLastListener:()=>{s.cancel()}}),l=this.provider.readFileStream(o,i,s.token);return uc(l,{onData:c=>a.fire(ee.wrap(c)),onError:c=>a.fire(c),onEnd:()=>{a.fire("end"),a.dispose(),s.dispose()}}),a.event}writeFile(e,t,i,o){let s=this.transformIncoming(e,t);return this.provider.writeFile(s,i.buffer,o)}open(e,t,i){let o=this.transformIncoming(e,t,!0);return this.provider.open(o,i)}close(e){return this.provider.close(e)}async read(e,t,i){let o=ee.alloc(i),a=await this.provider.read(e,t,o.buffer,0,i);return[o,a]}write(e,t,i,o,s){return this.provider.write(e,t,i.buffer,o,s)}mkdir(e,t){let i=this.transformIncoming(e,t);return this.provider.mkdir(i)}delete(e,t,i){let o=this.transformIncoming(e,t);return this.provider.delete(o,i)}rename(e,t,i,o){let s=this.transformIncoming(e,t),a=this.transformIncoming(e,i);return this.provider.rename(s,a,o)}copy(e,t,i,o){let s=this.transformIncoming(e,t),a=this.transformIncoming(e,i);return this.provider.copy(s,a,o)}cloneFile(e,t,i){let o=this.transformIncoming(e,t),s=this.transformIncoming(e,i);return this.provider.cloneFile(o,s)}onFileChange(e,t){let i=new C({onWillAddFirstListener:()=>{this.sessionToWatcher.set(t,this.createSessionFileWatcher(e,i))},onDidRemoveLastListener:()=>{At(this.sessionToWatcher.get(t)),this.sessionToWatcher.delete(t)}});return i.event}async watch(e,t,i,o,s){let a=this.sessionToWatcher.get(t);if(a){let l=this.transformIncoming(e,o),c=a.watch(i,l,s);this.watchRequests.set(t+i,c)}}async unwatch(e,t){let i=e+t,o=this.watchRequests.get(i);o&&(At(o),this.watchRequests.delete(i))}dispose(){super.dispose();for(let[,e]of this.watchRequests)e.dispose();this.watchRequests.clear();for(let[,e]of this.sessionToWatcher)e.dispose();this.sessionToWatcher.clear()}},ev=class extends M{constructor(e,t,i,o){super();this.uriTransformer=e;this.environmentService=o;this.watcherRequests=new Map;this.fileWatcher=this._register(new js(i)),this.registerListeners(t)}registerListeners(e){let t=this._register(new C);this._register(t.event(i=>{e.fire(i.map(o=>({resource:this.uriTransformer.transformOutgoingURI(o.resource),type:o.type,cId:o.cId})))})),this._register(this.fileWatcher.onDidChangeFile(i=>t.fire(i))),this._register(this.fileWatcher.onDidWatchError(i=>e.fire(i)))}getRecursiveWatcherOptions(e){}getExtraExcludes(e){}watch(e,t,i){let o=this.getExtraExcludes(this.environmentService);return Array.isArray(o)&&(i.excludes=[...i.excludes,...o]),this.watcherRequests.set(e,this.fileWatcher.watch(t,i)),oe(()=>{At(this.watcherRequests.get(e)),this.watcherRequests.delete(e)})}dispose(){for(let[,e]of this.watcherRequests)e.dispose();this.watcherRequests.clear(),super.dispose()}}});var wk,bk=_(()=>{Et();Hg();Ie();wk=new class{transformIncoming(r){return r}transformOutgoing(r){return r}transformOutgoingURI(r){return r}transformOutgoingScheme(r){return r}}});import{shell as Z3}from"electron";var tv,Kw,Tk=_(()=>{We();ce();Ie();ct();Ne();_k();bk();_s();tv=class extends ZI{constructor(e,t,i){super(e,t);this.environmentService=i}getUriTransformer(e){return wk}transformIncoming(e,t){return A.revive(t)}async delete(e,t,i){if(!i.useTrash)return super.delete(e,t,i);let o=this.transformIncoming(e,t),s=kt(o.fsPath);try{await Z3.trashItem(s)}catch(a){throw hr(q?v(2097,null,Pe(s),Kn(a)):v(2098,null,Pe(s),Kn(a)),"Unknown")}}createSessionFileWatcher(e,t){return new Kw(e,t,this.logService,this.environmentService)}},Kw=class extends ev{watch(n,e,t){if(t.recursive)throw hr("Recursive file watching is not supported from main process for performance reasons.","Unavailable");return super.watch(n,e,t)}}});var ve,qm=_(()=>{ve=class{constructor(n,e=[],t=!1){this.ctor=n,this.staticArguments=e,this.supportsDelayedInstantiation=t}}});var zs,nv=_(()=>{zs=class{constructor(...n){this._entries=new Map;for(let[e,t]of n)this.set(e,t)}set(n,e){let t=this._entries.get(n);return this._entries.set(n,e),t}has(n){return this._entries.has(n)}get(n){return this._entries.get(n)}}});import{exec as rv}from"child_process";import{totalmem as e8}from"os";function Km(r){return new Promise((n,e)=>{let t,i=new Map,o=e8();function s(l,c,u,p,m){let h=i.get(c);if(l===r||h){let E={name:a(u),cmd:u,pid:l,ppid:c,load:p,mem:q?m:o*(m/100)};i.set(l,E),l===r&&(t=E),h&&(h.children||(h.children=[]),h.children.push(E),h.children.length>1&&(h.children=h.children.sort((y,P)=>y.pid-P.pid)))}}function a(l){let c=/--utility-sub-type=network/i,u=/--crashes-directory/i,p=/conhost\.exe.+--headless/i,m=/--type=([a-zA-Z-]+)/;if(u.exec(l))return"electron-crash-reporter";if(p.exec(l))return"conpty-agent";let h=m.exec(l);if(h&&h.length===2)return h[1]==="renderer"?"window":h[1]==="utility"?c.exec(l)?"utility-network-service":"utility-process":h[1]==="extensionHost"?"extension-host":h[1];if(l.indexOf("node ")<0&&l.indexOf("node.exe")<0){let E="";do h=t8.exec(l),h&&(E+=h+" ");while(h);if(E)return`electron-nodejs (${E.trim()})`}return l}if(process.platform==="win32"){let l=c=>c.indexOf("\\\\?\\")===0||c.indexOf("\\??\\")===0?c.substring(4):c.indexOf('"\\\\?\\')===0||c.indexOf('"\\??\\')===0?'"'+c.substring(5):c;import("@vscode/windows-process-tree").then(c=>{c.getProcessList(r,u=>{if(!u){e(new Error(`Root process ${r} not found`));return}c.getProcessCpuUsage(u,p=>{let m=new Map;p.forEach(h=>{let E=l(h.commandLine||"");m.set(h.pid,{name:a(E),cmd:E,pid:h.pid,ppid:h.ppid,load:h.cpu||0,mem:h.memory||0})}),t=m.get(r),t?(m.forEach(h=>{let E=m.get(h.ppid);E&&(E.children||(E.children=[]),E.children.push(h))}),m.forEach(h=>{h.children&&(h.children=h.children.sort((E,y)=>E.pid-y.pid))}),n(t)):e(new Error(`Root process ${r} not found`))})},c.ProcessDataFlag.CommandLine|c.ProcessDataFlag.Memory)})}else{let l=function(){let c=[t],u=[];for(;c.length;){let m=c.shift();m&&(u.push(m.pid),m.children&&(c=c.concat(m.children)))}let p=JSON.stringify(gt.asFileUri("vs/base/node/cpuUsage.sh").fsPath);p+=" "+u.join(" "),rv(p,{},(m,h,E)=>{if(m||E)e(m||new Error(E.toString()));else{let y=h.toString().split(`
`);for(let P=0;P<u.length;P++){let T=i.get(u[P]);T.load=parseFloat(y[P])}if(!t){e(new Error(`Root process ${r} not found`));return}n(t)}})};rv("which ps",{},(c,u,p)=>{if(c||p)if(process.platform!=="linux")e(c||new Error(p.toString()));else{let m=JSON.stringify(gt.asFileUri("vs/base/node/ps.sh").fsPath);rv(m,{},(h,E,y)=>{h||y?e(h||new Error(y.toString())):(Pk(E,s),l())})}else{let m=u.toString().trim();rv(`${m} -ax -o pid=,ppid=,pcpu=,pmem=,command=`,{maxBuffer:1e3*1024,env:{LC_NUMERIC:"en_US.UTF-8"}},(E,y,P)=>{E||P&&!P.includes("screen size is bogus")?e(E||new Error(P.toString())):(Pk(y,s),process.platform==="linux"?l():t?n(t):e(new Error(`Root process ${r} not found`)))})}})}})}function Pk(r,n){let e=/^\s*([0-9]+)\s+([0-9]+)\s+([0-9]+\.[0-9]+)\s+([0-9]+\.[0-9]+)\s+(.+)$/,t=r.toString().split(`
`);for(let i of t){let o=e.exec(i.trim());o&&o.length===6&&n(parseInt(o[1]),parseInt(o[2]),o[5],parseFloat(o[3]),parseFloat(o[4]))}}var t8,jw=_(()=>{at();ce();t8=/[a-zA-Z-]+\.js\b/g});var dd,Ck=_(()=>{jw();We();mI();aw();me();ja();dd=class{constructor(n,e,t){this.logService=n;this.diagnosticsService=e;this.diagnosticsMainService=t}async resolveProcesses(){let n=await this.diagnosticsMainService.getMainDiagnostics(),e=[];for(let i of n.windows)e.push([i.pid,`window [${i.id}] (${i.title})`]);for(let{pid:i,name:o}of Pn.getAll())e.push([i,o]);let t=[];try{t.push({name:v(2230,null),rootProcess:await Km(process.pid)}),(await this.diagnosticsMainService.getRemoteDiagnostics({includeProcesses:!0})).forEach(o=>{Rm(o)?t.push({name:o.hostName,rootProcess:o}):o.processes&&t.push({name:o.hostName,rootProcess:o.processes})})}catch(i){this.logService.error(`Listing processes failed: ${i}`)}return{pidToNames:e,processes:t}}async getSystemStatus(){let[n,e]=await Promise.all([this.diagnosticsMainService.getMainDiagnostics(),this.diagnosticsMainService.getRemoteDiagnostics({includeProcesses:!1,includeWorkspaceMetadata:!1})]);return this.diagnosticsService.getDiagnostics(n,e)}async getSystemInfo(){let[n,e]=await Promise.all([this.diagnosticsMainService.getMainDiagnostics(),this.diagnosticsMainService.getRemoteDiagnostics({includeProcesses:!1,includeWorkspaceMetadata:!1})]);return await this.diagnosticsService.getSystemInfo(n,e)}async getPerformanceInfo(){try{let[n,e]=await Promise.all([this.diagnosticsMainService.getMainDiagnostics(),this.diagnosticsMainService.getRemoteDiagnostics({includeProcesses:!0,includeWorkspaceMetadata:!0})]);return await this.diagnosticsService.getPerformanceInfo(n,e)}catch(n){throw this.logService.warn("issueService#getPerformanceInfo ",n.message),n}}};dd=D([S(0,z),S(1,Am),S(2,Xc)],dd)});function Ak(r){let n=r.getKeyMap(),e=r.getCurrentKeyboardLayout();return{keyboardMapping:n,keyboardLayoutInfo:e}}var zw,ud,Rk=_(()=>{ce();ae();te();de();Vt();zw=V("keyboardLayoutMainService"),ud=class extends M{constructor(e){super();this._onDidChangeKeyboardLayout=this._register(new C);this.onDidChangeKeyboardLayout=this._onDidChangeKeyboardLayout.event;this._initPromise=null,this._keyboardLayoutData=null,e.when(3).then(()=>this._initialize())}_initialize(){return this._initPromise||(this._initPromise=this._doInitialize()),this._initPromise}async _doInitialize(){let e=await import("native-keymap");this._keyboardLayoutData=Ak(e),_R||e.onDidChangeKeyboardLayout(()=>{this._keyboardLayoutData=Ak(e),this._onDidChangeKeyboardLayout.fire(this._keyboardLayoutData)})}async getKeyboardLayoutData(){return await this._initialize(),this._keyboardLayoutData}};ud=D([S(0,Te)],ud)});var pd,Yw=_(()=>{de();pd=V("urlService")});import{app as n8}from"electron";var r8,Qw,md,xk=_(()=>{dn();ce();Ie();pn();_t();rd();de();me();Yw();zt();r8="launchMainService",Qw=V(r8),md=class{constructor(n,e,t,i){this.logService=n;this.windowsMainService=e;this.urlService=t;this.configurationService=i}async start(n,e){this.logService.trace("Received data from other instance: ",n,e),$&&n8.focus({steal:!0});let t=this.parseOpenUrl(n);if(t.length){let i=Promise.resolve();if(this.windowsMainService.getWindowCount()===0){let o=(await this.windowsMainService.openEmptyWindow({context:4})).at(0);o&&(i=o.ready())}i.then(()=>{for(let{uri:o,originalUrl:s}of t)this.urlService.open(o,{originalUrl:s})})}else return this.startOpenWindow(n,e)}parseOpenUrl(n){return n["open-url"]&&n._urls&&n._urls.length>0?wt(n._urls.map(e=>{try{return{uri:A.parse(e),originalUrl:e}}catch{return null}})):[]}async startOpenWindow(n,e){let t=Ri(e)?0:4,i=[],o=n.wait&&n.waitMarkerFilePath?A.file(n.waitMarkerFilePath):void 0,s=n.remote||void 0,a={context:t,cli:n,userEnv:n["preserve-env"]||t===0?e:void 0,waitMarkerFileURI:o,remoteAuthority:s,forceProfile:n.profile,forceTempProfile:n["profile-temp"]};if(n.extensionDevelopmentPath)await this.windowsMainService.openExtensionDevelopmentHostWindow(n.extensionDevelopmentPath,a);else if(!n._.length&&!n["folder-uri"]&&!n["file-uri"]){let l=!1;if(n["new-window"]||a.forceProfile||a.forceTempProfile)l=!0;else if(n["reuse-window"])l=!1;else switch(this.configurationService.getValue("window")?.openWithoutArgumentsInNewWindow||"default"){case"on":l=!0;break;case"off":l=!1;break;default:l=!$}if(l)i=await this.windowsMainService.open({...a,forceNewWindow:!0,forceEmpty:!0});else{let c=this.windowsMainService.getLastActiveWindow();c?(this.windowsMainService.openExistingWindow(c,a),i=[c]):i=await this.windowsMainService.open({...a,forceEmpty:!0})}}else i=await this.windowsMainService.open({...a,forceNewWindow:n["new-window"],preferNewWindow:!n["reuse-window"]&&!n.wait,forceReuseWindow:n["reuse-window"],diffMode:n.diff,mergeMode:n.merge,addMode:n.add,removeMode:n.remove,noRecentEntry:!!n["skip-add-to-recently-opened"],gotoLineMode:n.goto});if(o&&i.length===1&&i[0])return Promise.race([i[0].whenClosedOrLoaded,qx(o.fsPath)]).then(()=>{},()=>{})}async getMainProcessId(){return this.logService.trace("Received request for process ID from other instance."),process.pid}};md=D([S(0,z),S(1,Ke),S(2,pd),S(3,Ae)],md)});function Xw(r){return r.submenu!==void 0}function $w(r){return r.id==="vscode.menubar.separator"}function Zw(r){return r.uri!==void 0}function Dk(r){return!Xw(r)&&!$w(r)&&!Zw(r)}var Ok=_(()=>{});import{networkInterfaces as i8}from"os";function s8(r){let n=r.replace(/\-/g,":").toLowerCase();return!o8.has(n)}function kk(){let r=i8();for(let n in r){let e=r[n];if(e){for(let{mac:t}of e)if(s8(t))return t}}throw new Error("Unable to retrieve mac address (unexpected format)")}var o8,Nk=_(()=>{o8=new Set(["00:00:00:00:00:00","ff:ff:ff:ff:ff:ff","ac:de:48:00:11:22"])});import{networkInterfaces as a8}from"os";async function Lk(r){return eb||(eb=(async()=>await l8(r)||Me())()),eb}async function l8(r){try{let n=await import("crypto"),e=kk();return n.createHash("sha256").update(e,"utf8").digest("hex")}catch(n){r(n);return}}async function Mk(r){if(q){let n=await import("@vscode/windows-registry");try{return n.GetStringRegKey("HKEY_LOCAL_MACHINE",c8,"MachineId")||""}catch(e){return r(e),""}}return""}async function iv(r){try{return await(await import("@vscode/deviceid")).getDeviceId()}catch(n){return r(n),Me()}}var jm,eb,c8,zm=_(()=>{Ua();Xt();Nk();ce();jm=new class{_isVirtualMachineMacAddress(r){return this._virtualMachineOUIs||(this._virtualMachineOUIs=gr.forStrings(),this._virtualMachineOUIs.set("00-50-56",!0),this._virtualMachineOUIs.set("00-0C-29",!0),this._virtualMachineOUIs.set("00-05-69",!0),this._virtualMachineOUIs.set("00-03-FF",!0),this._virtualMachineOUIs.set("00-1C-42",!0),this._virtualMachineOUIs.set("00-16-3E",!0),this._virtualMachineOUIs.set("08-00-27",!0),this._virtualMachineOUIs.set("00:50:56",!0),this._virtualMachineOUIs.set("00:0C:29",!0),this._virtualMachineOUIs.set("00:05:69",!0),this._virtualMachineOUIs.set("00:03:FF",!0),this._virtualMachineOUIs.set("00:1C:42",!0),this._virtualMachineOUIs.set("00:16:3E",!0),this._virtualMachineOUIs.set("08:00:27",!0)),!!this._virtualMachineOUIs.findSubstr(r)}value(){if(this._value===void 0){let r=0,n=0,e=a8();for(let t in e){let i=e[t];if(i)for(let{mac:o,internal:s}of i)s||(n+=1,this._isVirtualMachineMacAddress(o.toUpperCase())&&(r+=1))}this._value=n>0?r/n:0}return this._value}};c8="Software\\Microsoft\\SQMClient"});import*as ov from"net";function Fk(r,n,e,t=1){let i=!1;return new Promise(o=>{let s=setTimeout(()=>{if(!i)return i=!0,o(0)},e);tb(r,n,t,a=>{if(!i)return i=!0,clearTimeout(s),o(a)})})}function tb(r,n,e,t){if(n===0)return t(0);let i=new ov.Socket;i.once("connect",()=>(Uk(i),tb(r+e,n-1,e,t))),i.once("data",()=>{}),i.once("error",o=>(Uk(i),o.code!=="ECONNREFUSED"?tb(r+e,n-1,e,t):t(r))),i.connect(r,"127.0.0.1")}function Wk(r,n){return rb(r,0,n).then(e=>e!==0)}function rb(r,n,e,t="127.0.0.1"){let i=!1,o,s=1,a=ov.createServer({pauseOnConnect:!0});function l(c,u){i||(i=!0,a.removeAllListeners(),a.close(),o&&clearTimeout(o),u(c))}return new Promise(c=>{o=setTimeout(()=>{l(0,c)},e),a.on("listening",()=>{l(r,c)}),a.on("error",u=>{u&&(u.code==="EADDRINUSE"||u.code==="EACCES")&&s<n?(r++,s++,a.listen(r,t)):l(0,c)}),a.on("close",()=>{l(0,c)}),a.listen(r,t)})}function Uk(r){try{r.removeAllListeners("connect"),r.removeAllListeners("error"),r.end(),r.destroy(),r.unref()}catch(n){console.error(n)}}var nb,ib=_(()=>{nb={1:!0,7:!0,9:!0,11:!0,13:!0,15:!0,17:!0,19:!0,20:!0,21:!0,22:!0,23:!0,25:!0,37:!0,42:!0,43:!0,53:!0,69:!0,77:!0,79:!0,87:!0,95:!0,101:!0,102:!0,103:!0,104:!0,109:!0,110:!0,111:!0,113:!0,115:!0,117:!0,119:!0,123:!0,135:!0,137:!0,139:!0,143:!0,161:!0,179:!0,389:!0,427:!0,465:!0,512:!0,513:!0,514:!0,515:!0,526:!0,530:!0,531:!0,532:!0,540:!0,548:!0,554:!0,556:!0,563:!0,587:!0,601:!0,636:!0,989:!0,990:!0,993:!0,995:!0,1719:!0,1720:!0,1723:!0,2049:!0,3659:!0,4045:!0,5060:!0,5061:!0,6e3:!0,6566:!0,6665:!0,6666:!0,6667:!0,6668:!0,6669:!0,6697:!0,10080:!0}});var _ue,ob=_(()=>{de();_ue=V("nativeHostService")});import*as Bk from"fs";import*as Vk from"child_process";async function Gk(r=!1){return(sb===void 0||r)&&(sb=d8()),sb}async function d8(){let r=await yh();if(r===0)return!1;if(r>=22e3){let n=u8();if(n)return new Promise(e=>{try{Vk.execFile(n,["--status"],t=>e(!t))}catch{e(!1)}})}else{let n=p8();if(n)try{if((await Bk.promises.stat(n)).isFile())return!0}catch{}}return!1}function Hk(r){let n=process.env.SystemRoot;if(n){let e=process.env.hasOwnProperty("PROCESSOR_ARCHITEW6432");return H(n,e?"Sysnative":"System32",r)}}function u8(){return Hk("wsl.exe")}function p8(){return Hk("lxss\\LxssManager.dll")}var sb,Jk=_(()=>{Ne();Sc()});var fd,qk=_(()=>{Ce();me();fd=class{constructor(n,e,t){this._window=n;this._sessionId=e;this._logService=t}async inspect(n){await this._connect();let e=this._window.webContents.debugger;await e.sendCommand("Profiler.start"),this._logService.warn("[perf] profiling STARTED",this._sessionId),await bt(n);let t=await e.sendCommand("Profiler.stop");return this._logService.warn("[perf] profiling DONE",this._sessionId),await this._disconnect(),t.profile}async _connect(){let n=this._window.webContents.debugger;n.attach(),await n.sendCommand("Profiler.enable")}async _disconnect(){let n=this._window.webContents.debugger;await n.sendCommand("Profiler.disable"),n.detach()}};fd=D([S(2,z)],fd)});import{createWriteStream as m8,promises as Nue}from"fs";async function Kk(r,n){let{ZipFile:e}=await import("yazl");return new Promise((t,i)=>{let o=new e;n.forEach(a=>{a.contents?o.addBuffer(typeof a.contents=="string"?Buffer.from(a.contents,"utf8"):a.contents,a.path):a.localPath&&o.addFile(a.localPath,a.path)}),o.end();let s=m8(r);o.outputStream.pipe(s),o.outputStream.once("error",i),s.once("error",i),s.once("finish",()=>t(r))})}var f8,Fue,jk=_(()=>{Ce();Ne();qe();pn();We();f8="end of central directory record signature not found",Fue=new RegExp(f8)});function g8(r){return r.res.statusCode&&r.res.statusCode>=200&&r.res.statusCode<300||r.res.statusCode===1223}function h8(r){return r.res.statusCode===204}async function tl(r){if(!g8(r))throw new Error("Server returned "+r.res.statusCode);if(h8(r))return null;let e=(await Ra(r.stream)).toString();try{return JSON.parse(e)}catch(t){throw t.message+=`:
`+e,t}}function I8(r=!0,n=!0){if(zk===r&&Yk===n)return;zk=r,Yk=n;let e=Ht.as(_n.Configuration),t=ab;ab=[{id:"http",order:15,title:v(2276,null),type:"object",scope:2,properties:{"http.useLocalProxyConfiguration":{type:"boolean",default:n,markdownDescription:v(2291,null),restricted:!0}}},{id:"http",order:15,title:v(2276,null),type:"object",scope:1,properties:{"http.electronFetch":{type:"boolean",default:!1,description:v(2274,null),restricted:!0}}},{id:"http",order:15,title:v(2276,null),type:"object",scope:r?1:2,properties:{"http.proxy":{type:"string",pattern:"^(https?|socks|socks4a?|socks5h?)://([^:]*(:[^@]*)?@)?([^:]+|\\[[:0-9a-fA-F]+\\])(:\\d+)?/?$|^$",markdownDescription:v(2279,null,"`#http.useLocalProxyConfiguration#`"),restricted:!0},"http.proxyStrictSSL":{type:"boolean",default:!0,markdownDescription:v(2287,null,"`#http.useLocalProxyConfiguration#`"),restricted:!0},"http.proxyKerberosServicePrincipal":{type:"string",markdownDescription:v(2281,null,"`#http.useLocalProxyConfiguration#`"),restricted:!0},"http.noProxy":{type:"array",items:{type:"string"},markdownDescription:v(2278,null,"`#http.useLocalProxyConfiguration#`"),restricted:!0},"http.proxyAuthorization":{type:["null","string"],default:null,markdownDescription:v(2280,null,"`#http.useLocalProxyConfiguration#`"),restricted:!0},"http.proxySupport":{type:"string",enum:["off","on","fallback","override"],enumDescriptions:[v(2284,null),v(2285,null),v(2283,null),v(2286,null)],default:"override",markdownDescription:v(2282,null,"`#http.useLocalProxyConfiguration#`"),restricted:!0},"http.systemCertificates":{type:"boolean",default:!0,markdownDescription:v(2288,null,"`#http.useLocalProxyConfiguration#`"),restricted:!0},"http.systemCertificatesNode":{type:"boolean",tags:["experimental"],default:cb,markdownDescription:v(2289,null,"`#http.useLocalProxyConfiguration#`"),restricted:!0,experiment:{mode:"auto"}},"http.experimental.systemCertificatesV2":{type:"boolean",tags:["experimental"],default:!1,markdownDescription:v(2290,null,"`#http.useLocalProxyConfiguration#`"),restricted:!0},"http.fetchAdditionalSupport":{type:"boolean",default:!0,markdownDescription:v(2275,null,"`#http.useLocalProxyConfiguration#`","`#http.proxySupport#`","`#http.systemCertificates#`"),restricted:!0},"http.experimental.networkInterfaceCheckInterval":{type:"number",default:300,minimum:-1,tags:["experimental"],markdownDescription:v(2277,null,"`#http.useLocalProxyConfiguration#`"),restricted:!0,experiment:{mode:"auto"}}}}],e.updateConfigurations({add:ab,remove:t})}var ii,lb,sv,cb,ab,zk,Yk,Ys=_(()=>{Et();rt();te();We();Lo();de();wi();ii=V("requestService"),lb=class{constructor(n){this.original=n}toJSON(){if(!this.headers){let n=Object.create(null);for(let e in this.original)e.toLowerCase()==="authorization"||e.toLowerCase()==="proxy-authorization"?n[e]="*****":n[e]=this.original[e];this.headers=n}return this.headers}},sv=class extends M{constructor(e){super();this.logService=e;this.counter=0}async logAndRequest(e,t){let i=`#${++this.counter}: ${e.url}`;this.logService.trace(`${i} - begin`,e.type,new lb(e.headers??{}));try{let o=await t();return this.logService.trace(`${i} - end`,e.type,o.res.statusCode,o.res.headers),o}catch(o){throw this.logService.error(`${i} - error`,e.type,cn(o)),o}}};cb=!1,ab=[];I8()});import*as $k from"os";import*as Un from"fs";import{execFile as Qk}from"child_process";import{promisify as Xk}from"util";async function v8(){let r=process.env.SHELL,n=$k.homedir();if(r?.includes("fish")){let t=H(n,".config","fish"),i=H(t,"config.fish");await Un.promises.mkdir(t,{recursive:!0});try{await Un.promises.access(i)}catch{await Un.promises.writeFile(i,"","utf8")}return{path:i,type:"fish"}}else if(r?.includes("zsh")){let t=H(n,".zshrc");try{await Un.promises.access(t)}catch{await Un.promises.writeFile(t,"","utf8")}return{path:t,type:"zsh"}}else if(r?.includes("bash")){let t=H(n,".bash_profile"),i=H(n,".bashrc");try{return await Un.promises.access(t),{path:t,type:"bash"}}catch{try{await Un.promises.access(i)}catch{await Un.promises.writeFile(i,"","utf8")}return{path:i,type:"bash"}}}let e=H(n,".bashrc");try{await Un.promises.access(e)}catch{await Un.promises.writeFile(e,"","utf8")}return{path:e,type:"bash"}}async function nl(r,n){if(q)return E8(r);let e=await v8();if(!e)return;let t;try{t=`${e.path}.backup-${Date.now()}`,await Un.promises.copyFile(e.path,t);let i=await Un.promises.readFile(e.path,"utf8"),o;if(e.type==="fish"?o=`fish_add_path ${r}`:o=`export PATH="${r}:$PATH"`,i.includes(o)){await Un.promises.unlink(t);return}i=`${i}
# Added by ${n}
${o}
`,await Un.promises.writeFile(e.path,i,"utf8"),await Un.promises.unlink(t)}catch(i){if(console.error("Failed to modify PATH:",i),t)try{await Un.promises.copyFile(t,e.path),await Un.promises.unlink(t),console.log("Successfully restored shell config from backup")}catch(o){console.error("Failed to restore from backup:",o)}throw i}}async function E8(r){let n="";try{let{stdout:i}=await Xk(Qk)("reg",["query","HKCU\\Environment","/v","Path"],{encoding:"utf8"}),o=i.match(/Path\s+REG(?:_EXPAND)?_SZ\s+(.*)/i);o&&(n=o[1].trim())}catch(i){if(!i||typeof i!="object"||i.code!==1)throw i}if(n.split(";").map(i=>i.toLowerCase()).includes(r.toLowerCase()))return;let t=n?`${n};${r}`:r;await Xk(Qk)("reg",["add","HKCU\\Environment","/v","Path","/t","REG_EXPAND_SZ","/d",t,"/f"],{encoding:"utf8"})}var Zk=_(()=>{Ne();ce()});function eN(r){let n=r.toLowerCase();return n.startsWith("devin-desktop")?n:n.replace("windsurf","surf")}function tN(r){switch(r.toLowerCase()){case"devin-desktop":return["surf","windsurf"];case"devin-desktop-insiders":return["surf-insiders","windsurf-insiders"];case"devin-desktop-next":return["surf-next","windsurf-next"];default:return[]}}function nN(r){switch(r.toLowerCase()){case"windsurf-insiders":case"devin-desktop-insiders":return"devin-insiders";case"windsurf-next":case"devin-desktop-next":return"devin-next";default:return"devin"}}var rN=_(()=>{});import*as Er from"fs";import{exec as iN}from"child_process";import{app as Ym,BrowserWindow as av,clipboard as Qo,contentTracing as S8,Menu as Qm,nativeImage as _8,Notification as oN,powerMonitor as qr,powerSaveBlocker as db,screen as Xm,shell as ub,webContents as w8}from"electron";import{arch as b8,cpus as T8,freemem as P8,loadavg as C8,platform as A8,release as R8,totalmem as x8,type as D8,homedir as pb}from"os";import{promisify as sN}from"util";var mo,rl,$m=_(()=>{bs();Bt();ae();te();at();Ne();ce();Ie();zm();pn();ib();We();Ka();$t();de();Vt();me();ob();In();kc();oo();zt();Ln();Bs();Et();Jk();qk();za();rt();jk();_t();V_();Ys();Zk();xr();rN();mo=V("nativeHostMainService"),rl=class extends M{constructor(e,t,i,o,s,a,l,c,u,p,m,h,E){super();this.windowsMainService=e;this.auxiliaryWindowsMainService=t;this.dialogMainService=i;this.lifecycleMainService=o;this.environmentMainService=s;this.logService=a;this.productService=l;this.themeMainService=c;this.workspacesManagementMainService=u;this.configurationService=p;this.requestService=m;this.proxyAuthService=h;this.instantiationService=E;this._onDidChangePassword=this._register(new C);this.onDidChangePassword=this._onDidChangePassword.event;this.activeToasts=this._register(new xn);this.onDidOpenMainWindow=x.map(this.windowsMainService.onDidOpenWindow,y=>y.id),this.onDidTriggerWindowSystemContextMenu=x.any(x.map(this.windowsMainService.onDidTriggerSystemContextMenu,({window:y,x:P,y:T})=>({windowId:y.id,x:P,y:T})),x.map(this.auxiliaryWindowsMainService.onDidTriggerSystemContextMenu,({window:y,x:P,y:T})=>({windowId:y.id,x:P,y:T}))),this.onDidMaximizeWindow=x.any(x.map(this.windowsMainService.onDidMaximizeWindow,y=>y.id),x.map(this.auxiliaryWindowsMainService.onDidMaximizeWindow,y=>y.id)),this.onDidUnmaximizeWindow=x.any(x.map(this.windowsMainService.onDidUnmaximizeWindow,y=>y.id),x.map(this.auxiliaryWindowsMainService.onDidUnmaximizeWindow,y=>y.id)),this.onDidChangeWindowFullScreen=x.any(x.map(this.windowsMainService.onDidChangeFullScreen,y=>({windowId:y.window.id,fullscreen:y.fullscreen})),x.map(this.auxiliaryWindowsMainService.onDidChangeFullScreen,y=>({windowId:y.window.id,fullscreen:y.fullscreen}))),this.onDidChangeWindowAlwaysOnTop=x.any(x.None,x.map(this.auxiliaryWindowsMainService.onDidChangeAlwaysOnTop,y=>({windowId:y.window.id,alwaysOnTop:y.alwaysOnTop}))),this.onDidBlurMainWindow=x.filter(x.fromNodeEventEmitter(Ym,"browser-window-blur",(y,P)=>P.id),y=>!!this.windowsMainService.getWindowById(y)),this.onDidFocusMainWindow=x.any(x.map(x.filter(x.map(this.windowsMainService.onDidChangeWindowsCount,()=>this.windowsMainService.getLastActiveWindow()),y=>!!y),y=>y.id),x.filter(x.fromNodeEventEmitter(Ym,"browser-window-focus",(y,P)=>P.id),y=>!!this.windowsMainService.getWindowById(y))),this.onDidBlurMainOrAuxiliaryWindow=x.any(this.onDidBlurMainWindow,x.map(x.filter(x.fromNodeEventEmitter(Ym,"browser-window-blur",(y,P)=>this.auxiliaryWindowsMainService.getWindowByWebContents(P.webContents)),y=>!!y),y=>y.id)),this.onDidFocusMainOrAuxiliaryWindow=x.any(this.onDidFocusMainWindow,x.map(x.filter(x.fromNodeEventEmitter(Ym,"browser-window-focus",(y,P)=>this.auxiliaryWindowsMainService.getWindowByWebContents(P.webContents)),y=>!!y),y=>y.id)),this.onDidSuspendOS=x.fromNodeEventEmitter(qr,"suspend"),this.onDidResumeOS=x.fromNodeEventEmitter(qr,"resume"),this.onDidChangeOnBatteryPower=x.any(x.map(x.fromNodeEventEmitter(qr,"on-ac"),()=>!1),x.map(x.fromNodeEventEmitter(qr,"on-battery"),()=>!0)),this.onDidChangeThermalState=x.map(x.fromNodeEventEmitter(qr,"thermal-state-change"),y=>y.state),this.onDidChangeSpeedLimit=x.map(x.fromNodeEventEmitter(qr,"speed-limit-change"),y=>y.limit),this.onWillShutdownOS=x.fromNodeEventEmitter(qr,"shutdown"),this.onDidLockScreen=x.fromNodeEventEmitter(qr,"lock-screen"),this.onDidUnlockScreen=x.fromNodeEventEmitter(qr,"unlock-screen"),this.onDidChangeColorScheme=this.themeMainService.onDidChangeColorScheme,this.onDidChangeDisplay=x.debounce(x.any(x.filter(x.fromNodeEventEmitter(Xm,"display-metrics-changed",(y,P,T)=>T),y=>!(Array.isArray(y)&&y.length===1&&y[0]==="workArea")),x.fromNodeEventEmitter(Xm,"display-added"),x.fromNodeEventEmitter(Xm,"display-removed")),()=>{},100)}get windowId(){throw new Error("Not implemented in electron-main")}async getWindows(e,t){let i=this.windowsMainService.getWindows().map(s=>({id:s.id,workspace:s.openedWorkspace??Ds(s.backupPath,s.isExtensionDevelopmentHost),title:s.win?.getTitle()??"",filename:s.getRepresentedFilename(),dirty:s.isDocumentEdited()})),o=[];return t.includeAuxiliaryWindows&&o.push(...this.auxiliaryWindowsMainService.getWindows().map(s=>({id:s.id,parentId:s.parentId,title:s.win?.getTitle()??"",filename:s.getRepresentedFilename()}))),[...i,...o]}async getWindowCount(e){return this.windowsMainService.getWindowCount()}async getActiveWindowId(e){let t=this.windowsMainService.getFocusedWindow()||this.windowsMainService.getLastActiveWindow();if(t)return t.id}async getActiveWindowPosition(){let e=this.windowsMainService.getFocusedWindow()||this.windowsMainService.getLastActiveWindow();if(e)return e.getBounds()}async getNativeWindowHandle(e,t){let i=this.windowById(t,e);if(i?.win)return ee.wrap(i.win.getNativeWindowHandle())}openWindow(e,t,i){return Array.isArray(t)?this.doOpenWindow(e,t,i):this.doOpenEmptyWindow(e,t)}async doOpenWindow(e,t,i=Object.create(null)){t.length>0&&await this.windowsMainService.open({context:5,contextWindowId:e,urisToOpen:t,cli:this.environmentMainService.args,forceNewWindow:i.forceNewWindow,forceReuseWindow:i.forceReuseWindow,preferNewWindow:i.preferNewWindow,diffMode:i.diffMode,mergeMode:i.mergeMode,addMode:i.addMode,removeMode:i.removeMode,gotoLineMode:i.gotoLineMode,noRecentEntry:i.noRecentEntry,waitMarkerFileURI:i.waitMarkerFileURI,remoteAuthority:i.remoteAuthority||void 0,forceProfile:i.forceProfile,forceTempProfile:i.forceTempProfile})}async doOpenEmptyWindow(e,t){await this.windowsMainService.openEmptyWindow({context:5,contextWindowId:e},t)}async openSessionsWindow(e){await this.windowsMainService.openSessionsWindow({context:5,contextWindowId:e})}async isFullScreen(e,t){return this.windowById(t?.targetWindowId,e)?.isFullScreen??!1}async toggleFullScreen(e,t){this.windowById(t?.targetWindowId,e)?.toggleFullScreen()}async getCursorScreenPoint(e){let t=Xm.getCursorScreenPoint(),i=Xm.getDisplayNearestPoint(t);return{point:t,display:i.bounds}}async isMaximized(e,t){return this.windowById(t?.targetWindowId,e)?.win?.isMaximized()??!1}async maximizeWindow(e,t){this.windowById(t?.targetWindowId,e)?.win?.maximize()}async unmaximizeWindow(e,t){this.windowById(t?.targetWindowId,e)?.win?.unmaximize()}async minimizeWindow(e,t){this.windowById(t?.targetWindowId,e)?.win?.minimize()}async moveWindowTop(e,t){this.windowById(t?.targetWindowId,e)?.win?.moveTop()}async isWindowAlwaysOnTop(e,t){return this.windowById(t?.targetWindowId,e)?.win?.isAlwaysOnTop()??!1}async toggleWindowAlwaysOnTop(e,t){let i=this.windowById(t?.targetWindowId,e);i?.win?.setAlwaysOnTop(!i.win.isAlwaysOnTop())}async setWindowAlwaysOnTop(e,t,i){this.windowById(i?.targetWindowId,e)?.win?.setAlwaysOnTop(t)}async positionWindow(e,t,i){let o=this.windowById(i?.targetWindowId,e);if(o?.win){if(o.win.isFullScreen()){let s=x.toPromise(x.once(x.fromNodeEventEmitter(o.win,"leave-full-screen")));o.win.setFullScreen(!1),await s}o.win.setBounds(t)}}async updateWindowControls(e,t){this.windowById(t?.targetWindowId,e)?.updateWindowControls(t)}async updateWindowAccentColor(e,t,i){if(!q)return;let o=this.windowById(e);if(!o)return;let s,a;t==="default"?(s=null,a=null):t==="off"?(s=!1,a=!1):(s=t,a=i??t);let l=[o];for(let c of this.auxiliaryWindowsMainService.getWindows())c.parentId===e&&l.push(c);for(let c of l)c.win?.setAccentColor(c.win.isFocused()?s:a)}async focusWindow(e,t){this.windowById(t?.targetWindowId,e)?.focus({mode:t?.mode??0})}async setMinimumSize(e,t,i){let o=this.codeWindowById(e);if(o?.win){let[s,a]=o.win.getSize(),[l,c]=o.win.getMinimumSize(),[u,p]=[t??l,i??c],[m,h]=[Math.max(s,u),Math.max(a,p)];(l!==u||c!==p)&&o.win.setMinimumSize(u,p),(s!==m||a!==h)&&o.win.setSize(m,h)}}async saveWindowSplash(e,t){let i=this.codeWindowById(e);this.themeMainService.saveWindowSplash(e,i?.openedWorkspace,t)}async setBackgroundThrottling(e,t){let i=this.codeWindowById(e);this.logService.trace(`Setting background throttling for window ${e} to '${t}'`),i?.win?.webContents?.setBackgroundThrottling(t)}async installShellCommandOne(e,t,i,o){let s=ze(t);if(await Er.promises.mkdir(s,{recursive:!0}),q)return this.installShellCommandCmdShim(t,i,s,o);try{let{symbolicLink:a}=await hn.stat(t);if(a&&!a.dangling){let l=await re.realpath(t);if(i===l)return o.addSymlinkDirToPath&&await nl(s,this.productService.nameShort),{success:!0,directoryAddedToPath:s}}await Er.promises.unlink(t)}catch(a){if(a.code!=="ENOENT")throw a}return await this.installShellCommandWithPrivileges(e,i,t,s,o)}async installShellCommandCmdShim(e,t,i,o){let a=`@echo off\r
"${t.replace(/%/g,"%%")}" %*\r
`;try{let l=await Er.promises.readFile(e,"utf8").catch(()=>null);return l===a?(o.addSymlinkDirToPath&&await nl(i,this.productService.nameShort),{success:!0,directoryAddedToPath:i}):(l!==null&&await Er.promises.unlink(e),await Er.promises.writeFile(e,a,"utf8"),o.addSymlinkDirToPath&&await nl(i,this.productService.nameShort),{success:!0,directoryAddedToPath:i})}catch{if(!o.tryOsascriptIfAccessError)return{success:!1,directoryAddedToPath:null};throw new Error(v(2211,null,e))}}async installShellCommandWithPrivileges(e,t,i,o,s){try{return await Er.promises.symlink(t,i),s.addSymlinkDirToPath&&await nl(o,this.productService.nameShort),{success:!0,directoryAddedToPath:o}}catch(a){if(a.code!=="EACCES"&&a.code!=="ENOENT")throw a;if(!s.tryOsascriptIfAccessError)return{success:!1,directoryAddedToPath:null};if(!$)throw new Error(v(2211,null,i));let{response:l}=await this.showMessageBox(e,{type:"info",message:v(2225,null,this.productService.nameShort),buttons:[v(2218,null),v(2210,null)]});if(l===1)throw new Gt;try{let c=`osascript -e "do shell script \\"mkdir -p '${o}' && ln -sf '${t}' '${i}'\\" with administrator privileges"`;await sN(iN)(c)}catch{throw new Error(v(2211,null,i))}return{success:!0,directoryAddedToPath:o}}}async installShellCommand(e){let{symlinkSources:t,binaryPath:i}=await this.getShellCommandLink(),o=[],s=[];for(let{path:a,canFailSilently:l}of t){let c=!s.includes(ze(a)),{success:u,directoryAddedToPath:p}=await this.installShellCommandOne(e,a,i,{addSymlinkDirToPath:c,tryOsascriptIfAccessError:!l});if(u){p&&s.push(p);let m=q?".cmd":"",h=Pe(a);o.push(m&&h.endsWith(m)?h.slice(0,-m.length):h)}}if(o.length===0)throw new Error(v(2216,null,i));return o.join(", ")}async uninstallShellCommandOne(e,t,i){try{await Er.promises.unlink(t)}catch(o){switch(o.code){case"EACCES":{if(!i.tryOsascriptIfAccessError)return{success:!1};if(!$)throw new Error(v(2212,null,t));let{response:s}=await this.showMessageBox(e,{type:"info",message:v(2226,null,this.productService.nameShort),buttons:[v(2218,null),v(2210,null)]});if(s===1)throw new Gt;try{let a=`osascript -e "do shell script \\"rm '${t}'\\" with administrator privileges"`;await sN(iN)(a)}catch{throw new Error(v(2212,null,t))}break}case"ENOENT":break;default:throw o}}return{success:!0}}async uninstallShellCommand(e){let{symlinkSources:t}=await this.getShellCommandLink(),i=[];for(let{path:o,canFailSilently:s}of t){let{success:a}=await this.uninstallShellCommandOne(e,o,{tryOsascriptIfAccessError:!s});if(a){let l=q?".cmd":"",c=Pe(o);i.push(l&&c.endsWith(l)?c.slice(0,-l.length):c)}}if(i.length===0)throw new Error(v(2217,null,t[0].path));return i[0]}async getShellCommandLink(){let e=q?".cmd":"",t=Nt(this.environmentMainService.appRoot,"bin",`${this.productService.applicationName}${e}`),i=Nt(pb(),".codeium","windsurf","bin"),o=this.productService.applicationName,s=eN(o),a=[{path:Nt(i,`${s}${e}`),canFailSilently:!1}];o!==s&&a.push({path:Nt(i,`${o}${e}`),canFailSilently:!0});for(let c of tN(o)){let u=Nt(i,`${c}${e}`);await Er.promises.lstat(u).then(()=>!0,()=>!1)&&a.push({path:u,canFailSilently:!0})}if(this.productService.windsurf_multi_tenant_mode){let c=new Set(a.map(u=>u.path));for(let u of["devin-desktop"]){let p=Nt(i,`${u}${e}`);c.has(p)||a.push({path:p,canFailSilently:!0})}for(let u of["surf","windsurf"]){let p=Nt(i,`${u}${e}`);c.has(p)||await Er.promises.lstat(p).then(()=>!0,()=>!1)&&a.push({path:p,canFailSilently:!0})}}if(!await re.exists(t))throw new Error(v(2221,null,t));return{symlinkSources:a,binaryPath:t}}async installDevinCli(e){let t=q?"devin.exe":"devin",i=Nt(this.environmentMainService.appRoot,"extensions","windsurf","devin","bin"),o=Nt(i,t);if(!await re.exists(o))throw new Error(v(2215,null,this.productService.nameShort));let a=nN(this.productService.applicationName);if(q){let l=Nt(process.env.LOCALAPPDATA||Nt(pb(),"AppData","Local"),"devin","bin");await Er.promises.mkdir(l,{recursive:!0});let c=Nt(l,`${a}.exe`);if(await re.exists(c))throw new Error(v(2214,null,c));await Er.promises.copyFile(o,c),await nl(l,this.productService.nameShort)}else{let l=Nt(pb(),".local","bin");await Er.promises.mkdir(l,{recursive:!0});let c=Nt(l,a);if(await re.exists(c))throw new Error(v(2214,null,c));await Er.promises.symlink(o,c),await nl(l,this.productService.nameShort)}}async showMessageBox(e,t){let i=this.windowById(t?.targetWindowId,e);return this.dialogMainService.showMessageBox(t,i?.win??void 0)}async showSaveDialog(e,t){let i=this.windowById(t?.targetWindowId,e);return this.dialogMainService.showSaveDialog(t,i?.win??void 0)}async showOpenDialog(e,t){let i=this.windowById(t?.targetWindowId,e);return this.dialogMainService.showOpenDialog(t,i?.win??void 0)}async pickFileFolderAndOpen(e,t){let i=await this.dialogMainService.pickFileFolder(t);i&&await this.doOpenPicked(await Promise.all(i.map(async o=>await hn.existsDirectory(o)?{folderUri:A.file(o)}:{fileUri:A.file(o)})),t,e)}async pickFolderAndOpen(e,t){let i=await this.dialogMainService.pickFolder(t);i&&await this.doOpenPicked(i.map(o=>({folderUri:A.file(o)})),t,e)}async pickFileAndOpen(e,t){let i=await this.dialogMainService.pickFile(t);i&&await this.doOpenPicked(i.map(o=>({fileUri:A.file(o)})),t,e)}async pickWorkspaceAndOpen(e,t){let i=await this.dialogMainService.pickWorkspace(t);i&&await this.doOpenPicked(i.map(o=>({workspaceUri:A.file(o)})),t,e)}async doOpenPicked(e,t,i){await this.windowsMainService.open({context:3,contextWindowId:i,cli:this.environmentMainService.args,urisToOpen:e,forceNewWindow:t.forceNewWindow})}async showItemInFolder(e,t){ub.showItemInFolder(t)}async setRepresentedFilename(e,t,i){this.windowById(i?.targetWindowId,e)?.setRepresentedFilename(t)}async setDocumentEdited(e,t,i){this.windowById(i?.targetWindowId,e)?.setDocumentEdited(t)}async openExternal(e,t,i){this.environmentMainService.unsetSnapExportedVariables();try{DS(t,Y.http,Y.https)?this.openExternalBrowser(e,t,i):this.doOpenShellExternal(e,t)}finally{this.environmentMainService.restoreSnapExportedVariables()}return!0}async openExternalBrowser(e,t,i){let o=i??this.configurationService.getValue("workbench.externalBrowser");if(!o)return this.doOpenShellExternal(e,t);if((o.includes(Se.sep)||o.includes(Ct.sep))&&!await re.exists(o))return this.logService.error(`Configured external browser path does not exist: ${o}`),this.doOpenShellExternal(e,t);try{let{default:s,apps:a}=await import("open"),l=await s(t,{app:{name:Object.hasOwn(a,o)?a[o]:o}});q||l.stderr?.once("data",c=>(this.logService.error(`Error openening external URL '${t}' using browser '${o}': ${c.toString()}`),this.doOpenShellExternal(e,t)))}catch(s){return this.logService.error(`Unable to open external URL '${t}' using browser '${o}' due to ${s}.`),this.doOpenShellExternal(e,t)}}async doOpenShellExternal(e,t){try{await ub.openExternal(t)}catch(i){let o,s;DS(t,Y.http,Y.https)?(o=!0,s=v(2219,null)):(o=!1,s=v(2220,null));let{response:a}=await this.dialogMainService.showMessageBox({type:"error",message:s,detail:i.message,buttons:o?[v(2213,null),v(2210,null)]:[v(2218,null)]},this.windowById(e)?.win??void 0);if(a===1)return;this.writeClipboardText(e,t)}}moveItemToTrash(e,t){return ub.trashItem(t)}async isAdmin(){let e;return q?e=(await import("native-is-elevated")).default():e=process.getuid?.()===0,e}async writeElevated(e,t,i,o){let s=await import("@vscode/sudo-prompt"),a=ba(this.environmentMainService.userDataPath,"code-elevated");await re.writeFile(a,JSON.stringify({source:t.fsPath,target:i.fsPath}));try{await new Promise((l,c)=>{let u=[`"${this.cliPath}"`];o?.unlock&&u.push("--file-chmod"),u.push("--file-write",`"${a}"`);let p={name:this.productService.nameLong.replace("-",""),icns:$&&this.environmentMainService.isBuilt?H(ze(this.environmentMainService.appRoot),`${this.productService.nameShort}.icns`):void 0};this.logService.trace(`[sudo-prompt] running command: ${u.join(" ")}`),s.exec(u.join(" "),p,(m,h,E)=>{h&&this.logService.trace(`[sudo-prompt] received stdout: ${h}`),E&&this.logService.error(`[sudo-prompt] received stderr: ${E}`),m?c(m):l(void 0)})})}finally{await Er.promises.unlink(a)}}async isRunningUnderARM64Translation(){return fe||q?!1:Ym.runningUnderARM64Translation}get cliPath(){return q?this.environmentMainService.isBuilt?H(ze(process.execPath),"bin",`${this.productService.applicationName}.cmd`):H(this.environmentMainService.appRoot,"scripts","code-cli.bat"):fe?this.environmentMainService.isBuilt?H(ze(process.execPath),"bin",`${this.productService.applicationName}`):H(this.environmentMainService.appRoot,"scripts","code-cli.sh"):this.environmentMainService.isBuilt?H(this.environmentMainService.appRoot,"bin",`${this.productService.applicationName}`):H(this.environmentMainService.appRoot,"scripts","code-cli.sh")}async getOSStatistics(){return{totalmem:x8(),freemem:P8(),loadavg:C8()}}async getOSProperties(){return{arch:b8(),platform:A8(),release:R8(),type:D8(),cpus:T8()}}async getOSVirtualMachineHint(){return jm.value()}async getOSColorScheme(){return this.themeMainService.getColorScheme()}async hasWSLFeatureInstalled(){return q&&Gk()}async getScreenshot(e,t,i){let a=(await this.windowById(i?.targetWindowId,e)?.win?.webContents.capturePage(t))?.toJPEG(95);return a&&ee.wrap(a)}async getProcessId(e){return this.windowById(void 0,e)?.win?.webContents.getOSProcessId()}async killProcess(e,t,i){process.kill(t,i)}async readClipboardText(e,t){this.logService.trace(`readClipboardText in window ${e} with type:`,t);let i=Qo.readText(t);return this.logService.trace("clipboardText.length :",i.length),i}async triggerPaste(e,t){return this.logService.trace(`Triggering paste in window ${e} with options:`,t),this.windowById(t?.targetWindowId,e)?.win?.webContents.paste()??Promise.resolve()}async readImage(){return Qo.readImage().toPNG()}async writeImage(e,t){Qo.writeImage(_8.createFromBuffer(Buffer.from(t.buffer)))}async writeClipboardText(e,t,i){return Qo.writeText(t,i)}async readClipboardFindText(e){return Qo.readFindText()}async writeClipboardFindText(e,t){return Qo.writeFindText(t)}async writeClipboardBuffer(e,t,i,o){return Qo.writeBuffer(t,Buffer.from(i.buffer),o)}async readClipboardBuffer(e,t){return ee.wrap(Qo.readBuffer(t))}async hasClipboard(e,t,i){return Qo.has(t,i)}async newWindowTab(){await this.windowsMainService.open({context:5,cli:this.environmentMainService.args,forceNewTabbedWindow:!0,forceEmpty:!0,remoteAuthority:this.environmentMainService.args.remote||void 0})}async showPreviousWindowTab(){Qm.sendActionToFirstResponder("selectPreviousTab:")}async showNextWindowTab(){Qm.sendActionToFirstResponder("selectNextTab:")}async moveWindowTabToNewWindow(){Qm.sendActionToFirstResponder("moveTabToNewWindow:")}async mergeAllWindowTabs(){Qm.sendActionToFirstResponder("mergeAllWindows:")}async toggleWindowTabsBar(){Qm.sendActionToFirstResponder("toggleTabBar:")}async updateTouchBar(e,t){this.codeWindowById(e)?.updateTouchBar(t)}async notifyReady(e){this.codeWindowById(e)?.setReady()}async relaunch(e,t){return this.lifecycleMainService.relaunch(t)}async reload(e,t){let i=this.codeWindowById(e);if(i){if(yt(i.openedWorkspace)){let o=i.openedWorkspace.configPath;if(o.scheme===Y.file&&(await this.workspacesManagementMainService.resolveLocalWorkspace(o))?.transient)return this.openWindow(i.id,{forceReuseWindow:!0})}return this.lifecycleMainService.reload(i,t?.disableExtensions!==void 0?{_:[],"disable-extensions":t.disableExtensions}:void 0)}}async closeWindow(e,t){return this.windowById(t?.targetWindowId,e)?.win?.close()}async quit(e){let t=this.windowsMainService.getLastActiveWindow();t?.isExtensionDevelopmentHost&&this.windowsMainService.getWindowCount()>1&&t.win?t.win.close():this.lifecycleMainService.quit()}async exit(e,t){await this.lifecycleMainService.kill(t)}async resolveProxy(e,t){return this.codeWindowById(e)?.win?.webContents?.session?.resolveProxy(t)}async lookupAuthorization(e,t){return this.proxyAuthService.lookupAuthorization(t)}async lookupKerberosAuthorization(e,t){return this.requestService.lookupKerberosAuthorization(t)}async loadCertificates(e){return this.requestService.loadCertificates()}isPortFree(e,t){return Wk(t,1e3)}findFreePort(e,t,i,o,s=1){return Fk(t,i,o,s)}async openDevTools(e,t){this.windowById(t?.targetWindowId,e)?.win?.webContents.openDevTools(t?.mode?{mode:t.mode,activate:t.activate}:void 0)}async toggleDevTools(e,t){this.windowById(t?.targetWindowId,e)?.win?.webContents.toggleDevTools()}async openDevToolsWindow(e,t){let i=this.codeWindowById(e);i&&this.openChildWindow(i.win,t)}openChildWindow(e,t,i={}){let s={...this.instantiationService.invokeFunction(Nc,io(),{forceNativeTitlebar:!0}),parent:e??void 0,...i},a=new av(s);return a.setMenuBarVisibility(!1),a.loadURL(t),a.once("ready-to-show",()=>a.show()),a}async openGPUInfoWindow(e){let t=this.codeWindowById(e);if(t){if(typeof this.gpuInfoWindowId!="number"){let i=this.openChildWindow(t.win,"chrome://gpu");i.once("close",()=>this.gpuInfoWindowId=void 0),this.gpuInfoWindowId=i.id}if(typeof this.gpuInfoWindowId=="number"){let i=av.fromId(this.gpuInfoWindowId);i?.isMinimized()&&i?.restore(),i?.focus()}}}async openContentTracingWindow(){if(typeof this.contentTracingWindowId!="number"){let e=this.openChildWindow(null,"chrome://tracing",{paintWhenInitiallyHidden:!1,webPreferences:{backgroundThrottling:!1}});e.webContents.once("did-finish-load",async()=>{await e.webContents.executeJavaScript(`
					window.prompt = () => '';
					null
				`),e.show()}),e.once("close",()=>this.contentTracingWindowId=void 0),this.contentTracingWindowId=e.id}if(typeof this.contentTracingWindowId=="number"){let e=av.fromId(this.contentTracingWindowId);e?.isMinimized()&&e?.restore(),e?.focus()}}async stopTracing(e){if(!this.environmentMainService.args.trace)return;let t=await S8.stopRecording(`${ba(this.environmentMainService.userHome.fsPath,this.productService.applicationName)}.trace.txt`);await this.dialogMainService.showMessageBox({type:"info",message:v(2223,null),detail:v(2222,null,t),buttons:[v(2224,null)]},av.getFocusedWindow()??void 0),this.showItemInFolder(void 0,t)}async profileRenderer(e,t,i){let o=this.codeWindowById(e);if(!o?.win)throw new Error;return await new fd(o.win,t,this.logService).inspect(i)}async showToast(e,t){if(!oN.isSupported())return{supported:!1,clicked:!1};let i=new oN({title:t.title,body:t.body,silent:t.silent,actions:t.actions?.map(a=>({type:"button",text:a}))}),o=new ue;this.activeToasts.set(t.id,o);let s=new st;return o.add(oe(()=>{this.activeToasts.deleteAndDispose(t.id),i.removeAllListeners(),i.close(),s.dispose(!0)})),new Promise(a=>{let l=c=>{a(c),o.dispose()};o.add(s.token.onCancellationRequested(()=>l({supported:!0,clicked:!1}))),i.on("click",()=>l({supported:!0,clicked:!0})),i.on("action",(c,u)=>l({supported:!0,clicked:!0,actionIndex:u})),i.on("close",()=>l({supported:!0,clicked:!1})),i.on("failed",()=>l({supported:!1,clicked:!1})),i.show()})}async clearToast(e,t){this.activeToasts.deleteAndDispose(t)}async clearToasts(){this.activeToasts.clearAndDisposeAll()}async windowsGetStringRegKey(e,t,i,o){if(!q)return;let s=await import("@vscode/windows-registry");try{return s.GetStringRegKey(t,i,o)}catch{return}}async createZipFile(e,t,i){await Kk(t.fsPath,i)}async getSystemIdleState(e,t){return qr.getSystemIdleState(t)}async getSystemIdleTime(e){return qr.getSystemIdleTime()}async getCurrentThermalState(e){return qr.getCurrentThermalState()}async isOnBatteryPower(e){return qr.isOnBatteryPower()}async startPowerSaveBlocker(e,t){return db.start(t)}async stopPowerSaveBlocker(e,t){return db.stop(t)}async isPowerSaveBlockerStarted(e,t){return db.isStarted(t)}windowById(e,t){return this.codeWindowById(e)??this.auxiliaryWindowById(e)??this.codeWindowById(t)}codeWindowById(e){if(typeof e=="number")return this.windowsMainService.getWindowById(e)}auxiliaryWindowById(e){if(typeof e!="number")return;let t=w8.fromId(e);if(t)return this.auxiliaryWindowsMainService.getWindowByWebContents(t)}};D([ye],rl.prototype,"cliPath",1),rl=D([S(0,Ke),S(1,Jr),S(2,Hr),S(3,Te),S(4,Fe),S(5,z),S(6,He),S(7,so),S(8,kr),S(9,Ae),S(10,ii),S(11,Tm),S(12,rn)],rl)});var pe,Qs,Xo=_(()=>{qe();de();pe={Uninitialized:{type:"uninitialized"},Disabled:r=>({type:"disabled",reason:r}),Idle:(r,n)=>({type:"idle",updateType:r,error:n}),CheckingForUpdates:r=>({type:"checking for updates",explicit:r}),AvailableForDownload:r=>({type:"available for download",update:r}),Downloading:(r,n,e,t,i,o)=>({type:"downloading",update:r,explicit:n,overwrite:e,downloadedBytes:t,totalBytes:i,startTime:o}),Downloaded:(r,n,e)=>({type:"downloaded",update:r,explicit:n,overwrite:e}),Updating:(r,n,e)=>({type:"updating",update:r,currentProgress:n,maxProgress:e}),Ready:(r,n,e)=>({type:"ready",update:r,explicit:n,overwrite:e}),Overwriting:(r,n)=>({type:"overwriting",update:r,explicit:n})},Qs=V("updateService")});import{app as il}from"electron";var Xs,Fn,Zm=_(()=>{dn();Ce();ae();Uo();te();at();ce();Ut();Ie();pn();We();de();Vt();me();Ba();bm();SI();Ln();Bs();er();Ka();$t();Xs=V("workspacesHistoryMainService"),Fn=class extends M{constructor(e,t,i,o,s,a){super();this.logService=e;this.workspacesManagementMainService=t;this.lifecycleMainService=i;this.applicationStorageMainService=o;this.dialogMainService=s;this.environmentMainService=a;this._onDidChangeRecentlyOpened=this._register(new C);this.onDidChangeRecentlyOpened=this._onDidChangeRecentlyOpened.event;this.macOSRecentDocumentsUpdater=this._register(new Jn(800));this.registerListeners()}static{this.MAX_TOTAL_RECENT_ENTRIES=500}static{this.RECENTLY_OPENED_STORAGE_KEY="history.recentlyOpenedPathsList"}registerListeners(){this.lifecycleMainService.when(4).then(()=>this.handleWindowsJumpList()),this._register(this.workspacesManagementMainService.onDidEnterWorkspace(e=>this.addRecentlyOpened([{workspace:e.workspace,remoteAuthority:e.window.remoteAuthority}])))}async addRecentlyOpened(e){let t=[],i=[];for(let s of e)if(yI(s))!this.workspacesManagementMainService.isUntitledWorkspace(s.workspace)&&!this.containsWorkspace(t,s.workspace)&&t.push(s);else if(Om(s))this.containsFolder(t,s.folderUri)||t.push(s);else{let a=this.containsFile(i,s.fileUri),l=s.fileUri.scheme===Y.file&&Fn.COMMON_FILES_FILTER.indexOf(pr(s.fileUri))>=0;!a&&!l&&(i.push(s),q&&s.fileUri.scheme===Y.file&&!this.environmentMainService.isPortable&&il.addRecentDocument(s.fileUri.fsPath))}let o=await this.mergeEntriesFromStorage({workspaces:t,files:i});t=o.workspaces,i=o.files,t.length>Fn.MAX_TOTAL_RECENT_ENTRIES&&(t.length=Fn.MAX_TOTAL_RECENT_ENTRIES),i.length>Fn.MAX_TOTAL_RECENT_ENTRIES&&(i.length=Fn.MAX_TOTAL_RECENT_ENTRIES),await this.saveRecentlyOpened({workspaces:t,files:i}),this._onDidChangeRecentlyOpened.fire(),$&&!this.environmentMainService.isPortable&&this.macOSRecentDocumentsUpdater.trigger(()=>this.updateMacOSRecentDocuments())}async removeRecentlyOpened(e){let t=a=>{let l=this.location(a);for(let c of e)if(lt.isEqual(c,l))return!1;return!0},i=await this.getRecentlyOpened(),o=i.workspaces.filter(t),s=i.files.filter(t);(o.length!==i.workspaces.length||s.length!==i.files.length)&&(await this.saveRecentlyOpened({files:s,workspaces:o}),this._onDidChangeRecentlyOpened.fire(),$&&!this.environmentMainService.isPortable&&this.macOSRecentDocumentsUpdater.trigger(()=>this.updateMacOSRecentDocuments()))}async clearRecentlyOpened(e){if(e?.confirm){let{response:t}=await this.dialogMainService.showMessageBox({type:"warning",buttons:[v(2756,null),v(2755,null)],message:v(2758,null),detail:v(2757,null),cancelId:1});if(t!==0)return}await this.saveRecentlyOpened({workspaces:[],files:[]}),this.environmentMainService.isPortable||il.clearRecentDocuments(),this._onDidChangeRecentlyOpened.fire()}async getRecentlyOpened(){return this.mergeEntriesFromStorage()}async mergeEntriesFromStorage(e){let t=new Lt(s=>lt.getComparisonKey(s));if(e?.workspaces)for(let s of e.workspaces)t.set(this.location(s),s);let i=new Lt(s=>lt.getComparisonKey(s));if(e?.files)for(let s of e.files)i.set(this.location(s),s);let o=await this.getRecentlyOpenedFromStorage();for(let s of o.workspaces){let a=t.get(this.location(s));a?a.label=a.label??s.label:t.set(this.location(s),s)}for(let s of o.files){let a=i.get(this.location(s));a?a.label=a.label??s.label:i.set(this.location(s),s)}return{workspaces:[...t.values()],files:[...i.values()]}}async getRecentlyOpenedFromStorage(){await this.applicationStorageMainService.whenReady;let e,t=this.applicationStorageMainService.get(Fn.RECENTLY_OPENED_STORAGE_KEY,-1);if(typeof t=="string")try{e=JSON.parse(t)}catch(i){this.logService.error("Unexpected error parsing opened paths list",i)}return u0(e,this.logService)}async saveRecentlyOpened(e){await this.applicationStorageMainService.whenReady,this.applicationStorageMainService.store(Fn.RECENTLY_OPENED_STORAGE_KEY,JSON.stringify(p0(e)),-1,1)}location(e){return Om(e)?e.folderUri:o0(e)?e.fileUri:e.workspace.configPath}containsWorkspace(e,t){return!!e.find(i=>yI(i)&&i.workspace.id===t.id)}containsFolder(e,t){return!!e.find(i=>Om(i)&&lt.isEqual(i.folderUri,t))}containsFile(e,t){return!!e.find(i=>lt.isEqual(i.fileUri,t))}static{this.MAX_MACOS_DOCK_RECENT_WORKSPACES=7}static{this.MAX_MACOS_DOCK_RECENT_ENTRIES_TOTAL=10}static{this.MAX_WINDOWS_JUMP_LIST_ENTRIES=7}static{this.COMMON_FILES_FILTER=["COMMIT_EDITMSG","MERGE_MSG","git-rebase-todo"]}async handleWindowsJumpList(){q&&(this.environmentMainService.isPortable||(await this.updateWindowsJumpList(),this._register(this.onDidChangeRecentlyOpened(()=>this.updateWindowsJumpList()))))}async updateWindowsJumpList(){if(!q)return;let e=[];if(e.push({type:"tasks",items:[{type:"task",title:v(2759,null),description:v(2760,null),program:process.execPath,args:"-n",iconPath:process.execPath,iconIndex:0}]}),(await this.getRecentlyOpened()).workspaces.length>0){let t=[];for(let s of il.getJumpListSettings().removedItems){let a=s.args;if(a){let l=/^--(folder|file)-uri\s+"([^"]+)"$/.exec(a);l&&t.push(A.parse(l[2]))}}await this.removeRecentlyOpened(t);let i=!1,o=wt((await this.getRecentlyOpened()).workspaces.slice(0,Fn.MAX_WINDOWS_JUMP_LIST_ENTRIES).map(s=>{let a=yI(s)?s.workspace:s.folderUri,{title:l,description:c}=this.getWindowsJumpListLabel(a,s.label),u;return A.isUri(a)?u=`--folder-uri "${a.toString()}"`:(i=!0,u=`--file-uri "${a.configPath.toString()}"`),{type:"task",title:l.substr(0,255),description:c.substr(0,255),program:process.execPath,args:u,iconPath:"explorer.exe",iconIndex:0}}));o.length>0&&e.push({type:"custom",name:i?v(2762,null):v(2761,null),items:o})}e.push({type:"recent"});try{let t=il.setJumpList(e);t&&t!=="ok"&&this.logService.warn(`updateWindowsJumpList#setJumpList unexpected result: ${t}`)}catch(t){this.logService.warn("updateWindowsJumpList#setJumpList",t)}}getWindowsJumpListLabel(e,t){if(t)return{title:SD(t).name,description:t};if(A.isUri(e))return{title:pr(e),description:this.renderJumpListPathDescription(e)};if(this.workspacesManagementMainService.isUntitledWorkspace(e))return{title:v(2763,null),description:""};let i=pr(e.configPath);return i.endsWith(gm)&&(i=i.substr(0,i.length-gm.length-1)),{title:v(2764,null,i),description:this.renderJumpListPathDescription(e.configPath)}}renderJumpListPathDescription(e){return e.scheme==="file"?Mp(e.fsPath):e.toString()}async updateMacOSRecentDocuments(){if(!$)return;il.clearRecentDocuments();let e=await this.getRecentlyOpened(),t=[],i=0;for(let s=0;s<e.workspaces.length&&i<Fn.MAX_MACOS_DOCK_RECENT_WORKSPACES;s++){let a=this.location(e.workspaces[s]);if(a.scheme===Y.file){let l=Dn(a);await re.exists(l)&&(t.push(l),i++)}}let o=[];for(let s=0;s<e.files.length&&i<Fn.MAX_MACOS_DOCK_RECENT_ENTRIES_TOTAL;s++){let a=this.location(e.files[s]);if(a.scheme===Y.file){let l=Dn(a);if(Fn.COMMON_FILES_FILTER.includes(pr(a))||t.includes(l))continue;await re.exists(l)&&(o.push(l),i++)}}o.reverse().forEach(s=>il.addRecentDocument(s)),t.reverse().forEach(s=>il.addRecentDocument(s))}};Fn=D([S(0,z),S(1,kr),S(2,Te),S(3,Fs),S(4,Hr),S(5,Fe)],Fn)});var ef,mb=_(()=>{de();ef=V("windsurfKeybindingMainService")});import{app as O8,BrowserWindow as lv,dialog as k8,Menu as fn,MenuItem as pt}from"electron";function $o(){return new pt({type:"separator"})}var cv,Zo,aN=_(()=>{Ce();Bt();Uo();ce();Ie();We();za();_t();$t();Vt();me();Ok();$m();In();vr();Tn();Xo();qo();zt();Zm();te();mb();cv="menu",Zo=class extends M{constructor(e,t,i,o,s,a,l,c,u,p,m,h,E){super();this.updateService=e;this.configurationService=t;this.windowsMainService=i;this.environmentMainService=o;this.telemetryService=s;this.workspacesHistoryMainService=a;this.stateService=l;this.lifecycleMainService=c;this.logService=u;this.nativeHostMainService=p;this.productService=m;this.auxiliaryWindowsMainService=h;this.windsurfKeybindingMainService=E;this.fallbackMenuHandlers=Object.create(null);this.menuUpdater=this._register(new On(()=>this.doUpdateMenu(),0)),this.menuGC=this._register(new On(()=>{this.oldMenus=[]},1e4)),this.menubarMenus=Object.create(null),this.keybindings=Object.create(null),this.showNativeMenu=D_(t),($||this.showNativeMenu)&&this.restoreCachedMenubarData(),this.addFallbackHandlers(),this.closedLastWindow=!1,this.noActiveMainWindow=!1,this.oldMenus=[],this.install(),this.registerListeners()}static{this.lastKnownMenubarStorageKey="lastKnownMenubarData"}restoreCachedMenubarData(){let e=this.stateService.getItem(Zo.lastKnownMenubarStorageKey);e&&(e.menus&&(this.menubarMenus=e.menus),e.keybindings&&(this.keybindings=e.keybindings))}addFallbackHandlers(){this.fallbackMenuHandlers["workbench.action.files.newUntitledFile"]=(a,l,c)=>{this.runActionInRenderer({type:"commandId",commandId:"workbench.action.files.newUntitledFile"})||this.windowsMainService.openEmptyWindow({context:2,contextWindowId:l?.id})},this.fallbackMenuHandlers["workbench.action.newWindow"]=(a,l,c)=>this.windowsMainService.openEmptyWindow({context:2,contextWindowId:l?.id}),this.fallbackMenuHandlers["workbench.action.files.openFileFolder"]=(a,l,c)=>this.nativeHostMainService.pickFileFolderAndOpen(void 0,{forceNewWindow:this.isOptionClick(c),telemetryExtraData:{from:cv}}),this.fallbackMenuHandlers["workbench.action.files.openFolder"]=(a,l,c)=>this.nativeHostMainService.pickFolderAndOpen(void 0,{forceNewWindow:this.isOptionClick(c),telemetryExtraData:{from:cv}}),this.fallbackMenuHandlers["workbench.action.openWorkspace"]=(a,l,c)=>this.nativeHostMainService.pickWorkspaceAndOpen(void 0,{forceNewWindow:this.isOptionClick(c),telemetryExtraData:{from:cv}}),this.fallbackMenuHandlers["workbench.action.clearRecentFiles"]=()=>this.workspacesHistoryMainService.clearRecentlyOpened({confirm:!0});let e=this.productService.youTubeUrl;e&&(this.fallbackMenuHandlers["workbench.action.openYouTubeUrl"]=()=>this.openUrl(e,"openYouTubeUrl"));let t=this.productService.requestFeatureUrl;t&&(this.fallbackMenuHandlers["workbench.action.openRequestFeatureUrl"]=()=>this.openUrl(t,"openUserVoiceUrl"));let i=this.productService.reportIssueUrl;i&&(this.fallbackMenuHandlers["workbench.action.openIssueReporter"]=()=>this.openUrl(i,"openReportIssues"));let o=this.productService.licenseUrl;o&&(this.fallbackMenuHandlers["workbench.action.openLicenseUrl"]=()=>{if(Ur){let a=o.indexOf("?")>0?"&":"?";this.openUrl(`${o}${a}lang=${Ur}`,"openLicenseUrl")}else this.openUrl(o,"openLicenseUrl")});let s=this.productService.privacyStatementUrl;s&&o&&(this.fallbackMenuHandlers["workbench.action.openPrivacyStatementUrl"]=()=>{this.openUrl(s,"openPrivacyStatement")})}registerListeners(){this._register(this.lifecycleMainService.onWillShutdown(()=>this.willShutdown=!0)),this._register(this.windowsMainService.onDidChangeWindowsCount(e=>this.onDidChangeWindowsCount(e))),this._register(this.nativeHostMainService.onDidBlurMainWindow(()=>this.onDidChangeWindowFocus())),this._register(this.nativeHostMainService.onDidFocusMainWindow(()=>this.onDidChangeWindowFocus()))}get currentEnableMenuBarMnemonics(){let e=this.configurationService.getValue("window.enableMenuBarMnemonics");return typeof e!="boolean"?!0:e}get currentEnableNativeTabs(){if(!$)return!1;let e=this.configurationService.getValue("window.nativeTabs");return typeof e!="boolean"?!1:e}updateMenu(e,t){this.menubarMenus=e.menus,this.keybindings=e.keybindings,this.stateService.setItem(Zo.lastKnownMenubarStorageKey,e),this.scheduleUpdateMenu()}scheduleUpdateMenu(){this.menuUpdater.schedule()}doUpdateMenu(){this.willShutdown||setTimeout(()=>{this.willShutdown||this.install()},10)}onDidChangeWindowsCount(e){$&&(e.oldCount===0&&e.newCount>0||e.oldCount>0&&e.newCount===0)&&(this.closedLastWindow=e.newCount===0,this.scheduleUpdateMenu())}onDidChangeWindowFocus(){if(!$)return;let e=lv.getFocusedWindow();this.noActiveMainWindow=!e||!!this.auxiliaryWindowsMainService.getWindowByWebContents(e.webContents),this.scheduleUpdateMenu()}install(){let e=fn.getApplicationMenu();if(e&&this.oldMenus.push(e),Object.keys(this.menubarMenus).length===0){this.doSetApplicationMenu($?new fn:null);return}let t=new fn,i;if($){let s=new fn;i=new pt({label:this.productService.nameShort,submenu:s}),this.setMacApplicationMenu(s),t.append(i)}if($&&!this.appMenuInstalled){this.appMenuInstalled=!0;let s=new fn;s.append(new pt({label:this.mnemonicLabel(v(2183,null)),click:()=>this.windowsMainService.openEmptyWindow({context:1})})),O8.dock.setMenu(s)}if(this.shouldDrawMenu("File")){let s=new fn,a=new pt({label:this.mnemonicLabel(v(2172,null)),submenu:s});this.setMenuById(s,"File"),t.append(a)}if(this.shouldDrawMenu("Edit")){let s=new fn,a=new pt({label:this.mnemonicLabel(v(2171,null)),submenu:s});this.setMenuById(s,"Edit"),t.append(a)}if(this.shouldDrawMenu("Selection")){let s=new fn,a=new pt({label:this.mnemonicLabel(v(2193,null)),submenu:s});this.setMenuById(s,"Selection"),t.append(a)}if(this.shouldDrawMenu("View")){let s=new fn,a=new pt({label:this.mnemonicLabel(v(2199,null)),submenu:s});this.setMenuById(s,"View"),t.append(a)}if(this.shouldDrawMenu("Go")){let s=new fn,a=new pt({label:this.mnemonicLabel(v(2173,null)),submenu:s});this.setMenuById(s,"Go"),t.append(a)}if(this.shouldDrawMenu("Run")){let s=new fn,a=new pt({label:this.mnemonicLabel(v(2192,null)),submenu:s});this.setMenuById(s,"Run"),t.append(a)}if(this.shouldDrawMenu("Terminal")){let s=new fn,a=new pt({label:this.mnemonicLabel(v(2198,null)),submenu:s});this.setMenuById(s,"Terminal"),t.append(a)}let o;if(this.shouldDrawMenu("Window")){let s=new fn;o=new pt({label:this.mnemonicLabel(v(2200,null)),submenu:s,role:"window"}),this.setMacWindowMenu(s)}if(o&&t.append(o),this.shouldDrawMenu("Help")){let s=new fn,a=new pt({label:this.mnemonicLabel(v(2174,null)),submenu:s,role:"help"});this.setMenuById(s,"Help"),t.append(a)}t.items&&t.items.length>0?this.doSetApplicationMenu(t):this.doSetApplicationMenu(null),this.menuGC.schedule()}doSetApplicationMenu(e){if(fn.setApplicationMenu(e),e)for(let t of this.auxiliaryWindowsMainService.getWindows())t.win?.setMenu(null)}setMacApplicationMenu(e){let t=this.createMenuItem(v(2169,null,this.productService.nameLong),"workbench.action.showAboutDialog"),i=this.getUpdateMenuItems(),o;if(this.shouldDrawMenu("Preferences")){let h=new fn;this.setMenuById(h,"Preferences"),o=new pt({label:this.mnemonicLabel(v(2184,null)),submenu:h})}let s=new fn,a=new pt({label:v(2194,null),role:"services",submenu:s}),l=new pt({label:v(2175,null,this.productService.nameLong),role:"hide",accelerator:"Command+H"}),c=new pt({label:v(2176,null),role:"hideOthers",accelerator:"Command+Alt+H"}),u=new pt({label:v(2195,null),role:"unhide"}),p=new pt(this.likeAction("workbench.action.quit",{label:v(2185,null,this.productService.nameLong),click:async(h,E,y)=>{let P=this.windowsMainService.getLastActiveWindow();(this.windowsMainService.getWindowCount()===0||lv.getFocusedWindow()||P?.win?.isMinimized())&&await this.confirmBeforeQuit(y)&&this.nativeHostMainService.quit(void 0)}})),m=[t];m.push(...i),o&&m.push($o(),o),m.push($o(),a,$o(),l,c,u,$o(),p),m.forEach(h=>e.append(h))}async confirmBeforeQuit(e){if(this.windowsMainService.getWindowCount()===0)return!0;let t=this.configurationService.getValue("window.confirmBeforeClose");if(t==="always"||t==="keyboardOnly"&&this.isKeyboardEvent(e)){let{response:i}=await this.nativeHostMainService.showMessageBox(this.windowsMainService.getFocusedWindow()?.id,{type:"question",buttons:[$?v(2202,null):v(2168,null),v(2165,null)],message:$?v(2204,null):v(2203,null)});return i===0}return!0}shouldDrawMenu(e){if(!$&&!this.showNativeMenu)return!1;switch(e){case"File":case"Help":if($)return this.windowsMainService.getWindowCount()===0&&this.closedLastWindow||this.windowsMainService.getWindowCount()>0&&this.noActiveMainWindow||!!this.menubarMenus&&!!this.menubarMenus[e];case"Window":if($)return this.windowsMainService.getWindowCount()===0&&this.closedLastWindow||this.windowsMainService.getWindowCount()>0&&this.noActiveMainWindow||!!this.menubarMenus;default:return this.windowsMainService.getWindowCount()>0&&!!this.menubarMenus&&!!this.menubarMenus[e]}}setMenu(e,t){t.forEach(i=>{if($w(i))e.append($o());else if(Xw(i)){let o=new fn,s=new pt({label:this.mnemonicLabel(i.label),submenu:o});this.setMenu(o,i.submenu.items),e.append(s)}else Zw(i)?e.append(this.createOpenRecentMenuItem(i)):Dk(i)&&(i.id==="workbench.action.showAboutDialog"&&this.insertCheckForUpdatesItems(e),$?this.windowsMainService.getWindowCount()===0&&this.closedLastWindow||this.windowsMainService.getWindowCount()>0&&this.noActiveMainWindow?this.fallbackMenuHandlers[i.id]?e.append(new pt(this.likeAction(i.id,{label:this.mnemonicLabel(i.label),click:this.fallbackMenuHandlers[i.id]}))):e.append(this.createMenuItem(i.label,i.id,!1,i.checked)):e.append(this.createMenuItem(i.label,i.id,i.enabled!==!1,!!i.checked)):e.append(this.createMenuItem(i.label,i.id,i.enabled!==!1,!!i.checked)))})}setMenuById(e,t){this.menubarMenus?.[t]&&this.setMenu(e,this.menubarMenus[t].items)}insertCheckForUpdatesItems(e){let t=this.getUpdateMenuItems();t.length&&(t.forEach(i=>e.append(i)),e.append($o()))}createOpenRecentMenuItem(e){let t=A.revive(e.uri),i=e.id,o=i==="openRecentFile"?{fileUri:t}:i==="openRecentWorkspace"?{workspaceUri:t}:{folderUri:t};return new pt(this.likeAction(i,{label:e.label,click:async(s,a,l)=>{let c=this.isOptionClick(l);(await this.windowsMainService.open({context:2,cli:this.environmentMainService.args,urisToOpen:[o],forceNewWindow:c,gotoLineMode:!1,remoteAuthority:e.remoteAuthority})).length>0||await this.workspacesHistoryMainService.removeRecentlyOpened([t])}},!1))}isOptionClick(e){return!!(e&&(!$&&(e.ctrlKey||e.shiftKey)||$&&(e.metaKey||e.altKey)))}isKeyboardEvent(e){return!!(e.triggeredByAccelerator||e.altKey||e.ctrlKey||e.metaKey||e.shiftKey)}createRoleMenuItem(e,t,i){let o={label:this.mnemonicLabel(e),role:i,enabled:!0};return new pt(this.withKeybinding(t,o))}setMacWindowMenu(e){let t=new pt({label:v(2189,null),role:"minimize",accelerator:"Command+M",enabled:this.windowsMainService.getWindowCount()>0}),i=new pt({label:v(2201,null),role:"zoom",enabled:this.windowsMainService.getWindowCount()>0}),o=new pt({label:v(2170,null),role:"front",enabled:this.windowsMainService.getWindowCount()>0}),s=this.createMenuItem(v(2187,null),"workbench.action.switchWindow"),a=[];this.currentEnableNativeTabs&&(a.push($o()),a.push(this.createMenuItem(v(2191,null),"workbench.action.newWindowTab")),a.push(this.createRoleMenuItem(v(2197,null),"workbench.action.showPreviousWindowTab","selectPreviousTab")),a.push(this.createRoleMenuItem(v(2196,null),"workbench.action.showNextWindowTab","selectNextTab")),a.push(this.createRoleMenuItem(v(2190,null),"workbench.action.moveWindowTabToNewWindow","moveTabToNewWindow")),a.push(this.createRoleMenuItem(v(2188,null),"workbench.action.mergeAllWindowTabs","mergeAllWindows"))),[t,i,$o(),s,...a,$o(),o].forEach(l=>e.append(l))}getUpdateMenuItems(){let e=this.updateService.state;switch(e.type){case"idle":return[new pt({label:this.mnemonicLabel(v(2177,null)),click:()=>setTimeout(()=>{this.reportMenuActionTelemetry("CheckForUpdate"),this.updateService.checkForUpdates(!0)},0)})];case"checking for updates":return[new pt({label:v(2178,null),enabled:!1})];case"available for download":return[new pt({label:this.mnemonicLabel(v(2180,null)),click:()=>{this.updateService.downloadUpdate(!0)}})];case"downloading":case"overwriting":return[new pt({label:v(2179,null),enabled:!1})];case"downloaded":return $?[]:[new pt({label:this.mnemonicLabel(v(2182,null)),click:async()=>{this.reportMenuActionTelemetry("InstallUpdate"),!this.runActionInRenderer({type:"commandId",commandId:"update.install"})&&await this.confirmUpdateInMainProcess(e.update)&&this.updateService.applyUpdate()}})];case"updating":return[new pt({label:v(2181,null),enabled:!1})];case"ready":return[new pt({label:this.mnemonicLabel(e.update.restartUpdateMessage||v(2186,null)),click:async()=>{this.reportMenuActionTelemetry("RestartToUpdate"),!this.runActionInRenderer({type:"commandId",commandId:"update.restart"})&&await this.confirmUpdateInMainProcess(e.update)&&this.updateService.quitAndInstall()}})];default:return[]}}createMenuItem(e,t,i,o){let s=this.mnemonicLabel(e),a=(p,m,h)=>{let E=p?p.userSettingsLabel:null;E&&h.triggeredByAccelerator?(this.windsurfKeybindingMainService.setIsMenuAction(E,!0),this.runActionInRenderer({type:"keybinding",userSettingsLabel:E})):this.runActionInRenderer({type:"commandId",commandId:t})},l=typeof i=="boolean"?i:this.windowsMainService.getWindowCount()>0,c=typeof o=="boolean"?o:!1,u={label:s,click:a,enabled:l};return c&&(u.type="checkbox",u.checked=c),$&&(t==="editor.action.clipboardCutAction"?u.role="cut":t==="editor.action.clipboardCopyAction"?u.role="copy":t==="editor.action.clipboardPasteAction"&&(u.role="paste"),t==="undo"?u.click=this.makeContextAwareClickHandler(a,{inDevTools:p=>p.undo(),inNoWindow:()=>fn.sendActionToFirstResponder("undo:")}):t==="redo"?u.click=this.makeContextAwareClickHandler(a,{inDevTools:p=>p.redo(),inNoWindow:()=>fn.sendActionToFirstResponder("redo:")}):t==="editor.action.selectAll"&&(u.click=this.makeContextAwareClickHandler(a,{inDevTools:p=>p.selectAll(),inNoWindow:()=>fn.sendActionToFirstResponder("selectAll:")}))),new pt(this.withKeybinding(t,u))}makeContextAwareClickHandler(e,t){return(i,o,s)=>{let a=lv.getFocusedWindow();if(!a)return t.inNoWindow();if(a.webContents.isDevToolsFocused()&&a.webContents.devToolsWebContents)return t.inDevTools(a.webContents.devToolsWebContents);if(!a.webContents.isFocused())return t.inNoWindow();e(i,o||a,s)}}async confirmUpdateInMainProcess(e){let t=e.restartUpdateMessage?e.restartUpdateConfirmationMessage:void 0;if(!t)return!0;let i=v(2167,null),o=v(2166,null);return(await k8.showMessageBox({type:"warning",message:t,buttons:[i,o],defaultId:0,cancelId:1})).response===0}runActionInRenderer(e){let t=lv.getFocusedWindow();if(t){let o=this.auxiliaryWindowsMainService.getWindowByWebContents(t.webContents);o&&(t=this.windowsMainService.getWindowById(o.parentId)?.win??null)}if(!t){let o=this.windowsMainService.getLastActiveWindow();o?.win?.isMinimized()&&(t=o.win)}let i=t?this.windowsMainService.getWindowById(t.id):void 0;if(i){if(this.logService.trace("menubar#runActionInRenderer",e),$&&!this.environmentMainService.isBuilt&&!i.isReady&&(e.type==="commandId"&&e.commandId==="workbench.action.toggleDevTools"||e.type!=="commandId"&&e.userSettingsLabel==="alt+cmd+i"))return!1;if(e.type==="commandId"){let o={id:e.commandId,from:"menu"};i.sendWhenReady("vscode:runAction",Le.None,o)}else{let o={userSettingsLabel:e.userSettingsLabel};i.sendWhenReady("vscode:runKeybinding",Le.None,o)}return!0}else return this.logService.trace("menubar#runActionInRenderer: no active window found",e),!1}withKeybinding(e,t){let i=typeof e=="string"?this.keybindings[e]:void 0;if(i?.label){if(i.isNative!==!1)t.accelerator=i.label,t.userSettingsLabel=i.userSettingsLabel;else if(typeof t.label=="string"){let o=t.label.indexOf("[");o>=0?t.label=`${t.label.substr(0,o)} [${i.label}]`:t.label=`${t.label} [${i.label}]`}}else t.accelerator=void 0;return t}likeAction(e,t,i=!t.accelerator){i&&(t=this.withKeybinding(e,t));let o=t.click;return t.click=(s,a,l)=>{this.reportMenuActionTelemetry(e),o?.(s,a,l)},t}openUrl(e,t){this.nativeHostMainService.openExternal(void 0,e),this.reportMenuActionTelemetry(t)}reportMenuActionTelemetry(e){this.telemetryService.publicLog2("workbenchActionExecuted",{id:e,from:cv})}mnemonicLabel(e){return yD(e,!this.currentEnableMenuBarMnemonics)}};Zo=D([S(0,Qs),S(1,Ae),S(2,Ke),S(3,Fe),S(4,St),S(5,Xs),S(6,Rt),S(7,Te),S(8,z),S(9,mo),S(10,He),S(11,Jr),S(12,ef)],Zo)});var fb,gd,lN=_(()=>{de();Vt();me();aN();te();fb=V("menubarMainService"),gd=class extends M{constructor(e,t,i){super();this.instantiationService=e;this.lifecycleMainService=t;this.logService=i;this.menubar=this.installMenuBarAfterWindowOpen()}async installMenuBarAfterWindowOpen(){return await this.lifecycleMainService.when(3),this._register(this.instantiationService.createInstance(Zo))}async updateMenubar(e,t){this.logService.trace("menubarService#updateMenubar",e),(await this.menubar).updateMenu(t,e)}};gd=D([S(0,rn),S(1,Te),S(2,z)],gd)});var yr,gb,dv,$s=_(()=>{ae();te();de();yr=V("meteredConnectionService"),gb="network.meteredConnection",dv=class extends M{constructor(e,t){super();this._onDidChangeIsConnectionMetered=this._register(new C);this.onDidChangeIsConnectionMetered=this._onDidChangeIsConnectionMetered.event;this._isBrowserConnectionMetered=t,this._meteredConnectionSetting=e.getValue(gb),this._isConnectionMetered=this._meteredConnectionSetting==="on"||this._meteredConnectionSetting!=="off"&&this._isBrowserConnectionMetered,this._register(e.onDidChangeConfiguration(i=>{if(i.affectsConfiguration(gb)){let o=e.getValue(gb);o!==this._meteredConnectionSetting&&(this._meteredConnectionSetting=o,this.onUpdated())}}))}get isConnectionMetered(){return this._isConnectionMetered}get isBrowserConnectionMetered(){return this._isBrowserConnectionMetered}setIsBrowserConnectionMetered(e){e!==this._isBrowserConnectionMetered&&(this._isBrowserConnectionMetered=e,this.onChangeBrowserConnection())}onChangeBrowserConnection(){this.onUpdated()}onUpdated(){let e=this._meteredConnectionSetting==="on"||this._meteredConnectionSetting!=="off"&&this._isBrowserConnectionMetered;e!==this._isConnectionMetered&&(this._isConnectionMetered=e,this.onChangeIsConnectionMetered())}onChangeIsConnectionMetered(){this._onDidChangeIsConnectionMetered.fire(this._isConnectionMetered)}}});var hb,Ib=_(()=>{ae();te();hb="meteredConnection"});var uv,cN=_(()=>{Ib();uv=class{constructor(n){this.service=n}listen(n,e){if(e==="OnDidChangeIsConnectionMetered")return this.service.onDidChangeIsConnectionMetered;throw new Error(`Event not found: ${e}`)}async call(n,e,t){switch(e){case"IsConnectionMetered":return this.service.isConnectionMetered;case"SetIsBrowserConnectionMetered":this.service.setIsBrowserConnectionMetered(t);break;default:throw new Error(`Call not found: ${e}`)}}}});var hd,dN=_(()=>{_t();$s();hd=class extends dv{constructor(n){super(n,!1)}setTelemetryService(n){this.telemetryService=n}onChangeBrowserConnection(){let n=this.isBrowserConnectionMetered;n||super.onChangeBrowserConnection(),this.telemetryService?.publicLog2("meteredConnectionStateChange",{connectionState:this.isBrowserConnectionMetered}),n&&super.onChangeBrowserConnection()}};hd=D([S(0,Ae)],hd)});var oi,ol,Id,Di=_(()=>{ae();gp();te();de();oi=V("policy"),ol=class extends M{constructor(){super(...arguments);this.policyDefinitions={};this.policies=new Map;this._onDidChange=this._register(new C);this.onDidChange=this._onDidChange.event}async updatePolicyDefinitions(e){let t=Object.keys(this.policyDefinitions).length;return this.policyDefinitions={...e,...this.policyDefinitions},t!==Object.keys(this.policyDefinitions).length&&await this._updatePolicyDefinitions(this.policyDefinitions),ji.reduce(this.policies.entries(),(i,[o,s])=>({...i,[o]:s}),{})}getPolicyValue(e){return this.policies.get(e)}serialize(){return ji.reduce(Object.entries(this.policyDefinitions),(e,[t,i])=>({...e,[t]:{definition:i,value:this.policies.get(t)}}),{})}},Id=class{constructor(){this.onDidChange=x.None;this.policyDefinitions={}}async updatePolicyDefinitions(){return{}}getPolicyValue(){}serialize(){}}});async function N8(r,n,e,t,i){try{let o=await import("@vscode/spdlog");o.setFlushOn(0);let s=await o.createAsyncRotatingLogger(r,n,e,t);return i?s.clearFormatters():s.setPattern("%Y-%m-%d %H:%M:%S.%e [%l] %v"),s}catch(o){console.error(o)}return null}function uN(r,n,e){switch(n){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 ${n}`)}}function pN(r,n){switch(n){case 1:r.setLevel(0);break;case 2:r.setLevel(1);break;case 3:r.setLevel(2);break;case 4:r.setLevel(3);break;case 5:r.setLevel(4);break;case 0:r.setLevel(6);break;default:throw new Error(`Invalid log level ${n}`)}}var pv,mN=_(()=>{ct();me();pv=class extends Ma{constructor(e,t,i,o,s){super();this.buffer=[];this.setLevel(s),this._loggerCreationPromise=this._createSpdLogLogger(e,t,i,o),this._register(this.onDidChangeLogLevel(a=>{this._logger&&pN(this._logger,a)}))}async _createSpdLogLogger(e,t,i,o){let s=i?6:1,a=30/s*no.MB,l=await N8(e,t,a,s,o);if(l){this._logger=l,pN(this._logger,this.getLevel());for(let{level:c,message:u}of this.buffer)uN(this._logger,c,u);this.buffer=[]}}log(e,t){this._logger?uN(this._logger,e,t):this.getLevel()<=e&&this.buffer.push({level:e,message:t})}flush(){this._logger?this.flushLogger():this._loggerCreationPromise.then(()=>this.flushLogger())}dispose(){this._logger?this.disposeLogger():this._loggerCreationPromise.then(()=>this.disposeLogger()),super.dispose()}flushLogger(){this._logger&&this._logger.flush()}disposeLogger(){this._logger&&(this._logger.drop(),this._logger=void 0)}}});var mv,fN=_(()=>{Xt();me();mN();mv=class extends cm{doCreateLogger(n,e,t){return new pv(Me(),n.fsPath,!t?.donotRotate,!!t?.donotUseFormatters,e)}}});var fo,fv,vd=_(()=>{er();ae();de();me();fN();fo=Rs,fv=class extends mv{constructor(){super(...arguments);this.loggerResourcesByWindow=new Lt}createLogger(e,t,i){i!==void 0&&this.loggerResourcesByWindow.set(this.toResource(e),i);try{return super.createLogger(e,t)}catch(o){throw this.loggerResourcesByWindow.delete(this.toResource(e)),o}}registerLogger(e,t){t!==void 0&&this.loggerResourcesByWindow.set(e.resource,t),super.registerLogger(e)}deregisterLogger(e){this.loggerResourcesByWindow.delete(e),super.deregisterLogger(e)}getGlobalLoggers(){let e=[];for(let t of super.getRegisteredLoggers())this.loggerResourcesByWindow.has(t.resource)||e.push(t);return e}getOnDidChangeLogLevelEvent(e){return x.filter(this.onDidChangeLogLevel,t=>dm(t)||this.isInterestedLoggerResource(t[0],e))}getOnDidChangeVisibilityEvent(e){return x.filter(this.onDidChangeVisibility,([t])=>this.isInterestedLoggerResource(t,e))}getOnDidChangeLoggersEvent(e){return x.filter(x.map(this.onDidChangeLoggers,t=>({added:[...t.added].filter(o=>this.isInterestedLoggerResource(o.resource,e)),removed:[...t.removed].filter(o=>this.isInterestedLoggerResource(o.resource,e))})),t=>t.added.length>0||t.removed.length>0)}deregisterLoggers(e){for(let[t,i]of this.loggerResourcesByWindow)i===e&&this.deregisterLogger(t)}isInterestedLoggerResource(e,t){let i=this.loggerResourcesByWindow.get(e);return i===void 0||i===t}dispose(){super.dispose(),this.loggerResourcesByWindow.clear()}}});function L8(r){if(Co===2&&/^penguin(\.|$)/i.test(r))return"chromebook"}function gN(r,n,e,t,i,o,s,a,l,c,u){let p=Object.create(null);p["common.machineId"]=o,p["common.sqmId"]=s,p["common.devDeviceId"]=a,p.sessionID=Me()+Date.now(),p.commitHash=t,p.version=i,p["common.releaseDate"]=c,p["common.platformVersion"]=(r||"").replace(/^(\d+)(\.\d+)?(\.\d+)?(.*)/,"$1$2$3"),p["common.platform"]=Eg(Co),p["common.nodePlatform"]=_g,p["common.nodeArch"]=e,p["common.product"]=u||"desktop",l&&(p["common.msftInternal"]=l);let m=0,h=Date.now();Object.defineProperties(p,{timestamp:{get:()=>new Date,enumerable:!0},"common.timesincesessionstart":{get:()=>Date.now()-h,enumerable:!0},"common.sequence":{get:()=>m++,enumerable:!0}}),yg&&(p["common.snap"]="true");let E=L8(n);return E&&(p["common.platformDetail"]=E),p}function hN(r){let n=En.USERDNSDOMAIN;if(!n)return!1;let e=n.toLowerCase();return r.some(t=>e===t)}var vb=_(()=>{ce();gi();Xt()});function hv(r,n){return!n.isBuilt&&!n.disableTelemetry?!0:!(n.disableTelemetry||!r.enableTelemetry)}function Ed(r){let n=r.getValue(Mc),e=r.getValue(tI);if(r.getValue(Em)===!1||e===!1)return 0;switch(n??"all"){case"all":return 3;case"error":return 2;case"crash":return 1;case"off":return 0}}function IN(r,n){let e=r.msftInternalDomains||[],t=n.getValue("telemetry.internalTesting");return hN(e)||t}function vN(r){return[r.appRoot,r.extensionsPath,r.userHome.fsPath,r.tmpDir.fsPath,r.userDataPath]}function W8(r,n){if(!r||!r.includes("/")&&!r.includes("\\"))return r;let e=r,t=[];for(let l of n)for(;;){let c=l.exec(r);if(!c)break;t.push([c.index,l.lastIndex])}let i=/^[\\\/]?(node_modules|node_modules\.asar)[\\\/]/,o=/^(.*?)((?:\.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 c=t.some(([u,p])=>l.index<p&&u<s.lastIndex);if(!i.test(l[0])&&!c){let u=o.exec(l[0]);u?e+=r.substring(a,l.index)+"<REDACTED: user-file-path>/"+u[2]:e+=r.substring(a,l.index)+"<REDACTED: user-file-path>",a=s.lastIndex}}return a<r.length&&(e+=r.substr(a)),e}function B8(r){if(!r)return r;let n=[{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 n)if(e.regex.test(r))return`<REDACTED: ${e.label}>`;return r}function EN(r,n){return r?$O(r,e=>{if(e instanceof gv||Object.hasOwnProperty.call(e,"isTrustedTelemetryValue"))return e.value;if(typeof e=="string"){let t=e.replaceAll("%20"," ");t=W8(t,n);for(let i of n)t=t.replace(i,"");return t=B8(t),t}}):{}}var gv,Eb,Zs,F8,Jge,ea=_(()=>{Gr();qe();We();zc();vb();Tn();gv=class{constructor(n){this.value=n;this.isTrustedTelemetryValue=!0}},Eb=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(){}},Zs=new Eb,F8="telemetry",Jge={id:F8,name:v(2316,null)}});var Iv,Sb,_b,yN=_(()=>{Iv={exit:"vscode:electron-main->shared-process=exit",ipcReady:"vscode:shared-process->electron-main=ipc-ready",initDone:"vscode:shared-process->electron-main=init-done"},Sb={request:"vscode:createSharedProcessChannelConnection",response:"vscode:createSharedProcessChannelConnectionResult"},_b={request:"vscode:createSharedProcessRawConnection",response:"vscode:createSharedProcessRawConnectionResult"}});var yd,SN=_(()=>{Ti();Ce();te();$t();Vt();me();Ci();Di();vd();ja();ea();Ah();qe();yN();ae();yd=class extends M{constructor(e,t,i,o,s,a,l,c,u){super();this.machineId=e;this.sqmId=t;this.devDeviceId=i;this.environmentMainService=o;this.userDataProfilesService=s;this.lifecycleMainService=a;this.logService=l;this.loggerMainService=c;this.policyService=u;this.firstWindowConnectionBarrier=new Qi;this.utilityProcess=void 0;this.utilityProcessLogListener=void 0;this._onDidCrash=this._register(new C);this.onDidCrash=this._onDidCrash.event;this._whenReady=void 0;this._whenIpcReady=void 0;this.registerListeners()}registerListeners(){Tt.on(Sb.request,(e,t)=>this.onWindowConnection(e,t,Sb.response)),Tt.on(_b.request,(e,t)=>this.onWindowConnection(e,t,_b.response)),this._register(this.lifecycleMainService.onWillShutdown(()=>this.onWillShutdown()))}async onWindowConnection(e,t,i){this.logService.trace(`[SharedProcess] onWindowConnection for: ${i}`),this.firstWindowConnectionBarrier.isOpen()||this.firstWindowConnectionBarrier.open(),await this.whenReady();let o=await this.connect(i);if(e.sender.isDestroyed())return o.close();e.sender.postMessage(i,t,[o])}onWillShutdown(){this.logService.trace("[SharedProcess] onWillShutdown"),this.utilityProcess?.postMessage(Iv.exit),this.utilityProcess=void 0}whenReady(){return this._whenReady||(this._whenReady=(async()=>{await this.whenIpcReady;let e=new un;this.utilityProcess?.once(Iv.initDone,()=>e.complete()),await e.p,this.utilityProcessLogListener?.dispose(),this.logService.trace("[SharedProcess] Overall ready")})()),this._whenReady}get whenIpcReady(){return this._whenIpcReady||(this._whenIpcReady=(async()=>{await this.firstWindowConnectionBarrier.wait(),this.createUtilityProcess();let e=new un;this.utilityProcess?.once(Iv.ipcReady,()=>e.complete()),await e.p,this.logService.trace("[SharedProcess] IPC ready")})()),this._whenIpcReady}createUtilityProcess(){this.utilityProcess=this._register(new Pn(this.logService,Zs,this.lifecycleMainService)),this.utilityProcessLogListener=this.utilityProcess.onMessage(i=>{let o=i;typeof o.warning=="string"?this.logService.warn(o.warning):typeof o.error=="string"&&this.logService.error(o.error)});let e=cO(this.environmentMainService.args,this.environmentMainService.isBuilt),t;e.port&&(t=["--nolazy","--experimental-network-inspection"],e.break?t.push(`--inspect-brk=${e.port}`):t.push(`--inspect=${e.port}`)),this.utilityProcess.start({type:"shared-process",name:"shared-process",entryPoint:"vs/code/electron-utility/sharedProcess/sharedProcessMain",payload:this.createSharedProcessConfiguration(),respondToAuthRequestsFromMainProcess:!0,execArgv:t}),this._register(this.utilityProcess.onCrash(()=>this._onDidCrash.fire()))}createSharedProcessConfiguration(){return{machineId:this.machineId,sqmId:this.sqmId,devDeviceId:this.devDeviceId,codeCachePath:this.environmentMainService.codeCachePath,profiles:{home:this.userDataProfilesService.profilesHome,all:this.userDataProfilesService.profiles},args:this.environmentMainService.args,logLevel:this.loggerMainService.getLogLevel(),loggers:this.loggerMainService.getGlobalLoggers(),policiesData:this.policyService.serialize()}}async connect(e){return await this.whenIpcReady,Ki(this.utilityProcess).connect(e)}};yd=D([S(3,Fe),S(4,zn),S(5,Te),S(6,z),S(7,fo),S(8,oi)],yd)});var V8,ta,vv=_(()=>{de();V8="signService",ta=V(V8)});var Ev,_N=_(()=>{ae();te();Bp();Ln();Ev=class r extends M{constructor(e,t){super();this.logService=e;this.storageMainService=t;this.onDidChangeApplicationStorageEmitter=this._register(new C);this.mapProfileToOnDidChangeProfileStorageEmitter=new Map;this.registerStorageChangeListeners(t.applicationStorage,this.onDidChangeApplicationStorageEmitter)}static{this.STORAGE_CHANGE_DEBOUNCE_TIME=100}registerStorageChangeListeners(e,t){this._register(x.debounce(e.onDidChangeStorage,(i,o)=>(i?i.push(o):i=[o],i),r.STORAGE_CHANGE_DEBOUNCE_TIME)(i=>{i.length&&t.fire(this.serializeStorageChangeEvents(i,e))}))}serializeStorageChangeEvents(e,t){let i=new Map,o=new Set;return e.forEach(s=>{let a=t.get(s.key);typeof a=="string"?i.set(s.key,a):o.add(s.key)}),{changed:Array.from(i.entries()),deleted:Array.from(o.values())}}listen(e,t,i){switch(t){case"onDidChangeStorage":{let o=i.profile?bi(i.profile):void 0;if(!o)return this.onDidChangeApplicationStorageEmitter.event;let s=this.mapProfileToOnDidChangeProfileStorageEmitter.get(o.id);return s||(s=this._register(new C),this.registerStorageChangeListeners(this.storageMainService.profileStorage(o),s),this.mapProfileToOnDidChangeProfileStorageEmitter.set(o.id,s)),s.event}}throw new Error(`Event not found: ${t}`)}async call(e,t,i){let o=i.profile?bi(i.profile):void 0,s=SO(i.workspace),a=await this.withStorageInitialized(o,s);switch(t){case"getItems":return Array.from(a.items.entries());case"updateItems":{let l=i;if(l.insert)for(let[c,u]of l.insert)a.set(c,u);l.delete?.forEach(c=>a.delete(c));break}case"optimize":return a.optimize();case"isUsed":{let l=i.payload;return typeof l=="string"?this.storageMainService.isUsed(l):!1}default:throw new Error(`Call not found: ${t}`)}}async withStorageInitialized(e,t){let i;t?i=this.storageMainService.workspaceStorage(t):e?i=this.storageMainService.profileStorage(e):i=this.storageMainService.applicationStorage;try{await i.init()}catch(o){this.logService.error(`StorageIPC#init: Unable to init ${t?"workspace":e?"profile":"application"} storage due to ${o}`)}return i}}});var yv,wN=_(()=>{yv=class{constructor(n){this.channel=n}log(n,e){return this.channel.call("log",{eventName:n,data:e}).then(void 0,t=>`Failed to log telemetry: ${console.warn(t)}`),Promise.resolve(null)}flush(){return Promise.resolve()}}});function G8(){let r=v(2314,null,qn.nameLong,"https://windsurf.com/redirect/windsurf/settings"),n=v(2312,null,qn.nameLong),e=qn.privacyStatementUrl?v(2298,null,"https://aka.ms/vscode-telemetry",qn.privacyStatementUrl):v(2299,null,"https://aka.ms/vscode-telemetry"),t=$n?"":v(2304,null),i=v(2297,null),o=v(2302,null),s=v(2313,null),a=v(2311,null),l=`
|       | ${i} | ${o} | ${s} |
|:------|:-------------:|:---------------:|:----------:|
| all   |       \u2713       |        \u2713        |     \u2713      |
| error |       \u2713       |        \u2713        |     -      |
| crash |       \u2713       |        -        |     -      |
| off   |       -       |        -        |     -      |
`,c=v(2307,null);return`
${r}
${n} ${e} ${t}

&nbsp;

${a}
${l}

&nbsp;

${c}
`}var es,H8,bN=_(()=>{te();Gr();ce();Dp();Sn();We();_t();Lo();kp();In();wi();Tn();ea();es=class{constructor(n,e,t){this._configurationService=e;this._productService=t;this._experimentProperties={};this._pendingEvents=[];this._isExperimentPropertySet=!1;this._disposables=new ue;this._cleanupPatterns=[];this._appenders=n.appenders,this._commonProperties=n.commonProperties??Object.create(null),this.sessionId=this._commonProperties.sessionID,this.machineId=this._commonProperties["common.machineId"],this.sqmId=this._commonProperties["common.sqmId"],this.devDeviceId=this._commonProperties["common.devDeviceId"],this.firstSessionDate=this._commonProperties["common.firstSessionDate"],this.msftInternal=this._commonProperties["common.msftInternal"],this._piiPaths=n.piiPaths||[],this._telemetryLevel=3,this._sendErrorTelemetry=!!n.sendErrorTelemetry,this._meteredConnectionService=n.meteredConnectionService,this._cleanupPatterns=[/(vscode-)?file:\/\/.*?\/resources\/app\//gi];for(let i of this._piiPaths)this._cleanupPatterns.push(new RegExp(Is(i),"gi")),i.indexOf("\\")>=0&&this._cleanupPatterns.push(new RegExp(Is(i.replace(/\\/g,"/")),"gi"));this._updateTelemetryLevel(),this._disposables.add(this._configurationService.onDidChangeConfiguration(i=>{(i.affectsConfiguration(Mc)||i.affectsConfiguration(Em)||i.affectsConfiguration(tI))&&this._updateTelemetryLevel()})),n.waitForExperimentProperties?this._flushTimeout=setTimeout(()=>this._flushPendingEvents(),es.BUFFER_FLUSH_TIMEOUT):this._isExperimentPropertySet=!0}static{this.IDLE_START_EVENT_NAME="UserIdleStart"}static{this.IDLE_STOP_EVENT_NAME="UserIdleStop"}static{this.BUFFER_FLUSH_TIMEOUT=1e4}static{this.MAX_BUFFER_SIZE=1e3}setExperimentProperty(n,e){this._experimentProperties[n]=e,this._isExperimentPropertySet||this._flushPendingEvents()}_flushPendingEvents(){if(!this._isExperimentPropertySet){this._isExperimentPropertySet=!0,this._flushTimeout!==void 0&&(clearTimeout(this._flushTimeout),this._flushTimeout=void 0);for(let n of this._pendingEvents)this._doLog(n.eventName,n.eventLevel,n.data);this._pendingEvents=[]}}_updateTelemetryLevel(){let n=Ed(this._configurationService),e=this._productService.enabledTelemetryLevels;if(e){this._sendErrorTelemetry=this.sendErrorTelemetry?e.error:!1;let t=e.usage?3:e.error?2:0;n=Math.min(n,t)}this._telemetryLevel=n}get sendErrorTelemetry(){return this._sendErrorTelemetry}get telemetryLevel(){return this._telemetryLevel}dispose(){this._flushPendingEvents(),this._disposables.dispose()}_log(n,e,t){if(!(this._telemetryLevel<e)&&!this._meteredConnectionService?.isConnectionMetered){if(!this._isExperimentPropertySet){this._pendingEvents.length<es.MAX_BUFFER_SIZE&&this._pendingEvents.push({eventName:n,eventLevel:e,data:t});return}this._doLog(n,e,t)}}_doLog(n,e,t){t=II(t,this._experimentProperties),t=EN(t,this._cleanupPatterns),t=II(t,this._commonProperties),this._appenders.forEach(i=>i.log(n,t??{}))}publicLog(n,e){this._log(n,3,e)}publicLog2(n,e){this.publicLog(n,e)}publicLogError(n,e){this._sendErrorTelemetry&&this._log(n,2,e)}publicLogError2(n,e){this.publicLogError(n,e)}};es=D([S(1,Ae),S(2,He)],es);H8=Ht.as(_n.Configuration);H8.registerConfiguration({id:NO,order:1,type:"object",title:v(2315,null),properties:{[Mc]:{type:"string",enum:["all","error","crash","off"],enumDescriptions:[v(2306,null),v(2308,null),v(2305,null),v(2309,null)],markdownDescription:G8(),default:"all",restricted:!0,scope:1,tags:["usesOnlineServices","telemetry"],policy:{name:"TelemetryLevel",category:"Telemetry",minimumVersion:"1.99",localization:{description:{key:"telemetry.telemetryLevel.policyDescription",value:v(2310,null)},enumDescriptions:[{key:"telemetry.telemetryLevel.default",value:v(2306,null)},{key:"telemetry.telemetryLevel.error",value:v(2308,null)},{key:"telemetry.telemetryLevel.crash",value:v(2305,null)},{key:"telemetry.telemetryLevel.off",value:v(2309,null)}]}}},"telemetry.feedback.enabled":{type:"boolean",default:!0,description:v(2303,null),policy:{name:"EnableFeedback",category:"Telemetry",minimumVersion:"1.99",localization:{description:{key:"telemetry.feedback.enabled",value:v(2303,null)}}}},[Em]:{type:"boolean",markdownDescription:qn.privacyStatementUrl?v(2301,null,qn.nameLong,qn.privacyStatementUrl):v(2300,null,qn.nameLong),default:!0,restricted:!0,markdownDeprecationMessage:v(2296,null,`\`#${Mc}#\``),scope:1,tags:["usesOnlineServices","telemetry"]}}})});var Sv,TN=_(()=>{ae();te();Xo();Sv=class{constructor(n){this.service=n}listen(n,e){if(e==="onStateChange")return this.service.onStateChange;throw new Error(`Event not found: ${e}`)}call(n,e,t){switch(e){case"checkForUpdates":return this.service.checkForUpdates(t);case"downloadUpdate":return this.service.downloadUpdate(t);case"applyUpdate":return this.service.applyUpdate();case"quitAndInstall":return this.service.quitAndInstall();case"_getInitialState":return Promise.resolve(this.service.state);case"isLatestVersion":return this.service.isLatestVersion();case"_applySpecificUpdate":return this.service._applySpecificUpdate(t);case"_devApplyUpdateFromUrl":return this.service._devApplyUpdateFromUrl(t);case"setInternalOrg":return this.service.setInternalOrg(t)}throw new Error(`Call not found: ${e}`)}}});import*as CN from"os";function Sd(r,n,e,t,i){let o=new URL(`${r}/api/update/${n}/${e}/${t}`);return i?.background&&o.searchParams.set("bg","true"),o.searchParams.set("u",i?.internalOrg??"none"),i?.windsurfVersion&&o.searchParams.set("v",i.windsurfVersion),o.toString()}function sl(r){if($){let n=CN.release();return{"User-Agent":`Code/${r} Darwin/${n}`}}if(q){let n=qD().match(/^(\d+\.\d+)/);if(n)return{"User-Agent":`Code/${r} Electron/${process.versions.electron} Windows NT ${n[1]}`}}}var go,wv=_(()=>{Ce();Bt();ae();ce();Sc();$s();_t();$t();Vt();me();In();Ys();Xo();go=class{constructor(n,e,t,i,o,s,a,l){this.lifecycleMainService=n;this.configurationService=e;this.environmentMainService=t;this.requestService=i;this.logService=o;this.productService=s;this.meteredConnectionService=a;this.supportsUpdateOverwrite=l;this._state=pe.Uninitialized;this._overwrite=!1;this._hasCheckedForOverwriteOnQuit=!1;this._isDevUpdate=!1;this.overwriteUpdatesCheckInterval=new jg;this._internalOrg=void 0;this._onStateChange=new C;this.onStateChange=this._onStateChange.event;n.when(3).finally(()=>this.initialize().catch(c=>this.logService.error("update#initialize - failed",c)))}get state(){return this._state}setState(n){this.logService.info("update#setState",n.type),this._state=n,this._onStateChange.fire(n),this.supportsUpdateOverwrite&&(n.type==="ready"&&!this._isDevUpdate?this.overwriteUpdatesCheckInterval.cancelAndSet(()=>this.checkForOverwriteUpdates(),300*1e3):this.overwriteUpdatesCheckInterval.cancel())}getEffectiveUpdateUrl(){if(this.productService.windsurf_multi_tenant_mode){let n=this.configurationService.getValue("devin.portalUrl")||this.configurationService.getValue("windsurf.portalUrl")||this.configurationService.getValue("windsurf.serviceUrl");if(n)return n.replace(/\/$/,"")}return this.productService.updateUrl}async initialize(){if(!this.environmentMainService.isBuilt){this.setState(pe.Disabled(0));return}if(this.environmentMainService.disableUpdates){this.setState(pe.Disabled(1)),this.logService.info("update#ctor - updates are disabled by the environment");return}if(!this.getEffectiveUpdateUrl()||!this.productService.commit){this.setState(pe.Disabled(3)),this.logService.info("update#ctor - updates are disabled as there is no update URL");return}let n=this.configurationService.getValue("update.mode"),e=this.getProductQuality(n);if(!e){this.setState(pe.Disabled(2)),this.logService.info("update#ctor - updates are disabled by user preference");return}if(!this.buildUpdateFeedUrl(e,this.productService.commit)){this.setState(pe.Disabled(4)),this.logService.info("update#ctor - updates are disabled as the update URL is badly formed");return}if(this.quality=e,this.setState(pe.Idle(this.getUpdateType())),await this.postInitialize(),n==="manual"){this.logService.info("update#ctor - manual checks only; automatic updates are disabled by user preference");return}n==="start"?(this.logService.info("update#ctor - startup checks only; automatic updates are disabled by user preference"),setTimeout(()=>this.checkForUpdates(!1),30*1e3)):this.scheduleCheckForUpdates(30*1e3).then(void 0,t=>this.logService.error(t))}getProductQuality(n){return n==="none"?void 0:this.productService.quality}scheduleCheckForUpdates(n=3600*1e3){return bt(n).then(()=>this.checkForUpdates(!1)).then(()=>this.scheduleCheckForUpdates(3600*1e3))}canCheckForUpdates(){return this.state.type==="idle"}async checkForUpdates(n){this.logService.trace("update#checkForUpdates, state = ",this.state.type),this.canCheckForUpdates()&&await this.doCheckForUpdates(n)}async downloadUpdate(n){if(this.logService.trace("update#downloadUpdate, state = ",this.state.type),this.state.type==="available for download"){if(!n&&this.meteredConnectionService.isConnectionMetered){this.logService.info("update#downloadUpdate - skipping download because connection is metered");return}await this.doDownloadUpdate(this.state)}}async doDownloadUpdate(n){}async applyUpdate(){this.logService.trace("update#applyUpdate, state = ",this.state.type),this.state.type==="downloaded"&&await this.doApplyUpdate()}async doApplyUpdate(){}async quitAndInstall(){if(this.logService.trace("update#quitAndInstall, state = ",this.state.type),this.state.type!=="ready")return;if(this.supportsUpdateOverwrite&&!this._hasCheckedForOverwriteOnQuit&&!this._isDevUpdate&&(this._hasCheckedForOverwriteOnQuit=!0,await this.checkForOverwriteUpdates(!0))){this.logService.info("update#quitAndInstall(): overwrite update detected, postponing quitAndInstall");return}this.logService.trace("update#quitAndInstall(): before lifecycle quit()");let n=await this.lifecycleMainService.quit(!0);this.logService.trace(`update#quitAndInstall(): after lifecycle quit() with veto: ${n}`),!n&&(this.logService.trace("update#quitAndInstall(): running raw#quitAndInstall()"),this.doQuitAndInstall())}async checkForOverwriteUpdates(n=!1){if(this._state.type!=="ready")return!1;let e=this._state.update.version,t;try{let i=new st,o=bt(2e3).then(()=>{i.cancel()});t=await Promise.race([this.isLatestVersion(e,i.token),o]),i.dispose()}catch(i){return this.logService.warn("update#checkForOverwriteUpdates(): failed to check for updates, proceeding with restart"),this.logService.warn(i),!1}if(t===!1&&this._state.type==="ready"){this.logService.info("update#readyStateCheck: newer update available, restarting update machinery");try{await this.cancelPendingUpdate()}catch(i){return this.logService.error("update#checkForOverwriteUpdates(): failed to cancel pending update, aborting overwrite"),this.logService.error(i),!1}return this._overwrite=!0,this.setState(pe.Overwriting(this._state.update,n)),this.doCheckForUpdates(n,e),!0}return!1}async isLatestVersion(n,e=Le.None){if(!this.quality||this.configurationService.getValue("update.mode")==="none")return;let i=this.buildUpdateFeedUrl(this.quality,n??this.productService.commit);if(!i)return;let o=sl(this.productService.version);this.logService.trace("update#isLatestVersion() - checking update server",{url:i,headers:o});try{let a=(await this.requestService.request({url:i,headers:o},e)).res.statusCode;return this.logService.trace("update#isLatestVersion() - response",{statusCode:a}),a===204}catch(s){this.logService.error("update#isLatestVersion(): failed to check for updates"),this.logService.error(s);return}}async _applySpecificUpdate(n){}async _devApplyUpdateFromUrl(n){this.logService.info("update#_devApplyUpdateFromUrl",n),this._isDevUpdate=!0}async setInternalOrg(n){this._internalOrg!==n&&(this.logService.info("update#setInternalOrg",n),this._internalOrg=n)}getInternalOrg(){return this._internalOrg}getUpdateType(){return 1}doQuitAndInstall(){}async postInitialize(){}async cancelPendingUpdate(){}};go=D([S(0,Te),S(1,Ae),S(2,Fe),S(3,ii),S(4,z),S(5,He),S(6,yr)],go)});import*as si from"electron";var Oi,AN=_(()=>{Bt();bs();ae();eo();te();_t();$t();Vt();me();In();Ys();Tn();Xo();$s();wv();Oi=class extends go{constructor(e,t,i,o,s,a,l,c){super(e,t,o,s,a,l,c,!0);this.telemetryService=i;this.disposables=new ue;e.setRelaunchHandler(this)}get onRawError(){return x.fromNodeEventEmitter(si.autoUpdater,"error",(e,t)=>t)}get onRawCheckingForUpdate(){return x.fromNodeEventEmitter(si.autoUpdater,"checking-for-update")}get onRawUpdateNotAvailable(){return x.fromNodeEventEmitter(si.autoUpdater,"update-not-available")}get onRawUpdateAvailable(){return x.fromNodeEventEmitter(si.autoUpdater,"update-available")}get onRawUpdateDownloaded(){return x.fromNodeEventEmitter(si.autoUpdater,"update-downloaded",(e,t,i,o)=>({version:t,productVersion:i,timestamp:o instanceof Date?o.getTime()||void 0:o}))}handleRelaunch(e){return e?.addArgs||e?.removeArgs||this.state.type!=="ready"?!1:(this.logService.trace("update#handleRelaunch(): running raw#quitAndInstall()"),this.doQuitAndInstall(),!0)}async initialize(){if(process.isEmbeddedApp){this.setState(pe.Disabled(6)),this.logService.info("update#ctor - updates are disabled from embedded app");return}await super.initialize(),this.onRawError(this.onError,this,this.disposables),this.onRawCheckingForUpdate(this.onCheckingForUpdate,this,this.disposables),this.onRawUpdateAvailable(this.onUpdateAvailable,this,this.disposables),this.onRawUpdateDownloaded(this.onUpdateDownloaded,this,this.disposables),this.onRawUpdateNotAvailable(this.onUpdateNotAvailable,this,this.disposables)}onCheckingForUpdate(){this.logService.trace("update#onCheckingForUpdate - Electron autoUpdater is checking for updates")}onError(e){this.telemetryService.publicLog2("update:error",{messageHash:String(wn(String(e)))}),this.logService.error("UpdateService error:",e),this.pendingServerMetadataPromise=void 0,this._isDevUpdate=!1;let t=this.state.type==="checking for updates"&&this.state.explicit?e:void 0;this.setState(pe.Idle(1,t)),this.resolveUpdateCheckComplete()}resolveUpdateCheckComplete(){this.updateCheckCompleteResolver&&(this.updateCheckCompleteResolver(),this.updateCheckCompleteResolver=void 0)}createUpdateFeedUrl(e,t,i){let o=this.productService.darwinUniversalAssetId??(process.arch==="x64"?"darwin":"darwin-arm64");return Sd(this.getEffectiveUpdateUrl(),o,e,t,{...i,windsurfVersion:this.productService.windsurfVersion})}buildUpdateFeedUrl(e,t,i){let o=this.productService.darwinUniversalAssetId??(process.arch==="x64"?"darwin":"darwin-arm64"),s=this.createUpdateFeedUrl(e,t,i),a=sl(this.productService.version);try{this.logService.trace("update#buildUpdateFeedUrl - setting feed URL for Electron autoUpdater",{url:s,assetID:o,quality:e,commit:t,headers:a}),si.autoUpdater.setFeedURL({url:s,headers:a})}catch(l){this.logService.error("Failed to set update feed URL",l);return}return s}async checkForUpdates(e){this.logService.trace("update#checkForUpdates, state = ",this.state.type),this.state.type==="idle"&&await this.doCheckForUpdates(e)}async doCheckForUpdates(e,t){if(!this.quality)return;this.setState(pe.CheckingForUpdates(e));let i=this.getInternalOrg(),o=!e&&!i,s=this.buildUpdateFeedUrl(this.quality,t??this.productService.commit,{background:o,internalOrg:i});if(s){if(!e&&this.meteredConnectionService.isConnectionMetered){this.logService.info("update#doCheckForUpdates - checking for update without auto-download because connection is metered"),this.checkForUpdateNoDownload(s);return}this.logService.trace("update#doCheckForUpdates - using Electron autoUpdater",{url:s,explicit:e,background:o}),this.pendingServerMetadataPromise=this.fetchServerMetadata(s),si.autoUpdater.checkForUpdates()}}async fetchServerMetadata(e){let t=new st,i=setTimeout(()=>t.cancel(),5e3);try{let o=sl(this.productService.version),s=await this.requestService.request({url:e,headers:o},t.token);return await tl(s)??void 0}catch(o){this.logService.trace("update#fetchServerMetadata - failed to fetch metadata",o);return}finally{clearTimeout(i),t.dispose()}}async checkForUpdateNoDownload(e){let t=sl(this.productService.version);this.logService.trace("update#checkForUpdateNoDownload - checking update server",{url:e,headers:t});try{let i=await this.requestService.request({url:e,headers:t},Le.None),o=i.res.statusCode;this.logService.trace("update#checkForUpdateNoDownload - response",{statusCode:o});let s=await tl(i);!s||!s.url||!s.version||!s.productVersion?(this.logService.trace("update#checkForUpdateNoDownload - no update available"),this.setState(pe.Idle(1))):(this.logService.trace("update#checkForUpdateNoDownload - update available",{version:s.version,productVersion:s.productVersion}),this.setState(pe.AvailableForDownload(s)))}catch(i){this.logService.error("update#checkForUpdateNoDownload - failed to check for update",i),this.setState(pe.Idle(1))}}onUpdateAvailable(){this.logService.trace("update#onUpdateAvailable - Electron autoUpdater reported update available"),!(this.state.type!=="checking for updates"&&this.state.type!=="overwriting")&&this.setState(pe.Downloading(this.state.type==="overwriting"?this.state.update:void 0,this.state.explicit,this._overwrite))}async onUpdateDownloaded(e){if(this.state.type!=="downloading")return;let t=this.state.explicit;if(this.pendingServerMetadataPromise){let i=await this.pendingServerMetadataPromise;if(this.pendingServerMetadataPromise=void 0,this.state.type!=="downloading")return;i&&i.version===e.version&&(i.restartUpdateMessage&&(e={...e,restartUpdateMessage:i.restartUpdateMessage}),i.restartUpdateConfirmationMessage&&(e={...e,restartUpdateConfirmationMessage:i.restartUpdateConfirmationMessage}))}this.setState(pe.Downloaded(e,t,this._overwrite)),this.logService.info(`Update downloaded: ${JSON.stringify(e)}`),this.telemetryService.publicLog2("update:downloaded",{newVersion:e.version}),this.setState(pe.Ready(e,t,this._overwrite)),this.resolveUpdateCheckComplete()}onUpdateNotAvailable(){this.logService.trace("update#onUpdateNotAvailable - Electron autoUpdater reported no update available"),this.pendingServerMetadataPromise=void 0,this._isDevUpdate=!1,this.state.type==="checking for updates"&&(this.setState(pe.Idle(1)),this.resolveUpdateCheckComplete())}async doDownloadUpdate(e){this.buildUpdateFeedUrl(this.quality,e.update.version,{internalOrg:this.getInternalOrg()}),this.pendingServerMetadataPromise=Promise.resolve(e.update),this.setState(pe.CheckingForUpdates(!0)),si.autoUpdater.checkForUpdates()}doQuitAndInstall(){this.logService.trace("update#quitAndInstall(): running raw#quitAndInstall()"),si.autoUpdater.quitAndInstall()}async _devApplyUpdateFromUrl(e){this.logService.info("update#_devApplyUpdateFromUrl (darwin)",e);let i=(await import("http")).createServer((s,a)=>{a.writeHead(200,{"Content-Type":"application/json"}),a.end(JSON.stringify({url:e,name:"dev-update",notes:"Dev update from custom URL",pub_date:new Date().toISOString()})),i.close()});await new Promise(s=>i.listen(0,"127.0.0.1",s));let o=i.address().port;try{si.autoUpdater.setFeedURL({url:`http://127.0.0.1:${o}`})}catch(s){throw this.logService.error("update#_devApplyUpdateFromUrl: failed to set feed URL",s),i.close(),s}this._isDevUpdate=!0,this.setState(pe.CheckingForUpdates(!0)),si.autoUpdater.checkForUpdates()}dispose(){this.disposables.dispose()}};D([ye],Oi.prototype,"onRawError",1),D([ye],Oi.prototype,"onRawCheckingForUpdate",1),D([ye],Oi.prototype,"onRawUpdateNotAvailable",1),D([ye],Oi.prototype,"onRawUpdateAvailable",1),D([ye],Oi.prototype,"onRawUpdateDownloaded",1),Oi=D([S(0,Te),S(1,Ae),S(2,St),S(3,Fe),S(4,ii),S(5,z),S(6,He),S(7,yr)],Oi)});import{spawn as RN}from"child_process";import{mkdir as xN}from"fs/promises";import{tmpdir as J8}from"os";var _d,DN=_(()=>{Bt();Ne();Ie();pn();_t();$t();ct();Vt();me();$s();$m();In();Ys();Xo();wv();We();_d=class extends go{constructor(e,t,i,o,s,a,l,c,u){super(e,t,i,o,s,l,c,!1);this.nativeHostMainService=a;this.fileService=u}buildUpdateFeedUrl(e,t,i){return Sd(this.getEffectiveUpdateUrl(),`linux-${process.arch}`,e,t,{...i,windsurfVersion:this.productService.windsurfVersion})}async doCheckForUpdates(e,t){if(!this.quality)return;let i=this.getInternalOrg(),o=!e&&!i,s=this.buildUpdateFeedUrl(this.quality,this.productService.commit,{background:o,internalOrg:i});this.setState(pe.CheckingForUpdates(e));try{let a=await this.requestService.request({url:s},Le.None).then(tl);!a||!a.url||!a.version||!a.productVersion?this.setState(pe.Idle(1)):this.setState(pe.AvailableForDownload(a))}catch(a){this.logService.error(a);let l=e?a instanceof Error?a.message:String(a):void 0;this.setState(pe.Idle(1,l))}}async doDownloadUpdate(e){if(e.update.url){let t=[v(2703,null),v(2706,null)],i=await this.nativeHostMainService.getActiveWindowId(void 0),{response:o}=await this.nativeHostMainService.showMessageBox(i,{type:"info",message:v(2705,null),detail:v(2704,null,e.update.windsurfVersion??e.update.productVersion),buttons:t});o===1&&this.nativeHostMainService.openExternal(void 0,"https://codeium.com/windsurf/update_linux")}this.setState(pe.Idle(1))}async _devApplyUpdateFromUrl(e){this.logService.info("update#_devApplyUpdateFromUrl (linux)",e),this.state.type!=="idle"&&this.state.type!=="disabled"&&(this.logService.info("update#_devApplyUpdateFromUrl: overriding current state:",this.state.type),this._devUpdateStagingPath=void 0,this.setState(pe.Idle(1))),this._isDevUpdate=!0;let t={version:"dev-update",productVersion:"dev"},i=H(J8(),`windsurf-dev-update-${Date.now()}`);await xN(i,{recursive:!0});let o="windsurf-dev-update.tar.gz",s=H(i,`${o}.tmp`),a=H(i,o),l=H(i,"extracted");try{this.setState(pe.CheckingForUpdates(!0)),this.logService.info("update#_devApplyUpdateFromUrl: downloading",e),this.setState(pe.Downloading(t,!0,!1));let c=await this.requestService.request({url:e},Le.None);await this.fileService.writeFile(A.file(s),c.stream),await re.rename(s,a,!1),this.logService.info("update#_devApplyUpdateFromUrl: download complete",a),this.setState(pe.Downloaded(t,!0,!1)),this.logService.info("update#_devApplyUpdateFromUrl: extracting to",l),await xN(l,{recursive:!0}),await new Promise((u,p)=>{let m=RN("tar",["xzf",a,"-C",l],{stdio:"ignore"});m.on("exit",h=>{h===0?u():p(new Error(`tar extraction failed with exit code ${h}`))}),m.on("error",p)}),this.logService.info("update#_devApplyUpdateFromUrl: extraction complete"),this._devUpdateStagingPath=l,this.setState(pe.Ready(t,!0,!1))}catch(c){this._isDevUpdate=!1,this.logService.error("update#_devApplyUpdateFromUrl: failed",c),this.setState(pe.Idle(1,c instanceof Error?c.message:String(c)))}}doQuitAndInstall(){if(!this._devUpdateStagingPath)return;let e=ze(process.execPath);this.logService.info("update#doQuitAndInstall (linux): replacing",e,"with",this._devUpdateStagingPath),RN("bash",["-c",`
			sleep 2
			SOURCE_DIR=$(find "${this._devUpdateStagingPath}" -maxdepth 1 -mindepth 1 -type d | head -1)
			if [ -z "$SOURCE_DIR" ]; then
				SOURCE_DIR="${this._devUpdateStagingPath}"
			fi
			cp -a "$SOURCE_DIR"/* "${e}/"
			"${process.execPath}" &
		`],{detached:!0,stdio:"ignore"})}};_d=D([S(0,Te),S(1,Ae),S(2,Fe),S(3,ii),S(4,z),S(5,mo),S(6,He),S(7,yr),S(8,Be)],_d)});import{spawn as q8}from"child_process";import{realpath as K8,watch as j8}from"fs";var nf,wd,ON=_(()=>{Ce();ae();Ne();$t();Vt();me();Xo();$s();nf=class{constructor(n,e,t,i){this.lifecycleMainService=n;this.logService=t;this.meteredConnectionService=i;this._state=pe.Uninitialized;this._onStateChange=new C;this.onStateChange=this._onStateChange.event;if(e.disableUpdates){this.logService.info("update#ctor - updates are disabled");return}this.setState(pe.Idle(this.getUpdateType())),this.scheduleCheckForUpdates(30*1e3).then(void 0,o=>this.logService.error(o))}get state(){return this._state}setState(n){this.logService.info("update#setState",n.type),this._state=n,this._onStateChange.fire(n)}scheduleCheckForUpdates(n=3600*1e3){return bt(n).then(()=>this.checkForUpdates(!1)).then(()=>this.scheduleCheckForUpdates(3600*1e3))}async checkForUpdates(n){this.logService.trace("update#checkForUpdates, state = ",this.state.type),this.state.type==="idle"&&await this.doCheckForUpdates(n)}async downloadUpdate(n){if(this.logService.trace("update#downloadUpdate, state = ",this.state.type),this.state.type==="available for download"){if(!n&&this.meteredConnectionService.isConnectionMetered){this.logService.info("update#downloadUpdate - skipping download because connection is metered");return}await this.doDownloadUpdate(this.state)}}doDownloadUpdate(n){return Promise.resolve(void 0)}async applyUpdate(){this.logService.trace("update#applyUpdate, state = ",this.state.type),this.state.type==="downloaded"&&await this.doApplyUpdate()}doApplyUpdate(){return Promise.resolve(void 0)}async quitAndInstall(){if(this.logService.trace("update#quitAndInstall, state = ",this.state.type),this.state.type!=="ready")return;this.logService.trace("update#quitAndInstall(): before lifecycle quit()");let n=await this.lifecycleMainService.quit(!0);this.logService.trace(`update#quitAndInstall(): after lifecycle quit() with veto: ${n}`),!n&&(this.logService.trace("update#quitAndInstall(): running raw#quitAndInstall()"),this.doQuitAndInstall())}getUpdateType(){return 2}doQuitAndInstall(){}async setInternalOrg(n){}async _applySpecificUpdate(n){}async _devApplyUpdateFromUrl(n){}};nf=D([S(0,Te),S(1,Fe),S(2,z),S(3,yr)],nf);wd=class extends nf{constructor(e,t,i,o,s,a){super(i,o,s,a);this.snap=e;this.snapRevision=t;let l=j8(ze(this.snap)),c=x.fromNodeEventEmitter(l,"change",(h,E)=>E),u=x.filter(c,h=>h==="current"),m=x.debounce(u,(h,E)=>E,2e3)(()=>this.checkForUpdates(!1));x.once(i.onWillShutdown)(()=>{m.dispose(),l.close()})}async doCheckForUpdates(){this.setState(pe.CheckingForUpdates(!1));try{await this.isUpdateAvailable()?this.setState(pe.Ready({version:"something"},!1,!1)):this.setState(pe.Idle(2))}catch(e){this.logService.error(e),this.setState(pe.Idle(2,e.message||e))}}doQuitAndInstall(){this.logService.trace("update#quitAndInstall(): running raw#quitAndInstall()"),q8("sleep 3 && "+Pe(process.argv[0]),{shell:!0,detached:!0,stdio:"ignore"})}async isUpdateAvailable(){let e=await new Promise((i,o)=>K8(`${ze(this.snap)}/current`,(s,a)=>s?o(s):i(a))),t=Pe(e);return this.snapRevision!==t}isLatestVersion(){return this.isUpdateAvailable().then(void 0,e=>{this.logService.error("update#checkForSnapUpdate(): Could not get realpath of application.")})}};wd=D([S(2,Te),S(3,Fe),S(4,z),S(5,yr)],wd)});import*as kN from"crypto";import*as NN from"fs";async function LN(r,n){if(await new Promise((i,o)=>{let s=NN.createReadStream(r),a=kN.createHash("sha256");s.pipe(a);let l=xo((c,u)=>{s.removeAllListeners(),a.removeAllListeners(),c?o(c):i(u)});s.once("error",l),s.once("end",l),a.once("error",l),a.once("data",c=>l(void 0,c.toString("hex")))})!==n)throw new Error("Hash mismatch")}var MN=_(()=>{Jl()});import{spawn as wb}from"child_process";import{app as bb}from"electron";import{existsSync as Cb,unlinkSync as z8}from"fs";import{mkdir as Y8,readFile as Tb,unlink as Q8}from"fs/promises";import{release as X8,tmpdir as $8}from"os";function ho(){return typeof Pb>"u"&&(Pb=Cb(H(ze(process.execPath),"unins000.exe"))?0:1),Pb}var Pb,al,UN=_(()=>{Ce();Bt();bs();eo();Ne();Ne();Ie();MN();pn();od();Sc();_t();$t();ct();Vt();me();$s();$m();In();Ys();Tn();Xo();wv();al=class extends go{constructor(e,t,i,o,s,a,l,c,u,p){super(e,t,o,s,a,u,p,!0);this.telemetryService=i;this.fileService=l;this.nativeHostMainService=c;e.setRelaunchHandler(this)}get cachePath(){let e=H($8(),`windsurf-${this.productService.quality}-${this.productService.target}-${process.arch}`);return Y8(e,{recursive:!0}).then(()=>e)}handleRelaunch(e){return e?.addArgs||e?.removeArgs||this.state.type!=="ready"||!this.availableUpdate?!1:(this.logService.trace("update#handleRelaunch(): running raw#quitAndInstall()"),this.doQuitAndInstall(),!0)}async initialize(){if(process.isEmbeddedApp){this.setState(pe.Disabled(6)),this.logService.info("update#ctor - updates are disabled from embedded app");return}if(this.productService.win32VersionedUpdate){let i=await this.cachePath;bb.setPath("appUpdate",i),await this.unlink(H(i,"session-ending.flag"))}let e=await JD(),t=X8();if(this.telemetryService.publicLog2("windowsUpdateInit",{osRelease:e,osNodeRelease:t}),this.productService.target==="user"&&await this.nativeHostMainService.isAdmin(void 0)){this.setState(pe.Disabled(5)),this.logService.info("update#ctor - updates are disabled due to running as Admin in user setup");return}await super.initialize()}async postInitialize(){if(!this.productService.win32VersionedUpdate)return;let e=bb.getPath("exe"),t=ze(e),i=H(t,"updating_version");if(await re.exists(i))try{let o=(await Tb(i,"utf8")).trim();this.logService.info(`update#doCheckForUpdates - application was updating to version ${o}`);let s=await this.getUpdatePackagePath(o);await re.exists(s)&&(await this._applySpecificUpdate(s),this.logService.info(`update#doCheckForUpdates - successfully applied update to version ${o}`))}catch(o){this.logService.error(`update#doCheckForUpdates - could not read ${i}`,o)}else{if(this.hasLegacyInstallerArtifacts()&&this.productService.commit){let s=await this.getUpdatePackagePath(this.productService.commit);if(await re.exists(s)){this.logService.info("update#postInitialize - prompting to migrate the legacy default install directory"),await this._applySpecificUpdate(s);return}}if(this.configurationService.getValue("update.enableWindowsBackgroundUpdates")&&this.productService.target==="user"&&this.productService.commit){let s=H(t,"tools","inno_updater.exe");await new Promise(a=>{wb(s,["--gc",e],{stdio:["ignore","ignore","ignore"],windowsHide:!0,timeout:12e4}).once("exit",()=>a())})}}}buildUpdateFeedUrl(e,t,i){let o=`win32-${process.arch}`;return ho()===1?o+="-archive":this.productService.target==="user"&&(o+="-user"),Sd(this.getEffectiveUpdateUrl(),o,e,t,{...i,windsurfVersion:this.productService.windsurfVersion})}async doCheckForUpdates(e,t){if(!this.quality)return;let i=this.getInternalOrg(),o=!e&&!i,s=this.buildUpdateFeedUrl(this.quality,t??this.productService.commit,{background:o,internalOrg:i});this.state.type!=="overwriting"&&this.setState(pe.CheckingForUpdates(e));let a=sl(this.productService.version);try{let l=await this.requestService.request({url:s,headers:a},Le.None).then(tl),c=ho();if(!l||!l.url||!l.version||!l.productVersion){this.state.type==="overwriting"?(this._overwrite=!1,this.setState(pe.Ready(this.state.update,this.state.explicit,!1))):this.setState(pe.Idle(c));return}if(c===1){this.setState(pe.AvailableForDownload(l));return}this.setState(pe.Downloading(l,e,this._overwrite)),await this.cleanup(l.version);let u=await this.getUpdatePackagePath(l.version),p=await re.exists(u),m;if(p)m=u;else{let E=`${u}.tmp`,y=await this.requestService.request({url:l.url},Le.None);await this.fileService.writeFile(A.file(E),y.stream),l.sha256hash&&await LN(E,l.sha256hash),await re.rename(E,u,!1),m=u}this.availableUpdate={packagePath:m},this.setState(pe.Downloaded(l,e,this._overwrite));let h=this.configurationService.getValue("update.enableWindowsBackgroundUpdates");this.hasLegacyInstallerArtifacts()?this.setState(pe.Ready(l,e,this._overwrite)):h?this.productService.target==="user"&&this.doApplyUpdate():this.setState(pe.Ready(l,e,this._overwrite))}catch(l){this.telemetryService.publicLog2("update:error",{messageHash:String(wn(String(l)))}),this.logService.error(l);let c=e?l instanceof Error?l.message:String(l):void 0;this.state.type==="overwriting"?(this._overwrite=!1,this.setState(pe.Ready(this.state.update,this.state.explicit,!1))):this.setState(pe.Idle(ho(),c))}}async doDownloadUpdate(e){e.update.url&&this.nativeHostMainService.openExternal(void 0,e.update.url),this.setState(pe.Idle(ho()))}async getUpdatePackagePath(e){let t=await this.cachePath;return H(t,`WindsurfSetup-${this.productService.quality}-${e}.exe`)}hasLegacyInstallerArtifacts(){let e=this.productService.win32DirName;if(!e?.startsWith("Devin"))return!1;let t=this.productService.target==="user"?process.env.LOCALAPPDATA&&H(process.env.LOCALAPPDATA,"Programs"):process.env.ProgramFiles??process.env.PROGRAMFILES;if(t){let l=`Windsurf${e.substring(5)}`,c=kt(H(t,l)).toLowerCase();if(kt(ze(bb.getPath("exe"))).toLowerCase()===c)return!0}let i=this.productService.nameLong,o=process.env.ProgramData??process.env.PROGRAMDATA,s=this.productService.target==="user"?process.env.APPDATA&&H(process.env.APPDATA,"Microsoft","Windows","Start Menu","Programs"):o&&H(o,"Microsoft","Windows","Start Menu","Programs");if(!i.startsWith("Devin")||!s)return!1;let a=`Windsurf${i.substring(5)}`;return Cb(H(s,a,`${a}.lnk`))||Cb(H(s,`${a}.lnk`))}async cleanup(e=null){let t=e?a=>!new RegExp(`${this.productService.quality}-${e}\\.exe$`).test(a):()=>!0,i=await this.cachePath,s=(await re.readdir(i)).filter(t).map(a=>this.unlink(H(i,a)));await Promise.all(s)}async doApplyUpdate(){if(this.state.type!=="downloaded"||!this.availableUpdate)return Promise.resolve(void 0);let e=this.state.update,t=this.state.explicit;if(this.hasLegacyInstallerArtifacts()){this.setState(pe.Ready(e,t,this._overwrite));return}this.setState(pe.Updating(e));let i=await this.cachePath,o=H(i,"session-ending.flag"),s=H(i,"cancel.flag");await this.unlink(s);let a=H(i,"update-progress");await this.unlink(a),this.availableUpdate.updateFilePath=H(i,`WindsurfSetup-${this.productService.quality}-${e.version}.flag`),await re.writeFile(this.availableUpdate.updateFilePath,"flag");let l=wb(this.availableUpdate.packagePath,["/verysilent","/log",`/update="${this.availableUpdate.updateFilePath}"`,`/progress="${a}"`,`/sessionend="${o}"`,`/cancel="${s}"`,"/nocloseapplications","/mergetasks=runcode,!desktopicon,!quicklaunchicon"],{detached:!0,stdio:["ignore","ignore","ignore"],windowsVerbatimArguments:!0,env:{...process.env,__COMPAT_LAYER:"RunAsInvoker"}});this.availableUpdate.updateProcess=l,l.once("exit",()=>{this.availableUpdate=void 0,this._isDevUpdate=!1,this.setState(pe.Idle(ho()))});let c=`${this.productService.win32MutexName}-ready`,p=process.getBuiltinModule("node:module").createRequire(import.meta.url)("@vscode/windows-mutex");this.updateCancellationTokenSource?.dispose(!0);let m=this.updateCancellationTokenSource=new st,h=m.token,E=async()=>{for(;this.state.type==="updating"&&!h.isCancellationRequested;){if(p.isActive(c)){this.setState(pe.Ready(e,t,this._overwrite));return}try{let P=await Tb(a,"utf8");if(!h.isCancellationRequested){let[T,k]=P.split(","),U=parseInt(T,10),O=parseInt(k,10);!isNaN(U)&&!isNaN(O)&&this.state.type==="updating"&&(this.state.currentProgress!==U||this.state.maxProgress!==O)&&this.setState(pe.Updating(e,U,O))}}catch{}await bt(500)}},y=new zg(()=>{this.logService.warn("update#doApplyUpdate: polling timed out waiting for update to be ready"),this._isDevUpdate=!1,this.setState(pe.Idle(ho(),"Update did not complete within expected time"))},3600*1e3);y.schedule(),E().finally(()=>{y.dispose(),this.updateCancellationTokenSource===m&&(this.updateCancellationTokenSource=void 0),m.dispose()})}async cancelPendingUpdate(){if(!this.availableUpdate)return;this.updateCancellationTokenSource?.dispose(!0),this.updateCancellationTokenSource=void 0,this.logService.trace("update#cancelPendingUpdate: cancelling pending update");let{updateProcess:e,updateFilePath:t,cancelFilePath:i}=this.availableUpdate;if(e&&e.exitCode===null){e.removeAllListeners();let o=new Promise(l=>e.once("exit",()=>l(!0)));if(i)try{await re.writeFile(i,"cancel")}catch(l){this.logService.warn("update#cancelPendingUpdate: failed to write cancel file",l)}let s=e.pid,a=await Promise.race([o,bt(30*1e3).then(()=>!1)]);s&&!a&&(this.logService.trace("update#cancelPendingUpdate: process did not exit gracefully, killing process tree"),await U0(s,!0))}await this.unlink(t),await this.unlink(i),this.availableUpdate=void 0}doQuitAndInstall(){if(!(this.state.type!=="ready"||!this.availableUpdate))if(this.logService.trace("update#quitAndInstall(): running raw#quitAndInstall()"),this.availableUpdate.updateFilePath)try{z8(this.availableUpdate.updateFilePath)}catch{}else wb(this.availableUpdate.packagePath,["/silent","/log","/mergetasks=runcode,!desktopicon,!quicklaunchicon"],{detached:!0,stdio:["ignore","ignore","ignore"],env:{...process.env,__COMPAT_LAYER:"RunAsInvoker"}})}async loadUpdateMetadata(){try{let e=await this.cachePath,t=H(e,"update-metadata.json");if(await re.exists(t)){let i=await Tb(t,"utf8");return JSON.parse(i)}}catch(e){this.logService.error("update#loadUpdateMetadata: failed to load",e)}}getUpdateType(){return ho()}async _devApplyUpdateFromUrl(e){this.logService.info("update#_devApplyUpdateFromUrl (win32)",e),this.state.type!=="idle"&&this.state.type!=="disabled"&&(this.logService.info("update#_devApplyUpdateFromUrl: overriding current state:",this.state.type),await this.cancelPendingUpdate(),this.setState(pe.Idle(ho())));let t=await this.cachePath,i=`WindsurfSetup-dev-${Date.now()}.exe`,o=H(t,`${i}.tmp`),s=H(t,i);this._isDevUpdate=!0;try{this.logService.info("update#_devApplyUpdateFromUrl: downloading",e);let a=await this.requestService.request({url:e},Le.None);await this.fileService.writeFile(A.file(o),a.stream),await re.rename(o,s,!1),this.logService.info("update#_devApplyUpdateFromUrl: download complete, applying",s);let l={version:"dev-update",productVersion:"dev"};this.setState(pe.Idle(ho())),this.availableUpdate={packagePath:s},this.setState(pe.Downloading(l,!0,!1)),this.setState(pe.Downloaded(l,!0,!1)),this.configurationService.getValue("update.enableWindowsBackgroundUpdates")&&this.productService.target==="user"?this.doApplyUpdate():this.setState(pe.Ready(l,!0,!1))}catch(a){this._isDevUpdate=!1,this.logService.error("update#_devApplyUpdateFromUrl: failed",a),this.setState(pe.Idle(ho(),a instanceof Error?a.message:String(a)))}}async _applySpecificUpdate(e){if(this.state.type!=="idle")return;let t=this.configurationService.getValue("update.enableWindowsBackgroundUpdates"),i=await this.loadUpdateMetadata()??{version:"unknown",productVersion:"unknown"};this.setState(pe.Downloading(i,!0,!1)),this.availableUpdate={packagePath:e},this.setState(pe.Downloaded(i,!0,!1)),t&&this.productService.target==="user"?this.doApplyUpdate():this.setState(pe.Ready(i,!0,!1))}async unlink(e){if(e)try{await Q8(e)}catch(t){let i=t;if(i&&i.code==="ENOENT")return;this.logService.warn(`update#unlink: failed to unlink ${Pe(e)}`,t)}}};D([ye],al.prototype,"cachePath",1),al=D([S(0,Te),S(1,Ae),S(2,St),S(3,Fe),S(4,ii),S(5,z),S(6,Be),S(7,mo),S(8,He),S(9,yr)],al)});var bv,Tv,FN=_(()=>{Ie();bv=class{constructor(n){this.channel=n}handleURL(n,e){return this.channel.call("handleURL",[n.toJSON(),e])}},Tv=class{constructor(n,e){this.next=n;this.logService=e}async routeCall(n,e,t,i){if(e!=="handleURL")throw new Error(`Call not found: ${e}`);if(Array.isArray(t)&&t.length>0){let o=A.revive(t[0]);if(this.logService.trace("URLHandlerRouter#routeCall() with URI argument",o.toString(!0)),o.query){let s=/\bwindowId=(\d+)/.exec(o.query);if(s){let a=s[1];this.logService.trace(`URLHandlerRouter#routeCall(): found windowId query parameter with value "${a}"`,o.toString(!0));let l=new RegExp(`window:${a}`),c=n.connections.find(u=>(this.logService.trace("URLHandlerRouter#routeCall(): testing connection",u.ctx),l.test(u.ctx)));if(c)return this.logService.trace("URLHandlerRouter#routeCall(): found a connection to route",o.toString(!0)),c;this.logService.trace("URLHandlerRouter#routeCall(): did not find a connection to route",o.toString(!0))}else this.logService.trace("URLHandlerRouter#routeCall(): did not find windowId query parameter",o.toString(!0))}}else this.logService.trace("URLHandlerRouter#routeCall() without URI argument");return this.next.routeCall(n,e,t,i)}routeEvent(n,e){throw new Error(`Event not found: ${e}`)}}});var Ab,bd,WN=_(()=>{Ce();te();Ie();In();Ab=class extends M{constructor(){super(...arguments);this.handlers=new Set}open(e,t){let i=[...this.handlers.values()];return Wx(i.map(o=>()=>o.handleURL(e,t)),void 0,!1).then(o=>o||!1)}registerHandler(e){return this.handlers.add(e),oe(()=>this.handlers.delete(e))}},bd=class extends Ab{constructor(e){super();this.productService=e}create(e){let{authority:t,path:i,query:o,fragment:s}=e||{authority:void 0,path:void 0,query:void 0,fragment:void 0};return t&&i&&i.indexOf("/")!==0&&(i=`/${i}`),A.from({scheme:this.productService.urlProtocol,authority:t,path:i,query:o,fragment:s})}};bd=D([S(0,He)],bd)});function Z8(r){let n=[r.urlProtocol];return r.oldUrlProtocol&&r.oldUrlProtocol!==r.urlProtocol&&n.push(r.oldUrlProtocol),n}function BN(r,n){let e=Z8(n);return typeof r=="string"?e.some(t=>zi(r,t+":")):e.some(t=>Hn(r.scheme,t))}var VN=_(()=>{Sn()});import{app as GN}from"electron";var Pv,HN=_(()=>{Ce();ae();te();ce();Ie();Pv=class extends M{constructor(e,t,i,o,s,a){super();this.urlService=t;this.logService=a;this.uris=[];this.retryCount=0;if(e&&(a.trace("ElectronURLListener initialUrisToHandle:",e.map(u=>u.originalUrl)),this.uris=e),q&&!o.isPortable){let u=o.isBuilt?[]:[`"${o.appRoot}"`];u.push("--open-url","--");let p=[s.urlProtocol];s.oldUrlProtocol&&s.oldUrlProtocol!==s.urlProtocol&&p.push(s.oldUrlProtocol);for(let m of p)GN.setAsDefaultProtocolClient(m,process.execPath,u)}let l=x.map(x.fromNodeEventEmitter(GN,"open-url",(u,p)=>({event:u,url:p})),({event:u,url:p})=>(u.preventDefault(),p));this._register(l(u=>{let p=this.uriFromRawUrl(u);p&&this.urlService.open(p,{originalUrl:u})})),i.getWindows().filter(u=>u.isReady).length>0?(a.trace("ElectronURLListener: window is ready to handle URLs"),this.flush()):(a.trace("ElectronURLListener: waiting for window to be ready to handle URLs..."),this._register(x.once(i.onDidSignalReadyWindow)(()=>this.flush())))}uriFromRawUrl(e){try{return A.parse(e)}catch{return}}async flush(){if(this.retryCount++>10){this.logService.trace("ElectronURLListener#flush(): giving up after 10 retries");return}this.logService.trace("ElectronURLListener#flush(): flushing URLs");let e=[];for(let t of this.uris)await this.urlService.open(t.uri,{originalUrl:t.originalUrl})?this.logService.trace("ElectronURLListener#flush(): URL was handled",t.originalUrl):(this.logService.trace("ElectronURLListener#flush(): URL was not yet handled",t.originalUrl),e.push(t));e.length!==0&&(this.uris=e,$g(()=>this.flush(),500,this._store))}}});var Rb,JN=_(()=>{de();Rb=V("webviewManagerService")});import{protocol as qN}from"electron";var na,KN=_(()=>{at();Ie();ct();na=class{constructor(n){this._fileService=n;let e=this.handleWebviewRequest.bind(this);qN.handle(Y.vscodeWebview,e)}static{this.validWebviewFilePaths=new Map([["/index.html",{mime:"text/html"}],["/fake.html",{mime:"text/html"}],["/service-worker.js",{mime:"application/javascript"}]])}dispose(){qN.unhandle(Y.vscodeWebview)}async handleWebviewRequest(n){try{let e=A.parse(n.url),t=na.validWebviewFilePaths.get(e.path);if(t){let i=`vs/workbench/contrib/webview/browser/pre${e.path}`,o=gt.asFileUri(i),s=await this._fileService.readFile(o);return new Response(s.value.buffer.buffer,{headers:{"Content-Type":t.mime,...tc.getHeadersFromQuery(n.url),"Cross-Origin-Resource-Policy":"cross-origin"}})}else return new Response(null,{status:403})}catch{}return new Response(null,{status:500})}};na=D([S(0,Be)],na)});import{webContents as e7}from"electron";var Td,jN=_(()=>{ae();te();KN();zt();ct();Td=class extends M{constructor(e,t){super();this.windowsMainService=t;this._onFoundInFrame=this._register(new C);this.onFoundInFrame=this._onFoundInFrame.event;this._register(new na(e))}async setIgnoreMenuShortcuts(e,t){let i;if(typeof e.windowId=="number"){let{windowId:o}=e,s=this.windowsMainService.getWindowById(o);if(!s?.win)throw new Error(`Invalid windowId: ${o}`);i=s.win.webContents}else{let{webContentsId:o}=e;if(i=e7.fromId(o),!i)throw new Error(`Invalid webContentsId: ${o}`)}i.isDestroyed()||i.setIgnoreMenuShortcuts(t)}async findInFrame(e,t,i,o){let a=this.getFrameByName(e,t);if(typeof a.findInFrame=="function"){a.findInFrame(i,{findNext:o.findNext,forward:o.forward});let l=(c,u)=>{u.finalUpdate&&(this._onFoundInFrame.fire(u),a.removeListener("found-in-frame",l))};a.on("found-in-frame",l)}}async stopFindInFrame(e,t,i){let s=this.getFrameByName(e,t);typeof s.stopFindInFrame=="function"&&s.stopFindInFrame(i.keepSelection?"keepSelection":"clearSelection")}getFrameByName(e,t){let i=this.windowsMainService.getWindowById(e.windowId);if(!i?.win)throw new Error(`Invalid windowId: ${e}`);let o=i.win.webContents.mainFrame.framesInSubtree.find(s=>s.name===t);if(!o)throw new Error(`Unknown frame: ${t}`);return o}};Td=D([S(0,Be),S(1,Ke)],Td)});var Pd,Cv=_(()=>{de();Pd=V("protocolMainService")});async function zN(r,n,e){let t=e&&e.get("storage.serviceMachineId",-1)||null;if(t)return t;try{let o=(await n.readFile(r.serviceMachineIdResource)).value.toString();t=UD(o)?o:null}catch{t=null}if(!t){t=Me();try{await n.writeFile(r.serviceMachineIdResource,ee.fromString(t))}catch{}}return e?.store("storage.serviceMachineId",t,-1,1),t}var YN=_(()=>{Et();Xt();Ba()});async function QN(r,n,e,t,i,o,s){let a={"X-Market-Client-Id":`VSCode ${r}`,"User-Agent":`VSCode ${r} (${n.nameShort})`};if(hv(n,e)&&Ed(t)===3){let l=await zN(e,i,o);a["X-Market-User-Id"]=l,a["VSCode-SessionId"]=s.machineId||l}return a}var XN=_(()=>{YN();Tn();ea()});function f(r,n){if(Ye(n)){let e=$N[n];if(e===void 0)throw new Error(`${r} references an unknown codicon: ${n}`);n=e}return $N[r]=n,{id:r}}var $N,xb=_(()=>{qe();$N=Object.create(null)});var ZN,eL=_(()=>{xb();ZN={add:f("add",6e4),plus:f("plus",6e4),gistNew:f("gist-new",6e4),repoCreate:f("repo-create",6e4),lightbulb:f("lightbulb",60001),lightBulb:f("light-bulb",60001),repo:f("repo",60002),repoDelete:f("repo-delete",60002),gistFork:f("gist-fork",60003),repoForked:f("repo-forked",60003),gitPullRequest:f("git-pull-request",60004),gitPullRequestAbandoned:f("git-pull-request-abandoned",60004),recordKeys:f("record-keys",60005),keyboard:f("keyboard",60005),tag:f("tag",60006),gitPullRequestLabel:f("git-pull-request-label",60006),tagAdd:f("tag-add",60006),tagRemove:f("tag-remove",60006),person:f("person",60007),personFollow:f("person-follow",60007),personOutline:f("person-outline",60007),personFilled:f("person-filled",60007),sourceControl:f("source-control",60008),mirror:f("mirror",60009),mirrorPublic:f("mirror-public",60009),star:f("star",60010),starAdd:f("star-add",60010),starDelete:f("star-delete",60010),starEmpty:f("star-empty",60010),comment:f("comment",60011),commentAdd:f("comment-add",60011),alert:f("alert",60012),warning:f("warning",60012),search:f("search",60013),searchSave:f("search-save",60013),logOut:f("log-out",60014),signOut:f("sign-out",60014),logIn:f("log-in",60015),signIn:f("sign-in",60015),eye:f("eye",60016),eyeUnwatch:f("eye-unwatch",60016),eyeWatch:f("eye-watch",60016),circleFilled:f("circle-filled",60017),primitiveDot:f("primitive-dot",60017),closeDirty:f("close-dirty",60017),debugBreakpoint:f("debug-breakpoint",60017),debugBreakpointDisabled:f("debug-breakpoint-disabled",60017),debugHint:f("debug-hint",60017),terminalDecorationSuccess:f("terminal-decoration-success",60017),primitiveSquare:f("primitive-square",60018),edit:f("edit",60019),pencil:f("pencil",60019),info:f("info",60020),issueOpened:f("issue-opened",60020),gistPrivate:f("gist-private",60021),gitForkPrivate:f("git-fork-private",60021),lock:f("lock",60021),mirrorPrivate:f("mirror-private",60021),close:f("close",60022),removeClose:f("remove-close",60022),x:f("x",60022),repoSync:f("repo-sync",60023),sync:f("sync",60023),clone:f("clone",60024),desktopDownload:f("desktop-download",60024),beaker:f("beaker",60025),microscope:f("microscope",60025),vm:f("vm",60026),deviceDesktop:f("device-desktop",60026),file:f("file",60027),more:f("more",60028),ellipsis:f("ellipsis",60028),kebabHorizontal:f("kebab-horizontal",60028),mailReply:f("mail-reply",60029),reply:f("reply",60029),organization:f("organization",60030),organizationFilled:f("organization-filled",60030),organizationOutline:f("organization-outline",60030),newFile:f("new-file",60031),fileAdd:f("file-add",60031),newFolder:f("new-folder",60032),fileDirectoryCreate:f("file-directory-create",60032),trash:f("trash",60033),trashcan:f("trashcan",60033),history:f("history",60034),clock:f("clock",60034),folder:f("folder",60035),fileDirectory:f("file-directory",60035),symbolFolder:f("symbol-folder",60035),logoGithub:f("logo-github",60036),markGithub:f("mark-github",60036),github:f("github",60036),terminal:f("terminal",60037),console:f("console",60037),repl:f("repl",60037),zap:f("zap",60038),symbolEvent:f("symbol-event",60038),error:f("error",60039),stop:f("stop",60039),variable:f("variable",60040),symbolVariable:f("symbol-variable",60040),array:f("array",60042),symbolArray:f("symbol-array",60042),symbolModule:f("symbol-module",60043),symbolPackage:f("symbol-package",60043),symbolNamespace:f("symbol-namespace",60043),symbolObject:f("symbol-object",60043),symbolMethod:f("symbol-method",60044),symbolFunction:f("symbol-function",60044),symbolConstructor:f("symbol-constructor",60044),symbolBoolean:f("symbol-boolean",60047),symbolNull:f("symbol-null",60047),symbolNumeric:f("symbol-numeric",60048),symbolNumber:f("symbol-number",60048),symbolStructure:f("symbol-structure",60049),symbolStruct:f("symbol-struct",60049),symbolParameter:f("symbol-parameter",60050),symbolTypeParameter:f("symbol-type-parameter",60050),symbolKey:f("symbol-key",60051),symbolText:f("symbol-text",60051),symbolReference:f("symbol-reference",60052),goToFile:f("go-to-file",60052),symbolEnum:f("symbol-enum",60053),symbolValue:f("symbol-value",60053),symbolRuler:f("symbol-ruler",60054),symbolUnit:f("symbol-unit",60054),activateBreakpoints:f("activate-breakpoints",60055),archive:f("archive",60056),arrowBoth:f("arrow-both",60057),arrowDown:f("arrow-down",60058),arrowLeft:f("arrow-left",60059),arrowRight:f("arrow-right",60060),arrowSmallDown:f("arrow-small-down",60061),arrowSmallLeft:f("arrow-small-left",60062),arrowSmallRight:f("arrow-small-right",60063),arrowSmallUp:f("arrow-small-up",60064),arrowUp:f("arrow-up",60065),bell:f("bell",60066),bold:f("bold",60067),book:f("book",60068),bookmark:f("bookmark",60069),debugBreakpointConditionalUnverified:f("debug-breakpoint-conditional-unverified",60070),debugBreakpointConditional:f("debug-breakpoint-conditional",60071),debugBreakpointConditionalDisabled:f("debug-breakpoint-conditional-disabled",60071),debugBreakpointDataUnverified:f("debug-breakpoint-data-unverified",60072),debugBreakpointData:f("debug-breakpoint-data",60073),debugBreakpointDataDisabled:f("debug-breakpoint-data-disabled",60073),debugBreakpointLogUnverified:f("debug-breakpoint-log-unverified",60074),debugBreakpointLog:f("debug-breakpoint-log",60075),debugBreakpointLogDisabled:f("debug-breakpoint-log-disabled",60075),briefcase:f("briefcase",60076),broadcast:f("broadcast",60077),browser:f("browser",60078),bug:f("bug",60079),calendar:f("calendar",60080),caseSensitive:f("case-sensitive",60081),check:f("check",60082),checklist:f("checklist",60083),chevronDown:f("chevron-down",60084),chevronLeft:f("chevron-left",60085),chevronRight:f("chevron-right",60086),chevronUp:f("chevron-up",60087),chromeClose:f("chrome-close",60088),chromeMaximize:f("chrome-maximize",60089),chromeMinimize:f("chrome-minimize",60090),chromeRestore:f("chrome-restore",60091),circleOutline:f("circle-outline",60092),circle:f("circle",60092),debugBreakpointUnverified:f("debug-breakpoint-unverified",60092),terminalDecorationIncomplete:f("terminal-decoration-incomplete",60092),circleSlash:f("circle-slash",60093),circuitBoard:f("circuit-board",60094),clearAll:f("clear-all",60095),clippy:f("clippy",60096),closeAll:f("close-all",60097),cloudDownload:f("cloud-download",60098),cloudUpload:f("cloud-upload",60099),code:f("code",60100),collapseAll:f("collapse-all",60101),colorMode:f("color-mode",60102),commentDiscussion:f("comment-discussion",60103),creditCard:f("credit-card",60105),dash:f("dash",60108),dashboard:f("dashboard",60109),database:f("database",60110),debugContinue:f("debug-continue",60111),debugDisconnect:f("debug-disconnect",60112),debugPause:f("debug-pause",60113),debugRestart:f("debug-restart",60114),debugStart:f("debug-start",60115),debugStepInto:f("debug-step-into",60116),debugStepOut:f("debug-step-out",60117),debugStepOver:f("debug-step-over",60118),debugStop:f("debug-stop",60119),debug:f("debug",60120),deviceCameraVideo:f("device-camera-video",60121),deviceCamera:f("device-camera",60122),deviceMobile:f("device-mobile",60123),diffAdded:f("diff-added",60124),diffIgnored:f("diff-ignored",60125),diffModified:f("diff-modified",60126),diffRemoved:f("diff-removed",60127),diffRenamed:f("diff-renamed",60128),diff:f("diff",60129),diffSidebyside:f("diff-sidebyside",60129),discard:f("discard",60130),editorLayout:f("editor-layout",60131),emptyWindow:f("empty-window",60132),exclude:f("exclude",60133),extensions:f("extensions",60134),eyeClosed:f("eye-closed",60135),fileBinary:f("file-binary",60136),fileCode:f("file-code",60137),fileMedia:f("file-media",60138),filePdf:f("file-pdf",60139),fileSubmodule:f("file-submodule",60140),fileSymlinkDirectory:f("file-symlink-directory",60141),fileSymlinkFile:f("file-symlink-file",60142),fileZip:f("file-zip",60143),files:f("files",60144),filter:f("filter",60145),flame:f("flame",60146),foldDown:f("fold-down",60147),foldUp:f("fold-up",60148),fold:f("fold",60149),folderActive:f("folder-active",60150),folderOpened:f("folder-opened",60151),gear:f("gear",60152),gift:f("gift",60153),gistSecret:f("gist-secret",60154),gist:f("gist",60155),gitCommit:f("git-commit",60156),gitCompare:f("git-compare",60157),compareChanges:f("compare-changes",60157),gitMerge:f("git-merge",60158),githubAction:f("github-action",60159),githubAlt:f("github-alt",60160),globe:f("globe",60161),grabber:f("grabber",60162),graph:f("graph",60163),gripper:f("gripper",60164),heart:f("heart",60165),home:f("home",60166),horizontalRule:f("horizontal-rule",60167),hubot:f("hubot",60168),inbox:f("inbox",60169),issueReopened:f("issue-reopened",60171),issues:f("issues",60172),italic:f("italic",60173),jersey:f("jersey",60174),json:f("json",60175),bracket:f("bracket",60175),kebabVertical:f("kebab-vertical",60176),key:f("key",60177),law:f("law",60178),lightbulbAutofix:f("lightbulb-autofix",60179),linkExternal:f("link-external",60180),link:f("link",60181),listOrdered:f("list-ordered",60182),listUnordered:f("list-unordered",60183),liveShare:f("live-share",60184),loading:f("loading",60185),location:f("location",60186),mailRead:f("mail-read",60187),mail:f("mail",60188),markdown:f("markdown",60189),megaphone:f("megaphone",60190),mention:f("mention",60191),milestone:f("milestone",60192),gitPullRequestMilestone:f("git-pull-request-milestone",60192),mortarBoard:f("mortar-board",60193),move:f("move",60194),multipleWindows:f("multiple-windows",60195),mute:f("mute",60196),noNewline:f("no-newline",60197),note:f("note",60198),octoface:f("octoface",60199),openPreview:f("open-preview",60200),package:f("package",60201),paintcan:f("paintcan",60202),pin:f("pin",60203),play:f("play",60204),run:f("run",60204),plug:f("plug",60205),preserveCase:f("preserve-case",60206),preview:f("preview",60207),project:f("project",60208),pulse:f("pulse",60209),question:f("question",60210),quote:f("quote",60211),radioTower:f("radio-tower",60212),reactions:f("reactions",60213),references:f("references",60214),refresh:f("refresh",60215),regex:f("regex",60216),remoteExplorer:f("remote-explorer",60217),remote:f("remote",60218),remove:f("remove",60219),replaceAll:f("replace-all",60220),replace:f("replace",60221),repoClone:f("repo-clone",60222),repoForcePush:f("repo-force-push",60223),repoPull:f("repo-pull",60224),repoPush:f("repo-push",60225),report:f("report",60226),requestChanges:f("request-changes",60227),rocket:f("rocket",60228),rootFolderOpened:f("root-folder-opened",60229),rootFolder:f("root-folder",60230),rss:f("rss",60231),ruby:f("ruby",60232),saveAll:f("save-all",60233),saveAs:f("save-as",60234),save:f("save",60235),screenFull:f("screen-full",60236),screenNormal:f("screen-normal",60237),searchStop:f("search-stop",60238),server:f("server",60240),settingsGear:f("settings-gear",60241),settings:f("settings",60242),shield:f("shield",60243),smiley:f("smiley",60244),sortPrecedence:f("sort-precedence",60245),splitHorizontal:f("split-horizontal",60246),splitVertical:f("split-vertical",60247),squirrel:f("squirrel",60248),starFull:f("star-full",60249),starHalf:f("star-half",60250),symbolClass:f("symbol-class",60251),symbolColor:f("symbol-color",60252),symbolConstant:f("symbol-constant",60253),symbolEnumMember:f("symbol-enum-member",60254),symbolField:f("symbol-field",60255),symbolFile:f("symbol-file",60256),symbolInterface:f("symbol-interface",60257),symbolKeyword:f("symbol-keyword",60258),symbolMisc:f("symbol-misc",60259),symbolOperator:f("symbol-operator",60260),symbolProperty:f("symbol-property",60261),wrench:f("wrench",60261),wrenchSubaction:f("wrench-subaction",60261),symbolSnippet:f("symbol-snippet",60262),tasklist:f("tasklist",60263),telescope:f("telescope",60264),textSize:f("text-size",60265),threeBars:f("three-bars",60266),thumbsdown:f("thumbsdown",60267),thumbsup:f("thumbsup",60268),tools:f("tools",60269),triangleDown:f("triangle-down",60270),triangleLeft:f("triangle-left",60271),triangleRight:f("triangle-right",60272),triangleUp:f("triangle-up",60273),twitter:f("twitter",60274),unfold:f("unfold",60275),unlock:f("unlock",60276),unmute:f("unmute",60277),unverified:f("unverified",60278),verified:f("verified",60279),versions:f("versions",60280),vmActive:f("vm-active",60281),vmOutline:f("vm-outline",60282),vmRunning:f("vm-running",60283),watch:f("watch",60284),whitespace:f("whitespace",60285),wholeWord:f("whole-word",60286),window:f("window",60287),wordWrap:f("word-wrap",60288),zoomIn:f("zoom-in",60289),zoomOut:f("zoom-out",60290),listFilter:f("list-filter",60291),listFlat:f("list-flat",60292),listSelection:f("list-selection",60293),selection:f("selection",60293),listTree:f("list-tree",60294),debugBreakpointFunctionUnverified:f("debug-breakpoint-function-unverified",60295),debugBreakpointFunction:f("debug-breakpoint-function",60296),debugBreakpointFunctionDisabled:f("debug-breakpoint-function-disabled",60296),debugStackframeActive:f("debug-stackframe-active",60297),circleSmallFilled:f("circle-small-filled",60298),debugStackframeDot:f("debug-stackframe-dot",60298),terminalDecorationMark:f("terminal-decoration-mark",60298),debugStackframe:f("debug-stackframe",60299),debugStackframeFocused:f("debug-stackframe-focused",60299),debugBreakpointUnsupported:f("debug-breakpoint-unsupported",60300),symbolString:f("symbol-string",60301),debugReverseContinue:f("debug-reverse-continue",60302),debugStepBack:f("debug-step-back",60303),debugRestartFrame:f("debug-restart-frame",60304),debugAlt:f("debug-alt",60305),callIncoming:f("call-incoming",60306),callOutgoing:f("call-outgoing",60307),menu:f("menu",60308),expandAll:f("expand-all",60309),feedback:f("feedback",60310),gitPullRequestReviewer:f("git-pull-request-reviewer",60310),groupByRefType:f("group-by-ref-type",60311),ungroupByRefType:f("ungroup-by-ref-type",60312),account:f("account",60313),gitPullRequestAssignee:f("git-pull-request-assignee",60313),bellDot:f("bell-dot",60314),debugConsole:f("debug-console",60315),library:f("library",60316),output:f("output",60317),runAll:f("run-all",60318),syncIgnored:f("sync-ignored",60319),pinned:f("pinned",60320),githubInverted:f("github-inverted",60321),serverProcess:f("server-process",60322),serverEnvironment:f("server-environment",60323),pass:f("pass",60324),issueClosed:f("issue-closed",60324),stopCircle:f("stop-circle",60325),playCircle:f("play-circle",60326),record:f("record",60327),debugAltSmall:f("debug-alt-small",60328),vmConnect:f("vm-connect",60329),cloud:f("cloud",60330),merge:f("merge",60331),export:f("export",60332),graphLeft:f("graph-left",60333),magnet:f("magnet",60334),notebook:f("notebook",60335),redo:f("redo",60336),checkAll:f("check-all",60337),pinnedDirty:f("pinned-dirty",60338),passFilled:f("pass-filled",60339),circleLargeFilled:f("circle-large-filled",60340),circleLarge:f("circle-large",60341),circleLargeOutline:f("circle-large-outline",60341),combine:f("combine",60342),gather:f("gather",60342),table:f("table",60343),variableGroup:f("variable-group",60344),typeHierarchy:f("type-hierarchy",60345),typeHierarchySub:f("type-hierarchy-sub",60346),typeHierarchySuper:f("type-hierarchy-super",60347),gitPullRequestCreate:f("git-pull-request-create",60348),runAbove:f("run-above",60349),runBelow:f("run-below",60350),notebookTemplate:f("notebook-template",60351),debugRerun:f("debug-rerun",60352),workspaceTrusted:f("workspace-trusted",60353),workspaceUntrusted:f("workspace-untrusted",60354),workspaceUnknown:f("workspace-unknown",60355),terminalCmd:f("terminal-cmd",60356),terminalDebian:f("terminal-debian",60357),terminalLinux:f("terminal-linux",60358),terminalPowershell:f("terminal-powershell",60359),terminalTmux:f("terminal-tmux",60360),terminalUbuntu:f("terminal-ubuntu",60361),terminalBash:f("terminal-bash",60362),arrowSwap:f("arrow-swap",60363),copy:f("copy",60364),personAdd:f("person-add",60365),filterFilled:f("filter-filled",60366),wand:f("wand",60367),debugLineByLine:f("debug-line-by-line",60368),inspect:f("inspect",60369),layers:f("layers",60370),layersDot:f("layers-dot",60371),layersActive:f("layers-active",60372),compass:f("compass",60373),compassDot:f("compass-dot",60374),compassActive:f("compass-active",60375),azure:f("azure",60376),issueDraft:f("issue-draft",60377),gitPullRequestClosed:f("git-pull-request-closed",60378),gitPullRequestDraft:f("git-pull-request-draft",60379),debugAll:f("debug-all",60380),debugCoverage:f("debug-coverage",60381),runErrors:f("run-errors",60382),folderLibrary:f("folder-library",60383),debugContinueSmall:f("debug-continue-small",60384),beakerStop:f("beaker-stop",60385),graphLine:f("graph-line",60386),graphScatter:f("graph-scatter",60387),pieChart:f("pie-chart",60388),bracketDot:f("bracket-dot",60389),bracketError:f("bracket-error",60390),lockSmall:f("lock-small",60391),azureDevops:f("azure-devops",60392),verifiedFilled:f("verified-filled",60393),newline:f("newline",60394),layout:f("layout",60395),layoutActivitybarLeft:f("layout-activitybar-left",60396),layoutActivitybarRight:f("layout-activitybar-right",60397),layoutPanelLeft:f("layout-panel-left",60398),layoutPanelCenter:f("layout-panel-center",60399),layoutPanelJustify:f("layout-panel-justify",60400),layoutPanelRight:f("layout-panel-right",60401),layoutPanel:f("layout-panel",60402),layoutSidebarLeft:f("layout-sidebar-left",60403),layoutSidebarRight:f("layout-sidebar-right",60404),layoutStatusbar:f("layout-statusbar",60405),layoutMenubar:f("layout-menubar",60406),layoutCentered:f("layout-centered",60407),target:f("target",60408),indent:f("indent",60409),recordSmall:f("record-small",60410),errorSmall:f("error-small",60411),terminalDecorationError:f("terminal-decoration-error",60411),arrowCircleDown:f("arrow-circle-down",60412),arrowCircleLeft:f("arrow-circle-left",60413),arrowCircleRight:f("arrow-circle-right",60414),arrowCircleUp:f("arrow-circle-up",60415),layoutSidebarRightOff:f("layout-sidebar-right-off",60416),layoutPanelOff:f("layout-panel-off",60417),layoutSidebarLeftOff:f("layout-sidebar-left-off",60418),blank:f("blank",60419),heartFilled:f("heart-filled",60420),map:f("map",60421),mapHorizontal:f("map-horizontal",60421),foldHorizontal:f("fold-horizontal",60421),mapFilled:f("map-filled",60422),mapHorizontalFilled:f("map-horizontal-filled",60422),foldHorizontalFilled:f("fold-horizontal-filled",60422),circleSmall:f("circle-small",60423),bellSlash:f("bell-slash",60424),bellSlashDot:f("bell-slash-dot",60425),commentUnresolved:f("comment-unresolved",60426),gitPullRequestGoToChanges:f("git-pull-request-go-to-changes",60427),gitPullRequestNewChanges:f("git-pull-request-new-changes",60428),searchFuzzy:f("search-fuzzy",60429),commentDraft:f("comment-draft",60430),send:f("send",60431),sparkle:f("sparkle",60432),insert:f("insert",60433),mic:f("mic",60434),thumbsdownFilled:f("thumbsdown-filled",60435),thumbsupFilled:f("thumbsup-filled",60436),coffee:f("coffee",60437),snake:f("snake",60438),game:f("game",60439),vr:f("vr",60440),chip:f("chip",60441),piano:f("piano",60442),music:f("music",60443),micFilled:f("mic-filled",60444),repoFetch:f("repo-fetch",60445),copilot:f("copilot",60446),lightbulbSparkle:f("lightbulb-sparkle",60447),robot:f("robot",60448),sparkleFilled:f("sparkle-filled",60449),diffSingle:f("diff-single",60450),diffMultiple:f("diff-multiple",60451),surroundWith:f("surround-with",60452),share:f("share",60453),gitStash:f("git-stash",60454),gitStashApply:f("git-stash-apply",60455),gitStashPop:f("git-stash-pop",60456),vscode:f("vscode",60457),vscodeInsiders:f("vscode-insiders",60458),codeOss:f("code-oss",60459),runCoverage:f("run-coverage",60460),runAllCoverage:f("run-all-coverage",60461),coverage:f("coverage",60462),githubProject:f("github-project",60463),mapVertical:f("map-vertical",60464),foldVertical:f("fold-vertical",60464),mapVerticalFilled:f("map-vertical-filled",60465),foldVerticalFilled:f("fold-vertical-filled",60465),goToSearch:f("go-to-search",60466),percentage:f("percentage",60467),sortPercentage:f("sort-percentage",60467),attach:f("attach",60468),goToEditingSession:f("go-to-editing-session",60469),editSession:f("edit-session",60470),codeReview:f("code-review",60471),copilotWarning:f("copilot-warning",60472),python:f("python",60473),copilotLarge:f("copilot-large",60474),copilotWarningLarge:f("copilot-warning-large",60475),keyboardTab:f("keyboard-tab",60476),copilotBlocked:f("copilot-blocked",60477),copilotNotConnected:f("copilot-not-connected",60478),flag:f("flag",60479),lightbulbEmpty:f("lightbulb-empty",60480),symbolMethodArrow:f("symbol-method-arrow",60481),copilotUnavailable:f("copilot-unavailable",60482),repoPinned:f("repo-pinned",60483),keyboardTabAbove:f("keyboard-tab-above",60484),keyboardTabBelow:f("keyboard-tab-below",60485),gitPullRequestDone:f("git-pull-request-done",60486),mcp:f("mcp",60487),extensionsLarge:f("extensions-large",60488),layoutPanelDock:f("layout-panel-dock",60489),layoutSidebarLeftDock:f("layout-sidebar-left-dock",60490),layoutSidebarRightDock:f("layout-sidebar-right-dock",60491),copilotInProgress:f("copilot-in-progress",60492),copilotError:f("copilot-error",60493),copilotSuccess:f("copilot-success",60494),chatSparkle:f("chat-sparkle",60495),searchSparkle:f("search-sparkle",60496),editSparkle:f("edit-sparkle",60497),copilotSnooze:f("copilot-snooze",60498),sendToRemoteAgent:f("send-to-remote-agent",60499),commentDiscussionSparkle:f("comment-discussion-sparkle",60500),chatSparkleWarning:f("chat-sparkle-warning",60501),chatSparkleError:f("chat-sparkle-error",60502),collection:f("collection",60503),newCollection:f("new-collection",60504),thinking:f("thinking",60505),build:f("build",60506),commentDiscussionQuote:f("comment-discussion-quote",60507),cursor:f("cursor",60508),eraser:f("eraser",60509),fileText:f("file-text",60510),quotes:f("quotes",60512),rename:f("rename",60513),runWithDeps:f("run-with-deps",60514),debugConnected:f("debug-connected",60515),strikethrough:f("strikethrough",60516),openInProduct:f("open-in-product",60517),indexZero:f("index-zero",60518),agent:f("agent",60519),editCode:f("edit-code",60520),repoSelected:f("repo-selected",60521),skip:f("skip",60522),mergeInto:f("merge-into",60523),gitBranchChanges:f("git-branch-changes",60524),gitBranchStagedChanges:f("git-branch-staged-changes",60525),gitBranchConflicts:f("git-branch-conflicts",60526),gitBranch:f("git-branch",60527),gitBranchCreate:f("git-branch-create",60527),gitBranchDelete:f("git-branch-delete",60527),searchLarge:f("search-large",60528),terminalGitBash:f("terminal-git-bash",60529),windowActive:f("window-active",60530),forward:f("forward",60531),download:f("download",60532),clockface:f("clockface",60533),unarchive:f("unarchive",60534),sessionInProgress:f("session-in-progress",60535),collectionSmall:f("collection-small",60536),vmSmall:f("vm-small",60537),cloudSmall:f("cloud-small",60538),addSmall:f("add-small",60539),removeSmall:f("remove-small",60540),worktreeSmall:f("worktree-small",60541),worktree:f("worktree",60542),screenCut:f("screen-cut",60543),ask:f("ask",60544),openai:f("openai",60545),claude:f("claude",60546),openInWindow:f("open-in-window",60547),newSession:f("new-session",60548),cascade:f("cascade",63742),cascadeBrowser:f("cascade-browser",63743),deepwiki:f("deepwiki",63744)}});function Db(){return Object.values(xt)}var t7,xt,rf=_(()=>{xb();eL();t7={dialogError:f("dialog-error","error"),dialogWarning:f("dialog-warning","warning"),dialogInfo:f("dialog-info","info"),dialogClose:f("dialog-close","close"),treeItemExpanded:f("tree-item-expanded","chevron-down"),treeFilterOnTypeOn:f("tree-filter-on-type-on","list-filter"),treeFilterOnTypeOff:f("tree-filter-on-type-off","list-selection"),treeFilterClear:f("tree-filter-clear","close"),treeItemLoading:f("tree-item-loading","loading"),menuSelection:f("menu-selection","check"),menuSubmenu:f("menu-submenu","chevron-right"),menuBarMore:f("menubar-more","more"),scrollbarButtonLeft:f("scrollbar-button-left","triangle-left"),scrollbarButtonRight:f("scrollbar-button-right","triangle-right"),scrollbarButtonUp:f("scrollbar-button-up","triangle-up"),scrollbarButtonDown:f("scrollbar-button-down","triangle-down"),toolBarMore:f("toolbar-more","more"),quickInputBack:f("quick-input-back","arrow-left"),dropDownButton:f("drop-down-button",60084),symbolCustomColor:f("symbol-customcolor",60252),exportIcon:f("export",60332),workspaceUnspecified:f("workspace-unspecified",60355),newLine:f("newline",60394),thumbsDownFilled:f("thumbsdown-filled",60435),thumbsUpFilled:f("thumbsup-filled",60436),gitFetch:f("git-fetch",60445),lightbulbSparkleAutofix:f("lightbulb-sparkle-autofix",60447),debugBreakpointPending:f("debug-breakpoint-pending",60377)},xt={...ZN,...t7}});var tL,Cd,Ob=_(()=>{rf();(n=>{function r(e){return!!e&&typeof e=="object"&&typeof e.id=="string"}n.isThemeColor=r})(tL||={});(T=>{T.iconNameSegment="[A-Za-z0-9]+",T.iconNameExpression="[A-Za-z0-9-]+",T.iconModifierExpression="~[A-Za-z]+",T.iconNameCharacter="[A-Za-z0-9~-]";let i=new RegExp(`^(${T.iconNameExpression})(${T.iconModifierExpression})?$`);function o(k){let U=i.exec(k.id);if(!U)return o(xt.error);let[,O,B]=U,he=["codicon","codicon-"+O];return B&&he.push("codicon-modifier-"+B.substring(1)),he}T.asClassNameArray=o;function s(k){return o(k).join(" ")}T.asClassName=s;function a(k){return"."+o(k).join(".")}T.asCSSSelector=a;function l(k){return!!k&&typeof k=="object"&&typeof k.id=="string"&&(typeof k.color>"u"||tL.isThemeColor(k.color))}T.isThemeIcon=l;let c=new RegExp(`^\\$\\((${T.iconNameExpression}(?:${T.iconModifierExpression})?)\\)$`);function u(k){let U=c.exec(k);if(!U)return;let[,O]=U;return{id:O}}T.fromString=u;function p(k){return{id:k}}T.fromId=p;function m(k,U){let O=k.id,B=O.lastIndexOf("~");return B!==-1&&(O=O.substring(0,B)),U&&(O=`${O}~${U}`),{id:O}}T.modify=m;function h(k){let U=k.id.lastIndexOf("~");if(U!==-1)return k.id.substring(U+1)}T.getModifier=h;function E(k,U){return k.id===U.id&&k.color?.id===U.color?.id}T.isEqual=E;function y(k){return k?.id===xt.file.id}T.isFile=y;function P(k){return k?.id===xt.folder.id}T.isFolder=P})(Cd||={})});import Nr,{screen as r7}from"electron";import{release as nL}from"os";var kb,of,ll,Nb,Lb=_(()=>{Ce();Bt();_s();ae();te();at();Bi();ce();Ie();We();Hc();_t();Ka();$t();rd();ct();Vt();me();In();Cv();XN();bm();Tn();Ob();kc();qo();zt();Ln();Bs();oo();Di();vr();Us();vd();de();Et();rt();ob();k_();kb=class r{constructor(){this.windows=new Set}static{this.INSTANCE=new r}acquireBadge(n){return this.windows.add(n.id),Nr.app.setBadgeCount(fe?1:void 0),{dispose:()=>{this.windows.delete(n.id),this.windows.size===0&&Nr.app.setBadgeCount(0)}}}},of=class r extends M{constructor(e,t,i,o){super();this.configurationService=e;this.stateService=t;this.environmentMainService=i;this.logService=o;this._onDidClose=this._register(new C);this.onDidClose=this._onDidClose.event;this._onDidMaximize=this._register(new C);this.onDidMaximize=this._onDidMaximize.event;this._onDidUnmaximize=this._register(new C);this.onDidUnmaximize=this._onDidUnmaximize.event;this._onDidTriggerSystemContextMenu=this._register(new C);this.onDidTriggerSystemContextMenu=this._onDidTriggerSystemContextMenu.event;this._onDidEnterFullScreen=this._register(new C);this.onDidEnterFullScreen=this._onDidEnterFullScreen.event;this._onDidLeaveFullScreen=this._register(new C);this.onDidLeaveFullScreen=this._onDidLeaveFullScreen.event;this._onDidChangeAlwaysOnTop=this._register(new C);this.onDidChangeAlwaysOnTop=this._onDidChangeAlwaysOnTop.event;this._lastFocusTime=Date.now();this._win=null;this.notifyFocusDisposable=this._register(new yn);this.windowControlsDimmed=!1;this.transientIsNativeFullScreen=void 0;this.joinNativeFullScreenTransition=void 0}get lastFocusTime(){return this._lastFocusTime}get win(){return this._win}setWin(e,t){this._win=e,this._register(x.fromNodeEventEmitter(e,"maximize")(()=>{if(q&&this.environmentMainService.enableRDPDisplayTracking&&this._win){let[o,s]=this._win.getPosition(),[a,l]=this._win.getSize();this.maximizedWindowState={mode:0,width:a,height:l,x:o,y:s},this.logService.debug(`Saved maximized window ${this.id} display state:`,this.maximizedWindowState)}this._onDidMaximize.fire()})),this._register(x.fromNodeEventEmitter(e,"unmaximize")(()=>{q&&this.environmentMainService.enableRDPDisplayTracking&&this.maximizedWindowState&&(this.maximizedWindowState=void 0,this.logService.debug(`Cleared maximized window ${this.id} state`)),this._onDidUnmaximize.fire()})),this._register(x.fromNodeEventEmitter(e,"closed")(()=>{this._onDidClose.fire(),this.dispose()})),this._register(x.fromNodeEventEmitter(e,"focus")(()=>{this.clearNotifyFocus(),this._lastFocusTime=Date.now()})),this._register(x.fromNodeEventEmitter(this._win,"enter-full-screen")(()=>this._onDidEnterFullScreen.fire())),this._register(x.fromNodeEventEmitter(this._win,"leave-full-screen")(()=>this._onDidLeaveFullScreen.fire())),this._register(x.fromNodeEventEmitter(this._win,"always-on-top-changed",(o,s)=>s)(o=>this._onDidChangeAlwaysOnTop.fire(o)));let i=!Os(this.configurationService,t?.titleBarStyle==="hidden"?"custom":void 0);if($&&i&&e.setSheetOffset(nS(nL())?32:28),i&&Im(this.configurationService)){let o=this.stateService.getItem(r.windowControlHeightStateStorageKey);o?this.updateWindowControls({height:o}):this.updateWindowControls({height:PO})}(q||fe)&&i&&this._register(x.fromNodeEventEmitter(e,"system-context-menu",(o,s)=>({event:o,point:s}))(o=>{let[s,a]=e.getPosition(),l=Nr.screen.screenToDipPoint(o.point),c=Math.floor(l.x)-s,u=Math.floor(l.y)-a;fe&&c>35&&(o.event.preventDefault(),this._onDidTriggerSystemContextMenu.fire({x:c,y:u}))})),this.environmentMainService.args["open-devtools"]===!0&&e.webContents.openDevTools(),$&&(this._register(this.onDidEnterFullScreen(()=>{this.joinNativeFullScreenTransition?.complete(!0)})),this._register(this.onDidLeaveFullScreen(()=>{this.joinNativeFullScreenTransition?.complete(!0)}))),q&&this.environmentMainService.enableRDPDisplayTracking&&this._register(x.fromNodeEventEmitter(r7,"display-added",(o,s)=>({event:o,display:s}))(o=>{this.onDisplayAdded(o.display)}))}onDisplayAdded(e){let t=this.maximizedWindowState;t&&this._win&&Lc.validateWindowStateOnDisplay(t,e)&&(this.logService.debug(`Setting maximized window ${this.id} bounds to match newly added display`,t),this._win.setBounds(t))}applyState(e,t=Nr.screen.getAllDisplays().length>0){let i=this.configurationService.getValue("window"),o=$&&i?.nativeTabs===!0;($||q)&&t&&(!o||ao().length===1)&&[e.width,e.height,e.x,e.y].every(s=>typeof s=="number")&&this._win?.setBounds({width:e.width,height:e.height,x:e.x,y:e.y}),(e.mode===0||e.mode===3)&&(this._win?.maximize(),e.mode===3&&this.setFullScreen(!0,!0),this._win?.show())}setRepresentedFilename(e){$?this.win?.setRepresentedFilename(e):this.representedFilename=e}getRepresentedFilename(){return $?this.win?.getRepresentedFilename():this.representedFilename}setDocumentEdited(e){$&&this.win?.setDocumentEdited(e),this.documentEdited=e}isDocumentEdited(){return $?!!this.win?.isDocumentEdited():!!this.documentEdited}focus(e){switch(e?.mode??0){case 0:this.doFocusWindow();break;case 1:this.showNotifyFocus();break;case 2:$&&Nr.app.focus({steal:!0}),this.doFocusWindow();break}}showNotifyFocus(){let e=new ue;this.notifyFocusDisposable.value=e,e.add(kb.INSTANCE.acquireBadge(this)),q||fe?(this.win?.flashFrame(!0),e.add(oe(()=>this.win?.flashFrame(!1)))):$&&Nr.app.dock?.bounce("informational")}clearNotifyFocus(){this.notifyFocusDisposable.clear()}doFocusWindow(){let e=this.win;e&&(e.isMinimized()&&e.restore(),e.focus(),e.webContents.focus())}static{this.windowControlHeightStateStorageKey="windowControlHeight"}updateWindowControls(e){let t=this.win;if(t){if(e.height&&this.stateService.setItem(ll.windowControlHeightStateStorageKey,e.height),!$&&Im(this.configurationService)){e.dimmed!==void 0&&(this.windowControlsDimmed=e.dimmed);let i=e.backgroundColor??this.lastWindowControlColors?.backgroundColor,o=e.foregroundColor??this.lastWindowControlColors?.foregroundColor;(e.backgroundColor!==void 0||e.foregroundColor!==void 0)&&(this.lastWindowControlColors={backgroundColor:i,foregroundColor:o});let s=this.windowControlsDimmed&&i?this.dimColor(i):i,a=this.windowControlsDimmed&&o?this.dimColor(o):o;t.setTitleBarOverlay({color:s?.trim()===""?void 0:s,symbolColor:a?.trim()===""?void 0:a,height:e.height?e.height-1:void 0})}else if($&&e.height!==void 0){let i=nS(nL())?14:16,o=Math.floor((e.height-i)/2);o?t.setWindowButtonPosition({x:o+1,y:o}):t.setWindowButtonPosition(null)}}}dimColor(e){let t=Ls.Format.CSS.parse(e);if(!t)return e;let i=.7,o=Math.round(t.rgba.r*i),s=Math.round(t.rgba.g*i),a=Math.round(t.rgba.b*i);return`rgb(${o}, ${s}, ${a})`}toggleFullScreen(){this.setFullScreen(!this.isFullScreen,!1)}setFullScreen(e,t){Qh(this.configurationService)?this.setNativeFullScreen(e,t):this.setSimpleFullScreen(e)}get isFullScreen(){if($&&typeof this.transientIsNativeFullScreen=="boolean")return this.transientIsNativeFullScreen;let e=this.win,t=e?.isFullScreen(),i=e?.isSimpleFullScreen();return!!(t||i)}setNativeFullScreen(e,t){let i=this.win;i?.isSimpleFullScreen()&&i?.setSimpleFullScreen(!1),this.doSetNativeFullScreen(e,t)}doSetNativeFullScreen(e,t){if($){this.transientIsNativeFullScreen=e;let o=this.joinNativeFullScreenTransition=new un;(async()=>{let s=await Promise.race([o.p,bt(1e4).then(()=>!1)]);this.joinNativeFullScreenTransition===o&&(this.transientIsNativeFullScreen=void 0,this.joinNativeFullScreenTransition=void 0,!s&&e&&t&&this.win&&!this.win.isFullScreen()&&(this.logService.warn("window: native macOS fullscreen transition did not happen within 10s from restoring"),this._onDidLeaveFullScreen.fire()))})()}this.win?.setFullScreen(e)}setSimpleFullScreen(e){let t=this.win;t?.isFullScreen()&&this.doSetNativeFullScreen(!1,!1),t?.setSimpleFullScreen(e),t?.webContents.focus()}dispose(){super.dispose(),this._win=null}},ll=class extends of{constructor(e,t,i,o,s,a,l,c,u,p,m,h,E,y,P,T,k,U,O,B,he){super(p,B,o,t);this.loggerMainService=i;this.policyService=s;this.userDataProfilesService=a;this.fileService=l;this.applicationStorageMainService=c;this.storageMainService=u;this.themeMainService=m;this.workspacesManagementMainService=h;this.backupMainService=E;this.telemetryService=y;this.dialogMainService=P;this.lifecycleMainService=T;this.productService=k;this.windowsMainService=O;this._onWillLoad=this._register(new C);this.onWillLoad=this._onWillLoad.event;this._onDidSignalReady=this._register(new C);this.onDidSignalReady=this._onDidSignalReady.event;this._onDidDestroy=this._register(new C);this.onDidDestroy=this._onDidDestroy.event;this.whenReadyCallbacks=[];this.touchBarGroups=[];this.currentHttpProxy=void 0;this.currentNoProxy=void 0;this.customZoomLevel=void 0;this.wasLoaded=!1;this.readyState=0;this.swipeListenerDisposable=this._register(new yn);{this.configObjectUrl=this._register(U.createIPCObjectUrl());let[ne,De]=this.restoreWindowState(e.state);this.windowState=ne,this.logService.trace("window#ctor: using window state",ne);let ht=he.invokeFunction(Nc,this.windowState,void 0,{preload:gt.asFileUri("vs/base/parts/sandbox/electron-browser/preload.js").fsPath,additionalArguments:[`--vscode-window-config=${this.configObjectUrl.resource.toString()}`],v8CacheOptions:this.environmentMainService.useCodeCache?"bypassHeatCheck":"none"});tt("code/willCreateCodeBrowserWindow"),this._win=new Nr.BrowserWindow(ht),tt("code/didCreateCodeBrowserWindow"),this._id=this._win.id,this.setWin(this._win,ht),this.applyState(this.windowState,De),this._lastFocusTime=Date.now()}let Q=parseInt(this.environmentMainService.args["unresponsive-sample-interval"]||"1000"),le=parseInt(this.environmentMainService.args["unresponsive-sample-period"]||"15000");(Q<=0||le<=0||Q>le)&&(this.logService.warn(`Invalid unresponsive sample interval (${Q}ms) or period (${le}ms), using defaults.`),Q=1e3,le=15e3),this.jsCallStackMap=new Map,this.jsCallStackEffectiveSampleCount=Math.round(le/Q),this.jsCallStackCollector=this._register(new Pa(Q)),this.jsCallStackCollectorStopScheduler=this._register(new On(()=>{this.stopCollectingJScallStacks()},le)),this.onConfigurationUpdated(),this.createTouchBar(),this.registerListeners()}get id(){return this._id}get backupPath(){return this._config?.backupPath}get openedWorkspace(){return this._config?.workspace}get profile(){if(!this.config)return;let e=this.userDataProfilesService.profiles.find(t=>t.id===this.config?.profiles.profile.id);return this.isExtensionDevelopmentHost&&e?e:this.userDataProfilesService.getProfileForWorkspace(this.config.workspace??Ds(this.backupPath,this.isExtensionDevelopmentHost))??this.userDataProfilesService.defaultProfile}get remoteAuthority(){return this._config?.remoteAuthority}get config(){return this._config}get isExtensionDevelopmentHost(){return!!this._config?.extensionDevelopmentPath}get isExtensionTestHost(){return!!this._config?.extensionTestsPath}get isExtensionDevelopmentTestFromCli(){return this.isExtensionDevelopmentHost&&this.isExtensionTestHost&&!this._config?.debugId}setReady(){for(this.logService.trace(`window#load: window reported ready (id: ${this._id})`),this.readyState=2;this.whenReadyCallbacks.length;)this.whenReadyCallbacks.pop()(this);this._onDidSignalReady.fire()}ready(){return new Promise(e=>{if(this.isReady)return e(this);this.whenReadyCallbacks.push(e)})}get isReady(){return this.readyState===2}get whenClosedOrLoaded(){return new Promise(e=>{function t(){i.dispose(),o.dispose(),e()}let i=this.onDidClose(()=>t()),o=this.onWillLoad(()=>t())})}registerListeners(){this._register(x.fromNodeEventEmitter(this._win,"unresponsive")(()=>this.onWindowError(1))),this._register(x.fromNodeEventEmitter(this._win,"responsive")(()=>this.onWindowError(4))),this._register(x.fromNodeEventEmitter(this._win.webContents,"render-process-gone",(t,i)=>i)(t=>this.onWindowError(2,{...t}))),this._register(x.fromNodeEventEmitter(this._win.webContents,"did-fail-load",(t,i,o)=>({exitCode:i,reason:o}))(({exitCode:t,reason:i})=>this.onWindowError(3,{reason:i,exitCode:t}))),this._register(x.fromNodeEventEmitter(this._win.webContents,"will-prevent-unload")(t=>t.preventDefault())),this._register(x.fromNodeEventEmitter(this._win.webContents,"did-finish-load")(()=>{this.pendingLoadConfig&&(this._config=this.pendingLoadConfig,this.pendingLoadConfig=void 0)})),this._register(this.onDidMaximize(()=>{this._config&&(this._config.maximized=!0)})),this._register(this.onDidUnmaximize(()=>{this._config&&(this._config.maximized=!1)})),this._register(this.onDidEnterFullScreen(()=>{this.sendWhenReady("vscode:enterFullScreen",Le.None)})),this._register(this.onDidLeaveFullScreen(()=>{this.sendWhenReady("vscode:leaveFullScreen",Le.None)})),this._register(x.fromNodeEventEmitter(this._win.webContents,"devtools-open-url",(t,i)=>i)(t=>{this.onDevToolsOpenUrl(t)})),this._register(this.configurationService.onDidChangeConfiguration(t=>this.onConfigurationUpdated(t))),this._register(this.workspacesManagementMainService.onDidDeleteUntitledWorkspace(t=>this.onDidDeleteUntitledWorkspace(t)));let e=["https://*.vsassets.io/*"];if(this.productService.extensionsGallery?.serviceUrl){let t=A.parse(this.productService.extensionsGallery.serviceUrl);e.push(`${t.scheme}://${t.authority}/*`)}this._win.webContents.session.webRequest.onBeforeSendHeaders({urls:e},async(t,i)=>{let o=await this.getMarketplaceHeaders();i({cancel:!1,requestHeaders:Object.assign(t.requestHeaders,o)})})}onDevToolsOpenUrl(e){if(!e.startsWith("file:///"))return;let i=A.parse(e).fsPath,o,s,a=/^(.+?):(\d+)(?::(\d+))?$/.exec(i);a&&a[1]&&(i=a[1],o=parseInt(a[2]),s=a[3]?parseInt(a[3]):void 0);let l=A.file(i),c=o?{selection:{startLineNumber:o,startColumn:s??1,endLineNumber:o,endColumn:s??1}}:void 0;this.sendWhenReady("vscode:openFiles",Le.None,{filesToOpenOrCreate:[{fileUri:l.toJSON(),options:c}]})}getMarketplaceHeaders(){return this.marketplaceHeadersPromise||(this.marketplaceHeadersPromise=QN(this.productService.version,this.productService,this.environmentMainService,this.configurationService,this.fileService,this.applicationStorageMainService,this.telemetryService)),this.marketplaceHeadersPromise}async onWindowError(e,t){switch(e){case 2:this.logService.error(`CodeWindow: renderer process gone (reason: ${t?.reason||"<unknown>"}, code: ${t?.exitCode||"<unknown>"})`);break;case 1:this.logService.error("CodeWindow: detected unresponsive");break;case 4:this.logService.error("CodeWindow: recovered from unresponsive");break;case 3:this.logService.error(`CodeWindow: failed to load (reason: ${t?.reason||"<unknown>"}, code: ${t?.exitCode||"<unknown>"})`);break}switch(this.telemetryService.publicLog2("windowerror",{type:e,reason:t?.reason,code:t?.exitCode}),e){case 1:case 2:if(this.isExtensionDevelopmentTestFromCli){this.lifecycleMainService.kill(1);return}if(this.environmentMainService.args["enable-smoke-test-driver"]){await this.destroyWindow(!1,!1),this.lifecycleMainService.quit();return}if(e===1){if(this.isExtensionDevelopmentHost||this.isExtensionTestHost||this._win?.webContents?.isDevToolsOpened())return;this.jsCallStackCollector.trigger(()=>this.startCollectingJScallStacks()),this.jsCallStackCollectorStopScheduler.schedule();let{response:i,checkboxChecked:o}=await this.dialogMainService.showMessageBox({type:"warning",buttons:[v(2735,null),v(2731,null),v(2736,null)],message:v(2729,null),detail:v(2730,null),checkboxLabel:this._config?.workspace?v(2732,null):void 0},this._win);if(i!==2){let s=i===0;this.stopCollectingJScallStacks(),await this.destroyWindow(s,o)}}else if(e===2){let i;t?i=v(2727,null,t.reason,t.exitCode??"<unknown>"):i=v(2725,null);let{response:o,checkboxChecked:s}=await this.dialogMainService.showMessageBox({type:"warning",buttons:[this._config?.workspace?v(2735,null):v(2734,null),v(2731,null)],message:i,detail:this._config?.workspace?v(2728,null):v(2726,null),checkboxLabel:this._config?.workspace?v(2732,null):void 0},this._win),a=o===0;await this.destroyWindow(a,s)}break;case 4:this.stopCollectingJScallStacks();break}}async destroyWindow(e,t){let i=this._config?.workspace;if(t&&i)try{let o=this.storageMainService.workspaceStorage(i);await o.init(),o.delete("memento/workbench.parts.editor"),await o.close()}catch(o){this.logService.error(o)}this._onDidDestroy.fire();try{if(e&&this._config){let o,s;Kt(i)?o={folderUri:i.uri}:yt(i)?o={workspaceUri:i.configPath}:s=!0,(await this.windowsMainService.open({context:5,userEnv:this._config.userEnv,cli:{...this.environmentMainService.args,_:[]},urisToOpen:o?[o]:void 0,forceEmpty:s,forceNewWindow:!0,remoteAuthority:this.remoteAuthority})).at(0)?.focus()}}finally{this._win?.destroy()}}onDidDeleteUntitledWorkspace(e){this._config?.workspace?.id===e.id&&(this._config.workspace=void 0)}onConfigurationUpdated(e){if($&&(!e||e.affectsConfiguration("workbench.editor.swipeToNavigate"))&&(this.configurationService.getValue("workbench.editor.swipeToNavigate")?this.registerSwipeListener():this.swipeListenerDisposable.clear()),!e||e.affectsConfiguration("window.menuBarVisibility")){let t=this.getMenuBarVisibility();t!==this.currentMenuBarVisibility&&(this.currentMenuBarVisibility=t,this.setMenuBarVisibility(t))}if(!e||e.affectsConfiguration("http.proxy")||e.affectsConfiguration("http.noProxy")){let i=(this.configurationService.inspect("http.proxy").userLocalValue||"").trim()||(process.env.https_proxy||process.env.HTTPS_PROXY||process.env.http_proxy||process.env.HTTP_PROXY||"").trim()||void 0;if(i?.indexOf("@")!==-1){let s=A.parse(i),a=s.authority.indexOf("@");a!==-1&&(i=s.with({authority:s.authority.substring(a+1)}).toString())}i?.endsWith("/")&&(i=i.substr(0,i.length-1));let o=(this.configurationService.getValue("http.noProxy")||[]).map(s=>s.trim()).join(",")||(process.env.no_proxy||process.env.NO_PROXY||"").trim()||void 0;if((i||"").indexOf("@")===-1&&(i!==this.currentHttpProxy||o!==this.currentNoProxy)){this.currentHttpProxy=i,this.currentNoProxy=o;let s=i||"",a=o?`${o},<local>`:"<local>";this.logService.trace(`Setting proxy to '${s}', bypassing '${a}'`),this._win.webContents.session.setProxy({proxyRules:s,proxyBypassRules:a,pacScript:""}),Nr.app.setProxy({proxyRules:s,proxyBypassRules:a,pacScript:""})}}}registerSwipeListener(){this.swipeListenerDisposable.value=x.fromNodeEventEmitter(this._win,"swipe",(e,t)=>t)(e=>{this.isReady&&(e==="left"?this.send("vscode:runAction",{id:"workbench.action.openPreviousRecentlyUsedEditor",from:"mouse"}):e==="right"&&this.send("vscode:runAction",{id:"workbench.action.openNextRecentlyUsedEditor",from:"mouse"}))})}addTabbedWindow(e){$&&e.win&&this._win.addTabbedWindow(e.win)}load(e,t=Object.create(null)){this.logService.trace(`window#load: attempt to load window (id: ${this._id})`),this.isDocumentEdited()&&(!t.isReload||!this.backupMainService.isHotExitEnabled())&&this.setDocumentEdited(!1),t.isReload||(this.getRepresentedFilename()&&this.setRepresentedFilename(""),this._win.setTitle(this.productService.nameLong)),this.updateConfiguration(e,t),this.readyState===0?this._config=e:this.pendingLoadConfig=e,this.readyState=1;let i;process.env.VSCODE_DEV&&process.env.VSCODE_DEV_SERVER_URL?i=process.env.VSCODE_DEV_SERVER_URL:e.isSessionsWindow?i=gt.asBrowserUri(`vs/sessions/electron-browser/sessions${this.environmentMainService.isBuilt?"":"-dev"}.html`).toString(!0):i=gt.asBrowserUri(`vs/code/electron-browser/workbench/workbench${this.environmentMainService.isBuilt?"":"-dev"}.html`).toString(!0),this._win.loadURL(i);let o=this.wasLoaded;this.wasLoaded=!0,!this.environmentMainService.isBuilt&&!this.environmentMainService.extensionTestsLocationURI&&this._register(new On(()=>{this._win&&!this._win.isVisible()&&!this._win.isMinimized()&&(this._win.show(),this.focus({mode:2}),this._win.webContents.openDevTools())},1e4)).schedule(),this._onWillLoad.fire({workspace:e.workspace,reason:t.isReload?3:o?2:1})}updateConfiguration(e,t){let i=(this._config??this.pendingLoadConfig)?.userEnv;if(i){let o=Ri(i)&&!Ri(e.userEnv),s=this.isExtensionDevelopmentHost;(o||s)&&(e.userEnv={...i,...e.userEnv})}process.env.CHROME_CRASHPAD_PIPE_NAME&&Object.assign(e.userEnv,{CHROME_CRASHPAD_PIPE_NAME:process.env.CHROME_CRASHPAD_PIPE_NAME}),t.disableExtensions!==void 0&&(e["disable-extensions"]=t.disableExtensions);try{e.handle=ee.wrap(this._win.getNativeWindowHandle())}catch(o){this.logService.error(`Error getting native window handle: ${o}`)}e.fullscreen=this.isFullScreen,e.maximized=this._win.isMaximized(),e.partsSplash=this.themeMainService.getWindowSplash(e.workspace),e.zoomLevel=this.getZoomLevel(),e.isCustomZoomLevel=typeof this.customZoomLevel=="number",e.isCustomZoomLevel&&e.partsSplash&&(e.partsSplash.zoomLevel=e.zoomLevel),tt("code/willOpenNewWindow"),e.perfMarks=sg(),this.configObjectUrl.update(e)}async reload(e){let t=Object.assign({},this._config);t.workspace=await this.validateWorkspaceBeforeReload(t),delete t.filesToOpenOrCreate,delete t.filesToDiff,delete t.filesToMerge,delete t.filesToWait,this.isExtensionDevelopmentHost&&e&&(t.verbose=e.verbose,t.debugId=e.debugId,t.extensionEnvironment=e.extensionEnvironment,t["inspect-extensions"]=e["inspect-extensions"],t["inspect-brk-extensions"]=e["inspect-brk-extensions"],t["extensions-dir"]=e["extensions-dir"]),t.accessibilitySupport=Nr.app.isAccessibilitySupportEnabled(),t.isInitialStartup=!1,t.policiesData=this.policyService.serialize(),t.continueOn=this.environmentMainService.continueOn,t.profiles={all:this.userDataProfilesService.profiles,profile:this.profile||this.userDataProfilesService.defaultProfile,home:this.userDataProfilesService.profilesHome},t.logLevel=this.loggerMainService.getLogLevel(),t.loggers=this.loggerMainService.getGlobalLoggers(),this.load(t,{isReload:!0,disableExtensions:e?.["disable-extensions"]})}async validateWorkspaceBeforeReload(e){if(yt(e.workspace)){let t=e.workspace.configPath;if(t.scheme===Y.file&&!await this.fileService.exists(t))return}else if(Kt(e.workspace)){let t=e.workspace.uri;if(t.scheme===Y.file&&!await this.fileService.exists(t))return}return e.workspace}serializeWindowState(){if(!this._win)return io();if(this.isFullScreen){let i;try{i=Nr.screen.getDisplayMatching(this.getBounds())}catch{}let o=io();return{mode:3,display:i?i.id:void 0,width:this.windowState.width||o.width,height:this.windowState.height||o.height,x:this.windowState.x||0,y:this.windowState.y||0,zoomLevel:this.customZoomLevel}}let e=Object.create(null),t;if(!$&&this._win.isMaximized()?t=0:t=1,t===0?e.mode=0:e.mode=1,t===1||t===0){let i;t===1?i=this.getBounds():i=this._win.getNormalBounds(),e.x=i.x,e.y=i.y,e.width=i.width,e.height=i.height}return e.zoomLevel=this.customZoomLevel,e}restoreWindowState(e){tt("code/willRestoreCodeWindowState");let t=!1;if(e){this.customZoomLevel=e.zoomLevel;try{let i=Nr.screen.getAllDisplays();t=i.length>1,e=Lc.validateWindowState(this.logService,e,i)}catch(i){this.logService.warn(`Unexpected error validating window state: ${i}
${i.stack}`)}}return tt("code/didRestoreCodeWindowState"),[e||io(),t]}getBounds(){let[e,t]=this._win.getPosition(),[i,o]=this._win.getSize();return{x:e,y:t,width:i,height:o}}setFullScreen(e,t){super.setFullScreen(e,t),this.sendWhenReady(e?"vscode:enterFullScreen":"vscode:leaveFullScreen",Le.None),this.currentMenuBarVisibility&&this.setMenuBarVisibility(this.currentMenuBarVisibility,!1)}getMenuBarVisibility(){let e=bO(this.configurationService);return["visible","toggle","hidden"].indexOf(e)<0&&(e="classic"),e}setMenuBarVisibility(e,t=!0){$||(e==="toggle"&&t&&this.send("vscode:showInfoMessage",v(2733,null)),e==="hidden"?setTimeout(()=>{this.doSetMenuBarVisibility(e)}):this.doSetMenuBarVisibility(e))}doSetMenuBarVisibility(e){let t=this.isFullScreen;switch(e){case"classic":this._win.setMenuBarVisibility(!t),this._win.autoHideMenuBar=t;break;case"visible":this._win.setMenuBarVisibility(!0),this._win.autoHideMenuBar=!1;break;case"toggle":this._win.setMenuBarVisibility(!1),this._win.autoHideMenuBar=!0;break;case"hidden":this._win.setMenuBarVisibility(!1),this._win.autoHideMenuBar=!1;break}}notifyZoomLevel(e){this.customZoomLevel=e}getZoomLevel(){return typeof this.customZoomLevel=="number"?this.customZoomLevel:this.configurationService.getValue("window")?.zoomLevel}close(){this._win?.close()}sendWhenReady(e,t,...i){this.isReady?this.send(e,...i):this.ready().then(()=>{t.isCancellationRequested||this.send(e,...i)})}send(e,...t){if(this._win){if(this._win.isDestroyed()||this._win.webContents.isDestroyed()){this.logService.warn(`Sending IPC message to channel '${e}' for window that is destroyed`);return}try{this._win.webContents.send(e,...t)}catch(i){this.logService.warn(`Error sending IPC message to channel '${e}' of window ${this._id}: ${Kn(i)}`)}}}updateTouchBar(e){$&&this.touchBarGroups.forEach((t,i)=>{let o=e[i];t.segments=this.createTouchBarGroupSegments(o)})}createTouchBar(){if($){for(let e=0;e<10;e++){let t=this.createTouchBarGroup();this.touchBarGroups.push(t)}this._win.setTouchBar(new Nr.TouchBar({items:this.touchBarGroups}))}}createTouchBarGroup(e=[]){let t=this.createTouchBarGroupSegments(e),i=new Nr.TouchBar.TouchBarSegmentedControl({segments:t,mode:"buttons",segmentStyle:"automatic",change:o=>{this.sendWhenReady("vscode:runAction",Le.None,{id:i.segments[o].id,from:"touchbar"})}});return i}createTouchBarGroupSegments(e=[]){return e.map(i=>{let o;i.icon&&!Cd.isThemeIcon(i.icon)&&i.icon?.dark?.scheme===Y.file&&(o=Nr.nativeImage.createFromPath(A.revive(i.icon.dark).fsPath),o.isEmpty()&&(o=void 0));let s;return typeof i.title=="string"?s=i.title:s=i.title.value,{id:i.id,label:o?void 0:s,icon:o}})}async startCollectingJScallStacks(){if(!this.jsCallStackCollector.isTriggered()){let e=await this._win?.webContents.mainFrame.collectJavaScriptCallStack();if(e){let t=this.jsCallStackMap.get(e)||0;this.jsCallStackMap.set(e,t+1)}this.jsCallStackCollector.trigger(()=>this.startCollectingJScallStacks())}}stopCollectingJScallStacks(){if(this.jsCallStackCollectorStopScheduler.cancel(),this.jsCallStackCollector.cancel(),this.jsCallStackMap.size){let e=`CodeWindow unresponsive samples:
`,t=0,i=Array.from(this.jsCallStackMap.entries()).sort((o,s)=>s[1]-o[1]);for(let[o,s]of i){if(t+=s,Math.round(s*100/this.jsCallStackEffectiveSampleCount)>20){let a=new Nb(o,this.id,this._win?.webContents.getOSProcessId());Hl.onUnexpectedError(a)}e+=`<${s}> ${o}
`}e+=`Total Samples: ${t}
`,e+="For full overview of the unresponsive period, capture cpu profile via https://aka.ms/vscode-tracing-cpu-profile",this.logService.error(e)}this.jsCallStackMap.clear()}matches(e){return this._win?.webContents.id===e.id}dispose(){super.dispose(),this.loggerMainService.deregisterLoggers(this.id)}};ll=D([S(1,z),S(2,fo),S(3,Fe),S(4,oi),S(5,rr),S(6,Be),S(7,Fs),S(8,Ha),S(9,Ae),S(10,so),S(11,kr),S(12,co),S(13,St),S(14,Hr),S(15,Te),S(16,He),S(17,Pd),S(18,Ke),S(19,Rt),S(20,rn)],ll);Nb=class extends Error{constructor(n,e,t=0){let i=Error.stackTraceLimit;Error.stackTraceLimit=0,super(`UnresponsiveSampleError: from window with ID ${e} belonging to process with pid ${t}`),Error.stackTraceLimit=i,this.name="UnresponsiveSampleError",this.stack=n}}});import Ad from"electron";function i7(r){let n={openedWindows:[]},e=r||{openedWindows:[]};return e.lastActiveWindow&&(n.lastActiveWindow=Mb(e.lastActiveWindow)),e.lastPluginDevelopmentHostWindow&&(n.lastPluginDevelopmentHostWindow=Mb(e.lastPluginDevelopmentHostWindow)),Array.isArray(e.openedWindows)&&(n.openedWindows=e.openedWindows.map(t=>Mb(t))),n}function Mb(r){let n={uiState:r.uiState};return r.backupPath&&(n.backupPath=r.backupPath),r.remoteAuthority&&(n.remoteAuthority=r.remoteAuthority),r.folder&&(n.folderUri=A.parse(r.folder)),r.workspaceIdentifier&&(n.workspace={id:r.workspaceIdentifier.id,configPath:A.parse(r.workspaceIdentifier.configURIPath)}),n}function o7(r){return{lastActiveWindow:r.lastActiveWindow&&Ub(r.lastActiveWindow),lastPluginDevelopmentHostWindow:r.lastPluginDevelopmentHostWindow&&Ub(r.lastPluginDevelopmentHostWindow),openedWindows:r.openedWindows.map(n=>Ub(n))}}function Ub(r){return{workspaceIdentifier:r.workspace&&{id:r.workspace.id,configURIPath:r.workspace.configPath.toString()},folder:r.folderUri?.toString(),backupPath:r.backupPath,remoteAuthority:r.remoteAuthority,uiState:r.uiState}}var ts,rL=_(()=>{te();ce();Ut();Ie();_t();Vt();me();vr();zt();oo();Ln();ts=class extends M{constructor(e,t,i,o,s){super();this.windowsMainService=e;this.stateService=t;this.lifecycleMainService=i;this.logService=o;this.configurationService=s;this.lastClosedState=void 0;this.shuttingDown=!1;this._state=i7(this.stateService.getItem(ts.windowsStateStorageKey)),this.registerListeners()}static{this.windowsStateStorageKey="windowsState"}get state(){return this._state}registerListeners(){Ad.app.on("browser-window-blur",()=>{this.shuttingDown||this.saveWindowsState()}),this._register(this.lifecycleMainService.onBeforeCloseWindow(e=>this.onBeforeCloseWindow(e))),this._register(this.lifecycleMainService.onBeforeShutdown(()=>this.onBeforeShutdown())),this._register(this.windowsMainService.onDidChangeWindowsCount(e=>{e.newCount-e.oldCount>0&&(this.lastClosedState=void 0)})),this._register(this.windowsMainService.onDidDestroyWindow(e=>this.onBeforeCloseWindow(e)))}onBeforeShutdown(){this.shuttingDown=!0,this.saveWindowsState()}saveWindowsState(){let e=new Set,t={openedWindows:[],lastPluginDevelopmentHostWindow:this._state.lastPluginDevelopmentHostWindow,lastActiveWindow:this.lastClosedState};if(!t.lastActiveWindow){let s=this.windowsMainService.getLastActiveWindow();(!s||s.isExtensionDevelopmentHost)&&(s=this.windowsMainService.getWindows().find(a=>!a.isExtensionDevelopmentHost)),s&&(t.lastActiveWindow=this.toWindowState(s),t.lastActiveWindow.uiState.mode===3&&e.add(t.lastActiveWindow.uiState.display))}let i=this.windowsMainService.getWindows().find(s=>s.isExtensionDevelopmentHost&&!s.isExtensionTestHost);i&&(t.lastPluginDevelopmentHostWindow=this.toWindowState(i),t.lastPluginDevelopmentHostWindow.uiState.mode===3&&(e.has(t.lastPluginDevelopmentHostWindow.uiState.display)?$&&!i.win?.isSimpleFullScreen()&&(t.lastPluginDevelopmentHostWindow.uiState.mode=1):e.add(t.lastPluginDevelopmentHostWindow.uiState.display))),this.windowsMainService.getWindowCount()>1&&(t.openedWindows=this.windowsMainService.getWindows().filter(s=>!s.isExtensionDevelopmentHost).map(s=>{let a=this.toWindowState(s);return a.uiState.mode===3&&(e.has(a.uiState.display)?$&&a.windowId!==t.lastActiveWindow?.windowId&&!s.win?.isSimpleFullScreen()&&(a.uiState.mode=1):e.add(a.uiState.display)),a}));let o=o7(t);this.stateService.setItem(ts.windowsStateStorageKey,o),this.shuttingDown&&this.logService.trace("[WindowsStateHandler] onBeforeShutdown",o)}onBeforeCloseWindow(e){if(this.lifecycleMainService.quitRequested)return;let t=this.toWindowState(e);e.isExtensionDevelopmentHost&&!e.isExtensionTestHost?this._state.lastPluginDevelopmentHostWindow=t:!e.isExtensionDevelopmentHost&&e.openedWorkspace&&this._state.openedWindows.forEach(i=>{let o=yt(e.openedWorkspace)&&i.workspace?.id===e.openedWorkspace.id,s=Kt(e.openedWorkspace)&&i.folderUri&&lt.isEqual(i.folderUri,e.openedWorkspace.uri);(o||s)&&(i.uiState=t.uiState)}),this.windowsMainService.getWindowCount()===1&&(this.lastClosedState=t)}toWindowState(e){return{windowId:e.id,workspace:yt(e.openedWorkspace)?e.openedWorkspace:void 0,folderUri:Kt(e.openedWorkspace)?e.openedWorkspace.uri:void 0,backupPath:e.backupPath,remoteAuthority:e.remoteAuthority,uiState:e.serializeWindowState()}}getNewWindowState(e){let t=this.doGetNewWindowState(e),i=this.configurationService.getValue("window");if(t.mode===3){let o;t.hasDefaultState?o=!!(i?.newWindowDimensions&&["fullscreen","inherit","offset"].indexOf(i.newWindowDimensions)>=0):o=!!(this.lifecycleMainService.wasRestarted||i?.restoreFullscreen),o||(t.mode=1)}return t}doGetNewWindowState(e){let t=this.windowsMainService.getLastActiveWindow();if(!e.extensionTestsPath){if(e.extensionDevelopmentPath&&this.state.lastPluginDevelopmentHostWindow)return this.state.lastPluginDevelopmentHostWindow.uiState;let c=e.workspace;if(yt(c)){let p=this.state.openedWindows.filter(m=>m.workspace&&m.workspace.id===c.id).map(m=>m.uiState);if(p.length)return p[0]}if(Kt(c)){let p=this.state.openedWindows.filter(m=>m.folderUri&&lt.isEqual(m.folderUri,c.uri)).map(m=>m.uiState);if(p.length)return p[0]}else if(e.backupPath){let p=this.state.openedWindows.filter(m=>m.backupPath===e.backupPath).map(m=>m.uiState);if(p.length)return p[0]}let u=this.lastClosedState||this.state.lastActiveWindow;if(!t&&u)return u.uiState}let i,o=Ad.screen.getAllDisplays();if(o.length===1)i=o[0];else{if($){let c=Ad.screen.getCursorScreenPoint();i=Ad.screen.getDisplayNearestPoint(c)}!i&&t&&(i=Ad.screen.getDisplayMatching(t.getBounds())),i||(i=Ad.screen.getPrimaryDisplay()||o[0])}let s=io(void 0,yt(e.workspace)||Kt(e.workspace));s.x=Math.round(i.bounds.x+i.bounds.width/2-s.width/2),s.y=Math.round(i.bounds.y+i.bounds.height/2-s.height/2);let a=this.configurationService.getValue("window"),l=!0;if(a?.newWindowDimensions){if(a.newWindowDimensions==="maximized")s.mode=0,l=!1;else if(a.newWindowDimensions==="fullscreen")s.mode=3,l=!1;else if((a.newWindowDimensions==="inherit"||a.newWindowDimensions==="offset")&&t){let c=t.serializeWindowState();c.mode===3?s.mode=3:s={...c,zoomLevel:void 0},l=s.mode!==3&&a.newWindowDimensions==="offset"}}return l&&(s=this.ensureNoOverlap(s)),s.hasDefaultState=!0,s}ensureNoOverlap(e){if(this.windowsMainService.getWindows().length===0)return e;e.x=typeof e.x=="number"?e.x:0,e.y=typeof e.y=="number"?e.y:0;let t=this.windowsMainService.getWindows().map(i=>i.getBounds());for(;t.some(i=>i.x===e.x||i.y===e.y);)e.x+=30,e.y+=30;return e}};ts=D([S(0,Ke),S(1,Rt),S(2,Te),S(3,z),S(4,Ae)],ts)});import{spawn as s7}from"child_process";var Av,Rd,Fb=_(()=>{Ne();at();Sa();fr();de();me();Av=V("ICSSDevelopmentService"),Rd=class{constructor(n,e){this.envService=n;this.logService=e}get isEnabled(){return!this.envService.isBuilt}getCssModules(){return this._cssModules??=this.computeCssModules(),this._cssModules}async computeCssModules(){if(!this.isEnabled)return[];let n=await import("@vscode/ripgrep");return await new Promise(e=>{let t=Rr.create(),i=[],o=gt.asFileUri("").fsPath,s=s7(n.rgPath,["-g","**/*.css","--files","--no-ignore",o],{});s.stdout.on("data",a=>{i.push(a)}),s.on("error",a=>{this.logService.error("[CSS_DEV] FAILED to compute CSS data",a),e([])}),s.on("close",()=>{let a=Buffer.concat(i).toString("utf8"),l=a.split(`
`).filter(Boolean).map(c=>Tg(o,c).replace(/\\/g,"/")).filter(Boolean).sort();l.some(c=>c.indexOf("vs/")!==0)&&this.logService.error(`[CSS_DEV] Detected invalid paths in css modules, raw output: ${a}`),e(l),this.logService.info(`[CSS_DEV] DONE, ${l.length} css modules (${Math.round(t.elapsed())}ms)`)})})}};Rd=D([S(0,mr),S(1,z)],Rd)});import*as iL from"fs";import{app as a7,BrowserWindow as Rv,shell as l7}from"electron";import{hostname as c7,release as d7,arch as u7}from"os";function sf(r){return yt(r?.workspace)}function xd(r){return Kt(r?.workspace)}var Wb,Dd,oL=_(()=>{ac();dn();Bt();vi();ae();xr();Uo();te();at();Ne();Bi();ce();gi();Ut();qe();Ie();We();Hc();_t();Ka();$t();ct();de();Vt();me();kp();Cv();zc();vr();qo();Lb();zt();EI();rL();Ln();cI();Zm();Bs();oo();kc();Di();Us();vd();za();Fb();er();Et();Wb=Object.create(null);Dd=class extends M{constructor(e,t,i,o,s,a,l,c,u,p,m,h,E,y,P,T,k,U,O,B,he,Q){super();this.machineId=e;this.sqmId=t;this.devDeviceId=i;this.initialUserEnv=o;this.logService=s;this.loggerService=a;this.policyService=c;this.environmentMainService=u;this.userDataProfilesMainService=p;this.lifecycleMainService=m;this.backupMainService=h;this.configurationService=E;this.workspacesHistoryMainService=y;this.workspacesManagementMainService=P;this.instantiationService=T;this.dialogMainService=k;this.fileService=U;this.protocolMainService=O;this.themeMainService=B;this.auxiliaryWindowsMainService=he;this.cssDevelopmentService=Q;this._onDidOpenWindow=this._register(new C);this.onDidOpenWindow=this._onDidOpenWindow.event;this._onDidSignalReadyWindow=this._register(new C);this.onDidSignalReadyWindow=this._onDidSignalReadyWindow.event;this._onDidDestroyWindow=this._register(new C);this.onDidDestroyWindow=this._onDidDestroyWindow.event;this._onDidChangeWindowsCount=this._register(new C);this.onDidChangeWindowsCount=this._onDidChangeWindowsCount.event;this._onDidMaximizeWindow=this._register(new C);this.onDidMaximizeWindow=this._onDidMaximizeWindow.event;this._onDidUnmaximizeWindow=this._register(new C);this.onDidUnmaximizeWindow=this._onDidUnmaximizeWindow.event;this._onDidChangeFullScreen=this._register(new C);this.onDidChangeFullScreen=this._onDidChangeFullScreen.event;this._onDidTriggerSystemContextMenu=this._register(new C);this.onDidTriggerSystemContextMenu=this._onDidTriggerSystemContextMenu.event;this.windows=new Map;this.windowsStateHandler=this._register(new ts(this,l,this.lifecycleMainService,this.logService,this.configurationService)),this.registerListeners()}registerListeners(){this._register(this.workspacesManagementMainService.onDidEnterWorkspace(e=>this._onDidSignalReadyWindow.fire(e.window))),this._register(this.onDidSignalReadyWindow(e=>{if(e.config?.extensionDevelopmentPath||e.config?.extensionTestsPath){let t=new ue;if(t.add(x.any(e.onDidClose,e.onDidDestroy)(()=>t.dispose())),e.config.extensionDevelopmentPath)for(let i of e.config.extensionDevelopmentPath)t.add(this.protocolMainService.addValidFileRoot(i));e.config.extensionTestsPath&&t.add(this.protocolMainService.addValidFileRoot(e.config.extensionTestsPath))}}))}openEmptyWindow(e,t){let i=this.environmentMainService.args,o=t?.remoteAuthority||void 0,s=!0,a=t?.forceReuseWindow,l=!a;return this.open({...e,cli:i,forceEmpty:s,forceNewWindow:l,forceReuseWindow:a,remoteAuthority:o,forceTempProfile:t?.forceTempProfile,forceProfile:t?.forceProfile})}openExistingWindow(e,t){e.focus(),this.handleWaitMarkerFile(t,[e])}async openSessionsWindow(e){this.logService.trace("windowsManager#openSessionsWindow");let t=this.environmentMainService.agentSessionsWorkspace;if(!t)throw new Error("Sessions workspace is not configured");if(!await this.fileService.exists(t)){let o=JSON.stringify({folders:[]},null,"	");await this.fileService.writeFile(t,ee.fromString(o))}return this.open({...e,urisToOpen:[{workspaceUri:t}],cli:this.environmentMainService.args,forceNewWindow:!0,noRecentEntry:!0})}async open(e){this.logService.trace("windowsManager#open"),(e.addMode||e.removeMode)&&(e.initialStartup||!this.getLastActiveWindow())&&(e.addMode=!1,e.removeMode=!1);let t=[],i=[],o=[],s=[],a=[],l=[],c,u=!1,p=await this.getPathsToOpen(e);this.logService.trace("windowsManager#open pathsToOpen",p);for(let P of p)xd(P)?e.addMode?t.push(P):e.removeMode?i.push(P):o.push(P):sf(P)?s.push(P):P.fileUri?(c||(c={filesToOpenOrCreate:[],filesToDiff:[],filesToMerge:[],remoteAuthority:P.remoteAuthority}),c.filesToOpenOrCreate.push(P)):P.backupPath?l.push({backupFolder:Pe(P.backupPath),remoteAuthority:P.remoteAuthority}):u=!0;e.diffMode&&c&&c.filesToOpenOrCreate.length>=2&&(c.filesToDiff=c.filesToOpenOrCreate.slice(0,2),c.filesToOpenOrCreate=[]),e.mergeMode&&c&&c.filesToOpenOrCreate.length===4&&(c.filesToMerge=c.filesToOpenOrCreate.slice(0,4),c.filesToOpenOrCreate=[],c.filesToDiff=[]),c&&e.waitMarkerFileURI&&(c.filesToWait={paths:wt([...c.filesToDiff,c.filesToMerge[3],...c.filesToOpenOrCreate]),waitMarkerFileUri:e.waitMarkerFileURI}),e.initialStartup?(a.push(...this.workspacesManagementMainService.getUntitledWorkspaces()),s.push(...a),l.push(...this.backupMainService.getEmptyWindowBackups())):l.length=0;let{windows:m,filesOpenedInWindow:h}=await this.doOpen(e,s,o,l,u,c,t,i);if(this.logService.trace(`windowsManager#open used window count ${m.length} (workspacesToOpen: ${s.length}, foldersToOpen: ${o.length}, emptyToRestore: ${l.length}, maybeOpenEmptyWindow: ${u})`),m.length>1)if(h)h.focus();else{let P=this.windowsStateHandler.state.lastActiveWindow&&!e.forceEmpty&&!e.cli._.length&&!e.cli["file-uri"]&&!e.cli["folder-uri"]&&!e.urisToOpen?.length,T=!0,k=!0;if(P){let U=m.filter(O=>this.windowsStateHandler.state.lastActiveWindow&&O.backupPath===this.windowsStateHandler.state.lastActiveWindow.backupPath);U.length&&(U[0].focus(),T=!1,k=!1)}if(T)for(let U=m.length-1;U>=0;U--){let O=m[U];if(!(O.openedWorkspace&&a.some(B=>O.openedWorkspace&&B.workspace.id===O.openedWorkspace.id)||O.backupPath&&l.some(B=>O.backupPath&&B.backupFolder===Pe(O.backupPath)))){O.focus(),k=!1;break}}k&&m[m.length-1].focus()}let E=c&&c.filesToDiff.length>0,y=c&&c.filesToMerge.length>0;if(!m.some(P=>P.isExtensionDevelopmentHost)&&!E&&!y&&!e.noRecentEntry){let P=[];for(let T of p)sf(T)&&!T.transient?P.push({label:T.label,workspace:T.workspace,remoteAuthority:T.remoteAuthority}):xd(T)?P.push({label:T.label,folderUri:T.workspace.uri,remoteAuthority:T.remoteAuthority}):T.fileUri&&P.push({label:T.label,fileUri:T.fileUri,remoteAuthority:T.remoteAuthority});this.workspacesHistoryMainService.addRecentlyOpened(P)}return this.handleWaitMarkerFile(e,m),m}handleWaitMarkerFile(e,t){let i=e.waitMarkerFileURI;e.context===0&&i&&t.length===1&&t[0]&&(async()=>{await t[0].whenClosedOrLoaded;try{await this.fileService.del(i)}catch{}})()}async doOpen(e,t,i,o,s,a,l,c){let u=[],p;function m(U,O){u.push(U),O&&(p=U,a=void 0)}let{openFolderInNewWindow:h,openFilesInNewWindow:E}=this.shouldOpenNewWindow(e);if(!e.initialStartup&&(l.length>0||c.length>0)){let U=l.at(0)?.remoteAuthority??c.at(0)?.remoteAuthority,O=this.getLastActiveWindowForAuthority(U);O&&m(this.doAddRemoveFoldersInExistingWindow(O,l.map(B=>B.workspace.uri),c.map(B=>B.workspace.uri)))}let y=i.length+t.length+o.length;if(a&&y===0){let U=a.filesToOpenOrCreate[0]||a.filesToDiff[0]||a.filesToMerge[3],O=this.getWindows().filter(he=>a&&tr(he.remoteAuthority,a.remoteAuthority)),B;U?.fileUri&&!E&&((e.context===4||e.context===0||e.context===1||e.context===6)&&(B=await e0(O,U.fileUri,async he=>he.configPath.scheme===Y.file?this.workspacesManagementMainService.resolveLocalWorkspace(he.configPath):void 0)),B||(B=this.doGetLastActiveWindow(O))),B?yt(B.openedWorkspace)?t.push({workspace:B.openedWorkspace,remoteAuthority:B.remoteAuthority}):Kt(B.openedWorkspace)?i.push({workspace:B.openedWorkspace,remoteAuthority:B.remoteAuthority}):m(this.doOpenFilesInExistingWindow(e,B,a),!0):m(await this.openInBrowserWindow({userEnv:e.userEnv,cli:e.cli,initialStartup:e.initialStartup,filesToOpen:a,forceNewWindow:!0,remoteAuthority:a.remoteAuthority,forceNewTabbedWindow:e.forceNewTabbedWindow,forceProfile:e.forceProfile,forceTempProfile:e.forceTempProfile}),!0)}let P=Zn(t,U=>U.workspace.id);if(P.length>0){let U=wt(P.map(O=>uo(this.getWindows(),O.workspace.configPath)));if(U.length>0){let O=U[0],B=tr(a?.remoteAuthority,O.remoteAuthority)?a:void 0;m(this.doOpenFilesInExistingWindow(e,O,B),!!B),h=!0}for(let O of P){if(U.some(Q=>Q.openedWorkspace&&Q.openedWorkspace.id===O.workspace.id))continue;let B=O.remoteAuthority,he=tr(a?.remoteAuthority,B)?a:void 0;m(await this.doOpenFolderOrWorkspace(e,O,h,he),!!he),h=!0}}let T=Zn(i,U=>lt.getComparisonKey(U.workspace.uri));if(T.length>0){let U=wt(T.map(O=>uo(this.getWindows(),O.workspace.uri)));if(U.length>0){let O=U[0],B=tr(a?.remoteAuthority,O.remoteAuthority)?a:void 0;m(this.doOpenFilesInExistingWindow(e,O,B),!!B),h=!0}for(let O of T){if(U.some(Q=>Kt(Q.openedWorkspace)&&lt.isEqual(Q.openedWorkspace.uri,O.workspace.uri)))continue;let B=O.remoteAuthority,he=tr(a?.remoteAuthority,B)?a:void 0;m(await this.doOpenFolderOrWorkspace(e,O,h,he),!!he),h=!0}}let k=Zn(o,U=>U.backupFolder);if(k.length>0)for(let U of k){let O=U.remoteAuthority,B=tr(a?.remoteAuthority,O)?a:void 0;m(await this.doOpenEmpty(e,!0,O,B,U),!!B),h=!0}if(a||s&&(e.forceEmpty||u.length===0)){let U=a?a.remoteAuthority:e.remoteAuthority;m(await this.doOpenEmpty(e,h,U,a),!!a)}return{windows:Zn(u),filesOpenedInWindow:p}}doOpenFilesInExistingWindow(e,t,i){this.logService.trace("windowsManager#doOpenFilesInExistingWindow",{filesToOpen:i}),this.focusMainOrChildWindow(t);let o={filesToOpenOrCreate:i?.filesToOpenOrCreate,filesToDiff:i?.filesToDiff,filesToMerge:i?.filesToMerge,filesToWait:i?.filesToWait,termProgram:e?.userEnv?.TERM_PROGRAM};return t.sendWhenReady("vscode:openFiles",Le.None,o),t}focusMainOrChildWindow(e){let t=e,i=Rv.getFocusedWindow();if(i&&i.id!==e.id){let o=this.auxiliaryWindowsMainService.getWindowByWebContents(i.webContents);o&&o.parentId===e.id&&(t=o)}t.focus()}doAddRemoveFoldersInExistingWindow(e,t,i){this.logService.trace("windowsManager#doAddRemoveFoldersToExistingWindow",{foldersToAdd:t,foldersToRemove:i}),e.focus();let o={foldersToAdd:t,foldersToRemove:i};return e.sendWhenReady("vscode:addRemoveFolders",Le.None,o),e}doOpenEmpty(e,t,i,o,s){this.logService.trace("windowsManager#doOpenEmpty",{restore:!!s,remoteAuthority:i,filesToOpen:o,forceNewWindow:t});let a;return!t&&typeof e.contextWindowId=="number"&&(a=this.getWindowById(e.contextWindowId)),this.openInBrowserWindow({userEnv:e.userEnv,cli:e.cli,initialStartup:e.initialStartup,remoteAuthority:i,forceNewWindow:t,forceNewTabbedWindow:e.forceNewTabbedWindow,filesToOpen:o,windowToUse:a,emptyWindowBackupInfo:s,forceProfile:e.forceProfile,forceTempProfile:e.forceTempProfile})}doOpenFolderOrWorkspace(e,t,i,o,s){return this.logService.trace("windowsManager#doOpenFolderOrWorkspace",{folderOrWorkspace:t,filesToOpen:o}),!i&&!s&&typeof e.contextWindowId=="number"&&(s=this.getWindowById(e.contextWindowId)),this.openInBrowserWindow({workspace:t.workspace,userEnv:e.userEnv,cli:e.cli,initialStartup:e.initialStartup,remoteAuthority:t.remoteAuthority,forceNewWindow:i,forceNewTabbedWindow:e.forceNewTabbedWindow,filesToOpen:o,windowToUse:s,forceProfile:e.forceProfile,forceTempProfile:e.forceTempProfile})}async getPathsToOpen(e){let t,i=!1,o=!1;if(e.urisToOpen&&e.urisToOpen.length>0?(t=await this.doExtractPathsFromAPI(e),i=!0):e.forceEmpty?t=[Wb]:e.cli._.length||e.cli["folder-uri"]||e.cli["file-uri"]?(t=await this.doExtractPathsFromCLI(e.cli),t.length===0&&t.push(Wb),i=!0):(t=await this.doGetPathsFromLastSession(),t.length===0&&t.push(Wb),o=!0),!e.addMode&&!e.removeMode&&i){let s=t.filter(a=>xd(a));if(s.length>1){let a=s[0].remoteAuthority;if(s.every(l=>tr(l.remoteAuthority,a))){let l,c=await this.doGetWorkspaceMatchingFoldersFromLastSession(a,s);c?l=c:l=await this.workspacesManagementMainService.createUntitledWorkspace(s.map(u=>({uri:u.workspace.uri}))),t.push({workspace:l,remoteAuthority:a}),t=t.filter(u=>!xd(u))}}}if(e.initialStartup&&!o&&this.configurationService.getValue("window")?.restoreWindows==="preserve"){let s=await this.doGetPathsFromLastSession();t.unshift(...s.filter(a=>sf(a)||xd(a)||a.backupPath))}return t}async doExtractPathsFromAPI(e){let t={gotoLineMode:e.gotoLineMode,remoteAuthority:e.remoteAuthority},i=await Promise.all(wt(e.urisToOpen||[]).map(async o=>{let s=await this.resolveOpenable(o,t);if(s)return s.label=o.label,s;let a=this.resourceFromOpenable(o);this.dialogMainService.showMessageBox({type:"info",buttons:[v(2743,null)],message:a.scheme===Y.file?v(2745,null):v(2747,null),detail:a.scheme===Y.file?v(2744,null,Mo(a,{os:Yt,tildify:this.environmentMainService})):v(2746,null,a.toString(!0))},Rv.getFocusedWindow()??void 0)}));return wt(i)}async doExtractPathsFromCLI(e){let t=[],i={ignoreFileNotFound:!0,gotoLineMode:e.goto,remoteAuthority:e.remote||void 0,forceOpenWorkspaceAsFile:e.diff&&e._.length===2||e.merge&&e._.length===4},o=e["folder-uri"];if(o){let l=await Promise.all(o.map(c=>{let u=this.cliArgToUri(c);if(u)return this.resolveOpenable({folderUri:u},i)}));t.push(...wt(l))}let s=e["file-uri"];if(s){let l=await Promise.all(s.map(c=>{let u=this.cliArgToUri(c);if(u)return this.resolveOpenable(ro(c)?{workspaceUri:u}:{fileUri:u},i)}));t.push(...wt(l))}let a=await Promise.all(e._.map(l=>i.remoteAuthority?this.doResolveRemotePath(l,i):this.doResolveFilePath(l,i)));return t.push(...wt(a)),t}cliArgToUri(e){try{let t=A.parse(e);if(!t.scheme){this.logService.error(`Invalid URI input string, scheme missing: ${e}`);return}return t.path?t:t.with({path:"/"})}catch(t){this.logService.error(`Invalid URI input string: ${e}, ${t.message}`)}}async doGetPathsFromLastSession(){let e=this.getRestoreWindowsSetting();switch(e){case"none":return[];case"one":case"all":case"preserve":case"folders":{let t=[];e!=="one"&&t.push(...this.windowsStateHandler.state.openedWindows),this.windowsStateHandler.state.lastActiveWindow&&t.push(this.windowsStateHandler.state.lastActiveWindow);let i=await Promise.all(t.map(async o=>{if(o.workspace){let s=await this.resolveOpenable({workspaceUri:o.workspace.configPath},{remoteAuthority:o.remoteAuthority,rejectTransientWorkspaces:!0});if(sf(s))return s}else if(o.folderUri){let s=await this.resolveOpenable({folderUri:o.folderUri},{remoteAuthority:o.remoteAuthority});if(xd(s))return s}else if(e!=="folders"&&o.backupPath)return{backupPath:o.backupPath,remoteAuthority:o.remoteAuthority}}));return wt(i)}}}getRestoreWindowsSetting(){let e;return this.lifecycleMainService.wasRestarted?e="all":(e=this.configurationService.getValue("window")?.restoreWindows||"all",["preserve","all","folders","one","none"].includes(e)||(e="all")),e}async doGetWorkspaceMatchingFoldersFromLastSession(e,t){let i=(await this.doGetPathsFromLastSession()).filter(s=>sf(s)),o=t.map(s=>s.workspace.uri);for(let{workspace:s}of i){let a=await this.workspacesManagementMainService.resolveLocalWorkspace(s.configPath);if(!a||a.remoteAuthority!==e||a.transient||a.folders.length!==t.length)continue;let l=new ql(o,c=>lt.getComparisonKey(c));if(a.folders.every(c=>l.has(c.uri)))return a}}async resolveOpenable(e,t=Object.create(null)){let i=this.resourceFromOpenable(e);return i.scheme===Y.file?(x_(e)&&(t={...t,forceOpenWorkspaceAsFile:!0}),this.doResolveFilePath(i.fsPath,t)):this.doResolveRemoteOpenable(e,t)}doResolveRemoteOpenable(e,t){let i=this.resourceFromOpenable(e),o=zo(i)||t.remoteAuthority;if(i=rc(qg(i)),x_(e)){if(t.gotoLineMode){let{path:s,line:a,column:l}=Zl(i.path);return{fileUri:i.with({path:s}),options:{selection:a?{startLineNumber:a,startColumn:l||1}:void 0},remoteAuthority:o}}return{fileUri:i,remoteAuthority:o}}else if(Va(e))return{workspace:Ko(i),remoteAuthority:o};return{workspace:lI(i),remoteAuthority:o}}resourceFromOpenable(e){return Va(e)?e.workspaceUri:Dc(e)?e.folderUri:e.fileUri}async doResolveFilePath(e,t,i){let o,s;t.gotoLineMode&&({path:e,line:o,column:s}=Zl(e)),e=Gg(kt(e),Fr());try{let a=await iL.promises.stat(e);if(a.isFile()){if(!t.forceOpenWorkspaceAsFile){let l=await this.workspacesManagementMainService.resolveLocalWorkspace(A.file(e));if(l)return l.transient&&t.rejectTransientWorkspaces?void 0:{workspace:{id:l.id,configPath:l.configPath},type:1,exists:!0,remoteAuthority:l.remoteAuthority,transient:l.transient}}return{fileUri:A.file(e),type:1,exists:!0,options:{selection:o?{startLineNumber:o,startColumn:s||1}:void 0}}}else{if(a.isDirectory())return{workspace:lI(A.file(e),a),type:2,exists:!0};if(!q&&e==="/dev/null")return{fileUri:A.file(e),type:1,exists:!0}}}catch(a){if(a.code==="ERR_UNC_HOST_NOT_ALLOWED"&&!i)return this.onUNCHostNotAllowed(e,t);let l=A.file(e);if(this.workspacesHistoryMainService.removeRecentlyOpened([l]),t.ignoreFileNotFound&&a.code==="ENOENT")return{fileUri:l,type:1,exists:!1};this.logService.error(`Invalid path provided: ${e}, ${a.message}`)}}async onUNCHostNotAllowed(e,t){let i=A.file(e),{response:o,checkboxChecked:s}=await this.dialogMainService.showMessageBox({type:"warning",buttons:[v(2737,null),v(2738,null),v(2742,null)],message:v(2740,null,i.authority),detail:v(2739,null,Mo(i,{os:Yt,tildify:this.environmentMainService})),checkboxLabel:v(2741,null,i.authority),cancelId:1});if(o===0){if(No(i.authority),s){let a={channel:"vscode:configureAllowedUNCHost",args:i.authority};this.sendToFocused(a.channel,a.args),this.sendToOpeningWindow(a.channel,a.args)}return this.doResolveFilePath(e,t,!0)}if(o===2)return l7.openExternal("https://aka.ms/vscode-windows-unc"),this.onUNCHostNotAllowed(e,t)}doResolveRemotePath(e,t){let i=e.charCodeAt(0),o=t.remoteAuthority,s,a;t.gotoLineMode&&({path:e,line:s,column:a}=Zl(e)),i!==47&&(Vg(i)&&e.charCodeAt(e.charCodeAt(1))===58&&(e=Yi(e)),e=`/${e}`);let l=A.from({scheme:Y.vscodeRemote,authority:o,path:e});if(e.charCodeAt(e.length-1)!==47){if(ro(e))return t.forceOpenWorkspaceAsFile?{fileUri:l,options:{selection:s?{startLineNumber:s,startColumn:a||1}:void 0},remoteAuthority:t.remoteAuthority}:{workspace:Ko(l),remoteAuthority:o};if(t.gotoLineMode||Se.basename(e).indexOf(".")!==-1)return{fileUri:l,options:{selection:s?{startLineNumber:s,startColumn:a||1}:void 0},remoteAuthority:o}}return{workspace:lI(l),remoteAuthority:o}}shouldOpenNewWindow(e){let t=this.configurationService.getValue("window"),i=t?.openFoldersInNewWindow||"default",o=t?.openFilesInNewWindow||"off",s=(e.preferNewWindow||e.forceNewWindow)&&!e.forceReuseWindow;!e.forceNewWindow&&!e.forceReuseWindow&&(i==="on"||i==="off")&&(s=i==="on");let a=!1;return e.forceNewWindow||e.forceReuseWindow?a=!!e.forceNewWindow&&!e.forceReuseWindow:($?e.context===1&&(a=!0):e.context!==3&&e.context!==2&&!(e.userEnv&&e.userEnv.TERM_PROGRAM==="vscode")&&(a=!0),!e.cli.extensionDevelopmentPath&&(o==="on"||o==="off")&&(a=o==="on")),{openFolderInNewWindow:!!s,openFilesInNewWindow:a}}async openExtensionDevelopmentHostWindow(e,t){let i=t0(this.getWindows(),e);if(i)return this.lifecycleMainService.reload(i,t.cli),i.focus(),[i];let o=t.cli["folder-uri"]||[],s=t.cli["file-uri"]||[],a=t.cli._;if(!a.length&&!o.length&&!s.length&&!t.cli.extensionTestsPath){let u=this.windowsStateHandler.state.lastPluginDevelopmentHostWindow,p=u?.workspace??u?.folderUri;p&&(A.isUri(p)?p.scheme===Y.file?a=[p.fsPath]:o=[p.toString()]:p.configPath.scheme===Y.file?a=[Dn(p.configPath)]:s=[p.configPath.toString()])}let l=t.remoteAuthority;for(let u of e)if(u.match(/^[a-zA-Z][a-zA-Z0-9\+\-\.]+:/)){let p=A.parse(u),m=zo(p);m&&(l?tr(m,l)||this.logService.error("more than one extension development path authority"):l=m)}a=a.filter(u=>{let p=A.file(u);return uo(this.getWindows(),p)?!1:tr(zo(p),l)}),o=o.filter(u=>{let p=this.cliArgToUri(u);return p&&uo(this.getWindows(),p)?!1:p?tr(zo(p),l):!1}),s=s.filter(u=>{let p=this.cliArgToUri(u);return p&&uo(this.getWindows(),p)?!1:p?tr(zo(p),l):!1}),t.cli._=a,t.cli["folder-uri"]=o,t.cli["file-uri"]=s;let c={context:t.context,cli:t.cli,forceNewWindow:!0,forceEmpty:!a.length&&!o.length&&!s.length,userEnv:t.userEnv,noRecentEntry:!0,waitMarkerFileURI:t.waitMarkerFileURI,remoteAuthority:l,forceProfile:t.forceProfile,forceTempProfile:t.forceTempProfile};return this.open(c)}async openInBrowserWindow(e){let t=this.configurationService.getValue("window"),i=this.getLastActiveWindow(),s=(t?.newWindowProfile?this.userDataProfilesMainService.profiles.find(c=>c.name===t.newWindowProfile):void 0)??i?.profile??this.userDataProfilesMainService.defaultProfile,a;!e.forceNewWindow&&!e.forceNewTabbedWindow&&(a=e.windowToUse||i,a&&a.focus());let l={...this.environmentMainService.args,...e.cli,machineId:this.machineId,sqmId:this.sqmId,devDeviceId:this.devDeviceId,isPortable:this.environmentMainService.isPortable,windowId:-1,mainPid:process.pid,appRoot:this.environmentMainService.appRoot,execPath:process.execPath,codeCachePath:this.environmentMainService.codeCachePath,backupPath:e.emptyWindowBackupInfo?H(this.environmentMainService.backupHome,e.emptyWindowBackupInfo.backupFolder):void 0,profiles:{home:this.userDataProfilesMainService.profilesHome,all:this.userDataProfilesMainService.profiles,profile:s},homeDir:this.environmentMainService.userHome.with({scheme:Y.file}).fsPath,tmpDir:this.environmentMainService.tmpDir.with({scheme:Y.file}).fsPath,userDataDir:this.environmentMainService.userDataPath,remoteAuthority:e.remoteAuthority,workspace:e.workspace,userEnv:{...this.initialUserEnv,...e.userEnv},nls:{messages:Xy(),language:cp()},filesToOpenOrCreate:e.filesToOpen?.filesToOpenOrCreate,filesToDiff:e.filesToOpen?.filesToDiff,filesToMerge:e.filesToOpen?.filesToMerge,filesToWait:e.filesToOpen?.filesToWait,logLevel:this.loggerService.getLogLevel(),loggers:this.loggerService.getGlobalLoggers(),logsPath:this.environmentMainService.logsHome.with({scheme:Y.file}).fsPath,product:qn,isInitialStartup:e.initialStartup,perfMarks:sg(),os:{release:d7(),hostname:c7(),arch:u7()},autoDetectHighContrast:t?.autoDetectHighContrast??!0,autoDetectColorScheme:t?.autoDetectColorScheme??!1,accessibilitySupport:a7.accessibilitySupportEnabled,colorScheme:this.themeMainService.getColorScheme(),policiesData:this.policyService.serialize(),continueOn:this.environmentMainService.continueOn,cssModules:this.cssDevelopmentService.isEnabled?await this.cssDevelopmentService.getCssModules():void 0,isSessionsWindow:yt(e.workspace)&&wp(e.workspace.configPath,this.environmentMainService.agentSessionsWorkspace)};if(a){let c=a.config;!l.extensionDevelopmentPath&&c?.extensionDevelopmentPath&&(l.extensionDevelopmentPath=c.extensionDevelopmentPath,l.extensionDevelopmentKind=c.extensionDevelopmentKind,l["enable-proposed-api"]=c["enable-proposed-api"],l.verbose=c.verbose,l["inspect-extensions"]=c["inspect-extensions"],l["inspect-brk-extensions"]=c["inspect-brk-extensions"],l.debugId=c.debugId,l.extensionEnvironment=c.extensionEnvironment,l["extensions-dir"]=c["extensions-dir"],l["disable-extensions"]=c["disable-extensions"],l["disable-extension"]=c["disable-extension"])}else{let c=this.windowsStateHandler.getNewWindowState(l);tt("code/willCreateCodeWindow");let u=a=this.instantiationService.createInstance(ll,{state:c,extensionDevelopmentPath:l.extensionDevelopmentPath,isExtensionTestHost:!!l.extensionTestsPath});tt("code/didCreateCodeWindow"),e.forceNewTabbedWindow&&this.getLastActiveWindow()?.addTabbedWindow(u),this.windows.set(u.id,u),this._onDidOpenWindow.fire(u),this._onDidChangeWindowsCount.fire({oldCount:this.getWindowCount()-1,newCount:this.getWindowCount()});let p=new ue;p.add(u.onDidSignalReady(()=>this._onDidSignalReadyWindow.fire(u))),p.add(x.once(u.onDidClose)(()=>this.onWindowClosed(u,p))),p.add(x.once(u.onDidDestroy)(()=>this.onWindowDestroyed(u))),p.add(u.onDidMaximize(()=>this._onDidMaximizeWindow.fire(u))),p.add(u.onDidUnmaximize(()=>this._onDidUnmaximizeWindow.fire(u))),p.add(u.onDidEnterFullScreen(()=>this._onDidChangeFullScreen.fire({window:u,fullscreen:!0}))),p.add(u.onDidLeaveFullScreen(()=>this._onDidChangeFullScreen.fire({window:u,fullscreen:!1}))),p.add(u.onDidTriggerSystemContextMenu(({x:h,y:E})=>this._onDidTriggerSystemContextMenu.fire({window:u,x:h,y:E})));let m=Ki(u.win?.webContents);m.removeAllListeners("devtools-reload-page"),p.add(x.fromNodeEventEmitter(m,"devtools-reload-page")(()=>this.lifecycleMainService.reload(u))),this.lifecycleMainService.registerWindow(u)}return l.windowId=a.id,a.isReady?this.lifecycleMainService.unload(a,4).then(async c=>{c||await this.doOpenInBrowserWindow(a,l,e,s)}):await this.doOpenInBrowserWindow(a,l,e,s),a}async doOpenInBrowserWindow(e,t,i,o){t.extensionDevelopmentPath||(yt(t.workspace)?t.backupPath=this.backupMainService.registerWorkspaceBackup({workspace:t.workspace,remoteAuthority:t.remoteAuthority}):Kt(t.workspace)?t.backupPath=this.backupMainService.registerFolderBackup({folderUri:t.workspace.uri,remoteAuthority:t.remoteAuthority}):t.backupPath=this.backupMainService.registerEmptyWindowBackup({backupFolder:i.emptyWindowBackupInfo?.backupFolder??Pm().id,remoteAuthority:t.remoteAuthority}));let s=t.workspace??Ds(t.backupPath,!1),a=this.resolveProfileForBrowserWindow(i,s,o),l=a instanceof Promise?await a:a;t.profiles.profile=l,t.extensionDevelopmentPath||await this.userDataProfilesMainService.setProfileForWorkspace(s,l),e.load(t)}resolveProfileForBrowserWindow(e,t,i){return e.forceProfile?this.userDataProfilesMainService.profiles.find(o=>o.name===e.forceProfile)??this.userDataProfilesMainService.createNamedProfile(e.forceProfile):e.forceTempProfile?this.userDataProfilesMainService.createTransientProfile():this.userDataProfilesMainService.getProfileForWorkspace(t)??i}onWindowClosed(e,t){this.windows.delete(e.id),this._onDidChangeWindowsCount.fire({oldCount:this.getWindowCount()+1,newCount:this.getWindowCount()}),t.dispose()}onWindowDestroyed(e){this.windows.delete(e.id),this._onDidDestroyWindow.fire(e)}getFocusedWindow(){let e=Rv.getFocusedWindow();if(e)return this.getWindowById(e.id)}getLastActiveWindow(){return this.doGetLastActiveWindow(this.getWindows())}getLastActiveWindowForAuthority(e){return this.doGetLastActiveWindow(this.getWindows().filter(t=>tr(t.remoteAuthority,e)))}doGetLastActiveWindow(e){return $h(e)}sendToFocused(e,...t){(this.getFocusedWindow()||this.getLastActiveWindow())?.sendWhenReady(e,Le.None,...t)}sendToOpeningWindow(e,...t){this._register(x.once(this.onDidSignalReadyWindow)(i=>{i.sendWhenReady(e,Le.None,...t)}))}sendToAll(e,t,i){for(let o of this.getWindows())i&&i.indexOf(o.id)>=0||o.sendWhenReady(e,Le.None,t)}getWindows(){return Array.from(this.windows.values())}getWindowCount(){return this.windows.size}getWindowById(e){return this.windows.get(e)}getWindowByWebContents(e){let t=Rv.fromWebContents(e);if(!t)return;let i=this.getWindowById(t.id);return i?.matches(e)?i:void 0}};Dd=D([S(4,z),S(5,fo),S(6,Rt),S(7,oi),S(8,Fe),S(9,rr),S(10,Te),S(11,co),S(12,Ae),S(13,Xs),S(14,kr),S(15,rn),S(16,Hr),S(17,Be),S(18,Pd),S(19,so),S(20,Jr),S(21,Av)],Dd)});var xv,sL=_(()=>{Ce();ae();te();xv=class extends M{constructor({onDidOpenMainWindow:e,onDidFocusMainWindow:t,getActiveWindowId:i}){super();this.disposables=this._register(new ue);x.latch(x.any(e,t))(this.setActiveWindow,this,this.disposables),this.firstActiveWindowIdPromise=Si(()=>i()),(async()=>{try{let s=await this.firstActiveWindowIdPromise;this.activeWindowId=typeof this.activeWindowId=="number"?this.activeWindowId:s}catch{}finally{this.firstActiveWindowIdPromise=void 0}})()}setActiveWindow(e){this.firstActiveWindowIdPromise&&(this.firstActiveWindowIdPromise.cancel(),this.firstActiveWindowIdPromise=void 0),this.activeWindowId=e}async getActiveClientId(){return`window:${this.firstActiveWindowIdPromise?await this.firstActiveWindowIdPromise:this.activeWindowId}`}}});var Od,aL=_(()=>{Hc();zt();Zm();Bs();Od=class{constructor(n,e,t,i){this.workspacesManagementMainService=n;this.windowsMainService=e;this.workspacesHistoryMainService=t;this.backupMainService=i;this.onDidChangeRecentlyOpened=this.workspacesHistoryMainService.onDidChangeRecentlyOpened}async enterWorkspace(n,e){let t=this.windowsMainService.getWindowById(n);if(t)return this.workspacesManagementMainService.enterWorkspace(t,this.windowsMainService.getWindows(),e)}createUntitledWorkspace(n,e,t){return this.workspacesManagementMainService.createUntitledWorkspace(e,t)}deleteUntitledWorkspace(n,e){return this.workspacesManagementMainService.deleteUntitledWorkspace(e)}getWorkspaceIdentifier(n,e){return this.workspacesManagementMainService.getWorkspaceIdentifier(e)}getRecentlyOpened(n){return this.workspacesHistoryMainService.getRecentlyOpened()}addRecentlyOpened(n,e){return this.workspacesHistoryMainService.addRecentlyOpened(e)}removeRecentlyOpened(n,e){return this.workspacesHistoryMainService.removeRecentlyOpened(e)}clearRecentlyOpened(n){return this.workspacesHistoryMainService.clearRecentlyOpened()}async getDirtyWorkspaces(){return this.backupMainService.getDirtyWorkspaces()}};Od=D([S(0,kr),S(1,Ke),S(2,Xs),S(3,co)],Od)});var Dv,lL=_(()=>{ae();te();Di();Dv=class{constructor(n){this.service=n;this.disposables=new ue}listen(n,e){if(e==="onDidChange")return x.map(this.service.onDidChange,t=>t.reduce((i,o)=>({...i,[o]:this.service.getPolicyValue(o)??null}),{}),this.disposables);throw new Error(`Event not found: ${e}`)}call(n,e,t){if(e==="updatePolicyDefinitions")return this.service.updatePolicyDefinitions(t);throw new Error(`Call not found: ${e}`)}dispose(){this.disposables.dispose()}}});function uL(r){return r.map(n=>{let[e,t]=n.split("@");return{proposalName:e,version:t?parseInt(t):void 0}})}function pL(r){return r.map(n=>n.split("@")[0])}var cL,dL,kv,ns,Ov,ywe,af=_(()=>{Sn();de();zc();cL="extensions.user.cache",dL="extensions.builtin.cache",kv="undefined_publisher",ns=class{constructor(n){this.value=n,this._lower=n.toLowerCase()}static equals(n,e){if(typeof n>"u"||n===null)return typeof e>"u"||e===null;if(typeof e>"u"||e===null)return!1;if(typeof n=="string"||typeof e=="string"){let t=typeof n=="string"?n:n.value,i=typeof e=="string"?e:e.value;return Hn(t,i)}return n._lower===e._lower}static toKey(n){return typeof n=="string"?n.toLowerCase():n._lower}},Ov=class{constructor(){this._map=new Map}clear(){this._map.clear()}delete(n){this._map.delete(ns.toKey(n))}get(n){return this._map.get(ns.toKey(n))}has(n){return this._map.has(ns.toKey(n))}set(n,e){this._map.set(ns.toKey(n),e)}values(){return this._map.values()}forEach(n){this._map.forEach(n)}[Symbol.iterator](){return this._map[Symbol.iterator]()}};ywe=V("IBuiltinExtensionsScannerService")});function fL(r,n){switch(r){case 3:return n==="x64"?"win32-x64":n==="arm64"?"win32-arm64":"unknown";case 2:return n==="x64"?"linux-x64":n==="arm64"?"linux-arm64":n==="arm"?"linux-armhf":"unknown";case"alpine":return n==="x64"?"alpine-x64":n==="arm64"?"alpine-arm64":"unknown";case 1:return n==="x64"?"darwin-x64":n==="arm64"?"darwin-arm64":"unknown";case 0:return"web"}}function gL(r){let n=r;return!!n&&typeof n=="object"&&typeof n.id=="string"&&(!n.uuid||typeof n.uuid=="string")}var p7,Uwe,Fwe,Wwe,Bwe,Vwe,Gwe,Hwe,Jwe,m7,Nv=_(()=>{ce();Dp();We();Lo();af();ct();de();wi();p7="^([a-z0-9A-Z][a-z0-9-A-Z]*)\\.([a-z0-9A-Z][a-z0-9-A-Z]*)$",Uwe=new RegExp(p7);Fwe=V("extensionGalleryService"),Wwe=V("extensionManagementService"),Bwe=V("IGlobalExtensionEnablementService"),Vwe=V("IExtensionTipsService"),Gwe=V("IAllowedExtensionsService"),Hwe=$y(1971,"Extensions"),Jwe=$y(1988,"Preferences"),m7="extensions.allowed";Ht.as(_n.Configuration).registerConfiguration({id:"extensions",order:30,title:v(1987,null),type:"object",properties:{[m7]:{type:"object",markdownDescription:v(1977,null),default:"*",defaultSnippets:[{body:{},description:v(1982,null)},{body:{"*":!0},description:v(1978,null)}],scope:1,policy:{name:"AllowedExtensions",category:"Extensions",minimumVersion:"1.96",localization:{description:{key:"extensions.allowed.policy",value:v(1983,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:v(1975,null),enumDescriptions:[v(1981,null),v(1979,null),v(1980,null)]},{type:"array",items:{type:"string"},description:v(1976,null)}]},"([a-z0-9A-Z][a-z0-9-A-Z]*)$":{type:["boolean","string"],enum:[!0,!1,"stable"],description:v(1970,null),enumDescriptions:[v(1986,null),v(1984,null),v(1985,null)]},"\\*":{type:"boolean",enum:[!0,!1],description:v(1972,null),enumDescriptions:[v(1974,null),v(1973,null)]}}}}})});function cl(r,n){return r.uuid&&n.uuid?r.uuid===n.uuid:r.id===n.id?!0:Sp(r.id,n.id)===0}function hL(r,n){return`${r}.${n}`}function f7(r){return r.toLowerCase()}function IL(r,n){return f7(hL(r??kv,n))}async function g7(r,n){if(!fe)return!1;let e;try{e=(await r.readFile(A.file("/etc/os-release"))).value.toString()}catch{try{e=(await r.readFile(A.file("/usr/lib/os-release"))).value.toString()}catch(i){n.debug("Error while getting the os-release file.",cn(i))}}return!!e&&(e.match(/^ID=([^\u001b\r\n]*)/m)||[])[1]==="alpine"}async function vL(r,n){let e=await g7(r,n),t=fL(e?"alpine":Co,CR);return n.debug("ComputeTargetPlatform:",t),t}var sbe,Bb=_(()=>{Sn();Nv();af();ce();Ie();rt();gi();ea();qe();sbe=new ns("pprice.better-merge")});function EL(r){let n=r;return ut(n)&&gL(n.identifier)&&(h7(n.location)||Ye(n.location)&&!!n.location)&&(Qr(n.relativeLocation)||Ye(n.relativeLocation))&&!!n.version&&Ye(n.version)}function h7(r){if(!r)return!1;let n=r;return typeof n?.path=="string"&&typeof n?.scheme=="string"}var dl,ra,kd,lf=_(()=>{Ce();Et();te();ae();er();Ie();Nv();Bb();ct();de();me();Ci();Pi();qe();rt();dl=class extends Error{constructor(e,t){super(e);this.code=t}},ra=V("IExtensionsProfileScannerService"),kd=class extends M{constructor(e,t,i,o,s){super();this.extensionsLocation=e;this.fileService=t;this.userDataProfilesService=i;this.uriIdentityService=o;this.logService=s;this._onAddExtensions=this._register(new C);this.onAddExtensions=this._onAddExtensions.event;this._onDidAddExtensions=this._register(new C);this.onDidAddExtensions=this._onDidAddExtensions.event;this._onRemoveExtensions=this._register(new C);this.onRemoveExtensions=this._onRemoveExtensions.event;this._onDidRemoveExtensions=this._register(new C);this.onDidRemoveExtensions=this._onDidRemoveExtensions.event;this.resourcesAccessQueueMap=new Lt}scanProfileExtensions(e,t){return this.withProfileExtensions(e,void 0,t)}async addExtensionsToProfile(e,t,i){let o=[],s=[];try{return await this.withProfileExtensions(t,a=>{let l=[];if(i)l.push(...a);else for(let c of a)e.some(([u])=>cl(u.identifier,c.identifier)&&u.manifest.version!==c.version)?o.push(c):l.push(c);for(let[c,u]of e){let p=l.findIndex(h=>cl(h.identifier,c.identifier)&&h.version===c.manifest.version),m={identifier:c.identifier,version:c.manifest.version,location:c.location,metadata:u};p===-1?(s.push(m),l.push(m)):l.splice(p,1,m)}return s.length&&this._onAddExtensions.fire({extensions:s,profileLocation:t}),o.length&&this._onRemoveExtensions.fire({extensions:o,profileLocation:t}),l}),s.length&&this._onDidAddExtensions.fire({extensions:s,profileLocation:t}),o.length&&this._onDidRemoveExtensions.fire({extensions:o,profileLocation:t}),s}catch(a){throw s.length&&this._onDidAddExtensions.fire({extensions:s,error:a,profileLocation:t}),o.length&&this._onDidRemoveExtensions.fire({extensions:o,error:a,profileLocation:t}),a}}async updateMetadata(e,t){let i=[];return await this.withProfileExtensions(t,o=>{let s=[];for(let a of o){let l=e.find(([c])=>cl({id:c.identifier.id},{id:a.identifier.id})&&c.manifest.version===a.version);l&&(a.metadata={...a.metadata,...l[1]},i.push(a)),s.push(a)}return s}),i}async removeExtensionsFromProfile(e,t){let i=[];try{await this.withProfileExtensions(t,o=>{let s=[];for(let a of o)e.some(l=>cl(a.identifier,l))?i.push(a):s.push(a);return i.length&&this._onRemoveExtensions.fire({extensions:i,profileLocation:t}),s}),i.length&&this._onDidRemoveExtensions.fire({extensions:i,profileLocation:t})}catch(o){throw i.length&&this._onDidRemoveExtensions.fire({extensions:i,error:o,profileLocation:t}),o}}async withProfileExtensions(e,t,i){return this.getResourceAccessQueue(e).queue(async()=>{let o=[],s;try{let a=await this.fileService.readFile(e);s=JSON.parse(a.value.toString().trim()||"[]")}catch(a){if(Ir(a)!==1)throw a;if(this.uriIdentityService.extUri.isEqual(e,this.userDataProfilesService.defaultProfile.extensionsResource)&&(s=await this.migrateFromOldDefaultProfileExtensionsLocation()),!s&&i?.bailOutWhenFileNotFound)throw new dl(cn(a),"ERROR_PROFILE_NOT_FOUND")}if(s){Array.isArray(s)||this.throwInvalidConentError(e);let a=!1;for(let l of s){EL(l)||this.throwInvalidConentError(e);let c;if(Ye(l.relativeLocation)&&l.relativeLocation)c=this.resolveExtensionLocation(l.relativeLocation);else if(Ye(l.location)){this.logService.warn(`Extensions profile: Ignoring extension with invalid location: ${l.location}`);continue}else{c=A.revive(l.location);let p=this.toRelativePath(c);p&&(a=!0,l.relativeLocation=p)}Qr(l.metadata?.hasPreReleaseVersion)&&l.metadata?.preRelease&&(a=!0,l.metadata.hasPreReleaseVersion=!0);let u=l.metadata?.id??l.identifier.uuid;o.push({identifier:u?{id:l.identifier.id,uuid:u}:{id:l.identifier.id},location:c,version:l.version,metadata:l.metadata})}a&&await this.fileService.writeFile(e,ee.fromString(JSON.stringify(s)))}if(t){o=t(o);let a=o.map(l=>({identifier:l.identifier,version:l.version,location:l.location.toJSON(),relativeLocation:this.toRelativePath(l.location),metadata:l.metadata}));await this.fileService.writeFile(e,ee.fromString(JSON.stringify(a)))}return o})}throwInvalidConentError(e){throw new dl(`Invalid extensions content in ${e.toString()}`,"ERROR_INVALID_CONTENT")}toRelativePath(e){return this.uriIdentityService.extUri.isEqual(this.uriIdentityService.extUri.dirname(e),this.extensionsLocation)?this.uriIdentityService.extUri.basename(e):void 0}resolveExtensionLocation(e){return this.uriIdentityService.extUri.joinPath(this.extensionsLocation,e)}async migrateFromOldDefaultProfileExtensionsLocation(){return this._migrationPromise||(this._migrationPromise=(async()=>{let e=this.uriIdentityService.extUri.joinPath(this.userDataProfilesService.defaultProfile.location,"extensions.json"),t=this.uriIdentityService.extUri.joinPath(this.extensionsLocation,".init-default-profile-extensions"),i;try{i=(await this.fileService.readFile(e)).value.toString()}catch(s){if(Ir(s)===1)return;throw s}this.logService.info("Migrating extensions from old default profile location",e.toString());let o;try{let s=JSON.parse(i);Array.isArray(s)&&s.every(a=>EL(a))?o=s:this.logService.warn("Skipping migrating from old default profile locaiton: Found invalid data",s)}catch(s){this.logService.error(s)}if(o)try{await this.fileService.createFile(this.userDataProfilesService.defaultProfile.extensionsResource,ee.fromString(JSON.stringify(o)),{overwrite:!1}),this.logService.info("Migrated extensions from old default profile location to new location",e.toString(),this.userDataProfilesService.defaultProfile.extensionsResource.toString())}catch(s){if(Ir(s)===3)this.logService.info("Migration from old default profile location to new location is done by another window",e.toString(),this.userDataProfilesService.defaultProfile.extensionsResource.toString());else throw s}try{await this.fileService.del(e)}catch(s){Ir(s)!==1&&this.logService.error(s)}try{await this.fileService.del(t)}catch(s){Ir(s)!==1&&this.logService.error(s)}return o})()),this._migrationPromise}getResourceAccessQueue(e){let t=this.resourcesAccessQueueMap.get(e);return t||(t=new $r,this.resourcesAccessQueueMap.set(e,t)),t}};kd=D([S(1,Be),S(2,zn),S(3,jt),S(4,z)],kd)});function Lv(r){switch(r){case 1:return v(126,null);case 2:return v(125,null);case 3:return v(127,null);case 4:return v(128,null);case 5:return v(122,null);case 6:return v(123,null);case 7:return v(120,null);case 8:return v(121,null);case 9:return v(124,null);default:return""}}var yL=_(()=>{We();Ai()});var Mv,$e,kbe,Nbe,SL,Lbe,Mbe,Ube,Fbe,Wbe,Bbe,Vbe,_L,Gbe,Hbe,Jbe,wL,qbe,Kbe,jbe,zbe,Ybe,Qbe,Xbe,$be,Zbe,eTe,tTe,nTe,rTe,iTe,oTe,sTe,aTe,lTe,cTe,dTe,uTe,pTe,Vb=_(()=>{Mv={},$e={exports:Mv};(function(r,n){if(typeof Mv=="object"&&typeof $e=="object")$e.exports=n();else if(typeof define=="function"&&define.amd)define([],n);else{var e=n();for(var t in e)(typeof Mv=="object"?Mv:r)[t]=e[t]}})(typeof self<"u"?self:void 0,(function(){return(function(r){var n={};function e(t){if(n[t])return n[t].exports;var i=n[t]={i:t,l:!1,exports:{}};return r[t].call(i.exports,i,i.exports,e),i.l=!0,i.exports}return e.m=r,e.c=n,e.d=function(t,i,o){e.o(t,i)||Object.defineProperty(t,i,{enumerable:!0,get:o})},e.r=function(t){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},e.t=function(t,i){if(1&i&&(t=e(t)),8&i||4&i&&typeof t=="object"&&t&&t.__esModule)return t;var o=Object.create(null);if(e.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:t}),2&i&&typeof t!="string")for(var s in t)e.d(o,s,function(a){return t[a]}.bind(null,s));return o},e.n=function(t){var i=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(i,"a",i),i},e.o=function(t,i){return Object.prototype.hasOwnProperty.call(t,i)},e.p="",e(e.s=0)})([function(r,n,e){(function(t){var i;n=r.exports=mt,i=typeof t=="object"&&t.env&&t.env.NODE_DEBUG&&/\bsemver\b/i.test(t.env.NODE_DEBUG)?function(){var R=Array.prototype.slice.call(arguments,0);R.unshift("SEMVER"),console.log.apply(console,R)}:function(){},n.SEMVER_SPEC_VERSION="2.0.0";var o=256,s=Number.MAX_SAFE_INTEGER||9007199254740991,a=n.re=[],l=n.src=[],c=0,u=c++;l[u]="0|[1-9]\\d*";var p=c++;l[p]="[0-9]+";var m=c++;l[m]="\\d*[a-zA-Z-][a-zA-Z0-9-]*";var h=c++;l[h]="("+l[u]+")\\.("+l[u]+")\\.("+l[u]+")";var E=c++;l[E]="("+l[p]+")\\.("+l[p]+")\\.("+l[p]+")";var y=c++;l[y]="(?:"+l[u]+"|"+l[m]+")";var P=c++;l[P]="(?:"+l[p]+"|"+l[m]+")";var T=c++;l[T]="(?:-("+l[y]+"(?:\\."+l[y]+")*))";var k=c++;l[k]="(?:-?("+l[P]+"(?:\\."+l[P]+")*))";var U=c++;l[U]="[0-9A-Za-z-]+";var O=c++;l[O]="(?:\\+("+l[U]+"(?:\\."+l[U]+")*))";var B=c++,he="v?"+l[h]+l[T]+"?"+l[O]+"?";l[B]="^"+he+"$";var Q="[v=\\s]*"+l[E]+l[k]+"?"+l[O]+"?",le=c++;l[le]="^"+Q+"$";var ne=c++;l[ne]="((?:<|>)?=?)";var De=c++;l[De]=l[p]+"|x|X|\\*";var ht=c++;l[ht]=l[u]+"|x|X|\\*";var Zt=c++;l[Zt]="[v=\\s]*("+l[ht]+")(?:\\.("+l[ht]+")(?:\\.("+l[ht]+")(?:"+l[T]+")?"+l[O]+"?)?)?";var ar=c++;l[ar]="[v=\\s]*("+l[De]+")(?:\\.("+l[De]+")(?:\\.("+l[De]+")(?:"+l[k]+")?"+l[O]+"?)?)?";var lr=c++;l[lr]="^"+l[ne]+"\\s*"+l[Zt]+"$";var J=c++;l[J]="^"+l[ne]+"\\s*"+l[ar]+"$";var W=c++;l[W]="(?:^|[^\\d])(\\d{1,16})(?:\\.(\\d{1,16}))?(?:\\.(\\d{1,16}))?(?:$|[^\\d])";var se=c++;l[se]="(?:~>?)";var ie=c++;l[ie]="(\\s*)"+l[se]+"\\s+",a[ie]=new RegExp(l[ie],"g");var ge=c++;l[ge]="^"+l[se]+l[Zt]+"$";var xe=c++;l[xe]="^"+l[se]+l[ar]+"$";var Ve=c++;l[Ve]="(?:\\^)";var Pt=c++;l[Pt]="(\\s*)"+l[Ve]+"\\s+",a[Pt]=new RegExp(l[Pt],"g");var It=c++;l[It]="^"+l[Ve]+l[Zt]+"$";var vn=c++;l[vn]="^"+l[Ve]+l[ar]+"$";var Cn=c++;l[Cn]="^"+l[ne]+"\\s*("+Q+")$|^$";var cr=c++;l[cr]="^"+l[ne]+"\\s*("+he+")$|^$";var nt=c++;l[nt]="(\\s*)"+l[ne]+"\\s*("+Q+"|"+l[Zt]+")",a[nt]=new RegExp(l[nt],"g");var Fi=c++;l[Fi]="^\\s*("+l[Zt]+")\\s+-\\s+("+l[Zt]+")\\s*$";var Qu=c++;l[Qu]="^\\s*("+l[ar]+")\\s+-\\s+("+l[ar]+")\\s*$";var Xu=c++;l[Xu]="(<|>)?=?\\s*\\*";for(var we=0;we<35;we++)i(we,l[we]),a[we]||(a[we]=new RegExp(l[we]));function fa(R,G){if(R instanceof mt)return R;if(typeof R!="string"||R.length>o||!(G?a[le]:a[B]).test(R))return null;try{return new mt(R,G)}catch{return null}}function mt(R,G){if(R instanceof mt){if(R.loose===G)return R;R=R.version}else if(typeof R!="string")throw new TypeError("Invalid Version: "+R);if(R.length>o)throw new TypeError("version is longer than "+o+" characters");if(!(this instanceof mt))return new mt(R,G);i("SemVer",R,G),this.loose=G;var K=R.trim().match(G?a[le]:a[B]);if(!K)throw new TypeError("Invalid Version: "+R);if(this.raw=R,this.major=+K[1],this.minor=+K[2],this.patch=+K[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");K[4]?this.prerelease=K[4].split(".").map((function(Ee){if(/^[0-9]+$/.test(Ee)){var ke=+Ee;if(ke>=0&&ke<s)return ke}return Ee})):this.prerelease=[],this.build=K[5]?K[5].split("."):[],this.format()}n.parse=fa,n.valid=function(R,G){var K=fa(R,G);return K?K.version:null},n.clean=function(R,G){var K=fa(R.trim().replace(/^[=v]+/,""),G);return K?K.version:null},n.SemVer=mt,mt.prototype.format=function(){return this.version=this.major+"."+this.minor+"."+this.patch,this.prerelease.length&&(this.version+="-"+this.prerelease.join(".")),this.version},mt.prototype.toString=function(){return this.version},mt.prototype.compare=function(R){return i("SemVer.compare",this.version,this.loose,R),R instanceof mt||(R=new mt(R,this.loose)),this.compareMain(R)||this.comparePre(R)},mt.prototype.compareMain=function(R){return R instanceof mt||(R=new mt(R,this.loose)),Fl(this.major,R.major)||Fl(this.minor,R.minor)||Fl(this.patch,R.patch)},mt.prototype.comparePre=function(R){if(R instanceof mt||(R=new mt(R,this.loose)),this.prerelease.length&&!R.prerelease.length)return-1;if(!this.prerelease.length&&R.prerelease.length)return 1;if(!this.prerelease.length&&!R.prerelease.length)return 0;var G=0;do{var K=this.prerelease[G],Ee=R.prerelease[G];if(i("prerelease compare",G,K,Ee),K===void 0&&Ee===void 0)return 0;if(Ee===void 0)return 1;if(K===void 0)return-1;if(K!==Ee)return Fl(K,Ee)}while(++G)},mt.prototype.inc=function(R,G){switch(R){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",G);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",G);break;case"prepatch":this.prerelease.length=0,this.inc("patch",G),this.inc("pre",G);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",G),this.inc("pre",G);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 K=this.prerelease.length;--K>=0;)typeof this.prerelease[K]=="number"&&(this.prerelease[K]++,K=-2);K===-1&&this.prerelease.push(0)}G&&(this.prerelease[0]===G?isNaN(this.prerelease[1])&&(this.prerelease=[G,0]):this.prerelease=[G,0]);break;default:throw new Error("invalid increment argument: "+R)}return this.format(),this.raw=this.version,this},n.inc=function(R,G,K,Ee){typeof K=="string"&&(Ee=K,K=void 0);try{return new mt(R,K).inc(G,Ee).version}catch{return null}},n.diff=function(R,G){if(Ty(R,G))return null;var K=fa(R),Ee=fa(G);if(K.prerelease.length||Ee.prerelease.length){for(var ke in K)if((ke==="major"||ke==="minor"||ke==="patch")&&K[ke]!==Ee[ke])return"pre"+ke;return"prerelease"}for(var ke in K)if((ke==="major"||ke==="minor"||ke==="patch")&&K[ke]!==Ee[ke])return ke},n.compareIdentifiers=Fl;var R1=/^[0-9]+$/;function Fl(R,G){var K=R1.test(R),Ee=R1.test(G);return K&&Ee&&(R=+R,G=+G),K&&!Ee?-1:Ee&&!K?1:R<G?-1:R>G?1:0}function _o(R,G,K){return new mt(R,K).compare(new mt(G,K))}function ng(R,G,K){return _o(R,G,K)>0}function rg(R,G,K){return _o(R,G,K)<0}function Ty(R,G,K){return _o(R,G,K)===0}function x1(R,G,K){return _o(R,G,K)!==0}function Z(R,G,K){return _o(R,G,K)>=0}function Py(R,G,K){return _o(R,G,K)<=0}function ig(R,G,K,Ee){var ke;switch(G){case"===":typeof R=="object"&&(R=R.version),typeof K=="object"&&(K=K.version),ke=R===K;break;case"!==":typeof R=="object"&&(R=R.version),typeof K=="object"&&(K=K.version),ke=R!==K;break;case"":case"=":case"==":ke=Ty(R,K,Ee);break;case"!=":ke=x1(R,K,Ee);break;case">":ke=ng(R,K,Ee);break;case">=":ke=Z(R,K,Ee);break;case"<":ke=rg(R,K,Ee);break;case"<=":ke=Py(R,K,Ee);break;default:throw new TypeError("Invalid operator: "+G)}return ke}function zr(R,G){if(R instanceof zr){if(R.loose===G)return R;R=R.value}if(!(this instanceof zr))return new zr(R,G);i("comparator",R,G),this.loose=G,this.parse(R),this.semver===$u?this.value="":this.value=this.operator+this.semver.version,i("comp",this)}n.rcompareIdentifiers=function(R,G){return Fl(G,R)},n.major=function(R,G){return new mt(R,G).major},n.minor=function(R,G){return new mt(R,G).minor},n.patch=function(R,G){return new mt(R,G).patch},n.compare=_o,n.compareLoose=function(R,G){return _o(R,G,!0)},n.rcompare=function(R,G,K){return _o(G,R,K)},n.sort=function(R,G){return R.sort((function(K,Ee){return n.compare(K,Ee,G)}))},n.rsort=function(R,G){return R.sort((function(K,Ee){return n.rcompare(K,Ee,G)}))},n.gt=ng,n.lt=rg,n.eq=Ty,n.neq=x1,n.gte=Z,n.lte=Py,n.cmp=ig,n.Comparator=zr;var $u={};function en(R,G){if(R instanceof en)return R.loose===G?R:new en(R.raw,G);if(R instanceof zr)return new en(R.value,G);if(!(this instanceof en))return new en(R,G);if(this.loose=G,this.raw=R,this.set=R.split(/\s*\|\|\s*/).map((function(K){return this.parseRange(K.trim())}),this).filter((function(K){return K.length})),!this.set.length)throw new TypeError("Invalid SemVer Range: "+R);this.format()}function dr(R){return!R||R.toLowerCase()==="x"||R==="*"}function aB(R,G,K,Ee,ke,An,ft,wr,an,Qn,Wi,ln,Wn){return((G=dr(K)?"":dr(Ee)?">="+K+".0.0":dr(ke)?">="+K+"."+Ee+".0":">="+G)+" "+(wr=dr(an)?"":dr(Qn)?"<"+(+an+1)+".0.0":dr(Wi)?"<"+an+"."+(+Qn+1)+".0":ln?"<="+an+"."+Qn+"."+Wi+"-"+ln:"<="+wr)).trim()}function lB(R,G){for(var K=0;K<R.length;K++)if(!R[K].test(G))return!1;if(G.prerelease.length){for(K=0;K<R.length;K++)if(i(R[K].semver),R[K].semver!==$u&&R[K].semver.prerelease.length>0){var Ee=R[K].semver;if(Ee.major===G.major&&Ee.minor===G.minor&&Ee.patch===G.patch)return!0}return!1}return!0}function og(R,G,K){try{G=new en(G,K)}catch{return!1}return G.test(R)}function Cy(R,G,K,Ee){var ke,An,ft,wr,an;switch(R=new mt(R,Ee),G=new en(G,Ee),K){case">":ke=ng,An=Py,ft=rg,wr=">",an=">=";break;case"<":ke=rg,An=Z,ft=ng,wr="<",an="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(og(R,G,Ee))return!1;for(var Qn=0;Qn<G.set.length;++Qn){var Wi=G.set[Qn],ln=null,Wn=null;if(Wi.forEach((function(br){br.semver===$u&&(br=new zr(">=0.0.0")),ln=ln||br,Wn=Wn||br,ke(br.semver,ln.semver,Ee)?ln=br:ft(br.semver,Wn.semver,Ee)&&(Wn=br)})),ln.operator===wr||ln.operator===an||(!Wn.operator||Wn.operator===wr)&&An(R,Wn.semver)||Wn.operator===an&&ft(R,Wn.semver))return!1}return!0}zr.prototype.parse=function(R){var G=this.loose?a[Cn]:a[cr],K=R.match(G);if(!K)throw new TypeError("Invalid comparator: "+R);this.operator=K[1],this.operator==="="&&(this.operator=""),K[2]?this.semver=new mt(K[2],this.loose):this.semver=$u},zr.prototype.toString=function(){return this.value},zr.prototype.test=function(R){return i("Comparator.test",R,this.loose),this.semver===$u||(typeof R=="string"&&(R=new mt(R,this.loose)),ig(R,this.operator,this.semver,this.loose))},zr.prototype.intersects=function(R,G){if(!(R instanceof zr))throw new TypeError("a Comparator is required");var K;if(this.operator==="")return K=new en(R.value,G),og(this.value,K,G);if(R.operator==="")return K=new en(this.value,G),og(R.semver,K,G);var Ee=!(this.operator!==">="&&this.operator!==">"||R.operator!==">="&&R.operator!==">"),ke=!(this.operator!=="<="&&this.operator!=="<"||R.operator!=="<="&&R.operator!=="<"),An=this.semver.version===R.semver.version,ft=!(this.operator!==">="&&this.operator!=="<="||R.operator!==">="&&R.operator!=="<="),wr=ig(this.semver,"<",R.semver,G)&&(this.operator===">="||this.operator===">")&&(R.operator==="<="||R.operator==="<"),an=ig(this.semver,">",R.semver,G)&&(this.operator==="<="||this.operator==="<")&&(R.operator===">="||R.operator===">");return Ee||ke||An&&ft||wr||an},n.Range=en,en.prototype.format=function(){return this.range=this.set.map((function(R){return R.join(" ").trim()})).join("||").trim(),this.range},en.prototype.toString=function(){return this.range},en.prototype.parseRange=function(R){var G=this.loose;R=R.trim(),i("range",R,G);var K=G?a[Qu]:a[Fi];R=R.replace(K,aB),i("hyphen replace",R),R=R.replace(a[nt],"$1$2$3"),i("comparator trim",R,a[nt]),R=(R=(R=R.replace(a[ie],"$1~")).replace(a[Pt],"$1^")).split(/\s+/).join(" ");var Ee=G?a[Cn]:a[cr],ke=R.split(" ").map((function(An){return(function(ft,wr){return i("comp",ft),ft=(function(an,Qn){return an.trim().split(/\s+/).map((function(Wi){return(function(ln,Wn){i("caret",ln,Wn);var br=Wn?a[vn]:a[It];return ln.replace(br,(function(mi,Ue,et,Ot,qt){var Bn;return i("caret",ln,mi,Ue,et,Ot,qt),dr(Ue)?Bn="":dr(et)?Bn=">="+Ue+".0.0 <"+(+Ue+1)+".0.0":dr(Ot)?Bn=Ue==="0"?">="+Ue+"."+et+".0 <"+Ue+"."+(+et+1)+".0":">="+Ue+"."+et+".0 <"+(+Ue+1)+".0.0":qt?(i("replaceCaret pr",qt),qt.charAt(0)!=="-"&&(qt="-"+qt),Bn=Ue==="0"?et==="0"?">="+Ue+"."+et+"."+Ot+qt+" <"+Ue+"."+et+"."+(+Ot+1):">="+Ue+"."+et+"."+Ot+qt+" <"+Ue+"."+(+et+1)+".0":">="+Ue+"."+et+"."+Ot+qt+" <"+(+Ue+1)+".0.0"):(i("no pr"),Bn=Ue==="0"?et==="0"?">="+Ue+"."+et+"."+Ot+" <"+Ue+"."+et+"."+(+Ot+1):">="+Ue+"."+et+"."+Ot+" <"+Ue+"."+(+et+1)+".0":">="+Ue+"."+et+"."+Ot+" <"+(+Ue+1)+".0.0"),i("caret return",Bn),Bn}))})(Wi,Qn)})).join(" ")})(ft,wr),i("caret",ft),ft=(function(an,Qn){return an.trim().split(/\s+/).map((function(Wi){return(function(ln,Wn){var br=Wn?a[xe]:a[ge];return ln.replace(br,(function(mi,Ue,et,Ot,qt){var Bn;return i("tilde",ln,mi,Ue,et,Ot,qt),dr(Ue)?Bn="":dr(et)?Bn=">="+Ue+".0.0 <"+(+Ue+1)+".0.0":dr(Ot)?Bn=">="+Ue+"."+et+".0 <"+Ue+"."+(+et+1)+".0":qt?(i("replaceTilde pr",qt),qt.charAt(0)!=="-"&&(qt="-"+qt),Bn=">="+Ue+"."+et+"."+Ot+qt+" <"+Ue+"."+(+et+1)+".0"):Bn=">="+Ue+"."+et+"."+Ot+" <"+Ue+"."+(+et+1)+".0",i("tilde return",Bn),Bn}))})(Wi,Qn)})).join(" ")})(ft,wr),i("tildes",ft),ft=(function(an,Qn){return i("replaceXRanges",an,Qn),an.split(/\s+/).map((function(Wi){return(function(ln,Wn){ln=ln.trim();var br=Wn?a[J]:a[lr];return ln.replace(br,(function(mi,Ue,et,Ot,qt,Bn){i("xRange",ln,mi,Ue,et,Ot,qt,Bn);var D1=dr(et),Zu=D1||dr(Ot),ep=Zu||dr(qt);return Ue==="="&&ep&&(Ue=""),D1?mi=Ue===">"||Ue==="<"?"<0.0.0":"*":Ue&&ep?(Zu&&(Ot=0),ep&&(qt=0),Ue===">"?(Ue=">=",Zu?(et=+et+1,Ot=0,qt=0):ep&&(Ot=+Ot+1,qt=0)):Ue==="<="&&(Ue="<",Zu?et=+et+1:Ot=+Ot+1),mi=Ue+et+"."+Ot+"."+qt):Zu?mi=">="+et+".0.0 <"+(+et+1)+".0.0":ep&&(mi=">="+et+"."+Ot+".0 <"+et+"."+(+Ot+1)+".0"),i("xRange return",mi),mi}))})(Wi,Qn)})).join(" ")})(ft,wr),i("xrange",ft),ft=(function(an,Qn){return i("replaceStars",an,Qn),an.trim().replace(a[Xu],"")})(ft,wr),i("stars",ft),ft})(An,G)})).join(" ").split(/\s+/);return this.loose&&(ke=ke.filter((function(An){return!!An.match(Ee)}))),ke=ke.map((function(An){return new zr(An,G)}))},en.prototype.intersects=function(R,G){if(!(R instanceof en))throw new TypeError("a Range is required");return this.set.some((function(K){return K.every((function(Ee){return R.set.some((function(ke){return ke.every((function(An){return Ee.intersects(An,G)}))}))}))}))},n.toComparators=function(R,G){return new en(R,G).set.map((function(K){return K.map((function(Ee){return Ee.value})).join(" ").trim().split(" ")}))},en.prototype.test=function(R){if(!R)return!1;typeof R=="string"&&(R=new mt(R,this.loose));for(var G=0;G<this.set.length;G++)if(lB(this.set[G],R))return!0;return!1},n.satisfies=og,n.maxSatisfying=function(R,G,K){var Ee=null,ke=null;try{var An=new en(G,K)}catch{return null}return R.forEach((function(ft){An.test(ft)&&(Ee&&ke.compare(ft)!==-1||(ke=new mt(Ee=ft,K)))})),Ee},n.minSatisfying=function(R,G,K){var Ee=null,ke=null;try{var An=new en(G,K)}catch{return null}return R.forEach((function(ft){An.test(ft)&&(Ee&&ke.compare(ft)!==1||(ke=new mt(Ee=ft,K)))})),Ee},n.validRange=function(R,G){try{return new en(R,G).range||"*"}catch{return null}},n.ltr=function(R,G,K){return Cy(R,G,"<",K)},n.gtr=function(R,G,K){return Cy(R,G,">",K)},n.outside=Cy,n.prerelease=function(R,G){var K=fa(R,G);return K&&K.prerelease.length?K.prerelease:null},n.intersects=function(R,G,K){return R=new en(R,K),G=new en(G,K),R.intersects(G)},n.coerce=function(R){if(R instanceof mt)return R;if(typeof R!="string")return null;var G=R.match(a[W]);return G==null?null:fa((G[1]||"0")+"."+(G[2]||"0")+"."+(G[3]||"0"))}}).call(this,e(1))},function(r,n){var e,t,i=r.exports={};function o(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function a(P){if(e===setTimeout)return setTimeout(P,0);if((e===o||!e)&&setTimeout)return e=setTimeout,setTimeout(P,0);try{return e(P,0)}catch{try{return e.call(null,P,0)}catch{return e.call(this,P,0)}}}(function(){try{e=typeof setTimeout=="function"?setTimeout:o}catch{e=o}try{t=typeof clearTimeout=="function"?clearTimeout:s}catch{t=s}})();var l,c=[],u=!1,p=-1;function m(){u&&l&&(u=!1,l.length?c=l.concat(c):p=-1,c.length&&h())}function h(){if(!u){var P=a(m);u=!0;for(var T=c.length;T;){for(l=c,c=[];++p<T;)l&&l[p].run();p=-1,T=c.length}l=null,u=!1,(function(k){if(t===clearTimeout)return clearTimeout(k);if((t===s||!t)&&clearTimeout)return t=clearTimeout,clearTimeout(k);try{t(k)}catch{try{return t.call(null,k)}catch{return t.call(this,k)}}})(P)}}function E(P,T){this.fun=P,this.array=T}function y(){}i.nextTick=function(P){var T=new Array(arguments.length-1);if(arguments.length>1)for(var k=1;k<arguments.length;k++)T[k-1]=arguments[k];c.push(new E(P,T)),c.length!==1||u||a(h)},E.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=y,i.addListener=y,i.once=y,i.off=y,i.removeListener=y,i.removeAllListeners=y,i.emit=y,i.prependListener=y,i.prependOnceListener=y,i.listeners=function(P){return[]},i.binding=function(P){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(P){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}}])}));kbe=$e.exports.SEMVER_SPEC_VERSION,Nbe=$e.exports.parse,SL=$e.exports.valid,Lbe=$e.exports.coerce,Mbe=$e.exports.clean,Ube=$e.exports.inc,Fbe=$e.exports.major,Wbe=$e.exports.minor,Bbe=$e.exports.patch,Vbe=$e.exports.prerelease,_L=$e.exports.gt,Gbe=$e.exports.gte,Hbe=$e.exports.lt,Jbe=$e.exports.lte,wL=$e.exports.eq,qbe=$e.exports.neq,Kbe=$e.exports.cmp,jbe=$e.exports.compare,zbe=$e.exports.rcompare,Ybe=$e.exports.compareIdentifiers,Qbe=$e.exports.rcompareIdentifiers,Xbe=$e.exports.compareBuild,$be=$e.exports.sort,Zbe=$e.exports.rsort,eTe=$e.exports.diff,tTe=$e.exports.validRange,nTe=$e.exports.satisfies,rTe=$e.exports.maxSatisfying,iTe=$e.exports.minSatisfying,oTe=$e.exports.minVersion,sTe=$e.exports.gtr,aTe=$e.exports.ltr,lTe=$e.exports.outside,cTe=$e.exports.intersects,dTe=$e.exports.SemVer,uTe=$e.exports.Comparator,pTe=$e.exports.Range});var I7,TL,PL=_(()=>{I7={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"},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"}},TL=Object.freeze(I7)});function E7(r){return r=r.trim(),r==="*"||CL.test(r)}function Hb(r){if(!E7(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 n=r.match(CL);return n?{hasCaret:n[1]==="^",hasGreaterEquals:n[1]===">=",majorBase:n[2]==="x"?0:parseInt(n[2],10),majorMustEqual:n[2]!=="x",minorBase:n[4]==="x"?0:parseInt(n[4],10),minorMustEqual:n[4]!=="x",patchBase:n[6]==="x"?0:parseInt(n[6],10),patchMustEqual:n[6]!=="x",preRelease:n[8]||null}:null}function Jb(r){if(!r)return null;let n=r.majorBase,e=r.majorMustEqual,t=r.minorBase,i=r.minorMustEqual,o=r.patchBase,s=r.patchMustEqual;r.hasCaret&&(n===0||(i=!1),s=!1);let a=0;if(r.preRelease){let l=v7.exec(r.preRelease);if(l){let[,c,u,p,m,h]=l;a=Date.UTC(Number(c),Number(u)-1,Number(p),Number(m)||0,Number(h)||0)}}return{majorBase:n,majorMustEqual:e,minorBase:t,minorMustEqual:i,patchBase:o,patchMustEqual:s,isMinimum:r.hasGreaterEquals,notBefore:a}}function y7(r,n,e){let t;typeof r=="string"?t=Jb(Hb(r)):t=r;let i;n instanceof Date?i=n.getTime():typeof n=="string"&&(i=new Date(n).getTime());let o;if(typeof e=="string"?o=Jb(Hb(e)):o=e,!t||!o)return!1;let s=t.majorBase,a=t.minorBase,l=t.patchBase,c=o.majorBase,u=o.minorBase,p=o.patchBase,m=o.notBefore,h=o.majorMustEqual,E=o.minorMustEqual,y=o.patchMustEqual;return o.isMinimum?s>c?!0:s<c?!1:a>u?!0:a<u||i&&i<m?!1:l>=p:(s===1&&c===0&&(!h||!E||!y)&&(c=1,u=0,p=0,h=!0,E=!1,y=!1),s<c?!1:s>c?!h:a<u?!1:a>u?!E:l<p?!1:l>p?!y:!(i&&i<m))}function AL(r,n,e,t,i,o){let s=[];if(typeof t.publisher<"u"&&typeof t.publisher!="string")return s.push([Xe.Error,v(2049,null)]),s;if(typeof t.name!="string")return s.push([Xe.Error,v(2048,null,"name")]),s;if(typeof t.version!="string")return s.push([Xe.Error,v(2050,null,"version")]),s;if(!t.engines)return s.push([Xe.Error,v(2041,null,"engines")]),s;if(typeof t.engines.vscode!="string")return s.push([Xe.Error,v(2042,null,"engines.vscode")]),s;if(typeof t.extensionDependencies<"u"&&!Gb(t.extensionDependencies))return s.push([Xe.Error,v(2044,null,"extensionDependencies")]),s;if(typeof t.extensionAffinity<"u"&&!Gb(t.extensionAffinity))return s.push([Xe.Error,v(2043,null,"extensionAffinity")]),s;if(typeof t.activationEvents<"u"){if(!Gb(t.activationEvents))return s.push([Xe.Error,v(2037,null,"activationEvents")]),s;if(typeof t.main>"u"&&typeof t.browser>"u")return s.push([Xe.Error,v(2038,null,"activationEvents","main","browser")]),s}if(typeof t.extensionKind<"u"&&typeof t.main>"u"&&s.push([Xe.Warning,v(2045,null,"extensionKind")]),typeof t.main<"u"){if(typeof t.main!="string")return s.push([Xe.Error,v(2046,null,"main")]),s;{let c=be(e,t.main);kS(c,e)||s.push([Xe.Warning,v(2047,null,c.path,e.path)])}}if(typeof t.browser<"u"){if(typeof t.browser!="string")return s.push([Xe.Error,v(2039,null,"browser")]),s;{let c=be(e,t.browser);kS(c,e)||s.push([Xe.Warning,v(2040,null,c.path,e.path)])}}if(!SL(t.version))return s.push([Xe.Error,v(2051,null)]),s;let a=[];if(!S7(r,n,t,i,a))for(let c of a)s.push([Xe.Error,c]);if(o&&t.enabledApiProposals?.length){let c=[];if(!_7([...t.enabledApiProposals],c))for(let u of c)s.push([Xe.Error,u])}return s}function S7(r,n,e,t,i){return t||typeof e.main>"u"&&typeof e.browser>"u"?!0:w7(r,n,e.engines.vscode,i)}function _7(r,n){if(r.length===0)return!0;let e=Array.isArray(n)?n:void 0,t=(Array.isArray(n)?void 0:n)??TL,i=[],o=uL(r);for(let{proposalName:s,version:a}of o){if(!a)continue;t[s]?.version!==a&&i.push(s)}return i.length?(e&&(i.length===1?e.push(v(2035,null,i[0])):e.push(v(2036,null,i.slice(0,i.length-1).map(s=>`'${s}'`).join(", "),i[i.length-1]))),!1):!0}function w7(r,n,e,t=[]){let i=Jb(Hb(e));if(!i)return t.push(v(2055,null,e)),!1;if(i.majorBase===0){if(!i.majorMustEqual||!i.minorMustEqual)return t.push(v(2053,null,e)),!1}else if(!i.majorMustEqual)return t.push(v(2054,null,e)),!1;return y7(r,n,i)?!0:(t.push(v(2052,null,r,e)),!1)}function Gb(r){if(!Array.isArray(r))return!1;for(let n=0,e=r.length;n<e;n++)if(typeof r[n]!="string")return!1;return!0}var CL,v7,RL=_(()=>{Ut();xm();We();Vb();af();PL();CL=/^(\^|>=)?((\d+)|x)\.((\d+)|x)\.((\d+)|x)(\-.*)?$/,v7=/^-(\d{4})(\d{2})(\d{2})(\d{2})?(\d{2})?$/});function xL(r,n,e,t){try{b7(r,n,e,t)}catch(i){r.error(i?.message??i)}return n}function b7(r,n,e,t){let i=(o,s,a)=>{let l=o[s];if(Ye(l)){let c=l,u=c.length;if(u>1&&c[0]==="%"&&c[u-1]==="%"){let p=c.substr(1,u-2),m=e[p];m===void 0&&t&&(m=t[p]);let h=typeof m=="string"?m:m?.message,E=t?.[p],y=typeof E=="string"?E:E?.message;if(!h){y||r.warn(`[${n.name}]: ${v(2020,null,p)}`);return}if(a&&(s==="title"||s==="category")&&y&&y!==h){let P={value:h,original:y};o[s]=P}else o[s]=h}}else if(ut(l))for(let c in l)l.hasOwnProperty(c)&&(c==="commands"?i(l,c,!0):i(l,c,a));else if(Array.isArray(l))for(let c=0;c<l.length;c++)i(l,c,a)};for(let o in n)n.hasOwnProperty(o)&&i(n,o)}var DL=_(()=>{qe();We()});var OL,kL,cf,ul,Nd,Ld,Uv,qb=_(()=>{dn();Ce();Gr();Et();rt();Ai();yL();te();at();Ne();ce();Ut();Vb();xm();Ie();We();fr();Bb();af();RL();ct();de();me();In();ae();Bp();lf();Ci();Pi();DL();(n=>{function r(e,t){if(e===t)return!0;let i=Object.keys(e),o=new Set;for(let s of Object.keys(t))o.add(s);if(i.length!==o.size)return!1;for(let s of i){if(e[s]!==t[s])return!1;o.delete(s)}return o.size===0}n.equals=r})(OL||={});kL=V("IExtensionsScannerService"),cf=class extends M{constructor(e,t,i,o,s,a,l,c,u,p,m,h){super();this.systemExtensionsLocation=e;this.userExtensionsLocation=t;this.extensionsControlLocation=i;this.userDataProfilesService=s;this.extensionsProfileScannerService=a;this.fileService=l;this.logService=c;this.environmentService=u;this.productService=p;this.uriIdentityService=m;this.instantiationService=h;this._onDidChangeCache=this._register(new C);this.onDidChangeCache=this._onDidChangeCache.event;this.initializeDefaultProfileExtensionsPromise=void 0;this.systemExtensionsCachedScanner=this._register(this.instantiationService.createInstance(Ld,o)),this.userExtensionsCachedScanner=this._register(this.instantiationService.createInstance(Ld,o)),this.extensionsScanner=this._register(this.instantiationService.createInstance(Nd)),this._register(this.systemExtensionsCachedScanner.onDidChangeCache(()=>this._onDidChangeCache.fire(0))),this._register(this.userExtensionsCachedScanner.onDidChangeCache(()=>this._onDidChangeCache.fire(1)))}getTargetPlatform(){return this._targetPlatformPromise||(this._targetPlatformPromise=vL(this.fileService,this.logService)),this._targetPlatformPromise}async scanAllExtensions(e,t){let[i,o]=await Promise.all([this.scanSystemExtensions(e),this.scanUserExtensions(t)]);return this.dedupExtensions(i,o,[],await this.getTargetPlatform(),!0)}async scanSystemExtensions(e){let t=[];t.push(this.scanDefaultSystemExtensions(e.language)),t.push(this.scanDevSystemExtensions(e.language,!!e.checkControlFile));let[i,o]=await Promise.all(t);return this.applyScanOptions([...i,...o],0,{pickLatest:!1})}async scanUserExtensions(e){this.logService.trace("Started scanning user extensions",e.profileLocation);let t=this.uriIdentityService.extUri.isEqual(e.profileLocation,this.userDataProfilesService.defaultProfile.extensionsResource)?{bailOutWhenFileNotFound:!0}:void 0,i=await this.createExtensionScannerInput(e.profileLocation,!0,1,e.language,!0,t,e.productVersion??this.getProductVersion()),o=e.useCache&&!i.devMode?this.userExtensionsCachedScanner:this.extensionsScanner,s;try{s=await o.scanExtensions(i)}catch(a){if(a instanceof dl&&a.code==="ERROR_PROFILE_NOT_FOUND")await this.doInitializeDefaultProfileExtensions(),s=await o.scanExtensions(i);else throw a}return s=await this.applyScanOptions(s,1,{includeInvalid:e.includeInvalid,pickLatest:!0}),this.logService.trace("Scanned user extensions:",s.length),s}async scanAllUserExtensions(e={includeInvalid:!0,includeAllVersions:!0}){let t=await this.createExtensionScannerInput(this.userExtensionsLocation,!1,1,void 0,!0,void 0,this.getProductVersion()),i=await this.extensionsScanner.scanExtensions(t);return this.applyScanOptions(i,1,{includeAllVersions:e.includeAllVersions,includeInvalid:e.includeInvalid})}async scanExtensionsUnderDevelopment(e,t){if(this.environmentService.isExtensionDevelopment&&this.environmentService.extensionDevelopmentLocationURI){let i=(await Promise.all(this.environmentService.extensionDevelopmentLocationURI.filter(o=>o.scheme===Y.file).map(async o=>{let s=await this.createExtensionScannerInput(o,!1,1,t.language,!1,void 0,this.getProductVersion());return(await this.extensionsScanner.scanOneOrMultipleExtensions(s)).map(l=>(l.type=e.find(c=>cl(c.identifier,l.identifier))?.type??l.type,this.extensionsScanner.validate(l,s)))}))).flat();return this.applyScanOptions(i,"development",{includeInvalid:t.includeInvalid,pickLatest:!0})}return[]}async scanExistingExtension(e,t,i){let o=await this.createExtensionScannerInput(e,!1,t,i.language,!0,void 0,this.getProductVersion()),s=await this.extensionsScanner.scanExtension(o);return!s||!i.includeInvalid&&!s.isValid?null:s}async scanOneOrMultipleExtensions(e,t,i){let o=await this.createExtensionScannerInput(e,!1,t,i.language,!0,void 0,this.getProductVersion()),s=await this.extensionsScanner.scanOneOrMultipleExtensions(o);return this.applyScanOptions(s,t,{includeInvalid:i.includeInvalid,pickLatest:!0})}async scanMultipleExtensions(e,t,i){let o=[];return await Promise.all(e.map(async s=>{let a=await this.scanOneOrMultipleExtensions(s,t,i);o.push(...a)})),this.applyScanOptions(o,t,{includeInvalid:i.includeInvalid,pickLatest:!0})}async updateManifestMetadata(e,t){let i=be(e,"package.json"),o=(await this.fileService.readFile(i)).value.toString(),s=JSON.parse(o);s.__metadata={...s.__metadata,...t},await this.fileService.writeFile(be(e,"package.json"),ee.fromString(JSON.stringify(s,null,"	")))}async initializeDefaultProfileExtensions(){try{await this.extensionsProfileScannerService.scanProfileExtensions(this.userDataProfilesService.defaultProfile.extensionsResource,{bailOutWhenFileNotFound:!0})}catch(e){if(e instanceof dl&&e.code==="ERROR_PROFILE_NOT_FOUND")await this.doInitializeDefaultProfileExtensions();else throw e}}async doInitializeDefaultProfileExtensions(){return this.initializeDefaultProfileExtensionsPromise||(this.initializeDefaultProfileExtensionsPromise=(async()=>{try{this.logService.info("Started initializing default profile extensions in extensions installation folder.",this.userExtensionsLocation.toString());let e=await this.scanAllUserExtensions({includeInvalid:!0});if(e.length)await this.extensionsProfileScannerService.addExtensionsToProfile(e.map(t=>[t,t.metadata]),this.userDataProfilesService.defaultProfile.extensionsResource);else try{await this.fileService.createFile(this.userDataProfilesService.defaultProfile.extensionsResource,ee.fromString(JSON.stringify([])))}catch(t){Ir(t)!==1&&this.logService.warn("Failed to create default profile extensions manifest in extensions installation folder.",this.userExtensionsLocation.toString(),cn(t))}this.logService.info("Completed initializing default profile extensions in extensions installation folder.",this.userExtensionsLocation.toString())}catch(e){this.logService.error(e)}finally{this.initializeDefaultProfileExtensionsPromise=void 0}})()),this.initializeDefaultProfileExtensionsPromise}async applyScanOptions(e,t,i={}){return i.includeAllVersions||(e=this.dedupExtensions(t===0?e:void 0,t===1?e:void 0,t==="development"?e:void 0,await this.getTargetPlatform(),!!i.pickLatest)),i.includeInvalid||(e=e.filter(o=>o.isValid)),e.sort((o,s)=>{let a=Pe(o.location.fsPath),l=Pe(s.location.fsPath);return a<l?-1:a>l?1:0})}dedupExtensions(e,t,i,o,s){let a=(c,u,p)=>{if(!p){if(c.metadata?.isApplicationScoped&&!u.metadata?.isApplicationScoped)return!1;if(!c.metadata?.isApplicationScoped&&u.metadata?.isApplicationScoped)return!0}if(c.isValid&&!u.isValid)return!1;if(c.isValid===u.isValid){if(s&&_L(c.manifest.version,u.manifest.version))return this.logService.debug(`Skipping extension ${u.location.path} with lower version ${u.manifest.version} in favour of ${c.location.path} with version ${c.manifest.version}`),!1;if(wL(c.manifest.version,u.manifest.version)){if(c.type===0)return this.logService.debug(`Skipping extension ${u.location.path} in favour of system extension ${c.location.path} with same version`),!1;if(c.targetPlatform===o)return this.logService.debug(`Skipping extension ${u.location.path} from different target platform ${u.targetPlatform}`),!1}}return p?this.logService.warn(`Overwriting user extension ${c.location.path} with ${u.location.path}.`):this.logService.debug(`Overwriting user extension ${c.location.path} with ${u.location.path}.`),!0},l=new Ov;return e?.forEach(c=>{let u=l.get(c.identifier.id);(!u||a(u,c,!1))&&l.set(c.identifier.id,c)}),t?.forEach(c=>{let u=l.get(c.identifier.id);if(!u&&e&&c.type===0){this.logService.debug(`Skipping obsolete system extension ${c.location.path}.`);return}(!u||a(u,c,!1))&&l.set(c.identifier.id,c)}),i?.forEach(c=>{let u=l.get(c.identifier.id);(!u||a(u,c,!0))&&l.set(c.identifier.id,c),l.set(c.identifier.id,c)}),[...l.values()]}async scanDefaultSystemExtensions(e){this.logService.trace("Started scanning system extensions");let t=await this.createExtensionScannerInput(this.systemExtensionsLocation,!1,0,e,!0,void 0,this.getProductVersion()),o=await(t.devMode?this.extensionsScanner:this.systemExtensionsCachedScanner).scanExtensions(t);return this.logService.trace("Scanned system extensions:",o.length),o}async scanDevSystemExtensions(e,t){let i=this.environmentService.isBuilt?[]:this.productService.builtInExtensions;if(!i?.length)return[];this.logService.trace("Started scanning dev system extensions");let o=t?await this.getBuiltInExtensionControl():{},s=[],a=A.file(kt(H(gt.asFileUri("").fsPath,"..",".build","builtInExtensions")));for(let c of i){let u=o[c.name]||"marketplace";switch(u){case"disabled":break;case"marketplace":s.push(be(a,c.name));break;default:s.push(A.file(u));break}}let l=await Promise.all(s.map(async c=>this.extensionsScanner.scanExtension(await this.createExtensionScannerInput(c,!1,0,e,!0,void 0,this.getProductVersion()))));return this.logService.trace("Scanned dev system extensions:",l.length),wt(l)}async getBuiltInExtensionControl(){try{let e=await this.fileService.readFile(this.extensionsControlLocation);return JSON.parse(e.value.toString())}catch{return{}}}async createExtensionScannerInput(e,t,i,o,s,a,l){let c=await this.getTranslations(o??Ur),u=await this.getMtime(e),p=t&&!this.uriIdentityService.extUri.isEqual(e,this.userDataProfilesService.defaultProfile.extensionsResource)?this.userDataProfilesService.defaultProfile.extensionsResource:void 0,m=p?await this.getMtime(p):void 0;return new ul(e,u,p,m,t,a,i,s,l.version,l.date,this.productService.commit,!this.environmentService.isBuilt,o,c)}async getMtime(e){try{let t=await this.fileService.stat(e);if(typeof t.mtime=="number")return t.mtime}catch{}}getProductVersion(){return{version:this.productService.version,date:this.productService.date}}};cf=D([S(4,zn),S(5,ra),S(6,Be),S(7,z),S(8,mr),S(9,He),S(10,jt),S(11,rn)],cf);ul=class{constructor(n,e,t,i,o,s,a,l,c,u,p,m,h,E){this.location=n;this.mtime=e;this.applicationExtensionslocation=t;this.applicationExtensionslocationMtime=i;this.profile=o;this.profileScanOptions=s;this.type=a;this.validate=l;this.productVersion=c;this.productDate=u;this.productCommit=p;this.devMode=m;this.language=h;this.translations=E}static createNlsConfiguration(n){return{language:n.language,pseudo:n.language==="pseudo",devMode:n.devMode,translations:n.translations}}static equals(n,e){return wp(n.location,e.location)&&n.mtime===e.mtime&&wp(n.applicationExtensionslocation,e.applicationExtensionslocation)&&n.applicationExtensionslocationMtime===e.applicationExtensionslocationMtime&&n.profile===e.profile&&Or(n.profileScanOptions,e.profileScanOptions)&&n.type===e.type&&n.validate===e.validate&&n.productVersion===e.productVersion&&n.productDate===e.productDate&&n.productCommit===e.productCommit&&n.devMode===e.devMode&&n.language===e.language&&OL.equals(n.translations,e.translations)}},Nd=class extends M{constructor(e,t,i,o,s,a){super();this.extensionsProfileScannerService=e;this.uriIdentityService=t;this.fileService=i;this.environmentService=s;this.logService=a;this.extensionsEnabledWithApiProposalVersion=o.extensionsEnabledWithApiProposalVersion?.map(l=>l.toLowerCase())??[]}async scanExtensions(e){return e.profile?this.scanExtensionsFromProfile(e):this.scanExtensionsFromLocation(e)}async scanExtensionsFromLocation(e){let t=await this.fileService.resolve(e.location);if(!t.children?.length)return[];let i=await Promise.all(t.children.map(async o=>{if(!o.isDirectory||e.type===1&&pr(o.resource).indexOf(".")===0)return null;let s=new ul(o.resource,e.mtime,e.applicationExtensionslocation,e.applicationExtensionslocationMtime,e.profile,e.profileScanOptions,e.type,e.validate,e.productVersion,e.productDate,e.productCommit,e.devMode,e.language,e.translations);return this.scanExtension(s)}));return wt(i).sort((o,s)=>o.location.path<s.location.path?-1:1)}async scanExtensionsFromProfile(e){let t=await this.scanExtensionsFromProfileResource(e.location,()=>!0,e);if(e.applicationExtensionslocation&&!this.uriIdentityService.extUri.isEqual(e.location,e.applicationExtensionslocation)){t=t.filter(o=>!o.metadata?.isApplicationScoped);let i=await this.scanExtensionsFromProfileResource(e.applicationExtensionslocation,o=>!!o.metadata?.isBuiltin||!!o.metadata?.isApplicationScoped,e);t.push(...i)}return t}async scanExtensionsFromProfileResource(e,t,i){let o=await this.extensionsProfileScannerService.scanProfileExtensions(e,i.profileScanOptions);if(!o.length)return[];let s=await Promise.all(o.map(async a=>{if(t(a)){let l=new ul(a.location,i.mtime,i.applicationExtensionslocation,i.applicationExtensionslocationMtime,i.profile,i.profileScanOptions,i.type,i.validate,i.productVersion,i.productDate,i.productCommit,i.devMode,i.language,i.translations);return this.scanExtension(l,a)}return null}));return wt(s)}async scanOneOrMultipleExtensions(e){try{if(await this.fileService.exists(be(e.location,"package.json"))){let t=await this.scanExtension(e);return t?[t]:[]}else return await this.scanExtensions(e)}catch(t){return this.logService.error(`Error scanning extensions at ${e.location.path}:`,cn(t)),[]}}async scanExtension(e,t){let i=[],o=!0,s;try{s=await this.scanExtensionManifest(e.location)}catch(h){if(t){i.push([Xe.Error,cn(h)]),o=!1;let[E,y]=t.identifier.id.split(".");s={name:y,publisher:E,version:t.version,engines:{vscode:""}}}else return e.type!==0&&this.logService.error(h),null}s.publisher||(s.publisher=kv);let a;t?a={...t.metadata,size:s.__metadata?.size}:s.__metadata&&(a={installedTimestamp:s.__metadata.installedTimestamp,size:s.__metadata.size,targetPlatform:s.__metadata.targetPlatform}),delete s.__metadata;let l=IL(s.publisher,s.name),c=a?.id?{id:l,uuid:a.id}:{id:l},u=a?.isSystem?0:e.type,p=u===0||!!a?.isBuiltin;try{s=await this.translateManifest(e.location,s,ul.createNlsConfiguration(e))}catch(h){this.logService.warn("Failed to translate manifest",cn(h))}let m={type:u,identifier:c,manifest:s,location:e.location,isBuiltin:p,targetPlatform:a?.targetPlatform??"undefined",publisherDisplayName:a?.publisherDisplayName,metadata:a,isValid:o,validations:i,preRelease:!!a?.preRelease};return e.validate&&(m=this.validate(m,e)),s.enabledApiProposals&&(!this.environmentService.isBuilt||this.extensionsEnabledWithApiProposalVersion.includes(l.toLowerCase()))&&(s.originalEnabledApiProposals=s.enabledApiProposals,s.enabledApiProposals=pL([...s.enabledApiProposals])),m}validate(e,t){let i=e.isValid,o=this.environmentService.isBuilt&&this.extensionsEnabledWithApiProposalVersion.includes(e.identifier.id.toLowerCase()),s=AL(t.productVersion,t.productDate,t.location,e.manifest,e.isBuiltin,o);for(let[a,l]of s)a===Xe.Error&&(i=!1,this.logService.error(this.formatMessage(t.location,l)));return e.isValid=i,e.validations=[...e.validations,...s],e}async scanExtensionManifest(e){let t=be(e,"package.json"),i;try{i=(await this.fileService.readFile(t)).value.toString()}catch(s){throw Ir(s)!==1&&this.logService.error(this.formatMessage(e,v(2021,null,t.path,s.message))),s}let o;try{o=JSON.parse(i)}catch(s){let a=[];ti(i,a);for(let l of a)this.logService.error(this.formatMessage(e,v(2023,null,t.path,l.offset,l.length,Lv(l.error))));throw s}if(Ws(o)!=="object"){let s=this.formatMessage(e,v(2024,null,t.path));throw this.logService.error(s),new Error(s)}return o}async translateManifest(e,t,i){let o=await this.getLocalizedMessages(e,t,i);if(o)try{let s=[],a=await this.resolveOriginalMessageBundle(o.default,s);if(s.length>0)return s.forEach(c=>{this.logService.error(this.formatMessage(e,v(2025,null,o.default?.path,Lv(c.error))))}),t;if(Ws(o)!=="object")return this.logService.error(this.formatMessage(e,v(2022,null,o.default?.path))),t;let l=o.values||Object.create(null);return xL(this.logService,t,l,a)}catch{}return t}async getLocalizedMessages(e,t,i){let o=be(e,"package.nls.json"),s=(u,p)=>{p.forEach(m=>{this.logService.error(this.formatMessage(e,v(2025,null,u?.path,Lv(m.error))))})},a=u=>{this.logService.error(this.formatMessage(e,v(2022,null,u?.path)))},l=`${t.publisher}.${t.name}`,c=i.translations[l];if(c)try{let u=A.file(c),p=(await this.fileService.readFile(u)).value.toString(),m=[],h=ti(p,m);return m.length>0?(s(u,m),{values:void 0,default:o}):Ws(h)!=="object"?(a(u),{values:void 0,default:o}):{values:h.contents?h.contents.package:void 0,default:o}}catch{return{values:void 0,default:o}}else{if(!await this.fileService.exists(o))return;let p;try{p=await this.findMessageBundles(e,i)}catch{return}if(!p.localized)return{values:void 0,default:p.original};try{let m=(await this.fileService.readFile(p.localized)).value.toString(),h=[],E=ti(m,h);return h.length>0?(s(p.localized,h),{values:void 0,default:p.original}):Ws(E)!=="object"?(a(p.localized),{values:void 0,default:p.original}):{values:E,default:p.original}}catch{return{values:void 0,default:p.original}}}}async resolveOriginalMessageBundle(e,t){if(e)try{let i=(await this.fileService.readFile(e)).value.toString();return ti(i,t)}catch{}}findMessageBundles(e,t){return new Promise((i,o)=>{let s=a=>{let l=be(e,`package.nls.${a}.json`);this.fileService.exists(l).then(c=>{c&&i({localized:l,original:be(e,"package.nls.json")});let u=a.lastIndexOf("-");u===-1?i({localized:be(e,"package.nls.json"),original:null}):(a=a.substring(0,u),s(a))})};if(t.devMode||t.pseudo||!t.language)return i({localized:be(e,"package.nls.json"),original:null});s(t.language)})}formatMessage(e,t){return`[${e.path}]: ${t}`}};Nd=D([S(0,ra),S(1,jt),S(2,Be),S(3,He),S(4,mr),S(5,z)],Nd);Ld=class extends Nd{constructor(e,t,i,o,s,a,l,c){super(i,o,s,a,l,c);this.currentProfile=e;this.userDataProfilesService=t;this.cacheValidatorThrottler=this._register(new Jn(3e3));this._onDidChangeCache=this._register(new C);this.onDidChangeCache=this._onDidChangeCache.event}async scanExtensions(e){let t=this.getCacheFile(e),i=await this.readExtensionCache(t);if(this.input=e,i&&i.input&&ul.equals(i.input,this.input))return this.logService.debug("Using cached extensions scan result",e.type===0?"system":"user",e.location.toString()),this.cacheValidatorThrottler.trigger(()=>this.validateCache()),i.result.map(s=>(s.location=A.revive(s.location),s));let o=await super.scanExtensions(e);return await this.writeExtensionCache(t,{input:e,result:o}),o}async readExtensionCache(e){try{let t=await this.fileService.readFile(e),i=JSON.parse(t.value.toString());return{result:i.result,input:bi(i.input)}}catch(t){Ir(t)!==1&&this.logService.debug("Error while reading the extension cache file:",e.path,cn(t))}return null}async writeExtensionCache(e,t){try{await this.fileService.writeFile(e,ee.fromString(JSON.stringify(t)))}catch(i){this.logService.debug("Error while writing the extension cache file:",e.path,cn(i))}}async validateCache(){if(!this.input)return;let e=this.getCacheFile(this.input),t=await this.readExtensionCache(e);if(!t)return;let i=t.result,o=JSON.parse(JSON.stringify(await super.scanExtensions(this.input)));if(!Or(o,i))try{this.logService.info("Invalidating Cache",i,o),await this.fileService.del(e),this._onDidChangeCache.fire()}catch(s){this.logService.error(s)}}getCacheFile(e){let t=this.getProfile(e);return this.uriIdentityService.extUri.joinPath(t.cacheHome,e.type===0?dL:cL)}getProfile(e){return e.type===0?this.userDataProfilesService.defaultProfile:e.profile?this.uriIdentityService.extUri.isEqual(e.location,this.currentProfile.extensionsResource)?this.currentProfile:this.userDataProfilesService.profiles.find(t=>this.uriIdentityService.extUri.isEqual(e.location,t.extensionsResource))??this.currentProfile:this.userDataProfilesService.defaultProfile}};Ld=D([S(1,zn),S(2,ra),S(3,jt),S(4,Be),S(5,He),S(6,mr),S(7,z)],Ld);Uv=class extends cf{constructor(n,e,t,i,o,s,a,l,c,u,p,m){super(n,e,be(t,".vscode-oss-dev","extensions","control.json"),i,o,s,a,l,c,u,p,m),this.translationsPromise=(async()=>{if(eS)try{let h=await this.fileService.readFile(A.file(eS));return JSON.parse(h.value.toString())}catch{}return Object.create(null)})()}getTranslations(n){return this.translationsPromise}}});var Md,NL=_(()=>{Ie();fr();lf();qb();ct();de();me();In();Pi();Ci();Md=class extends Uv{constructor(n,e,t,i,o,s,a,l){super(A.file(o.builtinExtensionsPath),A.file(o.extensionsPath),o.userHome,n.defaultProfile,n,e,t,i,o,s,a,l)}};Md=D([S(0,zn),S(1,ra),S(2,Be),S(3,z),S(4,kn),S(5,He),S(6,jt),S(7,rn)],Md)});var Ud,Fv=_(()=>{de();Ud=V("systemMonitorService")});var Fd,LL=_(()=>{te();Vt();oo();Us();Ln();Ce();zt();Fd=class extends M{constructor(e,t,i){super();this.userDataProfilesService=t;this.windowsMainService=i;this._register(e.onWillLoadWindow(o=>{o.reason===2&&this.unsetProfileForWorkspace(o.window)})),this._register(e.onBeforeCloseWindow(o=>this.unsetProfileForWorkspace(o))),this._register(new On(()=>this.cleanUpEmptyWindowAssociations(),30*1e3)).schedule()}async unsetProfileForWorkspace(e){let t=this.getWorkspace(e),i=this.userDataProfilesService.getProfileForWorkspace(t);i?.isTransient&&(this.userDataProfilesService.unsetWorkspace(t,i.isTransient),i.isTransient&&await this.userDataProfilesService.cleanUpTransientProfiles())}getWorkspace(e){return e.openedWorkspace??Ds(e.backupPath,e.isExtensionDevelopmentHost)}cleanUpEmptyWindowAssociations(){let e=this.userDataProfilesService.getAssociatedEmptyWindows();if(e.length===0)return;let t=this.windowsMainService.getWindows().map(i=>this.getWorkspace(i));for(let i of e)t.some(o=>o.id===i.id)||this.userDataProfilesService.unsetWorkspace(i,!1)}};Fd=D([S(0,Te),S(1,rr),S(2,Ke)],Fd)});var Wv,ML=_(()=>{ae();te();Ba();Wv=class extends M{constructor(e,t,i){super();this.storageMainService=e;this.userDataProfilesService=t;this.logService=i;let o=this._register(new yn);this._onDidChange=this._register(new C({onWillAddFirstListener:()=>o.value=this.registerStorageChangeListeners(),onDidRemoveLastListener:()=>o.value=void 0}))}registerStorageChangeListeners(){this.logService.debug("ProfileStorageChangesListenerChannel#registerStorageChangeListeners");let e=new ue;return e.add(x.debounce(this.storageMainService.applicationStorage.onDidChangeStorage,(t,i)=>(t?t.push(i.key):t=[i.key],t),100)(t=>this.onDidChangeApplicationStorage(t))),e.add(x.debounce(this.storageMainService.onDidChangeProfileStorage,(t,i)=>{t||(t=new Map);let o=t.get(i.profile.id);return o||t.set(i.profile.id,o={profile:i.profile,keys:[],storage:i.storage}),o.keys.push(i.key),t},100)(t=>this.onDidChangeProfileStorage(t))),e}onDidChangeApplicationStorage(e){let t=e.includes(Jo)?[this.userDataProfilesService.defaultProfile]:[],i=[];if(e=e.filter(o=>o!==Jo),e.length){let o=zh(this.storageMainService.applicationStorage.storage);i.push({profile:this.userDataProfilesService.defaultProfile,changes:e.map(s=>({key:s,scope:0,target:o[s]}))})}this.triggerEvents(t,i)}onDidChangeProfileStorage(e){let t=[],i=new Map;for(let[o,s]of e.entries()){s.keys.includes(Jo)&&t.push(s.profile);let a=s.keys.filter(l=>l!==Jo);if(a.length){let l=zh(s.storage.storage);i.set(o,{profile:s.profile,changes:a.map(c=>({key:c,scope:0,target:l[c]}))})}}this.triggerEvents(t,[...i.values()])}triggerEvents(e,t){(e.length||t.length)&&this._onDidChange.fire({valueChanges:t,targetChanges:e})}listen(e,t,i){if(t==="onDidChange")return this._onDidChange.event;throw new Error(`[ProfileStorageChangesListenerChannel] Event not found: ${t}`)}async call(e,t){throw new Error(`Call not found: ${t}`)}}});async function UL(r,n){let e=r.getItem(Zh);return(typeof e!="string"||$&&e==="6c9d2bc8f91b89624add29c0abeae7fb42bf539fa1cdb2e3e57cd668fa9bcead")&&(e=await Lk(n.error.bind(n))),e}async function FL(r,n){let e=r.getItem(eI);return typeof e!="string"&&(e=await Mk(n.error.bind(n))),e}async function Kb(r,n){let e=r.getItem(vm);return typeof e!="string"&&(e=await iv(n.error.bind(n))),e}var WL=_(()=>{ce();zm();Tn()});async function BL(r,n){n.trace("Resolving machine identifier...");let e=await UL(r,n);return r.setItem(Zh,e),n.trace(`Resolved machine identifier: ${e}`),e}async function VL(r,n){n.trace("Resolving SQM identifier...");let e=await FL(r,n);return r.setItem(eI,e),n.trace(`Resolved SQM identifier: ${e}`),e}async function GL(r,n){n.trace("Resolving devDevice identifier...");let e=await Kb(r,n);return r.setItem(vm,e),n.trace(`Resolved devDevice identifier: ${e}`),e}async function HL(r,n){let e=await iv(n.error.bind(n)),t=await Kb(r,n);e!==t&&r.setItem(vm,e)}var JL=_(()=>{zm();Tn();WL()});var Wd,qL=_(()=>{me();Ci();Pi();lf();ct();fr();Ie();Wd=class extends kd{constructor(n,e,t,i,o){super(A.file(n.extensionsPath),e,t,i,o)}};Wd=D([S(0,kn),S(1,Be),S(2,zn),S(3,jt),S(4,z)],Wd)});var Bv,KL=_(()=>{er();Ie();me();Bv=class{constructor(n){this.loggerService=n;this.loggers=new Lt}listen(n,e,t){switch(e){case"onDidChangeLoggers":return t?this.loggerService.getOnDidChangeLoggersEvent(t):this.loggerService.onDidChangeLoggers;case"onDidChangeLogLevel":return t?this.loggerService.getOnDidChangeLogLevelEvent(t):this.loggerService.onDidChangeLogLevel;case"onDidChangeVisibility":return t?this.loggerService.getOnDidChangeVisibilityEvent(t):this.loggerService.onDidChangeVisibility}throw new Error(`Event not found: ${e}`)}async call(n,e,t){switch(e){case"createLogger":this.createLogger(A.revive(t[0]),t[1],t[2]);return;case"log":return this.log(A.revive(t[0]),t[1]);case"consoleLog":return this.consoleLog(t[0],t[1]);case"setLogLevel":return dm(t[0])?this.loggerService.setLogLevel(t[0]):this.loggerService.setLogLevel(A.revive(t[0]),t[1]);case"setVisibility":return this.loggerService.setVisibility(A.revive(t[0]),t[1]);case"registerLogger":return this.loggerService.registerLogger({...t[0],resource:A.revive(t[0].resource)},t[1]);case"deregisterLogger":return this.loggerService.deregisterLogger(A.revive(t[0]))}throw new Error(`Call not found: ${e}`)}createLogger(n,e,t){this.loggers.set(n,this.loggerService.createLogger(n,e,t))}consoleLog(n,e){let t=console.log;switch(n){case 5:t=console.error;break;case 4:t=console.warn;break;case 3:t=console.info;break}t.call(console,...e)}log(n,e){let t=this.loggers.get(n);if(!t)throw new Error("Create the logger before logging");for(let[i,o]of e)pm(t,i,o)}}});var jb,Bd,df,jL=_(()=>{te();de();me();zt();ja();Tn();eo();ae();Ce();Vt();jb=V("utilityProcessWorker"),Bd=class extends M{constructor(e,t,i,o){super();this.logService=e;this.windowsMainService=t;this.telemetryService=i;this.lifecycleMainService=o;this.workers=new Map}async createWorker(e){let t=`window: ${e.reply.windowId}, moduleId: ${e.process.moduleId}`;this.logService.trace(`[UtilityProcessWorker]: createWorker(${t})`);let i=this.hash(e);this.workers.has(i)&&(this.logService.warn(`[UtilityProcessWorker]: createWorker() found an existing worker that will be terminated (${t})`),this.disposeWorker(e));let o=new df(this.logService,this.windowsMainService,this.telemetryService,this.lifecycleMainService,e);if(!o.spawn())return{reason:{code:1,signal:"EINVALID"}};this.workers.set(i,o);let s=new un;return x.once(o.onDidTerminate)(a=>{a.code===0?this.logService.trace(`[UtilityProcessWorker]: terminated normally with code ${a.code}, signal: ${a.signal}`):this.logService.error(`[UtilityProcessWorker]: terminated unexpectedly with code ${a.code}, signal: ${a.signal}`),this.workers.delete(i),s.complete({reason:a})}),s.p}hash(e){return wn({moduleId:e.process.moduleId,windowId:e.reply.windowId})}async disposeWorker(e){let t=this.hash(e),i=this.workers.get(t);i&&(this.logService.trace(`[UtilityProcessWorker]: disposeWorker(window: ${e.reply.windowId}, moduleId: ${e.process.moduleId})`),i.kill(),i.dispose(),this.workers.delete(t))}};Bd=D([S(0,z),S(1,Ke),S(2,St),S(3,Te)],Bd);df=class extends M{constructor(e,t,i,o,s){super();this.windowsMainService=t;this.configuration=s;this._onDidTerminate=this._register(new C);this.onDidTerminate=this._onDidTerminate.event;this.utilityProcess=this._register(new Vs(e,t,i,o)),this.registerListeners()}registerListeners(){this._register(this.utilityProcess.onExit(e=>this._onDidTerminate.fire({code:e.code,signal:e.signal}))),this._register(this.utilityProcess.onCrash(e=>this._onDidTerminate.fire({code:e.code,signal:"ECRASH"})))}spawn(){let t=this.windowsMainService.getWindowById(this.configuration.reply.windowId)?.win?.webContents.getOSProcessId();return this.utilityProcess.start({type:this.configuration.process.type,name:this.configuration.process.name,entryPoint:this.configuration.process.moduleId,parentLifecycleBound:t,windowLifecycleBound:!0,correlationId:`${this.configuration.reply.windowId}`,responseWindowId:this.configuration.reply.windowId,responseChannel:this.configuration.reply.channel,responseNonce:this.configuration.reply.nonce})}kill(){this.utilityProcess.kill()}};df=D([S(0,z),S(1,Ke),S(2,St),S(3,Te)],df)});var zL,YL=_(()=>{zL="utilityProcessWorker"});var wCe,T7,zb,Yb,bCe,Vd=_(()=>{de();wi();wCe=V("ptyService"),T7={Backend:"workbench.contributions.terminal.processBackend"},zb=class{constructor(){this._backends=new Map}get backends(){return this._backends}registerTerminalBackend(n){let e=this._sanitizeRemoteAuthority(n.remoteAuthority);if(this._backends.has(e))throw new Error(`A terminal backend with remote authority '${e}' was already registered.`);this._backends.set(e,n)}getTerminalBackend(n){return this._backends.get(this._sanitizeRemoteAuthority(n))}_sanitizeRemoteAuthority(n){return n?.toLowerCase()??""}};Ht.add(T7.Backend,new zb);Yb=V("localPtyService"),bCe=V("terminalLogService")});var Gd,QL=_(()=>{$t();Ah();Vt();me();ea();Vd();ja();m_();Ti();te();ae();Gr();qe();_t();at();Gd=class extends M{constructor(e,t,i,o,s){super();this._reconnectConstants=e;this._configurationService=t;this._environmentMainService=i;this._lifecycleMainService=o;this._logService=s;this.utilityProcess=void 0;this._onRequestConnection=this._register(new C);this.onRequestConnection=this._onRequestConnection.event;this._onWillShutdown=this._register(new C);this.onWillShutdown=this._onWillShutdown.event;this._register(this._lifecycleMainService.onWillShutdown(()=>this._onWillShutdown.fire())),Tt.on("vscode:createPtyHostMessageChannel",(a,l)=>this._onWindowConnection(a,l)),this._register(oe(()=>{Tt.removeHandler("vscode:createPtyHostMessageChannel")}))}start(){this.utilityProcess=new Pn(this._logService,Zs,this._lifecycleMainService);let e=lO(this._environmentMainService.args,this._environmentMainService.isBuilt),t=e.port?["--nolazy",`--inspect${e.break?"-brk":""}=${e.port}`]:void 0;this.utilityProcess.start({type:"ptyHost",name:"pty-host",entryPoint:"vs/platform/terminal/node/ptyHostMain",execArgv:t,args:["--logsPath",this._environmentMainService.logsHome.with({scheme:Y.file}).fsPath],env:this._createPtyHostConfiguration()});let i=this.utilityProcess.connect(),o=new _c(i,"ptyHost"),s=new ue;return s.add(o),s.add(oe(()=>{this.utilityProcess?.kill(),this.utilityProcess?.dispose(),this.utilityProcess=void 0})),{client:o,store:s,onDidProcessExit:this.utilityProcess.onExit}}_createPtyHostConfiguration(){this._environmentMainService.unsetSnapExportedVariables();let e={...Mn(process.env),VSCODE_ESM_ENTRYPOINT:"vs/platform/terminal/node/ptyHostMain",VSCODE_PIPE_LOGGING:"true",VSCODE_VERBOSE_LOGGING:"true",VSCODE_RECONNECT_GRACE_TIME:String(this._reconnectConstants.graceTime),VSCODE_RECONNECT_SHORT_GRACE_TIME:String(this._reconnectConstants.shortGraceTime),VSCODE_RECONNECT_SCROLLBACK:String(this._reconnectConstants.scrollback)},t=this._configurationService.getValue("terminal.integrated.developer.ptyHost.latency");t&&Ii(t)&&(e.VSCODE_LATENCY=String(t));let i=this._configurationService.getValue("terminal.integrated.developer.ptyHost.startupDelay");return i&&Ii(i)&&(e.VSCODE_STARTUP_DELAY=String(i)),this._environmentMainService.restoreSnapExportedVariables(),e}_onWindowConnection(e,t){this._onRequestConnection.fire();let i=this.utilityProcess.connect();if(e.sender.isDestroyed()){i.close();return}e.sender.postMessage("vscode:createPtyHostMessageChannelResult",t,[i])}};Gd=D([S(1,Ae),S(2,Fe),S(3,Te),S(4,z)],Gd)});var Gv,XL=_(()=>{Ie();ae();me();te();Gv=class extends M{constructor(n,e){super(),e.call("setLogLevel",[n.getLogLevel()]),this._register(n.onDidChangeLogLevel(t=>e.call("setLogLevel",[t]))),e.call("getRegisteredLoggers").then(t=>{for(let i of t)n.registerLogger({...i,resource:A.revive(i.resource)})}),this._register(e.listen("onDidChangeVisibility")(([t,i])=>n.setVisibility(A.revive(t),i))),this._register(e.listen("onDidChangeLoggers")(({added:t,removed:i})=>{for(let o of t)n.registerLogger({...o,resource:A.revive(o.resource)});for(let o of i)n.deregisterLogger(o.resource)}))}}});var Hd,$L=_(()=>{Ce();Bt();ae();te();me();Hd=class extends M{constructor(e,t){super();this._logService=t;this._lastRequestId=0;this._pendingRequests=new Map;this._pendingRequestDisposables=new Map;this._onCreateRequest=this._register(new C);this.onCreateRequest=this._onCreateRequest.event;this._timeout=e===void 0?15e3:e,this._register(oe(()=>{for(let i of this._pendingRequestDisposables.values())At(i)}))}createRequest(e){return new Promise((t,i)=>{let o=++this._lastRequestId;this._pendingRequests.set(o,t),this._onCreateRequest.fire({requestId:o,...e});let s=new st;bt(this._timeout,s.token).then(()=>i(`Request ${o} timed out (${this._timeout}ms)`)),this._pendingRequestDisposables.set(o,[oe(()=>s.cancel())])})}acceptReply(e,t){let i=this._pendingRequests.get(e);i?(this._pendingRequests.delete(e),At(this._pendingRequestDisposables.get(e)||[]),this._pendingRequestDisposables.delete(e),i(t)):this._logService.warn(`RequestStore#acceptReply was called without receiving a matching request ${e}`)}};Hd=D([S(1,z)],Hd)});function ZL(r,n){let e=[{name:null,description:v(2348,null)}];return e.push(...r.map(t=>({name:t.profileName,description:P7(t)}))),n&&e.push(...n.map(t=>({name:t.title,description:C7(t)}))),{values:e.map(t=>t.name),markdownDescriptions:e.map(t=>t.description)}}function P7(r){let n=`$(${Cd.isThemeIcon(r.icon)?r.icon.id:r.icon?r.icon:xt.terminal.id}) ${r.profileName}
- path: ${r.path}`;return r.args&&(Ye(r.args)?n+=`
- args: "${r.args}"`:n+=`
- args: [${r.args.length===0?"":`'${r.args.join("','")}'`}]`),r.overrideName!==void 0&&(n+=`
- overrideName: ${r.overrideName}`),r.color&&(n+=`
- color: ${r.color}`),r.env&&(n+=`
- env: ${JSON.stringify(r.env)}`),n}function C7(r){return`$(${Cd.isThemeIcon(r.icon)?r.icon.id:r.icon?r.icon:xt.terminal.id}) ${r.title}
- extensionIdentifier: ${r.extensionIdentifier}`}var eM=_(()=>{rf();Ie();We();Ob();qe()});function $b(r){let n=r===2?"linux":r===1?"osx":"windows";return v(2327,null,Eg(r),'```json\n"terminal.integrated.profile.'+n+'": {\n  "bash": null\n}\n```',"[","](https://code.visualstudio.com/docs/terminal/profiles)")}function tM(){Ht.as(_n.Configuration).registerConfiguration(x7),D7()}function D7(r,n){let e=Ht.as(_n.Configuration),t;r&&(t=ZL(r?.profiles,n));let i=Zb;Zb={id:"terminal",order:100,title:v(2331,null),type:"object",properties:{"terminal.integrated.defaultProfile.linux":{restricted:!0,markdownDescription:v(2322,null),type:["string","null"],default:null,enum:r?.os===3?t?.values:void 0,markdownEnumDescriptions:r?.os===3?t?.markdownDescriptions:void 0},"terminal.integrated.defaultProfile.osx":{restricted:!0,markdownDescription:v(2323,null),type:["string","null"],default:null,enum:r?.os===2?t?.values:void 0,markdownEnumDescriptions:r?.os===2?t?.markdownDescriptions:void 0},"terminal.integrated.defaultProfile.windows":{restricted:!0,markdownDescription:v(2324,null),type:["string","null"],default:null,enum:r?.os===1?t?.values:void 0,markdownEnumDescriptions:r?.os===1?t?.markdownDescriptions:void 0}}},e.updateConfigurations({add:[Zb],remove:i?[i]:[]})}var A7,R7,Jd,Qb,Xb,x7,Zb,nM=_(()=>{rf();ce();We();Lo();wi();Vd();eM();A7={type:["string","null"],enum:["terminal.ansiBlack","terminal.ansiRed","terminal.ansiGreen","terminal.ansiYellow","terminal.ansiBlue","terminal.ansiMagenta","terminal.ansiCyan","terminal.ansiWhite"],default:null},R7={type:"string",enum:Array.from(Db(),r=>r.id),markdownEnumDescriptions:Array.from(Db(),r=>`$(${r.id})`)},Jd={args:{description:v(2332,null),type:"array",items:{type:"string"}},icon:{description:v(2335,null),...R7},color:{description:v(2333,null),...A7},env:{markdownDescription:v(2334,null),type:"object",additionalProperties:{type:["string","null"]},default:{}}},Qb={type:"object",required:["path"],properties:{path:{description:v(2343,null),type:["string","array"],items:{type:"string"}},overrideName:{description:v(2342,null),type:"boolean"},...Jd}},Xb={type:"object",required:["path"],properties:{path:{description:v(2330,null),type:["string"],items:{type:"string"}},...Jd}};x7={id:"terminal",order:100,title:v(2331,null),type:"object",properties:{"terminal.integrated.automationProfile.linux":{restricted:!0,markdownDescription:v(2318,null),type:["object","null"],default:null,anyOf:[{type:"null"},Xb],defaultSnippets:[{body:{path:"${1}",icon:"${2}"}}]},"terminal.integrated.automationProfile.osx":{restricted:!0,markdownDescription:v(2319,null),type:["object","null"],default:null,anyOf:[{type:"null"},Xb],defaultSnippets:[{body:{path:"${1}",icon:"${2}"}}]},"terminal.integrated.automationProfile.windows":{restricted:!0,markdownDescription:v(2320,null,"`terminal.integrated.automationShell.windows`"),type:["object","null"],default:null,anyOf:[{type:"null"},Xb],defaultSnippets:[{body:{path:"${1}",icon:"${2}"}}]},"terminal.integrated.profiles.windows":{restricted:!0,markdownDescription:$b(3),type:"object",default:{PowerShell:{source:"PowerShell",icon:xt.terminalPowershell.id},"Command Prompt":{path:["${env:windir}\\Sysnative\\cmd.exe","${env:windir}\\System32\\cmd.exe"],args:[],icon:xt.terminalCmd.id},"Git Bash":{source:"Git Bash",icon:xt.terminalGitBash.id}},additionalProperties:{anyOf:[{type:"object",required:["source"],properties:{source:{description:v(2347,null),enum:["PowerShell","Git Bash"]},...Jd}},{type:"object",required:["extensionIdentifier","id","title"],properties:{extensionIdentifier:{description:v(2345,null),type:"string"},id:{description:v(2344,null),type:"string"},title:{description:v(2346,null),type:"string"},...Jd}},{type:"null"},Qb]}},"terminal.integrated.profiles.osx":{restricted:!0,markdownDescription:$b(1),type:"object",default:{bash:{path:"bash",args:["-l"],icon:xt.terminalBash.id},zsh:{path:"zsh",args:["-l"]},fish:{path:"fish",args:["-l"]},tmux:{path:"tmux",icon:xt.terminalTmux.id},pwsh:{path:"pwsh",icon:xt.terminalPowershell.id}},additionalProperties:{anyOf:[{type:"object",required:["extensionIdentifier","id","title"],properties:{extensionIdentifier:{description:v(2340,null),type:"string"},id:{description:v(2339,null),type:"string"},title:{description:v(2341,null),type:"string"},...Jd}},{type:"null"},Qb]}},"terminal.integrated.profiles.linux":{restricted:!0,markdownDescription:$b(2),type:"object",default:{bash:{path:"bash",icon:xt.terminalBash.id},zsh:{path:"zsh"},fish:{path:"fish"},tmux:{path:"tmux",icon:xt.terminalTmux.id},pwsh:{path:"pwsh",icon:xt.terminalPowershell.id}},additionalProperties:{anyOf:[{type:"object",required:["extensionIdentifier","id","title"],properties:{extensionIdentifier:{description:v(2337,null),type:"string"},id:{description:v(2336,null),type:"string"},title:{description:v(2338,null),type:"string"},...Jd}},{type:"null"},Qb]}},"terminal.integrated.useWslProfiles":{description:v(2329,null),type:"boolean",default:!0},"terminal.integrated.inheritEnv":{scope:1,description:v(2325,null),type:"boolean",default:!0},"terminal.integrated.persistentSessionScrollback":{scope:1,markdownDescription:v(2326,null),type:"number",default:100},"terminal.integrated.showLinkHover":{scope:1,description:v(2328,null),type:"boolean",default:!0},"terminal.integrated.ignoreProcessNames":{markdownDescription:v(2321,null,"`#terminal.integrated.confirmOnKill#`"),type:"array",items:{type:"string",uniqueItems:!0},default:["starship","oh-my-posh","bash","zsh"]}}}});import*as oM from"fs";import*as sM from"child_process";function aM(r,n,e,t,i=process.env,o,s,a,l){return o=o||{existsFile:hn.existsFile,readFile:oM.promises.readFile},q?O7(e,o,i,s,t.getValue("terminal.integrated.useWslProfiles")!==!1,r&&ut(r)?{...r}:t.getValue("terminal.integrated.profiles.windows"),Ye(n)?n:t.getValue("terminal.integrated.defaultProfile.windows"),l,a):W7(o,s,e,r&&ut(r)?{...r}:t.getValue(fe?"terminal.integrated.profiles.linux":"terminal.integrated.profiles.osx"),Ye(n)?n:t.getValue(fe?"terminal.integrated.defaultProfile.linux":"terminal.integrated.defaultProfile.osx"),l,a,i)}async function O7(r,n,e,t,i,o,s,a,l){let c=process.env.hasOwnProperty("PROCESSOR_ARCHITEW6432"),u=`${process.env.windir}\\${c?"Sysnative":"System32"}`,p=await yh()>=19041;await N7(a);let m=new Map;if(r){m.set("PowerShell",{source:"PowerShell",icon:xt.terminalPowershell,isAutoDetected:!0}),m.set("Windows PowerShell",{path:`${u}\\WindowsPowerShell\\v1.0\\powershell.exe`,icon:xt.terminalPowershell,isAutoDetected:!0}),m.set("Git Bash",{source:"Git Bash",icon:xt.terminalGitBash,isAutoDetected:!0}),m.set("Command Prompt",{path:`${u}\\cmd.exe`,icon:xt.terminalCmd,isAutoDetected:!0}),m.set("Cygwin",{path:[{path:`${process.env.HOMEDRIVE}\\cygwin64\\bin\\bash.exe`,isUnsafe:!0},{path:`${process.env.HOMEDRIVE}\\cygwin\\bin\\bash.exe`,isUnsafe:!0}],args:["--login"],isAutoDetected:!0}),m.set("bash (MSYS2)",{path:[{path:`${process.env.HOMEDRIVE}\\msys64\\usr\\bin\\bash.exe`,isUnsafe:!0}],args:["--login","-i"],env:{CHERE_INVOKING:"1"},icon:xt.terminalBash,isAutoDetected:!0});let E=`${process.env.CMDER_ROOT||`${process.env.HOMEDRIVE}\\cmder`}\\vendor\\bin\\vscode_init.cmd`;m.set("Cmder",{path:`${u}\\cmd.exe`,args:["/K",E],requiresPath:process.env.CMDER_ROOT?E:{path:E,isUnsafe:!0},isAutoDetected:!0})}cM(o,m);let h=await lM(m.entries(),s,n,e,t,l);if(r&&i&&p)try{let E=await U7(`${u}\\wsl.exe`,s);for(let y of E)(!o||!Object.prototype.hasOwnProperty.call(o,y.profileName))&&h.push(y)}catch{rM&&(t?.trace("WSL is not installed, so could not detect WSL profiles"),rM=!1)}return h}async function lM(r,n,e,t=process.env,i,o){let s=[];for(let[a,l]of r)s.push(k7(a,l,n,e,t,i,o));return(await Promise.all(s)).filter(a=>!!a)}async function k7(r,n,e,t,i=process.env,o,s){if(n===null)return;let a,l,c;if(Xr(n,{source:!0})){let h=uf?.get(n.source);if(!h)return;a=h.paths,l=n.args||h.args,n.icon?c=iM(n.icon):h.icon&&(c=h.icon)}else a=Array.isArray(n.path)?n.path:[n.path],l=q||Array.isArray(n.args)?n.args:void 0,c=iM(n.icon);let u;if(s){let h=a.map(y=>Ye(y)?y:y.path),E=await s(h);u=new Array(a.length);for(let y=0;y<a.length;y++)Ye(a[y])?u[y]=E[y]:u[y]={path:E[y],isUnsafe:!0}}else u=a.slice();let p;if(n.requiresPath){let h;if(Ye(n.requiresPath)?h=n.requiresPath:(h=n.requiresPath.path,n.requiresPath.isUnsafe&&(p=h)),!await t.existsFile(h))return}let m=await Hv(r,e,u,t,i,l,n.env,n.overrideName,n.isAutoDetected,p);if(!m){o?.debug("Terminal profile not validated",r,a);return}return m.isAutoDetected=n.isAutoDetected,m.icon=c,m.color=n.color,m}function iM(r){return Ye(r)?{id:r}:r}async function N7(r){if(uf&&!r)return;let[n,e]=await Promise.all([L7(),r||M7()]);uf=new Map,uf.set("Git Bash",{profileName:"Git Bash",paths:n,args:["--login","-i"]}),uf.set("PowerShell",{profileName:"PowerShell",paths:e,icon:xt.terminalPowershell})}async function L7(){let r=new Set,n=await Bm("git.exe");if(n){let i=ze(n);r.add(Nt(i,"../.."))}function e(i,o){o&&i.add(o)}e(r,process.env.ProgramW6432),e(r,process.env.ProgramFiles),e(r,process.env["ProgramFiles(X86)"]),e(r,`${process.env.LocalAppData}\\Program`);let t=[];for(let i of r)t.push(`${i}\\Git\\bin\\bash.exe`,`${i}\\Git\\usr\\bin\\bash.exe`,`${i}\\usr\\bin\\bash.exe`);return t.push(`${process.env.UserProfile}\\scoop\\apps\\git\\current\\bin\\bash.exe`),t.push(`${process.env.UserProfile}\\scoop\\apps\\git-with-openssh\\current\\bin\\bash.exe`),t}async function M7(){let r=[];for await(let n of Pw())r.push(n.exePath);return r}async function U7(r,n){let e=[],t=await new Promise((o,s)=>{sM.exec("wsl.exe -l -q",{encoding:"utf16le",env:{...process.env,WSL_UTF8:"0"},timeout:1e3},(a,l)=>{if(a)return s("Problem occurred when getting wsl distros");o(l)})});if(!t)return[];let i=t.split(/\r?\n/).filter(o=>o.trim().length>0);for(let o of i){if(o===""||o.startsWith("docker-desktop"))continue;let s=`${o} (WSL)`,a={profileName:s,path:r,args:["-d",`${o}`],isDefault:s===n,icon:F7(o),isAutoDetected:!1};e.push(a)}return e}function F7(r){return r.includes("Ubuntu")?xt.terminalUbuntu:r.includes("Debian")?xt.terminalDebian:xt.terminalLinux}async function W7(r,n,e,t,i,o,s,a){let l=new Map;if(e&&await r.existsFile("/etc/shells")){let c=(await r.readFile("/etc/shells")).toString(),u=(o||c.split(`
`)).map(m=>{let h=m.indexOf("#");return h===-1?m:m.substring(0,h)}).filter(m=>m.trim().length>0),p=new Map;for(let m of u){let h=Pe(m),E=p.get(h)||0;E++,E>1&&(h=`${h} (${E})`),p.set(h,E),l.set(h,{path:m,isAutoDetected:!0})}}return cM(t,l),await lM(l.entries(),i,r,a,n,s)}function cM(r,n){if(r)for(let[e,t]of Object.entries(r))t===null||!ut(t)||!Xr(t,{path:!0})&&!Xr(t,{source:!0})?n.delete(e):(t.icon=t.icon||n.get(e)?.icon,n.set(e,t))}async function Hv(r,n,e,t,i,o,s,a,l,c){if(e.length===0)return Promise.resolve(void 0);let u=e.shift();if(u==="")return Hv(r,n,e,t,i,o,s,a,l);let p=!Ye(u)&&u.isUnsafe,m=Ye(u)?u:u.path,h={profileName:r,path:m,args:o,env:s,overrideName:a,isAutoDetected:l,isDefault:r===n,isUnsafePath:p,requiresUnsafePath:c};if(Pe(m)===m){let y=i.PATH?i.PATH.split(Pg):void 0,P=await Bm(m,void 0,y,void 0,t.existsFile);return P?(h.path=P,h.isFromPath=!0,h):Hv(r,n,e,t,i,o)}return await t.existsFile(kt(m))?h:Hv(r,n,e,t,i,o,s,a,l)}var uf,rM,dM=_(()=>{rf();Ne();ce();od();qe();pn();Cw();Vd();Sc();rM=!0});var qd,uM=_(()=>{ae();te();ce();Zi();_t();me();XL();NI();$L();Vd();nM();dM();Dw();Sa();qd=class extends M{constructor(e,t,i,o){super();this._ptyHostStarter=e;this._configurationService=t;this._logService=i;this._loggerService=o;this._wasQuitRequested=!1;this._restartCount=0;this._isResponsive=!0;this._onPtyHostExit=this._register(new C);this.onPtyHostExit=this._onPtyHostExit.event;this._onPtyHostStart=this._register(new C);this.onPtyHostStart=this._onPtyHostStart.event;this._onPtyHostUnresponsive=this._register(new C);this.onPtyHostUnresponsive=this._onPtyHostUnresponsive.event;this._onPtyHostResponsive=this._register(new C);this.onPtyHostResponsive=this._onPtyHostResponsive.event;this._onPtyHostRequestResolveVariables=this._register(new C);this.onPtyHostRequestResolveVariables=this._onPtyHostRequestResolveVariables.event;this._onProcessData=this._register(new C);this.onProcessData=this._onProcessData.event;this._onProcessReady=this._register(new C);this.onProcessReady=this._onProcessReady.event;this._onProcessReplay=this._register(new C);this.onProcessReplay=this._onProcessReplay.event;this._onProcessOrphanQuestion=this._register(new C);this.onProcessOrphanQuestion=this._onProcessOrphanQuestion.event;this._onDidRequestDetach=this._register(new C);this.onDidRequestDetach=this._onDidRequestDetach.event;this._onDidChangeProperty=this._register(new C);this.onDidChangeProperty=this._onDidChangeProperty.event;this._onProcessExit=this._register(new C);this.onProcessExit=this._onProcessExit.event;tM(),this._register(this._ptyHostStarter),this._register(oe(()=>this._disposePtyHost())),this._resolveVariablesRequestStore=this._register(new Hd(void 0,this._logService)),this._register(this._resolveVariablesRequestStore.onCreateRequest(this._onPtyHostRequestResolveVariables.fire,this._onPtyHostRequestResolveVariables)),this._ptyHostStarter.onRequestConnection&&this._register(x.once(this._ptyHostStarter.onRequestConnection)(()=>this._ensurePtyHost())),this._ptyHostStarter.onWillShutdown&&this._register(this._ptyHostStarter.onWillShutdown(()=>this._wasQuitRequested=!0))}get _connection(){return this._ensurePtyHost(),this.__connection}get _proxy(){return this._ensurePtyHost(),this.__proxy}get _optionalProxy(){return this.__proxy}_ensurePtyHost(){this.__connection||this._startPtyHost()}get _ignoreProcessNames(){return this._configurationService.getValue("terminal.integrated.ignoreProcessNames")}async _refreshIgnoreProcessNames(){return this._optionalProxy?.refreshIgnoreProcessNames?.(this._ignoreProcessNames)}async _resolveShellEnv(){if(q)return process.env;try{return await sd(this._configurationService,this._logService,{_:[]},process.env)}catch(e){return this._logService.error("ptyHost was unable to resolve shell environment",e),{}}}_startPtyHost(){let e=this._ptyHostStarter.start(),t=e.client;this._logService.getLevel()===1&&this._logService.trace("PtyHostService#_startPtyHost",new Error().stack?.replace(/^Error/,"")),it.toService(t.getChannel("heartbeat")).onBeat(()=>this._handleHeartbeat()),this._handleHeartbeat(!0),this._register(e.onDidProcessExit(s=>{this._onPtyHostExit.fire(s.code),!this._wasQuitRequested&&!this._store.isDisposed&&(this._restartCount<=5?(this._logService.error(`ptyHost terminated unexpectedly with code ${s.code}`),this._restartCount++,this.restartPtyHost()):this._logService.error(`ptyHost terminated unexpectedly with code ${s.code}, giving up`))}));let o=it.toService(t.getChannel("ptyHost"));return this._register(o.onProcessData(s=>this._onProcessData.fire(s))),this._register(o.onProcessReady(s=>this._onProcessReady.fire(s))),this._register(o.onProcessExit(s=>this._onProcessExit.fire(s))),this._register(o.onDidChangeProperty(s=>this._onDidChangeProperty.fire(s))),this._register(o.onProcessReplay(s=>this._onProcessReplay.fire(s))),this._register(o.onProcessOrphanQuestion(s=>this._onProcessOrphanQuestion.fire(s))),this._register(o.onDidRequestDetach(s=>this._onDidRequestDetach.fire(s))),this._register(new Gv(this._loggerService,t.getChannel("logger"))),this.__connection=e,this.__proxy=o,this._onPtyHostStart.fire(),this._register(this._configurationService.onDidChangeConfiguration(async s=>{s.affectsConfiguration("terminal.integrated.ignoreProcessNames")&&await this._refreshIgnoreProcessNames()})),this._refreshIgnoreProcessNames(),[e,o]}async createProcess(e,t,i,o,s,a,l,c,u,p,m){let h=setTimeout(()=>this._handleUnresponsiveCreateProcess(),5e3),E=await this._proxy.createProcess(e,t,i,o,s,a,l,c,u,p,m);return clearTimeout(h),E}updateTitle(e,t,i){return this._proxy.updateTitle(e,t,i)}updateIcon(e,t,i,o){return this._proxy.updateIcon(e,t,i,o)}attachToProcess(e){return this._proxy.attachToProcess(e)}detachFromProcess(e,t){return this._proxy.detachFromProcess(e,t)}shutdownAll(){return this._proxy.shutdownAll()}listProcesses(){return this._proxy.listProcesses()}async getPerformanceMarks(){return this._optionalProxy?.getPerformanceMarks()??[]}async reduceConnectionGraceTime(){return this._optionalProxy?.reduceConnectionGraceTime()}start(e){return this._proxy.start(e)}shutdown(e,t){return this._proxy.shutdown(e,t)}input(e,t){return this._proxy.input(e,t)}sendSignal(e,t){return this._proxy.sendSignal(e,t)}processBinary(e,t){return this._proxy.processBinary(e,t)}resize(e,t,i,o,s){return this._proxy.resize(e,t,i,o,s)}clearBuffer(e){return this._proxy.clearBuffer(e)}acknowledgeDataEvent(e,t){return this._proxy.acknowledgeDataEvent(e,t)}setUnicodeVersion(e,t){return this._proxy.setUnicodeVersion(e,t)}setNextCommandId(e,t,i){return this._proxy.setNextCommandId(e,t,i)}getInitialCwd(e){return this._proxy.getInitialCwd(e)}getCwd(e){return this._proxy.getCwd(e)}async getLatency(){let e=new Rr,t=await this._proxy.getLatency();return e.stop(),[{label:"ptyhostservice<->ptyhost",latency:e.elapsed()},...t]}orphanQuestionReply(e){return this._proxy.orphanQuestionReply(e)}installAutoReply(e,t){return this._proxy.installAutoReply(e,t)}uninstallAllAutoReplies(){return this._proxy.uninstallAllAutoReplies()}getDefaultSystemShell(e){return this._optionalProxy?.getDefaultSystemShell(e)??kI(e??Yt,process.env)}async getProfiles(e,t,i,o=!1){let s=await this._resolveShellEnv();return aM(t,i,o,this._configurationService,s,void 0,this._logService,this._resolveVariables.bind(this,e))}async getEnvironment(){return this.__proxy?this._proxy.getEnvironment():{...process.env}}getWslPath(e,t){return this._proxy.getWslPath(e,t)}getRevivedPtyNewId(e,t){return this._proxy.getRevivedPtyNewId(e,t)}setTerminalLayoutInfo(e){return this._proxy.setTerminalLayoutInfo(e)}async getTerminalLayoutInfo(e){return this._optionalProxy?.getTerminalLayoutInfo(e)}async requestDetachInstance(e,t){return this._proxy.requestDetachInstance(e,t)}async acceptDetachInstanceReply(e,t){return this._proxy.acceptDetachInstanceReply(e,t)}async freePortKillProcess(e){if(!this._proxy.freePortKillProcess)throw new Error("freePortKillProcess does not exist on the pty proxy");return this._proxy.freePortKillProcess(e)}async serializeTerminalState(e){return this._proxy.serializeTerminalState(e)}async reviveTerminalProcesses(e,t,i){return this._proxy.reviveTerminalProcesses(e,t,i)}async refreshProperty(e,t){return this._proxy.refreshProperty(e,t)}async updateProperty(e,t,i){return this._proxy.updateProperty(e,t,i)}async restartPtyHost(){this._disposePtyHost(),this._isResponsive=!0,this._startPtyHost()}_disposePtyHost(){this._proxy.shutdownAll(),this._connection.store.dispose()}_handleHeartbeat(e){this._clearHeartbeatTimeouts(),this._heartbeatFirstTimeout=setTimeout(()=>this._handleHeartbeatFirstTimeout(),e?2e4:5e3*1.2),this._isResponsive||(this._isResponsive=!0,this._onPtyHostResponsive.fire())}_handleHeartbeatFirstTimeout(){this._logService.warn(`No ptyHost heartbeat after ${5e3*1.2/1e3} seconds`),this._heartbeatFirstTimeout=void 0,this._heartbeatSecondTimeout=setTimeout(()=>this._handleHeartbeatSecondTimeout(),5e3*1)}_handleHeartbeatSecondTimeout(){this._logService.error(`No ptyHost heartbeat after ${(5e3*1.2+5e3*1.2)/1e3} seconds`),this._heartbeatSecondTimeout=void 0,this._isResponsive&&(this._isResponsive=!1,this._onPtyHostUnresponsive.fire())}_handleUnresponsiveCreateProcess(){this._clearHeartbeatTimeouts(),this._logService.error(`No ptyHost response to createProcess after ${5e3/1e3} seconds`),this._isResponsive&&(this._isResponsive=!1,this._onPtyHostUnresponsive.fire())}_clearHeartbeatTimeouts(){this._heartbeatFirstTimeout&&(clearTimeout(this._heartbeatFirstTimeout),this._heartbeatFirstTimeout=void 0),this._heartbeatSecondTimeout&&(clearTimeout(this._heartbeatSecondTimeout),this._heartbeatSecondTimeout=void 0)}_resolveVariables(e,t){return this._resolveVariablesRequestStore.createRequest({workspaceId:e,originalText:t})}async acceptPtyHostResolvedVariables(e,t){this._resolveVariablesRequestStore.acceptReply(e,t)}};qd=D([S(1,Ae),S(2,z),S(3,Rs)],qd)});var eT,pM,Jv,mM=_(()=>{eT="request",pM="remoteResourceHandler",Jv=class{async routeCall(n,e,t){if(e!==eT)throw new Error(`Call not found: ${e}`);let i=Array.isArray(t)?t[0]:void 0;if(i?.authority){let o=n.connections.find(s=>s.ctx===i.authority);if(o)return o}throw new Error("Caller not found")}routeEvent(n,e){throw new Error(`Event not found: ${e}`)}}});import{BrowserWindow as V7}from"electron";var Kd,fM=_(()=>{ce();_t();$t();Vt();me();vr();qo();oo();Lb();Kd=class extends of{constructor(e,t,i,o,s,a){super(o,s,t,i);this.webContents=e;this.lifecycleMainService=a;this.parentId=-1;this.stateApplied=!1;this.id=this.webContents.id,this.tryClaimWindow()}get win(){return super.win||this.tryClaimWindow(),super.win}tryClaimWindow(e){this._store.isDisposed||this.webContents.isDestroyed()||(this.doTryClaimWindow(e),e&&!this.stateApplied&&(this.stateApplied=!0,this.applyState({x:e.x,y:e.y,width:e.width,height:e.height,mode:e.show===!1?0:1})))}doTryClaimWindow(e){if(this._win)return;let t=V7.fromWebContents(this.webContents);t&&(this.logService.trace("[aux window] Claimed browser window instance"),this.setWin(t,e),t.setMenu(null),(q||fe)&&Os(this.configurationService,e?.titleBarStyle==="hidden"?"custom":void 0)&&t.setAutoHideMenuBar(!0),this.lifecycleMainService.registerAuxWindow(this))}matches(e){return this.webContents.id===e.id}};Kd=D([S(1,Fe),S(2,z),S(3,Ae),S(4,Rt),S(5,Te)],Kd)});import{BrowserWindow as G7,app as H7}from"electron";var jd,gM=_(()=>{ae();te();at();Ti();fM();de();me();oo();zt();jd=class extends M{constructor(e,t){super();this.instantiationService=e;this.logService=t;this._onDidMaximizeWindow=this._register(new C);this.onDidMaximizeWindow=this._onDidMaximizeWindow.event;this._onDidUnmaximizeWindow=this._register(new C);this.onDidUnmaximizeWindow=this._onDidUnmaximizeWindow.event;this._onDidChangeFullScreen=this._register(new C);this.onDidChangeFullScreen=this._onDidChangeFullScreen.event;this._onDidChangeAlwaysOnTop=this._register(new C);this.onDidChangeAlwaysOnTop=this._onDidChangeAlwaysOnTop.event;this._onDidTriggerSystemContextMenu=this._register(new C);this.onDidTriggerSystemContextMenu=this._onDidTriggerSystemContextMenu.event;this.windows=new Map;this.registerListeners()}registerListeners(){H7.on("browser-window-created",(e,t)=>{let i=this.getWindowByWebContents(t.webContents);if(i)this.logService.trace('[aux window] app.on("browser-window-created"): Trying to claim auxiliary window'),i.tryClaimWindow();else{let o=new ue;o.add(x.fromNodeEventEmitter(t.webContents,"did-create-window",(s,a)=>({browserWindow:s,details:a}))(({browserWindow:s,details:a})=>{let l=this.getWindowByWebContents(s.webContents);l&&(this.logService.trace('[aux window] window.on("did-create-window"): Trying to claim auxiliary window'),l.tryClaimWindow(a.options))})),o.add(x.fromNodeEventEmitter(t,"closed")(()=>o.dispose()))}}),Tt.handle("vscode:registerAuxiliaryWindow",async(e,t)=>{let i=this.getWindowByWebContents(e.sender);return i&&(this.logService.trace("[aux window] vscode:registerAuxiliaryWindow: Registering auxiliary window to main window"),i.parentId=t),e.sender.id})}createWindow(e){let{state:t,overrides:i}=this.computeWindowStateAndOverrides(e);return this.instantiationService.invokeFunction(Nc,t,i,{preload:gt.asFileUri("vs/base/parts/sandbox/electron-browser/preload-aux.js").fsPath})}computeWindowStateAndOverrides(e){let t={},i={},o=e.features.split(",");for(let a of o){let[l,c]=a.split("=");switch(l){case"width":t.width=parseInt(c,10);break;case"height":t.height=parseInt(c,10);break;case"left":t.x=parseInt(c,10);break;case"top":t.y=parseInt(c,10);break;case"window-maximized":t.mode=0;break;case"window-fullscreen":t.mode=3;break;case"window-disable-fullscreen":i.disableFullscreen=!0;break;case"window-native-titlebar":i.forceNativeTitlebar=!0;break;case"window-always-on-top":i.alwaysOnTop=!0;break}}let s=Lc.validateWindowState(this.logService,t)??xO();return this.logService.trace("[aux window] using window state",s),{state:s,overrides:i}}registerWindow(e){let t=new ue,i=this.instantiationService.createInstance(Kd,e);this.windows.set(i.id,i),t.add(oe(()=>this.windows.delete(i.id))),t.add(i.onDidMaximize(()=>this._onDidMaximizeWindow.fire(i))),t.add(i.onDidUnmaximize(()=>this._onDidUnmaximizeWindow.fire(i))),t.add(i.onDidEnterFullScreen(()=>this._onDidChangeFullScreen.fire({window:i,fullscreen:!0}))),t.add(i.onDidLeaveFullScreen(()=>this._onDidChangeFullScreen.fire({window:i,fullscreen:!1}))),t.add(i.onDidChangeAlwaysOnTop(o=>this._onDidChangeAlwaysOnTop.fire({window:i,alwaysOnTop:o}))),t.add(i.onDidTriggerSystemContextMenu(({x:o,y:s})=>this._onDidTriggerSystemContextMenu.fire({window:i,x:o,y:s}))),x.once(i.onDidClose)(()=>t.dispose())}getWindowByWebContents(e){let t=this.windows.get(e.id);return t?.matches(e)?t:void 0}getFocusedWindow(){let e=G7.getFocusedWindow();if(e)return this.getWindowByWebContents(e.webContents)}getLastActiveWindow(){return $h(Array.from(this.windows.values()))}getWindows(){return Array.from(this.windows.values())}};jd=D([S(0,rn),S(1,z)],jd)});var tT,hM,IM=_(()=>{de();tT=V("INativeMcpDiscoveryHelperService"),hM="NativeMcpDiscoveryHelper"});import{homedir as J7}from"os";var qv,vM=_(()=>{ce();Ie();qv=class{constructor(){}load(){return Promise.resolve({platform:Co,homedir:A.file(J7()),winAppData:this.uriFromEnvVariable("APPDATA"),xdgHome:this.uriFromEnvVariable("XDG_CONFIG_HOME")})}uriFromEnvVariable(n){let e=process.env[n];if(e)return A.file(e)}}});var pf,EM,yM,nT=_(()=>{de();pf=V("IMcpGatewayService"),EM="mcpGateway",yM="mcpGatewayToolBroker"});function q7(r){return"method"in r&&"id"in r&&(typeof r.id=="string"||typeof r.id=="number")}function rT(r){return Xr(r,{id:!0,result:!0})||Xr(r,{id:!0,error:!0})}function iT(r){return Xr(r,{method:!0})&&!Xr(r,{id:!0})}function K7(r){return typeof r=="object"&&r!==null&&"then"in r&&typeof r.then=="function"}var Lr,zd,oT=_(()=>{Ce();Bt();rt();te();qe();Lr=class extends Error{constructor(e,t,i){super(t);this.code=e;this.data=i}},zd=class r extends M{constructor(e,t){super();this._send=e;this._handlers=t;this._nextRequestId=1;this._pendingRequests=new Map}static{this.ParseError=-32700}static{this.MethodNotFound=-32601}static{this.InternalError=-32603}sendNotification(e){this._send({jsonrpc:"2.0",...e})}sendRequest(e,t=Le.None,i){if(this._store.isDisposed)return Promise.reject(new Gt);let o=this._nextRequestId++,s=new un,a=new st;this._pendingRequests.set(o,{promise:s,cts:a});let l=t.onCancellationRequested(()=>{s.isSettled||(this._pendingRequests.delete(o),a.cancel(),i?.(o),s.cancel()),l.dispose()});return this._send({jsonrpc:"2.0",id:o,...e}),s.p.finally(()=>{l.dispose(),this._pendingRequests.delete(o),a.dispose(!0)})}async handleMessage(e){if(Array.isArray(e)){for(let t of e)await this._handleMessage(t);return}await this._handleMessage(e)}cancelPendingRequest(e){let t=this._pendingRequests.get(e);t&&(this._pendingRequests.delete(e),t.cts.cancel(),t.promise.cancel(),t.cts.dispose(!0))}cancelAllRequests(){for(let[e,t]of this._pendingRequests)this._pendingRequests.delete(e),t.cts.cancel(),t.promise.cancel(),t.cts.dispose(!0)}async _handleMessage(e){rT(e)&&(Xr(e,{result:!0})?this._handleResult(e):this._handleError(e)),q7(e)&&await this._handleRequest(e),iT(e)&&this._handlers.handleNotification?.(e)}_handleResult(e){let t=this._pendingRequests.get(e.id);t&&(this._pendingRequests.delete(e.id),t.promise.complete(e.result),t.cts.dispose(!0))}_handleError(e){if(e.id===void 0)return;let t=this._pendingRequests.get(e.id);t&&(this._pendingRequests.delete(e.id),t.promise.error(new Lr(e.error.code,e.error.message,e.error.data)),t.cts.dispose(!0))}async _handleRequest(e){if(!this._handlers.handleRequest){this._send({jsonrpc:"2.0",id:e.id,error:{code:r.MethodNotFound,message:`Method not found: ${e.method}`}});return}let t=new st;this._register(oe(()=>t.dispose(!0)));try{let i=this._handlers.handleRequest(e,t.token),o=K7(i)?await i:i;this._send({jsonrpc:"2.0",id:e.id,result:o})}catch(i){i instanceof Lr?this._send({jsonrpc:"2.0",id:e.id,error:{code:i.code,message:i.message,data:i.data}}):this._send({jsonrpc:"2.0",id:e.id,error:{code:r.InternalError,message:i instanceof Error?i.message:"Internal error"}})}finally{t.dispose(!0)}}dispose(){this.cancelAllRequests(),super.dispose()}static createParseError(e,t){return{jsonrpc:"2.0",error:{code:r.ParseError,message:e,data:t}}}}});function mf(r,n){let e=r.match(SM);if(!e)return r;let[,t,i,o]=e;return`${t}${i}-${n}${o}`}function Q7(r){let n=r.match(SM);if(!n)throw new Lr(pl,`Invalid resource URI: ${r}`);let[,e,t,i]=n,o=t.match(/^(.*)-([0-9]+)$/);if(!o)throw new Lr(pl,`Invalid gateway resource URI (no server index): ${r}`);let[,s,a]=o;return{serverIndex:parseInt(a,10),originalUri:`${e}${s}${i}`}}function X7(r,n){return r.map(e=>e.type==="resource_link"?{...e,uri:mf(e.uri,n)}:e.type==="resource"?{...e,resource:{...e.resource,uri:mf(e.resource.uri,n)}}:e)}function _M(r){let n=Array.isArray(r)?r[0]:r;return!n||!Xr(n,{method:!0})?!1:n.method==="initialize"}var j7,z7,Y7,pl,SM,Kv,wM=_(()=>{oT();te();qe();j7="2025-11-25",z7=-32600,Y7=-32601,pl=-32602,SM=/^([a-zA-Z][a-zA-Z0-9+.-]*:\/\/)([^/?#]*)(.*)/;Kv=class extends M{constructor(e,t,i,o){super();this.id=e;this._logService=t;this._onDidDispose=i;this._toolInvoker=o;this._sseClients=new Set;this._pendingResponses=[];this._isCollectingPostResponses=!1;this._lastEventId=0;this._isInitialized=!1;this._rpc=this._register(new zd(s=>this._handleOutgoingMessage(s),{handleRequest:s=>this._handleRequest(s),handleNotification:s=>this._handleNotification(s)})),this._register(this._toolInvoker.onDidChangeTools(()=>{this._isInitialized&&this._rpc.sendNotification({method:"notifications/tools/list_changed"})})),this._register(this._toolInvoker.onDidChangeResources(()=>{this._isInitialized&&this._rpc.sendNotification({method:"notifications/resources/list_changed"})}))}attachSseClient(e,t){t.writeHead(200,{"Content-Type":"text/event-stream","Cache-Control":"no-cache, no-transform",Connection:"keep-alive"}),t.write(`: connected

`),this._sseClients.add(t),t.on("close",()=>{this._sseClients.delete(t)})}async handleIncoming(e){this._pendingResponses.length=0,this._isCollectingPostResponses=!0;try{return await this._rpc.handleMessage(e),[...this._pendingResponses]}finally{this._isCollectingPostResponses=!1,this._pendingResponses.length=0}}dispose(){for(let e of this._sseClients)e.destroyed||e.end();this._sseClients.clear(),this._onDidDispose(),super.dispose()}_handleOutgoingMessage(e){if(rT(e)){this._isCollectingPostResponses&&this._pendingResponses.push(e);return}if(iT(e)){this._broadcastSse(e);return}this._logService.warn("[McpGatewayService] Ignored unsupported outgoing gateway message")}_broadcastSse(e){if(this._sseClients.size===0)return;let t=JSON.stringify(e),i=String(++this._lastEventId),o=t.split(/\r?\n/g),s=[`id: ${i}`,"event: message",...o.map(a=>`data: ${a}`),"",""].join(`
`);for(let a of[...this._sseClients]){if(a.destroyed||a.writableEnded){this._sseClients.delete(a);continue}a.write(s)}}async _handleRequest(e){if(e.method==="initialize")return this._handleInitialize();if(!this._isInitialized)throw new Lr(z7,"Session is not initialized");switch(e.method){case"ping":return{};case"tools/list":return this._handleListTools();case"tools/call":return this._handleCallTool(e);case"resources/list":return this._handleListResources();case"resources/read":return this._handleReadResource(e);case"resources/templates/list":return this._handleListResourceTemplates();default:throw new Lr(Y7,`Method not found: ${e.method}`)}}_handleNotification(e){e.method==="notifications/initialized"&&(this._isInitialized=!0,this._rpc.sendNotification({method:"notifications/tools/list_changed"}),this._rpc.sendNotification({method:"notifications/resources/list_changed"}))}_handleInitialize(){return{protocolVersion:j7,capabilities:{tools:{listChanged:!0},resources:{listChanged:!0}},serverInfo:{name:"VS Code MCP Gateway",version:"1.0.0"}}}async _handleCallTool(e){let t=typeof e.params=="object"&&e.params?e.params:void 0;if(!t||typeof t.name!="string")throw new Lr(pl,"Missing tool call params");if(t.arguments&&typeof t.arguments!="object")throw new Lr(pl,"Invalid tool call arguments");let i=t.arguments&&typeof t.arguments=="object"?t.arguments:{};try{let{result:o,serverIndex:s}=await this._toolInvoker.callTool(t.name,i);return{...o,content:X7(o.content,s)}}catch(o){throw this._logService.error("[McpGatewayService] Tool call invocation failed",o),new Lr(pl,String(o))}}_handleListTools(){return this._toolInvoker.listTools().then(e=>({tools:e}))}async _handleListResources(){let e=await this._toolInvoker.listResources(),t=[];for(let{serverIndex:i,resources:o}of e)for(let s of o)t.push({...s,uri:mf(s.uri,i)});return{resources:t}}async _handleReadResource(e){let t=typeof e.params=="object"&&e.params?e.params:void 0;if(!t||typeof t.uri!="string")throw new Lr(pl,"Missing resource URI");let{serverIndex:i,originalUri:o}=Q7(t.uri);try{return{contents:(await this._toolInvoker.readResource(i,o)).contents.map(a=>({...a,uri:mf(a.uri,i)}))}}catch(s){throw this._logService.error("[McpGatewayService] Resource read failed",s),new Lr(pl,String(s))}}async _handleListResourceTemplates(){let e=await this._toolInvoker.listResourceTemplates(),t=[];for(let{serverIndex:i,resourceTemplates:o}of e)for(let s of o)t.push({...s,uriTemplate:mf(s.uriTemplate,i)});return{resourceTemplates:t}}}});var Yd,sT,bM=_(()=>{Ce();oT();te();Ie();Xt();me();wM();Yd=class extends M{constructor(e){super();this._logService=e;this._gateways=new Map;this._gatewayToClient=new Map}async createGateway(e,t){if(await this._ensureServer(),this._port===void 0)throw new Error("[McpGatewayService] Server failed to start, port is undefined");let i=Me();if(!t)throw new Error("[McpGatewayService] Tool invoker is required to create gateway");let o=new sT(i,this._logService,t);return this._gateways.set(i,o),e?(this._gatewayToClient.set(i,e),this._logService.info(`[McpGatewayService] Created gateway at http://127.0.0.1:${this._port}/gateway/${i} for client ${e}`)):this._logService.warn(`[McpGatewayService] Created gateway without client tracking at http://127.0.0.1:${this._port}/gateway/${i}`),{address:A.parse(`http://127.0.0.1:${this._port}/gateway/${i}`),gatewayId:i}}async disposeGateway(e){let t=this._gateways.get(e);if(!t){this._logService.warn(`[McpGatewayService] Attempted to dispose unknown gateway: ${e}`);return}t.dispose(),this._gateways.delete(e),this._gatewayToClient.delete(e),this._logService.info(`[McpGatewayService] Disposed gateway: ${e}`),this._gateways.size===0&&this._stopServer()}disposeGatewaysForClient(e){let t=[];for(let[i,o]of this._gatewayToClient)o===e&&t.push(i);if(t.length>0){this._logService.info(`[McpGatewayService] Disposing ${t.length} gateway(s) for disconnected client ${e}`);for(let i of t)this._gateways.get(i)?.dispose(),this._gateways.delete(i),this._gatewayToClient.delete(i);this._gateways.size===0&&this._stopServer()}}async _ensureServer(){if(!this._server?.listening){if(this._serverStartPromise)return this._serverStartPromise;this._serverStartPromise=this._startServer();try{await this._serverStartPromise}finally{this._serverStartPromise=void 0}}}async _startServer(){let{createServer:e}=await import("http"),t=new un;this._server=e((o,s)=>{this._handleRequest(o,s)});let i=setTimeout(()=>{t.error(new Error("[McpGatewayService] Timeout waiting for server to start"))},5e3);return this._server.on("listening",()=>{let o=this._server.address();if(typeof o=="string")this._port=parseInt(o);else if(o instanceof Object)this._port=o.port;else{clearTimeout(i),t.error(new Error("[McpGatewayService] Unable to determine port"));return}clearTimeout(i),this._logService.info(`[McpGatewayService] Server started on port ${this._port}`),t.complete()}),this._server.on("error",o=>{if(o.code==="EADDRINUSE"){this._logService.warn("[McpGatewayService] Port in use, retrying with random port..."),this._server.listen(0,"127.0.0.1");return}clearTimeout(i),this._logService.error(`[McpGatewayService] Server error: ${o}`),t.error(o)}),this._server.listen(0,"127.0.0.1"),t.p}_stopServer(){this._server&&(this._logService.info("[McpGatewayService] Stopping server (no more gateways)"),this._server.close(e=>{e?this._logService.error(`[McpGatewayService] Error closing server: ${e}`):this._logService.info("[McpGatewayService] Server stopped")}),this._server=void 0,this._port=void 0)}_handleRequest(e,t){let o=new URL(e.url,`http://${e.headers.host}`).pathname.split("/").filter(Boolean);if(o.length>=2&&o[0]==="gateway"){let s=o[1],a=this._gateways.get(s);if(a){a.handleRequest(e,t);return}}t.writeHead(404,{"Content-Type":"application/json"}),t.end(JSON.stringify({error:"Gateway not found"}))}dispose(){this._stopServer();for(let e of this._gateways.values())e.dispose();this._gateways.clear(),super.dispose()}};Yd=D([S(0,z)],Yd);sT=class r extends M{constructor(e,t,i){super();this.gatewayId=e;this._logService=t;this._toolInvoker=i;this._sessions=new Map}static{this.SessionHeaderName="mcp-session-id"}handleRequest(e,t){if(e.method==="POST"){this._handlePost(e,t);return}if(e.method==="GET"){this._handleGet(e,t);return}if(e.method==="DELETE"){this._handleDelete(e,t);return}this._respondHttpError(t,405,"Method not allowed")}dispose(){for(let e of this._sessions.values())e.dispose();this._sessions.clear(),super.dispose()}_handleDelete(e,t){let i=this._getSessionId(e);if(!i){this._respondHttpError(t,400,"Missing Mcp-Session-Id header");return}let o=this._sessions.get(i);if(!o){this._respondHttpError(t,404,"Session not found");return}o.dispose(),this._sessions.delete(i),t.writeHead(204),t.end()}_handleGet(e,t){let i=this._getSessionId(e);if(!i){this._respondHttpError(t,400,"Missing Mcp-Session-Id header");return}let o=this._sessions.get(i);if(!o){this._respondHttpError(t,404,"Session not found");return}o.attachSseClient(e,t)}async _handlePost(e,t){let i=await this._readRequestBody(e);if(i===void 0){this._respondHttpError(t,413,"Payload too large");return}let o;try{o=JSON.parse(i)}catch(l){t.writeHead(400,{"Content-Type":"application/json"}),t.end(JSON.stringify(zd.createParseError("Parse error",l instanceof Error?l.message:String(l))));return}let s=this._getSessionId(e),a=this._resolveSessionForPost(s,o,t);if(a)try{let l=await a.handleIncoming(o),c={"Content-Type":"application/json","Mcp-Session-Id":a.id};if(l.length===0){t.writeHead(202,c),t.end();return}t.writeHead(200,c),t.end(JSON.stringify(Array.isArray(o)?l:l[0]))}catch(l){this._logService.error("[McpGatewayService] Failed handling gateway request",l),this._respondHttpError(t,500,"Internal server error")}}_resolveSessionForPost(e,t,i){if(e){let a=this._sessions.get(e);if(!a){this._respondHttpError(i,404,"Session not found");return}return a}if(!_M(t)){this._respondHttpError(i,400,"Missing Mcp-Session-Id header");return}let o=Me(),s=new Kv(o,this._logService,()=>{this._sessions.delete(o)},this._toolInvoker);return this._sessions.set(o,s),s}_respondHttpError(e,t,i){e.writeHead(t,{"Content-Type":"application/json"}),e.end(JSON.stringify({jsonrpc:"2.0",error:{code:t,message:i}}))}_getSessionId(e){let t=e.headers[r.SessionHeaderName];return Array.isArray(t)?t[0]:t}async _readRequestBody(e){let t=[],i=0,o=1024*1024;for await(let s of e){let a=Buffer.isBuffer(s)?s:Buffer.from(s);if(i+=a.byteLength,i>o)return;t.push(a)}return Buffer.concat(t).toString("utf8")}}});function $7(r,n){return r.getChannel(yM,e=>e.ctx===n)}var Qd,TM=_(()=>{te();nT();Qd=class extends M{constructor(e,t){super();this._ipcServer=e;this.mcpGatewayService=t;this._register(e.onDidRemoveConnection(i=>t.disposeGatewaysForClient(i.ctx)))}listen(e,t){throw new Error("Invalid listen")}async call(e,t,i){switch(t){case"createGateway":{let o=$7(this._ipcServer,e);return await this.mcpGatewayService.createGateway(e,{onDidChangeTools:o.listen("onDidChangeTools"),onDidChangeResources:o.listen("onDidChangeResources"),listTools:()=>o.call("listTools"),callTool:(a,l)=>o.call("callTool",{name:a,args:l}),listResources:()=>o.call("listResources"),readResource:(a,l)=>o.call("readResource",{serverIndex:a,uri:l}),listResourceTemplates:()=>o.call("listResourceTemplates")})}case"disposeGateway":{await this.mcpGatewayService.disposeGateway(i);return}}throw new Error(`Invalid call: ${t}`)}};Qd=D([S(1,pf)],Qd)});var aT,zRe,PM=_(()=>{de();aT=V("IWebContentExtractorService"),zRe=V("ISharedWebContentExtractorService")});function lT(r){let n=typeof r=="string"?A.parse(r):r;return n.with({path:n.path.replace(/\/+$/,""),query:null,fragment:null})}function CM(r,n){let e=lT(r),t;if(/^[^./:]*:\/\//.test(n))t=lT(n);else{if(e.scheme!=="http"&&e.scheme!=="https")return!1;t=lT(`${e.scheme}://${n}`)}return cT(e.scheme,t.scheme)&&cT(e.authority,t.authority,!0)&&(t.path==="/"||cT(e.path,t.path))}function cT(r,n,e=!1){let t=Array.from({length:r.length+1}).map(()=>Array.from({length:n.length+1}).map(()=>{}));return rs(t,e,r,n,0,0)}function rs(r,n,e,t,i,o){if(r[i]?.[o]!==void 0)return r[i][o];let s=[];if(i===e.length)return o===t.length?!0:n&&t[o]+t[o+1]===":*"?o+2===t.length:!1;if(o===t.length)return e.slice(i)[0]==="/";if(e[i]===t[o]&&s.push(rs(r,n,e,t,i+1,o+1)),t[o]+t[o+1]==="*."&&(["/",":"].includes(e[i])||s.push(rs(r,n,e,t,i+1,o)),s.push(rs(r,n,e,t,i,o+2))),t[o]==="*"&&(i+1===e.length?s.push(rs(r,n,e,t,i+1,o+1)):s.push(rs(r,n,e,t,i+1,o)),s.push(rs(r,n,e,t,i,o+1))),n&&t[o]+t[o+1]===":*")if(e[i]===":"){let a=i+1;do a++;while(/[0-9]/.test(e[a]));s.push(rs(r,n,e,t,a,o+2))}else s.push(rs(r,n,e,t,i,o+2));return r[i][o]=s.some(a=>a===!0)}var AM=_(()=>{Ie()});function xM(r,n){if(r=A.parse(RM(r)),n=n.map(RM),n6(r.authority))return!0;for(let e=0;e<n.length;e++)if(n[e]==="*"||CM(r,n[e]))return!0;return!1}function RM(r){let n=["github.com"];try{let e=typeof r=="string"?A.parse(r,!0):r;return n.includes(e.authority)?e.with({path:e.path.toLowerCase()}).toString(!0):e.toString(!0)}catch{return r.toString()}}function n6(r){return Z7.test(r)||e6.test(r)||t6.test(r)}var Z7,e6,t6,DM=_(()=>{Ie();AM();Z7=/^(.+\.)?localhost(:\d+)?$/i,e6=/^127.0.0.1(:\d+)?$/,t6=/^\[::1\](:\d+)?$/});var jv,OM=_(()=>{er();Ut();jv=class r{constructor(){this._cache=new qi(r.MAX_CACHE_SIZE)}static{this.MAX_CACHE_SIZE=1e3}static{this.SUCCESS_CACHE_DURATION=1e3*60*60*24}static{this.ERROR_CACHE_DURATION=1e3*60*5}add(n,e,t){let i;switch(t.status){case"ok":case"redirect":i=Date.now()+r.SUCCESS_CACHE_DURATION;break;default:i=Date.now()+r.ERROR_CACHE_DURATION;break}let o=r.getKey(n,e);this._cache.set(o,{result:t,options:e,expiration:i})}tryGet(n,e){let t=r.getKey(n,e),i=this._cache.get(t);if(i!==void 0){if(i.expiration<Date.now()){this._cache.delete(t);return}return i.result}}static getKey(n,e){return`${!!e?.followRedirects}${nc.getComparisonKey(n)}`}}});function r6(r){if(r.length===0)return[];let n=new Map;for(let o of r)n.set(o.nodeId,o);function e(o){let s=n.get(o);if(!s||!s.childIds)return[];let a=[];for(let l of s.childIds){let c=n.get(l);c&&(c.ignored?a.push(...e(l)):a.push(l))}return a}let t=new Map;for(let o of r)o.ignored||t.set(o.nodeId,{node:o,children:[],parent:null});for(let o of r){if(o.ignored)continue;let s=t.get(o.nodeId);if(o.childIds)for(let a of o.childIds){let l=n.get(a);if(l)if(l.ignored){let c=e(a);for(let u of c){let p=t.get(u);p&&(p.parent=s,s.children.push(p))}}else{let c=t.get(a);c&&(c.parent=s,s.children.push(c))}}}let i=[];for(let o of t.values())o.parent||i.push(o);return i}function NM(r,n){let e=r6(n);if(e.length===0)return"";let t=[],i=[];for(let s of e){let a=i6(r,s),l=p6(s);a.trim().length>0&&t.push(a),i.push(...l)}return t.join(`

`)+(i.length>0?`

## Additional Links
`+i.join(`
`):"")}function i6(r,n){let e=[];return is(r,n,e,0,!0),e.join("")}function is(r,n,e,t,i){switch(os(n.node)){case"navigation":return;case"heading":l6(r,n,e,t);return;case"paragraph":a6(r,n,e,t,i);return;case"list":e.push(`
`);for(let s of n.children)is(r,s,e,t+1,!0);e.push(`
`);return;case"ListMarker":e.push(Io(n.node,i));return;case"listitem":{let s=[];for(let l of n.children)is(r,l,s,t+1,!0);let a=uT(n.node)>1?" ".repeat(uT(n.node)):"";e.push(`${a}${s.join("").trim()}
`);return}case"link":if(!LM(n)){let s=Io(n.node,i),a=pT(n.node);s6(r,n.node)?e.push(s):e.push(`[${s}](${a})`)}return;case"StaticText":{let s=Io(n.node,i);s&&e.push(s);break}case"image":{let s=Io(n.node,i)||"Image",a=o6(n.node);a?e.push(`![${s}](${a})

`):e.push(`[Image: ${s}]

`);break}case"DescriptionList":c6(r,n,e,t);return;case"blockquote":e.push("> "+Io(n.node,i).replace(/\n/g,`
> `)+`

`);break;case"generic":e.push(" ");break;case"code":{u6(r,n,e,t);return}case"pre":e.push("```\n"+Io(n.node,!1)+"\n```\n\n");break;case"table":d6(n,e);return}for(let s of n.children)is(r,s,e,t+1,i)}function os(r){return r.role?.value||""}function Io(r,n){let e=r.name?.value||r.value?.value||"";if(!n||e.length<=dT)return e;let t=e.split(""),i=-1;for(let o=1;o<t.length;o++)t[o]===" "&&(i=o),o%dT===0&&i!==-1&&(t[i]=`
`,i=o);return t.join("")}function uT(r){let n=r.properties?.find(e=>e.name==="level");return n?Math.min(Number(n.value.value)||1,6):1}function pT(r){return r.properties?.find(e=>e.name==="url")?.value.value||"#"}function o6(r){return r.properties?.find(e=>e.name==="url")?.value.value||null}function LM(r){let n=r;for(;n;){let e=os(n.node);if(["navigation","menu","menubar"].includes(e))return!0;n=n.parent}return!1}function s6(r,n){let e=pT(n);try{let t=A.parse(e);return t.scheme===r.scheme&&t.authority===r.authority&&t.path===r.path}catch{return!1}}function a6(r,n,e,t,i){e.push(`
`);for(let o of n.children)is(r,o,e,t+1,i);e.push(`

`)}function l6(r,n,e,t){e.push(`
`);let i=uT(n.node);e.push(`${"#".repeat(i)} `);for(let o of n.children)os(o.node)==="StaticText"?e.push(Io(o.node,!1)):is(r,o,e,t+1,!1);e.push(`

`)}function c6(r,n,e,t){e.push(`
`);for(let i of n.children)if(os(i.node)==="term"){e.push("- **");for(let o of i.children)is(r,o,e,t+1,!0);e.push("** ")}else if(os(i.node)==="definition"){for(let o of i.children)is(r,o,e,t+1,!0);e.push(`
`)}e.push(`
`)}function kM(r){return r==="cell"||r==="gridcell"||r==="columnheader"||r==="rowheader"}function d6(r,n){n.push(`
`);let e=r.children.filter(t=>os(t.node).includes("row"));if(e.length>0){let t=e[0].children.filter(o=>kM(os(o.node))),i=t.map(o=>Io(o.node,!1)||" ");n.push("| "+i.join(" | ")+` |
`),n.push("| "+t.map(()=>"---").join(" | ")+` |
`);for(let o=1;o<e.length;o++){let a=e[o].children.filter(l=>kM(os(l.node))).map(l=>Io(l.node,!1)||" ");n.push("| "+a.join(" | ")+` |
`)}}n.push(`
`)}function u6(r,n,e,t){let i=[];for(let s of n.children)is(r,s,i,t+1,!1);if(i.some(s=>s.includes(`
`)))e.push("\n```\n"),e.push(i.join("")),e.push("\n```\n");else{e.push("`");let s=0;for(let a of i)s+=a.length,s>dT&&(e.push(`
`),s=0),e.push(a),e.push("`")}}function p6(r){let n=[];return MM(r,n),n}function MM(r,n){if(os(r.node)==="link"&&LM(r)){let t=Io(r.node,!0),i=pT(r.node),o=r.node.description?.value||"";n.push(`- [${t}](${i})${o?" - "+o:""}`)}for(let t of r.children)MM(t,n)}var dT,UM=_(()=>{Ie();dT=80});var zv,FM=_(()=>{Ce();Bt();Jl();te();Ie();Xt();UM();zv=class r extends M{constructor(e,t,i,o,s){super();this._logger=t;this._uri=i;this._options=o;this._isTrustedDomain=s;this._requests=new Set;this._queue=this._register(new $r);this._timeout=this._register(new Pp);this._idleDebounceTimer=this._register(new Pp);this._onResult=e=>{};this._didFinishLoad=!1;this._window=e({width:800,height:600,show:!1,webPreferences:{partition:Me(),javascript:!0,offscreen:!0,sandbox:!0,webgl:!1}}),this._register(oe(()=>this._window.destroy())),this._debugger=this._window.webContents.debugger,this._debugger.attach("1.1"),this._debugger.on("message",this.onDebugMessage.bind(this)),this._window.webContents.once("did-start-loading",this.onStartLoading.bind(this)).once("did-finish-load",this.onFinishLoad.bind(this)).once("did-fail-load",this.onFailLoad.bind(this)).on("will-navigate",this.onRedirect.bind(this)).on("will-redirect",this.onRedirect.bind(this)).on("select-client-certificate",a=>a.preventDefault()),this._window.webContents.session.webRequest.onBeforeSendHeaders(this.onBeforeSendHeaders.bind(this)),this._window.webContents.session.webRequest.onHeadersReceived(this.onHeadersReceived.bind(this)),this._window.webContents.session.on("will-download",this.onDownload.bind(this))}static{this.TIMEOUT=3e4}static{this.POST_LOAD_TIMEOUT=5e3}static{this.FRAME_TIMEOUT=500}static{this.EXTRACT_CONTENT_TIMEOUT=2e3}static{this.IDLE_DEBOUNCE_TIME=500}static{this.MIN_CONTENT_LENGTH=100}trace(e){this._logger.trace(`[WebPageLoader] [${this._uri}] ${e}`)}async load(){return await new Promise(e=>{this._onResult=xo(t=>{switch(t.status){case"ok":this.trace(`Loaded web page content, status: ${t.status}, title: '${t.title}', length: ${t.result.length}`);break;case"redirect":this.trace(`Loaded web page content, status: ${t.status}, toURI: ${t.toURI}`);break;case"error":this.trace(`Loaded web page content, status: ${t.status}, code: ${t.statusCode}, error: '${t.error}', title: '${t.title}', length: ${t.result?.length??0}`);break}let i=t.status!=="redirect"?t.result:void 0;i!==void 0&&this.trace(i.length<200?`Extracted content: '${i}'`:`Extracted content preview: '${i.substring(0,200)}...'`),e(t),this.dispose()}),this.trace("Loading web page content"),this._window.loadURL(this._uri.toString(!0)),this.setTimeout(r.TIMEOUT)})}setTimeout(e){this._store.isDisposed||(this.trace(`Setting page load timeout to ${e} ms`),this._timeout.cancelAndSet(()=>{this.trace("Page load timeout reached"),this._queue.queue(()=>this.extractContent())},e))}onBeforeSendHeaders(e,t){let i={...e.requestHeaders};i.DNT="1",i["Sec-GPC"]="1",t({requestHeaders:i})}onHeadersReceived(e,t){let i=e.responseHeaders;if(i){let o=!1,s,a;for(let l of Object.keys(i)){let c=l.toLowerCase();c==="content-disposition"&&i[l]?.some(u=>u.toLowerCase().includes("attachment"))&&(o=!0,s=l),c==="content-type"&&(a=i[l]?.[0]?.toLowerCase())}if(o&&s){this.isTextMimeType(a)?(this.trace(`Replacing Content-Disposition: attachment with inline for ${e.url} (content-type: ${a})`),i[s]=["inline"],t({responseHeaders:i,cancel:!1})):(this.trace(`Blocked binary download (Content-Disposition: attachment, content-type: ${a}) for ${e.url}`),t({cancel:!0}));return}}t({cancel:!1})}static{this.TEXT_MIME_TYPE_RE=/^(?:text\/|application\/(?:json|xml|xhtml\+xml|rss\+xml|atom\+xml|svg\+xml|javascript|ecmascript|x-yaml|yaml|toml|.*\+(?:xml|json))$)/}isTextMimeType(e){let t=e?.split(";")[0].trim();return!!t&&r.TEXT_MIME_TYPE_RE.test(t)}onDownload(e,t){let i=t.getFilename();this.trace(`Blocked download: ${i}`),t.cancel(),this._queue.queue(()=>this.extractContent({status:"error",error:`Download not allowed: ${i}`}))}onStartLoading(){this._store.isDisposed||(this.trace("Received 'did-start-loading' event"),this._debugger.sendCommand("Network.enable").catch(()=>{}))}onFinishLoad(){this._store.isDisposed||(this.trace("Received 'did-finish-load' event"),this._didFinishLoad=!0,this.scheduleIdleCheck(),this.setTimeout(r.POST_LOAD_TIMEOUT))}onFailLoad(e,t,i){this._store.isDisposed||(this.trace(`Received 'did-fail-load' event, code: ${t}, error: '${i}'`),t===-3?(this.trace("Ignoring ERR_ABORTED (-3) as it may be caused by CSP or other measures"),this._queue.queue(()=>this.extractContent())):t===-27?(this.trace("Ignoring ERR_BLOCKED_BY_CLIENT (-27) as it may be caused by ad-blockers or similar extensions"),this._queue.queue(()=>this.extractContent())):this._queue.queue(()=>this.extractContent({status:"error",statusCode:t,error:i})))}onRedirect(e,t){if(!this._store.isDisposed&&(this.trace(`Received 'will-navigate' or 'will-redirect' event, url: ${t}`),!this._options?.followRedirects)){let i=A.parse(t);if(this.normalizeAuthority(i.authority)===this.normalizeAuthority(this._uri.authority)||this._isTrustedDomain(i))return;if(this._didFinishLoad){this.trace(`Blocking post-load navigation to ${t} (likely ad/tracker script)`),e.preventDefault();return}e.preventDefault(),this._onResult({status:"redirect",toURI:i})}}normalizeAuthority(e){return e.toLowerCase().replace(/^www\./,"")}onDebugMessage(e,t,i){if(this._store.isDisposed)return;let{requestId:o,type:s,response:a}=i;switch(t){case"Network.requestWillBeSent":o!==void 0&&(this._requests.add(o),this._idleDebounceTimer.cancel());break;case"Network.loadingFinished":case"Network.loadingFailed":o!==void 0&&(this._requests.delete(o),this._requests.size===0&&this._didFinishLoad&&this.scheduleIdleCheck());break;case"Network.responseReceived":if(s==="Document"){let l=a?.status??0;if(l>=400){let c=a?.statusText||`HTTP error ${l}`;this._queue.queue(()=>this.extractContent({status:"error",statusCode:l,error:c}))}}break}}scheduleIdleCheck(){this._store.isDisposed||this._idleDebounceTimer.cancelAndSet(async()=>{this._store.isDisposed||(await this.nextFrame(),this._requests.size===0?this._queue.queue(()=>this.extractContent()):this.trace("New network requests detected, deferring content extraction"))},r.IDLE_DEBOUNCE_TIME)}async nextFrame(){this._store.isDisposed||await MS(new Promise(e=>{try{this.trace("Waiting for a frame to be rendered"),this._window.webContents.beginFrameSubscription(!1,()=>{try{this.trace("A frame has been rendered"),this._window.webContents.endFrameSubscription()}catch{}e()})}catch{e()}}),r.FRAME_TIMEOUT)}async extractContent(e){if(!this._store.isDisposed)try{let t=this._window.webContents.getTitle(),i="",o=new st;try{await MS((async()=>{if(o.token.isCancellationRequested||(i=await this.extractAccessibilityTreeContent(o.token)??""),!o.token.isCancellationRequested&&i.length<r.MIN_CONTENT_LENGTH){this.trace("Accessibility tree extraction yielded insufficient content, trying main DOM element extraction");let s=await this.extractMainDomElementContent()??"";i=s.length>i.length?s:i}})(),r.EXTRACT_CONTENT_TIMEOUT)}finally{o.cancel(),o.dispose()}i.length===0?this._onResult({status:"error",error:"Failed to extract meaningful content from the web page"}):e!==void 0?this._onResult({...e,result:i,title:t}):this._onResult({status:"ok",result:i,title:t})}catch(t){e!==void 0?this._onResult(e):this._onResult({status:"error",error:t instanceof Error?t.message:String(t)})}}async extractAccessibilityTreeContent(e){this.trace("Extracting content using Accessibility domain");try{if(await this._debugger.sendCommand("Page.enable"),e.isCancellationRequested)return;let{frameTree:t}=await this._debugger.sendCommand("Page.getFrameTree");if(e.isCancellationRequested)return;let i=[t];for(let s=0;s<i.length;s++)i.push(...i[s].childFrames??[]);let o=[];for(let{frame:s}of i)try{let{nodes:a}=await this._debugger.sendCommand("Accessibility.getFullAXTree",{frameId:s.id});if(o.push(...a),e.isCancellationRequested)return}catch{}return NM(this._uri,o)}catch(t){this.trace(`Accessibility tree extraction failed: ${t instanceof Error?t.message:String(t)}`);return}}async extractMainDomElementContent(){try{return this.trace("Extracting content from main DOM element"),await this._window.webContents.executeJavaScript(`
				(() => {
					const selectors = ['main','article','[role="main"]','.main-content','#main-content','.article-body','.post-content','.entry-content','.content','body'];
					for (const selector of selectors) {
						const content = document.querySelector(selector)?.textContent?.replace(/[ \\t]+/g, ' ').replace(/\\s{2,}/gm, '\\n').trim();
						if (content && content.length > ${r.MIN_CONTENT_LENGTH}) {
							return content;
						}
					}
					return undefined;
				})();
			`)}catch(e){this.trace(`DOM extraction failed: ${e instanceof Error?e.message:String(e)}`);return}}}});import{BrowserWindow as m6}from"electron";var Xd,WM=_(()=>{Ce();me();DM();OM();FM();Xd=class{constructor(n){this._logger=n;this._limiter=new Tp(3);this._webContentsCache=new jv}extract(n,e){return n.length===0?(this._logger.info("No URIs provided for extraction"),Promise.resolve([])):(this._logger.info(`Extracting content from ${n.length} URIs`),Promise.all(n.map(t=>this._limiter.queue(()=>this.doExtract(t,e)))))}async doExtract(n,e){let t=this._webContentsCache.tryGet(n,e);if(t!==void 0)return this._logger.info(`Found cached content for ${n.toString()}`),t;let i=new zv(o=>new m6(o),this._logger,n,e,o=>xM(o,e?.trustedDomains||[]));try{let o=await i.load();return this._webContentsCache.add(n,e,o),o}finally{i.dispose()}}};Xd=D([S(0,z)],Xd)});var BM,ff,VM=_(()=>{dn();rt();te();Gr();ct();(n=>{function r(e,t){return e.callstack<t.callstack?-1:e.callstack>t.callstack?1:0}n.compare=r})(BM||={});ff=class r{constructor(n,e=r.ERROR_FLUSH_TIMEOUT){this._flushHandle=void 0;this._buffer=[];this._disposables=new ue;this._telemetryService=n,this._flushDelay=e;let t=Hl.addListener(i=>this._onErrorEvent(i));this._disposables.add(oe(t)),this.installErrorListeners()}static{this.ERROR_FLUSH_TIMEOUT=5*1e3}dispose(){clearTimeout(this._flushHandle),this._flushBuffer(),this._disposables.dispose()}installErrorListeners(){}_onErrorEvent(n){if(!n||n.code||(n.detail&&n.detail.stack&&(n=n.detail),Ar.isErrorNoTelemetry(n)||n instanceof mn||Ag.is(n)||typeof n?.message=="string"&&n.message.includes("Unable to read file")))return;let e=Array.isArray(n.stack)?n.stack.join(`
`):n.stack,t=n.message?n.message:Q_(n);e&&this._enqueue({msg:t,callstack:e})}_enqueue(n){let e=BR(this._buffer,n,BM.compare);e<0?(n.count=1,this._buffer.splice(~e,0,n)):(this._buffer[e].count||(this._buffer[e].count=0),this._buffer[e].count+=1),this._flushHandle===void 0&&(this._flushHandle=setTimeout(()=>{this._flushBuffer(),this._flushHandle=void 0},this._flushDelay))}_flushBuffer(){for(let n of this._buffer)this._telemetryService.publicLogError2("UnhandledError",n);this._buffer.length=0}}});var ml,GM=_(()=>{rt();VM();Tn();ml=class extends ff{constructor(e,t){super(t);this.logService=e}installErrorListeners(){Rg(e=>this.onUnexpectedError(e)),process.on("uncaughtException",e=>{NR(e)||vt(e)}),process.on("unhandledRejection",e=>vt(e))}onUnexpectedError(e){this.logService.error(`[uncaught exception in main]: ${e}`),e.stack&&this.logService.error(e.stack)}};ml=D([S(1,St)],ml)});var HM,$d,JM=_(()=>{rt();qe();de();me();Tn();Nv();HM=V("IExtensionSignatureVerificationService"),$d=class{constructor(n,e){this.logService=n;this.telemetryService=e}vsceSign(){return this.moduleLoadingPromise||(this.moduleLoadingPromise=this.resolveVsceSign()),this.moduleLoadingPromise}async resolveVsceSign(){return import("@vscode/vsce-sign")}async verify(n,e,t,i,o){let s;try{s=await this.vsceSign()}catch(u){this.logService.error("Could not load vsce-sign module",cn(u)),this.logService.info(`Extension signature verification is not done: ${n}`);return}let a=new Date().getTime(),l;try{this.logService.trace(`Verifying extension signature for ${n}...`),l=await s.verify(t,i,this.logService.getLevel()===1)}catch(u){l={code:"UnknownError",didExecute:!1,output:cn(u)}}let c=new Date().getTime()-a;return this.logService.info(`Extension signature verification result for ${n}: ${l.code}. ${ex(l.internalCode)?`Internal Code: ${l.internalCode}. `:""}Executed: ${l.didExecute}. Duration: ${c}ms.`),this.logService.trace(`Extension signature verification output for ${n}:
${l.output}`),this.telemetryService.publicLog2("extensionsignature:verification",{extensionId:n,extensionVersion:e,code:l.code,internalCode:l.internalCode,duration:c,didExecute:l.didExecute,clientTargetPlatform:o}),{code:l.code}}};$d=D([S(0,z),S(1,St)],$d)});function Dt(r,n){if(!r)throw new Error(n)}function Zd(r){if(typeof r!="number")throw new Error("invalid int 32: "+typeof r);if(!Number.isInteger(r)||r>I6||r<v6)throw new Error("invalid int 32: "+r)}function gf(r){if(typeof r!="number")throw new Error("invalid uint 32: "+typeof r);if(!Number.isInteger(r)||r>h6||r<0)throw new Error("invalid uint 32: "+r)}function Yv(r){if(typeof r!="number")throw new Error("invalid float 32: "+typeof r);if(Number.isFinite(r)&&(r>f6||r<g6))throw new Error("invalid float 32: "+r)}var f6,g6,h6,I6,v6,ia=_(()=>{f6=34028234663852886e22,g6=-34028234663852886e22,h6=4294967295,I6=2147483647,v6=-2147483648});function KM(r){let n=r[qM];return Dt(n,"missing enum type on enum object"),n}function mT(r,n,e,t){r[qM]=fT(n,e.map(i=>({no:i.no,name:i.name,localName:r[i.no]})),t)}function fT(r,n,e){let t=Object.create(null),i=Object.create(null),o=[];for(let s of n){let a=zM(s);o.push(a),t[s.name]=a,i[s.no]=a}return{typeName:r,values:o,findName(s){return t[s]},findNumber(s){return i[s]}}}function jM(r,n,e){let t={};for(let i of n){let o=zM(i);t[o.localName]=o.no,t[o.no]=o.localName}return mT(t,r,n,e),t}function zM(r){return"localName"in r?r:Object.assign(Object.assign({},r),{localName:r.name})}var qM,gT=_(()=>{ia();qM=Symbol("@bufbuild/protobuf/enum-type")});var b,ir=_(()=>{b=class{equals(n){return this.getType().runtime.util.equals(this.getType(),this,n)}clone(){return this.getType().runtime.util.clone(this)}fromBinary(n,e){let t=this.getType(),i=t.runtime.bin,o=i.makeReadOptions(e);return i.readMessage(this,o.readerFactory(n),n.byteLength,o),this}fromJson(n,e){let t=this.getType(),i=t.runtime.json,o=i.makeReadOptions(e);return i.readMessage(t,n,o,this),this}fromJsonString(n,e){let t;try{t=JSON.parse(n)}catch(i){throw new Error(`cannot decode ${this.getType().typeName} from JSON: ${i instanceof Error?i.message:String(i)}`)}return this.fromJson(t,e)}toBinary(n){let e=this.getType(),t=e.runtime.bin,i=t.makeWriteOptions(n),o=i.writerFactory();return t.writeMessage(this,o,i),o.finish()}toJson(n){let e=this.getType(),t=e.runtime.json,i=t.makeWriteOptions(n);return t.writeMessage(this,i)}toJsonString(n){var e;let t=this.toJson(n);return JSON.stringify(t,null,(e=n?.prettySpaces)!==null&&e!==void 0?e:0)}toJSON(){return this.toJson({emitDefaultValues:!0})}getType(){return Object.getPrototypeOf(this).constructor}}});function YM(r,n,e,t){var i;let o=(i=t?.localName)!==null&&i!==void 0?i:n.substring(n.lastIndexOf(".")+1),s={[o]:function(a){r.util.initFields(this),r.util.initPartial(a,this)}}[o];return Object.setPrototypeOf(s.prototype,new b),Object.assign(s,{runtime:r,typeName:n,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}var QM=_(()=>{ir()});function $M(){let r=0,n=0;for(let t=0;t<28;t+=7){let i=this.buf[this.pos++];if(r|=(i&127)<<t,(i&128)==0)return this.assertBounds(),[r,n]}let e=this.buf[this.pos++];if(r|=(e&15)<<28,n=(e&112)>>4,(e&128)==0)return this.assertBounds(),[r,n];for(let t=3;t<=31;t+=7){let i=this.buf[this.pos++];if(n|=(i&127)<<t,(i&128)==0)return this.assertBounds(),[r,n]}throw new Error("invalid varint")}function Xv(r,n,e){for(let o=0;o<28;o=o+7){let s=r>>>o,a=!(!(s>>>7)&&n==0),l=(a?s|128:s)&255;if(e.push(l),!a)return}let t=r>>>28&15|(n&7)<<4,i=n>>3!=0;if(e.push((i?t|128:t)&255),!!i){for(let o=3;o<31;o=o+7){let s=n>>>o,a=!!(s>>>7),l=(a?s|128:s)&255;if(e.push(l),!a)return}e.push(n>>>31&1)}}function hT(r){let n=r[0]==="-";n&&(r=r.slice(1));let e=1e6,t=0,i=0;function o(s,a){let l=Number(r.slice(s,a));i*=e,t=t*e+l,t>=Qv&&(i=i+(t/Qv|0),t=t%Qv)}return o(-24,-18),o(-18,-12),o(-12,-6),o(-6),n?e2(t,i):vT(t,i)}function ZM(r,n){let e=vT(r,n),t=e.hi&2147483648;t&&(e=e2(e.lo,e.hi));let i=IT(e.lo,e.hi);return t?"-"+i:i}function IT(r,n){if({lo:r,hi:n}=E6(r,n),n<=2097151)return String(Qv*n+r);let e=r&16777215,t=(r>>>24|n<<8)&16777215,i=n>>16&65535,o=e+t*6777216+i*6710656,s=t+i*8147497,a=i*2,l=1e7;return o>=l&&(s+=Math.floor(o/l),o%=l),s>=l&&(a+=Math.floor(s/l),s%=l),a.toString()+XM(s)+XM(o)}function E6(r,n){return{lo:r>>>0,hi:n>>>0}}function vT(r,n){return{lo:r|0,hi:n|0}}function e2(r,n){return n=~n,r?r=~r+1:n+=1,vT(r,n)}function ET(r,n){if(r>=0){for(;r>127;)n.push(r&127|128),r=r>>>7;n.push(r)}else{for(let e=0;e<9;e++)n.push(r&127|128),r=r>>7;n.push(1)}}function t2(){let r=this.buf[this.pos++],n=r&127;if((r&128)==0)return this.assertBounds(),n;if(r=this.buf[this.pos++],n|=(r&127)<<7,(r&128)==0)return this.assertBounds(),n;if(r=this.buf[this.pos++],n|=(r&127)<<14,(r&128)==0)return this.assertBounds(),n;if(r=this.buf[this.pos++],n|=(r&127)<<21,(r&128)==0)return this.assertBounds(),n;r=this.buf[this.pos++],n|=(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(),n>>>0}var Qv,XM,yT=_(()=>{Qv=4294967296;XM=r=>{let n=String(r);return"0000000".slice(n.length)+n}});function y6(){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 i=BigInt("-9223372036854775808"),o=BigInt("9223372036854775807"),s=BigInt("0"),a=BigInt("18446744073709551615");return{zero:BigInt(0),supported:!0,parse(l){let c=typeof l=="bigint"?l:BigInt(l);if(c>o||c<i)throw new Error(`int64 invalid: ${l}`);return c},uParse(l){let c=typeof l=="bigint"?l:BigInt(l);if(c>a||c<s)throw new Error(`uint64 invalid: ${l}`);return c},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,c){return r.setInt32(0,l,!0),r.setInt32(4,c,!0),r.getBigInt64(0,!0)},uDec(l,c){return r.setInt32(0,l,!0),r.setInt32(4,c,!0),r.getBigUint64(0,!0)}}}let e=i=>Dt(/^-?[0-9]+$/.test(i),`int64 invalid: ${i}`),t=i=>Dt(/^[0-9]+$/.test(i),`uint64 invalid: ${i}`);return{zero:"0",supported:!1,parse(i){return typeof i!="string"&&(i=i.toString()),e(i),i},uParse(i){return typeof i!="string"&&(i=i.toString()),t(i),i},enc(i){return typeof i!="string"&&(i=i.toString()),e(i),hT(i)},uEnc(i){return typeof i!="string"&&(i=i.toString()),t(i),hT(i)},dec(i,o){return ZM(i,o)},uDec(i,o){return IT(i,o)}}}var X,oa=_(()=>{ia();yT();X=y6()});var j,ki,sa=_(()=>{(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"})(j||(j={}));(function(r){r[r.BIGINT=0]="BIGINT",r[r.STRING=1]="STRING"})(ki||(ki={}))});function ss(r,n,e){if(n===e)return!0;if(r==j.BYTES){if(!(n instanceof Uint8Array)||!(e instanceof Uint8Array)||n.length!==e.length)return!1;for(let t=0;t<n.length;t++)if(n[t]!==e[t])return!1;return!0}switch(r){case j.UINT64:case j.FIXED64:case j.INT64:case j.SFIXED64:case j.SINT64:return n==e}return!1}function Ni(r,n){switch(r){case j.BOOL:return!1;case j.UINT64:case j.FIXED64:case j.INT64:case j.SFIXED64:case j.SINT64:return n==0?X.zero:"0";case j.DOUBLE:case j.FLOAT:return 0;case j.BYTES:return new Uint8Array(0);case j.STRING:return"";default:return 0}}function $v(r,n){switch(r){case j.BOOL:return n===!1;case j.STRING:return n==="";case j.BYTES:return n instanceof Uint8Array&&!n.byteLength;default:return n==0}}var aa=_(()=>{oa();sa()});var on,Zv,eE,n2=_(()=>{yT();ia();oa();(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"})(on||(on={}));Zv=class{constructor(n){this.stack=[],this.textEncoder=n??new TextEncoder,this.chunks=[],this.buf=[]}finish(){this.chunks.push(new Uint8Array(this.buf));let n=0;for(let i=0;i<this.chunks.length;i++)n+=this.chunks[i].length;let e=new Uint8Array(n),t=0;for(let i=0;i<this.chunks.length;i++)e.set(this.chunks[i],t),t+=this.chunks[i].length;return this.chunks=[],e}fork(){return this.stack.push({chunks:this.chunks,buf:this.buf}),this.chunks=[],this.buf=[],this}join(){let n=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(n.byteLength),this.raw(n)}tag(n,e){return this.uint32((n<<3|e)>>>0)}raw(n){return this.buf.length&&(this.chunks.push(new Uint8Array(this.buf)),this.buf=[]),this.chunks.push(n),this}uint32(n){for(gf(n);n>127;)this.buf.push(n&127|128),n=n>>>7;return this.buf.push(n),this}int32(n){return Zd(n),ET(n,this.buf),this}bool(n){return this.buf.push(n?1:0),this}bytes(n){return this.uint32(n.byteLength),this.raw(n)}string(n){let e=this.textEncoder.encode(n);return this.uint32(e.byteLength),this.raw(e)}float(n){Yv(n);let e=new Uint8Array(4);return new DataView(e.buffer).setFloat32(0,n,!0),this.raw(e)}double(n){let e=new Uint8Array(8);return new DataView(e.buffer).setFloat64(0,n,!0),this.raw(e)}fixed32(n){gf(n);let e=new Uint8Array(4);return new DataView(e.buffer).setUint32(0,n,!0),this.raw(e)}sfixed32(n){Zd(n);let e=new Uint8Array(4);return new DataView(e.buffer).setInt32(0,n,!0),this.raw(e)}sint32(n){return Zd(n),n=(n<<1^n>>31)>>>0,ET(n,this.buf),this}sfixed64(n){let e=new Uint8Array(8),t=new DataView(e.buffer),i=X.enc(n);return t.setInt32(0,i.lo,!0),t.setInt32(4,i.hi,!0),this.raw(e)}fixed64(n){let e=new Uint8Array(8),t=new DataView(e.buffer),i=X.uEnc(n);return t.setInt32(0,i.lo,!0),t.setInt32(4,i.hi,!0),this.raw(e)}int64(n){let e=X.enc(n);return Xv(e.lo,e.hi,this.buf),this}sint64(n){let e=X.enc(n),t=e.hi>>31,i=e.lo<<1^t,o=(e.hi<<1|e.lo>>>31)^t;return Xv(i,o,this.buf),this}uint64(n){let e=X.uEnc(n);return Xv(e.lo,e.hi,this.buf),this}},eE=class{constructor(n,e){this.varint64=$M,this.uint32=t2,this.buf=n,this.len=n.length,this.pos=0,this.view=new DataView(n.buffer,n.byteOffset,n.byteLength),this.textDecoder=e??new TextDecoder}tag(){let n=this.uint32(),e=n>>>3,t=n&7;if(e<=0||t<0||t>5)throw new Error("illegal tag: field no "+e+" wire type "+t);return[e,t]}skip(n,e){let t=this.pos;switch(n){case on.Varint:for(;this.buf[this.pos++]&128;);break;case on.Bit64:this.pos+=4;case on.Bit32:this.pos+=4;break;case on.LengthDelimited:let i=this.uint32();this.pos+=i;break;case on.StartGroup:for(;;){let[o,s]=this.tag();if(s===on.EndGroup){if(e!==void 0&&o!==e)throw new Error("invalid end group tag");break}this.skip(s,o)}break;default:throw new Error("cant skip wire type "+n)}return this.assertBounds(),this.buf.subarray(t,this.pos)}assertBounds(){if(this.pos>this.len)throw new RangeError("premature EOF")}int32(){return this.uint32()|0}sint32(){let n=this.uint32();return n>>>1^-(n&1)}int64(){return X.dec(...this.varint64())}uint64(){return X.uDec(...this.varint64())}sint64(){let[n,e]=this.varint64(),t=-(n&1);return n=(n>>>1|(e&1)<<31)^t,e=e>>>1^t,X.dec(n,e)}bool(){let[n,e]=this.varint64();return n!==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 X.uDec(this.sfixed32(),this.sfixed32())}sfixed64(){return X.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 n=this.uint32(),e=this.pos;return this.pos+=n,this.assertBounds(),this.buf.subarray(e,e+n)}string(){return this.textDecoder.decode(this.bytes())}}});function r2(r,n,e,t){let i;return{typeName:n,extendee:e,get field(){if(!i){let o=typeof t=="function"?t():t;o.name=n.split(".").pop(),o.jsonName=`[${n}]`,i=r.util.newFieldList([o]).list()[0]}return i},runtime:r}}function tE(r){let n=r.field.localName,e=Object.create(null);return e[n]=S6(r),[e,()=>e[n]]}function S6(r){let n=r.field;if(n.repeated)return[];if(n.default!==void 0)return n.default;switch(n.kind){case"enum":return n.T.values[0].no;case"scalar":return Ni(n.T,n.L);case"message":let e=n.T,t=new e;return e.fieldWrapper?e.fieldWrapper.unwrapField(t):t;case"map":throw"map fields are not allowed to be extensions"}}function i2(r,n){if(!n.repeated&&(n.kind=="enum"||n.kind=="scalar")){for(let e=r.length-1;e>=0;--e)if(r[e].no==n.no)return[r[e]];return[]}return r.filter(e=>e.no===n.no)}var nE=_(()=>{aa()});var as,rE,ST,o2=_(()=>{as="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""),rE=[];for(let r=0;r<as.length;r++)rE[as[r].charCodeAt(0)]=r;rE[45]=as.indexOf("+");rE[95]=as.indexOf("/");ST={dec(r){let n=r.length*3/4;r[r.length-2]=="="?n-=2:r[r.length-1]=="="&&(n-=1);let e=new Uint8Array(n),t=0,i=0,o,s=0;for(let a=0;a<r.length;a++){if(o=rE[r.charCodeAt(a)],o===void 0)switch(r[a]){case"=":i=0;case`
`:case"\r":case"	":case" ":continue;default:throw Error("invalid base64 string.")}switch(i){case 0:s=o,i=1;break;case 1:e[t++]=s<<2|(o&48)>>4,s=o,i=2;break;case 2:e[t++]=(s&15)<<4|(o&60)>>2,s=o,i=3;break;case 3:e[t++]=(s&3)<<6|o,i=0;break}}if(i==1)throw Error("invalid base64 string.");return e.subarray(0,t)},enc(r){let n="",e=0,t,i=0;for(let o=0;o<r.length;o++)switch(t=r[o],e){case 0:n+=as[t>>2],i=(t&3)<<4,e=1;break;case 1:n+=as[i|t>>4],i=(t&15)<<2,e=2;break;case 2:n+=as[i|t>>6],n+=as[t&63],e=0;break}return e&&(n+=as[i],n+="=",e==1&&(n+="=")),n}}});function s2(r,n,e){l2(n,r);let t=n.runtime.bin.makeReadOptions(e),i=i2(r.getType().runtime.bin.listUnknownFields(r),n.field),[o,s]=tE(n);for(let a of i)n.runtime.bin.readField(o,t.readerFactory(a.data),n.field,a.wireType,t);return s()}function a2(r,n,e,t){l2(n,r);let i=n.runtime.bin.makeReadOptions(t),o=n.runtime.bin.makeWriteOptions(t);if(_T(r,n)){let c=r.getType().runtime.bin.listUnknownFields(r).filter(u=>u.no!=n.field.no);r.getType().runtime.bin.discardUnknownFields(r);for(let u of c)r.getType().runtime.bin.onUnknownField(r,u.no,u.wireType,u.data)}let s=o.writerFactory(),a=n.field;!a.opt&&!a.repeated&&(a.kind=="enum"||a.kind=="scalar")&&(a=Object.assign(Object.assign({},n.field),{opt:!0})),n.runtime.bin.writeField(a,e,s,o);let l=i.readerFactory(s.finish());for(;l.pos<l.len;){let[c,u]=l.tag(),p=l.skip(u,c);r.getType().runtime.bin.onUnknownField(r,c,u,p)}}function _T(r,n){let e=r.getType();return n.extendee.typeName===e.typeName&&!!e.runtime.bin.listUnknownFields(r).find(t=>t.no==n.field.no)}function l2(r,n){Dt(r.extendee.typeName==n.getType().typeName,`extension ${r.typeName} can only be applied to message ${r.extendee.typeName}`)}var c2=_(()=>{ia();nE()});function iE(r,n){let e=r.localName;if(r.repeated)return n[e].length>0;if(r.oneof)return n[r.oneof.localName].case===e;switch(r.kind){case"enum":case"scalar":return r.opt||r.req?n[e]!==void 0:r.kind=="enum"?n[e]!==r.T.values[0].no:!$v(r.T,n[e]);case"message":return n[e]!==void 0;case"map":return Object.keys(n[e]).length>0}}function wT(r,n){let e=r.localName,t=!r.opt&&!r.req;if(r.repeated)n[e]=[];else if(r.oneof)n[r.oneof.localName]={case:void 0};else switch(r.kind){case"map":n[e]={};break;case"enum":n[e]=t?r.T.values[0].no:void 0;break;case"scalar":n[e]=t?Ni(r.T,r.L):void 0;break;case"message":n[e]=void 0;break}}var bT=_(()=>{aa()});function Kr(r,n){if(r===null||typeof r!="object"||!Object.getOwnPropertyNames(b.prototype).every(t=>t in r&&typeof r[t]=="function"))return!1;let e=r.getType();return e===null||typeof e!="function"||!("typeName"in e)||typeof e.typeName!="string"?!1:n===void 0?!0:e.typeName==n.typeName}var hf=_(()=>{ir()});function oE(r,n){return Kr(n)||!r.fieldWrapper?n:r.fieldWrapper.wrapField(n)}var SDe,TT=_(()=>{sa();hf();SDe={"google.protobuf.DoubleValue":j.DOUBLE,"google.protobuf.FloatValue":j.FLOAT,"google.protobuf.Int64Value":j.INT64,"google.protobuf.UInt64Value":j.UINT64,"google.protobuf.Int32Value":j.INT32,"google.protobuf.UInt32Value":j.UINT32,"google.protobuf.BoolValue":j.BOOL,"google.protobuf.StringValue":j.STRING,"google.protobuf.BytesValue":j.BYTES}});function _6(r){return r?Object.assign(Object.assign({},d2),r):d2}function w6(r){return r?Object.assign(Object.assign({},u2),r):u2}function f2(){return{makeReadOptions:_6,makeWriteOptions:w6,readMessage(r,n,e,t){if(n==null||Array.isArray(n)||typeof n!="object")throw new Error(`cannot decode message ${r.typeName} from JSON: ${vo(n)}`);t=t??new r;let i=new Map,o=e.typeRegistry;for(let[s,a]of Object.entries(n)){let l=r.fields.findJsonName(s);if(l){if(l.oneof){if(a===null&&l.kind=="scalar")continue;let c=i.get(l.oneof);if(c!==void 0)throw new Error(`cannot decode message ${r.typeName} from JSON: multiple keys for oneof "${l.oneof.name}" present: "${c}", "${s}"`);i.set(l.oneof,s)}p2(t,a,l,e,r)}else{let c=!1;if(o?.findExtension&&s.startsWith("[")&&s.endsWith("]")){let u=o.findExtension(s.substring(1,s.length-1));if(u&&u.extendee.typeName==r.typeName){c=!0;let[p,m]=tE(u);p2(p,a,u.field,e,u),a2(t,u,m(),e)}}if(!c&&!e.ignoreUnknownFields)throw new Error(`cannot decode message ${r.typeName} from JSON: key "${s}" is unknown`)}}return t},writeMessage(r,n){let e=r.getType(),t={},i;try{for(i of e.fields.byNumber()){if(!iE(i,r)){if(i.req)throw"required field not set";if(!n.emitDefaultValues||!T6(i))continue}let s=i.oneof?r[i.oneof.localName].value:r[i.localName],a=m2(i,s,n);a!==void 0&&(t[n.useProtoFieldName?i.name:i.jsonName]=a)}let o=n.typeRegistry;if(o?.findExtensionFor)for(let s of e.runtime.bin.listUnknownFields(r)){let a=o.findExtensionFor(e.typeName,s.no);if(a&&_T(r,a)){let l=s2(r,a,n),c=m2(a.field,l,n);c!==void 0&&(t[a.field.jsonName]=c)}}}catch(o){let s=i?`cannot encode field ${e.typeName}.${i.name} to JSON`:`cannot encode message ${e.typeName} to JSON`,a=o instanceof Error?o.message:String(o);throw new Error(s+(a.length>0?`: ${a}`:""))}return t},readScalar(r,n,e){return If(r,n,e??ki.BIGINT,!0)},writeScalar(r,n,e){if(n!==void 0&&(e||$v(r,n)))return aE(r,n)},debug:vo}}function vo(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 p2(r,n,e,t,i){let o=e.localName;if(e.repeated){if(Dt(e.kind!="map"),n===null)return;if(!Array.isArray(n))throw new Error(`cannot decode field ${i.typeName}.${e.name} from JSON: ${vo(n)}`);let s=r[o];for(let a of n){if(a===null)throw new Error(`cannot decode field ${i.typeName}.${e.name} from JSON: ${vo(a)}`);switch(e.kind){case"message":s.push(e.T.fromJson(a,t));break;case"enum":let l=PT(e.T,a,t.ignoreUnknownFields,!0);l!==sE&&s.push(l);break;case"scalar":try{s.push(If(e.T,a,e.L,!0))}catch(c){let u=`cannot decode field ${i.typeName}.${e.name} from JSON: ${vo(a)}`;throw c instanceof Error&&c.message.length>0&&(u+=`: ${c.message}`),new Error(u)}break}}}else if(e.kind=="map"){if(n===null)return;if(typeof n!="object"||Array.isArray(n))throw new Error(`cannot decode field ${i.typeName}.${e.name} from JSON: ${vo(n)}`);let s=r[o];for(let[a,l]of Object.entries(n)){if(l===null)throw new Error(`cannot decode field ${i.typeName}.${e.name} from JSON: map value null`);let c;try{c=b6(e.K,a)}catch(u){let p=`cannot decode map key for field ${i.typeName}.${e.name} from JSON: ${vo(n)}`;throw u instanceof Error&&u.message.length>0&&(p+=`: ${u.message}`),new Error(p)}switch(e.V.kind){case"message":s[c]=e.V.T.fromJson(l,t);break;case"enum":let u=PT(e.V.T,l,t.ignoreUnknownFields,!0);u!==sE&&(s[c]=u);break;case"scalar":try{s[c]=If(e.V.T,l,ki.BIGINT,!0)}catch(p){let m=`cannot decode map value for field ${i.typeName}.${e.name} from JSON: ${vo(n)}`;throw p instanceof Error&&p.message.length>0&&(m+=`: ${p.message}`),new Error(m)}break}}}else switch(e.oneof&&(r=r[e.oneof.localName]={case:o},o="value"),e.kind){case"message":let s=e.T;if(n===null&&s.typeName!="google.protobuf.Value")return;let a=r[o];Kr(a)?a.fromJson(n,t):(r[o]=a=s.fromJson(n,t),s.fieldWrapper&&!e.oneof&&(r[o]=s.fieldWrapper.unwrapField(a)));break;case"enum":let l=PT(e.T,n,t.ignoreUnknownFields,!1);switch(l){case lE:wT(e,r);break;case sE:break;default:r[o]=l;break}break;case"scalar":try{let c=If(e.T,n,e.L,!1);c===lE?wT(e,r):r[o]=c}catch(c){let u=`cannot decode field ${i.typeName}.${e.name} from JSON: ${vo(n)}`;throw c instanceof Error&&c.message.length>0&&(u+=`: ${c.message}`),new Error(u)}break}}function b6(r,n){if(r===j.BOOL)switch(n){case"true":n=!0;break;case"false":n=!1;break}return If(r,n,ki.BIGINT,!0).toString()}function If(r,n,e,t){if(n===null)return t?Ni(r,e):lE;switch(r){case j.DOUBLE:case j.FLOAT:if(n==="NaN")return Number.NaN;if(n==="Infinity")return Number.POSITIVE_INFINITY;if(n==="-Infinity")return Number.NEGATIVE_INFINITY;if(n===""||typeof n=="string"&&n.trim().length!==n.length||typeof n!="string"&&typeof n!="number")break;let i=Number(n);if(Number.isNaN(i)||!Number.isFinite(i))break;return r==j.FLOAT&&Yv(i),i;case j.INT32:case j.FIXED32:case j.SFIXED32:case j.SINT32:case j.UINT32:let o;if(typeof n=="number"?o=n:typeof n=="string"&&n.length>0&&n.trim().length===n.length&&(o=Number(n)),o===void 0)break;return r==j.UINT32||r==j.FIXED32?gf(o):Zd(o),o;case j.INT64:case j.SFIXED64:case j.SINT64:if(typeof n!="number"&&typeof n!="string")break;let s=X.parse(n);return e?s.toString():s;case j.FIXED64:case j.UINT64:if(typeof n!="number"&&typeof n!="string")break;let a=X.uParse(n);return e?a.toString():a;case j.BOOL:if(typeof n!="boolean")break;return n;case j.STRING:if(typeof n!="string")break;try{encodeURIComponent(n)}catch{throw new Error("invalid UTF8")}return n;case j.BYTES:if(n==="")return new Uint8Array(0);if(typeof n!="string")break;return ST.dec(n)}throw new Error}function PT(r,n,e,t){if(n===null)return r.typeName=="google.protobuf.NullValue"?0:t?r.values[0].no:lE;switch(typeof n){case"number":if(Number.isInteger(n))return n;break;case"string":let i=r.findName(n);if(i!==void 0)return i.no;if(e)return sE;break}throw new Error(`cannot decode enum ${r.typeName} from JSON: ${vo(n)}`)}function T6(r){return r.repeated||r.kind=="map"?!0:!(r.oneof||r.kind=="message"||r.opt||r.req)}function m2(r,n,e){if(r.kind=="map"){Dt(typeof n=="object"&&n!=null);let t={},i=Object.entries(n);switch(r.V.kind){case"scalar":for(let[s,a]of i)t[s.toString()]=aE(r.V.T,a);break;case"message":for(let[s,a]of i)t[s.toString()]=a.toJson(e);break;case"enum":let o=r.V.T;for(let[s,a]of i)t[s.toString()]=CT(o,a,e.enumAsInteger);break}return e.emitDefaultValues||i.length>0?t:void 0}if(r.repeated){Dt(Array.isArray(n));let t=[];switch(r.kind){case"scalar":for(let i=0;i<n.length;i++)t.push(aE(r.T,n[i]));break;case"enum":for(let i=0;i<n.length;i++)t.push(CT(r.T,n[i],e.enumAsInteger));break;case"message":for(let i=0;i<n.length;i++)t.push(n[i].toJson(e));break}return e.emitDefaultValues||t.length>0?t:void 0}switch(r.kind){case"scalar":return aE(r.T,n);case"enum":return CT(r.T,n,e.enumAsInteger);case"message":return oE(r.T,n).toJson(e)}}function CT(r,n,e){var t;if(Dt(typeof n=="number"),r.typeName=="google.protobuf.NullValue")return null;if(e)return n;let i=r.findNumber(n);return(t=i?.name)!==null&&t!==void 0?t:n}function aE(r,n){switch(r){case j.INT32:case j.SFIXED32:case j.SINT32:case j.FIXED32:case j.UINT32:return Dt(typeof n=="number"),n;case j.FLOAT:case j.DOUBLE:return Dt(typeof n=="number"),Number.isNaN(n)?"NaN":n===Number.POSITIVE_INFINITY?"Infinity":n===Number.NEGATIVE_INFINITY?"-Infinity":n;case j.STRING:return Dt(typeof n=="string"),n;case j.BOOL:return Dt(typeof n=="boolean"),n;case j.UINT64:case j.FIXED64:case j.INT64:case j.SFIXED64:case j.SINT64:return Dt(typeof n=="bigint"||typeof n=="string"||typeof n=="number"),n.toString();case j.BYTES:return Dt(n instanceof Uint8Array),ST.enc(n)}}var d2,u2,lE,sE,g2=_(()=>{ia();oa();o2();nE();c2();bT();TT();aa();aa();sa();hf();d2={ignoreUnknownFields:!1},u2={emitDefaultValues:!1,enumAsInteger:!1,useProtoFieldName:!1,prettySpaces:0};lE=Symbol(),sE=Symbol()});function P6(r){return r?Object.assign(Object.assign({},h2),r):h2}function C6(r){return r?Object.assign(Object.assign({},I2),r):I2}function S2(){return{makeReadOptions:P6,makeWriteOptions:C6,listUnknownFields(r){var n;return(n=r[eu])!==null&&n!==void 0?n:[]},discardUnknownFields(r){delete r[eu]},writeUnknownFields(r,n){let t=r[eu];if(t)for(let i of t)n.tag(i.no,i.wireType).raw(i.data)},onUnknownField(r,n,e,t){let i=r;Array.isArray(i[eu])||(i[eu]=[]),i[eu].push({no:n,wireType:e,data:t})},readMessage(r,n,e,t,i){let o=r.getType(),s=i?n.len:n.pos+e,a,l;for(;n.pos<s&&([a,l]=n.tag(),!(i===!0&&l==on.EndGroup));){let c=o.fields.find(a);if(!c){let u=n.skip(l,a);t.readUnknownFields&&this.onUnknownField(r,a,l,u);continue}v2(r,n,c,l,t)}if(i&&(l!=on.EndGroup||a!==e))throw new Error("invalid end group tag")},readField:v2,writeMessage(r,n,e){let t=r.getType();for(let i of t.fields.byNumber()){if(!iE(i,r)){if(i.req)throw new Error(`cannot encode field ${t.typeName}.${i.name} to binary: required field not set`);continue}let o=i.oneof?r[i.oneof.localName].value:r[i.localName];E2(i,o,n,e)}return e.writeUnknownFields&&this.writeUnknownFields(r,n),n},writeField(r,n,e,t){n!==void 0&&E2(r,n,e,t)}}}function v2(r,n,e,t,i){let{repeated:o,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"?j.INT32:e.T,l=dE;if(e.kind=="scalar"&&e.L>0&&(l=R6),o){let m=r[s];if(t==on.LengthDelimited&&a!=j.STRING&&a!=j.BYTES){let E=n.uint32()+n.pos;for(;n.pos<E;)m.push(l(n,a))}else m.push(l(n,a))}else r[s]=l(n,a);break;case"message":let c=e.T;o?r[s].push(cE(n,new c,i,e)):Kr(r[s])?cE(n,r[s],i,e):(r[s]=cE(n,new c,i,e),c.fieldWrapper&&!e.oneof&&!e.repeated&&(r[s]=c.fieldWrapper.unwrapField(r[s])));break;case"map":let[u,p]=A6(e,n,i);r[s][u]=p;break}}function cE(r,n,e,t){let i=n.getType().runtime.bin,o=t?.delimited;return i.readMessage(n,r,o?t.no:r.uint32(),e,o),n}function A6(r,n,e){let t=n.uint32(),i=n.pos+t,o,s;for(;n.pos<i;){let[a]=n.tag();switch(a){case 1:o=dE(n,r.K);break;case 2:switch(r.V.kind){case"scalar":s=dE(n,r.V.T);break;case"enum":s=n.int32();break;case"message":s=cE(n,new r.V.T,e,void 0);break}break}}if(o===void 0&&(o=Ni(r.K,ki.BIGINT)),typeof o!="string"&&typeof o!="number"&&(o=o.toString()),s===void 0)switch(r.V.kind){case"scalar":s=Ni(r.V.T,ki.BIGINT);break;case"enum":s=r.V.T.values[0].no;break;case"message":s=new r.V.T;break}return[o,s]}function R6(r,n){let e=dE(r,n);return typeof e=="bigint"?e.toString():e}function dE(r,n){switch(n){case j.STRING:return r.string();case j.BOOL:return r.bool();case j.DOUBLE:return r.double();case j.FLOAT:return r.float();case j.INT32:return r.int32();case j.INT64:return r.int64();case j.UINT64:return r.uint64();case j.FIXED64:return r.fixed64();case j.BYTES:return r.bytes();case j.FIXED32:return r.fixed32();case j.SFIXED32:return r.sfixed32();case j.SFIXED64:return r.sfixed64();case j.SINT64:return r.sint64();case j.UINT32:return r.uint32();case j.SINT32:return r.sint32()}}function E2(r,n,e,t){Dt(n!==void 0);let i=r.repeated;switch(r.kind){case"scalar":case"enum":let o=r.kind=="enum"?j.INT32:r.T;if(i)if(Dt(Array.isArray(n)),r.packed)D6(e,o,r.no,n);else for(let s of n)vf(e,o,r.no,s);else vf(e,o,r.no,n);break;case"message":if(i){Dt(Array.isArray(n));for(let s of n)y2(e,t,r,s)}else y2(e,t,r,n);break;case"map":Dt(typeof n=="object"&&n!=null);for(let[s,a]of Object.entries(n))x6(e,t,r,s,a);break}}function x6(r,n,e,t,i){r.tag(e.no,on.LengthDelimited),r.fork();let o=t;switch(e.K){case j.INT32:case j.FIXED32:case j.UINT32:case j.SFIXED32:case j.SINT32:o=Number.parseInt(t);break;case j.BOOL:Dt(t=="true"||t=="false"),o=t=="true";break}switch(vf(r,e.K,1,o),e.V.kind){case"scalar":vf(r,e.V.T,2,i);break;case"enum":vf(r,j.INT32,2,i);break;case"message":Dt(i!==void 0),r.tag(2,on.LengthDelimited).bytes(i.toBinary(n));break}r.join()}function y2(r,n,e,t){let i=oE(e.T,t);e.delimited?r.tag(e.no,on.StartGroup).raw(i.toBinary(n)).tag(e.no,on.EndGroup):r.tag(e.no,on.LengthDelimited).bytes(i.toBinary(n))}function vf(r,n,e,t){Dt(t!==void 0);let[i,o]=_2(n);r.tag(e,i)[o](t)}function D6(r,n,e,t){if(!t.length)return;r.tag(e,on.LengthDelimited).fork();let[,i]=_2(n);for(let o=0;o<t.length;o++)r[i](t[o]);r.join()}function _2(r){let n=on.Varint;switch(r){case j.BYTES:case j.STRING:n=on.LengthDelimited;break;case j.DOUBLE:case j.FIXED64:case j.SFIXED64:n=on.Bit64;break;case j.FIXED32:case j.SFIXED32:case j.FLOAT:n=on.Bit32;break}let e=j[r].toLowerCase();return[n,e]}var eu,h2,I2,w2=_(()=>{n2();TT();aa();ia();bT();sa();hf();eu=Symbol("@bufbuild/protobuf/unknown-fields"),h2={readUnknownFields:!0,readerFactory:r=>new eE(r)},I2={writeUnknownFields:!0,writerFactory:()=>new Zv}});function b2(){return{setEnumType:mT,initPartial(r,n){if(r===void 0)return;let e=n.getType();for(let t of e.fields.byMember()){let i=t.localName,o=n,s=r;if(s[i]!=null)switch(t.kind){case"oneof":let a=s[i].case;if(a===void 0)continue;let l=t.findField(a),c=s[i].value;l&&l.kind=="message"&&!Kr(c,l.T)?c=new l.T(c):l&&l.kind==="scalar"&&l.T===j.BYTES&&(c=Ef(c)),o[i]={case:a,value:c};break;case"scalar":case"enum":let u=s[i];t.T===j.BYTES&&(u=t.repeated?u.map(Ef):Ef(u)),o[i]=u;break;case"map":switch(t.V.kind){case"scalar":case"enum":if(t.V.T===j.BYTES)for(let[h,E]of Object.entries(s[i]))o[i][h]=Ef(E);else Object.assign(o[i],s[i]);break;case"message":let m=t.V.T;for(let h of Object.keys(s[i])){let E=s[i][h];m.fieldWrapper||(E=new m(E)),o[i][h]=E}break}break;case"message":let p=t.T;if(t.repeated)o[i]=s[i].map(m=>Kr(m,p)?m:new p(m));else{let m=s[i];p.fieldWrapper?p.typeName==="google.protobuf.BytesValue"?o[i]=Ef(m):o[i]=m:o[i]=Kr(m,p)?m:new p(m)}break}}},equals(r,n,e){return n===e?!0:!n||!e?!1:r.fields.byMember().every(t=>{let i=n[t.localName],o=e[t.localName];if(t.repeated){if(i.length!==o.length)return!1;switch(t.kind){case"message":return i.every((s,a)=>t.T.equals(s,o[a]));case"scalar":return i.every((s,a)=>ss(t.T,s,o[a]));case"enum":return i.every((s,a)=>ss(j.INT32,s,o[a]))}throw new Error(`repeated cannot contain ${t.kind}`)}switch(t.kind){case"message":let s=i,a=o;return t.T.fieldWrapper&&(s!==void 0&&!Kr(s)&&(s=t.T.fieldWrapper.wrapField(s)),a!==void 0&&!Kr(a)&&(a=t.T.fieldWrapper.wrapField(a))),t.T.equals(s,a);case"enum":return ss(j.INT32,i,o);case"scalar":return ss(t.T,i,o);case"oneof":if(i.case!==o.case)return!1;let l=t.findField(i.case);if(l===void 0)return!0;switch(l.kind){case"message":return l.T.equals(i.value,o.value);case"enum":return ss(j.INT32,i.value,o.value);case"scalar":return ss(l.T,i.value,o.value)}throw new Error(`oneof cannot contain ${l.kind}`);case"map":let c=Object.keys(i).concat(Object.keys(o));switch(t.V.kind){case"message":let u=t.V.T;return c.every(m=>u.equals(i[m],o[m]));case"enum":return c.every(m=>ss(j.INT32,i[m],o[m]));case"scalar":let p=t.V.T;return c.every(m=>ss(p,i[m],o[m]))}break}})},clone(r){let n=r.getType(),e=new n,t=e;for(let i of n.fields.byMember()){let o=r[i.localName],s;if(i.repeated)s=o.map(uE);else if(i.kind=="map"){s=t[i.localName];for(let[a,l]of Object.entries(o))s[a]=uE(l)}else i.kind=="oneof"?s=i.findField(o.case)?{case:o.case,value:uE(o.value)}:{case:void 0}:s=uE(o);t[i.localName]=s}for(let i of n.runtime.bin.listUnknownFields(r))n.runtime.bin.onUnknownField(t,i.no,i.wireType,i.data);return e}}}function uE(r){if(r===void 0)return r;if(Kr(r))return r.clone();if(r instanceof Uint8Array){let n=new Uint8Array(r.byteLength);return n.set(r),n}return r}function Ef(r){return r instanceof Uint8Array?r:new Uint8Array(r)}var T2=_(()=>{gT();aa();sa();hf()});function pE(r,n,e){return{syntax:r,json:f2(),bin:S2(),util:Object.assign(Object.assign({},b2()),{newFieldList:n,initFields:e}),makeMessageType(t,i,o){return YM(this,t,i,o)},makeEnum:jM,makeEnumType:fT,getEnumType:KM,makeExtension(t,i,o){return r2(this,t,i,o)}}}var AT=_(()=>{gT();QM();nE();g2();w2();T2()});var tu,RT=_(()=>{tu=class{constructor(n,e){this._fields=n,this._normalizer=e}findJsonName(n){if(!this.jsonNames){let e={};for(let t of this.list())e[t.jsonName]=e[t.name]=t;this.jsonNames=e}return this.jsonNames[n]}find(n){if(!this.numbers){let e={};for(let t of this.list())e[t.no]=t;this.numbers=e}return this.numbers[n]}list(){return this.all||(this.all=this._normalizer(this._fields)),this.all}byNumber(){return this.numbersAsc||(this.numbersAsc=this.list().concat().sort((n,e)=>n.no-e.no)),this.numbersAsc}byMember(){if(!this.members){this.members=[];let n=this.members,e;for(let t of this.list())t.oneof?t.oneof!==e&&(e=t.oneof,n.push(e)):n.push(t)}return this.members}}});function xT(r,n){let e=A2(r);return n?e:L6(N6(e))}function P2(r){return xT(r,!1)}function A2(r){let n=!1,e=[];for(let t=0;t<r.length;t++){let i=r.charAt(t);switch(i){case"_":n=!0;break;case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":e.push(i),n=!1;break;default:n&&(n=!1,i=i.toUpperCase()),e.push(i);break}}return e.join("")}var C2,O6,k6,R2,N6,L6,DT=_(()=>{C2=A2;O6=new Set(["constructor","toString","toJSON","valueOf"]),k6=new Set(["getType","clone","equals","fromBinary","fromJson","fromJsonString","toBinary","toJson","toJsonString","toObject"]),R2=r=>`${r}$`,N6=r=>k6.has(r)?R2(r):r,L6=r=>O6.has(r)?R2(r):r});var mE,x2=_(()=>{DT();ia();mE=class{constructor(n){this.kind="oneof",this.repeated=!1,this.packed=!1,this.opt=!1,this.req=!1,this.default=void 0,this.fields=[],this.name=n,this.localName=P2(n)}addField(n){Dt(n.oneof===this,`field ${n.name} not one of ${this.name}`),this.fields.push(n)}findField(n){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[n]}}});function fE(r,n){var e,t,i,o,s,a;let l=[],c;for(let u of typeof r=="function"?r():r){let p=u;if(p.localName=xT(u.name,u.oneof!==void 0),p.jsonName=(e=u.jsonName)!==null&&e!==void 0?e:C2(u.name),p.repeated=(t=u.repeated)!==null&&t!==void 0?t:!1,u.kind=="scalar"&&(p.L=(i=u.L)!==null&&i!==void 0?i:ki.BIGINT),p.delimited=(o=u.delimited)!==null&&o!==void 0?o:!1,p.req=(s=u.req)!==null&&s!==void 0?s:!1,p.opt=(a=u.opt)!==null&&a!==void 0?a:!1,u.packed===void 0&&(n?p.packed=u.kind=="enum"||u.kind=="scalar"&&u.T!=j.BYTES&&u.T!=j.STRING:p.packed=!1),u.oneof!==void 0){let m=typeof u.oneof=="string"?u.oneof:u.oneof.name;(!c||c.name!=m)&&(c=new mE(m)),p.oneof=c,c.addField(p)}l.push(p)}return l}var OT=_(()=>{x2();DT();sa()});var d,ai=_(()=>{AT();RT();aa();OT();d=pE("proto3",r=>new tu(r,n=>fE(n,!0)),r=>{for(let n of r.getType().fields.byMember()){if(n.opt)continue;let e=n.localName,t=r;if(n.repeated){t[e]=[];continue}switch(n.kind){case"oneof":t[e]={case:void 0};break;case"enum":t[e]=0;break;case"map":t[e]={};break;case"scalar":t[e]=Ni(n.T,n.L);break;case"message":break}}})});var N,kT=_(()=>{AT();RT();OT();N=pE("proto2",r=>new tu(r,n=>fE(n,!1)),r=>{for(let n of r.getType().fields.byMember()){let e=n.localName,t=r;if(n.repeated){t[e]=[];continue}switch(n.kind){case"oneof":t[e]={case:void 0};break;case"map":t[e]={};break;case"scalar":case"enum":case"message":break}}})});var Li,yf,ls,fl,nu,ru,iu,Sf,ou,la,gE,hE,su,gl,au,lu,cu,du,uu,_f,pu,mu,wf,bf,IE,vE,fu,hl,gu,hu,Iu,vu,Eu,Tf,Mr,yu,or,EE,yE,SE,_E,wE,bE,Pf,Su,_u,wu,Il,bu,TE,NT=_(()=>{kT();ir();(function(r){r[r.EDITION_UNKNOWN=0]="EDITION_UNKNOWN",r[r.EDITION_LEGACY=900]="EDITION_LEGACY",r[r.EDITION_PROTO2=998]="EDITION_PROTO2",r[r.EDITION_PROTO3=999]="EDITION_PROTO3",r[r.EDITION_2023=1e3]="EDITION_2023",r[r.EDITION_2024=1001]="EDITION_2024",r[r.EDITION_1_TEST_ONLY=1]="EDITION_1_TEST_ONLY",r[r.EDITION_2_TEST_ONLY=2]="EDITION_2_TEST_ONLY",r[r.EDITION_99997_TEST_ONLY=99997]="EDITION_99997_TEST_ONLY",r[r.EDITION_99998_TEST_ONLY=99998]="EDITION_99998_TEST_ONLY",r[r.EDITION_99999_TEST_ONLY=99999]="EDITION_99999_TEST_ONLY",r[r.EDITION_MAX=2147483647]="EDITION_MAX"})(Li||(Li={}));N.util.setEnumType(Li,"google.protobuf.Edition",[{no:0,name:"EDITION_UNKNOWN"},{no:900,name:"EDITION_LEGACY"},{no:998,name:"EDITION_PROTO2"},{no:999,name:"EDITION_PROTO3"},{no:1e3,name:"EDITION_2023"},{no:1001,name:"EDITION_2024"},{no:1,name:"EDITION_1_TEST_ONLY"},{no:2,name:"EDITION_2_TEST_ONLY"},{no:99997,name:"EDITION_99997_TEST_ONLY"},{no:99998,name:"EDITION_99998_TEST_ONLY"},{no:99999,name:"EDITION_99999_TEST_ONLY"},{no:2147483647,name:"EDITION_MAX"}]);yf=class r extends b{constructor(n){super(),this.file=[],N.util.initPartial(n,this)}static fromBinary(n,e){return new r().fromBinary(n,e)}static fromJson(n,e){return new r().fromJson(n,e)}static fromJsonString(n,e){return new r().fromJsonString(n,e)}static equals(n,e){return N.util.equals(r,n,e)}};yf.runtime=N;yf.typeName="google.protobuf.FileDescriptorSet";yf.fields=N.util.newFieldList(()=>[{no:1,name:"file",kind:"message",T:ls,repeated:!0}]);ls=class r extends b{constructor(n){super(),this.dependency=[],this.publicDependency=[],this.weakDependency=[],this.messageType=[],this.enumType=[],this.service=[],this.extension=[],N.util.initPartial(n,this)}static fromBinary(n,e){return new r().fromBinary(n,e)}static fromJson(n,e){return new r().fromJson(n,e)}static fromJsonString(n,e){return new r().fromJsonString(n,e)}static equals(n,e){return N.util.equals(r,n,e)}};ls.runtime=N;ls.typeName="google.protobuf.FileDescriptorProto";ls.fields=N.util.newFieldList(()=>[{no:1,name:"name",kind:"scalar",T:9,opt:!0},{no:2,name:"package",kind:"scalar",T:9,opt:!0},{no:3,name:"dependency",kind:"scalar",T:9,repeated:!0},{no:10,name:"public_dependency",kind:"scalar",T:5,repeated:!0},{no:11,name:"weak_dependency",kind:"scalar",T:5,repeated:!0},{no:4,name:"message_type",kind:"message",T:fl,repeated:!0},{no:5,name:"enum_type",kind:"message",T:gl,repeated:!0},{no:6,name:"service",kind:"message",T:cu,repeated:!0},{no:7,name:"extension",kind:"message",T:la,repeated:!0},{no:8,name:"options",kind:"message",T:uu,opt:!0},{no:9,name:"source_code_info",kind:"message",T:_u,opt:!0},{no:12,name:"syntax",kind:"scalar",T:9,opt:!0},{no:14,name:"edition",kind:"enum",T:N.getEnumType(Li),opt:!0}]);fl=class r extends b{constructor(n){super(),this.field=[],this.extension=[],this.nestedType=[],this.enumType=[],this.extensionRange=[],this.oneofDecl=[],this.reservedRange=[],this.reservedName=[],N.util.initPartial(n,this)}static fromBinary(n,e){return new r().fromBinary(n,e)}static fromJson(n,e){return new r().fromJson(n,e)}static fromJsonString(n,e){return new r().fromJsonString(n,e)}static equals(n,e){return N.util.equals(r,n,e)}};fl.runtime=N;fl.typeName="google.protobuf.DescriptorProto";fl.fields=N.util.newFieldList(()=>[{no:1,name:"name",kind:"scalar",T:9,opt:!0},{no:2,name:"field",kind:"message",T:la,repeated:!0},{no:6,name:"extension",kind:"message",T:la,repeated:!0},{no:3,name:"nested_type",kind:"message",T:fl,repeated:!0},{no:4,name:"enum_type",kind:"message",T:gl,repeated:!0},{no:5,name:"extension_range",kind:"message",T:nu,repeated:!0},{no:8,name:"oneof_decl",kind:"message",T:su,repeated:!0},{no:7,name:"options",kind:"message",T:pu,opt:!0},{no:9,name:"reserved_range",kind:"message",T:ru,repeated:!0},{no:10,name:"reserved_name",kind:"scalar",T:9,repeated:!0}]);nu=class r extends b{constructor(n){super(),N.util.initPartial(n,this)}static fromBinary(n,e){return new r().fromBinary(n,e)}static fromJson(n,e){return new r().fromJson(n,e)}static fromJsonString(n,e){return new r().fromJsonString(n,e)}static equals(n,e){return N.util.equals(r,n,e)}};nu.runtime=N;nu.typeName="google.protobuf.DescriptorProto.ExtensionRange";nu.fields=N.util.newFieldList(()=>[{no:1,name:"start",kind:"scalar",T:5,opt:!0},{no:2,name:"end",kind:"scalar",T:5,opt:!0},{no:3,name:"options",kind:"message",T:iu,opt:!0}]);ru=class r extends b{constructor(n){super(),N.util.initPartial(n,this)}static fromBinary(n,e){return new r().fromBinary(n,e)}static fromJson(n,e){return new r().fromJson(n,e)}static fromJsonString(n,e){return new r().fromJsonString(n,e)}static equals(n,e){return N.util.equals(r,n,e)}};ru.runtime=N;ru.typeName="google.protobuf.DescriptorProto.ReservedRange";ru.fields=N.util.newFieldList(()=>[{no:1,name:"start",kind:"scalar",T:5,opt:!0},{no:2,name:"end",kind:"scalar",T:5,opt:!0}]);iu=class r extends b{constructor(n){super(),this.uninterpretedOption=[],this.declaration=[],N.util.initPartial(n,this)}static fromBinary(n,e){return new r().fromBinary(n,e)}static fromJson(n,e){return new r().fromJson(n,e)}static fromJsonString(n,e){return new r().fromJsonString(n,e)}static equals(n,e){return N.util.equals(r,n,e)}};iu.runtime=N;iu.typeName="google.protobuf.ExtensionRangeOptions";iu.fields=N.util.newFieldList(()=>[{no:999,name:"uninterpreted_option",kind:"message",T:Mr,repeated:!0},{no:2,name:"declaration",kind:"message",T:ou,repeated:!0},{no:50,name:"features",kind:"message",T:or,opt:!0},{no:3,name:"verification",kind:"enum",T:N.getEnumType(Sf),opt:!0,default:Sf.UNVERIFIED}]);(function(r){r[r.DECLARATION=0]="DECLARATION",r[r.UNVERIFIED=1]="UNVERIFIED"})(Sf||(Sf={}));N.util.setEnumType(Sf,"google.protobuf.ExtensionRangeOptions.VerificationState",[{no:0,name:"DECLARATION"},{no:1,name:"UNVERIFIED"}]);ou=class r extends b{constructor(n){super(),N.util.initPartial(n,this)}static fromBinary(n,e){return new r().fromBinary(n,e)}static fromJson(n,e){return new r().fromJson(n,e)}static fromJsonString(n,e){return new r().fromJsonString(n,e)}static equals(n,e){return N.util.equals(r,n,e)}};ou.runtime=N;ou.typeName="google.protobuf.ExtensionRangeOptions.Declaration";ou.fields=N.util.newFieldList(()=>[{no:1,name:"number",kind:"scalar",T:5,opt:!0},{no:2,name:"full_name",kind:"scalar",T:9,opt:!0},{no:3,name:"type",kind:"scalar",T:9,opt:!0},{no:5,name:"reserved",kind:"scalar",T:8,opt:!0},{no:6,name:"repeated",kind:"scalar",T:8,opt:!0}]);la=class r extends b{constructor(n){super(),N.util.initPartial(n,this)}static fromBinary(n,e){return new r().fromBinary(n,e)}static fromJson(n,e){return new r().fromJson(n,e)}static fromJsonString(n,e){return new r().fromJsonString(n,e)}static equals(n,e){return N.util.equals(r,n,e)}};la.runtime=N;la.typeName="google.protobuf.FieldDescriptorProto";la.fields=N.util.newFieldList(()=>[{no:1,name:"name",kind:"scalar",T:9,opt:!0},{no:3,name:"number",kind:"scalar",T:5,opt:!0},{no:4,name:"label",kind:"enum",T:N.getEnumType(hE),opt:!0},{no:5,name:"type",kind:"enum",T:N.getEnumType(gE),opt:!0},{no:6,name:"type_name",kind:"scalar",T:9,opt:!0},{no:2,name:"extendee",kind:"scalar",T:9,opt:!0},{no:7,name:"default_value",kind:"scalar",T:9,opt:!0},{no:9,name:"oneof_index",kind:"scalar",T:5,opt:!0},{no:10,name:"json_name",kind:"scalar",T:9,opt:!0},{no:8,name:"options",kind:"message",T:mu,opt:!0},{no:17,name:"proto3_optional",kind:"scalar",T:8,opt:!0}]);(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.GROUP=10]="GROUP",r[r.MESSAGE=11]="MESSAGE",r[r.BYTES=12]="BYTES",r[r.UINT32=13]="UINT32",r[r.ENUM=14]="ENUM",r[r.SFIXED32=15]="SFIXED32",r[r.SFIXED64=16]="SFIXED64",r[r.SINT32=17]="SINT32",r[r.SINT64=18]="SINT64"})(gE||(gE={}));N.util.setEnumType(gE,"google.protobuf.FieldDescriptorProto.Type",[{no:1,name:"TYPE_DOUBLE"},{no:2,name:"TYPE_FLOAT"},{no:3,name:"TYPE_INT64"},{no:4,name:"TYPE_UINT64"},{no:5,name:"TYPE_INT32"},{no:6,name:"TYPE_FIXED64"},{no:7,name:"TYPE_FIXED32"},{no:8,name:"TYPE_BOOL"},{no:9,name:"TYPE_STRING"},{no:10,name:"TYPE_GROUP"},{no:11,name:"TYPE_MESSAGE"},{no:12,name:"TYPE_BYTES"},{no:13,name:"TYPE_UINT32"},{no:14,name:"TYPE_ENUM"},{no:15,name:"TYPE_SFIXED32"},{no:16,name:"TYPE_SFIXED64"},{no:17,name:"TYPE_SINT32"},{no:18,name:"TYPE_SINT64"}]);(function(r){r[r.OPTIONAL=1]="OPTIONAL",r[r.REPEATED=3]="REPEATED",r[r.REQUIRED=2]="REQUIRED"})(hE||(hE={}));N.util.setEnumType(hE,"google.protobuf.FieldDescriptorProto.Label",[{no:1,name:"LABEL_OPTIONAL"},{no:3,name:"LABEL_REPEATED"},{no:2,name:"LABEL_REQUIRED"}]);su=class r extends b{constructor(n){super(),N.util.initPartial(n,this)}static fromBinary(n,e){return new r().fromBinary(n,e)}static fromJson(n,e){return new r().fromJson(n,e)}static fromJsonString(n,e){return new r().fromJsonString(n,e)}static equals(n,e){return N.util.equals(r,n,e)}};su.runtime=N;su.typeName="google.protobuf.OneofDescriptorProto";su.fields=N.util.newFieldList(()=>[{no:1,name:"name",kind:"scalar",T:9,opt:!0},{no:2,name:"options",kind:"message",T:gu,opt:!0}]);gl=class r extends b{constructor(n){super(),this.value=[],this.reservedRange=[],this.reservedName=[],N.util.initPartial(n,this)}static fromBinary(n,e){return new r().fromBinary(n,e)}static fromJson(n,e){return new r().fromJson(n,e)}static fromJsonString(n,e){return new r().fromJsonString(n,e)}static equals(n,e){return N.util.equals(r,n,e)}};gl.runtime=N;gl.typeName="google.protobuf.EnumDescriptorProto";gl.fields=N.util.newFieldList(()=>[{no:1,name:"name",kind:"scalar",T:9,opt:!0},{no:2,name:"value",kind:"message",T:lu,repeated:!0},{no:3,name:"options",kind:"message",T:hu,opt:!0},{no:4,name:"reserved_range",kind:"message",T:au,repeated:!0},{no:5,name:"reserved_name",kind:"scalar",T:9,repeated:!0}]);au=class r extends b{constructor(n){super(),N.util.initPartial(n,this)}static fromBinary(n,e){return new r().fromBinary(n,e)}static fromJson(n,e){return new r().fromJson(n,e)}static fromJsonString(n,e){return new r().fromJsonString(n,e)}static equals(n,e){return N.util.equals(r,n,e)}};au.runtime=N;au.typeName="google.protobuf.EnumDescriptorProto.EnumReservedRange";au.fields=N.util.newFieldList(()=>[{no:1,name:"start",kind:"scalar",T:5,opt:!0},{no:2,name:"end",kind:"scalar",T:5,opt:!0}]);lu=class r extends b{constructor(n){super(),N.util.initPartial(n,this)}static fromBinary(n,e){return new r().fromBinary(n,e)}static fromJson(n,e){return new r().fromJson(n,e)}static fromJsonString(n,e){return new r().fromJsonString(n,e)}static equals(n,e){return N.util.equals(r,n,e)}};lu.runtime=N;lu.typeName="google.protobuf.EnumValueDescriptorProto";lu.fields=N.util.newFieldList(()=>[{no:1,name:"name",kind:"scalar",T:9,opt:!0},{no:2,name:"number",kind:"scalar",T:5,opt:!0},{no:3,name:"options",kind:"message",T:Iu,opt:!0}]);cu=class r extends b{constructor(n){super(),this.method=[],N.util.initPartial(n,this)}static fromBinary(n,e){return new r().fromBinary(n,e)}static fromJson(n,e){return new r().fromJson(n,e)}static fromJsonString(n,e){return new r().fromJsonString(n,e)}static equals(n,e){return N.util.equals(r,n,e)}};cu.runtime=N;cu.typeName="google.protobuf.ServiceDescriptorProto";cu.fields=N.util.newFieldList(()=>[{no:1,name:"name",kind:"scalar",T:9,opt:!0},{no:2,name:"method",kind:"message",T:du,repeated:!0},{no:3,name:"options",kind:"message",T:vu,opt:!0}]);du=class r extends b{constructor(n){super(),N.util.initPartial(n,this)}static fromBinary(n,e){return new r().fromBinary(n,e)}static fromJson(n,e){return new r().fromJson(n,e)}static fromJsonString(n,e){return new r().fromJsonString(n,e)}static equals(n,e){return N.util.equals(r,n,e)}};du.runtime=N;du.typeName="google.protobuf.MethodDescriptorProto";du.fields=N.util.newFieldList(()=>[{no:1,name:"name",kind:"scalar",T:9,opt:!0},{no:2,name:"input_type",kind:"scalar",T:9,opt:!0},{no:3,name:"output_type",kind:"scalar",T:9,opt:!0},{no:4,name:"options",kind:"message",T:Eu,opt:!0},{no:5,name:"client_streaming",kind:"scalar",T:8,opt:!0,default:!1},{no:6,name:"server_streaming",kind:"scalar",T:8,opt:!0,default:!1}]);uu=class r extends b{constructor(n){super(),this.uninterpretedOption=[],N.util.initPartial(n,this)}static fromBinary(n,e){return new r().fromBinary(n,e)}static fromJson(n,e){return new r().fromJson(n,e)}static fromJsonString(n,e){return new r().fromJsonString(n,e)}static equals(n,e){return N.util.equals(r,n,e)}};uu.runtime=N;uu.typeName="google.protobuf.FileOptions";uu.fields=N.util.newFieldList(()=>[{no:1,name:"java_package",kind:"scalar",T:9,opt:!0},{no:8,name:"java_outer_classname",kind:"scalar",T:9,opt:!0},{no:10,name:"java_multiple_files",kind:"scalar",T:8,opt:!0,default:!1},{no:20,name:"java_generate_equals_and_hash",kind:"scalar",T:8,opt:!0},{no:27,name:"java_string_check_utf8",kind:"scalar",T:8,opt:!0,default:!1},{no:9,name:"optimize_for",kind:"enum",T:N.getEnumType(_f),opt:!0,default:_f.SPEED},{no:11,name:"go_package",kind:"scalar",T:9,opt:!0},{no:16,name:"cc_generic_services",kind:"scalar",T:8,opt:!0,default:!1},{no:17,name:"java_generic_services",kind:"scalar",T:8,opt:!0,default:!1},{no:18,name:"py_generic_services",kind:"scalar",T:8,opt:!0,default:!1},{no:23,name:"deprecated",kind:"scalar",T:8,opt:!0,default:!1},{no:31,name:"cc_enable_arenas",kind:"scalar",T:8,opt:!0,default:!0},{no:36,name:"objc_class_prefix",kind:"scalar",T:9,opt:!0},{no:37,name:"csharp_namespace",kind:"scalar",T:9,opt:!0},{no:39,name:"swift_prefix",kind:"scalar",T:9,opt:!0},{no:40,name:"php_class_prefix",kind:"scalar",T:9,opt:!0},{no:41,name:"php_namespace",kind:"scalar",T:9,opt:!0},{no:44,name:"php_metadata_namespace",kind:"scalar",T:9,opt:!0},{no:45,name:"ruby_package",kind:"scalar",T:9,opt:!0},{no:50,name:"features",kind:"message",T:or,opt:!0},{no:999,name:"uninterpreted_option",kind:"message",T:Mr,repeated:!0}]);(function(r){r[r.SPEED=1]="SPEED",r[r.CODE_SIZE=2]="CODE_SIZE",r[r.LITE_RUNTIME=3]="LITE_RUNTIME"})(_f||(_f={}));N.util.setEnumType(_f,"google.protobuf.FileOptions.OptimizeMode",[{no:1,name:"SPEED"},{no:2,name:"CODE_SIZE"},{no:3,name:"LITE_RUNTIME"}]);pu=class r extends b{constructor(n){super(),this.uninterpretedOption=[],N.util.initPartial(n,this)}static fromBinary(n,e){return new r().fromBinary(n,e)}static fromJson(n,e){return new r().fromJson(n,e)}static fromJsonString(n,e){return new r().fromJsonString(n,e)}static equals(n,e){return N.util.equals(r,n,e)}};pu.runtime=N;pu.typeName="google.protobuf.MessageOptions";pu.fields=N.util.newFieldList(()=>[{no:1,name:"message_set_wire_format",kind:"scalar",T:8,opt:!0,default:!1},{no:2,name:"no_standard_descriptor_accessor",kind:"scalar",T:8,opt:!0,default:!1},{no:3,name:"deprecated",kind:"scalar",T:8,opt:!0,default:!1},{no:7,name:"map_entry",kind:"scalar",T:8,opt:!0},{no:11,name:"deprecated_legacy_json_field_conflicts",kind:"scalar",T:8,opt:!0},{no:12,name:"features",kind:"message",T:or,opt:!0},{no:999,name:"uninterpreted_option",kind:"message",T:Mr,repeated:!0}]);mu=class r extends b{constructor(n){super(),this.targets=[],this.editionDefaults=[],this.uninterpretedOption=[],N.util.initPartial(n,this)}static fromBinary(n,e){return new r().fromBinary(n,e)}static fromJson(n,e){return new r().fromJson(n,e)}static fromJsonString(n,e){return new r().fromJsonString(n,e)}static equals(n,e){return N.util.equals(r,n,e)}};mu.runtime=N;mu.typeName="google.protobuf.FieldOptions";mu.fields=N.util.newFieldList(()=>[{no:1,name:"ctype",kind:"enum",T:N.getEnumType(wf),opt:!0,default:wf.STRING},{no:2,name:"packed",kind:"scalar",T:8,opt:!0},{no:6,name:"jstype",kind:"enum",T:N.getEnumType(bf),opt:!0,default:bf.JS_NORMAL},{no:5,name:"lazy",kind:"scalar",T:8,opt:!0,default:!1},{no:15,name:"unverified_lazy",kind:"scalar",T:8,opt:!0,default:!1},{no:3,name:"deprecated",kind:"scalar",T:8,opt:!0,default:!1},{no:10,name:"weak",kind:"scalar",T:8,opt:!0,default:!1},{no:16,name:"debug_redact",kind:"scalar",T:8,opt:!0,default:!1},{no:17,name:"retention",kind:"enum",T:N.getEnumType(IE),opt:!0},{no:19,name:"targets",kind:"enum",T:N.getEnumType(vE),repeated:!0},{no:20,name:"edition_defaults",kind:"message",T:fu,repeated:!0},{no:21,name:"features",kind:"message",T:or,opt:!0},{no:22,name:"feature_support",kind:"message",T:hl,opt:!0},{no:999,name:"uninterpreted_option",kind:"message",T:Mr,repeated:!0}]);(function(r){r[r.STRING=0]="STRING",r[r.CORD=1]="CORD",r[r.STRING_PIECE=2]="STRING_PIECE"})(wf||(wf={}));N.util.setEnumType(wf,"google.protobuf.FieldOptions.CType",[{no:0,name:"STRING"},{no:1,name:"CORD"},{no:2,name:"STRING_PIECE"}]);(function(r){r[r.JS_NORMAL=0]="JS_NORMAL",r[r.JS_STRING=1]="JS_STRING",r[r.JS_NUMBER=2]="JS_NUMBER"})(bf||(bf={}));N.util.setEnumType(bf,"google.protobuf.FieldOptions.JSType",[{no:0,name:"JS_NORMAL"},{no:1,name:"JS_STRING"},{no:2,name:"JS_NUMBER"}]);(function(r){r[r.RETENTION_UNKNOWN=0]="RETENTION_UNKNOWN",r[r.RETENTION_RUNTIME=1]="RETENTION_RUNTIME",r[r.RETENTION_SOURCE=2]="RETENTION_SOURCE"})(IE||(IE={}));N.util.setEnumType(IE,"google.protobuf.FieldOptions.OptionRetention",[{no:0,name:"RETENTION_UNKNOWN"},{no:1,name:"RETENTION_RUNTIME"},{no:2,name:"RETENTION_SOURCE"}]);(function(r){r[r.TARGET_TYPE_UNKNOWN=0]="TARGET_TYPE_UNKNOWN",r[r.TARGET_TYPE_FILE=1]="TARGET_TYPE_FILE",r[r.TARGET_TYPE_EXTENSION_RANGE=2]="TARGET_TYPE_EXTENSION_RANGE",r[r.TARGET_TYPE_MESSAGE=3]="TARGET_TYPE_MESSAGE",r[r.TARGET_TYPE_FIELD=4]="TARGET_TYPE_FIELD",r[r.TARGET_TYPE_ONEOF=5]="TARGET_TYPE_ONEOF",r[r.TARGET_TYPE_ENUM=6]="TARGET_TYPE_ENUM",r[r.TARGET_TYPE_ENUM_ENTRY=7]="TARGET_TYPE_ENUM_ENTRY",r[r.TARGET_TYPE_SERVICE=8]="TARGET_TYPE_SERVICE",r[r.TARGET_TYPE_METHOD=9]="TARGET_TYPE_METHOD"})(vE||(vE={}));N.util.setEnumType(vE,"google.protobuf.FieldOptions.OptionTargetType",[{no:0,name:"TARGET_TYPE_UNKNOWN"},{no:1,name:"TARGET_TYPE_FILE"},{no:2,name:"TARGET_TYPE_EXTENSION_RANGE"},{no:3,name:"TARGET_TYPE_MESSAGE"},{no:4,name:"TARGET_TYPE_FIELD"},{no:5,name:"TARGET_TYPE_ONEOF"},{no:6,name:"TARGET_TYPE_ENUM"},{no:7,name:"TARGET_TYPE_ENUM_ENTRY"},{no:8,name:"TARGET_TYPE_SERVICE"},{no:9,name:"TARGET_TYPE_METHOD"}]);fu=class r extends b{constructor(n){super(),N.util.initPartial(n,this)}static fromBinary(n,e){return new r().fromBinary(n,e)}static fromJson(n,e){return new r().fromJson(n,e)}static fromJsonString(n,e){return new r().fromJsonString(n,e)}static equals(n,e){return N.util.equals(r,n,e)}};fu.runtime=N;fu.typeName="google.protobuf.FieldOptions.EditionDefault";fu.fields=N.util.newFieldList(()=>[{no:3,name:"edition",kind:"enum",T:N.getEnumType(Li),opt:!0},{no:2,name:"value",kind:"scalar",T:9,opt:!0}]);hl=class r extends b{constructor(n){super(),N.util.initPartial(n,this)}static fromBinary(n,e){return new r().fromBinary(n,e)}static fromJson(n,e){return new r().fromJson(n,e)}static fromJsonString(n,e){return new r().fromJsonString(n,e)}static equals(n,e){return N.util.equals(r,n,e)}};hl.runtime=N;hl.typeName="google.protobuf.FieldOptions.FeatureSupport";hl.fields=N.util.newFieldList(()=>[{no:1,name:"edition_introduced",kind:"enum",T:N.getEnumType(Li),opt:!0},{no:2,name:"edition_deprecated",kind:"enum",T:N.getEnumType(Li),opt:!0},{no:3,name:"deprecation_warning",kind:"scalar",T:9,opt:!0},{no:4,name:"edition_removed",kind:"enum",T:N.getEnumType(Li),opt:!0}]);gu=class r extends b{constructor(n){super(),this.uninterpretedOption=[],N.util.initPartial(n,this)}static fromBinary(n,e){return new r().fromBinary(n,e)}static fromJson(n,e){return new r().fromJson(n,e)}static fromJsonString(n,e){return new r().fromJsonString(n,e)}static equals(n,e){return N.util.equals(r,n,e)}};gu.runtime=N;gu.typeName="google.protobuf.OneofOptions";gu.fields=N.util.newFieldList(()=>[{no:1,name:"features",kind:"message",T:or,opt:!0},{no:999,name:"uninterpreted_option",kind:"message",T:Mr,repeated:!0}]);hu=class r extends b{constructor(n){super(),this.uninterpretedOption=[],N.util.initPartial(n,this)}static fromBinary(n,e){return new r().fromBinary(n,e)}static fromJson(n,e){return new r().fromJson(n,e)}static fromJsonString(n,e){return new r().fromJsonString(n,e)}static equals(n,e){return N.util.equals(r,n,e)}};hu.runtime=N;hu.typeName="google.protobuf.EnumOptions";hu.fields=N.util.newFieldList(()=>[{no:2,name:"allow_alias",kind:"scalar",T:8,opt:!0},{no:3,name:"deprecated",kind:"scalar",T:8,opt:!0,default:!1},{no:6,name:"deprecated_legacy_json_field_conflicts",kind:"scalar",T:8,opt:!0},{no:7,name:"features",kind:"message",T:or,opt:!0},{no:999,name:"uninterpreted_option",kind:"message",T:Mr,repeated:!0}]);Iu=class r extends b{constructor(n){super(),this.uninterpretedOption=[],N.util.initPartial(n,this)}static fromBinary(n,e){return new r().fromBinary(n,e)}static fromJson(n,e){return new r().fromJson(n,e)}static fromJsonString(n,e){return new r().fromJsonString(n,e)}static equals(n,e){return N.util.equals(r,n,e)}};Iu.runtime=N;Iu.typeName="google.protobuf.EnumValueOptions";Iu.fields=N.util.newFieldList(()=>[{no:1,name:"deprecated",kind:"scalar",T:8,opt:!0,default:!1},{no:2,name:"features",kind:"message",T:or,opt:!0},{no:3,name:"debug_redact",kind:"scalar",T:8,opt:!0,default:!1},{no:4,name:"feature_support",kind:"message",T:hl,opt:!0},{no:999,name:"uninterpreted_option",kind:"message",T:Mr,repeated:!0}]);vu=class r extends b{constructor(n){super(),this.uninterpretedOption=[],N.util.initPartial(n,this)}static fromBinary(n,e){return new r().fromBinary(n,e)}static fromJson(n,e){return new r().fromJson(n,e)}static fromJsonString(n,e){return new r().fromJsonString(n,e)}static equals(n,e){return N.util.equals(r,n,e)}};vu.runtime=N;vu.typeName="google.protobuf.ServiceOptions";vu.fields=N.util.newFieldList(()=>[{no:34,name:"features",kind:"message",T:or,opt:!0},{no:33,name:"deprecated",kind:"scalar",T:8,opt:!0,default:!1},{no:999,name:"uninterpreted_option",kind:"message",T:Mr,repeated:!0}]);Eu=class r extends b{constructor(n){super(),this.uninterpretedOption=[],N.util.initPartial(n,this)}static fromBinary(n,e){return new r().fromBinary(n,e)}static fromJson(n,e){return new r().fromJson(n,e)}static fromJsonString(n,e){return new r().fromJsonString(n,e)}static equals(n,e){return N.util.equals(r,n,e)}};Eu.runtime=N;Eu.typeName="google.protobuf.MethodOptions";Eu.fields=N.util.newFieldList(()=>[{no:33,name:"deprecated",kind:"scalar",T:8,opt:!0,default:!1},{no:34,name:"idempotency_level",kind:"enum",T:N.getEnumType(Tf),opt:!0,default:Tf.IDEMPOTENCY_UNKNOWN},{no:35,name:"features",kind:"message",T:or,opt:!0},{no:999,name:"uninterpreted_option",kind:"message",T:Mr,repeated:!0}]);(function(r){r[r.IDEMPOTENCY_UNKNOWN=0]="IDEMPOTENCY_UNKNOWN",r[r.NO_SIDE_EFFECTS=1]="NO_SIDE_EFFECTS",r[r.IDEMPOTENT=2]="IDEMPOTENT"})(Tf||(Tf={}));N.util.setEnumType(Tf,"google.protobuf.MethodOptions.IdempotencyLevel",[{no:0,name:"IDEMPOTENCY_UNKNOWN"},{no:1,name:"NO_SIDE_EFFECTS"},{no:2,name:"IDEMPOTENT"}]);Mr=class r extends b{constructor(n){super(),this.name=[],N.util.initPartial(n,this)}static fromBinary(n,e){return new r().fromBinary(n,e)}static fromJson(n,e){return new r().fromJson(n,e)}static fromJsonString(n,e){return new r().fromJsonString(n,e)}static equals(n,e){return N.util.equals(r,n,e)}};Mr.runtime=N;Mr.typeName="google.protobuf.UninterpretedOption";Mr.fields=N.util.newFieldList(()=>[{no:2,name:"name",kind:"message",T:yu,repeated:!0},{no:3,name:"identifier_value",kind:"scalar",T:9,opt:!0},{no:4,name:"positive_int_value",kind:"scalar",T:4,opt:!0},{no:5,name:"negative_int_value",kind:"scalar",T:3,opt:!0},{no:6,name:"double_value",kind:"scalar",T:1,opt:!0},{no:7,name:"string_value",kind:"scalar",T:12,opt:!0},{no:8,name:"aggregate_value",kind:"scalar",T:9,opt:!0}]);yu=class r extends b{constructor(n){super(),N.util.initPartial(n,this)}static fromBinary(n,e){return new r().fromBinary(n,e)}static fromJson(n,e){return new r().fromJson(n,e)}static fromJsonString(n,e){return new r().fromJsonString(n,e)}static equals(n,e){return N.util.equals(r,n,e)}};yu.runtime=N;yu.typeName="google.protobuf.UninterpretedOption.NamePart";yu.fields=N.util.newFieldList(()=>[{no:1,name:"name_part",kind:"scalar",T:9,req:!0},{no:2,name:"is_extension",kind:"scalar",T:8,req:!0}]);or=class r extends b{constructor(n){super(),N.util.initPartial(n,this)}static fromBinary(n,e){return new r().fromBinary(n,e)}static fromJson(n,e){return new r().fromJson(n,e)}static fromJsonString(n,e){return new r().fromJsonString(n,e)}static equals(n,e){return N.util.equals(r,n,e)}};or.runtime=N;or.typeName="google.protobuf.FeatureSet";or.fields=N.util.newFieldList(()=>[{no:1,name:"field_presence",kind:"enum",T:N.getEnumType(EE),opt:!0},{no:2,name:"enum_type",kind:"enum",T:N.getEnumType(yE),opt:!0},{no:3,name:"repeated_field_encoding",kind:"enum",T:N.getEnumType(SE),opt:!0},{no:4,name:"utf8_validation",kind:"enum",T:N.getEnumType(_E),opt:!0},{no:5,name:"message_encoding",kind:"enum",T:N.getEnumType(wE),opt:!0},{no:6,name:"json_format",kind:"enum",T:N.getEnumType(bE),opt:!0}]);(function(r){r[r.FIELD_PRESENCE_UNKNOWN=0]="FIELD_PRESENCE_UNKNOWN",r[r.EXPLICIT=1]="EXPLICIT",r[r.IMPLICIT=2]="IMPLICIT",r[r.LEGACY_REQUIRED=3]="LEGACY_REQUIRED"})(EE||(EE={}));N.util.setEnumType(EE,"google.protobuf.FeatureSet.FieldPresence",[{no:0,name:"FIELD_PRESENCE_UNKNOWN"},{no:1,name:"EXPLICIT"},{no:2,name:"IMPLICIT"},{no:3,name:"LEGACY_REQUIRED"}]);(function(r){r[r.ENUM_TYPE_UNKNOWN=0]="ENUM_TYPE_UNKNOWN",r[r.OPEN=1]="OPEN",r[r.CLOSED=2]="CLOSED"})(yE||(yE={}));N.util.setEnumType(yE,"google.protobuf.FeatureSet.EnumType",[{no:0,name:"ENUM_TYPE_UNKNOWN"},{no:1,name:"OPEN"},{no:2,name:"CLOSED"}]);(function(r){r[r.REPEATED_FIELD_ENCODING_UNKNOWN=0]="REPEATED_FIELD_ENCODING_UNKNOWN",r[r.PACKED=1]="PACKED",r[r.EXPANDED=2]="EXPANDED"})(SE||(SE={}));N.util.setEnumType(SE,"google.protobuf.FeatureSet.RepeatedFieldEncoding",[{no:0,name:"REPEATED_FIELD_ENCODING_UNKNOWN"},{no:1,name:"PACKED"},{no:2,name:"EXPANDED"}]);(function(r){r[r.UTF8_VALIDATION_UNKNOWN=0]="UTF8_VALIDATION_UNKNOWN",r[r.VERIFY=2]="VERIFY",r[r.NONE=3]="NONE"})(_E||(_E={}));N.util.setEnumType(_E,"google.protobuf.FeatureSet.Utf8Validation",[{no:0,name:"UTF8_VALIDATION_UNKNOWN"},{no:2,name:"VERIFY"},{no:3,name:"NONE"}]);(function(r){r[r.MESSAGE_ENCODING_UNKNOWN=0]="MESSAGE_ENCODING_UNKNOWN",r[r.LENGTH_PREFIXED=1]="LENGTH_PREFIXED",r[r.DELIMITED=2]="DELIMITED"})(wE||(wE={}));N.util.setEnumType(wE,"google.protobuf.FeatureSet.MessageEncoding",[{no:0,name:"MESSAGE_ENCODING_UNKNOWN"},{no:1,name:"LENGTH_PREFIXED"},{no:2,name:"DELIMITED"}]);(function(r){r[r.JSON_FORMAT_UNKNOWN=0]="JSON_FORMAT_UNKNOWN",r[r.ALLOW=1]="ALLOW",r[r.LEGACY_BEST_EFFORT=2]="LEGACY_BEST_EFFORT"})(bE||(bE={}));N.util.setEnumType(bE,"google.protobuf.FeatureSet.JsonFormat",[{no:0,name:"JSON_FORMAT_UNKNOWN"},{no:1,name:"ALLOW"},{no:2,name:"LEGACY_BEST_EFFORT"}]);Pf=class r extends b{constructor(n){super(),this.defaults=[],N.util.initPartial(n,this)}static fromBinary(n,e){return new r().fromBinary(n,e)}static fromJson(n,e){return new r().fromJson(n,e)}static fromJsonString(n,e){return new r().fromJsonString(n,e)}static equals(n,e){return N.util.equals(r,n,e)}};Pf.runtime=N;Pf.typeName="google.protobuf.FeatureSetDefaults";Pf.fields=N.util.newFieldList(()=>[{no:1,name:"defaults",kind:"message",T:Su,repeated:!0},{no:4,name:"minimum_edition",kind:"enum",T:N.getEnumType(Li),opt:!0},{no:5,name:"maximum_edition",kind:"enum",T:N.getEnumType(Li),opt:!0}]);Su=class r extends b{constructor(n){super(),N.util.initPartial(n,this)}static fromBinary(n,e){return new r().fromBinary(n,e)}static fromJson(n,e){return new r().fromJson(n,e)}static fromJsonString(n,e){return new r().fromJsonString(n,e)}static equals(n,e){return N.util.equals(r,n,e)}};Su.runtime=N;Su.typeName="google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault";Su.fields=N.util.newFieldList(()=>[{no:3,name:"edition",kind:"enum",T:N.getEnumType(Li),opt:!0},{no:4,name:"overridable_features",kind:"message",T:or,opt:!0},{no:5,name:"fixed_features",kind:"message",T:or,opt:!0}]);_u=class r extends b{constructor(n){super(),this.location=[],N.util.initPartial(n,this)}static fromBinary(n,e){return new r().fromBinary(n,e)}static fromJson(n,e){return new r().fromJson(n,e)}static fromJsonString(n,e){return new r().fromJsonString(n,e)}static equals(n,e){return N.util.equals(r,n,e)}};_u.runtime=N;_u.typeName="google.protobuf.SourceCodeInfo";_u.fields=N.util.newFieldList(()=>[{no:1,name:"location",kind:"message",T:wu,repeated:!0}]);wu=class r extends b{constructor(n){super(),this.path=[],this.span=[],this.leadingDetachedComments=[],N.util.initPartial(n,this)}static fromBinary(n,e){return new r().fromBinary(n,e)}static fromJson(n,e){return new r().fromJson(n,e)}static fromJsonString(n,e){return new r().fromJsonString(n,e)}static equals(n,e){return N.util.equals(r,n,e)}};wu.runtime=N;wu.typeName="google.protobuf.SourceCodeInfo.Location";wu.fields=N.util.newFieldList(()=>[{no:1,name:"path",kind:"scalar",T:5,repeated:!0,packed:!0},{no:2,name:"span",kind:"scalar",T:5,repeated:!0,packed:!0},{no:3,name:"leading_comments",kind:"scalar",T:9,opt:!0},{no:4,name:"trailing_comments",kind:"scalar",T:9,opt:!0},{no:6,name:"leading_detached_comments",kind:"scalar",T:9,repeated:!0}]);Il=class r extends b{constructor(n){super(),this.annotation=[],N.util.initPartial(n,this)}static fromBinary(n,e){return new r().fromBinary(n,e)}static fromJson(n,e){return new r().fromJson(n,e)}static fromJsonString(n,e){return new r().fromJsonString(n,e)}static equals(n,e){return N.util.equals(r,n,e)}};Il.runtime=N;Il.typeName="google.protobuf.GeneratedCodeInfo";Il.fields=N.util.newFieldList(()=>[{no:1,name:"annotation",kind:"message",T:bu,repeated:!0}]);bu=class r extends b{constructor(n){super(),this.path=[],N.util.initPartial(n,this)}static fromBinary(n,e){return new r().fromBinary(n,e)}static fromJson(n,e){return new r().fromJson(n,e)}static fromJsonString(n,e){return new r().fromJsonString(n,e)}static equals(n,e){return N.util.equals(r,n,e)}};bu.runtime=N;bu.typeName="google.protobuf.GeneratedCodeInfo.Annotation";bu.fields=N.util.newFieldList(()=>[{no:1,name:"path",kind:"scalar",T:5,repeated:!0,packed:!0},{no:2,name:"source_file",kind:"scalar",T:9,opt:!0},{no:3,name:"begin",kind:"scalar",T:5,opt:!0},{no:4,name:"end",kind:"scalar",T:5,opt:!0},{no:5,name:"semantic",kind:"enum",T:N.getEnumType(TE),opt:!0}]);(function(r){r[r.NONE=0]="NONE",r[r.SET=1]="SET",r[r.ALIAS=2]="ALIAS"})(TE||(TE={}));N.util.setEnumType(TE,"google.protobuf.GeneratedCodeInfo.Annotation.Semantic",[{no:0,name:"NONE"},{no:1,name:"SET"},{no:2,name:"ALIAS"}])});var Re,D2=_(()=>{ir();oa();ai();Re=class r extends b{constructor(n){super(),this.seconds=X.zero,this.nanos=0,d.util.initPartial(n,this)}fromJson(n,e){if(typeof n!="string")throw new Error(`cannot decode google.protobuf.Timestamp from JSON: ${d.json.debug(n)}`);let t=n.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(!t)throw new Error("cannot decode google.protobuf.Timestamp from JSON: invalid RFC 3339 string");let i=Date.parse(t[1]+"-"+t[2]+"-"+t[3]+"T"+t[4]+":"+t[5]+":"+t[6]+(t[8]?t[8]:"Z"));if(Number.isNaN(i))throw new Error("cannot decode google.protobuf.Timestamp from JSON: invalid RFC 3339 string");if(i<Date.parse("0001-01-01T00:00:00Z")||i>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=X.parse(i/1e3),this.nanos=0,t[7]&&(this.nanos=parseInt("1"+t[7]+"0".repeat(9-t[7].length))-1e9),this}toJson(n){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 t="Z";if(this.nanos>0){let i=(this.nanos+1e9).toString().substring(1);i.substring(3)==="000000"?t="."+i.substring(0,3)+"Z":i.substring(6)==="000"?t="."+i.substring(0,6)+"Z":t="."+i+"Z"}return new Date(e).toISOString().replace(".000Z",t)}toDate(){return new Date(Number(this.seconds)*1e3+Math.ceil(this.nanos/1e6))}static now(){return r.fromDate(new Date)}static fromDate(n){let e=n.getTime();return new r({seconds:X.parse(Math.floor(e/1e3)),nanos:e%1e3*1e6})}static fromBinary(n,e){return new r().fromBinary(n,e)}static fromJson(n,e){return new r().fromJson(n,e)}static fromJsonString(n,e){return new r().fromJsonString(n,e)}static equals(n,e){return d.util.equals(r,n,e)}};Re.runtime=d;Re.typeName="google.protobuf.Timestamp";Re.fields=d.util.newFieldList(()=>[{no:1,name:"seconds",kind:"scalar",T:3},{no:2,name:"nanos",kind:"scalar",T:5}])});var vl,O2=_(()=>{ir();oa();ai();vl=class r extends b{constructor(n){super(),this.seconds=X.zero,this.nanos=0,d.util.initPartial(n,this)}fromJson(n,e){if(typeof n!="string")throw new Error(`cannot decode google.protobuf.Duration from JSON: ${d.json.debug(n)}`);let t=n.match(/^(-?[0-9]+)(?:\.([0-9]+))?s/);if(t===null)throw new Error(`cannot decode google.protobuf.Duration from JSON: ${d.json.debug(n)}`);let i=Number(t[1]);if(i>315576e6||i<-315576e6)throw new Error(`cannot decode google.protobuf.Duration from JSON: ${d.json.debug(n)}`);if(this.seconds=X.parse(i),typeof t[2]=="string"){let o=t[2]+"0".repeat(9-t[2].length);this.nanos=parseInt(o),(i<0||Object.is(i,-0))&&(this.nanos=-this.nanos)}return this}toJson(n){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 t=Math.abs(this.nanos).toString();t="0".repeat(9-t.length)+t,t.substring(3)==="000000"?t=t.substring(0,3):t.substring(6)==="000"&&(t=t.substring(0,6)),e+="."+t,this.nanos<0&&Number(this.seconds)==0&&(e="-"+e)}return e+"s"}static fromBinary(n,e){return new r().fromBinary(n,e)}static fromJson(n,e){return new r().fromJson(n,e)}static fromJsonString(n,e){return new r().fromJsonString(n,e)}static equals(n,e){return d.util.equals(r,n,e)}};vl.runtime=d;vl.typeName="google.protobuf.Duration";vl.fields=d.util.newFieldList(()=>[{no:1,name:"seconds",kind:"scalar",T:3},{no:2,name:"nanos",kind:"scalar",T:5}])});var El,LT=_(()=>{ir();ai();El=class r extends b{constructor(n){super(),this.typeUrl="",this.value=new Uint8Array(0),d.util.initPartial(n,this)}toJson(n){var e;if(this.typeUrl==="")return{};let t=this.typeUrlToName(this.typeUrl),i=(e=n?.typeRegistry)===null||e===void 0?void 0:e.findMessage(t);if(!i)throw new Error(`cannot encode message google.protobuf.Any to JSON: "${this.typeUrl}" is not in the type registry`);let s=i.fromBinary(this.value).toJson(n);return(t.startsWith("google.protobuf.")||s===null||Array.isArray(s)||typeof s!="object")&&(s={value:s}),s["@type"]=this.typeUrl,s}fromJson(n,e){var t;if(n===null||Array.isArray(n)||typeof n!="object")throw new Error(`cannot decode message google.protobuf.Any from JSON: expected object but got ${n===null?"null":Array.isArray(n)?"array":typeof n}`);if(Object.keys(n).length==0)return this;let i=n["@type"];if(typeof i!="string"||i=="")throw new Error('cannot decode message google.protobuf.Any from JSON: "@type" is empty');let o=this.typeUrlToName(i),s=(t=e?.typeRegistry)===null||t===void 0?void 0:t.findMessage(o);if(!s)throw new Error(`cannot decode message google.protobuf.Any from JSON: ${i} is not in the type registry`);let a;if(o.startsWith("google.protobuf.")&&Object.prototype.hasOwnProperty.call(n,"value"))a=s.fromJson(n.value,e);else{let l=Object.assign({},n);delete l["@type"],a=s.fromJson(l,e)}return this.packFrom(a),this}packFrom(n){this.value=n.toBinary(),this.typeUrl=this.typeNameToUrl(n.getType().typeName)}unpackTo(n){return this.is(n.getType())?(n.fromBinary(this.value),!0):!1}unpack(n){if(this.typeUrl==="")return;let e=n.findMessage(this.typeUrlToName(this.typeUrl));if(e)return e.fromBinary(this.value)}is(n){if(this.typeUrl==="")return!1;let e=this.typeUrlToName(this.typeUrl),t="";return typeof n=="string"?t=n:t=n.typeName,e===t}typeNameToUrl(n){return`type.googleapis.com/${n}`}typeUrlToName(n){if(!n.length)throw new Error(`invalid type url: ${n}`);let e=n.lastIndexOf("/"),t=e>=0?n.substring(e+1):n;if(!t.length)throw new Error(`invalid type url: ${n}`);return t}static pack(n){let e=new r;return e.packFrom(n),e}static fromBinary(n,e){return new r().fromBinary(n,e)}static fromJson(n,e){return new r().fromJson(n,e)}static fromJsonString(n,e){return new r().fromJsonString(n,e)}static equals(n,e){return d.util.equals(r,n,e)}};El.runtime=d;El.typeName="google.protobuf.Any";El.fields=d.util.newFieldList(()=>[{no:1,name:"type_url",kind:"scalar",T:9},{no:2,name:"value",kind:"scalar",T:12}])});var Cf,k2=_(()=>{ir();ai();Cf=class r extends b{constructor(n){super(),d.util.initPartial(n,this)}static fromBinary(n,e){return new r().fromBinary(n,e)}static fromJson(n,e){return new r().fromJson(n,e)}static fromJsonString(n,e){return new r().fromJsonString(n,e)}static equals(n,e){return d.util.equals(r,n,e)}};Cf.runtime=d;Cf.typeName="google.protobuf.Empty";Cf.fields=d.util.newFieldList(()=>[])});var Af,N2=_(()=>{ir();ai();Af=class r extends b{constructor(n){super(),this.paths=[],d.util.initPartial(n,this)}toJson(n){function e(t){let i=!1,o=[];for(let s=0;s<t.length;s++){let a=t.charAt(s);switch(a){case"_":i=!0;break;case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":o.push(a),i=!1;break;default:i&&(i=!1,a=a.toUpperCase()),o.push(a);break}}return o.join("")}return this.paths.map(t=>{if(t.match(/_[0-9]?_/g)||t.match(/[A-Z]/g))throw new Error('cannot encode google.protobuf.FieldMask to JSON: lowerCamelCase of path name "'+t+'" is irreversible');return e(t)}).join(",")}fromJson(n,e){if(typeof n!="string")throw new Error("cannot decode google.protobuf.FieldMask from JSON: "+d.json.debug(n));if(n==="")return this;function t(i){if(i.includes("_"))throw new Error("cannot decode google.protobuf.FieldMask from JSON: path names must be lowerCamelCase");let o=i.replace(/[A-Z]/g,s=>"_"+s.toLowerCase());return o[0]==="_"?o.substring(1):o}return this.paths=n.split(",").map(t),this}static fromBinary(n,e){return new r().fromBinary(n,e)}static fromJson(n,e){return new r().fromJson(n,e)}static fromJsonString(n,e){return new r().fromJsonString(n,e)}static equals(n,e){return d.util.equals(r,n,e)}};Af.runtime=d;Af.typeName="google.protobuf.FieldMask";Af.fields=d.util.newFieldList(()=>[{no:1,name:"paths",kind:"scalar",T:9,repeated:!0}])});var Rf,yl,cs,Sl,L2=_(()=>{ai();ir();(function(r){r[r.NULL_VALUE=0]="NULL_VALUE"})(Rf||(Rf={}));d.util.setEnumType(Rf,"google.protobuf.NullValue",[{no:0,name:"NULL_VALUE"}]);yl=class r extends b{constructor(n){super(),this.fields={},d.util.initPartial(n,this)}toJson(n){let e={};for(let[t,i]of Object.entries(this.fields))e[t]=i.toJson(n);return e}fromJson(n,e){if(typeof n!="object"||n==null||Array.isArray(n))throw new Error("cannot decode google.protobuf.Struct from JSON "+d.json.debug(n));for(let[t,i]of Object.entries(n))this.fields[t]=cs.fromJson(i);return this}static fromBinary(n,e){return new r().fromBinary(n,e)}static fromJson(n,e){return new r().fromJson(n,e)}static fromJsonString(n,e){return new r().fromJsonString(n,e)}static equals(n,e){return d.util.equals(r,n,e)}};yl.runtime=d;yl.typeName="google.protobuf.Struct";yl.fields=d.util.newFieldList(()=>[{no:1,name:"fields",kind:"map",K:9,V:{kind:"message",T:cs}}]);cs=class r extends b{constructor(n){super(),this.kind={case:void 0},d.util.initPartial(n,this)}toJson(n){switch(this.kind.case){case"nullValue":return null;case"numberValue":if(!Number.isFinite(this.kind.value))throw new Error("google.protobuf.Value cannot be NaN or Infinity");return this.kind.value;case"boolValue":return this.kind.value;case"stringValue":return this.kind.value;case"structValue":case"listValue":return this.kind.value.toJson(Object.assign(Object.assign({},n),{emitDefaultValues:!0}))}throw new Error("google.protobuf.Value must have a value")}fromJson(n,e){switch(typeof n){case"number":this.kind={case:"numberValue",value:n};break;case"string":this.kind={case:"stringValue",value:n};break;case"boolean":this.kind={case:"boolValue",value:n};break;case"object":n===null?this.kind={case:"nullValue",value:Rf.NULL_VALUE}:Array.isArray(n)?this.kind={case:"listValue",value:Sl.fromJson(n)}:this.kind={case:"structValue",value:yl.fromJson(n)};break;default:throw new Error("cannot decode google.protobuf.Value from JSON "+d.json.debug(n))}return this}static fromBinary(n,e){return new r().fromBinary(n,e)}static fromJson(n,e){return new r().fromJson(n,e)}static fromJsonString(n,e){return new r().fromJsonString(n,e)}static equals(n,e){return d.util.equals(r,n,e)}};cs.runtime=d;cs.typeName="google.protobuf.Value";cs.fields=d.util.newFieldList(()=>[{no:1,name:"null_value",kind:"enum",T:d.getEnumType(Rf),oneof:"kind"},{no:2,name:"number_value",kind:"scalar",T:1,oneof:"kind"},{no:3,name:"string_value",kind:"scalar",T:9,oneof:"kind"},{no:4,name:"bool_value",kind:"scalar",T:8,oneof:"kind"},{no:5,name:"struct_value",kind:"message",T:yl,oneof:"kind"},{no:6,name:"list_value",kind:"message",T:Sl,oneof:"kind"}]);Sl=class r extends b{constructor(n){super(),this.values=[],d.util.initPartial(n,this)}toJson(n){return this.values.map(e=>e.toJson())}fromJson(n,e){if(!Array.isArray(n))throw new Error("cannot decode google.protobuf.ListValue from JSON "+d.json.debug(n));for(let t of n)this.values.push(cs.fromJson(t));return this}static fromBinary(n,e){return new r().fromBinary(n,e)}static fromJson(n,e){return new r().fromJson(n,e)}static fromJsonString(n,e){return new r().fromJsonString(n,e)}static equals(n,e){return d.util.equals(r,n,e)}};Sl.runtime=d;Sl.typeName="google.protobuf.ListValue";Sl.fields=d.util.newFieldList(()=>[{no:1,name:"values",kind:"message",T:cs,repeated:!0}])});var _l,wl,bl,Tl,Pl,Cl,Al,Rl,xl,M2=_(()=>{ir();ai();sa();oa();_l=class r extends b{constructor(n){super(),this.value=0,d.util.initPartial(n,this)}toJson(n){return d.json.writeScalar(j.DOUBLE,this.value,!0)}fromJson(n,e){try{this.value=d.json.readScalar(j.DOUBLE,n)}catch(t){let i='cannot decode message google.protobuf.DoubleValue from JSON"';throw t instanceof Error&&t.message.length>0&&(i+=`: ${t.message}`),new Error(i)}return this}static fromBinary(n,e){return new r().fromBinary(n,e)}static fromJson(n,e){return new r().fromJson(n,e)}static fromJsonString(n,e){return new r().fromJsonString(n,e)}static equals(n,e){return d.util.equals(r,n,e)}};_l.runtime=d;_l.typeName="google.protobuf.DoubleValue";_l.fields=d.util.newFieldList(()=>[{no:1,name:"value",kind:"scalar",T:1}]);_l.fieldWrapper={wrapField(r){return new _l({value:r})},unwrapField(r){return r.value}};wl=class r extends b{constructor(n){super(),this.value=0,d.util.initPartial(n,this)}toJson(n){return d.json.writeScalar(j.FLOAT,this.value,!0)}fromJson(n,e){try{this.value=d.json.readScalar(j.FLOAT,n)}catch(t){let i='cannot decode message google.protobuf.FloatValue from JSON"';throw t instanceof Error&&t.message.length>0&&(i+=`: ${t.message}`),new Error(i)}return this}static fromBinary(n,e){return new r().fromBinary(n,e)}static fromJson(n,e){return new r().fromJson(n,e)}static fromJsonString(n,e){return new r().fromJsonString(n,e)}static equals(n,e){return d.util.equals(r,n,e)}};wl.runtime=d;wl.typeName="google.protobuf.FloatValue";wl.fields=d.util.newFieldList(()=>[{no:1,name:"value",kind:"scalar",T:2}]);wl.fieldWrapper={wrapField(r){return new wl({value:r})},unwrapField(r){return r.value}};bl=class r extends b{constructor(n){super(),this.value=X.zero,d.util.initPartial(n,this)}toJson(n){return d.json.writeScalar(j.INT64,this.value,!0)}fromJson(n,e){try{this.value=d.json.readScalar(j.INT64,n)}catch(t){let i='cannot decode message google.protobuf.Int64Value from JSON"';throw t instanceof Error&&t.message.length>0&&(i+=`: ${t.message}`),new Error(i)}return this}static fromBinary(n,e){return new r().fromBinary(n,e)}static fromJson(n,e){return new r().fromJson(n,e)}static fromJsonString(n,e){return new r().fromJsonString(n,e)}static equals(n,e){return d.util.equals(r,n,e)}};bl.runtime=d;bl.typeName="google.protobuf.Int64Value";bl.fields=d.util.newFieldList(()=>[{no:1,name:"value",kind:"scalar",T:3}]);bl.fieldWrapper={wrapField(r){return new bl({value:r})},unwrapField(r){return r.value}};Tl=class r extends b{constructor(n){super(),this.value=X.zero,d.util.initPartial(n,this)}toJson(n){return d.json.writeScalar(j.UINT64,this.value,!0)}fromJson(n,e){try{this.value=d.json.readScalar(j.UINT64,n)}catch(t){let i='cannot decode message google.protobuf.UInt64Value from JSON"';throw t instanceof Error&&t.message.length>0&&(i+=`: ${t.message}`),new Error(i)}return this}static fromBinary(n,e){return new r().fromBinary(n,e)}static fromJson(n,e){return new r().fromJson(n,e)}static fromJsonString(n,e){return new r().fromJsonString(n,e)}static equals(n,e){return d.util.equals(r,n,e)}};Tl.runtime=d;Tl.typeName="google.protobuf.UInt64Value";Tl.fields=d.util.newFieldList(()=>[{no:1,name:"value",kind:"scalar",T:4}]);Tl.fieldWrapper={wrapField(r){return new Tl({value:r})},unwrapField(r){return r.value}};Pl=class r extends b{constructor(n){super(),this.value=0,d.util.initPartial(n,this)}toJson(n){return d.json.writeScalar(j.INT32,this.value,!0)}fromJson(n,e){try{this.value=d.json.readScalar(j.INT32,n)}catch(t){let i='cannot decode message google.protobuf.Int32Value from JSON"';throw t instanceof Error&&t.message.length>0&&(i+=`: ${t.message}`),new Error(i)}return this}static fromBinary(n,e){return new r().fromBinary(n,e)}static fromJson(n,e){return new r().fromJson(n,e)}static fromJsonString(n,e){return new r().fromJsonString(n,e)}static equals(n,e){return d.util.equals(r,n,e)}};Pl.runtime=d;Pl.typeName="google.protobuf.Int32Value";Pl.fields=d.util.newFieldList(()=>[{no:1,name:"value",kind:"scalar",T:5}]);Pl.fieldWrapper={wrapField(r){return new Pl({value:r})},unwrapField(r){return r.value}};Cl=class r extends b{constructor(n){super(),this.value=0,d.util.initPartial(n,this)}toJson(n){return d.json.writeScalar(j.UINT32,this.value,!0)}fromJson(n,e){try{this.value=d.json.readScalar(j.UINT32,n)}catch(t){let i='cannot decode message google.protobuf.UInt32Value from JSON"';throw t instanceof Error&&t.message.length>0&&(i+=`: ${t.message}`),new Error(i)}return this}static fromBinary(n,e){return new r().fromBinary(n,e)}static fromJson(n,e){return new r().fromJson(n,e)}static fromJsonString(n,e){return new r().fromJsonString(n,e)}static equals(n,e){return d.util.equals(r,n,e)}};Cl.runtime=d;Cl.typeName="google.protobuf.UInt32Value";Cl.fields=d.util.newFieldList(()=>[{no:1,name:"value",kind:"scalar",T:13}]);Cl.fieldWrapper={wrapField(r){return new Cl({value:r})},unwrapField(r){return r.value}};Al=class r extends b{constructor(n){super(),this.value=!1,d.util.initPartial(n,this)}toJson(n){return d.json.writeScalar(j.BOOL,this.value,!0)}fromJson(n,e){try{this.value=d.json.readScalar(j.BOOL,n)}catch(t){let i='cannot decode message google.protobuf.BoolValue from JSON"';throw t instanceof Error&&t.message.length>0&&(i+=`: ${t.message}`),new Error(i)}return this}static fromBinary(n,e){return new r().fromBinary(n,e)}static fromJson(n,e){return new r().fromJson(n,e)}static fromJsonString(n,e){return new r().fromJsonString(n,e)}static equals(n,e){return d.util.equals(r,n,e)}};Al.runtime=d;Al.typeName="google.protobuf.BoolValue";Al.fields=d.util.newFieldList(()=>[{no:1,name:"value",kind:"scalar",T:8}]);Al.fieldWrapper={wrapField(r){return new Al({value:r})},unwrapField(r){return r.value}};Rl=class r extends b{constructor(n){super(),this.value="",d.util.initPartial(n,this)}toJson(n){return d.json.writeScalar(j.STRING,this.value,!0)}fromJson(n,e){try{this.value=d.json.readScalar(j.STRING,n)}catch(t){let i='cannot decode message google.protobuf.StringValue from JSON"';throw t instanceof Error&&t.message.length>0&&(i+=`: ${t.message}`),new Error(i)}return this}static fromBinary(n,e){return new r().fromBinary(n,e)}static fromJson(n,e){return new r().fromJson(n,e)}static fromJsonString(n,e){return new r().fromJsonString(n,e)}static equals(n,e){return d.util.equals(r,n,e)}};Rl.runtime=d;Rl.typeName="google.protobuf.StringValue";Rl.fields=d.util.newFieldList(()=>[{no:1,name:"value",kind:"scalar",T:9}]);Rl.fieldWrapper={wrapField(r){return new Rl({value:r})},unwrapField(r){return r.value}};xl=class r extends b{constructor(n){super(),this.value=new Uint8Array(0),d.util.initPartial(n,this)}toJson(n){return d.json.writeScalar(j.BYTES,this.value,!0)}fromJson(n,e){try{this.value=d.json.readScalar(j.BYTES,n)}catch(t){let i='cannot decode message google.protobuf.BytesValue from JSON"';throw t instanceof Error&&t.message.length>0&&(i+=`: ${t.message}`),new Error(i)}return this}static fromBinary(n,e){return new r().fromBinary(n,e)}static fromJson(n,e){return new r().fromJson(n,e)}static fromJsonString(n,e){return new r().fromJsonString(n,e)}static equals(n,e){return d.util.equals(r,n,e)}};xl.runtime=d;xl.typeName="google.protobuf.BytesValue";xl.fields=d.util.newFieldList(()=>[{no:1,name:"value",kind:"scalar",T:12}]);xl.fieldWrapper={wrapField(r){return new xl({value:r})},unwrapField(r){return r.value}}});var Tu,xf,Df,MT,Pu,U2=_(()=>{ir();kT();NT();Tu=class r extends b{constructor(n){super(),N.util.initPartial(n,this)}static fromBinary(n,e){return new r().fromBinary(n,e)}static fromJson(n,e){return new r().fromJson(n,e)}static fromJsonString(n,e){return new r().fromJsonString(n,e)}static equals(n,e){return N.util.equals(r,n,e)}};Tu.runtime=N;Tu.typeName="google.protobuf.compiler.Version";Tu.fields=N.util.newFieldList(()=>[{no:1,name:"major",kind:"scalar",T:5,opt:!0},{no:2,name:"minor",kind:"scalar",T:5,opt:!0},{no:3,name:"patch",kind:"scalar",T:5,opt:!0},{no:4,name:"suffix",kind:"scalar",T:9,opt:!0}]);xf=class r extends b{constructor(n){super(),this.fileToGenerate=[],this.protoFile=[],this.sourceFileDescriptors=[],N.util.initPartial(n,this)}static fromBinary(n,e){return new r().fromBinary(n,e)}static fromJson(n,e){return new r().fromJson(n,e)}static fromJsonString(n,e){return new r().fromJsonString(n,e)}static equals(n,e){return N.util.equals(r,n,e)}};xf.runtime=N;xf.typeName="google.protobuf.compiler.CodeGeneratorRequest";xf.fields=N.util.newFieldList(()=>[{no:1,name:"file_to_generate",kind:"scalar",T:9,repeated:!0},{no:2,name:"parameter",kind:"scalar",T:9,opt:!0},{no:15,name:"proto_file",kind:"message",T:ls,repeated:!0},{no:17,name:"source_file_descriptors",kind:"message",T:ls,repeated:!0},{no:3,name:"compiler_version",kind:"message",T:Tu,opt:!0}]);Df=class r extends b{constructor(n){super(),this.file=[],N.util.initPartial(n,this)}static fromBinary(n,e){return new r().fromBinary(n,e)}static fromJson(n,e){return new r().fromJson(n,e)}static fromJsonString(n,e){return new r().fromJsonString(n,e)}static equals(n,e){return N.util.equals(r,n,e)}};Df.runtime=N;Df.typeName="google.protobuf.compiler.CodeGeneratorResponse";Df.fields=N.util.newFieldList(()=>[{no:1,name:"error",kind:"scalar",T:9,opt:!0},{no:2,name:"supported_features",kind:"scalar",T:4,opt:!0},{no:3,name:"minimum_edition",kind:"scalar",T:5,opt:!0},{no:4,name:"maximum_edition",kind:"scalar",T:5,opt:!0},{no:15,name:"file",kind:"message",T:Pu,repeated:!0}]);(function(r){r[r.NONE=0]="NONE",r[r.PROTO3_OPTIONAL=1]="PROTO3_OPTIONAL",r[r.SUPPORTS_EDITIONS=2]="SUPPORTS_EDITIONS"})(MT||(MT={}));N.util.setEnumType(MT,"google.protobuf.compiler.CodeGeneratorResponse.Feature",[{no:0,name:"FEATURE_NONE"},{no:1,name:"FEATURE_PROTO3_OPTIONAL"},{no:2,name:"FEATURE_SUPPORTS_EDITIONS"}]);Pu=class r extends b{constructor(n){super(),N.util.initPartial(n,this)}static fromBinary(n,e){return new r().fromBinary(n,e)}static fromJson(n,e){return new r().fromJson(n,e)}static fromJsonString(n,e){return new r().fromJsonString(n,e)}static equals(n,e){return N.util.equals(r,n,e)}};Pu.runtime=N;Pu.typeName="google.protobuf.compiler.CodeGeneratorResponse.File";Pu.fields=N.util.newFieldList(()=>[{no:1,name:"name",kind:"scalar",T:9,opt:!0},{no:2,name:"insertion_point",kind:"scalar",T:9,opt:!0},{no:15,name:"content",kind:"scalar",T:9,opt:!0},{no:16,name:"generated_code_info",kind:"message",T:Il,opt:!0}])});var Eo,PE=_(()=>{ir();ai();Eo=class r extends b{constructor(n){super(),this.fileName="",d.util.initPartial(n,this)}static fromBinary(n,e){return new r().fromBinary(n,e)}static fromJson(n,e){return new r().fromJson(n,e)}static fromJsonString(n,e){return new r().fromJsonString(n,e)}static equals(n,e){return d.util.equals(r,n,e)}};Eo.runtime=d;Eo.typeName="google.protobuf.SourceContext";Eo.fields=d.util.newFieldList(()=>[{no:1,name:"file_name",kind:"scalar",T:9}])});var li,Of,Cu,kf,Nf,Lf,Au,ci,UT=_(()=>{ai();ir();PE();LT();(function(r){r[r.PROTO2=0]="PROTO2",r[r.PROTO3=1]="PROTO3",r[r.EDITIONS=2]="EDITIONS"})(li||(li={}));d.util.setEnumType(li,"google.protobuf.Syntax",[{no:0,name:"SYNTAX_PROTO2"},{no:1,name:"SYNTAX_PROTO3"},{no:2,name:"SYNTAX_EDITIONS"}]);Of=class r extends b{constructor(n){super(),this.name="",this.fields=[],this.oneofs=[],this.options=[],this.syntax=li.PROTO2,this.edition="",d.util.initPartial(n,this)}static fromBinary(n,e){return new r().fromBinary(n,e)}static fromJson(n,e){return new r().fromJson(n,e)}static fromJsonString(n,e){return new r().fromJsonString(n,e)}static equals(n,e){return d.util.equals(r,n,e)}};Of.runtime=d;Of.typeName="google.protobuf.Type";Of.fields=d.util.newFieldList(()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"fields",kind:"message",T:Cu,repeated:!0},{no:3,name:"oneofs",kind:"scalar",T:9,repeated:!0},{no:4,name:"options",kind:"message",T:ci,repeated:!0},{no:5,name:"source_context",kind:"message",T:Eo},{no:6,name:"syntax",kind:"enum",T:d.getEnumType(li)},{no:7,name:"edition",kind:"scalar",T:9}]);Cu=class r extends b{constructor(n){super(),this.kind=kf.TYPE_UNKNOWN,this.cardinality=Nf.UNKNOWN,this.number=0,this.name="",this.typeUrl="",this.oneofIndex=0,this.packed=!1,this.options=[],this.jsonName="",this.defaultValue="",d.util.initPartial(n,this)}static fromBinary(n,e){return new r().fromBinary(n,e)}static fromJson(n,e){return new r().fromJson(n,e)}static fromJsonString(n,e){return new r().fromJsonString(n,e)}static equals(n,e){return d.util.equals(r,n,e)}};Cu.runtime=d;Cu.typeName="google.protobuf.Field";Cu.fields=d.util.newFieldList(()=>[{no:1,name:"kind",kind:"enum",T:d.getEnumType(kf)},{no:2,name:"cardinality",kind:"enum",T:d.getEnumType(Nf)},{no:3,name:"number",kind:"scalar",T:5},{no:4,name:"name",kind:"scalar",T:9},{no:6,name:"type_url",kind:"scalar",T:9},{no:7,name:"oneof_index",kind:"scalar",T:5},{no:8,name:"packed",kind:"scalar",T:8},{no:9,name:"options",kind:"message",T:ci,repeated:!0},{no:10,name:"json_name",kind:"scalar",T:9},{no:11,name:"default_value",kind:"scalar",T:9}]);(function(r){r[r.TYPE_UNKNOWN=0]="TYPE_UNKNOWN",r[r.TYPE_DOUBLE=1]="TYPE_DOUBLE",r[r.TYPE_FLOAT=2]="TYPE_FLOAT",r[r.TYPE_INT64=3]="TYPE_INT64",r[r.TYPE_UINT64=4]="TYPE_UINT64",r[r.TYPE_INT32=5]="TYPE_INT32",r[r.TYPE_FIXED64=6]="TYPE_FIXED64",r[r.TYPE_FIXED32=7]="TYPE_FIXED32",r[r.TYPE_BOOL=8]="TYPE_BOOL",r[r.TYPE_STRING=9]="TYPE_STRING",r[r.TYPE_GROUP=10]="TYPE_GROUP",r[r.TYPE_MESSAGE=11]="TYPE_MESSAGE",r[r.TYPE_BYTES=12]="TYPE_BYTES",r[r.TYPE_UINT32=13]="TYPE_UINT32",r[r.TYPE_ENUM=14]="TYPE_ENUM",r[r.TYPE_SFIXED32=15]="TYPE_SFIXED32",r[r.TYPE_SFIXED64=16]="TYPE_SFIXED64",r[r.TYPE_SINT32=17]="TYPE_SINT32",r[r.TYPE_SINT64=18]="TYPE_SINT64"})(kf||(kf={}));d.util.setEnumType(kf,"google.protobuf.Field.Kind",[{no:0,name:"TYPE_UNKNOWN"},{no:1,name:"TYPE_DOUBLE"},{no:2,name:"TYPE_FLOAT"},{no:3,name:"TYPE_INT64"},{no:4,name:"TYPE_UINT64"},{no:5,name:"TYPE_INT32"},{no:6,name:"TYPE_FIXED64"},{no:7,name:"TYPE_FIXED32"},{no:8,name:"TYPE_BOOL"},{no:9,name:"TYPE_STRING"},{no:10,name:"TYPE_GROUP"},{no:11,name:"TYPE_MESSAGE"},{no:12,name:"TYPE_BYTES"},{no:13,name:"TYPE_UINT32"},{no:14,name:"TYPE_ENUM"},{no:15,name:"TYPE_SFIXED32"},{no:16,name:"TYPE_SFIXED64"},{no:17,name:"TYPE_SINT32"},{no:18,name:"TYPE_SINT64"}]);(function(r){r[r.UNKNOWN=0]="UNKNOWN",r[r.OPTIONAL=1]="OPTIONAL",r[r.REQUIRED=2]="REQUIRED",r[r.REPEATED=3]="REPEATED"})(Nf||(Nf={}));d.util.setEnumType(Nf,"google.protobuf.Field.Cardinality",[{no:0,name:"CARDINALITY_UNKNOWN"},{no:1,name:"CARDINALITY_OPTIONAL"},{no:2,name:"CARDINALITY_REQUIRED"},{no:3,name:"CARDINALITY_REPEATED"}]);Lf=class r extends b{constructor(n){super(),this.name="",this.enumvalue=[],this.options=[],this.syntax=li.PROTO2,this.edition="",d.util.initPartial(n,this)}static fromBinary(n,e){return new r().fromBinary(n,e)}static fromJson(n,e){return new r().fromJson(n,e)}static fromJsonString(n,e){return new r().fromJsonString(n,e)}static equals(n,e){return d.util.equals(r,n,e)}};Lf.runtime=d;Lf.typeName="google.protobuf.Enum";Lf.fields=d.util.newFieldList(()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"enumvalue",kind:"message",T:Au,repeated:!0},{no:3,name:"options",kind:"message",T:ci,repeated:!0},{no:4,name:"source_context",kind:"message",T:Eo},{no:5,name:"syntax",kind:"enum",T:d.getEnumType(li)},{no:6,name:"edition",kind:"scalar",T:9}]);Au=class r extends b{constructor(n){super(),this.name="",this.number=0,this.options=[],d.util.initPartial(n,this)}static fromBinary(n,e){return new r().fromBinary(n,e)}static fromJson(n,e){return new r().fromJson(n,e)}static fromJsonString(n,e){return new r().fromJsonString(n,e)}static equals(n,e){return d.util.equals(r,n,e)}};Au.runtime=d;Au.typeName="google.protobuf.EnumValue";Au.fields=d.util.newFieldList(()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"number",kind:"scalar",T:5},{no:3,name:"options",kind:"message",T:ci,repeated:!0}]);ci=class r extends b{constructor(n){super(),this.name="",d.util.initPartial(n,this)}static fromBinary(n,e){return new r().fromBinary(n,e)}static fromJson(n,e){return new r().fromJson(n,e)}static fromJsonString(n,e){return new r().fromJsonString(n,e)}static equals(n,e){return d.util.equals(r,n,e)}};ci.runtime=d;ci.typeName="google.protobuf.Option";ci.fields=d.util.newFieldList(()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"value",kind:"message",T:El}])});var Mf,Ru,xu,F2=_(()=>{ir();UT();PE();ai();Mf=class r extends b{constructor(n){super(),this.name="",this.methods=[],this.options=[],this.version="",this.mixins=[],this.syntax=li.PROTO2,d.util.initPartial(n,this)}static fromBinary(n,e){return new r().fromBinary(n,e)}static fromJson(n,e){return new r().fromJson(n,e)}static fromJsonString(n,e){return new r().fromJsonString(n,e)}static equals(n,e){return d.util.equals(r,n,e)}};Mf.runtime=d;Mf.typeName="google.protobuf.Api";Mf.fields=d.util.newFieldList(()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"methods",kind:"message",T:Ru,repeated:!0},{no:3,name:"options",kind:"message",T:ci,repeated:!0},{no:4,name:"version",kind:"scalar",T:9},{no:5,name:"source_context",kind:"message",T:Eo},{no:6,name:"mixins",kind:"message",T:xu,repeated:!0},{no:7,name:"syntax",kind:"enum",T:d.getEnumType(li)}]);Ru=class r extends b{constructor(n){super(),this.name="",this.requestTypeUrl="",this.requestStreaming=!1,this.responseTypeUrl="",this.responseStreaming=!1,this.options=[],this.syntax=li.PROTO2,d.util.initPartial(n,this)}static fromBinary(n,e){return new r().fromBinary(n,e)}static fromJson(n,e){return new r().fromJson(n,e)}static fromJsonString(n,e){return new r().fromJsonString(n,e)}static equals(n,e){return d.util.equals(r,n,e)}};Ru.runtime=d;Ru.typeName="google.protobuf.Method";Ru.fields=d.util.newFieldList(()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"request_type_url",kind:"scalar",T:9},{no:3,name:"request_streaming",kind:"scalar",T:8},{no:4,name:"response_type_url",kind:"scalar",T:9},{no:5,name:"response_streaming",kind:"scalar",T:8},{no:6,name:"options",kind:"message",T:ci,repeated:!0},{no:7,name:"syntax",kind:"enum",T:d.getEnumType(li)}]);xu=class r extends b{constructor(n){super(),this.name="",this.root="",d.util.initPartial(n,this)}static fromBinary(n,e){return new r().fromBinary(n,e)}static fromJson(n,e){return new r().fromJson(n,e)}static fromJsonString(n,e){return new r().fromJsonString(n,e)}static equals(n,e){return d.util.equals(r,n,e)}};xu.runtime=d;xu.typeName="google.protobuf.Mixin";xu.fields=d.util.newFieldList(()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"root",kind:"scalar",T:9}])});var W2=_(()=>{ai();oa();ir();U2();F2();LT();NT();O2();k2();N2();PE();L2();D2();UT();M2()});var yF,HE,YC,Du,QC,XC,Yn,SF,$C,Vf,ZC,eA,tA,nA,rA,iA,oA,sA,aA,_F,wF,yo,bF,JE,TF,lA,cA,dA,Gf,qE,uA,pA,mA,fA,gA,hA,IA,PF,vA,CF,EA,AF,RF,xF,yA,SA,_A,Hf,wA,bA,TA,KE,PA,CA,AA,RA,xA,DF,jE,DA,OA,kA,NA,LA,MA,UA,FA,WA,zE,OF,Lu,BA,kF,VA,NF,LF,GA,MF,HA,UF,FF,Je,JA,qA,YE,KA,WF,Jf,BF,jA,zA,YA,VF,GF,HF,QA,XA,FT,WT,BT,B2,VT,CE,V2,G2,H2,J2,q2,K2,j2,$A,ZA,e1,t1,n1,z2,Ou,GT,Y2,HT,Q2,Uf,JT,AE,Ff,qT,RE,KT,jT,X2,zT,$2,Z2,YT,eU,tU,nU,xE,rU,iU,oU,sU,DE,QT,aU,lU,cU,dU,XT,uU,$T,ZT,eP,tP,nP,rP,OE,iP,kE,oP,sP,aP,lP,cP,dP,uP,pU,mU,pP,ku,Ol,mP,fP,gP,fU,NE,gU,hU,LE,IU,vU,hP,EU,yU,IP,vP,EP,yP,SU,_U,SP,wU,_P,wP,bP,TP,PP,Wf,CP,AP,RP,bU,xP,DP,TU,OP,kP,PU,CU,NP,AU,LP,MP,ME,Nu,RU,UP,FP,WP,Dl,BP,VP,GP,HP,JP,qP,KP,jP,zP,YP,QP,XP,$P,ZP,eC,tC,nC,rC,iC,oC,sC,aC,lC,cC,UE,xU,FE,dC,DU,uC,OU,kU,pC,NU,LU,WE,MU,UU,Bf,kl,BE,FU,WU,mC,fC,gC,BU,hC,VU,GU,HU,IC,vC,EC,yC,SC,JU,VE,qU,_C,KU,jU,wC,bC,TC,zU,YU,PC,QU,CC,AC,RC,XU,xC,$U,DC,OC,kC,NC,LC,ZU,eF,tF,nF,rF,iF,oF,GE,sF,MC,UC,FC,aF,WC,BC,VC,lF,cF,GC,dF,uF,pF,HC,mF,fF,gF,hF,IF,JC,vF,EF,qC,KC,jC,zC,JF=_(()=>{W2();yF=(m=>(m[m.UNSPECIFIED=0]="UNSPECIFIED",m[m.AUTOCOMPLETE=1]="AUTOCOMPLETE",m[m.CHAT=2]="CHAT",m[m.COMMAND_GENERATE=4]="COMMAND_GENERATE",m[m.COMMAND_EDIT=5]="COMMAND_EDIT",m[m.SUPERCOMPLETE=6]="SUPERCOMPLETE",m[m.COMMAND_PLAN=7]="COMMAND_PLAN",m[m.QUERY=8]="QUERY",m[m.FAST_APPLY=9]="FAST_APPLY",m[m.COMMAND_TERMINAL=10]="COMMAND_TERMINAL",m[m.TAB_JUMP=11]="TAB_JUMP",m[m.CASCADE=12]="CASCADE",m))(yF||{});d.util.setEnumType(yF,"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"}]);HE=(E=>(E[E.UNSPECIFIED=0]="UNSPECIFIED",E[E.FILE_MARKER=2]="FILE_MARKER",E[E.OTHER_DOCUMENT=4]="OTHER_DOCUMENT",E[E.BEFORE_CURSOR=5]="BEFORE_CURSOR",E[E.AFTER_CURSOR=7]="AFTER_CURSOR",E[E.FIM=8]="FIM",E[E.SOT=9]="SOT",E[E.EOT=10]="EOT",E[E.CODE_CONTEXT_ITEM=13]="CODE_CONTEXT_ITEM",E[E.INSTRUCTION=14]="INSTRUCTION",E[E.SELECTION=15]="SELECTION",E[E.TRAJECTORY_STEP=16]="TRAJECTORY_STEP",E[E.ACTIVE_DOCUMENT=17]="ACTIVE_DOCUMENT",E[E.CACHED_MESSAGE=18]="CACHED_MESSAGE",E))(HE||{});d.util.setEnumType(HE,"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"}]);YC=(t=>(t[t.UNSPECIFIED=0]="UNSPECIFIED",t[t.COPY=1]="COPY",t[t.PROMPT_CACHE=2]="PROMPT_CACHE",t))(YC||{});d.util.setEnumType(YC,"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"}]);Du=(w=>(w[w.UNSPECIFIED=0]="UNSPECIFIED",w[w.USE_INTERNAL_CHAT_MODEL=36]="USE_INTERNAL_CHAT_MODEL",w[w.RECORD_FILES=47]="RECORD_FILES",w[w.NO_SAMPLER_EARLY_STOP=48]="NO_SAMPLER_EARLY_STOP",w[w.CM_MEMORY_TELEMETRY=53]="CM_MEMORY_TELEMETRY",w[w.LANGUAGE_SERVER_VERSION=55]="LANGUAGE_SERVER_VERSION",w[w.LANGUAGE_SERVER_AUTO_RELOAD=56]="LANGUAGE_SERVER_AUTO_RELOAD",w[w.ONLY_MULTILINE=60]="ONLY_MULTILINE",w[w.USE_AUTOCOMPLETE_MODEL=64]="USE_AUTOCOMPLETE_MODEL",w[w.USE_ATTRIBUTION_FOR_INDIVIDUAL_TIER=68]="USE_ATTRIBUTION_FOR_INDIVIDUAL_TIER",w[w.CHAT_MODEL_CONFIG=78]="CHAT_MODEL_CONFIG",w[w.COMMAND_MODEL_CONFIG=79]="COMMAND_MODEL_CONFIG",w[w.MIN_IDE_VERSION=81]="MIN_IDE_VERSION",w[w.API_SERVER_VERBOSE_ERRORS=84]="API_SERVER_VERBOSE_ERRORS",w[w.DEFAULT_ENABLE_SEARCH=86]="DEFAULT_ENABLE_SEARCH",w[w.COLLECT_ONBOARDING_EVENTS=87]="COLLECT_ONBOARDING_EVENTS",w[w.COLLECT_EXAMPLE_COMPLETIONS=88]="COLLECT_EXAMPLE_COMPLETIONS",w[w.USE_MULTILINE_MODEL=89]="USE_MULTILINE_MODEL",w[w.ATTRIBUTION_KILL_SWITCH=92]="ATTRIBUTION_KILL_SWITCH",w[w.FAST_MULTILINE=94]="FAST_MULTILINE",w[w.SINGLE_COMPLETION=95]="SINGLE_COMPLETION",w[w.STOP_FIRST_NON_WHITESPACE_LINE=96]="STOP_FIRST_NON_WHITESPACE_LINE",w[w.CORTEX_CONFIG=102]="CORTEX_CONFIG",w[w.MODEL_CHAT_11121_VARIANTS=103]="MODEL_CHAT_11121_VARIANTS",w[w.INCLUDE_PROMPT_COMPONENTS=105]="INCLUDE_PROMPT_COMPONENTS",w[w.NON_TEAMS_KILL_SWITCH=106]="NON_TEAMS_KILL_SWITCH",w[w.PERSIST_CODE_TRACKER=108]="PERSIST_CODE_TRACKER",w[w.CHAT_COMPLETION_TOKENS_SOFT_LIMIT=114]="CHAT_COMPLETION_TOKENS_SOFT_LIMIT",w[w.CHAT_TOKENS_SOFT_LIMIT=115]="CHAT_TOKENS_SOFT_LIMIT",w[w.DISABLE_COMPLETIONS_CACHE=118]="DISABLE_COMPLETIONS_CACHE",w[w.LLAMA3_405B_KILL_SWITCH=119]="LLAMA3_405B_KILL_SWITCH",w[w.USE_COMMAND_DOCSTRING_GENERATION=121]="USE_COMMAND_DOCSTRING_GENERATION",w[w.ENABLE_SUPERCOMPLETE=123]="ENABLE_SUPERCOMPLETE",w[w.SENTRY=136]="SENTRY",w[w.FAST_SINGLELINE=144]="FAST_SINGLELINE",w[w.R2_LANGUAGE_SERVER_DOWNLOAD=147]="R2_LANGUAGE_SERVER_DOWNLOAD",w[w.SPLIT_MODEL=152]="SPLIT_MODEL",w[w.WINDSURF_SENTRY_SAMPLE_RATE=198]="WINDSURF_SENTRY_SAMPLE_RATE",w[w.API_SERVER_CUTOFF=158]="API_SERVER_CUTOFF",w[w.FAST_SPEED_KILL_SWITCH=159]="FAST_SPEED_KILL_SWITCH",w[w.PREDICTIVE_MULTILINE=160]="PREDICTIVE_MULTILINE",w[w.SUPERCOMPLETE_FILTER_REVERT=125]="SUPERCOMPLETE_FILTER_REVERT",w[w.SUPERCOMPLETE_FILTER_PREFIX_MATCH=126]="SUPERCOMPLETE_FILTER_PREFIX_MATCH",w[w.SUPERCOMPLETE_FILTER_SCORE_THRESHOLD=127]="SUPERCOMPLETE_FILTER_SCORE_THRESHOLD",w[w.SUPERCOMPLETE_FILTER_INSERTION_CAP=128]="SUPERCOMPLETE_FILTER_INSERTION_CAP",w[w.SUPERCOMPLETE_FILTER_DELETION_CAP=133]="SUPERCOMPLETE_FILTER_DELETION_CAP",w[w.SUPERCOMPLETE_FILTER_WHITESPACE_ONLY=156]="SUPERCOMPLETE_FILTER_WHITESPACE_ONLY",w[w.SUPERCOMPLETE_FILTER_NO_OP=170]="SUPERCOMPLETE_FILTER_NO_OP",w[w.SUPERCOMPLETE_FILTER_SUFFIX_MATCH=176]="SUPERCOMPLETE_FILTER_SUFFIX_MATCH",w[w.SUPERCOMPLETE_FILTER_PREVIOUSLY_SHOWN=182]="SUPERCOMPLETE_FILTER_PREVIOUSLY_SHOWN",w[w.SUPERCOMPLETE_MIN_SCORE=129]="SUPERCOMPLETE_MIN_SCORE",w[w.SUPERCOMPLETE_MAX_INSERTIONS=130]="SUPERCOMPLETE_MAX_INSERTIONS",w[w.SUPERCOMPLETE_LINE_RADIUS=131]="SUPERCOMPLETE_LINE_RADIUS",w[w.SUPERCOMPLETE_MAX_DELETIONS=132]="SUPERCOMPLETE_MAX_DELETIONS",w[w.SUPERCOMPLETE_RECENT_STEPS_DURATION=138]="SUPERCOMPLETE_RECENT_STEPS_DURATION",w[w.SUPERCOMPLETE_MAX_TRAJECTORY_STEPS=154]="SUPERCOMPLETE_MAX_TRAJECTORY_STEPS",w[w.SUPERCOMPLETE_MAX_TRAJECTORY_STEP_SIZE=203]="SUPERCOMPLETE_MAX_TRAJECTORY_STEP_SIZE",w[w.SUPERCOMPLETE_DISABLE_TYPING_CACHE=231]="SUPERCOMPLETE_DISABLE_TYPING_CACHE",w[w.SUPERCOMPLETE_ALWAYS_USE_CACHE_ON_EQUAL_STATE=293]="SUPERCOMPLETE_ALWAYS_USE_CACHE_ON_EQUAL_STATE",w[w.SUPERCOMPLETE_CACHE_ON_PARENT_ID_KILL_SWITCH=297]="SUPERCOMPLETE_CACHE_ON_PARENT_ID_KILL_SWITCH",w[w.SUPERCOMPLETE_PRUNE_RESPONSE=140]="SUPERCOMPLETE_PRUNE_RESPONSE",w[w.SUPERCOMPLETE_PRUNE_MAX_INSERT_DELETE_LINE_DELTA=141]="SUPERCOMPLETE_PRUNE_MAX_INSERT_DELETE_LINE_DELTA",w[w.SUPERCOMPLETE_MODEL_CONFIG=145]="SUPERCOMPLETE_MODEL_CONFIG",w[w.SUPERCOMPLETE_MODEL_CONFIG_LOW=330]="SUPERCOMPLETE_MODEL_CONFIG_LOW",w[w.SUPERCOMPLETE_MODEL_CONFIG_HIGH=331]="SUPERCOMPLETE_MODEL_CONFIG_HIGH",w[w.SUPERCOMPLETE_ON_TAB=151]="SUPERCOMPLETE_ON_TAB",w[w.SUPERCOMPLETE_INLINE_PURE_DELETE=171]="SUPERCOMPLETE_INLINE_PURE_DELETE",w[w.SUPERCOMPLETE_INLINE_RICH_GHOST_TEXT_INSERTIONS=218]="SUPERCOMPLETE_INLINE_RICH_GHOST_TEXT_INSERTIONS",w[w.MODEL_CHAT_19821_VARIANTS=308]="MODEL_CHAT_19821_VARIANTS",w[w.SUPERCOMPLETE_MAX_CONCURRENT_REQUESTS=284]="SUPERCOMPLETE_MAX_CONCURRENT_REQUESTS",w[w.COMMAND_PROMPT_CACHE_CONFIG=255]="COMMAND_PROMPT_CACHE_CONFIG",w[w.CUMULATIVE_PROMPT_CONFIG=256]="CUMULATIVE_PROMPT_CONFIG",w[w.CUMULATIVE_PROMPT_CASCADE_CONFIG=279]="CUMULATIVE_PROMPT_CASCADE_CONFIG",w[w.TAB_JUMP_CUMULATIVE_PROMPT_CONFIG=301]="TAB_JUMP_CUMULATIVE_PROMPT_CONFIG",w[w.COMPLETION_SPEED_SUPERCOMPLETE_CACHE=207]="COMPLETION_SPEED_SUPERCOMPLETE_CACHE",w[w.COMPLETION_SPEED_PREDICTIVE_SUPERCOMPLETE=208]="COMPLETION_SPEED_PREDICTIVE_SUPERCOMPLETE",w[w.COMPLETION_SPEED_TAB_JUMP_CACHE=209]="COMPLETION_SPEED_TAB_JUMP_CACHE",w[w.COMPLETION_SPEED_PREDICTIVE_TAB_JUMP=210]="COMPLETION_SPEED_PREDICTIVE_TAB_JUMP",w[w.COMPLETION_SPEED_BLOCK_TAB_JUMP_ON_PREDICTIVE_SUPERCOMPLETE=294]="COMPLETION_SPEED_BLOCK_TAB_JUMP_ON_PREDICTIVE_SUPERCOMPLETE",w[w.JETBRAINS_ENABLE_ONBOARDING=137]="JETBRAINS_ENABLE_ONBOARDING",w[w.ENABLE_AUTOCOMPLETE_DURING_INTELLISENSE=146]="ENABLE_AUTOCOMPLETE_DURING_INTELLISENSE",w[w.COMMAND_BOX_ON_TOP=155]="COMMAND_BOX_ON_TOP",w[w.CONTEXT_ACTIVE_DOCUMENT_FRACTION=149]="CONTEXT_ACTIVE_DOCUMENT_FRACTION",w[w.CONTEXT_FORCE_LOCAL_CONTEXT=178]="CONTEXT_FORCE_LOCAL_CONTEXT",w[w.CROSS_SELL_EXTENSION_DOWNLOAD_WINDSURF=220]="CROSS_SELL_EXTENSION_DOWNLOAD_WINDSURF",w[w.MODEL_LLAMA_3_1_70B_INSTRUCT_LONG_CONTEXT_VARIANTS=295]="MODEL_LLAMA_3_1_70B_INSTRUCT_LONG_CONTEXT_VARIANTS",w[w.USE_AUTOCOMPLETE_MODEL_SERVER_SIDE=163]="USE_AUTOCOMPLETE_MODEL_SERVER_SIDE",w[w.SUPERCOMPLETE_NO_CONTEXT=165]="SUPERCOMPLETE_NO_CONTEXT",w[w.SUPERCOMPLETE_NO_ACTIVE_NODE=166]="SUPERCOMPLETE_NO_ACTIVE_NODE",w[w.TAB_JUMP_ENABLED=168]="TAB_JUMP_ENABLED",w[w.TAB_JUMP_ACCEPT_ENABLED=169]="TAB_JUMP_ACCEPT_ENABLED",w[w.TAB_JUMP_LINE_RADIUS=177]="TAB_JUMP_LINE_RADIUS",w[w.TAB_JUMP_MIN_FILTER_RADIUS=197]="TAB_JUMP_MIN_FILTER_RADIUS",w[w.TAB_JUMP_ON_ACCEPT_ONLY=205]="TAB_JUMP_ON_ACCEPT_ONLY",w[w.TAB_JUMP_FILTER_IN_SELECTION=215]="TAB_JUMP_FILTER_IN_SELECTION",w[w.TAB_JUMP_MODEL_CONFIG=237]="TAB_JUMP_MODEL_CONFIG",w[w.TAB_JUMP_FILTER_NO_OP=238]="TAB_JUMP_FILTER_NO_OP",w[w.TAB_JUMP_FILTER_REVERT=239]="TAB_JUMP_FILTER_REVERT",w[w.TAB_JUMP_FILTER_SCORE_THRESHOLD=240]="TAB_JUMP_FILTER_SCORE_THRESHOLD",w[w.TAB_JUMP_FILTER_WHITESPACE_ONLY=241]="TAB_JUMP_FILTER_WHITESPACE_ONLY",w[w.TAB_JUMP_FILTER_INSERTION_CAP=242]="TAB_JUMP_FILTER_INSERTION_CAP",w[w.TAB_JUMP_FILTER_DELETION_CAP=243]="TAB_JUMP_FILTER_DELETION_CAP",w[w.TAB_JUMP_PRUNE_RESPONSE=260]="TAB_JUMP_PRUNE_RESPONSE",w[w.TAB_JUMP_PRUNE_MAX_INSERT_DELETE_LINE_DELTA=261]="TAB_JUMP_PRUNE_MAX_INSERT_DELETE_LINE_DELTA",w[w.TAB_JUMP_STOP_TOKEN_MIDSTREAM=317]="TAB_JUMP_STOP_TOKEN_MIDSTREAM",w[w.VIEWED_FILE_TRACKER_CONFIG=211]="VIEWED_FILE_TRACKER_CONFIG",w[w.SNAPSHOT_TO_STEP_OPTIONS_OVERRIDE=305]="SNAPSHOT_TO_STEP_OPTIONS_OVERRIDE",w[w.STREAMING_EXTERNAL_COMMAND=172]="STREAMING_EXTERNAL_COMMAND",w[w.USE_SPECIAL_EDIT_CODE_BLOCK=179]="USE_SPECIAL_EDIT_CODE_BLOCK",w[w.ENABLE_SUGGESTED_RESPONSES=187]="ENABLE_SUGGESTED_RESPONSES",w[w.CASCADE_BASE_MODEL_ID=190]="CASCADE_BASE_MODEL_ID",w[w.CASCADE_PLAN_BASED_CONFIG_OVERRIDE=266]="CASCADE_PLAN_BASED_CONFIG_OVERRIDE",w[w.CASCADE_GLOBAL_CONFIG_OVERRIDE=212]="CASCADE_GLOBAL_CONFIG_OVERRIDE",w[w.CASCADE_BACKGROUND_RESEARCH_CONFIG_OVERRIDE=193]="CASCADE_BACKGROUND_RESEARCH_CONFIG_OVERRIDE",w[w.CASCADE_ENFORCE_QUOTA=204]="CASCADE_ENFORCE_QUOTA",w[w.CASCADE_ENABLE_AUTOMATED_MEMORIES=224]="CASCADE_ENABLE_AUTOMATED_MEMORIES",w[w.CASCADE_MEMORY_CONFIG_OVERRIDE=314]="CASCADE_MEMORY_CONFIG_OVERRIDE",w[w.CASCADE_USE_REPLACE_CONTENT_EDIT_TOOL=228]="CASCADE_USE_REPLACE_CONTENT_EDIT_TOOL",w[w.CASCADE_VIEW_FILE_TOOL_CONFIG_OVERRIDE=258]="CASCADE_VIEW_FILE_TOOL_CONFIG_OVERRIDE",w[w.CASCADE_USE_EXPERIMENT_CHECKPOINTER=247]="CASCADE_USE_EXPERIMENT_CHECKPOINTER",w[w.CASCADE_ENABLE_MCP_TOOLS=245]="CASCADE_ENABLE_MCP_TOOLS",w[w.CASCADE_AUTO_FIX_LINTS=275]="CASCADE_AUTO_FIX_LINTS",w[w.USE_ANTHROPIC_TOKEN_EFFICIENT_TOOLS_BETA=296]="USE_ANTHROPIC_TOKEN_EFFICIENT_TOOLS_BETA",w[w.CASCADE_USER_MEMORIES_IN_SYS_PROMPT=289]="CASCADE_USER_MEMORIES_IN_SYS_PROMPT",w[w.CASCADE_ENABLE_PROXY_WEB_SERVER=290]="CASCADE_ENABLE_PROXY_WEB_SERVER",w[w.COLLAPSE_ASSISTANT_MESSAGES=312]="COLLAPSE_ASSISTANT_MESSAGES",w[w.CASCADE_DEFAULT_MODEL_OVERRIDE=321]="CASCADE_DEFAULT_MODEL_OVERRIDE",w[w.ENABLE_SMART_COPY=181]="ENABLE_SMART_COPY",w[w.ENABLE_COMMIT_MESSAGE_GENERATION=185]="ENABLE_COMMIT_MESSAGE_GENERATION",w[w.SKIP_CONSISTENCY_MANAGER=194]="SKIP_CONSISTENCY_MANAGER",w[w.FIREWORKS_ON_DEMAND_DEPLOYMENT=276]="FIREWORKS_ON_DEMAND_DEPLOYMENT",w[w.API_SERVER_CLIENT_USE_HTTP_2=202]="API_SERVER_CLIENT_USE_HTTP_2",w[w.AUTOCOMPLETE_DEFAULT_DEBOUNCE_MS=213]="AUTOCOMPLETE_DEFAULT_DEBOUNCE_MS",w[w.AUTOCOMPLETE_FAST_DEBOUNCE_MS=214]="AUTOCOMPLETE_FAST_DEBOUNCE_MS",w[w.PROFILING_TELEMETRY_SAMPLE_RATE=219]="PROFILING_TELEMETRY_SAMPLE_RATE",w[w.STREAM_USER_SHELL_COMMANDS=225]="STREAM_USER_SHELL_COMMANDS",w[w.API_SERVER_PROMPT_CACHE_REPLICAS=307]="API_SERVER_PROMPT_CACHE_REPLICAS",w[w.API_SERVER_ENABLE_MORE_LOGGING=272]="API_SERVER_ENABLE_MORE_LOGGING",w[w.COMMAND_INJECT_USER_MEMORIES=233]="COMMAND_INJECT_USER_MEMORIES",w[w.AUTOCOMPLETE_HIDDEN_ERROR_REGEX=234]="AUTOCOMPLETE_HIDDEN_ERROR_REGEX",w[w.DISABLE_IDE_COMPLETIONS_DEBOUNCE=278]="DISABLE_IDE_COMPLETIONS_DEBOUNCE",w[w.ENABLE_QUICK_ACTIONS=250]="ENABLE_QUICK_ACTIONS",w[w.QUICK_ACTIONS_WHITELIST_REGEX=251]="QUICK_ACTIONS_WHITELIST_REGEX",w[w.CASCADE_NEW_MODELS_NUX=259]="CASCADE_NEW_MODELS_NUX",w[w.CASCADE_NEW_WAVE_2_MODELS_NUX=270]="CASCADE_NEW_WAVE_2_MODELS_NUX",w[w.SUPERCOMPLETE_FAST_DEBOUNCE=262]="SUPERCOMPLETE_FAST_DEBOUNCE",w[w.SUPERCOMPLETE_REGULAR_DEBOUNCE=263]="SUPERCOMPLETE_REGULAR_DEBOUNCE",w[w.XML_TOOL_PARSING_MODELS=268]="XML_TOOL_PARSING_MODELS",w[w.SUPERCOMPLETE_DONT_FILTER_MID_STREAMED=269]="SUPERCOMPLETE_DONT_FILTER_MID_STREAMED",w[w.ANNOYANCE_MANAGER_MAX_NAVIGATION_RENDERS=285]="ANNOYANCE_MANAGER_MAX_NAVIGATION_RENDERS",w[w.ANNOYANCE_MANAGER_INLINE_PREVENTION_THRESHOLD_MS=286]="ANNOYANCE_MANAGER_INLINE_PREVENTION_THRESHOLD_MS",w[w.ANNOYANCE_MANAGER_INLINE_PREVENTION_MAX_INTENTIONAL_REJECTIONS=287]="ANNOYANCE_MANAGER_INLINE_PREVENTION_MAX_INTENTIONAL_REJECTIONS",w[w.ANNOYANCE_MANAGER_INLINE_PREVENTION_MAX_AUTO_REJECTIONS=288]="ANNOYANCE_MANAGER_INLINE_PREVENTION_MAX_AUTO_REJECTIONS",w[w.USE_CUSTOM_CHARACTER_DIFF=292]="USE_CUSTOM_CHARACTER_DIFF",w[w.FORCE_NON_OPTIMIZED_DIFF=298]="FORCE_NON_OPTIMIZED_DIFF",w[w.CASCADE_WEB_APP_DEPLOYMENTS_ENABLED=300]="CASCADE_WEB_APP_DEPLOYMENTS_ENABLED",w[w.CASCADE_RECIPES_AT_MENTION_VISIBILITY=316]="CASCADE_RECIPES_AT_MENTION_VISIBILITY",w[w.IMPLICIT_USES_CLIPBOARD=310]="IMPLICIT_USES_CLIPBOARD",w[w.DISABLE_SUPERCOMPLETE_PCW=303]="DISABLE_SUPERCOMPLETE_PCW",w[w.BLOCK_TAB_ON_SHOWN_AUTOCOMPLETE=304]="BLOCK_TAB_ON_SHOWN_AUTOCOMPLETE",w[w.CASCADE_WEB_SEARCH_NUX=311]="CASCADE_WEB_SEARCH_NUX",w[w.MODEL_NOTIFICATIONS=319]="MODEL_NOTIFICATIONS",w[w.MODEL_SELECTOR_NUX_COPY=320]="MODEL_SELECTOR_NUX_COPY",w[w.CASCADE_TOOL_CALL_PRICING_NUX=322]="CASCADE_TOOL_CALL_PRICING_NUX",w[w.CASCADE_PLUGINS_TAB=323]="CASCADE_PLUGINS_TAB",w[w.WAVE_8_RULES_ENABLED=324]="WAVE_8_RULES_ENABLED",w[w.WAVE_8_KNOWLEDGE_ENABLED=325]="WAVE_8_KNOWLEDGE_ENABLED",w[w.CASCADE_ONBOARDING=326]="CASCADE_ONBOARDING",w[w.CASCADE_ONBOARDING_REVERT=327]="CASCADE_ONBOARDING_REVERT",w[w.CASCADE_WINDSURF_BROWSER_TOOLS_ENABLED=328]="CASCADE_WINDSURF_BROWSER_TOOLS_ENABLED",w[w.CASCADE_MODEL_HEADER_WARNING=329]="CASCADE_MODEL_HEADER_WARNING",w[w.TEST_ONLY=999]="TEST_ONLY",w))(Du||{});d.util.setEnumType(Du,"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"}]);QC=(i=>(i[i.UNSPECIFIED=0]="UNSPECIFIED",i[i.EXTENSION=1]="EXTENSION",i[i.LANGUAGE_SERVER=2]="LANGUAGE_SERVER",i[i.API_SERVER=3]="API_SERVER",i))(QC||{});d.util.setEnumType(QC,"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"}]);XC=(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))(XC||{});d.util.setEnumType(XC,"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"}]);Yn=(g=>(g[g.MODEL_UNSPECIFIED=0]="MODEL_UNSPECIFIED",g[g.MODEL_EMBED_6591=20]="MODEL_EMBED_6591",g[g.MODEL_8341=33]="MODEL_8341",g[g.MODEL_8528=42]="MODEL_8528",g[g.MODEL_9024=41]="MODEL_9024",g[g.MODEL_14602=112]="MODEL_14602",g[g.MODEL_15133=115]="MODEL_15133",g[g.MODEL_15302=119]="MODEL_15302",g[g.MODEL_15335=121]="MODEL_15335",g[g.MODEL_15336=122]="MODEL_15336",g[g.MODEL_15931=167]="MODEL_15931",g[g.MODEL_QUERY_9905=48]="MODEL_QUERY_9905",g[g.MODEL_QUERY_11791=66]="MODEL_QUERY_11791",g[g.MODEL_CHAT_11120=57]="MODEL_CHAT_11120",g[g.MODEL_CHAT_11121=58]="MODEL_CHAT_11121",g[g.MODEL_CHAT_12119=70]="MODEL_CHAT_12119",g[g.MODEL_CHAT_12121=69]="MODEL_CHAT_12121",g[g.MODEL_CHAT_12437=74]="MODEL_CHAT_12437",g[g.MODEL_CHAT_12491=76]="MODEL_CHAT_12491",g[g.MODEL_CHAT_12623=78]="MODEL_CHAT_12623",g[g.MODEL_CHAT_12950=79]="MODEL_CHAT_12950",g[g.MODEL_CHAT_12968=101]="MODEL_CHAT_12968",g[g.MODEL_CHAT_13404=102]="MODEL_CHAT_13404",g[g.MODEL_CHAT_13566=103]="MODEL_CHAT_13566",g[g.MODEL_CHAT_13930=108]="MODEL_CHAT_13930",g[g.MODEL_CHAT_14255=110]="MODEL_CHAT_14255",g[g.MODEL_CHAT_14256=111]="MODEL_CHAT_14256",g[g.MODEL_CHAT_14942=114]="MODEL_CHAT_14942",g[g.MODEL_CHAT_15305=120]="MODEL_CHAT_15305",g[g.MODEL_CHAT_15600=123]="MODEL_CHAT_15600",g[g.MODEL_CHAT_16801=124]="MODEL_CHAT_16801",g[g.MODEL_CHAT_16718=175]="MODEL_CHAT_16718",g[g.MODEL_CHAT_15729=168]="MODEL_CHAT_15729",g[g.MODEL_CHAT_16579=173]="MODEL_CHAT_16579",g[g.MODEL_CHAT_16579_CRUSOE=174]="MODEL_CHAT_16579_CRUSOE",g[g.MODEL_CHAT_18805=181]="MODEL_CHAT_18805",g[g.MODEL_CHAT_18468=210]="MODEL_CHAT_18468",g[g.MODEL_CHAT_19484=233]="MODEL_CHAT_19484",g[g.MODEL_CHAT_20706=235]="MODEL_CHAT_20706",g[g.MODEL_CHAT_21779=245]="MODEL_CHAT_21779",g[g.MODEL_CHAT_19040=211]="MODEL_CHAT_19040",g[g.MODEL_CHAT_19820=229]="MODEL_CHAT_19820",g[g.MODEL_CHAT_19821=230]="MODEL_CHAT_19821",g[g.MODEL_CHAT_19821_CRUSOE=244]="MODEL_CHAT_19821_CRUSOE",g[g.MODEL_CHAT_23310=269]="MODEL_CHAT_23310",g[g.MODEL_CHAT_28580=330]="MODEL_CHAT_28580",g[g.MODEL_CHAT_28581=331]="MODEL_CHAT_28581",g[g.MODEL_CHAT_28582=332]="MODEL_CHAT_28582",g[g.MODEL_CHAT_28583=333]="MODEL_CHAT_28583",g[g.MODEL_CHAT_28584=334]="MODEL_CHAT_28584",g[g.MODEL_CHAT_19822=231]="MODEL_CHAT_19822",g[g.MODEL_CHAT_22798=255]="MODEL_CHAT_22798",g[g.MODEL_CHAT_22799=256]="MODEL_CHAT_22799",g[g.MODEL_CHAT_22800=257]="MODEL_CHAT_22800",g[g.MODEL_CHAT_23151=267]="MODEL_CHAT_23151",g[g.MODEL_CHAT_23152=268]="MODEL_CHAT_23152",g[g.MODEL_TAB_ARMADILLO=500]="MODEL_TAB_ARMADILLO",g[g.MODEL_TAB_BASE_1=501]="MODEL_TAB_BASE_1",g[g.MODEL_TAB_EXPERIMENTAL_1=502]="MODEL_TAB_EXPERIMENTAL_1",g[g.MODEL_TAB_EXPERIMENTAL_2=503]="MODEL_TAB_EXPERIMENTAL_2",g[g.MODEL_TAB_EXPERIMENTAL_3=504]="MODEL_TAB_EXPERIMENTAL_3",g[g.MODEL_TAB_EXPERIMENTAL_4=505]="MODEL_TAB_EXPERIMENTAL_4",g[g.MODEL_TAB_EXPERIMENTAL_5=506]="MODEL_TAB_EXPERIMENTAL_5",g[g.MODEL_TAB_EXPERIMENTAL_6=507]="MODEL_TAB_EXPERIMENTAL_6",g[g.MODEL_TAB_EXPERIMENTAL_7=508]="MODEL_TAB_EXPERIMENTAL_7",g[g.MODEL_TAB_EXPERIMENTAL_8=509]="MODEL_TAB_EXPERIMENTAL_8",g[g.MODEL_TAB_EXPERIMENTAL_9=510]="MODEL_TAB_EXPERIMENTAL_9",g[g.MODEL_TAB_EXPERIMENTAL_10=511]="MODEL_TAB_EXPERIMENTAL_10",g[g.MODEL_CASCADE_22893=270]="MODEL_CASCADE_22893",g[g.MODEL_CASCADE_20064=225]="MODEL_CASCADE_20064",g[g.MODEL_CASCADE_20065=236]="MODEL_CASCADE_20065",g[g.MODEL_CASCADE_20066=237]="MODEL_CASCADE_20066",g[g.MODEL_CASCADE_20067=238]="MODEL_CASCADE_20067",g[g.MODEL_CASCADE_20068=239]="MODEL_CASCADE_20068",g[g.MODEL_CASCADE_20069=240]="MODEL_CASCADE_20069",g[g.MODEL_CASCADE_20070=250]="MODEL_CASCADE_20070",g[g.MODEL_CASCADE_20071=251]="MODEL_CASCADE_20071",g[g.MODEL_CASCADE_20072=252]="MODEL_CASCADE_20072",g[g.MODEL_CASCADE_20073=253]="MODEL_CASCADE_20073",g[g.MODEL_CASCADE_20074=254]="MODEL_CASCADE_20074",g[g.MODEL_CASCADE_20075=307]="MODEL_CASCADE_20075",g[g.MODEL_CASCADE_20076=308]="MODEL_CASCADE_20076",g[g.MODEL_CASCADE_20077=309]="MODEL_CASCADE_20077",g[g.MODEL_CASCADE_20078=310]="MODEL_CASCADE_20078",g[g.MODEL_CASCADE_20079=311]="MODEL_CASCADE_20079",g[g.MODEL_CASCADE_20080=297]="MODEL_CASCADE_20080",g[g.MODEL_CASCADE_20081=298]="MODEL_CASCADE_20081",g[g.MODEL_CASCADE_20082=299]="MODEL_CASCADE_20082",g[g.MODEL_CASCADE_20083=300]="MODEL_CASCADE_20083",g[g.MODEL_CASCADE_20084=301]="MODEL_CASCADE_20084",g[g.MODEL_CASCADE_20085=302]="MODEL_CASCADE_20085",g[g.MODEL_CASCADE_20086=303]="MODEL_CASCADE_20086",g[g.MODEL_CASCADE_20087=304]="MODEL_CASCADE_20087",g[g.MODEL_CASCADE_20088=305]="MODEL_CASCADE_20088",g[g.MODEL_CASCADE_20089=306]="MODEL_CASCADE_20089",g[g.MODEL_DEEPSEEK_V3_INTERNAL=247]="MODEL_DEEPSEEK_V3_INTERNAL",g[g.MODEL_DEEPSEEK_V3_0324_INTERNAL=248]="MODEL_DEEPSEEK_V3_0324_INTERNAL",g[g.MODEL_DEEPSEEK_R1_INTERNAL=249]="MODEL_DEEPSEEK_R1_INTERNAL",g[g.MODEL_ANTHROPIC_WINDSURF_RESEARCH=241]="MODEL_ANTHROPIC_WINDSURF_RESEARCH",g[g.MODEL_ANTHROPIC_WINDSURF_RESEARCH_THINKING=242]="MODEL_ANTHROPIC_WINDSURF_RESEARCH_THINKING",g[g.MODEL_DRAFT_11408=65]="MODEL_DRAFT_11408",g[g.MODEL_DRAFT_CHAT_11883=67]="MODEL_DRAFT_CHAT_11883",g[g.MODEL_DRAFT_CHAT_12196=72]="MODEL_DRAFT_CHAT_12196",g[g.MODEL_DRAFT_CHAT_12413=73]="MODEL_DRAFT_CHAT_12413",g[g.MODEL_DRAFT_CHAT_13175=104]="MODEL_DRAFT_CHAT_13175",g[g.MODEL_DRAFT_CHAT_19823=232]="MODEL_DRAFT_CHAT_19823",g[g.MODEL_DRAFT_CHAT_20707=243]="MODEL_DRAFT_CHAT_20707",g[g.MODEL_DRAFT_CHAT_22801=258]="MODEL_DRAFT_CHAT_22801",g[g.MODEL_DRAFT_CHAT_23508=273]="MODEL_DRAFT_CHAT_23508",g[g.MODEL_DRAFT_CASCADE_23672=274]="MODEL_DRAFT_CASCADE_23672",g[g.MODEL_CHAT_3_5_TURBO=28]="MODEL_CHAT_3_5_TURBO",g[g.MODEL_CHAT_GPT_4=30]="MODEL_CHAT_GPT_4",g[g.MODEL_CHAT_GPT_4_1106_PREVIEW=37]="MODEL_CHAT_GPT_4_1106_PREVIEW",g[g.MODEL_TEXT_EMBEDDING_OPENAI_ADA=91]="MODEL_TEXT_EMBEDDING_OPENAI_ADA",g[g.MODEL_TEXT_EMBEDDING_OPENAI_3_SMALL=163]="MODEL_TEXT_EMBEDDING_OPENAI_3_SMALL",g[g.MODEL_TEXT_EMBEDDING_OPENAI_3_LARGE=164]="MODEL_TEXT_EMBEDDING_OPENAI_3_LARGE",g[g.MODEL_CHAT_GPT_4O_2024_05_13=71]="MODEL_CHAT_GPT_4O_2024_05_13",g[g.MODEL_CHAT_GPT_4O_2024_08_06=109]="MODEL_CHAT_GPT_4O_2024_08_06",g[g.MODEL_CHAT_GPT_4O_MINI_2024_07_18=113]="MODEL_CHAT_GPT_4O_MINI_2024_07_18",g[g.MODEL_CHAT_GPT_4_1_2025_04_14=259]="MODEL_CHAT_GPT_4_1_2025_04_14",g[g.MODEL_CHAT_GPT_4_1_MINI_2025_04_14=260]="MODEL_CHAT_GPT_4_1_MINI_2025_04_14",g[g.MODEL_CHAT_GPT_4_1_NANO_2025_04_14=261]="MODEL_CHAT_GPT_4_1_NANO_2025_04_14",g[g.MODEL_CHAT_O1_PREVIEW=117]="MODEL_CHAT_O1_PREVIEW",g[g.MODEL_CHAT_O1_MINI=118]="MODEL_CHAT_O1_MINI",g[g.MODEL_CHAT_O1=170]="MODEL_CHAT_O1",g[g.MODEL_CHAT_O3_MINI=207]="MODEL_CHAT_O3_MINI",g[g.MODEL_CHAT_O3_MINI_LOW=213]="MODEL_CHAT_O3_MINI_LOW",g[g.MODEL_CHAT_O3_MINI_HIGH=214]="MODEL_CHAT_O3_MINI_HIGH",g[g.MODEL_CHAT_O3=218]="MODEL_CHAT_O3",g[g.MODEL_CHAT_O3_LOW=262]="MODEL_CHAT_O3_LOW",g[g.MODEL_CHAT_O3_HIGH=263]="MODEL_CHAT_O3_HIGH",g[g.MODEL_CHAT_O4_MINI=264]="MODEL_CHAT_O4_MINI",g[g.MODEL_CHAT_O4_MINI_LOW=265]="MODEL_CHAT_O4_MINI_LOW",g[g.MODEL_CHAT_O4_MINI_HIGH=266]="MODEL_CHAT_O4_MINI_HIGH",g[g.MODEL_CHAT_GPT_4_5=228]="MODEL_CHAT_GPT_4_5",g[g.MODEL_CODEX_MINI_LATEST=287]="MODEL_CODEX_MINI_LATEST",g[g.MODEL_CODEX_MINI_LATEST_LOW=288]="MODEL_CODEX_MINI_LATEST_LOW",g[g.MODEL_CODEX_MINI_LATEST_HIGH=289]="MODEL_CODEX_MINI_LATEST_HIGH",g[g.MODEL_O3_PRO_2025_06_10=294]="MODEL_O3_PRO_2025_06_10",g[g.MODEL_O3_PRO_2025_06_10_LOW=295]="MODEL_O3_PRO_2025_06_10_LOW",g[g.MODEL_O3_PRO_2025_06_10_HIGH=296]="MODEL_O3_PRO_2025_06_10_HIGH",g[g.MODEL_GPT_OSS_120B=326]="MODEL_GPT_OSS_120B",g[g.MODEL_GPT_5_NANO=337]="MODEL_GPT_5_NANO",g[g.MODEL_CHAT_GPT_5_MINIMAL=338]="MODEL_CHAT_GPT_5_MINIMAL",g[g.MODEL_CHAT_GPT_5_LOW=339]="MODEL_CHAT_GPT_5_LOW",g[g.MODEL_CHAT_GPT_5=340]="MODEL_CHAT_GPT_5",g[g.MODEL_CHAT_GPT_5_HIGH=341]="MODEL_CHAT_GPT_5_HIGH",g[g.MODEL_CHAT_GPT_5_CODEX=346]="MODEL_CHAT_GPT_5_CODEX",g[g.MODEL_GPT_5_1_CODEX_MINI_LOW=385]="MODEL_GPT_5_1_CODEX_MINI_LOW",g[g.MODEL_GPT_5_1_CODEX_MINI_MEDIUM=386]="MODEL_GPT_5_1_CODEX_MINI_MEDIUM",g[g.MODEL_GPT_5_1_CODEX_MINI_HIGH=387]="MODEL_GPT_5_1_CODEX_MINI_HIGH",g[g.MODEL_GPT_5_1_CODEX_LOW=388]="MODEL_GPT_5_1_CODEX_LOW",g[g.MODEL_GPT_5_1_CODEX_MEDIUM=389]="MODEL_GPT_5_1_CODEX_MEDIUM",g[g.MODEL_GPT_5_1_CODEX_HIGH=390]="MODEL_GPT_5_1_CODEX_HIGH",g[g.MODEL_GPT_5_1_CODEX_MAX_LOW=395]="MODEL_GPT_5_1_CODEX_MAX_LOW",g[g.MODEL_GPT_5_1_CODEX_MAX_MEDIUM=396]="MODEL_GPT_5_1_CODEX_MAX_MEDIUM",g[g.MODEL_GPT_5_1_CODEX_MAX_HIGH=397]="MODEL_GPT_5_1_CODEX_MAX_HIGH",g[g.MODEL_GOOGLE_GEMINI_1_0_PRO=61]="MODEL_GOOGLE_GEMINI_1_0_PRO",g[g.MODEL_GOOGLE_GEMINI_1_5_PRO=62]="MODEL_GOOGLE_GEMINI_1_5_PRO",g[g.MODEL_GOOGLE_GEMINI_EXP_1206=183]="MODEL_GOOGLE_GEMINI_EXP_1206",g[g.MODEL_GOOGLE_GEMINI_2_0_FLASH=184]="MODEL_GOOGLE_GEMINI_2_0_FLASH",g[g.MODEL_GOOGLE_GEMINI_2_5_PRO=246]="MODEL_GOOGLE_GEMINI_2_5_PRO",g[g.MODEL_GOOGLE_GEMINI_2_5_FLASH_PREVIEW_04_17=272]="MODEL_GOOGLE_GEMINI_2_5_FLASH_PREVIEW_04_17",g[g.MODEL_GOOGLE_GEMINI_2_5_FLASH_PREVIEW_05_20=275]="MODEL_GOOGLE_GEMINI_2_5_FLASH_PREVIEW_05_20",g[g.MODEL_GOOGLE_GEMINI_2_5_FLASH_PREVIEW_05_20_THINKING=276]="MODEL_GOOGLE_GEMINI_2_5_FLASH_PREVIEW_05_20_THINKING",g[g.MODEL_GOOGLE_GEMINI_2_5_FLASH=312]="MODEL_GOOGLE_GEMINI_2_5_FLASH",g[g.MODEL_GOOGLE_GEMINI_2_5_FLASH_THINKING=313]="MODEL_GOOGLE_GEMINI_2_5_FLASH_THINKING",g[g.MODEL_GOOGLE_GEMINI_2_5_FLASH_LITE=343]="MODEL_GOOGLE_GEMINI_2_5_FLASH_LITE",g[g.MODEL_GOOGLE_GEMINI_3_0_PRO_LOW=378]="MODEL_GOOGLE_GEMINI_3_0_PRO_LOW",g[g.MODEL_GOOGLE_GEMINI_3_0_PRO_HIGH=379]="MODEL_GOOGLE_GEMINI_3_0_PRO_HIGH",g[g.MODEL_GOOGLE_GEMINI_3_0_PRO_MINIMAL=411]="MODEL_GOOGLE_GEMINI_3_0_PRO_MINIMAL",g[g.MODEL_GOOGLE_GEMINI_3_0_PRO_MEDIUM=412]="MODEL_GOOGLE_GEMINI_3_0_PRO_MEDIUM",g[g.MODEL_GOOGLE_GEMINI_3_0_FLASH_MINIMAL=413]="MODEL_GOOGLE_GEMINI_3_0_FLASH_MINIMAL",g[g.MODEL_GOOGLE_GEMINI_3_0_FLASH_LOW=414]="MODEL_GOOGLE_GEMINI_3_0_FLASH_LOW",g[g.MODEL_GOOGLE_GEMINI_3_0_FLASH_MEDIUM=415]="MODEL_GOOGLE_GEMINI_3_0_FLASH_MEDIUM",g[g.MODEL_GOOGLE_GEMINI_3_0_FLASH_HIGH=416]="MODEL_GOOGLE_GEMINI_3_0_FLASH_HIGH",g[g.MODEL_CLAUDE_3_OPUS_20240229=63]="MODEL_CLAUDE_3_OPUS_20240229",g[g.MODEL_CLAUDE_3_SONNET_20240229=64]="MODEL_CLAUDE_3_SONNET_20240229",g[g.MODEL_CLAUDE_3_HAIKU_20240307=172]="MODEL_CLAUDE_3_HAIKU_20240307",g[g.MODEL_CLAUDE_3_5_HAIKU_20241022=171]="MODEL_CLAUDE_3_5_HAIKU_20241022",g[g.MODEL_CLAUDE_3_5_SONNET_20240620=80]="MODEL_CLAUDE_3_5_SONNET_20240620",g[g.MODEL_CLAUDE_3_5_SONNET_20241022=166]="MODEL_CLAUDE_3_5_SONNET_20241022",g[g.MODEL_CLAUDE_3_7_SONNET_20250219=226]="MODEL_CLAUDE_3_7_SONNET_20250219",g[g.MODEL_CLAUDE_3_7_SONNET_20250219_THINKING=227]="MODEL_CLAUDE_3_7_SONNET_20250219_THINKING",g[g.MODEL_CLAUDE_3_5_SONNET_BYOK=284]="MODEL_CLAUDE_3_5_SONNET_BYOK",g[g.MODEL_CLAUDE_3_7_SONNET_BYOK=285]="MODEL_CLAUDE_3_7_SONNET_BYOK",g[g.MODEL_CLAUDE_3_7_SONNET_OPEN_ROUTER_BYOK=319]="MODEL_CLAUDE_3_7_SONNET_OPEN_ROUTER_BYOK",g[g.MODEL_CLAUDE_3_7_SONNET_THINKING_BYOK=286]="MODEL_CLAUDE_3_7_SONNET_THINKING_BYOK",g[g.MODEL_CLAUDE_3_7_SONNET_THINKING_OPEN_ROUTER_BYOK=320]="MODEL_CLAUDE_3_7_SONNET_THINKING_OPEN_ROUTER_BYOK",g[g.MODEL_CLAUDE_4_OPUS_BYOK=277]="MODEL_CLAUDE_4_OPUS_BYOK",g[g.MODEL_CLAUDE_4_OPUS_THINKING_BYOK=278]="MODEL_CLAUDE_4_OPUS_THINKING_BYOK",g[g.MODEL_CLAUDE_4_OPUS=290]="MODEL_CLAUDE_4_OPUS",g[g.MODEL_CLAUDE_4_OPUS_THINKING=291]="MODEL_CLAUDE_4_OPUS_THINKING",g[g.MODEL_CLAUDE_4_SONNET_BYOK=279]="MODEL_CLAUDE_4_SONNET_BYOK",g[g.MODEL_CLAUDE_4_SONNET_OPEN_ROUTER_BYOK=321]="MODEL_CLAUDE_4_SONNET_OPEN_ROUTER_BYOK",g[g.MODEL_CLAUDE_4_SONNET_THINKING_BYOK=280]="MODEL_CLAUDE_4_SONNET_THINKING_BYOK",g[g.MODEL_CLAUDE_4_SONNET_THINKING_OPEN_ROUTER_BYOK=322]="MODEL_CLAUDE_4_SONNET_THINKING_OPEN_ROUTER_BYOK",g[g.MODEL_CLAUDE_4_SONNET=281]="MODEL_CLAUDE_4_SONNET",g[g.MODEL_CLAUDE_4_SONNET_THINKING=282]="MODEL_CLAUDE_4_SONNET_THINKING",g[g.MODEL_CLAUDE_4_1_OPUS=328]="MODEL_CLAUDE_4_1_OPUS",g[g.MODEL_CLAUDE_4_1_OPUS_THINKING=329]="MODEL_CLAUDE_4_1_OPUS_THINKING",g[g.MODEL_CLAUDE_4_5_SONNET=353]="MODEL_CLAUDE_4_5_SONNET",g[g.MODEL_CLAUDE_4_5_SONNET_THINKING=354]="MODEL_CLAUDE_4_5_SONNET_THINKING",g[g.MODEL_CLAUDE_4_5_SONNET_1M=370]="MODEL_CLAUDE_4_5_SONNET_1M",g[g.MODEL_CLAUDE_4_5_SONNET_THINKING_1M=371]="MODEL_CLAUDE_4_5_SONNET_THINKING_1M",g[g.MODEL_CLAUDE_4_5_OPUS=391]="MODEL_CLAUDE_4_5_OPUS",g[g.MODEL_CLAUDE_4_5_OPUS_THINKING=392]="MODEL_CLAUDE_4_5_OPUS_THINKING",g[g.MODEL_CLAUDE_4_SONNET_DATABRICKS=292]="MODEL_CLAUDE_4_SONNET_DATABRICKS",g[g.MODEL_CLAUDE_4_SONNET_THINKING_DATABRICKS=293]="MODEL_CLAUDE_4_SONNET_THINKING_DATABRICKS",g[g.MODEL_TOGETHERAI_TEXT_EMBEDDING_M2_BERT=81]="MODEL_TOGETHERAI_TEXT_EMBEDDING_M2_BERT",g[g.MODEL_TOGETHERAI_LLAMA_3_1_8B_INSTRUCT=165]="MODEL_TOGETHERAI_LLAMA_3_1_8B_INSTRUCT",g[g.MODEL_HUGGING_FACE_TEXT_EMBEDDING_M2_BERT=82]="MODEL_HUGGING_FACE_TEXT_EMBEDDING_M2_BERT",g[g.MODEL_HUGGING_FACE_TEXT_EMBEDDING_UAE_CODE=83]="MODEL_HUGGING_FACE_TEXT_EMBEDDING_UAE_CODE",g[g.MODEL_HUGGING_FACE_TEXT_EMBEDDING_BGE=84]="MODEL_HUGGING_FACE_TEXT_EMBEDDING_BGE",g[g.MODEL_HUGGING_FACE_TEXT_EMBEDDING_BLADE=85]="MODEL_HUGGING_FACE_TEXT_EMBEDDING_BLADE",g[g.MODEL_HUGGING_FACE_TEXT_EMBEDDING_ARCTIC_LARGE=86]="MODEL_HUGGING_FACE_TEXT_EMBEDDING_ARCTIC_LARGE",g[g.MODEL_HUGGING_FACE_TEXT_EMBEDDING_E5_BASE=87]="MODEL_HUGGING_FACE_TEXT_EMBEDDING_E5_BASE",g[g.MODEL_HUGGING_FACE_TEXT_EMBEDDING_MXBAI=88]="MODEL_HUGGING_FACE_TEXT_EMBEDDING_MXBAI",g[g.MODEL_LLAMA_3_1_8B_INSTRUCT=106]="MODEL_LLAMA_3_1_8B_INSTRUCT",g[g.MODEL_LLAMA_3_1_70B_INSTRUCT=107]="MODEL_LLAMA_3_1_70B_INSTRUCT",g[g.MODEL_LLAMA_3_1_405B_INSTRUCT=105]="MODEL_LLAMA_3_1_405B_INSTRUCT",g[g.MODEL_LLAMA_3_3_70B_INSTRUCT=208]="MODEL_LLAMA_3_3_70B_INSTRUCT",g[g.MODEL_LLAMA_3_3_70B_INSTRUCT_R1=209]="MODEL_LLAMA_3_3_70B_INSTRUCT_R1",g[g.MODEL_LLAMA_3_1_70B_INSTRUCT_LONG_CONTEXT=116]="MODEL_LLAMA_3_1_70B_INSTRUCT_LONG_CONTEXT",g[g.MODEL_LLAMA_3_1_8B_HERMES_3=176]="MODEL_LLAMA_3_1_8B_HERMES_3",g[g.MODEL_LLAMA_3_1_70B_HERMES_3=177]="MODEL_LLAMA_3_1_70B_HERMES_3",g[g.MODEL_QWEN_2_5_7B_INSTRUCT=178]="MODEL_QWEN_2_5_7B_INSTRUCT",g[g.MODEL_QWEN_2_5_32B_INSTRUCT=179]="MODEL_QWEN_2_5_32B_INSTRUCT",g[g.MODEL_QWEN_2_5_72B_INSTRUCT=180]="MODEL_QWEN_2_5_72B_INSTRUCT",g[g.MODEL_QWEN_2_5_32B_INSTRUCT_R1=224]="MODEL_QWEN_2_5_32B_INSTRUCT_R1",g[g.MODEL_QWEN_3_235B_INSTRUCT=324]="MODEL_QWEN_3_235B_INSTRUCT",g[g.MODEL_QWEN_3_CODER_480B_INSTRUCT=325]="MODEL_QWEN_3_CODER_480B_INSTRUCT",g[g.MODEL_QWEN_3_CODER_480B_INSTRUCT_FAST=327]="MODEL_QWEN_3_CODER_480B_INSTRUCT_FAST",g[g.MODEL_GLM_4_5=342]="MODEL_GLM_4_5",g[g.MODEL_GLM_4_5_FAST=352]="MODEL_GLM_4_5_FAST",g[g.MODEL_GLM_4_6=356]="MODEL_GLM_4_6",g[g.MODEL_GLM_4_6_FAST=357]="MODEL_GLM_4_6_FAST",g[g.MODEL_GLM_4_7=417]="MODEL_GLM_4_7",g[g.MODEL_GLM_4_7_FAST=418]="MODEL_GLM_4_7_FAST",g[g.MODEL_SWE_1_5=359]="MODEL_SWE_1_5",g[g.MODEL_SWE_1_5_REDIRECT=361]="MODEL_SWE_1_5_REDIRECT",g[g.MODEL_SWE_1_5_THINKING=369]="MODEL_SWE_1_5_THINKING",g[g.MODEL_SWE_1_5_SLOW=377]="MODEL_SWE_1_5_SLOW",g[g.MODEL_SWE_1_6=420]="MODEL_SWE_1_6",g[g.MODEL_SWE_1_6_FAST=421]="MODEL_SWE_1_6_FAST",g[g.MODEL_CODEMAP_SMALL=358]="MODEL_CODEMAP_SMALL",g[g.MODEL_CODEMAP_MEDIUM=360]="MODEL_CODEMAP_MEDIUM",g[g.MODEL_CODEMAP_SMART=362]="MODEL_CODEMAP_SMART",g[g.MODEL_COGNITION_INSTANT_CONTEXT=355]="MODEL_COGNITION_INSTANT_CONTEXT",g[g.MODEL_LLAMA_FT_DEEPWIKI_ARTICLE=335]="MODEL_LLAMA_FT_DEEPWIKI_ARTICLE",g[g.MODEL_LLAMA_FT_DEEPWIKI_HOVER=336]="MODEL_LLAMA_FT_DEEPWIKI_HOVER",g[g.MODEL_LLAMA_FT_LIFEGUARD=398]="MODEL_LLAMA_FT_LIFEGUARD",g[g.MODEL_COGNITION_LIFEGUARD=410]="MODEL_COGNITION_LIFEGUARD",g[g.MODEL_NOMIC_TEXT_EMBEDDING_V1=89]="MODEL_NOMIC_TEXT_EMBEDDING_V1",g[g.MODEL_NOMIC_TEXT_EMBEDDING_V1_5=90]="MODEL_NOMIC_TEXT_EMBEDDING_V1_5",g[g.MODEL_MISTRAL_7B=77]="MODEL_MISTRAL_7B",g[g.MODEL_SALESFORCE_EMBEDDING_2R=99]="MODEL_SALESFORCE_EMBEDDING_2R",g[g.MODEL_CUSTOM_VLLM=182]="MODEL_CUSTOM_VLLM",g[g.MODEL_TEI_BGE_M3=92]="MODEL_TEI_BGE_M3",g[g.MODEL_TEI_NOMIC_EMBED_TEXT_V1=93]="MODEL_TEI_NOMIC_EMBED_TEXT_V1",g[g.MODEL_TEI_INTFLOAT_E5_LARGE_INSTRUCT=94]="MODEL_TEI_INTFLOAT_E5_LARGE_INSTRUCT",g[g.MODEL_TEI_SNOWFLAKE_ARCTIC_EMBED_L=95]="MODEL_TEI_SNOWFLAKE_ARCTIC_EMBED_L",g[g.MODEL_TEI_UAE_CODE_LARGE_V1=96]="MODEL_TEI_UAE_CODE_LARGE_V1",g[g.MODEL_TEI_B1ADE=97]="MODEL_TEI_B1ADE",g[g.MODEL_TEI_WHEREISAI_UAE_LARGE_V1=98]="MODEL_TEI_WHEREISAI_UAE_LARGE_V1",g[g.MODEL_TEI_WHEREISAI_UAE_CODE_LARGE_V1=100]="MODEL_TEI_WHEREISAI_UAE_CODE_LARGE_V1",g[g.MODEL_OPENAI_COMPATIBLE=200]="MODEL_OPENAI_COMPATIBLE",g[g.MODEL_ANTHROPIC_COMPATIBLE=201]="MODEL_ANTHROPIC_COMPATIBLE",g[g.MODEL_VERTEX_COMPATIBLE=202]="MODEL_VERTEX_COMPATIBLE",g[g.MODEL_BEDROCK_COMPATIBLE=203]="MODEL_BEDROCK_COMPATIBLE",g[g.MODEL_AZURE_COMPATIBLE=204]="MODEL_AZURE_COMPATIBLE",g[g.MODEL_DEEPSEEK_V3=205]="MODEL_DEEPSEEK_V3",g[g.MODEL_DEEPSEEK_R1=206]="MODEL_DEEPSEEK_R1",g[g.MODEL_DEEPSEEK_R1_SLOW=215]="MODEL_DEEPSEEK_R1_SLOW",g[g.MODEL_DEEPSEEK_R1_FAST=216]="MODEL_DEEPSEEK_R1_FAST",g[g.MODEL_KIMI_K2=323]="MODEL_KIMI_K2",g[g.MODEL_MINIMAX_M2=368]="MODEL_MINIMAX_M2",g[g.MODEL_MINIMAX_M2_1=419]="MODEL_MINIMAX_M2_1",g[g.MODEL_DEEPSEEK_V3_2=409]="MODEL_DEEPSEEK_V3_2",g[g.MODEL_KIMI_K2_THINKING=394]="MODEL_KIMI_K2_THINKING",g[g.MODEL_CUSTOM_OPEN_ROUTER=185]="MODEL_CUSTOM_OPEN_ROUTER",g[g.MODEL_XAI_GROK_2=212]="MODEL_XAI_GROK_2",g[g.MODEL_XAI_GROK_3=217]="MODEL_XAI_GROK_3",g[g.MODEL_XAI_GROK_3_MINI_REASONING=234]="MODEL_XAI_GROK_3_MINI_REASONING",g[g.MODEL_XAI_GROK_CODE_FAST=345]="MODEL_XAI_GROK_CODE_FAST",g[g.MODEL_PRIVATE_1=219]="MODEL_PRIVATE_1",g[g.MODEL_PRIVATE_2=220]="MODEL_PRIVATE_2",g[g.MODEL_PRIVATE_3=221]="MODEL_PRIVATE_3",g[g.MODEL_PRIVATE_4=222]="MODEL_PRIVATE_4",g[g.MODEL_PRIVATE_5=223]="MODEL_PRIVATE_5",g[g.MODEL_PRIVATE_6=314]="MODEL_PRIVATE_6",g[g.MODEL_PRIVATE_7=315]="MODEL_PRIVATE_7",g[g.MODEL_PRIVATE_8=316]="MODEL_PRIVATE_8",g[g.MODEL_PRIVATE_9=317]="MODEL_PRIVATE_9",g[g.MODEL_PRIVATE_10=318]="MODEL_PRIVATE_10",g[g.MODEL_PRIVATE_11=347]="MODEL_PRIVATE_11",g[g.MODEL_PRIVATE_12=348]="MODEL_PRIVATE_12",g[g.MODEL_PRIVATE_13=349]="MODEL_PRIVATE_13",g[g.MODEL_PRIVATE_14=350]="MODEL_PRIVATE_14",g[g.MODEL_PRIVATE_15=351]="MODEL_PRIVATE_15",g[g.MODEL_PRIVATE_16=363]="MODEL_PRIVATE_16",g[g.MODEL_PRIVATE_17=364]="MODEL_PRIVATE_17",g[g.MODEL_PRIVATE_18=365]="MODEL_PRIVATE_18",g[g.MODEL_PRIVATE_19=366]="MODEL_PRIVATE_19",g[g.MODEL_PRIVATE_20=367]="MODEL_PRIVATE_20",g[g.MODEL_PRIVATE_21=372]="MODEL_PRIVATE_21",g[g.MODEL_PRIVATE_22=373]="MODEL_PRIVATE_22",g[g.MODEL_PRIVATE_23=374]="MODEL_PRIVATE_23",g[g.MODEL_PRIVATE_24=375]="MODEL_PRIVATE_24",g[g.MODEL_PRIVATE_25=376]="MODEL_PRIVATE_25",g[g.MODEL_PRIVATE_26=380]="MODEL_PRIVATE_26",g[g.MODEL_PRIVATE_27=381]="MODEL_PRIVATE_27",g[g.MODEL_PRIVATE_28=382]="MODEL_PRIVATE_28",g[g.MODEL_PRIVATE_29=383]="MODEL_PRIVATE_29",g[g.MODEL_PRIVATE_30=384]="MODEL_PRIVATE_30",g[g.MODEL_GPT_5_2_NONE=399]="MODEL_GPT_5_2_NONE",g[g.MODEL_GPT_5_2_LOW=400]="MODEL_GPT_5_2_LOW",g[g.MODEL_GPT_5_2_MEDIUM=401]="MODEL_GPT_5_2_MEDIUM",g[g.MODEL_GPT_5_2_HIGH=402]="MODEL_GPT_5_2_HIGH",g[g.MODEL_GPT_5_2_XHIGH=403]="MODEL_GPT_5_2_XHIGH",g[g.MODEL_GPT_5_2_NONE_PRIORITY=404]="MODEL_GPT_5_2_NONE_PRIORITY",g[g.MODEL_GPT_5_2_LOW_PRIORITY=405]="MODEL_GPT_5_2_LOW_PRIORITY",g[g.MODEL_GPT_5_2_MEDIUM_PRIORITY=406]="MODEL_GPT_5_2_MEDIUM_PRIORITY",g[g.MODEL_GPT_5_2_HIGH_PRIORITY=407]="MODEL_GPT_5_2_HIGH_PRIORITY",g[g.MODEL_GPT_5_2_XHIGH_PRIORITY=408]="MODEL_GPT_5_2_XHIGH_PRIORITY",g[g.MODEL_GPT_5_2_CODEX_LOW=422]="MODEL_GPT_5_2_CODEX_LOW",g[g.MODEL_GPT_5_2_CODEX_MEDIUM=423]="MODEL_GPT_5_2_CODEX_MEDIUM",g[g.MODEL_GPT_5_2_CODEX_HIGH=424]="MODEL_GPT_5_2_CODEX_HIGH",g[g.MODEL_GPT_5_2_CODEX_XHIGH=425]="MODEL_GPT_5_2_CODEX_XHIGH",g[g.MODEL_GPT_5_2_CODEX_LOW_PRIORITY=426]="MODEL_GPT_5_2_CODEX_LOW_PRIORITY",g[g.MODEL_GPT_5_2_CODEX_MEDIUM_PRIORITY=427]="MODEL_GPT_5_2_CODEX_MEDIUM_PRIORITY",g[g.MODEL_GPT_5_2_CODEX_HIGH_PRIORITY=428]="MODEL_GPT_5_2_CODEX_HIGH_PRIORITY",g[g.MODEL_GPT_5_2_CODEX_XHIGH_PRIORITY=429]="MODEL_GPT_5_2_CODEX_XHIGH_PRIORITY",g[g.MODEL_SGLANG_ROLLOUT=600]="MODEL_SGLANG_ROLLOUT",g))(Yn||{});d.util.setEnumType(Yn,"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"}]);SF=(o=>(o[o.UNSPECIFIED=0]="UNSPECIFIED",o[o.CAPACITY_FALLBACK=1]="CAPACITY_FALLBACK",o[o.LITE_FREE=2]="LITE_FREE",o[o.LITE_PAID=3]="LITE_PAID",o[o.PREMIUM=4]="PREMIUM",o))(SF||{});d.util.setEnumType(SF,"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"}]);$C=(o=>(o[o.EXCLUSION_UNSPECIFIED=0]="EXCLUSION_UNSPECIFIED",o[o.EXCLUSION_ELEMENT_KIND_DISABLED=1]="EXCLUSION_ELEMENT_KIND_DISABLED",o[o.EXCLUSION_ELEMENT_MISSING_DEPENDENCY=2]="EXCLUSION_ELEMENT_MISSING_DEPENDENCY",o[o.EXCLUSION_TOKEN_BUDGET=3]="EXCLUSION_TOKEN_BUDGET",o[o.EXCLUSION_ACTIVE_SOURCE_OVERLAP=4]="EXCLUSION_ACTIVE_SOURCE_OVERLAP",o))($C||{});d.util.setEnumType($C,"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"}]);Vf=(E=>(E[E.UNSPECIFIED=0]="UNSPECIFIED",E[E.INCOMPLETE=1]="INCOMPLETE",E[E.STOP_PATTERN=2]="STOP_PATTERN",E[E.MAX_TOKENS=3]="MAX_TOKENS",E[E.MIN_LOG_PROB=4]="MIN_LOG_PROB",E[E.MAX_NEWLINES=5]="MAX_NEWLINES",E[E.EXIT_SCOPE=6]="EXIT_SCOPE",E[E.NONFINITE_LOGIT_OR_PROB=7]="NONFINITE_LOGIT_OR_PROB",E[E.FIRST_NON_WHITESPACE_LINE=8]="FIRST_NON_WHITESPACE_LINE",E[E.PARTIAL=9]="PARTIAL",E[E.FUNCTION_CALL=10]="FUNCTION_CALL",E[E.CONTENT_FILTER=11]="CONTENT_FILTER",E[E.NON_INSERTION=12]="NON_INSERTION",E[E.ERROR=13]="ERROR",E))(Vf||{});d.util.setEnumType(Vf,"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"}]);ZC=(u=>(u[u.NONE=0]="NONE",u[u.INCOMPLETE=1]="INCOMPLETE",u[u.EMPTY=2]="EMPTY",u[u.REPETITIVE=3]="REPETITIVE",u[u.DUPLICATE=4]="DUPLICATE",u[u.LONG_LINE=5]="LONG_LINE",u[u.COMPLETIONS_CUTOFF=6]="COMPLETIONS_CUTOFF",u[u.ATTRIBUTION=7]="ATTRIBUTION",u[u.NON_MATCHING=8]="NON_MATCHING",u[u.NON_INSERTION=9]="NON_INSERTION",u))(ZC||{});d.util.setEnumType(ZC,"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"}]);eA=(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))(eA||{});d.util.setEnumType(eA,"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"}]);tA=(t=>(t[t.UNSPECIFIED=0]="UNSPECIFIED",t[t.HIGH=1]="HIGH",t[t.LOW=2]="LOW",t))(tA||{});d.util.setEnumType(tA,"exa.codeium_common_pb.EmbeddingPriority",[{no:0,name:"EMBEDDING_PRIORITY_UNSPECIFIED"},{no:1,name:"EMBEDDING_PRIORITY_HIGH"},{no:2,name:"EMBEDDING_PRIORITY_LOW"}]);nA=(o=>(o[o.UNSPECIFIED=0]="UNSPECIFIED",o[o.NOMIC_DOCUMENT=1]="NOMIC_DOCUMENT",o[o.NOMIC_SEARCH=2]="NOMIC_SEARCH",o[o.NOMIC_CLASSIFICATION=3]="NOMIC_CLASSIFICATION",o[o.NOMIC_CLUSTERING=4]="NOMIC_CLUSTERING",o))(nA||{});d.util.setEnumType(nA,"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"}]);rA=(t=>(t[t.UNSPECIFIED=0]="UNSPECIFIED",t[t.CODE_CONTEXT_ITEM=1]="CODE_CONTEXT_ITEM",t[t.COMMIT_INTENT=2]="COMMIT_INTENT",t))(rA||{});d.util.setEnumType(rA,"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"}]);iA=(c=>(c[c.CODEIUM=0]="CODEIUM",c[c.DEEPNOTE=1]="DEEPNOTE",c[c.CODESANDBOX=2]="CODESANDBOX",c[c.STACKBLITZ=3]="STACKBLITZ",c[c.VALTOWN=4]="VALTOWN",c[c.HEX=5]="HEX",c[c.ZAPIER=6]="ZAPIER",c[c.SUPERBLOCKS=7]="SUPERBLOCKS",c[c.EMBARCADERO=8]="EMBARCADERO",c))(iA||{});d.util.setEnumType(iA,"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"}]);oA=(E=>(E[E.UNSPECIFIED=0]="UNSPECIFIED",E[E.ENABLE_CODEIUM=1]="ENABLE_CODEIUM",E[E.DISABLE_CODEIUM=2]="DISABLE_CODEIUM",E[E.SHOW_PREVIOUS_COMPLETION=3]="SHOW_PREVIOUS_COMPLETION",E[E.SHOW_NEXT_COMPLETION=4]="SHOW_NEXT_COMPLETION",E[E.COPILOT_STATUS=5]="COPILOT_STATUS",E[E.COMPLETION_SUPPRESSED=6]="COMPLETION_SUPPRESSED",E[E.MEMORY_STATS=8]="MEMORY_STATS",E[E.LOCAL_CONTEXT_RELEVANCE_CHECK=9]="LOCAL_CONTEXT_RELEVANCE_CHECK",E[E.ACTIVE_EDITOR_CHANGED=10]="ACTIVE_EDITOR_CHANGED",E[E.SHOW_PREVIOUS_CORTEX_STEP=11]="SHOW_PREVIOUS_CORTEX_STEP",E[E.SHOW_NEXT_CORTEX_STEP=12]="SHOW_NEXT_CORTEX_STEP",E[E.INDEXER_STATS=13]="INDEXER_STATS",E[E.SYSTEM_METRICS_TELEMETRY=14]="SYSTEM_METRICS_TELEMETRY",E))(oA||{});d.util.setEnumType(oA,"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"}]);sA=(t=>(t[t.UNSPECIFIED=0]="UNSPECIFIED",t[t.CLUSTER=1]="CLUSTER",t[t.EXACT=2]="EXACT",t))(sA||{});d.util.setEnumType(sA,"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"}]);aA=(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))(aA||{});d.util.setEnumType(aA,"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"}]);_F=(i=>(i[i.UNSPECIFIED=0]="UNSPECIFIED",i[i.TYPING_AS_SUGGESTED=1]="TYPING_AS_SUGGESTED",i[i.CACHE=2]="CACHE",i[i.NETWORK=3]="NETWORK",i))(_F||{});d.util.setEnumType(_F,"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"}]);wF=(o=>(o[o.UNSPECIFIED=0]="UNSPECIFIED",o[o.SINGLE=1]="SINGLE",o[o.MULTI=2]="MULTI",o[o.INLINE_FIM=3]="INLINE_FIM",o[o.CASCADE=4]="CASCADE",o))(wF||{});d.util.setEnumType(wF,"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"}]);yo=(L=>(L[L.UNSPECIFIED=0]="UNSPECIFIED",L[L.C=1]="C",L[L.CLOJURE=2]="CLOJURE",L[L.COFFEESCRIPT=3]="COFFEESCRIPT",L[L.CPP=4]="CPP",L[L.CSHARP=5]="CSHARP",L[L.CSS=6]="CSS",L[L.CUDACPP=7]="CUDACPP",L[L.DOCKERFILE=8]="DOCKERFILE",L[L.GO=9]="GO",L[L.GROOVY=10]="GROOVY",L[L.HANDLEBARS=11]="HANDLEBARS",L[L.HASKELL=12]="HASKELL",L[L.HCL=13]="HCL",L[L.HTML=14]="HTML",L[L.INI=15]="INI",L[L.JAVA=16]="JAVA",L[L.JAVASCRIPT=17]="JAVASCRIPT",L[L.JSON=18]="JSON",L[L.JULIA=19]="JULIA",L[L.KOTLIN=20]="KOTLIN",L[L.LATEX=21]="LATEX",L[L.LESS=22]="LESS",L[L.LUA=23]="LUA",L[L.MAKEFILE=24]="MAKEFILE",L[L.MARKDOWN=25]="MARKDOWN",L[L.OBJECTIVEC=26]="OBJECTIVEC",L[L.OBJECTIVECPP=27]="OBJECTIVECPP",L[L.PERL=28]="PERL",L[L.PHP=29]="PHP",L[L.PLAINTEXT=30]="PLAINTEXT",L[L.PROTOBUF=31]="PROTOBUF",L[L.PBTXT=32]="PBTXT",L[L.PYTHON=33]="PYTHON",L[L.R=34]="R",L[L.RUBY=35]="RUBY",L[L.RUST=36]="RUST",L[L.SASS=37]="SASS",L[L.SCALA=38]="SCALA",L[L.SCSS=39]="SCSS",L[L.SHELL=40]="SHELL",L[L.SQL=41]="SQL",L[L.STARLARK=42]="STARLARK",L[L.SWIFT=43]="SWIFT",L[L.TSX=44]="TSX",L[L.TYPESCRIPT=45]="TYPESCRIPT",L[L.VISUALBASIC=46]="VISUALBASIC",L[L.VUE=47]="VUE",L[L.XML=48]="XML",L[L.XSL=49]="XSL",L[L.YAML=50]="YAML",L[L.SVELTE=51]="SVELTE",L[L.TOML=52]="TOML",L[L.DART=53]="DART",L[L.RST=54]="RST",L[L.OCAML=55]="OCAML",L[L.CMAKE=56]="CMAKE",L[L.PASCAL=57]="PASCAL",L[L.ELIXIR=58]="ELIXIR",L[L.FSHARP=59]="FSHARP",L[L.LISP=60]="LISP",L[L.MATLAB=61]="MATLAB",L[L.POWERSHELL=62]="POWERSHELL",L[L.SOLIDITY=63]="SOLIDITY",L[L.ADA=64]="ADA",L[L.OCAML_INTERFACE=65]="OCAML_INTERFACE",L[L.TREE_SITTER_QUERY=66]="TREE_SITTER_QUERY",L[L.APL=67]="APL",L[L.ASSEMBLY=68]="ASSEMBLY",L[L.COBOL=69]="COBOL",L[L.CRYSTAL=70]="CRYSTAL",L[L.EMACS_LISP=71]="EMACS_LISP",L[L.ERLANG=72]="ERLANG",L[L.FORTRAN=73]="FORTRAN",L[L.FREEFORM=74]="FREEFORM",L[L.GRADLE=75]="GRADLE",L[L.HACK=76]="HACK",L[L.MAVEN=77]="MAVEN",L[L.M68KASSEMBLY=78]="M68KASSEMBLY",L[L.SAS=79]="SAS",L[L.UNIXASSEMBLY=80]="UNIXASSEMBLY",L[L.VBA=81]="VBA",L[L.VIMSCRIPT=82]="VIMSCRIPT",L[L.WEBASSEMBLY=83]="WEBASSEMBLY",L[L.BLADE=84]="BLADE",L[L.ASTRO=85]="ASTRO",L[L.MUMPS=86]="MUMPS",L[L.GDSCRIPT=87]="GDSCRIPT",L[L.NIM=88]="NIM",L[L.PROLOG=89]="PROLOG",L[L.MARKDOWN_INLINE=90]="MARKDOWN_INLINE",L[L.APEX=91]="APEX",L[L.JUPYTER_NOTEBOOK=92]="JUPYTER_NOTEBOOK",L))(yo||{});d.util.setEnumType(yo,"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"}]);bF=(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))(bF||{});d.util.setEnumType(bF,"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"}]);JE=(i=>(i[i.UNSPECIFIED=0]="UNSPECIFIED",i[i.PENDING=1]="PENDING",i[i.APPROVED=2]="APPROVED",i[i.REJECTED=3]="REJECTED",i))(JE||{});d.util.setEnumType(JE,"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"}]);TF=(t=>(t[t.UNSPECIFIED=0]="UNSPECIFIED",t[t.ENABLED=1]="ENABLED",t[t.DISABLED=2]="DISABLED",t))(TF||{});d.util.setEnumType(TF,"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"}]);lA=(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))(lA||{});d.util.setEnumType(lA,"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"}]);cA=(t=>(t[t.UNSPECIFIED=0]="UNSPECIFIED",t[t.CORTEX=1]="CORTEX",t[t.CORTEX_TEST=2]="CORTEX_TEST",t))(cA||{});d.util.setEnumType(cA,"exa.codeium_common_pb.UserFeatures",[{no:0,name:"USER_FEATURES_UNSPECIFIED"},{no:1,name:"USER_FEATURES_CORTEX"},{no:2,name:"USER_FEATURES_CORTEX_TEST"}]);dA=(W=>(W[W.UNSPECIFIED=0]="UNSPECIFIED",W[W.ATTRIBUTION_READ=1]="ATTRIBUTION_READ",W[W.ANALYTICS_READ=2]="ANALYTICS_READ",W[W.LICENSE_READ=3]="LICENSE_READ",W[W.TEAM_USER_READ=4]="TEAM_USER_READ",W[W.TEAM_USER_UPDATE=5]="TEAM_USER_UPDATE",W[W.TEAM_USER_DELETE=6]="TEAM_USER_DELETE",W[W.TEAM_USER_INVITE=17]="TEAM_USER_INVITE",W[W.INDEXING_READ=7]="INDEXING_READ",W[W.INDEXING_CREATE=8]="INDEXING_CREATE",W[W.INDEXING_UPDATE=9]="INDEXING_UPDATE",W[W.INDEXING_DELETE=10]="INDEXING_DELETE",W[W.INDEXING_MANAGEMENT=27]="INDEXING_MANAGEMENT",W[W.FINETUNING_READ=19]="FINETUNING_READ",W[W.FINETUNING_CREATE=20]="FINETUNING_CREATE",W[W.FINETUNING_UPDATE=21]="FINETUNING_UPDATE",W[W.FINETUNING_DELETE=22]="FINETUNING_DELETE",W[W.SSO_READ=11]="SSO_READ",W[W.SSO_WRITE=12]="SSO_WRITE",W[W.SERVICE_KEY_READ=13]="SERVICE_KEY_READ",W[W.SERVICE_KEY_CREATE=14]="SERVICE_KEY_CREATE",W[W.SERVICE_KEY_UPDATE=28]="SERVICE_KEY_UPDATE",W[W.SERVICE_KEY_DELETE=15]="SERVICE_KEY_DELETE",W[W.ROLE_READ=23]="ROLE_READ",W[W.ROLE_CREATE=24]="ROLE_CREATE",W[W.ROLE_UPDATE=25]="ROLE_UPDATE",W[W.ROLE_DELETE=26]="ROLE_DELETE",W[W.BILLING_READ=16]="BILLING_READ",W[W.BILLING_WRITE=18]="BILLING_WRITE",W[W.EXTERNAL_CHAT_UPDATE=29]="EXTERNAL_CHAT_UPDATE",W[W.TEAM_SETTINGS_READ=30]="TEAM_SETTINGS_READ",W[W.TEAM_SETTINGS_UPDATE=31]="TEAM_SETTINGS_UPDATE",W))(dA||{});d.util.setEnumType(dA,"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"}]);Gf=(O=>(O[O.UNSPECIFIED=0]="UNSPECIFIED",O[O.TEAMS=1]="TEAMS",O[O.PRO=2]="PRO",O[O.TRIAL=9]="TRIAL",O[O.ENTERPRISE_SAAS=3]="ENTERPRISE_SAAS",O[O.HYBRID=4]="HYBRID",O[O.ENTERPRISE_SELF_HOSTED=5]="ENTERPRISE_SELF_HOSTED",O[O.ENTERPRISE_SELF_SERVE=10]="ENTERPRISE_SELF_SERVE",O[O.DEVIN_ENTERPRISE=12]="DEVIN_ENTERPRISE",O[O.DEVIN_TEAMS=14]="DEVIN_TEAMS",O[O.DEVIN_TEAMS_V2=15]="DEVIN_TEAMS_V2",O[O.DEVIN_PRO=16]="DEVIN_PRO",O[O.DEVIN_MAX=17]="DEVIN_MAX",O[O.MAX=18]="MAX",O[O.DEVIN_FREE=19]="DEVIN_FREE",O[O.DEVIN_TRIAL=20]="DEVIN_TRIAL",O[O.WAITLIST_PRO=6]="WAITLIST_PRO",O[O.TEAMS_ULTIMATE=7]="TEAMS_ULTIMATE",O[O.PRO_ULTIMATE=8]="PRO_ULTIMATE",O[O.ENTERPRISE_SAAS_POOLED=11]="ENTERPRISE_SAAS_POOLED",O))(Gf||{});d.util.setEnumType(Gf,"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"}]);qE=(p=>(p[p.UNSPECIFIED=0]="UNSPECIFIED",p[p.WINDSURF=1]="WINDSURF",p[p.OPENAI=2]="OPENAI",p[p.ANTHROPIC=3]="ANTHROPIC",p[p.GOOGLE=4]="GOOGLE",p[p.XAI=5]="XAI",p[p.DEEPSEEK=6]="DEEPSEEK",p[p.MOONSHOT=7]="MOONSHOT",p[p.QWEN=8]="QWEN",p[p.ZAI=9]="ZAI",p[p.MINIMAX=10]="MINIMAX",p))(qE||{});d.util.setEnumType(qE,"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"},{no:9,name:"MODEL_PROVIDER_ZAI"},{no:10,name:"MODEL_PROVIDER_MINIMAX"}]);uA=(i=>(i[i.UNSPECIFIED=0]="UNSPECIFIED",i[i.CREDITS=1]="CREDITS",i[i.QUOTA=2]="QUOTA",i[i.ACU=3]="ACU",i))(uA||{});d.util.setEnumType(uA,"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"}]);pA=(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))(pA||{});d.util.setEnumType(pA,"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"}]);mA=(o=>(o[o.UNSPECIFIED=0]="UNSPECIFIED",o[o.LOW=1]="LOW",o[o.MEDIUM=2]="MEDIUM",o[o.HIGH=3]="HIGH",o[o.FREE=4]="FREE",o))(mA||{});d.util.setEnumType(mA,"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"}]);fA=(t=>(t[t.UNSPECIFIED=0]="UNSPECIFIED",t[t.COST=1]="COST",t[t.COST_FUZZY=2]="COST_FUZZY",t))(fA||{});d.util.setEnumType(fA,"exa.codeium_common_pb.ModelDimensionKind",[{no:0,name:"MODEL_DIMENSION_KIND_UNSPECIFIED"},{no:1,name:"MODEL_DIMENSION_KIND_COST"},{no:2,name:"MODEL_DIMENSION_KIND_COST_FUZZY"}]);gA=(o=>(o[o.UNSPECIFIED=0]="UNSPECIFIED",o[o.SUCCEEDED=1]="SUCCEEDED",o[o.PROCESSING=2]="PROCESSING",o[o.FAILED=3]="FAILED",o[o.NO_ACTIVE=4]="NO_ACTIVE",o))(gA||{});d.util.setEnumType(gA,"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"}]);hA=(i=>(i[i.UNSPECIFIED=0]="UNSPECIFIED",i[i.NONE=1]="NONE",i[i.ACTIVE=2]="ACTIVE",i[i.EXPIRED=3]="EXPIRED",i))(hA||{});d.util.setEnumType(hA,"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"}]);IA=(o=>(o[o.UNSPECIFIED=0]="UNSPECIFIED",o[o.GITHUB=1]="GITHUB",o[o.GITLAB=2]="GITLAB",o[o.BITBUCKET=3]="BITBUCKET",o[o.AZURE_DEVOPS=4]="AZURE_DEVOPS",o))(IA||{});d.util.setEnumType(IA,"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"}]);PF=(t=>(t[t.UNSPECIFIED=0]="UNSPECIFIED",t[t.GIT=1]="GIT",t[t.PERFORCE=2]="PERFORCE",t))(PF||{});d.util.setEnumType(PF,"exa.codeium_common_pb.ScmType",[{no:0,name:"SCM_TYPE_UNSPECIFIED"},{no:1,name:"SCM_TYPE_GIT"},{no:2,name:"SCM_TYPE_PERFORCE"}]);vA=(u=>(u[u.UNSPECIFIED=0]="UNSPECIFIED",u[u.FUNCTION=1]="FUNCTION",u[u.CLASS=2]="CLASS",u[u.IMPORT=3]="IMPORT",u[u.NAIVE_LINECHUNK=4]="NAIVE_LINECHUNK",u[u.REFERENCE_FUNCTION=5]="REFERENCE_FUNCTION",u[u.REFERENCE_CLASS=6]="REFERENCE_CLASS",u[u.FILE=7]="FILE",u[u.TERMINAL=8]="TERMINAL",u[u.DIRECTORY=9]="DIRECTORY",u))(vA||{});d.util.setEnumType(vA,"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"}]);CF=(p=>(p[p.UNSPECIFIED=0]="UNSPECIFIED",p[p.OPEN_DOCS=1]="OPEN_DOCS",p[p.SEARCH_RESULT=2]="SEARCH_RESULT",p[p.IMPORT=3]="IMPORT",p[p.LOCAL_DIRECTORY=4]="LOCAL_DIRECTORY",p[p.LAST_ACTIVE_DOC=5]="LAST_ACTIVE_DOC",p[p.ORACLE_ITEMS=6]="ORACLE_ITEMS",p[p.PINNED_CONTEXT=7]="PINNED_CONTEXT",p[p.RESEARCH_STATE=8]="RESEARCH_STATE",p[p.GROUND_TRUTH_PLAN_EDIT=9]="GROUND_TRUTH_PLAN_EDIT",p[p.COMMIT_GRAPH=10]="COMMIT_GRAPH",p))(CF||{});d.util.setEnumType(CF,"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"}]);EA=(i=>(i[i.UNSPECIFIED=0]="UNSPECIFIED",i[i.RAW_SOURCE=1]="RAW_SOURCE",i[i.SIGNATURE=2]="SIGNATURE",i[i.NODEPATH=3]="NODEPATH",i))(EA||{});d.util.setEnumType(EA,"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"}]);AF=(e=>(e[e.UNSPECIFIED=0]="UNSPECIFIED",e[e.COMMIT_MESSAGE=1]="COMMIT_MESSAGE",e))(AF||{});d.util.setEnumType(AF,"exa.codeium_common_pb.CommitIntentType",[{no:0,name:"COMMIT_INTENT_TYPE_UNSPECIFIED"},{no:1,name:"COMMIT_INTENT_TYPE_COMMIT_MESSAGE"}]);RF=(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))(RF||{});d.util.setEnumType(RF,"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"}]);xF=(t=>(t[t.UNSPECIFIED=0]="UNSPECIFIED",t[t.INCLUDE=1]="INCLUDE",t[t.EXCLUDE=2]="EXCLUDE",t))(xF||{});d.util.setEnumType(xF,"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"}]);yA=(i=>(i[i.UNSPECIFIED=0]="UNSPECIFIED",i[i.AUTO=1]="AUTO",i[i.LIGHT=2]="LIGHT",i[i.DARK=3]="DARK",i))(yA||{});d.util.setEnumType(yA,"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"}]);SA=(i=>(i[i.UNSPECIFIED=0]="UNSPECIFIED",i[i.SMALL=1]="SMALL",i[i.DEFAULT=2]="DEFAULT",i[i.LARGE=3]="LARGE",i))(SA||{});d.util.setEnumType(SA,"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"}]);_A=(i=>(i[i.UNSPECIFIED=0]="UNSPECIFIED",i[i.SLOW=1]="SLOW",i[i.DEFAULT=2]="DEFAULT",i[i.FAST=3]="FAST",i))(_A||{});d.util.setEnumType(_A,"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"}]);Hf=(o=>(o[o.UNSPECIFIED=0]="UNSPECIFIED",o[o.OFF=1]="OFF",o[o.AUTO=2]="AUTO",o[o.EAGER=3]="EAGER",o[o.DISABLED=4]="DISABLED",o))(Hf||{});d.util.setEnumType(Hf,"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"}]);wA=(i=>(i[i.UNSPECIFIED=0]="UNSPECIFIED",i[i.DISABLED=1]="DISABLED",i[i.ALLOWLIST=2]="ALLOWLIST",i[i.TURBO=3]="TURBO",i))(wA||{});d.util.setEnumType(wA,"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"}]);bA=(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))(bA||{});d.util.setEnumType(bA,"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"}]);TA=(t=>(t[t.UNSPECIFIED=0]="UNSPECIFIED",t[t.ENABLED=1]="ENABLED",t[t.DISABLED=2]="DISABLED",t))(TA||{});d.util.setEnumType(TA,"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"}]);KE=(y=>(y[y.CASCADE_NUX_EVENT_UNSPECIFIED=0]="CASCADE_NUX_EVENT_UNSPECIFIED",y[y.CASCADE_NUX_EVENT_DIFF_OVERVIEW=1]="CASCADE_NUX_EVENT_DIFF_OVERVIEW",y[y.CASCADE_NUX_EVENT_WEB_SEARCH=2]="CASCADE_NUX_EVENT_WEB_SEARCH",y[y.CASCADE_NUX_EVENT_NEW_MODELS_WAVE2=3]="CASCADE_NUX_EVENT_NEW_MODELS_WAVE2",y[y.CASCADE_NUX_EVENT_TOOL_CALL=4]="CASCADE_NUX_EVENT_TOOL_CALL",y[y.CASCADE_NUX_EVENT_MODEL_SELECTOR_NUX=5]="CASCADE_NUX_EVENT_MODEL_SELECTOR_NUX",y[y.CASCADE_NUX_EVENT_TOOL_CALL_PRICING_NUX=6]="CASCADE_NUX_EVENT_TOOL_CALL_PRICING_NUX",y[y.CASCADE_NUX_EVENT_WRITE_CHAT_MODE=7]="CASCADE_NUX_EVENT_WRITE_CHAT_MODE",y[y.CASCADE_NUX_EVENT_REVERT_STEP=8]="CASCADE_NUX_EVENT_REVERT_STEP",y[y.CASCADE_NUX_EVENT_RULES=9]="CASCADE_NUX_EVENT_RULES",y[y.CASCADE_NUX_EVENT_WEB_MENTION=10]="CASCADE_NUX_EVENT_WEB_MENTION",y[y.CASCADE_NUX_EVENT_BACKGROUND_CASCADE=11]="CASCADE_NUX_EVENT_BACKGROUND_CASCADE",y[y.CASCADE_NUX_EVENT_ANTHROPIC_API_PRICING=12]="CASCADE_NUX_EVENT_ANTHROPIC_API_PRICING",y[y.CASCADE_NUX_EVENT_PLAN_MODE=13]="CASCADE_NUX_EVENT_PLAN_MODE",y[y.CASCADE_NUX_EVENT_OPEN_BROWSER_URL=14]="CASCADE_NUX_EVENT_OPEN_BROWSER_URL",y))(KE||{});d.util.setEnumType(KE,"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"}]);PA=(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))(PA||{});d.util.setEnumType(PA,"exa.codeium_common_pb.UserNUXEvent",[{no:0,name:"USER_NUX_EVENT_UNSPECIFIED"},{no:1,name:"USER_NUX_EVENT_DISMISS_WINDSURF_CROSS_SELL"}]);CA=(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))(CA||{});d.util.setEnumType(CA,"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"}]);AA=(t=>(t[t.UNSPECIFIED=0]="UNSPECIFIED",t[t.ENABLED=1]="ENABLED",t[t.DISABLED=2]="DISABLED",t))(AA||{});d.util.setEnumType(AA,"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"}]);RA=(t=>(t[t.UNSPECIFIED=0]="UNSPECIFIED",t[t.ENABLED=1]="ENABLED",t[t.DISABLED=2]="DISABLED",t))(RA||{});d.util.setEnumType(RA,"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"}]);xA=(t=>(t[t.UNSPECIFIED=0]="UNSPECIFIED",t[t.ENABLED=1]="ENABLED",t[t.DISABLED=2]="DISABLED",t))(xA||{});d.util.setEnumType(xA,"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"}]);DF=(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))(DF||{});d.util.setEnumType(DF,"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"}]);jE=(t=>(t[t.UNSPECIFIED=0]="UNSPECIFIED",t[t.ON=1]="ON",t[t.OFF=2]="OFF",t))(jE||{});d.util.setEnumType(jE,"exa.codeium_common_pb.PlanMode",[{no:0,name:"PLAN_MODE_UNSPECIFIED"},{no:1,name:"PLAN_MODE_ON"},{no:2,name:"PLAN_MODE_OFF"}]);DA=(t=>(t[t.UNSPECIFIED=0]="UNSPECIFIED",t[t.ENABLED=1]="ENABLED",t[t.DISABLED=2]="DISABLED",t))(DA||{});d.util.setEnumType(DA,"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"}]);OA=(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))(OA||{});d.util.setEnumType(OA,"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"}]);kA=(t=>(t[t.CASCADE_NUX_ICON_UNSPECIFIED=0]="CASCADE_NUX_ICON_UNSPECIFIED",t[t.CASCADE_NUX_ICON_WEB_SEARCH=1]="CASCADE_NUX_ICON_WEB_SEARCH",t[t.CASCADE_NUX_ICON_WINDSURF_BROWSER=2]="CASCADE_NUX_ICON_WINDSURF_BROWSER",t))(kA||{});d.util.setEnumType(kA,"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"}]);NA=(i=>(i[i.CASCADE_NUX_TRIGGER_UNSPECIFIED=0]="CASCADE_NUX_TRIGGER_UNSPECIFIED",i[i.CASCADE_NUX_TRIGGER_PRODUCED_CODE_DIFF=1]="CASCADE_NUX_TRIGGER_PRODUCED_CODE_DIFF",i[i.CASCADE_NUX_TRIGGER_OPEN_BROWSER_URL=3]="CASCADE_NUX_TRIGGER_OPEN_BROWSER_URL",i[i.CASCADE_NUX_TRIGGER_WEB_SEARCH=4]="CASCADE_NUX_TRIGGER_WEB_SEARCH",i))(NA||{});d.util.setEnumType(NA,"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"}]);LA=(t=>(t[t.UNSPECIFIED=0]="UNSPECIFIED",t[t.ENABLED=1]="ENABLED",t[t.DISABLED=2]="DISABLED",t))(LA||{});d.util.setEnumType(LA,"exa.codeium_common_pb.AnnotationsConfig",[{no:0,name:"ANNOTATIONS_CONFIG_UNSPECIFIED"},{no:1,name:"ANNOTATIONS_CONFIG_ENABLED"},{no:2,name:"ANNOTATIONS_CONFIG_DISABLED"}]);MA=(t=>(t[t.UNSPECIFIED=0]="UNSPECIFIED",t[t.ENABLED=1]="ENABLED",t[t.DISABLED=2]="DISABLED",t))(MA||{});d.util.setEnumType(MA,"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"}]);UA=(i=>(i[i.UNSPECIFIED=0]="UNSPECIFIED",i[i.SUPERCOMPLETE=1]="SUPERCOMPLETE",i[i.AUTOCOMPLETE=2]="AUTOCOMPLETE",i[i.OFF=3]="OFF",i))(UA||{});d.util.setEnumType(UA,"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"}]);FA=(i=>(i[i.UNSPECIFIED=0]="UNSPECIFIED",i[i.LOW=1]="LOW",i[i.MEDIUM=2]="MEDIUM",i[i.HIGH=3]="HIGH",i))(FA||{});d.util.setEnumType(FA,"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"}]);WA=(o=>(o[o.UNSPECIFIED=0]="UNSPECIFIED",o[o.COMPLETION=1]="COMPLETION",o[o.CHAT=2]="CHAT",o[o.EMBED=3]="EMBED",o[o.QUERY=4]="QUERY",o))(WA||{});d.util.setEnumType(WA,"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"}]);zE=(a=>(a[a.UNSPECIFIED=0]="UNSPECIFIED",a[a.ARENA=1]="ARENA",a[a.BATTLE_GROUP_ONLY=2]="BATTLE_GROUP_ONLY",a[a.MODEL_ROUTER=3]="MODEL_ROUTER",a[a.QUICK_REVIEW=4]="QUICK_REVIEW",a[a.MIMIC=5]="MIMIC",a[a.HIDDEN_TOOL=6]="HIDDEN_TOOL",a))(zE||{});d.util.setEnumType(zE,"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"},{no:5,name:"DISPLAY_OPTION_MIMIC"},{no:6,name:"DISPLAY_OPTION_HIDDEN_TOOL"}]);OF=(t=>(t[t.UNSPECIFIED=0]="UNSPECIFIED",t[t.FAST=1]="FAST",t[t.SMART=2]="SMART",t))(OF||{});d.util.setEnumType(OF,"exa.codeium_common_pb.ArenaTier",[{no:0,name:"ARENA_TIER_UNSPECIFIED"},{no:1,name:"ARENA_TIER_FAST"},{no:2,name:"ARENA_TIER_SMART"}]);Lu=(Z=>(Z[Z.API_PROVIDER_UNSPECIFIED=0]="API_PROVIDER_UNSPECIFIED",Z[Z.API_PROVIDER_INTERNAL=1]="API_PROVIDER_INTERNAL",Z[Z.API_PROVIDER_OPENAI=2]="API_PROVIDER_OPENAI",Z[Z.API_PROVIDER_GOOGLE_VERTEX=3]="API_PROVIDER_GOOGLE_VERTEX",Z[Z.API_PROVIDER_ANTHROPIC=4]="API_PROVIDER_ANTHROPIC",Z[Z.API_PROVIDER_VLLM=5]="API_PROVIDER_VLLM",Z[Z.API_PROVIDER_TOGETHER_AI=6]="API_PROVIDER_TOGETHER_AI",Z[Z.API_PROVIDER_HUGGING_FACE=7]="API_PROVIDER_HUGGING_FACE",Z[Z.API_PROVIDER_NOMIC=8]="API_PROVIDER_NOMIC",Z[Z.API_PROVIDER_TEI=9]="API_PROVIDER_TEI",Z[Z.API_PROVIDER_OPENAI_COMPATIBLE_EXTERNAL=10]="API_PROVIDER_OPENAI_COMPATIBLE_EXTERNAL",Z[Z.API_PROVIDER_ANTHROPIC_COMPATIBLE_EXTERNAL=11]="API_PROVIDER_ANTHROPIC_COMPATIBLE_EXTERNAL",Z[Z.API_PROVIDER_VERTEX_COMPATIBLE_EXTERNAL=12]="API_PROVIDER_VERTEX_COMPATIBLE_EXTERNAL",Z[Z.API_PROVIDER_BEDROCK_COMPATIBLE_EXTERNAL=13]="API_PROVIDER_BEDROCK_COMPATIBLE_EXTERNAL",Z[Z.API_PROVIDER_AZURE_COMPATIBLE_EXTERNAL=14]="API_PROVIDER_AZURE_COMPATIBLE_EXTERNAL",Z[Z.API_PROVIDER_ANTHROPIC_BEDROCK=15]="API_PROVIDER_ANTHROPIC_BEDROCK",Z[Z.API_PROVIDER_FIREWORKS=16]="API_PROVIDER_FIREWORKS",Z[Z.API_PROVIDER_OPEN_ROUTER=17]="API_PROVIDER_OPEN_ROUTER",Z[Z.API_PROVIDER_XAI=18]="API_PROVIDER_XAI",Z[Z.API_PROVIDER_ANTHROPIC_BYOK=20]="API_PROVIDER_ANTHROPIC_BYOK",Z[Z.API_PROVIDER_CEREBRAS=21]="API_PROVIDER_CEREBRAS",Z[Z.API_PROVIDER_XAI_BYOK=22]="API_PROVIDER_XAI_BYOK",Z[Z.API_PROVIDER_GEMINI_OPENAI=23]="API_PROVIDER_GEMINI_OPENAI",Z[Z.API_PROVIDER_GOOGLE_GEMINI=24]="API_PROVIDER_GOOGLE_GEMINI",Z[Z.API_PROVIDER_GOOGLE_GENAI_VERTEX=25]="API_PROVIDER_GOOGLE_GENAI_VERTEX",Z[Z.API_PROVIDER_ANTHROPIC_VERTEX=26]="API_PROVIDER_ANTHROPIC_VERTEX",Z[Z.API_PROVIDER_DATABRICKS=27]="API_PROVIDER_DATABRICKS",Z[Z.API_PROVIDER_OPEN_ROUTER_BYOK=28]="API_PROVIDER_OPEN_ROUTER_BYOK",Z[Z.API_PROVIDER_ANTHROPIC_DEVIN=29]="API_PROVIDER_ANTHROPIC_DEVIN",Z[Z.API_PROVIDER_FIREWORKS_DEVIN=30]="API_PROVIDER_FIREWORKS_DEVIN",Z[Z.API_PROVIDER_GROQ=31]="API_PROVIDER_GROQ",Z[Z.API_PROVIDER_OPENAI_DEVIN=32]="API_PROVIDER_OPENAI_DEVIN",Z[Z.API_PROVIDER_LLAMA_FT_DEEPWIKI=33]="API_PROVIDER_LLAMA_FT_DEEPWIKI",Z[Z.API_PROVIDER_XAI_INTERNAL=34]="API_PROVIDER_XAI_INTERNAL",Z[Z.API_PROVIDER_FLOODGATE=36]="API_PROVIDER_FLOODGATE",Z[Z.API_PROVIDER_ANTHROPIC_BEDROCK_US=37]="API_PROVIDER_ANTHROPIC_BEDROCK_US",Z[Z.API_PROVIDER_ANTHROPIC_BEDROCK_GLOBAL=38]="API_PROVIDER_ANTHROPIC_BEDROCK_GLOBAL",Z[Z.API_PROVIDER_MODAL=40]="API_PROVIDER_MODAL",Z[Z.API_PROVIDER_GOOGLE_GEMINI_DEVIN=41]="API_PROVIDER_GOOGLE_GEMINI_DEVIN",Z[Z.API_PROVIDER_FIREWORKS_COGNITION=42]="API_PROVIDER_FIREWORKS_COGNITION",Z[Z.API_PROVIDER_GOOGLE_GENAI_VERTEX_GLOBAL=43]="API_PROVIDER_GOOGLE_GENAI_VERTEX_GLOBAL",Z[Z.API_PROVIDER_ANTHROPIC_VERTEX_US=44]="API_PROVIDER_ANTHROPIC_VERTEX_US",Z[Z.API_PROVIDER_ANTHROPIC_VERTEX_EU=45]="API_PROVIDER_ANTHROPIC_VERTEX_EU",Z[Z.API_PROVIDER_ANTHROPIC_VERTEX_GLOBAL=46]="API_PROVIDER_ANTHROPIC_VERTEX_GLOBAL",Z[Z.API_PROVIDER_FIREWORKS_COGNITION_INTERNAL=47]="API_PROVIDER_FIREWORKS_COGNITION_INTERNAL",Z[Z.API_PROVIDER_ANTHROPIC_DATABRICKS=48]="API_PROVIDER_ANTHROPIC_DATABRICKS",Z[Z.API_PROVIDER_GEMINI_DATABRICKS=49]="API_PROVIDER_GEMINI_DATABRICKS",Z[Z.API_PROVIDER_MIMIC=50]="API_PROVIDER_MIMIC",Z[Z.API_PROVIDER_ANTHROPIC_NON_ZDR=51]="API_PROVIDER_ANTHROPIC_NON_ZDR",Z[Z.API_PROVIDER_ANTHROPIC_DEVIN_NON_ZDR=52]="API_PROVIDER_ANTHROPIC_DEVIN_NON_ZDR",Z[Z.API_PROVIDER_DATA_RETENTION_WORKSPACE_ANTHROPIC=53]="API_PROVIDER_DATA_RETENTION_WORKSPACE_ANTHROPIC",Z[Z.API_PROVIDER_TOGETHER_AI_SHADOW=54]="API_PROVIDER_TOGETHER_AI_SHADOW",Z[Z.API_PROVIDER_OPENAI_STRICT_ZDR=55]="API_PROVIDER_OPENAI_STRICT_ZDR",Z[Z.API_PROVIDER_SGLANG=60]="API_PROVIDER_SGLANG",Z[Z.API_PROVIDER_AZURE_OPENAI_FEDERATED=61]="API_PROVIDER_AZURE_OPENAI_FEDERATED",Z[Z.API_PROVIDER_DECART=62]="API_PROVIDER_DECART",Z[Z.API_PROVIDER_FIREWORKS_DEVIN_SERVERLESS=63]="API_PROVIDER_FIREWORKS_DEVIN_SERVERLESS",Z))(Lu||{});d.util.setEnumType(Lu,"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:52,name:"API_PROVIDER_ANTHROPIC_DEVIN_NON_ZDR"},{no:53,name:"API_PROVIDER_DATA_RETENTION_WORKSPACE_ANTHROPIC"},{no:54,name:"API_PROVIDER_TOGETHER_AI_SHADOW"},{no:55,name:"API_PROVIDER_OPENAI_STRICT_ZDR"},{no:60,name:"API_PROVIDER_SGLANG"},{no:61,name:"API_PROVIDER_AZURE_OPENAI_FEDERATED"},{no:62,name:"API_PROVIDER_DECART"},{no:63,name:"API_PROVIDER_FIREWORKS_DEVIN_SERVERLESS"}]);BA=(t=>(t[t.UNSPECIFIED=0]="UNSPECIFIED",t[t.INFO=1]="INFO",t[t.WARNING=2]="WARNING",t))(BA||{});d.util.setEnumType(BA,"exa.codeium_common_pb.ModelStatus",[{no:0,name:"MODEL_STATUS_UNSPECIFIED"},{no:1,name:"MODEL_STATUS_INFO"},{no:2,name:"MODEL_STATUS_WARNING"}]);kF=(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))(kF||{});d.util.setEnumType(kF,"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"}]);VA=(u=>(u[u.UNSPECIFIED=0]="UNSPECIFIED",u[u.SLACK_MESSAGE=1]="SLACK_MESSAGE",u[u.SLACK_CHANNEL=2]="SLACK_CHANNEL",u[u.GITHUB_ISSUE=3]="GITHUB_ISSUE",u[u.GITHUB_ISSUE_COMMENT=4]="GITHUB_ISSUE_COMMENT",u[u.GITHUB_REPO=8]="GITHUB_REPO",u[u.GOOGLE_DRIVE_FILE=5]="GOOGLE_DRIVE_FILE",u[u.GOOGLE_DRIVE_FOLDER=6]="GOOGLE_DRIVE_FOLDER",u[u.JIRA_ISSUE=7]="JIRA_ISSUE",u[u.CCI=9]="CCI",u))(VA||{});d.util.setEnumType(VA,"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"}]);NF=(J=>(J[J.UNSPECIFIED=0]="UNSPECIFIED",J[J.FILE=1]="FILE",J[J.DIRECTORY=2]="DIRECTORY",J[J.REPOSITORY=3]="REPOSITORY",J[J.CODE_CONTEXT=4]="CODE_CONTEXT",J[J.CCI_WITH_SUBRANGE=5]="CCI_WITH_SUBRANGE",J[J.REPOSITORY_PATH=6]="REPOSITORY_PATH",J[J.SLACK=7]="SLACK",J[J.GITHUB=8]="GITHUB",J[J.FILE_LINE_RANGE=9]="FILE_LINE_RANGE",J[J.TEXT_BLOCK=10]="TEXT_BLOCK",J[J.JIRA=11]="JIRA",J[J.GOOGLE_DRIVE=12]="GOOGLE_DRIVE",J[J.CONSOLE_LOG=13]="CONSOLE_LOG",J[J.DOM_ELEMENT=14]="DOM_ELEMENT",J[J.RECIPE=15]="RECIPE",J[J.KNOWLEDGE=16]="KNOWLEDGE",J[J.RULE=17]="RULE",J[J.MCP_RESOURCE=18]="MCP_RESOURCE",J[J.BROWSER_PAGE=19]="BROWSER_PAGE",J[J.BROWSER_CODE_BLOCK=20]="BROWSER_CODE_BLOCK",J[J.BROWSER_TEXT=21]="BROWSER_TEXT",J[J.CONVERSATION=22]="CONVERSATION",J[J.USER_ACTIVITY=23]="USER_ACTIVITY",J[J.TERMINAL=24]="TERMINAL",J[J.GITHUB_PULL_REQUEST=25]="GITHUB_PULL_REQUEST",J[J.CODE_MAP=26]="CODE_MAP",J[J.MCP_PROMPT=27]="MCP_PROMPT",J[J.SKILL=28]="SKILL",J[J.PLAN_FILE=29]="PLAN_FILE",J[J.GIT=30]="GIT",J))(NF||{});d.util.setEnumType(NF,"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"}]);LF=(y=>(y[y.UNSPECIFIED=0]="UNSPECIFIED",y[y.DEFAULT=1]="DEFAULT",y[y.FUNCTION_CODE_LENS=2]="FUNCTION_CODE_LENS",y[y.CLASS_CODE_LENS=3]="CLASS_CODE_LENS",y[y.RIGHT_CLICK_REFACTOR=4]="RIGHT_CLICK_REFACTOR",y[y.SELECTION_HINT_CODE_LENS=5]="SELECTION_HINT_CODE_LENS",y[y.LINE_HINT_CODE_LENS=6]="LINE_HINT_CODE_LENS",y[y.PLAN=7]="PLAN",y[y.FOLLOWUP=8]="FOLLOWUP",y[y.PASTE_AND_TRANSLATE=9]="PASTE_AND_TRANSLATE",y[y.SUPERCOMPLETE=10]="SUPERCOMPLETE",y[y.FUNCTION_DOCSTRING=11]="FUNCTION_DOCSTRING",y[y.FAST_APPLY=12]="FAST_APPLY",y[y.TERMINAL=13]="TERMINAL",y[y.TAB_JUMP=14]="TAB_JUMP",y))(LF||{});d.util.setEnumType(LF,"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"}]);GA=(o=>(o[o.UNSPECIFIED=0]="UNSPECIFIED",o[o.ERROR=1]="ERROR",o[o.WARNING=2]="WARNING",o[o.INFO=3]="INFO",o[o.DEBUG=4]="DEBUG",o))(GA||{});d.util.setEnumType(GA,"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"}]);MF=(i=>(i[i.UNSPECIFIED=0]="UNSPECIFIED",i[i.OVERALL=1]="OVERALL",i[i.ACTION_PREPARE=2]="ACTION_PREPARE",i[i.ACTION_APPLY=3]="ACTION_APPLY",i))(MF||{});d.util.setEnumType(MF,"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"}]);HA=(o=>(o[o.UNSPECIFIED=0]="UNSPECIFIED",o[o.OVERALL=1]="OVERALL",o[o.LAST_AUTOCOMPLETE_USAGE_TIME=2]="LAST_AUTOCOMPLETE_USAGE_TIME",o[o.LAST_CHAT_USAGE_TIME=3]="LAST_CHAT_USAGE_TIME",o[o.LAST_COMMAND_USAGE_TIME=4]="LAST_COMMAND_USAGE_TIME",o))(HA||{});d.util.setEnumType(HA,"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"}]);UF=(i=>(i[i.UNSPECIFIED=0]="UNSPECIFIED",i[i.AUTOCOMPLETE=1]="AUTOCOMPLETE",i[i.COMMAND=2]="COMMAND",i[i.CHAT=3]="CHAT",i))(UF||{});d.util.setEnumType(UF,"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"}]);FF=(p=>(p[p.UNSPECIFIED=0]="UNSPECIFIED",p[p.AUTOCOMPLETE_ACCEPT=1]="AUTOCOMPLETE_ACCEPT",p[p.CURSOR_LINE_NAVIGATION=2]="CURSOR_LINE_NAVIGATION",p[p.TYPING=3]="TYPING",p[p.FORCED=4]="FORCED",p[p.TAB_JUMP_ACCEPT=5]="TAB_JUMP_ACCEPT",p[p.SUPERCOMPLETE_ACCEPT=6]="SUPERCOMPLETE_ACCEPT",p[p.TAB_JUMP_PREDICTIVE=7]="TAB_JUMP_PREDICTIVE",p[p.AUTOCOMPLETE_PREDICTIVE=8]="AUTOCOMPLETE_PREDICTIVE",p[p.SUPERCOMPLETE_PREDICTIVE=9]="SUPERCOMPLETE_PREDICTIVE",p[p.TAB_JUMP_EDIT=10]="TAB_JUMP_EDIT",p))(FF||{});d.util.setEnumType(FF,"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"}]);Je=(I=>(I[I.EVENT_UNSPECIFIED=0]="EVENT_UNSPECIFIED",I[I.WINDSURF_EDITOR_READY=251]="WINDSURF_EDITOR_READY",I[I.WINDSURF_EXTENSION_START=253]="WINDSURF_EXTENSION_START",I[I.WINDSURF_EXTENSION_ACTIVATED=32]="WINDSURF_EXTENSION_ACTIVATED",I[I.LS_DOWNLOAD_START=1]="LS_DOWNLOAD_START",I[I.LS_DOWNLOAD_COMPLETE=2]="LS_DOWNLOAD_COMPLETE",I[I.LS_DOWNLOAD_FAILURE=5]="LS_DOWNLOAD_FAILURE",I[I.LS_BINARY_STARTUP=250]="LS_BINARY_STARTUP",I[I.LS_STARTUP=3]="LS_STARTUP",I[I.LS_FAILURE=4]="LS_FAILURE",I[I.AUTOCOMPLETE_ACCEPTED=6]="AUTOCOMPLETE_ACCEPTED",I[I.AUTOCOMPLETE_ONE_WORD_ACCEPTED=7]="AUTOCOMPLETE_ONE_WORD_ACCEPTED",I[I.CHAT_MESSAGE_SENT=8]="CHAT_MESSAGE_SENT",I[I.CHAT_MENTION_INSERT=13]="CHAT_MENTION_INSERT",I[I.CHAT_MENTION_MENU_OPEN=19]="CHAT_MENTION_MENU_OPEN",I[I.CHAT_OPEN_SETTINGS=14]="CHAT_OPEN_SETTINGS",I[I.CHAT_OPEN_CONTEXT_SETTINGS=15]="CHAT_OPEN_CONTEXT_SETTINGS",I[I.CHAT_WITH_CODEBASE=16]="CHAT_WITH_CODEBASE",I[I.CHAT_NEW_CONVERSATION=17]="CHAT_NEW_CONVERSATION",I[I.CHAT_CHANGE_MODEL=18]="CHAT_CHANGE_MODEL",I[I.CHAT_TOGGLE_FOCUS_INSERT_TEXT=34]="CHAT_TOGGLE_FOCUS_INSERT_TEXT",I[I.FUNCTION_REFACTOR=28]="FUNCTION_REFACTOR",I[I.EXPLAIN_CODE_BLOCK=29]="EXPLAIN_CODE_BLOCK",I[I.FUNCTION_ADD_DOCSTRING=30]="FUNCTION_ADD_DOCSTRING",I[I.EXPLAIN_PROBLEM=31]="EXPLAIN_PROBLEM",I[I.COMMAND_BOX_OPENED=9]="COMMAND_BOX_OPENED",I[I.COMMAND_SUBMITTED=10]="COMMAND_SUBMITTED",I[I.COMMAND_ACCEPTED=11]="COMMAND_ACCEPTED",I[I.COMMAND_REJECTED=12]="COMMAND_REJECTED",I[I.WS_ONBOARDING_LANDING_PAGE_OPENED=20]="WS_ONBOARDING_LANDING_PAGE_OPENED",I[I.WS_ONBOARDING_SETUP_PAGE_OPENED=21]="WS_ONBOARDING_SETUP_PAGE_OPENED",I[I.WS_ONBOARDING_KEYBINDINGS_PAGE_OPENED=22]="WS_ONBOARDING_KEYBINDINGS_PAGE_OPENED",I[I.WS_ONBOARDING_MIGRATION_SCOPE_PAGE_OPENED=23]="WS_ONBOARDING_MIGRATION_SCOPE_PAGE_OPENED",I[I.WS_ONBOARDING_IMPORT_PAGE_OPENED=24]="WS_ONBOARDING_IMPORT_PAGE_OPENED",I[I.WS_ONBOARDING_AUTH_PAGE_OPENED=25]="WS_ONBOARDING_AUTH_PAGE_OPENED",I[I.WS_ONBOARDING_AUTH_MANUAL_PAGE_OPENED=26]="WS_ONBOARDING_AUTH_MANUAL_PAGE_OPENED",I[I.WS_ONBOARDING_CHOOSE_THEME_PAGE_OPENED=35]="WS_ONBOARDING_CHOOSE_THEME_PAGE_OPENED",I[I.WS_ONBOARDING_COMPLETED=27]="WS_ONBOARDING_COMPLETED",I[I.WS_SKIPPED_ONBOARDING=69]="WS_SKIPPED_ONBOARDING",I[I.WS_SETTINGS_PAGE_OPEN=72]="WS_SETTINGS_PAGE_OPEN",I[I.WS_SETTINGS_PAGE_OPEN_WITH_SETTING_FOCUS=73]="WS_SETTINGS_PAGE_OPEN_WITH_SETTING_FOCUS",I[I.EMPTY_WORKSPACE_PAGE_OPENED=209]="EMPTY_WORKSPACE_PAGE_OPENED",I[I.EMPTY_WORKSPACE_PAGE_RECENT_FOLDERS_CLICKED=210]="EMPTY_WORKSPACE_PAGE_RECENT_FOLDERS_CLICKED",I[I.EMPTY_WORKSPACE_PAGE_OPEN_FOLDER_CLICKED=211]="EMPTY_WORKSPACE_PAGE_OPEN_FOLDER_CLICKED",I[I.EMPTY_WORKSPACE_PAGE_GENERATE_PROJECT_CLICKED=212]="EMPTY_WORKSPACE_PAGE_GENERATE_PROJECT_CLICKED",I[I.PROVIDE_FEEDBACK=33]="PROVIDE_FEEDBACK",I[I.CASCADE_MESSAGE_SENT=36]="CASCADE_MESSAGE_SENT",I[I.WS_OPEN_CASCADE_MEMORIES_PANEL=38]="WS_OPEN_CASCADE_MEMORIES_PANEL",I[I.PROVIDE_MESSAGE_FEEDBACK=41]="PROVIDE_MESSAGE_FEEDBACK",I[I.CASCADE_MEMORY_DELETED=42]="CASCADE_MEMORY_DELETED",I[I.CASCADE_STEP_COMPLETED=43]="CASCADE_STEP_COMPLETED",I[I.ACKNOWLEDGE_CASCADE_CODE_EDIT=44]="ACKNOWLEDGE_CASCADE_CODE_EDIT",I[I.CASCADE_WEB_TOOLS_OPEN_READ_URL_MARKDOWN=45]="CASCADE_WEB_TOOLS_OPEN_READ_URL_MARKDOWN",I[I.CASCADE_WEB_TOOLS_OPEN_CHUNK_MARKDOWN=46]="CASCADE_WEB_TOOLS_OPEN_CHUNK_MARKDOWN",I[I.CASCADE_MCP_SERVER_INIT=64]="CASCADE_MCP_SERVER_INIT",I[I.CASCADE_KNOWLEDGE_BASE_ITEM_OPENED=113]="CASCADE_KNOWLEDGE_BASE_ITEM_OPENED",I[I.CASCADE_VIEW_LOADED=119]="CASCADE_VIEW_LOADED",I[I.CASCADE_CONTEXT_SCOPE_ITEM_ATTACHED=173]="CASCADE_CONTEXT_SCOPE_ITEM_ATTACHED",I[I.CASCADE_CLICK_EVENT=65]="CASCADE_CLICK_EVENT",I[I.CASCADE_IMPRESSION_EVENT=67]="CASCADE_IMPRESSION_EVENT",I[I.OPEN_CHANGELOG=37]="OPEN_CHANGELOG",I[I.CURSOR_DETECTED=39]="CURSOR_DETECTED",I[I.VSCODE_DETECTED=40]="VSCODE_DETECTED",I[I.JETBRAINS_DETECTED=153]="JETBRAINS_DETECTED",I[I.CROSS_SELL_EXTENSION_DOWNLOAD_WINDSURF_CLICK=47]="CROSS_SELL_EXTENSION_DOWNLOAD_WINDSURF_CLICK",I[I.CROSS_SELL_EXTENSION_DOWNLOAD_WINDSURF_NUDGE_IMPRESSION=48]="CROSS_SELL_EXTENSION_DOWNLOAD_WINDSURF_NUDGE_IMPRESSION",I[I.WS_PROBLEMS_TAB_SEND_ALL_TO_CASCADE=49]="WS_PROBLEMS_TAB_SEND_ALL_TO_CASCADE",I[I.WS_PROBLEMS_TAB_SEND_ALL_IN_FILE_TO_CASCADE=50]="WS_PROBLEMS_TAB_SEND_ALL_IN_FILE_TO_CASCADE",I[I.WS_CASCADE_BAR_FILE_NAV=51]="WS_CASCADE_BAR_FILE_NAV",I[I.WS_CASCADE_BAR_HUNK_NAV=52]="WS_CASCADE_BAR_HUNK_NAV",I[I.WS_CASCADE_BAR_ACCEPT_FILE=53]="WS_CASCADE_BAR_ACCEPT_FILE",I[I.WS_CASCADE_BAR_REJECT_FILE=54]="WS_CASCADE_BAR_REJECT_FILE",I[I.WS_CUSTOM_APP_ICON_MODAL_OPEN=55]="WS_CUSTOM_APP_ICON_MODAL_OPEN",I[I.WS_CUSTOM_APP_ICON_SELECT_CLASSIC=56]="WS_CUSTOM_APP_ICON_SELECT_CLASSIC",I[I.WS_CUSTOM_APP_ICON_SELECT_CLASSIC_LIGHT=57]="WS_CUSTOM_APP_ICON_SELECT_CLASSIC_LIGHT",I[I.WS_CUSTOM_APP_ICON_SELECT_RETRO=58]="WS_CUSTOM_APP_ICON_SELECT_RETRO",I[I.WS_CUSTOM_APP_ICON_SELECT_BLUEPRINT=59]="WS_CUSTOM_APP_ICON_SELECT_BLUEPRINT",I[I.WS_CUSTOM_APP_ICON_SELECT_HAND_DRAWN=60]="WS_CUSTOM_APP_ICON_SELECT_HAND_DRAWN",I[I.WS_CUSTOM_APP_ICON_SELECT_SUNSET=61]="WS_CUSTOM_APP_ICON_SELECT_SUNSET",I[I.WS_CUSTOM_APP_ICON_SELECT_VALENTINE=66]="WS_CUSTOM_APP_ICON_SELECT_VALENTINE",I[I.WS_CUSTOM_APP_ICON_SELECT_PIXEL_SURF=82]="WS_CUSTOM_APP_ICON_SELECT_PIXEL_SURF",I[I.ENTERED_MCP_TOOLBAR_TAB=63]="ENTERED_MCP_TOOLBAR_TAB",I[I.CLICKED_TO_CONFIGURE_MCP=62]="CLICKED_TO_CONFIGURE_MCP",I[I.WS_SETTINGS_UPDATED=68]="WS_SETTINGS_UPDATED",I[I.BROWSER_PREVIEW_DOM_ELEMENT=70]="BROWSER_PREVIEW_DOM_ELEMENT",I[I.BROWSER_PREVIEW_CONSOLE_OUTPUT=71]="BROWSER_PREVIEW_CONSOLE_OUTPUT",I[I.WS_SETTINGS_CHANGED_BY_USER=74]="WS_SETTINGS_CHANGED_BY_USER",I[I.WS_GENERATE_COMMIT_MESSAGE_CLICKED=75]="WS_GENERATE_COMMIT_MESSAGE_CLICKED",I[I.WS_GENERATE_COMMIT_MESSAGE_ERRORED=76]="WS_GENERATE_COMMIT_MESSAGE_ERRORED",I[I.WS_CLICKED_COMMIT_FROM_SCM_PANEL=77]="WS_CLICKED_COMMIT_FROM_SCM_PANEL",I[I.WS_CANCELED_GENERATE_COMMIT_MESSAGE=79]="WS_CANCELED_GENERATE_COMMIT_MESSAGE",I[I.USING_DEV_EXTENSION=78]="USING_DEV_EXTENSION",I[I.WS_APP_DEPLOYMENT_CREATE_PROJECT=80]="WS_APP_DEPLOYMENT_CREATE_PROJECT",I[I.WS_APP_DEPLOYMENT_DEPLOY_PROJECT=81]="WS_APP_DEPLOYMENT_DEPLOY_PROJECT",I[I.CASCADE_OPEN_ACTIVE_CONVERSATION_DROPDOWN=114]="CASCADE_OPEN_ACTIVE_CONVERSATION_DROPDOWN",I[I.CASCADE_SELECT_ACTIVE_CONVERSATION_ON_DROPDOWN=115]="CASCADE_SELECT_ACTIVE_CONVERSATION_ON_DROPDOWN",I[I.CASCADE_NAVIGATE_ACTIVE_CONVERSATION_ON_DROPDOWN=122]="CASCADE_NAVIGATE_ACTIVE_CONVERSATION_ON_DROPDOWN",I[I.CASCADE_SNOOZE_CONVERSATION_ON_DROPDOWN=123]="CASCADE_SNOOZE_CONVERSATION_ON_DROPDOWN",I[I.CASCADE_TOGGLE_NOTIFICATION_ON_DROPDOWN=124]="CASCADE_TOGGLE_NOTIFICATION_ON_DROPDOWN",I[I.CASCADE_SELECT_NOTIFICATION_ON_DROPDOWN=125]="CASCADE_SELECT_NOTIFICATION_ON_DROPDOWN",I[I.CASCADE_NAVIGATE_NOTIFICATION_ON_DROPDOWN=126]="CASCADE_NAVIGATE_NOTIFICATION_ON_DROPDOWN",I[I.CASCADE_DISMISS_NOTIFICATION_ON_DROPDOWN=127]="CASCADE_DISMISS_NOTIFICATION_ON_DROPDOWN",I[I.CASCADE_TRAJECTORY_SHARE_COPY_LINK=137]="CASCADE_TRAJECTORY_SHARE_COPY_LINK",I[I.CASCADE_TRAJECTORY_SHARE_CREATE_LINK=138]="CASCADE_TRAJECTORY_SHARE_CREATE_LINK",I[I.CASCADE_CUSTOMIZATIONS_TAB_CHANGE=139]="CASCADE_CUSTOMIZATIONS_TAB_CHANGE",I[I.CASCADE_WORKFLOW_OPEN=140]="CASCADE_WORKFLOW_OPEN",I[I.CASCADE_NEW_WORKFLOW_CLICKED=141]="CASCADE_NEW_WORKFLOW_CLICKED",I[I.CASCADE_NEW_GLOBAL_WORKFLOW_CLICKED=184]="CASCADE_NEW_GLOBAL_WORKFLOW_CLICKED",I[I.CASCADE_WORKFLOW_REFRESH_CLICKED=142]="CASCADE_WORKFLOW_REFRESH_CLICKED",I[I.CASCADE_RULE_OPEN=143]="CASCADE_RULE_OPEN",I[I.CASCADE_NEW_RULE_CLICKED=144]="CASCADE_NEW_RULE_CLICKED",I[I.CASCADE_NEW_GLOBAL_RULE_CLICKED=145]="CASCADE_NEW_GLOBAL_RULE_CLICKED",I[I.CASCADE_RULE_REFRESH_CLICKED=146]="CASCADE_RULE_REFRESH_CLICKED",I[I.CASCADE_IMPORT_RULES_FROM_CURSOR_CLICKED=147]="CASCADE_IMPORT_RULES_FROM_CURSOR_CLICKED",I[I.WS_IMPORT_CURSOR_RULES_COMMAND_PALETTE=152]="WS_IMPORT_CURSOR_RULES_COMMAND_PALETTE",I[I.CASCADE_CHANGES_ACCEPT_ALL=83]="CASCADE_CHANGES_ACCEPT_ALL",I[I.CASCADE_CHANGES_REJECT_ALL=84]="CASCADE_CHANGES_REJECT_ALL",I[I.CASCADE_MEMORIES_EDIT=85]="CASCADE_MEMORIES_EDIT",I[I.CASCADE_MEMORIES_VIEW=86]="CASCADE_MEMORIES_VIEW",I[I.KEYBOARD_SHORTCUT=136]="KEYBOARD_SHORTCUT",I[I.CASCADE_INSERT_AT_MENTION=87]="CASCADE_INSERT_AT_MENTION",I[I.CASCADE_ERROR_STEP=120]="CASCADE_ERROR_STEP",I[I.CASCADE_SUGGESTED_RESPONSES_SUGGESTION_CLICKED=121]="CASCADE_SUGGESTED_RESPONSES_SUGGESTION_CLICKED",I[I.CASCADE_PLUGIN_PANEL_OPENED=128]="CASCADE_PLUGIN_PANEL_OPENED",I[I.CASCADE_PLUGIN_PAGE_OPENED=129]="CASCADE_PLUGIN_PAGE_OPENED",I[I.CASCADE_PLUGIN_INSTALLED=130]="CASCADE_PLUGIN_INSTALLED",I[I.CASCADE_PLUGIN_DISABLED=131]="CASCADE_PLUGIN_DISABLED",I[I.CASCADE_PLUGIN_ENABLED=132]="CASCADE_PLUGIN_ENABLED",I[I.CASCADE_PLUGIN_INSTALLATION_ERROR=133]="CASCADE_PLUGIN_INSTALLATION_ERROR",I[I.CASCADE_PLUGIN_TOOL_ENABLED=134]="CASCADE_PLUGIN_TOOL_ENABLED",I[I.CASCADE_PLUGIN_TOOL_DISABLED=135]="CASCADE_PLUGIN_TOOL_DISABLED",I[I.WEBSITE_NOT_FOUND_PAGE=88]="WEBSITE_NOT_FOUND_PAGE",I[I.WEBSITE_AUTH_REDIRECT_LONG_WAIT=89]="WEBSITE_AUTH_REDIRECT_LONG_WAIT",I[I.WEBSITE_AUTH_REDIRECT_ERROR=90]="WEBSITE_AUTH_REDIRECT_ERROR",I[I.WEBSITE_AUTH_REDIRECT_SUCCESS=112]="WEBSITE_AUTH_REDIRECT_SUCCESS",I[I.WEBSITE_PAGE_VISIT=175]="WEBSITE_PAGE_VISIT",I[I.WEBSITE_SIGNUP_INFO=176]="WEBSITE_SIGNUP_INFO",I[I.WEBSITE_START_PLAN_CHECKOUT=177]="WEBSITE_START_PLAN_CHECKOUT",I[I.WEBSITE_START_UPDATE_PAYMENT=202]="WEBSITE_START_UPDATE_PAYMENT",I[I.WEBSITE_START_VIEW_INVOICES=203]="WEBSITE_START_VIEW_INVOICES",I[I.WEBSITE_UNIVERSITY_LECTURE_VIEW=214]="WEBSITE_UNIVERSITY_LECTURE_VIEW",I[I.WEBSITE_DISALLOW_ENTERPRISE_LOGIN=224]="WEBSITE_DISALLOW_ENTERPRISE_LOGIN",I[I.WEBSITE_SSO_LOGIN_REDIRECT=225]="WEBSITE_SSO_LOGIN_REDIRECT",I[I.WEBSITE_ATTEMPT_TO_LOGIN=226]="WEBSITE_ATTEMPT_TO_LOGIN",I[I.WEBSITE_SUCCESSFUL_LOGIN=227]="WEBSITE_SUCCESSFUL_LOGIN",I[I.WEBSITE_FAILED_LOGIN=228]="WEBSITE_FAILED_LOGIN",I[I.JB_OPEN_PLAN_INFO=91]="JB_OPEN_PLAN_INFO",I[I.JB_SNOOZE_PLUGIN=92]="JB_SNOOZE_PLUGIN",I[I.JB_TOGGLE_PLUGIN_STATUS=93]="JB_TOGGLE_PLUGIN_STATUS",I[I.JB_SWITCH_CHANNEL=94]="JB_SWITCH_CHANNEL",I[I.JB_OPEN_SETTINGS=95]="JB_OPEN_SETTINGS",I[I.JB_PLUGIN_LOG_IN=96]="JB_PLUGIN_LOG_IN",I[I.JB_PLUGIN_LOG_OUT=97]="JB_PLUGIN_LOG_OUT",I[I.JB_OPEN_QUICK_REFERENCE=98]="JB_OPEN_QUICK_REFERENCE",I[I.JB_EDIT_KEYBOARD_SHORTCUTS=99]="JB_EDIT_KEYBOARD_SHORTCUTS",I[I.JB_CASCADE_BAR_CASCADE_ICON=100]="JB_CASCADE_BAR_CASCADE_ICON",I[I.JB_CASCADE_BAR_FILE_NAV=101]="JB_CASCADE_BAR_FILE_NAV",I[I.JB_CASCADE_BAR_HUNK_NAV=102]="JB_CASCADE_BAR_HUNK_NAV",I[I.JB_CASCADE_BAR_ACCEPT_FILE=103]="JB_CASCADE_BAR_ACCEPT_FILE",I[I.JB_CASCADE_BAR_REJECT_FILE=104]="JB_CASCADE_BAR_REJECT_FILE",I[I.JB_INLAY_HUNK_ACCEPT=105]="JB_INLAY_HUNK_ACCEPT",I[I.JB_INLAY_HUNK_REJECT=106]="JB_INLAY_HUNK_REJECT",I[I.JB_DIFF_RE_RENDER=107]="JB_DIFF_RE_RENDER",I[I.JB_ONBOARDING_OPENED=108]="JB_ONBOARDING_OPENED",I[I.JB_ONBOARDING_COMPLETED=109]="JB_ONBOARDING_COMPLETED",I[I.JB_ONBOARDING_SKIPPED=110]="JB_ONBOARDING_SKIPPED",I[I.JB_ONBOARDING_LEARN_MORE=111]="JB_ONBOARDING_LEARN_MORE",I[I.JB_DIFF_RESOLUTION_ERRORED=116]="JB_DIFF_RESOLUTION_ERRORED",I[I.JB_ACKNOWLEDGE_CODE_EDIT_ERRORED=117]="JB_ACKNOWLEDGE_CODE_EDIT_ERRORED",I[I.JB_OPEN_SETTINGS_NOTIFICATION=118]="JB_OPEN_SETTINGS_NOTIFICATION",I[I.JB_MCP_ADD_SERVER=148]="JB_MCP_ADD_SERVER",I[I.JB_MCP_SAVE_CONFIG=149]="JB_MCP_SAVE_CONFIG",I[I.JB_MCP_EXPAND_TOOLS=150]="JB_MCP_EXPAND_TOOLS",I[I.JB_DISABLE_AUTOGEN_MEMORY=151]="JB_DISABLE_AUTOGEN_MEMORY",I[I.JB_TOGGLE_AUTOCOMPLETE=154]="JB_TOGGLE_AUTOCOMPLETE",I[I.JB_LOGIN_MANUAL_AUTH_TOKEN=174]="JB_LOGIN_MANUAL_AUTH_TOKEN",I[I.JB_AUTO_UPDATED=179]="JB_AUTO_UPDATED",I[I.JB_DRAG_DROP_FILE=182]="JB_DRAG_DROP_FILE",I[I.JB_AUTO_OPEN_CHAT_WINDOW=183]="JB_AUTO_OPEN_CHAT_WINDOW",I[I.WS_TERMINAL_INTEGRATION_FORCE_EXIT=155]="WS_TERMINAL_INTEGRATION_FORCE_EXIT",I[I.KNOWLEDGE_BASE_ITEM_CREATED=156]="KNOWLEDGE_BASE_ITEM_CREATED",I[I.KNOWLEDGE_BASE_ITEM_EDITED=157]="KNOWLEDGE_BASE_ITEM_EDITED",I[I.KNOWLEDGE_BASE_ITEM_DELETED=158]="KNOWLEDGE_BASE_ITEM_DELETED",I[I.KNOWLEDGE_BASE_ITEM_READ=159]="KNOWLEDGE_BASE_ITEM_READ",I[I.KNOWLEDGE_BASE_CONNECTION_CREATE=160]="KNOWLEDGE_BASE_CONNECTION_CREATE",I[I.KNOWLEDGE_BASE_CONNECTION_REMOVE=161]="KNOWLEDGE_BASE_CONNECTION_REMOVE",I[I.TEAM_CONFIG_TOGGLE_AUTO_RUN_COMMANDS=162]="TEAM_CONFIG_TOGGLE_AUTO_RUN_COMMANDS",I[I.TEAM_CONFIG_TOGGLE_MCP_SERVERS=163]="TEAM_CONFIG_TOGGLE_MCP_SERVERS",I[I.TEAM_CONFIG_TOGGLE_APP_DEPLOYMENTS=164]="TEAM_CONFIG_TOGGLE_APP_DEPLOYMENTS",I[I.TEAM_CONFIG_TOGGLE_SANDBOX_APP_DEPLOYMENTS=165]="TEAM_CONFIG_TOGGLE_SANDBOX_APP_DEPLOYMENTS",I[I.TEAM_CONFIG_TOGGLE_TEAMS_APP_DEPLOYMENTS=166]="TEAM_CONFIG_TOGGLE_TEAMS_APP_DEPLOYMENTS",I[I.TEAM_CONFIG_TOGGLE_GITHUB_REVIEWS=167]="TEAM_CONFIG_TOGGLE_GITHUB_REVIEWS",I[I.TEAM_CONFIG_TOGGLE_GITHUB_DESCRIPTION_EDITS=168]="TEAM_CONFIG_TOGGLE_GITHUB_DESCRIPTION_EDITS",I[I.TEAM_CONFIG_TOGGLE_PR_REVIEW_GUIDELINES=169]="TEAM_CONFIG_TOGGLE_PR_REVIEW_GUIDELINES",I[I.TEAM_CONFIG_TOGGLE_PR_DESCRIPTION_GUIDELINES=170]="TEAM_CONFIG_TOGGLE_PR_DESCRIPTION_GUIDELINES",I[I.TEAM_CONFIG_TOGGLE_INDIVIDUAL_LEVEL_ANALYTICS=171]="TEAM_CONFIG_TOGGLE_INDIVIDUAL_LEVEL_ANALYTICS",I[I.TEAM_CONFIG_TOGGLE_CONVERSATION_SHARING=172]="TEAM_CONFIG_TOGGLE_CONVERSATION_SHARING",I[I.TEAM_CONFIG_UPDATE_MCP_SERVERS=178]="TEAM_CONFIG_UPDATE_MCP_SERVERS",I[I.TEAM_CONFIG_TOGGLE_GITHUB_AUTO_REVIEWS=207]="TEAM_CONFIG_TOGGLE_GITHUB_AUTO_REVIEWS",I[I.TEAM_CONFIG_UPDATE_TOP_UP_SETTINGS=213]="TEAM_CONFIG_UPDATE_TOP_UP_SETTINGS",I[I.BROWSER_OPEN=180]="BROWSER_OPEN",I[I.CASCADE_WEB_TOOLS_OPEN_BROWSER_MARKDOWN=181]="CASCADE_WEB_TOOLS_OPEN_BROWSER_MARKDOWN",I[I.BROWSER_PAGE_LOAD_SUCCESS=206]="BROWSER_PAGE_LOAD_SUCCESS",I[I.BROWSER_TOOLBAR_INSERT_PAGE_MENTION=208]="BROWSER_TOOLBAR_INSERT_PAGE_MENTION",I[I.BROWSER_INSERT_TEXT_CONTENT=215]="BROWSER_INSERT_TEXT_CONTENT",I[I.BROWSER_INSERT_SCREENSHOT=216]="BROWSER_INSERT_SCREENSHOT",I[I.BROWSER_INSERT_CODE_BLOCK=217]="BROWSER_INSERT_CODE_BLOCK",I[I.BROWSER_INSERT_LOG_BLOCK=218]="BROWSER_INSERT_LOG_BLOCK",I[I.BROWSER_INSERT_CONSOLE_OUTPUT=219]="BROWSER_INSERT_CONSOLE_OUTPUT",I[I.BROWSER_INSERT_DOM_ELEMENT=220]="BROWSER_INSERT_DOM_ELEMENT",I[I.SUPERCOMPLETE_REQUEST_STARTED=195]="SUPERCOMPLETE_REQUEST_STARTED",I[I.SUPERCOMPLETE_CACHE_HIT=196]="SUPERCOMPLETE_CACHE_HIT",I[I.SUPERCOMPLETE_ERROR_GETTING_RESPONSE=197]="SUPERCOMPLETE_ERROR_GETTING_RESPONSE",I[I.SUPERCOMPLETE_NO_RESPONSE=185]="SUPERCOMPLETE_NO_RESPONSE",I[I.SUPERCOMPLETE_REQUEST_SUCCEEDED=186]="SUPERCOMPLETE_REQUEST_SUCCEEDED",I[I.SUPERCOMPLETE_FILTERED=187]="SUPERCOMPLETE_FILTERED",I[I.TAB_JUMP_REQUEST_STARTED=188]="TAB_JUMP_REQUEST_STARTED",I[I.TAB_JUMP_CACHE_HIT=189]="TAB_JUMP_CACHE_HIT",I[I.TAB_JUMP_ERROR_GETTING_RESPONSE=190]="TAB_JUMP_ERROR_GETTING_RESPONSE",I[I.TAB_JUMP_NO_RESPONSE=191]="TAB_JUMP_NO_RESPONSE",I[I.TAB_JUMP_PROCESSING_COMPLETE=192]="TAB_JUMP_PROCESSING_COMPLETE",I[I.TAB_JUMP_FILTERED=193]="TAB_JUMP_FILTERED",I[I.TAB_JUMP_ERROR_UI_RENDERED=194]="TAB_JUMP_ERROR_UI_RENDERED",I[I.AUTO_CASCADE_PR_TITLE_GENERATED=198]="AUTO_CASCADE_PR_TITLE_GENERATED",I[I.AUTO_CASCADE_PR_DESCRIPTION_GENERATED=199]="AUTO_CASCADE_PR_DESCRIPTION_GENERATED",I[I.AUTO_CASCADE_PR_REVIEW_REQUESTED=200]="AUTO_CASCADE_PR_REVIEW_REQUESTED",I[I.AUTO_CASCADE_PR_REVIEW_GENERATED=201]="AUTO_CASCADE_PR_REVIEW_GENERATED",I[I.AUTO_CASCADE_GITHUB_CONNECTION_ADDED=204]="AUTO_CASCADE_GITHUB_CONNECTION_ADDED",I[I.AUTO_CASCADE_GITHUB_CONNECTION_REMOVED=205]="AUTO_CASCADE_GITHUB_CONNECTION_REMOVED",I[I.AUTOCOMPLETE_CHAT_NO_RESPONSE=221]="AUTOCOMPLETE_CHAT_NO_RESPONSE",I[I.AUTOCOMPLETE_CHAT_ERROR_GETTING_RESPONSE=222]="AUTOCOMPLETE_CHAT_ERROR_GETTING_RESPONSE",I[I.AUTOCOMPLETE_CHAT_REQUEST_ACCEPTED=223]="AUTOCOMPLETE_CHAT_REQUEST_ACCEPTED",I))(Je||{});d.util.setEnumType(Je,"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"}]);JA=(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))(JA||{});d.util.setEnumType(JA,"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"}]);qA=(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))(qA||{});d.util.setEnumType(qA,"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"}]);YE=(t=>(t[t.UNSPECIFIED=0]="UNSPECIFIED",t[t.USER=1]="USER",t[t.CASCADE=2]="CASCADE",t))(YE||{});d.util.setEnumType(YE,"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"}]);KA=(t=>(t[t.UNSPECIFIED=0]="UNSPECIFIED",t[t.RUNNING=1]="RUNNING",t[t.COMPLETED=2]="COMPLETED",t))(KA||{});d.util.setEnumType(KA,"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"}]);WF=(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))(WF||{});d.util.setEnumType(WF,"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"}]);Jf=(i=>(i[i.UNSPECIFIED=0]="UNSPECIFIED",i[i.VERCEL=1]="VERCEL",i[i.NETLIFY=2]="NETLIFY",i[i.CLOUDFLARE=3]="CLOUDFLARE",i))(Jf||{});d.util.setEnumType(Jf,"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"}]);BF=(o=>(o[o.UNSPECIFIED=0]="UNSPECIFIED",o[o.AVAILABLE=1]="AVAILABLE",o[o.IN_USE=2]="IN_USE",o[o.TAKEN=3]="TAKEN",o[o.INVALID=4]="INVALID",o))(BF||{});d.util.setEnumType(BF,"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"}]);jA=(t=>(t[t.UNSPECIFIED=0]="UNSPECIFIED",t[t.OPTIONAL=1]="OPTIONAL",t[t.REQUIRED=2]="REQUIRED",t))(jA||{});d.util.setEnumType(jA,"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"}]);zA=(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))(zA||{});d.util.setEnumType(zA,"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"}]);YA=(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))(YA||{});d.util.setEnumType(YA,"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"}]);VF=(o=>(o[o.UNSPECIFIED=0]="UNSPECIFIED",o[o.NOT_INSTALLED=1]="NOT_INSTALLED",o[o.IN_PROGRESS=2]="IN_PROGRESS",o[o.COMPLETE=3]="COMPLETE",o[o.ERROR=4]="ERROR",o))(VF||{});d.util.setEnumType(VF,"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"}]);GF=(t=>(t[t.UNSPECIFIED=0]="UNSPECIFIED",t[t.CASCADE=1]="CASCADE",t[t.MAINLINE_TRAJECTORY=2]="MAINLINE_TRAJECTORY",t))(GF||{});d.util.setEnumType(GF,"exa.codeium_common_pb.TrajectoryType",[{no:0,name:"TRAJECTORY_TYPE_UNSPECIFIED"},{no:1,name:"TRAJECTORY_TYPE_CASCADE"},{no:2,name:"TRAJECTORY_TYPE_MAINLINE_TRAJECTORY"}]);HF=(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))(HF||{});d.util.setEnumType(HF,"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"}]);QA=(e=>(e[e.UNSPECIFIED=0]="UNSPECIFIED",e[e.OPENAI=1]="OPENAI",e))(QA||{});d.util.setEnumType(QA,"exa.codeium_common_pb.ThirdPartyWebSearchProvider",[{no:0,name:"THIRD_PARTY_WEB_SEARCH_PROVIDER_UNSPECIFIED"},{no:1,name:"THIRD_PARTY_WEB_SEARCH_PROVIDER_OPENAI"}]);XA=(i=>(i[i.UNSPECIFIED=0]="UNSPECIFIED",i[i.O3=1]="O3",i[i.GPT_4_1=2]="GPT_4_1",i[i.O4_MINI=3]="O4_MINI",i))(XA||{});d.util.setEnumType(XA,"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"}]);FT=class r extends b{constructor(e){super();this.prompt="";this.contextPrompt="";this.uid="";this.promptElementRanges=[];this.promptElementKindInfos=[];this.promptLatencyMs=X.zero;this.promptStageLatencies=[];this.numTokenizedBytes=X.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;d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.CompletionsRequest"}static{this.fields=d.util.newFieldList(()=>[{no:1,name:"configuration",kind:"message",T:WT},{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:BT,repeated:!0},{no:9,name:"prompt_element_kind_infos",kind:"message",T:GT,repeated:!0},{no:11,name:"prompt_latency_ms",kind:"scalar",T:4},{no:12,name:"prompt_stage_latencies",kind:"message",T:HT,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:d.getEnumType(yo)},{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:d.getEnumType(Yn)},{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:gP},{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:VT,repeated:!0},{no:24,name:"supports_packed_streaming_completion_maps",kind:"scalar",T:8}])}static fromBinary(e,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},WT=class r extends b{constructor(e){super();this.numCompletions=X.zero;this.maxTokens=X.zero;this.maxNewlines=X.zero;this.minLogProbability=0;this.temperature=0;this.firstTemperature=0;this.topK=X.zero;this.topP=0;this.stopPatterns=[];this.seed=X.zero;this.fimEotProbThreshold=0;this.useFimEotThreshold=!1;this.doNotScoreStopTokens=!1;this.sqrtLenNormalizedLogProbScore=!1;this.lastMessageIsPartial=!1;this.returnLogprob=!1;this.serviceTier="";d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.CompletionConfiguration"}static{this.fields=d.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,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},BT=class r extends b{constructor(e){super();this.kind=0;this.byteOffsetStart=X.zero;this.byteOffsetEnd=X.zero;this.tokenOffsetStart=X.zero;this.tokenOffsetEnd=X.zero;d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.PromptElementRange"}static{this.fields=d.util.newFieldList(()=>[{no:1,name:"kind",kind:"enum",T:d.getEnumType(HE)},{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,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},B2=class r extends b{constructor(e){super();this.cortexPlanId="";this.codePlanId="";this.actionIndex=0;d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.ActionPointer"}static{this.fields=d.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,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},VT=class r extends b{constructor(e){super();this.kind=0;this.byteOffsetStart=X.zero;this.byteOffsetEnd=X.zero;this.suffix="";d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.PromptAnnotationRange"}static{this.fields=d.util.newFieldList(()=>[{no:1,name:"kind",kind:"enum",T:d.getEnumType(YC)},{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,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},CE=class r extends b{constructor(e){super();this.key=0;this.keyString="";this.disabled=!1;this.payload={case:void 0};this.source=0;d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.ExperimentWithVariant"}static{this.fields=d.util.newFieldList(()=>[{no:1,name:"key",kind:"enum",T:d.getEnumType(Du)},{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:d.getEnumType(QC)}])}static fromBinary(e,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},V2=class r extends b{constructor(e){super();this.experiments=[];this.forceEnableExperiments=[];this.forceDisableExperiments=[];this.forceEnableExperimentsWithVariants=[];this.forceEnableExperimentStrings=[];this.forceDisableExperimentStrings=[];this.devMode=!1;d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.ExperimentConfig"}static{this.fields=d.util.newFieldList(()=>[{no:6,name:"experiments",kind:"message",T:CE,repeated:!0},{no:1,name:"force_enable_experiments",kind:"enum",T:d.getEnumType(Du),repeated:!0},{no:2,name:"force_disable_experiments",kind:"enum",T:d.getEnumType(Du),repeated:!0},{no:3,name:"force_enable_experiments_with_variants",kind:"message",T:CE,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,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},G2=class r extends b{constructor(e){super();this.sha="";this.crc32cLinuxX64="";this.crc32cLinuxArm="";this.crc32cMacosX64="";this.crc32cMacosArm="";this.crc32cWindowsX64="";d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.ExperimentLanguageServerVersionPayload"}static{this.fields=d.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,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},H2=class r extends b{constructor(e){super();this.modelName="";this.contextCheckModelName="";d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.ExperimentModelConfigPayload"}static{this.fields=d.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,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},J2=class r extends b{constructor(e){super();this.modeToken="";d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.ExperimentMiddleModeTokenPayload"}static{this.fields=d.util.newFieldList(()=>[{no:1,name:"mode_token",kind:"scalar",T:9}])}static fromBinary(e,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},q2=class r extends b{constructor(e){super();this.threshold=0;d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.ExperimentMultilineModelThresholdPayload"}static{this.fields=d.util.newFieldList(()=>[{no:1,name:"threshold",kind:"scalar",T:2}])}static fromBinary(e,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},K2=class r extends b{constructor(e){super();this.sampleRate=0;this.procedureToSampleRate={};this.errorMatchToSampleRate={};d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.ExperimentSentryPayload"}static{this.fields=d.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,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},j2=class r extends b{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;this.anthropicCyberRetentionSetting=0;this.subagentDefaultModelUid="";d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.TeamOrganizationalControls"}static{this.fields=d.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:Re},{no:5,name:"updated_at",kind:"message",T:Re},{no:6,name:"extension_model_labels",kind:"scalar",T:9,repeated:!0},{no:8,name:"allowed_api_providers",kind:"enum",T:d.getEnumType(Lu),repeated:!0},{no:9,name:"cli_model_labels",kind:"scalar",T:9,repeated:!0},{no:10,name:"allowed_model_providers",kind:"enum",T:d.getEnumType(qE),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:d.getEnumType($A)},{no:15,name:"adaptive_setting",kind:"enum",T:d.getEnumType(ZA)},{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:d.getEnumType(e1)},{no:19,name:"blocked_model_tags",kind:"scalar",T:9,repeated:!0},{no:20,name:"quick_review_setting",kind:"enum",T:d.getEnumType(t1)},{no:21,name:"anthropic_cyber_retention_setting",kind:"enum",T:d.getEnumType(n1)},{no:22,name:"subagent_default_model_uid",kind:"scalar",T:9}])}static fromBinary(e,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},$A=(t=>(t[t.UNSPECIFIED=0]="UNSPECIFIED",t[t.BY_MODEL=1]="BY_MODEL",t[t.BY_PROVIDER=2]="BY_PROVIDER",t))($A||{});d.util.setEnumType($A,"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"}]);ZA=(t=>(t[t.UNSPECIFIED=0]="UNSPECIFIED",t[t.ENABLED=1]="ENABLED",t[t.DISABLED=2]="DISABLED",t))(ZA||{});d.util.setEnumType(ZA,"exa.codeium_common_pb.TeamOrganizationalControls.AdaptiveSetting",[{no:0,name:"ADAPTIVE_SETTING_UNSPECIFIED"},{no:1,name:"ADAPTIVE_SETTING_ENABLED"},{no:2,name:"ADAPTIVE_SETTING_DISABLED"}]);e1=(t=>(t[t.UNSPECIFIED=0]="UNSPECIFIED",t[t.ON=1]="ON",t[t.OFF=2]="OFF",t))(e1||{});d.util.setEnumType(e1,"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"}]);t1=(t=>(t[t.UNSPECIFIED=0]="UNSPECIFIED",t[t.ENABLED=1]="ENABLED",t[t.DISABLED=2]="DISABLED",t))(t1||{});d.util.setEnumType(t1,"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"}]);n1=(t=>(t[t.UNSPECIFIED=0]="UNSPECIFIED",t[t.ENABLED=1]="ENABLED",t[t.DISABLED=2]="DISABLED",t))(n1||{});d.util.setEnumType(n1,"exa.codeium_common_pb.TeamOrganizationalControls.AnthropicCyberRetentionSetting",[{no:0,name:"ANTHROPIC_CYBER_RETENTION_SETTING_UNSPECIFIED"},{no:1,name:"ANTHROPIC_CYBER_RETENTION_SETTING_ENABLED"},{no:2,name:"ANTHROPIC_CYBER_RETENTION_SETTING_DISABLED"}]);z2=class r extends b{constructor(e){super();this.memoryUsageToSampleRate={};d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.ExperimentProfilingTelemetrySampleRatePayload"}static{this.fields=d.util.newFieldList(()=>[{no:1,name:"memory_usage_to_sample_rate",kind:"map",K:9,V:{kind:"scalar",T:1}}])}static fromBinary(e,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},Ou=class r extends b{constructor(e){super();this.choice={case:void 0};d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.ModelOrAlias"}static{this.fields=d.util.newFieldList(()=>[{no:1,name:"model",kind:"enum",T:d.getEnumType(Yn),oneof:"choice"},{no:2,name:"alias",kind:"enum",T:d.getEnumType(XC),oneof:"choice"},{no:3,name:"model_uid",kind:"scalar",T:9,oneof:"choice"}])}static fromBinary(e,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},GT=class r extends b{constructor(e){super();this.kind=0;this.experimentKey=0;this.enabled=!1;this.numConsidered=X.zero;this.numIncluded=X.zero;d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.PromptElementKindInfo"}static{this.fields=d.util.newFieldList(()=>[{no:1,name:"kind",kind:"enum",T:d.getEnumType(HE)},{no:2,name:"experiment_key",kind:"enum",T:d.getEnumType(Du)},{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,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},Y2=class r extends b{constructor(e){super();this.included=!1;this.exclusionReason=0;d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.PromptElementInclusionMetadata"}static{this.fields=d.util.newFieldList(()=>[{no:1,name:"included",kind:"scalar",T:8},{no:2,name:"exclusion_reason",kind:"enum",T:d.getEnumType($C)}])}static fromBinary(e,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},HT=class r extends b{constructor(e){super();this.name="";this.latencyMs=X.zero;d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.PromptStageLatency"}static{this.fields=d.util.newFieldList(()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"latency_ms",kind:"scalar",T:4}])}static fromBinary(e,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},Q2=class r extends b{constructor(e){super();this.completions=[];this.maxTokens=X.zero;this.temperature=0;this.topK=X.zero;this.topP=0;this.stopPatterns=[];this.promptLength=X.zero;this.promptId="";this.modelTag="";d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.CompletionResponse"}static{this.fields=d.util.newFieldList(()=>[{no:1,name:"completions",kind:"message",T:Uf,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:Ff,opt:!0}])}static fromBinary(e,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},Uf=class r extends b{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=X.zero;this.stopReason=0;this.filterReasons=[];this.originalText="";this.toolCalls=[];d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.Completion"}static{this.fields=d.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:d.getEnumType(Vf)},{no:13,name:"filter_reasons",kind:"enum",T:d.getEnumType(ZC),repeated:!0},{no:14,name:"original_text",kind:"scalar",T:9},{no:15,name:"tool_calls",kind:"message",T:WE,repeated:!0}])}static fromBinary(e,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},JT=class r extends b{constructor(e){super();this.completionIds=[];this.maxTokens=X.zero;this.temperature=0;this.topK=X.zero;this.topP=0;this.stopPatterns=[];this.promptLength=X.zero;this.promptId="";this.modelTag="";d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.StreamingCompletionInfo"}static{this.fields=d.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:FT},{no:11,name:"eval_suffix_info",kind:"message",T:jT}])}static fromBinary(e,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},AE=class r extends b{constructor(e){super();this.totalPrefillPassTime=0;this.avgPrefillPassTime=0;this.numPrefillPasses=X.zero;this.totalSpecCopyPassTime=0;this.avgSpecCopyPassTime=0;this.numSpecCopyPasses=X.zero;this.totalGenerationPassTime=0;this.avgGenerationPassTime=0;this.numGenerationPasses=X.zero;this.totalModelTime=0;d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.SingleModelCompletionProfile"}static{this.fields=d.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,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},Ff=class r extends b{constructor(e){super();this.timeToFirstPrefillPass=0;this.timeToFirstToken=0;this.totalCompletionTime=0;d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.CompletionProfile"}static{this.fields=d.util.newFieldList(()=>[{no:1,name:"model_profile",kind:"message",T:AE},{no:2,name:"draft_model_profile",kind:"message",T:AE,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:VE,opt:!0}])}static fromBinary(e,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},qT=class r extends b{constructor(e){super();this.decodedToken=new Uint8Array(0);this.token=X.zero;this.probability=0;this.adjustedProbability=0;this.logprob=0;this.completionFinished=!1;this.stop="";this.stopReason=0;this.attributionStatuses={};d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.StreamingCompletion"}static{this.fields=d.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:d.getEnumType(Vf)},{no:8,name:"attribution_statuses",kind:"map",K:13,V:{kind:"enum",T:d.getEnumType(eA)}}])}static fromBinary(e,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},RE=class r extends b{constructor(e){super();this.completions={};d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.StreamingCompletionMap"}static{this.fields=d.util.newFieldList(()=>[{no:1,name:"completions",kind:"map",K:5,V:{kind:"message",T:qT}}])}static fromBinary(e,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},KT=class r extends b{constructor(e){super();this.completionMaps=[];d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.PackedStreamingCompletionMaps"}static{this.fields=d.util.newFieldList(()=>[{no:1,name:"completion_maps",kind:"message",T:RE,repeated:!0}])}static fromBinary(e,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},jT=class r extends b{constructor(e){super();this.perTokenLogLikelihoods=[];this.isGreedy=!1;d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.StreamingEvalSuffixInfo"}static{this.fields=d.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,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},X2=class r extends b{constructor(e){super();this.payload={case:void 0};d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.StreamingCompletionResponse"}static{this.fields=d.util.newFieldList(()=>[{no:1,name:"completion_info",kind:"message",T:JT,oneof:"payload"},{no:2,name:"completion_map",kind:"message",T:RE,oneof:"payload"},{no:4,name:"packed_completion_maps",kind:"message",T:KT,oneof:"payload"},{no:5,name:"completion_profile",kind:"message",T:Ff,opt:!0}])}static fromBinary(e,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},zT=class r extends b{constructor(e){super();this.apiServerLatencyMs=X.zero;this.languageServerLatencyMs=X.zero;this.networkLatencyMs=X.zero;this.apiServerFirstByteLatencyMs=X.zero;this.languageServerFirstByteLatencyMs=X.zero;this.networkFirstByteLatencyMs=X.zero;this.apiServerFirstLineLatencyMs=X.zero;this.languageServerFirstLineLatencyMs=X.zero;this.networkFirstLineLatencyMs=X.zero;d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.CompletionLatencyInfo"}static{this.fields=d.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,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},$2=class r extends b{constructor(n){super(),d.util.initPartial(n,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.CompletionWithLatencyInfo"}static{this.fields=d.util.newFieldList(()=>[{no:1,name:"completion",kind:"message",T:Uf},{no:2,name:"latency_info",kind:"message",T:zT}])}static fromBinary(n,e){return new r().fromBinary(n,e)}static fromJson(n,e){return new r().fromJson(n,e)}static fromJsonString(n,e){return new r().fromJsonString(n,e)}static equals(n,e){return d.util.equals(r,n,e)}},Z2=class r extends b{constructor(e){super();this.prompts=[];this.priority=0;this.prefix=0;this.model=0;d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.EmbeddingsRequest"}static{this.fields=d.util.newFieldList(()=>[{no:1,name:"prompts",kind:"scalar",T:9,repeated:!0},{no:2,name:"priority",kind:"enum",T:d.getEnumType(tA)},{no:3,name:"prefix",kind:"enum",T:d.getEnumType(nA)},{no:4,name:"model",kind:"enum",T:d.getEnumType(Yn)}])}static fromBinary(e,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},YT=class r extends b{constructor(e){super();this.values=[];d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.Embedding"}static{this.fields=d.util.newFieldList(()=>[{no:1,name:"values",kind:"scalar",T:2,repeated:!0}])}static fromBinary(e,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},eU=class r extends b{constructor(e){super();this.embeddings=[];this.promptsExceededContextLength=!1;d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.EmbeddingResponse"}static{this.fields=d.util.newFieldList(()=>[{no:1,name:"embeddings",kind:"message",T:YT,repeated:!0},{no:2,name:"prompts_exceeded_context_length",kind:"scalar",T:8}])}static fromBinary(e,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},tU=class r extends b{constructor(e){super();this.prefix="";this.items=[];this.hasInstructTokens=!1;d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.RewardsRequest"}static{this.fields=d.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,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},nU=class r extends b{constructor(e){super();this.values=[];this.promptsExceededContextLength=!1;d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.RewardsResponse"}static{this.fields=d.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,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},xE=class r extends b{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=X.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="";d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.Metadata"}static{this.fields=d.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:Re},{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:d.getEnumType(iA)},{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:d.getEnumType(zE),repeated:!0},{no:31,name:"f",kind:"scalar",T:9},{no:32,name:"team_id",kind:"scalar",T:9}])}static fromBinary(e,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},rU=class r extends b{constructor(e){super();this.tabSize=X.zero;this.insertSpaces=!1;this.disableAutocompleteInComments=!1;d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.EditorOptions"}static{this.fields=d.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,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},iU=class r extends b{constructor(e){super();this.errorId="";this.timestampUnixMs=X.zero;this.stacktrace="";this.recovered=!1;d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.ErrorTrace"}static{this.fields=d.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,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},oU=class r extends b{constructor(e){super();this.eventType=0;this.eventJson="";this.timestampUnixMs=X.zero;d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.Event"}static{this.fields=d.util.newFieldList(()=>[{no:1,name:"event_type",kind:"enum",T:d.getEnumType(oA)},{no:2,name:"event_json",kind:"scalar",T:9},{no:3,name:"timestamp_unix_ms",kind:"scalar",T:3}])}static fromBinary(e,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},sU=class r extends b{constructor(e){super();this.searchId="";this.resultId="";this.absolutePath="";this.workspacePaths=[];this.text="";this.similarityScore=0;this.numResultsInCluster=X.zero;this.representativePath="";this.meanSimilarityScore=0;this.searchResultType=0;d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.SearchResultRecord"}static{this.fields=d.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:DE,repeated:!0},{no:5,name:"text",kind:"scalar",T:9},{no:6,name:"embedding_metadata",kind:"message",T:QT},{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:d.getEnumType(sA)}])}static fromBinary(e,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},DE=class r extends b{constructor(e){super();this.workspaceMigrateMeToUri="";this.workspaceUri="";this.relativePath="";d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.WorkspacePath"}static{this.fields=d.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,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},QT=class r extends b{constructor(e){super();this.nodeName="";this.startLine=0;this.endLine=0;this.embedType=0;d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.EmbeddingMetadata"}static{this.fields=d.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:d.getEnumType(aA)}])}static fromBinary(e,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},aU=class r extends b{constructor(e){super();this.completions=[];d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.MockResponseData"}static{this.fields=d.util.newFieldList(()=>[{no:1,name:"completions",kind:"message",T:Uf,repeated:!0}])}static fromBinary(e,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},lU=class r extends b{constructor(e){super();this.workspaceUriForTelemetry="";this.numFilesTotal=X.zero;this.numFilesToEmbed=X.zero;this.numNodesTotal=X.zero;this.numNodesToEmbed=X.zero;this.numTokens=X.zero;this.numHighPriorityNodesToEmbed=X.zero;this.error="";d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.WorkspaceIndexData"}static{this.fields=d.util.newFieldList(()=>[{no:1,name:"workspace_uri_for_telemetry",kind:"scalar",T:9},{no:2,name:"indexing_start",kind:"message",T:Re},{no:3,name:"indexing_end",kind:"message",T:Re},{no:4,name:"embedding_duration",kind:"message",T:vl},{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,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},cU=class r extends b{constructor(e){super();this.workspace="";this.numFiles={};this.numBytes={};this.initialScanCompleted=!1;d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.WorkspaceStats"}static{this.fields=d.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,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},dU=class r extends b{constructor(e){super();this.numTotalFiles=0;this.numIndexedFiles=0;d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.PartialIndexMetadata"}static{this.fields=d.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:Re}])}static fromBinary(e,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},XT=class r extends b{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;d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.FunctionInfo"}static{this.fields=d.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:d.getEnumType(yo)},{no:13,name:"body_start_line",kind:"scalar",T:5},{no:14,name:"body_start_col",kind:"scalar",T:5}])}static fromBinary(e,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},uU=class r extends b{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;d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.ClassInfo"}static{this.fields=d.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:XT,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:d.getEnumType(yo)},{no:14,name:"definition_line",kind:"scalar",T:5}])}static fromBinary(e,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},$T=class r extends b{constructor(e){super();this.isActive=!1;this.stripeSubscriptionId="";this.hasAccess=!1;d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.TeamsFeaturesMetadata"}static{this.fields=d.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,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},ZT=class r extends b{constructor(e){super();this.isActive=!1;this.label="";d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.PromoStatus"}static{this.fields=d.util.newFieldList(()=>[{no:1,name:"is_active",kind:"scalar",T:8},{no:2,name:"end_date",kind:"message",T:Re},{no:3,name:"label",kind:"scalar",T:9}])}static fromBinary(e,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},eP=class r extends b{constructor(e){super();this.isActive=!1;this.tooltip="";d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.FastStatus"}static{this.fields=d.util.newFieldList(()=>[{no:1,name:"is_active",kind:"scalar",T:8},{no:2,name:"tooltip",kind:"scalar",T:9}])}static fromBinary(e,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},tP=class r extends b{constructor(e){super();this.tokensPerSecond=0;d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.ArenaConfig"}static{this.fields=d.util.newFieldList(()=>[{no:2,name:"tokens_per_second",kind:"scalar",T:2}])}static fromBinary(e,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},nP=class r extends b{constructor(e){super();this.label="";this.value=0;this.denominator="";this.minRange=0;this.maxRange=0;this.kind=0;d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.ModelDimension"}static{this.fields=d.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:d.getEnumType(fA)},{no:7,name:"info",kind:"scalar",T:9,opt:!0}])}static fromBinary(e,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},rP=class r extends b{constructor(e){super();this.shortReason="";d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.ModelDisabledReason"}static{this.fields=d.util.newFieldList(()=>[{no:1,name:"short_reason",kind:"scalar",T:9},{no:2,name:"description",kind:"scalar",T:9,opt:!0},{no:3,name:"link",kind:"scalar",T:9,opt:!0}])}static fromBinary(e,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},OE=class r extends b{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=[];d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.ClientModelConfig"}static{this.fields=d.util.newFieldList(()=>[{no:1,name:"label",kind:"scalar",T:9},{no:2,name:"model_or_alias",kind:"message",T:Ou},{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:d.getEnumType(pA)},{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:d.getEnumType(qE)},{no:11,name:"is_recommended",kind:"scalar",T:8},{no:12,name:"allowed_tiers",kind:"enum",T:d.getEnumType(Gf),repeated:!0},{no:14,name:"api_provider",kind:"enum",T:d.getEnumType(Lu)},{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:ZT},{no:20,name:"is_capacity_limited",kind:"scalar",T:8},{no:21,name:"fast_status",kind:"message",T:eP},{no:23,name:"model_info",kind:"message",T:Wf},{no:24,name:"model_cost_tier",kind:"enum",T:d.getEnumType(mA)},{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:RP},{no:31,name:"is_default_model_in_family",kind:"scalar",T:8},{no:32,name:"model_dimensions",kind:"message",T:nP,repeated:!0},{no:33,name:"disabled_reason",kind:"message",T:rP,opt:!0}])}static fromBinary(e,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},iP=class r extends b{constructor(e){super();this.modelUid="";this.versionId="";d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.DefaultOverrideModelConfig"}static{this.fields=d.util.newFieldList(()=>[{no:1,name:"model_or_alias_deprecated",jsonName:"modelOrAlias",kind:"message",T:Ou},{no:3,name:"model_uid",kind:"scalar",T:9},{no:2,name:"version_id",kind:"scalar",T:9}])}static fromBinary(e,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},kE=class r extends b{constructor(e){super();this.name="";this.groups=[];d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.ClientModelSort"}static{this.fields=d.util.newFieldList(()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"groups",kind:"message",T:oP,repeated:!0},{no:3,name:"display_metric",kind:"scalar",T:9,opt:!0}])}static fromBinary(e,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},oP=class r extends b{constructor(e){super();this.groupName="";this.modelLabels=[];d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.ClientModelGroup"}static{this.fields=d.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,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},sP=class r extends b{constructor(e){super();this.clientModelConfigs=[];this.clientModelSorts=[];this.arenaModeCostFast=0;this.arenaModeCostSmart=0;d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.CascadeModelConfigData"}static{this.fields=d.util.newFieldList(()=>[{no:1,name:"client_model_configs",kind:"message",T:OE,repeated:!0},{no:2,name:"client_model_sorts",kind:"message",T:kE,repeated:!0},{no:3,name:"default_override_model_config",kind:"message",T:iP,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,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},aP=class r extends b{constructor(e){super();this.creditMultiplier=0;d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.AllowedModelConfig"}static{this.fields=d.util.newFieldList(()=>[{no:1,name:"model_or_alias",kind:"message",T:Ou},{no:2,name:"credit_multiplier",kind:"scalar",T:2}])}static fromBinary(e,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},lP=class r extends b{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=X.zero;this.maxNumChatInputTokens=X.zero;this.maxCustomChatInstructionCharacters=X.zero;this.maxNumPinnedContextItems=X.zero;this.maxLocalIndexSize=X.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.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;d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.PlanInfo"}static{this.fields=d.util.newFieldList(()=>[{no:1,name:"teams_tier",kind:"enum",T:d.getEnumType(Gf)},{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: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:aP,repeated:!0},{no:24,name:"default_team_config",kind:"message",T:GE},{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:$T}},{no:31,name:"browser_enabled",kind:"scalar",T:8},{no:33,name:"devin_info",kind:"message",T:cP},{no:34,name:"is_devin",kind:"scalar",T:8},{no:35,name:"billing_strategy",kind:"enum",T:d.getEnumType(uA)},{no:36,name:"hide_daily_quota",kind:"scalar",T:8},{no:37,name:"hide_weekly_quota",kind:"scalar",T:8}])}static fromBinary(e,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},cP=class r extends b{constructor(e){super();this.canUseCascade=!1;this.canUseCli=!1;this.isAdmin=!1;this.orgId="";this.webappHost="";this.apiUrl="";this.accountDisplayName="";d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.DevinPlanInfo"}static{this.fields=d.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,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},dP=class r extends b{constructor(e){super();this.topUpTransactionStatus=0;this.topUpEnabled=!1;this.monthlyTopUpAmount=0;this.topUpSpent=0;this.topUpIncrement=0;this.topUpCriteriaMet=!1;d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.TopUpStatus"}static{this.fields=d.util.newFieldList(()=>[{no:1,name:"top_up_transaction_status",kind:"enum",T:d.getEnumType(gA)},{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,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},uP=class r extends b{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=X.zero;this.dailyQuotaResetAtUnix=X.zero;this.weeklyQuotaResetAtUnix=X.zero;d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.PlanStatus"}static{this.fields=d.util.newFieldList(()=>[{no:1,name:"plan_info",kind:"message",T:lP},{no:2,name:"plan_start",kind:"message",T:Re},{no:3,name:"plan_end",kind:"message",T:Re},{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:dP},{no:11,name:"was_reduced_by_orphaned_usage",kind:"scalar",T:8},{no:12,name:"grace_period_status",kind:"enum",T:d.getEnumType(hA)},{no:13,name:"grace_period_end",kind:"message",T:Re},{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},{no:19,name:"acu_consumed",kind:"scalar",T:1,opt:!0},{no:20,name:"acu_limit",kind:"scalar",T:1,opt:!0}])}static fromBinary(e,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},pU=class r extends b{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=X.zero;this.userUsedFlowCredits=X.zero;this.hasFingerprintSet=!1;this.maxNumPremiumChatMessages=X.zero;this.userId="";d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.UserStatus"}static{this.fields=d.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:d.getEnumType(JE)},{no:7,name:"email",kind:"scalar",T:9},{no:9,name:"user_features",kind:"enum",T:d.getEnumType(cA),repeated:!0},{no:8,name:"teams_features",kind:"enum",T:d.getEnumType(lA),repeated:!0},{no:10,name:"teams_tier",kind:"enum",T:d.getEnumType(Gf)},{no:11,name:"permissions",kind:"enum",T:d.getEnumType(dA),repeated:!0},{no:13,name:"plan_status",kind:"message",T:uP},{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:GE},{no:33,name:"cascade_model_config_data",kind:"message",T:sP},{no:34,name:"windsurf_pro_trial_end_time",kind:"message",T:Re},{no:35,name:"max_num_premium_chat_messages",kind:"scalar",T:3},{no:36,name:"user_id",kind:"scalar",T:9}])}static fromBinary(e,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},mU=class r extends b{constructor(e){super();this.info={case:void 0};d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.ScmWorkspaceInfo"}static{this.fields=d.util.newFieldList(()=>[{no:1,name:"perforce_info",kind:"message",T:pP,oneof:"info"},{no:2,name:"git_info",kind:"message",T:ku,oneof:"info"}])}static fromBinary(e,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},pP=class r extends b{constructor(e){super();this.depotName="";this.versionAlias="";this.baseP4dUrl="";d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.PerforceDepotInfo"}static{this.fields=d.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,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},ku=class r extends b{constructor(e){super();this.name="";this.owner="";this.repoName="";this.commit="";this.versionAlias="";this.scmProvider=0;this.baseGitUrl="";d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.GitRepoInfo"}static{this.fields=d.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:d.getEnumType(IA)},{no:7,name:"base_git_url",kind:"scalar",T:9}])}static fromBinary(e,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},Ol=class r extends b{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);d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.CodeContextItem"}static{this.fields=d.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:DE,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:d.getEnumType(vA)},{no:10,name:"language",kind:"enum",T:d.getEnumType(yo)},{no:11,name:"snippet_by_type",kind:"map",K:9,V:{kind:"message",T:mP}},{no:14,name:"repo_info",kind:"message",T:ku},{no:15,name:"file_content_hash",kind:"scalar",T:12}])}static fromBinary(e,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},mP=class r extends b{constructor(e){super();this.snippet="";this.wordCountBySplitter={};d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.SnippetWithWordCount"}static{this.fields=d.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:fP}}])}static fromBinary(e,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},fP=class r extends b{constructor(e){super();this.wordCountMap={};d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.WordCount"}static{this.fields=d.util.newFieldList(()=>[{no:1,name:"word_count_map",kind:"map",K:9,V:{kind:"scalar",T:3}}])}static fromBinary(e,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},gP=class r extends b{constructor(e){super();this.computedName="";this.gitOriginUrl="";this.gitUpstreamUrl="";this.reportedName="";this.modelName="";this.submoduleUrl="";this.submodulePath="";d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.Repository"}static{this.fields=d.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,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},fU=class r extends b{constructor(e){super();this.promptId="";this.filePath="";this.originalFileContent="";this.completionText="";this.startOffset=X.zero;this.endOffset=X.zero;this.cursorLine=X.zero;this.cursorColumn=X.zero;d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.CaptureFileRequestData"}static{this.fields=d.util.newFieldList(()=>[{no:1,name:"metadata",kind:"message",T:xE},{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,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},NE=class r extends b{constructor(e){super();this.numAcceptances=0;this.numRejections=0;this.numLinesAccepted=0;this.numBytesAccepted=0;this.numUsers=0;this.activeDeveloperDays=0;this.activeDeveloperHours=0;d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.CompletionStatistics"}static{this.fields=d.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,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},gU=class r extends b{constructor(n){super(),d.util.initPartial(n,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.CompletionByDateEntry"}static{this.fields=d.util.newFieldList(()=>[{no:1,name:"timestamp",kind:"message",T:Re},{no:2,name:"completion_statistics",kind:"message",T:NE}])}static fromBinary(n,e){return new r().fromBinary(n,e)}static fromJson(n,e){return new r().fromJson(n,e)}static fromJsonString(n,e){return new r().fromJsonString(n,e)}static equals(n,e){return d.util.equals(r,n,e)}},hU=class r extends b{constructor(e){super();this.language=0;d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.CompletionByLanguageEntry"}static{this.fields=d.util.newFieldList(()=>[{no:1,name:"language",kind:"enum",T:d.getEnumType(yo)},{no:2,name:"completion_statistics",kind:"message",T:NE}])}static fromBinary(e,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},LE=class r extends b{constructor(e){super();this.chatsSent=X.zero;this.activeDeveloperDays=0;d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.ChatStats"}static{this.fields=d.util.newFieldList(()=>[{no:1,name:"chats_sent",kind:"scalar",T:4},{no:15,name:"active_developer_days",kind:"scalar",T:13}])}static fromBinary(e,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},IU=class r extends b{constructor(n){super(),d.util.initPartial(n,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.ChatStatsByDateEntry"}static{this.fields=d.util.newFieldList(()=>[{no:1,name:"timestamp",kind:"message",T:Re},{no:2,name:"chat_stats",kind:"message",T:LE}])}static fromBinary(n,e){return new r().fromBinary(n,e)}static fromJson(n,e){return new r().fromJson(n,e)}static fromJsonString(n,e){return new r().fromJsonString(n,e)}static equals(n,e){return d.util.equals(r,n,e)}},vU=class r extends b{constructor(e){super();this.modelId=0;d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.ChatStatsByModelEntry"}static{this.fields=d.util.newFieldList(()=>[{no:1,name:"model_id",kind:"enum",T:d.getEnumType(Yn)},{no:2,name:"chat_stats",kind:"message",T:LE}])}static fromBinary(e,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},hP=class r extends b{constructor(e){super();this.numCommands=X.zero;this.numCommandsAccepted=X.zero;this.numCommandsRejected=X.zero;this.numEdits=X.zero;this.numGenerations=X.zero;this.locAdded=X.zero;this.locRemoved=X.zero;this.bytesAdded=X.zero;this.bytesRemoved=X.zero;this.locSelected=X.zero;this.bytesSelected=X.zero;this.numCommandsBySource={};d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.CommandStats"}static{this.fields=d.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,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},EU=class r extends b{constructor(n){super(),d.util.initPartial(n,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.CommandStatsByDateEntry"}static{this.fields=d.util.newFieldList(()=>[{no:1,name:"timestamp",kind:"message",T:Re},{no:2,name:"command_stats",kind:"message",T:hP}])}static fromBinary(n,e){return new r().fromBinary(n,e)}static fromJson(n,e){return new r().fromJson(n,e)}static fromJsonString(n,e){return new r().fromJsonString(n,e)}static equals(n,e){return d.util.equals(r,n,e)}},yU=class r extends b{constructor(e){super();this.name="";this.email="";this.apiKey="";this.disableCodeium=!1;this.activeDays=0;this.role="";this.promptCreditsUsed=X.zero;this.teamStatus=0;this.tabsGenerated=X.zero;this.cascadeMessages=X.zero;this.uniqueCascadeTabs=X.zero;this.idesUsed=[];this.acusUsed=0;d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.UserTableStats"}static{this.fields=d.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:Re},{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:Re},{no:9,name:"last_autocomplete_usage_time",kind:"message",T:Re},{no:10,name:"last_chat_usage_time",kind:"message",T:Re},{no:11,name:"last_command_usage_time",kind:"message",T:Re},{no:12,name:"prompt_credits_used",kind:"scalar",T:3},{no:13,name:"team_status",kind:"enum",T:d.getEnumType(JE)},{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,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},IP=class r extends b{constructor(e){super();this.event=0;d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.CascadeNUXState"}static{this.fields=d.util.newFieldList(()=>[{no:1,name:"event",kind:"enum",T:d.getEnumType(KE)},{no:2,name:"timestamp",kind:"message",T:Re}])}static fromBinary(e,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},vP=class r extends b{constructor(e){super();this.event=0;d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.UserNUXState"}static{this.fields=d.util.newFieldList(()=>[{no:1,name:"event",kind:"enum",T:d.getEnumType(PA)},{no:2,name:"timestamp",kind:"message",T:Re}])}static fromBinary(e,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},EP=class r extends b{constructor(e){super();this.planMode=0;d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.ConversationBrainConfig"}static{this.fields=d.util.newFieldList(()=>[{no:1,name:"plan_mode",kind:"enum",T:d.getEnumType(jE)}])}static fromBinary(e,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},yP=class r extends b{constructor(e){super();this.hasUsed=!1;d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.FeatureUsageData"}static{this.fields=d.util.newFieldList(()=>[{no:1,name:"has_used",kind:"scalar",T:8}])}static fromBinary(e,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},SU=class r extends b{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;d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.CascadeNUXConfig"}static{this.fields=d.util.newFieldList(()=>[{no:1,name:"uid",kind:"scalar",T:13},{no:2,name:"location",kind:"enum",T:d.getEnumType(OA)},{no:3,name:"trigger",kind:"enum",T:d.getEnumType(NA)},{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:d.getEnumType(KE)},{no:10,name:"icon",kind:"enum",T:d.getEnumType(kA)},{no:11,name:"requires_idle_cascade",kind:"scalar",T:8}])}static fromBinary(e,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},_U=class r extends b{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=[];d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.UserSettings"}static{this.fields=d.util.newFieldList(()=>[{no:1,name:"open_most_recent_chat_conversation",kind:"scalar",T:8},{no:2,name:"last_selected_model",kind:"enum",T:d.getEnumType(Yn)},{no:3,name:"theme_preference",kind:"enum",T:d.getEnumType(yA)},{no:4,name:"extension_panel_tab",kind:"enum",T:d.getEnumType(bA)},{no:5,name:"font_size",kind:"enum",T:d.getEnumType(SA)},{no:7,name:"remember_last_model_selection",kind:"enum",T:d.getEnumType(TA)},{no:6,name:"autocomplete_speed",kind:"enum",T:d.getEnumType(_A)},{no:8,name:"last_selected_model_name",kind:"scalar",T:9},{no:11,name:"cascade_nux_states",kind:"message",T:IP,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:d.getEnumType(Yn),opt:!0},{no:30,name:"last_selected_cascade_model_or_alias_deprecated",jsonName:"lastSelectedCascadeModelOrAlias",kind:"message",T:Ou,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:d.getEnumType(CA),opt:!0},{no:46,name:"last_model_override",kind:"enum",T:d.getEnumType(Yn),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:vP,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:d.getEnumType(Hf)},{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:d.getEnumType(AA)},{no:44,name:"cascade_web_search",kind:"enum",T:d.getEnumType(RA)},{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:yP}},{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:EP}},{no:54,name:"global_plan_mode_preference",kind:"enum",T:d.getEnumType(jE)},{no:52,name:"cached_cascade_model_configs",kind:"message",T:OE,repeated:!0},{no:53,name:"cached_cascade_model_sorts",kind:"message",T:kE,repeated:!0},{no:59,name:"auto_continue_on_max_generator_invocations_deprecated",jsonName:"autoContinueOnMaxGeneratorInvocations",kind:"enum",T:d.getEnumType(DA)},{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:d.getEnumType(LA)},{no:64,name:"enable_automatic_screenshot",kind:"scalar",T:8},{no:66,name:"browser_experimental_features_config",kind:"enum",T:d.getEnumType(MA)},{no:67,name:"command_popup_autocomplete",kind:"enum",T:d.getEnumType(xA)},{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:d.getEnumType(Yn),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:d.getEnumType(UA)},{no:97,name:"supercomplete_aggression",kind:"enum",T:d.getEnumType(FA)},{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:d.getEnumType(wA)},{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,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},SP=class r extends b{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;d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.ModelFeatures"}static{this.fields=d.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,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},wU=class r extends b{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;d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.ExternalModel"}static{this.fields=d.util.newFieldList(()=>[{no:1,name:"is_internal",kind:"scalar",T:8},{no:2,name:"model_id",kind:"enum",T:d.getEnumType(Yn)},{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,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},_P=class r extends b{constructor(e){super();this.reasoningEffort="";this.serviceTier="";this.extendedPromptCacheRetention=!1;this.reasoningContext="";d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.OpenAIInferenceConfig"}static{this.fields=d.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},{no:4,name:"reasoning_context",kind:"scalar",T:9}])}static fromBinary(e,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},wP=class r extends b{constructor(e){super();this.reasoningEffort="";d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.GoogleInferenceConfig"}static{this.fields=d.util.newFieldList(()=>[{no:1,name:"reasoning_effort",kind:"scalar",T:9}])}static fromBinary(e,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},bP=class r extends b{constructor(e){super();this.thinking=!1;this.effort="";this.fastMode=!1;this.context1m=!1;d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.AnthropicInferenceConfig"}static{this.fields=d.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,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},TP=class r extends b{constructor(e){super();this.effort="";this.longContext=!1;this.thinking=!1;d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.ZaiInferenceConfig"}static{this.fields=d.util.newFieldList(()=>[{no:1,name:"effort",kind:"scalar",T:9},{no:2,name:"long_context",kind:"scalar",T:8},{no:3,name:"thinking",kind:"scalar",T:8}])}static fromBinary(e,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},PP=class r extends b{constructor(e){super();this.config={case:void 0};d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.InferenceConfig"}static{this.fields=d.util.newFieldList(()=>[{no:1,name:"openai",kind:"message",T:_P,oneof:"config"},{no:2,name:"google",kind:"message",T:wP,oneof:"config"},{no:3,name:"anthropic",kind:"message",T:bP,oneof:"config"},{no:4,name:"zai",kind:"message",T:TP,oneof:"config"}])}static fromBinary(e,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},Wf=class r extends b{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;d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.ModelInfo"}static{this.fields=d.util.newFieldList(()=>[{no:1,name:"model_id",kind:"enum",T:d.getEnumType(Yn)},{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:d.getEnumType(WA)},{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:SP},{no:7,name:"api_provider",kind:"enum",T:d.getEnumType(Lu)},{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:d.getEnumType(zA)},{no:15,name:"tool_formatter_type",kind:"enum",T:d.getEnumType(YA)},{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:tP,opt:!0},{no:22,name:"display_option",kind:"enum",T:d.getEnumType(zE)},{no:23,name:"model_family_uid",kind:"scalar",T:9},{no:24,name:"inference_config",kind:"message",T:PP},{no:25,name:"is_model_router",kind:"scalar",T:8}])}static fromBinary(e,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},CP=class r extends b{constructor(e){super();this.order=0;this.name="";d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.ModelFamilyMetadataValue"}static{this.fields=d.util.newFieldList(()=>[{no:1,name:"order",kind:"scalar",T:5},{no:2,name:"name",kind:"scalar",T:9}])}static fromBinary(e,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},AP=class r extends b{constructor(e){super();this.key="";d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.ModelFamilyMetadataEntry"}static{this.fields=d.util.newFieldList(()=>[{no:1,name:"key",kind:"scalar",T:9},{no:2,name:"value",kind:"message",T:CP}])}static fromBinary(e,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},RP=class r extends b{constructor(e){super();this.modelFamilyLabel="";this.entries=[];this.isDefaultModelInFamily=!1;d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.ModelFamilyMetadata"}static{this.fields=d.util.newFieldList(()=>[{no:1,name:"model_family_label",kind:"scalar",T:9},{no:2,name:"entries",kind:"message",T:AP,repeated:!0},{no:3,name:"is_default_model_in_family",kind:"scalar",T:8}])}static fromBinary(e,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},bU=class r extends b{constructor(e){super();this.modelMap={};d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.ApiProviderRoutingConfig"}static{this.fields=d.util.newFieldList(()=>[{no:1,name:"model_map",kind:"map",K:9,V:{kind:"message",T:xP}}])}static fromBinary(e,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},xP=class r extends b{constructor(e){super();this.providerMap={};d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.ApiProviderConfigMap"}static{this.fields=d.util.newFieldList(()=>[{no:1,name:"provider_map",kind:"map",K:9,V:{kind:"message",T:DP}}])}static fromBinary(e,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},DP=class r extends b{constructor(e){super();this.weight=0;this.cacheTtlMinutes=0;this.modelName="";d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.ApiProviderConfig"}static{this.fields=d.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,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},TU=class r extends b{constructor(e){super();this.modelMap={};d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.ShadowTrafficConfig"}static{this.fields=d.util.newFieldList(()=>[{no:1,name:"model_map",kind:"map",K:9,V:{kind:"message",T:OP}}])}static fromBinary(e,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},OP=class r extends b{constructor(e){super();this.targets=[];d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.ShadowTargetList"}static{this.fields=d.util.newFieldList(()=>[{no:1,name:"targets",kind:"message",T:kP,repeated:!0}])}static fromBinary(e,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},kP=class r extends b{constructor(e){super();this.provider="";this.model="";this.modelName="";this.sampleRate=0;d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.ShadowTarget"}static{this.fields=d.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,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},PU=class r extends b{constructor(n){super(),d.util.initPartial(n,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.ModelConfig"}static{this.fields=d.util.newFieldList(()=>[{no:1,name:"generation_model",kind:"message",T:Wf},{no:2,name:"context_check_model",kind:"message",T:Wf}])}static fromBinary(n,e){return new r().fromBinary(n,e)}static fromJson(n,e){return new r().fromJson(n,e)}static fromJsonString(n,e){return new r().fromJsonString(n,e)}static equals(n,e){return d.util.equals(r,n,e)}},CU=class r extends b{constructor(e){super();this.model=0;this.modelUid="";this.message="";this.status=0;d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.ModelStatusInfo"}static{this.fields=d.util.newFieldList(()=>[{no:1,name:"model",kind:"enum",T:d.getEnumType(Yn)},{no:4,name:"model_uid",kind:"scalar",T:9},{no:2,name:"message",kind:"scalar",T:9},{no:3,name:"status",kind:"enum",T:d.getEnumType(BA)}])}static fromBinary(e,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},NP=class r extends b{constructor(e){super();this.uid="";this.completionId="";this.filePath="";this.shortPrefix="";this.completionText="";this.shortSuffix="";d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.CompletionExample"}static{this.fields=d.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,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},AU=class r extends b{constructor(e){super();this.name="";d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.CompletionExampleWithMetadata"}static{this.fields=d.util.newFieldList(()=>[{no:1,name:"example",kind:"message",T:NP},{no:2,name:"name",kind:"scalar",T:9},{no:4,name:"time",kind:"message",T:Re}])}static fromBinary(e,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},LP=class r extends b{constructor(n){super(),d.util.initPartial(n,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.CciWithSubrange"}static{this.fields=d.util.newFieldList(()=>[{no:1,name:"cci",kind:"message",T:Ol},{no:2,name:"subrange",kind:"message",T:MP}])}static fromBinary(n,e){return new r().fromBinary(n,e)}static fromJson(n,e){return new r().fromJson(n,e)}static fromJsonString(n,e){return new r().fromJsonString(n,e)}static equals(n,e){return d.util.equals(r,n,e)}},MP=class r extends b{constructor(e){super();this.snippetType=0;this.startOffset=X.zero;this.endOffset=X.zero;d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.ContextSubrange"}static{this.fields=d.util.newFieldList(()=>[{no:1,name:"snippet_type",kind:"enum",T:d.getEnumType(EA)},{no:2,name:"start_offset",kind:"scalar",T:3},{no:3,name:"end_offset",kind:"scalar",T:3}])}static fromBinary(e,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},ME=class r extends b{constructor(e){super();this.absolutePathMigrateMeToUri="";this.absoluteUri="";this.workspaceRelativePathsMigrateMeToWorkspaceUris={};this.workspaceUrisToRelativePaths={};this.numFiles=0;this.numBytes=X.zero;d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.PathScopeItem"}static{this.fields=d.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,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},Nu=class r extends b{constructor(e){super();this.absoluteUri="";this.startLine=0;this.endLine=0;d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.FileLineRange"}static{this.fields=d.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,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},RU=class r extends b{constructor(e){super();this.content="";d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.FileRangeContent"}static{this.fields=d.util.newFieldList(()=>[{no:1,name:"content",kind:"scalar",T:9},{no:2,name:"source",kind:"message",T:Nu}])}static fromBinary(e,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},UP=class r extends b{constructor(e){super();this.content="";this.identifier={case:void 0};d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.TextBlock"}static{this.fields=d.util.newFieldList(()=>[{no:1,name:"content",kind:"scalar",T:9},{no:2,name:"file_line_range",kind:"message",T:Nu,oneof:"identifier"},{no:3,name:"label",kind:"scalar",T:9,oneof:"identifier"}])}static fromBinary(e,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},FP=class r extends b{constructor(n){super(),d.util.initPartial(n,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.RepositoryScopeItem"}static{this.fields=d.util.newFieldList(()=>[{no:1,name:"repo_info",kind:"message",T:ku}])}static fromBinary(n,e){return new r().fromBinary(n,e)}static fromJson(n,e){return new r().fromJson(n,e)}static fromJsonString(n,e){return new r().fromJsonString(n,e)}static equals(n,e){return d.util.equals(r,n,e)}},WP=class r extends b{constructor(e){super();this.relativePath="";this.isDir=!1;d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.RepositoryPathScopeItem"}static{this.fields=d.util.newFieldList(()=>[{no:1,name:"repo_info",kind:"message",T:ku},{no:2,name:"relative_path",kind:"scalar",T:9},{no:3,name:"is_dir",kind:"scalar",T:8}])}static fromBinary(e,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},Dl=class r extends b{constructor(e){super();this.documentId="";this.index=0;this.documentType=0;this.displayName="";this.description="";this.displaySource="";this.url="";d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.KnowledgeBaseScopeItem"}static{this.fields=d.util.newFieldList(()=>[{no:1,name:"document_id",kind:"scalar",T:9},{no:7,name:"index",kind:"enum",T:d.getEnumType(JA)},{no:8,name:"document_type",kind:"enum",T:d.getEnumType(VA)},{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,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},BP=class r extends b{constructor(e){super();this.timestampStr="";this.type="";this.output="";this.consoleMessageLocation="";d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.ConsoleLogLine"}static{this.fields=d.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,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},VP=class r extends b{constructor(e){super();this.lines=[];this.serverAddress="";d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.ConsoleLogScopeItem"}static{this.fields=d.util.newFieldList(()=>[{no:1,name:"lines",kind:"message",T:BP,repeated:!0},{no:2,name:"server_address",kind:"scalar",T:9}])}static fromBinary(e,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},GP=class r extends b{constructor(e){super();this.tagName="";this.outerHtml="";this.id="";this.reactComponentName="";d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.DOMElementScopeItem"}static{this.fields=d.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:Nu}])}static fromBinary(e,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},HP=class r extends b{constructor(e){super();this.numNodes=0;d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.DOMTree"}static{this.fields=d.util.newFieldList(()=>[{no:1,name:"root",kind:"message",T:qP},{no:2,name:"num_nodes",kind:"scalar",T:13}])}static fromBinary(e,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},JP=class r extends b{constructor(e){super();this.x=0;this.y=0;this.width=0;this.height=0;d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.DOMTree.BoundingBox"}static{this.fields=d.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,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},qP=class r extends b{constructor(e){super();this.children=[];this.tagName="";this.id="";this.classNames=[];this.textContent="";this.ariaLabel="";this.title="";this.alt="";this.placeholder="";this.href="";d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.DOMTree.DOMNode"}static{this.fields=d.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:JP},{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,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},KP=class r extends b{constructor(e){super();this.recipeId="";this.title="";this.description="";this.systemPrompt="";d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.RecipeScopeItem"}static{this.fields=d.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:d.getEnumType(Hf),opt:!0}])}static fromBinary(e,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},jP=class r extends b{constructor(e){super();this.title="";this.content="";this.description="";d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.CodeMapScopeItem"}static{this.fields=d.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,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},zP=class r extends b{constructor(e){super();this.rulePath="";this.ruleName="";this.description="";d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.RuleScopeItem"}static{this.fields=d.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,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},YP=class r extends b{constructor(e){super();this.skillName="";this.description="";this.resourceCount=0;this.baseDir="";this.content="";d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.SkillScopeItem"}static{this.fields=d.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,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},QP=class r extends b{constructor(e){super();this.planPath="";this.title="";this.description="";this.requestImplementation=!1;d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.PlanFileScopeItem"}static{this.fields=d.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,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},XP=class r extends b{constructor(e){super();this.serverName="";this.promptName="";this.arguments={};this.resolvedContent="";d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.McpPromptScopeItem"}static{this.fields=d.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,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},$P=class r extends b{constructor(e){super();this.uri="";this.name="";this.serverName="";d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.McpResourceItem"}static{this.fields=d.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,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},ZP=class r extends b{constructor(e){super();this.url="";this.title="";this.visibleTextContent="";this.pageId="";d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.BrowserPageScopeItem"}static{this.fields=d.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,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},eC=class r extends b{constructor(e){super();this.url="";this.title="";this.codeContent="";this.language=0;this.pageId="";d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.BrowserCodeBlockScopeItem"}static{this.fields=d.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:d.getEnumType(yo)},{no:5,name:"context_text",kind:"scalar",T:9,opt:!0},{no:6,name:"page_id",kind:"scalar",T:9}])}static fromBinary(e,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},tC=class r extends b{constructor(e){super();this.url="";this.visibleText="";this.pageId="";d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.BrowserTextScopeItem"}static{this.fields=d.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,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},nC=class r extends b{constructor(e){super();this.id="";this.title="";this.summary="";d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.ConversationScopeItem"}static{this.fields=d.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:Re},{no:4,name:"summary",kind:"scalar",T:9}])}static fromBinary(e,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},rC=class r extends b{constructor(e){super();this.id="";this.branch="";this.current=!1;d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.UserActivityScopeItem"}static{this.fields=d.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,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},iC=class r extends b{constructor(e){super();this.processId="";this.name="";this.lastCommand="";this.content="";d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.TerminalScopeItem"}static{this.fields=d.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,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},oC=class r extends b{constructor(e){super();this.url="";this.title="";this.owner="";this.number="";d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.GithubPullRequestItem"}static{this.fields=d.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,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},sC=class r extends b{constructor(e){super();this.sha="";this.shortSha="";this.subject="";this.author="";this.insertions=0;this.deletions=0;d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.GitCommitData"}static{this.fields=d.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:Re},{no:6,name:"insertions",kind:"scalar",T:5},{no:7,name:"deletions",kind:"scalar",T:5}])}static fromBinary(e,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},aC=class r extends b{constructor(e){super();this.branchName="";this.baseBranch="";this.mergeBaseSha="";this.filesChanged=0;this.insertions=0;this.deletions=0;this.branchHeadSha="";d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.GitDiffData"}static{this.fields=d.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,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},lC=class r extends b{constructor(e){super();this.stagedCount=0;this.unstagedCount=0;this.untrackedCount=0;d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.GitWorkingChangesData"}static{this.fields=d.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,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},cC=class r extends b{constructor(e){super();this.repoRootUri="";this.repoDisplayName="";this.gitData={case:void 0};this.formattedContent="";d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.GitScopeItem"}static{this.fields=d.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:sC,oneof:"git_data"},{no:3,name:"diff",kind:"message",T:aC,oneof:"git_data"},{no:4,name:"working_changes",kind:"message",T:lC,oneof:"git_data"},{no:5,name:"formatted_content",kind:"scalar",T:9}])}static fromBinary(e,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},UE=class r extends b{constructor(e){super();this.scopeItem={case:void 0};d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.ContextScopeItem"}static{this.fields=d.util.newFieldList(()=>[{no:1,name:"file",kind:"message",T:ME,oneof:"scope_item"},{no:2,name:"directory",kind:"message",T:ME,oneof:"scope_item"},{no:3,name:"repository",kind:"message",T:FP,oneof:"scope_item"},{no:4,name:"code_context",kind:"message",T:Ol,oneof:"scope_item"},{no:6,name:"cci_with_subrange",kind:"message",T:LP,oneof:"scope_item"},{no:7,name:"repository_path",kind:"message",T:WP,oneof:"scope_item"},{no:8,name:"slack",kind:"message",T:Dl,oneof:"scope_item"},{no:9,name:"github",kind:"message",T:Dl,oneof:"scope_item"},{no:10,name:"file_line_range",kind:"message",T:Nu,oneof:"scope_item"},{no:11,name:"text_block",kind:"message",T:UP,oneof:"scope_item"},{no:12,name:"jira",kind:"message",T:Dl,oneof:"scope_item"},{no:13,name:"google_drive",kind:"message",T:Dl,oneof:"scope_item"},{no:14,name:"console_log",kind:"message",T:VP,oneof:"scope_item"},{no:15,name:"dom_element",kind:"message",T:GP,oneof:"scope_item"},{no:16,name:"recipe",kind:"message",T:KP,oneof:"scope_item"},{no:17,name:"knowledge",kind:"message",T:Dl,oneof:"scope_item"},{no:18,name:"rule",kind:"message",T:zP,oneof:"scope_item"},{no:19,name:"mcp_resource",kind:"message",T:$P,oneof:"scope_item"},{no:20,name:"browser_page",kind:"message",T:ZP,oneof:"scope_item"},{no:21,name:"browser_code_block",kind:"message",T:eC,oneof:"scope_item"},{no:22,name:"browser_text",kind:"message",T:tC,oneof:"scope_item"},{no:23,name:"conversation",kind:"message",T:nC,oneof:"scope_item"},{no:24,name:"user_activity",kind:"message",T:rC,oneof:"scope_item"},{no:25,name:"terminal",kind:"message",T:iC,oneof:"scope_item"},{no:26,name:"github_pull_request",kind:"message",T:oC,oneof:"scope_item"},{no:27,name:"code_map",kind:"message",T:jP,oneof:"scope_item"},{no:28,name:"mcp_prompt",kind:"message",T:XP,oneof:"scope_item"},{no:29,name:"skill",kind:"message",T:YP,oneof:"scope_item"},{no:30,name:"plan_file",kind:"message",T:QP,oneof:"scope_item"},{no:31,name:"git",kind:"message",T:cC,oneof:"scope_item"}])}static fromBinary(e,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},xU=class r extends b{constructor(e){super();this.items=[];d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.ContextScope"}static{this.fields=d.util.newFieldList(()=>[{no:1,name:"items",kind:"message",T:UE,repeated:!0}])}static fromBinary(e,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},FE=class r extends b{constructor(e){super();this.nodeName="";this.graphStateJson=new Uint8Array(0);this.graphStateJsonNumBytes=X.zero;d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.NodeExecutionRecord"}static{this.fields=d.util.newFieldList(()=>[{no:1,name:"node_name",kind:"scalar",T:9},{no:2,name:"start_time",kind:"message",T:Re},{no:3,name:"end_time",kind:"message",T:Re},{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:dC}])}static fromBinary(e,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},dC=class r extends b{constructor(e){super();this.history=[];d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.GraphExecutionState"}static{this.fields=d.util.newFieldList(()=>[{no:1,name:"current",kind:"message",T:FE},{no:2,name:"history",kind:"message",T:FE,repeated:!0}])}static fromBinary(e,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},DU=class r extends b{constructor(e){super();this.items=[];d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.Guideline"}static{this.fields=d.util.newFieldList(()=>[{no:1,name:"items",kind:"message",T:uC,repeated:!0}])}static fromBinary(e,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},uC=class r extends b{constructor(e){super();this.guideline="";d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.GuidelineItem"}static{this.fields=d.util.newFieldList(()=>[{no:1,name:"guideline",kind:"scalar",T:9}])}static fromBinary(e,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},OU=class r extends b{constructor(e){super();this.model=0;this.maxInputTokens=0;this.temperature=0;this.maxOutputTokens=0;this.orderSnippetsByFile=!1;d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.ChatNodeConfig"}static{this.fields=d.util.newFieldList(()=>[{no:1,name:"model",kind:"enum",T:d.getEnumType(Yn)},{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,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},kU=class r extends b{constructor(e){super();this.shouldBatchCcis=!1;this.maxTokensPerSubrange=X.zero;this.numParserWorkers=X.zero;this.numWorkersPerDistributedScorer=X.zero;this.verbose=!1;this.ignoreExtensions=[];this.ignoreDirectoryStubs=[];this.minTokenSpaceForContext=0;this.maxTargetFiles=0;this.topCciCount=0;d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.MQueryConfig"}static{this.fields=d.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,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},pC=class r extends b{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="";d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.CompletionDelta"}static{this.fields=d.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:d.getEnumType(Vf)},{no:4,name:"usage",kind:"message",T:VE},{no:5,name:"delta_tool_calls",kind:"message",T:WE,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,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},NU=class r extends b{constructor(e){super();this.deltas={};this.prompt="";d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.CompletionDeltaMap"}static{this.fields=d.util.newFieldList(()=>[{no:1,name:"deltas",kind:"map",K:5,V:{kind:"message",T:pC}},{no:2,name:"prompt",kind:"scalar",T:9},{no:3,name:"completion_profile",kind:"message",T:Ff}])}static fromBinary(e,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},LU=class r extends b{constructor(e){super();this.prompt="";this.inferenceAddress="";d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.ChatCompletionInfo"}static{this.fields=d.util.newFieldList(()=>[{no:1,name:"prompt",kind:"scalar",T:9},{no:2,name:"inference_address",kind:"scalar",T:9}])}static fromBinary(e,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},WE=class r extends b{constructor(e){super();this.id="";this.name="";this.argumentsJson="";this.invalidJsonStr="";this.invalidJsonErr="";this.isCustomToolCall=!1;d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.ChatToolCall"}static{this.fields=d.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,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},MU=class r extends b{constructor(e){super();this.level=0;this.message="";d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.IdeStatus"}static{this.fields=d.util.newFieldList(()=>[{no:1,name:"level",kind:"enum",T:d.getEnumType(GA)},{no:2,name:"message",kind:"scalar",T:9}])}static fromBinary(e,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},UU=class r extends b{constructor(e){super();this.code=0;this.message="";d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.Status"}static{this.fields=d.util.newFieldList(()=>[{no:1,name:"code",kind:"scalar",T:5},{no:2,name:"message",kind:"scalar",T:9}])}static fromBinary(e,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},Bf=class r extends b{constructor(e){super();this.row=X.zero;this.col=X.zero;d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.DocumentPosition"}static{this.fields=d.util.newFieldList(()=>[{no:1,name:"row",kind:"scalar",T:4},{no:2,name:"col",kind:"scalar",T:4}])}static fromBinary(e,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},kl=class r extends b{constructor(e){super();this.startOffset=X.zero;this.endOffset=X.zero;d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.Range"}static{this.fields=d.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:Bf},{no:4,name:"end_position",kind:"message",T:Bf}])}static fromBinary(e,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},BE=class r extends b{constructor(e){super();this.absolutePathMigrateMeToUri="";this.absoluteUri="";this.relativePathMigrateMeToWorkspaceUri="";this.workspaceUri="";this.text="";this.editorLanguage="";this.language=0;this.cursorOffset=X.zero;this.lineEnding="";this.isCutoffStart=!1;this.isCutoffEnd=!1;this.linesCutoffStart=0;this.linesCutoffEnd=0;this.isDirty=!1;this.isNotebook=!1;this.selections=[];d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.Document"}static{this.fields=d.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:d.getEnumType(yo)},{no:6,name:"cursor_offset",kind:"scalar",T:4},{no:8,name:"cursor_position",kind:"message",T:Bf},{no:7,name:"line_ending",kind:"scalar",T:9},{no:9,name:"visible_range",kind:"message",T:kl},{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:Re},{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:Re},{no:22,name:"selections",kind:"message",T:kl,repeated:!0},{no:23,name:"hash",kind:"scalar",T:4,opt:!0}])}static fromBinary(e,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},FU=class r extends b{constructor(e){super();this.otherDocuments=[];this.codeContextItems=[];d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.PromptComponents"}static{this.fields=d.util.newFieldList(()=>[{no:1,name:"document",kind:"message",T:BE},{no:2,name:"other_documents",kind:"message",T:BE,repeated:!0},{no:3,name:"code_context_items",kind:"message",T:Ol,repeated:!0}])}static fromBinary(e,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},WU=class r extends b{constructor(e){super();this.chunk={case:void 0};d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.TextOrScopeItem"}static{this.fields=d.util.newFieldList(()=>[{no:1,name:"text",kind:"scalar",T:9,oneof:"chunk"},{no:2,name:"item",kind:"message",T:UE,oneof:"chunk"}])}static fromBinary(e,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},mC=class r extends b{constructor(e){super();this.matchRepoName="";this.matchPath="";this.pinnedContexts=[];d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.PinnedContextConfig"}static{this.fields=d.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:fC,repeated:!0}])}static fromBinary(e,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},fC=class r extends b{constructor(e){super();this.contextItem={case:void 0};d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.PinnedContext"}static{this.fields=d.util.newFieldList(()=>[{no:1,name:"repository_path",kind:"message",T:gC,oneof:"context_item"}])}static fromBinary(e,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},gC=class r extends b{constructor(e){super();this.remoteRepoName="";this.version="";this.relativePath="";d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.RepositoryPath"}static{this.fields=d.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,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},BU=class r extends b{constructor(e){super();this.pinnedContextConfigs=[];d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.DefaultPinnedContextConfig"}static{this.fields=d.util.newFieldList(()=>[{no:1,name:"pinned_context_configs",kind:"message",T:mC,repeated:!0}])}static fromBinary(e,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},hC=class r extends b{constructor(e){super();this.id="";this.prompt="";d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.Rule"}static{this.fields=d.util.newFieldList(()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"prompt",kind:"scalar",T:9}])}static fromBinary(e,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},VU=class r extends b{constructor(e){super();this.id="";this.startLine=0;this.endLine=0;d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.RuleViolation"}static{this.fields=d.util.newFieldList(()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"rule",kind:"message",T:hC},{no:3,name:"start_line",kind:"scalar",T:5},{no:4,name:"end_line",kind:"scalar",T:5}])}static fromBinary(e,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},GU=class r extends b{constructor(e){super();this.logs=[];this.goroutineProfile=new Uint8Array(0);d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.LanguageServerDiagnostics"}static{this.fields=d.util.newFieldList(()=>[{no:1,name:"logs",kind:"scalar",T:9,repeated:!0},{no:2,name:"goroutine_profile",kind:"scalar",T:12}])}static fromBinary(e,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},HU=class r extends b{constructor(n){super(),d.util.initPartial(n,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.IndexerStats"}static{this.fields=d.util.newFieldList(()=>[{no:1,name:"database",kind:"message",T:IC}])}static fromBinary(n,e){return new r().fromBinary(n,e)}static fromJson(n,e){return new r().fromJson(n,e)}static fromJsonString(n,e){return new r().fromJsonString(n,e)}static equals(n,e){return d.util.equals(r,n,e)}},IC=class r extends b{constructor(e){super();this.backend={case:void 0};d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.IndexerDbStats"}static{this.fields=d.util.newFieldList(()=>[{no:1,name:"local_sqlite_faiss",kind:"message",T:vC,oneof:"backend"},{no:2,name:"postgres",kind:"message",T:yC,oneof:"backend"}])}static fromBinary(e,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},vC=class r extends b{constructor(e){super();this.faissStateStats=[];this.totalItemCount=X.zero;this.quantized=!1;d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.LocalSqliteFaissDbStats"}static{this.fields=d.util.newFieldList(()=>[{no:1,name:"faiss_state_stats",kind:"message",T:EC,repeated:!0},{no:2,name:"total_item_count",kind:"scalar",T:3},{no:3,name:"quantized",kind:"scalar",T:8}])}static fromBinary(e,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},EC=class r extends b{constructor(e){super();this.embeddingSource=0;this.workspace="";this.itemCount=X.zero;d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.FaissStateStats"}static{this.fields=d.util.newFieldList(()=>[{no:1,name:"embedding_source",kind:"enum",T:d.getEnumType(rA)},{no:2,name:"workspace",kind:"scalar",T:9},{no:3,name:"item_count",kind:"scalar",T:3}])}static fromBinary(e,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},yC=class r extends b{constructor(n){super(),d.util.initPartial(n,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.PostgresDbStats"}static{this.fields=d.util.newFieldList(()=>[])}static fromBinary(n,e){return new r().fromBinary(n,e)}static fromJson(n,e){return new r().fromJson(n,e)}static fromJsonString(n,e){return new r().fromJsonString(n,e)}static equals(n,e){return d.util.equals(r,n,e)}},SC=class r extends b{constructor(e){super();this.type=0;d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.LastUpdateRecord"}static{this.fields=d.util.newFieldList(()=>[{no:1,name:"time",kind:"message",T:Re},{no:2,name:"type",kind:"enum",T:d.getEnumType(HA)}])}static fromBinary(e,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},JU=class r extends b{constructor(e){super();this.records=[];d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.LastUpdateRecordList"}static{this.fields=d.util.newFieldList(()=>[{no:1,name:"records",kind:"message",T:SC,repeated:!0}])}static fromBinary(e,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},VE=class r extends b{constructor(e){super();this.modelDeprecated=0;this.modelUid="";this.billingModelUid="";this.requestedModelUid="";this.inputTokens=X.zero;this.outputTokens=X.zero;this.cacheWriteTokens=X.zero;this.cacheReadTokens=X.zero;this.apiProvider=0;this.messageId="";this.responseHeader={};d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.ModelUsageStats"}static{this.fields=d.util.newFieldList(()=>[{no:1,name:"model_deprecated",jsonName:"model",kind:"enum",T:d.getEnumType(Yn)},{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:d.getEnumType(Lu)},{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,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},qU=class r extends b{constructor(e){super();this.reason="";d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.SuperCompleteFilterReason"}static{this.fields=d.util.newFieldList(()=>[{no:1,name:"reason",kind:"scalar",T:9}])}static fromBinary(e,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},_C=class r extends b{constructor(e){super();this.id="";this.title="";d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.DiagnosticFix"}static{this.fields=d.util.newFieldList(()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"title",kind:"scalar",T:9}])}static fromBinary(e,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},KU=class r extends b{constructor(e){super();this.message="";this.severity="";this.source="";this.uri="";this.language=0;this.score=X.zero;this.fixes=[];d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.CodeDiagnostic"}static{this.fields=d.util.newFieldList(()=>[{no:1,name:"range",kind:"message",T:kl},{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:d.getEnumType(yo)},{no:8,name:"score",kind:"scalar",T:3},{no:9,name:"fixes",kind:"message",T:_C,repeated:!0}])}static fromBinary(e,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},jU=class r extends b{constructor(e){super();this.text="";this.label="";this.labelDetail="";this.description="";this.detail="";this.documentation="";this.kind="";this.selected=!1;d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.IntellisenseSuggestion"}static{this.fields=d.util.newFieldList(()=>[{no:1,name:"range",kind:"message",T:kl},{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,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},wC=class r extends b{constructor(e){super();this.overlappedCodeContextItems=[];this.firstElementSuffixOverlap=0;this.lastElementPrefixOverlap=0;d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.DocumentLinesElement"}static{this.fields=d.util.newFieldList(()=>[{no:1,name:"document_query",kind:"message",T:bC},{no:2,name:"overlapped_code_context_items",kind:"message",T:Ol,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,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},bC=class r extends b{constructor(e){super();this.text="";this.cursorOffset=0;this.startLine=0;this.endLine=0;this.useCharacterPosition=!1;d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.DocumentQuery"}static{this.fields=d.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,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},TC=class r extends b{constructor(e){super();this.element={case:void 0};d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.DocumentOutlineElement"}static{this.fields=d.util.newFieldList(()=>[{no:1,name:"code_context_item",kind:"message",T:Ol,oneof:"element"},{no:2,name:"document_lines_element",kind:"message",T:wC,oneof:"element"},{no:3,name:"text",kind:"scalar",T:9,oneof:"element"}])}static fromBinary(e,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},zU=class r extends b{constructor(e){super();this.elements=[];this.startIndex=X.zero;d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.DocumentOutline"}static{this.fields=d.util.newFieldList(()=>[{no:1,name:"elements",kind:"message",T:TC,repeated:!0},{no:2,name:"start_index",kind:"scalar",T:3}])}static fromBinary(e,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},YU=class r extends b{constructor(e){super();this.eventName="";this.apiKey="";this.installationId="";this.ideName="";this.os="";this.codeiumVersion="";this.ideVersion="";this.durationMs=X.zero;this.extra={};d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.ProductEvent"}static{this.fields=d.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,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},PC=class r extends b{constructor(e){super();this.id="";this.name="";this.description="";this.codebaseRootUri="";this.fileNames=[];this.commitMessages=[];this.commitSha=[];this.commitDescriptions=[];this.fileDescriptions=[];this.intent="";d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.CodebaseCluster"}static{this.fields=d.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,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},QU=class r extends b{constructor(e){super();this.clusters=[];d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.CodebaseClusterList"}static{this.fields=d.util.newFieldList(()=>[{no:1,name:"clusters",kind:"message",T:PC,repeated:!0}])}static fromBinary(e,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},CC=class r extends b{constructor(e){super();this.chunkType={case:void 0};this.position=0;d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.KnowledgeBaseChunk"}static{this.fields=d.util.newFieldList(()=>[{no:1,name:"text",kind:"scalar",T:9,oneof:"chunk_type"},{no:3,name:"markdown_chunk",kind:"message",T:DC,oneof:"chunk_type"},{no:2,name:"position",kind:"scalar",T:5}])}static fromBinary(e,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},AC=class r extends b{constructor(e){super();this.documentId="";this.url="";this.title="";this.chunks=[];this.summary="";this.text="";d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.KnowledgeBaseItem"}static{this.fields=d.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:Re},{no:6,name:"chunks",kind:"message",T:CC,repeated:!0},{no:7,name:"summary",kind:"scalar",T:9},{no:8,name:"image",kind:"message",T:xC},{no:9,name:"dom_tree",kind:"message",T:HP},{no:2,name:"text",kind:"scalar",T:9}])}static fromBinary(e,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},RC=class r extends b{constructor(e){super();this.score=0;this.indexName="";this.documentSourceName="";d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.KnowledgeBaseItemWithMetadata"}static{this.fields=d.util.newFieldList(()=>[{no:1,name:"knowledge_base_item",kind:"message",T:AC},{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,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},XU=class r extends b{constructor(e){super();this.description="";this.children=[];d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.KnowledgeBaseGroup"}static{this.fields=d.util.newFieldList(()=>[{no:1,name:"description",kind:"scalar",T:9},{no:2,name:"item",kind:"message",T:RC},{no:3,name:"children",kind:"message",T:r,repeated:!0}])}static fromBinary(e,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},xC=class r extends b{constructor(e){super();this.base64Data="";this.mimeType="";this.caption="";d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.ImageData"}static{this.fields=d.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,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},$U=class r extends b{constructor(e){super();this.text="";this.mimeType="";d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.TextData"}static{this.fields=d.util.newFieldList(()=>[{no:1,name:"text",kind:"scalar",T:9},{no:2,name:"mime_type",kind:"scalar",T:9}])}static fromBinary(e,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},DC=class r extends b{constructor(e){super();this.headers=[];this.text="";d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.MarkdownChunk"}static{this.fields=d.util.newFieldList(()=>[{no:1,name:"headers",kind:"message",T:OC,repeated:!0},{no:2,name:"text",kind:"scalar",T:9}])}static fromBinary(e,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},OC=class r extends b{constructor(e){super();this.type=0;this.text="";d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.MarkdownChunk.MarkdownHeader"}static{this.fields=d.util.newFieldList(()=>[{no:1,name:"type",kind:"enum",T:d.getEnumType(qA)},{no:2,name:"text",kind:"scalar",T:9}])}static fromBinary(e,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},kC=class r extends b{constructor(e){super();this.terminalId="";this.commandLine="";this.cwd="";this.source=0;d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.TerminalShellCommandHeader"}static{this.fields=d.util.newFieldList(()=>[{no:7,name:"metadata",kind:"message",T:xE},{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:Re},{no:6,name:"source",kind:"enum",T:d.getEnumType(YE)}])}static fromBinary(e,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},NC=class r extends b{constructor(e){super();this.rawData=new Uint8Array(0);d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.TerminalShellCommandData"}static{this.fields=d.util.newFieldList(()=>[{no:1,name:"raw_data",kind:"scalar",T:12}])}static fromBinary(e,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},LC=class r extends b{constructor(n){super(),d.util.initPartial(n,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.TerminalShellCommandTrailer"}static{this.fields=d.util.newFieldList(()=>[{no:1,name:"exit_code",kind:"scalar",T:5,opt:!0},{no:2,name:"end_time",kind:"message",T:Re},{no:3,name:"full_output",kind:"scalar",T:9,opt:!0},{no:4,name:"ansi_output",kind:"scalar",T:9,opt:!0}])}static fromBinary(n,e){return new r().fromBinary(n,e)}static fromJson(n,e){return new r().fromJson(n,e)}static fromJsonString(n,e){return new r().fromJsonString(n,e)}static equals(n,e){return d.util.equals(r,n,e)}},ZU=class r extends b{constructor(e){super();this.value={case:void 0};d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.TerminalShellCommandStreamChunk"}static{this.fields=d.util.newFieldList(()=>[{no:1,name:"header",kind:"message",T:kC,oneof:"value"},{no:2,name:"data",kind:"message",T:NC,oneof:"value"},{no:3,name:"trailer",kind:"message",T:LC,oneof:"value"}])}static fromBinary(e,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},eF=class r extends b{constructor(e){super();this.id="";this.commandLine="";this.cwd="";this.output=new Uint8Array(0);this.status=0;this.source=0;d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.TerminalShellCommand"}static{this.fields=d.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:Re},{no:7,name:"end_time",kind:"message",T:Re},{no:11,name:"last_updated_time",kind:"message",T:Re},{no:8,name:"status",kind:"enum",T:d.getEnumType(KA)},{no:9,name:"source",kind:"enum",T:d.getEnumType(YE)}])}static fromBinary(e,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},tF=class r extends b{constructor(e){super();this.terminalId="";this.platform="";this.cwd="";this.shellName="";d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.TerminalCommandData"}static{this.fields=d.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,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},nF=class r extends b{constructor(e){super();this.windsurfProjectId="";this.authUid="";this.deploymentProvider=0;this.providerProjectId="";this.projectName="";this.domain="";this.subdomainName="";this.providerTeamId="";this.projectUrl="";d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.WindsurfProject"}static{this.fields=d.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:d.getEnumType(Jf)},{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:Re},{no:7,name:"updated_at",kind:"message",T:Re},{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:Re},{no:11,name:"claimed_at",kind:"message",T:Re},{no:12,name:"deprovisioned_at",kind:"message",T:Re},{no:14,name:"provider_team_id",kind:"scalar",T:9},{no:13,name:"project_url",kind:"scalar",T:9}])}static fromBinary(e,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},rF=class r extends b{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="";d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.WindsurfDeployment"}static{this.fields=d.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:d.getEnumType(Jf)},{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:Re},{no:8,name:"updated_at",kind:"message",T:Re},{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:Re},{no:12,name:"deployment_url",kind:"scalar",T:9},{no:15,name:"claimed_at",kind:"message",T:Re},{no:13,name:"deprovisioned_at",kind:"message",T:Re},{no:9,name:"build_status_url",kind:"scalar",T:9},{no:10,name:"project_url",kind:"scalar",T:9}])}static fromBinary(e,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},iF=class r extends b{constructor(e){super();this.deploymentProvider=0;this.isSandbox=!1;this.providerTeamId="";this.providerTeamSlug="";this.domain="";d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.DeployTarget"}static{this.fields=d.util.newFieldList(()=>[{no:1,name:"deployment_provider",kind:"enum",T:d.getEnumType(Jf)},{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,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},oF=class r extends b{constructor(e){super();this.label="";this.value={case:void 0};this.synonyms=[];this.isFeatured=!1;d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.WebDocsOption"}static{this.fields=d.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,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},GE=class r extends b{constructor(e){super();this.teamId="";this.userPromptCreditCap=0;this.userFlowCreditCap=0;this.autoProvisionCascadeSeat=!1;this.allowMcpServers=!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="";this.disablePlugins=!1;this.subagentDefaultModelUid="";this.sandboxExcludedAllow=[];this.sandboxExcludedAsk=[];this.sandboxExcludedDeny=[];d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.TeamConfig"}static{this.fields=d.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: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:MC,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:d.getEnumType(Hf)},{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:d.getEnumType(jA)},{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},{no:66,name:"api_key_expiration_days",kind:"scalar",T:5,opt:!0},{no:67,name:"disable_plugins",kind:"scalar",T:8},{no:68,name:"subagent_default_model_uid",kind:"scalar",T:9},{no:69,name:"sandbox_excluded_allow",kind:"scalar",T:9,repeated:!0},{no:70,name:"sandbox_excluded_ask",kind:"scalar",T:9,repeated:!0},{no:71,name:"sandbox_excluded_deny",kind:"scalar",T:9,repeated:!0}])}static fromBinary(e,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},sF=class r extends b{constructor(e){super();this.projectId="";this.framework="";d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.WebAppDeploymentConfig"}static{this.fields=d.util.newFieldList(()=>[{no:1,name:"project_id",kind:"scalar",T:9},{no:2,name:"framework",kind:"scalar",T:9}])}static fromBinary(e,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},MC=class r extends b{constructor(e){super();this.serverId="";this.configuration={case:void 0};d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.McpServerConfig"}static{this.fields=d.util.newFieldList(()=>[{no:1,name:"server_id",kind:"scalar",T:9},{no:2,name:"local",kind:"message",T:UC,oneof:"configuration"},{no:3,name:"remote",kind:"message",T:FC,oneof:"configuration"}])}static fromBinary(e,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},UC=class r extends b{constructor(e){super();this.command="";this.args=[];this.env={};d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.McpLocalServer"}static{this.fields=d.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,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},FC=class r extends b{constructor(e){super();this.type="";this.url="";this.headers={};d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.McpRemoteServer"}static{this.fields=d.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,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},aF=class r extends b{constructor(e){super();this.userId="";this.sessionId="";this.properties={};d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.UnleashContext"}static{this.fields=d.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,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},WC=class r extends b{constructor(e){super();this.url="";this.pageId="";this.pageTitle="";this.viewportWidth=0;this.viewportHeight=0;this.faviconUrl="";d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.BrowserPageMetadata"}static{this.fields=d.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:Re}])}static fromBinary(e,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},BC=class r extends b{constructor(e){super();this.viewportScrollX=0;this.viewportScrollY=0;this.clickX=0;this.clickY=0;this.targetElementTagName="";this.targetElementXPath="";d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.BrowserClickInteraction"}static{this.fields=d.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,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},VC=class r extends b{constructor(e){super();this.viewportScrollX=0;this.viewportScrollY=0;d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.BrowserScrollInteraction"}static{this.fields=d.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,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},lF=class r extends b{constructor(e){super();this.interaction={case:void 0};d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.BrowserInteraction"}static{this.fields=d.util.newFieldList(()=>[{no:1,name:"timestamp",kind:"message",T:Re},{no:2,name:"page_metadata",kind:"message",T:WC},{no:3,name:"click",kind:"message",T:BC,oneof:"interaction"},{no:4,name:"scroll",kind:"message",T:VC,oneof:"interaction"}])}static fromBinary(e,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},cF=class r extends b{constructor(e){super();this.name="";this.value=0;this.details={};this.lowerBetter=!1;this.isBool=!1;this.error="";this.trajectoryId="";d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.MetricsRecord"}static{this.fields=d.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,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},GC=class r extends b{constructor(e){super();this.model=0;this.modelUid="";this.message="";d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.ModelNotification"}static{this.fields=d.util.newFieldList(()=>[{no:1,name:"model",kind:"enum",T:d.getEnumType(Yn)},{no:3,name:"model_uid",kind:"scalar",T:9},{no:2,name:"message",kind:"scalar",T:9}])}static fromBinary(e,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},dF=class r extends b{constructor(e){super();this.modelNotifications=[];d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.ModelNotificationExperimentPayload"}static{this.fields=d.util.newFieldList(()=>[{no:1,name:"model_notifications",kind:"message",T:GC,repeated:!0}])}static fromBinary(e,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},uF=class r extends b{constructor(e){super();this.uri="";d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.LspReference"}static{this.fields=d.util.newFieldList(()=>[{no:1,name:"uri",kind:"scalar",T:9},{no:2,name:"range",kind:"message",T:kl},{no:3,name:"snippet",kind:"scalar",T:9,opt:!0}])}static fromBinary(e,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},pF=class r extends b{constructor(e){super();this.text="";this.tooltipText="";d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.CascadeModelHeaderWarningExperimentPayload"}static{this.fields=d.util.newFieldList(()=>[{no:1,name:"text",kind:"scalar",T:9},{no:2,name:"tooltip_text",kind:"scalar",T:9}])}static fromBinary(e,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},HC=class r extends b{constructor(e){super();this.id="";this.uri="";this.line=0;this.content="";d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.CodeAnnotation"}static{this.fields=d.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:Re}])}static fromBinary(e,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},mF=class r extends b{constructor(e){super();this.annotations=[];d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.CodeAnnotationsState"}static{this.fields=d.util.newFieldList(()=>[{no:1,name:"annotations",kind:"message",T:HC,repeated:!0}])}static fromBinary(e,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},fF=class r extends b{constructor(e){super();this.description={case:void 0};d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.TrajectoryDescription"}static{this.fields=d.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,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},gF=class r extends b{constructor(e){super();this.provider=0;this.model=0;d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.ThirdPartyWebSearchConfig"}static{this.fields=d.util.newFieldList(()=>[{no:1,name:"provider",kind:"enum",T:d.getEnumType(QA)},{no:2,name:"model",kind:"enum",T:d.getEnumType(XA)}])}static fromBinary(e,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},hF=class r extends b{constructor(e){super();this.code=0;this.message="";d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.GRPCStatus"}static{this.fields=d.util.newFieldList(()=>[{no:1,name:"code",kind:"scalar",T:5},{no:2,name:"message",kind:"scalar",T:9}])}static fromBinary(e,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},IF=class r extends b{constructor(e){super();this.ideVersion="";d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.CascadeDataMetadata"}static{this.fields=d.util.newFieldList(()=>[{no:1,name:"ide_version",kind:"scalar",T:9}])}static fromBinary(e,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},JC=class r extends b{constructor(e){super();this.enabled=!1;this.model=0;this.modelDisplayName="";this.agentVersion="";d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.LifeguardModeConfig"}static{this.fields=d.util.newFieldList(()=>[{no:1,name:"enabled",kind:"scalar",T:8},{no:2,name:"model",kind:"enum",T:d.getEnumType(Yn)},{no:3,name:"model_display_name",kind:"scalar",T:9},{no:4,name:"agent_version",kind:"scalar",T:9}])}static fromBinary(e,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},vF=class r extends b{constructor(e){super();this.modes={};d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.LifeguardConfig"}static{this.fields=d.util.newFieldList(()=>[{no:1,name:"modes",kind:"map",K:9,V:{kind:"message",T:JC}}])}static fromBinary(e,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},EF=class r extends b{constructor(e){super();this.title="";this.dimensions=[];d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.ResponseDimensionGroup"}static{this.fields=d.util.newFieldList(()=>[{no:1,name:"title",kind:"scalar",T:9},{no:2,name:"dimensions",kind:"message",T:qC,repeated:!0}])}static fromBinary(e,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},qC=class r extends b{constructor(e){super();this.dimension={case:void 0};this.uid="";d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.ResponseDimension"}static{this.fields=d.util.newFieldList(()=>[{no:2,name:"copyable_code",kind:"message",T:KC,oneof:"dimension"},{no:3,name:"metric",kind:"message",T:jC,oneof:"dimension"},{no:4,name:"cumulative_metric",kind:"message",T:zC,oneof:"dimension"},{no:5,name:"uid",kind:"scalar",T:9}])}static fromBinary(e,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},KC=class r extends b{constructor(e){super();this.label="";this.value="";d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.ResponseDimensionCopyableCode"}static{this.fields=d.util.newFieldList(()=>[{no:1,name:"label",kind:"scalar",T:9},{no:2,name:"value",kind:"scalar",T:9}])}static fromBinary(e,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},jC=class r extends b{constructor(e){super();this.label="";this.value="";d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.ResponseDimensionMetric"}static{this.fields=d.util.newFieldList(()=>[{no:1,name:"label",kind:"scalar",T:9},{no:2,name:"value",kind:"scalar",T:9}])}static fromBinary(e,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}},zC=class r extends b{constructor(e){super();this.label="";this.value=0;this.tail="";this.pluralTail="";this.prefix="";d.util.initPartial(e,this)}static{this.runtime=d}static{this.typeName="exa.codeium_common_pb.ResponseDimensionCumulativeMetric"}static{this.fields=d.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,t){return new r().fromBinary(e,t)}static fromJson(e,t){return new r().fromJson(e,t)}static fromJsonString(e,t){return new r().fromJsonString(e,t)}static equals(e,t){return d.util.equals(r,e,t)}}});function Ze(r,n){return Object.keys(n).find(i=>n[i]===r)}var ca,R0e,qF=_(()=>{JF();ca={extensionId:"codeium.windsurf",statusBarItemIdSuffixes:{settings:"settings",planInfo:"settings.planInfo"},authProviderId:"windsurf_auth",commands:{LOGIN_WITH_REDIRECT:{id:"devin.login"},LOGIN_WITH_AUTH_TOKEN:{id:"devin.loginWithAuthToken"},LOGOUT:{id:"devin.logout"},PROVIDE_WINDSURF_AUTH_TOKEN_TO_AUTH_PROVIDER:{id:"devin.provideWindsurfAuthTokenToAuthProvider"},PROVIDE_DEVIN_AUTH_CODE_TO_AUTH_PROVIDER:{id:"devin.provideDevinAuthCodeToAuthProvider"},CANCEL_LOGIN:{id:"devin.cancelLogin"},IMPORT_VS_CODE_SETTINGS:{id:"devin.importVSCodeSettings"},IMPORT_VS_CODE_EXTENSIONS:{id:"devin.importVSCodeExtensions"},IMPORT_VS_CODE_RECENT_WORKSPACES:{id:"devin.importVSCodeRecentWorkspaces"},IMPORT_CURSOR_SETTINGS:{id:"devin.importCursorSettings"},IMPORT_CURSOR_EXTENSIONS:{id:"devin.importCursorExtensions"},IMPORT_WINDSURF_SETTINGS:{id:"devin.importWindsurfSettings"},IMPORT_WINDSURF_EXTENSIONS:{id:"devin.importWindsurfExtensions"},GENERATE_COMMIT_MESSAGE:{id:"devin.generateCommitMessage"},CANCEL_GENERATE_COMMIT_MESSAGE:{id:"devin.cancelGenerateCommitMessage"},ACCEPT_COMPLETION:{id:"devin.acceptCompletion"},OPEN_PROFILE:{id:"devin.openProfile"},OPEN_GENERIC_URL:{id:"devin.openGenericUrl"},OPEN_DOCS:{id:"devin.openDocs"},OPEN_COMMUNITY:{id:"devin.openCommunity"},OPEN_CHANGELOG:{id:"devin.openChangeLog"},OPEN_BILLING_PAGE:{id:"devin.openBillingPage"},OPEN_USAGE_PAGE:{id:"devin.openUsagePage"},OPEN_AUTO_REFILL_PAGE:{id:"devin.openAutoRefillPage"},OPEN_PRICING_PAGE:{id:"devin.openPricingPage"},OPEN_MCP_DOCS_PAGE:{id:"devin.openMcpDocsPage"},OPEN_REFERRAL_LINK:{id:"devin.openReferralLink"},GET_MCP_REGISTRY_SERVERS:{id:"devin.getMcpRegistryServers"},SEND_TEXT_TO_CHAT:{id:"devin.sendTextToChat"},SEND_TERMINAL_TO_CHAT:{id:"devin.sendTerminalToChat"},TOGGLE_CHAT_FOCUS:{id:"devin.prioritized.chat.open"},ADD_CURRENT_FILE_TO_CHAT:{id:"devin.addCurrentFileToChat"},TOGGLE_CHAT_FOCUS_FROM_PROBLEMS_PANEL:{id:"devin.prioritized.chat.openFromProblemsPanel"},TOGGLE_CHAT_FOCUS_FROM_PROBLEMS_PANEL_FOR_SINGLE_FILE:{id:"devin.prioritized.chat.openFromProblemsPanelForSingleFile"},ATTACH_LIFEGUARD_BUG_TO_CHAT:{id:"devin.lifeguard.attachBugToChat"},LEARN_FROM_LIFEGUARD_BUG:{id:"devin.lifeguard.learnFromBug"},RESTART_LS:{id:"devin.restartLanguageServer"},IMPORT_RULES_FROM_CURSOR:{id:"devin.importRulesFromCursor"},HAS_CURSOR_RULES:{id:"devin.hasCursorRules"},CREATE_WORKFLOW:{id:"devin.createWorkflow"},CREATE_GLOBAL_WORKFLOW:{id:"devin.createGlobalWorkflow"},CREATE_RULE:{id:"devin.createRule"},CREATE_SKILL:{id:"devin.createSkill"},CREATE_GLOBAL_SKILL:{id:"devin.createGlobalSkill"},MIGRATE_WORKSPACE_CONFIG:{id:"devin.migrateWorkspaceConfig"},TRIGGER_CASCADE:{id:"devin.triggerCascade"},EXECUTE_CASCADE_ACTION:{id:"devin.executeCascadeAction"},OPEN_NEW_CASCADE_CONVERSATION:{id:"devin.prioritized.chat.openNewConversation"},RESET_CURRENT_CASCADE_CONVERSATION:{id:"devin.cascade.resetCurrentConversation"},INITIALIZE_CASCADE:{id:"devin.initializeCascade"},CASCADE_CHAT_CLIENT_ACCEPT_CASCADE_STEP:{id:"devin.cascade.acceptCascadeStep"},CASCADE_CHAT_CLIENT_REJECT_CASCADE_STEP:{id:"devin.cascade.rejectCascadeStep"},COMMAND_OPEN:{id:"devin.prioritized.command.open",priority:1},COMMAND_ACCEPT:{id:"devin.command.accept"},COMMAND_REJECT:{id:"devin.command.reject"},COMMAND_RESET_COMPLETIONS:{id:"devin.command.resetCompletions"},COMMAND_INCREMENT_GUEST_REQUESTS:{id:"devin.command.incrementGuestRequests"},COMMAND_SET_ACTIVE_EDITOR_URIS:{id:"devin.command.setActiveEditorUris"},TERMINAL_COMMAND_OPEN:{id:"devin.prioritized.terminalCommand.open"},TERMINAL_COMMAND_RUN:{id:"devin.terminalCommand.run"},TERMINAL_COMMAND_ACCEPT:{id:"devin.terminalCommand.accept"},TERMINAL_COMMAND_REJECT:{id:"devin.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:"devin.prioritized.supercompleteAccept",priority:1},SUPERCOMPLETE_FORCE:{id:"devin.forceSupercomplete"},SUPERCOMPLETE_ESCAPE:{id:"devin.prioritized.supercompleteEscape"},TAB_JUMP_ACCEPT:{id:"devin.prioritized.tabJumpAccept",priority:1},TAB_JUMP_ESCAPE:{id:"devin.prioritized.tabJumpEscape"},RELOAD_COMMAND:{id:"workbench.action.reloadWindow"},OPEN_DIFF_VIEW:{id:"devin.openDiffView"},OPEN_DIFF_ZONES:{id:"devin.openDiffZones"},EDIT_WITH_DIFF_ZONE:{id:"devin.editWithDiffZone"},EXPLAIN_PROBLEM:{id:"devin.explainProblem"},RESET_PRODUCT_EDUCATION:{id:"devin.resetProductEducation"},FIRE_PRODUCT_ANALYTICS_EVENT:{id:"devin.fireProductAnalyticsEvent"},FIRE_LSP_TELEMETRY_EVENT:{id:"devin.fireLspTelemetryEvent"},CASCADE_ACCEPT_ALL_IN_FILE:{id:"devin.prioritized.cascadeAcceptAllInFile"},CASCADE_REJECT_ALL_IN_FILE:{id:"devin.prioritized.cascadeRejectAllInFile"},CASCADE_NAV_TO_NEXT_HUNK:{id:"devin.prioritized.cascadeFocusNextHunk"},CASCADE_NAV_TO_PREVIOUS_HUNK:{id:"devin.prioritized.cascadeFocusPreviousHunk"},CASCADE_NAV_TO_NEXT_FILE:{id:"devin.prioritized.cascadeFocusNextFile"},CASCADE_NAV_TO_PREVIOUS_FILE:{id:"devin.prioritized.cascadeFocusPreviousFile"},UPDATE_PLAN_INFO:{id:"devin.updatePlanInfo"},ACCEPT_FOCUSED_DIFFZONE_HUNK:{id:"devin.prioritized.cascadeAcceptFocusedHunk"},REJECT_FOCUSED_DIFFZONE_HUNK:{id:"devin.prioritized.cascadeRejectFocusedHunk"},OPEN_CUSTOMIZATIONS_TAB:{id:"devin.openCustomizationsTab"},OPEN_CASCADE_MCP_CONFIG_FILE:{id:"devin.openCascadeMcpConfigFile"},OPEN_RULES_EDUCATIONAL_LINK:{id:"devin.openRulesEducationalLink"},DOWNLOAD_DIAGNOSTICS:{id:"devin.downloadDiagnostics"},COPY_API_KEY:{id:"devin.copyApiKey"},GET_DIAGNOSTICS_INFO:{id:"devin.getDiagnosticInfo"},UPDATE_USER_SETTINGS:{id:"devin.updateUserSetting"},REFRESH_MCP_SERVERS:{id:"devin.refreshMcpServers"},OPEN_CONFIGURE_PLUGINS_PAGE:{id:"devin.openConfigurePluginsPage"},CASCADE_PRESS_MICROPHONE:{id:"devin.cascade.pressMicrophone"},CASCADE_TOGGLE_WRITE_CHAT_MODE:{id:"devin.prioritized.chat.toggleWriteChatMode"},CASCADE_OPEN_AGENT_PICKER:{id:"devin.cascade.openAgentPicker"},CASCADE_TOGGLE_MODEL_SELECTOR:{id:"devin.cascade.toggleModelSelector"},CASCADE_SWITCH_TO_NEXT_MODEL:{id:"devin.cascade.switchToNextModel"},CASCADE_TOGGLE_WORKTREE:{id:"devin.cascade.toggleWorktree"},CASCADE_TOGGLE_AGENT_SELECTOR:{id:"devin.cascade.toggleAgentSelector"},TAB_REPORTING:{id:"devin.tabReporting"},OPEN_BROWSER:{id:"devin.openBrowser"},GET_BROWSER_INSTALLATION_STATUS:{id:"devin.getBrowserInstallationStatus"},UPDATE_CONVERSATION_SUMMARIES:{id:"devin.updateConversationSummaries"},MANAGE_ANNOTATIONS:{id:"devin.cascade.manageAnnotations"},START_WORKTREE_LANGUAGE_SERVER:{id:"devin.setWorktreeLanguageServer"},DELETE_WORKTREE_LANGUAGE_SERVER:{id:"devin.deleteWorktreeLanguageServer"},RENAME_WORKTREE_BRANCH:{id:"devin.renameWorktreeBranch"},CREATE_VIBE_AND_REPLACE_SESSION:{id:"devin.createVibeAndReplaceSession"},VIBE_AND_REPLACE:{id:"devin.vibeAndReplace"},CANCEL_VIBE_AND_REPLACE:{id:"devin.cancelVibeAndReplace"},SYNCED_STATE_UPDATE_FROM_CHAT:{id:"devin.syncedState.updateFromChat"},SYNCED_STATE_UPDATE_TO_CHAT:{id:"devin.syncedState.updateToChat"},SET_WORKSPACE_CASCADE_MAP:{id:"devin.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"},WEBSITE_URL:{id:"windsurf.websiteUrl"}},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:Ze(251,Je),WINDSURF_EXTENSION_START:Ze(253,Je),LANDING_PAGE:Ze(20,Je),CAROUSEL_PAGE:Ze(21,Je),CAROUSEL_MIGRATION_PROMPT:Ze(23,Je),CAROUSEL_MIGRATION:Ze(24,Je),CAROUSEL_CHOOSE_KEYBINDINGS:Ze(22,Je),CAROUSEL_CHOOSE_THEME:Ze(35,Je),CAROUSEL_AUTH:Ze(25,Je),CAROUSEL_MANUAL_AUTH:Ze(26,Je),SEND_OFF_PAGE:Ze(27,Je),CURSOR_DETECTED:Ze(39,Je),VSCODE_DETECTED:Ze(40,Je),JETBRAINS_DETECTED:Ze(153,Je),WS_CUSTOM_APP_ICON_MODAL_OPEN:Ze(55,Je),WS_CUSTOM_APP_ICON_SELECT_CLASSIC:Ze(56,Je),WS_CUSTOM_APP_ICON_SELECT_CLASSIC_LIGHT:Ze(57,Je),WS_CUSTOM_APP_ICON_SELECT_RETRO:Ze(58,Je),WS_CUSTOM_APP_ICON_SELECT_BLUEPRINT:Ze(59,Je),WS_CUSTOM_APP_ICON_SELECT_HAND_DRAWN:Ze(60,Je),WS_CUSTOM_APP_ICON_SELECT_SUNSET:Ze(61,Je),WS_CUSTOM_APP_ICON_SELECT_VALENTINE:Ze(66,Je),WS_CUSTOM_APP_ICON_SELECT_PIXEL_SURF:Ze(82,Je),WS_SKIPPED_ONBOARDING:Ze(69,Je),WS_SETTINGS_PAGE_OPEN:Ze(72,Je),WS_SETTINGS_PAGE_OPEN_WITH_SETTING_FOCUS:Ze(73,Je),WS_SETTINGS_CHANGED_BY_USER:Ze(74,Je),EMPTY_WORKSPACE_PAGE_OPENED:Ze(209,Je),EMPTY_WORKSPACE_PAGE_RECENT_FOLDERS_CLICKED:Ze(210,Je),EMPTY_WORKSPACE_PAGE_OPEN_FOLDER_CLICKED:Ze(211,Je),EMPTY_WORKSPACE_PAGE_GENERATE_PROJECT_CLICKED:Ze(212,Je),CASCADE_VIEW_LOADED:Ze(119,Je),CASCADE_PLUGIN_PAGE_OPENED:Ze(129,Je),CASCADE_PLUGIN_INSTALLED:Ze(130,Je),CASCADE_PLUGIN_DISABLED:Ze(131,Je),CASCADE_PLUGIN_ENABLED:Ze(132,Je),CASCADE_PLUGIN_INSTALLATION_ERROR:Ze(133,Je),CASCADE_PLUGIN_TOOL_ENABLED:Ze(134,Je),CASCADE_PLUGIN_TOOL_DISABLED:Ze(135,Je),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"]};R0e=ca.commands});function i1(r,n){return r.endsWith("- Fed")?"original-fed":r.endsWith("- EU")?"eu":r.endsWith("- Secure")?"original-secure":n==="insider"?"original-insiders":n==="next"?"original-next":"classic"}var r1,M6,KF=_(()=>{qF();r1=(m=>(m.ORIGINAL_INSIDERS="original-insiders",m.ORIGINAL_NEXT="original-next",m.ORIGINAL_FED="original-fed",m.ORIGINAL_SECURE="original-secure",m.EU="eu",m.CLASSIC="classic",m.OG_WINDSURF="og-windsurf",m.HAND_DRAWN="hand-drawn",m.BLUEPRINT="blueprint",m.VALENTINE="valentine",m.RETRO="retro",m.PIXEL_SURF="pixel-surf",m))(r1||{}),M6=[{identifier:"original-insiders",name:"Devin Insiders",description:"One of us",isOriginal:!0},{identifier:"original-next",name:"Devin Next",description:"Eager for the latest and greatest",isOriginal:!0},{identifier:"original-fed",name:"Devin Fed",description:"Mission ready",isOriginal:!0},{identifier:"original-secure",name:"Devin Secure",description:"Locked down",isOriginal:!0},{identifier:"eu",name:"Devin EU",description:"European edition",isOriginal:!0},{identifier:"classic",name:"Default",description:"The standard app icon",isOriginal:!0,analyticsEvent:ca.windsurfAnalyticEvents.WS_CUSTOM_APP_ICON_SELECT_CLASSIC},{identifier:"og-windsurf",name:"OG Windsurf",description:"The one that began it all"},{identifier:"blueprint",name:"Blueprint",description:"Architected to perfection",analyticsEvent:ca.windsurfAnalyticEvents.WS_CUSTOM_APP_ICON_SELECT_BLUEPRINT},{identifier:"hand-drawn",name:"OG Sketchy",description:"Back in my day...",analyticsEvent:ca.windsurfAnalyticEvents.WS_CUSTOM_APP_ICON_SELECT_HAND_DRAWN},{identifier:"valentine",name:"Valentine",description:"Love is in the editor",analyticsEvent:ca.windsurfAnalyticEvents.WS_CUSTOM_APP_ICON_SELECT_VALENTINE},{identifier:"retro",name:"Retro",description:"Vintage charm for a futuristic workflow",analyticsEvent:ca.windsurfAnalyticEvents.WS_CUSTOM_APP_ICON_SELECT_RETRO},{identifier:"pixel-surf",name:"Pixel Surf",description:"Surf the 8-bit grid",analyticsEvent:ca.windsurfAnalyticEvents.WS_CUSTOM_APP_ICON_SELECT_PIXEL_SURF}];if(M6.length!==Object.values(r1).length)throw new Error("Invalid custom app icon list")});function QE(r){return r===2}var qf,XE=_(()=>{at();ce();Ie();qf=class r{static customAppIconsRootURI(){return gt.asFileUri("vs/workbench/contrib/windsurfCustomAppIcon/browser/media")}static icnsFilePath(n){if(Yt!==2)throw new Error("icns file paths are only supported on macOS.");let e=`${n}/${n}.icns`;return A.joinPath(r.customAppIconsRootURI(),e)}static pngFilePathSegments(n){let e=`${n}/${n}.png`;return A.joinPath(r.customAppIconsRootURI(),e)}static dockPngFilePathSegments(n){if(Yt!==2)throw new Error("Dock PNG file paths are only supported on macOS.");let e=`${n}/${n}-dock.png`;return A.joinPath(r.customAppIconsRootURI(),e)}}});var $E,Mu,da,ZE=_(()=>{$E=class extends Error{constructor(n){let e=`Failed to enact system-level icon change${n?`: ${n}`:""}`;super(e)}},Mu=class extends Error{constructor(n){let e=`The source file for this icon is missing${n?`: ${n}`:""}`;super(e)}},da=class extends Error{constructor(){super("App icon customization is not supported on this OS")}}});import{app as Kf,nativeImage as jF}from"electron";import*as Mi from"fs";var U6,Uu,zF=_(()=>{Ne();fr();KF();XE();ZE();In();gi();U6={classic:"code","original-insiders":"code-insiders","original-next":"code-next",eu:"code-eu","original-fed":"code-fed","original-secure":"code-secure"},Uu=class{constructor(n,e){this.environmentService=n;this.productService=e;this._lastSetIconPromise=Promise.resolve()}_setDockIconImage(n){if(this._isDefaultIcon(n)){try{Kf.dock?.setIcon(null)}catch{}return}let e=jF.createFromPath(qf.dockPngFilePathSegments(n).fsPath);if(e.isEmpty())throw new Mu;Kf.dock?.setIcon(e)}async _setIcnsIconImage(n){let e=this._getInstalledIcnsPath(),t=this._getTempIcnsPath(),o=this._isDefaultIcon(n)?this._getPackagedDefaultIcnsPath():this._getIcnsUri(n).fsPath;try{await Mi.promises.access(o,Mi.constants.R_OK)}catch(a){throw new Mu(a instanceof Error?a.message:String(a))}let s=!1;try{await Mi.promises.copyFile(e,t),s=!0}catch{}try{await Mi.promises.copyFile(o,e),await this._manageAssetsCatalog(n)}catch(a){if(s)try{await Mi.promises.copyFile(t,e)}catch{}throw new $E(a instanceof Error?a.message:String(a))}finally{if(s)try{await Mi.promises.unlink(t)}catch{}}}async getDefaultIconResourceString(){let n=jF.createFromPath(this._getPackagedDefaultPngPath());if(n.isEmpty())throw new Mu;return n.toDataURL()}async _manageAssetsCatalog(n){let e=this._getAssetsCatalogPath(),t=this._getAssetsCatalogBackupPath(),i=this._isDefaultIcon(n),o=i?t:e,s=i?e:t;try{await Mi.promises.access(o,Mi.constants.R_OK)}catch(a){if(a.code!=="ENOENT")throw a;return}await Mi.promises.rename(o,s)}async setIcon(n){return this._lastSetIconPromise=this._lastSetIconPromise.catch(()=>{}).then(async()=>{await this._setIcnsIconImage(n),this._setDockIconImage(n)}),this._lastSetIconPromise}_getIcnsUri(n){return qf.icnsFilePath(n)}_getTempIcnsPath(){return`${this._getInstalledIcnsPath()}.tmp`}_getAssetsCatalogPath(){let n=Kf.getPath("exe");return H(n,"..","..","Resources","Assets.car")}_getAssetsCatalogBackupPath(){let n=Kf.getPath("exe");return H(n,"..","..","Resources","Assets.car.bak")}_getInstalledIcnsPath(){let n=Kf.getPath("exe");return H(n,"..","..","Resources",this._getIcnsFileName())}_getPackagedDefaultIcnsPath(){return En.VSCODE_DEV||!this.environmentService.isBuilt?H(this.environmentService.appRoot,"resources","darwin",`${this._getCheckedInDefaultIconBaseName()}.icns`):this._getInstalledIcnsPath().replace(/\.icns$/,".default.icns")}_getPackagedDefaultPngPath(){return En.VSCODE_DEV||!this.environmentService.isBuilt?H(this.environmentService.appRoot,"resources","linux",`${this._getCheckedInDefaultIconBaseName()}.png`):this._getInstalledIcnsPath().replace(/\.icns$/,".default.png")}_getCheckedInDefaultIconBaseName(){let n=i1(this.productService.nameLong,this.productService.quality);return U6[n]??"code"}_isDefaultIcon(n){return n===i1(this.productService.nameLong,this.productService.quality)}_getIcnsFileName(){return En.VSCODE_DEV||!this.environmentService.isBuilt?"Windsurf.icns":`${this.productService.nameShort}.icns`}};Uu=D([S(0,kn),S(1,He)],Uu)});var Fu,Y0e,YF=_(()=>{de();Fu=V("windsurfAppIcon"),Y0e=Fu});var ey,QF=_(()=>{ce();ZE();XE();ey=class{async getDefaultIconResourceString(){throw new da}async setIcon(n){throw QE(1)?new Error("Unexpected empty method implementation"):new da}}});var ty,XF=_(()=>{ce();ZE();XE();ty=class{async getDefaultIconResourceString(){throw new da}async setIcon(n){throw QE(3)?new Error("Unexpected empty method implementation"):new da}}});var ny,$F=_(()=>{ny=class{constructor(){this._isMenuActionMap=new Map}isMenuAction(n){return Promise.resolve(this._isMenuActionMap.get(n)??!1)}setIsMenuAction(n,e){this._isMenuActionMap.set(n,e)}}});function ds(r){if(r){if(Kt(r))return r.uri;if(yt(r))return r.configPath}}var o1,dke,s1=_(()=>{de();Ln();o1=V("windsurfWindowsMainManager"),dke=V("windsurfWindowsManager")});var mke,jf,a1=_(()=>{de();mke=V("windsurf.languageServerService"),jf=V("windsurf.languageServerMainService")});var di,ZF=_(()=>{ae();s1();te();zt();me();Ne();qo();$t();Xt();vr();Ie();EI();Ut();Bt();Vt();a1();di=class extends M{constructor(e,t,i,o,s,a){super();this._windowsMainService=e;this._logService=t;this._environmentMainService=i;this._stateService=o;this._lifecycleMainService=s;this._languageServerMainService=a;this._onDidChangeWindows=this._register(new C);this.onDidChangeWindows=this._onDidChangeWindows.event;this._onDidChangeWindowGroupInfo=this._register(new C);this.onDidChangeWindowGroupInfo=this._onDidChangeWindowGroupInfo.event;this._onDidChangeWindowInfo=this._register(new C);this.onDidChangeWindowInfo=this._onDidChangeWindowInfo.event;this._activeWindowGroups=new Map;this._windowGroupsState=new Map;this._isShuttingDown=!1;this._loadWindowGroupsState(),this._register(this._lifecycleMainService.onWillLoadWindow(l=>{this._logService.info("WindsurfWindowsMainManager: Window will load",{windowId:l.window.id,workspaceUri:l.workspace});let c=ds(l.workspace);c&&this._tryRestoreWindowGroup(l.window,c)})),this._register(this._lifecycleMainService.onBeforeCloseWindow(l=>{this._logService.info("WindsurfWindowsMainManager: Window will close",{windowId:l.id,workspaceUri:l.openedWorkspace}),this._handleWindowClose(l)})),this._register(this._lifecycleMainService.onBeforeShutdown(()=>{this._isShuttingDown=!0,this._logService.info("WindsurfWindowsMainManager: Shutdown initiated, capturing current window group state");for(let[l]of this._activeWindowGroups)this._commitGroupState(l)}))}static{this.MAX_CHILDREN_PER_GROUP=3}static{this.WINDOW_GROUPS_STATE_KEY="windsurf.windowGroupsState"}_loadWindowGroupsState(){try{let e=this._stateService.getItem(di.WINDOW_GROUPS_STATE_KEY);if(e){let t=Object.entries(e).map(([i,o])=>{let s={...o,parentWorkspaceUri:o.parentWorkspaceUri?A.revive(o.parentWorkspaceUri):void 0,children:o.children.map(a=>({...a,workspaceUri:A.revive(a.workspaceUri),lastActiveTimestamp:a.lastActiveTimestamp??Date.now()})),currentActiveWindowWorkspaceUri:o.currentActiveWindowWorkspaceUri?A.revive(o.currentActiveWindowWorkspaceUri):void 0};return[i,s]});this._windowGroupsState=new Map(t)}}catch(e){this._logService.error("Failed to load window groups state",e)}}_saveWindowGroupsState(){try{this._stateService.setItem(di.WINDOW_GROUPS_STATE_KEY,Object.fromEntries(this._windowGroupsState))}catch(e){this._logService.error("Failed to save window groups state",e)}}_commitGroupState(e){let t=this._activeWindowGroups.get(e);if(t){let i=ds(t.parent.openedWorkspace),o={groupUuid:e,parentWorkspaceUri:i,children:t.children.filter(s=>s.window.openedWorkspace!==void 0).map(s=>({workspaceUri:ds(s.window.openedWorkspace),lastActiveTimestamp:s.lastActiveTimestamp})),currentActiveWindowWorkspaceUri:ds(t.currentActiveWindow?.openedWorkspace)};this._windowGroupsState.set(e,o)}else this._windowGroupsState.delete(e);this._saveWindowGroupsState()}resetAllStates(){this._logService.info("WindsurfWindowsMainManager: Resetting ALL window group states"),this._activeWindowGroups.forEach(e=>{this._showWindow(e.parent),e.children.forEach(t=>{this._showWindow(t.window)})}),this._activeWindowGroups.clear(),this._windowGroupsState.clear(),this._stateService.removeItem(di.WINDOW_GROUPS_STATE_KEY),this._saveWindowGroupsState(),this._languageServerMainService.resetAllStates(),this._onDidChangeWindows.fire([]),this._onDidChangeWindowGroupInfo.fire(void 0)}_tryRestoreWindowGroup(e,t){for(let i of this._windowGroupsState.values()){let o=i.parentWorkspaceUri;if(!o)continue;let s=this._activeWindowGroups.get(i.groupUuid);if(this._workspacesMatch(o,t))return s?(s.parent=e,s.currentActiveWindow||(s.currentActiveWindow=e),this._applyGroupWindowVisibility(i.groupUuid),this._onDidChangeWindows.fire(this.getWindowGroups()),this._logService.info("WindsurfWindowsMainManager: Parent window added to existing group",{groupId:i.groupUuid,parentWindowId:e.id,existingChildrenCount:s.children.length})):(this._activeWindowGroups.set(i.groupUuid,{parent:e,children:[],currentActiveWindow:void 0}),this._restoreWindowGroup(i,e)),i.groupUuid;if(i.children.some(a=>this._workspacesMatch(a.workspaceUri,t))){if(s)if(s.children.some(l=>l.window.id===e.id))this._logService.info("WindsurfWindowsMainManager: Child window already exists in group, skipping",{groupId:i.groupUuid,childWindowId:e.id});else{let l=i.children.find(c=>this._workspacesMatch(A.revive(c.workspaceUri),t));if(l){let c=l.lastActiveTimestamp?typeof l.lastActiveTimestamp=="string"?Date.parse(l.lastActiveTimestamp):Number(l.lastActiveTimestamp):Date.now();s.children.push({window:e,lastActiveTimestamp:isNaN(c)?Date.now():c}),e.win?.hide(),e.ready().then(()=>e.win?.hide()),this._applyGroupWindowVisibility(i.groupUuid),this._logService.info("WindsurfWindowsMainManager: Child window reconnected to existing group",{groupId:i.groupUuid,childWindowId:e.id,childWorkspaceUri:t.toString()})}}else e.win?.hide(),e.ready().then(()=>e.win?.hide()),this._logService.info("WindsurfWindowsMainManager: Child window waiting for parent restoration",{groupId:i.groupUuid,childWindowId:e.id,childWorkspaceUri:t.toString()});return i.groupUuid}}}async _restoreWindowGroup(e,t){let i=e.groupUuid;try{let o=[];for(let s of e.children)if(s.workspaceUri){let a=this._findWindowByWorkspaceUri(s.workspaceUri);if(!a)continue;a.win?.hide(),a.ready().then(()=>a?.win?.hide()),o.push({window:a,lastActiveTimestamp:Date.now()})}this._activeWindowGroups.set(e.groupUuid,{parent:t,children:o,currentActiveWindow:t}),this._applyGroupWindowVisibility(e.groupUuid),this._onDidChangeWindows.fire(this.getWindowGroups()),this._logService.info("WindsurfWindowsMainManager: Window group restored successfully",{groupId:i,parentWindowId:t.id,childrenIds:o.map(s=>s.window.id)})}catch(o){this._logService.error("WindsurfWindowsMainManager: Failed to restore window group",{groupId:i,error:o})}}getWindowGroups(){return Array.from(this._activeWindowGroups.entries()).map(([e])=>this.getWindowsInGroup(e))}async setActiveWindowInGroup(e,t){let i=A.revive(e),o=await this._ensureChildWindowInGroup(i,t);if(!o){this._logService.info("WindsurfWindowsMainManager: window not found for workspace URI",e.toString());return}o.ready().then(()=>{this._showWindowInGroup(o,t)})}async setActiveWindowInGroupWithFilesToOpen(e,t,i){let o=A.revive(e),s=await this._ensureChildWindowInGroup(o,t);if(!s){this._logService.error("WindsurfWindowsMainManager: failed to ensure window exists for file opening",o.toString());return}let a={filesToOpenOrCreate:i.map(l=>({fileUri:A.revive(l)}))};try{s.sendWhenReady("vscode:openFiles",Le.None,a)}catch(l){this._logService.error("WindsurfWindowsMainManager: failed to send openFiles IPC",{windowId:s.id,err:l})}s.ready().then(()=>{this._showWindowInGroup(s,t)})}_showWindowInGroup(e,t){let i=this._activeWindowGroups.get(t);if(!i){this._logService.warn("WindsurfWindowsMainManager: group not found during activation",t);return}let o=i.currentActiveWindow;o&&this.AlignWindowWithTarget(e,o),o===e?this._applyGroupWindowVisibility(t):(this._showWindow(e),o&&this._hideWindow(o,t)),i.currentActiveWindow=e,this._updateChildTimestamp(t,e.id)}async setMostRecentActiveChildWindowInGroup(e,t,i){let o=A.revive(e);await this._ensureChildWindowInGroup(o,t,i)}async _ensureChildWindowInGroup(e,t,i){let o=this._activeWindowGroups.get(t);if(!o){this._logService.warn("WindsurfWindowsMainManager: group not found",t);return}let s=ds(o.parent.openedWorkspace);if(s&&this._workspacesMatch(e,s))return o.parent;let a=o.children.find(u=>{let p=ds(u.window.openedWorkspace);return p&&this._workspacesMatch(e,p)}),l;if(a)this._logService.info("WindsurfWindowsMainManager: found existing child, updating timestamp",{windowId:a.window.id,workspaceUri:e.toString()}),this._updateChildTimestamp(t,a.window.id),l=a.window;else{let u=this._findWindowByWorkspaceUri(e);if(u)this._logService.info("WindsurfWindowsMainManager: found existing window globally, adding to group",{windowId:u.id,workspaceUri:e.toString()}),this._addChildToGroup(u,o.parent,t),l=u;else{let p=[{workspaceUri:e}];this._logService.info("WindsurfWindowsMainManager: creating new child window",{workspaceUri:e.toString(),groupId:t});try{l=await this.createChildWindow(t,p,i)}catch(m){this._logService.error("WindsurfWindowsMainManager: failed to create child window",{groupId:t,workspaceUri:e.toString(),error:m});return}}}let c=this._evictOldestChildIfNeeded(t);return c&&(this._logService.info("WindsurfWindowsMainManager: closing evicted window after operation",{evictedWindowId:c.id}),c.win?.close()),l}_hideWindow(e,t){let i=this._activeWindowGroups.get(t);if(!i){this._logService.warn("WindsurfWindowsMainManagerService: group not found",t);return}e.win?.hide(),i.currentActiveWindow=void 0}_showWindow(e){e.win?.show(),e.focus(),e.win?.moveTop()}getWindowById(e){let t=this._windowsMainService.getWindowById(e);if(t)return this._getICodeWindowInfo(t);throw new Error("Window not found")}_getWorkspaceDisplayName(e){if(!e.openedWorkspace)return"Untitled";let t=e.openedWorkspace;return"uri"in t&&t.uri?Pe(t.uri.path)||"Untitled Folder":"configPath"in t&&t.configPath?Pe(t.configPath.path).replace(/\.windsurf-workspace$/,"")||"Untitled Workspace":t.id||"Unknown Workspace"}_getICodeWindowInfo(e){let t,i,o=!1;for(let[s,a]of this._activeWindowGroups)if(a.parent.id===e.id){o=!0,i=s;break}if(!o){for(let[s,a]of this._activeWindowGroups)if(a.children.find(c=>c.window.id===e.id)){t=ds(a.parent.openedWorkspace),i=s;break}}return{windowId:e.id,workspaceUri:ds(e.openedWorkspace),workspaceDisplayName:this._getWorkspaceDisplayName(e),parentWindowWorkspaceUri:t,windowGroupId:i,isParent:o,remoteAuthority:e.remoteAuthority}}getWindowsInGroup(e){let t=this._activeWindowGroups.get(e);if(!t)throw this._logService.warn("WindsurfWindowsMainManagerService: group not found",e),new Error("Group not found");return{groupId:e,parentWindow:this._getICodeWindowInfo(t.parent),children:t.children.map(i=>this._getICodeWindowInfo(i.window)),currentAttachedActiveWindow:t.currentActiveWindow?this._getICodeWindowInfo(t.currentActiveWindow):void 0}}AlignWindowWithTarget(e,t){if(!e.win||!t.win){this._logService.warn("WindsurfWindowsMainManagerService: window not found for positioning",{windowId:e.id,targetWindowId:t.id});return}let i=t.getBounds();e.win.setBounds({x:i.x,y:i.y,width:i.width,height:i.height})}async createChildWindow(e,t,i){let o=this._activeWindowGroups.get(e);if(!o)throw new Error(`Group ${e} not found`);let s=o.parent;if(!s)throw new Error(`Parent window ${e} not found`);let a=t.length>0?t[0]:void 0,l=a&&Dc(a)?a.folderUri:a&&Va(a)?a.workspaceUri:void 0;if(l){let p=this._findWindowByWorkspaceUri(l);if(p)return o.children.find(h=>h.window.id===p.id)||(this._addChildToGroup(p,s,e),p.win?.hide()),p}let c=await this._windowsMainService.open({context:5,contextWindowId:s.id,cli:this._environmentMainService.args,urisToOpen:t,forceNewWindow:!0,remoteAuthority:i});if(!c||c.length===0)throw this._logService.error("WindsurfWindowsMainManager: failed to create child window - no windows returned",{groupId:e,openable:t}),new Error("Failed to create child window");let u=c[0];return u.win?.hide(),u.ready().then(()=>{this._addChildToGroup(u,s,e)}),u}async deleteChildWindow(e,t){let i=this._activeWindowGroups.get(t);if(!i){this._logService.warn("WindsurfWindowsMainManagerService: group not found",t);return}let o=A.revive(e),s=this._findWindowByWorkspaceUri(o);if(!s){this._logService.warn("WindsurfWindowsMainManagerService: child window not found for workspace URI",e.toString());return}i.parent.win?.show(),i.currentActiveWindow=i.parent;let a=i.children.findIndex(l=>l.window.id===s.id);a!==-1?i.children.splice(a,1):this._logService.warn("WindsurfWindowsMainManagerService: child not found in group",{workspaceUri:e.toString(),groupId:t,childrenIds:i.children.map(l=>l.window.id)}),this._commitGroupState(t),this._onDidChangeWindowGroupInfo.fire(this.getWindowsInGroup(t)),s.close()}_addChildToGroup(e,t,i){let o=this._activeWindowGroups.get(i);o||(o={parent:t,children:[],currentActiveWindow:t},this._activeWindowGroups.set(i,o)),o.children.push({window:e,lastActiveTimestamp:Date.now()}),this._commitGroupState(i),this._onDidChangeWindows.fire(this.getWindowGroups()),this._onDidChangeWindowGroupInfo.fire(this.getWindowsInGroup(i))}initializeWindowGroup(e){let t=this._windowsMainService.getWindowById(e);if(!t)throw this._logService.warn("WindsurfWindowsMainManagerService: parent window not found",e),new Error(`Parent window ${e} not found`);if(this._isWindowInAnyGroup(t))throw this._logService.warn("WindsurfWindowsMainManagerService: parent window already in group",e),new Error(`Parent window ${e} already in group`);let i=Me();return this._activeWindowGroups.set(i,{parent:t,children:[],currentActiveWindow:t}),this._logService.info("WindsurfWindowsMainManagerService: initialized window group",{parentId:e,groupUuid:i}),this._commitGroupState(i),i}_workspacesMatch(e,t){if(!t||!e)return!1;let i=rc(e),o=rc(t);return lt.isEqual(i,o)}_applyGroupWindowVisibility(e){let t=this._activeWindowGroups.get(e);if(t){for(let i of t.children)i.window.win?.hide();t.parent.win?.hide(),t.currentActiveWindow?t.currentActiveWindow.win?.show():(t.parent.win?.show(),t.currentActiveWindow=t.parent)}}_findWindowByWorkspaceUri(e){let t=rc(e);return uo(this._windowsMainService.getWindows(),t)}_updateChildTimestamp(e,t){let i=this._activeWindowGroups.get(e);if(!i)return;let o=i.children.find(s=>s.window.id===t);o&&(o.lastActiveTimestamp=Date.now())}_evictOldestChildIfNeeded(e){let t=this._activeWindowGroups.get(e);if(!t||t.children.length<=di.MAX_CHILDREN_PER_GROUP)return;let o=[...t.children].sort((a,l)=>a.lastActiveTimestamp-l.lastActiveTimestamp)[0];this._logService.info("WindsurfWindowsMainManager: evicting oldest child window",{groupId:e,evictedWindowWorkspace:o.window.openedWorkspace,evictedTimestamp:o.lastActiveTimestamp,childrenBeforeEviction:t.children.length,maxChildren:di.MAX_CHILDREN_PER_GROUP});let s=t.children.indexOf(o);if(s!==-1)return t.children.splice(s,1),this._commitGroupState(e),this._onDidChangeWindowGroupInfo.fire(this.getWindowsInGroup(e)),o.window}_isWindowInAnyGroup(e){return this._findWindowGroup(e.id)!==void 0}_handleWindowClose(e){let t=e.id;if(this._isShuttingDown){this._logService.debug("WindsurfWindowsMainManager: Ignoring window close during shutdown",{windowId:t});return}let i=this._findWindowGroup(t);if(!i)return;let o=this._activeWindowGroups.get(i);if(o){this._commitGroupState(i),this._activeWindowGroups.delete(i);for(let s of o.children)s.window.id!==t&&s.window.win&&!s.window.win.isDestroyed()&&(this._logService.debug("WindsurfWindowsMainManager: Closing child window",{childWindowId:s.window.id}),s.window.close());o.parent.id!==t&&o.parent.win&&!o.parent.win.isDestroyed()&&(this._logService.debug("WindsurfWindowsMainManager: Closing parent window",{parentWindowId:o.parent.id}),o.parent.close()),this._onDidChangeWindows.fire(this.getWindowGroups())}}getWindowByWorkspaceUri(e){let t=A.revive(e),i=this._findWindowByWorkspaceUri(t);if(i)return this._getICodeWindowInfo(i)}_findWindowGroup(e){for(let[t,i]of this._activeWindowGroups)if(i.parent.id===e||i.children.some(o=>o.window.id===e))return t}};di=D([S(0,Ke),S(1,z),S(2,Fe),S(3,Rt),S(4,Te),S(5,jf)],di)});var So,eW=_(()=>{ae();te();me();vr();Ie();Vt();So=class extends M{constructor(e,t,i){super();this._stateService=e;this._logService=t;this._lifecycleMainService=i;this._onDidSetLsClientInitInfo=this._register(new C);this.onDidChangeLsClientInfos=this._onDidSetLsClientInitInfo.event;this._lsGroups=new Map;this.loadWorktreeLsGroupsState(),this._register(this._lifecycleMainService.onBeforeShutdown(()=>{this.saveWorktreeLsGroupsState()}))}static{this.WINDSURF_LS_GROUPS_STATE_KEY="windsurf.lsGroupsState"}setLsGroupsState(e,t){this._lsGroups.set(e,t),this.saveWorktreeLsGroupsState()}getLsGroupsState(e){let t=this._lsGroups.get(e);return t?Promise.resolve(t):Promise.resolve(void 0)}loadWorktreeLsGroupsState(){try{let e=this._stateService.getItem(So.WINDSURF_LS_GROUPS_STATE_KEY);if(!e)return;for(let[t,i]of Object.entries(e)){let o={groupId:t,parentWorkspaceUri:A.revive(i.parentWorkspaceUri),children:(i.children??[]).map(s=>({parentWorkspaceUri:A.revive(i.parentWorkspaceUri),worktreeUri:A.revive(s.worktreeUri),creationTimestamp:Number(s.creationTimestamp)||Date.now()}))};this._lsGroups.set(t,o)}}catch(e){this._logService.error("[LanguageServerMainService] Error loading worktree LS group state",e)}}saveWorktreeLsGroupsState(){try{let e={};for(let[t,i]of this._lsGroups.entries())e[t]={groupId:i.groupId,parentWorkspaceUri:i.parentWorkspaceUri,children:i.children.map(o=>({parentWorkspaceUri:o.parentWorkspaceUri,worktreeUri:o.worktreeUri,creationTimestamp:o.creationTimestamp}))};this._stateService.setItem(So.WINDSURF_LS_GROUPS_STATE_KEY,e)}catch(e){this._logService.error("[LanguageServerMainService] Error saving worktree LS group state",e)}}resetAllStates(){this._logService.info("[LanguageServerMainService] Resetting ALL language server group states"),this._lsGroups.clear(),this._stateService.removeItem(So.WINDSURF_LS_GROUPS_STATE_KEY)}};So=D([S(0,Rt),S(1,z),S(2,Te)],So)});import{app as Ui,powerMonitor as Wu,protocol as tW,session as Bu,systemPreferences as nW}from"electron";import{hostname as F6,release as W6}from"os";var ua,rW=_(()=>{ac();Ti();Sc();Et();_s();ae();Ny();Uo();te();at();Ne();ce();qe();Ie();Xt();XD();Zi();eO();m_();V_();We();Hc();qO();_t();zO();mI();aw();Ka();bh();g0();P0();wI();C0();AI();R0();ww();$t();rd();NI();G0();H0();J0();z0();dk();ct();Tk();$I();qm();de();nv();Ck();Rk();xk();Vt();me();lN();$m();$s();Ib();cN();dN();In();zc();SN();vv();vr();_N();bm();vb();Tn();wN();bN();ea();Xo();TN();AN();DN();ON();UN();Yw();FN();WN();VN();HN();JN();jN();qo();zt();oL();sL();Ln();SI();Zm();aL();Bs();Di();lL();Us();lf();qb();NL();Fv();LL();ML();Ce();Bt();JL();qL();KL();vd();jL();YL();Vd();QL();uM();mM();hs();za();gM();Ap();Fb();IM();vM();nT();bM();TM();PM();WM();GM();JM();zF();YF();QF();XF();$F();mb();ZF();s1();a1();eW();ua=class extends M{constructor(e,t,i,o,s,a,l,c,u,p,m,h){super();this.mainProcessNodeIpcServer=e;this.userEnv=t;this.mainInstantiationService=i;this.logService=o;this.loggerService=s;this.environmentMainService=a;this.lifecycleMainService=l;this.configurationService=c;this.stateService=u;this.fileService=p;this.productService=m;this.userDataProfilesMainService=h;this.configureSession(),this.registerListeners()}static{this.SECURITY_PROTOCOL_HANDLING_CONFIRMATION_SETTING_KEY={[Y.file]:"security.promptForLocalFileProtocolHandling",[Y.vscodeRemote]:"security.promptForRemoteFileProtocolHandling"}}configureSession(){let e=h=>h?.startsWith(`${Y.vscodeFileResource}://${ec}`),t=h=>h?.startsWith(`${Y.vscodeWebview}://`),i=new Set(["pointerLock","notifications"]),o=new Set([...i,"clipboard-read","clipboard-sanitized-write","fullscreen","deprecated-sync-clipboard-read"]),s=new Set([...i,"media","local-fonts","deprecated-sync-clipboard-read"]);Bu.defaultSession.setPermissionRequestHandler((h,E,y,P)=>t(P.requestingUrl)?y(o.has(E)):e(P.requestingUrl)?y(s.has(E)):y(!1)),Bu.defaultSession.setPermissionCheckHandler((h,E,y,P)=>t(P.requestingUrl)?o.has(E):e(P.requestingUrl)?s.has(E):!1);let a=new Set([Y.file,Y.vscodeFileResource,Y.vscodeRemoteResource,Y.vscodeManagedRemoteResource,"devtools"]),l=h=>{for(let E=h;E;E=E.parent)if(E.url.startsWith(`${Y.vscodeWebview}://`))return!0;return!1},c=h=>h.resourceType==="xhr"||l(h.frame),u=h=>{let E=h.frame;if(!E||!this.windowsMainService)return!1;let y=ao();for(let P of y)if(E.processId===P.webContents.mainFrame.processId)return!0;return!1},p=(h,E)=>{if(h.path!=="/index.html")return!0;let y=E.frame;if(!y||!this.windowsMainService)return!1;for(let P of this.windowsMainService.getWindows())if(P.win&&y.processId===P.win.webContents.mainFrame.processId)return!0;return!1};Bu.defaultSession.webRequest.onBeforeRequest((h,E)=>{let y=A.parse(h.url);return y.scheme===Y.vscodeWebview&&!p(y,h)?(this.logService.error("Blocked vscode-webview request",h.url),E({cancel:!0})):y.scheme===Y.vscodeFileResource&&!u(h)?(this.logService.error("Blocked vscode-file request",h.url),E({cancel:!0})):y.path.endsWith(".svg")&&!a.has(y.scheme)?E({cancel:!c(h)}):E({cancel:!1})}),Bu.defaultSession.webRequest.onHeadersReceived((h,E)=>{let y=h.responseHeaders,P=y["content-type"]||y["Content-Type"];if(P&&Array.isArray(P)){let T=A.parse(h.url);if(T.path.endsWith(".svg")&&a.has(T.scheme))return y["Content-Type"]=["image/svg+xml"],E({cancel:!1,responseHeaders:y});if(!T.path.endsWith(Y.vscodeRemoteResource)&&P.some(k=>k.toLowerCase().includes("image/svg")))return E({cancel:!c(h)})}return E({cancel:!1})}),Bu.defaultSession.webRequest.onHeadersReceived((h,E)=>{if(h.url.startsWith("https://vscode.download.prss.microsoft.com/")){let y=h.responseHeaders??Object.create(null);if(y["Access-Control-Allow-Origin"]===void 0)return y["Access-Control-Allow-Origin"]=["*"],E({cancel:!1,responseHeaders:y})}return E({cancel:!1})});let m=Bu.defaultSession;typeof m.setCodeCachePath=="function"&&this.environmentMainService.codeCachePath&&m.setCodeCachePath(H(this.environmentMainService.codeCachePath,"chrome")),q&&(this.configurationService.getValue("security.restrictUNCAccess")===!1?$x():No(this.configurationService.getValue("security.allowedUNCHosts")))}registerListeners(){x.once(this.lifecycleMainService.onWillShutdown)(()=>this.dispose()),YD(),Ui.on("accessibility-support-changed",(i,o)=>{this.windowsMainService?.sendToAll("vscode:accessibilitySupportChanged",o)}),Ui.on("activate",async(i,o)=>{this.logService.trace("app#activate"),o||await this.windowsMainService?.openEmptyWindow({context:1})}),Ui.on("web-contents-created",(i,o)=>{o?.opener?.url.startsWith(`${Y.vscodeFileResource}://${ec}/`)&&(this.logService.trace('[aux window]  app.on("web-contents-created"): Registering auxiliary window'),this.auxiliaryWindowsMainService?.registerWindow(o)),o.on("will-navigate",s=>{Ya.isBrowserViewWebContents(o)||(this.logService.error("webContents#will-navigate: Prevented webcontent navigation"),s.preventDefault())}),o.setWindowOpenHandler(s=>s.url==="about:blank"?(this.logService.trace("[aux window] webContents#setWindowOpenHandler: Allowing auxiliary window to open on about:blank"),{action:"allow",overrideBrowserWindowOptions:this.auxiliaryWindowsMainService?.createWindow(s)}):(this.logService.trace(`webContents#setWindowOpenHandler: Prevented opening window with URL ${s.url}}`),this.nativeHostMainService?.openExternal(void 0,s.url),{action:"deny"}))});let e=[],t;Ui.on("open-file",(i,o)=>{o=Xi(o),this.logService.trace("app#open-file: ",o),i.preventDefault(),e.push(ro(o)?{workspaceUri:A.file(o)}:{fileUri:A.file(o)}),t!==void 0&&(clearTimeout(t),t=void 0),t=setTimeout(async()=>{await this.windowsMainService?.open({context:1,cli:this.environmentMainService.args,urisToOpen:e,gotoLineMode:!1,preferNewWindow:!0}),e=[],t=void 0},100)}),Ui.on("new-window-for-tab",async()=>{await this.windowsMainService?.openEmptyWindow({context:4})}),Tt.handle("vscode:fetchShellEnv",i=>{let o=this.windowsMainService?.getWindowByWebContents(i.sender),s,a;return o?.config?(s=o.config,a={...process.env,...o.config.userEnv}):(s=this.environmentMainService.args,a=process.env),this.resolveShellEnvironment(s,a,!1)}),Tt.on("vscode:toggleDevTools",i=>i.sender.toggleDevTools()),Tt.on("vscode:openDevTools",i=>i.sender.openDevTools()),Tt.on("vscode:reloadWindow",i=>i.sender.reload()),Tt.handle("vscode:notifyZoomLevel",async(i,o)=>{let s=this.windowsMainService?.getWindowByWebContents(i.sender);s&&s.notifyZoomLevel(o)})}async startup(){this.logService.debug("Starting Windsurf"),this.logService.debug(`from: ${this.environmentMainService.appRoot}`),this.logService.debug("args:",this.environmentMainService.args);let e=this.productService.win32AppUserModelId;q&&e&&Ui.setAppUserModelId(e);try{$&&this.configurationService.getValue("window.nativeTabs")===!0&&!nW.getUserDefault("NSUseImprovedLayoutPass","boolean")&&nW.setUserDefault("NSUseImprovedLayoutPass","boolean",!0)}catch(m){this.logService.error(m)}let t=new _h;x.once(this.lifecycleMainService.onWillShutdown)(m=>{m.reason===2&&t.dispose()});let[i,o,s]=await Promise.all([BL(this.stateService,this.logService),VL(this.stateService,this.logService),GL(this.stateService,this.logService)]),{sharedProcessReady:a,sharedProcessClient:l}=this.setupSharedProcess(i,o,s),c=await this.initServices(i,o,s,a);c.invokeFunction(m=>this._register(new ml(m.get(z),m.get(St)))),c.invokeFunction(m=>{m.get(yr).setTelemetryService(m.get(St))}),c.invokeFunction(m=>m.get(Tm)),this._register(c.createInstance(Fd)),c.invokeFunction(m=>this.initChannels(m,t,l));let u=await c.invokeFunction(m=>this.setupProtocolUrlHandlers(m,t));this.setupManagedRemoteResourceUrlHandler(t),this.lifecycleMainService.phase=2,await c.invokeFunction(m=>this.openFirstWindow(m,u)),this.lifecycleMainService.phase=3,this.afterWindowOpen(c),this._register(new On(()=>{this._register(Cp(()=>{this.lifecycleMainService.phase=4,this.eventuallyAfterWindowOpen()},2500))},2500)).schedule()}async setupProtocolUrlHandlers(e,t){let i=this.windowsMainService=e.get(Ke),o=e.get(pd),s=this.nativeHostMainService=e.get(mo),a=e.get(Hr),l=this;o.registerHandler({async handleURL(E,y){return l.handleProtocolUrl(i,a,o,E,y)}});let c=this._register(new xv({onDidOpenMainWindow:s.onDidOpenMainWindow,onDidFocusMainWindow:s.onDidFocusMainWindow,getActiveWindowId:()=>s.getActiveWindowId(-1)})),u=new gh(E=>c.getActiveClientId().then(y=>E===y)),p=new Tv(u,this.logService),m=t.getChannel("urlHandler",p);o.registerHandler(new bv(m));let h=await this.resolveInitialProtocolUrls(i,a);return this._register(new Pv(h?.urls,o,i,this.environmentMainService,this.productService,this.logService)),h}setupManagedRemoteResourceUrlHandler(e){let t=()=>({statusCode:404,data:"Not found"}),i=new Gn(()=>e.getChannel(pM,new Jv));tW.registerBufferProtocol(Y.vscodeManagedRemoteResource,(o,s)=>{let a=A.parse(o.url);if(!a.authority.startsWith("window:"))return s(t());i.value.call(eT,[a]).then(l=>s({...l,data:Buffer.from(l.body,"base64")}),l=>{this.logService.warn("error dispatching remote resource call",l),s({statusCode:500,data:String(l)})})})}async resolveInitialProtocolUrls(e,t){let i=this.environmentMainService.args["open-url"]?this.environmentMainService.args._urls||[]:[];i.length>0&&this.logService.trace("app#resolveInitialProtocolUrls() protocol urls from command line:",i);let o=global.getOpenUrls?.()||[];if(o.length>0&&this.logService.trace("app#resolveInitialProtocolUrls() protocol urls from macOS 'open-url' event:",o),i.length+o.length===0)return;let s=[...i,...o].map(c=>{try{return{uri:A.parse(c),originalUrl:c}}catch{this.logService.trace("app#resolveInitialProtocolUrls() protocol url failed to parse:",c);return}}),a=[],l=[];for(let c of s){if(!c)continue;let u=this.getWindowOpenableFromProtocolUrl(c.uri);if(u)if(await this.shouldBlockOpenable(u,e,t)){this.logService.trace("app#resolveInitialProtocolUrls() protocol url was blocked:",c.uri.toString(!0));continue}else this.logService.trace("app#resolveInitialProtocolUrls() protocol url will be handled as window to open:",c.uri.toString(!0),u),a.push(u);else this.logService.trace("app#resolveInitialProtocolUrls() protocol url will be passed to active window for handling:",c.uri.toString(!0)),l.push(c)}return{urls:l,openables:a}}async shouldBlockOpenable(e,t,i){let o,s;if(Va(e)?(o=e.workspaceUri,s=v(162,null,o.scheme===Y.file?Mo(o,{os:Yt,tildify:this.environmentMainService}):o.toString(!0),this.productService.nameShort)):Dc(e)?(o=e.folderUri,s=v(161,null,o.scheme===Y.file?Mo(o,{os:Yt,tildify:this.environmentMainService}):o.toString(!0),this.productService.nameShort)):(o=e.fileUri,s=v(160,null,o.scheme===Y.file?Mo(o,{os:Yt,tildify:this.environmentMainService}):o.toString(!0),this.productService.nameShort)),o.scheme!==Y.file&&o.scheme!==Y.vscodeRemote||this.configurationService.getValue(ua.SECURITY_PROTOCOL_HANDLING_CONFIRMATION_SETTING_KEY[o.scheme])===!1)return!1;let{response:l,checkboxChecked:c}=await i.showMessageBox({type:"warning",buttons:[v(165,null),v(158,null)],message:s,detail:v(159,null),checkboxLabel:o.scheme===Y.file?v(163,null):v(164,null),cancelId:1});if(l!==0)return!0;if(c){let u={channel:"vscode:disablePromptForProtocolHandling",args:o.scheme===Y.file?"local":"remote"};t.sendToFocused(u.channel,u.args),t.sendToOpeningWindow(u.channel,u.args)}return!1}getWindowOpenableFromProtocolUrl(e){if(e.path){if(e.authority===Y.file){let t=A.file(e.fsPath);return ro(t)?{workspaceUri:t}:{fileUri:t}}else if(e.authority===Y.vscodeRemote){let t=e.path.indexOf(Se.sep,1),i,o;t!==-1?(i=e.path.substring(1,t),o=e.path.substring(t)):(i=e.path.substring(1),o="/");let s=e.query,a=new URLSearchParams(e.query);a.get("windowId")==="_blank"&&(a.delete("windowId"),s=a.toString());let l=A.from({scheme:Y.vscodeRemote,authority:i,path:o,query:s,fragment:e.fragment});return ro(o)?{workspaceUri:l}:/:[\d]+$/.test(o)?{fileUri:l}:{folderUri:l}}}}async handleProtocolUrl(e,t,i,o,s){this.logService.trace("app#handleProtocolUrl():",o.toString(!0),s),BN(o,this.productService)&&o.path==="workspace"&&(o=o.with({authority:"file",path:A.parse(o.query).path,query:""}));let a=!1,l=new URLSearchParams(o.query);l.get("windowId")==="_blank"?(this.logService.trace("app#handleProtocolUrl() found 'windowId=_blank' as parameter, setting shouldOpenInNewWindow=true:",o.toString(!0)),l.delete("windowId"),o=o.with({query:l.toString()}),a=!0):$&&e.getWindowCount()===0&&(this.logService.trace("app#handleProtocolUrl() running on macOS with no window open, setting shouldOpenInNewWindow=true:",o.toString(!0)),a=!0);let c=l.get("continueOn");c!==null&&(this.logService.trace("app#handleProtocolUrl() found 'continueOn' as parameter:",o.toString(!0)),l.delete("continueOn"),o=o.with({query:l.toString()}),this.environmentMainService.continueOn=c??void 0);let u=l.get("session");u!==null&&(this.logService.trace("app#handleProtocolUrl() found 'session' as parameter:",o.toString(!0)),l.delete("session"),o=o.with({query:l.toString()}));let p=this.getWindowOpenableFromProtocolUrl(o);if(p){if(await this.shouldBlockOpenable(p,e,t))return this.logService.trace("app#handleProtocolUrl() protocol url was blocked:",o.toString(!0)),!0;{this.logService.trace("app#handleProtocolUrl() opening protocol url as window:",p,o.toString(!0));let m=(await e.open({context:6,cli:{...this.environmentMainService.args},urisToOpen:[p],forceNewWindow:a,gotoLineMode:!0})).at(0);return m?.focus(),m&&u&&m.sendWhenReady("vscode:openChatSession",Le.None,u),!0}}return a?(this.logService.trace("app#handleProtocolUrl() opening empty window and passing in protocol url:",o.toString(!0)),await(await e.open({context:6,cli:{...this.environmentMainService.args},forceNewWindow:!0,forceEmpty:!0,gotoLineMode:!0,remoteAuthority:zo(o)})).at(0)?.ready(),i.open(o,s)):(this.logService.trace("app#handleProtocolUrl(): not handled",o.toString(!0),s),!1)}setupSharedProcess(e,t,i){let o=this._register(this.mainInstantiationService.createInstance(yd,e,t,i));this._register(o.onDidCrash(()=>this.windowsMainService?.sendToFocused("vscode:reportSharedProcessCrash")));let s=(async()=>{this.logService.trace("Main->SharedProcess#connect");let l=await o.connect();return this.logService.trace("Main->SharedProcess#connect: connection established"),new _c(l,"main")})();return{sharedProcessReady:(async()=>(await o.whenReady(),s))(),sharedProcessClient:s}}async initServices(e,t,i,o){let s=new zs;switch(process.platform){case"win32":s.set(Qs,new ve(al));break;case"linux":yg?s.set(Qs,new ve(wd,[process.env.SNAP,process.env.SNAP_REVISION])):s.set(Qs,new ve(_d));break;case"darwin":s.set(Qs,new ve(Oi));break}s.set(Ke,new ve(Dd,[e,t,i,this.userEnv],!1)),s.set(Jr,new ve(jd,void 0,!1));let a=new Kc(this.logService,this.productService);s.set(Hr,a),s.set(Qw,new ve(md,void 0,!1)),s.set(Xc,new ve(Qc,void 0,!1)),s.set(Am,it.toService(Jp(o.then(h=>h.getChannel("diagnostics"))))),s.set(Zp,new ve($c)),s.set(yw,new ve(Zc,void 0,!1)),s.set(xI,new ve(ed,void 0,!0)),s.set(Qa,new ve(Ya,void 0,!1)),s.set(bw,new ve(nd,void 0,!1)),s.set(zw,new ve(ud)),s.set(mo,new ve(rl,void 0,!1));let l=new hd(this.configurationService);s.set(yr,l),s.set(aT,new ve(Xd,void 0,!1)),s.set(Rb,new ve(Td)),s.set(fb,new ve(gd)),s.set(kw,new ve(qs)),s.set(Ha,new ve(Bc)),s.set(Fs,new ve(Vc));let c=new Gd({graceTime:6e4,shortGraceTime:6e3,scrollback:this.configurationService.getValue("terminal.integrated.persistentSessionScrollback")??100},this.configurationService,this.environmentMainService,this.lifecycleMainService,this.logService),u=new qd(c,this.configurationService,this.logService,this.loggerService);s.set(Yb,u),q?s.set(Vm,new ve(Hm)):$?s.set(Vm,new ve(LI)):fe&&s.set(Vm,new ve(Jm));let p=new jo(this.environmentMainService,this.configurationService,this.logService,this.stateService);s.set(co,p);let m=new Yc(this.environmentMainService,this.logService,this.userDataProfilesMainService,p,a);if(s.set(kr,m),s.set(iw,new ve(Od,void 0,!1)),s.set(Xs,new ve(Fn,void 0,!1)),s.set(pd,new ve(bd,void 0,!1)),hv(this.productService,this.environmentMainService)){let h=IN(this.productService,this.configurationService),E=Jp(o.then(U=>U.getChannel("telemetryAppender"))),y=new yv(E),P=gN(W6(),F6(),process.arch,this.productService.commit,this.productService.version,e,t,i,h,this.productService.date),T=vN(this.environmentMainService),k={appenders:[y],commonProperties:P,piiPaths:T,sendErrorTelemetry:!0};s.set(St,new ve(es,[k],!1))}else s.set(St,Zs);return s.set(ra,new ve(Wd,void 0,!0)),s.set(kL,new ve(Md,void 0,!0)),s.set(jb,new ve(Bd,void 0,!0)),s.set(Tm,new ve(Gc)),s.set(tT,new ve(qv)),s.set(pf,new ve(Yd)),s.set(Av,new ve(Rd,void 0,!0)),$?s.set(Fu,new ve(Uu,void 0,!0)):q?s.set(Fu,new ve(ey,void 0,!0)):fe&&s.set(Fu,new ve(ty,void 0,!0)),s.set(ef,new ve(ny,void 0,!0)),s.set(o1,new ve(di,void 0,!0)),s.set(jf,new ve(So,void 0,!0)),this.productService.quality!=="stable"&&s.set(HM,new ve($d,void 0,!0)),await Ft.settled([p.initialize(),m.initialize()]),this.mainInstantiationService.createChild(s)}initChannels(e,t,i){let o=this._register(new ue),s=it.fromService(e.get(Qw),o,{disableMarshalling:!0});this.mainProcessNodeIpcServer.registerChannel("launch",s);let a=it.fromService(e.get(Xc),o,{disableMarshalling:!0});this.mainProcessNodeIpcServer.registerChannel("diagnostics",a);let l=o.add(new Dv(e.get(oi)));t.registerChannel("policy",l),i.then(nt=>nt.registerChannel("policy",l));let c=this.fileService.getProvider(Y.file);tx(c instanceof js);let u=o.add(new tv(c,this.logService,this.environmentMainService));t.registerChannel(Gw,u),i.then(nt=>nt.registerChannel(Gw,u));let p=it.fromService(e.get(rr),o);t.registerChannel("userDataProfiles",p),i.then(nt=>nt.registerChannel("userDataProfiles",p));let m=new Sv(e.get(Qs));t.registerChannel("update",m);let h=new uv(e.get(yr));t.registerChannel(hb,h),i.then(nt=>nt.registerChannel(hb,h));let E=it.fromService(new dd(this.logService,e.get(Am),e.get(Xc)),o);t.registerChannel("process",E);let y=it.fromService(e.get(Zp),o);t.registerChannel("encryption",y);let P=it.fromService(e.get(yw),o);t.registerChannel("browserElements",P),i.then(nt=>nt.registerChannel("browserElements",P));let T=it.fromService(e.get(Qa),o);t.registerChannel(lw,T),i.then(nt=>nt.registerChannel(lw,T));let k=it.fromService(e.get(bw),o);t.registerChannel(Sw,k),i.then(nt=>nt.registerChannel(Sw,k));let U=it.fromService(e.get(ta),o);t.registerChannel("sign",U);let O=it.fromService(e.get(zw),o);t.registerChannel("keyboardLayout",O),this.nativeHostMainService=e.get(mo);let B=it.fromService(this.nativeHostMainService,o);t.registerChannel("nativeHost",B),i.then(nt=>nt.registerChannel("nativeHost",B));let he=it.fromService(e.get(aT),o);t.registerChannel("webContentExtractor",he);let Q=it.fromService(e.get(iw),o);t.registerChannel("workspaces",Q);let le=it.fromService(e.get(fb),o);t.registerChannel("menubar",le);let ne=it.fromService(e.get(pd),o);t.registerChannel("url",ne);let De=it.fromService(e.get(Rb),o);t.registerChannel("webview",De);let ht=o.add(new Ev(this.logService,e.get(Ha)));t.registerChannel("storage",ht),i.then(nt=>nt.registerChannel("storage",ht));let Zt=o.add(new Wv(e.get(Ha),e.get(rr),this.logService));i.then(nt=>nt.registerChannel("profileStorageListener",Zt));let ar=it.fromService(e.get(Yb),o);t.registerChannel("localPty",ar);let lr=it.fromService(e.get(Vm),o);t.registerChannel("externalTerminal",lr);let J=it.fromService(e.get(Fu),o);t.registerChannel("windsurfAppIcon",J);let W=it.fromService(e.get(ef),o);t.registerChannel("windsurfKeybindings",W);let se=it.fromService(e.get(o1),o);t.registerChannel("windsurfWindowsManager",se);let ie=it.fromService(e.get(jf),o);t.registerChannel("windsurfLanguageServer",ie);let ge=it.fromService(e.get(tT),o);t.registerChannel(hM,ge);let xe=this._register(new Qd(t,e.get(pf)));t.registerChannel(EM,xe);let Ve=new Bv(e.get(fo));t.registerChannel("logger",Ve),i.then(nt=>nt.registerChannel("logger",Ve));let Pt=new pI(e.get(Ke));t.registerChannel("extensionhostdebugservice",Pt);let It=it.fromService(e.get(kw),o);t.registerChannel(V0,It);let vn=e.get(Ud),Cn=it.fromService(vn,o);t.registerChannel("systemMonitor",Cn);let cr=it.fromService(e.get(jb),o);t.registerChannel(zL,cr)}async openFirstWindow(e,t){let i=this.windowsMainService=e.get(Ke);this.auxiliaryWindowsMainService=e.get(Jr);let o=Ri(process.env)?0:4,s=this.environmentMainService.args;if(t){if(t.openables.length>0)return i.open({context:o,cli:s,urisToOpen:t.openables,gotoLineMode:!0,initialStartup:!0});if(t.urls.length>0)for(let P of t.urls){let T=new URLSearchParams(P.uri.query);if(T.get("windowId")==="_blank")return T.delete("windowId"),P.originalUrl=P.uri.toString(!0),P.uri=P.uri.with({query:T.toString()}),i.open({context:o,cli:s,forceNewWindow:!0,forceEmpty:!0,gotoLineMode:!0,initialStartup:!0})}}let a=global.macOpenFiles??[],l=s._.length,c=!!s["folder-uri"],u=!!s["file-uri"],p=s["skip-add-to-recently-opened"]===!0,m=s.wait&&s.waitMarkerFilePath?A.file(s.waitMarkerFilePath):void 0,h=s.remote||void 0,E=s.profile,y=s["profile-temp"];if(!l&&!c&&!u){if(s["new-window"]||E||y)return i.open({context:o,cli:s,forceNewWindow:!0,forceEmpty:!0,noRecentEntry:p,waitMarkerFileURI:m,initialStartup:!0,remoteAuthority:h,forceProfile:E,forceTempProfile:y});if(a.length)return i.open({context:1,cli:s,urisToOpen:a.map(P=>(P=Xi(P),ro(P)?{workspaceUri:A.file(P)}:{fileUri:A.file(P)})),noRecentEntry:p,waitMarkerFileURI:m,initialStartup:!0})}return i.open({context:o,cli:s,forceNewWindow:s["new-window"],diffMode:s.diff,mergeMode:s.merge,noRecentEntry:p,waitMarkerFileURI:m,gotoLineMode:s.goto,initialStartup:!0,remoteAuthority:h,forceProfile:E,forceTempProfile:y})}afterWindowOpen(e){q&&Eh(),this.installMutex(),tW.registerHttpProtocol(Y.vscodeRemoteResource,(t,i)=>{i({url:t.url.replace(/^vscode-remote-resource:/,"http:"),method:t.method})}),this.resolveShellEnvironment(this.environmentMainService.args,process.env,!0),this.updateCrashReporterEnablement(),$&&Ui.runningUnderARM64Translation&&this.windowsMainService?.sendToFocused("vscode:showTranslatedBuildWarning"),e.invokeFunction(t=>{let i=t.get(St),o=()=>({idleState:Wu.getSystemIdleState(60),idleTime:Wu.getSystemIdleTime(),thermalState:Wu.getCurrentThermalState(),onBattery:Wu.isOnBatteryPower()});this._register(x.fromNodeEventEmitter(Wu,"suspend")(()=>{i.publicLog2("power.suspend",o())})),this._register(x.fromNodeEventEmitter(Wu,"resume")(()=>{i.publicLog2("power.resume",o())}))}),$&&e.invokeFunction(t=>{let i=t.get(St);Ui.getGPUFeatureStatus().skia_graphite==="enabled"&&this._register(x.fromNodeEventEmitter(Ui,"child-process-gone",(a,l)=>({event:a,details:l}))(({details:a})=>{if(a.type==="GPU"&&a.reason==="crashed"){let l=Ui.getGPUFeatureStatus();if(l.rasterization!=="enabled"){let u=[],p=Ui;typeof p.getGPULogMessages=="function"&&(u=p.getGPULogMessages().slice(-10).map(m=>m.message)),i.publicLog2("gpu.crash.fallback",{gpuFeatureStatus:JSON.stringify(l),gpuLogMessages:JSON.stringify(u)})}}}))})}async installMutex(){let e=this.productService.win32MutexName;if(q&&e)try{let t=await import("@vscode/windows-mutex"),i=new t.Mutex(e);x.once(this.lifecycleMainService.onWillShutdown)(()=>i.release())}catch(t){this.logService.error(t)}}async resolveShellEnvironment(e,t,i){try{return await sd(this.configurationService,this.logService,e,t)}catch(o){let s=Kn(o);i?this.windowsMainService?.sendToFocused("vscode:showResolveShellEnvError",s):this.logService.error(s)}return{}}async updateCrashReporterEnablement(){try{let t=(await this.fileService.readFile(this.environmentMainService.argvResource)).value.toString(),i=lg(t),s=Ed(this.configurationService)>=1;if(i["enable-crash-reporter"]===void 0){let a=["","	// Allows to disable crash reporting.","	// Should restart the app if the value is changed.",`	"enable-crash-reporter": ${s},`,"","	// Unique id used for correlating crash reports sent from this instance.","	// Do not edit this value.",`	"crash-reporter-id": "${Me()}"`,"}"],l=t.substring(0,t.length-2).concat(`,
`,a.join(`
`));await this.fileService.writeFile(this.environmentMainService.argvResource,ee.fromString(l))}else{let a=t.replace(/"enable-crash-reporter": .*,/,`"enable-crash-reporter": ${s},`);a!==t&&await this.fileService.writeFile(this.environmentMainService.argvResource,ee.fromString(a))}}catch(e){this.logService.error(e),this.windowsMainService?.sendToFocused("vscode:showArgvParseWarning")}}eventuallyAfterWindowOpen(){HL(this.stateService,this.logService)}};ua=D([S(2,rn),S(3,z),S(4,Rs),S(5,Fe),S(6,Te),S(7,Ae),S(8,Rt),S(9,Be),S(10,He),S(11,rr)],ua)});function zf(r){return Object.isFrozen(r)?r:QO(r)}function pa(r,n){let{added:e,removed:t,updated:i}=iW(n?.rawConfiguration,r?.rawConfiguration),o=[],s=r?.getAllOverrideIdentifiers()||[],a=n?.getAllOverrideIdentifiers()||[];if(n){let l=a.filter(c=>!s.includes(c));for(let c of l)o.push([c,n.getKeysForOverrideIdentifier(c)])}if(r){let l=s.filter(c=>!a.includes(c));for(let c of l)o.push([c,r.getKeysForOverrideIdentifier(c)])}if(n&&r){for(let l of s)if(a.includes(l)){let c=iW({contents:r.getOverrideValue(void 0,l)||{},keys:r.getKeysForOverrideIdentifier(l)},{contents:n.getOverrideValue(void 0,l)||{},keys:n.getKeysForOverrideIdentifier(l)});o.push([l,[...c.added,...c.removed,...c.updated]])}}return{added:e,removed:t,updated:i,overrides:o}}function iW(r,n){let e=r?n?r.keys.filter(o=>n.keys.indexOf(o)===-1):[...r.keys]:[],t=n?r?n.keys.filter(o=>r.keys.indexOf(o)===-1):[...n.keys]:[],i=[];if(r&&n){for(let o of n.keys)if(r.keys.indexOf(o)!==-1){let s=Op(n.contents,o),a=Op(r.contents,o);Or(s,a)||i.push(o)}}return{added:e,removed:t,updated:i}}var Jt,ry,iy,l1,Vu,oy,c1=_(()=>{dn();ae();Ai();te();er();Gr();qe();Ie();_t();Lo();ct();wi();Jt=class r{constructor(n,e,t,i,o){this._contents=n;this._keys=e;this._overrides=t;this._raw=i;this.logService=o;this.overrideConfigurations=new Map}static createEmptyModel(n){return new r({},[],[],void 0,n)}get rawConfiguration(){if(!this._rawConfiguration)if(this._raw){let n=(Array.isArray(this._raw)?this._raw:[this._raw]).map(e=>{if(e instanceof r)return e;let t=new ry("",this.logService);return t.parseRaw(e),t.configurationModel});this._rawConfiguration=n.reduce((e,t)=>t===e?t:e.merge(t),n[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(n=>n instanceof r)))return this._raw}isEmpty(){return this._keys.length===0&&Object.keys(this._contents).length===0&&this._overrides.length===0}getValue(n){return n?Op(this.contents,n):this.contents}inspect(n,e){let t=this;return{get value(){return zf(t.rawConfiguration.getValue(n))},get override(){return e?zf(t.rawConfiguration.getOverrideValue(n,e)):void 0},get merged(){return zf(e?t.rawConfiguration.override(e).getValue(n):t.rawConfiguration.getValue(n))},get overrides(){let i=[];for(let{contents:o,identifiers:s,keys:a}of t.rawConfiguration.overrides){let l=new r(o,a,[],void 0,t.logService).getValue(n);l!==void 0&&i.push({identifiers:s,value:l})}return i.length?zf(i):void 0}}}getOverrideValue(n,e){let t=this.getContentsForOverrideIdentifer(e);return t?n?Op(t,n):t:void 0}getKeysForOverrideIdentifier(n){let e=[];for(let t of this.overrides)t.identifiers.includes(n)&&e.push(...t.keys);return Zn(e)}getAllOverrideIdentifiers(){let n=[];for(let e of this.overrides)n.push(...e.identifiers);return Zn(n)}override(n){let e=this.overrideConfigurations.get(n);return e||(e=this.createOverrideConfigurationModel(n),this.overrideConfigurations.set(n,e)),e}merge(...n){let e=Mn(this.contents),t=Mn(this.overrides),i=[...this.keys],o=this._raw?Array.isArray(this._raw)?[...this._raw]:[this._raw]:[this];for(let s of n)if(o.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]=t.filter(c=>gs(c.identifiers,a.identifiers));l?(this.mergeContents(l.contents,a.contents),l.keys.push(...a.keys),l.keys=Zn(l.keys)):t.push(Mn(a))}for(let a of s.keys)i.indexOf(a)===-1&&i.push(a)}return new r(e,i,t,!o.length||o.every(s=>s instanceof r)?void 0:o,this.logService)}createOverrideConfigurationModel(n){let e=this.getContentsForOverrideIdentifer(n);if(!e||typeof e!="object"||!Object.keys(e).length)return this;let t={};for(let i of Zn([...Object.keys(this.contents),...Object.keys(e)])){let o=this.contents[i],s=e[i];s&&(typeof o=="object"&&typeof s=="object"?(o=Mn(o),this.mergeContents(o,s)):o=s),t[i]=o}return new r(t,this.keys,this.overrides,void 0,this.logService)}mergeContents(n,e){for(let t of Object.keys(e)){if(t in n&&ut(n[t])&&ut(e[t])){this.mergeContents(n[t],e[t]);continue}n[t]=Mn(e[t])}}getContentsForOverrideIdentifer(n){let e=null,t=null,i=o=>{o&&(t?this.mergeContents(t,o):t=Mn(o))};for(let o of this.overrides)o.identifiers.length===1&&o.identifiers[0]===n?e=o.contents:o.identifiers.includes(n)&&i(o.contents);return i(e),t}toJSON(){return{contents:this.contents,overrides:this.overrides,keys:this.keys}}addValue(n,e){this.updateValue(n,e,!0)}setValue(n,e){this.updateValue(n,e,!1)}removeValue(n){let e=this.keys.indexOf(n);e!==-1&&(this.keys.splice(e,1),nD(this.contents,n),$i.test(n)&&this.overrides.splice(this.overrides.findIndex(t=>gs(t.identifiers,cc(n))),1))}updateValue(n,e,t){if(WS(this.contents,n,e,i=>this.logService.error(i)),t=t||this.keys.indexOf(n)===-1,t&&this.keys.push(n),$i.test(n)){let i=this.contents[n],o=cc(n),s={identifiers:o,keys:Object.keys(i),contents:nh(i,l=>this.logService.error(l))},a=this.overrides.findIndex(l=>gs(l.identifiers,o));a!==-1?this.overrides[a]=s:this.overrides.push(s)}}},ry=class{constructor(n,e){this._name=n;this.logService=e;this._raw=null;this._configurationModel=null;this._restrictedConfigurations=[];this._parseErrors=[]}get configurationModel(){return this._configurationModel||Jt.createEmptyModel(this.logService)}get restrictedConfigurations(){return this._restrictedConfigurations}get errors(){return this._parseErrors}parse(n,e){if(!Qt(n)){let t=this.doParseContent(n);this.parseRaw(t,e)}}reparse(n){this._raw&&this.parseRaw(this._raw,n)}parseRaw(n,e){this._raw=n;let{contents:t,keys:i,overrides:o,restricted:s,hasExcludedProperties:a}=this.doParseRaw(n,e);this._configurationModel=new Jt(t,i,o,a?[n]:void 0,this.logService),this._restrictedConfigurations=s||[]}doParseContent(n){let e={},t=null,i=[],o=[],s=[];function a(c){Array.isArray(i)?i.push(c):t!==null&&(i[t]=c)}let l={onObjectBegin:()=>{let c={};a(c),o.push(i),i=c,t=null},onObjectProperty:c=>{t=c},onObjectEnd:()=>{i=o.pop()},onArrayBegin:()=>{let c=[];a(c),o.push(i),i=c,t=null},onArrayEnd:()=>{i=o.pop()},onLiteralValue:a,onError:(c,u,p)=>{s.push({error:c,offset:u,length:p})}};if(n)try{qc(n,l),e=i[0]||{}}catch(c){this.logService.error(`Error while parsing settings file ${this._name}: ${c}`),this._parseErrors=[c]}return e}doParseRaw(n,e){let t=Ht.as(_n.Configuration),i=t.getConfigurationProperties(),o=t.getExcludedConfigurationProperties(),s=this.filter(n,i,o,!0,e);n=s.raw;let a=nh(n,u=>this.logService.error(`Conflict in settings file ${this._name}: ${u}`)),l=Object.keys(n),c=this.toOverrides(n,u=>this.logService.error(`Conflict in settings file ${this._name}: ${u}`));return{contents:a,keys:l,overrides:c,restricted:s.restricted,hasExcludedProperties:s.hasExcludedProperties}}filter(n,e,t,i,o){let s=!1;if(!o?.scopes&&!o?.skipRestricted&&!o?.skipUnregistered&&!o?.exclude?.length)return{raw:n,restricted:[],hasExcludedProperties:s};let a={},l=[];for(let c in n)if($i.test(c)&&i){let u=this.filter(n[c],e,t,!1,o);a[c]=u.raw,s=s||u.hasExcludedProperties,l.push(...u.restricted)}else{let u=e[c];u?.restricted&&l.push(c),this.shouldInclude(c,u,t,o)?a[c]=n[c]:s=!0}return{raw:a,restricted:l,hasExcludedProperties:s}}shouldInclude(n,e,t,i){if(i.exclude?.includes(n))return!1;if(i.include?.includes(n))return!0;if(i.skipRestricted&&e?.restricted||i.skipUnregistered&&!e)return!1;let o=e??t[n],s=o?typeof o.scope<"u"?o.scope:4:void 0;return s===void 0||i.scopes===void 0?!0:i.scopes.includes(s)}toOverrides(n,e){let t=[];for(let i of Object.keys(n))if($i.test(i)){let o={},s=n[i];for(let a in s)o[a]=s[a];t.push({identifiers:cc(i),keys:Object.keys(o),contents:nh(o,e)})}return t}},iy=class extends M{constructor(e,t,i,o,s){super();this.userSettingsResource=e;this.parseOptions=t;this.fileService=o;this.logService=s;this._onDidChange=this._register(new C);this.onDidChange=this._onDidChange.event;this.parser=new ry(this.userSettingsResource.toString(),s),this._register(this.fileService.watch(i.dirname(this.userSettingsResource))),this._register(this.fileService.watch(this.userSettingsResource)),this._register(x.any(x.filter(this.fileService.onDidFilesChange,a=>a.contains(this.userSettingsResource)),x.filter(this.fileService.onDidRunOperation,a=>(a.isOperation(0)||a.isOperation(3)||a.isOperation(1)||a.isOperation(4))&&i.isEqual(a.resource,e)))(()=>this._onDidChange.fire()))}async loadConfiguration(){try{let e=await this.fileService.readFile(this.userSettingsResource);return this.parser.parse(e.value.toString()||"{}",this.parseOptions),this.parser.configurationModel}catch{return Jt.createEmptyModel(this.logService)}}reparse(e){return e&&(this.parseOptions=e),this.parser.reparse(this.parseOptions),this.parser.configurationModel}getRestrictedSettings(){return this.parser.restrictedConfigurations}},l1=class{constructor(n,e,t,i,o,s,a,l,c,u,p,m,h){this.key=n;this.overrides=e;this._value=t;this.overrideIdentifiers=i;this.defaultConfiguration=o;this.policyConfiguration=s;this.applicationConfiguration=a;this.userConfiguration=l;this.localUserConfiguration=c;this.remoteUserConfiguration=u;this.workspaceConfiguration=p;this.folderConfigurationModel=m;this.memoryConfigurationModel=h}get value(){return zf(this._value)}toInspectValue(n){return n?.value!==void 0||n?.override!==void 0||n?.overrides!==void 0?n: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)}},Vu=class r{constructor(n,e,t,i,o,s,a,l,c,u){this._defaultConfiguration=n;this._policyConfiguration=e;this._applicationConfiguration=t;this._localUserConfiguration=i;this._remoteUserConfiguration=o;this._workspaceConfiguration=s;this._folderConfigurations=a;this._memoryConfiguration=l;this._memoryConfigurationByResource=c;this.logService=u;this._workspaceConsolidatedConfiguration=null;this._foldersConsolidatedConfigurations=new Lt;this._userConfiguration=null}getValue(n,e,t){return this.getConsolidatedConfigurationModel(n,e,t).getValue(n)}updateValue(n,e,t={}){let i;t.resource?(i=this._memoryConfigurationByResource.get(t.resource),i||(i=Jt.createEmptyModel(this.logService),this._memoryConfigurationByResource.set(t.resource,i))):i=this._memoryConfiguration,e===void 0?i.removeValue(n):i.setValue(n,e),t.resource||(this._workspaceConsolidatedConfiguration=null)}inspect(n,e,t){let i=this.getConsolidatedConfigurationModel(n,e,t),o=this.getFolderConfigurationModelForResource(e.resource,t),s=e.resource?this._memoryConfigurationByResource.get(e.resource)||this._memoryConfiguration:this._memoryConfiguration,a=new Set;for(let l of i.overrides)for(let c of l.identifiers)i.getOverrideValue(n,c)!==void 0&&a.add(c);return new l1(n,e,i.getValue(n),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,t?this._workspaceConfiguration:void 0,o||void 0,s)}keys(n){let e=this.getFolderConfigurationModelForResource(void 0,n);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(n){this._defaultConfiguration=n,this._workspaceConsolidatedConfiguration=null,this._foldersConsolidatedConfigurations.clear()}updatePolicyConfiguration(n){this._policyConfiguration=n}updateApplicationConfiguration(n){this._applicationConfiguration=n,this._workspaceConsolidatedConfiguration=null,this._foldersConsolidatedConfigurations.clear()}updateLocalUserConfiguration(n){this._localUserConfiguration=n,this._userConfiguration=null,this._workspaceConsolidatedConfiguration=null,this._foldersConsolidatedConfigurations.clear()}updateRemoteUserConfiguration(n){this._remoteUserConfiguration=n,this._userConfiguration=null,this._workspaceConsolidatedConfiguration=null,this._foldersConsolidatedConfigurations.clear()}updateWorkspaceConfiguration(n){this._workspaceConfiguration=n,this._workspaceConsolidatedConfiguration=null,this._foldersConsolidatedConfigurations.clear()}updateFolderConfiguration(n,e){this._folderConfigurations.set(n,e),this._foldersConsolidatedConfigurations.delete(n)}deleteFolderConfiguration(n){this.folderConfigurations.delete(n),this._foldersConsolidatedConfigurations.delete(n)}compareAndUpdateDefaultConfiguration(n,e){let t=[];if(!e){let{added:i,updated:o,removed:s}=pa(this._defaultConfiguration,n);e=[...i,...o,...s]}for(let i of e)for(let o of cc(i)){let s=this._defaultConfiguration.getKeysForOverrideIdentifier(o),a=n.getKeysForOverrideIdentifier(o),l=[...a.filter(c=>s.indexOf(c)===-1),...s.filter(c=>a.indexOf(c)===-1),...s.filter(c=>!Or(this._defaultConfiguration.override(o).getValue(c),n.override(o).getValue(c)))];t.push([o,l])}return this.updateDefaultConfiguration(n),{keys:e,overrides:t}}compareAndUpdatePolicyConfiguration(n){let{added:e,updated:t,removed:i}=pa(this._policyConfiguration,n),o=[...e,...t,...i];return o.length&&this.updatePolicyConfiguration(n),{keys:o,overrides:[]}}compareAndUpdateApplicationConfiguration(n){let{added:e,updated:t,removed:i,overrides:o}=pa(this.applicationConfiguration,n),s=[...e,...t,...i];return s.length&&this.updateApplicationConfiguration(n),{keys:s,overrides:o}}compareAndUpdateLocalUserConfiguration(n){let{added:e,updated:t,removed:i,overrides:o}=pa(this.localUserConfiguration,n),s=[...e,...t,...i];return s.length&&this.updateLocalUserConfiguration(n),{keys:s,overrides:o}}compareAndUpdateRemoteUserConfiguration(n){let{added:e,updated:t,removed:i,overrides:o}=pa(this.remoteUserConfiguration,n),s=[...e,...t,...i];return s.length&&this.updateRemoteUserConfiguration(n),{keys:s,overrides:o}}compareAndUpdateWorkspaceConfiguration(n){let{added:e,updated:t,removed:i,overrides:o}=pa(this.workspaceConfiguration,n),s=[...e,...t,...i];return s.length&&this.updateWorkspaceConfiguration(n),{keys:s,overrides:o}}compareAndUpdateFolderConfiguration(n,e){let t=this.folderConfigurations.get(n),{added:i,updated:o,removed:s,overrides:a}=pa(t,e),l=[...i,...o,...s];return(l.length||!t)&&this.updateFolderConfiguration(n,e),{keys:l,overrides:a}}compareAndDeleteFolderConfiguration(n){let e=this.folderConfigurations.get(n);if(!e)throw new Error("Unknown folder");this.deleteFolderConfiguration(n);let{added:t,updated:i,removed:o,overrides:s}=pa(e,void 0);return{keys:[...t,...i,...o],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 n=this._localUserConfiguration.merge(this._remoteUserConfiguration);this._userConfiguration=new Jt(n.contents,n.keys,n.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(n,e,t){let i=this.getConsolidatedConfigurationModelForResource(e,t);if(e.overrideIdentifier&&(i=i.override(e.overrideIdentifier)),!this._policyConfiguration.isEmpty()&&this._policyConfiguration.getValue(n)!==void 0){i=i.merge();for(let o of this._policyConfiguration.keys)i.setValue(o,this._policyConfiguration.getValue(o))}return i}getConsolidatedConfigurationModelForResource({resource:n},e){let t=this.getWorkspaceConsolidatedConfiguration();if(e&&n){let i=e.getFolder(n);i&&(t=this.getFolderConsolidatedConfiguration(i.uri)||t);let o=this._memoryConfigurationByResource.get(n);o&&(t=t.merge(o))}return t}getWorkspaceConsolidatedConfiguration(){return this._workspaceConsolidatedConfiguration||(this._workspaceConsolidatedConfiguration=this._defaultConfiguration.merge(this.applicationConfiguration,this.userConfiguration,this._workspaceConfiguration,this._memoryConfiguration)),this._workspaceConsolidatedConfiguration}getFolderConsolidatedConfiguration(n){let e=this._foldersConsolidatedConfigurations.get(n);if(!e){let t=this.getWorkspaceConsolidatedConfiguration(),i=this._folderConfigurations.get(n);i?(e=t.merge(i),this._foldersConsolidatedConfigurations.set(n,e)):e=t}return e}getFolderConfigurationModelForResource(n,e){if(e&&n){let t=e.getFolder(n);if(t)return this._folderConfigurations.get(t.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((n,e)=>{let{contents:t,overrides:i,keys:o}=this._folderConfigurations.get(e);return n.push([e,{contents:t,overrides:i,keys:o}]),n},[])}}allKeys(){let n=new Set;return this._defaultConfiguration.keys.forEach(e=>n.add(e)),this.userConfiguration.keys.forEach(e=>n.add(e)),this._workspaceConfiguration.keys.forEach(e=>n.add(e)),this._folderConfigurations.forEach(e=>e.keys.forEach(t=>n.add(t))),[...n.values()]}allOverrideIdentifiers(){let n=new Set;return this._defaultConfiguration.getAllOverrideIdentifiers().forEach(e=>n.add(e)),this.userConfiguration.getAllOverrideIdentifiers().forEach(e=>n.add(e)),this._workspaceConfiguration.getAllOverrideIdentifiers().forEach(e=>n.add(e)),this._folderConfigurations.forEach(e=>e.getAllOverrideIdentifiers().forEach(t=>n.add(t))),[...n.values()]}getAllKeysForOverrideIdentifier(n){let e=new Set;return this._defaultConfiguration.getKeysForOverrideIdentifier(n).forEach(t=>e.add(t)),this.userConfiguration.getKeysForOverrideIdentifier(n).forEach(t=>e.add(t)),this._workspaceConfiguration.getKeysForOverrideIdentifier(n).forEach(t=>e.add(t)),this._folderConfigurations.forEach(t=>t.getKeysForOverrideIdentifier(n).forEach(i=>e.add(i))),[...e.values()]}static parse(n,e){let t=this.parseConfigurationModel(n.defaults,e),i=this.parseConfigurationModel(n.policy,e),o=this.parseConfigurationModel(n.application,e),s=this.parseConfigurationModel(n.userLocal,e),a=this.parseConfigurationModel(n.userRemote,e),l=this.parseConfigurationModel(n.workspace,e),c=n.folders.reduce((u,p)=>(u.set(A.revive(p[0]),this.parseConfigurationModel(p[1],e)),u),new Lt);return new r(t,i,o,s,a,l,c,Jt.createEmptyModel(e),new Lt,e)}static parseConfigurationModel(n,e){return new Jt(n.contents,n.keys,n.overrides,n.raw,e)}},oy=class{constructor(n,e,t,i,o){this.change=n;this.previous=e;this.currentConfiguraiton=t;this.currentWorkspace=i;this.logService=o;this._marker=`
`;this._markerCode1=this._marker.charCodeAt(0);this._markerCode2=46;this.affectedKeys=new Set;this._previousConfiguration=void 0;for(let s of n.keys)this.affectedKeys.add(s);for(let[,s]of n.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=Vu.parse(this.previous.data,this.logService)),this._previousConfiguration}affectsConfiguration(n,e){let t=this._marker+n,i=this._affectsConfigStr.indexOf(t);if(i<0)return!1;let o=i+t.length;if(o>=this._affectsConfigStr.length)return!1;let s=this._affectsConfigStr.charCodeAt(o);if(s!==this._markerCode1&&s!==this._markerCode2)return!1;if(e){let a=this.previousConfiguration?this.previousConfiguration.getValue(n,e,this.previous?.workspace):void 0,l=this.currentConfiguraiton.getValue(n,e,this.currentWorkspace);return!Or(a,l)}return!0}}});var sy,ay,Gu,oW=_(()=>{dn();ae();te();Gr();qe();c1();Lo();me();Di();wi();rt();Ai();sy=class extends M{constructor(e){super();this.logService=e;this._onDidChangeConfiguration=this._register(new C);this.onDidChangeConfiguration=this._onDidChangeConfiguration.event;this._configurationModel=Jt.createEmptyModel(e)}get configurationModel(){return this._configurationModel}async initialize(){return this.resetConfigurationModel(),this._register(Ht.as(_n.Configuration).onDidUpdateConfiguration(({properties:e,defaultsOverrides:t})=>this.onDidUpdateConfiguration(Array.from(e),t))),this.configurationModel}reload(){return this.resetConfigurationModel(),this.configurationModel}onDidUpdateConfiguration(e,t){this.updateConfigurationModel(e,Ht.as(_n.Configuration).getConfigurationProperties()),this._onDidChangeConfiguration.fire({defaults:this.configurationModel,properties:e})}getConfigurationDefaultOverrides(){return{}}resetConfigurationModel(){this._configurationModel=Jt.createEmptyModel(this.logService);let e=Ht.as(_n.Configuration).getConfigurationProperties();this.updateConfigurationModel(Object.keys(e),e)}updateConfigurationModel(e,t){let i=this.getConfigurationDefaultOverrides();for(let o of e){let s=i[o],a=t[o];s!==void 0?this._configurationModel.setValue(o,s):a?this._configurationModel.setValue(o,Mn(a.default)):this._configurationModel.removeValue(o)}}},ay=class{constructor(){this.onDidChangeConfiguration=x.None;this.configurationModel=Jt.createEmptyModel(new Mh)}async initialize(){return this.configurationModel}},Gu=class extends M{constructor(e,t,i){super();this.defaultConfiguration=e;this.policyService=t;this.logService=i;this._onDidChangeConfiguration=this._register(new C);this.onDidChangeConfiguration=this._onDidChangeConfiguration.event;this._configurationModel=Jt.createEmptyModel(this.logService),this.configurationRegistry=Ht.as(_n.Configuration)}get configurationModel(){return this._configurationModel}async initialize(){return this.logService.trace("PolicyConfiguration#initialize"),this.update(await this.updatePolicyDefinitions(this.defaultConfiguration.configurationModel.keys),!1),this.update(await this.updatePolicyDefinitions(Object.keys(this.configurationRegistry.getExcludedConfigurationProperties())),!1),this._register(this.policyService.onDidChange(e=>this.onDidChangePolicies(e))),this._register(this.defaultConfiguration.onDidChangeConfiguration(async({properties:e})=>this.update(await this.updatePolicyDefinitions(e),!0))),this._configurationModel}async updatePolicyDefinitions(e){this.logService.trace("PolicyConfiguration#updatePolicyDefinitions",e);let t={},i=[],o=this.configurationRegistry.getConfigurationProperties(),s=this.configurationRegistry.getExcludedConfigurationProperties();for(let a of e){let l=o[a]??s[a];if(!l){i.push(a);continue}if(l.policy){if(l.type!=="string"&&l.type!=="number"&&l.type!=="array"&&l.type!=="object"&&l.type!=="boolean"){this.logService.warn(`Policy ${l.policy.name} has unsupported type ${l.type}`);continue}let{value:c}=l.policy;i.push(a),t[l.policy.name]={type:l.type==="number"?"number":l.type==="boolean"?"boolean":"string",value:c}}}return Lg(t)||await this.policyService.updatePolicyDefinitions(t),i}onDidChangePolicies(e){this.logService.trace("PolicyConfiguration#onDidChangePolicies",e);let t=this.configurationRegistry.getPolicyConfigurations(),i=wt(e.map(o=>t.get(o)));this.update(i,!0)}update(e,t){this.logService.trace("PolicyConfiguration#update",e);let i=this.configurationRegistry.getConfigurationProperties(),o=this.configurationRegistry.getExcludedConfigurationProperties(),s=[],a=this._configurationModel.isEmpty();for(let l of e){let c=i[l]??o[l],u=c?.policy?.name;if(u){let p=this.policyService.getPolicyValue(u);if(Ye(p)&&c.type!=="string")try{p=this.parse(p)}catch(m){this.logService.error(`Error parsing policy value ${u}:`,cn(m));continue}(a?p!==void 0:!Or(this._configurationModel.getValue(l),p))&&s.push([l,p])}else this._configurationModel.getValue(l)!==void 0&&s.push([l,void 0])}if(s.length){this.logService.trace("PolicyConfiguration#changed",s);let l=this._configurationModel;this._configurationModel=Jt.createEmptyModel(this.logService);for(let c of l.keys)this._configurationModel.setValue(c,l.getValue(c));for(let[c,u]of s)u===void 0?this._configurationModel.removeValue(c):this._configurationModel.setValue(c,u);t&&this._onDidChangeConfiguration.fire(this._configurationModel)}}parse(e){let t={},i=null,o=[],s=[],a=[];function l(u){if(Array.isArray(o))o.push(u);else if(i!==null){if(o[i]!==void 0)throw new Error(`Duplicate property found: ${i}`);o[i]=u}}if(e&&(qc(e,{onObjectBegin:()=>{let u={};l(u),s.push(o),o=u,i=null},onObjectProperty:u=>{i=u},onObjectEnd:()=>{o=s.pop()},onArrayBegin:()=>{let u=[];l(u),s.push(o),o=u,i=null},onArrayEnd:()=>{o=s.pop()},onLiteralValue:l,onError:(u,p,m)=>{a.push({error:u,offset:p,length:m})}}),t=o[0]||t),a.length>0)throw new Error(a.map(u=>cn(u.error)).join(`
`));return t}};Gu=D([S(1,oi),S(2,z)],Gu)});var ly,d1,sW=_(()=>{dn();Ce();Et();ae();Ai();rw();te();er();Gr();ce();Ut();_t();c1();Lo();oW();ct();Di();ly=class extends M{constructor(e,t,i,o){super();this.settingsResource=e;this.logService=o;this._onDidChangeConfiguration=this._register(new C);this.onDidChangeConfiguration=this._onDidChangeConfiguration.event;this.defaultConfiguration=this._register(new sy(o)),this.policyConfiguration=i instanceof Id?new ay:this._register(new Gu(this.defaultConfiguration,i,o)),this.userConfiguration=this._register(new iy(this.settingsResource,{},lt,t,o)),this.configuration=new Vu(this.defaultConfiguration.configurationModel,this.policyConfiguration.configurationModel,Jt.createEmptyModel(o),Jt.createEmptyModel(o),Jt.createEmptyModel(o),Jt.createEmptyModel(o),new Lt,Jt.createEmptyModel(o),new Lt,o),this.configurationEditing=new d1(e,t,this),this.reloadConfigurationScheduler=this._register(new On(()=>this.reloadConfiguration(),50)),this._register(this.defaultConfiguration.onDidChangeConfiguration(({defaults:s,properties:a})=>this.onDidDefaultConfigurationChange(s,a))),this._register(this.policyConfiguration.onDidChangeConfiguration(s=>this.onDidPolicyConfigurationChange(s))),this._register(this.userConfiguration.onDidChange(()=>this.reloadConfigurationScheduler.schedule()))}async initialize(){let[e,t,i]=await Promise.all([this.defaultConfiguration.initialize(),this.policyConfiguration.initialize(),this.userConfiguration.loadConfiguration()]);this.configuration=new Vu(e,t,Jt.createEmptyModel(this.logService),i,Jt.createEmptyModel(this.logService),Jt.createEmptyModel(this.logService),new Lt,Jt.createEmptyModel(this.logService),new Lt,this.logService)}getConfigurationData(){return this.configuration.toData()}getValue(e,t){let i=typeof e=="string"?e:void 0,o=th(e)?e:th(t)?t:{};return this.configuration.getValue(i,o,void 0)}async updateValue(e,t,i,o,s){let a=tD(i)?i:th(i)?{resource:i.resource,overrideIdentifiers:i.overrideIdentifier?[i.overrideIdentifier]:void 0}:void 0,l=a?o:i;if(l!==void 0&&l!==3&&l!==2)throw new Error(`Unable to write ${e} to target ${l}.`);a?.overrideIdentifiers&&(a.overrideIdentifiers=Zn(a.overrideIdentifiers),a.overrideIdentifiers=a.overrideIdentifiers.length?a.overrideIdentifiers:void 0);let c=this.inspect(e,{resource:a?.resource,overrideIdentifier:a?.overrideIdentifiers?a.overrideIdentifiers[0]:void 0});if(c.policyValue!==void 0)throw new Error(`Unable to write ${e} because it is configured in system policy.`);if(Or(t,c.defaultValue)&&(t=void 0),a?.overrideIdentifiers?.length&&a.overrideIdentifiers.length>1){let p=a.overrideIdentifiers.sort(),m=this.configuration.localUserConfiguration.overrides.find(h=>gs([...h.identifiers].sort(),p));m&&(a.overrideIdentifiers=m.identifiers)}let u=a?.overrideIdentifiers?.length?[uD(a.overrideIdentifiers),e]:[e];await this.configurationEditing.write(u,t),await this.reloadConfiguration()}inspect(e,t={}){return this.configuration.inspect(e,t,void 0)}keys(){return this.configuration.keys(void 0)}async reloadConfiguration(){let e=await this.userConfiguration.loadConfiguration();this.onDidChangeUserConfiguration(e)}onDidChangeUserConfiguration(e){let t=this.configuration.toData(),i=this.configuration.compareAndUpdateLocalUserConfiguration(e);this.trigger(i,t,2)}onDidDefaultConfigurationChange(e,t){let i=this.configuration.toData(),o=this.configuration.compareAndUpdateDefaultConfiguration(e,t);this.trigger(o,i,7)}onDidPolicyConfigurationChange(e){let t=this.configuration.toData(),i=this.configuration.compareAndUpdatePolicyConfiguration(e);this.trigger(i,t,7)}trigger(e,t,i){let o=new oy(e,{data:t},this.configuration,void 0,this.logService);o.source=i,this._onDidChangeConfiguration.fire(o)}},d1=class{constructor(n,e,t){this.settingsResource=n;this.fileService=e;this.configurationService=t;this.queue=new $r}write(n,e){return this.queue.queue(()=>this.doWriteConfiguration(n,e))}async doWriteConfiguration(n,e){let t;try{t=(await this.fileService.readFile(this.settingsResource)).value.toString()}catch(s){if(s.fileOperationResult===1)t="{}";else throw s}let i=[];if(ti(t,i,{allowTrailingComma:!0,allowEmptyContent:!0}),i.length>0)throw new Error("Unable to write into the settings file. Please open the file to correct errors/warnings in the file and try again.");let o=this.getEdits(t,n,e);t=nw(t,o),await this.fileService.writeFile(this.settingsResource,ee.fromString(t))}getEdits(n,e,t){let{tabSize:i,insertSpaces:o,eol:s}=this.formattingOptions;if(!e.length){let a=JSON.stringify(t,null,o?" ".repeat(i):"	");return[{content:a,length:a.length,offset:0}]}return tw(n,e,t,{tabSize:i,insertSpaces:o,eol:s})}get formattingOptions(){if(!this._formattingOptions){let n=Yt===3||Yt===2?`
`:`\r
`,e=this.configurationService.getValue("files.eol",{overrideIdentifier:"jsonc"});e&&typeof e=="string"&&e!=="auto"&&(n=e),this._formattingOptions={eol:n,insertSpaces:!!this.configurationService.getValue("editor.insertSpaces",{overrideIdentifier:"jsonc"}),tabSize:this.configurationService.getValue("editor.tabSize",{overrideIdentifier:"jsonc"})}}return this._formattingOptions}}});import*as lW from"fs";import*as sn from"os";async function u1(r,n){let e=`${r}::${n.join(":")}`,t=aW.get(e);if(t)return t;let i=[{tag:"grunt.js",filePattern:/^gruntfile\.js$/i},{tag:"gulp.js",filePattern:/^gulpfile\.js$/i},{tag:"tsconfig.json",filePattern:/^tsconfig\.json$/i},{tag:"package.json",filePattern:/^package\.json$/i},{tag:"jsconfig.json",filePattern:/^jsconfig\.json$/i},{tag:"tslint.json",filePattern:/^tslint\.json$/i},{tag:"eslint.json",filePattern:/^eslint\.json$/i},{tag:"tasks.json",filePattern:/^tasks\.json$/i},{tag:"launch.json",filePattern:/^launch\.json$/i},{tag:"mcp.json",filePattern:/^mcp\.json$/i},{tag:"settings.json",filePattern:/^settings\.json$/i},{tag:"webpack.config.js",filePattern:/^webpack\.config\.js$/i},{tag:"project.json",filePattern:/^project\.json$/i},{tag:"makefile",filePattern:/^makefile$/i},{tag:"sln",filePattern:/^.+\.sln$/i},{tag:"csproj",filePattern:/^.+\.csproj$/i},{tag:"cmake",filePattern:/^.+\.cmake$/i},{tag:"github-actions",filePattern:/^.+\.ya?ml$/i,relativePathPattern:/^\.github(?:\/|\\)workflows$/i},{tag:"devcontainer.json",filePattern:/^devcontainer\.json$/i},{tag:"dockerfile",filePattern:/^(dockerfile|docker\-compose\.ya?ml)$/i},{tag:"cursorrules",filePattern:/^\.cursorrules$/i},{tag:"cursorrules-dir",filePattern:/\.mdc$/i,relativePathPattern:/^\.cursor[\/\\]rules$/i},{tag:"github-instructions-dir",filePattern:/\.instructions\.md$/i,relativePathPattern:/^\.github[\/\\]instructions$/i},{tag:"github-prompts-dir",filePattern:/\.prompt\.md$/i,relativePathPattern:/^\.github[\/\\]prompts$/i},{tag:"clinerules",filePattern:/^\.clinerules$/i},{tag:"clinerules-dir",filePattern:/\.md$/i,relativePathPattern:/^\.clinerules$/i},{tag:"agent.md",filePattern:/^agent\.md$/i},{tag:"agents.md",filePattern:/^agents\.md$/i},{tag:"claude.md",filePattern:/^claude\.md$/i},{tag:"claude-settings",filePattern:/^settings\.json$/i,relativePathPattern:/^\.claude$/i},{tag:"claude-settings-local",filePattern:/^settings\.local\.json$/i,relativePathPattern:/^\.claude$/i},{tag:"claude-mcp",filePattern:/^mcp\.json$/i,relativePathPattern:/^\.claude$/i},{tag:"claude-commands-dir",filePattern:/\.md$/i,relativePathPattern:/^\.claude[\/\\]commands$/i},{tag:"claude-skills-dir",filePattern:/^SKILL\.md$/i,relativePathPattern:/^\.claude[\/\\]skills[\/\\]/i},{tag:"claude-rules-dir",filePattern:/\.md$/i,relativePathPattern:/^\.claude[\/\\]rules$/i},{tag:"gemini.md",filePattern:/^gemini\.md$/i},{tag:"copilot-instructions.md",filePattern:/^copilot\-instructions\.md$/i,relativePathPattern:/^\.github$/i}],o=new Map,s=new Map,a=2e4;function l(u,p,m,h){let E=p.substring(u.length+1);return Ft.withAsyncBody(async y=>{let P;h.readdirCount++;try{P=await re.readdir(p,{withFileTypes:!0})}catch{y();return}if(h.count>=a){h.count+=P.length,h.maxReached=!0,y();return}let T=P.length;if(T===0){y();return}let k=P;h.count+P.length>a&&(h.maxReached=!0,T=a-h.count,k=P.slice(0,T)),h.count+=P.length;for(let U of k)if(U.isDirectory()){if(m.includes(U.name)||await l(u,H(p,U.name),m,h),--T===0){y();return}}else{let O=U.name.lastIndexOf(".");if(O>=0){let B=U.name.substring(O+1);B&&o.set(B,(o.get(B)??0)+1)}for(let B of i)B.relativePathPattern?.test(E)!==!1&&B.filePattern.test(U.name)&&s.set(B.tag,(s.get(B.tag)??0)+1);if(--T===0){y();return}}})}let c=Ft.withAsyncBody(async u=>{let p={count:0,maxReached:!1,readdirCount:0},m=new Rr(!0);await l(r,r,n,p);let h=await G6(r);u({configFiles:p1(s),fileTypes:p1(o),fileCount:p.count,maxFilesReached:p.maxReached,launchConfigFiles:h,totalScanTime:m.elapsed(),totalReaddirCount:p.readdirCount})});return aW.set(e,c),c}function p1(r){return Array.from(r.entries(),([n,e])=>({name:n,count:e})).sort((n,e)=>e.count-n.count)}function V6(){let r={os:`${sn.type()} ${sn.arch()} ${sn.release()}`,memory:`${(sn.totalmem()/no.GB).toFixed(2)}GB (${(sn.freemem()/no.GB).toFixed(2)}GB free)`,vmHint:`${Math.round(jm.value()*100)}%`},n=sn.cpus();return n&&n.length>0&&(r.cpus=`${n[0].model} (${n.length} x ${n[0].speed})`),r}async function G6(r){try{let n=new Map,e=H(r,".vscode","launch.json"),t=await lW.promises.readFile(e),i=[],o=ti(t.toString(),i);if(i.length)return console.log(`Unable to parse ${e}`),[];if(Ws(o)==="object"&&o.configurations)for(let s of o.configurations){let a=s.type;a&&(n.has(a)?n.set(a,n.get(a)+1):n.set(a,1))}return p1(n)}catch{return[]}}var aW,Hu,cW=_(()=>{Ce();Ai();at();Ne();ce();Sa();Ie();zm();pn();jw();mI();ct();In();Tn();aW=new Map;Hu=class{constructor(n,e){this.telemetryService=n;this.productService=e}formatMachineInfo(n){let e=[];return e.push(`OS Version:       ${n.os}`),e.push(`CPUs:             ${n.cpus}`),e.push(`Memory (System):  ${n.memory}`),e.push(`VM:               ${n.vmHint}`),e.join(`
`)}formatEnvironment(n){let e=[];e.push(`Version:          ${this.productService.nameShort} ${this.productService.version} (${this.productService.commit||"Commit unknown"}, ${this.productService.date||"Date unknown"})`),e.push(`OS Version:       ${sn.type()} ${sn.arch()} ${sn.release()}`);let t=sn.cpus();return t&&t.length>0&&e.push(`CPUs:             ${t[0].model} (${t.length} x ${t[0].speed})`),e.push(`Memory (System):  ${(sn.totalmem()/no.GB).toFixed(2)}GB (${(sn.freemem()/no.GB).toFixed(2)}GB free)`),q||e.push(`Load (avg):       ${sn.loadavg().map(i=>Math.round(i)).join(", ")}`),e.push(`VM:               ${Math.round(jm.value()*100)}%`),e.push(`Screen Reader:    ${n.screenReader?"yes":"no"}`),e.push(`Process Argv:     ${n.mainArguments.join(" ")}`),e.push(`GPU Status:       ${this.expandGPUFeatures(n.gpuFeatureStatus)}`),n.gpuLogMessages&&n.gpuLogMessages.length>0&&(e.push("GPU Log Messages:"),n.gpuLogMessages.forEach(i=>{e.push(`${i.header}: ${i.message}`)})),e.join(`
`)}async getPerformanceInfo(n,e){return Promise.all([Km(n.mainPID),this.formatWorkspaceMetadata(n)]).then(async t=>{let[i,o]=t,s=this.formatProcessList(n,i);return e.forEach(a=>{if(Rm(a))s+=`
${a.errorMessage}`,o+=`
${a.errorMessage}`;else if(s+=`

Remote: ${a.hostName}`,a.processes&&(s+=`
${this.formatProcessList(n,a.processes)}`),a.workspaceMetadata){o+=`
|  Remote: ${a.hostName}`;for(let l of Object.keys(a.workspaceMetadata)){let c=a.workspaceMetadata[l],u=`${c.fileCount} files`;c.maxFilesReached&&(u=`more than ${u}`),o+=`|    Folder (${l}): ${u}`,o+=this.formatWorkspaceStats(c)}}}),{processInfo:s,workspaceInfo:o}})}async getSystemInfo(n,e){let{memory:t,vmHint:i,os:o,cpus:s}=V6(),a={os:o,memory:t,cpus:s,vmHint:i,processArgs:`${n.mainArguments.join(" ")}`,gpuStatus:n.gpuFeatureStatus,screenReader:`${n.screenReader?"yes":"no"}`,remoteData:e};return q||(a.load=`${sn.loadavg().map(l=>Math.round(l)).join(", ")}`),fe&&(a.linuxEnv={desktopSession:process.env.DESKTOP_SESSION,xdgSessionDesktop:process.env.XDG_SESSION_DESKTOP,xdgCurrentDesktop:process.env.XDG_CURRENT_DESKTOP,xdgSessionType:process.env.XDG_SESSION_TYPE}),Promise.resolve(a)}async getDiagnostics(n,e){let t=[];return Km(n.mainPID).then(async i=>(t.push(""),t.push(this.formatEnvironment(n)),t.push(""),t.push(this.formatProcessList(n,i)),n.windows.some(o=>o.folderURIs&&o.folderURIs.length>0&&!o.remoteAuthority)&&(t.push(""),t.push("Workspace Stats: "),t.push(await this.formatWorkspaceMetadata(n))),e.forEach(o=>{if(Rm(o))t.push(`
${o.errorMessage}`);else if(t.push(`

`),t.push(`Remote:           ${o.hostName}`),t.push(this.formatMachineInfo(o.machineInfo)),o.processes&&t.push(this.formatProcessList(n,o.processes)),o.workspaceMetadata)for(let s of Object.keys(o.workspaceMetadata)){let a=o.workspaceMetadata[s],l=`${a.fileCount} files`;a.maxFilesReached&&(l=`more than ${l}`),t.push(`Folder (${s}): ${l}`),t.push(this.formatWorkspaceStats(a))}}),t.push(""),t.push(""),t.join(`
`)))}formatWorkspaceStats(n){let e=[],i=0,o=(c,u)=>{let p=` ${c}(${u})`;i+p.length>60?(e.push(s),s="|                 ",i=s.length):i+=p.length,s+=p},s="|      File types:",a=10,l=n.fileTypes.length>a?a:n.fileTypes.length;for(let c=0;c<l;c++){let u=n.fileTypes[c];o(u.name,u.count)}if(e.push(s),n.configFiles.length>=0&&(s="|      Conf files:",i=0,n.configFiles.forEach(c=>{o(c.name,c.count)}),e.push(s)),n.launchConfigFiles.length>0){let c="|      Launch Configs:";n.launchConfigFiles.forEach(u=>{let p=u.count>1?` ${u.name}(${u.count})`:` ${u.name}`;c+=p}),e.push(c)}return e.join(`
`)}expandGPUFeatures(n){let e=Math.max(...Object.keys(n).map(t=>t.length));return Object.keys(n).map(t=>`${t}:  ${" ".repeat(e-t.length)}  ${n[t]}`).join(`
                  `)}formatWorkspaceMetadata(n){let e=[],t=[];return n.windows.forEach(i=>{i.folderURIs.length===0||i.remoteAuthority||(e.push(`|  Window (${i.title})`),i.folderURIs.forEach(o=>{let s=A.revive(o);if(s.scheme===Y.file){let a=s.fsPath;t.push(u1(a,["node_modules",".git"]).then(l=>{let c=`${l.fileCount} files`;l.maxFilesReached&&(c=`more than ${c}`),e.push(`|    Folder (${Pe(a)}): ${c}`),e.push(this.formatWorkspaceStats(l))}).catch(l=>{e.push(`|      Error: Unable to collect workspace stats for folder ${a} (${l.toString()})`)}))}else e.push(`|    Folder (${s.toString()}): Workspace stats not available.`)}))}),Promise.all(t).then(i=>e.join(`
`)).catch(i=>`Unable to collect workspace stats: ${i}`)}formatProcessList(n,e){let t=new Map;n.windows.forEach(o=>t.set(o.pid,`window [${o.id}] (${o.title})`)),n.pidToNames.forEach(({pid:o,name:s})=>t.set(o,s));let i=[];return i.push("CPU %	Mem MB	   PID	Process"),e&&this.formatProcessItem(n.mainPID,t,i,e,0),i.join(`
`)}formatProcessItem(n,e,t,i,o){let s=o===0,a;s?a=i.pid===n?this.productService.applicationName:"remote-server":e.has(i.pid)?a=e.get(i.pid):a=`${"  ".repeat(o)} ${i.name}`;let l=process.platform==="win32"?i.mem:sn.totalmem()*(i.mem/100);t.push(`${i.load.toFixed(0).padStart(5," ")}	${(l/no.MB).toFixed(0).padStart(6," ")}	${i.pid.toFixed(0).padStart(6," ")}	${a}`),Array.isArray(i.children)&&i.children.forEach(c=>this.formatProcessItem(n,e,t,c,o+1))}async getWorkspaceFileExtensions(n){let e=new Set;for(let{uri:t}of n.folders){let i=A.revive(t);if(i.scheme!==Y.file)continue;let o=i.fsPath;try{(await u1(o,["node_modules",".git"])).fileTypes.forEach(a=>e.add(a.name))}catch{}}return{extensions:[...e]}}async reportWorkspaceStats(n){for(let{uri:e}of n.folders){let t=A.revive(e);if(t.scheme!==Y.file)continue;let i=t.fsPath;try{let o=await u1(i,["node_modules",".git"]);this.telemetryService.publicLog2("workspace.stats",{"workspace.id":n.telemetryId,rendererSessionId:n.rendererSessionId}),o.fileTypes.forEach(s=>{this.telemetryService.publicLog2("workspace.stats.file",{rendererSessionId:n.rendererSessionId,type:s.name,count:s.count})}),o.launchConfigFiles.forEach(s=>{this.telemetryService.publicLog2("workspace.stats.launchConfigFile",{rendererSessionId:n.rendererSessionId,type:s.name,count:s.count})}),o.configFiles.forEach(s=>{this.telemetryService.publicLog2("workspace.stats.configFiles",{rendererSessionId:n.rendererSessionId,type:s.name,count:s.count})}),this.telemetryService.publicLog2("workspace.stats.metadata",{duration:o.totalScanTime,reachedLimit:o.maxFilesReached,fileCount:o.fileCount,readdirCount:o.totalReaddirCount})}catch{}}}};Hu=D([S(0,St),S(1,He)],Hu)});import{writeFileSync as H6}from"fs";import{tmpdir as J6}from"os";function dW(r){let n=ba(J6());try{return H6(n,""),r&&console.log(`Marker file for --wait created: ${n}`),n}catch(e){r&&console.error(`Failed to create marker file for --wait: ${e}`);return}}var uW=_(()=>{xr()});var ma,pW=_(()=>{dn();Ce();Et();Bt();ae();eo();gp();te();Ua();at();Bi();Ut();pc();We();ct();Jw();me();rt();ma=class extends M{constructor(e){super();this.logService=e;this.BUFFER_SIZE=256*1024;this._onDidChangeFileSystemProviderRegistrations=this._register(new C);this.onDidChangeFileSystemProviderRegistrations=this._onDidChangeFileSystemProviderRegistrations.event;this._onWillActivateFileSystemProvider=this._register(new C);this.onWillActivateFileSystemProvider=this._onWillActivateFileSystemProvider.event;this._onDidChangeFileSystemProviderCapabilities=this._register(new C);this.onDidChangeFileSystemProviderCapabilities=this._onDidChangeFileSystemProviderCapabilities.event;this.provider=new Map;this._onDidRunOperation=this._register(new C);this.onDidRunOperation=this._onDidRunOperation.event;this.internalOnDidFilesChange=this._register(new C);this._onDidUncorrelatedFilesChange=this._register(new C);this.onDidFilesChange=this._onDidUncorrelatedFilesChange.event;this._onDidWatchError=this._register(new C);this.onDidWatchError=this._onDidWatchError.event;this.activeWatchers=new Map;this.writeQueue=this._register(new ic)}registerProvider(e,t){if(this.provider.has(e))throw new Error(`A filesystem provider for the scheme '${e}' is already registered.`);tt(`code/registerFilesystem/${e}`);let i=new ue;return this.provider.set(e,t),this._onDidChangeFileSystemProviderRegistrations.fire({added:!0,scheme:e,provider:t}),i.add(t.onDidChangeFile(o=>{let s=new Fh(o,!this.isPathCaseSensitive(t));this.internalOnDidFilesChange.fire(s),s.hasCorrelation()||this._onDidUncorrelatedFilesChange.fire(s)})),typeof t.onDidWatchError=="function"&&i.add(t.onDidWatchError(o=>this._onDidWatchError.fire(new Error(o)))),i.add(t.onDidChangeCapabilities(()=>this._onDidChangeFileSystemProviderCapabilities.fire({provider:t,scheme:e}))),oe(()=>{this._onDidChangeFileSystemProviderRegistrations.fire({added:!1,scheme:e,provider:t}),this.provider.delete(e),At(i)})}getProvider(e){return this.provider.get(e)}async activateProvider(e){let t=[];this._onWillActivateFileSystemProvider.fire({scheme:e,join(i){t.push(i)}}),!this.provider.has(e)&&await Ft.settled(t)}async canHandleResource(e){return await this.activateProvider(e.scheme),this.hasProvider(e)}hasProvider(e){return this.provider.has(e.scheme)}hasCapability(e,t){let i=this.provider.get(e.scheme);return!!(i&&i.capabilities&t)}listCapabilities(){return ji.map(this.provider,([e,t])=>({scheme:e,capabilities:t.capabilities}))}async withProvider(e){if(!kx(e))throw new mn(v(2085,null,this.resourceForError(e)),8);await this.activateProvider(e.scheme);let t=this.provider.get(e.scheme);if(!t){let i=new Ar;throw i.message=v(2087,null,e.toString()),i}return t}async withReadProvider(e){let t=await this.withProvider(e);if(Go(t)||Vr(t)||Bh(t))return t;throw new Error(`Filesystem provider for scheme '${e.scheme}' neither has FileReadWrite, FileReadStream nor FileOpenReadWriteClose capability which is needed for the read operation.`)}async withWriteProvider(e){let t=await this.withProvider(e);if(Go(t)||Vr(t))return t;throw new Error(`Filesystem provider for scheme '${e.scheme}' neither has FileReadWrite nor FileOpenReadWriteClose capability which is needed for the write operation.`)}async resolve(e,t){try{return await this.doResolveFile(e,t)}catch(i){throw fm(i)==="EntryNotFound"?new mn(v(2082,null,this.resourceForError(e)),1):Ho(i)}}async doResolveFile(e,t){let i=await this.withProvider(e),o=this.isPathCaseSensitive(i),s=t?.resolveTo,a=t?.resolveSingleChildDescendants,l=t?.resolveMetadata,c=await i.stat(e),u;return this.toFileStat(i,e,c,void 0,!!l,(p,m)=>(u||(u=gr.forUris(()=>!o),u.set(e,!0),s&&u.fill(!0,s)),u.get(p.resource)||u.findSuperstr(p.resource.with({query:null,fragment:null}))?!0:p.isDirectory&&a?m===1:!1))}async toFileStat(e,t,i,o,s,a){let{providerExtUri:l}=this.getExtUri(e),c={resource:t,name:l.basename(t),isFile:(i.type&1)!==0,isDirectory:(i.type&2)!==0,isSymbolicLink:(i.type&64)!==0,mtime:i.mtime,ctime:i.ctime,size:i.size,readonly:!!((i.permissions??0)&1)||!!(e.capabilities&2048),locked:!!((i.permissions??0)&2),executable:!!((i.permissions??0)&4),etag:P_({mtime:i.mtime,size:i.size}),children:void 0};if(c.isDirectory&&a(c,o)){try{let u=await e.readdir(t),p=await Ft.settled(u.map(async([m,h])=>{try{let E=l.joinPath(t,m),y=s?await e.stat(E):{type:h};return await this.toFileStat(e,E,y,u.length,s,a)}catch(E){return this.logService.trace(E),null}}));c.children=wt(p)}catch(u){this.logService.trace(u),c.children=[]}return c}return c}async resolveAll(e){return Ft.settled(e.map(async t=>{try{return{stat:await this.doResolveFile(t.resource,t.options),success:!0}}catch(i){return this.logService.trace(i),{stat:void 0,success:!1}}}))}async stat(e){let t=await this.withProvider(e),i=await t.stat(e);return this.toFileStat(t,e,i,void 0,!0,()=>!1)}async realpath(e){let t=await this.withProvider(e);if(vO(t)){let i=await t.realpath(e);return e.with({path:i})}}async exists(e){let t=await this.withProvider(e);try{return!!await t.stat(e)}catch{return!1}}async canCreateFile(e,t){try{await this.doValidateCreateFile(e,t)}catch(i){return i}return!0}async doValidateCreateFile(e,t){if(!t?.overwrite&&await this.exists(e))throw new mn(v(2078,null,this.resourceForError(e)),3,t)}async createFile(e,t=ee.fromString(""),i){await this.doValidateCreateFile(e,i);let o=await this.writeFile(e,t);return this._onDidRunOperation.fire(new Vo(e,0,o)),o}async writeFile(e,t,i){let o=this.throwIfFileSystemIsReadonly(await this.withWriteProvider(e),e),{providerExtUri:s}=this.getExtUri(o),a=i;if(T_(o)&&!a?.atomic){let l=o.enforceAtomicWriteFile?.(e);l&&(a={...i,atomic:l})}try{let{stat:l,buffer:c}=await this.validateWriteFile(o,e,t,a);l||await this.mkdirp(o,s.dirname(e)),c||(c=await this.peekBufferForWriting(o,t)),!Go(o)||Vr(o)&&c instanceof ee||Vr(o)&&T_(o)&&a?.atomic?await this.doWriteUnbuffered(o,e,a,c):await this.doWriteBuffered(o,e,a,c instanceof ee?AD(c):c),this._onDidRunOperation.fire(new Vo(e,4))}catch(l){throw new mn(v(2077,null,this.resourceForError(e),Ho(l).toString()),Ir(l),a)}return this.resolve(e,{resolveMetadata:!0})}async peekBufferForWriting(e,t){let i;if(Vr(e)&&!(t instanceof ee))if(Fp(t)){let o=await bD(t,3);o.ended?i=ee.concat(o.buffer):i=o}else i=wD(t,o=>ee.concat(o),3);else i=t;return i}async validateWriteFile(e,t,i,o){let s=!!o?.unlock;if(s&&!(e.capabilities&8192))throw new Error(v(2095,null,this.resourceForError(t)));if(o?.append&&!IO(e))throw new mn(v(2074,null,this.resourceForError(t)),6);if(!!o?.atomic){if(!(e.capabilities&32768))throw new Error(v(2093,null,this.resourceForError(t)));if(!(e.capabilities&2))throw new Error(v(2094,null,this.resourceForError(t)));if(s)throw new Error(v(2092,null,this.resourceForError(t)))}let l;try{l=await e.stat(t)}catch{return Object.create(null)}if((l.type&2)!==0)throw new mn(v(2080,null,this.resourceForError(t)),0,o);this.throwIfFileIsReadonly(t,l);let c;if(typeof o?.mtime=="number"&&typeof o.etag=="string"&&o.etag!==Hh&&typeof l.mtime=="number"&&typeof l.size=="number"&&o.mtime<l.mtime&&o.etag!==P_({mtime:o.mtime,size:l.size})){if(c=await this.peekBufferForWriting(e,i),c instanceof ee&&c.byteLength===l.size)try{let{value:u}=await this.readFile(t,{limits:{size:l.size}});if(c.equals(u))return{stat:l,buffer:c}}catch{}throw new mn(v(2081,null),3,o)}return{stat:l,buffer:c}}async readFile(e,t,i){let o=await this.withReadProvider(e);return t?.atomic?this.doReadFileAtomic(o,e,t,i):this.doReadFile(o,e,t,i)}async doReadFileAtomic(e,t,i,o){return new Promise((s,a)=>{this.writeQueue.queueFor(t,async()=>{try{let l=await this.doReadFile(e,t,i,o);s(l)}catch(l){a(l)}},this.getExtUri(e).providerExtUri)})}async doReadFile(e,t,i,o){let s=await this.doReadFileStream(e,t,{...i,preferUnbuffered:!0},o);return{...s,value:await Ra(s.value)}}async readFileStream(e,t,i){let o=await this.withReadProvider(e);return this.doReadFileStream(o,e,t,i)}async doReadFileStream(e,t,i,o){let s=new st(o),a=i;Vh(e)&&e.enforceAtomicReadFile?.(t)&&(a={...i,atomic:!0});let l=this.validateReadFile(t,a).then(u=>u,u=>{throw s.dispose(!0),u}),c;try{return typeof a?.etag=="string"&&a.etag!==Hh&&await l,a?.atomic&&Vh(e)||!(Go(e)||Bh(e))||Vr(e)&&a?.preferUnbuffered?c=this.readFileUnbuffered(e,t,a):Bh(e)?c=this.readFileStreamed(e,t,s.token,a):c=this.readFileBuffered(e,t,s.token,a),c.on("end",()=>s.dispose()),c.on("error",()=>s.dispose()),{...await l,value:c}}catch(u){throw c&&await ph(c),this.restoreReadError(u,t,a)}}restoreReadError(e,t,i){let o=v(2075,null,this.resourceForError(t),Ho(e).toString());return e instanceof Rc?new Rc(o,e.stat,i):e instanceof Ac?new Ac(o,e.fileOperationResult,e.size,e.options):new mn(o,Ir(e),i)}readFileStreamed(e,t,i,o=Object.create(null)){let s=e.readFileStream(t,o,i);return mh(s,{data:a=>a instanceof ee?a:ee.wrap(a),error:a=>this.restoreReadError(a,t,o)},a=>ee.concat(a))}readFileBuffered(e,t,i,o=Object.create(null)){let s=DD();return JI(e,t,s,a=>a,{...o,bufferSize:this.BUFFER_SIZE,errorTransformer:a=>this.restoreReadError(a,t,o)},i),s}readFileUnbuffered(e,t,i){let o=ws(s=>ee.concat(s));return(async()=>{try{let s;i?.atomic&&Vh(e)?s=await e.readFile(t,{atomic:!0}):s=await e.readFile(t),typeof i?.position=="number"&&(s=s.slice(i.position)),typeof i?.length=="number"&&(s=s.slice(0,i.length)),this.validateReadFileLimits(t,s.byteLength,i),o.end(ee.wrap(s))}catch(s){o.error(s),o.end()}})(),o}async validateReadFile(e,t){let i=await this.resolve(e,{resolveMetadata:!0});if(i.isDirectory)throw new mn(v(2079,null,this.resourceForError(e)),0,t);if(typeof t?.etag=="string"&&t.etag!==Hh&&t.etag===i.etag)throw new Rc(v(2083,null),i,t);return this.validateReadFileLimits(e,i.size,t),i}validateReadFileLimits(e,t,i){if(typeof i?.limits?.size=="number"&&t>i.limits.size)throw new Ac(v(2084,null,this.resourceForError(e)),7,t,i)}async canMove(e,t,i){return this.doCanMoveCopy(e,t,"move",i)}async canCopy(e,t,i){return this.doCanMoveCopy(e,t,"copy",i)}async doCanMoveCopy(e,t,i,o){if(e.toString()!==t.toString())try{let s=i==="move"?this.throwIfFileSystemIsReadonly(await this.withWriteProvider(e),e):await this.withReadProvider(e),a=this.throwIfFileSystemIsReadonly(await this.withWriteProvider(t),t);await this.doValidateMoveCopy(s,e,a,t,i,o)}catch(s){return s}return!0}async move(e,t,i){let o=this.throwIfFileSystemIsReadonly(await this.withWriteProvider(e),e),s=this.throwIfFileSystemIsReadonly(await this.withWriteProvider(t),t),a=await this.doMoveCopy(o,e,s,t,"move",!!i),l=await this.resolve(t,{resolveMetadata:!0});return this._onDidRunOperation.fire(new Vo(e,a==="move"?2:3,l)),l}async copy(e,t,i){let o=await this.withReadProvider(e),s=this.throwIfFileSystemIsReadonly(await this.withWriteProvider(t),t),a=await this.doMoveCopy(o,e,s,t,"copy",!!i),l=await this.resolve(t,{resolveMetadata:!0});return this._onDidRunOperation.fire(new Vo(e,a==="copy"?3:2,l)),l}async doMoveCopy(e,t,i,o,s,a){if(t.toString()===o.toString())return s;let{exists:l,isSameResourceWithDifferentPathCase:c}=await this.doValidateMoveCopy(e,t,i,o,s,a);if(l&&!c&&a&&await this.del(o,{recursive:!0}),await this.mkdirp(i,this.getExtUri(i).providerExtUri.dirname(o)),s==="copy"){if(e===i&&mm(e))await e.copy(t,o,{overwrite:a});else{let u=await this.resolve(t);u.isDirectory?await this.doCopyFolder(e,u,i,o):await this.doCopyFile(e,t,i,o)}return s}else return e===i?(await e.rename(t,o,{overwrite:a}),s):(await this.doMoveCopy(e,t,i,o,"copy",a),await this.del(t,{recursive:!0}),"copy")}async doCopyFile(e,t,i,o){if(Go(e)&&Go(i))return this.doPipeBuffered(e,t,i,o);if(Go(e)&&Vr(i))return this.doPipeBufferedToUnbuffered(e,t,i,o);if(Vr(e)&&Go(i))return this.doPipeUnbufferedToBuffered(e,t,i,o);if(Vr(e)&&Vr(i))return this.doPipeUnbuffered(e,t,i,o)}async doCopyFolder(e,t,i,o){await i.mkdir(o),Array.isArray(t.children)&&await Ft.settled(t.children.map(async s=>{let a=this.getExtUri(i).providerExtUri.joinPath(o,s.name);return s.isDirectory?this.doCopyFolder(e,await this.resolve(s.resource),i,a):this.doCopyFile(e,s.resource,i,a)}))}async doValidateMoveCopy(e,t,i,o,s,a){let l=!1;if(e===i){let{providerExtUri:u,isPathCaseSensitive:p}=this.getExtUri(e);if(p||(l=u.isEqual(t,o)),l&&s==="copy")throw new Error(v(2088,null,this.resourceForError(t),this.resourceForError(o)));if(!l&&u.isEqualOrParent(o,t))throw new Error(v(2089,null,this.resourceForError(t),this.resourceForError(o)))}let c=await this.exists(o);if(c&&!l){if(!a)throw new mn(v(2090,null,this.resourceForError(t),this.resourceForError(o)),4);if(e===i){let{providerExtUri:u}=this.getExtUri(e);if(u.isEqualOrParent(t,o))throw new Error(v(2091,null,this.resourceForError(t),this.resourceForError(o)))}}return{exists:c,isSameResourceWithDifferentPathCase:l}}getExtUri(e){let t=this.isPathCaseSensitive(e);return{providerExtUri:t?Qe:nc,isPathCaseSensitive:t}}isPathCaseSensitive(e){return!!(e.capabilities&1024)}async createFolder(e){let t=this.throwIfFileSystemIsReadonly(await this.withProvider(e),e);await this.mkdirp(t,e);let i=await this.resolve(e,{resolveMetadata:!0});return this._onDidRunOperation.fire(new Vo(e,0,i)),i}async mkdirp(e,t){let i=[],{providerExtUri:o}=this.getExtUri(e);for(;!o.isEqual(t,o.dirname(t));)try{if(((await e.stat(t)).type&2)===0)throw new Error(v(2086,null,this.resourceForError(t)));break}catch(s){if(fm(s)!=="EntryNotFound")throw s;i.push(o.basename(t)),t=o.dirname(t)}for(let s=i.length-1;s>=0;s--){t=o.joinPath(t,i[s]);try{await e.mkdir(t)}catch(a){if(fm(a)!=="EntryExists")throw a}}}async canDelete(e,t){try{await this.doValidateDelete(e,t)}catch(i){return i}return!0}async doValidateDelete(e,t){let i=this.throwIfFileSystemIsReadonly(await this.withProvider(e),e),o=!!t?.useTrash;if(o&&!(i.capabilities&4096))throw new Error(v(2073,null,this.resourceForError(e)));let s=t?.atomic;if(s&&!(i.capabilities&65536))throw new Error(v(2069,null,this.resourceForError(e)));if(o&&s)throw new Error(v(2072,null,this.resourceForError(e)));let a;try{a=await i.stat(e)}catch{}if(a)this.throwIfFileIsReadonly(e,a);else throw new mn(v(2071,null,this.resourceForError(e)),1);if(!!!t?.recursive){let c=await this.resolve(e);if(c.isDirectory&&Array.isArray(c.children)&&c.children.length>0)throw new Error(v(2070,null,this.resourceForError(e)))}return i}async del(e,t){let i=await this.doValidateDelete(e,t),o=t;if(EO(i)&&!o?.atomic){let c=i.enforceAtomicDelete?.(e);c&&(o={...t,atomic:c})}let s=!!o?.useTrash,a=!!o?.recursive,l=o?.atomic??!1;await i.delete(e,{recursive:a,useTrash:s,atomic:l}),this._onDidRunOperation.fire(new Vo(e,1))}async cloneFile(e,t){let i=await this.withProvider(e),o=this.throwIfFileSystemIsReadonly(await this.withWriteProvider(t),t);if(!(i===o&&this.getExtUri(i).providerExtUri.isEqual(e,t)))return i===o&&Wh(i)?i.cloneFile(e,t):(await this.mkdirp(o,this.getExtUri(o).providerExtUri.dirname(t)),i===o&&mm(i)?this.writeQueue.queueFor(e,()=>i.copy(e,t,{overwrite:!0}),this.getExtUri(i).providerExtUri):this.writeQueue.queueFor(e,()=>this.doCopyFile(i,e,o,t),this.getExtUri(i).providerExtUri))}static{this.WATCHER_CORRELATION_IDS=0}createWatcher(e,t){return this.watch(e,{...t,correlationId:ma.WATCHER_CORRELATION_IDS++})}watch(e,t={recursive:!1,excludes:[]}){let i=new ue,o=!1,s=()=>{o=!0};i.add(oe(()=>s())),(async()=>{try{let l=await this.doWatch(e,t);o?At(l):s=()=>At(l)}catch(l){this.logService.error(l)}})();let a=t.correlationId;if(typeof a=="number"){let l=i.add(new C);return i.add(this.internalOnDidFilesChange.event(u=>{u.correlates(a)&&l.fire(u)})),{onDidChange:l.event,dispose:()=>i.dispose()}}return i}async doWatch(e,t){let i=await this.withProvider(e),o=wn([this.getExtUri(i).providerExtUri.getComparisonKey(e),t]),s=this.activeWatchers.get(o);return s||(s={count:0,disposable:i.watch(e,t)},this.activeWatchers.set(o,s)),s.count+=1,oe(()=>{s&&(s.count--,s.count===0&&(At(s.disposable),this.activeWatchers.delete(o)))})}dispose(){super.dispose();for(let[,e]of this.activeWatchers)At(e.disposable);this.activeWatchers.clear()}async doWriteBuffered(e,t,i,o){return this.writeQueue.queueFor(t,async()=>{let s=await e.open(t,{create:!0,unlock:i?.unlock??!1,append:i?.append??!1});try{Fp(o)||uh(o)?await this.doWriteStreamBufferedQueued(e,s,o):await this.doWriteReadableBufferedQueued(e,s,o)}catch(a){throw Ho(a)}finally{await e.close(s)}},this.getExtUri(e).providerExtUri)}async doWriteStreamBufferedQueued(e,t,i){let o=0,s;if(uh(i)){if(i.buffer.length>0){let a=ee.concat(i.buffer);await this.doWriteBuffer(e,t,a,a.byteLength,o,0),o+=a.byteLength}if(i.ended)return;s=i.stream}else s=i;return new Promise((a,l)=>{uc(s,{onData:async c=>{s.pause();try{await this.doWriteBuffer(e,t,c,c.byteLength,o,0)}catch(u){return l(u)}o+=c.byteLength,setTimeout(()=>s.resume())},onError:c=>l(c),onEnd:()=>a()})})}async doWriteReadableBufferedQueued(e,t,i){let o=0,s;for(;(s=i.read())!==null;)await this.doWriteBuffer(e,t,s,s.byteLength,o,0),o+=s.byteLength}async doWriteBuffer(e,t,i,o,s,a){let l=0;for(;l<o;){let c=await e.write(t,s+l,i.buffer,a+l,o-l);l+=c}}async doWriteUnbuffered(e,t,i,o){return this.writeQueue.queueFor(t,()=>this.doWriteUnbufferedQueued(e,t,i,o),this.getExtUri(e).providerExtUri)}async doWriteUnbufferedQueued(e,t,i,o){let s;o instanceof ee?s=o:Fp(o)?s=await Ra(o):uh(o)?s=await RD(o):s=CD(o),await e.writeFile(t,s.buffer,{create:!0,overwrite:!0,unlock:i?.unlock??!1,atomic:i?.atomic??!1,append:i?.append??!1})}async doPipeBuffered(e,t,i,o){return this.writeQueue.queueFor(o,()=>this.doPipeBufferedQueued(e,t,i,o),this.getExtUri(i).providerExtUri)}async doPipeBufferedQueued(e,t,i,o){let s,a;try{s=await e.open(t,{create:!1}),a=await i.open(o,{create:!0,unlock:!1});let l=ee.alloc(this.BUFFER_SIZE),c=0,u=0,p=0;do p=await e.read(s,c,l.buffer,u,l.byteLength-u),await this.doWriteBuffer(i,a,l,p,c,u),c+=p,u+=p,u===l.byteLength&&(u=0);while(p>0)}catch(l){throw Ho(l)}finally{await Ft.settled([typeof s=="number"?e.close(s):Promise.resolve(),typeof a=="number"?i.close(a):Promise.resolve()])}}async doPipeUnbuffered(e,t,i,o){return this.writeQueue.queueFor(o,()=>this.doPipeUnbufferedQueued(e,t,i,o),this.getExtUri(i).providerExtUri)}async doPipeUnbufferedQueued(e,t,i,o){return i.writeFile(o,await e.readFile(t),{create:!0,overwrite:!0,unlock:!1,atomic:!1})}async doPipeUnbufferedToBuffered(e,t,i,o){return this.writeQueue.queueFor(o,()=>this.doPipeUnbufferedToBufferedQueued(e,t,i,o),this.getExtUri(i).providerExtUri)}async doPipeUnbufferedToBufferedQueued(e,t,i,o){let s=await i.open(o,{create:!0,unlock:!1});try{let a=await e.readFile(t);await this.doWriteBuffer(i,s,ee.wrap(a),a.byteLength,0,0)}catch(a){throw Ho(a)}finally{await i.close(s)}}async doPipeBufferedToUnbuffered(e,t,i,o){let s=await Ra(this.readFileBuffered(e,t,Le.None));await this.doWriteUnbuffered(i,o,void 0,s)}throwIfFileSystemIsReadonly(e,t){if(e.capabilities&2048)throw new mn(v(2076,null,this.resourceForError(t)),6);return e}throwIfFileIsReadonly(e,t){if((t.permissions??0)&1)throw new mn(v(2076,null,this.resourceForError(e)),6)}resourceForError(e){return e.scheme===Y.file?e.fsPath:e.toString(!0)}};ma=D([S(0,z)],ma)});var m1,Yf,mW=_(()=>{m1=class{constructor(n,e){this.key=n;this.data=e;this.incoming=new Map;this.outgoing=new Map}},Yf=class{constructor(n){this._hashFn=n;this._nodes=new Map}roots(){let n=[];for(let e of this._nodes.values())e.outgoing.size===0&&n.push(e);return n}insertEdge(n,e){let t=this.lookupOrInsertNode(n),i=this.lookupOrInsertNode(e);t.outgoing.set(i.key,i),i.incoming.set(t.key,t)}removeNode(n){let e=this._hashFn(n);this._nodes.delete(e);for(let t of this._nodes.values())t.outgoing.delete(e),t.incoming.delete(e)}lookupOrInsertNode(n){let e=this._hashFn(n),t=this._nodes.get(e);return t||(t=new m1(e,n),this._nodes.set(e,t)),t}lookup(n){return this._nodes.get(this._hashFn(n))}isEmpty(){return this._nodes.size===0}toString(){let n=[];for(let[e,t]of this._nodes)n.push(`${e}
	(-> incoming)[${[...t.incoming.keys()].join(", ")}]
	(outgoing ->)[${[...t.outgoing.keys()].join(",")}]
`);return n.join(`
`)}findCycleSlow(){for(let[n,e]of this._nodes){let t=new Set([n]),i=this._findCycle(e,t);if(i)return i}}_findCycle(n,e){for(let[t,i]of n.outgoing){if(e.has(t))return[...e,t].join(" -> ");e.add(t);let o=this._findCycle(i,e);if(o)return o;e.delete(t)}}}});var q6,cy,dy,Qf,fW=_(()=>{Ce();rt();te();qm();mW();de();nv();mS();q6=!1,cy=class extends Error{constructor(n){super("cyclic dependency between services"),this.message=n.findCycleSlow()??`UNABLE to detect cycle, dumping graph: 
${n.toString()}`}},dy=class r{constructor(n=new zs,e=!1,t,i=q6){this._services=n;this._strict=e;this._parent=t;this._enableTracing=i;this._isDisposed=!1;this._servicesToMaybeDispose=new Set;this._children=new Set;this._activeInstantiations=new Set;this._services.set(rn,this),this._globalGraph=i?t?._globalGraph??new Yf(o=>o):void 0}dispose(){if(!this._isDisposed){this._isDisposed=!0,At(this._children),this._children.clear();for(let n of this._servicesToMaybeDispose)Mg(n)&&n.dispose();this._servicesToMaybeDispose.clear()}}_throwIfDisposed(){if(this._isDisposed)throw new Error("InstantiationService has been disposed")}createChild(n,e){this._throwIfDisposed();let t=this,i=new class extends r{dispose(){t._children.delete(i),super.dispose()}}(n,this._strict,this,this._enableTracing);return this._children.add(i),e?.add(i),i}invokeFunction(n,...e){this._throwIfDisposed();let t=Qf.traceInvocation(this._enableTracing,n),i=!1;try{return n({get:s=>{if(i)throw xg("service accessor is only valid during the invocation of its target method");let a=this._getOrCreateServiceInstance(s,t);return a||this._throwIfStrict(`[invokeFunction] unknown service '${s}'`,!1),a}},...e)}finally{i=!0,t.stop()}}createInstance(n,...e){this._throwIfDisposed();let t,i;return n instanceof ve?(t=Qf.traceCreation(this._enableTracing,n.ctor),i=this._createInstance(n.ctor,n.staticArguments.concat(e),t)):(t=Qf.traceCreation(this._enableTracing,n),i=this._createInstance(n,e,t)),t.stop(),i}_createInstance(n,e=[],t){let i=_i.getServiceDependencies(n).sort((a,l)=>a.index-l.index),o=[];for(let a of i){let l=this._getOrCreateServiceInstance(a.id,t);l||this._throwIfStrict(`[createInstance] ${n.name} depends on UNKNOWN service ${a.id}.`,!1),o.push(l)}let s=i.length>0?i[0].index:e.length;if(e.length!==s){console.trace(`[createInstance] First service dependency of ${n.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(n,e.concat(o))}_setCreatedServiceInstance(n,e){if(this._services.get(n)instanceof ve)this._services.set(n,e);else if(this._parent)this._parent._setCreatedServiceInstance(n,e);else throw new Error("illegalState - setting UNKNOWN service instance")}_getServiceInstanceOrDescriptor(n){let e=this._services.get(n);return!e&&this._parent?this._parent._getServiceInstanceOrDescriptor(n):e}_getOrCreateServiceInstance(n,e){this._globalGraph&&this._globalGraphImplicitDependency&&this._globalGraph.insertEdge(this._globalGraphImplicitDependency,String(n));let t=this._getServiceInstanceOrDescriptor(n);return t instanceof ve?this._safeCreateAndCacheServiceInstance(n,t,e.branch(n,!0)):(e.branch(n,!1),t)}_safeCreateAndCacheServiceInstance(n,e,t){if(this._activeInstantiations.has(n))throw new Error(`illegal state - RECURSIVELY instantiating service '${n}'`);this._activeInstantiations.add(n);try{return this._createAndCacheServiceInstance(n,e,t)}finally{this._activeInstantiations.delete(n)}}_createAndCacheServiceInstance(n,e,t){let i=new Yf(l=>l.id.toString()),o=0,s=[{id:n,desc:e,_trace:t}],a=new Set;for(;s.length;){let l=s.pop();if(!a.has(String(l.id))){if(a.add(String(l.id)),i.lookupOrInsertNode(l),o++>1e3)throw new cy(i);for(let c of _i.getServiceDependencies(l.desc.ctor)){let u=this._getServiceInstanceOrDescriptor(c.id);if(u||this._throwIfStrict(`[createInstance] ${n} depends on ${c.id} which is NOT registered.`,!0),this._globalGraph?.insertEdge(String(l.id),String(c.id)),u instanceof ve){let p={id:c.id,desc:u,_trace:l._trace.branch(c.id,!0)};i.insertEdge(l,p),s.push(p)}}}}for(;;){let l=i.roots();if(l.length===0){if(!i.isEmpty())throw new cy(i);break}for(let{data:c}of l){if(this._getServiceInstanceOrDescriptor(c.id)instanceof ve){let p=this._createServiceInstanceWithOwner(c.id,c.desc.ctor,c.desc.staticArguments,c.desc.supportsDelayedInstantiation,c._trace);this._setCreatedServiceInstance(c.id,p)}i.removeNode(c)}}return this._getServiceInstanceOrDescriptor(n)}_createServiceInstanceWithOwner(n,e,t=[],i,o){if(this._services.get(n)instanceof ve)return this._createServiceInstance(n,e,t,i,o,this._servicesToMaybeDispose);if(this._parent)return this._parent._createServiceInstanceWithOwner(n,e,t,i,o);throw new Error(`illegalState - creating UNKNOWN service instance ${e.name}`)}_createServiceInstance(n,e,t=[],i,o,s){if(i){let a=new r(void 0,this._strict,this,this._enableTracing);a._globalGraphImplicitDependency=String(n);let l=new Map,c=new Qg(()=>{let u=a._createInstance(e,t,o);for(let[p,m]of l){let h=u[p];if(typeof h=="function")for(let E of m)E.disposable=h.apply(u,E.listener)}return l.clear(),s.add(u),u});return new Proxy(Object.create(null),{get(u,p){if(!c.isInitialized&&typeof p=="string"&&(p.startsWith("onDid")||p.startsWith("onWill"))){let E=l.get(p);return E||(E=new Ql,l.set(p,E)),(P,T,k)=>{if(c.isInitialized)return c.value[p](P,T,k);{let U={listener:[P,T,k],disposable:void 0},O=E.push(U);return oe(()=>{O(),U.disposable?.dispose()})}}}if(p in u)return u[p];let m=c.value,h=m[p];return typeof h!="function"||(h=h.bind(m),u[p]=h),h},set(u,p,m){return c.value[p]=m,!0},getPrototypeOf(u){return e.prototype}})}else{let a=this._createInstance(e,t,o);return s.add(a),a}}_throwIfStrict(n,e){if(e&&console.warn(n),this._strict)throw new Error(n)}},Qf=class r{constructor(n,e){this.type=n;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(n,e){return n?new r(2,e.name||new Error().stack.split(`
`).slice(3,4).join(`
`)):r._None}static traceCreation(n,e){return n?new r(1,e.name):r._None}static{this._totals=0}branch(n,e){let t=new r(3,n.toString());return this._dep.push([n,e,t]),t}stop(){let n=Date.now()-this._start;r._totals+=n;let e=!1;function t(o,s){let a=[],l=new Array(o+1).join("	");for(let[c,u,p]of s._dep)if(u&&p){e=!0,a.push(`${l}CREATES -> ${c}`);let m=t(o+1,p);m&&a.push(m)}else a.push(`${l}uses -> ${c}`);return a.join(`
`)}let i=[`${this.type===1?"CREATE":"CALL"} ${this.name}`,`${t(1,this)}`,`DONE, took ${n.toFixed(2)}ms (grand total ${r._totals.toFixed(2)}ms)`];(n>2||e)&&r.all.add(i.join(`
`))}}});var uy,gW=_(()=>{te();me();uy=class extends Ma{constructor(e=um){super();this.buffer=[];this._logger=void 0;this._logLevelDisposable=this._register(new yn);this.setLevel(e)}set logger(e){this._logger=e,this.setLevel(e.getLevel()),this._logLevelDisposable.value=e.onDidChangeLogLevel(this.setLevel,this);for(let{level:t,message:i}of this.buffer)pm(e,t,i);this.buffer=[]}log(e,t){this._logger?pm(this._logger,e,t):this.getLevel()<=e&&this.buffer.push({level:e,message:t})}dispose(){this._logger?.dispose(),super.dispose()}flush(){this._logger?.flush()}}});import{session as K6}from"electron";var Ju,hW=_(()=>{te();at();Ne();ce();Ua();Ie();Xt();Ti();fr();me();Ci();Ju=class extends M{constructor(e,t,i){super();this.environmentService=e;this.logService=i;this.validRoots=gr.forPaths(!fe);this.validExtensions=new Set([".svg",".png",".jpg",".jpeg",".gif",".bmp",".webp",".mp4",".otf",".ttf"]);this.addValidFileRoot(e.appRoot),this.addValidFileRoot(e.extensionsPath),this.addValidFileRoot(t.defaultProfile.globalStorageHome.with({scheme:Y.file}).fsPath),this.addValidFileRoot(e.workspaceStorageHome.with({scheme:Y.file}).fsPath),this.handleProtocols()}handleProtocols(){let{defaultSession:e}=K6;e.protocol.registerFileProtocol(Y.vscodeFileResource,(t,i)=>this.handleResourceRequest(t,i)),e.protocol.interceptFileProtocol(Y.file,(t,i)=>this.handleFileRequest(t,i)),this._register(oe(()=>{e.protocol.unregisterProtocol(Y.vscodeFileResource),e.protocol.uninterceptProtocol(Y.file)}))}addValidFileRoot(e){let t=kt(e);return this.validRoots.get(t)?M.None:(this.validRoots.set(t,!0),oe(()=>this.validRoots.delete(t)))}handleFileRequest(e,t){let i=A.parse(e.url);return this.logService.error(`Refused to load resource ${i.fsPath} from ${Y.file}: protocol (original URL: ${e.url})`),t({error:-3})}handleResourceRequest(e,t){let i=this.requestToNormalizedFilePath(e),o=Pe(i),s;return this.environmentService.crossOriginIsolated&&(o==="workbench.html"||o==="workbench-dev.html"?s=tc.CoopAndCoep:s=tc.getHeadersFromQuery(e.url)),this.environmentService.isBuilt||(s={...s,...Ax}),(o==="workbench.html"||o==="workbench-dev.html")&&(s={...s,...Rx}),this.validRoots.findSubstr(i)?t({path:i,headers:s}):this.validExtensions.has(Vl(i).toLowerCase())?t({path:i,headers:s}):(this.logService.error(`${Y.vscodeFileResource}: Refused to load resource ${i} from ${Y.vscodeFileResource}: protocol (original URL: ${e.url})`),t({error:-3}))}requestToNormalizedFilePath(e){let t=A.parse(e.url),i=gt.uriToFileUri(t);return kt(i.fsPath)}createIPCObjectUrl(){let e,t=A.from({scheme:"vscode",path:Me()}),i=t.toString(),o=async()=>e;return Tt.handle(i,o),this.logService.trace(`IPC Object URL: Registered new channel ${i}.`),{resource:t,update:s=>e=s,dispose:()=>{this.logService.trace(`IPC Object URL: Removed channel ${i}.`),Tt.removeHandler(i)}}}};Ju=D([S(0,kn),S(1,zn),S(2,z)],Ju)});function vW(r){return!!r.forwardPort}function j6(r){if(r.scheme!=="http"&&r.scheme!=="https")return;let n=/^(localhost|127\.0\.0\.1|0\.0\.0\.0):(\d+)$/.exec(r.authority);if(n)return{address:n[1],port:+n[2]}}function py(r){return f1.indexOf(r)>=0}function Ku(r){return g1.indexOf(r)>=0}function EW(r,n,e,t){if(e===1)return!1;if(e===2&&Ku(n)){let i=/(\d+)\.(\d+)\.(\d+)/g.exec(t);if(i?.length===4&&parseInt(i[1])>=18)return!1}return r<1024}var IW,UWe,f1,g1,qu,h1=_(()=>{ae();te();ce();Ie();_t();de();me();IW=V("tunnelService"),UWe=V("sharedTunnelsService");f1=["localhost","127.0.0.1","0:0:0:0:0:0:0:1","::1"];g1=["0.0.0.0","0:0:0:0:0:0:0:0","::"];qu=class extends M{constructor(e,t){super();this.logService=e;this.configurationService=t;this._onTunnelOpened=this._register(new C);this.onTunnelOpened=this._onTunnelOpened.event;this._onTunnelClosed=this._register(new C);this.onTunnelClosed=this._onTunnelClosed.event;this._onAddedTunnelProvider=this._register(new C);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=[],t=Array.from(this._tunnels.values());for(let i of t){let o=Array.from(i.values());for(let s of o){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:t}of e.values())await t.then(i=>typeof i!="string"?i?.dispose():void 0);e.clear()}this._tunnels.clear()}setEnvironmentTunnel(e,t,i,o,s){this.addTunnelToMap(e,t,Promise.resolve({tunnelRemoteHost:e,tunnelRemotePort:t,localAddress:i,privacy:o,protocol:s,dispose:()=>Promise.resolve()}))}async getExistingTunnel(e,t){(Ku(e)||py(e))&&(e=f1[0]);let i=this.getTunnelFromMap(e,t);if(i)return++i.refcount,i.value}openTunnel(e,t,i,o,s,a=!1,l,c){this.logService.trace(`ForwardedPorts: (TunnelService) openTunnel request for ${t}:${i} on local port ${s}.`);let u=this._tunnelProvider??e;if(!u)return;if(t||(t="localhost"),o||(o=this.defaultTunnelHost),this._tunnelProvider&&this._factoryInProgress.has(i)){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 p=this.retainOrCreateTunnel(u,t,i,o,s,a,l,c);return p?p.then(m=>{if(m){if(typeof m=="string")return this.logService.trace("ForwardedPorts: (TunnelService) The tunnel provider returned an error when creating the tunnel."),this.removeEmptyOrErrorTunnelFromMap(t,i),m}else{this.logService.trace("ForwardedPorts: (TunnelService) New tunnel is undefined."),this.removeEmptyOrErrorTunnelFromMap(t,i);return}this.logService.trace("ForwardedPorts: (TunnelService) New tunnel established.");let h=this.makeTunnel(m);return(m.tunnelRemoteHost!==t||m.tunnelRemotePort!==i)&&this.logService.warn("ForwardedPorts: (TunnelService) Created tunnel does not match requirements of requested tunnel. Host or port mismatch."),l&&m.privacy!==l&&this.logService.warn("ForwardedPorts: (TunnelService) Created tunnel does not match requirements of requested tunnel. Privacy mismatch."),this._onTunnelOpened.fire(h),h}):(this.logService.trace("ForwardedPorts: (TunnelService) Tunnel was not created."),p)}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 t=this._tunnels.get(e.tunnelRemoteHost);if(t){let i=t.get(e.tunnelRemotePort);i&&(i.refcount--,await this.tryDisposeTunnel(e.tunnelRemoteHost,e.tunnelRemotePort,i))}}}}async tryDisposeTunnel(e,t,i){if(i.refcount<=0){this.logService.trace(`ForwardedPorts: (TunnelService) Tunnel is being disposed ${e}:${t}.`);let o=i.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(t),o}}async closeTunnel(e,t){this.logService.trace(`ForwardedPorts: (TunnelService) close request for ${e}:${t} `);let i=this._tunnels.get(e);if(i&&i.has(t)){let o=i.get(t);o.refcount=0,await this.tryDisposeTunnel(e,t,o)}}addTunnelToMap(e,t,i){this._tunnels.has(e)||this._tunnels.set(e,new Map),this._tunnels.get(e).set(t,{refcount:1,value:i})}async removeEmptyOrErrorTunnelFromMap(e,t){let i=this._tunnels.get(e);if(i){let o=i.get(t),s=o?await o.value:void 0;(!s||typeof s=="string")&&i.delete(t),i.size===0&&this._tunnels.delete(e)}}getTunnelFromMap(e,t){let i=[e];py(e)?(i.push(...f1),i.push(...g1)):Ku(e)&&i.push(...g1);let o=i.map(s=>this._tunnels.get(s));for(let s of o){let a=s?.get(t);if(a)return a}}canTunnel(e){return!!j6(e)}createWithProvider(e,t,i,o,s,a,l){this.logService.trace(`ForwardedPorts: (TunnelService) Creating tunnel with provider ${t}:${i} on local port ${o}.`);let c=i;this._factoryInProgress.add(c);let u=o===void 0?i:o,p={elevationRequired:s?this.isPortPrivileged(u):!1},m={remoteAddress:{host:t,port:i},localAddressPort:o,privacy:a,public:a?a!=="private":void 0,protocol:l},h=e.forwardPort(m,p);return h?(this.addTunnelToMap(t,i,h),h.finally(()=>{this.logService.trace("ForwardedPorts: (TunnelService) Tunnel created by provider."),this._factoryInProgress.delete(c)})):this._factoryInProgress.delete(c),h}};qu=D([S(0,z),S(1,Ae)],qu)});var GWe,ju,yW=_(()=>{rt();de();GWe=V("remoteAuthorityResolverService"),ju=class r extends Ar{static isNotAvailable(n){return n instanceof r&&n._code==="NotAvailable"}static isTemporarilyNotAvailable(n){return n instanceof r&&n._code==="TemporarilyNotAvailable"}static isNoResolverFound(n){return n instanceof r&&n._code==="NoResolverFound"}static isInvalidAuthority(n){return n instanceof r&&n._code==="InvalidAuthority"}static isHandled(n){return n instanceof r&&n.isHandled}constructor(n,e="Unknown",t){super(n),this._message=n,this._code=e,this._detail=t,this.isHandled=e==="NotAvailable"&&t===!0,Object.setPrototypeOf(this,r.prototype)}}});function v1(r){switch(r){case 1:return"Management";case 2:return"ExtensionHost";case 3:return"Tunnel"}}function _W(r){let n=new st;return setTimeout(()=>n.cancel(),r),n.token}function Y6(r,n){if(r.isCancellationRequested||n.isCancellationRequested)return Le.Cancelled;let e=new st;return r.onCancellationRequested(()=>e.cancel()),n.onCancellationRequested(()=>e.cancel()),e.token}function Q6(r,n){let e=new $f(n);return e.registerDisposable(r.onControlMessage(t=>{let i=JSON.parse(t.toString()),o=tV(i);o?e.reject(o):e.resolve(i)})),e.promise}function X6(r,n,e,t,i,o,s,a){let l=new $f(a),c=Rr.create(!1);return r.info(`Creating a socket (${s})...`),tt(`code/willCreateSocket/${o}`),n.connect(e,t,i,s).then(u=>{l.didTimeout?(tt(`code/didCreateSocketError/${o}`),r.info(`Creating a socket (${s}) finished after ${c.elapsed()} ms, but this is too late and has timed out already.`),u?.dispose()):(tt(`code/didCreateSocketOK/${o}`),r.info(`Creating a socket (${s}) was successful after ${c.elapsed()} ms.`),l.resolve(u))},u=>{tt(`code/didCreateSocketError/${o}`),r.info(`Creating a socket (${s}) returned an error after ${c.elapsed()} ms.`),r.error(u),l.reject(u)}),l.promise}function I1(r,n){let e=new $f(n);return r.then(t=>{e.didTimeout||e.resolve(t)},t=>{e.didTimeout||e.reject(t)}),e.promise}async function $6(r,n,e,t){let i=PW(r,n);r.logService.trace(`${i} 1/6. invoking socketFactory.connect().`);let o;try{o=await X6(r.logService,r.remoteSocketFactoryService,r.connectTo,OS.getServerRootPath(),`reconnectionToken=${r.reconnectionToken}&reconnection=${r.reconnectionProtocol?"true":"false"}`,v1(n),`renderer-${v1(n)}-${r.reconnectionToken}`,t)}catch(u){throw r.logService.error(`${i} socketFactory.connect() failed or timed out. Error:`),r.logService.error(u),u}r.logService.trace(`${i} 2/6. socketFactory.connect() was successful.`);let s,a;r.reconnectionProtocol?(r.reconnectionProtocol.beginAcceptReconnection(o,null),s=r.reconnectionProtocol,a=!1):(s=new hh({socket:o}),a=!0),r.logService.trace(`${i} 3/6. sending AuthRequest control message.`);let l=await I1(r.signService.createNewMessage(Me()),t),c={type:"auth",auth:r.connectionToken||"00000000000000000000",data:l.data};s.sendControl(ee.fromString(JSON.stringify(c)));try{let u=await Q6(s,Y6(t,_W(1e4)));if(u.type!=="sign"||typeof u.data!="string"){let E=new Error("Unexpected handshake message");throw E.code="VSCODE_CONNECTION_ERROR",E}if(r.logService.trace(`${i} 4/6. received SignRequest control message.`),!await I1(r.signService.validate(l,u.signedData),t)){let E=new Error("Refused to connect to unsupported server");throw E.code="VSCODE_CONNECTION_ERROR",E}let m=await I1(r.signService.sign(u.data),t),h={type:"connectionType",commit:r.commit,signedData:m,desiredConnectionType:n};return e&&(h.args=e),r.logService.trace(`${i} 5/6. sending ConnectionTypeRequest control message.`),s.sendControl(ee.fromString(JSON.stringify(h))),{protocol:s,ownsProtocol:a}}catch(u){throw u&&u.code==="ETIMEDOUT"&&(r.logService.error(`${i} the handshake timed out. Error:`),r.logService.error(u)),u&&u.code==="VSCODE_CONNECTION_ERROR"&&(r.logService.error(`${i} received error control message when negotiating connection. Error:`),r.logService.error(u)),a&&TW(s),u}}async function Z6(r,n,e){let t=Date.now(),i=PW(r,3),{protocol:o}=await $6(r,3,n,e);return r.logService.trace(`${i} 6/6. handshake finished, connection is up and running after ${oV(t)}!`),o}async function wW(r,n,e){let{connectTo:t,connectionToken:i}=await r.addressProvider.getAddress();return{commit:r.commit,quality:r.quality,connectTo:t,connectionToken:i,reconnectionToken:n,reconnectionProtocol:e,remoteSocketFactoryService:r.remoteSocketFactoryService,signService:r.signService,logService:r.logService}}async function bW(r,n,e){let t=await wW(r,Me(),null);return await Z6(t,{host:n,port:e},Le.None)}function eV(r){return Si(n=>new Promise((e,t)=>{let i=setTimeout(e,r*1e3);n.onCancellationRequested(()=>{clearTimeout(i),e()})}))}function TW(r){try{r.acceptDisconnect();let n=r.getSocket();r.dispose(),n.dispose()}catch(n){vt(n)}}function tV(r){if(r&&r.type==="error"){let n=new Error(`Connection error: ${r.reason}`);return n.code="VSCODE_CONNECTION_ERROR",n}return null}function nV(r,n){return typeof r!="number"||!isFinite(r)||r<0?n:r>Number.MAX_SAFE_INTEGER?Number.MAX_SAFE_INTEGER:Math.floor(r)}function rV(r,n){for(;r.length<n;)r+=" ";return r}function iV(r,n){return`[remote-connection][${rV(v1(r),13)}][${n.substr(0,5)}\u2026]`}function Xf(r,n,e){return`${iV(r,n)}[${e?"reconnect":"initial"}]`}function PW(r,n){return`${Xf(n,r.reconnectionToken,!!r.reconnectionProtocol)}[${r.connectTo}]`}function oV(r){return`${Date.now()-r} ms`}var z6,$f,E1,y1,S1,my,_1,SW,CW=_(()=>{Ce();Et();Bt();rt();ae();te();at();Bi();Sa();Xt();r_();yW();z6=30*1e3;$f=class{get didTimeout(){return this._state==="timedout"}constructor(n){this._state="pending",this._disposables=new ue,{promise:this.promise,resolve:this._resolvePromise,reject:this._rejectPromise}=Fx(),n.isCancellationRequested?this._timeout():this._disposables.add(n.onCancellationRequested(()=>this._timeout()))}registerDisposable(n){this._state==="pending"?this._disposables.add(n):n.dispose()}_timeout(){this._state==="pending"&&(this._disposables.dispose(),this._state="timedout",this._rejectPromise(this._createTimeoutError()))}_createTimeoutError(){let n=new Error("Time limit reached");return n.code="ETIMEDOUT",n.syscall="connect",n}resolve(n){this._state==="pending"&&(this._disposables.dispose(),this._state="resolved",this._resolvePromise(n))}reject(n){this._state==="pending"&&(this._disposables.dispose(),this._state="rejected",this._rejectPromise(n))}};E1=class{constructor(n,e){this.reconnectionToken=n;this.millisSinceLastIncomingData=e;this.type=0}},y1=class{constructor(n,e,t,i){this.reconnectionToken=n;this.millisSinceLastIncomingData=e;this.durationSeconds=t;this.cancellableTimer=i;this.type=1}skipWait(){this.cancellableTimer.cancel()}},S1=class{constructor(n,e,t){this.reconnectionToken=n;this.millisSinceLastIncomingData=e;this.attempt=t;this.type=2}},my=class{constructor(n,e,t){this.reconnectionToken=n;this.millisSinceLastIncomingData=e;this.attempt=t;this.type=4}},_1=class{constructor(n,e,t,i){this.reconnectionToken=n;this.millisSinceLastIncomingData=e;this.attempt=t;this.handled=i;this.type=3}},SW=class r extends M{constructor(e,t,i,o,s){super();this._connectionType=e;this._options=t;this.reconnectionToken=i;this.protocol=o;this._reconnectionFailureIsFatal=s;this._onDidStateChange=this._register(new C);this.onDidStateChange=this._onDidStateChange.event;this._permanentFailure=!1;this._isReconnecting=!1;this._isDisposed=!1;this._reconnectionGraceTime=108e5;this._onDidStateChange.fire(new my(this.reconnectionToken,0,0)),this._register(o.onSocketClose(a=>{let l=Xf(this._connectionType,this.reconnectionToken,!0);a?a.type===0?(this._options.logService.info(`${l} received socket close event (hadError: ${a.hadError}).`),a.error&&this._options.logService.error(a.error)):(this._options.logService.info(`${l} received socket close event (wasClean: ${a.wasClean}, code: ${a.code}, reason: ${a.reason}).`),a.event&&this._options.logService.error(a.event)):this._options.logService.info(`${l} received socket close event.`),this._beginReconnecting()})),this._register(o.onSocketTimeout(a=>{let l=Xf(this._connectionType,this.reconnectionToken,!0);this._options.logService.info(`${l} received socket timeout event (unacknowledgedMsgCount: ${a.unacknowledgedMsgCount}, timeSinceOldestUnacknowledgedMsg: ${a.timeSinceOldestUnacknowledgedMsg}, timeSinceLastReceivedSomeData: ${a.timeSinceLastReceivedSomeData}).`),this._beginReconnecting()})),r._instances.push(this),this._register(oe(()=>{let a=r._instances.indexOf(this);a>=0&&r._instances.splice(a,1)})),this._isPermanentFailure&&this._gotoPermanentFailure(r._permanentFailureMillisSinceLastIncomingData,r._permanentFailureAttempt,r._permanentFailureHandled)}static triggerPermanentFailure(e,t,i){this._permanentFailure=!0,this._permanentFailureMillisSinceLastIncomingData=e,this._permanentFailureAttempt=t,this._permanentFailureHandled=i,this._instances.forEach(o=>o._gotoPermanentFailure(this._permanentFailureMillisSinceLastIncomingData,this._permanentFailureAttempt,this._permanentFailureHandled))}static debugTriggerReconnection(){this._instances.forEach(e=>e._beginReconnecting())}static debugPauseSocketWriting(){this._instances.forEach(e=>e._pauseSocketWriting())}static{this._permanentFailure=!1}static{this._permanentFailureMillisSinceLastIncomingData=0}static{this._permanentFailureAttempt=0}static{this._permanentFailureHandled=!1}static{this._instances=[]}get _isPermanentFailure(){return this._permanentFailure||r._permanentFailure}updateGraceTime(e){let t=nV(e,108e5),i=Xf(this._connectionType,this.reconnectionToken,!1);this._options.logService.trace(`${i} Applying reconnection grace time: ${t}ms (${Math.floor(t/1e3)}s)`),this._reconnectionGraceTime=t}dispose(){super.dispose(),this._isDisposed=!0}async _beginReconnecting(){if(!this._isReconnecting)try{this._isReconnecting=!0,await this._runReconnectingLoop()}finally{this._isReconnecting=!1}}async _runReconnectingLoop(){if(this._isPermanentFailure||this._isDisposed)return;let e=Xf(this._connectionType,this.reconnectionToken,!0);this._options.logService.info(`${e} starting reconnecting loop. You can get more information with the trace log level.`),this._onDidStateChange.fire(new E1(this.reconnectionToken,this.protocol.getMillisSinceLastIncomingData()));let t=[0,5,5,10,10,10,10,10,30],i=this._reconnectionGraceTime;if(this._options.logService.info(`${e} starting reconnection with grace time: ${i}ms (${Math.floor(i/1e3)}s)`),i<=0){this._options.logService.error(`${e} reconnection grace time is set to 0ms, will not attempt to reconnect.`),this._onReconnectionPermanentFailure(this.protocol.getMillisSinceLastIncomingData(),0,!1);return}let o=Date.now(),s=-1;do{s++;let a=s<t.length?t[s]:t[t.length-1];try{if(a>0){let c=eV(a);this._onDidStateChange.fire(new y1(this.reconnectionToken,this.protocol.getMillisSinceLastIncomingData(),a,c)),this._options.logService.info(`${e} waiting for ${a} seconds before reconnecting...`);try{await c}catch{}}if(this._isPermanentFailure){this._options.logService.error(`${e} permanent failure occurred while running the reconnecting loop.`);break}this._onDidStateChange.fire(new S1(this.reconnectionToken,this.protocol.getMillisSinceLastIncomingData(),s+1)),this._options.logService.info(`${e} resolving connection...`);let l=await wW(this._options,this.reconnectionToken,this.protocol);this._options.logService.info(`${e} connecting to ${l.connectTo}...`),await this._reconnect(l,_W(z6)),this._options.logService.info(`${e} reconnected!`),this._onDidStateChange.fire(new my(this.reconnectionToken,this.protocol.getMillisSinceLastIncomingData(),s+1));break}catch(l){if(l.code==="VSCODE_CONNECTION_ERROR"){this._options.logService.error(`${e} A permanent error occurred in the reconnecting loop! Will give up now! Error:`),this._options.logService.error(l),this._onReconnectionPermanentFailure(this.protocol.getMillisSinceLastIncomingData(),s+1,!1);break}if(Date.now()-o>=i){let c=Math.round(i/1e3);this._options.logService.error(`${e} An error occurred while reconnecting, but it will be treated as a permanent error because the reconnection grace time (${c}s) has expired! Will give up now! Error:`),this._options.logService.error(l),this._onReconnectionPermanentFailure(this.protocol.getMillisSinceLastIncomingData(),s+1,!1);break}if(ju.isTemporarilyNotAvailable(l)){this._options.logService.info(`${e} A temporarily not available error occurred while trying to reconnect, will try again...`),this._options.logService.trace(l);continue}if((l.code==="ETIMEDOUT"||l.code==="ENETUNREACH"||l.code==="ECONNREFUSED"||l.code==="ECONNRESET")&&l.syscall==="connect"){this._options.logService.info(`${e} A network error occurred while trying to reconnect, will try again...`),this._options.logService.trace(l);continue}if(mp(l)){this._options.logService.info(`${e} A promise cancelation error occurred while trying to reconnect, will try again...`),this._options.logService.trace(l);continue}if(l instanceof ju){this._options.logService.error(`${e} A RemoteAuthorityResolverError occurred while trying to reconnect. Will give up now! Error:`),this._options.logService.error(l),this._onReconnectionPermanentFailure(this.protocol.getMillisSinceLastIncomingData(),s+1,ju.isHandled(l));break}this._options.logService.error(`${e} An unknown error occurred while trying to reconnect, since this is an unknown case, it will be treated as a permanent error! Will give up now! Error:`),this._options.logService.error(l),this._onReconnectionPermanentFailure(this.protocol.getMillisSinceLastIncomingData(),s+1,!1);break}}while(!this._isPermanentFailure&&!this._isDisposed)}_onReconnectionPermanentFailure(e,t,i){this._reconnectionFailureIsFatal?r.triggerPermanentFailure(e,t,i):this._gotoPermanentFailure(e,t,i)}_gotoPermanentFailure(e,t,i){this._onDidStateChange.fire(new _1(this.reconnectionToken,e,t,i)),TW(this.protocol)}_pauseSocketWriting(){this.protocol.pauseSocketWriting()}}});var fy,AW=_(()=>{te();de();fy=V("remoteSocketFactoryService")});import*as RW from"net";import*as xW from"os";async function sV(r,n,e,t,i){let o;for(let s=3;s&&(o?.dispose(),o=await new w1(r,n,e,t,i).waitForReady(),!(i&&nb[i]||!nb[o.tunnelLocalPort]));s--);return o}var w1,Zf,Nl,gy,DW=_(()=>{ib();yc();Ce();te();ce();_t();me();In();CW();AW();vv();h1();Et();w1=class extends M{constructor(e,t,i,o,s){super();this.defaultTunnelHost=t;this.suggestedLocalPort=s;this.privacy="private";this._socketsDispose=new Map;this._options=e,this._server=RW.createServer(),this._barrier=new Qi,this._listeningListener=()=>this._barrier.open(),this._server.on("listening",this._listeningListener),this._connectionListener=a=>this._onConnection(a),this._server.on("connection",this._connectionListener),this._errorListener=()=>{},this._server.on("error",this._errorListener),this.tunnelRemotePort=o,this.tunnelRemoteHost=i}async dispose(){super.dispose(),this._server.removeListener("listening",this._listeningListener),this._server.removeListener("connection",this._connectionListener),this._server.removeListener("error",this._errorListener),this._server.close(),Array.from(this._socketsDispose.values()).forEach(t=>{t()})}async waitForReady(){let e=this.suggestedLocalPort??this.tunnelRemotePort,t=Ku(this.defaultTunnelHost)?"0.0.0.0":"127.0.0.1",i=await rb(e,2,1e3,t),o=null;return this._server.listen(i,this.defaultTunnelHost),await this._barrier.wait(),o=this._server.address(),o||(i=0,this._server.listen(i,this.defaultTunnelHost),await this._barrier.wait(),o=this._server.address()),this.tunnelLocalPort=o.port,this.localAddress=`${this.tunnelRemoteHost==="127.0.0.1"?"127.0.0.1":"localhost"}:${o.port}`,this}async _onConnection(e){e.pause();let t=py(this.tunnelRemoteHost)||Ku(this.tunnelRemoteHost)?"localhost":this.tunnelRemoteHost,i=await bW(this._options,t,this.tunnelRemotePort),o=i.getSocket(),s=i.readEntireBuffer();i.dispose(),s.byteLength>0&&e.write(s.buffer),e.on("end",()=>{e.localAddress&&this._socketsDispose.delete(e.localAddress),o.end()}),e.on("close",()=>o.end()),e.on("error",()=>{e.localAddress&&this._socketsDispose.delete(e.localAddress),o instanceof Fo?o.socket.destroy():o.end()}),o instanceof Fo?this._mirrorNodeSocket(e,o):this._mirrorGenericSocket(e,o),e.localAddress&&this._socketsDispose.set(e.localAddress,()=>{e.end(),o.end()})}_mirrorGenericSocket(e,t){t.onClose(()=>e.destroy()),t.onEnd(()=>e.end()),t.onData(i=>e.write(i.buffer)),e.on("data",i=>t.write(ee.wrap(i))),e.resume()}_mirrorNodeSocket(e,t){let i=t.socket;i.on("end",()=>e.end()),i.on("close",()=>e.end()),i.on("error",()=>{e.destroy()}),i.pipe(e),e.pipe(i)}},Zf=class extends qu{constructor(e,t,i,o,s){super(t,s);this.remoteSocketFactoryService=e;this.signService=i;this.productService=o}isPortPrivileged(e){return EW(e,this.defaultTunnelHost,Yt,xW.release())}retainOrCreateTunnel(e,t,i,o,s,a,l,c){let u=this.getTunnelFromMap(t,i);if(u)return++u.refcount,u.value;if(vW(e))return this.createWithProvider(e,t,i,s,a,l,c);{this.logService.trace(`ForwardedPorts: (TunnelService) Creating tunnel without provider ${t}:${i} on local port ${s}.`);let p={commit:this.productService.commit,quality:this.productService.quality,addressProvider:e,remoteSocketFactoryService:this.remoteSocketFactoryService,signService:this.signService,logService:this.logService,ipcLogger:null},m=sV(p,o,t,i,s);return this.logService.trace("ForwardedPorts: (TunnelService) Tunnel created without provider."),this.addTunnelToMap(t,i,m),m}}};Zf=D([S(0,fy),S(1,z),S(2,ta),S(3,He),S(4,Ae)],Zf);Nl=class extends Zf{constructor(n,e,t,i,o){super(n,e,t,i,o)}};Nl=D([S(0,fy),S(1,z),S(2,ta),S(3,He),S(4,Ae)],Nl);gy=class extends M{constructor(e,t,i,o,s){super();this.remoteSocketFactoryService=e;this.logService=t;this.productService=i;this.signService=o;this.configurationService=s;this._tunnelServices=new Map}async openTunnel(e,t,i,o,s,a,l,c,u){if(this.logService.trace(`ForwardedPorts: (SharedTunnelService) openTunnel request for ${i}:${o} on local port ${a}.`),!this._tunnelServices.has(e)){let p=new Nl(this.remoteSocketFactoryService,this.logService,this.signService,this.productService,this.configurationService);this._register(p),this._tunnelServices.set(e,p),p.onTunnelClosed(async()=>{(await p.tunnels).length===0&&(p.dispose(),this._tunnelServices.delete(e))})}return this._tunnelServices.get(e).openTunnel(t,i,o,s,a,l,c,u)}};gy=D([S(0,fy),S(1,z),S(2,He),S(3,ta),S(4,Ae)],gy)});import{parse as OW}from"url";function aV(r,n){return r.protocol==="http:"?n.HTTP_PROXY||n.http_proxy||null:r.protocol==="https:"&&(n.HTTPS_PROXY||n.https_proxy||n.HTTP_PROXY||n.http_proxy)||null}async function kW(r,n,e={}){let t=OW(r),i=e.proxyUrl||aV(t,n);if(!i)return null;let o=OW(i);if(!/^https?:$/.test(o.protocol||""))return null;let s={host:o.hostname||"",port:(o.port?+o.port:0)||(o.protocol==="https"?443:80),auth:o.auth,rejectUnauthorized:Ng(e.strictSSL)?e.strictSSL:!0};if(t.protocol==="http:"){let{default:a}=await import("http-proxy-agent");return new a.HttpProxyAgent(i,s)}else{let{default:a}=await import("https-proxy-agent");return new a.HttpsProxyAgent(i,s)}}var NW=_(()=>{qe()});import{parse as LW}from"url";import{createGunzip as lV}from"zlib";function uV(r){if(r instanceof Error){let n=r.code;return!!n&&cV.has(n)}return!1}async function pV(r,n,e,t){let i=await import("kerberos"),o=i.default||i,s=new URL(r),a=n||(process.platform==="win32"?`HTTP/${s.hostname}`:`HTTP@${s.hostname}`);return e.debug(`${t} Kerberos authentication lookup`,`proxyURL:${s}`,`spn:${a}`),(await o.initializeClient(a)).step("")}async function mV(r){return(LW(r.url).protocol==="https:"?await import("https"):await import("http")).request}async function MW(r,n){let t,i=dV.test(r.type||"GET");for(let o=1;o<=3;o++)try{return await fV(r,n)}catch(s){if(t=s,s instanceof Gt||!i||!uV(s)||o===3)throw s;await bt(100*o,n)}throw t}async function fV(r,n){return Ft.withAsyncBody(async(e,t)=>{let i=LW(r.url),o=r.getRawRequest?r.getRawRequest(r):await mV(r),s={hostname:i.hostname,port:i.port?parseInt(i.port):i.protocol==="https:"?443:80,protocol:i.protocol,path:i.path,method:r.type||"GET",headers:r.headers,agent:r.agent,rejectUnauthorized:Ng(r.strictSSL)?r.strictSSL:!0};r.user&&r.password&&(s.auth=r.user+":"+r.password),r.disableCache&&(s.cache="no-store");let a=o(s,c=>{let u=Ii(r.followRedirects)?r.followRedirects:3;if(c.statusCode&&c.statusCode>=300&&c.statusCode<400&&u>0&&c.headers.location)MW({...r,url:c.headers.location,followRedirects:u-1},n).then(e,t);else{let p=c;!r.isChromiumNetwork&&c.headers["content-encoding"]==="gzip"&&(p=c.pipe(lV())),e({res:c,stream:xD(p)})}});if(a.on("error",t),r.timeout)if(r.isChromiumNetwork){let c=setTimeout(()=>{a.abort(),t(new Error(`Request timeout after ${r.timeout}ms`))},r.timeout);a.on("response",()=>clearTimeout(c)),a.on("error",()=>clearTimeout(c)),a.on("abort",()=>clearTimeout(c))}else a.setTimeout(r.timeout);r.isChromiumNetwork&&a.removeHeader("Content-Length"),r.data&&typeof r.data=="string"&&a.write(r.data),a.end();let l=n.onCancellationRequested(()=>{l.dispose(),a.abort(),t(new Gt)});a.on("response",()=>l.dispose()),a.on("error",()=>l.dispose())})}var cV,dV,zu,UW=_(()=>{Ce();Et();rt();qe();_t();fr();NI();me();Ys();NW();cV=new Set(["EAI_AGAIN","ECONNREFUSED","EHOSTDOWN","EHOSTUNREACH","ENETDOWN","ENETUNREACH","EPROTO"]),dV=/^(GET|HEAD|OPTIONS)$/i;zu=class extends sv{constructor(e,t,i,o){super(o);this.machine=e;this.configurationService=t;this.environmentService=i;this.configure(),this._register(t.onDidChangeConfiguration(s=>{s.affectsConfiguration("http")&&this.configure()}))}configure(){this.proxyUrl=this.getConfigValue("http.proxy"),this.strictSSL=!!this.getConfigValue("http.proxyStrictSSL"),this.authorization=this.getConfigValue("http.proxyAuthorization")}async request(e,t){let{proxyUrl:i,strictSSL:o}=this,s;try{s=await sd(this.configurationService,this.logService,this.environmentService.args,process.env)}catch(c){this.shellEnvErrorLogged||(this.shellEnvErrorLogged=!0,this.logService.error("resolving shell environment failed",cn(c)))}let a={...process.env,...s},l=e.agent?e.agent:await kW(e.url||"",a,{proxyUrl:i,strictSSL:o});return e.agent=l,e.strictSSL=o,this.authorization&&(e.headers={...e.headers||{},"Proxy-Authorization":this.authorization}),this.logAndRequest(e,()=>MW(e,t))}async resolveProxy(e){}async lookupAuthorization(e){}async lookupKerberosAuthorization(e){try{let t=this.getConfigValue("http.proxyKerberosServicePrincipal");return"Negotiate "+await pV(e,t,this.logService,"RequestService#lookupKerberosAuthorization")}catch(t){this.logService.debug("RequestService#lookupKerberosAuthorization Kerberos authentication failed",t);return}}async loadCertificates(){return(await import("@vscode/proxy-agent")).loadSystemCertificates({loadSystemCertificatesFromNode:()=>this.getConfigValue("http.systemCertificatesNode",cb),log:this.logService})}getConfigValue(e,t){if(this.machine==="remote")return this.configurationService.getValue(e);let i=this.configurationService.inspect(e);return i.userLocalValue??i.defaultValue??t}};zu=D([S(1,Ae),S(2,kn),S(3,z)],zu)});import{net as gV}from"electron";function hV(r){return gV.request}var Yu,FW=_(()=>{UW();_t();fr();me();Yu=class extends zu{constructor(n,e,t){super("local",n,e,t)}request(n,e){return super.request({...n||{},getRawRequest:hV,isChromiumNetwork:!0},e)}};Yu=D([S(0,Ae),S(1,kn),S(2,z)],Yu)});function hy(r,n,e){n instanceof ve||(n=new ve(n,[],!!e)),IV.push([r,n])}var IV,b1=_(()=>{qm();IV=[]});import{app as WW,webContents as EV}from"electron";import{cpus as BW}from"os";var eg,VW=_(()=>{Fv();b1();eg=class{buildWebContentsLookup(){let n=new Map,e=new Map;for(let t of EV.getAllWebContents()){let i=t,o=typeof i.getOSProcessId=="function"?i.getOSProcessId():0,s=typeof i.getProcessId=="function"?i.getProcessId():0;o&&n.set(o,t),s&&e.set(s,t)}return{wcByPid:n,wcByInternalId:e}}async resolveMemoryMB(n,e,t){let i=n.memory,o=i?.privateBytes??i?.workingSetSize??0;if(o>0)return o/1024;let s=e.get(n.pid)??t.get(n.id??0);if(s){let a=s;if(typeof a.getProcessMemoryInfo=="function")try{let l=await a.getProcessMemoryInfo(),c=l?.private??l?.residentSet??0;if(c>0)return c/1024}catch{}}return-1}async getRendererProcessInfo(){try{let n=WW.getAppMetrics().filter(i=>i.type==="Tab"),{wcByPid:e,wcByInternalId:t}=this.buildWebContentsLookup();return await Promise.all(n.map(async i=>{let o=i.cpu?.percentCPUUsage*BW().length||0,s=await this.resolveMemoryMB(i,e,t);return{pid:i.pid,cpuPercent:o,memoryMB:s}}))}catch(n){return console.error("Failed to get renderer process stats:",n),[]}}async getAllProcessInfo(){try{let n=WW.getAppMetrics(),{wcByPid:e,wcByInternalId:t}=this.buildWebContentsLookup();return await Promise.all(n.map(async i=>{let o=i.cpu?.percentCPUUsage*BW().length||0,s=await this.resolveMemoryMB(i,e,t);return{pid:i.pid,cpuPercent:o,memoryMB:s,type:i.type||"Unknown"}}))}catch(n){return console.error("Failed to get all process stats:",n),[]}}};hy(Ud,eg,1)});var Iy,GW=_(()=>{Iy=class r{constructor(){this.validators=new Map}static{this._nextId=1}async createNewMessage(n){try{let e=await this.getValidator();if(e){let t=String(r._nextId++);return this.validators.set(t,e),{id:t,data:e.createNewMessage(n)}}}catch{}return{id:"",data:n}}async validate(n,e){if(!n.id)return!0;let t=this.validators.get(n.id);if(!t)return!1;this.validators.delete(n.id);try{return t.validate(e)==="ok"}catch{return!1}finally{t.dispose?.()}}async sign(n){try{return await this.signValue(n)}catch{}return n}}});var vy,HW=_(()=>{GW();vy=class extends Iy{getValidator(){return this.vsda().then(n=>new n.validator)}signValue(n){return this.vsda().then(e=>new e.signer().sign(n))}async vsda(){let n="vsda",{default:e}=await import(n);return e}}});var Ll,JW=_(()=>{Di();Ce();te();me();Ll=class extends ol{constructor(e,t){super();this.logService=e;this.productName=t;this.throttler=this._register(new bp);this.watcher=this._register(new yn)}async _updatePolicyDefinitions(e){this.logService.trace(`NativePolicyService#_updatePolicyDefinitions - Found ${Object.keys(e).length} policy definitions`);let{createWatcher:t}=await import("@vscode/policy-watcher");await this.throttler.queue(()=>new Promise((i,o)=>{try{this.watcher.value=t(this.productName,e,s=>{this._onDidPolicyChange(s),i()})}catch(s){this.logService.error("NativePolicyService#_updatePolicyDefinitions - Error creating watcher:",s),o(s)}}))}_onDidPolicyChange(e){this.logService.trace(`NativePolicyService#_onDidPolicyChange - Updated policy values: ${JSON.stringify(e)}`);for(let t in e){let i=e[t];i===void 0?this.policies.delete(t):this.policies.set(t,i)}this._onDidChange.fire(Object.keys(e))}};Ll=D([S(0,z)],Ll)});function yV(r,n){let e=[];for(let t of new Set(ji.concat(r.keys(),n.keys())))r.get(t)!==n.get(t)&&e.push(t);return e}var Ml,qW=_(()=>{Ce();ae();gp();qe();ct();me();Di();Ml=class extends ol{constructor(e,t,i){super();this.file=e;this.fileService=t;this.logService=i;this.throttledDelayer=this._register(new Jn(500));let o=x.filter(t.onDidFilesChange,s=>s.affects(e));this._register(t.watch(e)),this._register(o(()=>this.throttledDelayer.trigger(()=>this.refresh())))}async _updatePolicyDefinitions(){await this.refresh()}async read(){let e=new Map;try{let t=await this.fileService.readFile(this.file),i=JSON.parse(t.value.toString());if(!ut(i))throw new Error("Policy file isn't a JSON object");for(let o of Object.keys(i))this.policyDefinitions[o]&&e.set(o,i[o])}catch(t){t.fileOperationResult!==1&&this.logService.error("[FilePolicyService] Failed to read policies",t)}return e}async refresh(){let e=await this.read(),t=yV(this.policies,e);this.policies=e,t.length>0&&this._onDidChange.fire(t)}};Ml=D([S(1,Be),S(2,z)],Ml)});var Ey,Ul,KW=_(()=>{Pi();Ie();b1();ct();Ut();ae();te();dn();Ey=class r{constructor(n){this.uri=n;this.time=r._clock++}static{this._clock=0}touch(){return this.time=r._clock++,this}},Ul=class{constructor(n){this._fileService=n;this._dispooables=new ue;this._limit=2**16;let e=new Map,t=i=>{let o=e.get(i.scheme);return o===void 0&&(o=n.hasProvider(i)&&!this._fileService.hasCapability(i,1024),e.set(i.scheme,o)),o};this._dispooables.add(x.any(n.onDidChangeFileSystemProviderRegistrations,n.onDidChangeFileSystemProviderCapabilities)(i=>{if(e.get(i.scheme)===void 0)return;e.delete(i.scheme);let s=t(A.from({scheme:i.scheme}));if(s!==s)for(let[a,l]of this._canonicalUris.entries())l.uri.scheme===i.scheme&&this._canonicalUris.delete(a)})),this.extUri=new Ta(t),this._canonicalUris=new Map}dispose(){this._dispooables.dispose(),this._canonicalUris.clear()}asCanonicalUri(n){this._fileService.hasProvider(n)&&(n=qg(n));let e=this.extUri.getComparisonKey(n,!0),t=this._canonicalUris.get(e);return t?t.touch().uri.with({fragment:n.fragment}):(this._canonicalUris.set(e,new Ey(n)),this._checkTrim(),n)}_checkTrim(){if(this._canonicalUris.size<this._limit)return;Ey._clock=1;let n=[...this._canonicalUris.values()].map(t=>t.time),e=Dg(Math.floor(n.length/2),n,(t,i)=>t-i);for(let[t,i]of this._canonicalUris.entries())i.time<=e?this._canonicalUris.delete(t):i.time=0}};Ul=D([S(0,Be)],Ul);hy(jt,Ul,1)});var yy,jW=_(()=>{te();me();yy=class extends M{constructor(n,e=[]){super(),this.logger=new Lh([n,...e]),this._register(n.onDidChangeLogLevel(t=>this.setLevel(t)))}get onDidChangeLogLevel(){return this.logger.onDidChangeLogLevel}setLevel(n){this.logger.setLevel(n)}getLevel(){return this.logger.getLevel()}trace(n,...e){this.logger.trace(n,...e)}debug(n,...e){this.logger.debug(n,...e)}info(n,...e){this.logger.info(n,...e)}warn(n,...e){this.logger.warn(n,...e)}error(n,...e){this.logger.error(n,...e)}flush(){this.logger.flush()}}});var Sy,zW=_(()=>{ae();te();ct();Ua();er();Sy=class extends M{constructor(e,t,i,o,s,a){super();this.fileSystemScheme=e;this.fileSystemProvider=t;this.userDataScheme=i;this.userDataProfilesService=o;this.uriIdentityService=s;this.logService=a;this.capabilities=this.fileSystemProvider.capabilities,this.onDidChangeCapabilities=this.fileSystemProvider.onDidChangeCapabilities,this._onDidChangeFile=this._register(new C),this.onDidChangeFile=this._onDidChangeFile.event,this.watchResources=gr.forUris(()=>!(this.capabilities&1024)),this.atomicReadWriteResources=new ql(l=>this.uriIdentityService.extUri.getComparisonKey(this.toFileSystemResource(l))),this.updateAtomicReadWritesResources(),this._register(o.onDidChangeProfiles(()=>this.updateAtomicReadWritesResources())),this._register(this.fileSystemProvider.onDidChangeFile(l=>this.handleFileChanges(l)))}updateAtomicReadWritesResources(){this.atomicReadWriteResources.clear();for(let e of this.userDataProfilesService.profiles)this.atomicReadWriteResources.add(e.settingsResource),this.atomicReadWriteResources.add(e.keybindingsResource),this.atomicReadWriteResources.add(e.tasksResource),this.atomicReadWriteResources.add(e.extensionsResource)}open(e,t){return this.fileSystemProvider.open(this.toFileSystemResource(e),t)}close(e){return this.fileSystemProvider.close(e)}read(e,t,i,o,s){return this.fileSystemProvider.read(e,t,i,o,s)}write(e,t,i,o,s){return this.fileSystemProvider.write(e,t,i,o,s)}watch(e,t){this.watchResources.set(e,e);let i=this.fileSystemProvider.watch(this.toFileSystemResource(e),t);return oe(()=>{this.watchResources.delete(e),i.dispose()})}stat(e){return this.fileSystemProvider.stat(this.toFileSystemResource(e))}mkdir(e){return this.fileSystemProvider.mkdir(this.toFileSystemResource(e))}rename(e,t,i){return this.fileSystemProvider.rename(this.toFileSystemResource(e),this.toFileSystemResource(t),i)}readFile(e,t){return this.fileSystemProvider.readFile(this.toFileSystemResource(e),t)}readFileStream(e,t,i){return this.fileSystemProvider.readFileStream(this.toFileSystemResource(e),t,i)}readdir(e){return this.fileSystemProvider.readdir(this.toFileSystemResource(e))}enforceAtomicReadFile(e){return this.atomicReadWriteResources.has(e)}writeFile(e,t,i){return this.fileSystemProvider.writeFile(this.toFileSystemResource(e),t,i)}enforceAtomicWriteFile(e){return this.atomicReadWriteResources.has(e)?{postfix:".vsctmp"}:!1}delete(e,t){return this.fileSystemProvider.delete(this.toFileSystemResource(e),t)}copy(e,t,i){if(mm(this.fileSystemProvider))return this.fileSystemProvider.copy(this.toFileSystemResource(e),this.toFileSystemResource(t),i);throw new Error("copy not supported")}cloneFile(e,t){if(Wh(this.fileSystemProvider))return this.fileSystemProvider.cloneFile(this.toFileSystemResource(e),this.toFileSystemResource(t));throw new Error("clone not supported")}handleFileChanges(e){let t=[];for(let i of e){if(i.resource.scheme!==this.fileSystemScheme)continue;let o=this.toUserDataResource(i.resource);this.watchResources.findSubstr(o)&&t.push({resource:o,type:i.type,cId:i.cId})}t.length&&(this.logService.debug("User data changed"),this._onDidChangeFile.fire(t))}toFileSystemResource(e){return e.with({scheme:this.fileSystemScheme})}toUserDataResource(e){return e.with({scheme:this.userDataScheme})}}});var YW=_(()=>{});import sr from"electron";var SV,_V,wV,bV,QW,XW,$W,ZW,Sr,_r,eB=_(()=>{ae();te();ce();_t();vr();YW();dn();zt();me();SV="#FFFFFF",_V="#1F1F1F",wV="#000000",bV="#FFFFFF",QW="theme",XW="themeBackground",$W="windowSplash",ZW="windowSplashWorkspaceOverride",Sr=class{constructor(n,e){this.key=n;this.defaultValue=e}getValue(n){return n.getValue(this.key)??this.defaultValue}};(o=>(o.DETECT_COLOR_SCHEME=new o("window.autoDetectColorScheme",!1),o.DETECT_HC=new o("window.autoDetectHighContrast",!0),o.SYSTEM_COLOR_THEME=new o("window.systemColorTheme","default"),o.AUXILIARYBAR_DEFAULT_VISIBILITY=new o("workbench.secondarySideBar.defaultVisibility","visibleInWorkspace"),o.STARTUP_EDITOR=new o("workbench.startupEditor","welcomePage")))(Sr||={});_r=class extends M{constructor(e,t,i){super();this.stateService=e;this.configurationService=t;this.logService=i;this._onDidChangeColorScheme=this._register(new C);this.onDidChangeColorScheme=this._onDidChangeColorScheme.event;fe||this._register(this.configurationService.onDidChangeConfiguration(o=>{(o.affectsConfiguration(Sr.SYSTEM_COLOR_THEME.key)||o.affectsConfiguration(Sr.DETECT_COLOR_SCHEME.key))&&(this.updateSystemColorTheme(),this.logThemeSettings())})),this.updateSystemColorTheme(),this.logThemeSettings(),this._register(x.fromNodeEventEmitter(sr.nativeTheme,"updated")(()=>{this.logThemeSettings(),this._onDidChangeColorScheme.fire(this.getColorScheme())}))}static{this.DEFAULT_BAR_WIDTH=300}static{this.WORKSPACE_OVERRIDE_LIMIT=50}logThemeSettings(){if(this.logService.getLevel()>=2){let e=i=>`${i.key}=${i.getValue(this.configurationService)}`;this.logService.debug(`[theme main service] ${e(Sr.DETECT_COLOR_SCHEME)}, ${e(Sr.DETECT_HC)}, ${e(Sr.SYSTEM_COLOR_THEME)}`);let t=i=>`${String(i)}=${sr.nativeTheme[i]}`;this.logService.debug(`[theme main service] electron.nativeTheme: ${t("themeSource")}, ${t("shouldUseDarkColors")}, ${t("shouldUseHighContrastColors")}, ${t("shouldUseInvertedColorScheme")}, ${t("shouldUseDarkColorsForSystemIntegratedUI")}	`),this.logService.debug(`[theme main service] New color scheme: ${JSON.stringify(this.getColorScheme())}`)}}updateSystemColorTheme(){if(fe||Sr.DETECT_COLOR_SCHEME.getValue(this.configurationService))sr.nativeTheme.themeSource="system";else switch(Sr.SYSTEM_COLOR_THEME.getValue(this.configurationService)){case"dark":sr.nativeTheme.themeSource="dark";break;case"light":sr.nativeTheme.themeSource="light";break;case"auto":switch(this.getPreferredBaseTheme()??this.getStoredBaseTheme()){case"vs":sr.nativeTheme.themeSource="light";break;case"vs-dark":sr.nativeTheme.themeSource="dark";break;default:sr.nativeTheme.themeSource="system"}break;default:sr.nativeTheme.themeSource="system";break}}getColorScheme(){if(q){if(sr.nativeTheme.shouldUseHighContrastColors)return{dark:sr.nativeTheme.shouldUseInvertedColorScheme,highContrast:!0}}else if($){if(sr.nativeTheme.shouldUseInvertedColorScheme||sr.nativeTheme.shouldUseHighContrastColors)return{dark:sr.nativeTheme.shouldUseDarkColors,highContrast:!0}}else if(fe&&sr.nativeTheme.shouldUseHighContrastColors)return{dark:!0,highContrast:!0};return{dark:sr.nativeTheme.shouldUseDarkColors,highContrast:!1}}getPreferredBaseTheme(){let e=this.getColorScheme();if(Sr.DETECT_HC.getValue(this.configurationService)&&e.highContrast)return e.dark?"hc-black":"hc-light";if(Sr.DETECT_COLOR_SCHEME.getValue(this.configurationService))return e.dark?"vs-dark":"vs"}getBackgroundColor(){let e=this.getPreferredBaseTheme(),t=this.getStoredBaseTheme();if(e===void 0||e===t){let i=this.stateService.getItem(XW,null);if(i)return i}switch(e??t){case"vs":return SV;case"hc-black":return wV;case"hc-light":return bV;default:return _V}}getStoredBaseTheme(){switch(this.stateService.getItem(QW,"vs-dark").split(" ")[0]){case"vs":return"vs";case"hc-black":return"hc-black";case"hc-light":return"hc-light";default:return"vs-dark"}}saveWindowSplash(e,t,i){let o=this.updateWindowSplashOverride(t,i);this.stateService.setItems(wt([{key:QW,data:i.baseTheme},{key:XW,data:i.colorInfo.background},{key:$W,data:i},o?{key:ZW,data:o}:void 0])),typeof e=="number"&&this.updateBackgroundColor(e,i),this.updateSystemColorTheme()}updateWindowSplashOverride(e,t){let i,o=!1;return e&&(i={...this.getWindowSplashOverride()},o=this.doUpdateWindowSplashOverride(e,t,i,"sideBar"),o=this.doUpdateWindowSplashOverride(e,t,i,"auxiliaryBar")||o),o?i:void 0}doUpdateWindowSplashOverride(e,t,i,o){let s=o==="sideBar"?t.layoutInfo?.sideBarWidth:t.layoutInfo?.auxiliaryBarWidth,a=o==="sideBar"?i.layoutInfo.sideBarWidth:i.layoutInfo.auxiliaryBarWidth,l=!1;if(typeof s!="number")return i.layoutInfo.workspaces[e.id]&&(delete i.layoutInfo.workspaces[e.id],l=!0),l;let c=i.layoutInfo.workspaces[e.id];if(!c){let u=Object.keys(i.layoutInfo.workspaces);u.length>=_r.WORKSPACE_OVERRIDE_LIMIT&&(delete i.layoutInfo.workspaces[u[0]],l=!0),c={sideBarVisible:!1,auxiliaryBarVisible:!1},i.layoutInfo.workspaces[e.id]=c,l=!0}if(s>0)switch(a!==s&&(i.layoutInfo[o==="sideBar"?"sideBarWidth":"auxiliaryBarWidth"]=s,l=!0),o){case"sideBar":c.sideBarVisible||(c.sideBarVisible=!0,l=!0);break;case"auxiliaryBar":c.auxiliaryBarVisible||(c.auxiliaryBarVisible=!0,l=!0);break}else switch(o){case"sideBar":c.sideBarVisible&&(c.sideBarVisible=!1,l=!0);break;case"auxiliaryBar":c.auxiliaryBarVisible&&(c.auxiliaryBarVisible=!1,l=!0);break}return l}updateBackgroundColor(e,t){for(let i of ao())if(i.id===e){i.setBackgroundColor(t.colorInfo.background);break}}getWindowSplash(e){try{return this.doGetWindowSplash(e)}catch(t){this.logService.error("[theme main service] Failed to get window splash",t);return}}doGetWindowSplash(e){let t=this.stateService.getItem($W);if(!t?.layoutInfo)return t;let i=this.getWindowSplashOverride(),o;e?i.layoutInfo.workspaces[e.id]?.sideBarVisible===!1?o=0:o=i.layoutInfo.sideBarWidth||t.layoutInfo.sideBarWidth||_r.DEFAULT_BAR_WIDTH:o=0;let s=Sr.AUXILIARYBAR_DEFAULT_VISIBILITY.getValue(this.configurationService),a=Sr.STARTUP_EDITOR.getValue(this.configurationService),l;if(e){let c=i.layoutInfo.workspaces[e.id]?.auxiliaryBarVisible;c===!0?l=i.layoutInfo.auxiliaryBarWidth||t.layoutInfo.auxiliaryBarWidth||_r.DEFAULT_BAR_WIDTH:c===!1?l=0:a!=="agentSessionsWelcomePage"&&(s==="visible"||s==="visibleInWorkspace")?l=i.layoutInfo.auxiliaryBarWidth||t.layoutInfo.auxiliaryBarWidth||_r.DEFAULT_BAR_WIDTH:a!=="agentSessionsWelcomePage"&&(s==="maximized"||s==="maximizedInWorkspace")?l=Number.MAX_SAFE_INTEGER:l=0}else l=0;return{...t,layoutInfo:{...t.layoutInfo,sideBarWidth:o,auxiliaryBarWidth:l}}}getWindowSplashOverride(){let e=this.stateService.getItem(ZW);return e?.layoutInfo||(e={layoutInfo:{sideBarWidth:_r.DEFAULT_BAR_WIDTH,auxiliaryBarWidth:_r.DEFAULT_BAR_WIDTH,workspaces:{}}}),e.layoutInfo.sideBarWidth||(e.layoutInfo.sideBarWidth=_r.DEFAULT_BAR_WIDTH),e.layoutInfo.auxiliaryBarWidth||(e.layoutInfo.auxiliaryBarWidth=_r.DEFAULT_BAR_WIDTH),e.layoutInfo.workspaces||(e.layoutInfo.workspaces={}),e}};_r=D([S(0,Rt),S(1,Ae),S(2,z)],_r)});var AV={};import{app as TV,dialog as PV}from"electron";import{unlinkSync as CV,promises as tB}from"fs";var T1,nB=_(()=>{mD();hD();Ie();dn();Ce();_s();rt();xr();ae();Uo();at();Ne();Bi();ce();gi();Sn();pn();Zi();yc();rW();We();_t();sW();cW();$t();rd();uW();ct();pW();$I();qm();fW();nv();Vt();gW();me();kp();In();Cv();hW();h1();DW();Ys();FW();Fv();VW();vv();HW();vr();ea();kc();Us();Di();JW();qW();te();Pi();KW();vd();jW();$_();B_();zW();ac();eB();Dp();T1=class{main(){try{this.startup()}catch(n){console.error(n.message),TV.exit(1)}}async startup(){Rg(c=>console.error(c));let[n,e,t,i,o,s,a,l]=this.createServices();try{try{await this.initServices(t,l,i,o,a)}catch(c){throw this.handleStartupDataDirError(t,a,c),c}await n.invokeFunction(async c=>{let u=c.get(z),p=c.get(Te),m=c.get(Be),h=c.get(Rs),E=await this.claimInstance(u,t,p,n,a,!0);if(re.writeFile(t.mainLockfile,String(process.pid)).catch(P=>{u.warn(`app#startup(): Error writing main lockfile: ${P.stack}`)}),s.logger=h.createLogger("main",{name:v(167,null)}),x.once(p.onWillShutdown)(P=>{m.dispose(),i.dispose(),P.join("instanceLockfile",tB.unlink(t.mainLockfile).catch(()=>{}))}),await this.checkInnoSetupMutex(a)){let P=`${a.nameShort} is currently being updated. Please wait for the update to complete before launching.`;n.invokeFunction(this.quit,new Error(P));return}return n.createInstance(ua,E,e).startup()})}catch(c){n.invokeFunction(this.quit,c)}}createServices(){let n=new zs,e=new ue;process.once("exit",()=>e.dispose());let t={_serviceBrand:void 0,...qn};n.set(He,t);let i=new Br(this.resolveArgs(),t),o=this.patchEnvironment(i);n.set(Fe,i);let s=new fv(hO(i),i.logsHome);n.set(fo,s);let a=new uy(s.getLogLevel()),l=e.add(new yy(a,[new Nh(s.getLogLevel())]));n.set(z,l);let c=new ma(l);n.set(Be,c);let u=new js(l);c.registerProvider(Y.file,u);let p=new Ul(c);n.set(jt,p);let m=new Fc(1,i,l,c);n.set(Yh,m),n.set(Rt,m);let h=new Wc(m,p,i,c,l);n.set(rr,h),c.registerProvider(Y.vscodeUserData,new Sy(Y.file,u,Y.vscodeUserData,h,p,l));let E;q&&t.win32RegValueName?E=e.add(new Ll(l,t.win32RegValueName)):$&&t.darwinBundleIdentifier?E=e.add(new Ll(l,t.darwinBundleIdentifier)):fe?E=e.add(new Ml(A.file(eD),c,l)):i.policyFile?E=e.add(new Ml(i.policyFile,c,l)):E=new Id,n.set(oi,E);let y=new ly(h.defaultProfile.settingsResource,c,E,l);return n.set(Ae,y),n.set(Te,new ve(lo,void 0,!1)),n.set(ii,new ve(Yu,void 0,!0)),n.set(so,new ve(_r)),n.set(ta,new ve(vy,void 0,!1)),n.set(IW,new ve(Nl)),n.set(Ud,new ve(eg,void 0,!0)),n.set(Pd,new Ju(i,h,l)),[new dy(n,!0),o,i,y,m,a,t,h]}patchEnvironment(n){let e={VSCODE_IPC_HOOK:n.mainIPCHandle};return["VSCODE_NLS_CONFIG","VSCODE_PORTABLE"].forEach(t=>{let i=process.env[t];typeof i=="string"&&(e[t]=i)}),Object.assign(process.env,e),e}async initServices(n,e,t,i,o){await Ft.settled([Promise.all([this.allowWindowsUNCPath(n.extensionsPath),n.codeCachePath,n.logsHome.with({scheme:Y.file}).fsPath,e.defaultProfile.globalStorageHome.with({scheme:Y.file}).fsPath,n.workspaceStorageHome.with({scheme:Y.file}).fsPath,n.localHistoryHome.with({scheme:Y.file}).fsPath,n.backupHome].map(s=>s?tB.mkdir(s,{recursive:!0}):void 0)),i.init(),t.initialize()]),e.init()}allowWindowsUNCPath(n){if(q){let e=eh(n);e&&No(e)}return n}async claimInstance(n,e,t,i,o,s){let a;try{tt("code/willStartMainServer"),a=await GD(e.mainIPCHandle),tt("code/didStartMainServer"),x.once(t.onWillShutdown)(()=>a.dispose())}catch(l){if(l.code!=="EADDRINUSE")throw this.handleStartupDataDirError(e,o,l),l;let c;try{c=await HD(e.mainIPCHandle,"main")}catch(h){if(!s||q||h.code!=="ECONNREFUSED")throw h.code==="EPERM"&&this.showStartupWarningDialog(v(168,null,o.nameShort),v(169,null),o),h;try{CV(e.mainIPCHandle)}catch(E){throw n.warn("Could not delete obsolete instance handle",E),E}return this.claimInstance(n,e,t,i,o,!1)}if(e.extensionTestsLocationURI&&!e.debugExtensionHost.break){let h=`Running extension tests from the command line is currently only supported if no other instance of ${o.nameShort} is running.`;throw n.error(h),c.dispose(),new Error(h)}let u;!e.args.wait&&!e.args.status&&(u=setTimeout(()=>{this.showStartupWarningDialog(v(170,null,o.nameShort),v(171,null),o)},1e4));let p=it.toService(c.getChannel("launch"),{disableMarshalling:!0}),m=it.toService(c.getChannel("diagnostics"),{disableMarshalling:!0});if(e.args.status)return i.invokeFunction(async()=>{let h=new Hu(Zs,o),E=await m.getMainDiagnostics(),y=await m.getRemoteDiagnostics({includeProcesses:!0,includeWorkspaceMetadata:!0}),P=await h.getDiagnostics(E,y);throw console.log(P),new Gl});throw q&&await this.windowsAllowSetForegroundWindow(p,n),n.trace("Sending env to running instance..."),await p.start(e.args,process.env),c.dispose(),u&&clearTimeout(u),new Gl("Sent env to running instance. Terminating...")}if(e.args.status)throw console.log(v(174,null,o.nameShort)),new Gl("Terminating...");return process.env.VSCODE_PID=String(process.pid),a}handleStartupDataDirError(n,e,t){if(t.code==="EACCES"||t.code==="EPERM"){let i=wt([n.userDataPath,n.extensionsPath,Ih]).map(o=>Mo(A.file(o),{os:Yt,tildify:n}));this.showStartupWarningDialog(v(172,null),v(173,null,Kn(t),i.join(`
`)),e)}}showStartupWarningDialog(n,e,t){PV.showMessageBoxSync(vI({type:"warning",buttons:[v(166,null)],message:n,detail:e},t).options)}async windowsAllowSetForegroundWindow(n,e){if(q){let t=await n.getMainProcessId();e.trace("Sending some foreground love to the running instance:",t);try{(await import("windows-foreground-love")).allowSetForegroundWindow(t)}catch(i){e.error(i)}}}quit(n,e){let t=n.get(z),i=n.get(Te),o=0;e&&(e.isExpected?e.message&&t.trace(e.message):(o=1,e.stack?t.error(e.stack):t.error(`Startup error: ${e.toString()}`))),i.kill(o)}async checkInnoSetupMutex(n){if(!(q&&n.win32MutexName&&n.win32VersionedUpdate))return!1;try{let e=`${n.win32MutexName}-updating`;return(await import("@vscode/windows-mutex")).isActive(e)}catch(e){return console.error("Failed to check Inno Setup mutex:",e),!1}}resolveArgs(){let n=this.validatePaths(x0(process.argv));if(n.wait&&!n.waitMarkerFilePath){let e=dW(n.verbose);e&&(D0(process.argv,"--waitMarkerFilePath",e),n.waitMarkerFilePath=e)}return n}validatePaths(n){if(n["open-url"]&&(n._urls=n._,n._=[]),!n.remote){let e=this.doValidatePaths(n._,n.goto);n._=e}return n}doValidatePaths(n,e){let t=Fr(),i=n.map(a=>{let l=String(a),c;e&&(c=Zl(l),l=c.path),l&&(l=this.preparePath(t,l));let u=Gg(l,t),p=Pe(u);return p&&!Sx(p)?null:e&&c?(c.path=u,this.toPath(c)):u}),o=q||$,s=Zn(i,a=>a&&o?a.toLowerCase():a||"");return wt(s)}preparePath(n,e){return q&&(e=Ei(e,'"')),e=yS(yS(e," "),"	"),q&&(e=Nt(n,e),e=Ei(e,".")),e}toPath(n){let e=[n.path];return typeof n.line=="number"&&e.push(String(n.line)),typeof n.column=="number"&&e.push(String(n.column)),e.join(":")}};gD()||new T1().main()});import*as ui from"node:path";import*as pi from"original-fs";import*as iB from"node:os";import{performance as RV}from"node:perf_hooks";import*as Vn from"node:path";import*as Ry from"node:fs";import{createRequire as gB}from"node:module";var eG=gB(import.meta.url),tG=process.platform==="win32";Error.stackTraceLimit=100;if(!process.env.VSCODE_HANDLES_SIGPIPE){let r=!1;process.on("SIGPIPE",()=>{r||(r=!0,console.error(new Error("Unexpected SIGPIPE")))})}function hB(){try{typeof process.env.VSCODE_CWD!="string"&&(process.env.VSCODE_CWD=process.cwd()),process.platform==="win32"&&process.chdir(Vn.dirname(process.execPath))}catch(r){console.error(r)}}hB();function N1(r){let n=Vn.dirname(import.meta.dirname);function e(){return process.env.VSCODE_DEV?n:process.platform==="darwin"?Vn.dirname(Vn.dirname(Vn.dirname(n))):process.platform==="win32"&&r.win32VersionedUpdate?Vn.dirname(Vn.dirname(Vn.dirname(n))):Vn.dirname(Vn.dirname(n))}function t(){if(process.env.VSCODE_PORTABLE)return process.env.VSCODE_PORTABLE;if(process.platform==="win32"||process.platform==="linux")return Vn.join(e(),"data");let l=r.portable||`${r.applicationName}-portable-data`;return Vn.join(Vn.dirname(e()),l)}let i=t(),o=!("target"in r)&&Ry.existsSync(i),s=Vn.join(i,"tmp"),a=o&&Ry.existsSync(s);return o?process.env.VSCODE_PORTABLE=i:delete process.env.VSCODE_PORTABLE,a&&(process.platform==="win32"?(process.env.TMP=s,process.env.TEMP=s):process.env.TMPDIR=s),{portableDataPath:i,isPortable:o}}import*as ag from"node:fs";import{register as yB}from"node:module";import{createRequire as IB}from"node:module";var tp=IB(import.meta.url),ga={BUILD_INSERT_PRODUCT_CONFIGURATION:"BUILD_INSERT_PRODUCT_CONFIGURATION"};ga.BUILD_INSERT_PRODUCT_CONFIGURATION&&(ga=tp("../product.json"));var np={"name":"Devin","version":"1.110.1","distro":"d89d49b77ba5f8bdfdfe3b039067e7da38e25640","author":{"name":"Exafunction, Inc."},"main":"./out/main.js","type":"module","private":true,"engines":{"node":"22.22.0"},"engineStrict":true,"scripts":{"test":"echo Please run any of the test scripts from the scripts folder.","test-browser":"npx playwright install && node test/unit/browser/index.js","test-browser-no-install":"node test/unit/browser/index.js","test-node":"mocha test/unit/node/index.js --delay --ui=tdd --timeout=30000 --exit","test-extension":"vscode-test","test-build-scripts":"cd build && npm run test","check-cyclic-dependencies":"node build/lib/checkCyclicDependencies.ts out","preinstall":"node build/npm/preinstall.ts","postinstall":"patch-package && node build/npm/postinstall.ts","prepare-exa":"cd .. && pnpm install --frozen-lockfile && pnpm build:windsurf-deps && cd windsurf && npm run generate-ls-version && npm run protoc && npm run copy-chat-client && npm run copy-windsurf-acp","copy-chat-client":"node ../exa/chat_client/scripts/copy-to-windsurf.js","copy-windsurf-acp":"node ../exa/windsurf_acp/scripts/copy-to-windsurf.js","port-protos":"node -e \"require('fs').cpSync('./extensions/windsurf/src/generated', 'src/vs/base/common/generated', {recursive: true})\"","protoc":"buf generate .. --path ../exa/language_server_pb/language_server.proto --path ../exa/product_analytics_pb/product_analytics.proto --path ../exa/cascade_plugins_pb/cascade_plugins.proto --path ../exa/seat_management_pb/seat_management.proto --path ../exa/extension_server_pb/extension_server.proto --path ../exa/browser_preview_pb/browser_preview.proto --path ../exa/codeium_common_pb/codeium_common.proto --path ../exa/chat_client_server_pb/chat_client_server.proto --path ../exa/dev_pb/dev.proto --include-imports --disable-symlinks","setup-dev":"npm install && npm run prepare-exa && bash build_windsurf/download_fd_and_devin_cli.sh","compile":"npm run gulp compile","compile-check-ts-native":"tsgo --project ./src/tsconfig.json --noEmit --skipLibCheck","watch":"npm-run-all2 -lp watch-client-transpile watch-client watch-extensions watch-theme-windsurf","watchd":"deemon npm run watch","watch-webd":"deemon npm run watch-web","kill-watchd":"deemon --kill npm run watch","kill-watch-webd":"deemon --kill npm run watch-web","restart-watchd":"deemon --restart npm run watch","restart-watch-webd":"deemon --restart npm run watch-web","watch-client":"npm run gulp watch-client","watch-clientd":"deemon npm run watch-client","kill-watch-clientd":"deemon --kill npm run watch-client","watch-client-transpile":"node build/next/index.ts transpile --watch","watch-client-transpiled":"deemon npm run watch-client-transpile","kill-watch-client-transpiled":"deemon --kill npm run watch-client-transpile","watch-extensions":"npm run gulp watch-extensions watch-extension-media","watch-theme-windsurf":"node ../exa/windsurf-ds-theme/build.js --watch","watch-extensionsd":"deemon npm run watch-extensions","kill-watch-extensionsd":"deemon --kill npm run watch-extensions","gulp":"node --max-old-space-size=8192 ./node_modules/gulp/bin/gulp.js","gulp-extra-memory":"node --max-old-space-size=16384 --optimize-for-size ./node_modules/gulp/bin/gulp.js","precommit":"node build/hygiene.ts","electron":"node build/lib/electron.ts","7z":"7z","update-grammars":"node build/npm/update-all-grammars.ts","update-localization-extension":"node build/npm/update-localization-extension.ts","mixin-telemetry-docs":"node build/npm/mixin-telemetry-docs.ts","smoketest":"node build/lib/preLaunch.ts && cd test/smoke && npm run compile && node test/index.js","smoketest-no-compile":"cd test/smoke && node test/index.js","download-builtin-extensions":"node build/lib/builtInExtensions.ts","download-builtin-extensions-cg":"node build/lib/builtInExtensionsCG.ts","monaco-compile-check":"tsgo --project src/tsconfig.monaco.json --noEmit","tsec-compile-check":"node node_modules/tsec/bin/tsec -p src/tsconfig.tsec.json","vscode-dts-compile-check":"tsgo --project src/tsconfig.vscode-dts.json && tsgo --project src/tsconfig.vscode-proposed-dts.json","valid-layers-check":"node build/checker/layersChecker.ts && tsgo --project build/checker/tsconfig.browser.json && tsgo --project build/checker/tsconfig.worker.json && tsgo --project build/checker/tsconfig.node.json && tsgo --project build/checker/tsconfig.electron-browser.json && tsgo --project build/checker/tsconfig.electron-main.json && tsgo --project build/checker/tsconfig.electron-utility.json","define-class-fields-check":"node build/lib/propertyInitOrderChecker.ts && tsgo --project src/tsconfig.defineClassFields.json","update-distro":"node build/npm/update-distro.ts","web":"echo 'npm run web' is replaced by './scripts/code-server' or './scripts/code-web'","compile-cli":"npm run gulp compile-cli","compile-web":"npm run gulp compile-web","watch-web":"npm run gulp watch-web","watch-cli":"npm run gulp watch-cli","eslint":"node build/eslint.ts","stylelint":"node build/stylelint.ts","playwright-install":"npm exec playwright install","compile-build":"npm run gulp compile-build-with-mangling","compile-extensions-build":"npm run gulp compile-extensions-build","minify-vscode":"npm run gulp minify-vscode","minify-vscode-reh":"npm run gulp minify-vscode-reh","minify-vscode-reh-web":"npm run gulp minify-vscode-reh-web","hygiene":"npm run gulp hygiene","format-file":"node scripts/format-file.js","core-ci":"npm run gulp core-ci","core-ci-pr":"npm run gulp core-ci-pr","extensions-ci":"npm run gulp extensions-ci","extensions-ci-pr":"npm run gulp extensions-ci-pr","perf":"node scripts/code-perf.js","update-build-ts-version":"npm install -D typescript@next && npm install -D @typescript/native-preview && (cd build && npm run typecheck)","install-local-component-explorer":"npm install ../vscode-packages/js-component-explorer/dist/vscode-component-explorer-0.1.0.tgz ../vscode-packages/js-component-explorer/dist/vscode-component-explorer-cli-0.1.0.tgz --no-save && cd build/vite && npm install ../../../vscode-packages/js-component-explorer/dist/vscode-component-explorer-vite-plugin-0.1.0.tgz --no-save","symlink-local-component-explorer":"npm install ../vscode-packages/js-component-explorer/packages/explorer ../vscode-packages/js-component-explorer/packages/cli --no-save && cd build/vite && npm install ../../../vscode-packages/js-component-explorer/packages/vite-plugin ../../../vscode-packages/js-component-explorer/packages/explorer --no-save","install-latest-component-explorer":"npm install @vscode/component-explorer@next @vscode/component-explorer-cli@next && cd build/vite && npm install @vscode/component-explorer-vite-plugin@next && npm install @vscode/component-explorer@next","generate-ls-version":"node scripts/generate_ls_version.js"},"dependencies":{"@anthropic-ai/sandbox-runtime":"0.0.23","@bufbuild/protobuf":"^1.10.0","@c4312/eventsource-umd":"^3.0.5","@connectrpc/connect":"^1.6.1","@connectrpc/connect-web":"^1.6.1","@microsoft/1ds-core-js":"^3.2.13","@microsoft/1ds-post-js":"^3.2.13","@parcel/watcher":"^2.5.6","@types/semver":"^7.5.8","@vscode/codicons":"usacognition/vscode-codicons#aa71fb0","@vscode/deviceid":"^0.1.1","@vscode/iconv-lite-umd":"0.7.1","@vscode/native-watchdog":"^1.4.6","@vscode/policy-watcher":"Exafunction/vscode-policy-watcher#63a1f6f","@vscode/proxy-agent":"^0.38.0","@vscode/ripgrep":"^1.15.13","@vscode/spdlog":"^0.15.7","@vscode/sqlite3":"5.1.12-vscode","@vscode/sudo-prompt":"9.3.2","@vscode/tree-sitter-wasm":"^0.3.0","@vscode/vscode-languagedetection":"1.0.23","@vscode/windows-mutex":"^0.5.0","@vscode/windows-process-tree":"^0.6.0","@vscode/windows-registry":"^1.2.0","@xterm/addon-clipboard":"^0.3.0-beta.167","@xterm/addon-image":"^0.10.0-beta.167","@xterm/addon-ligatures":"^0.11.0-beta.167","@xterm/addon-progress":"^0.3.0-beta.167","@xterm/addon-search":"^0.17.0-beta.167","@xterm/addon-serialize":"^0.15.0-beta.167","@xterm/addon-unicode11":"^0.10.0-beta.167","@xterm/addon-webgl":"^0.20.0-beta.166","@xterm/headless":"^6.1.0-beta.167","@xterm/xterm":"^6.1.0-beta.167","http-proxy-agent":"^7.0.0","https-proxy-agent":"^7.0.2","jschardet":"3.1.4","jsonc-parser":"^3.3.1","katex":"^0.16.22","kerberos":"2.1.1","mermaid":"^11.12.1","minimist":"^1.2.8","motion":"^12.23.24","native-is-elevated":"0.9.0","native-keymap":"^3.3.5","node-pty":"^1.2.0-beta.10","open":"^10.1.2","playwright-core":"1.59.0-alpha-2026-02-20","preact":"^10.27.3","react":"^19.2.0","react-dom":"^19.2.0","svg-pan-zoom":"^3.6.2","tas-client":"0.3.1","undici":"^7.18.2","unleash-client":"^6.10.1","unleash-proxy-client":"^3.7.6","v8-inspect-profiler":"^0.1.1","vscode-oniguruma":"1.7.0","vscode-regexpp":"^3.1.0","vscode-textmate":"^9.3.2","yauzl":"^3.0.0","yazl":"^2.4.3","zustand":"^5.0.0"},"devDependencies":{"@babel/preset-env":"^7.21.4","@babel/preset-react":"^7.18.6","@babel/preset-typescript":"^7.21.4","@bufbuild/buf":"1.36.0","@bufbuild/protoc-gen-es":"1.9.0","@connectrpc/protoc-gen-connect-es":"1.4.0","@playwright/test":"^1.56.1","@stylistic/eslint-plugin-ts":"^2.8.0","@types/cookie":"^0.3.3","@types/debug":"^4.1.5","@types/diff":"^6.0.0","@types/eslint":"^9.6.1","@types/gulp-svgmin":"^1.2.1","@types/http-proxy-agent":"^2.0.1","@types/kerberos":"^1.1.2","@types/minimist":"^1.2.1","@types/mocha":"^10.0.10","@types/node":"^22.18.10","@types/sinon":"^10.0.2","@types/sinon-test":"^2.4.2","@types/trusted-types":"^2.0.7","@types/vscode-notebook-renderer":"^1.72.0","@types/webpack":"^5.28.5","@types/wicg-file-system-access":"^2023.10.7","@types/windows-foreground-love":"^0.3.0","@types/winreg":"^1.2.30","@types/yauzl":"^2.10.0","@types/yazl":"^2.4.2","@typescript-eslint/utils":"^8.45.0","@typescript/native-preview":"^7.0.0-dev.20260130","@vscode/component-explorer":"^0.1.1-16","@vscode/component-explorer-cli":"^0.1.1-12","@vscode/gulp-electron":"1.40.0","@vscode/l10n-dev":"0.0.35","@vscode/telemetry-extractor":"^1.10.2","@vscode/test-cli":"^0.0.6","@vscode/test-electron":"^2.4.0","@vscode/test-web":"^0.0.76","@vscode/v8-heap-parser":"^0.1.0","@vscode/vscode-perf":"^0.0.19","@webgpu/types":"^0.1.66","ansi-colors":"^3.2.3","asar":"^3.0.3","chromium-pickle-js":"^0.2.0","cookie":"^0.7.2","copy-webpack-plugin":"^11.0.0","css-loader":"^6.9.1","debounce":"^1.0.0","deemon":"^1.13.6","electron":"39.6.0","eslint":"^9.36.0","eslint-formatter-compact":"^8.40.0","eslint-plugin-header":"3.1.1","eslint-plugin-jsdoc":"^50.3.1","event-stream":"3.3.4","fancy-log":"^1.3.3","file-loader":"^6.2.0","glob":"^5.0.13","gulp":"^4.0.0","gulp-azure-storage":"^0.12.1","gulp-bom":"^3.0.0","gulp-buffer":"0.0.2","gulp-filter":"^5.1.0","gulp-flatmap":"^1.0.2","gulp-gunzip":"^1.0.0","gulp-gzip":"^1.4.2","gulp-json-editor":"^2.5.0","gulp-plumber":"^1.2.0","gulp-rename":"^1.2.0","gulp-replace":"^0.5.4","gulp-sourcemaps":"^3.0.0","gulp-svgmin":"^4.1.0","husky":"^0.13.1","innosetup":"^6.4.1","istanbul-lib-coverage":"^3.2.0","istanbul-lib-instrument":"^6.0.1","istanbul-lib-report":"^3.0.0","istanbul-lib-source-maps":"^4.0.1","istanbul-reports":"^3.1.5","lazy.js":"^0.4.2","merge-options":"^1.0.1","mime":"^1.4.1","minimatch":"^3.0.4","mocha":"^10.8.2","mocha-junit-reporter":"^2.2.1","mocha-multi-reporters":"^1.5.1","npm-run-all2":"^8.0.4","os-browserify":"^0.3.0","p-all":"^1.0.0","patch-package":"^8.0.0","path-browserify":"^1.0.1","postcss":"^8.4.33","postcss-nesting":"^12.0.2","prettier":"^3.5.3","pump":"^1.0.1","rcedit":"^1.1.0","rimraf":"^2.2.8","sinon":"^12.0.1","sinon-test":"^3.1.3","source-map":"0.6.1","source-map-support":"^0.3.2","style-loader":"^3.3.2","tar":"^7.5.9","ts-loader":"^9.5.1","tsec":"0.2.7","tslib":"^2.6.3","typescript":"^6.0.0-dev.20260130","typescript-eslint":"^8.45.0","util":"^0.12.4","webpack":"^5.105.0","webpack-cli":"^5.1.4","webpack-stream":"^7.0.0","xml2js":"^0.5.0","yaserver":"^0.4.0"},"overrides":{"node-gyp-build":"4.8.1","kerberos@2.1.1":{"node-addon-api":"7.1.0"},"keytar@7.9.0":{"node-addon-api":"7.1.0"},"lodash-es":"4.18.1"},"optionalDependencies":{"keytar":"7.9.0","windows-foreground-love":"0.6.1"},"volta":{"node":"22.22.0"},"desktopName":"devin-desktop.desktop"};np.BUILD_INSERT_PACKAGE_CONFIGURATION&&(np=tp("../package.json"));if(process.isEmbeddedApp){try{let r=tp("../product.sub.json");ga=Object.assign(ga,r)}catch{}try{let r=tp("../package.sub.json");np=Object.assign(np,r)}catch{}}var L1={};if(process.env.VSCODE_DEV)try{L1=tp("../product.overrides.json"),ga=Object.assign(ga,L1)}catch{}var gn=ga,M1=np;Bi();(process.env.ELECTRON_RUN_AS_NODE||process.versions.electron)&&yB(`data:text/javascript;base64,${Buffer.from(`
	export async function resolve(specifier, context, nextResolve) {
		if (specifier === 'fs') {
			return {
				format: 'builtin',
				shortCircuit: true,
				url: 'node:original-fs'
			};
		}

		// Defer to the next hook in the chain, which would be the
		// Node.js default resolve if this is the last user-specified loader.
		return nextResolve(specifier, context);
	}`).toString("base64")}`,import.meta.url);globalThis._VSCODE_PRODUCT_JSON={...gn};globalThis._VSCODE_PACKAGE_JSON={...M1};globalThis._VSCODE_FILE_ROOT=import.meta.dirname;var Oy;function SB(){return Oy||(Oy=_B()),Oy}async function _B(){tt("code/willLoadNls");let r,n;if(process.env.VSCODE_NLS_CONFIG)try{r=JSON.parse(process.env.VSCODE_NLS_CONFIG),r?.languagePack?.messagesFile?n=r.languagePack.messagesFile:r?.defaultMessagesFile&&(n=r.defaultMessagesFile),globalThis._VSCODE_NLS_LANGUAGE=r?.resolvedLanguage}catch(e){console.error(`Error reading VSCODE_NLS_CONFIG from environment: ${e}`)}if(!(process.env.VSCODE_DEV||!n)){try{globalThis._VSCODE_NLS_MESSAGES=JSON.parse((await ag.promises.readFile(n)).toString())}catch(e){if(console.error(`Error reading NLS messages file ${n}: ${e}`),r?.languagePack?.corruptMarkerFile)try{await ag.promises.writeFile(r.languagePack.corruptMarkerFile,"corrupted")}catch(t){console.error(`Error writing corrupted NLS marker file: ${t}`)}if(r?.defaultMessagesFile&&r.defaultMessagesFile!==n)try{globalThis._VSCODE_NLS_MESSAGES=JSON.parse((await ag.promises.readFile(r.defaultMessagesFile)).toString())}catch(t){console.error(`Error reading default NLS messages file ${r.defaultMessagesFile}: ${t}`)}}return tt("code/didLoadNls"),r}}async function F1(){await SB()}var oB=k1(ky(),1);import{app as je,protocol as xV,crashReporter as DV,Menu as OV,contentTracing as kV,BrowserWindow as NV,screen as LV}from"electron";Ny();Qy();Vy();Bi();Ne();Bi();pn();import{promises as ko}from"fs";async function FS({userLocale:r,osLocale:n,userDataPath:e,commit:t,nlsMetadataPath:i}){if(tt("code/willGenerateNls"),process.env.VSCODE_DEV||r==="pseudo"||r.startsWith("en")||!t||!e)return xp(r,n,i);try{let o=await p5(e);if(!o)return xp(r,n,i);let s=m5(o,r);if(!s)return xp(r,n,i);let a=o[s],l=a?.translations?.vscode;if(!a||typeof a.hash!="string"||!a.translations||typeof l!="string"||!await re.exists(l))return xp(r,n,i);let c=`${a.hash}.${s}`,u=H(e,"clp",c),p=H(u,t),m=H(p,"nls.messages.json"),h=H(u,"tcf.json"),E=H(u,"corrupted.info");await re.exists(E)&&await ko.rm(u,{recursive:!0,force:!0,maxRetries:3});let y={userLocale:r,osLocale:n,resolvedLanguage:s,defaultMessagesFile:H(i,"nls.messages.json"),languagePack:{translationsConfigFile:h,messagesFile:m,corruptMarkerFile:E},locale:r,availableLanguages:{"*":s},_languagePackId:c,_languagePackSupport:!0,_translationsConfigFile:h,_cacheRoot:u,_resolvedLanguagePackCoreLocation:p,_corruptedFile:E};if(await re.exists(m))return f5(p).catch(()=>{}),tt("code/didGenerateNls"),y;let[P,T,k]=await Promise.all([ko.readFile(H(i,"nls.keys.json"),"utf-8").then(B=>JSON.parse(B)),ko.readFile(H(i,"nls.messages.json"),"utf-8").then(B=>JSON.parse(B)),ko.readFile(l,"utf-8").then(B=>JSON.parse(B))]),U=[],O=0;for(let[B,he]of P){let Q=k.contents[B];for(let le of he)U.push(Q?.[le]||T[O]),O++}return await ko.mkdir(p,{recursive:!0}),await Promise.all([ko.writeFile(m,JSON.stringify(U),"utf-8"),ko.writeFile(h,JSON.stringify(a.translations),"utf-8")]),tt("code/didGenerateNls"),y}catch(o){console.error("Generating translation files failed.",o)}return xp(r,n,i)}async function p5(r){let n=H(r,"languagepacks.json");try{return JSON.parse(await ko.readFile(n,"utf-8"))}catch{return}}function m5(r,n){try{for(;n;){if(r[n])return n;let e=n.lastIndexOf("-");if(e>0)n=n.substring(0,e);else return}}catch(e){console.error("Resolving language pack configuration failed.",e)}}function xp(r,n,e){return tt("code/didGenerateNls"),{userLocale:r,osLocale:n,resolvedLanguage:"en",defaultMessagesFile:H(e,"nls.messages.json"),locale:r,availableLanguages:{}}}function f5(r){let n=new Date;return ko.utimes(r,n,n)}ac();tt("code/didStartMain");tt("code/willLoadMainBundle",{startTime:Math.floor(RV.timeOrigin)});tt("code/didLoadMainBundle");var MV=N1(gn),jr=jV();oR(gn);uR(gn);var wy=VV(jr);jr.sandbox&&!jr["disable-chromium-sandbox"]&&!wy["disable-chromium-sandbox"]?je.enableSandbox():je.commandLine.hasSwitch("no-sandbox")&&!je.commandLine.hasSwitch("disable-gpu-sandbox")?je.commandLine.appendSwitch("disable-gpu-sandbox"):(je.commandLine.appendSwitch("no-sandbox"),je.commandLine.appendSwitch("disable-gpu-sandbox"));var by=fg(jr,gn.nameShort??"code-oss-dev",gn);if(process.platform==="win32"){let r=eh(by);r&&No(r)}je.setPath("userData",by);var _y=A1();OV.setApplicationMenu(null);tt("code/willStartCrashReporter");(jr["crash-reporter-directory"]||wy["enable-crash-reporter"]&&!jr["disable-crash-reporter"])&&qV();tt("code/didStartCrashReporter");MV.isPortable&&je.setAppLogsPath(ui.join(by,"logs"));xV.registerSchemesAsPrivileged([{scheme:"vscode-webview",privileges:{standard:!0,secure:!0,supportFetchAPI:!0,corsEnabled:!0,allowServiceWorkers:!0,codeCache:!0}},{scheme:"vscode-file",privileges:{secure:!0,standard:!0,supportFetchAPI:!0,corsEnabled:!0,codeCache:!0}}]);zV();var P1,C1=sB((je.getPreferredSystemLanguages()?.[0]??"en").toLowerCase()),tg=XV(wy);if(tg){let r=jy();P1=FS({userLocale:tg,osLocale:C1,commit:gn.commit,userDataPath:r?r.oldDataDir:by,nlsMetadataPath:import.meta.dirname})}if(process.platform==="win32"||process.platform==="linux"){let r=!tg||tg==="qps-ploc"?"en":tg;je.commandLine.appendSwitch("lang",r)}je.once("ready",function(){if(jr.trace){let r;if(jr["trace-memory-infra"]){let n=jr["trace-category-filter"]?.split(",")||[];n.push("disabled-by-default-memory-infra","disabled-by-default-memory-infra.v8.code_stats"),r={included_categories:n,excluded_categories:["*"],memory_dump_config:{allowed_dump_modes:["light","detailed"],triggers:[{type:"periodic_interval",mode:"detailed",min_time_between_dumps_ms:1e4},{type:"periodic_interval",mode:"light",min_time_between_dumps_ms:1e3}]}}}else r={categoryFilter:jr["trace-category-filter"]||"*",traceOptions:jr["trace-options"]||"record-until-full,enable-sampling"};kV.startRecording(r).finally(()=>rB())}else rB()});async function rB(){tt("code/mainAppReady");let r=jy();if(r)try{let n=await FV(r);zy(n),!n.migrated&&!n.freshInstall&&(Yy(r.oldDataDir,r.oldDataFolderName),je.setPath("userData",r.oldDataDir),_y=A1())}catch(n){console.error(`[migration] Migration with progress window failed: ${n}`),lR(r,n),zy({migrated:!1,freshInstall:!1,skippedExistingData:!1,skippedDiskSpace:!1,error:String(n)}),Yy(r.oldDataDir,r.oldDataFolderName),je.setPath("userData",r.oldDataDir),_y=A1()}finally{pR()}try{await dR(gn)}catch(n){console.warn(`[migration] SQLite fixup error (non-fatal): ${n}`)}try{let[,n]=await Promise.all([YV(_y),QV()]);await BV(_y,n)}catch(n){console.error(n)}}function UV(r){let n=r.split(/[\\/]+/).filter(e=>e.length>0);return n.length<=2?r:`${n[0]}/${n[1]}/\u2026`}async function FV(r){let t=LV.getPrimaryDisplay().workArea,i=Math.round(t.x+(t.width-480)/2),o=Math.round(t.y+(t.height-467)/2),s=new NV({width:480,height:467,x:i,y:o,frame:!1,resizable:!1,closable:!1,minimizable:!1,maximizable:!1,skipTaskbar:!0,show:!1,backgroundColor:"#ffffff",transparent:!1,roundedCorners:!0,webPreferences:{nodeIntegration:!1,contextIsolation:!0,partition:"migration-progress"}}),a=()=>{};je.on("window-all-closed",a);let l=WV();s.loadURL(`data:text/html;charset=utf-8,${encodeURIComponent(l)}`),await new Promise(m=>{let h=setTimeout(()=>{s.isDestroyed()||s.show(),m()},5e3);s.once("ready-to-show",()=>{clearTimeout(h),s.show(),m()})});let c=setInterval(()=>iR(r.lockHandle),300*1e3),u=await new Promise(m=>{s.webContents.on("will-navigate",(h,E)=>{let y=E.match(/choice:(\w+)/);y&&(h.preventDefault(),m(y[1]))}),s.webContents.on("render-process-gone",()=>m("skip")),s.on("closed",()=>m("skip"))});if(clearInterval(c),u==="skip")try{return cR(r)}finally{s.isDestroyed()||s.destroy(),je.removeListener("window-all-closed",a)}s.isDestroyed()||s.webContents.executeJavaScript("document.getElementById('welcome-view').style.display='none';document.getElementById('progress-view').style.display='flex';").catch(()=>{});let p=0;try{let m=await aR(r,(h,E,y)=>{let P=Date.now();if(P-p<100)return;p=P;let T=E>0?Math.min(h/E*100,99):0;if(s.isDestroyed())return;let k=UV(y??"");s.webContents.executeJavaScript(`updateProgress(${T}, ${JSON.stringify(k)})`).catch(()=>{})});return m.migrated&&(s.isDestroyed()||s.webContents.executeJavaScript("updateProgress(100)").catch(()=>{}),await new Promise(h=>setTimeout(h,500))),m}finally{s.isDestroyed()||s.destroy(),je.removeListener("window-all-closed",a)}}function WV(){return`<!DOCTYPE html>
<html>
<head><style>
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body {
	background: #fff;
	height: 100vh;
	font-family: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', Roboto, sans-serif;
	color: rgba(25, 25, 25, 1);
	user-select: none;
	overflow: hidden;
}
.dialog {
	width: 100%;
	height: 100%;
	display: flex;
	flex-direction: column;
	border-radius: 12px;
	overflow: hidden;
}
.preview-area {
	background: #e8e2dc;
	flex-shrink: 0;
	overflow: hidden;
	position: relative;
	-webkit-app-region: drag;
	flex: 1;
	min-height: 0;
}
.preview-fade {
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	height: 60px;
	/* Intentional gradient: fades the preview image into the dialog body per the Figma spec. */
	background: linear-gradient(to bottom, rgba(232, 226, 220, 0), rgba(232, 226, 220, 1));
	z-index: 2;
	pointer-events: none;
}
.preview-img {
	position: absolute;
	top: 32px;
	left: 27px;
	bottom: 0;
	right: 0;
	width: calc(100% - 27px);
	height: auto;
}

.title-section {
	padding: 20px;
	display: flex;
	flex-direction: column;
	gap: 4px;
	flex-shrink: 0;
}
.title-section h1 {
	font-size: 17px;
	font-weight: 500;
	line-height: 26px;
	letter-spacing: -0.17px;
	color: rgba(25, 25, 25, 1);
}
.title-section .subtitle {
	font-size: 13px;
	font-weight: 400;
	line-height: 18px;
	color: rgba(25, 25, 25, 0.56);
}
.buttons-section {
	display: flex;
	justify-content: flex-end;
	align-items: center;
	gap: 6px;
	padding: 0 20px 20px;
	flex-shrink: 0;
	-webkit-app-region: no-drag;
}
.btn {
	height: 28px;
	display: flex;
	justify-content: center;
	align-items: center;
	padding: 4px 10px;
	border-radius: 6px;
	font-size: 13px;
	font-weight: 500;
	line-height: 18px;
	font-family: inherit;
	cursor: pointer;
	text-decoration: none;
	border: none;
}
.btn-secondary {
	background: transparent;
	color: rgba(25, 25, 25, 0.56);
}
.btn-secondary:hover { background: rgba(0, 0, 0, 0.04); }
.btn-primary {
	background: rgba(54, 54, 54, 1);
	color: #fff;
	border: 1px solid rgba(0, 0, 0, 0.08);
}
.btn-primary:hover { background: rgba(70, 70, 70, 1); }
#progress-view { display: none; flex-direction: column; height: 100%; }
.progress-title-section {
	padding: 20px 20px 44px;
	display: flex;
	flex-direction: column;
	gap: 34px;
	flex-shrink: 0;
}
.progress-title-section h1 {
	font-size: 17px;
	font-weight: 500;
	line-height: 26px;
	letter-spacing: -0.17px;
	color: rgba(25, 25, 25, 1);
}
.progress-track {
	height: 6px;
	background: rgba(0, 0, 0, 0.06);
	border-radius: 3px;
	overflow: hidden;
	position: relative;
}
.progress-fill {
	height: 100%;
	width: 0%;
	background: #317CFF;
	border-radius: 3px;
}
.progress-detail-row {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 10px;
}
.tip-text {
	font-size: 12px;
	font-weight: 400;
	line-height: 16px;
	color: rgba(25, 25, 25, 0.56);
	flex: 1;
}
.pct {
	font-size: 12px;
	font-weight: 400;
	line-height: 16px;
	color: rgba(25, 25, 25, 0.56);
	flex-shrink: 0;
	text-align: right;
	font-variant-numeric: tabular-nums;
}

</style></head>
<body>
<div class="dialog">
	<div id="welcome-view" style="display:flex;flex-direction:column;height:100%">
		<div class="preview-area">
			<div class="preview-fade"></div>
			<img class="preview-img" id="welcome-preview-img">
		</div>
		<div class="title-section">
			<h1>Welcome to Devin Desktop</h1>
			<div class="subtitle">Manage fleets of local and cloud agents from one surface. Plan, delegate, review, and ship without leaving your editor.</div>
		</div>
		<div class="buttons-section">
			<a class="btn btn-secondary" href="choice:skip">Start fresh</a>
			<a class="btn btn-primary" href="choice:migrate">Migrate from Windsurf</a>
		</div>
	</div>
	<div id="progress-view">
		<div class="preview-area">
			<div class="preview-fade"></div>
			<img class="preview-img" id="progress-preview-img">
		</div>
		<div class="progress-title-section">
			<h1>Customizing your setup</h1>
			<div style="display:flex;flex-direction:column;gap:8px;align-self:stretch">
				<div class="progress-track"><div class="progress-fill" id="bar"></div></div>
				<div class="progress-detail-row">
					<span class="tip-text" id="tip">Copying your keybindings\u2026</span>
					<span class="pct" id="pct">0%</span>
				</div>
			</div>
		</div>
		</div>
</div>
<script>
var PREVIEW_SRC="data:image/png;base64, ";
document.getElementById("welcome-preview-img").src=PREVIEW_SRC;
document.getElementById("progress-preview-img").src=PREVIEW_SRC;
var tips = [
	'Copying your keybindings\u2026',
	'Bringing over your extensions\u2026',
	'Almost ready. Syncing preferences\u2026'
];
var tipIdx = 0;
setInterval(function(){
	tipIdx = (tipIdx + 1) % tips.length;
	var el = document.getElementById('tip');
	if (el) el.textContent = tips[tipIdx];
}, 4000);
function updateProgress(p, label){
	document.getElementById('bar').style.width=p+'%';
	document.getElementById('pct').textContent=Math.round(p)+'%';
}
</script>
</body>
</html>`}async function BV(r,n){process.env.VSCODE_NLS_CONFIG=JSON.stringify(n),process.env.VSCODE_CODE_CACHE_PATH=r||"",await F1(),await Promise.resolve().then(()=>(nB(),AV)),tt("code/didRunMainBundle")}function VV(r){let n=["disable-hardware-acceleration","force-color-profile","disable-lcd-text","proxy-bypass-list","remote-debugging-port"];process.platform==="linux"&&(n.push("force-renderer-accessibility"),n.push("password-store"));let e=["enable-proposed-api","log-level","use-inmemory-secretstorage","enable-rdp-display-tracking"],t=GV();Object.keys(t).forEach(c=>{let u=t[c];if(n.indexOf(c)!==-1){if(u===!0||u==="true")c==="disable-hardware-acceleration"?je.disableHardwareAcceleration():je.commandLine.appendSwitch(c);else if(typeof u=="string"&&u)if(c==="password-store"){let p=u;(u==="gnome"||u==="gnome-keyring")&&(p="gnome-libsecret"),je.commandLine.appendSwitch(c,p)}else je.commandLine.appendSwitch(c,u)}else if(e.indexOf(c)!==-1)switch(c){case"enable-proposed-api":Array.isArray(u)?u.forEach(p=>p&&typeof p=="string"&&process.argv.push("--enable-proposed-api",p)):console.error("Unexpected value for `enable-proposed-api` in argv.json. Expected array of extension ids.");break;case"log-level":if(typeof u=="string")process.argv.push("--log",u);else if(Array.isArray(u))for(let p of u)process.argv.push("--log",p);break;case"use-inmemory-secretstorage":u&&process.argv.push("--use-inmemory-secretstorage");break;case"enable-rdp-display-tracking":u&&process.argv.push("--enable-rdp-display-tracking");break}});let i=`NetAdapterMaxBufSizeFeature:NetAdapterMaxBufSize/8192,DocumentPolicyIncludeJSCallStacksInCrashReports,EarlyEstablishGpuChannel,EstablishGpuChannelAsync,${je.commandLine.getSwitchValue("enable-features")}`;je.commandLine.appendSwitch("enable-features",i);let o=`CalculateNativeWinOcclusion,${je.commandLine.getSwitchValue("disable-features")}`;je.commandLine.appendSwitch("disable-features",o);let s=`FontMatchingCTMigration,StandardizedBrowserZoom,${je.commandLine.getSwitchValue("disable-blink-features")}`;je.commandLine.appendSwitch("disable-blink-features",s);let a=KV(r);a&&je.commandLine.appendSwitch("js-flags",a),je.commandLine.appendSwitch("xdg-portal-required-version","4"),je.commandLine.appendSwitch("max-active-webgl-contexts","32");let l="abcdefghijklmnopqrstuvwxyz".split("").map(c=>`MAP ${c}.localhost 127.0.0.1`).join(", ");return je.commandLine.appendSwitch("host-resolver-rules",l),t}function GV(){let r=JV(),n;try{n=lg(pi.readFileSync(r).toString())}catch(e){e&&e.code==="ENOENT"?HV(r):console.warn(`Unable to read argv.json configuration file in ${r}, falling back to defaults (${e})`)}return n||(n={}),n}function HV(r){try{let n=ui.dirname(r);pi.existsSync(n)||pi.mkdirSync(n),pi.writeFileSync(r,["// This configuration file allows you to pass permanent command line arguments to VS Code.","// Only a subset of arguments is currently supported to reduce the likelihood of breaking","// the installation.","//","// PLEASE DO NOT CHANGE WITHOUT UNDERSTANDING THE IMPACT","//","// NOTE: Changing this file requires a restart of VS Code.","{","	// Use software rendering instead of hardware accelerated rendering.","	// This can help in cases where you see rendering issues in VS Code.",'	// "disable-hardware-acceleration": true',"}"].join(`
`))}catch(n){console.error(`Unable to create argv.json configuration file in ${r}, falling back to defaults (${n})`)}}function JV(){let r=process.env.VSCODE_PORTABLE;if(r)return ui.join(r,"argv.json");let n=gn.dataFolderName;return process.env.VSCODE_DEV&&(n=`${n}-dev`),ui.join(iB.homedir(),n,"argv.json")}function qV(){let r=jr["crash-reporter-directory"],n="";if(r){if(r=ui.normalize(r),ui.isAbsolute(r)||(console.error(`The path '${r}' specified for --crash-reporter-directory must be absolute.`),je.exit(1)),!pi.existsSync(r))try{pi.mkdirSync(r,{recursive:!0})}catch{console.error(`The path '${r}' specified for --crash-reporter-directory does not seem to exist or cannot be created.`),je.exit(1)}console.log(`Found --crash-reporter-directory argument. Setting crashDumps directory to be '${r}'`),je.setPath("crashDumps",r)}else{let o=gn.appCenter;if(o){let s=process.platform==="win32",a=process.platform==="linux",l=process.platform==="darwin",c=wy["crash-reporter-id"];if(c&&/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(c)){if(s)switch(process.arch){case"x64":n=o["win32-x64"];break;case"arm64":n=o["win32-arm64"];break}else if(l)if(gn.darwinUniversalAssetId)n=o["darwin-universal"];else switch(process.arch){case"x64":n=o.darwin;break;case"arm64":n=o["darwin-arm64"];break}else a&&(n=o["linux-x64"]);n=n.concat("&uid=",c,"&iid=",c,"&sid=",c);let p=process.argv,m=p.indexOf("--");m===-1?p.push("--crash-reporter-id",c):p.splice(m,0,"--crash-reporter-id",c)}}}let e=(gn.crashReporter?gn.crashReporter.productName:void 0)||gn.nameShort,t=(gn.crashReporter?gn.crashReporter.companyName:void 0)||"Microsoft",i=!!(!process.env.VSCODE_DEV&&n&&!r);DV.start({companyName:t,productName:process.env.VSCODE_DEV?`${e} Dev`:e,submitURL:n,uploadToServer:i,compress:!0,ignoreSystemCrashHandler:!0})}function KV(r){let n=[];return r["js-flags"]&&n.push(r["js-flags"]),process.platform==="linux"&&n.push("--nodecommit_pooled_pages"),n.length>0?n.join(" "):null}function jV(){return(0,oB.default)(process.argv,{string:["user-data-dir","locale","js-flags","crash-reporter-directory"],boolean:["disable-chromium-sandbox"],default:{sandbox:!0},alias:{"no-sandbox":"sandbox"}})}function zV(){let r=[];globalThis.macOpenFiles=r,je.on("open-file",function(t,i){r.push(i)});let n=[],e=function(t,i){t.preventDefault(),n.push(i)};je.on("will-finish-launching",function(){je.on("open-url",e)}),globalThis.getOpenUrls=function(){return je.removeListener("open-url",e),n}}function A1(){if(process.argv.indexOf("--no-cached-data")>0||process.env.VSCODE_DEV)return;let r=gn.commit;if(r)return ui.join(je.getPath("userData"),"CachedData",r)}async function YV(r){if(typeof r=="string")try{return await pi.promises.mkdir(r,{recursive:!0}),r}catch{}}function sB(r){if(r.startsWith("zh")){let n=r.split("-")[1];return["hans","cn","sg","my"].includes(n)?"zh-cn":"zh-tw"}return r}async function QV(){let r=P1?await P1:void 0;if(r)return r;let n=je.getLocale();return n?(n=sB(n.toLowerCase()),FS({userLocale:n,osLocale:C1,commit:gn.commit,userDataPath:je.getPath("userData"),nlsMetadataPath:import.meta.dirname})):{userLocale:"en",osLocale:C1,resolvedLanguage:"en",defaultMessagesFile:ui.join(import.meta.dirname,"nls.messages.json"),locale:"en",availableLanguages:{}}}function XV(r){let n=jr.locale;return n?n.toLowerCase():typeof r?.locale=="string"?r.locale.toLowerCase():void 0}
//# sourceMappingURL=https://cdn.windsurf.com/sourcemaps/0d4bf12ed4a7597cb8ae9016fe8474468aad98a2/core/main.js.map
