UNPKG

@graphql-hive/laboratory

Version:

[Hive](https://the-guild.dev/graphql/hive) is a fully open-source schema registry, analytics, metrics and gateway for [GraphQL federation](https://the-guild.dev/graphql/hive/federation) and other GraphQL APIs.

38,067 lines • 1.43 MB
import { $ as e, $a as t, $c as n, $i as r, $l as i, $n as a, $o as o, $r as s, $s as c, $t as l, A as u, Aa as d, Ac as f, Ai as p, Al as m, An as h, Ao as ee, Ar as te, As as ne, At as re, Au as ie, B as ae, Ba as oe, Bc as se, Bi as ce, Bl as g, Bn as le, Bo as ue, Br as de, Bs as _, Bt as fe, Bu as pe, C as me, Ca as he, Cc as ge, Ci as _e, Cl as v, Cn as ve, Co as ye, Cr as be, Cs as xe, Ct as Se, Cu as y, D as Ce, Da as we, Dc as Te, Di as Ee, Dl as De, Dn as Oe, Do as ke, Dr as Ae, Ds as je, Dt as Me, Du as Ne, E as Pe, Ea as Fe, Ec as Ie, Ei as Le, El as b, En as Re, Eo as ze, Er as Be, Es as Ve, Et as He, Eu as Ue, F as We, Fa as Ge, Fc as Ke, Fi as qe, Fl as x, Fn as Je, Fo as Ye, Fr as Xe, Fs as Ze, Ft as Qe, Fu as $e, G as et, Ga as tt, Gc as nt, Gi as rt, Gl as it, Gn as at, Go as ot, Gr as st, Gs as ct, Gt as lt, H as ut, Ha as S, Hc as dt, Hi as ft, Hl as pt, Hn as mt, Ho as ht, Hr as gt, Hs as _t, Ht as vt, Hu as yt, I as bt, Ia as xt, Ic as St, Ii as Ct, Il as wt, In as Tt, Io as Et, Ir as Dt, Is as Ot, It as kt, Iu as At, J as jt, Ja as Mt, Jc as Nt, Ji as Pt, Jl as Ft, Jn as It, Jo as Lt, Jr as Rt, Js as zt, Jt as Bt, K as Vt, Ka as Ht, Kc as Ut, Ki as Wt, Kl as Gt, Kn as Kt, Ko as qt, Kr as Jt, Ks as Yt, Kt as Xt, L as Zt, La as Qt, Lc as $t, Li as en, Ll as tn, Ln as nn, Lo as rn, Lr as an, Ls as on, Lt as sn, Lu as cn, M as ln, Ma as un, Mc as dn, Mi as fn, Ml as C, Mn as pn, Mo as mn, Mr as hn, Ms as gn, Mt as _n, Mu as vn, N as yn, Na as bn, Nc as xn, Ni as Sn, Nl as Cn, Nn as wn, No as Tn, Nr as En, Ns as Dn, Nu as On, O as kn, Oa as An, Oc as jn, Oi as Mn, Ol as Nn, On as Pn, Oo as Fn, Or as In, Os as Ln, Ot as Rn, Ou as zn, P as Bn, Pa as Vn, Pc as Hn, Pi as Un, Pl as Wn, Pn as Gn, Po as Kn, Pr as qn, Ps as w, Pt as Jn, Pu as Yn, Q as Xn, Qa as Zn, Qc as Qn, Qi as $n, Ql as er, Qn as tr, Qo as T, Qr as nr, Qs as rr, Qt as ir, R as ar, Ra as or, Rc as sr, Ri as cr, Rl as lr, Rn as ur, Ro as dr, Rr as fr, Rs as pr, Rt as mr, Ru as hr, S as gr, Sa as _r, Sc as vr, Si as yr, Sl as br, Sn as xr, So as Sr, Sr as Cr, Ss as wr, St as Tr, Su as Er, T as Dr, Ta as Or, Tc as kr, Ti as Ar, Tl as E, Tn as jr, To as Mr, Tr as Nr, Ts as Pr, Tt as Fr, Tu as Ir, U as Lr, Ua as Rr, Uc as zr, Ui as Br, Ul as Vr, Un as Hr, Uo as Ur, Ur as Wr, Us as D, Ut as Gr, Uu as Kr, V as qr, Va as Jr, Vc as Yr, Vi as Xr, Vl as Zr, Vn as Qr, Vo as $r, Vr as ei, Vs as ti, Vt as ni, Vu as ri, W as ii, Wa as ai, Wc as oi, Wi as si, Wl as ci, Wn as li, Wo as O, Wr as ui, Ws as di, Wt as fi, Wu as pi, X as mi, Xa as hi, Xc as gi, Xi as _i, Xl as vi, Xn as yi, Xo as k, Xr as bi, Xs as xi, Xt as Si, Y as Ci, Ya as wi, Yc as Ti, Yi as Ei, Yl as Di, Yn as Oi, Yo as ki, Yr as Ai, Ys as ji, Yt as Mi, Z as Ni, Za as Pi, Zc as Fi, Zi as Ii, Zl as Li, Zn as Ri, Zo as A, Zr as zi, Zs as Bi, Zt as Vi, _ as Hi, _a as Ui, _c as Wi, _i as Gi, _l as Ki, _n as qi, _o as Ji, _r as Yi, _s as j, _t as Xi, _u as Zi, aa as Qi, ac as $i, ai as ea, al as ta, an as na, ao as ra, ar as ia, as as aa, at as oa, au as sa, b as ca, ba as la, bc as ua, bi as da, bl as fa, bn as pa, bo as ma, br as ha, bs as ga, bt as _a, bu as va, ca as ya, cc as ba, ci as xa, cl as Sa, cn as Ca, co as M, cr as wa, cs as Ta, ct as Ea, cu as Da, da as Oa, dc as ka, di as Aa, dl as ja, dn as Ma, do as Na, dr as Pa, ds as Fa, dt as Ia, du as La, ea as Ra, ec as za, ei as Ba, el as Va, en as Ha, eo as Ua, er as Wa, es as Ga, et as Ka, eu as qa, fa as Ja, fc as Ya, fi as Xa, fl as Za, fn as Qa, fo as $a, fr as eo, fs as to, ft as no, fu as ro, g as io, ga as ao, gc as oo, gi as so, gl as co, gn as lo, go as uo, gr as fo, gs as N, gt as po, gu as mo, ha as ho, hc as go, hi as _o, hl as vo, hn as yo, ho as bo, hr as xo, hs as So, ht as Co, hu as wo, ia as To, ic as Eo, ii as Do, il as Oo, in as ko, io as Ao, ir as jo, is as Mo, it as No, j as Po, ja as Fo, jc as Io, ji as Lo, jl as Ro, jn as zo, jo as Bo, jr as Vo, js as Ho, jt as Uo, ju as Wo, k as Go, ka as Ko, kc as qo, ki as Jo, kl as Yo, kn as Xo, ko as Zo, kr as Qo, ks as P, kt as $o, ku as es, la as ts, lc as ns, li as rs, ll as is, ln as as, lo as os, lr as ss, ls as cs, lt as ls, lu as us, m as ds, ma as fs, mc as ps, mi as ms, ml as hs, mn as gs, mo as _s, mr as vs, ms as ys, mt as bs, mu as xs, na as Ss, nc as Cs, ni as ws, nl as Ts, nn as Es, no as Ds, nr as Os, ns as ks, nt as As, nu as js, oa as Ms, oc as Ns, oi as Ps, ol as Fs, on as Is, oo as Ls, or as Rs, os as F, ot as zs, ou as Bs, pa as Vs, pc as Hs, pi as Us, pl as Ws, pn as Gs, po as Ks, pr as qs, ps as Js, pt as Ys, pu as Xs, q as Zs, qa as Qs, qc as $s, qi as ec, ql as tc, qn as nc, qo as rc, qr as ic, qs as ac, qt as oc, ra as sc, rc as cc, ri as lc, rl as uc, rn as dc, ro as fc, rr as pc, rs as mc, rt as hc, ru as gc, sa as _c, sc as vc, si as yc, sl as bc, sn as xc, so as Sc, sr as Cc, ss as wc, st as Tc, su as Ec, ta as Dc, tc as Oc, ti as kc, tl as Ac, tn as jc, to as Mc, tr as Nc, ts as Pc, tt as I, tu as Fc, ua as Ic, uc as Lc, ui as Rc, ul as zc, un as L, uo as R, ur as Bc, us as Vc, ut as Hc, uu as Uc, v as Wc, va as Gc, vc as Kc, vi as qc, vl as Jc, vn as Yc, vo as Xc, vr as Zc, vs as z, vt as Qc, vu as B, w as $c, wa as el, wc as tl, wi as nl, wl as V, wn as rl, wo as il, wr as al, ws as ol, wt as sl, wu as cl, x as ll, xa as ul, xc as dl, xi as fl, xl as pl, xn as ml, xo as hl, xr as gl, xs as _l, xt as vl, xu as yl, y as bl, ya as xl, yc as Sl, yi as Cl, yl as wl, yn as Tl, yo as El, yr as Dl, ys as Ol, yt as kl, yu as H, z as Al, za as jl, zc as Ml, zi as Nl, zl as U, zn as Pl, zo as Fl, zr as Il, zs as Ll, zt as Rl, zu as zl } from "./editor.api-DX-lPANk.js";
import "./monaco.contribution-Bw1EXBxx.js";
// ../../../node_modules/.pnpm/graphql@17.1.0/node_modules/graphql/jsutils/inspect.mjs
var Bl = 10, Vl = 2;
function W(e) {
	return Hl(e, []);
}
function Hl(e, t) {
	switch (typeof e) {
		case "string": return JSON.stringify(e);
		case "function": return e.name ? `[function ${e.name}]` : "[function]";
		case "object": return Ul(e, t);
		default: return String(e);
	}
}
function Ul(e, t) {
	if (e === null) return "null";
	if (t.includes(e)) return "[Circular]";
	let n = [...t, e];
	if (Wl(e)) {
		let t = e.toJSON();
		if (t !== e) return typeof t == "string" ? t : Hl(t, n);
	} else if (Array.isArray(e)) return Kl(e, n);
	return Gl(e, n);
}
function Wl(e) {
	return typeof e.toJSON == "function";
}
function Gl(e, t) {
	let n = Object.entries(e);
	return n.length === 0 ? "{}" : t.length > Vl ? "[" + ql(e) + "]" : "{ " + n.map(([e, n]) => e + ": " + Hl(n, t)).join(", ") + " }";
}
function Kl(e, t) {
	if (e.length === 0) return "[]";
	if (t.length > Vl) return "[Array]";
	let n = Math.min(Bl, e.length), r = e.length - n, i = [];
	for (let r = 0; r < n; ++r) i.push(Hl(e[r], t));
	return r === 1 ? i.push("... 1 more item") : r > 1 && i.push(`... ${r} more items`), "[" + i.join(", ") + "]";
}
function ql(e) {
	let t = Object.prototype.toString.call(e).replace(/^\[object /, "").replace(/]$/, "");
	if (t === "Object" && typeof e.constructor == "function") {
		let t = e.constructor.name;
		if (typeof t == "string" && t !== "") return t;
	}
	return t;
}
// ../../../node_modules/.pnpm/graphql@17.1.0/node_modules/graphql/jsutils/instanceOf.mjs
function Jl(e, t) {
	return e?.__kind === t;
}
var Yl = Jl;
// ../../../node_modules/.pnpm/graphql@17.1.0/node_modules/graphql/jsutils/isPromise.mjs
function Xl(e) {
	return e instanceof Promise;
}
function Zl(e) {
	return typeof e?.then == "function";
}
// ../../../node_modules/.pnpm/graphql@17.1.0/node_modules/graphql/jsutils/toError.mjs
function Ql(e) {
	return e instanceof Error ? e : new $l(e);
}
var $l = class extends Error {
	constructor(e) {
		super("Unexpected error value: " + W(e)), this.name = "NonErrorThrown", this.thrownValue = e;
	}
};
// ../../../node_modules/.pnpm/graphql@17.1.0/node_modules/graphql/jsutils/isObjectLike.mjs
function eu(e) {
	return typeof e == "object" && !!e;
}
// ../../../node_modules/.pnpm/graphql@17.1.0/node_modules/graphql/jsutils/AccumulatorMap.mjs
var tu = class extends Map {
	get [Symbol.toStringTag]() {
		return "AccumulatorMap";
	}
	add(e, t) {
		let n = this.get(e);
		n === void 0 ? this.set(e, [t]) : n.push(t);
	}
}, nu = /\r\n|[\n\r]/g;
function ru(e, t) {
	let n = e.body.matchAll(nu), r = n.next().value, i = 1, a = 0;
	for (; r !== void 0 && r.index < t;) a = r.index + r[0].length, i++, r = n.next().value;
	return {
		line: i,
		column: t + 1 - a
	};
}
function iu(e) {
	if (e.length < 2) return e.map(({ source: e, start: t }) => ru(e, t));
	let t = new tu();
	e.forEach(({ source: e, start: n }, r) => {
		t.add(e, {
			position: n,
			index: r
		});
	});
	let n = Array(e.length);
	for (let [e, r] of t) {
		let t = e.body.matchAll(nu), i = t.next().value, a = 1, o = 0;
		for (let { position: e, index: s } of r.toSorted((e, t) => e.position - t.position)) {
			for (; i !== void 0 && i.index < e;) o = i.index + i[0].length, a++, i = t.next().value;
			n[s] = {
				line: a,
				column: e + 1 - o
			};
		}
	}
	return n;
}
// ../../../node_modules/.pnpm/graphql@17.1.0/node_modules/graphql/language/printLocation.mjs
function au(e) {
	return ou(e.source, ru(e.source, e.start));
}
function ou(e, t) {
	let n = e.locationOffset.column - 1, r = "".padStart(n) + e.body, i = t.line - 1, a = e.locationOffset.line - 1, o = t.line + a, s = t.line === 1 ? n : 0, c = t.column + s, l = `${e.name}:${o}:${c}\n`, u = r.split(/\r\n|[\n\r]/g), d = u[i];
	if (d.length > 120) {
		let e = [];
		for (let t = 0; t < d.length; t += 80) e.push(d.slice(t, t + 80));
		let t = c - 1, n = Math.min(Math.floor(t / 80), e.length - 1), r = c - n * 80;
		return l + su([
			[`${o} |`, e[0]],
			...e.slice(1, n + 1).map((e) => ["|", e]),
			["|", "^".padStart(r)],
			["|", e[n + 1]]
		]);
	}
	return l + su([
		[`${o - 1} |`, u[i - 1]],
		[`${o} |`, d],
		["|", "^".padStart(c)],
		[`${o + 1} |`, u[i + 1]]
	]);
}
function su(e) {
	let t = e.filter(([e, t]) => t !== void 0), n = Math.max(...t.map(([e]) => e.length));
	return t.map(([e, t]) => e.padStart(n) + (t ? " " + t : "")).join("\n");
}
// ../../../node_modules/.pnpm/graphql@17.1.0/node_modules/graphql/error/GraphQLError.mjs
var G = class e extends Error {
	constructor(t, n = {}) {
		let { nodes: r, source: i, positions: a, path: o, originalError: s, cause: c, extensions: l } = n, u = "cause" in n;
		super(t, u || s != null ? { cause: u ? c : s } : void 0), this.name = "GraphQLError", this.path = o ?? void 0;
		let d = s ?? (c instanceof Error ? c : void 0);
		this.originalError = d, this.nodes = cu(Array.isArray(r) ? r : r ? [r] : void 0);
		let f = cu(this.nodes?.map((e) => e.loc).filter((e) => e != null));
		this.source = i ?? f?.[0]?.source, this.positions = a ?? f?.map((e) => e.start), this.locations = a && i ? iu(a.map((e) => ({
			source: i,
			start: e
		}))) : f && iu(f);
		let p = eu(d?.extensions) ? d.extensions : void 0;
		this.extensions = l ?? p ?? Object.create(null), Object.defineProperties(this, {
			message: {
				writable: !0,
				enumerable: !0
			},
			name: { enumerable: !1 },
			nodes: { enumerable: !1 },
			source: { enumerable: !1 },
			positions: { enumerable: !1 },
			originalError: { enumerable: !1 }
		}), s?.stack == null ? Error.captureStackTrace == null ? Object.defineProperty(this, "stack", {
			value: Error().stack,
			writable: !0,
			configurable: !0
		}) : Error.captureStackTrace(this, e) : Object.defineProperty(this, "stack", {
			value: s.stack,
			writable: !0,
			configurable: !0
		});
	}
	get [Symbol.toStringTag]() {
		return "GraphQLError";
	}
	toString() {
		let e = this.message;
		if (this.nodes) for (let t of this.nodes) t.loc && (e += "\n\n" + au(t.loc));
		else if (this.source && this.locations) for (let t of this.locations) e += "\n\n" + ou(this.source, t);
		return e;
	}
	toJSON() {
		let e = { message: this.message };
		return this.locations != null && (e.locations = this.locations), this.path != null && (e.path = this.path), this.extensions != null && Object.keys(this.extensions).length > 0 && (e.extensions = this.extensions), e;
	}
};
function cu(e) {
	return e === void 0 || e.length === 0 ? void 0 : e;
}
// ../../../node_modules/.pnpm/graphql@17.1.0/node_modules/graphql/error/ensureGraphQLError.mjs
function lu(e) {
	if (e instanceof G) return e;
	let t = Ql(e);
	return new G(t.message, { originalError: t });
}
// ../../../node_modules/.pnpm/graphql@17.1.0/node_modules/graphql/jsutils/capitalize.mjs
function uu(e) {
	return e.charAt(0).toUpperCase() + e.slice(1).toLowerCase();
}
// ../../../node_modules/.pnpm/graphql@17.1.0/node_modules/graphql/jsutils/invariant.mjs
function du(e, t) {
	if (!e) throw Error(t ?? "Unexpected invariant triggered.");
}
// ../../../node_modules/.pnpm/graphql@17.1.0/node_modules/graphql/jsutils/formatList.mjs
function fu(e) {
	return mu("or", e);
}
function pu(e) {
	return mu("and", e);
}
function mu(e, t) {
	switch (t.length === 0 && du(!1), t.length) {
		case 1: return t[0];
		case 2: return t[0] + " " + e + " " + t[1];
	}
	let n = t.slice(0, -1), r = t.at(-1);
	return n.join(", ") + ", " + e + " " + r;
}
// ../../../node_modules/.pnpm/graphql@17.1.0/node_modules/graphql/jsutils/isIterableObject.mjs
function hu(e) {
	return typeof e == "object" && typeof e?.[Symbol.iterator] == "function";
}
// ../../../node_modules/.pnpm/graphql@17.1.0/node_modules/graphql/jsutils/keyMap.mjs
function gu(e, t) {
	let n = Object.create(null);
	for (let r of e) n[t(r)] = r;
	return n;
}
// ../../../node_modules/.pnpm/graphql@17.1.0/node_modules/graphql/jsutils/mapValue.mjs
function _u(e, t) {
	let n = Object.create(null);
	for (let r of Object.keys(e)) n[r] = t(e[r], r);
	return n;
}
// ../../../node_modules/.pnpm/graphql@17.1.0/node_modules/graphql/jsutils/printPathArray.mjs
function vu(e) {
	return e.length === 0 ? "" : ` at ${e.map((e) => typeof e == "number" ? `[${e}]` : `.${e}`).join("")}`;
}
// ../../../node_modules/.pnpm/graphql@17.1.0/node_modules/graphql/language/ast.mjs
var yu = class {
	constructor(e, t, n) {
		this.start = e.start, this.end = t.end, this.startToken = e, this.endToken = t, this.source = n;
	}
	get [Symbol.toStringTag]() {
		return "Location";
	}
	toJSON() {
		return {
			start: this.start,
			end: this.end
		};
	}
}, bu = class {
	constructor(e, t, n, r, i, a) {
		this.kind = e, this.start = t, this.end = n, this.line = r, this.column = i, this.value = a, this.prev = null, this.next = null;
	}
	get [Symbol.toStringTag]() {
		return "Token";
	}
	toJSON() {
		return {
			kind: this.kind,
			value: this.value,
			line: this.line,
			column: this.column
		};
	}
}, xu = {
	Name: [],
	Document: ["definitions"],
	OperationDefinition: [
		"description",
		"name",
		"variableDefinitions",
		"directives",
		"selectionSet"
	],
	VariableDefinition: [
		"description",
		"variable",
		"type",
		"defaultValue",
		"directives"
	],
	Variable: ["name"],
	SelectionSet: ["selections"],
	Field: [
		"alias",
		"name",
		"arguments",
		"directives",
		"selectionSet"
	],
	Argument: ["name", "value"],
	FragmentArgument: ["name", "value"],
	FragmentSpread: [
		"name",
		"arguments",
		"directives"
	],
	InlineFragment: [
		"typeCondition",
		"directives",
		"selectionSet"
	],
	FragmentDefinition: [
		"description",
		"name",
		"variableDefinitions",
		"typeCondition",
		"directives",
		"selectionSet"
	],
	IntValue: [],
	FloatValue: [],
	StringValue: [],
	BooleanValue: [],
	NullValue: [],
	EnumValue: [],
	ListValue: ["values"],
	ObjectValue: ["fields"],
	ObjectField: ["name", "value"],
	Directive: ["name", "arguments"],
	NamedType: ["name"],
	ListType: ["type"],
	NonNullType: ["type"],
	SchemaDefinition: [
		"description",
		"directives",
		"operationTypes"
	],
	OperationTypeDefinition: ["type"],
	ScalarTypeDefinition: [
		"description",
		"name",
		"directives"
	],
	ObjectTypeDefinition: [
		"description",
		"name",
		"interfaces",
		"directives",
		"fields"
	],
	FieldDefinition: [
		"description",
		"name",
		"arguments",
		"type",
		"directives"
	],
	InputValueDefinition: [
		"description",
		"name",
		"type",
		"defaultValue",
		"directives"
	],
	InterfaceTypeDefinition: [
		"description",
		"name",
		"interfaces",
		"directives",
		"fields"
	],
	UnionTypeDefinition: [
		"description",
		"name",
		"directives",
		"types"
	],
	EnumTypeDefinition: [
		"description",
		"name",
		"directives",
		"values"
	],
	EnumValueDefinition: [
		"description",
		"name",
		"directives"
	],
	InputObjectTypeDefinition: [
		"description",
		"name",
		"directives",
		"fields"
	],
	DirectiveDefinition: [
		"description",
		"name",
		"arguments",
		"directives",
		"locations"
	],
	SchemaExtension: ["directives", "operationTypes"],
	DirectiveExtension: ["name", "directives"],
	ScalarTypeExtension: ["name", "directives"],
	ObjectTypeExtension: [
		"name",
		"interfaces",
		"directives",
		"fields"
	],
	InterfaceTypeExtension: [
		"name",
		"interfaces",
		"directives",
		"fields"
	],
	UnionTypeExtension: [
		"name",
		"directives",
		"types"
	],
	EnumTypeExtension: [
		"name",
		"directives",
		"values"
	],
	InputObjectTypeExtension: [
		"name",
		"directives",
		"fields"
	],
	TypeCoordinate: ["name"],
	MemberCoordinate: ["name", "memberName"],
	ArgumentCoordinate: [
		"name",
		"fieldName",
		"argumentName"
	],
	DirectiveCoordinate: ["name"],
	DirectiveArgumentCoordinate: ["name", "argumentName"]
}, Su = new Set(Object.keys(xu));
function Cu(e) {
	let t = e?.kind;
	return typeof t == "string" && Su.has(t);
}
var wu = {
	QUERY: "query",
	MUTATION: "mutation",
	SUBSCRIPTION: "subscription"
}, Tu = /* @__PURE__ */ pi({
	ARGUMENT: () => Mu,
	ARGUMENT_COORDINATE: () => yd,
	BOOLEAN: () => Vu,
	DIRECTIVE: () => qu,
	DIRECTIVE_ARGUMENT_COORDINATE: () => xd,
	DIRECTIVE_COORDINATE: () => bd,
	DIRECTIVE_DEFINITION: () => cd,
	DIRECTIVE_EXTENSION: () => ud,
	DOCUMENT: () => Du,
	ENUM: () => Uu,
	ENUM_TYPE_DEFINITION: () => ad,
	ENUM_TYPE_EXTENSION: () => hd,
	ENUM_VALUE_DEFINITION: () => od,
	FIELD: () => ju,
	FIELD_DEFINITION: () => td,
	FLOAT: () => zu,
	FRAGMENT_ARGUMENT: () => Nu,
	FRAGMENT_DEFINITION: () => Iu,
	FRAGMENT_SPREAD: () => Pu,
	INLINE_FRAGMENT: () => Fu,
	INPUT_OBJECT_TYPE_DEFINITION: () => sd,
	INPUT_OBJECT_TYPE_EXTENSION: () => gd,
	INPUT_VALUE_DEFINITION: () => nd,
	INT: () => Ru,
	INTERFACE_TYPE_DEFINITION: () => rd,
	INTERFACE_TYPE_EXTENSION: () => pd,
	LIST: () => Wu,
	LIST_TYPE: () => Yu,
	MEMBER_COORDINATE: () => vd,
	NAME: () => Eu,
	NAMED_TYPE: () => Ju,
	NON_NULL_TYPE: () => Xu,
	NULL: () => Hu,
	OBJECT: () => Gu,
	OBJECT_FIELD: () => Ku,
	OBJECT_TYPE_DEFINITION: () => ed,
	OBJECT_TYPE_EXTENSION: () => fd,
	OPERATION_DEFINITION: () => Ou,
	OPERATION_TYPE_DEFINITION: () => Qu,
	SCALAR_TYPE_DEFINITION: () => $u,
	SCALAR_TYPE_EXTENSION: () => dd,
	SCHEMA_DEFINITION: () => Zu,
	SCHEMA_EXTENSION: () => ld,
	SELECTION_SET: () => Au,
	STRING: () => Bu,
	TYPE_COORDINATE: () => _d,
	UNION_TYPE_DEFINITION: () => id,
	UNION_TYPE_EXTENSION: () => md,
	VARIABLE: () => Lu,
	VARIABLE_DEFINITION: () => ku
}), Eu = "Name", Du = "Document", Ou = "OperationDefinition", ku = "VariableDefinition", Au = "SelectionSet", ju = "Field", Mu = "Argument", Nu = "FragmentArgument", Pu = "FragmentSpread", Fu = "InlineFragment", Iu = "FragmentDefinition", Lu = "Variable", Ru = "IntValue", zu = "FloatValue", Bu = "StringValue", Vu = "BooleanValue", Hu = "NullValue", Uu = "EnumValue", Wu = "ListValue", Gu = "ObjectValue", Ku = "ObjectField", qu = "Directive", Ju = "NamedType", Yu = "ListType", Xu = "NonNullType", Zu = "SchemaDefinition", Qu = "OperationTypeDefinition", $u = "ScalarTypeDefinition", ed = "ObjectTypeDefinition", td = "FieldDefinition", nd = "InputValueDefinition", rd = "InterfaceTypeDefinition", id = "UnionTypeDefinition", ad = "EnumTypeDefinition", od = "EnumValueDefinition", sd = "InputObjectTypeDefinition", cd = "DirectiveDefinition", ld = "SchemaExtension", ud = "DirectiveExtension", dd = "ScalarTypeExtension", fd = "ObjectTypeExtension", pd = "InterfaceTypeExtension", md = "UnionTypeExtension", hd = "EnumTypeExtension", gd = "InputObjectTypeExtension", _d = "TypeCoordinate", vd = "MemberCoordinate", yd = "ArgumentCoordinate", bd = "DirectiveCoordinate", xd = "DirectiveArgumentCoordinate";
// ../../../node_modules/.pnpm/graphql@17.1.0/node_modules/graphql/jsutils/devAssert.mjs
function Sd(e, t) {
	if (!e) throw Error(t);
}
// ../../../node_modules/.pnpm/graphql@17.1.0/node_modules/graphql/jsutils/didYouMean.mjs
var Cd = 5;
function wd(e, t) {
	let [n, r] = t ? [e, t] : [void 0, e];
	if (r.length === 0) return "";
	let i = " Did you mean ";
	n != null && (i += n + " ");
	let a = fu(r.slice(0, Cd).map((e) => `"${e}"`));
	return i + a + "?";
}
// ../../../node_modules/.pnpm/graphql@17.1.0/node_modules/graphql/jsutils/identityFunc.mjs
function Td(e) {
	return e;
}
// ../../../node_modules/.pnpm/graphql@17.1.0/node_modules/graphql/jsutils/keyValMap.mjs
function Ed(e, t, n) {
	let r = Object.create(null);
	for (let i of e) r[t(i)] = n(i);
	return r;
}
// ../../../node_modules/.pnpm/graphql@17.1.0/node_modules/graphql/jsutils/naturalCompare.mjs
function Dd(e, t) {
	let n = 0, r = 0;
	for (; n < e.length && r < t.length;) {
		let i = e.charCodeAt(n), a = t.charCodeAt(r);
		if (Ad(i) && Ad(a)) {
			let o = 0;
			do
				++n, o = o * 10 + i - Od, i = e.charCodeAt(n);
			while (Ad(i) && o > 0);
			let s = 0;
			do
				++r, s = s * 10 + a - Od, a = t.charCodeAt(r);
			while (Ad(a) && s > 0);
			if (o < s) return -1;
			if (o > s) return 1;
		} else {
			if (i < a) return -1;
			if (i > a) return 1;
			++n, ++r;
		}
	}
	return e.length - t.length;
}
var Od = 48, kd = 57;
function Ad(e) {
	return !isNaN(e) && Od <= e && e <= kd;
}
// ../../../node_modules/.pnpm/graphql@17.1.0/node_modules/graphql/jsutils/suggestionList.mjs
function jd(e, t) {
	let n = Object.create(null), r = new Md(e), i = Math.floor(e.length * .4) + 1;
	for (let e of t) {
		let t = r.measure(e, i);
		t !== void 0 && (n[e] = t);
	}
	return Object.keys(n).sort((e, t) => {
		let r = n[e] - n[t];
		return r === 0 ? Dd(e, t) : r;
	});
}
var Md = class {
	constructor(e) {
		this._input = e, this._inputLowerCase = e.toLowerCase(), this._inputArray = Nd(this._inputLowerCase), this._rows = [
			Array(e.length + 1).fill(0),
			Array(e.length + 1).fill(0),
			Array(e.length + 1).fill(0)
		];
	}
	measure(e, t) {
		if (this._input === e) return 0;
		let n = e.toLowerCase();
		if (this._inputLowerCase === n) return 1;
		let r = Nd(n), i = this._inputArray;
		if (r.length < i.length) {
			let e = r;
			r = i, i = e;
		}
		let a = r.length, o = i.length;
		if (a - o > t) return;
		let s = this._rows;
		for (let e = 0; e <= o; e++) s[0][e] = e;
		for (let e = 1; e <= a; e++) {
			let n = s[(e - 1) % 3], a = s[e % 3], c = a[0] = e;
			for (let t = 1; t <= o; t++) {
				let o = r[e - 1] === i[t - 1] ? 0 : 1, l = Math.min(n[t] + 1, a[t - 1] + 1, n[t - 1] + o);
				if (e > 1 && t > 1 && r[e - 1] === i[t - 2] && r[e - 2] === i[t - 1]) {
					let n = s[(e - 2) % 3][t - 2];
					l = Math.min(l, n + 1);
				}
				l < c && (c = l), a[t] = l;
			}
			if (c > t) return;
		}
		let c = s[a % 3][o];
		return c <= t ? c : void 0;
	}
};
function Nd(e) {
	let t = e.length, n = Array(t);
	for (let r = 0; r < t; ++r) n[r] = e.charCodeAt(r);
	return n;
}
// ../../../node_modules/.pnpm/graphql@17.1.0/node_modules/graphql/jsutils/toObjMap.mjs
function Pd(e) {
	if (e == null) return Object.create(null);
	if (Object.getPrototypeOf(e) === null) return e;
	let t = Object.create(null);
	for (let [n, r] of Object.entries(e)) t[n] = r;
	for (let n of Object.getOwnPropertySymbols(e)) t[n] = e[n];
	return t;
}
// ../../../node_modules/.pnpm/graphql@17.1.0/node_modules/graphql/language/characterClasses.mjs
function Fd(e) {
	return e === 9 || e === 32;
}
function Id(e) {
	return e >= 48 && e <= 57;
}
function Ld(e) {
	return e >= 97 && e <= 122 || e >= 65 && e <= 90;
}
function Rd(e) {
	return Ld(e) || e === 95;
}
function zd(e) {
	return Ld(e) || Id(e) || e === 95;
}
// ../../../node_modules/.pnpm/graphql@17.1.0/node_modules/graphql/language/blockString.mjs
function Bd(e) {
	let t = 2 ** 53 - 1, n = null, r = -1;
	for (let i = 0; i < e.length; ++i) {
		let a = e[i], o = Vd(a);
		o !== a.length && (n ??= i, r = i, i !== 0 && o < t && (t = o));
	}
	return e.map((e, n) => n === 0 ? e : e.slice(t)).slice(n ?? 0, r + 1);
}
function Vd(e) {
	let t = 0;
	for (; t < e.length && Fd(e.charCodeAt(t));) ++t;
	return t;
}
function Hd(e) {
	if (e === "") return !0;
	let t = !0, n = !1, r = !0, i = !1;
	for (let a = 0; a < e.length; ++a) switch (e.codePointAt(a)) {
		case 0:
		case 1:
		case 2:
		case 3:
		case 4:
		case 5:
		case 6:
		case 7:
		case 8:
		case 11:
		case 12:
		case 14:
		case 15: return !1;
		case 13: return !1;
		case 10:
			if (t && !i) return !1;
			i = !0, t = !0, n = !1;
			break;
		case 9:
		case 32:
			n ||= t;
			break;
		default: r &&= n, t = !1;
	}
	return !(t || r && i);
}
function Ud(e, t) {
	let n = e.replaceAll("\"\"\"", "\\\"\"\""), r = n.split(/\r\n|[\n\r]/g), i = r.length === 1, a = r.length > 1 && r.slice(1).every((e) => e.length === 0 || Fd(e.charCodeAt(0))), o = n.endsWith("\\\"\"\""), s = e.endsWith("\"") && !o, c = e.endsWith("\\"), l = s || c, u = !t?.minimize && (!i || e.length > 70 || l || a || o), d = "", f = i && Fd(e.charCodeAt(0));
	return (u && !f || a) && (d += "\n"), d += n, (u || l) && (d += "\n"), "\"\"\"" + d + "\"\"\"";
}
// ../../../node_modules/.pnpm/graphql@17.1.0/node_modules/graphql/language/printString.mjs
function Wd(e) {
	return `"${e.replace(Gd, Kd)}"`;
}
var Gd = /[\x00-\x1f\x22\x5c\x7f-\x9f]/g;
function Kd(e) {
	return qd[e.charCodeAt(0)];
}
var qd = /* @__PURE__ */ "\\u0000.\\u0001.\\u0002.\\u0003.\\u0004.\\u0005.\\u0006.\\u0007.\\b.\\t.\\n.\\u000B.\\f.\\r.\\u000E.\\u000F.\\u0010.\\u0011.\\u0012.\\u0013.\\u0014.\\u0015.\\u0016.\\u0017.\\u0018.\\u0019.\\u001A.\\u001B.\\u001C.\\u001D.\\u001E.\\u001F...\\\"..........................................................\\\\...................................\\u007F.\\u0080.\\u0081.\\u0082.\\u0083.\\u0084.\\u0085.\\u0086.\\u0087.\\u0088.\\u0089.\\u008A.\\u008B.\\u008C.\\u008D.\\u008E.\\u008F.\\u0090.\\u0091.\\u0092.\\u0093.\\u0094.\\u0095.\\u0096.\\u0097.\\u0098.\\u0099.\\u009A.\\u009B.\\u009C.\\u009D.\\u009E.\\u009F".split(".");
// ../../../node_modules/.pnpm/graphql@17.1.0/node_modules/graphql/language/reducer.mjs
function Jd(e, t) {
	let n = [], r = {
		parent: [e],
		keys: void 0,
		results: [],
		index: -1
	}, i;
	do {
		let e;
		r.index++;
		let a = r.keys === void 0 ? r.parent.length : r.keys.length;
		if (r.index === a) i = r.results, e = r.keys === void 0 ? void 0 : r.results.kind, r = n.pop();
		else {
			if (i = r.keys === void 0 ? r.parent[r.index] : r.parent[r.keys[r.index]], i == null && n.length !== 0) continue;
			if (Array.isArray(i)) {
				if (i.length !== 0) {
					n.push(r), r = {
						parent: i,
						keys: void 0,
						results: [],
						index: -1
					};
					continue;
				}
			} else {
				let t = i;
				e = t?.kind;
				let a = typeof e == "string" ? xu[e] : void 0;
				if (!Array.isArray(a)) throw Error(`Invalid AST Node: ${W(i)}.`);
				if (a.length !== 0) {
					n.push(r), r = {
						parent: t,
						keys: a,
						results: { ...t },
						index: -1
					};
					continue;
				}
			}
		}
		if (e !== void 0) {
			let n = t[e];
			i = n?.(i);
		}
		r.keys === void 0 ? r.results.push(i) : r.results[r.keys[r.index]] = i;
	} while (n.length !== 0);
	return i;
}
// ../../../node_modules/.pnpm/graphql@17.1.0/node_modules/graphql/language/printer.mjs
function Yd(e, t) {
	return ef(Jd(e, tf), t?.maxIndentDepth ?? Infinity);
}
function Xd(e) {
	return Yd(e, { maxIndentDepth: 100 });
}
var Zd = 80, Qd = class e {
	constructor(e = "", t = !1) {
		this.next = void 0, this.tail = this, this.indentBefore = !1, this.dedentAfter = !1, this.length = e.length, this.lines = e.includes("\n") ? e.split("\n") : e, this.newlines = typeof this.lines == "string" ? 0 : this.lines.length - 1, this.isBlockString = t;
	}
	append(t) {
		if (t.length === 0) return this;
		let n = typeof t == "string" ? new e(t) : t;
		return this.tail.next = n, this.tail = n.tail, this.length += n.length, this.newlines += n.newlines, this;
	}
	indent() {
		return this.length === 0 || (this.indentBefore = !0, this.tail.dedentAfter = !0, this.length += 2 * (this.newlines + 1)), this;
	}
}, $d = new Qd();
function ef(e, t) {
	let n = "", r = "", i = 0, a = "", o = e;
	for (; o !== void 0;) {
		let e = o.lines;
		if (o.indentBefore && (i < t && (a += "  ", r += "  "), i++), typeof e == "string") r += e;
		else {
			r += e[0];
			let s = !o.isBlockString && i >= t ? " " : "\n" + a;
			for (let t = 1; t < e.length; t++) n += r, r = s + e[t];
		}
		o.dedentAfter && (i--, a = a.slice(0, i * 2)), o = o.next;
	}
	return n + r;
}
var tf = {
	Name: (e) => new Qd(e.value),
	Variable: (e) => K(["$", e.name]),
	Document: (e) => K(e.definitions, "\n\n"),
	OperationDefinition(e) {
		let t = af(e.variableDefinitions) ? q("(\n", K(e.variableDefinitions, "\n"), "\n)") : q("(", K(e.variableDefinitions, ", "), ")"), n = K([q("", e.description, "\n"), K([
			e.operation,
			K([e.name, t]),
			K(e.directives, " ")
		], " ")]);
		return K([e.operation === "query" && n.length === e.operation.length ? "" : K([n, " "]), e.selectionSet]);
	},
	VariableDefinition: ({ variable: e, type: t, defaultValue: n, directives: r, description: i }) => K([
		q("", i, "\n"),
		e,
		": ",
		t,
		q(" = ", n),
		q(" ", K(r, " "))
	]),
	SelectionSet: ({ selections: e }) => e.length === 0 ? new Qd("{}") : rf(e),
	Field({ alias: e, name: t, arguments: n, directives: r, selectionSet: i }) {
		return K([
			of(K([q("", e, ": "), t], ""), n),
			q(" ", K(r, " ")),
			q(" ", i)
		]);
	},
	Argument: ({ name: e, value: t }) => K([
		e,
		": ",
		t
	]),
	FragmentArgument: ({ name: e, value: t }) => K([
		e,
		": ",
		t
	]),
	FragmentSpread: ({ name: e, arguments: t, directives: n }) => K([of(K(["...", e]), t), q(" ", K(n, " "))]),
	InlineFragment: ({ typeCondition: e, directives: t, selectionSet: n }) => K([
		"...",
		q("on ", e),
		K(t, " "),
		n
	], " "),
	FragmentDefinition: ({ name: e, typeCondition: t, variableDefinitions: n, directives: r, selectionSet: i, description: a }) => K([
		q("", a, "\n"),
		"fragment ",
		e,
		q("(", K(n, ", "), ")"),
		" on ",
		t,
		" ",
		q("", K(r, " "), " "),
		i
	]),
	IntValue: ({ value: e }) => new Qd(e),
	FloatValue: ({ value: e }) => new Qd(e),
	StringValue: ({ value: e, block: t }) => new Qd(t === !0 ? Ud(e) : Wd(e), t === !0),
	BooleanValue: ({ value: e }) => new Qd(e ? "true" : "false"),
	NullValue: () => new Qd("null"),
	EnumValue: ({ value: e }) => new Qd(e),
	ListValue: ({ values: e }) => 2 + nf(e, ", ") > Zd ? q("[\n", K(e, "\n").indent(), "\n]") : K([
		"[",
		K(e, ", "),
		"]"
	]),
	ObjectValue: ({ fields: e }) => 4 + nf(e, ", ") > Zd ? rf(e) : K([
		"{ ",
		K(e, ", "),
		" }"
	]),
	ObjectField: ({ name: e, value: t }) => K([
		e,
		": ",
		t
	]),
	Directive: ({ name: e, arguments: t }) => K([
		"@",
		e,
		q("(", K(t, ", "), ")")
	]),
	NamedType: ({ name: e }) => e,
	ListType: ({ type: e }) => K([
		"[",
		e,
		"]"
	]),
	NonNullType: ({ type: e }) => K([e, "!"]),
	SchemaDefinition: ({ description: e, directives: t, operationTypes: n }) => K([q("", e, "\n"), K([
		"schema",
		K(t, " "),
		rf(n)
	], " ")]),
	OperationTypeDefinition: ({ operation: e, type: t }) => K([
		e,
		": ",
		t
	]),
	ScalarTypeDefinition: ({ description: e, name: t, directives: n }) => K([q("", e, "\n"), K([
		"scalar",
		t,
		K(n, " ")
	], " ")]),
	ObjectTypeDefinition: ({ description: e, name: t, interfaces: n, directives: r, fields: i }) => K([q("", e, "\n"), K([
		"type",
		t,
		q("implements ", K(n, " & ")),
		K(r, " "),
		rf(i)
	], " ")]),
	FieldDefinition: ({ description: e, name: t, arguments: n, type: r, directives: i }) => K([
		q("", e, "\n"),
		t,
		af(n) ? q("(\n", K(n, "\n").indent(), "\n)") : q("(", K(n, ", "), ")"),
		": ",
		r,
		q(" ", K(i, " "))
	]),
	InputValueDefinition: ({ description: e, name: t, type: n, defaultValue: r, directives: i }) => K([
		q("", e, "\n"),
		t,
		": ",
		n,
		q(" = ", r),
		q(" ", K(i, " "))
	]),
	InterfaceTypeDefinition: ({ description: e, name: t, interfaces: n, directives: r, fields: i }) => K([q("", e, "\n"), K([
		"interface",
		t,
		q("implements ", K(n, " & ")),
		K(r, " "),
		rf(i)
	], " ")]),
	UnionTypeDefinition: ({ description: e, name: t, directives: n, types: r }) => K([q("", e, "\n"), K([
		"union",
		t,
		K(n, " "),
		q("= ", K(r, " | "))
	], " ")]),
	EnumTypeDefinition: ({ description: e, name: t, directives: n, values: r }) => K([q("", e, "\n"), K([
		"enum",
		t,
		K(n, " "),
		rf(r)
	], " ")]),
	EnumValueDefinition: ({ description: e, name: t, directives: n }) => K([q("", e, "\n"), K([t, K(n, " ")], " ")]),
	InputObjectTypeDefinition: ({ description: e, name: t, directives: n, fields: r }) => K([q("", e, "\n"), K([
		"input",
		t,
		K(n, " "),
		rf(r)
	], " ")]),
	DirectiveDefinition: ({ description: e, name: t, arguments: n, directives: r, repeatable: i, locations: a }) => K([
		q("", e, "\n"),
		"directive @",
		t,
		af(n) ? q("(\n", K(n, "\n").indent(), "\n)") : q("(", K(n, ", "), ")"),
		q(" ", K(r, " ")),
		i ? " repeatable" : "",
		" on ",
		K(a, " | ")
	]),
	SchemaExtension: ({ directives: e, operationTypes: t }) => K([
		"extend schema",
		K(e, " "),
		rf(t)
	], " "),
	ScalarTypeExtension: ({ name: e, directives: t }) => K([
		"extend scalar",
		e,
		K(t, " ")
	], " "),
	ObjectTypeExtension: ({ name: e, interfaces: t, directives: n, fields: r }) => K([
		"extend type",
		e,
		q("implements ", K(t, " & ")),
		K(n, " "),
		rf(r)
	], " "),
	InterfaceTypeExtension: ({ name: e, interfaces: t, directives: n, fields: r }) => K([
		"extend interface",
		e,
		q("implements ", K(t, " & ")),
		K(n, " "),
		rf(r)
	], " "),
	UnionTypeExtension: ({ name: e, directives: t, types: n }) => K([
		"extend union",
		e,
		K(t, " "),
		q("= ", K(n, " | "))
	], " "),
	EnumTypeExtension: ({ name: e, directives: t, values: n }) => K([
		"extend enum",
		e,
		K(t, " "),
		rf(n)
	], " "),
	InputObjectTypeExtension: ({ name: e, directives: t, fields: n }) => K([
		"extend input",
		e,
		K(t, " "),
		rf(n)
	], " "),
	DirectiveExtension: ({ name: e, directives: t }) => K([K(["extend directive @", e]), K(t, " ")], " "),
	TypeCoordinate: ({ name: e }) => e,
	MemberCoordinate: ({ name: e, memberName: t }) => K([e, q(".", t)]),
	ArgumentCoordinate: ({ name: e, fieldName: t, argumentName: n }) => K([
		e,
		q(".", t),
		q("(", n, ":)")
	]),
	DirectiveCoordinate: ({ name: e }) => K(["@", e]),
	DirectiveArgumentCoordinate: ({ name: e, argumentName: t }) => K([
		"@",
		e,
		q("(", t, ":)")
	])
};
function K(e, t = "") {
	if (e == null || e.length === 0) return $d;
	let n = $d;
	for (let r of e) r !== void 0 && r.length !== 0 && (n.length === 0 ? n = typeof r == "string" ? new Qd(r) : r : (t !== "" && n.append(t), n.append(r)));
	return n;
}
function nf(e, t) {
	let n = 0;
	for (let r of e) r.length !== 0 && (n += (n === 0 ? 0 : t.length) + r.length);
	return n;
}
function rf(e) {
	return q("{\n", K(e, "\n").indent(), "\n}");
}
function q(e, t, n = "") {
	return t != null && t.length !== 0 ? e === "" ? t.append(n) : new Qd(e).append(t).append(n) : $d;
}
function af(e) {
	return e?.some((e) => e.newlines !== 0) ?? !1;
}
function of(e, t) {
	return t == null || t.length === 0 ? e : K([e, e.length + nf(t, ", ") + 2 > Zd ? q("(\n", K(t, "\n").indent(), "\n)") : q("(", K(t, ", "), ")")]);
}
// ../../../node_modules/.pnpm/graphql@17.1.0/node_modules/graphql/utilities/valueFromASTUntyped.mjs
function sf(e, t) {
	switch (e.kind) {
		case Hu: return null;
		case Ru: return parseInt(e.value, 10);
		case zu: return parseFloat(e.value);
		case Bu:
		case Uu:
		case Vu: return e.value;
		case Wu: return e.values.map((e) => sf(e, t));
		case Gu: return Ed(e.fields, (e) => e.name.value, (e) => sf(e.value, t));
		case Lu: return t?.[e.name.value];
	}
}
// ../../../node_modules/.pnpm/graphql@17.1.0/node_modules/graphql/type/assertName.mjs
function cf(e) {
	if (e.length === 0) throw new G("Expected name to be a non-empty string.");
	for (let t = 1; t < e.length; ++t) if (!zd(e.charCodeAt(t))) throw new G(`Names must only contain [_a-zA-Z0-9] but "${e}" does not.`);
	if (!Rd(e.charCodeAt(0))) throw new G(`Names must start with [_a-zA-Z] but "${e}" does not.`);
	return e;
}
function lf(e) {
	if (e === "true" || e === "false" || e === "null") throw new G(`Enum values cannot be named: ${e}`);
	return cf(e);
}
// ../../../node_modules/.pnpm/graphql@17.1.0/node_modules/graphql/type/definition.mjs
function uf(e) {
	return ff(e) || mf(e) || bf(e) || Cf(e) || Tf(e) || Of(e) || jf(e) || Nf(e);
}
var df = Symbol("Scalar");
function ff(e) {
	return Yl(e, df, Yf);
}
var pf = Symbol("Object");
function mf(e) {
	return Yl(e, pf, Xf);
}
function hf(e) {
	if (!mf(e)) throw Error(`Expected ${W(e)} to be a GraphQL Object type.`);
	return e;
}
var gf = Symbol("Field"), _f = Symbol("Argument");
function vf(e) {
	return Yl(e, _f, ep);
}
var yf = Symbol("Interface");
function bf(e) {
	return Yl(e, yf, np);
}
function xf(e) {
	if (!bf(e)) throw Error(`Expected ${W(e)} to be a GraphQL Interface type.`);
	return e;
}
var Sf = Symbol("Union");
function Cf(e) {
	return Yl(e, Sf, rp);
}
var wf = Symbol("Enum");
function Tf(e) {
	return Yl(e, wf, ap);
}
var Ef = Symbol("EnumValue"), Df = Symbol("InputObject");
function Of(e) {
	return Yl(e, Df, lp);
}
var kf = Symbol("InputField"), Af = Symbol("List");
function jf(e) {
	return Yl(e, Af, Bf);
}
var Mf = Symbol("NonNull");
function Nf(e) {
	return Yl(e, Mf, J);
}
function Pf(e) {
	return ff(e) || Tf(e) || Of(e) || Vf(e) && Pf(e.ofType);
}
function Ff(e) {
	return ff(e) || mf(e) || bf(e) || Cf(e) || Tf(e) || Vf(e) && Ff(e.ofType);
}
function If(e) {
	return ff(e) || Tf(e);
}
function Lf(e) {
	if (!If(e)) throw Error(`Expected ${W(e)} to be a GraphQL leaf type.`);
	return e;
}
function Rf(e) {
	return mf(e) || bf(e) || Cf(e);
}
function zf(e) {
	return bf(e) || Cf(e);
}
var Bf = class {
	constructor(e) {
		this.__kind = Af, this.ofType = e;
	}
	get [Symbol.toStringTag]() {
		return "GraphQLList";
	}
	toString() {
		return "[" + String(this.ofType) + "]";
	}
	toJSON() {
		return this.toString();
	}
}, J = class {
	constructor(e) {
		this.__kind = Mf, this.ofType = e;
	}
	get [Symbol.toStringTag]() {
		return "GraphQLNonNull";
	}
	toString() {
		return String(this.ofType) + "!";
	}
	toJSON() {
		return this.toString();
	}
};
function Vf(e) {
	return jf(e) || Nf(e);
}
function Hf(e) {
	return uf(e) && !Nf(e);
}
function Uf(e) {
	if (!Hf(e)) throw Error(`Expected ${W(e)} to be a GraphQL nullable type.`);
	return e;
}
function Wf(e) {
	if (e) return Nf(e) ? e.ofType : e;
}
function Gf(e) {
	return ff(e) || mf(e) || bf(e) || Cf(e) || Tf(e) || Of(e);
}
function Kf(e) {
	if (e) {
		let t = e;
		for (; Vf(t);) t = t.ofType;
		return t;
	}
}
function qf(e) {
	return typeof e == "function" ? e() : e;
}
function Jf(e) {
	return typeof e == "function" ? e() : e;
}
var Yf = class {
	constructor(e) {
		this.__kind = df, this.name = cf(e.name), this.description = e.description, this.specifiedByURL = e.specifiedByURL, this.serialize = e.serialize ?? e.coerceOutputValue ?? Td, this.parseValue = e.parseValue ?? e.coerceInputValue ?? Td, this.parseLiteral = e.parseLiteral ?? ((e, t) => this.coerceInputValue(sf(e, t))), this.coerceOutputValue = e.coerceOutputValue ?? this.serialize, this.coerceInputValue = e.coerceInputValue ?? this.parseValue, this.coerceInputLiteral = e.coerceInputLiteral, this.valueToLiteral = e.valueToLiteral, this.extensions = Pd(e.extensions), this.astNode = e.astNode, this.extensionASTNodes = e.extensionASTNodes ?? [], e.parseLiteral && (typeof e.parseValue != "function" || typeof e.parseLiteral != "function") && Sd(!1, `${this.name} must provide both "parseValue" and "parseLiteral" functions.`), e.coerceInputLiteral && (typeof e.coerceInputValue != "function" || typeof e.coerceInputLiteral != "function") && Sd(!1, `${this.name} must provide both "coerceInputValue" and "coerceInputLiteral" functions.`);
	}
	get [Symbol.toStringTag]() {
		return "GraphQLScalarType";
	}
	toConfig() {
		return {
			name: this.name,
			description: this.description,
			specifiedByURL: this.specifiedByURL,
			serialize: this.serialize,
			parseValue: this.parseValue,
			parseLiteral: this.parseLiteral,
			coerceOutputValue: this.coerceOutputValue,
			coerceInputValue: this.coerceInputValue,
			coerceInputLiteral: this.coerceInputLiteral,
			valueToLiteral: this.valueToLiteral,
			extensions: this.extensions,
			astNode: this.astNode,
			extensionASTNodes: this.extensionASTNodes
		};
	}
	toString() {
		return this.name;
	}
	toJSON() {
		return this.toString();
	}
}, Xf = class {
	constructor(e) {
		this.__kind = pf, this.__kind = pf, this.name = cf(e.name), this.description = e.description, this.isTypeOf = e.isTypeOf, this.extensions = Pd(e.extensions), this.astNode = e.astNode, this.extensionASTNodes = e.extensionASTNodes ?? [], this._fields = Qf.bind(void 0, this, e.fields), this._interfaces = Zf.bind(void 0, e.interfaces);
	}
	get [Symbol.toStringTag]() {
		return "GraphQLObjectType";
	}
	getFields() {
		return typeof this._fields == "function" && (this._fields = this._fields()), this._fields;
	}
	getInterfaces() {
		return typeof this._interfaces == "function" && (this._interfaces = this._interfaces()), this._interfaces;
	}
	toConfig() {
		return {
			name: this.name,
			description: this.description,
			interfaces: this.getInterfaces(),
			fields: _u(this.getFields(), (e) => e.toConfig()),
			isTypeOf: this.isTypeOf,
			extensions: this.extensions,
			astNode: this.astNode,
			extensionASTNodes: this.extensionASTNodes
		};
	}
	toString() {
		return this.name;
	}
	toJSON() {
		return this.toString();
	}
};
function Zf(e) {
	return qf(e ?? []);
}
function Qf(e, t) {
	return _u(Jf(t), (t, n) => new $f(e, n, t));
}
var $f = class {
	constructor(e, t, n) {
		this.__kind = gf, this.parentType = e, this.name = cf(t), this.description = n.description, this.type = n.type;
		let r = n.args;
		this.args = r ? Object.entries(r).map(([e, t]) => new ep(this, e, t)) : [], this.resolve = n.resolve, this.subscribe = n.subscribe, this.deprecationReason = n.deprecationReason, this.extensions = Pd(n.extensions), this.astNode = n.astNode;
	}
	get [Symbol.toStringTag]() {
		return "GraphQLField";
	}
	toConfig() {
		return {
			description: this.description,
			type: this.type,
			args: Ed(this.args, (e) => e.name, (e) => e.toConfig()),
			resolve: this.resolve,
			subscribe: this.subscribe,
			deprecationReason: this.deprecationReason,
			extensions: this.extensions,
			astNode: this.astNode
		};
	}
	toString() {
		return `${this.parentType ?? "<meta>"}.${this.name}`;
	}
	toJSON() {
		return this.toString();
	}
}, ep = class {
	constructor(e, t, n) {
		this.__kind = _f, this.parent = e, this.name = cf(t), this.description = n.description, this.type = n.type, this.defaultValue = n.defaultValue, this.default = n.default, this._memoizedCoercedDefaultValue = void 0, this.deprecationReason = n.deprecationReason, this.extensions = Pd(n.extensions), this.astNode = n.astNode;
	}
	get [Symbol.toStringTag]() {
		return "GraphQLArgument";
	}
	toConfig() {
		return {
			description: this.description,
			type: this.type,
			defaultValue: this.defaultValue,
			default: this.default,
			deprecationReason: this.deprecationReason,
			extensions: this.extensions,
			astNode: this.astNode
		};
	}
	toString() {
		return `${this.parent}(${this.name}:)`;
	}
	toJSON() {
		return this.toString();
	}
};
function tp(e) {
	return Nf(e.type) && e.default === void 0 && e.defaultValue === void 0;
}
var np = class {
	constructor(e) {
		this.__kind = yf, this.name = cf(e.name), this.description = e.description, this.resolveType = e.resolveType, this.extensions = Pd(e.extensions), this.astNode = e.astNode, this.extensionASTNodes = e.extensionASTNodes ?? [], this._fields = Qf.bind(void 0, this, e.fields), this._interfaces = Zf.bind(void 0, e.interfaces);
	}
	get [Symbol.toStringTag]() {
		return "GraphQLInterfaceType";
	}
	getFields() {
		return typeof this._fields == "function" && (this._fields = this._fields()), this._fields;
	}
	getInterfaces() {
		return typeof this._interfaces == "function" && (this._interfaces = this._interfaces()), this._interfaces;
	}
	toConfig() {
		return {
			name: this.name,
			description: this.description,
			interfaces: this.getInterfaces(),
			fields: _u(this.getFields(), (e) => e.toConfig()),
			resolveType: this.resolveType,
			extensions: this.extensions,
			astNode: this.astNode,
			extensionASTNodes: this.extensionASTNodes
		};
	}
	toString() {
		return this.name;
	}
	toJSON() {
		return this.toString();
	}
}, rp = class {
	constructor(e) {
		this.__kind = Sf, this.name = cf(e.name), this.description = e.description, this.resolveType = e.resolveType, this.extensions = Pd(e.extensions), this.astNode = e.astNode, this.extensionASTNodes = e.extensionASTNodes ?? [], this._types = ip.bind(void 0, e.types);
	}
	get [Symbol.toStringTag]() {
		return "GraphQLUnionType";
	}
	getTypes() {
		return typeof this._types == "function" && (this._types = this._types()), this._types;
	}
	toConfig() {
		return {
			name: this.name,
			description: this.description,
			types: this.getTypes(),
			resolveType: this.resolveType,
			extensions: this.extensions,
			astNode: this.astNode,
			extensionASTNodes: this.extensionASTNodes
		};
	}
	toString() {
		return this.name;
	}
	toJSON() {
		return this.toString();
	}
};
function ip(e) {
	return qf(e);
}
var ap = class {
	constructor(e) {
		this.__kind = wf, this.name = cf(e.name), this.description = e.description, this.extensions = Pd(e.extensions), this.astNode = e.astNode, this.extensionASTNodes = e.extensionASTNodes ?? [], this._values = op.bind(void 0, this, e.values), this._valueLookup = null, this._nameLookup = null;
	}
	get [Symbol.toStringTag]() {
		return "GraphQLEnumType";
	}
	getValues() {
		return typeof this._values == "function" && (this._values = this._values()), this._values;
	}
	getValue(e) {
		return this._nameLookup ??= gu(this.getValues(), (e) => e.name), this._nameLookup[e];
	}
	serialize(e) {
		return this.coerceOutputValue(e);
	}
	coerceOutputValue(e) {
		this._valueLookup ??= new Map(this.getValues().map((e) => [e.value, e]));
		let t = this._valueLookup.get(e);
		if (t === void 0) throw new G(`Enum "${this.name}" cannot represent value: ${W(e)}`);
		return t.name;
	}
	parseValue(e, t) {
		return this.coerceInputValue(e, t);
	}
	coerceInputValue(e, t) {
		if (typeof e != "string") {
			let n = W(e);
			throw new G(`Enum "${this.name}" cannot represent non-string value: ${n}.` + (t ? "" : sp(this, n)));
		}
		let n = this.getValue(e);
		if (n == null) throw new G(`Value "${e}" does not exist in "${this.name}" enum.` + (t ? "" : sp(this, e)));
		return n.value;
	}
	parseLiteral(e, t, n) {
		return this.coerceInputLiteral(e, n);
	}
	coerceInputLiteral(e, t) {
		if (e.kind !== "EnumValue") {
			let n = Xd(e);
			throw new G(`Enum "${this.name}" cannot represent non-enum value: ${n}.` + (t ? "" : sp(this, n)), { nodes: e });
		}
		let n = this.getValue(e.value);
		if (n == null) {
			let n = Xd(e);
			throw new G(`Value "${n}" does not exist in "${this.name}" enum.` + (t ? "" : sp(this, n)), { nodes: e });
		}
		return n.value;
	}
	valueToLiteral(e) {
		if (typeof e == "string" && this.getValue(e)) return {
			kind: Uu,
			value: e
		};
	}
	toConfig() {
		return {
			name: this.name,
			description: this.description,
			values: Ed(this.getValues(), (e) => e.name, (e) => e.toConfig()),
			extensions: this.extensions,
			astNode: this.astNode,
			extensionASTNodes: this.extensionASTNodes
		};
	}
	toString() {
		return this.name;
	}
	toJSON() {
		return this.toString();
	}
};
function op(e, t) {
	let n = Jf(t);
	return Object.entries(n).map(([t, n]) => new cp(e, t, n));
}
function sp(e, t) {
	return wd("the enum value", jd(t, e.getValues().map((e) => e.name)));
}
var cp = class {
	constructor(e, t, n) {
		this.__kind = Ef, this.parentEnum = e, this.name = lf(t), this.description = n.description, this.value = n.value === void 0 ? t : n.value, this.deprecationReason = n.deprecationReason, this.extensions = Pd(n.extensions), this.astNode = n.astNode;
	}
	get [Symbol.toStringTag]() {
		return "GraphQLEnumValue";
	}
	toConfig() {
		return {
			description: this.description,
			value: this.value,
			deprecationReason: this.deprecationReason,
			extensions: this.extensions,
			astNode: this.astNode
		};
	}
	toString() {
		return `${this.parentEnum.name}.${this.name}`;
	}
	toJSON() {
		return this.toString();
	}
}, lp = class {
	constructor(e) {
		this.__kind = Df, this.name = cf(e.name), this.description = e.description, this.extensions = Pd(e.extensions), this.astNode = e.astNode, this.extensionASTNodes = e.extensionASTNodes ?? [], this.isOneOf = e.isOneOf ?? !1, this._fields = up.bind(void 0, this, e.fields);
	}
	get [Symbol.toStringTag]() {
		return "GraphQLInputObjectType";
	}
	getFields() {
		return typeof this._fields == "function" && (this._fields = this._fields()), this._fields;
	}
	toConfig() {
		return {
			name: this.name,
			description: this.description,
			fields: _u(this.getFields(), (e) => e.toConfig()),
			extensions: this.extensions,
			astNode: this.astNode,
			extensionASTNodes: this.extensionASTNodes,
			isOneOf: this.isOneOf
		};
	}
	toString() {
		return this.name;
	}
	toJSON() {
		return this.toString();
	}
};
function up(e, t) {
	return _u(Jf(t), (t, n) => new dp(e, n, t));
}
var dp = class {
	constructor(e, t, n) {
		"resolve" in n && Sd(!1, `${e}.${t} field has a resolve property, but Input Types cannot define resolvers.`), this.__kind = kf, this.parentType = e, this.name = cf(t), this.description = n.description, this.type = n.type, this.defaultValue = n.defaultValue, this.default = n.default, this._memoizedCoercedDefaultValue = void 0, this.deprecationReason = n.deprecationReason, this.extensions = Pd(n.extensions), this.astNode = n.astNode;
	}
	get [Symbol.toStringTag]() {
		return "GraphQLInputField";
	}
	toConfig() {
		return {
			description: this.description,
			type: this.type,
			defaultValue: this.defaultValue,
			default: this.default,
			deprecationReason: this.deprecationReason,
			extensions: this.extensions,
			astNode: this.astNode
		};
	}
	toString() {
		return `${this.parentType}.${this.name}`;
	}
	toJSON() {
		return this.toString();
	}
};
function fp(e) {
	return Nf(e.type) && e.defaultValue === void 0 && e.default === void 0;
}
// ../../../node_modules/.pnpm/graphql@17.1.0/node_modules/graphql/utilities/typeComparators.mjs
function pp(e, t) {
	return e === t ? !0 : Nf(e) && Nf(t) || jf(e) && jf(t) ? pp(e.ofType, t.ofType) : !1;
}
function mp(e, t, n) {
	return t === n ? !0 : Nf(n) ? Nf(t) ? mp(e, t.ofType, n.ofType) : !1 : Nf(t) ? mp(e, t.ofType, n) : jf(n) ? jf(t) ? mp(e, t.ofType, n.ofType) : !1 : !jf(t) && zf(n) && (bf(t) || mf(t)) && e.isSubType(n, t);
}
function hp(e, t, n) {
	return t === n ? !0 : zf(t) ? zf(n) ? e.getPossibleTypes(t).some((t) => e.isSubType(n, t)) : e.isSubType(t, n) : zf(n) ? e.isSubType(n, t) : !1;
}
// ../../../node_modules/.pnpm/graphql@17.1.0/node_modules/graphql/jsutils/Path.mjs
function gp(e, t, n) {
	return {
		prev: e,
		key: t,
		typename: n
	};
}
function _p(e) {
	let t = [], n = e;
	for (; n;) t.push(n.key), n = n.prev;
	return t.reverse();
}
// ../../../node_modules/.pnpm/graphql@17.1.0/node_modules/graphql/utilities/valueToLiteral.mjs
function vp(e, t) {
	if (Nf(t)) return e == null ? void 0 : vp(e, t.ofType);
	if (e == null) return { kind: Hu };
	if (jf(t)) {
		if (!hu(e)) return vp(e, t.ofType);
		let n = [];
		for (let r of e) {
			let e = vp(r, t.ofType);
			if (!e) return;
			n.push(e);
		}
		return {
			kind: Wu,
			values: n
		};
	}
	if (Of(t)) {
		if (!eu(e)) return;
		let n = [], r = t.getFields();
		if (Object.keys(e).some((t) => e[t] !== void 0 && !Object.hasOwn(r, t))) return;
		for (let r of Object.values(t.getFields())) if (e[r.name] === void 0) {
			if (fp(r)) return;
		} else {
			let t = vp(e[r.name], r.type);
			if (!t) return;
			n.push({
				kind: Ku,
				name: {
					kind: Eu,
					value: r.name
				},
				value: t
			});
		}
		return {
			kind: Gu,
			fields: n
		};
	}
	let n = Lf(t);
	if (n.valueToLiteral) try {
		return n.valueToLiteral(e);
	} catch {
		return;
	}
	return yp(e);
}
function yp(e) {
	if (e == null) return { kind: Hu };
	switch (typeof e) {
		case "boolean": return {
			kind: Vu,
			value: e
		};
		case "string": return {
			kind: Bu,
			value: e,
			block: !1
		};
		case "bigint": return {
			kind: Ru,
			value: e.toString()
		};
		case "number": {
			if (!Number.isFinite(e)) return { kind: Hu };
			let t = String(e);
			return /^-?(?:0|[1-9][0-9]*)$/.test(t) ? {
				kind: Ru,
				value: t
			} : {
				kind: zu,
				value: t
			};
		}
		case "object": {
			if (hu(e)) return {
				kind: Wu,
				values: Array.from(e, yp)
			};
			let t = e, n = [];
			for (let e of Object.keys(t)) {
				let r = t[e];
				r !== void 0 && n.push({
					kind: Ku,
					name: {
						kind: Eu,
						value: e
					},
					value: yp(r)
				});
			}
			return {
				kind: Gu,
				fields: n
			};
		}
	}
	throw TypeError(`Cannot convert value to AST: ${W(e)}.`);
}
// ../../../node_modules/.pnpm/graphql@17.1.0/node_modules/graphql/utilities/replaceVariables.mjs
function bp(e, t, n) {
	switch (e.kind) {
		case Lu: {
			let r = e.name.value, i = n?.sources[r];
			if (i) {
				let e = i.value;
				if (e === void 0) {
					let e = i.signature.default;
					return e === void 0 ? { kind: Hu } : e.literal;
				}
				return bp(e, t, i.fragmentVariableValues);
			}
			let a = t?.sources[r];
			if (a == null) return { kind: Hu };
			if (a.value === void 0) {
				let e = a.signature.default;
				if (e !== void 0) return e.literal;
			}
			return vp(a.value, a.signature.type);
		}
		case Gu: {
			let r = [];
			for (let i of e.fields) {
				if (i.value.kind === "Variable") {
					let e = n?.sources[i.value.name.value] ?? t?.sources[i.value.name.value];
					if (e?.value === void 0 && e?.signature.default === void 0) continue;
				}
				let e = bp(i.value, t, n);
				r.push({
					...i,
					value: e
				});
			}
			return {
				...e,
				fields: r
			};
		}
		case Wu: {
			let r = [];
			for (let i of e.values) {
				let e = bp(i, t, n);
				r.push(e);
			}
			return {
				...e,
				values: r
			};
		}
		default: return e;
	}
}
// ../../../node_modules/.pnpm/graphql@17.1.0/node_modules/graphql/utilities/validateInputValue.mjs
function xp(e, t, n, r) {
	return Sp(e, t, n, r, void 0);
}
function Sp(e, t, n, r, i) {
	if (Nf(t)) {
		if (e === void 0) {
			Cp(n, `Expected a value of non-null type "${t}" to be provided.`, i);
			return;
		}
		if (e === null) {
			Cp(n, `Expected value of non-null type "${t}" not to be null.`, i);
			return;
		}
		return Sp(e, t.ofType, n, r, i);
	}
	if (e != null) {
		if (jf(t)) {
			if (!hu(e)) Sp(e, t.ofType, n, r, i);
			else {
				let a = 0;
				for (let o of e) Sp(o, t.ofType, n, r, gp(i, a++, void 0));
			}
		} else if (Of(t)) {
			if (!eu(e) || Array.isArray(e)) {
				Cp(n, `Expected value of type "${t}" to be an object, found: ${W(e)}.`, i);
				return;
			}
			let a = t.getFields();
			for (let o of Object.values(a)) {
				let a = e[o.name];
				a === void 0 ? fp(o) && Cp(n, `Expected value of type "${t}" to include required field "${o.name}", found: ${W(e)}.`, i) : Sp(a, o.type, n, r, gp(i, o.name, t.name));
			}
			let o = [];
			for (let s of Object.keys(e)) if (e[s] !== void 0) {
				if (Object.hasOwn(a, s)) o.push(s);
				else {
					let o = r ? "" : wd(jd(s, Object.keys(a)));
					Cp(n, `Expected value of type "${t}" not to include unknown field "${s}"${o ? `.${o} Found` : ", found"}: ${W(e)}.`, i);
				}
			}
			if (t.isOneOf) {
				o.length !== 1 && Cp(n, kp(t), i);
				let r = o[0];
				e[r] === null && Cp(n, kp(t), gp(i, r, t.name));
			}
		} else {
			Lf(t);
			let a, o;
			try {
				a = t.coerceInputValue(e, r);
			} catch (e) {
				if (e instanceof G) {
					n(e, _p(i));
					return;
				}
				o = e;
			}
			a === void 0 && Cp(n, `Expected value of type "${t}"${o == null ? ", found" : `, but encountered error "${Op(o)}"; found`}: ${W(e)}.`, i, lu(o));
		}
	}
}
function Cp(e, t, n, r) {
	e(new G(t, { originalError: r }), _p(n));
}
function wp(e, t, n, r, i, a) {
	return Tp({
		static: !r && !i,
		onError: n,
		variables: r,
		fragmentVariableValues: i
	}, e, t, a, void 0);
}
function Tp(e, t, n, r, i) {
	if (t.kind === "Variable") {
		if (e.static) return;
		let r = Ep(e, t)?.coerced[t.name.value];
		Nf(n) && (r === void 0 ? Dp(e.onError, `Expected variable "$${t.name.value}" provided to type "${n}" to provide a runtime value.`, t, i) : r === null && Dp(e.onError, `Expected variable "$${t.name.value}" provided to non-null type "${n}" not to be null.`, t, i));
	} else {
		if (Nf(n)) {
			if (t.kind === "NullValue") {
				Dp(e.onError, `Expected value of non-null type "${n}" not to be null.`, t, i);
				return;
			}
			return Tp(e, t, n.ofType, r, i);
		}
		if (t.kind !== "NullValue") {
			if (jf(n)) {
				if (t.kind !== "ListValue") Tp(e, t, n.ofType, r, i);
				else {
					let a = 0;
					for (let o of t.values) Tp(e, o, n.ofType, r, gp(i, a++, void 0));
				}
			} else if (Of(n)) {
				if (t.kind !== "ObjectValue") {
					Dp(e.onError, `Expected value of type "${n}" to be an object, found: ${Xd(t)}.`, t, i);
					return;
				}
				let a = n.getFields(), o = gu(t.fields, (e) => e.name.value);
				for (let s of Object.values(a)) {
					let a = o[s.name];
					if (a === void 0) fp(s) && Dp(e.onError, `Expected value of type "${n}" to include required field "${s.name}", found: ${Xd(t)}.`, t, i);
					else {
						let o = a.value;
						if (o.kind === "Variable" && !e.static) {
							let r = Ep(e, o), a = o.name.value, c = r?.coerced[a];
							if (n.isOneOf) c === void 0 ? Dp(e.onError, `Expected variable "$${a}" provided to field "${s.name}" for OneOf Input Object type "${n}" to provide a runtime value.`, t, i) : c === null && Dp(e.onError, `Expected variable "$${a}" provided to field "${s.name}" for OneOf Input Object type "${n}" not to be null.`, t, i);
							else if (c === void 0 && !fp(s)) continue;
						}
						Tp(e, o, s.type, r, gp(i, s.name, n.name));
					}
				}
				let s = t.fields, c = [];
				for (let o of s) {
					let s = o.name.value;
					if (Object.hasOwn(a, s)) c.push(o);
					else {
						let c = r ? "" : wd(jd(s, Object.keys(a)));
						Dp(e.onError, `Expected value of type "${n}" not to include unknown field "${s}"${c ? `.${c} Found` : ", found"}: ${Xd(t)}.`, o, i);
					}
				}
				if (n.isOneOf) {
					if (c.length !== 1) {
						Dp(e.onError, kp(n), t, i);
						return;
					}
					if (c[0].value.kind === "NullValue") {
						let r = c[0].name.value;
						Dp(e.onError, kp(n), t, gp(i, r, void 0));
					}
				}
			} else {
				Lf(n);
				let a, o;
				try {
					a = n.coerceInputLiteral ? n.coerceInputLiteral(bp(t, e.variables, e.fragmentVariableValues), r) : n.parseLiteral(t, void 0, r);
				} catch (t) {
					if (t instanceof G) {
						e.onError(t, _p(i));
						return;
					}
					o = t;
				}
				a === void 0 && Dp(e.onError, `Expected value of type "${n}"${o == null ? ", found" : `, but encountered error "${Op(o)}"; found`}: ${Xd(t)}.`, t, i, lu(o));
			}
		}
	}
}
function Ep(e, t) {
	let n = t.name.value, { fragmentVariableValues: r, variables: i } = e;
	return r?.sources[n] ? r : i;
}
function Dp(e, t, n, r, i) {
	e(new G(t, {
		nodes: n,
		originalError: i
	}), _p(r));
}
function Op(e) {
	if (eu(e)) {
		let t = e.message;
		if (typeof t == "string" && t !== "") return t;
	}
	return String(e);
}
function kp(e) {
	return `Within OneOf Input Object type "${e}", exactly one field must be specified, and the value for that field must be non-null.`;
}
// ../../../node_modules/.pnpm/graphql@17.1.0/node_modules/graphql/language/directiveLocation.mjs
var Y = {
	QUERY: "QUERY",
	MUTATION: "MUTATION",
	SUBSCRIPTION: "SUBSCRIPTION",
	FIELD: "FIELD",
	FRAGMENT_DEFINITION: "FRAGMENT_DEFINITION",
	FRAGMENT_SPREAD: "FRAGMENT_SPREAD",
	INLINE_FRAGMENT: "INLINE_FRAGMENT",
	VARIABLE_DEFINITION: "VARIABLE_DEFINITION",
	FRAGMENT_VARIABLE_DEFINITION: "FRAGMENT_VARIABLE_DEFINITION",
	SCHEMA: "SCHEMA",
	SCALAR: "SCALAR",
	OBJECT: "OBJECT",
	FIELD_DEFINITION: "FIELD_DEFINITION",
	ARGUMENT_DEFINITION: "ARGUMENT_DEFINITION",
	INTERFACE: "INTERFACE",
	UNION: "UNION",
	ENUM: "ENUM",
	ENUM_VALUE: "ENUM_VALUE",
	INPUT_OBJECT: "INPUT_OBJECT",
	INPUT_FIELD_DEFINITION: "INPUT_FIELD_DEFINITION",
	DIRECTIVE_DEFINITION: "DIRECTIVE_DEFINITION"
}, Ap = new Yf({
	name: "Int",
	description: "The `Int` scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.",
	coerceOutputValue(e) {
		let t = Lp(e);
		if (typeof t == "number") return Rp(t);
		if (typeof t == "boolean") return +!!t;
		if (typeof t == "string") return zp(t);
		if (typeof t == "bigint") return Bp(t);
		throw new G(`Int cannot represent non-integer value: ${W(t)}`);
	},
	coerceInputValue(e) {
		if (typeof e == "number") return Rp(e);
		if (typeof e == "bigint") return Bp(e);
		throw new G(`Int cannot represent non-integer value: ${W(e)}`);
	},
	coerceInputLiteral(e) {
		if (e.kind !== "IntValue") throw new G(`Int cannot represent non-integer value: ${Xd(e)}`, { nodes: e });
		let t = parseInt(e.value, 10);
		if (t > 2147483647 || t < -2147483648) throw new G(`Int cannot represent non 32-bit signed integer value: ${e.value}`, { nodes: e });
		return t;
	},
	valueToLiteral(e) {
		if ((typeof e == "number" && Number.isInteger(e) || typeof e == "bigint") && e <= 2147483647 && e >= -2147483648) return {
			kind: Ru,
			value: String(e)
		};
	}
}), jp = new Yf({
	name: "Float",
	description: "The `Float` scalar type represents signed double-precision fractional values as specified by [IEEE 754](https://en.wikipedia.org/wiki/IEEE_floating_point).",
	coerceOutputValue(e) {
		let t = Lp(e);
		if (typeof t == "number") return Vp(t);
		if (typeof t == "boolean") return +!!t;
		if (typeof t == "string") return Hp(t);
		if (typeof t == "bigint") return Up(t);
		throw new G(`Float cannot represent non numeric value: ${W(t)}`);
	},
	coerceInputValue(e) {
		if (typeof e == "number") return Vp(e);
		if (typeof e == "bigint") return Up(e);
		throw new G(`Float cannot represent non numeric value: ${W(e)}`);
	},
	coerceInputLiteral(e) {
		if (e.kind !== "FloatValue" && e.kind !== "IntValue") throw new G(`Float cannot represent non numeric value: ${Xd(e)}`, { nodes: e });
		return parseFloat(e.value);
	},
	valueToLiteral(e) {
		let t = yp(e);
		if (t.kind === "FloatValue" || t.kind === "IntValue") return t;
	}
}), Mp = new Yf({
	name: "String",
	description: "The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.",
	coerceOutputValue(e) {
		let t = Lp(e);
		if (typeof t == "string") return t;
		if (typeof t == "boolean") return t ? "true" : "false";
		if (typeof t == "number") return Wp(t);
		if (typeof t == "bigint") return String(t);
		throw new G(`String cannot represent value: ${W(e)}`);
	},
	coerceInputValue(e) {
		if (typeof e != "string") throw new G(`String cannot represent a non string value: ${W(e)}`);
		return e;
	},
	coerceInputLiteral(e) {
		if (e.kind !== "StringValue") throw new G(`String cannot represent a non string value: ${Xd(e)}`, { nodes: e });
		return e.value;
	},
	valueToLiteral(e) {
		let t = yp(e);
		if (t.kind === "StringValue") return t;
	}
}), Np = new Yf({
	name: "Boolean",
	description: "The `Boolean` scalar type represents `true` or `false`.",
	coerceOutputValue(e) {
		let t = Lp(e);
		if (typeof t == "boolean") return t;
		if (typeof t == "number") return Gp(t);
		if (typeof t == "bigint") return t !== 0n;
		throw new G(`Boolean cannot represent a non boolean value: ${W(t)}`);
	},
	coerceInputValue(e) {
		if (typeof e != "boolean") throw new G(`Boolean cannot represent a non boolean value: ${W(e)}`);
		return e;
	},
	coerceInputLiteral(e) {
		if (e.kind !== "BooleanValue") throw new G(`Boolean cannot represent a non boolean value: ${Xd(e)}`, { nodes: e });
		return e.value;
	},
	valueToLiteral(e) {
		let t = yp(e);
		if (t.kind === "BooleanValue") return t;
	}
}), Pp = new Yf({
	name: "ID",
	description: "The `ID` scalar type represents a unique identifier, often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `\"4\"`) or integer (such as `4`) input value will be accepted as an ID.",
	coerceOutputValue(e) {
		let t = Lp(e);
		if (typeof t == "string") return t;
		if (typeof t == "number") return Kp(t);
		if (typeof t == "bigint") return String(t);
		throw new G(`ID cannot represent value: ${W(e)}`);
	},
	coerceInputValue(e) {
		if (typeof e == "string") return e;
		if (typeof e == "number") return Kp(e);
		if (typeof e == "bigint") return String(e);
		throw new G(`ID cannot represent value: ${W(e)}`);
	},
	coerceInputLiteral(e) {
		if (e.kind !== "StringValue" && e.kind !== "IntValue") throw new G("ID cannot represent a non-string and non-integer value: " + Xd(e), { nodes: e });
		return e.value;
	},
	valueToLiteral(e) {
		if (typeof e == "string") return /^-?(?:0|[1-9][0-9]*)$/.test(e) ? {
			kind: Ru,
			value: e
		} : {
			kind: Bu,
			value: e,
			block: !1
		};
		if (typeof e == "number") return {
			kind: Ru,
			value: Kp(e)
		};
		if (typeof e == "bigint") return {
			kind: Ru,
			value: String(e)
		};
	}
}), Fp = Object.freeze([
	Mp,
	Ap,
	jp,
	Np,
	Pp
]);
function Ip(e) {
	return Fp.some(({ name: t }) => e.name === t);
}
function Lp(e) {
	if (eu(e)) {
		if (typeof e.valueOf == "function") {
			let t = e.valueOf();
			if (!eu(t)) return t;
		}
		if (typeof e.toJSON == "function") return e.toJSON();
	}
	return e;
}
function Rp(e) {
	if (!Number.isInteger(e)) throw new G(`Int cannot represent non-integer value: ${W(e)}`);
	if (e > 2147483647 || e < -2147483648) throw new G(`Int cannot represent non 32-bit signed integer value: ${W(e)}`);
	return e;
}
function zp(e) {
	if (e === "") throw new G(`Int cannot represent non-integer value: ${W(e)}`);
	let t = Number(e);
	if (!Number.isInteger(t)) throw new G(`Int cannot represent non-integer value: ${W(e)}`);
	if (t > 2147483647 || t < -2147483648) throw new G(`Int cannot represent non 32-bit signed integer value: ${W(e)}`);
	return t;
}
function Bp(e) {
	if (e > 2147483647 || e < -2147483648) throw new G(`Int cannot represent non 32-bit signed integer value: ${String(e)}`);
	return Number(e);
}
function Vp(e) {
	if (!Number.isFinite(e)) throw new G(`Float cannot represent non numeric value: ${W(e)}`);
	return e;
}
function Hp(e) {
	if (e === "") throw new G(`Float cannot represent non numeric value: ${W(e)}`);
	let t = Number(e);
	if (!Number.isFinite(t)) throw new G(`Float cannot represent non numeric value: ${W(e)}`);
	return t;
}
function Up(e) {
	let t = Number(e);
	if (!Number.isFinite(t)) throw new G(`Float cannot represent non numeric value: ${W(e)} (value is too large)`);
	if (BigInt(t) !== e) throw new G(`Float cannot represent non numeric value: ${W(e)} (value would lose precision)`);
	return t;
}
function Wp(e) {
	if (!Number.isFinite(e)) throw new G(`String cannot represent value: ${W(e)}`);
	return String(e);
}
function Gp(e) {
	if (!Number.isFinite(e)) throw new G(`Boolean cannot represent a non boolean value: ${W(e)}`);
	return e !== 0;
}
function Kp(e) {
	if (!Number.isInteger(e)) throw new G(`ID cannot represent value: ${W(e)}`);
	return String(e);
}
// ../../../node_modules/.pnpm/graphql@17.1.0/node_modules/graphql/type/directives.mjs
var qp = Symbol("Directive");
function Jp(e) {
	return Yl(e, qp, Yp);
}
var Yp = class {
	constructor(e) {
		this.__kind = qp, this.name = cf(e.name), this.description = e.description, this.locations = e.locations, this.isRepeatable = e.isRepeatable ?? !1, this.deprecationReason = e.deprecationReason, this.extensions = Pd(e.extensions), this.astNode = e.astNode, this.extensionASTNodes = e.extensionASTNodes ?? [], Array.isArray(e.locations) || Sd(!1, `@${this.name} locations must be an Array.`);
		let t = e.args ?? {};
		(!eu(t) || Array.isArray(t)) && Sd(!1, `@${this.name} args must be an object with argument names as keys.`), this.args = Object.entries(t).map(([e, t]) => new ep(this, e, t));
	}
	get [Symbol.toStringTag]() {
		return "GraphQLDirective";
	}
	toConfig() {
		return {
			name: this.name,
			description: this.description,
			locations: this.locations,
			args: Ed(this.args, (e) => e.name, (e) => e.toConfig()),
			isRepeatable: this.isRepeatable,
			deprecationReason: this.deprecationReason,
			extensions: this.extensions,
			astNode: this.astNode,
			extensionASTNodes: this.extensionASTNodes
		};
	}
	toString() {
		return "@" + this.name;
	}
	toJSON() {
		return this.toString();
	}
}, Xp = new Yp({
	name: "include",
	description: "Directs the executor to include this field or fragment only when the `if` argument is true.",
	locations: [
		Y.FIELD,
		Y.FRAGMENT_SPREAD,
		Y.INLINE_FRAGMENT
	],
	args: { if: {
		type: new J(Np),
		description: "Included when true."
	} }
}), Zp = new Yp({
	name: "skip",
	description: "Directs the executor to skip this field or fragment when the `if` argument is true.",
	locations: [
		Y.FIELD,
		Y.FRAGMENT_SPREAD,
		Y.INLINE_FRAGMENT
	],
	args: { if: {
		type: new J(Np),
		description: "Skipped when true."
	} }
}), Qp = new Yp({
	name: "defer",
	description: "Directs the executor to defer this fragment when the `if` argument is true or undefined.",
	locations: [Y.FRAGMENT_SPREAD, Y.INLINE_FRAGMENT],
	args: {
		if: {
			type: new J(Np),
			description: "Deferred when true or undefined.",
			default: { value: !0 }
		},
		label: {
			type: Mp,
			description: "Unique name"
		}
	}
}), $p = new Yp({
	name: "stream",
	description: "Directs the executor to stream plural fields when the `if` argument is true or undefined.",
	locations: [Y.FIELD],
	args: {
		initialCount: {
			default: { value: 0 },
			type: new J(Ap),
			description: "Number of items to return immediately"
		},
		if: {
			type: new J(Np),
			description: "Stream when true or undefined.",
			default: { value: !0 }
		},
		label: {
			type: Mp,
			description: "Unique name"
		}
	}
}), em = "No longer supported", tm = new Yp({
	name: "deprecated",
	description: "Marks an element of a GraphQL schema as no longer supported.",
	locations: [
		Y.FIELD_DEFINITION,
		Y.ARGUMENT_DEFINITION,
		Y.INPUT_FIELD_DEFINITION,
		Y.ENUM_VALUE,
		Y.DIRECTIVE_DEFINITION
	],
	args: { reason: {
		type: new J(Mp),
		description: "Explains why this element was deprecated, usually also including a suggestion for how to access supported similar data. Formatted using the Markdown syntax, as specified by [CommonMark](https://commonmark.org/).",
		default: { value: em }
	} }
}), nm = new Yp({
	name: "specifiedBy",
	description: "Exposes a URL that specifies the behavior of this scalar.",
	locations: [Y.SCALAR],
	args: { url: {
		type: new J(Mp),
		description: "The URL that specifies the behavior of this scalar."
	} }
}), rm = new Yp({
	name: "oneOf",
	description: "Indicates exactly one field must be supplied and this field must not be `null`.",
	locations: [Y.INPUT_OBJECT],
	args: {}
}), im = new Yp({
	name: "experimental_disableErrorPropagation",
	description: "Disables error propagation.",
	locations: [
		Y.QUERY,
		Y.MUTATION,
		Y.SUBSCRIPTION
	]
}), am = Object.freeze([
	Xp,
	Zp,
	tm,
	nm,
	rm
]);
function om(e) {
	return am.some(({ name: t }) => t === e.name);
}
// ../../../node_modules/.pnpm/graphql@17.1.0/node_modules/graphql/utilities/astFromValue.mjs
function sm(e, t) {
	if (Nf(t)) {
		let n = sm(e, t.ofType);
		return n?.kind === "NullValue" ? null : n;
	}
	if (e === null) return { kind: Hu };
	if (e === void 0) return null;
	if (jf(t)) {
		let n = t.ofType;
		if (hu(e)) {
			let t = [];
			for (let r of e) {
				let e = sm(r, n);
				e != null && t.push(e);
			}
			return {
				kind: Wu,
				values: t
			};
		}
		return sm(e, n);
	}
	if (Of(t)) {
		if (!eu(e)) return null;
		let n = [];
		for (let r of Object.values(t.getFields())) {
			let t = sm(e[r.name], r.type);
			t && n.push({
				kind: Ku,
				name: {
					kind: Eu,
					value: r.name
				},
				value: t
			});
		}
		return {
			kind: Gu,
			fields: n
		};
	}
	if (If(t)) {
		let n = t.coerceOutputValue(e);
		if (n == null) return null;
		if (typeof n == "boolean") return {
			kind: Vu,
			value: n
		};
		if (typeof n == "number" && Number.isFinite(n)) {
			let e = String(n);
			return cm.test(e) ? {
				kind: Ru,
				value: e
			} : {
				kind: zu,
				value: e
			};
		}
		if (typeof n == "bigint") return {
			kind: Ru,
			value: String(n)
		};
		if (typeof n == "string") return Tf(t) ? {
			kind: Uu,
			value: n
		} : t === Pp && cm.test(n) ? {
			kind: Ru,
			value: n
		} : {
			kind: Bu,
			value: n
		};
		throw TypeError(`Cannot convert value to AST: ${W(n)}.`);
	}
	du(!1, "Unexpected input type: " + W(t));
}
var cm = /^-?(?:0|[1-9][0-9]*)$/;
// ../../../node_modules/.pnpm/graphql@17.1.0/node_modules/graphql/utilities/getDefaultValueAST.mjs
function lm(e) {
	let t = e.type, n = e.default;
	if (n) {
		let e = n.literal ?? vp(n.value, t);
		return e ?? du(!1, "Invalid default value"), e;
	}
	let r = e.defaultValue;
	if (r !== void 0) {
		let e = sm(r, t);
		return e ?? du(!1, "Invalid default value"), e;
	}
}
// ../../../node_modules/.pnpm/graphql@17.1.0/node_modules/graphql/type/introspection.mjs
var um = new Xf({
	name: "__Schema",
	description: "A GraphQL Schema defines the capabilities of a GraphQL server. It exposes all available types and directives on the server, as well as the entry points for query, mutation, and subscription operations.",
	fields: () => ({
		description: {
			type: Mp,
			resolve: (e) => e.description
		},
		types: {
			description: "A list of all types supported by this server.",
			type: new J(new Bf(new J(pm))),
			resolve(e) {
				return Object.values(e.getTypeMap());
			}
		},
		queryType: {
			description: "The type that query operations will be rooted at.",
			type: new J(pm),
			resolve: (e) => e.getQueryType()
		},
		mutationType: {
			description: "If this server supports mutation, the type that mutation operations will be rooted at.",
			type: pm,
			resolve: (e) => e.getMutationType()
		},
		subscriptionType: {
			description: "If this server support subscription, the type that subscription operations will be rooted at.",
			type: pm,
			resolve: (e) => e.getSubscriptionType()
		},
		directives: {
			description: "A list of all directives supported by this server.",
			type: new J(new Bf(new J(dm))),
			args: { includeDeprecated: {
				type: new J(Np),
				default: { value: !1 }
			} },
			resolve: (e, { includeDeprecated: t }) => t === !0 ? e.getDirectives() : e.getDirectives().filter((e) => e.deprecationReason == null)
		}
	})
}), dm = new Xf({
	name: "__Directive",
	description: "A Directive provides a way to describe alternate runtime execution and type validation behavior in a GraphQL document.\n\nIn some cases, you need to provide options to alter GraphQL's execution behavior in ways field arguments will not suffice, such as conditionally including or skipping a field. Directives provide this by describing additional information to the executor.",
	fields: () => ({
		name: {
			type: new J(Mp),
			resolve: (e) => e.name
		},
		description: {
			type: Mp,
			resolve: (e) => e.description
		},
		isRepeatable: {
			type: new J(Np),
			resolve: (e) => e.isRepeatable
		},
		locations: {
			type: new J(new Bf(new J(fm))),
			resolve: (e) => e.locations
		},
		args: {
			type: new J(new Bf(new J(hm))),
			args: { includeDeprecated: {
				type: new J(Np),
				default: { value: !1 }
			} },
			resolve(e, { includeDeprecated: t }) {
				return t === !0 ? e.args : e.args.filter((e) => e.deprecationReason == null);
			}
		},
		isDeprecated: {
			type: new J(Np),
			resolve: (e) => e.deprecationReason != null
		},
		deprecationReason: {
			type: Mp,
			resolve: (e) => e.deprecationReason
		}
	})
}), fm = new ap({
	name: "__DirectiveLocation",
	description: "A Directive can be adjacent to many parts of the GraphQL language, a __DirectiveLocation describes one such possible adjacencies.",
	values: {
		QUERY: {
			value: Y.QUERY,
			description: "Location adjacent to a query operation."
		},
		MUTATION: {
			value: Y.MUTATION,
			description: "Location adjacent to a mutation operation."
		},
		SUBSCRIPTION: {
			value: Y.SUBSCRIPTION,
			description: "Location adjacent to a subscription operation."
		},
		FIELD: {
			value: Y.FIELD,
			description: "Location adjacent to a field."
		},
		FRAGMENT_DEFINITION: {
			value: Y.FRAGMENT_DEFINITION,
			description: "Location adjacent to a fragment definition."
		},
		FRAGMENT_SPREAD: {
			value: Y.FRAGMENT_SPREAD,
			description: "Location adjacent to a fragment spread."
		},
		INLINE_FRAGMENT: {
			value: Y.INLINE_FRAGMENT,
			description: "Location adjacent to an inline fragment."
		},
		VARIABLE_DEFINITION: {
			value: Y.VARIABLE_DEFINITION,
			description: "Location adjacent to an operation variable definition."
		},
		FRAGMENT_VARIABLE_DEFINITION: {
			value: Y.FRAGMENT_VARIABLE_DEFINITION,
			description: "Location adjacent to a fragment variable definition."
		},
		SCHEMA: {
			value: Y.SCHEMA,
			description: "Location adjacent to a schema definition."
		},
		SCALAR: {
			value: Y.SCALAR,
			description: "Location adjacent to a scalar definition."
		},
		OBJECT: {
			value: Y.OBJECT,
			description: "Location adjacent to an object type definition."
		},
		FIELD_DEFINITION: {
			value: Y.FIELD_DEFINITION,
			description: "Location adjacent to a field definition."
		},
		ARGUMENT_DEFINITION: {
			value: Y.ARGUMENT_DEFINITION,
			description: "Location adjacent to an argument definition."
		},
		INTERFACE: {
			value: Y.INTERFACE,
			description: "Location adjacent to an interface definition."
		},
		UNION: {
			value: Y.UNION,
			description: "Location adjacent to a union definition."
		},
		ENUM: {
			value: Y.ENUM,
			description: "Location adjacent to an enum definition."
		},
		ENUM_VALUE: {
			value: Y.ENUM_VALUE,
			description: "Location adjacent to an enum value definition."
		},
		INPUT_OBJECT: {
			value: Y.INPUT_OBJECT,
			description: "Location adjacent to an input object type definition."
		},
		INPUT_FIELD_DEFINITION: {
			value: Y.INPUT_FIELD_DEFINITION,
			description: "Location adjacent to an input object field definition."
		},
		DIRECTIVE_DEFINITION: {
			value: Y.DIRECTIVE_DEFINITION,
			description: "Location adjacent to a directive definition."
		}
	}
}), pm = new Xf({
	name: "__Type",
	description: "The fundamental unit of any GraphQL Schema is the type. There are many kinds of types in GraphQL as represented by the `__TypeKind` enum.\n\nDepending on the kind of a type, certain fields describe information about that type. Scalar types provide no information beyond a name, description and optional `specifiedByURL`, while Enum types provide their values. Object and Interface types provide the fields they describe. Abstract types, Union and Interface, provide the Object types possible at runtime. List and NonNull types compose other types.",
	fields: () => ({
		kind: {
			type: new J(vm),
			resolve(e) {
				if (ff(e)) return _m.SCALAR;
				if (mf(e)) return _m.OBJECT;
				if (bf(e)) return _m.INTERFACE;
				if (Cf(e)) return _m.UNION;
				if (Tf(e)) return _m.ENUM;
				if (Of(e)) return _m.INPUT_OBJECT;
				if (jf(e)) return _m.LIST;
				if (Nf(e)) return _m.NON_NULL;
				du(!1, `Unexpected type: "${W(e)}".`);
			}
		},
		name: {
			type: Mp,
			resolve: (e) => "name" in e ? e.name : void 0
		},
		description: {
			type: Mp,
			resolve: (e) => "description" in e ? e.description : void 0
		},
		specifiedByURL: {
			type: Mp,
			resolve: (e) => "specifiedByURL" in e ? e.specifiedByURL : void 0
		},
		fields: {
			type: new Bf(new J(mm)),
			args: { includeDeprecated: {
				type: new J(Np),
				default: { value: !1 }
			} },
			resolve(e, { includeDeprecated: t }) {
				if (mf(e) || bf(e)) {
					let n = Object.values(e.getFields());
					return t === !0 ? n : n.filter((e) => e.deprecationReason == null);
				}
			}
		},
		interfaces: {
			type: new Bf(new J(pm)),
			resolve(e) {
				if (mf(e) || bf(e)) return e.getInterfaces();
			}
		},
		possibleTypes: {
			type: new Bf(new J(pm)),
			resolve(e, t, n, { schema: r }) {
				if (zf(e)) return r.getPossibleTypes(e);
			}
		},
		enumValues: {
			type: new Bf(new J(gm)),
			args: { includeDeprecated: {
				type: new J(Np),
				default: { value: !1 }
			} },
			resolve(e, { includeDeprecated: t }) {
				if (Tf(e)) {
					let n = e.getValues();
					return t === !0 ? n : n.filter((e) => e.deprecationReason == null);
				}
			}
		},
		inputFields: {
			type: new Bf(new J(hm)),
			args: { includeDeprecated: {
				type: new J(Np),
				default: { value: !1 }
			} },
			resolve(e, { includeDeprecated: t }) {
				if (Of(e)) {
					let n = Object.values(e.getFields());
					return t === !0 ? n : n.filter((e) => e.deprecationReason == null);
				}
			}
		},
		ofType: {
			type: pm,
			resolve: (e) => "ofType" in e ? e.ofType : void 0
		},
		isOneOf: {
			type: Np,
			resolve: (e) => {
				if (Of(e)) return e.isOneOf;
			}
		}
	})
}), mm = new Xf({
	name: "__Field",
	description: "Object and Interface types are described by a list of Fields, each of which has a name, potentially a list of arguments, and a return type.",
	fields: () => ({
		name: {
			type: new J(Mp),
			resolve: (e) => e.name
		},
		description: {
			type: Mp,
			resolve: (e) => e.description
		},
		args: {
			type: new J(new Bf(new J(hm))),
			args: { includeDeprecated: {
				type: new J(Np),
				default: { value: !1 }
			} },
			resolve(e, { includeDeprecated: t }) {
				return t === !0 ? e.args : e.args.filter((e) => e.deprecationReason == null);
			}
		},
		type: {
			type: new J(pm),
			resolve: (e) => e.type
		},
		isDeprecated: {
			type: new J(Np),
			resolve: (e) => e.deprecationReason != null
		},
		deprecationReason: {
			type: Mp,
			resolve: (e) => e.deprecationReason
		}
	})
}), hm = new Xf({
	name: "__InputValue",
	description: "Arguments provided to Fields or Directives and the input fields of an InputObject are represented as Input Values which describe their type and optionally a default value.",
	fields: () => ({
		name: {
			type: new J(Mp),
			resolve: (e) => e.name
		},
		description: {
			type: Mp,
			resolve: (e) => e.description
		},
		type: {
			type: new J(pm),
			resolve: (e) => e.type
		},
		defaultValue: {
			type: Mp,
			description: "A GraphQL-formatted string representing the default value for this input value.",
			resolve(e) {
				let t = lm(e);
				return t ? Yd(t) : null;
			}
		},
		isDeprecated: {
			type: new J(Np),
			resolve: (e) => e.deprecationReason != null
		},
		deprecationReason: {
			type: Mp,
			resolve: (e) => e.deprecationReason
		}
	})
}), gm = new Xf({
	name: "__EnumValue",
	description: "One possible value for a given Enum. Enum values are unique values, not a placeholder for a string or numeric value. However an Enum value is returned in a JSON response as a string.",
	fields: () => ({
		name: {
			type: new J(Mp),
			resolve: (e) => e.name
		},
		description: {
			type: Mp,
			resolve: (e) => e.description
		},
		isDeprecated: {
			type: new J(Np),
			resolve: (e) => e.deprecationReason != null
		},
		deprecationReason: {
			type: Mp,
			resolve: (e) => e.deprecationReason
		}
	})
}), _m = {
	SCALAR: "SCALAR",
	OBJECT: "OBJECT",
	INTERFACE: "INTERFACE",
	UNION: "UNION",
	ENUM: "ENUM",
	INPUT_OBJECT: "INPUT_OBJECT",
	LIST: "LIST",
	NON_NULL: "NON_NULL"
}, vm = new ap({
	name: "__TypeKind",
	description: "An enum describing what kind of type a given `__Type` is.",
	values: {
		SCALAR: {
			value: _m.SCALAR,
			description: "Indicates this type is a scalar."
		},
		OBJECT: {
			value: _m.OBJECT,
			description: "Indicates this type is an object. `fields` and `interfaces` are valid fields."
		},
		INTERFACE: {
			value: _m.INTERFACE,
			description: "Indicates this type is an interface. `fields`, `interfaces`, and `possibleTypes` are valid fields."
		},
		UNION: {
			value: _m.UNION,
			description: "Indicates this type is a union. `possibleTypes` is a valid field."
		},
		ENUM: {
			value: _m.ENUM,
			description: "Indicates this type is an enum. `enumValues` is a valid field."
		},
		INPUT_OBJECT: {
			value: _m.INPUT_OBJECT,
			description: "Indicates this type is an input object. `inputFields` is a valid field."
		},
		LIST: {
			value: _m.LIST,
			description: "Indicates this type is a list. `ofType` is a valid field."
		},
		NON_NULL: {
			value: _m.NON_NULL,
			description: "Indicates this type is a non-null. `ofType` is a valid field."
		}
	}
}), ym = new $f(void 0, "__schema", {
	type: new J(um),
	description: "Access the current type schema of this server.",
	resolve: (e, t, n, { schema: r }) => r
}), bm = new $f(void 0, "__type", {
	type: pm,
	description: "Request the type information of a single type.",
	args: { name: { type: new J(Mp) } },
	resolve: (e, { name: t }, n, { schema: r }) => r.getType(t)
}), xm = new $f(void 0, "__typename", {
	type: new J(Mp),
	description: "The name of the current Object type at runtime.",
	resolve: (e, t, n, { parentType: r }) => r.name
}), Sm = Object.freeze([
	um,
	dm,
	fm,
	pm,
	mm,
	hm,
	gm,
	vm
]);
function Cm(e) {
	return Sm.some(({ name: t }) => e.name === t);
}
// ../../../node_modules/.pnpm/graphql@17.1.0/node_modules/graphql/type/schema.mjs
function wm(e) {
	return Yl(e, Em, Dm);
}
function Tm(e) {
	if (!wm(e)) throw Error(`Expected ${W(e)} to be a GraphQL schema.`);
	return e;
}
var Em = Symbol("Schema"), Dm = class {
	constructor(e) {
		this.__kind = Em, this.assumeValid = e.assumeValid ?? !1, this.__validationErrors = e.assumeValid === !0 ? [] : void 0, this.description = e.description, this.extensions = Pd(e.extensions), this.astNode = e.astNode, this.extensionASTNodes = e.extensionASTNodes ?? [], this._queryType = e.query, this._mutationType = e.mutation, this._subscriptionType = e.subscription, this._directives = e.directives ?? am;
		let t = new Set(e.types);
		if (e.types != null) for (let n of e.types) t.delete(n), Om(n, t);
		this._queryType != null && Om(this._queryType, t), this._mutationType != null && Om(this._mutationType, t), this._subscriptionType != null && Om(this._subscriptionType, t);
		for (let e of this._directives) if (Jp(e)) for (let n of e.args) Om(n.type, t);
		Om(um, t), this._typeMap = Object.create(null), this._subTypeMap = /* @__PURE__ */ new Map(), this._implementationsMap = Object.create(null);
		for (let e of t) {
			if (e == null) continue;
			let t = e.name;
			if (this._typeMap[t] !== void 0) throw Error(`Schema must contain uniquely named types but contains multiple types named "${t}".`);
			if (this._typeMap[t] = e, bf(e)) {
				for (let t of e.getInterfaces()) if (bf(t)) {
					let n = this._implementationsMap[t.name];
					n ??= this._implementationsMap[t.name] = {
						objects: [],
						interfaces: []
					}, n.interfaces.push(e);
				}
			} else if (mf(e)) {
				for (let t of e.getInterfaces()) if (bf(t)) {
					let n = this._implementationsMap[t.name];
					n ??= this._implementationsMap[t.name] = {
						objects: [],
						interfaces: []
					}, n.objects.push(e);
				}
			}
		}
	}
	get [Symbol.toStringTag]() {
		return "GraphQLSchema";
	}
	getQueryType() {
		return this._queryType;
	}
	getMutationType() {
		return this._mutationType;
	}
	getSubscriptionType() {
		return this._subscriptionType;
	}
	getRootType(e) {
		switch (e) {
			case wu.QUERY: return this.getQueryType();
			case wu.MUTATION: return this.getMutationType();
			case wu.SUBSCRIPTION: return this.getSubscriptionType();
		}
	}
	getTypeMap() {
		return this._typeMap;
	}
	getType(e) {
		return this.getTypeMap()[e];
	}
	getPossibleTypes(e) {
		return Cf(e) ? e.getTypes() : this.getImplementations(e).objects;
	}
	getImplementations(e) {
		return this._implementationsMap[e.name] ?? {
			objects: [],
			interfaces: []
		};
	}
	isSubType(e, t) {
		let n = this._subTypeMap.get(e);
		if (n === void 0) {
			if (Cf(e)) n = new Set(e.getTypes());
			else {
				let t = this.getImplementations(e);
				n = /* @__PURE__ */ new Set([...t.objects, ...t.interfaces]);
			}
			this._subTypeMap.set(e, n);
		}
		return n.has(t);
	}
	getDirectives() {
		return this._directives;
	}
	getDirective(e) {
		return this.getDirectives().find((t) => t.name === e);
	}
	getField(e, t) {
		switch (t) {
			case ym.name: return this.getQueryType() === e ? ym : void 0;
			case bm.name: return this.getQueryType() === e ? bm : void 0;
			case xm.name: return xm;
		}
		if ("getFields" in e) return e.getFields()[t];
	}
	toConfig() {
		return {
			description: this.description,
			query: this.getQueryType(),
			mutation: this.getMutationType(),
			subscription: this.getSubscriptionType(),
			types: Object.values(this.getTypeMap()),
			directives: this.getDirectives(),
			extensions: this.extensions,
			astNode: this.astNode,
			extensionASTNodes: this.extensionASTNodes,
			assumeValid: this.assumeValid
		};
	}
};
function Om(e, t) {
	let n = Kf(e);
	if (!t.has(n)) {
		if (t.add(n), Cf(n)) for (let e of n.getTypes()) Om(e, t);
		else if (mf(n) || bf(n)) {
			for (let e of n.getInterfaces()) Om(e, t);
			for (let e of Object.values(n.getFields())) {
				Om(e.type, t);
				for (let n of e.args) Om(n.type, t);
			}
		} else if (Of(n)) for (let e of Object.values(n.getFields())) Om(e.type, t);
	}
	return t;
}
// ../../../node_modules/.pnpm/graphql@17.1.0/node_modules/graphql/type/validate.mjs
function km(e) {
	if (Tm(e), e.__validationErrors) return e.__validationErrors;
	let t = new jm(e);
	Mm(t), Pm(t), zm(t);
	let n = t.getErrors();
	return e.__validationErrors = n, n;
}
function Am(e) {
	let t = km(e);
	if (t.length !== 0) throw Error(t.map((e) => e.message).join("\n\n"));
}
var jm = class {
	constructor(e) {
		this._errors = [], this.schema = e;
	}
	reportError(e, t) {
		let n = Array.isArray(t) ? t.filter(Boolean) : t;
		this._errors.push(new G(e, { nodes: n }));
	}
	getErrors() {
		return this._errors;
	}
};
function Mm(e) {
	let t = e.schema;
	t.getQueryType() ?? e.reportError("Query root type must be provided.", t.astNode);
	let n = new tu();
	for (let r of Object.values(wu)) {
		let i = t.getRootType(r);
		if (i != null) {
			if (mf(i)) n.add(i, r);
			else {
				let n = uu(r), a = W(i);
				e.reportError(r === wu.QUERY ? `${n} root type must be Object type, it cannot be ${a}.` : `${n} root type must be Object type if provided, it cannot be ${a}.`, Nm(t, r) ?? i.astNode);
			}
		}
	}
	for (let [r, i] of n) if (i.length > 1) {
		let n = pu(i);
		e.reportError(`All root types must be different, "${r}" type is used as ${n} root types.`, i.map((e) => Nm(t, e)));
	}
}
function Nm(e, t) {
	return [e.astNode, ...e.extensionASTNodes].flatMap((e) => e?.operationTypes ?? []).find((e) => e.operation === t)?.type;
}
function Pm(e) {
	for (let t of e.schema.getDirectives()) if (!Jp(t)) e.reportError(`Expected directive but got: ${W(t)}.`, t?.astNode);
	else {
		Rm(e, t), t.locations.length === 0 && e.reportError(`Directive ${t} must include 1 or more locations.`, t.astNode);
		for (let n of t.args) Rm(e, n), Pf(n.type) || e.reportError(`The type of ${n} must be Input Type but got: ${W(n.type)}.`, n.astNode), tp(n) && n.deprecationReason != null && e.reportError(`Required argument ${n} cannot be deprecated.`, [$m(n.astNode), n.astNode?.type]), Fm(e, n);
	}
}
function Fm(e, t) {
	let n = t.default;
	if (!n) return;
	let r = [];
	if (Im(n, t.type, (e, t) => {
		r.push([e, t]);
	}), r.length !== 0) {
		if (!n.literal) try {
			let r = Lm(n.value, t.type), i = [];
			if (xp(r, t.type, (e, t) => {
				i.push([e, t]);
			}), i.length === 0) {
				e.reportError(`${t} has invalid default value: ${W(n.value)}. Did you mean: ${W(r)}?`, t.astNode?.defaultValue);
				return;
			}
		} catch {}
		for (let [n, i] of r) e.reportError(`${t} has invalid default value${vu(i)}: ${n.message}`, n.nodes ?? t.astNode?.defaultValue);
	}
}
function Im(e, t, n, r) {
	e.literal ? wp(e.literal, t, n, void 0, void 0, r) : xp(e.value, t, n, r);
}
function Lm(e, t) {
	if (Nf(t)) return Lm(e, t.ofType);
	if (e === null) return null;
	if (jf(t)) return hu(e) ? Array.from(e, (e) => Lm(e, t.ofType)) : [Lm(e, t.ofType)];
	if (Of(t)) {
		eu(e) || du(!1);
		let n = t.getFields();
		return _u(e, (e, t) => (t in n || du(!1), Lm(e, n[t].type)));
	}
	return Lf(t), t.coerceOutputValue(e);
}
function Rm(e, t) {
	t.name.startsWith("__") && e.reportError(`Name "${t.name}" must not begin with "__", which is reserved by GraphQL introspection.`, t.astNode);
}
function zm(e) {
	let t = Xm(e), n = e.schema.getTypeMap(), r = /* @__PURE__ */ new Map();
	for (let r of Object.values(n)) Gf(r) ? (Cm(r) || Rm(e, r), mf(r) || bf(r) ? (Bm(e, r), Vm(e, r)) : Cf(r) ? Wm(e, r) : Tf(r) ? Gm(e, r) : Of(r) && (Km(e, r), i(r), t(r))) : e.reportError(`Expected GraphQL named type but got: ${W(r)}.`, r.astNode);
	Jm(e, r);
	function i(e) {
		r.set(e, {
			inputObj: e,
			targets: [],
			dependents: [],
			unresolvedTargetCount: 0,
			hasFiniteValue: !1
		});
	}
}
function Bm(e, t) {
	let n = Object.values(t.getFields());
	n.length === 0 && e.reportError(`Type ${t} must define one or more fields.`, [t.astNode, ...t.extensionASTNodes]);
	for (let t of n) {
		Rm(e, t), Ff(t.type) || e.reportError(`The type of ${t} must be Output Type but got: ${W(t.type)}.`, t.astNode?.type);
		for (let n of t.args) Rm(e, n), Pf(n.type) || e.reportError(`The type of ${n} must be Input Type but got: ${W(n.type)}.`, n.astNode?.type), tp(n) && n.deprecationReason != null && e.reportError(`Required argument ${n} cannot be deprecated.`, [$m(n.astNode), n.astNode?.type]), Fm(e, n);
	}
}
function Vm(e, t) {
	let n = /* @__PURE__ */ new Set();
	for (let r of t.getInterfaces()) bf(r) ? t === r ? e.reportError(`Type ${t} cannot implement itself because it would create a circular reference.`, Zm(t, r)) : n.has(r.name) ? e.reportError(`Type ${t} can only implement ${r} once.`, Zm(t, r)) : (n.add(r.name), Um(e, t, r), Hm(e, t, r)) : e.reportError(`Type ${t} must only implement Interface types, it cannot implement ${W(r)}.`, Zm(t, r));
}
function Hm(e, t, n) {
	let r = t.getFields();
	for (let i of Object.values(n.getFields())) {
		let a = r[i.name];
		if (a == null) e.reportError(`Interface field ${i} expected but ${t} does not provide it.`, [
			i.astNode,
			t.astNode,
			...t.extensionASTNodes
		]);
		else {
			mp(e.schema, a.type, i.type) || e.reportError(`Interface field ${i} expects type ${i.type} but ${a} is type ${a.type}.`, [i.astNode?.type, a.astNode?.type]);
			for (let t of i.args) {
				let n = a.args.find((e) => e.name === t.name);
				n ? pp(t.type, n.type) || e.reportError(`Interface field argument ${t} expects type ${t.type} but ${n} is type ${n.type}.`, [t.astNode?.type, n.astNode?.type]) : e.reportError(`Interface field argument ${t} expected but ${a} does not provide it.`, [t.astNode, a.astNode]);
			}
			for (let t of a.args) tp(t) && (i.args.find((e) => e.name === t.name) || e.reportError(`Argument "${t}" must not be required type "${t.type}" if not provided by the Interface field "${i}".`, [t.astNode, i.astNode]));
			a.deprecationReason != null && i.deprecationReason == null && e.reportError(`Interface field ${n.name}.${i.name} is not deprecated, so implementation field ${t.name}.${a.name} must not be deprecated.`, [$m(a.astNode), a.astNode?.type]);
		}
	}
}
function Um(e, t, n) {
	let r = t.getInterfaces();
	for (let i of n.getInterfaces()) r.includes(i) || e.reportError(i === t ? `Type ${t} cannot implement ${n} because it would create a circular reference.` : `Type ${t} must implement ${i} because it is implemented by ${n}.`, [...Zm(n, i), ...Zm(t, n)]);
}
function Wm(e, t) {
	let n = t.getTypes();
	n.length === 0 && e.reportError(`Union type ${t} must define one or more member types.`, [t.astNode, ...t.extensionASTNodes]);
	let r = /* @__PURE__ */ new Set();
	for (let i of n) r.has(i.name) ? e.reportError(`Union type ${t} can only include type ${i} once.`, Qm(t, i.name)) : (r.add(i.name), mf(i) || e.reportError(`Union type ${t} can only include Object types, it cannot include ${W(i)}.`, Qm(t, String(i))));
}
function Gm(e, t) {
	let n = t.getValues();
	n.length === 0 && e.reportError(`Enum type ${t} must define one or more values.`, [t.astNode, ...t.extensionASTNodes]);
	for (let t of n) Rm(e, t);
}
function Km(e, t) {
	let n = Object.values(t.getFields());
	n.length === 0 && e.reportError(`Input Object type ${t} must define one or more fields.`, [t.astNode, ...t.extensionASTNodes]);
	for (let r of n) Rm(e, r), Pf(r.type) || e.reportError(`The type of ${r} must be Input Type but got: ${W(r.type)}.`, r.astNode?.type), fp(r) && r.deprecationReason != null && e.reportError(`Required input field ${r} cannot be deprecated.`, [$m(r.astNode), r.astNode?.type]), Fm(e, r), t.isOneOf && qm(t, r, e);
}
function qm(e, t, n) {
	Nf(t.type) && n.reportError(`OneOf input field ${e}.${t.name} must be nullable.`, t.astNode?.type), (t.default !== void 0 || t.defaultValue !== void 0) && n.reportError(`OneOf input field ${e}.${t.name} cannot have a default value.`, t.astNode);
}
function Jm(e, t) {
	let n = [];
	for (let e of t.values()) {
		let n = e.inputObj, r = Object.values(n.getFields());
		for (let i of r) {
			let r = Ym(n, i.type);
			if (r === void 0) continue;
			e.targets.push({
				field: i,
				target: r
			});
			let a = t.get(r);
			a !== void 0 && a.dependents.push(e);
		}
		n.isOneOf ? (r.length === 0 || e.targets.length < r.length) && s(e) : (e.unresolvedTargetCount = e.targets.length, e.targets.length === 0 && s(e));
	}
	let r;
	for (; (r = n.pop()) !== void 0;) for (let e of r.dependents) e.hasFiniteValue || (e.inputObj.isOneOf ? s(e) : (--e.unresolvedTargetCount, e.unresolvedTargetCount === 0 && s(e)));
	let i = /* @__PURE__ */ new Set(), a = [], o = /* @__PURE__ */ new Map();
	for (let e of t.values()) e.hasFiniteValue || c(e);
	function s(e) {
		e.hasFiniteValue || (e.hasFiniteValue = !0, n.push(e));
	}
	function c(n) {
		let r = n.inputObj;
		if (!i.has(r)) {
			i.add(r), o.set(r, a.length);
			for (let { field: i, target: s } of n.targets) {
				let n = t.get(s);
				if (n?.hasFiniteValue !== !1) continue;
				let l = o.get(s);
				if (a.push({
					fieldStr: `${r}.${i.name}`,
					astNode: i.astNode
				}), l === void 0) c(n);
				else {
					let t = a.slice(l), n = t.map((e) => e.fieldStr).join(", ");
					e.reportError(`Input Object ${s} cannot be provided a finite value because it references itself through fields: ${n}.`, t.map((e) => e.astNode));
				}
				a.pop();
			}
			o.delete(r);
		}
	}
}
function Ym(e, t) {
	if (e.isOneOf) return Of(t) ? t : void 0;
	if (Nf(t) && Of(t.ofType)) return t.ofType;
}
function Xm(e) {
	let t = Object.create(null), n = [], r = Object.create(null);
	return function(e) {
		return i(e, Object.create(null));
	};
	function i(e, t) {
		if (hu(t)) for (let n of t) i(e, n);
		else if (eu(t)) for (let n of Object.values(e.getFields())) {
			let r = Kf(n.type);
			Of(r) && (Object.hasOwn(t, n.name) ? i(r, t[n.name]) : o(n, r, `${e}.${n.name}`));
		}
	}
	function a(e, t) {
		if (t.kind === "ListValue") {
			for (let n of t.values) a(e, n);
			return;
		}
		if (t.kind !== "ObjectValue") return;
		let n = gu(t.fields, (e) => e.name.value);
		for (let t of Object.values(e.getFields())) {
			let r = Kf(t.type);
			Of(r) && (Object.hasOwn(n, t.name) ? a(r, n[t.name].value) : o(t, r, `${e}.${t.name}`));
		}
	}
	function o(o, s, c) {
		let l = o.default;
		if (l === void 0) return;
		let u = r[c];
		u === void 0 ? t[c] === void 0 && (t[c] = !0, r[c] = n.push([c, o.astNode?.defaultValue]), l.literal ? a(s, l.literal) : i(s, l.value), n.pop(), r[c] = void 0) : e.reportError(`Invalid circular reference. The default value of Input Object field ${c} references itself${u < n.length ? ` via the default values of: ${n.slice(u).map(([e]) => e).join(", ")}` : ""}.`, n.slice(u - 1).map(([, e]) => e));
	}
}
function Zm(e, t) {
	let { astNode: n, extensionASTNodes: r } = e;
	return (n == null ? r : [n, ...r]).flatMap((e) => e.interfaces ?? []).filter((e) => e.name.value === t.name);
}
function Qm(e, t) {
	let { astNode: n, extensionASTNodes: r } = e;
	return (n == null ? r : [n, ...r]).flatMap((e) => e.types ?? []).filter((e) => e.name.value === t);
}
function $m(e) {
	return e?.directives?.find((e) => e.name.value === tm.name);
}
// ../../../node_modules/.pnpm/graphql@17.1.0/node_modules/graphql/error/syntaxError.mjs
function eh(e, t, n) {
	return new G(`Syntax Error: ${n}`, {
		source: e,
		positions: [t]
	});
}
// ../../../node_modules/.pnpm/graphql@17.1.0/node_modules/graphql/diagnostics.mjs
function th() {
	let e;
	try {
		let t = globalThis.process;
		typeof t?.getBuiltinModule == "function" && (e = t.getBuiltinModule("node:diagnostics_channel"));
	} catch {}
	return e;
}
var nh = th(), rh = nh?.tracingChannel("graphql:parse"), ih = nh?.tracingChannel("graphql:validate"), ah = nh?.tracingChannel("graphql:execute"), oh = nh?.tracingChannel("graphql:execute:variableCoercion"), sh = nh?.tracingChannel("graphql:execute:rootSelectionSet");
nh?.tracingChannel("graphql:subscribe");
var ch = nh?.tracingChannel("graphql:resolve"), lh = [
	"start",
	"end",
	"asyncStart",
	"asyncEnd",
	"error"
];
function uh(e) {
	if (e == null) return !1;
	let t = e.hasSubscribers;
	if (t !== void 0) return t;
	for (let t of lh) if (e[t].hasSubscribers) return !0;
	return !1;
}
function dh(e, t, n) {
	let r = t;
	return e.start.runStores(r, () => {
		let t;
		try {
			t = n();
		} catch (t) {
			throw r.error = t, e.error.publish(r), e.end.publish(r), t;
		}
		return Zl(t) ? (e.end.publish(r), t.then((t) => (r.result = t, e.asyncStart.publish(r), e.asyncEnd.publish(r), t), (t) => {
			throw r.error = t, e.error.publish(r), e.asyncStart.publish(r), e.asyncEnd.publish(r), t;
		})) : (r.result = t, e.end.publish(r), t);
	});
}
// ../../../node_modules/.pnpm/graphql@17.1.0/node_modules/graphql/language/tokenKind.mjs
var X = {
	SOF: "<SOF>",
	EOF: "<EOF>",
	BANG: "!",
	DOLLAR: "$",
	AMP: "&",
	PAREN_L: "(",
	PAREN_R: ")",
	DOT: ".",
	SPREAD: "...",
	COLON: ":",
	EQUALS: "=",
	AT: "@",
	BRACKET_L: "[",
	BRACKET_R: "]",
	BRACE_L: "{",
	PIPE: "|",
	BRACE_R: "}",
	NAME: "Name",
	INT: "Int",
	FLOAT: "Float",
	STRING: "String",
	BLOCK_STRING: "BlockString",
	COMMENT: "Comment"
}, fh = class {
	constructor(e) {
		let t = new bu(X.SOF, 0, 0, 0, 0);
		this.source = e, this.lastToken = t, this.token = t, this.line = 1, this.lineStart = 0, this._maxComments = void 0, this._commentCount = 0;
	}
	get [Symbol.toStringTag]() {
		return "Lexer";
	}
	advance() {
		return this.lastToken = this.token, this.token = this.lookahead();
	}
	lookahead() {
		let e = this.token;
		if (e.kind !== X.EOF) do
			if (e.next) e = e.next;
			else {
				let t = bh(this, e.end);
				e.next = t, t.prev = e, e = t;
			}
		while (e.kind === X.COMMENT);
		return e;
	}
};
function ph(e) {
	return e === X.BANG || e === X.DOLLAR || e === X.AMP || e === X.PAREN_L || e === X.PAREN_R || e === X.DOT || e === X.SPREAD || e === X.COLON || e === X.EQUALS || e === X.AT || e === X.BRACKET_L || e === X.BRACKET_R || e === X.BRACE_L || e === X.PIPE || e === X.BRACE_R;
}
function mh(e) {
	return e >= 0 && e <= 55295 || e >= 57344 && e <= 1114111;
}
function hh(e, t) {
	return gh(e.charCodeAt(t)) && _h(e.charCodeAt(t + 1));
}
function gh(e) {
	return e >= 55296 && e <= 56319;
}
function _h(e) {
	return e >= 56320 && e <= 57343;
}
function vh(e, t) {
	let n = e.source.body.codePointAt(t);
	if (n === void 0) return X.EOF;
	if (n >= 32 && n <= 126) {
		let e = String.fromCodePoint(n);
		return e === "\"" ? "'\"'" : `"${e}"`;
	}
	return "U+" + n.toString(16).toUpperCase().padStart(4, "0");
}
function yh(e, t, n, r, i) {
	let a = e.line;
	return new bu(t, n, r, a, 1 + n - e.lineStart, i);
}
function bh(e, t) {
	let n = e.source.body, r = n.length, i = t;
	for (; i < r;) {
		let t = n.charCodeAt(i);
		switch (t) {
			case 65279:
			case 9:
			case 32:
			case 44:
				++i;
				continue;
			case 10:
				++i, ++e.line, e.lineStart = i;
				continue;
			case 13:
				n.charCodeAt(i + 1) === 10 ? i += 2 : ++i, ++e.line, e.lineStart = i;
				continue;
			case 35: return xh(e, i);
			case 33: return yh(e, X.BANG, i, i + 1);
			case 36: return yh(e, X.DOLLAR, i, i + 1);
			case 38: return yh(e, X.AMP, i, i + 1);
			case 40: return yh(e, X.PAREN_L, i, i + 1);
			case 41: return yh(e, X.PAREN_R, i, i + 1);
			case 46: {
				let t = n.charCodeAt(i + 1);
				if (t === 46 && n.charCodeAt(i + 2) === 46) return yh(e, X.SPREAD, i, i + 3);
				if (t === 46) throw eh(e.source, i, "Unexpected \"..\", did you mean \"...\"?");
				if (Id(t)) {
					let n = e.source.body.slice(i + 1, Ch(e, i + 1, t));
					throw eh(e.source, i, `Invalid number, expected digit before ".", did you mean "0.${n}"?`);
				}
				break;
			}
			case 58: return yh(e, X.COLON, i, i + 1);
			case 61: return yh(e, X.EQUALS, i, i + 1);
			case 64: return yh(e, X.AT, i, i + 1);
			case 91: return yh(e, X.BRACKET_L, i, i + 1);
			case 93: return yh(e, X.BRACKET_R, i, i + 1);
			case 123: return yh(e, X.BRACE_L, i, i + 1);
			case 124: return yh(e, X.PIPE, i, i + 1);
			case 125: return yh(e, X.BRACE_R, i, i + 1);
			case 34: return n.charCodeAt(i + 1) === 34 && n.charCodeAt(i + 2) === 34 ? Ah(e, i) : wh(e, i);
		}
		if (Id(t) || t === 45) return Sh(e, i, t);
		if (Rd(t)) return jh(e, i);
		throw eh(e.source, i, t === 39 ? "Unexpected single quote character ('), did you mean to use a double quote (\")?" : mh(t) || hh(n, i) ? `Unexpected character: ${vh(e, i)}.` : `Invalid character: ${vh(e, i)}.`);
	}
	return yh(e, X.EOF, r, r);
}
function xh(e, t) {
	let n = e._maxComments;
	if (n !== void 0) {
		let r = e._commentCount + 1;
		if (r > n) throw eh(e.source, t, `Document contains more than ${n} comments. Parsing aborted.`);
		e._commentCount = r;
	}
	let r = e.source.body, i = r.length, a = t + 1;
	for (; a < i;) {
		let e = r.charCodeAt(a);
		if (e === 10 || e === 13) break;
		if (mh(e)) ++a;
		else if (hh(r, a)) a += 2;
		else break;
	}
	return yh(e, X.COMMENT, t, a, r.slice(t + 1, a));
}
function Sh(e, t, n) {
	let r = e.source.body, i = t, a = n, o = !1;
	if (a === 45 && (a = r.charCodeAt(++i)), a === 48) {
		if (a = r.charCodeAt(++i), Id(a)) throw eh(e.source, i, `Invalid number, unexpected digit after 0: ${vh(e, i)}.`);
	} else i = Ch(e, i, a), a = r.charCodeAt(i);
	if (a === 46 && (o = !0, a = r.charCodeAt(++i), i = Ch(e, i, a), a = r.charCodeAt(i)), (a === 69 || a === 101) && (o = !0, a = r.charCodeAt(++i), (a === 43 || a === 45) && (a = r.charCodeAt(++i)), i = Ch(e, i, a), a = r.charCodeAt(i)), a === 46 || Rd(a)) throw eh(e.source, i, `Invalid number, expected digit but got: ${vh(e, i)}.`);
	return yh(e, o ? X.FLOAT : X.INT, t, i, r.slice(t, i));
}
function Ch(e, t, n) {
	if (!Id(n)) throw eh(e.source, t, `Invalid number, expected digit but got: ${vh(e, t)}.`);
	let r = e.source.body, i = t + 1;
	for (; Id(r.charCodeAt(i));) ++i;
	return i;
}
function wh(e, t) {
	let n = e.source.body, r = n.length, i = t + 1, a = i, o = "";
	for (; i < r;) {
		let r = n.charCodeAt(i);
		if (r === 34) return o += n.slice(a, i), yh(e, X.STRING, t, i + 1, o);
		if (r === 92) {
			o += n.slice(a, i);
			let t = n.charCodeAt(i + 1) === 117 ? n.charCodeAt(i + 2) === 123 ? Th(e, i) : Eh(e, i) : kh(e, i);
			o += t.value, i += t.size, a = i;
		} else {
			if (r === 10 || r === 13) break;
			if (mh(r)) ++i;
			else if (hh(n, i)) i += 2;
			else throw eh(e.source, i, `Invalid character within String: ${vh(e, i)}.`);
		}
	}
	throw eh(e.source, i, "Unterminated string.");
}
function Th(e, t) {
	let n = e.source.body, r = 0, i = 3;
	for (; i < 12;) {
		let e = n.charCodeAt(t + i++);
		if (e === 125) {
			if (i < 5 || !mh(r)) break;
			return {
				value: String.fromCodePoint(r),
				size: i
			};
		}
		if (r = r << 4 | Oh(e), r < 0) break;
	}
	throw eh(e.source, t, `Invalid Unicode escape sequence: "${n.slice(t, t + i)}".`);
}
function Eh(e, t) {
	let n = e.source.body, r = Dh(n, t + 2);
	if (mh(r)) return {
		value: String.fromCodePoint(r),
		size: 6
	};
	if (gh(r) && n.charCodeAt(t + 6) === 92 && n.charCodeAt(t + 7) === 117) {
		let e = Dh(n, t + 8);
		if (_h(e)) return {
			value: String.fromCodePoint(r, e),
			size: 12
		};
	}
	throw eh(e.source, t, `Invalid Unicode escape sequence: "${n.slice(t, t + 6)}".`);
}
function Dh(e, t) {
	return Oh(e.charCodeAt(t)) << 12 | Oh(e.charCodeAt(t + 1)) << 8 | Oh(e.charCodeAt(t + 2)) << 4 | Oh(e.charCodeAt(t + 3));
}
function Oh(e) {
	return e >= 48 && e <= 57 ? e - 48 : e >= 65 && e <= 70 ? e - 55 : e >= 97 && e <= 102 ? e - 87 : -1;
}
function kh(e, t) {
	let n = e.source.body;
	switch (n.charCodeAt(t + 1)) {
		case 34: return {
			value: "\"",
			size: 2
		};
		case 92: return {
			value: "\\",
			size: 2
		};
		case 47: return {
			value: "/",
			size: 2
		};
		case 98: return {
			value: "\b",
			size: 2
		};
		case 102: return {
			value: "\f",
			size: 2
		};
		case 110: return {
			value: "\n",
			size: 2
		};
		case 114: return {
			value: "\r",
			size: 2
		};
		case 116: return {
			value: "	",
			size: 2
		};
	}
	throw eh(e.source, t, `Invalid character escape sequence: "${n.slice(t, t + 2)}".`);
}
function Ah(e, t) {
	let n = e.source.body, r = n.length, i = e.lineStart, a = t + 3, o = a, s = "", c = [];
	for (; a < r;) {
		let r = n.charCodeAt(a);
		if (r === 34 && n.charCodeAt(a + 1) === 34 && n.charCodeAt(a + 2) === 34) {
			s += n.slice(o, a), c.push(s);
			let r = yh(e, X.BLOCK_STRING, t, a + 3, Bd(c).join("\n"));
			return e.line += c.length - 1, e.lineStart = i, r;
		}
		if (r === 92 && n.charCodeAt(a + 1) === 34 && n.charCodeAt(a + 2) === 34 && n.charCodeAt(a + 3) === 34) s += n.slice(o, a), o = a + 1, a += 4;
		else if (r === 10 || r === 13) s += n.slice(o, a), c.push(s), r === 13 && n.charCodeAt(a + 1) === 10 ? a += 2 : ++a, s = "", o = a, i = a;
		else if (mh(r)) ++a;
		else if (hh(n, a)) a += 2;
		else throw eh(e.source, a, `Invalid character within String: ${vh(e, a)}.`);
	}
	throw eh(e.source, a, "Unterminated string.");
}
function jh(e, t) {
	let n = e.source.body, r = n.length, i = t + 1;
	for (; i < r && zd(n.charCodeAt(i));) ++i;
	return yh(e, X.NAME, t, i, n.slice(t, i));
}
// ../../../node_modules/.pnpm/graphql@17.1.0/node_modules/graphql/language/source.mjs
var Mh = Symbol("Source"), Nh = class {
	constructor(e, t = "GraphQL request", n = {
		line: 1,
		column: 1
	}) {
		this.__kind = Mh, this.body = e, this.name = t, this.locationOffset = n, this.locationOffset.line > 0 || Sd(!1, "line in locationOffset is 1-indexed and must be positive."), this.locationOffset.column > 0 || Sd(!1, "column in locationOffset is 1-indexed and must be positive.");
	}
	get [Symbol.toStringTag]() {
		return "Source";
	}
};
function Ph(e) {
	return Yl(e, Mh, Nh);
}
// ../../../node_modules/.pnpm/graphql@17.1.0/node_modules/graphql/language/parser.mjs
function Fh(e, t) {
	return uh(rh) ? rh.traceSync(() => Ih(e, t), { source: e }) : Ih(e, t);
}
function Ih(e, t) {
	let n = new Rh(e, t), r = n.parseDocument();
	return Object.defineProperty(r, "tokenCount", {
		enumerable: !1,
		value: n.tokenCount
	}), r;
}
function Lh(e, t) {
	let n = new Rh(e, t);
	n.expectToken(X.SOF);
	let r = n.parseConstValueLiteral();
	return n.expectToken(X.EOF), r;
}
var Rh = class {
	constructor(e, t = {}) {
		let { lexer: n, ...r } = t;
		if (n) this._lexer = n;
		else {
			let t = Ph(e) ? e : new Nh(e);
			this._lexer = new fh(t);
		}
		this._options = r, this._tokenCounter = 0, this._lexer._maxComments = r.maxComments, this._lexer._commentCount = 0;
		let i = r.maxSourceLength;
		if (i !== void 0 && this._lexer.source.body.length > i) throw eh(this._lexer.source, i, `Source contains more than ${i} UTF-16 code units. Parsing aborted.`);
	}
	get tokenCount() {
		return this._tokenCounter;
	}
	parseName() {
		let e = this.expectToken(X.NAME);
		return this.node(e, {
			kind: Eu,
			value: e.value
		});
	}
	parseDocument() {
		return this.node(this._lexer.token, {
			kind: Du,
			definitions: this.many(X.SOF, this.parseDefinition, X.EOF)
		});
	}
	parseDefinition() {
		if (this.peek(X.BRACE_L)) return this.parseOperationDefinition();
		let e = this.peekDescription(), t = e ? this._lexer.lookahead() : this._lexer.token;
		if (e && t.kind === X.BRACE_L) throw eh(this._lexer.source, this._lexer.token.start, "Unexpected description, descriptions are not supported on shorthand queries.");
		if (t.kind === X.NAME) {
			switch (t.value) {
				case "schema": return this.parseSchemaDefinition();
				case "scalar": return this.parseScalarTypeDefinition();
				case "type": return this.parseObjectTypeDefinition();
				case "interface": return this.parseInterfaceTypeDefinition();
				case "union": return this.parseUnionTypeDefinition();
				case "enum": return this.parseEnumTypeDefinition();
				case "input": return this.parseInputObjectTypeDefinition();
				case "directive": return this.parseDirectiveDefinition();
			}
			switch (t.value) {
				case "query":
				case "mutation":
				case "subscription": return this.parseOperationDefinition();
				case "fragment": return this.parseFragmentDefinition();
			}
			if (e) throw eh(this._lexer.source, this._lexer.token.start, "Unexpected description, only GraphQL definitions support descriptions.");
			if (t.value === "extend") return this.parseTypeSystemExtension();
		}
		throw this.unexpected(t);
	}
	parseOperationDefinition() {
		let e = this._lexer.token;
		if (this.peek(X.BRACE_L)) return this.node(e, {
			kind: Ou,
			operation: wu.QUERY,
			description: void 0,
			name: void 0,
			variableDefinitions: void 0,
			directives: void 0,
			selectionSet: this.parseSelectionSet()
		});
		let t = this.parseDescription(), n = this.parseOperationType(), r;
		return this.peek(X.NAME) && (r = this.parseName()), this.node(e, {
			kind: Ou,
			operation: n,
			description: t,
			name: r,
			variableDefinitions: this.parseVariableDefinitions(),
			directives: this.parseDirectives(!1),
			selectionSet: this.parseSelectionSet()
		});
	}
	parseOperationType() {
		let e = this.expectToken(X.NAME);
		switch (e.value) {
			case "query": return wu.QUERY;
			case "mutation": return wu.MUTATION;
			case "subscription": return wu.SUBSCRIPTION;
		}
		throw this.unexpected(e);
	}
	parseVariableDefinitions() {
		return this.optionalMany(X.PAREN_L, this.parseVariableDefinition, X.PAREN_R);
	}
	parseVariableDefinition() {
		return this.node(this._lexer.token, {
			kind: ku,
			description: this.parseDescription(),
			variable: this.parseVariable(),
			type: (this.expectToken(X.COLON), this.parseTypeReference()),
			defaultValue: this.expectOptionalToken(X.EQUALS) ? this.parseConstValueLiteral() : void 0,
			directives: this.parseConstDirectives()
		});
	}
	parseVariable() {
		let e = this._lexer.token;
		return this.expectToken(X.DOLLAR), this.node(e, {
			kind: Lu,
			name: this.parseName()
		});
	}
	parseSelectionSet() {
		return this.node(this._lexer.token, {
			kind: Au,
			selections: this._options.allowEmptySelectionSets === !1 ? this.many(X.BRACE_L, this.parseSelection, X.BRACE_R) : this.any(X.BRACE_L, this.parseSelection, X.BRACE_R)
		});
	}
	parseSelection() {
		return this.peek(X.SPREAD) ? this.parseFragment() : this.parseField();
	}
	parseField() {
		let e = this._lexer.token, t = this.parseName(), n, r;
		return this.expectOptionalToken(X.COLON) ? (n = t, r = this.parseName()) : r = t, this.node(e, {
			kind: ju,
			alias: n,
			name: r,
			arguments: this.parseArguments(!1),
			directives: this.parseDirectives(!1),
			selectionSet: this.peek(X.BRACE_L) ? this.parseSelectionSet() : void 0
		});
	}
	parseArguments(e) {
		let t = e ? this.parseConstArgument : this.parseArgument;
		return this.optionalMany(X.PAREN_L, t, X.PAREN_R);
	}
	parseFragmentArguments() {
		let e = this.parseFragmentArgument;
		return this.optionalMany(X.PAREN_L, e, X.PAREN_R);
	}
	parseArgument(e = !1) {
		let t = this._lexer.token, n = this.parseName();
		return this.expectToken(X.COLON), this.node(t, {
			kind: Mu,
			name: n,
			value: this.parseValueLiteral(e)
		});
	}
	parseConstArgument() {
		return this.parseArgument(!0);
	}
	parseFragmentArgument() {
		let e = this._lexer.token, t = this.parseName();
		return this.expectToken(X.COLON), this.node(e, {
			kind: Nu,
			name: t,
			value: this.parseValueLiteral(!1)
		});
	}
	parseFragment() {
		let e = this._lexer.token;
		this.expectToken(X.SPREAD);
		let t = this.expectOptionalKeyword("on");
		if (!t && this.peek(X.NAME)) {
			let t = this.parseFragmentName();
			return this.peek(X.PAREN_L) && this._options.experimentalFragmentArguments ? this.node(e, {
				kind: Pu,
				name: t,
				arguments: this.parseFragmentArguments(),
				directives: this.parseDirectives(!1)
			}) : this.node(e, {
				kind: Pu,
				name: t,
				directives: this.parseDirectives(!1)
			});
		}
		return this.node(e, {
			kind: Fu,
			typeCondition: t ? this.parseNamedType() : void 0,
			directives: this.parseDirectives(!1),
			selectionSet: this.parseSelectionSet()
		});
	}
	parseFragmentDefinition() {
		let e = this._lexer.token, t = this.parseDescription();
		return this.expectKeyword("fragment"), this._options.experimentalFragmentArguments === !0 ? this.node(e, {
			kind: Iu,
			description: t,
			name: this.parseFragmentName(),
			variableDefinitions: this.parseVariableDefinitions(),
			typeCondition: (this.expectKeyword("on"), this.parseNamedType()),
			directives: this.parseDirectives(!1),
			selectionSet: this.parseSelectionSet()
		}) : this.node(e, {
			kind: Iu,
			description: t,
			name: this.parseFragmentName(),
			typeCondition: (this.expectKeyword("on"), this.parseNamedType()),
			directives: this.parseDirectives(!1),
			selectionSet: this.parseSelectionSet()
		});
	}
	parseFragmentName() {
		if (this._lexer.token.value === "on") throw this.unexpected();
		return this.parseName();
	}
	parseValueLiteral(e) {
		let t = this._lexer.token;
		switch (t.kind) {
			case X.BRACKET_L: return this.parseList(e);
			case X.BRACE_L: return this.parseObject(e);
			case X.INT: return this.advanceLexer(), this.node(t, {
				kind: Ru,
				value: t.value
			});
			case X.FLOAT: return this.advanceLexer(), this.node(t, {
				kind: zu,
				value: t.value
			});
			case X.STRING:
			case X.BLOCK_STRING: return this.parseStringLiteral();
			case X.NAME: switch (this.advanceLexer(), t.value) {
				case "true": return this.node(t, {
					kind: Vu,
					value: !0
				});
				case "false": return this.node(t, {
					kind: Vu,
					value: !1
				});
				case "null": return this.node(t, { kind: Hu });
				default: return this.node(t, {
					kind: Uu,
					value: t.value
				});
			}
			case X.DOLLAR:
				if (e) {
					if (this.expectToken(X.DOLLAR), this._lexer.token.kind === X.NAME) {
						let e = this._lexer.token.value;
						throw eh(this._lexer.source, t.start, `Unexpected variable "$${e}" in constant value.`);
					}
					throw this.unexpected(t);
				}
				return this.parseVariable();
			default: throw this.unexpected();
		}
	}
	parseConstValueLiteral() {
		return this.parseValueLiteral(!0);
	}
	parseStringLiteral() {
		let e = this._lexer.token;
		return this.advanceLexer(), this.node(e, {
			kind: Bu,
			value: e.value,
			block: e.kind === X.BLOCK_STRING
		});
	}
	parseList(e) {
		return this.node(this._lexer.token, {
			kind: Wu,
			values: this.any(X.BRACKET_L, () => this.parseValueLiteral(e), X.BRACKET_R)
		});
	}
	parseObject(e) {
		return this.node(this._lexer.token, {
			kind: Gu,
			fields: this.any(X.BRACE_L, () => this.parseObjectField(e), X.BRACE_R)
		});
	}
	parseObjectField(e) {
		let t = this._lexer.token, n = this.parseName();
		return this.expectToken(X.COLON), this.node(t, {
			kind: Ku,
			name: n,
			value: this.parseValueLiteral(e)
		});
	}
	parseDirectives(e) {
		let t = [];
		for (; this.peek(X.AT);) t.push(this.parseDirective(e));
		if (t.length) return t;
	}
	parseConstDirectives() {
		return this.parseDirectives(!0);
	}
	parseDirective(e) {
		let t = this._lexer.token;
		return this.expectToken(X.AT), this.node(t, {
			kind: qu,
			name: this.parseName(),
			arguments: this.parseArguments(e)
		});
	}
	parseTypeReference() {
		let e = this._lexer.token, t;
		if (this.expectOptionalToken(X.BRACKET_L)) {
			let n = this.parseTypeReference();
			this.expectToken(X.BRACKET_R), t = this.node(e, {
				kind: Yu,
				type: n
			});
		} else t = this.parseNamedType();
		return this.expectOptionalToken(X.BANG) ? this.node(e, {
			kind: Xu,
			type: t
		}) : t;
	}
	parseNamedType() {
		return this.node(this._lexer.token, {
			kind: Ju,
			name: this.parseName()
		});
	}
	peekDescription() {
		return this.peek(X.STRING) || this.peek(X.BLOCK_STRING);
	}
	parseDescription() {
		if (this.peekDescription()) return this.parseStringLiteral();
	}
	parseSchemaDefinition() {
		let e = this._lexer.token, t = this.parseDescription();
		this.expectKeyword("schema");
		let n = this.parseConstDirectives(), r = this.many(X.BRACE_L, this.parseOperationTypeDefinition, X.BRACE_R);
		return this.node(e, {
			kind: Zu,
			description: t,
			directives: n,
			operationTypes: r
		});
	}
	parseOperationTypeDefinition() {
		let e = this._lexer.token, t = this.parseOperationType();
		this.expectToken(X.COLON);
		let n = this.parseNamedType();
		return this.node(e, {
			kind: Qu,
			operation: t,
			type: n
		});
	}
	parseScalarTypeDefinition() {
		let e = this._lexer.token, t = this.parseDescription();
		this.expectKeyword("scalar");
		let n = this.parseName(), r = this.parseConstDirectives();
		return this.node(e, {
			kind: $u,
			description: t,
			name: n,
			directives: r
		});
	}
	parseObjectTypeDefinition() {
		let e = this._lexer.token, t = this.parseDescription();
		this.expectKeyword("type");
		let n = this.parseName(), r = this.parseImplementsInterfaces(), i = this.parseConstDirectives(), a = this.parseFieldsDefinition();
		return this.node(e, {
			kind: ed,
			description: t,
			name: n,
			interfaces: r,
			directives: i,
			fields: a
		});
	}
	parseImplementsInterfaces() {
		return this.expectOptionalKeyword("implements") ? this.delimitedMany(X.AMP, this.parseNamedType) : void 0;
	}
	parseFieldsDefinition() {
		return this.optionalMany(X.BRACE_L, this.parseFieldDefinition, X.BRACE_R);
	}
	parseFieldDefinition() {
		let e = this._lexer.token, t = this.parseDescription(), n = this.parseName(), r = this.parseArgumentDefs();
		this.expectToken(X.COLON);
		let i = this.parseTypeReference(), a = this.parseConstDirectives();
		return this.node(e, {
			kind: td,
			description: t,
			name: n,
			arguments: r,
			type: i,
			directives: a
		});
	}
	parseArgumentDefs() {
		return this.optionalMany(X.PAREN_L, this.parseInputValueDef, X.PAREN_R);
	}
	parseInputValueDef() {
		let e = this._lexer.token, t = this.parseDescription(), n = this.parseName();
		this.expectToken(X.COLON);
		let r = this.parseTypeReference(), i;
		this.expectOptionalToken(X.EQUALS) && (i = this.parseConstValueLiteral());
		let a = this.parseConstDirectives();
		return this.node(e, {
			kind: nd,
			description: t,
			name: n,
			type: r,
			defaultValue: i,
			directives: a
		});
	}
	parseInterfaceTypeDefinition() {
		let e = this._lexer.token, t = this.parseDescription();
		this.expectKeyword("interface");
		let n = this.parseName(), r = this.parseImplementsInterfaces(), i = this.parseConstDirectives(), a = this.parseFieldsDefinition();
		return this.node(e, {
			kind: rd,
			description: t,
			name: n,
			interfaces: r,
			directives: i,
			fields: a
		});
	}
	parseUnionTypeDefinition() {
		let e = this._lexer.token, t = this.parseDescription();
		this.expectKeyword("union");
		let n = this.parseName(), r = this.parseConstDirectives(), i = this.parseUnionMemberTypes();
		return this.node(e, {
			kind: id,
			description: t,
			name: n,
			directives: r,
			types: i
		});
	}
	parseUnionMemberTypes() {
		return this.expectOptionalToken(X.EQUALS) ? this.delimitedMany(X.PIPE, this.parseNamedType) : void 0;
	}
	parseEnumTypeDefinition() {
		let e = this._lexer.token, t = this.parseDescription();
		this.expectKeyword("enum");
		let n = this.parseName(), r = this.parseConstDirectives(), i = this.parseEnumValuesDefinition();
		return this.node(e, {
			kind: ad,
			description: t,
			name: n,
			directives: r,
			values: i
		});
	}
	parseEnumValuesDefinition() {
		return this.optionalMany(X.BRACE_L, this.parseEnumValueDefinition, X.BRACE_R);
	}
	parseEnumValueDefinition() {
		let e = this._lexer.token, t = this.parseDescription(), n = this.parseEnumValueName(), r = this.parseConstDirectives();
		return this.node(e, {
			kind: od,
			description: t,
			name: n,
			directives: r
		});
	}
	parseEnumValueName() {
		if (this._lexer.token.value === "true" || this._lexer.token.value === "false" || this._lexer.token.value === "null") throw eh(this._lexer.source, this._lexer.token.start, `${zh(this._lexer.token)} is reserved and cannot be used for an enum value.`);
		return this.parseName();
	}
	parseInputObjectTypeDefinition() {
		let e = this._lexer.token, t = this.parseDescription();
		this.expectKeyword("input");
		let n = this.parseName(), r = this.parseConstDirectives(), i = this.parseInputFieldsDefinition();
		return this.node(e, {
			kind: sd,
			description: t,
			name: n,
			directives: r,
			fields: i
		});
	}
	parseInputFieldsDefinition() {
		return this.optionalMany(X.BRACE_L, this.parseInputValueDef, X.BRACE_R);
	}
	parseTypeSystemExtension() {
		let e = this._lexer.lookahead();
		if (e.kind === X.NAME) switch (e.value) {
			case "schema": return this.parseSchemaExtension();
			case "scalar": return this.parseScalarTypeExtension();
			case "type": return this.parseObjectTypeExtension();
			case "interface": return this.parseInterfaceTypeExtension();
			case "union": return this.parseUnionTypeExtension();
			case "enum": return this.parseEnumTypeExtension();
			case "input": return this.parseInputObjectTypeExtension();
			case "directive": return this.parseDirectiveExtension();
		}
		throw this.unexpected(e);
	}
	parseSchemaExtension() {
		let e = this._lexer.token;
		this.expectKeyword("extend"), this.expectKeyword("schema");
		let t = this.parseConstDirectives(), n = this.optionalMany(X.BRACE_L, this.parseOperationTypeDefinition, X.BRACE_R);
		if (t === void 0 && n === void 0) throw this.unexpected();
		return this.node(e, {
			kind: ld,
			directives: t,
			operationTypes: n
		});
	}
	parseScalarTypeExtension() {
		let e = this._lexer.token;
		this.expectKeyword("extend"), this.expectKeyword("scalar");
		let t = this.parseName(), n = this.parseConstDirectives();
		if (n === void 0) throw this.unexpected();
		return this.node(e, {
			kind: dd,
			name: t,
			directives: n
		});
	}
	parseObjectTypeExtension() {
		let e = this._lexer.token;
		this.expectKeyword("extend"), this.expectKeyword("type");
		let t = this.parseName(), n = this.parseImplementsInterfaces(), r = this.parseConstDirectives(), i = this.parseFieldsDefinition();
		if (n === void 0 && r === void 0 && i === void 0) throw this.unexpected();
		return this.node(e, {
			kind: fd,
			name: t,
			interfaces: n,
			directives: r,
			fields: i
		});
	}
	parseInterfaceTypeExtension() {
		let e = this._lexer.token;
		this.expectKeyword("extend"), this.expectKeyword("interface");
		let t = this.parseName(), n = this.parseImplementsInterfaces(), r = this.parseConstDirectives(), i = this.parseFieldsDefinition();
		if (n === void 0 && r === void 0 && i === void 0) throw this.unexpected();
		return this.node(e, {
			kind: pd,
			name: t,
			interfaces: n,
			directives: r,
			fields: i
		});
	}
	parseUnionTypeExtension() {
		let e = this._lexer.token;
		this.expectKeyword("extend"), this.expectKeyword("union");
		let t = this.parseName(), n = this.parseConstDirectives(), r = this.parseUnionMemberTypes();
		if (n === void 0 && r === void 0) throw this.unexpected();
		return this.node(e, {
			kind: md,
			name: t,
			directives: n,
			types: r
		});
	}
	parseEnumTypeExtension() {
		let e = this._lexer.token;
		this.expectKeyword("extend"), this.expectKeyword("enum");
		let t = this.parseName(), n = this.parseConstDirectives(), r = this.parseEnumValuesDefinition();
		if (n === void 0 && r === void 0) throw this.unexpected();
		return this.node(e, {
			kind: hd,
			name: t,
			directives: n,
			values: r
		});
	}
	parseInputObjectTypeExtension() {
		let e = this._lexer.token;
		this.expectKeyword("extend"), this.expectKeyword("input");
		let t = this.parseName(), n = this.parseConstDirectives(), r = this.parseInputFieldsDefinition();
		if (n === void 0 && r === void 0) throw this.unexpected();
		return this.node(e, {
			kind: gd,
			name: t,
			directives: n,
			fields: r
		});
	}
	parseDirectiveExtension() {
		let e = this._lexer.token;
		this.expectKeyword("extend"), this.expectKeyword("directive"), this.expectToken(X.AT);
		let t = this.parseName(), n = this.parseConstDirectives();
		if (n === void 0) throw this.unexpected();
		return this.node(e, {
			kind: ud,
			name: t,
			directives: n
		});
	}
	parseDirectiveDefinition() {
		let e = this._lexer.token, t = this.parseDescription();
		this.expectKeyword("directive"), this.expectToken(X.AT);
		let n = this.parseName(), r = this.parseArgumentDefs(), i = this.parseConstDirectives(), a = this.expectOptionalKeyword("repeatable");
		this.expectKeyword("on");
		let o = this.parseDirectiveLocations();
		return this.node(e, {
			kind: cd,
			description: t,
			name: n,
			arguments: r,
			directives: i,
			repeatable: a,
			locations: o
		});
	}
	parseDirectiveLocations() {
		return this.delimitedMany(X.PIPE, this.parseDirectiveLocation);
	}
	parseDirectiveLocation() {
		let e = this._lexer.token, t = this.parseName();
		if (Object.hasOwn(Y, t.value)) return t;
		throw this.unexpected(e);
	}
	parseSchemaCoordinate() {
		let e = this._lexer.token, t = this.expectOptionalToken(X.AT), n = this.parseName(), r;
		!t && this.expectOptionalToken(X.DOT) && (r = this.parseName());
		let i;
		return (t || r) && this.expectOptionalToken(X.PAREN_L) && (i = this.parseName(), this.expectToken(X.COLON), this.expectToken(X.PAREN_R)), t ? i ? this.node(e, {
			kind: xd,
			name: n,
			argumentName: i
		}) : this.node(e, {
			kind: bd,
			name: n
		}) : r ? i ? this.node(e, {
			kind: yd,
			name: n,
			fieldName: r,
			argumentName: i
		}) : this.node(e, {
			kind: vd,
			name: n,
			memberName: r
		}) : this.node(e, {
			kind: _d,
			name: n
		});
	}
	node(e, t) {
		return this._options.noLocation !== !0 && (t.loc = new yu(e, this._lexer.lastToken, this._lexer.source)), t;
	}
	peek(e) {
		return this._lexer.token.kind === e;
	}
	expectToken(e) {
		let t = this._lexer.token;
		if (t.kind === e) return this.advanceLexer(), t;
		throw eh(this._lexer.source, t.start, `Expected ${Bh(e)}, found ${zh(t)}.`);
	}
	expectOptionalToken(e) {
		return this._lexer.token.kind === e && (this.advanceLexer(), !0);
	}
	expectKeyword(e) {
		let t = this._lexer.token;
		if (t.kind === X.NAME && t.value === e) this.advanceLexer();
		else throw eh(this._lexer.source, t.start, `Expected "${e}", found ${zh(t)}.`);
	}
	expectOptionalKeyword(e) {
		let t = this._lexer.token;
		return t.kind === X.NAME && t.value === e && (this.advanceLexer(), !0);
	}
	unexpected(e) {
		let t = e ?? this._lexer.token;
		return eh(this._lexer.source, t.start, `Unexpected ${zh(t)}.`);
	}
	any(e, t, n) {
		this.expectToken(e);
		let r = [];
		for (; !this.expectOptionalToken(n);) r.push(t.call(this));
		return r;
	}
	optionalMany(e, t, n) {
		if (this.expectOptionalToken(e)) {
			let e = [];
			do
				e.push(t.call(this));
			while (!this.expectOptionalToken(n));
			return e;
		}
	}
	many(e, t, n) {
		this.expectToken(e);
		let r = [];
		do
			r.push(t.call(this));
		while (!this.expectOptionalToken(n));
		return r;
	}
	delimitedMany(e, t) {
		this.expectOptionalToken(e);
		let n = [];
		do
			n.push(t.call(this));
		while (this.expectOptionalToken(e));
		return n;
	}
	advanceLexer() {
		let { maxLexicalTokens: e = this._options.maxTokens } = this._options, t = this._lexer.advance();
		if (t.kind !== X.EOF && (++this._tokenCounter, e !== void 0 && this._tokenCounter > e)) throw eh(this._lexer.source, t.start, `Document contains more than ${e} tokens. Parsing aborted.`);
	}
};
function zh(e) {
	let t = e.value;
	return Bh(e.kind) + (t == null ? "" : ` "${t}"`);
}
function Bh(e) {
	return ph(e) ? `"${e}"` : e;
}
// ../../../node_modules/.pnpm/graphql@17.1.0/node_modules/graphql/language/visitor.mjs
var Vh = Object.values(Tu), Hh = Object.freeze({});
function Uh(e, t, n = xu) {
	let r = /* @__PURE__ */ new Map();
	for (let e of Vh) r.set(e, Gh(t, e));
	let i, a = Array.isArray(e), o = [e], s = -1, c, l = e, u, d, f = [], p = [];
	do {
		s++;
		let e = s === o.length, m = e && c !== void 0;
		if (e) {
			if (u = p.length === 0 ? void 0 : f[f.length - 1], l = d, d = p.pop(), c !== void 0) {
				if (a) {
					l = l.slice();
					let e = 0;
					for (let t = 0; t < c.length; t += 2) {
						let n = c[t], r = c[t + 1], i = n - e;
						r === null ? (l.splice(i, 1), e++) : l[i] = r;
					}
				} else {
					l = { ...l };
					for (let e = 0; e < c.length; e += 2) l[c[e]] = c[e + 1];
				}
			}
			s = i.index, o = i.keys, c = i.edits, a = i.inArray, i = i.prev;
		} else if (d != null) {
			if (u = a ? s : o[s], l = d[u], l == null) continue;
			f.push(u);
		}
		let h, ee = Array.isArray(l);
		if (!ee) {
			if (Cu(l) || Sd(!1, `Invalid AST Node: ${W(l)}.`), h = (e ? r.get(l.kind)?.leave : r.get(l.kind)?.enter)?.call(t, l, u, d, f, p), h === Hh) break;
			if (h === !1) {
				if (!e) {
					f.pop();
					continue;
				}
			} else if (h !== void 0 && ((c ??= []).push(u, h), !e)) {
				if (Cu(h)) l = h, ee = Array.isArray(l);
				else {
					f.pop();
					continue;
				}
			}
		}
		h === void 0 && m && (c ??= []).push(u, l), e ? f.pop() : (i = {
			inArray: a,
			index: s,
			keys: o,
			edits: c,
			prev: i
		}, a = ee, o = a ? l : n[l.kind] ?? [], s = -1, c = void 0, d != null && p.push(d), d = l);
	} while (i !== void 0);
	return c === void 0 ? e : c.at(-1);
}
function Wh(e) {
	let t = Array(e.length).fill(null), n = Object.create(null);
	for (let r of Vh) {
		let i = !1, a = Array(e.length).fill(void 0), o = Array(e.length).fill(void 0);
		for (let t = 0; t < e.length; ++t) {
			let { enter: n, leave: s } = Gh(e[t], r);
			i ||= n != null || s != null, a[t] = n, o[t] = s;
		}
		i && (n[r] = {
			enter(...n) {
				let r = n[0];
				for (let i = 0; i < e.length; i++) if (t[i] === null) {
					let o = a[i]?.apply(e[i], n);
					if (o === !1) t[i] = r;
					else if (o === Hh) t[i] = Hh;
					else if (o !== void 0) return o;
				}
			},
			leave(...n) {
				let r = n[0];
				for (let i = 0; i < e.length; i++) if (t[i] === null) {
					let r = o[i]?.apply(e[i], n);
					if (r === Hh) t[i] = Hh;
					else if (r !== void 0 && r !== !1) return r;
				} else t[i] === r && (t[i] = null);
			}
		});
	}
	return n;
}
function Gh(e, t) {
	let n = e[t];
	return typeof n == "object" ? n : typeof n == "function" ? {
		enter: n,
		leave: void 0
	} : {
		enter: e.enter,
		leave: e.leave
	};
}
// ../../../node_modules/.pnpm/graphql@17.1.0/node_modules/graphql/utilities/typeFromAST.mjs
function Kh(e, t) {
	switch (t.kind) {
		case Yu: {
			let n = Kh(e, t.type);
			return n && new Bf(n);
		}
		case Xu: {
			let n = Kh(e, t.type);
			return n && new J(n);
		}
		case Ju: return e.getType(t.name.value);
	}
}
// ../../../node_modules/.pnpm/graphql@17.1.0/node_modules/graphql/utilities/TypeInfo.mjs
var qh = class {
	constructor(e, t, n) {
		this._schema = e, this._typeStack = [], this._parentTypeStack = [], this._inputTypeStack = [], this._fieldDefStack = [], this._defaultValueStack = [], this._directive = null, this._argument = null, this._enumValue = null, this._fragmentSignaturesByName = n ?? (() => null), this._fragmentSignature = null, this._fragmentArgument = null, t && (Pf(t) && this._inputTypeStack.push(t), Rf(t) && this._parentTypeStack.push(t), Ff(t) && this._typeStack.push(t));
	}
	get [Symbol.toStringTag]() {
		return "TypeInfo";
	}
	getType() {
		return this._typeStack.at(-1);
	}
	getParentType() {
		return this._parentTypeStack.at(-1);
	}
	getInputType() {
		return this._inputTypeStack.at(-1);
	}
	getParentInputType() {
		return this._inputTypeStack.at(-2);
	}
	getFieldDef() {
		return this._fieldDefStack.at(-1);
	}
	getDefaultValue() {
		return this._defaultValueStack.at(-1);
	}
	getDirective() {
		return this._directive;
	}
	getArgument() {
		return this._argument;
	}
	getFragmentSignature() {
		return this._fragmentSignature;
	}
	getFragmentSignatureByName() {
		return this._fragmentSignaturesByName;
	}
	getFragmentArgument() {
		return this._fragmentArgument;
	}
	getEnumValue() {
		return this._enumValue;
	}
	enter(e) {
		let t = this._schema;
		switch (e.kind) {
			case Du: {
				let t = Jh(e);
				this._fragmentSignaturesByName = (e) => t.get(e);
				break;
			}
			case Au: {
				let e = Kf(this.getType());
				this._parentTypeStack.push(Rf(e) ? e : void 0);
				break;
			}
			case ju: {
				let n = this.getParentType(), r, i;
				n && (r = t.getField(n, e.name.value), r && (i = r.type)), this._fieldDefStack.push(r), this._typeStack.push(Ff(i) ? i : void 0);
				break;
			}
			case qu:
				this._directive = t.getDirective(e.name.value);
				break;
			case Ou: {
				let n = t.getRootType(e.operation);
				this._typeStack.push(mf(n) ? n : void 0);
				break;
			}
			case Pu:
				this._fragmentSignature = this.getFragmentSignatureByName()(e.name.value);
				break;
			case Fu:
			case Iu: {
				let n = e.typeCondition, r = n ? Kh(t, n) : Kf(this.getType());
				this._typeStack.push(Ff(r) ? r : void 0);
				break;
			}
			case ku: {
				let n = Kh(t, e.type);
				this._inputTypeStack.push(Pf(n) ? n : void 0);
				break;
			}
			case Mu: {
				let t, n, r = this.getDirective() ?? this.getFieldDef();
				r && (t = r.args.find((t) => t.name === e.name.value), t && (n = t.type)), this._argument = t, this._defaultValueStack.push(t?.default ?? t?.defaultValue ?? void 0), this._inputTypeStack.push(Pf(n) ? n : void 0);
				break;
			}
			case Nu: {
				let t = this.getFragmentSignature()?.variableDefinitions.get(e.name.value);
				this._fragmentArgument = t;
				let n;
				t && (n = Kh(this._schema, t.type)), this._inputTypeStack.push(Pf(n) ? n : void 0);
				break;
			}
			case Wu: {
				let e = this.getInputType(), t = e && Wf(e);
				this._defaultValueStack.push(void 0), this._inputTypeStack.push(t && jf(t) ? t.ofType : void 0);
				break;
			}
			case Ku: {
				let t = Kf(this.getInputType()), n, r;
				Of(t) && (r = t.getFields()[e.name.value], r != null && (n = r.type)), this._defaultValueStack.push(r?.default ?? r?.defaultValue ?? void 0), this._inputTypeStack.push(Pf(n) ? n : void 0);
				break;
			}
			case Uu: {
				let t = Kf(this.getInputType()), n;
				Tf(t) && (n = t.getValue(e.value)), this._enumValue = n;
				break;
			}
		}
	}
	leave(e) {
		switch (e.kind) {
			case Du:
				this._fragmentSignaturesByName = () => null;
				break;
			case Au:
				this._parentTypeStack.pop();
				break;
			case ju:
				this._fieldDefStack.pop(), this._typeStack.pop();
				break;
			case qu:
				this._directive = null;
				break;
			case Pu:
				this._fragmentSignature = null;
				break;
			case Ou:
			case Fu:
			case Iu:
				this._typeStack.pop();
				break;
			case ku:
				this._inputTypeStack.pop();
				break;
			case Mu:
				this._argument = null, this._defaultValueStack.pop(), this._inputTypeStack.pop();
				break;
			case Nu:
				this._fragmentArgument = null, this._defaultValueStack.pop(), this._inputTypeStack.pop();
				break;
			case Wu:
			case Ku:
				this._defaultValueStack.pop(), this._inputTypeStack.pop();
				break;
			case Uu: this._enumValue = null;
		}
	}
};
function Jh(e) {
	let t = /* @__PURE__ */ new Map();
	for (let n of e.definitions) if (n.kind === "FragmentDefinition") {
		let e = /* @__PURE__ */ new Map();
		if (n.variableDefinitions) for (let t of n.variableDefinitions) e.set(t.variable.name.value, t);
		let r = {
			definition: n,
			variableDefinitions: e
		};
		t.set(n.name.value, r);
	}
	return t;
}
function Yh(e, t) {
	return {
		enter(...n) {
			let r = n[0];
			e.enter(r);
			let i = Gh(t, r.kind).enter;
			if (i) {
				let a = i.apply(t, n);
				return a !== void 0 && (e.leave(r), Cu(a) && e.enter(a)), a;
			}
		},
		leave(...n) {
			let r = n[0], i = Gh(t, r.kind).leave, a;
			return i && (a = i.apply(t, n)), e.leave(r), a;
		}
	};
}
// ../../../node_modules/.pnpm/graphql@17.1.0/node_modules/graphql/validation/rules/DeferStreamDirectiveLabelRule.mjs
function Xh(e) {
	let t = /* @__PURE__ */ new Map();
	return { Directive(n) {
		if (n.name.value === Qp.name || n.name.value === $p.name) {
			let r = n.arguments?.find((e) => e.name.value === "label")?.value;
			if (!r || r.kind === "NullValue") return;
			if (r.kind !== "StringValue") {
				e.reportError(new G(`Argument "@${n.name.value}(label:)" must be a static string.`, { nodes: n }));
				return;
			}
			let i = t.get(r.value);
			i == null ? t.set(r.value, n) : e.reportError(new G("Value for arguments \"defer(label:)\" and \"stream(label:)\" must be unique across all Defer/Stream directive usages.", { nodes: [i, n] }));
		}
	} };
}
// ../../../node_modules/.pnpm/graphql@17.1.0/node_modules/graphql/validation/rules/DeferStreamDirectiveOnRootFieldRule.mjs
function Zh(e) {
	let t = /* @__PURE__ */ new Set();
	return { OperationDefinition(n) {
		if (n.operation !== "subscription" && n.operation !== "mutation") return;
		let r = e.getSchema().getRootType(n.operation);
		if (r) {
			let i = /* @__PURE__ */ new Set();
			if (Qh({
				context: e,
				operationType: n.operation,
				rootType: r,
				checkedFragments: t,
				selectionSet: n.selectionSet,
				visitedFragments: i
			})) for (let e of i) t.add(e);
		}
	} };
}
function Qh({ context: e, operationType: t, rootType: n, checkedFragments: r, selectionSet: i, visitedFragments: a }) {
	let o = !0;
	for (let s of i.selections) if (s.kind === "Field") {
		let r = s.directives?.find((e) => e.name.value === $p.name);
		r && (o = !1, e.reportError(new G(`Stream directive cannot be used on root ${t} type "${n}".`, { nodes: r })));
	} else if (s.kind === "FragmentSpread") {
		let i = s.name.value;
		if (a.has(i)) continue;
		a.add(i);
		let c = e.getFragment(i);
		if (c) {
			let l = $h(s);
			l !== void 0 && (o = !1, e.reportError(new G(`Defer directive cannot be used on root ${t} type "${n}".`, { nodes: l }))), r.has(i) || (o = Qh({
				context: e,
				operationType: t,
				rootType: n,
				checkedFragments: r,
				selectionSet: c.selectionSet,
				visitedFragments: a
			}) && o);
		}
	} else if (s.kind === "InlineFragment") {
		let i = $h(s);
		i !== void 0 && (o = !1, e.reportError(new G(`Defer directive cannot be used on root ${t} type "${n}".`, { nodes: i }))), o = Qh({
			context: e,
			operationType: t,
			rootType: n,
			checkedFragments: r,
			selectionSet: s.selectionSet,
			visitedFragments: a
		}) && o;
	}
	return o;
}
function $h(e) {
	return e.directives?.find((e) => e.name.value === Qp.name);
}
// ../../../node_modules/.pnpm/graphql@17.1.0/node_modules/graphql/validation/rules/DeferStreamDirectiveOnValidOperationsRule.mjs
function eg(e) {
	let t = e.arguments?.find((e) => e.name.value === "if");
	if (!t) return !1;
	if (t.value.kind === "BooleanValue") {
		if (t.value.value) return !1;
	} else if (t.value.kind !== "Variable") return !1;
	return !0;
}
function tg(e) {
	let t = e.arguments?.find((e) => e.name.value === "if");
	return !t || t.value.kind !== "BooleanValue" || !!t.value.value;
}
function ng(e) {
	let t = e.arguments?.find((e) => e.name.value === "if");
	return t ? t?.value.kind !== "BooleanValue" || !t.value.value : !1;
}
function rg(e) {
	let t = /* @__PURE__ */ new Set();
	return { OperationDefinition(n) {
		if (n.operation !== wu.SUBSCRIPTION) return;
		let r = /* @__PURE__ */ new Set();
		if (ig({
			context: e,
			checkedFragments: t,
			selectionSet: n.selectionSet,
			parentNodes: [],
			visitedFragments: r
		})) for (let e of r) t.add(e);
	} };
}
function ig({ context: e, checkedFragments: t, selectionSet: n, parentNodes: r, visitedFragments: i }) {
	let a = !0;
	for (let o of n.selections) {
		let n = o.directives?.find((e) => e.name.value === Zp.name);
		if (n && tg(n)) continue;
		let s = o.directives?.find((e) => e.name.value === Xp.name);
		if (!(s && ng(s))) {
			for (let t of o.directives ?? []) t.name.value === Qp.name ? eg(t) || (a = !1, e.reportError(new G("Defer directive not supported on subscription operations. Disable `@defer` by setting the `if` argument to `false`.", { nodes: [t, ...r.toReversed()] }))) : t.name.value === $p.name && (eg(t) || (a = !1, e.reportError(new G("Stream directive not supported on subscription operations. Disable `@stream` by setting the `if` argument to `false`.", { nodes: [t, ...r.toReversed()] }))));
			if (o.kind === "FragmentSpread") {
				let n = o.name.value;
				if (i.has(n) || t.has(n)) continue;
				i.add(n);
				let s = e.getFragment(n);
				s && (r.push(o), a = ig({
					context: e,
					checkedFragments: t,
					parentNodes: r,
					selectionSet: s.selectionSet,
					visitedFragments: i
				}) && a, r.pop());
			} else o.selectionSet && (a = ig({
				context: e,
				checkedFragments: t,
				selectionSet: o.selectionSet,
				parentNodes: r,
				visitedFragments: i
			}) && a);
		}
	}
	return a;
}
// ../../../node_modules/.pnpm/graphql@17.1.0/node_modules/graphql/language/predicates.mjs
function ag(e) {
	return e.kind === "OperationDefinition" || e.kind === "FragmentDefinition";
}
function og(e) {
	return e.kind === "SchemaDefinition" || sg(e) || e.kind === "DirectiveDefinition";
}
function sg(e) {
	return e.kind === "ScalarTypeDefinition" || e.kind === "ObjectTypeDefinition" || e.kind === "InterfaceTypeDefinition" || e.kind === "UnionTypeDefinition" || e.kind === "EnumTypeDefinition" || e.kind === "InputObjectTypeDefinition";
}
function cg(e) {
	return e.kind === "SchemaExtension" || e.kind === "DirectiveExtension" || lg(e);
}
function lg(e) {
	return e.kind === "ScalarTypeExtension" || e.kind === "ObjectTypeExtension" || e.kind === "InterfaceTypeExtension" || e.kind === "UnionTypeExtension" || e.kind === "EnumTypeExtension" || e.kind === "InputObjectTypeExtension";
}
// ../../../node_modules/.pnpm/graphql@17.1.0/node_modules/graphql/validation/rules/ExecutableDefinitionsRule.mjs
function ug(e) {
	return { Document(t) {
		for (let n of t.definitions) if (!ag(n)) {
			let t = n.kind === "SchemaDefinition" || n.kind === "SchemaExtension" ? "schema" : "\"" + n.name.value + "\"";
			e.reportError(new G(`The ${t} definition is not executable.`, { nodes: n }));
		}
		return !1;
	} };
}
// ../../../node_modules/.pnpm/graphql@17.1.0/node_modules/graphql/validation/rules/FieldsOnCorrectTypeRule.mjs
function dg(e) {
	return { Field(t) {
		let n = e.getParentType();
		if (n && !e.getFieldDef()) {
			let r = e.getSchema(), i = t.name.value, a = wd("to use an inline fragment on", e.hideSuggestions ? [] : fg(r, n, i));
			a === "" && (a = wd(e.hideSuggestions ? [] : pg(n, i))), e.reportError(new G(`Cannot query field "${i}" on type "${n}".` + a, { nodes: t }));
		}
	} };
}
function fg(e, t, n) {
	if (!zf(t)) return [];
	let r = /* @__PURE__ */ new Set(), i = Object.create(null);
	for (let a of e.getPossibleTypes(t)) if (a.getFields()[n] != null) {
		r.add(a), i[a.name] = 1;
		for (let e of a.getInterfaces()) e.getFields()[n] != null && (r.add(e), i[e.name] = (i[e.name] ?? 0) + 1);
	}
	return [...r].sort((t, n) => {
		let r = i[n.name] - i[t.name];
		return r === 0 ? bf(t) && e.isSubType(t, n) ? -1 : bf(n) && e.isSubType(n, t) ? 1 : Dd(t.name, n.name) : r;
	}).map((e) => e.name);
}
function pg(e, t) {
	return mf(e) || bf(e) ? jd(t, Object.keys(e.getFields())) : [];
}
// ../../../node_modules/.pnpm/graphql@17.1.0/node_modules/graphql/validation/rules/FragmentsOnCompositeTypesRule.mjs
function mg(e) {
	return {
		InlineFragment(t) {
			let n = t.typeCondition;
			if (n) {
				let t = Kh(e.getSchema(), n);
				if (t && !Rf(t)) {
					let t = Yd(n);
					e.reportError(new G(`Fragment cannot condition on non composite type "${t}".`, { nodes: n }));
				}
			}
		},
		FragmentDefinition(t) {
			let n = Kh(e.getSchema(), t.typeCondition);
			if (n && !Rf(n)) {
				let n = Yd(t.typeCondition);
				e.reportError(new G(`Fragment "${t.name.value}" cannot condition on non composite type "${n}".`, { nodes: t.typeCondition }));
			}
		}
	};
}
// ../../../node_modules/.pnpm/graphql@17.1.0/node_modules/graphql/validation/rules/KnownArgumentNamesRule.mjs
function hg(e) {
	return {
		...gg(e),
		FragmentArgument(t) {
			let n = e.getFragmentSignature();
			if (n && !n.variableDefinitions.get(t.name.value)) {
				let r = t.name.value, i = e.hideSuggestions ? [] : jd(r, Array.from(n.variableDefinitions.values()).map((e) => e.variable.name.value));
				e.reportError(new G(`Unknown argument "${r}" on fragment "${n.definition.name.value}".` + wd(i), { nodes: t }));
			}
		},
		Argument(t) {
			let n = e.getArgument(), r = e.getFieldDef();
			if (!n && r) {
				let n = t.name.value, i = e.hideSuggestions ? [] : jd(n, r.args.map((e) => e.name));
				e.reportError(new G(`Unknown argument "${n}" on field "${r}".` + wd(i), { nodes: t }));
			}
		}
	};
}
function gg(e) {
	let t = /* @__PURE__ */ new Map(), n = e.getSchema(), r = n ? n.getDirectives() : am;
	for (let e of r) t.set(e.name, new Set(e.args.map((e) => e.name)));
	let i = e.getDocument().definitions;
	for (let e of i) if (e.kind === "DirectiveDefinition") {
		let n = e.arguments ?? [];
		t.set(e.name.value, new Set(n.map((e) => e.name.value)));
	}
	return { Directive(n) {
		let r = n.name.value, i = t.get(r);
		if (n.arguments != null && i != null) for (let t of n.arguments) {
			let n = t.name.value;
			if (!i.has(n)) {
				let a = e.hideSuggestions ? [] : jd(n, [...i]);
				e.reportError(new G(`Unknown argument "${n}" on directive "@${r}".` + (e.hideSuggestions ? "" : wd(a)), { nodes: t }));
			}
		}
		return !1;
	} };
}
// ../../../node_modules/.pnpm/graphql@17.1.0/node_modules/graphql/validation/rules/KnownDirectivesRule.mjs
function _g(e) {
	let t = /* @__PURE__ */ new Map(), n = e.getSchema(), r = n ? n.getDirectives() : am;
	for (let e of r) t.set(e.name, new Set(e.locations));
	let i = e.getDocument().definitions;
	for (let e of i) e.kind === "DirectiveDefinition" && t.set(e.name.value, new Set(e.locations.map((e) => e.value)));
	return { Directive(n, r, i, a, o) {
		let s = n.name.value, c = t.get(s);
		if (c == null) {
			e.reportError(new G(`Unknown directive "@${s}".`, { nodes: n }));
			return;
		}
		let l = vg(o);
		l != null && !c.has(l) && e.reportError(new G(`Directive "@${s}" may not be used on ${l}.`, { nodes: n }));
	} };
}
function vg(e) {
	let t = e.at(-1);
	switch (t != null && "kind" in t || du(!1), t.kind) {
		case Ou: return yg(t.operation);
		case ju: return Y.FIELD;
		case Pu: return Y.FRAGMENT_SPREAD;
		case Fu: return Y.INLINE_FRAGMENT;
		case Iu: return Y.FRAGMENT_DEFINITION;
		case ku: {
			let t = e[e.length - 3];
			return "kind" in t || du(!1), t.kind === "OperationDefinition" ? Y.VARIABLE_DEFINITION : Y.FRAGMENT_VARIABLE_DEFINITION;
		}
		case Zu:
		case ld: return Y.SCHEMA;
		case $u:
		case dd: return Y.SCALAR;
		case ed:
		case fd: return Y.OBJECT;
		case td: return Y.FIELD_DEFINITION;
		case rd:
		case pd: return Y.INTERFACE;
		case id:
		case md: return Y.UNION;
		case ad:
		case hd: return Y.ENUM;
		case od: return Y.ENUM_VALUE;
		case sd:
		case gd: return Y.INPUT_OBJECT;
		case nd: {
			let t = e.at(-3);
			return t != null && "kind" in t || du(!1), t.kind === "InputObjectTypeDefinition" || t.kind === "InputObjectTypeExtension" ? Y.INPUT_FIELD_DEFINITION : Y.ARGUMENT_DEFINITION;
		}
		case cd:
		case ud: return Y.DIRECTIVE_DEFINITION;
		default: du(!1, "Unexpected kind: " + W(t.kind));
	}
}
function yg(e) {
	switch (e) {
		case wu.QUERY: return Y.QUERY;
		case wu.MUTATION: return Y.MUTATION;
		case wu.SUBSCRIPTION: return Y.SUBSCRIPTION;
	}
}
// ../../../node_modules/.pnpm/graphql@17.1.0/node_modules/graphql/validation/rules/KnownFragmentNamesRule.mjs
function bg(e) {
	return { FragmentSpread(t) {
		let n = t.name.value;
		e.getFragment(n) || e.reportError(new G(`Unknown fragment "${n}".`, { nodes: t.name }));
	} };
}
// ../../../node_modules/.pnpm/graphql@17.1.0/node_modules/graphql/validation/rules/KnownOperationTypesRule.mjs
function xg(e) {
	let t = e.getSchema();
	return { OperationDefinition(n) {
		let r = n.operation;
		t.getRootType(r) || e.reportError(new G(`The ${r} operation is not supported by the schema.`, { nodes: n }));
	} };
}
// ../../../node_modules/.pnpm/graphql@17.1.0/node_modules/graphql/validation/rules/KnownTypeNamesRule.mjs
function Sg(e) {
	let { definitions: t } = e.getDocument(), n = e.getSchema()?.getTypeMap() ?? {}, r, i;
	return { NamedType(a, o, s, c, l) {
		let u = a.name.value;
		if (!Object.hasOwn(n, u) && !(r ??= new Set(t.filter(sg).map((e) => e.name.value))).has(u)) {
			let t = l[2] ?? s, o = t != null && wg(t);
			if (o && Cg.has(u)) return;
			let c = [];
			e.hideSuggestions || (i ??= [.../* @__PURE__ */ new Set([...Object.keys(n), ...r])], c = jd(u, o ? [...Cg, ...i] : i)), e.reportError(new G(`Unknown type "${u}".` + wd(c), { nodes: a }));
		}
	} };
}
var Cg = new Set([...Fp, ...Sm].map((e) => e.name));
function wg(e) {
	return "kind" in e && (og(e) || cg(e));
}
// ../../../node_modules/.pnpm/graphql@17.1.0/node_modules/graphql/validation/rules/LoneAnonymousOperationRule.mjs
function Tg(e) {
	let t = 0;
	return {
		Document(e) {
			t = e.definitions.filter((e) => e.kind === Ou).length;
		},
		OperationDefinition(n) {
			!n.name && t > 1 && e.reportError(new G("This anonymous operation must be the only defined operation.", { nodes: n }));
		}
	};
}
// ../../../node_modules/.pnpm/graphql@17.1.0/node_modules/graphql/validation/rules/LoneSchemaDefinitionRule.mjs
function Eg(e) {
	let t = e.getSchema(), n = t?.astNode ?? t?.getQueryType() ?? t?.getMutationType() ?? t?.getSubscriptionType(), r = 0;
	return { SchemaDefinition(t) {
		n ? e.reportError(new G("Cannot define a new schema within a schema extension.", { nodes: t })) : (r > 0 && e.reportError(new G("Must provide only one schema definition.", { nodes: t })), ++r);
	} };
}
// ../../../node_modules/.pnpm/graphql@17.1.0/node_modules/graphql/validation/rules/MaxIntrospectionDepthRule.mjs
var Dg = 3;
function Og(e) {
	let t = Object.create(null), n = Object.create(null);
	function r(i, a, o = 0) {
		if (i.kind === "FragmentSpread") {
			let s = i.name.value, c = n[s];
			if (c !== void 0 && c <= o) return !0;
			let l = a[s], u = t[s];
			if (l !== void 0 && l >= o || u !== void 0 && u >= o) return !1;
			let d = e.getFragment(s);
			return d ? (a[s] = o, r(d, a, o) ? (n[s] = o, !0) : (t[s] = o, !1)) : !1;
		}
		if (i.kind === "Field" && (i.name.value === "fields" || i.name.value === "interfaces" || i.name.value === "possibleTypes" || i.name.value === "inputFields") && (o++, o >= Dg)) return !0;
		if ("selectionSet" in i && i.selectionSet) {
			for (let e of i.selectionSet.selections) if (r(e, a, o)) return !0;
		}
		return !1;
	}
	return { Field(t) {
		if ((t.name.value === "__schema" || t.name.value === "__type") && r(t, Object.create(null))) return e.reportError(new G("Maximum introspection depth exceeded", { nodes: [t] })), !1;
	} };
}
// ../../../node_modules/.pnpm/graphql@17.1.0/node_modules/graphql/validation/rules/NoFragmentCyclesRule.mjs
function kg(e) {
	let t = /* @__PURE__ */ new Set(), n = [], r = Object.create(null);
	return {
		OperationDefinition: () => !1,
		FragmentDefinition(e) {
			return i(e), !1;
		}
	};
	function i(a) {
		if (t.has(a.name.value)) return;
		let o = a.name.value;
		t.add(o);
		let s = e.getFragmentSpreads(a.selectionSet);
		if (s.length !== 0) {
			r[o] = n.length;
			for (let t of s) {
				let a = t.name.value, o = r[a];
				if (n.push(t), o === void 0) {
					let t = e.getFragment(a);
					t && i(t);
				} else {
					let t = n.slice(o), r = t.slice(0, -1).map((e) => "\"" + e.name.value + "\"").join(", ");
					e.reportError(new G(`Cannot spread fragment "${a}" within itself` + (r === "" ? "." : ` via ${r}.`), { nodes: t }));
				}
				n.pop();
			}
			r[o] = void 0;
		}
	}
}
// ../../../node_modules/.pnpm/graphql@17.1.0/node_modules/graphql/validation/rules/NoUndefinedVariablesRule.mjs
function Ag(e) {
	return { OperationDefinition(t) {
		let n = new Set(t.variableDefinitions?.map((e) => e.variable.name.value)), r = e.getRecursiveVariableUsages(t);
		for (let { node: i, fragmentVariableDefinition: a } of r) {
			if (a) continue;
			let r = i.name.value;
			n.has(r) || e.reportError(new G(t.name ? `Variable "$${r}" is not defined by operation "${t.name.value}".` : `Variable "$${r}" is not defined.`, { nodes: [i, t] }));
		}
	} };
}
// ../../../node_modules/.pnpm/graphql@17.1.0/node_modules/graphql/validation/rules/NoUnusedFragmentsRule.mjs
function jg(e) {
	let t = [], n = [];
	return {
		OperationDefinition(e) {
			return t.push(e), !1;
		},
		FragmentDefinition(e) {
			return n.push(e), !1;
		},
		Document: { leave() {
			let r = new Set(e.getRecursivelyReferencedFragmentsForOperations(t).map((e) => e.name.value));
			for (let t of n) {
				let n = t.name.value;
				r.has(n) || e.reportError(new G(`Fragment "${n}" is never used.`, { nodes: t }));
			}
		} }
	};
}
// ../../../node_modules/.pnpm/graphql@17.1.0/node_modules/graphql/validation/rules/NoUnusedVariablesRule.mjs
function Mg(e) {
	return {
		FragmentDefinition(t) {
			let n = e.getVariableUsages(t), r = new Set(n.map(({ node: e }) => e.name.value)), i = t.variableDefinitions ?? [];
			for (let n of i) {
				let i = n.variable.name.value;
				r.has(i) || e.reportError(new G(`Variable "$${i}" is never used in fragment "${t.name.value}".`, { nodes: n }));
			}
		},
		OperationDefinition(t) {
			let n = e.getRecursiveVariableUsages(t), r = /* @__PURE__ */ new Set();
			for (let { node: e, fragmentVariableDefinition: t } of n) {
				let n = e.name.value;
				t || r.add(n);
			}
			let i = t.variableDefinitions ?? [];
			for (let n of i) {
				let i = n.variable.name.value;
				r.has(i) || e.reportError(new G(t.name ? `Variable "$${i}" is never used in operation "${t.name.value}".` : `Variable "$${i}" is never used.`, { nodes: n }));
			}
		}
	};
}
// ../../../node_modules/.pnpm/graphql@17.1.0/node_modules/graphql/validation/validationAbortedError.mjs
var Ng = new G("Validation aborted."), Pg = 1e3, Fg = 20, Ig = 256, Lg = 5e5;
function Rg(e) {
	let t = {
		comparedFieldsAndFragmentPairs: /* @__PURE__ */ new Map(),
		comparedFragmentPairs: /* @__PURE__ */ new Map(),
		cachedCollectFieldsResults: /* @__PURE__ */ new Map(),
		valueInfoByNode: /* @__PURE__ */ new Map(),
		fragmentSpreadInfoByNode: /* @__PURE__ */ new Map(),
		fragmentSpreadInfoByKey: /* @__PURE__ */ new Map(),
		remainingComplexityBudget: Lg
	}, n;
	return {
		FragmentDefinition: {
			enter(t) {
				let r = t.name.value;
				n = a_(e.getFragmentSignatureByName()(r));
			},
			leave() {
				n = void 0;
			}
		},
		SelectionSet(r, i, a) {
			if (a && "kind" in a && a.kind === "InlineFragment" || r.selections.length <= 1 && r.selections[0]?.kind !== "InlineFragment") return;
			let o = zg(e, t, e.getParentType(), r, n);
			for (let { responseName: t, reason: n, fields1: r, fields2: i } of o) e.reportError(new G(`Fields "${l_(t)}" conflict because ${n}. Use different aliases on the fields to fetch both if this was intentional.`, { nodes: r.concat(i) }));
		}
	};
}
function zg(e, t, n, r, i) {
	let a = [], o = e_(e, t, n, r);
	if (Ug(e, t, a, o, i), o.spreads.length !== 0 && (o.groupedFieldSet.size !== 0 || o.spreads.length > 1)) {
		let n = r_(e, t, o, i);
		for (let r = 0; r < n.length; r++) {
			Bg(e, t, a, !1, o, i, n[r]);
			for (let i = r + 1; i < n.length; i++) Vg(e, t, a, !1, n[r], n[i]);
		}
	}
	return a;
}
function Bg(e, t, n, r, i, a, o) {
	if (u_(t, 1), i.groupedFieldSet.size === 0) return;
	let s = o.definition, c = t.comparedFieldsAndFragmentPairs.get(a);
	c === void 0 && (c = /* @__PURE__ */ new Map(), t.comparedFieldsAndFragmentPairs.set(a, c));
	let l = c.get(o.scope);
	if (l === void 0 && (l = new d_(), c.set(o.scope, l)), l.has(i, s, r) || (l.add(i, s, r), !s)) return;
	let u = t_(e, t, s), d = r_(e, t, u, o.scope);
	if (i !== u || a !== o.scope) {
		Wg(e, t, n, r, i, a, u, o.scope);
		for (let o of d) Bg(e, t, n, r, i, a, o);
	}
}
function Vg(e, t, n, r, i, a) {
	let o = i.definition, s = a.definition, c = i.scope, l = a.scope;
	if (u_(t, 2), o === s && c === l) return;
	let u = t.comparedFragmentPairs.get(c), d = u?.get(l) ?? t.comparedFragmentPairs.get(l)?.get(c);
	if (d === void 0 && (u === void 0 && (u = /* @__PURE__ */ new Map(), t.comparedFragmentPairs.set(c, u)), d = new f_(), u.set(l, d)), o === s) {
		if (d.has(o, s, !1)) return;
		d.add(o, s, !1), e.reportError(new G(`Spreads "${l_(i.node.name.value)}" conflict because ${o_(t, i.node)} and ${o_(t, a.node)} have different fragment arguments.`, { nodes: [i.node, a.node] }));
		return;
	}
	if (d.has(o, s, r) || (d.add(o, s, r), !o || !s)) return;
	let f = t_(e, t, o), p = r_(e, t, f, i.scope), m = t_(e, t, s), h = r_(e, t, m, a.scope);
	Wg(e, t, n, r, f, i.scope, m, a.scope);
	for (let a of h) Vg(e, t, n, r, i, a);
	for (let i of p) Vg(e, t, n, r, i, a);
}
function Hg(e, t, n, r, i, a, o, s, c) {
	let l = [], u = e_(e, t, r, i), d = r_(e, t, u, a), f = e_(e, t, o, s), p = r_(e, t, f, c);
	Wg(e, t, l, n, u, a, f, c);
	for (let r of p) Bg(e, t, l, n, u, a, r);
	for (let r of d) Bg(e, t, l, n, f, c, r);
	for (let r of d) for (let i of p) Vg(e, t, l, n, r, i);
	return l;
}
function Ug(e, t, n, r, i) {
	for (let [a, o] of r.groupedFieldSet.entries()) if (o.length > 1) for (let r = 0; r < o.length; r++) for (let s = r + 1; s < o.length; s++) {
		let c = Kg(e, t, !1, a, o[r], i, o[s], i);
		c && n.push(c);
	}
}
function Wg(e, t, n, r, i, a, o, s) {
	if (i.groupedFieldSet.size !== 0 && o.groupedFieldSet.size !== 0) for (let { responseName: c, fieldDetailsList1: l, fieldDetailsList2: u } of Gg(t, i, o)) for (let i of l) for (let o of u) {
		let l = Kg(e, t, r, c, i, a, o, s);
		l && n.push(l);
	}
}
function Gg(e, t, n) {
	let r = t.overlappingFields ??= /* @__PURE__ */ new Map(), i = r.get(n);
	if (i !== void 0) return i;
	let a = [];
	for (let [r, i] of t.groupedFieldSet.entries()) {
		u_(e, 1);
		let t = n.groupedFieldSet.get(r);
		t != null && a.push({
			responseName: r,
			fieldDetailsList1: i,
			fieldDetailsList2: t
		});
	}
	return r.set(n, a), a;
}
function Kg(e, t, n, r, i, a, o, s) {
	let { parentType: c, node: l, definition: u, streamDirective: d } = i, { parentType: f, node: p, definition: m, streamDirective: h } = o, ee = n || c !== f && mf(c) && mf(f);
	if (u_(t, 2), i.isSimpleLeaf && o.isSimpleLeaf && u?.type === m?.type && l.name.value === p.name.value) return;
	let te = qg(i), ne = qg(o), re = te.comparisons.get(ne);
	if (re === void 0 && (re = {}, te.comparisons.set(ne, re)), !ee) {
		let e = l.name.value, n = p.name.value;
		if (!(re.sameName ??= e === n)) return {
			responseName: r,
			reason: `"${l_(e)}" and "${l_(n)}" are different fields`,
			fields1: [l],
			fields2: [p]
		};
		if (!Xg(t, re.arguments ??= Yg(t, te.arguments, ne.arguments), a, s)) return {
			responseName: r,
			reason: "they have differing arguments",
			fields1: [l],
			fields2: [p]
		};
	}
	if (d || h) {
		let e = "they have overlapping stream directives";
		return d && h && Xg(t, re.streamArguments ??= Yg(t, te.streamArguments, ne.streamArguments), a, s) && (e += ". See https://github.com/graphql/defer-stream-wg/discussions/100"), {
			responseName: r,
			reason: e,
			fields1: [l],
			fields2: [p]
		};
	}
	let ie = u?.type, ae = m?.type;
	if (ie && ae && $g(t, ie, ae)) return {
		responseName: r,
		reason: `they return conflicting types "${te.typeString ??= W(ie)}" and "${ne.typeString ??= W(ae)}"`,
		fields1: [l],
		fields2: [p]
	};
	let oe = l.selectionSet, se = p.selectionSet;
	if (oe && se) return s_(Hg(e, t, ee, te.namedType, oe, a, ne.namedType, se, s), r, l, p);
}
function qg(e) {
	return e.info ??= {
		comparisons: /* @__PURE__ */ new Map(),
		namedType: Kf(e.definition?.type),
		arguments: Jg(e.node.arguments),
		streamArguments: Jg(e.streamDirective?.arguments)
	};
}
function Jg(e) {
	if (e === void 0 || e.length === 0) return;
	let t = /* @__PURE__ */ new Map();
	for (let { name: n, value: r } of e) t.set(n.value, r);
	return {
		nodes: e,
		values: t
	};
}
function Yg(e, t, n) {
	let r = [];
	if (t === void 0) return {
		sameStructure: n === void 0,
		valuesWithVariables: r
	};
	if (t.nodes.length !== n?.nodes.length) return {
		sameStructure: !1,
		valuesWithVariables: r
	};
	for (let i of t.nodes) {
		u_(e, 1);
		let t = n.values.get(i.name.value);
		if (t === void 0) return {
			sameStructure: !1,
			valuesWithVariables: r
		};
		let a = Qg(e, i.value);
		if (a.comparisonKey !== Qg(e, t).comparisonKey) return {
			sameStructure: !1,
			valuesWithVariables: r
		};
		a.variables.length !== 0 && r.push(a);
	}
	return {
		sameStructure: !0,
		valuesWithVariables: r
	};
}
function Xg(e, t, n, r) {
	return t.sameStructure ? n === r || t.valuesWithVariables.every((t) => (u_(e, 1), !Zg(e, t, n) && !Zg(e, t, r))) : !1;
}
function Zg(e, t, n) {
	if (n === void 0) return !1;
	let r = t.scopeDependencies ??= /* @__PURE__ */ new Map(), i = r.get(n.signature);
	if (i !== void 0) return i;
	let a = t.variables.some((t) => (u_(e, 1), n.signature.variableDefinitions.has(t)));
	return r.set(n.signature, a), a;
}
function Qg(e, t) {
	let n = e.valueInfoByNode.get(t);
	if (n !== void 0) return n;
	let r = [], i = {
		comparisonKey: JSON.stringify(t, (e, t) => {
			if (!Cu(t)) return t;
			switch (t.kind) {
				case Lu: return r.push(t.name.value), [t.kind, t.name.value];
				case Gu: return [t.kind, t.fields.slice().sort((e, t) => e.name.value < t.name.value ? -1 : +(e.name.value > t.name.value))];
				case Ku: return [t.name.value, t.value];
				case Wu: return [t.kind, t.values];
				case Bu: return [
					t.kind,
					t.value,
					t.block === !0
				];
				default: return [t.kind, "value" in t ? t.value : null];
			}
		}),
		variables: r
	};
	return e.valueInfoByNode.set(t, i), i;
}
function $g(e, t, n) {
	return t !== n && (u_(e, 1), jf(t) ? !jf(n) || $g(e, t.ofType, n.ofType) : jf(n) ? !0 : Nf(t) ? !Nf(n) || $g(e, t.ofType, n.ofType) : Nf(n) ? !0 : If(t) || If(n) ? t !== n : !1);
}
function e_(e, t, n, r) {
	let { cachedCollectFieldsResults: i } = t, a = i.get(n);
	a || (a = /* @__PURE__ */ new Map(), i.set(n, a));
	let o = a.get(r);
	if (!o) {
		let t = /* @__PURE__ */ new Map(), i = [];
		n_(e, n, r, t, i), o = {
			groupedFieldSet: t,
			spreads: i
		}, a.set(r, o);
	}
	return o;
}
function t_(e, t, n) {
	return e_(e, t, Kh(e.getSchema(), n.typeCondition), n.selectionSet);
}
function n_(e, t, n, r, i) {
	for (let a of n.selections) switch (a.kind) {
		case ju: {
			let e = a.name.value, n;
			(mf(t) || bf(t)) && (n = t.getFields()[e]);
			let i = a.alias ? a.alias.value : e, o = r.get(i);
			o ?? (o = [], r.set(i, o));
			let s = a.directives?.find((e) => e.name.value === "stream");
			o.push({
				parentType: t,
				node: a,
				definition: n,
				isSimpleLeaf: (a.arguments?.length ?? 0) === 0 && !a.selectionSet && s === void 0,
				streamDirective: s
			});
			break;
		}
		case Pu:
			i.push(a);
			break;
		case Fu: {
			let n = a.typeCondition;
			n_(e, n ? Kh(e.getSchema(), n) : t, a.selectionSet, r, i);
			break;
		}
	}
}
function r_(e, t, n, r) {
	let i = n.byScope ??= /* @__PURE__ */ new Map(), a = i.get(r);
	if (a) return a;
	let o = /* @__PURE__ */ new Map(), s = [];
	for (let i of n.spreads) {
		let n = i_(e, t, i, r), a = o.get(n.scope);
		a === void 0 && (a = /* @__PURE__ */ new Map(), o.set(n.scope, a));
		let c = a.get(n.definition);
		c === void 0 ? (a.set(n.definition, n), s.push(n)) : c.node = n.node;
	}
	return i.set(r, s), s;
}
function i_(e, t, n, r) {
	u_(t, 1);
	let i = t.fragmentSpreadInfoByNode.get(n);
	if (i === void 0) {
		let r = e.getFragmentSignatureByName()(n.name.value), a = Jg(n.arguments), o = [], s = [];
		if (r && a !== void 0) {
			let e = a.values, n = [];
			for (let t of e.keys()) r.variableDefinitions.has(t) && n.push(t);
			for (let r of n.sort()) {
				let n = Qg(t, e.get(r));
				o.push(r, n.comparisonKey), n.variables.length !== 0 && s.push(n);
			}
		}
		let c = JSON.stringify([r?.definition.name.value, o]);
		i = t.fragmentSpreadInfoByKey.get(c), i === void 0 && (i = {
			signature: r,
			values: s,
			byScope: /* @__PURE__ */ new Map()
		}, t.fragmentSpreadInfoByKey.set(c, i)), t.fragmentSpreadInfoByNode.set(n, i);
	}
	let a = i.values.some((e) => (u_(t, 1), Zg(t, e, r))) ? r : void 0, o = i.byScope.get(a);
	return i.byScope.has(a) || (o = a_(i.signature), i.byScope.set(a, o)), {
		node: n,
		scope: o,
		definition: i.signature?.definition
	};
}
function a_(e) {
	if (e && e.variableDefinitions.size !== 0) return { signature: e };
}
function o_(e, t) {
	let n = {
		...t,
		name: {
			...t.name,
			value: l_(t.name.value)
		},
		directives: []
	}, r = 1;
	for (let i of t.arguments ?? []) if (r += 2 + i.name.value.length + Qg(e, i.value).comparisonKey.length, r > Ig) return n.name.value + "(...)";
	return Yd(n).slice(3);
}
function s_(e, t, n, r) {
	if (e.length > 0) {
		let i = "";
		for (let { responseName: t, reason: n } of e) if (i += (i === "" ? "" : " and ") + `subfields "${l_(t)}" conflict because ${n}`, i.length > Pg) break;
		return {
			responseName: t,
			reason: l_(i),
			fields1: c_(n, e, "fields1"),
			fields2: c_(r, e, "fields2")
		};
	}
}
function c_(e, t, n) {
	let r = [e];
	for (let e of t) {
		let t = Fg - r.length, i = e[n].slice(-t);
		if (r.push(...i), r.length === Fg) break;
	}
	return r;
}
function l_(e) {
	return e.length > Pg ? e.slice(0, Pg) + "..." : e;
}
function u_(e, t) {
	if (e.remainingComplexityBudget -= t, e.remainingComplexityBudget < 0) throw Ng;
}
var d_ = class {
	constructor() {
		this._data = /* @__PURE__ */ new Map();
	}
	has(e, t, n) {
		let r = this._data.get(e)?.get(t);
		return r === void 0 ? !1 : n ? !0 : n === r;
	}
	add(e, t, n) {
		let r = this._data.get(e);
		r === void 0 ? this._data.set(e, /* @__PURE__ */ new Map([[t, n]])) : r.set(t, n);
	}
}, f_ = class {
	constructor() {
		this._orderedPairSet = new d_();
	}
	has(e, t, n) {
		return this._orderedPairSet.has(e, t, n) || this._orderedPairSet.has(t, e, n);
	}
	add(e, t, n) {
		this._orderedPairSet.add(e, t, n);
	}
};
// ../../../node_modules/.pnpm/graphql@17.1.0/node_modules/graphql/validation/rules/PossibleFragmentSpreadsRule.mjs
function p_(e) {
	return {
		InlineFragment(t) {
			let n = e.getType(), r = e.getParentType();
			if (Rf(n) && Rf(r) && !hp(e.getSchema(), n, r)) {
				let i = W(r), a = W(n);
				e.reportError(new G(`Fragment cannot be spread here as objects of type "${i}" can never be of type "${a}".`, { nodes: t }));
			}
		},
		FragmentSpread(t) {
			let n = t.name.value, r = m_(e, n), i = e.getParentType();
			if (r && i && !hp(e.getSchema(), r, i)) {
				let a = W(i), o = W(r);
				e.reportError(new G(`Fragment "${n}" cannot be spread here as objects of type "${a}" can never be of type "${o}".`, { nodes: t }));
			}
		}
	};
}
function m_(e, t) {
	let n = e.getFragment(t);
	if (n) {
		let t = Kh(e.getSchema(), n.typeCondition);
		if (Rf(t)) return t;
	}
}
// ../../../node_modules/.pnpm/graphql@17.1.0/node_modules/graphql/validation/rules/PossibleTypeExtensionsRule.mjs
function h_(e) {
	let t = e.getSchema(), n = /* @__PURE__ */ new Map();
	for (let t of e.getDocument().definitions) sg(t) && n.set(t.name.value, t);
	return {
		ScalarTypeExtension: r,
		ObjectTypeExtension: r,
		InterfaceTypeExtension: r,
		UnionTypeExtension: r,
		EnumTypeExtension: r,
		InputObjectTypeExtension: r
	};
	function r(r) {
		let i = r.name.value, a = n.get(i), o = t?.getType(i), s;
		if (a == null ? o && (s = __(o)) : s = g_[a.kind], s != null) {
			if (s !== r.kind) {
				let t = v_(r.kind);
				e.reportError(new G(`Cannot extend non-${t} type "${i}".`, { nodes: a ? [a, r] : r }));
			}
		} else {
			let a = [...n.keys(), ...Object.keys(t?.getTypeMap() ?? {})];
			e.reportError(new G(`Cannot extend type "${i}" because it is not defined.` + wd(jd(i, a)), { nodes: r.name }));
		}
	}
}
var g_ = {
	[$u]: dd,
	[ed]: fd,
	[rd]: pd,
	[id]: md,
	[ad]: hd,
	[sd]: gd
};
function __(e) {
	if (ff(e)) return dd;
	if (mf(e)) return fd;
	if (bf(e)) return pd;
	if (Cf(e)) return md;
	if (Tf(e)) return hd;
	if (Of(e)) return gd;
	du(!1, "Unexpected type: " + W(e));
}
function v_(e) {
	switch (e) {
		case dd: return "scalar";
		case fd: return "object";
		case pd: return "interface";
		case md: return "union";
		case hd: return "enum";
		case gd: return "input object";
		default: du(!1, "Unexpected kind: " + W(e));
	}
}
// ../../../node_modules/.pnpm/graphql@17.1.0/node_modules/graphql/validation/rules/ProvidedRequiredArgumentsRule.mjs
function y_(e) {
	let t = /* @__PURE__ */ new Map();
	return {
		...b_(e),
		Field: { leave(t) {
			let n = e.getFieldDef();
			if (!n || n.args.length === 0) return !1;
			let r = new Set(t.arguments?.map((e) => e.name.value));
			for (let i of n.args) !r.has(i.name) && tp(i) && e.reportError(new G(`Argument "${i}" of type "${i.type}" is required, but it was not provided.`, { nodes: t }));
		} },
		FragmentSpread: { leave(n) {
			let r = e.getFragmentSignature();
			if (!r) return !1;
			let i = t.get(r);
			i || (i = [...r.variableDefinitions].filter(([, e]) => x_(e)), t.set(r, i));
			let a = new Set(n.arguments?.map((e) => e.name.value));
			for (let [t, r] of i) if (!a.has(t)) {
				let i = W(Kh(e.getSchema(), r.type));
				e.reportError(new G(`Fragment "${n.name.value}" argument "${t}" of type "${i}" is required, but it was not provided.`, { nodes: n }));
			}
		} }
	};
}
function b_(e) {
	let t = /* @__PURE__ */ new Map(), n = e.getSchema()?.getDirectives() ?? am;
	for (let e of n) t.set(e.name, new Map(e.args.filter(tp).map((e) => [e.name, e])));
	let r = e.getDocument().definitions;
	for (let e of r) if (e.kind === "DirectiveDefinition") {
		let n = e.arguments ?? [];
		t.set(e.name.value, new Map(n.filter(x_).map((e) => [e.name.value, e])));
	}
	return { Directive: { leave(n) {
		let r = n.name.value, i = t.get(r);
		if (i != null) {
			let t = n.arguments ?? [], a = new Set(t.map((e) => e.name.value));
			for (let [t, o] of i.entries()) if (!a.has(t)) {
				let i = uf(o.type) ? W(o.type) : Yd(o.type);
				e.reportError(new G(`Argument "@${r}(${t}:)" of type "${i}" is required, but it was not provided.`, { nodes: n }));
			}
		}
	} } };
}
function x_(e) {
	return e.type.kind === "NonNullType" && e.defaultValue == null;
}
// ../../../node_modules/.pnpm/graphql@17.1.0/node_modules/graphql/validation/rules/ScalarLeafsRule.mjs
function S_(e) {
	return { Field(t) {
		let n = e.getType(), r = t.selectionSet;
		if (n) {
			if (If(Kf(n))) {
				if (r) {
					let i = t.name.value, a = W(n);
					e.reportError(new G(`Field "${i}" must not have a selection since type "${a}" has no subfields.`, { nodes: r }));
				}
			} else if (!r) {
				let r = t.name.value, i = W(n);
				e.reportError(new G(`Field "${r}" of type "${i}" must have a selection of subfields. Did you mean "${r} { ... }"?`, { nodes: t }));
			} else if (r.selections.length === 0 && !e.allowEmptySelectionSets) {
				let r = t.name.value, i = W(n);
				e.reportError(new G(`Field "${r}" of type "${i}" must have at least one field selected.`, { nodes: t }));
			}
		}
	} };
}
// ../../../node_modules/.pnpm/graphql@17.1.0/node_modules/graphql/utilities/coerceInputValue.mjs
function C_(e, t) {
	if (Nf(t)) return e == null ? void 0 : C_(e, t.ofType);
	if (e == null) return null;
	if (jf(t)) {
		if (!hu(e)) {
			let n = C_(e, t.ofType);
			return n === void 0 ? void 0 : [n];
		}
		let n = [];
		for (let r of e) {
			let e = C_(r, t.ofType);
			if (e === void 0) return;
			n.push(e);
		}
		return n;
	}
	if (Of(t)) {
		if (!eu(e) || Array.isArray(e)) return;
		let n = Object.create(null), r = t.getFields(), i = 0;
		for (let t of Object.keys(e)) if (e[t] !== void 0 && (i++, !Object.hasOwn(r, t))) return;
		for (let t of Object.values(r)) {
			let r = e[t.name];
			if (r === void 0) {
				if (fp(t)) return;
				let e = D_(t);
				e !== void 0 && (n[t.name] = e);
			} else {
				let e = C_(r, t.type);
				if (e === void 0) return;
				n[t.name] = e;
			}
		}
		if (t.isOneOf) {
			let e = Object.keys(n);
			if (i !== 1 || e.length !== 1 || n[e[0]] === null) return;
		}
		return n;
	}
	let n = Lf(t);
	try {
		return n.coerceInputValue(e);
	} catch {}
}
function w_(e, t, n, r) {
	if (e.kind === "Variable") {
		let i = T_(e, n, r);
		return i == null && Nf(t) ? void 0 : i;
	}
	if (Nf(t)) return e.kind === "NullValue" ? void 0 : w_(e, t.ofType, n, r);
	if (e.kind === "NullValue") return null;
	if (jf(t)) {
		if (e.kind !== "ListValue") {
			let i = w_(e, t.ofType, n, r);
			return i === void 0 ? void 0 : [i];
		}
		let i = [];
		for (let a of e.values) {
			let e = w_(a, t.ofType, n, r);
			if (e === void 0) {
				if (a.kind === "Variable" && T_(a, n, r) == null && !Nf(t.ofType)) e = null;
				else return;
			}
			i.push(e);
		}
		return i;
	}
	if (Of(t)) {
		if (e.kind !== "ObjectValue") return;
		let i = Object.create(null), a = t.getFields();
		if (e.fields.some((e) => !Object.hasOwn(a, e.name.value))) return;
		let o = new Map(e.fields.map((e) => [e.name.value, e]));
		for (let e of Object.values(a)) {
			let t = o.get(e.name);
			if (!t || t.value.kind === "Variable" && E_(t.value, n, r)) {
				if (fp(e)) return;
				let t = D_(e);
				t !== void 0 && (i[e.name] = t);
			} else {
				let a = w_(t.value, e.type, n, r);
				if (a === void 0) return;
				i[e.name] = a;
			}
		}
		if (t.isOneOf) {
			let e = Object.keys(i);
			if (o.size !== 1 || e.length !== 1) return;
			for (let [e, t] of o) if (t.value.kind === "NullValue" || i[e] === null) return;
		}
		return i;
	}
	let i = Lf(t);
	try {
		return i.coerceInputLiteral ? i.coerceInputLiteral(bp(e, n, r)) : i.parseLiteral(e, n?.coerced);
	} catch {}
}
function T_(e, t, n) {
	let r = e.name.value;
	return n?.sources[r] === void 0 ? t?.coerced[r] : n.coerced[r];
}
function E_(e, t, n) {
	let r = e.name.value;
	return (n?.sources[r] === void 0 ? t?.coerced : n.coerced)?.[r] === void 0;
}
function D_(e) {
	let t = e._memoizedCoercedDefaultValue;
	if (t !== void 0) return t;
	let n = e.default;
	if (n !== void 0) return t = n.literal ? w_(n.literal, e.type) : C_(n.value, e.type), t === void 0 && du(!1, `Expected value of type "${e.type}" to be valid, found: ${W(n.literal ?? n.value)}.`), e._memoizedCoercedDefaultValue = t, t;
	let r = e.defaultValue;
	return r !== void 0 && (e._memoizedCoercedDefaultValue = r), r;
}
// ../../../node_modules/.pnpm/graphql@17.1.0/node_modules/graphql/execution/getVariableSignature.mjs
function O_(e, t) {
	let n = t.variable.name.value, r = Kh(e, t.type);
	if (!Pf(r)) return new G(`Variable "$${n}" expected value of type "${Yd(t.type)}" which cannot be used as an input type.`, { nodes: t.type });
	let i = t.defaultValue;
	return {
		name: n,
		type: r,
		default: i && { literal: i }
	};
}
// ../../../node_modules/.pnpm/graphql@17.1.0/node_modules/graphql/execution/values.mjs
function k_(e, t, n, r) {
	let i = [], a = r?.maxErrors;
	try {
		let o = A_(e, t, n, (e) => {
			if (a != null && i.length >= a) throw new G("Too many errors processing variables, error limit reached. Execution aborted.");
			i.push(e);
		}, r?.hideSuggestions);
		if (i.length === 0) return { variableValues: o };
	} catch (e) {
		i.push(lu(e));
	}
	return { errors: i };
}
function A_(e, t, n, r, i) {
	let a = Object.create(null), o = Object.create(null);
	for (let s of t) {
		let t = O_(e, s);
		if (t instanceof G) {
			r(t);
			continue;
		}
		let { name: c, type: l } = t, u = Object.hasOwn(n, c) ? n[c] : void 0;
		if (u === void 0) {
			if (a[c] = { signature: t }, s.defaultValue) {
				j_(o, c, t, (e, t) => {
					r(new G(`Variable "$${c}" has invalid default value${vu(t)}: ${e.message}`, { nodes: s }));
				}, i);
				continue;
			}
			if (!Nf(l)) continue;
		} else a[c] = {
			signature: t,
			value: u
		};
		let d = C_(u, l);
		d === void 0 ? xp(u, l, (e, t) => {
			r(new G(`Variable "$${c}" has invalid value${vu(t)}: ${e.message}`, {
				nodes: s,
				originalError: e
			}));
		}, i) : o[c] = d;
	}
	return {
		sources: a,
		coerced: o
	};
}
function j_(e, t, n, r, i) {
	try {
		let r = D_(n);
		r !== void 0 && (e[t] = r);
	} catch (e) {
		let t = n.default;
		if (t === void 0) throw e;
		let a = !1;
		Im(t, n.type, (e, t) => {
			a = !0, r(e, t);
		}, i), a || r(lu(e), []);
	}
}
function M_(e, t, n, r, i) {
	let a = e.arguments ?? [], o = new Map(a.map((e) => [e.name.value, e])), s = Object.create(null), c = Object.create(null);
	for (let [a, l] of Object.entries(t)) {
		let t = o.get(a);
		s[a] = t === void 0 ? { signature: l } : r == null ? {
			signature: l,
			value: t.value
		} : {
			signature: l,
			value: t.value,
			fragmentVariableValues: r
		}, P_(c, e, a, l, t, n, r, i);
	}
	return {
		sources: s,
		coerced: c
	};
}
function N_(e, t, n, r, i) {
	let a = Object.create(null);
	if (e.args.length === 0) return a;
	let o = t.arguments ?? [], s = new Map(o.map((e) => [e.name.value, e]));
	for (let o of e.args) {
		let e = o.name;
		P_(a, t, e, o, s.get(o.name), n, r, i);
	}
	return a;
}
function P_(e, t, n, r, i, a, o, s) {
	let c = r.type, l = (e, n) => {
		throw new G(`${F_(r, t)} has invalid default value${vu(n)}: ${e.message}`, { nodes: t });
	};
	if (!i) {
		if (tp(r)) throw new G(`${F_(r, t)} of required type "${c}" was not provided.`, { nodes: t });
		j_(e, n, r, l, s);
		return;
	}
	let u = i.value;
	if (u.kind === "Variable") {
		let t = u.name.value, i = o?.sources[t] ? o : a;
		if ((i == null || !Object.hasOwn(i.coerced, t)) && !tp(r)) {
			j_(e, n, r, l, s);
			return;
		}
	}
	let d = w_(u, c, a, o);
	d === void 0 && (wp(u, c, (e, n) => {
		throw e.message = `${F_(r, t)} has invalid value${vu(n)}: ${e.message}`, e;
	}, a, o, s), du(!1, "Invalid argument")), e[n] = d;
}
function F_(e, t) {
	return vf(e) ? `Argument "${e}"` : `Variable "$${e.name}" defined by fragment "${t.name.value}"`;
}
function I_(e, t, n, r, i) {
	let a = t.directives?.find((t) => t.name.value === e.name);
	if (a) return N_(e, a, n, r, i);
}
// ../../../node_modules/.pnpm/graphql@17.1.0/node_modules/graphql/execution/collectFields.mjs
function L_(e, t, n, r, i, a, o = !1, s = z_) {
	let c = new tu(), l = [], u = {
		schema: e,
		fragments: t,
		variableValues: n,
		runtimeType: r,
		visitedFragmentNames: /* @__PURE__ */ new Map(),
		hideSuggestions: a,
		forbiddenDirectiveInstances: [],
		forbidSkipAndInclude: o
	};
	return s(u, i, c, l), {
		groupedFieldSet: c,
		newDeferUsages: l,
		forbiddenDirectiveInstances: u.forbiddenDirectiveInstances
	};
}
function R_(e, t, n, r, i, a) {
	let o = {
		schema: e,
		fragments: t,
		variableValues: n,
		runtimeType: r,
		visitedFragmentNames: /* @__PURE__ */ new Map(),
		hideSuggestions: a,
		forbiddenDirectiveInstances: [],
		forbidSkipAndInclude: !1
	}, s = new tu(), c = [];
	for (let e of i) {
		let t = e.node.selectionSet;
		if (t) {
			let { deferUsage: n, fragmentVariableValues: r } = e;
			z_(o, t, s, c, n, r);
		}
	}
	return {
		groupedFieldSet: s,
		newDeferUsages: c
	};
}
function z_(e, t, n, r, i, a, o = z_) {
	let { schema: s, fragments: c, variableValues: l, runtimeType: u, visitedFragmentNames: d, hideSuggestions: f } = e;
	for (let p of t.selections) switch (p.kind) {
		case ju:
			if (!V_(e, p, l, a)) continue;
			n.add(U_(p), {
				node: p,
				deferUsage: i,
				fragmentVariableValues: a
			});
			break;
		case Fu: {
			if (!V_(e, p, l, a) || !H_(s, p, u)) continue;
			let t = B_(l, a, p, i);
			t ? (r.push(t), o(e, p.selectionSet, n, r, t, a, o)) : o(e, p.selectionSet, n, r, i, a, o);
			break;
		}
		case Pu: {
			let t = p.name.value;
			if (!V_(e, p, l, a)) continue;
			let m = c[t];
			if (m == null || !H_(s, m.definition, u)) continue;
			let h = B_(l, a, p, i), ee = h ?? i, te = d.get(t);
			if (te || (te = /* @__PURE__ */ new Set(), d.set(t, te)), te.has(null) || ee && te.has(ee.directiveNode)) continue;
			h && r.push(h), te.add(ee?.directiveNode ?? null);
			let ne = m.variableSignatures, re;
			ne && (re = M_(p, ne, l, a, f)), o(e, m.definition.selectionSet, n, r, ee, re, o);
			break;
		}
	}
}
function B_(e, t, n, r) {
	let i = n.directives?.find((e) => e.name.value === Qp.name);
	if (!i) return;
	let a = N_(Qp, i, e, t);
	if (a.if !== !1) return {
		label: typeof a.label == "string" ? a.label : void 0,
		directiveNode: i,
		parentDeferUsage: r
	};
}
function V_(e, t, n, r) {
	let i = t.directives?.find((e) => e.name.value === Zp.name);
	if (i && e.forbidSkipAndInclude) return e.forbiddenDirectiveInstances.push(i), !1;
	if ((i ? N_(Zp, i, n, r, e.hideSuggestions) : void 0)?.if === !0) return !1;
	let a = t.directives?.find((e) => e.name.value === Xp.name);
	return a && e.forbidSkipAndInclude ? (e.forbiddenDirectiveInstances.push(a), !1) : (a ? N_(Xp, a, n, r, e.hideSuggestions) : void 0)?.if !== !1;
}
function H_(e, t, n) {
	let r = t.typeCondition;
	if (!r) return !0;
	let i = Kh(e, r);
	return i === n ? !0 : zf(i) ? e.isSubType(i, n) : !1;
}
function U_(e) {
	return e.alias ? e.alias.value : e.name.value;
}
// ../../../node_modules/.pnpm/graphql@17.1.0/node_modules/graphql/validation/rules/SingleFieldSubscriptionsRule.mjs
function W_(e) {
	return e.map((e) => e.node);
}
function G_(e) {
	let t, n = (t, r, i, a, ...[o, s]) => {
		e.spendFragmentWork(r.selections.length);
		for (let t of r.selections) {
			let n = t.directives;
			if (n !== void 0) {
				e.spendFragmentWork(n.length);
				let t = n.find((e) => e.name.value === Qp.name);
				e.spendFragmentWork(t?.arguments?.length ?? 0);
			}
		}
		z_(t, r, i, a, o, s, n);
	};
	return { OperationDefinition(r) {
		if (r.operation === "subscription") {
			let i = e.getSchema(), a = i.getSubscriptionType();
			if (a) {
				let o = r.name ? r.name.value : null, s = {
					sources: Object.create(null),
					coerced: Object.create(null)
				};
				if (!t) {
					t = Object.create(null);
					for (let n of e.getDocument().definitions) n.kind === "FragmentDefinition" && (t[n.name.value] = { definition: n });
				}
				let { groupedFieldSet: c, forbiddenDirectiveInstances: l } = L_(i, t, s, a, r.selectionSet, e.hideSuggestions, !0, n);
				if (l.length > 0) {
					e.reportError(new G(o == null ? "Anonymous Subscription must not use `@skip` or `@include` directives in the top level selection." : `Subscription "${o}" must not use \`@skip\` or \`@include\` directives in the top level selection.`, { nodes: l }));
					return;
				}
				if (c.size === 0) e.reportError(new G(o == null ? "Anonymous Subscription must select one top level field." : `Subscription "${o}" must select one top level field.`, { nodes: r.selectionSet }));
				else if (c.size > 1) {
					let t = [...c.values()].slice(1).flatMap((e) => W_(e));
					e.reportError(new G(o == null ? "Anonymous Subscription must select only one top level field." : `Subscription "${o}" must select only one top level field.`, { nodes: t }));
				}
				for (let t of c.values()) W_(t)[0].name.value.startsWith("__") && e.reportError(new G(o == null ? "Anonymous Subscription must not select an introspection top level field." : `Subscription "${o}" must not select an introspection top level field.`, { nodes: W_(t) }));
			}
		}
	} };
}
// ../../../node_modules/.pnpm/graphql@17.1.0/node_modules/graphql/validation/rules/StreamDirectiveOnListFieldRule.mjs
function K_(e) {
	return { Directive(t) {
		let n = e.getFieldDef(), r = e.getParentType();
		n && r && t.name.value === $p.name && !(jf(n.type) || Vf(n.type) && jf(n.type.ofType)) && e.reportError(new G(`Directive "@stream" cannot be used on non-list field "${r}.${n.name}".`, { nodes: t }));
	} };
}
// ../../../node_modules/.pnpm/graphql@17.1.0/node_modules/graphql/jsutils/groupBy.mjs
function q_(e, t) {
	let n = new tu();
	for (let r of e) n.add(t(r), r);
	return n;
}
// ../../../node_modules/.pnpm/graphql@17.1.0/node_modules/graphql/validation/rules/UniqueArgumentDefinitionNamesRule.mjs
function J_(e) {
	return {
		DirectiveDefinition(e) {
			let t = e.arguments ?? [];
			return n(`@${e.name.value}`, t);
		},
		InterfaceTypeDefinition: t,
		InterfaceTypeExtension: t,
		ObjectTypeDefinition: t,
		ObjectTypeExtension: t
	};
	function t(e) {
		let t = e.name.value, r = e.fields ?? [];
		for (let e of r) {
			let r = e.name.value, i = e.arguments ?? [];
			n(`${t}.${r}`, i);
		}
		return !1;
	}
	function n(t, n) {
		let r = q_(n, (e) => e.name.value);
		for (let [n, i] of r) i.length > 1 && e.reportError(new G(`Argument "${t}(${n}:)" can only be defined once.`, { nodes: i.map((e) => e.name) }));
		return !1;
	}
}
// ../../../node_modules/.pnpm/graphql@17.1.0/node_modules/graphql/validation/rules/UniqueArgumentNamesRule.mjs
function Y_(e) {
	return {
		Field: t,
		Directive: t
	};
	function t(t) {
		let n = q_(t.arguments ?? [], (e) => e.name.value);
		for (let [t, r] of n) r.length > 1 && e.reportError(new G(`There can be only one argument named "${t}".`, { nodes: r.map((e) => e.name) }));
	}
}
// ../../../node_modules/.pnpm/graphql@17.1.0/node_modules/graphql/validation/rules/UniqueDirectiveNamesRule.mjs
function X_(e) {
	let t = /* @__PURE__ */ new Map(), n = e.getSchema();
	return { DirectiveDefinition(r) {
		let i = r.name.value;
		if (n?.getDirective(i)) {
			e.reportError(new G(`Directive "@${i}" already exists in the schema. It cannot be redefined.`, { nodes: r.name }));
			return;
		}
		let a = t.get(i);
		return a ? e.reportError(new G(`There can be only one directive named "@${i}".`, { nodes: [a, r.name] })) : t.set(i, r.name), !1;
	} };
}
// ../../../node_modules/.pnpm/graphql@17.1.0/node_modules/graphql/validation/rules/UniqueDirectivesPerLocationRule.mjs
function Z_(e) {
	let t = /* @__PURE__ */ new Map(), n = e.getSchema(), r = n ? n.getDirectives() : am;
	for (let e of r) t.set(e.name, !e.isRepeatable);
	let i = e.getDocument().definitions;
	for (let e of i) e.kind === "DirectiveDefinition" && t.set(e.name.value, !e.repeatable);
	let a = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Map(), s = /* @__PURE__ */ new Map();
	return { enter(n) {
		if (!("directives" in n) || !n.directives) return;
		let r;
		if (n.kind === "SchemaDefinition" || n.kind === "SchemaExtension") r = a;
		else if (sg(n) || lg(n)) {
			let e = n.name.value;
			r = o.get(e), r === void 0 && (r = /* @__PURE__ */ new Map(), o.set(e, r));
		} else if (n.kind === "DirectiveDefinition" || n.kind === "DirectiveExtension") {
			let e = n.name.value;
			r = s.get(e), r === void 0 && (r = /* @__PURE__ */ new Map(), s.set(e, r));
		} else r = /* @__PURE__ */ new Map();
		for (let i of n.directives) {
			let n = i.name.value;
			if (t.get(n) === !0) {
				let t = r.get(n);
				t == null ? r.set(n, i) : e.reportError(new G(`The directive "@${n}" can only be used once at this location.`, { nodes: [t, i] }));
			}
		}
	} };
}
// ../../../node_modules/.pnpm/graphql@17.1.0/node_modules/graphql/validation/rules/UniqueEnumValueNamesRule.mjs
function Q_(e) {
	let t = e.getSchema(), n = t ? t.getTypeMap() : Object.create(null), r = /* @__PURE__ */ new Map();
	return {
		EnumTypeDefinition: i,
		EnumTypeExtension: i
	};
	function i(t) {
		let i = t.name.value, a = r.get(i);
		a ?? (a = /* @__PURE__ */ new Map(), r.set(i, a));
		let o = t.values ?? [];
		for (let t of o) {
			let r = t.name.value, o = n[i];
			if (Tf(o) && o.getValue(r)) {
				e.reportError(new G(`Enum value "${i}.${r}" already exists in the schema. It cannot also be defined in this type extension.`, { nodes: t.name }));
				continue;
			}
			let s = a.get(r);
			s == null ? a.set(r, t.name) : e.reportError(new G(`Enum value "${i}.${r}" can only be defined once.`, { nodes: [s, t.name] }));
		}
		return !1;
	}
}
// ../../../node_modules/.pnpm/graphql@17.1.0/node_modules/graphql/validation/rules/UniqueFieldDefinitionNamesRule.mjs
function $_(e) {
	let t = e.getSchema(), n = t ? t.getTypeMap() : Object.create(null), r = /* @__PURE__ */ new Map();
	return {
		InputObjectTypeDefinition: i,
		InputObjectTypeExtension: i,
		InterfaceTypeDefinition: i,
		InterfaceTypeExtension: i,
		ObjectTypeDefinition: i,
		ObjectTypeExtension: i
	};
	function i(t) {
		let i = t.name.value, a = r.get(i);
		a ?? (a = /* @__PURE__ */ new Map(), r.set(i, a));
		let o = t.fields ?? [];
		for (let t of o) {
			let r = t.name.value;
			if (ev(n[i], r)) {
				e.reportError(new G(`Field "${i}.${r}" already exists in the schema. It cannot also be defined in this type extension.`, { nodes: t.name }));
				continue;
			}
			let o = a.get(r);
			o == null ? a.set(r, t.name) : e.reportError(new G(`Field "${i}.${r}" can only be defined once.`, { nodes: [o, t.name] }));
		}
		return !1;
	}
}
function ev(e, t) {
	return mf(e) || bf(e) || Of(e) ? e.getFields()[t] != null : !1;
}
// ../../../node_modules/.pnpm/graphql@17.1.0/node_modules/graphql/validation/rules/UniqueFragmentNamesRule.mjs
function tv(e) {
	let t = /* @__PURE__ */ new Map();
	return {
		OperationDefinition: () => !1,
		FragmentDefinition(n) {
			let r = n.name.value, i = t.get(r);
			return i == null ? t.set(r, n.name) : e.reportError(new G(`There can be only one fragment named "${r}".`, { nodes: [i, n.name] })), !1;
		}
	};
}
// ../../../node_modules/.pnpm/graphql@17.1.0/node_modules/graphql/validation/rules/UniqueInputFieldNamesRule.mjs
function nv(e) {
	let t = [], n = /* @__PURE__ */ new Map();
	return {
		ObjectValue: {
			enter() {
				t.push(n), n = /* @__PURE__ */ new Map();
			},
			leave() {
				let e = t.pop();
				e ?? du(!1), n = e;
			}
		},
		ObjectField(t) {
			let r = t.name.value, i = n.get(r);
			i == null ? n.set(r, t.name) : e.reportError(new G(`There can be only one input field named "${r}".`, { nodes: [i, t.name] }));
		}
	};
}
// ../../../node_modules/.pnpm/graphql@17.1.0/node_modules/graphql/validation/rules/UniqueOperationNamesRule.mjs
function rv(e) {
	let t = /* @__PURE__ */ new Map();
	return {
		OperationDefinition(n) {
			let r = n.name;
			if (r != null) {
				let n = t.get(r.value);
				n == null ? t.set(r.value, r) : e.reportError(new G(`There can be only one operation named "${r.value}".`, { nodes: [n, r] }));
			}
			return !1;
		},
		FragmentDefinition: () => !1
	};
}
// ../../../node_modules/.pnpm/graphql@17.1.0/node_modules/graphql/validation/rules/UniqueOperationTypesRule.mjs
function iv(e) {
	let t = e.getSchema(), n = /* @__PURE__ */ new Map(), r = t ? {
		query: t.getQueryType(),
		mutation: t.getMutationType(),
		subscription: t.getSubscriptionType()
	} : {};
	return {
		SchemaDefinition: i,
		SchemaExtension: i
	};
	function i(t) {
		let i = t.operationTypes ?? [];
		for (let t of i) {
			let i = t.operation, a = n.get(i);
			r[i] ? e.reportError(new G(`Type for ${i} already defined in the schema. It cannot be redefined.`, { nodes: t })) : a ? e.reportError(new G(`There can be only one ${i} type in schema.`, { nodes: [a, t] })) : n.set(i, t);
		}
		return !1;
	}
}
// ../../../node_modules/.pnpm/graphql@17.1.0/node_modules/graphql/validation/rules/UniqueTypeNamesRule.mjs
function av(e) {
	let t = /* @__PURE__ */ new Map(), n = e.getSchema();
	return {
		ScalarTypeDefinition: r,
		ObjectTypeDefinition: r,
		InterfaceTypeDefinition: r,
		UnionTypeDefinition: r,
		EnumTypeDefinition: r,
		InputObjectTypeDefinition: r
	};
	function r(r) {
		let i = r.name.value;
		if (n?.getType(i)) {
			e.reportError(new G(`Type "${i}" already exists in the schema. It cannot also be defined in this type definition.`, { nodes: r.name }));
			return;
		}
		let a = t.get(i);
		return a == null ? t.set(i, r.name) : e.reportError(new G(`There can be only one type named "${i}".`, { nodes: [a, r.name] })), !1;
	}
}
// ../../../node_modules/.pnpm/graphql@17.1.0/node_modules/graphql/validation/rules/UniqueVariableNamesRule.mjs
function ov(e) {
	return { OperationDefinition(t) {
		let n = q_(t.variableDefinitions ?? [], (e) => e.variable.name.value);
		for (let [t, r] of n) r.length > 1 && e.reportError(new G(`There can be only one variable named "$${t}".`, { nodes: r.map((e) => e.variable.name) }));
	} };
}
// ../../../node_modules/.pnpm/graphql@17.1.0/node_modules/graphql/validation/rules/ValuesOfCorrectTypeRule.mjs
function sv(e) {
	return {
		NullValue: (t) => cv(e, t, e.getInputType()),
		ListValue: (t) => cv(e, t, e.getParentInputType()),
		ObjectValue: (t) => cv(e, t, e.getInputType()),
		EnumValue: (t) => cv(e, t, e.getInputType()),
		IntValue: (t) => cv(e, t, e.getInputType()),
		FloatValue: (t) => cv(e, t, e.getInputType()),
		StringValue: (t) => cv(e, t, e.getInputType()),
		BooleanValue: (t) => cv(e, t, e.getInputType())
	};
}
function cv(e, t, n) {
	return n && wp(t, n, (t) => {
		e.reportError(t);
	}, void 0, void 0, e.hideSuggestions), !1;
}
// ../../../node_modules/.pnpm/graphql@17.1.0/node_modules/graphql/validation/rules/VariablesAreInputTypesRule.mjs
function lv(e) {
	return { VariableDefinition(t) {
		let n = Kh(e.getSchema(), t.type);
		if (n !== void 0 && !Pf(n)) {
			let n = t.variable.name.value, r = Yd(t.type);
			e.reportError(new G(`Variable "$${n}" cannot be non-input type "${r}".`, { nodes: t.type }));
		}
	} };
}
// ../../../node_modules/.pnpm/graphql@17.1.0/node_modules/graphql/validation/rules/VariablesInAllowedPositionRule.mjs
function uv(e) {
	let t;
	return { OperationDefinition: {
		enter(e) {
			if (t = /* @__PURE__ */ new Map(), e.variableDefinitions) for (let n of e.variableDefinitions) t.set(n.variable.name.value, n);
		},
		leave(n) {
			let r = e.getRecursiveVariableUsages(n);
			for (let { node: n, type: i, parentType: a, defaultValue: o, fragmentVariableDefinition: s } of r) {
				let r = n.name.value, c = s;
				if (c ??= t.get(r), c && i) {
					let t = e.getSchema(), s = Kh(t, c.type);
					s && !dv(t, s, c.defaultValue, i, o) && e.reportError(new G(`Variable "$${r}" of type "${s}" used in position expecting type "${i}".`, { nodes: [c, n] })), Of(a) && a.isOneOf && Hf(s) && e.reportError(new G(`Variable "$${r}" is of type "${s}" but must be non-nullable to be used for OneOf Input Object "${a}".`, { nodes: [c, n] }));
				}
			}
		}
	} };
}
function dv(e, t, n, r, i) {
	if (Nf(r) && !Nf(t)) {
		if ((n == null || n.kind === "NullValue") && i === void 0) return !1;
		let a = r.ofType;
		return mp(e, t, a);
	}
	return mp(e, t, r);
}
// ../../../node_modules/.pnpm/graphql@17.1.0/node_modules/graphql/validation/specifiedRules.mjs
var fv = Object.freeze([Og]), pv = Object.freeze([
	ug,
	xg,
	rv,
	Tg,
	G_,
	Sg,
	mg,
	lv,
	S_,
	dg,
	tv,
	bg,
	jg,
	p_,
	kg,
	ov,
	Ag,
	Mg,
	_g,
	Z_,
	Zh,
	rg,
	Xh,
	K_,
	hg,
	Y_,
	sv,
	y_,
	uv,
	Rg,
	nv,
	...fv
]), mv = Object.freeze([
	Eg,
	iv,
	av,
	Q_,
	$_,
	J_,
	X_,
	Sg,
	_g,
	Z_,
	h_,
	gg,
	Y_,
	nv,
	b_
]), hv = class {
	constructor() {
		this._entries = /* @__PURE__ */ new Map(), this._memberIds = /* @__PURE__ */ new Map(), this._nextMemberId = 0;
	}
	get size() {
		return this._entries.size;
	}
	get(e) {
		return this._entries.get(this._key(e))?.value;
	}
	getOrInsert(e, t) {
		let n = this._key(e), r = this._entries.get(n);
		return r === void 0 ? (this._entries.set(n, {
			members: e,
			value: t
		}), t) : r.value;
	}
	getOrInsertComputed(e, t) {
		let n = this._entries.get(this._key(e));
		if (n !== void 0) return n.value;
		let r = t(e);
		return this.set(e, r), r;
	}
	has(e) {
		return this._entries.has(this._key(e));
	}
	set(e, t) {
		let n = this._key(e), r = this._entries.get(n);
		return r === void 0 ? (this._entries.set(n, {
			members: e,
			value: t
		}), this) : (r.value = t, this);
	}
	*keys() {
		for (let e of this._entries.values()) yield e.members;
	}
	*values() {
		for (let e of this._entries.values()) yield e.value;
	}
	*entries() {
		for (let e of this._entries.values()) yield [e.members, e.value];
	}
	[Symbol.iterator]() {
		return this.entries();
	}
	_key(e) {
		let t = [];
		for (let n of e) {
			let e = this._memberIds.get(n);
			e === void 0 && (e = this._nextMemberId++, this._memberIds.set(n, e)), t.push(e);
		}
		return t.sort((e, t) => e - t), t.join(",");
	}
}, gv = class {
	constructor(e, t) {
		this._remainingFragmentWork = 5e4, this._ast = e, this._fragments = void 0, this._fragmentSpreads = /* @__PURE__ */ new Map(), this._recursivelyReferencedFragments = new hv(), this._onError = t;
	}
	get [Symbol.toStringTag]() {
		return "ASTValidationContext";
	}
	reportError(e) {
		this._onError(e);
	}
	getDocument() {
		return this._ast;
	}
	getFragment(e) {
		let t;
		if (this._fragments) t = this._fragments;
		else {
			t = Object.create(null);
			for (let e of this.getDocument().definitions) e.kind === "FragmentDefinition" && (t[e.name.value] = e);
			this._fragments = t;
		}
		return t[e];
	}
	getFragmentSpreads(e) {
		let t = this._fragmentSpreads.get(e);
		if (!t) {
			t = [];
			let n = [e], r;
			for (; r = n.pop();) for (let e of r.selections) e.kind === "FragmentSpread" ? t.push(e) : e.selectionSet && n.push(e.selectionSet);
			this._fragmentSpreads.set(e, t);
		}
		return t;
	}
	getRecursivelyReferencedFragments(e) {
		return this.getRecursivelyReferencedFragmentsForOperations([e]);
	}
	getRecursivelyReferencedFragmentsForOperations(e) {
		let t = new Set(e.flatMap(({ selectionSet: e }) => this.getFragmentSpreads(e).map(({ name: e }) => e.value))), n = this._recursivelyReferencedFragments.get(t);
		if (!n) {
			n = [], this.spendFragmentWork(t.size);
			let e = new Set(t);
			for (let t of e) {
				let r = this.getFragment(t);
				if (r) {
					n.push(r);
					let t = this.getFragmentSpreads(r.selectionSet);
					this.spendFragmentWork(t.length);
					for (let n of t) e.add(n.name.value);
				}
			}
			this._recursivelyReferencedFragments.set(t, n);
		}
		return n;
	}
	spendFragmentWork(e) {
		if (this._remainingFragmentWork -= e, this._remainingFragmentWork < 0) throw Ng;
	}
}, _v = class extends gv {
	constructor(e, t, n) {
		super(e, n), this._schema = t;
	}
	get hideSuggestions() {
		return !1;
	}
	get [Symbol.toStringTag]() {
		return "SDLValidationContext";
	}
	getSchema() {
		return this._schema;
	}
}, vv = class extends gv {
	constructor(e, t, n, r, i) {
		let { hideSuggestions: a, allowEmptySelectionSets: o } = typeof i == "boolean" ? { hideSuggestions: i } : i ?? {};
		super(t, r), this._schema = e, this._typeInfo = n, this._variableUsages = /* @__PURE__ */ new Map(), this._recursiveVariableUsages = /* @__PURE__ */ new Map(), this._hideSuggestions = a ?? !1, this._allowEmptySelectionSets = o ?? !0;
	}
	get [Symbol.toStringTag]() {
		return "ValidationContext";
	}
	get hideSuggestions() {
		return this._hideSuggestions;
	}
	get allowEmptySelectionSets() {
		return this._allowEmptySelectionSets;
	}
	getSchema() {
		return this._schema;
	}
	getVariableUsages(e) {
		let t = this._variableUsages.get(e);
		if (!t) {
			let n = [], r = new qh(this._schema, void 0, this._typeInfo.getFragmentSignatureByName()), i = e.kind === "FragmentDefinition" ? e : void 0;
			Uh(e, Yh(r, {
				VariableDefinition: () => !1,
				Variable(e) {
					let t;
					i && (t = r.getFragmentSignatureByName()(i.name.value)?.variableDefinitions.get(e.name.value)), n.push({
						node: e,
						type: r.getInputType(),
						parentType: r.getParentInputType(),
						defaultValue: r.getDefaultValue(),
						fragmentVariableDefinition: t
					});
				}
			})), t = n, this._variableUsages.set(e, t);
		}
		return t;
	}
	getRecursiveVariableUsages(e) {
		let t = this._recursiveVariableUsages.get(e);
		if (!t) {
			let n = this.getRecursivelyReferencedFragments(e), r = this._recursiveVariableUsages.get(n);
			r || (this.spendFragmentWork(n.length), r = n.flatMap((e) => {
				let t = this.getVariableUsages(e);
				return this.spendFragmentWork(t.length), t;
			}), this._recursiveVariableUsages.set(n, r)), this.spendFragmentWork(r.length), t = this.getVariableUsages(e).concat(r), this._recursiveVariableUsages.set(e, t);
		}
		return t;
	}
	getType() {
		return this._typeInfo.getType();
	}
	getParentType() {
		return this._typeInfo.getParentType();
	}
	getInputType() {
		return this._typeInfo.getInputType();
	}
	getParentInputType() {
		return this._typeInfo.getParentInputType();
	}
	getFieldDef() {
		return this._typeInfo.getFieldDef();
	}
	getDirective() {
		return this._typeInfo.getDirective();
	}
	getArgument() {
		return this._typeInfo.getArgument();
	}
	getFragmentSignature() {
		return this._typeInfo.getFragmentSignature();
	}
	getFragmentSignatureByName() {
		return this._typeInfo.getFragmentSignatureByName();
	}
	getEnumValue() {
		return this._typeInfo.getEnumValue();
	}
}, yv = _u(xu, (e) => e.filter((e) => e !== "description")), bv = new G("Too many validation errors, error limit reached. Validation aborted.");
function xv(e, t, n = pv, r) {
	return uh(ih) ? ih.traceSync(() => Sv(e, t, n, r), {
		schema: e,
		document: t
	}) : Sv(e, t, n, r);
}
function Sv(e, t, n, r) {
	let i = r?.maxErrors ?? 100, a = r?.hideSuggestions ?? !1, o = r?.allowEmptySelectionSets ?? !0;
	Am(e);
	let s = [], c = new qh(e), l = new vv(e, t, c, (e) => {
		if (s.length >= i) throw bv;
		s.push(e);
	}, {
		hideSuggestions: a,
		allowEmptySelectionSets: o
	}), u = Wh(n.map((e) => e(l)));
	try {
		Uh(t, Yh(c, u), yv);
	} catch (e) {
		if (e === bv || e === Ng) s.push(e);
		else throw e;
	}
	return s;
}
function Cv(e, t, n = mv) {
	let r = [], i = new _v(e, t, (e) => {
		r.push(e);
	});
	return Uh(e, Wh(n.map((e) => e(i)))), r;
}
function wv(e) {
	let t = Cv(e);
	if (t.length !== 0) throw Error(t.map((e) => e.message).join("\n\n"));
}
// ../../../node_modules/.pnpm/graphql@17.1.0/node_modules/graphql/utilities/mapSchemaConfig.mjs
var Tv = {
	SCHEMA: "SCHEMA",
	SCALAR: "SCALAR",
	OBJECT: "OBJECT",
	FIELD: "FIELD",
	ARGUMENT: "ARGUMENT",
	INTERFACE: "INTERFACE",
	UNION: "UNION",
	ENUM: "ENUM",
	ENUM_VALUE: "ENUM_VALUE",
	INPUT_OBJECT: "INPUT_OBJECT",
	INPUT_FIELD: "INPUT_FIELD",
	DIRECTIVE: "DIRECTIVE"
};
function Ev(e, t) {
	let n = t({
		getNamedType: c,
		setNamedType: l,
		getNamedTypes: u
	}), r = /* @__PURE__ */ new Map();
	for (let t of e.types) {
		let e = t.name, n = d(t);
		n && r.set(e, n);
	}
	let i = [];
	for (let t of e.directives) {
		if (om(t)) {
			i.push(t);
			continue;
		}
		let e = oe(t.toConfig());
		e && i.push(new Yp(e));
	}
	let a = {
		...e,
		query: e.query && c(e.query.name),
		mutation: e.mutation && c(e.mutation.name),
		subscription: e.subscription && c(e.subscription.name),
		types: Array.from(r.values()),
		directives: i
	}, o = n[Tv.SCHEMA];
	return o == null ? a : o(a);
	function s(e) {
		return jf(e) ? new Bf(s(e.ofType)) : Nf(e) ? new J(s(e.ofType)) : c(e.name);
	}
	function c(e) {
		let t = Dv.get(e) ?? r.get(e);
		return t === void 0 && du(!1, `Unknown type: "${e}".`), t;
	}
	function l(e) {
		r.set(e.name, e);
	}
	function u() {
		return Array.from(r.values());
	}
	function d(e) {
		if (Cm(e) || Ip(e)) return e;
		if (ff(e)) return f(e);
		if (mf(e)) return p(e);
		if (bf(e)) return ee(e);
		if (Cf(e)) return te(e);
		if (Tf(e)) return ne(e);
		if (Of(e)) return ie(e);
		du(!1, "Unexpected type: " + W(e));
	}
	function f(e) {
		let t = e.toConfig(), r = n[Tv.SCALAR];
		return t = r == null ? t : r(t), new Yf(t);
	}
	function p(e) {
		let t = e.toConfig(), r = {
			...t,
			interfaces: () => t.interfaces.map((e) => c(e.name)),
			fields: () => m(t.fields, e.name)
		}, i = n[Tv.OBJECT];
		return r = i == null ? r : i(r), new Xf(r);
	}
	function m(e, t) {
		let r = Object.create(null);
		for (let [i, a] of Object.entries(e)) {
			let e = {
				...a,
				type: s(a.type),
				args: h(a.args, i, t)
			}, o = n[Tv.FIELD];
			o && (e = o(e, t)), r[i] = e;
		}
		return r;
	}
	function h(e, t, r) {
		let i = Object.create(null);
		for (let [a, o] of Object.entries(e)) {
			let e = {
				...o,
				type: s(o.type)
			}, c = n[Tv.ARGUMENT];
			c && (e = c(e, t, r)), i[a] = e;
		}
		return i;
	}
	function ee(e) {
		let t = e.toConfig(), r = {
			...t,
			interfaces: () => t.interfaces.map((e) => c(e.name)),
			fields: () => m(t.fields, e.name)
		}, i = n[Tv.INTERFACE];
		return r = i == null ? r : i(r), new np(r);
	}
	function te(e) {
		let t = e.toConfig(), r = {
			...t,
			types: () => t.types.map((e) => c(e.name))
		}, i = n[Tv.UNION];
		return r = i == null ? r : i(r), new rp(r);
	}
	function ne(e) {
		let t = e.toConfig(), r = {
			...t,
			values: () => {
				let n = Object.create(null);
				for (let [r, i] of Object.entries(t.values)) n[r] = re(i, r, e.name);
				return n;
			}
		}, i = n[Tv.ENUM];
		return r = i == null ? r : i(r), new ap(r);
	}
	function re(e, t, r) {
		let i = { ...e }, a = n[Tv.ENUM_VALUE];
		return a == null ? i : a(i, t, r);
	}
	function ie(e) {
		let t = e.toConfig(), r = {
			...t,
			fields: () => {
				let n = Object.create(null);
				for (let [r, i] of Object.entries(t.fields)) n[r] = ae(i, r, e.name);
				return n;
			}
		}, i = n[Tv.INPUT_OBJECT];
		return r = i == null ? r : i(r), new lp(r);
	}
	function ae(e, t, r) {
		let i = {
			...e,
			type: s(e.type)
		}, a = n[Tv.INPUT_FIELD];
		return a == null ? i : a(i, t, r);
	}
	function oe(e) {
		let t = {
			...e,
			args: h(e.args, e.name, void 0)
		}, r = n[Tv.DIRECTIVE];
		return r == null ? t : r(t);
	}
}
var Dv = new Map([...Fp, ...Sm].map((e) => [e.name, e]));
// ../../../node_modules/.pnpm/graphql@17.1.0/node_modules/graphql/utilities/extendSchema.mjs
function Ov(e, t, n) {
	let r = [], i = new tu(), a = new tu(), o = new tu(), s = new tu(), c = new tu(), l = new tu(), u = new tu(), d = [], f, p = [], m = !1;
	for (let e of t.definitions) {
		switch (e.kind) {
			case Zu:
				f = e;
				break;
			case ld:
				p.push(e);
				break;
			case cd:
				d.push(e);
				break;
			case ud:
				u.add(e.name.value, e);
				break;
			case $u:
			case ed:
			case rd:
			case id:
			case ad:
			case sd:
				r.push(e);
				break;
			case dd:
				i.add(e.name.value, e);
				break;
			case fd:
				a.add(e.name.value, e);
				break;
			case pd:
				o.add(e.name.value, e);
				break;
			case md:
				s.add(e.name.value, e);
				break;
			case hd:
				c.add(e.name.value, e);
				break;
			case gd:
				l.add(e.name.value, e);
				break;
			default: continue;
		}
		m = !0;
	}
	return m ? Ev(e, (e) => {
		let { getNamedType: t, setNamedType: m, getNamedTypes: h } = e;
		return {
			[Tv.SCHEMA]: (e) => {
				for (let e of r) {
					let t = kv.get(e.name.value) ?? ue(e);
					m(t);
				}
				let i = {
					query: e.query && t(e.query.name),
					mutation: e.mutation && t(e.mutation.name),
					subscription: e.subscription && t(e.subscription.name),
					...f && ee([f]),
					...ee(p)
				};
				return {
					description: f?.description?.value ?? e.description,
					...i,
					types: h(),
					directives: [...e.directives.map(ie), ...d.map(re)],
					extensions: e.extensions,
					astNode: f ?? e.astNode,
					extensionASTNodes: e.extensionASTNodes.concat(p),
					assumeValid: n?.assumeValid ?? !1
				};
			},
			[Tv.INPUT_OBJECT]: (e) => {
				let t = l.get(e.name) ?? [];
				return {
					...e,
					fields: () => ({
						...e.fields(),
						...se(t)
					}),
					extensionASTNodes: e.extensionASTNodes.concat(t)
				};
			},
			[Tv.ENUM]: (e) => {
				let t = c.get(e.name) ?? [];
				return {
					...e,
					values: () => ({
						...e.values(),
						...ce(t)
					}),
					extensionASTNodes: e.extensionASTNodes.concat(t)
				};
			},
			[Tv.SCALAR]: (e) => {
				let t = i.get(e.name) ?? [], n = e.specifiedByURL;
				for (let e of t) n = jv(e) ?? n;
				return {
					...e,
					specifiedByURL: n,
					extensionASTNodes: e.extensionASTNodes.concat(t)
				};
			},
			[Tv.OBJECT]: (e) => {
				let t = a.get(e.name) ?? [];
				return {
					...e,
					interfaces: () => [...e.interfaces(), ...g(t)],
					fields: () => ({
						...e.fields(),
						...ae(t)
					}),
					extensionASTNodes: e.extensionASTNodes.concat(t)
				};
			},
			[Tv.INTERFACE]: (e) => {
				let t = o.get(e.name) ?? [];
				return {
					...e,
					interfaces: () => [...e.interfaces(), ...g(t)],
					fields: () => ({
						...e.fields(),
						...ae(t)
					}),
					extensionASTNodes: e.extensionASTNodes.concat(t)
				};
			},
			[Tv.UNION]: (e) => {
				let t = s.get(e.name) ?? [];
				return {
					...e,
					types: () => [...e.types(), ...le(t)],
					extensionASTNodes: e.extensionASTNodes.concat(t)
				};
			}
		};
		function ee(e) {
			let t = {};
			for (let n of e) {
				let e = n.operationTypes ?? [];
				for (let n of e) t[n.operation] = te(n.type);
			}
			return t;
		}
		function te(e) {
			let n = e.name.value, r = t(n);
			return r === void 0 && du(!1, `Unknown type: "${n}".`), r;
		}
		function ne(e) {
			return e.kind === "ListType" ? new Bf(ne(e.type)) : e.kind === "NonNullType" ? new J(ne(e.type)) : te(e);
		}
		function re(e) {
			let t = u.get(e.name.value) ?? [], n = Av(e) ?? t.map((e) => Av(e)).find((e) => e != null);
			return new Yp({
				name: e.name.value,
				description: e.description?.value,
				locations: e.locations.map(({ value: e }) => e),
				isRepeatable: e.repeatable,
				args: oe(e.arguments),
				deprecationReason: n,
				astNode: e,
				extensionASTNodes: t
			});
		}
		function ie(e) {
			let t = u.get(e.name) ?? [];
			if (t.length === 0) return e;
			let n = e.deprecationReason ?? t.map((e) => Av(e)).find((e) => e != null);
			return new Yp({
				...e.toConfig(),
				deprecationReason: n,
				extensionASTNodes: e.extensionASTNodes.concat(t)
			});
		}
		function ae(e) {
			let t = Object.create(null);
			for (let n of e) {
				let e = n.fields ?? [];
				for (let n of e) t[n.name.value] = {
					type: ne(n.type),
					description: n.description?.value,
					args: oe(n.arguments),
					deprecationReason: Av(n),
					astNode: n
				};
			}
			return t;
		}
		function oe(e) {
			let t = e ?? [], n = Object.create(null);
			for (let e of t) {
				let t = ne(e.type);
				n[e.name.value] = {
					type: t,
					description: e.description?.value,
					default: e.defaultValue && { literal: e.defaultValue },
					deprecationReason: Av(e),
					astNode: e
				};
			}
			return n;
		}
		function se(e) {
			let t = Object.create(null);
			for (let n of e) {
				let e = n.fields ?? [];
				for (let n of e) {
					let e = ne(n.type);
					t[n.name.value] = {
						type: e,
						description: n.description?.value,
						default: n.defaultValue && { literal: n.defaultValue },
						deprecationReason: Av(n),
						astNode: n
					};
				}
			}
			return t;
		}
		function ce(e) {
			let t = Object.create(null);
			for (let n of e) {
				let e = n.values ?? [];
				for (let n of e) t[n.name.value] = {
					description: n.description?.value,
					deprecationReason: Av(n),
					astNode: n
				};
			}
			return t;
		}
		function g(e) {
			return e.flatMap((e) => e.interfaces?.map(te) ?? []);
		}
		function le(e) {
			return e.flatMap((e) => e.types?.map(te) ?? []);
		}
		function ue(e) {
			let t = e.name.value;
			switch (e.kind) {
				case ed: {
					let n = a.get(t) ?? [], r = [e, ...n];
					return new Xf({
						name: t,
						description: e.description?.value,
						interfaces: () => g(r),
						fields: () => ae(r),
						astNode: e,
						extensionASTNodes: n
					});
				}
				case rd: {
					let n = o.get(t) ?? [], r = [e, ...n];
					return new np({
						name: t,
						description: e.description?.value,
						interfaces: () => g(r),
						fields: () => ae(r),
						astNode: e,
						extensionASTNodes: n
					});
				}
				case ad: {
					let n = c.get(t) ?? [], r = [e, ...n];
					return new ap({
						name: t,
						description: e.description?.value,
						values: () => ce(r),
						astNode: e,
						extensionASTNodes: n
					});
				}
				case id: {
					let n = s.get(t) ?? [], r = [e, ...n];
					return new rp({
						name: t,
						description: e.description?.value,
						types: () => le(r),
						astNode: e,
						extensionASTNodes: n
					});
				}
				case $u: {
					let n = i.get(t) ?? [], r = jv(e);
					for (let e of n) r = jv(e) ?? r;
					return new Yf({
						name: t,
						description: e.description?.value,
						specifiedByURL: r,
						astNode: e,
						extensionASTNodes: n
					});
				}
				case sd: {
					let n = l.get(t) ?? [], r = [e, ...n];
					return new lp({
						name: t,
						description: e.description?.value,
						fields: () => se(r),
						astNode: e,
						extensionASTNodes: n,
						isOneOf: Mv(e)
					});
				}
			}
		}
	}) : e;
}
var kv = new Map([...Fp, ...Sm].map((e) => [e.name, e]));
function Av(e) {
	return I_(tm, e)?.reason;
}
function jv(e) {
	return I_(nm, e)?.url;
}
function Mv(e) {
	return !!I_(rm, e);
}
// ../../../node_modules/.pnpm/graphql@17.1.0/node_modules/graphql/utilities/buildASTSchema.mjs
function Nv(e, t) {
	t?.assumeValid !== !0 && t?.assumeValidSDL !== !0 && wv(e);
	let n = Ov({
		description: void 0,
		types: [],
		directives: [],
		extensions: Object.create(null),
		extensionASTNodes: [],
		assumeValid: !1
	}, e, t);
	if (n.astNode == null) for (let e of n.types) switch (e.name) {
		case "Query":
			n.query = e;
			break;
		case "Mutation":
			n.mutation = e;
			break;
		case "Subscription": n.subscription = e;
	}
	let r = [...n.directives, ...am.filter((e) => n.directives.every((t) => t.name !== e.name))];
	return new Dm({
		...n,
		directives: r
	});
}
function Pv(e, t) {
	return Nv(Fh(e, t), {
		assumeValidSDL: t?.assumeValidSDL,
		assumeValid: t?.assumeValid
	});
}
// ../../../node_modules/.pnpm/vscode-languageserver-types@3.17.5/node_modules/vscode-languageserver-types/lib/esm/main.js
var Fv;
(function(e) {
	function t(e) {
		return typeof e == "string";
	}
	e.is = t;
})(Fv ||= {});
var Iv;
(function(e) {
	function t(e) {
		return typeof e == "string";
	}
	e.is = t;
})(Iv ||= {});
var Lv;
(function(e) {
	e.MIN_VALUE = -2147483648, e.MAX_VALUE = 2147483647;
	function t(t) {
		return typeof t == "number" && e.MIN_VALUE <= t && t <= e.MAX_VALUE;
	}
	e.is = t;
})(Lv ||= {});
var Rv;
(function(e) {
	e.MIN_VALUE = 0, e.MAX_VALUE = 2147483647;
	function t(t) {
		return typeof t == "number" && e.MIN_VALUE <= t && t <= e.MAX_VALUE;
	}
	e.is = t;
})(Rv ||= {});
var zv;
(function(e) {
	function t(e, t) {
		return e === Number.MAX_VALUE && (e = Rv.MAX_VALUE), t === Number.MAX_VALUE && (t = Rv.MAX_VALUE), {
			line: e,
			character: t
		};
	}
	e.create = t;
	function n(e) {
		let t = e;
		return Z.objectLiteral(t) && Z.uinteger(t.line) && Z.uinteger(t.character);
	}
	e.is = n;
})(zv ||= {});
var Bv;
(function(e) {
	function t(e, t, n, r) {
		if (Z.uinteger(e) && Z.uinteger(t) && Z.uinteger(n) && Z.uinteger(r)) return {
			start: zv.create(e, t),
			end: zv.create(n, r)
		};
		if (zv.is(e) && zv.is(t)) return {
			start: e,
			end: t
		};
		throw Error(`Range#create called with invalid arguments[${e}, ${t}, ${n}, ${r}]`);
	}
	e.create = t;
	function n(e) {
		let t = e;
		return Z.objectLiteral(t) && zv.is(t.start) && zv.is(t.end);
	}
	e.is = n;
})(Bv ||= {});
var Vv;
(function(e) {
	function t(e, t) {
		return {
			uri: e,
			range: t
		};
	}
	e.create = t;
	function n(e) {
		let t = e;
		return Z.objectLiteral(t) && Bv.is(t.range) && (Z.string(t.uri) || Z.undefined(t.uri));
	}
	e.is = n;
})(Vv ||= {});
var Hv;
(function(e) {
	function t(e, t, n, r) {
		return {
			targetUri: e,
			targetRange: t,
			targetSelectionRange: n,
			originSelectionRange: r
		};
	}
	e.create = t;
	function n(e) {
		let t = e;
		return Z.objectLiteral(t) && Bv.is(t.targetRange) && Z.string(t.targetUri) && Bv.is(t.targetSelectionRange) && (Bv.is(t.originSelectionRange) || Z.undefined(t.originSelectionRange));
	}
	e.is = n;
})(Hv ||= {});
var Uv;
(function(e) {
	function t(e, t, n, r) {
		return {
			red: e,
			green: t,
			blue: n,
			alpha: r
		};
	}
	e.create = t;
	function n(e) {
		let t = e;
		return Z.objectLiteral(t) && Z.numberRange(t.red, 0, 1) && Z.numberRange(t.green, 0, 1) && Z.numberRange(t.blue, 0, 1) && Z.numberRange(t.alpha, 0, 1);
	}
	e.is = n;
})(Uv ||= {});
var Wv;
(function(e) {
	function t(e, t) {
		return {
			range: e,
			color: t
		};
	}
	e.create = t;
	function n(e) {
		let t = e;
		return Z.objectLiteral(t) && Bv.is(t.range) && Uv.is(t.color);
	}
	e.is = n;
})(Wv ||= {});
var Gv;
(function(e) {
	function t(e, t, n) {
		return {
			label: e,
			textEdit: t,
			additionalTextEdits: n
		};
	}
	e.create = t;
	function n(e) {
		let t = e;
		return Z.objectLiteral(t) && Z.string(t.label) && (Z.undefined(t.textEdit) || ey.is(t)) && (Z.undefined(t.additionalTextEdits) || Z.typedArray(t.additionalTextEdits, ey.is));
	}
	e.is = n;
})(Gv ||= {});
var Kv;
(function(e) {
	e.Comment = "comment", e.Imports = "imports", e.Region = "region";
})(Kv ||= {});
var qv;
(function(e) {
	function t(e, t, n, r, i, a) {
		let o = {
			startLine: e,
			endLine: t
		};
		return Z.defined(n) && (o.startCharacter = n), Z.defined(r) && (o.endCharacter = r), Z.defined(i) && (o.kind = i), Z.defined(a) && (o.collapsedText = a), o;
	}
	e.create = t;
	function n(e) {
		let t = e;
		return Z.objectLiteral(t) && Z.uinteger(t.startLine) && Z.uinteger(t.startLine) && (Z.undefined(t.startCharacter) || Z.uinteger(t.startCharacter)) && (Z.undefined(t.endCharacter) || Z.uinteger(t.endCharacter)) && (Z.undefined(t.kind) || Z.string(t.kind));
	}
	e.is = n;
})(qv ||= {});
var Jv;
(function(e) {
	function t(e, t) {
		return {
			location: e,
			message: t
		};
	}
	e.create = t;
	function n(e) {
		let t = e;
		return Z.defined(t) && Vv.is(t.location) && Z.string(t.message);
	}
	e.is = n;
})(Jv ||= {});
var Yv;
(function(e) {
	e.Error = 1, e.Warning = 2, e.Information = 3, e.Hint = 4;
})(Yv ||= {});
var Xv;
(function(e) {
	e.Unnecessary = 1, e.Deprecated = 2;
})(Xv ||= {});
var Zv;
(function(e) {
	function t(e) {
		let t = e;
		return Z.objectLiteral(t) && Z.string(t.href);
	}
	e.is = t;
})(Zv ||= {});
var Qv;
(function(e) {
	function t(e, t, n, r, i, a) {
		let o = {
			range: e,
			message: t
		};
		return Z.defined(n) && (o.severity = n), Z.defined(r) && (o.code = r), Z.defined(i) && (o.source = i), Z.defined(a) && (o.relatedInformation = a), o;
	}
	e.create = t;
	function n(e) {
		let t = e;
		return Z.defined(t) && Bv.is(t.range) && Z.string(t.message) && (Z.number(t.severity) || Z.undefined(t.severity)) && (Z.integer(t.code) || Z.string(t.code) || Z.undefined(t.code)) && (Z.undefined(t.codeDescription) || Z.string(t.codeDescription?.href)) && (Z.string(t.source) || Z.undefined(t.source)) && (Z.undefined(t.relatedInformation) || Z.typedArray(t.relatedInformation, Jv.is));
	}
	e.is = n;
})(Qv ||= {});
var $v;
(function(e) {
	function t(e, t, ...n) {
		let r = {
			title: e,
			command: t
		};
		return Z.defined(n) && n.length > 0 && (r.arguments = n), r;
	}
	e.create = t;
	function n(e) {
		let t = e;
		return Z.defined(t) && Z.string(t.title) && Z.string(t.command);
	}
	e.is = n;
})($v ||= {});
var ey;
(function(e) {
	function t(e, t) {
		return {
			range: e,
			newText: t
		};
	}
	e.replace = t;
	function n(e, t) {
		return {
			range: {
				start: e,
				end: e
			},
			newText: t
		};
	}
	e.insert = n;
	function r(e) {
		return {
			range: e,
			newText: ""
		};
	}
	e.del = r;
	function i(e) {
		let t = e;
		return Z.objectLiteral(t) && Z.string(t.newText) && Bv.is(t.range);
	}
	e.is = i;
})(ey ||= {});
var ty;
(function(e) {
	function t(e, t, n) {
		let r = { label: e };
		return t !== void 0 && (r.needsConfirmation = t), n !== void 0 && (r.description = n), r;
	}
	e.create = t;
	function n(e) {
		let t = e;
		return Z.objectLiteral(t) && Z.string(t.label) && (Z.boolean(t.needsConfirmation) || t.needsConfirmation === void 0) && (Z.string(t.description) || t.description === void 0);
	}
	e.is = n;
})(ty ||= {});
var ny;
(function(e) {
	function t(e) {
		let t = e;
		return Z.string(t);
	}
	e.is = t;
})(ny ||= {});
var ry;
(function(e) {
	function t(e, t, n) {
		return {
			range: e,
			newText: t,
			annotationId: n
		};
	}
	e.replace = t;
	function n(e, t, n) {
		return {
			range: {
				start: e,
				end: e
			},
			newText: t,
			annotationId: n
		};
	}
	e.insert = n;
	function r(e, t) {
		return {
			range: e,
			newText: "",
			annotationId: t
		};
	}
	e.del = r;
	function i(e) {
		let t = e;
		return ey.is(t) && (ty.is(t.annotationId) || ny.is(t.annotationId));
	}
	e.is = i;
})(ry ||= {});
var iy;
(function(e) {
	function t(e, t) {
		return {
			textDocument: e,
			edits: t
		};
	}
	e.create = t;
	function n(e) {
		let t = e;
		return Z.defined(t) && dy.is(t.textDocument) && Array.isArray(t.edits);
	}
	e.is = n;
})(iy ||= {});
var ay;
(function(e) {
	function t(e, t, n) {
		let r = {
			kind: "create",
			uri: e
		};
		return t !== void 0 && (t.overwrite !== void 0 || t.ignoreIfExists !== void 0) && (r.options = t), n !== void 0 && (r.annotationId = n), r;
	}
	e.create = t;
	function n(e) {
		let t = e;
		return t && t.kind === "create" && Z.string(t.uri) && (t.options === void 0 || (t.options.overwrite === void 0 || Z.boolean(t.options.overwrite)) && (t.options.ignoreIfExists === void 0 || Z.boolean(t.options.ignoreIfExists))) && (t.annotationId === void 0 || ny.is(t.annotationId));
	}
	e.is = n;
})(ay ||= {});
var oy;
(function(e) {
	function t(e, t, n, r) {
		let i = {
			kind: "rename",
			oldUri: e,
			newUri: t
		};
		return n !== void 0 && (n.overwrite !== void 0 || n.ignoreIfExists !== void 0) && (i.options = n), r !== void 0 && (i.annotationId = r), i;
	}
	e.create = t;
	function n(e) {
		let t = e;
		return t && t.kind === "rename" && Z.string(t.oldUri) && Z.string(t.newUri) && (t.options === void 0 || (t.options.overwrite === void 0 || Z.boolean(t.options.overwrite)) && (t.options.ignoreIfExists === void 0 || Z.boolean(t.options.ignoreIfExists))) && (t.annotationId === void 0 || ny.is(t.annotationId));
	}
	e.is = n;
})(oy ||= {});
var sy;
(function(e) {
	function t(e, t, n) {
		let r = {
			kind: "delete",
			uri: e
		};
		return t !== void 0 && (t.recursive !== void 0 || t.ignoreIfNotExists !== void 0) && (r.options = t), n !== void 0 && (r.annotationId = n), r;
	}
	e.create = t;
	function n(e) {
		let t = e;
		return t && t.kind === "delete" && Z.string(t.uri) && (t.options === void 0 || (t.options.recursive === void 0 || Z.boolean(t.options.recursive)) && (t.options.ignoreIfNotExists === void 0 || Z.boolean(t.options.ignoreIfNotExists))) && (t.annotationId === void 0 || ny.is(t.annotationId));
	}
	e.is = n;
})(sy ||= {});
var cy;
(function(e) {
	function t(e) {
		let t = e;
		return t && (t.changes !== void 0 || t.documentChanges !== void 0) && (t.documentChanges === void 0 || t.documentChanges.every((e) => Z.string(e.kind) ? ay.is(e) || oy.is(e) || sy.is(e) : iy.is(e)));
	}
	e.is = t;
})(cy ||= {});
var ly;
(function(e) {
	function t(e) {
		return { uri: e };
	}
	e.create = t;
	function n(e) {
		let t = e;
		return Z.defined(t) && Z.string(t.uri);
	}
	e.is = n;
})(ly ||= {});
var uy;
(function(e) {
	function t(e, t) {
		return {
			uri: e,
			version: t
		};
	}
	e.create = t;
	function n(e) {
		let t = e;
		return Z.defined(t) && Z.string(t.uri) && Z.integer(t.version);
	}
	e.is = n;
})(uy ||= {});
var dy;
(function(e) {
	function t(e, t) {
		return {
			uri: e,
			version: t
		};
	}
	e.create = t;
	function n(e) {
		let t = e;
		return Z.defined(t) && Z.string(t.uri) && (t.version === null || Z.integer(t.version));
	}
	e.is = n;
})(dy ||= {});
var fy;
(function(e) {
	function t(e, t, n, r) {
		return {
			uri: e,
			languageId: t,
			version: n,
			text: r
		};
	}
	e.create = t;
	function n(e) {
		let t = e;
		return Z.defined(t) && Z.string(t.uri) && Z.string(t.languageId) && Z.integer(t.version) && Z.string(t.text);
	}
	e.is = n;
})(fy ||= {});
var py;
(function(e) {
	e.PlainText = "plaintext", e.Markdown = "markdown";
	function t(t) {
		let n = t;
		return n === e.PlainText || n === e.Markdown;
	}
	e.is = t;
})(py ||= {});
var my;
(function(e) {
	function t(e) {
		let t = e;
		return Z.objectLiteral(e) && py.is(t.kind) && Z.string(t.value);
	}
	e.is = t;
})(my ||= {});
var hy;
(function(e) {
	e.Text = 1, e.Method = 2, e.Function = 3, e.Constructor = 4, e.Field = 5, e.Variable = 6, e.Class = 7, e.Interface = 8, e.Module = 9, e.Property = 10, e.Unit = 11, e.Value = 12, e.Enum = 13, e.Keyword = 14, e.Snippet = 15, e.Color = 16, e.File = 17, e.Reference = 18, e.Folder = 19, e.EnumMember = 20, e.Constant = 21, e.Struct = 22, e.Event = 23, e.Operator = 24, e.TypeParameter = 25;
})(hy ||= {});
var gy;
(function(e) {
	e.PlainText = 1, e.Snippet = 2;
})(gy ||= {});
var _y;
(function(e) {
	e.Deprecated = 1;
})(_y ||= {});
var vy;
(function(e) {
	function t(e, t, n) {
		return {
			newText: e,
			insert: t,
			replace: n
		};
	}
	e.create = t;
	function n(e) {
		let t = e;
		return t && Z.string(t.newText) && Bv.is(t.insert) && Bv.is(t.replace);
	}
	e.is = n;
})(vy ||= {});
var yy;
(function(e) {
	e.asIs = 1, e.adjustIndentation = 2;
})(yy ||= {});
var by;
(function(e) {
	function t(e) {
		let t = e;
		return t && (Z.string(t.detail) || t.detail === void 0) && (Z.string(t.description) || t.description === void 0);
	}
	e.is = t;
})(by ||= {});
var xy;
(function(e) {
	function t(e) {
		return { label: e };
	}
	e.create = t;
})(xy ||= {});
var Sy;
(function(e) {
	function t(e, t) {
		return {
			items: e || [],
			isIncomplete: !!t
		};
	}
	e.create = t;
})(Sy ||= {});
var Cy;
(function(e) {
	function t(e) {
		return e.replace(/[\\`*_{}[\]()#+\-.!]/g, "\\$&");
	}
	e.fromPlainText = t;
	function n(e) {
		let t = e;
		return Z.string(t) || Z.objectLiteral(t) && Z.string(t.language) && Z.string(t.value);
	}
	e.is = n;
})(Cy ||= {});
var wy;
(function(e) {
	function t(e) {
		let t = e;
		return !!t && Z.objectLiteral(t) && (my.is(t.contents) || Cy.is(t.contents) || Z.typedArray(t.contents, Cy.is)) && (e.range === void 0 || Bv.is(e.range));
	}
	e.is = t;
})(wy ||= {});
var Ty;
(function(e) {
	function t(e, t) {
		return t ? {
			label: e,
			documentation: t
		} : { label: e };
	}
	e.create = t;
})(Ty ||= {});
var Ey;
(function(e) {
	function t(e, t, ...n) {
		let r = { label: e };
		return Z.defined(t) && (r.documentation = t), r.parameters = Z.defined(n) ? n : [], r;
	}
	e.create = t;
})(Ey ||= {});
var Dy;
(function(e) {
	e.Text = 1, e.Read = 2, e.Write = 3;
})(Dy ||= {});
var Oy;
(function(e) {
	function t(e, t) {
		let n = { range: e };
		return Z.number(t) && (n.kind = t), n;
	}
	e.create = t;
})(Oy ||= {});
var ky;
(function(e) {
	e.File = 1, e.Module = 2, e.Namespace = 3, e.Package = 4, e.Class = 5, e.Method = 6, e.Property = 7, e.Field = 8, e.Constructor = 9, e.Enum = 10, e.Interface = 11, e.Function = 12, e.Variable = 13, e.Constant = 14, e.String = 15, e.Number = 16, e.Boolean = 17, e.Array = 18, e.Object = 19, e.Key = 20, e.Null = 21, e.EnumMember = 22, e.Struct = 23, e.Event = 24, e.Operator = 25, e.TypeParameter = 26;
})(ky ||= {});
var Ay;
(function(e) {
	e.Deprecated = 1;
})(Ay ||= {});
var jy;
(function(e) {
	function t(e, t, n, r, i) {
		let a = {
			name: e,
			kind: t,
			location: {
				uri: r,
				range: n
			}
		};
		return i && (a.containerName = i), a;
	}
	e.create = t;
})(jy ||= {});
var My;
(function(e) {
	function t(e, t, n, r) {
		return r === void 0 ? {
			name: e,
			kind: t,
			location: { uri: n }
		} : {
			name: e,
			kind: t,
			location: {
				uri: n,
				range: r
			}
		};
	}
	e.create = t;
})(My ||= {});
var Ny;
(function(e) {
	function t(e, t, n, r, i, a) {
		let o = {
			name: e,
			detail: t,
			kind: n,
			range: r,
			selectionRange: i
		};
		return a !== void 0 && (o.children = a), o;
	}
	e.create = t;
	function n(e) {
		let t = e;
		return t && Z.string(t.name) && Z.number(t.kind) && Bv.is(t.range) && Bv.is(t.selectionRange) && (t.detail === void 0 || Z.string(t.detail)) && (t.deprecated === void 0 || Z.boolean(t.deprecated)) && (t.children === void 0 || Array.isArray(t.children)) && (t.tags === void 0 || Array.isArray(t.tags));
	}
	e.is = n;
})(Ny ||= {});
var Py;
(function(e) {
	e.Empty = "", e.QuickFix = "quickfix", e.Refactor = "refactor", e.RefactorExtract = "refactor.extract", e.RefactorInline = "refactor.inline", e.RefactorRewrite = "refactor.rewrite", e.Source = "source", e.SourceOrganizeImports = "source.organizeImports", e.SourceFixAll = "source.fixAll";
})(Py ||= {});
var Fy;
(function(e) {
	e.Invoked = 1, e.Automatic = 2;
})(Fy ||= {});
var Iy;
(function(e) {
	function t(e, t, n) {
		let r = { diagnostics: e };
		return t != null && (r.only = t), n != null && (r.triggerKind = n), r;
	}
	e.create = t;
	function n(e) {
		let t = e;
		return Z.defined(t) && Z.typedArray(t.diagnostics, Qv.is) && (t.only === void 0 || Z.typedArray(t.only, Z.string)) && (t.triggerKind === void 0 || t.triggerKind === Fy.Invoked || t.triggerKind === Fy.Automatic);
	}
	e.is = n;
})(Iy ||= {});
var Ly;
(function(e) {
	function t(e, t, n) {
		let r = { title: e }, i = !0;
		return typeof t == "string" ? (i = !1, r.kind = t) : $v.is(t) ? r.command = t : r.edit = t, i && n !== void 0 && (r.kind = n), r;
	}
	e.create = t;
	function n(e) {
		let t = e;
		return t && Z.string(t.title) && (t.diagnostics === void 0 || Z.typedArray(t.diagnostics, Qv.is)) && (t.kind === void 0 || Z.string(t.kind)) && (t.edit !== void 0 || t.command !== void 0) && (t.command === void 0 || $v.is(t.command)) && (t.isPreferred === void 0 || Z.boolean(t.isPreferred)) && (t.edit === void 0 || cy.is(t.edit));
	}
	e.is = n;
})(Ly ||= {});
var Ry;
(function(e) {
	function t(e, t) {
		let n = { range: e };
		return Z.defined(t) && (n.data = t), n;
	}
	e.create = t;
	function n(e) {
		let t = e;
		return Z.defined(t) && Bv.is(t.range) && (Z.undefined(t.command) || $v.is(t.command));
	}
	e.is = n;
})(Ry ||= {});
var zy;
(function(e) {
	function t(e, t) {
		return {
			tabSize: e,
			insertSpaces: t
		};
	}
	e.create = t;
	function n(e) {
		let t = e;
		return Z.defined(t) && Z.uinteger(t.tabSize) && Z.boolean(t.insertSpaces);
	}
	e.is = n;
})(zy ||= {});
var By;
(function(e) {
	function t(e, t, n) {
		return {
			range: e,
			target: t,
			data: n
		};
	}
	e.create = t;
	function n(e) {
		let t = e;
		return Z.defined(t) && Bv.is(t.range) && (Z.undefined(t.target) || Z.string(t.target));
	}
	e.is = n;
})(By ||= {});
var Vy;
(function(e) {
	function t(e, t) {
		return {
			range: e,
			parent: t
		};
	}
	e.create = t;
	function n(t) {
		let n = t;
		return Z.objectLiteral(n) && Bv.is(n.range) && (n.parent === void 0 || e.is(n.parent));
	}
	e.is = n;
})(Vy ||= {});
var Hy;
(function(e) {
	e.namespace = "namespace", e.type = "type", e.class = "class", e.enum = "enum", e.interface = "interface", e.struct = "struct", e.typeParameter = "typeParameter", e.parameter = "parameter", e.variable = "variable", e.property = "property", e.enumMember = "enumMember", e.event = "event", e.function = "function", e.method = "method", e.macro = "macro", e.keyword = "keyword", e.modifier = "modifier", e.comment = "comment", e.string = "string", e.number = "number", e.regexp = "regexp", e.operator = "operator", e.decorator = "decorator";
})(Hy ||= {});
var Uy;
(function(e) {
	e.declaration = "declaration", e.definition = "definition", e.readonly = "readonly", e.static = "static", e.deprecated = "deprecated", e.abstract = "abstract", e.async = "async", e.modification = "modification", e.documentation = "documentation", e.defaultLibrary = "defaultLibrary";
})(Uy ||= {});
var Wy;
(function(e) {
	function t(e) {
		let t = e;
		return Z.objectLiteral(t) && (t.resultId === void 0 || typeof t.resultId == "string") && Array.isArray(t.data) && (t.data.length === 0 || typeof t.data[0] == "number");
	}
	e.is = t;
})(Wy ||= {});
var Gy;
(function(e) {
	function t(e, t) {
		return {
			range: e,
			text: t
		};
	}
	e.create = t;
	function n(e) {
		let t = e;
		return t != null && Bv.is(t.range) && Z.string(t.text);
	}
	e.is = n;
})(Gy ||= {});
var Ky;
(function(e) {
	function t(e, t, n) {
		return {
			range: e,
			variableName: t,
			caseSensitiveLookup: n
		};
	}
	e.create = t;
	function n(e) {
		let t = e;
		return t != null && Bv.is(t.range) && Z.boolean(t.caseSensitiveLookup) && (Z.string(t.variableName) || t.variableName === void 0);
	}
	e.is = n;
})(Ky ||= {});
var qy;
(function(e) {
	function t(e, t) {
		return {
			range: e,
			expression: t
		};
	}
	e.create = t;
	function n(e) {
		let t = e;
		return t != null && Bv.is(t.range) && (Z.string(t.expression) || t.expression === void 0);
	}
	e.is = n;
})(qy ||= {});
var Jy;
(function(e) {
	function t(e, t) {
		return {
			frameId: e,
			stoppedLocation: t
		};
	}
	e.create = t;
	function n(e) {
		let t = e;
		return Z.defined(t) && Bv.is(e.stoppedLocation);
	}
	e.is = n;
})(Jy ||= {});
var Yy;
(function(e) {
	e.Type = 1, e.Parameter = 2;
	function t(e) {
		return e === 1 || e === 2;
	}
	e.is = t;
})(Yy ||= {});
var Xy;
(function(e) {
	function t(e) {
		return { value: e };
	}
	e.create = t;
	function n(e) {
		let t = e;
		return Z.objectLiteral(t) && (t.tooltip === void 0 || Z.string(t.tooltip) || my.is(t.tooltip)) && (t.location === void 0 || Vv.is(t.location)) && (t.command === void 0 || $v.is(t.command));
	}
	e.is = n;
})(Xy ||= {});
var Zy;
(function(e) {
	function t(e, t, n) {
		let r = {
			position: e,
			label: t
		};
		return n !== void 0 && (r.kind = n), r;
	}
	e.create = t;
	function n(e) {
		let t = e;
		return Z.objectLiteral(t) && zv.is(t.position) && (Z.string(t.label) || Z.typedArray(t.label, Xy.is)) && (t.kind === void 0 || Yy.is(t.kind)) && t.textEdits === void 0 || Z.typedArray(t.textEdits, ey.is) && (t.tooltip === void 0 || Z.string(t.tooltip) || my.is(t.tooltip)) && (t.paddingLeft === void 0 || Z.boolean(t.paddingLeft)) && (t.paddingRight === void 0 || Z.boolean(t.paddingRight));
	}
	e.is = n;
})(Zy ||= {});
var Qy;
(function(e) {
	function t(e) {
		return {
			kind: "snippet",
			value: e
		};
	}
	e.createSnippet = t;
})(Qy ||= {});
var $y;
(function(e) {
	function t(e, t, n, r) {
		return {
			insertText: e,
			filterText: t,
			range: n,
			command: r
		};
	}
	e.create = t;
})($y ||= {});
var eb;
(function(e) {
	function t(e) {
		return { items: e };
	}
	e.create = t;
})(eb ||= {});
var tb;
(function(e) {
	e.Invoked = 0, e.Automatic = 1;
})(tb ||= {});
var nb;
(function(e) {
	function t(e, t) {
		return {
			range: e,
			text: t
		};
	}
	e.create = t;
})(nb ||= {});
var rb;
(function(e) {
	function t(e, t) {
		return {
			triggerKind: e,
			selectedCompletionInfo: t
		};
	}
	e.create = t;
})(rb ||= {});
var ib;
(function(e) {
	function t(e) {
		let t = e;
		return Z.objectLiteral(t) && Iv.is(t.uri) && Z.string(t.name);
	}
	e.is = t;
})(ib ||= {});
var ab;
(function(e) {
	function t(e, t, n, r) {
		return new ob(e, t, n, r);
	}
	e.create = t;
	function n(e) {
		let t = e;
		return !!(Z.defined(t) && Z.string(t.uri) && (Z.undefined(t.languageId) || Z.string(t.languageId)) && Z.uinteger(t.lineCount) && Z.func(t.getText) && Z.func(t.positionAt) && Z.func(t.offsetAt));
	}
	e.is = n;
	function r(e, t) {
		let n = e.getText(), r = i(t, (e, t) => {
			let n = e.range.start.line - t.range.start.line;
			return n === 0 ? e.range.start.character - t.range.start.character : n;
		}), a = n.length;
		for (let t = r.length - 1; t >= 0; t--) {
			let i = r[t], o = e.offsetAt(i.range.start), s = e.offsetAt(i.range.end);
			if (s <= a) n = n.substring(0, o) + i.newText + n.substring(s, n.length);
			else throw Error("Overlapping edit");
			a = o;
		}
		return n;
	}
	e.applyEdits = r;
	function i(e, t) {
		if (e.length <= 1) return e;
		let n = e.length / 2 | 0, r = e.slice(0, n), a = e.slice(n);
		i(r, t), i(a, t);
		let o = 0, s = 0, c = 0;
		for (; o < r.length && s < a.length;) t(r[o], a[s]) <= 0 ? e[c++] = r[o++] : e[c++] = a[s++];
		for (; o < r.length;) e[c++] = r[o++];
		for (; s < a.length;) e[c++] = a[s++];
		return e;
	}
})(ab ||= {});
var ob = class {
	constructor(e, t, n, r) {
		this._uri = e, this._languageId = t, this._version = n, this._content = r, this._lineOffsets = void 0;
	}
	get uri() {
		return this._uri;
	}
	get languageId() {
		return this._languageId;
	}
	get version() {
		return this._version;
	}
	getText(e) {
		if (e) {
			let t = this.offsetAt(e.start), n = this.offsetAt(e.end);
			return this._content.substring(t, n);
		}
		return this._content;
	}
	update(e, t) {
		this._content = e.text, this._version = t, this._lineOffsets = void 0;
	}
	getLineOffsets() {
		if (this._lineOffsets === void 0) {
			let e = [], t = this._content, n = !0;
			for (let r = 0; r < t.length; r++) {
				n &&= (e.push(r), !1);
				let i = t.charAt(r);
				n = i === "\r" || i === "\n", i === "\r" && r + 1 < t.length && t.charAt(r + 1) === "\n" && r++;
			}
			n && t.length > 0 && e.push(t.length), this._lineOffsets = e;
		}
		return this._lineOffsets;
	}
	positionAt(e) {
		e = Math.max(Math.min(e, this._content.length), 0);
		let t = this.getLineOffsets(), n = 0, r = t.length;
		if (r === 0) return zv.create(0, e);
		for (; n < r;) {
			let i = Math.floor((n + r) / 2);
			t[i] > e ? r = i : n = i + 1;
		}
		let i = n - 1;
		return zv.create(i, e - t[i]);
	}
	offsetAt(e) {
		let t = this.getLineOffsets();
		if (e.line >= t.length) return this._content.length;
		if (e.line < 0) return 0;
		let n = t[e.line], r = e.line + 1 < t.length ? t[e.line + 1] : this._content.length;
		return Math.max(Math.min(n + e.character, r), n);
	}
	get lineCount() {
		return this.getLineOffsets().length;
	}
}, Z;
(function(e) {
	let t = Object.prototype.toString;
	function n(e) {
		return e !== void 0;
	}
	e.defined = n;
	function r(e) {
		return e === void 0;
	}
	e.undefined = r;
	function i(e) {
		return e === !0 || e === !1;
	}
	e.boolean = i;
	function a(e) {
		return t.call(e) === "[object String]";
	}
	e.string = a;
	function o(e) {
		return t.call(e) === "[object Number]";
	}
	e.number = o;
	function s(e, n, r) {
		return t.call(e) === "[object Number]" && n <= e && e <= r;
	}
	e.numberRange = s;
	function c(e) {
		return t.call(e) === "[object Number]" && -2147483648 <= e && e <= 2147483647;
	}
	e.integer = c;
	function l(e) {
		return t.call(e) === "[object Number]" && 0 <= e && e <= 2147483647;
	}
	e.uinteger = l;
	function u(e) {
		return t.call(e) === "[object Function]";
	}
	e.func = u;
	function d(e) {
		return typeof e == "object" && !!e;
	}
	e.objectLiteral = d;
	function f(e, t) {
		return Array.isArray(e) && e.every(t);
	}
	e.typedArray = f;
})(Z ||= {});
// ../../../node_modules/.pnpm/graphql-language-service@5.7.0_graphql@17.1.0/node_modules/graphql-language-service/esm/parser/CharacterStream.js
var sb = class {
	constructor(e) {
		this._start = 0, this._pos = 0, this.getStartOfToken = () => this._start, this.getCurrentPosition = () => this._pos, this.eol = () => this._sourceText.length === this._pos, this.sol = () => this._pos === 0, this.peek = () => this._sourceText.charAt(this._pos) || null, this.next = () => {
			let e = this._sourceText.charAt(this._pos);
			return this._pos++, e;
		}, this.eat = (e) => {
			if (this._testNextCharacter(e)) return this._start = this._pos, this._pos++, this._sourceText.charAt(this._pos - 1);
		}, this.eatWhile = (e) => {
			let t = this._testNextCharacter(e), n = !1;
			for (t && (n = t, this._start = this._pos); t;) this._pos++, t = this._testNextCharacter(e), n = !0;
			return n;
		}, this.eatSpace = () => this.eatWhile(/[\s\u00a0]/), this.skipToEnd = () => {
			this._pos = this._sourceText.length;
		}, this.skipTo = (e) => {
			this._pos = e;
		}, this.match = (e, t = !0, n = !1) => {
			let r = null, i = null;
			return typeof e == "string" ? (i = new RegExp(e, n ? "i" : "g").test(this._sourceText.slice(this._pos, this._pos + e.length)), r = e) : e instanceof RegExp && (i = this._sourceText.slice(this._pos).match(e), r = i?.[0]), i != null && (typeof e == "string" || i instanceof Array && this._sourceText.startsWith(i[0], this._pos)) ? (t && (this._start = this._pos, r && r.length && (this._pos += r.length)), i) : !1;
		}, this.backUp = (e) => {
			this._pos -= e;
		}, this.column = () => this._pos, this.indentation = () => {
			let e = this._sourceText.match(/\s*/), t = 0;
			if (e && e.length !== 0) {
				let n = e[0], r = 0;
				for (; n.length > r;) n.charCodeAt(r) === 9 ? t += 2 : t++, r++;
			}
			return t;
		}, this.current = () => this._sourceText.slice(this._start, this._pos), this._sourceText = e;
	}
	_testNextCharacter(e) {
		let t = this._sourceText.charAt(this._pos), n = !1;
		return n = typeof e == "string" ? t === e : e instanceof RegExp ? e.test(t) : e(t), n;
	}
};
// ../../../node_modules/.pnpm/graphql-language-service@5.7.0_graphql@17.1.0/node_modules/graphql-language-service/esm/parser/RuleHelpers.js
function cb(e) {
	return { ofRule: e };
}
function lb(e, t) {
	return {
		ofRule: e,
		isList: !0,
		separator: t
	};
}
function ub(e, t) {
	let n = e.match;
	return e.match = (e) => {
		let r = !1;
		return n && (r = n(e)), r && t.every((t) => t.match && !t.match(e));
	}, e;
}
function db(e, t) {
	return {
		style: t,
		match: (t) => t.kind === e
	};
}
function Q(e, t) {
	return {
		style: t || "punctuation",
		match: (t) => t.kind === "Punctuation" && t.value === e
	};
}
// ../../../node_modules/.pnpm/graphql-language-service@5.7.0_graphql@17.1.0/node_modules/graphql-language-service/esm/parser/Rules.js
var fb = (e) => e === " " || e === "	" || e === "," || e === "\n" || e === "\r" || e === "" || e === "\xA0", pb = {
	Name: /^[_A-Za-z][_0-9A-Za-z]*/,
	Punctuation: /^(?:!|\$|\(|\)|\.\.\.|:|=|&|@|\[|]|\{|\||\})/,
	Number: /^-?(?:0|(?:[1-9][0-9]*))(?:\.[0-9]*)?(?:[eE][+-]?[0-9]+)?/,
	String: /^(?:"""(?:\\"""|[^"]|"[^"]|""[^"])*(?:""")?|"(?:[^"\\]|\\(?:"|\/|\\|b|f|n|r|t|u[0-9a-fA-F]{4}))*"?)/,
	Comment: /^#.*/
}, mb = {
	Document: [lb("Definition")],
	Definition(e) {
		switch (e.value) {
			case "{": return "ShortQuery";
			case "query": return "Query";
			case "mutation": return "Mutation";
			case "subscription": return "Subscription";
			case "fragment": return Iu;
			case "schema": return "SchemaDef";
			case "scalar": return "ScalarDef";
			case "type": return "ObjectTypeDef";
			case "interface": return "InterfaceDef";
			case "union": return "UnionDef";
			case "enum": return "EnumDef";
			case "input": return "InputDef";
			case "extend": return "ExtendDef";
			case "directive": return "DirectiveDef";
		}
	},
	ShortQuery: ["SelectionSet"],
	Query: [
		gb("query"),
		cb(_b("def")),
		cb("VariableDefinitions"),
		lb("Directive"),
		"SelectionSet"
	],
	Mutation: [
		gb("mutation"),
		cb(_b("def")),
		cb("VariableDefinitions"),
		lb("Directive"),
		"SelectionSet"
	],
	Subscription: [
		gb("subscription"),
		cb(_b("def")),
		cb("VariableDefinitions"),
		lb("Directive"),
		"SelectionSet"
	],
	VariableDefinitions: [
		Q("("),
		lb("VariableDefinition"),
		Q(")")
	],
	VariableDefinition: [
		"Variable",
		Q(":"),
		"Type",
		cb("DefaultValue")
	],
	Variable: [Q("$", "variable"), _b("variable")],
	DefaultValue: [Q("="), "Value"],
	SelectionSet: [
		Q("{"),
		lb("Selection"),
		Q("}")
	],
	Selection(e, t) {
		return e.value === "..." ? t.match(/[\s\u00a0,]*(on\b|@|{)/, !1) ? "InlineFragment" : "FragmentSpread" : t.match(/[\s\u00a0,]*:/, !1) ? "AliasedField" : "Field";
	},
	AliasedField: [
		_b("property"),
		Q(":"),
		_b("qualifier"),
		cb("Arguments"),
		lb("Directive"),
		cb("SelectionSet")
	],
	Field: [
		_b("property"),
		cb("Arguments"),
		lb("Directive"),
		cb("SelectionSet")
	],
	Arguments: [
		Q("("),
		lb("Argument"),
		Q(")")
	],
	Argument: [
		_b("attribute"),
		Q(":"),
		"Value"
	],
	FragmentSpread: [
		Q("..."),
		_b("def"),
		lb("Directive")
	],
	InlineFragment: [
		Q("..."),
		cb("TypeCondition"),
		lb("Directive"),
		"SelectionSet"
	],
	FragmentDefinition: [
		gb("fragment"),
		cb(ub(_b("def"), [gb("on")])),
		"TypeCondition",
		lb("Directive"),
		"SelectionSet"
	],
	TypeCondition: [gb("on"), "NamedType"],
	Value(e) {
		switch (e.kind) {
			case "Number": return "NumberValue";
			case "String": return "StringValue";
			case "Punctuation":
				switch (e.value) {
					case "[": return "ListValue";
					case "{": return "ObjectValue";
					case "$": return "Variable";
					case "&": return "NamedType";
				}
				return null;
			case "Name":
				switch (e.value) {
					case "true":
					case "false": return "BooleanValue";
				}
				return e.value === "null" ? "NullValue" : "EnumValue";
		}
	},
	NumberValue: [db("Number", "number")],
	StringValue: [{
		style: "string",
		match: (e) => e.kind === "String",
		update(e, t) {
			t.value.startsWith("\"\"\"") && (e.inBlockstring = !t.value.slice(3).endsWith("\"\"\""));
		}
	}],
	BooleanValue: [db("Name", "builtin")],
	NullValue: [db("Name", "keyword")],
	EnumValue: [_b("string-2")],
	ListValue: [
		Q("["),
		lb("Value"),
		Q("]")
	],
	ObjectValue: [
		Q("{"),
		lb("ObjectField"),
		Q("}")
	],
	ObjectField: [
		_b("attribute"),
		Q(":"),
		"Value"
	],
	Type(e) {
		return e.value === "[" ? "ListType" : "NonNullType";
	},
	ListType: [
		Q("["),
		"Type",
		Q("]"),
		cb(Q("!"))
	],
	NonNullType: ["NamedType", cb(Q("!"))],
	NamedType: [vb("atom")],
	Directive: [
		Q("@", "meta"),
		_b("meta"),
		cb("Arguments")
	],
	DirectiveDef: [
		gb("directive"),
		Q("@", "meta"),
		_b("meta"),
		cb("ArgumentsDef"),
		gb("on"),
		lb("DirectiveLocation", Q("|"))
	],
	InterfaceDef: [
		gb("interface"),
		_b("atom"),
		cb("Implements"),
		lb("Directive"),
		cb("FieldsDef")
	],
	Implements: [gb("implements"), lb("NamedType", Q("&"))],
	DirectiveLocation: [_b("string-2")],
	SchemaDef: [
		gb("schema"),
		lb("Directive"),
		Q("{"),
		lb("OperationTypeDef"),
		Q("}")
	],
	OperationTypeDef: [
		_b("keyword"),
		Q(":"),
		_b("atom")
	],
	ScalarDef: [
		gb("scalar"),
		_b("atom"),
		lb("Directive")
	],
	ObjectTypeDef: [
		gb("type"),
		_b("atom"),
		cb("Implements"),
		lb("Directive"),
		cb("FieldsDef")
	],
	FieldsDef: [
		Q("{"),
		lb("FieldDef"),
		Q("}")
	],
	FieldDef: [
		_b("property"),
		cb("ArgumentsDef"),
		Q(":"),
		"Type",
		lb("Directive")
	],
	ArgumentsDef: [
		Q("("),
		lb("InputValueDef"),
		Q(")")
	],
	InputValueDef: [
		_b("attribute"),
		Q(":"),
		"Type",
		cb("DefaultValue"),
		lb("Directive")
	],
	UnionDef: [
		gb("union"),
		_b("atom"),
		lb("Directive"),
		Q("="),
		lb("UnionMember", Q("|"))
	],
	UnionMember: ["NamedType"],
	EnumDef: [
		gb("enum"),
		_b("atom"),
		lb("Directive"),
		cb("EnumValuesDef")
	],
	EnumValuesDef: [
		Q("{"),
		lb("EnumValueDef"),
		Q("}")
	],
	EnumValueDef: [_b("string-2"), lb("Directive")],
	InputDef: [
		gb("input"),
		_b("atom"),
		lb("Directive"),
		cb("InputFieldsDef")
	],
	InputFieldsDef: [
		Q("{"),
		lb("InputValueDef"),
		Q("}")
	],
	ExtendDef: [gb("extend"), "ExtensionDefinition"],
	ExtensionDefinition(e) {
		switch (e.value) {
			case "schema": return ld;
			case "scalar": return dd;
			case "type": return fd;
			case "interface": return pd;
			case "union": return md;
			case "enum": return hd;
			case "input": return gd;
		}
	},
	[ld]: ["SchemaDef"],
	[dd]: ["ScalarDef"],
	[fd]: ["ObjectTypeDef"],
	[pd]: ["InterfaceDef"],
	[md]: ["UnionDef"],
	[hd]: ["EnumDef"],
	[gd]: ["InputDef"]
}, hb = Object.assign(Object.assign({}, mb), {
	FragmentArguments: [
		Q("("),
		lb("FragmentArgument"),
		Q(")")
	],
	FragmentArgument: [
		_b("attribute"),
		Q(":"),
		"Value"
	],
	FragmentSpread: [
		Q("..."),
		_b("def"),
		cb("FragmentArguments"),
		lb("Directive")
	],
	FragmentDefinition: [
		gb("fragment"),
		cb(ub(_b("def"), [gb("on")])),
		cb("VariableDefinitions"),
		"TypeCondition",
		lb("Directive"),
		"SelectionSet"
	]
});
function gb(e) {
	return {
		style: "keyword",
		match: (t) => t.kind === "Name" && t.value === e
	};
}
function _b(e) {
	return {
		style: e,
		match: (e) => e.kind === "Name",
		update(e, t) {
			e.name = t.value;
		}
	};
}
function vb(e) {
	return {
		style: e,
		match: (e) => e.kind === "Name",
		update(e, t) {
			e.prevState?.prevState && (e.name = t.value, e.prevState.prevState.type = t.value);
		}
	};
}
// ../../../node_modules/.pnpm/graphql-language-service@5.7.0_graphql@17.1.0/node_modules/graphql-language-service/esm/parser/onlineParser.js
function yb(e = {}) {
	let t = Object.assign({
		eatWhitespace: (e) => e.eatWhile(fb),
		lexRules: pb,
		parseRules: e.experimentalFragmentArguments ? hb : mb,
		editorConfig: {}
	}, e);
	return {
		startState() {
			let e = {
				level: 0,
				step: 0,
				name: null,
				kind: null,
				type: null,
				rule: null,
				needsSeparator: !1,
				prevState: null
			};
			return Cb(t.parseRules, e, Du), e;
		},
		token(e, n) {
			return bb(e, n, t);
		}
	};
}
function bb(e, t, n) {
	if (t.inBlockstring) return e.match(/.*"""/) ? (t.inBlockstring = !1, "string") : (e.skipToEnd(), "string");
	let { lexRules: r, parseRules: i, eatWhitespace: a, editorConfig: o } = n;
	if (t.rule && t.rule.length === 0 ? wb(t) : t.needsAdvance && (t.needsAdvance = !1, Tb(t, !0)), e.sol()) {
		let n = o?.tabSize || 2;
		t.indentLevel = Math.floor(e.indentation() / n);
	}
	if (a(e)) return "ws";
	let s = Ob(r, e);
	if (!s) return e.match(/\S+/) || e.match(/\s/), Cb(Sb, t, "Invalid"), "invalidchar";
	if (s.kind === "Comment") return Cb(Sb, t, "Comment"), "comment";
	let c = xb({}, t);
	if (s.kind === "Punctuation") {
		if (/^[{([]/.test(s.value)) t.indentLevel !== void 0 && (t.levels = (t.levels || []).concat(t.indentLevel + 1));
		else if (/^[})\]]/.test(s.value)) {
			let e = t.levels = (t.levels || []).slice(0, -1);
			t.indentLevel && e.length > 0 && e.at(-1) < t.indentLevel && (t.indentLevel = e.at(-1));
		}
	}
	for (; t.rule;) {
		let n = typeof t.rule == "function" ? t.step === 0 ? t.rule(s, e) : null : t.rule[t.step];
		if (t.needsSeparator && (n = n?.separator), n) {
			if (n.ofRule && (n = n.ofRule), typeof n == "string") {
				Cb(i, t, n);
				continue;
			}
			if (n.match?.call(n, s)) return n.update && n.update(t, s), s.kind === "Punctuation" ? Tb(t, !0) : t.needsAdvance = !0, n.style;
		}
		Db(t);
	}
	return xb(t, c), Cb(Sb, t, "Invalid"), "invalidchar";
}
function xb(e, t) {
	let n = Object.keys(t);
	for (let r = 0; r < n.length; r++) e[n[r]] = t[n[r]];
	return e;
}
var Sb = {
	Invalid: [],
	Comment: []
};
function Cb(e, t, n) {
	if (!e[n]) throw TypeError("Unknown rule: " + n);
	t.prevState = Object.assign({}, t), t.kind = n, t.name = null, t.type = null, t.rule = e[n], t.step = 0, t.needsSeparator = !1;
}
function wb(e) {
	e.prevState &&= (e.kind = e.prevState.kind, e.name = e.prevState.name, e.type = e.prevState.type, e.rule = e.prevState.rule, e.step = e.prevState.step, e.needsSeparator = e.prevState.needsSeparator, e.prevState.prevState);
}
function Tb(e, t) {
	if (Eb(e) && e.rule) {
		let n = e.rule[e.step];
		if (n.separator) {
			let { separator: t } = n;
			if (e.needsSeparator = !e.needsSeparator, !e.needsSeparator && t.ofRule) return;
		}
		if (t) return;
	}
	for (e.needsSeparator = !1, e.step++; e.rule && !(Array.isArray(e.rule) && e.step < e.rule.length);) wb(e), e.rule && (Eb(e) ? e.rule?.[e.step].separator && (e.needsSeparator = !e.needsSeparator) : (e.needsSeparator = !1, e.step++));
}
function Eb(e) {
	let t = Array.isArray(e.rule) && typeof e.rule[e.step] != "string" && e.rule[e.step];
	return t && t.isList;
}
function Db(e) {
	for (; e.rule && !(Array.isArray(e.rule) && e.rule[e.step].ofRule);) wb(e);
	e.rule && Tb(e, !1);
}
function Ob(e, t) {
	let n = Object.keys(e);
	for (let r = 0; r < n.length; r++) {
		let i = t.match(e[n[r]]);
		if (i && i instanceof Array) return {
			kind: n[r],
			value: i[0]
		};
	}
}
// ../../../node_modules/.pnpm/graphql-language-service@5.7.0_graphql@17.1.0/node_modules/graphql-language-service/esm/parser/api.js
function kb(e, t, n) {
	let r = e.split("\n"), i = yb(n), a = i.startState(), o = "", s = new sb("");
	for (let e = 0; e < r.length; e++) {
		for (s = new sb(r[e]); !s.eol() && (o = i.token(s, a), t(s, a, o, e) !== "BREAK"););
		t(s, a, o, e), a.kind || (a = i.startState());
	}
	return {
		start: s.getStartOfToken(),
		end: s.getCurrentPosition(),
		string: s.current(),
		state: a,
		style: o
	};
}
var Ab;
(function(e) {
	e.TYPE_SYSTEM = "TYPE_SYSTEM", e.EXECUTABLE = "EXECUTABLE", e.UNKNOWN = "UNKNOWN";
})(Ab ||= {});
var jb = [
	Zu,
	Qu,
	$u,
	ed,
	rd,
	id,
	ad,
	sd,
	cd,
	ld,
	dd,
	fd,
	pd,
	md,
	hd,
	gd
], Mb = (e, t) => {
	let n = Ab.UNKNOWN;
	if (e) try {
		Uh(Vb(e, t), { enter(e) {
			if (e.kind === "Document") n = Ab.EXECUTABLE;
			else return jb.includes(e.kind) ? (n = Ab.TYPE_SYSTEM, Hh) : !1;
		} });
	} catch {
		return n;
	}
	return n;
};
function Nb(e, t, n) {
	return t?.endsWith(".graphqls") ? Ab.TYPE_SYSTEM : Mb(e, n);
}
function Pb(e, t, n = 0, r) {
	let i = null, a = null, o = null, s = kb(e, (e, r, s, c) => {
		if (!(c !== t.line || e.getCurrentPosition() + n < t.character + 1)) return i = s, a = Object.assign({}, r), o = e.current(), "BREAK";
	}, r);
	return {
		start: s.start,
		end: s.end,
		string: o || s.string,
		state: a || s.state,
		style: i || s.style
	};
}
function Fb(e, t, n, r, i, a = 0) {
	let o = r || Pb(e, t, a, i);
	if (!o) return null;
	let s = o.state.kind === "Invalid" ? o.state.prevState : o.state;
	return s ? {
		token: o,
		state: s,
		typeInfo: Bb(n, o.state, i?.fragmentDefinitions),
		mode: i?.mode || Nb(e, i?.uri, i)
	} : null;
}
// ../../../node_modules/.pnpm/graphql-language-service@5.7.0_graphql@17.1.0/node_modules/graphql-language-service/esm/parser/getTypeInfo.js
function Ib(e, t, n) {
	return n === ym.name && e.getQueryType() === t ? ym : n === bm.name && e.getQueryType() === t ? bm : n === xm.name && Rf(t) ? xm : "getFields" in t ? t.getFields()[n] : null;
}
function Lb(e, t) {
	let n = [], r = e;
	for (; r?.kind;) n.push(r), r = r.prevState;
	for (let e = n.length - 1; e >= 0; e--) t(n[e]);
}
function Rb(e) {
	let t;
	return Lb(e, (e) => {
		switch (e.kind) {
			case "Query":
			case "ShortQuery":
			case "Mutation":
			case "Subscription":
			case "FragmentDefinition": t = e;
		}
	}), t;
}
function zb(e, t, n) {
	return n ? (t.find((e) => e.name.value === n)?.variableDefinitions)?.flatMap((t) => {
		let n = Kh(e, t.type);
		return n ? [{
			name: t.variable.name.value,
			type: n,
			description: void 0
		}] : [];
	}) ?? null : null;
}
function Bb(e, t, n = []) {
	let r, i, a, o, s, c, l, u, d, f, p, m;
	return Lb(t, (t) => {
		switch (t.kind) {
			case Hb.QUERY:
			case "ShortQuery":
				p = e.getQueryType();
				break;
			case Hb.MUTATION:
				p = e.getMutationType();
				break;
			case Hb.SUBSCRIPTION:
				p = e.getSubscriptionType();
				break;
			case Hb.INLINE_FRAGMENT:
			case Hb.FRAGMENT_DEFINITION:
				t.type && (p = e.getType(t.type));
				break;
			case Hb.FIELD:
			case Hb.ALIASED_FIELD:
				!p || !t.name ? s = null : (s = f ? Ib(e, f, t.name) : null, p = s ? s.type : null);
				break;
			case Hb.SELECTION_SET:
				f = Kf(p);
				break;
			case Hb.DIRECTIVE:
				a = t.name ? e.getDirective(t.name) : null;
				break;
			case Hb.INTERFACE_DEF:
				t.name && (u = null, m = new np({
					name: t.name,
					interfaces: [],
					fields: {}
				}));
				break;
			case Hb.OBJECT_TYPE_DEF:
				t.name && (m = null, u = new Xf({
					name: t.name,
					interfaces: [],
					fields: {}
				}));
				break;
			case Hb.ARGUMENTS:
			case Hb.FRAGMENT_ARGUMENTS:
				if (t.prevState) switch (t.prevState.kind) {
					case Hb.FIELD:
						i = s && s.args;
						break;
					case Hb.DIRECTIVE:
						i = a && a.args;
						break;
					case Hb.FRAGMENT_SPREAD:
						i = zb(e, n, t.prevState.name);
						break;
					case Hb.ALIASED_FIELD: {
						let n = t.prevState?.name;
						if (!n) {
							i = null;
							break;
						}
						let r = f ? Ib(e, f, n) : null;
						if (!r) {
							i = null;
							break;
						}
						i = r.args;
						break;
					}
					default: i = null;
				}
				else i = null;
				break;
			case Hb.ARGUMENT:
			case Hb.FRAGMENT_ARGUMENT:
				if (i) {
					for (let e = 0; e < i.length; e++) if (i[e].name === t.name) {
						r = i[e];
						break;
					}
				}
				c = r?.type;
				break;
			case Hb.VARIABLE_DEFINITION:
			case Hb.VARIABLE:
				p = c;
				break;
			case Hb.ENUM_VALUE:
				let h = Kf(c);
				o = h instanceof ap ? h.getValues().find((e) => e.value === t.name) : null;
				break;
			case Hb.LIST_VALUE:
				let ee = Wf(c);
				c = ee instanceof Bf ? ee.ofType : null;
				break;
			case Hb.OBJECT_VALUE:
				let te = Kf(c);
				l = te instanceof lp ? te : null, d = l?.getFields() ?? null;
				break;
			case Hb.OBJECT_FIELD:
				let ne = t.name && d ? d[t.name] : null;
				c = ne?.type, s = ne, p = s ? s.type : null;
				break;
			case Hb.NAMED_TYPE: t.name && (p = e.getType(t.name));
		}
	}), {
		argDef: r,
		argDefs: i,
		directiveDef: a,
		enumValue: o,
		fieldDef: s,
		inputObjectType: l,
		inputType: c,
		objectFieldDefs: d,
		parentType: f,
		type: p,
		interfaceDef: m,
		objectTypeDef: u
	};
}
// ../../../node_modules/.pnpm/graphql-language-service@5.7.0_graphql@17.1.0/node_modules/graphql-language-service/esm/parser/parseDocument.js
function Vb(e, t) {
	return Fh(e, t);
}
var Hb = Object.assign(Object.assign({}, Tu), {
	ALIASED_FIELD: "AliasedField",
	ARGUMENTS: "Arguments",
	FRAGMENT_ARGUMENTS: "FragmentArguments",
	FRAGMENT_ARGUMENT: "FragmentArgument",
	SHORT_QUERY: "ShortQuery",
	QUERY: "Query",
	MUTATION: "Mutation",
	SUBSCRIPTION: "Subscription",
	TYPE_CONDITION: "TypeCondition",
	INVALID: "Invalid",
	COMMENT: "Comment",
	SCHEMA_DEF: "SchemaDef",
	SCALAR_DEF: "ScalarDef",
	OBJECT_TYPE_DEF: "ObjectTypeDef",
	OBJECT_VALUE: "ObjectValue",
	LIST_VALUE: "ListValue",
	INTERFACE_DEF: "InterfaceDef",
	UNION_DEF: "UnionDef",
	ENUM_DEF: "EnumDef",
	ENUM_VALUE: "EnumValue",
	FIELD_DEF: "FieldDef",
	INPUT_DEF: "InputDef",
	INPUT_VALUE_DEF: "InputValueDef",
	ARGUMENTS_DEF: "ArgumentsDef",
	EXTEND_DEF: "ExtendDef",
	EXTENSION_DEFINITION: "ExtensionDefinition",
	DIRECTIVE_DEF: "DirectiveDef",
	IMPLEMENTS: "Implements",
	VARIABLE_DEFINITIONS: "VariableDefinitions",
	TYPE: "Type",
	VARIABLE: "Variable"
}), Ub;
(function(e) {
	e.Text = 1, e.Method = 2, e.Function = 3, e.Constructor = 4, e.Field = 5, e.Variable = 6, e.Class = 7, e.Interface = 8, e.Module = 9, e.Property = 10, e.Unit = 11, e.Value = 12, e.Enum = 13, e.Keyword = 14, e.Snippet = 15, e.Color = 16, e.File = 17, e.Reference = 18, e.Folder = 19, e.EnumMember = 20, e.Constant = 21, e.Struct = 22, e.Event = 23, e.Operator = 24, e.TypeParameter = 25;
})(Ub ||= {});
// ../../../node_modules/.pnpm/graphql-language-service@5.7.0_graphql@17.1.0/node_modules/graphql-language-service/esm/interface/getFragmentDefinitions.js
function Wb(e, t) {
	let n = e;
	for (; n?.kind;) {
		if (n.kind === t) return n;
		n = n.prevState;
	}
}
function Gb(e, t) {
	try {
		return Vb(e, t).definitions.filter((e) => e.kind === Iu);
	} catch {}
	let n = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new Map(), i, a = "";
	return kb(e, (e, t, o, s) => {
		let c = `${s}:${e.getCurrentPosition()}`;
		if (c === a) return;
		a = c;
		let l = e.current(), u = Rb(t), d = u?.kind === Hb.FRAGMENT_DEFINITION ? u : void 0, f = Wb(t, Hb.VARIABLE_DEFINITIONS);
		if (!i && d?.name && f && l.trim() === "(") i = {
			fragmentName: d.name,
			source: l,
			line: s
		};
		else if (i && (s !== i.line && (i.source += "\n", i.line = s), (f || d?.name === i.fragmentName && l.trim() === ")") && (i.source += l), !f && l.trim() === ")")) {
			try {
				let e = Vb(`query${i.source} { __typename }`).definitions[0];
				e.kind === "OperationDefinition" && r.set(i.fragmentName, e.variableDefinitions ?? []);
			} catch {}
			i = void 0;
		}
		d?.name && d.type && n.set(d.name, {
			kind: Hb.FRAGMENT_DEFINITION,
			name: {
				kind: Eu,
				value: d.name
			},
			variableDefinitions: r.get(d.name),
			selectionSet: {
				kind: Hb.SELECTION_SET,
				selections: []
			},
			typeCondition: {
				kind: Hb.NAMED_TYPE,
				name: {
					kind: Eu,
					value: d.type
				}
			}
		});
	}, t), [...n.values()];
}
Ub.Function, Ub.Function, Ub.Function, Ub.Function, Ub.Function, Ub.Function, Ub.Function, Ub.Function, Ub.Function, Ub.Function, Ub.Constructor, (/* @__PURE__ */ Kr(((e, t) => {
	function n(e, t) {
		if (e != null) return e;
		var n = Error(t === void 0 ? "Got unexpected " + e : t);
		throw n.framesToPop = 1, n;
	}
	t.exports = n, t.exports.default = n, Object.defineProperty(t.exports, "__esModule", { value: !0 });
})))();
// ../../../node_modules/.pnpm/graphql-language-service@5.7.0_graphql@17.1.0/node_modules/graphql-language-service/esm/interface/getDiagnostics.js
var Kb = {
	Error: "Error",
	Warning: "Warning",
	Information: "Information",
	Hint: "Hint"
};
Kb.Error, Kb.Warning, Kb.Information, Kb.Hint;
// ../../../node_modules/.pnpm/graphql-language-service@5.7.0_graphql@17.1.0/node_modules/graphql-language-service/esm/interface/getHoverInformation.js
function qb(e, t, n, r, i) {
	let a = Object.assign(Object.assign({}, i), { schema: e }), o = Fb(t, n, e, r, {
		fragmentDefinitions: Gb(t, i),
		experimentalFragmentArguments: i?.experimentalFragmentArguments
	});
	if (!o) return "";
	let { typeInfo: s, token: c } = o, { kind: l, step: u } = c.state;
	if (l === "Field" && u === 0 && s.fieldDef || l === "AliasedField" && u === 2 && s.fieldDef || l === "ObjectField" && u === 0 && s.fieldDef) {
		let e = [];
		return Jb(e, a), Xb(e, s, a), Yb(e, a), rx(e, a, s.fieldDef), e.join("").trim();
	}
	if (l === "Directive" && u === 1 && s.directiveDef) {
		let e = [];
		return Jb(e, a), Qb(e, s, a), Yb(e, a), rx(e, a, s.directiveDef), e.join("").trim();
	}
	if (l === "Variable" && s.type) {
		let e = [];
		return Jb(e, a), nx(e, s, a, s.type), Yb(e, a), rx(e, a, s.type), e.join("").trim();
	}
	if ((l === Hb.ARGUMENT || l === Hb.FRAGMENT_ARGUMENT) && u === 0 && s.argDef) {
		let e = [];
		return Jb(e, a), $b(e, s, a, l === Hb.ARGUMENT), Yb(e, a), rx(e, a, s.argDef), e.join("").trim();
	}
	if (l === "EnumValue" && s.enumValue && "description" in s.enumValue) {
		let e = [];
		return Jb(e, a), tx(e, s, a), Yb(e, a), rx(e, a, s.enumValue), e.join("").trim();
	}
	if (l === "NamedType" && s.type && "description" in s.type) {
		let e = [];
		return Jb(e, a), nx(e, s, a, s.type), Yb(e, a), rx(e, a, s.type), e.join("").trim();
	}
	return "";
}
function Jb(e, t) {
	t.useMarkdown && ax(e, "```graphql\n");
}
function Yb(e, t) {
	t.useMarkdown && ax(e, "\n```");
}
function Xb(e, t, n) {
	Zb(e, t, n), ex(e, t, n, t.type);
}
function Zb(e, t, n) {
	if (!t.fieldDef) return;
	let r = t.fieldDef.name;
	r.slice(0, 2) !== "__" && (nx(e, t, n, t.parentType), ax(e, ".")), ax(e, r);
}
function Qb(e, t, n) {
	t.directiveDef && ax(e, "@" + t.directiveDef.name);
}
function $b(e, t, n, r = !0) {
	if (r && t.directiveDef ? Qb(e, t, n) : r && t.fieldDef && Zb(e, t, n), !t.argDef) return;
	let { name: i } = t.argDef;
	ax(e, "("), ax(e, i), ex(e, t, n, t.inputType), ax(e, ")");
}
function ex(e, t, n, r) {
	ax(e, ": "), nx(e, t, n, r);
}
function tx(e, t, n) {
	if (!t.enumValue) return;
	let { name: r } = t.enumValue;
	nx(e, t, n, t.inputType), ax(e, "."), ax(e, r);
}
function nx(e, t, n, r) {
	r && (r instanceof J ? (nx(e, t, n, r.ofType), ax(e, "!")) : r instanceof Bf ? (ax(e, "["), nx(e, t, n, r.ofType), ax(e, "]")) : ax(e, r.name));
}
function rx(e, t, n) {
	if (!n) return;
	let r = typeof n.description == "string" ? n.description : null;
	r && (ax(e, "\n\n"), ax(e, r)), ix(e, t, n);
}
function ix(e, t, n) {
	if (!n) return;
	let r = n.deprecationReason;
	r && (ax(e, "\n\n"), ax(e, "Deprecated: "), ax(e, r));
}
function ax(e, t) {
	e.push(t);
}
// ../../../node_modules/.pnpm/monaco-editor@0.52.2/node_modules/monaco-editor/esm/vs/basic-languages/_.contribution.js
var ox = Object.defineProperty, sx = Object.getOwnPropertyDescriptor, cx = Object.getOwnPropertyNames, lx = Object.prototype.hasOwnProperty, ux = (e, t, n, r) => {
	if (t && typeof t == "object" || typeof t == "function") for (let i of cx(t)) !lx.call(e, i) && i !== n && ox(e, i, {
		get: () => t[i],
		enumerable: !(r = sx(t, i)) || r.enumerable
	});
	return e;
}, dx = (e, t, n) => (ux(e, t, "default"), n && ux(n, t, "default")), fx = {};
dx(fx, ds);
var px = {}, mx = {}, hx = class e {
	static getOrCreate(t) {
		return mx[t] || (mx[t] = new e(t)), mx[t];
	}
	constructor(e) {
		this._languageId = e, this._loadingTriggered = !1, this._lazyLoadPromise = new Promise((e, t) => {
			this._lazyLoadPromiseResolve = e, this._lazyLoadPromiseReject = t;
		});
	}
	load() {
		return this._loadingTriggered || (this._loadingTriggered = !0, px[this._languageId].loader().then((e) => this._lazyLoadPromiseResolve(e), (e) => this._lazyLoadPromiseReject(e))), this._lazyLoadPromise;
	}
};
function gx(e) {
	let t = e.id;
	px[t] = e, fx.languages.register(e);
	let n = hx.getOrCreate(t);
	fx.languages.registerTokensProviderFactory(t, { create: async () => (await n.load()).language }), fx.languages.onLanguageEncountered(t, async () => {
		let e = await n.load();
		fx.languages.setLanguageConfiguration(t, e.conf);
	});
}
// ../../../node_modules/.pnpm/monaco-editor@0.52.2/node_modules/monaco-editor/esm/vs/basic-languages/graphql/graphql.contribution.js
gx({
	id: "graphql",
	extensions: [".graphql", ".gql"],
	aliases: [
		"GraphQL",
		"graphql",
		"gql"
	],
	mimetypes: ["application/graphql"],
	loader: () => import("./graphql-Bp9Y832s.js")
});
// ../../../node_modules/.pnpm/monaco-editor@0.52.2/node_modules/monaco-editor/esm/vs/editor/browser/widget/diffEditor/commands.js
var _x = class extends Mo {
	constructor() {
		super({
			id: "diffEditor.toggleCollapseUnchangedRegions",
			title: H("toggleCollapseUnchangedRegions", "Toggle Collapse Unchanged Regions"),
			icon: v.map,
			toggled: N.has("config.diffEditor.hideUnchangedRegions.enabled"),
			precondition: N.has("isInDiffEditor"),
			menu: {
				when: N.has("isInDiffEditor"),
				id: F.EditorTitle,
				order: 22,
				group: "navigation"
			}
		});
	}
	run(e, ...t) {
		let n = e.get(Fl), r = !n.getValue("diffEditor.hideUnchangedRegions.enabled");
		n.updateValue("diffEditor.hideUnchangedRegions.enabled", r);
	}
}, vx = class extends Mo {
	constructor() {
		super({
			id: "diffEditor.toggleShowMovedCodeBlocks",
			title: H("toggleShowMovedCodeBlocks", "Toggle Show Moved Code Blocks"),
			precondition: N.has("isInDiffEditor")
		});
	}
	run(e, ...t) {
		let n = e.get(Fl), r = !n.getValue("diffEditor.experimental.showMoves");
		n.updateValue("diffEditor.experimental.showMoves", r);
	}
}, yx = class extends Mo {
	constructor() {
		super({
			id: "diffEditor.toggleUseInlineViewWhenSpaceIsLimited",
			title: H("toggleUseInlineViewWhenSpaceIsLimited", "Toggle Use Inline View When Space Is Limited"),
			precondition: N.has("isInDiffEditor")
		});
	}
	run(e, ...t) {
		let n = e.get(Fl), r = !n.getValue("diffEditor.useInlineViewWhenSpaceIsLimited");
		n.updateValue("diffEditor.useInlineViewWhenSpaceIsLimited", r);
	}
}, bx = H("diffEditor", "Diff Editor"), xx = class extends ot {
	constructor() {
		super({
			id: "diffEditor.switchSide",
			title: H("switchSide", "Switch Side"),
			icon: v.arrowSwap,
			precondition: N.has("isInDiffEditor"),
			f1: !0,
			category: bx
		});
	}
	runEditorCommand(e, t, n) {
		let r = Ax(e);
		if (r instanceof Pe) {
			if (n && n.dryRun) return { destinationSelection: r.mapToOtherSide().destinationSelection };
			r.switchSide();
		}
	}
}, Sx = class extends ot {
	constructor() {
		super({
			id: "diffEditor.exitCompareMove",
			title: H("exitCompareMove", "Exit Compare Move"),
			icon: v.close,
			precondition: I.comparingMovedCode,
			f1: !1,
			category: bx,
			keybinding: {
				weight: 1e4,
				primary: 9
			}
		});
	}
	runEditorCommand(e, t, ...n) {
		let r = Ax(e);
		r instanceof Pe && r.exitCompareMove();
	}
}, Cx = class extends ot {
	constructor() {
		super({
			id: "diffEditor.collapseAllUnchangedRegions",
			title: H("collapseAllUnchangedRegions", "Collapse All Unchanged Regions"),
			icon: v.fold,
			precondition: N.has("isInDiffEditor"),
			f1: !0,
			category: bx
		});
	}
	runEditorCommand(e, t, ...n) {
		let r = Ax(e);
		r instanceof Pe && r.collapseAllUnchangedRegions();
	}
}, wx = class extends ot {
	constructor() {
		super({
			id: "diffEditor.showAllUnchangedRegions",
			title: H("showAllUnchangedRegions", "Show All Unchanged Regions"),
			icon: v.unfold,
			precondition: N.has("isInDiffEditor"),
			f1: !0,
			category: bx
		});
	}
	runEditorCommand(e, t, ...n) {
		let r = Ax(e);
		r instanceof Pe && r.showAllUnchangedRegions();
	}
}, Tx = class extends Mo {
	constructor() {
		super({
			id: "diffEditor.revert",
			title: H("revert", "Revert"),
			f1: !1,
			category: bx
		});
	}
	run(e, t) {
		let n = kx(e, t.originalUri, t.modifiedUri);
		n instanceof Pe && n.revertRangeMappings(t.mapping.innerChanges ?? []);
	}
}, Ex = H("accessibleDiffViewer", "Accessible Diff Viewer"), Dx = class e extends Mo {
	static {
		this.id = "editor.action.accessibleDiffViewer.next";
	}
	constructor() {
		super({
			id: e.id,
			title: H("editor.action.accessibleDiffViewer.next", "Go to Next Difference"),
			category: Ex,
			precondition: N.has("isInDiffEditor"),
			keybinding: {
				primary: 65,
				weight: 100
			},
			f1: !0
		});
	}
	run(e) {
		Ax(e)?.accessibleDiffViewerNext();
	}
}, Ox = class e extends Mo {
	static {
		this.id = "editor.action.accessibleDiffViewer.prev";
	}
	constructor() {
		super({
			id: e.id,
			title: H("editor.action.accessibleDiffViewer.prev", "Go to Previous Difference"),
			category: Ex,
			precondition: N.has("isInDiffEditor"),
			keybinding: {
				primary: 1089,
				weight: 100
			},
			f1: !0
		});
	}
	run(e) {
		Ax(e)?.accessibleDiffViewerPrev();
	}
};
function kx(e, t, n) {
	return e.get(Ln).listDiffEditors().find((e) => {
		let r = e.getModifiedEditor(), i = e.getOriginalEditor();
		return r && r.getModel()?.uri.toString() === n.toString() && i && i.getModel()?.uri.toString() === t.toString();
	}) || null;
}
function Ax(e) {
	let t = e.get(Ln).listDiffEditors(), n = zt();
	if (n) {
		for (let e of t) if (jx(e.getContainerDomNode(), n)) return e;
	}
	return null;
}
function jx(e, t) {
	let n = t;
	for (; n;) {
		if (n === e) return !0;
		n = n.parentElement;
	}
	return !1;
}
Fa(_x), Fa(vx), Fa(yx), Ta.appendMenuItem(F.EditorTitle, {
	command: {
		id: new yx().desc.id,
		title: B("useInlineViewWhenSpaceIsLimited", "Use Inline View When Space Is Limited"),
		toggled: N.has("config.diffEditor.useInlineViewWhenSpaceIsLimited"),
		precondition: N.has("isInDiffEditor")
	},
	order: 11,
	group: "1_diff",
	when: N.and(I.diffEditorRenderSideBySideInlineBreakpointReached, N.has("isInDiffEditor"))
}), Ta.appendMenuItem(F.EditorTitle, {
	command: {
		id: new vx().desc.id,
		title: B("showMoves", "Show Moved Code Blocks"),
		icon: v.move,
		toggled: So.create("config.diffEditor.experimental.showMoves", !0),
		precondition: N.has("isInDiffEditor")
	},
	order: 10,
	group: "1_diff",
	when: N.has("isInDiffEditor")
}), Fa(Tx);
for (let e of [{
	icon: v.arrowRight,
	key: I.diffEditorInlineMode.toNegated()
}, {
	icon: v.discard,
	key: I.diffEditorInlineMode
}]) Ta.appendMenuItem(F.DiffEditorHunkToolbar, {
	command: {
		id: new Tx().desc.id,
		title: B("revertHunk", "Revert Block"),
		icon: e.icon
	},
	when: N.and(I.diffEditorModifiedWritable, e.key),
	order: 5,
	group: "primary"
}), Ta.appendMenuItem(F.DiffEditorSelectionToolbar, {
	command: {
		id: new Tx().desc.id,
		title: B("revertSelection", "Revert Selection"),
		icon: e.icon
	},
	when: N.and(I.diffEditorModifiedWritable, e.key),
	order: 5,
	group: "primary"
});
Fa(xx), Fa(Sx), Fa(Cx), Fa(wx), Ta.appendMenuItem(F.EditorTitle, {
	command: {
		id: Dx.id,
		title: B("Open Accessible Diff Viewer", "Open Accessible Diff Viewer"),
		precondition: N.has("isInDiffEditor")
	},
	order: 10,
	group: "2_diff",
	when: N.and(I.accessibleDiffViewerVisible.negate(), N.has("isInDiffEditor"))
}), Ol.registerCommandAlias("editor.action.diffReview.next", Dx.id), Fa(Dx), Ol.registerCommandAlias("editor.action.diffReview.prev", Ox.id), Fa(Ox);
// ../../../node_modules/.pnpm/monaco-editor@0.52.2/node_modules/monaco-editor/esm/vs/editor/contrib/anchorSelect/browser/anchorSelect.js
var Mx = function(e, t, n, r) {
	var i = arguments.length, a = i < 3 ? t : r === null ? r = Object.getOwnPropertyDescriptor(t, n) : r, o;
	if (typeof Reflect == "object" && typeof Reflect.decorate == "function") a = Reflect.decorate(e, t, n, r);
	else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (i < 3 ? o(a) : i > 3 ? o(t, n, a) : o(t, n)) || a);
	return i > 3 && a && Object.defineProperty(t, n, a), a;
}, Nx = function(e, t) {
	return function(n, r) {
		t(n, r, e);
	};
}, Px, Fx = new z("selectionAnchorSet", !1), Ix = class {
	static {
		Px = this;
	}
	static {
		this.ID = "editor.contrib.selectionAnchorController";
	}
	static get(e) {
		return e.getContribution(Px.ID);
	}
	constructor(e, t) {
		this.editor = e, this.selectionAnchorSetContextKey = Fx.bindTo(t), this.modelChangeListener = e.onDidChangeModel(() => this.selectionAnchorSetContextKey.reset());
	}
	setSelectionAnchor() {
		if (this.editor.hasModel()) {
			let e = this.editor.getPosition();
			this.editor.changeDecorations((t) => {
				this.decorationId && t.removeDecoration(this.decorationId), this.decorationId = t.addDecoration(V.fromPositions(e, e), {
					description: "selection-anchor",
					stickiness: 1,
					hoverMessage: new ws().appendText(B("selectionAnchor", "Selection Anchor")),
					className: "selection-anchor"
				});
			}), this.selectionAnchorSetContextKey.set(!!this.decorationId), gt(B("anchorSet", "Anchor set at {0}:{1}", e.lineNumber, e.column));
		}
	}
	goToSelectionAnchor() {
		if (this.editor.hasModel() && this.decorationId) {
			let e = this.editor.getModel().getDecorationRange(this.decorationId);
			e && this.editor.setPosition(e.getStartPosition());
		}
	}
	selectFromAnchorToCursor() {
		if (this.editor.hasModel() && this.decorationId) {
			let e = this.editor.getModel().getDecorationRange(this.decorationId);
			if (e) {
				let t = this.editor.getPosition();
				this.editor.setSelection(V.fromPositions(e.getStartPosition(), t)), this.cancelSelectionAnchor();
			}
		}
	}
	cancelSelectionAnchor() {
		if (this.decorationId) {
			let e = this.decorationId;
			this.editor.changeDecorations((t) => {
				t.removeDecoration(e), this.decorationId = void 0;
			}), this.selectionAnchorSetContextKey.set(!1);
		}
	}
	dispose() {
		this.cancelSelectionAnchor(), this.modelChangeListener.dispose();
	}
};
Ix = Px = Mx([Nx(1, j)], Ix);
var Lx = class extends O {
	constructor() {
		super({
			id: "editor.action.setSelectionAnchor",
			label: B("setSelectionAnchor", "Set Selection Anchor"),
			alias: "Set Selection Anchor",
			precondition: void 0,
			kbOpts: {
				kbExpr: I.editorTextFocus,
				primary: Ro(2089, 2080),
				weight: 100
			}
		});
	}
	async run(e, t) {
		Ix.get(t)?.setSelectionAnchor();
	}
}, Rx = class extends O {
	constructor() {
		super({
			id: "editor.action.goToSelectionAnchor",
			label: B("goToSelectionAnchor", "Go to Selection Anchor"),
			alias: "Go to Selection Anchor",
			precondition: Fx
		});
	}
	async run(e, t) {
		Ix.get(t)?.goToSelectionAnchor();
	}
}, zx = class extends O {
	constructor() {
		super({
			id: "editor.action.selectFromAnchorToCursor",
			label: B("selectFromAnchorToCursor", "Select from Anchor to Cursor"),
			alias: "Select from Anchor to Cursor",
			precondition: Fx,
			kbOpts: {
				kbExpr: I.editorTextFocus,
				primary: Ro(2089, 2089),
				weight: 100
			}
		});
	}
	async run(e, t) {
		Ix.get(t)?.selectFromAnchorToCursor();
	}
}, Bx = class extends O {
	constructor() {
		super({
			id: "editor.action.cancelSelectionAnchor",
			label: B("cancelSelectionAnchor", "Cancel Selection Anchor"),
			alias: "Cancel Selection Anchor",
			precondition: Fx,
			kbOpts: {
				kbExpr: I.editorTextFocus,
				primary: 9,
				weight: 100
			}
		});
	}
	async run(e, t) {
		Ix.get(t)?.cancelSelectionAnchor();
	}
};
T(Ix.ID, Ix, 4), k(Lx), k(Rx), k(zx), k(Bx);
// ../../../node_modules/.pnpm/monaco-editor@0.52.2/node_modules/monaco-editor/esm/vs/editor/contrib/bracketMatching/browser/bracketMatching.js
var Vx = S("editorOverviewRuler.bracketMatchForeground", "#A0A0A0", B("overviewRulerBracketMatchForeground", "Overview ruler marker color for matching brackets.")), Hx = class extends O {
	constructor() {
		super({
			id: "editor.action.jumpToBracket",
			label: B("smartSelect.jumpBracket", "Go to Bracket"),
			alias: "Go to Bracket",
			precondition: void 0,
			kbOpts: {
				kbExpr: I.editorTextFocus,
				primary: 3165,
				weight: 100
			}
		});
	}
	run(e, t) {
		Kx.get(t)?.jumpToBracket();
	}
}, Ux = class extends O {
	constructor() {
		super({
			id: "editor.action.selectToBracket",
			label: B("smartSelect.selectToBracket", "Select to Bracket"),
			alias: "Select to Bracket",
			precondition: void 0,
			metadata: {
				description: H("smartSelect.selectToBracketDescription", "Select the text inside and including the brackets or curly braces"),
				args: [{
					name: "args",
					schema: {
						type: "object",
						properties: { selectBrackets: {
							type: "boolean",
							default: !0
						} }
					}
				}]
			}
		});
	}
	run(e, t, n) {
		let r = !0;
		n && n.selectBrackets === !1 && (r = !1), Kx.get(t)?.selectToBracket(r);
	}
}, Wx = class extends O {
	constructor() {
		super({
			id: "editor.action.removeBrackets",
			label: B("smartSelect.removeBrackets", "Remove Brackets"),
			alias: "Remove Brackets",
			precondition: void 0,
			kbOpts: {
				kbExpr: I.editorTextFocus,
				primary: 2561,
				weight: 100
			}
		});
	}
	run(e, t) {
		Kx.get(t)?.removeBrackets(this.id);
	}
}, Gx = class {
	constructor(e, t, n) {
		this.position = e, this.brackets = t, this.options = n;
	}
}, Kx = class e extends U {
	static {
		this.ID = "editor.contrib.bracketMatchingController";
	}
	static get(t) {
		return t.getContribution(e.ID);
	}
	constructor(e) {
		super(), this._editor = e, this._lastBracketsData = [], this._lastVersionId = 0, this._decorations = this._editor.createDecorationsCollection(), this._updateBracketsSoon = this._register(new tl(() => this._updateBrackets(), 50)), this._matchBrackets = this._editor.getOption(72), this._updateBracketsSoon.schedule(), this._register(e.onDidChangeCursorPosition((e) => {
			this._matchBrackets !== "never" && this._updateBracketsSoon.schedule();
		})), this._register(e.onDidChangeModelContent((e) => {
			this._updateBracketsSoon.schedule();
		})), this._register(e.onDidChangeModel((e) => {
			this._lastBracketsData = [], this._updateBracketsSoon.schedule();
		})), this._register(e.onDidChangeModelLanguageConfiguration((e) => {
			this._lastBracketsData = [], this._updateBracketsSoon.schedule();
		})), this._register(e.onDidChangeConfiguration((e) => {
			e.hasChanged(72) && (this._matchBrackets = this._editor.getOption(72), this._decorations.clear(), this._lastBracketsData = [], this._lastVersionId = 0, this._updateBracketsSoon.schedule());
		})), this._register(e.onDidBlurEditorWidget(() => {
			this._updateBracketsSoon.schedule();
		})), this._register(e.onDidFocusEditorWidget(() => {
			this._updateBracketsSoon.schedule();
		}));
	}
	jumpToBracket() {
		if (!this._editor.hasModel()) return;
		let e = this._editor.getModel(), t = this._editor.getSelections().map((t) => {
			let n = t.getStartPosition(), r = e.bracketPairs.matchBracket(n), i = null;
			if (r) r[0].containsPosition(n) && !r[1].containsPosition(n) ? i = r[1].getStartPosition() : r[1].containsPosition(n) && (i = r[0].getStartPosition());
			else {
				let t = e.bracketPairs.findEnclosingBrackets(n);
				if (t) i = t[1].getStartPosition();
				else {
					let t = e.bracketPairs.findNextBracket(n);
					t && t.range && (i = t.range.getStartPosition());
				}
			}
			return i ? new V(i.lineNumber, i.column, i.lineNumber, i.column) : new V(n.lineNumber, n.column, n.lineNumber, n.column);
		});
		this._editor.setSelections(t), this._editor.revealRange(t[0]);
	}
	selectToBracket(e) {
		if (!this._editor.hasModel()) return;
		let t = this._editor.getModel(), n = [];
		this._editor.getSelections().forEach((r) => {
			let i = r.getStartPosition(), a = t.bracketPairs.matchBracket(i);
			if (!a && (a = t.bracketPairs.findEnclosingBrackets(i), !a)) {
				let e = t.bracketPairs.findNextBracket(i);
				e && e.range && (a = t.bracketPairs.matchBracket(e.range.getStartPosition()));
			}
			let o = null, s = null;
			if (a) {
				a.sort(E.compareRangesUsingStarts);
				let [t, n] = a;
				if (o = e ? t.getStartPosition() : t.getEndPosition(), s = e ? n.getEndPosition() : n.getStartPosition(), n.containsPosition(i)) {
					let e = o;
					o = s, s = e;
				}
			}
			o && s && n.push(new V(o.lineNumber, o.column, s.lineNumber, s.column));
		}), n.length > 0 && (this._editor.setSelections(n), this._editor.revealRange(n[0]));
	}
	removeBrackets(e) {
		if (!this._editor.hasModel()) return;
		let t = this._editor.getModel();
		this._editor.getSelections().forEach((n) => {
			let r = n.getPosition(), i = t.bracketPairs.matchBracket(r);
			i ||= t.bracketPairs.findEnclosingBrackets(r), i && (this._editor.pushUndoStop(), this._editor.executeEdits(e, [{
				range: i[0],
				text: ""
			}, {
				range: i[1],
				text: ""
			}]), this._editor.pushUndoStop());
		});
	}
	static {
		this._DECORATION_OPTIONS_WITH_OVERVIEW_RULER = L.register({
			description: "bracket-match-overview",
			stickiness: 1,
			className: "bracket-match",
			overviewRuler: {
				color: ra(Vx),
				position: Mr.Center
			}
		});
	}
	static {
		this._DECORATION_OPTIONS_WITHOUT_OVERVIEW_RULER = L.register({
			description: "bracket-match-no-overview",
			stickiness: 1,
			className: "bracket-match"
		});
	}
	_updateBrackets() {
		if (this._matchBrackets === "never") return;
		this._recomputeBrackets();
		let e = [], t = 0;
		for (let n of this._lastBracketsData) {
			let r = n.brackets;
			r && (e[t++] = {
				range: r[0],
				options: n.options
			}, e[t++] = {
				range: r[1],
				options: n.options
			});
		}
		this._decorations.set(e);
	}
	_recomputeBrackets() {
		if (!this._editor.hasModel() || !this._editor.hasWidgetFocus()) {
			this._lastBracketsData = [], this._lastVersionId = 0;
			return;
		}
		let t = this._editor.getSelections();
		if (t.length > 100) {
			this._lastBracketsData = [], this._lastVersionId = 0;
			return;
		}
		let n = this._editor.getModel(), r = n.getVersionId(), i = [];
		this._lastVersionId === r && (i = this._lastBracketsData);
		let a = [], o = 0;
		for (let e = 0, n = t.length; e < n; e++) {
			let n = t[e];
			n.isEmpty() && (a[o++] = n.getStartPosition());
		}
		a.length > 1 && a.sort(b.compare);
		let s = [], c = 0, l = 0, u = i.length;
		for (let t = 0, r = a.length; t < r; t++) {
			let r = a[t];
			for (; l < u && i[l].position.isBefore(r);) l++;
			if (l < u && i[l].position.equals(r)) s[c++] = i[l];
			else {
				let t = n.bracketPairs.matchBracket(r, 20), i = e._DECORATION_OPTIONS_WITH_OVERVIEW_RULER;
				!t && this._matchBrackets === "always" && (t = n.bracketPairs.findEnclosingBrackets(r, 20), i = e._DECORATION_OPTIONS_WITHOUT_OVERVIEW_RULER), s[c++] = new Gx(r, t, i);
			}
		}
		this._lastBracketsData = s, this._lastVersionId = r;
	}
};
T(Kx.ID, Kx, 1), k(Ux), k(Hx), k(Wx), Ta.appendMenuItem(F.MenubarGoMenu, {
	group: "5_infile_nav",
	command: {
		id: "editor.action.jumpToBracket",
		title: B({
			key: "miGoToBracket",
			comment: ["&& denotes a mnemonic"]
		}, "Go to &&Bracket")
	},
	order: 2
});
// ../../../node_modules/.pnpm/monaco-editor@0.52.2/node_modules/monaco-editor/esm/vs/editor/contrib/caretOperations/browser/moveCaretCommand.js
var qx = class {
	constructor(e, t) {
		this._selection = e, this._isMovingLeft = t;
	}
	getEditOperations(e, t) {
		if (this._selection.startLineNumber !== this._selection.endLineNumber || this._selection.isEmpty()) return;
		let n = this._selection.startLineNumber, r = this._selection.startColumn, i = this._selection.endColumn;
		if (!(this._isMovingLeft && r === 1) && (this._isMovingLeft || i !== e.getLineMaxColumn(n))) {
			if (this._isMovingLeft) {
				let a = new E(n, r - 1, n, r), o = e.getValueInRange(a);
				t.addEditOperation(a, null), t.addEditOperation(new E(n, i, n, i), o);
			} else {
				let a = new E(n, i, n, i + 1), o = e.getValueInRange(a);
				t.addEditOperation(a, null), t.addEditOperation(new E(n, r, n, r), o);
			}
		}
	}
	computeCursorState(e, t) {
		return this._isMovingLeft ? new V(this._selection.startLineNumber, this._selection.startColumn - 1, this._selection.endLineNumber, this._selection.endColumn - 1) : new V(this._selection.startLineNumber, this._selection.startColumn + 1, this._selection.endLineNumber, this._selection.endColumn + 1);
	}
}, Jx = class extends O {
	constructor(e, t) {
		super(t), this.left = e;
	}
	run(e, t) {
		if (!t.hasModel()) return;
		let n = [], r = t.getSelections();
		for (let e of r) n.push(new qx(e, this.left));
		t.pushUndoStop(), t.executeCommands(this.id, n), t.pushUndoStop();
	}
}, Yx = class extends Jx {
	constructor() {
		super(!0, {
			id: "editor.action.moveCarretLeftAction",
			label: B("caret.moveLeft", "Move Selected Text Left"),
			alias: "Move Selected Text Left",
			precondition: I.writable
		});
	}
}, Xx = class extends Jx {
	constructor() {
		super(!1, {
			id: "editor.action.moveCarretRightAction",
			label: B("caret.moveRight", "Move Selected Text Right"),
			alias: "Move Selected Text Right",
			precondition: I.writable
		});
	}
};
k(Yx), k(Xx), k(class extends O {
	constructor() {
		super({
			id: "editor.action.transposeLetters",
			label: B("transposeLetters.label", "Transpose Letters"),
			alias: "Transpose Letters",
			precondition: I.writable,
			kbOpts: {
				kbExpr: I.textInputFocus,
				primary: 0,
				mac: { primary: 306 },
				weight: 100
			}
		});
	}
	run(e, t) {
		if (!t.hasModel()) return;
		let n = t.getModel(), r = [], i = t.getSelections();
		for (let e of i) {
			if (!e.isEmpty()) continue;
			let t = e.startLineNumber, i = e.startColumn, a = n.getLineMaxColumn(t);
			if (t === 1 && (i === 1 || i === 2 && a === 2)) continue;
			let o = i === a ? e.getPosition() : no.rightPosition(n, e.getPosition().lineNumber, e.getPosition().column), s = no.leftPosition(n, o), c = no.leftPosition(n, s), l = n.getValueInRange(E.fromPositions(c, s)), u = n.getValueInRange(E.fromPositions(s, o)), d = E.fromPositions(c, o);
			r.push(new Ys(d, u + l));
		}
		r.length > 0 && (t.pushUndoStop(), t.executeCommands(this.id, r), t.pushUndoStop());
	}
});
// ../../../node_modules/.pnpm/monaco-editor@0.52.2/node_modules/monaco-editor/esm/vs/base/common/uuid.js
var Zx = (function() {
	if (typeof crypto == "object" && typeof crypto.randomUUID == "function") return crypto.randomUUID.bind(crypto);
	let e;
	e = typeof crypto == "object" && typeof crypto.getRandomValues == "function" ? crypto.getRandomValues.bind(crypto) : function(e) {
		for (let t = 0; t < e.length; t++) e[t] = Math.floor(Math.random() * 256);
		return e;
	};
	let t = /* @__PURE__ */ new Uint8Array(16), n = [];
	for (let e = 0; e < 256; e++) n.push(e.toString(16).padStart(2, "0"));
	return function() {
		e(t), t[6] = t[6] & 15 | 64, t[8] = t[8] & 63 | 128;
		let r = 0, i = "";
		return i += n[t[r++]], i += n[t[r++]], i += n[t[r++]], i += n[t[r++]], i += "-", i += n[t[r++]], i += n[t[r++]], i += "-", i += n[t[r++]], i += n[t[r++]], i += "-", i += n[t[r++]], i += n[t[r++]], i += "-", i += n[t[r++]], i += n[t[r++]], i += n[t[r++]], i += n[t[r++]], i += n[t[r++]], i += n[t[r++]], i;
	};
})();
// ../../../node_modules/.pnpm/monaco-editor@0.52.2/node_modules/monaco-editor/esm/vs/base/common/dataTransfer.js
function Qx(e) {
	return {
		asString: async () => e,
		asFile: () => void 0,
		value: typeof e == "string" ? e : void 0
	};
}
function $x(e, t, n) {
	let r = {
		id: Zx(),
		name: e,
		uri: t,
		data: n
	};
	return {
		asString: async () => "",
		asFile: () => r,
		value: void 0
	};
}
var eS = class {
	constructor() {
		this._entries = /* @__PURE__ */ new Map();
	}
	get size() {
		let e = 0;
		for (let t of this._entries) e++;
		return e;
	}
	has(e) {
		return this._entries.has(this.toKey(e));
	}
	matches(e) {
		let t = [...this._entries.keys()];
		return Da.some(this, ([e, t]) => t.asFile()) && t.push("files"), rS(tS(e), t);
	}
	get(e) {
		return this._entries.get(this.toKey(e))?.[0];
	}
	append(e, t) {
		let n = this._entries.get(e);
		n ? n.push(t) : this._entries.set(this.toKey(e), [t]);
	}
	replace(e, t) {
		this._entries.set(this.toKey(e), [t]);
	}
	delete(e) {
		this._entries.delete(this.toKey(e));
	}
	*[Symbol.iterator]() {
		for (let [e, t] of this._entries) for (let n of t) yield [e, n];
	}
	toKey(e) {
		return tS(e);
	}
};
function tS(e) {
	return e.toLowerCase();
}
function nS(e, t) {
	return rS(tS(e), t.map(tS));
}
function rS(e, t) {
	if (e === "*/*") return t.length > 0;
	if (t.includes(e)) return !0;
	let n = e.match(/^([a-z]+)\/([a-z]+|\*)$/i);
	if (!n) return !1;
	let [r, i, a] = n;
	return a === "*" && t.some((e) => e.startsWith(i + "/"));
}
var iS = Object.freeze({
	create: (e) => $e(e.map((e) => e.toString())).join("\r\n"),
	split: (e) => e.split("\r\n"),
	parse: (e) => iS.split(e).filter((e) => !e.startsWith("#"))
}), aS = class e {
	static {
		this.sep = ".";
	}
	static {
		this.None = new e("@@none@@");
	}
	static {
		this.Empty = new e("");
	}
	constructor(e) {
		this.value = e;
	}
	equals(e) {
		return this.value === e.value;
	}
	contains(t) {
		return this.equals(t) || this.value === "" || t.value.startsWith(this.value + e.sep);
	}
	intersects(e) {
		return this.contains(e) || e.contains(this);
	}
	append(...t) {
		return new e((this.value ? [this.value, ...t] : t).join(e.sep));
	}
}, oS = {
	EDITORS: "CodeEditors",
	FILES: "CodeFiles"
}, sS = class {};
Js.add({ DragAndDropContribution: "workbench.contributions.dragAndDrop" }.DragAndDropContribution, new sS());
var cS = class e {
	static {
		this.INSTANCE = new e();
	}
	constructor() {}
	static getInstance() {
		return e.INSTANCE;
	}
	hasData(e) {
		return e && e === this.proto;
	}
	getData(e) {
		if (this.hasData(e)) return this.data;
	}
};
// ../../../node_modules/.pnpm/monaco-editor@0.52.2/node_modules/monaco-editor/esm/vs/editor/browser/dnd.js
function lS(e) {
	let t = new eS();
	for (let n of e.items) {
		let e = n.type;
		if (n.kind === "string") {
			let r = new Promise((e) => n.getAsString(e));
			t.append(e, Qx(r));
		} else if (n.kind === "file") {
			let r = n.getAsFile();
			r && t.append(e, uS(r));
		}
	}
	return t;
}
function uS(e) {
	let t = e.path ? De.parse(e.path) : void 0;
	return $x(e.name, t, async () => new Uint8Array(await e.arrayBuffer()));
}
var dS = Object.freeze([
	oS.EDITORS,
	oS.FILES,
	Kt.RESOURCES,
	Kt.INTERNAL_URI_LIST
]);
function fS(e, t = !1) {
	let n = lS(e), r = n.get(Kt.INTERNAL_URI_LIST);
	if (r) n.replace(Et.uriList, r);
	else if (t || !n.has(Et.uriList)) {
		let t = [];
		for (let n of e.items) {
			let e = n.getAsFile();
			if (e) {
				let n = e.path;
				try {
					n ? t.push(De.file(n).toString()) : t.push(De.parse(e.name, !0).toString());
				} catch {}
			}
		}
		t.length && n.replace(Et.uriList, Qx(iS.create(t)));
	}
	for (let e of dS) n.delete(e);
	return n;
}
// ../../../node_modules/.pnpm/monaco-editor@0.52.2/node_modules/monaco-editor/esm/vs/editor/contrib/dropOrPasteInto/browser/defaultProviders.js
var pS = function(e, t, n, r) {
	var i = arguments.length, a = i < 3 ? t : r === null ? r = Object.getOwnPropertyDescriptor(t, n) : r, o;
	if (typeof Reflect == "object" && typeof Reflect.decorate == "function") a = Reflect.decorate(e, t, n, r);
	else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (i < 3 ? o(a) : i > 3 ? o(t, n, a) : o(t, n)) || a);
	return i > 3 && a && Object.defineProperty(t, n, a), a;
}, mS = function(e, t) {
	return function(n, r) {
		t(n, r, e);
	};
}, hS = class {
	async provideDocumentPasteEdits(e, t, n, r, i) {
		let a = await this.getEdit(n, i);
		if (a) return {
			edits: [{
				insertText: a.insertText,
				title: a.title,
				kind: a.kind,
				handledMimeType: a.handledMimeType,
				yieldTo: a.yieldTo
			}],
			dispose() {}
		};
	}
	async provideDocumentDropEdits(e, t, n, r) {
		let i = await this.getEdit(n, r);
		if (i) return {
			edits: [{
				insertText: i.insertText,
				title: i.title,
				kind: i.kind,
				handledMimeType: i.handledMimeType,
				yieldTo: i.yieldTo
			}],
			dispose() {}
		};
	}
}, gS = class e extends hS {
	constructor() {
		super(...arguments), this.kind = e.kind, this.dropMimeTypes = [Et.text], this.pasteMimeTypes = [Et.text];
	}
	static {
		this.id = "text";
	}
	static {
		this.kind = new aS("text.plain");
	}
	async getEdit(e, t) {
		let n = e.get(Et.text);
		if (!n || e.has(Et.uriList)) return;
		let r = await n.asString();
		return {
			handledMimeType: Et.text,
			title: B("text.label", "Insert Plain Text"),
			insertText: r,
			kind: this.kind
		};
	}
}, _S = class extends hS {
	constructor() {
		super(...arguments), this.kind = new aS("uri.absolute"), this.dropMimeTypes = [Et.uriList], this.pasteMimeTypes = [Et.uriList];
	}
	async getEdit(e, t) {
		let n = await bS(e);
		if (!n.length || t.isCancellationRequested) return;
		let r = 0, i = n.map(({ uri: e, originalText: t }) => e.scheme === Kc.file ? e.fsPath : (r++, t)).join(" "), a;
		return a = r > 0 ? n.length > 1 ? B("defaultDropProvider.uriList.uris", "Insert Uris") : B("defaultDropProvider.uriList.uri", "Insert Uri") : n.length > 1 ? B("defaultDropProvider.uriList.paths", "Insert Paths") : B("defaultDropProvider.uriList.path", "Insert Path"), {
			handledMimeType: Et.uriList,
			insertText: i,
			title: a,
			kind: this.kind
		};
	}
}, vS = class extends hS {
	constructor(e) {
		super(), this._workspaceContextService = e, this.kind = new aS("uri.relative"), this.dropMimeTypes = [Et.uriList], this.pasteMimeTypes = [Et.uriList];
	}
	async getEdit(e, t) {
		let n = await bS(e);
		if (!n.length || t.isCancellationRequested) return;
		let r = On(n.map(({ uri: e }) => {
			let t = this._workspaceContextService.getWorkspaceFolder(e);
			return t ? ms(t.uri, e) : void 0;
		}));
		if (r.length) return {
			handledMimeType: Et.uriList,
			insertText: r.join(" "),
			title: n.length > 1 ? B("defaultDropProvider.uriList.relativePaths", "Insert Relative Paths") : B("defaultDropProvider.uriList.relativePath", "Insert Relative Path"),
			kind: this.kind
		};
	}
};
vS = pS([mS(0, Ae)], vS);
var yS = class {
	constructor() {
		this.kind = new aS("html"), this.pasteMimeTypes = ["text/html"], this._yieldTo = [{ mimeType: Et.text }];
	}
	async provideDocumentPasteEdits(e, t, n, r, i) {
		if (r.triggerKind !== is.PasteAs && !r.only?.contains(this.kind)) return;
		let a = await n.get("text/html")?.asString();
		if (a && !i.isCancellationRequested) return {
			dispose() {},
			edits: [{
				insertText: a,
				yieldTo: this._yieldTo,
				title: B("pasteHtmlLabel", "Insert HTML"),
				kind: this.kind
			}]
		};
	}
};
async function bS(e) {
	let t = e.get(Et.uriList);
	if (!t) return [];
	let n = await t.asString(), r = [];
	for (let e of iS.parse(n)) try {
		r.push({
			uri: De.parse(e),
			originalText: e
		});
	} catch {}
	return r;
}
var xS = class extends U {
	constructor(e, t) {
		super(), this._register(e.documentDropEditProvider.register("*", new gS())), this._register(e.documentDropEditProvider.register("*", new _S())), this._register(e.documentDropEditProvider.register("*", new vS(t)));
	}
};
xS = pS([mS(0, M), mS(1, Ae)], xS);
var SS = class extends U {
	constructor(e, t) {
		super(), this._register(e.documentPasteEditProvider.register("*", new gS())), this._register(e.documentPasteEditProvider.register("*", new _S())), this._register(e.documentPasteEditProvider.register("*", new vS(t))), this._register(e.documentPasteEditProvider.register("*", new yS()));
	}
};
SS = pS([mS(0, M), mS(1, Ae)], SS);
// ../../../node_modules/.pnpm/monaco-editor@0.52.2/node_modules/monaco-editor/esm/vs/editor/contrib/snippet/browser/snippetParser.js
var CS = class e {
	constructor() {
		this.value = "", this.pos = 0;
	}
	static {
		this._table = {
			36: 0,
			58: 1,
			44: 2,
			123: 3,
			125: 4,
			92: 5,
			47: 6,
			124: 7,
			43: 11,
			45: 12,
			63: 13
		};
	}
	static isDigitCharacter(e) {
		return e >= 48 && e <= 57;
	}
	static isVariableCharacter(e) {
		return e === 95 || e >= 97 && e <= 122 || e >= 65 && e <= 90;
	}
	text(e) {
		this.value = e, this.pos = 0;
	}
	tokenText(e) {
		return this.value.substr(e.pos, e.len);
	}
	next() {
		if (this.pos >= this.value.length) return {
			type: 14,
			pos: this.pos,
			len: 0
		};
		let t = this.pos, n = 0, r = this.value.charCodeAt(t), i;
		if (i = e._table[r], typeof i == "number") return this.pos += 1, {
			type: i,
			pos: t,
			len: 1
		};
		if (e.isDigitCharacter(r)) {
			i = 8;
			do
				n += 1, r = this.value.charCodeAt(t + n);
			while (e.isDigitCharacter(r));
			return this.pos += n, {
				type: i,
				pos: t,
				len: n
			};
		}
		if (e.isVariableCharacter(r)) {
			i = 9;
			do
				r = this.value.charCodeAt(t + ++n);
			while (e.isVariableCharacter(r) || e.isDigitCharacter(r));
			return this.pos += n, {
				type: i,
				pos: t,
				len: n
			};
		}
		i = 10;
		do
			n += 1, r = this.value.charCodeAt(t + n);
		while (!isNaN(r) && e._table[r] === void 0 && !e.isDigitCharacter(r) && !e.isVariableCharacter(r));
		return this.pos += n, {
			type: i,
			pos: t,
			len: n
		};
	}
}, wS = class {
	constructor() {
		this._children = [];
	}
	appendChild(e) {
		return e instanceof TS && this._children[this._children.length - 1] instanceof TS ? this._children[this._children.length - 1].value += e.value : (e.parent = this, this._children.push(e)), this;
	}
	replace(e, t) {
		let { parent: n } = e, r = n.children.indexOf(e), i = n.children.slice(0);
		i.splice(r, 1, ...t), n._children = i, (function e(t, n) {
			for (let r of t) r.parent = n, e(r.children, r);
		})(t, n);
	}
	get children() {
		return this._children;
	}
	get rightMostDescendant() {
		return this._children.length > 0 ? this._children[this._children.length - 1].rightMostDescendant : this;
	}
	get snippet() {
		let e = this;
		for (;;) {
			if (!e) return;
			if (e instanceof NS) return e;
			e = e.parent;
		}
	}
	toString() {
		return this.children.reduce((e, t) => e + t.toString(), "");
	}
	len() {
		return 0;
	}
}, TS = class e extends wS {
	constructor(e) {
		super(), this.value = e;
	}
	toString() {
		return this.value;
	}
	len() {
		return this.value.length;
	}
	clone() {
		return new e(this.value);
	}
}, ES = class extends wS {}, DS = class e extends ES {
	static compareByIndex(e, t) {
		return e.index === t.index ? 0 : e.isFinalTabstop ? 1 : t.isFinalTabstop || e.index < t.index ? -1 : +(e.index > t.index);
	}
	constructor(e) {
		super(), this.index = e;
	}
	get isFinalTabstop() {
		return this.index === 0;
	}
	get choice() {
		return this._children.length === 1 && this._children[0] instanceof OS ? this._children[0] : void 0;
	}
	clone() {
		let t = new e(this.index);
		return this.transform && (t.transform = this.transform.clone()), t._children = this.children.map((e) => e.clone()), t;
	}
}, OS = class e extends wS {
	constructor() {
		super(...arguments), this.options = [];
	}
	appendChild(e) {
		return e instanceof TS && (e.parent = this, this.options.push(e)), this;
	}
	toString() {
		return this.options[0].value;
	}
	len() {
		return this.options[0].len();
	}
	clone() {
		let t = new e();
		return this.options.forEach(t.appendChild, t), t;
	}
}, kS = class e extends wS {
	constructor() {
		super(...arguments), this.regexp = /* @__PURE__ */ RegExp("");
	}
	resolve(e) {
		let t = this, n = !1, r = e.replace(this.regexp, function() {
			return n = !0, t._replace(Array.prototype.slice.call(arguments, 0, -2));
		});
		return !n && this._children.some((e) => e instanceof AS && !!e.elseValue) && (r = this._replace([])), r;
	}
	_replace(e) {
		let t = "";
		for (let n of this._children) if (n instanceof AS) {
			let r = e[n.index] || "";
			r = n.resolve(r), t += r;
		} else t += n.toString();
		return t;
	}
	toString() {
		return "";
	}
	clone() {
		let t = new e();
		return t.regexp = new RegExp(this.regexp.source, (this.regexp.ignoreCase ? "i" : "") + (this.regexp.global ? "g" : "")), t._children = this.children.map((e) => e.clone()), t;
	}
}, AS = class e extends wS {
	constructor(e, t, n, r) {
		super(), this.index = e, this.shorthandName = t, this.ifValue = n, this.elseValue = r;
	}
	resolve(e) {
		return this.shorthandName === "upcase" ? e ? e.toLocaleUpperCase() : "" : this.shorthandName === "downcase" ? e ? e.toLocaleLowerCase() : "" : this.shorthandName === "capitalize" ? e ? e[0].toLocaleUpperCase() + e.substr(1) : "" : this.shorthandName === "pascalcase" ? e ? this._toPascalCase(e) : "" : this.shorthandName === "camelcase" ? e ? this._toCamelCase(e) : "" : e && typeof this.ifValue == "string" ? this.ifValue : !e && typeof this.elseValue == "string" ? this.elseValue : e || "";
	}
	_toPascalCase(e) {
		let t = e.match(/[a-z0-9]+/gi);
		return t ? t.map((e) => e.charAt(0).toUpperCase() + e.substr(1)).join("") : e;
	}
	_toCamelCase(e) {
		let t = e.match(/[a-z0-9]+/gi);
		return t ? t.map((e, t) => t === 0 ? e.charAt(0).toLowerCase() + e.substr(1) : e.charAt(0).toUpperCase() + e.substr(1)).join("") : e;
	}
	clone() {
		return new e(this.index, this.shorthandName, this.ifValue, this.elseValue);
	}
}, jS = class e extends ES {
	constructor(e) {
		super(), this.name = e;
	}
	resolve(e) {
		let t = e.resolve(this);
		return this.transform && (t = this.transform.resolve(t || "")), t !== void 0 && (this._children = [new TS(t)], !0);
	}
	clone() {
		let t = new e(this.name);
		return this.transform && (t.transform = this.transform.clone()), t._children = this.children.map((e) => e.clone()), t;
	}
};
function MS(e, t) {
	let n = [...e];
	for (; n.length > 0;) {
		let e = n.shift();
		if (!t(e)) break;
		n.unshift(...e.children);
	}
}
var NS = class e extends wS {
	get placeholderInfo() {
		if (!this._placeholders) {
			let e = [], t;
			this.walk(function(n) {
				return n instanceof DS && (e.push(n), t = !t || t.index < n.index ? n : t), !0;
			}), this._placeholders = {
				all: e,
				last: t
			};
		}
		return this._placeholders;
	}
	get placeholders() {
		let { all: e } = this.placeholderInfo;
		return e;
	}
	offset(e) {
		let t = 0, n = !1;
		return this.walk((r) => r === e ? (n = !0, !1) : (t += r.len(), !0)), n ? t : -1;
	}
	fullLen(e) {
		let t = 0;
		return MS([e], (e) => (t += e.len(), !0)), t;
	}
	enclosingPlaceholders(e) {
		let t = [], { parent: n } = e;
		for (; n;) n instanceof DS && t.push(n), n = n.parent;
		return t;
	}
	resolveVariables(e) {
		return this.walk((t) => (t instanceof jS && t.resolve(e) && (this._placeholders = void 0), !0)), this;
	}
	appendChild(e) {
		return this._placeholders = void 0, super.appendChild(e);
	}
	replace(e, t) {
		return this._placeholders = void 0, super.replace(e, t);
	}
	clone() {
		let t = new e();
		return this._children = this.children.map((e) => e.clone()), t;
	}
	walk(e) {
		MS(this.children, e);
	}
}, PS = class {
	constructor() {
		this._scanner = new CS(), this._token = {
			type: 14,
			pos: 0,
			len: 0
		};
	}
	static escape(e) {
		return e.replace(/\$|}|\\/g, "\\$&");
	}
	static guessNeedsClipboard(e) {
		return /\${?CLIPBOARD/.test(e);
	}
	parse(e, t, n) {
		let r = new NS();
		return this.parseFragment(e, r), this.ensureFinalTabstop(r, n ?? !1, t ?? !1), r;
	}
	parseFragment(e, t) {
		let n = t.children.length;
		for (this._scanner.text(e), this._token = this._scanner.next(); this._parse(t););
		let r = /* @__PURE__ */ new Map(), i = [];
		t.walk((e) => (e instanceof DS && (e.isFinalTabstop ? r.set(0, void 0) : !r.has(e.index) && e.children.length > 0 ? r.set(e.index, e.children) : i.push(e)), !0));
		let a = (e, n) => {
			let i = r.get(e.index);
			if (!i) return;
			let o = new DS(e.index);
			o.transform = e.transform;
			for (let e of i) {
				let t = e.clone();
				o.appendChild(t), t instanceof DS && r.has(t.index) && !n.has(t.index) && (n.add(t.index), a(t, n), n.delete(t.index));
			}
			t.replace(e, [o]);
		}, o = /* @__PURE__ */ new Set();
		for (let e of i) a(e, o);
		return t.children.slice(n);
	}
	ensureFinalTabstop(e, t, n) {
		(t || n && e.placeholders.length > 0) && (e.placeholders.find((e) => e.index === 0) || e.appendChild(new DS(0)));
	}
	_accept(e, t) {
		if (e === void 0 || this._token.type === e) {
			let e = !t || this._scanner.tokenText(this._token);
			return this._token = this._scanner.next(), e;
		}
		return !1;
	}
	_backTo(e) {
		return this._scanner.pos = e.pos + e.len, this._token = e, !1;
	}
	_until(e) {
		let t = this._token;
		for (; this._token.type !== e;) {
			if (this._token.type === 14) return !1;
			if (this._token.type === 5) {
				let e = this._scanner.next();
				if (e.type !== 0 && e.type !== 4 && e.type !== 5) return !1;
			}
			this._token = this._scanner.next();
		}
		let n = this._scanner.value.substring(t.pos, this._token.pos).replace(/\\(\$|}|\\)/g, "$1");
		return this._token = this._scanner.next(), n;
	}
	_parse(e) {
		return this._parseEscaped(e) || this._parseTabstopOrVariableName(e) || this._parseComplexPlaceholder(e) || this._parseComplexVariable(e) || this._parseAnything(e);
	}
	_parseEscaped(e) {
		let t;
		return (t = this._accept(5, !0)) ? (t = this._accept(0, !0) || this._accept(4, !0) || this._accept(5, !0) || t, e.appendChild(new TS(t)), !0) : !1;
	}
	_parseTabstopOrVariableName(e) {
		let t, n = this._token;
		return this._accept(0) && (t = this._accept(9, !0) || this._accept(8, !0)) ? (e.appendChild(/^\d+$/.test(t) ? new DS(Number(t)) : new jS(t)), !0) : this._backTo(n);
	}
	_parseComplexPlaceholder(e) {
		let t, n = this._token;
		if (!(this._accept(0) && this._accept(3) && (t = this._accept(8, !0)))) return this._backTo(n);
		let r = new DS(Number(t));
		if (this._accept(1)) for (;;) {
			if (this._accept(4)) return e.appendChild(r), !0;
			if (!this._parse(r)) return e.appendChild(new TS("${" + t + ":")), r.children.forEach(e.appendChild, e), !0;
		}
		else if (r.index > 0 && this._accept(7)) {
			let t = new OS();
			for (;;) {
				if (this._parseChoiceElement(t)) {
					if (this._accept(2)) continue;
					if (this._accept(7) && (r.appendChild(t), this._accept(4))) return e.appendChild(r), !0;
				}
				return this._backTo(n), !1;
			}
		} else if (this._accept(6)) return this._parseTransform(r) ? (e.appendChild(r), !0) : (this._backTo(n), !1);
		else if (this._accept(4)) return e.appendChild(r), !0;
		else return this._backTo(n);
	}
	_parseChoiceElement(e) {
		let t = this._token, n = [];
		for (; this._token.type !== 2 && this._token.type !== 7;) {
			let e;
			if (e = (e = this._accept(5, !0)) ? this._accept(2, !0) || this._accept(7, !0) || this._accept(5, !0) || e : this._accept(void 0, !0), !e) return this._backTo(t), !1;
			n.push(e);
		}
		return n.length === 0 ? (this._backTo(t), !1) : (e.appendChild(new TS(n.join(""))), !0);
	}
	_parseComplexVariable(e) {
		let t, n = this._token;
		if (!(this._accept(0) && this._accept(3) && (t = this._accept(9, !0)))) return this._backTo(n);
		let r = new jS(t);
		if (this._accept(1)) for (;;) {
			if (this._accept(4)) return e.appendChild(r), !0;
			if (!this._parse(r)) return e.appendChild(new TS("${" + t + ":")), r.children.forEach(e.appendChild, e), !0;
		}
		else if (this._accept(6)) return this._parseTransform(r) ? (e.appendChild(r), !0) : (this._backTo(n), !1);
		else if (this._accept(4)) return e.appendChild(r), !0;
		else return this._backTo(n);
	}
	_parseTransform(e) {
		let t = new kS(), n = "", r = "";
		for (; !this._accept(6);) {
			let e;
			if (e = this._accept(5, !0)) e = this._accept(6, !0) || e, n += e;
			else if (this._token.type !== 14) n += this._accept(void 0, !0);
			else return !1;
		}
		for (; !this._accept(6);) {
			let e;
			if (e = this._accept(5, !0)) e = this._accept(5, !0) || this._accept(6, !0) || e, t.appendChild(new TS(e));
			else if (!(this._parseFormatString(t) || this._parseAnything(t))) return !1;
		}
		for (; !this._accept(4);) if (this._token.type !== 14) r += this._accept(void 0, !0);
		else return !1;
		try {
			t.regexp = new RegExp(n, r);
		} catch {
			return !1;
		}
		return e.transform = t, !0;
	}
	_parseFormatString(e) {
		let t = this._token;
		if (!this._accept(0)) return !1;
		let n = !1;
		this._accept(3) && (n = !0);
		let r = this._accept(8, !0);
		if (!r) return this._backTo(t), !1;
		if (!n || this._accept(4)) return e.appendChild(new AS(Number(r))), !0;
		if (!this._accept(1)) return this._backTo(t), !1;
		if (this._accept(6)) {
			let n = this._accept(9, !0);
			return !n || !this._accept(4) ? (this._backTo(t), !1) : (e.appendChild(new AS(Number(r), n)), !0);
		}
		if (this._accept(11)) {
			let t = this._until(4);
			if (t) return e.appendChild(new AS(Number(r), void 0, t, void 0)), !0;
		} else if (this._accept(12)) {
			let t = this._until(4);
			if (t) return e.appendChild(new AS(Number(r), void 0, void 0, t)), !0;
		} else if (this._accept(13)) {
			let t = this._until(1);
			if (t) {
				let n = this._until(4);
				if (n) return e.appendChild(new AS(Number(r), void 0, t, n)), !0;
			}
		} else {
			let t = this._until(4);
			if (t) return e.appendChild(new AS(Number(r), void 0, void 0, t)), !0;
		}
		return this._backTo(t), !1;
	}
	_parseAnything(e) {
		return this._token.type !== 14 && (e.appendChild(new TS(this._scanner.tokenText(this._token))), this._accept(void 0), !0);
	}
};
// ../../../node_modules/.pnpm/monaco-editor@0.52.2/node_modules/monaco-editor/esm/vs/editor/contrib/dropOrPasteInto/browser/edit.js
function FS(e, t, n) {
	return (typeof n.insertText == "string" ? n.insertText === "" : n.insertText.snippet === "") ? { edits: n.additionalEdit?.edits ?? [] } : { edits: [...t.map((t) => new ei(e, {
		range: t,
		text: typeof n.insertText == "string" ? PS.escape(n.insertText) + "$0" : n.insertText.snippet,
		insertAsSnippet: !0
	})), ...n.additionalEdit?.edits ?? []] };
}
function IS(e) {
	function t(e, t) {
		return "mimeType" in e ? e.mimeType === t.handledMimeType : !!t.kind && e.kind.contains(t.kind);
	}
	let n = /* @__PURE__ */ new Map();
	for (let r of e) for (let i of r.yieldTo ?? []) for (let a of e) if (a !== r && t(i, a)) {
		let e = n.get(r);
		e || (e = [], n.set(r, e)), e.push(a);
	}
	if (!n.size) return Array.from(e);
	let r = /* @__PURE__ */ new Set(), i = [];
	function a(e) {
		if (!e.length) return [];
		let t = e[0];
		if (i.includes(t)) return console.warn("Yield to cycle detected", t), e;
		if (r.has(t)) return a(e.slice(1));
		let o = [], s = n.get(t);
		return s && (i.push(t), o = a(s), i.pop()), r.add(t), [
			...o,
			t,
			...a(e.slice(1))
		];
	}
	return a(Array.from(e));
}
// ../../../node_modules/.pnpm/monaco-editor@0.52.2/node_modules/monaco-editor/esm/vs/editor/contrib/inlineProgress/browser/inlineProgress.js
var LS = function(e, t, n, r) {
	var i = arguments.length, a = i < 3 ? t : r === null ? r = Object.getOwnPropertyDescriptor(t, n) : r, o;
	if (typeof Reflect == "object" && typeof Reflect.decorate == "function") a = Reflect.decorate(e, t, n, r);
	else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (i < 3 ? o(a) : i > 3 ? o(t, n, a) : o(t, n)) || a);
	return i > 3 && a && Object.defineProperty(t, n, a), a;
}, RS = function(e, t) {
	return function(n, r) {
		t(n, r, e);
	};
}, zS = L.register({
	description: "inline-progress-widget",
	stickiness: 1,
	showIfCollapsed: !0,
	after: {
		content: "\xA0",
		inlineClassName: "inline-editor-progress-decoration",
		inlineClassNameAffectsLetterSpacing: !0
	}
}), BS = class e extends U {
	static {
		this.baseId = "editor.widget.inlineProgressWidget";
	}
	constructor(e, t, n, r, i) {
		super(), this.typeId = e, this.editor = t, this.range = n, this.delegate = i, this.allowEditorOverflow = !1, this.suppressMouseDown = !0, this.create(r), this.editor.addContentWidget(this), this.editor.layoutContentWidget(this);
	}
	create(e) {
		this.domNode = w(".inline-progress-widget"), this.domNode.role = "button", this.domNode.title = e;
		let t = w("span.icon");
		this.domNode.append(t), t.classList.add(..._l.asClassNameArray(v.loading), "codicon-modifier-spin");
		let n = () => {
			let e = this.editor.getOption(67);
			this.domNode.style.height = `${e}px`, this.domNode.style.width = `${Math.ceil(.8 * e)}px`;
		};
		n(), this._register(this.editor.onDidChangeConfiguration((e) => {
			(e.hasChanged(52) || e.hasChanged(67)) && n();
		})), this._register(_(this.domNode, on.CLICK, (e) => {
			this.delegate.cancel();
		}));
	}
	getId() {
		return e.baseId + "." + this.typeId;
	}
	getDomNode() {
		return this.domNode;
	}
	getPosition() {
		return {
			position: {
				lineNumber: this.range.startLineNumber,
				column: this.range.startColumn
			},
			preference: [0]
		};
	}
	dispose() {
		super.dispose(), this.editor.removeContentWidget(this);
	}
}, VS = class extends U {
	constructor(e, t, n) {
		super(), this.id = e, this._editor = t, this._instantiationService = n, this._showDelay = 500, this._showPromise = this._register(new Zr()), this._currentWidget = this._register(new Zr()), this._operationIdPool = 0, this._currentDecorations = t.createDecorationsCollection();
	}
	dispose() {
		super.dispose(), this._currentDecorations.clear();
	}
	async showWhile(e, t, n, r, i) {
		let a = this._operationIdPool++;
		this._currentOperation = a, this.clear(), this._showPromise.value = jn(() => {
			let n = E.fromPositions(e);
			this._currentDecorations.set([{
				range: n,
				options: zS
			}]).length > 0 && (this._currentWidget.value = this._instantiationService.createInstance(BS, this.id, this._editor, n, t, r));
		}, i ?? this._showDelay);
		try {
			return await n;
		} finally {
			this._currentOperation === a && (this.clear(), this._currentOperation = void 0);
		}
	}
	clear() {
		this._showPromise.clear(), this._currentDecorations.clear(), this._currentWidget.clear();
	}
};
VS = LS([RS(2, P)], VS);
// ../../../node_modules/.pnpm/monaco-editor@0.52.2/node_modules/monaco-editor/esm/vs/editor/contrib/message/browser/messageController.js
var HS = function(e, t, n, r) {
	var i = arguments.length, a = i < 3 ? t : r === null ? r = Object.getOwnPropertyDescriptor(t, n) : r, o;
	if (typeof Reflect == "object" && typeof Reflect.decorate == "function") a = Reflect.decorate(e, t, n, r);
	else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (i < 3 ? o(a) : i > 3 ? o(t, n, a) : o(t, n)) || a);
	return i > 3 && a && Object.defineProperty(t, n, a), a;
}, US = function(e, t) {
	return function(n, r) {
		t(n, r, e);
	};
}, WS, GS = class {
	static {
		WS = this;
	}
	static {
		this.ID = "editor.contrib.messageController";
	}
	static {
		this.MESSAGE_VISIBLE = new z("messageVisible", !1, B("messageVisible", "Whether the editor is currently showing an inline message"));
	}
	static get(e) {
		return e.getContribution(WS.ID);
	}
	constructor(e, t, n) {
		this._openerService = n, this._messageWidget = new Zr(), this._messageListeners = new g(), this._mouseOverMessage = !1, this._editor = e, this._visible = WS.MESSAGE_VISIBLE.bindTo(t);
	}
	dispose() {
		this._message?.dispose(), this._messageListeners.dispose(), this._messageWidget.dispose(), this._visible.reset();
	}
	showMessage(e, t) {
		gt(Do(e) ? e.value : e), this._visible.set(!0), this._messageWidget.clear(), this._messageListeners.clear(), this._message = Do(e) ? s(e, { actionHandler: {
			callback: (t) => {
				this.closeMessage(), ic(this._openerService, t, Do(e) ? e.isTrusted : void 0);
			},
			disposables: this._messageListeners
		} }) : void 0, this._messageWidget.value = new qS(this._editor, t, typeof e == "string" ? e : this._message.element), this._messageListeners.add(wt.debounce(this._editor.onDidBlurEditorText, (e, t) => t, 0)(() => {
			this._mouseOverMessage || this._messageWidget.value && Ns(zt(), this._messageWidget.value.getDomNode()) || this.closeMessage();
		})), this._messageListeners.add(this._editor.onDidChangeCursorPosition(() => this.closeMessage())), this._messageListeners.add(this._editor.onDidDispose(() => this.closeMessage())), this._messageListeners.add(this._editor.onDidChangeModel(() => this.closeMessage())), this._messageListeners.add(_(this._messageWidget.value.getDomNode(), on.MOUSE_ENTER, () => this._mouseOverMessage = !0, !0)), this._messageListeners.add(_(this._messageWidget.value.getDomNode(), on.MOUSE_LEAVE, () => this._mouseOverMessage = !1, !0));
		let n;
		this._messageListeners.add(this._editor.onMouseMove((e) => {
			e.target.position && (n ? n.containsPosition(e.target.position) || this.closeMessage() : n = new E(t.lineNumber - 3, 1, e.target.position.lineNumber + 3, 1));
		}));
	}
	closeMessage() {
		this._visible.reset(), this._messageListeners.clear(), this._messageWidget.value && this._messageListeners.add(qS.fadeOut(this._messageWidget.value));
	}
};
GS = WS = HS([US(1, j), US(2, p)], GS);
var KS = qt.bindToContribution(GS.get);
A(new KS({
	id: "leaveEditorMessage",
	precondition: GS.MESSAGE_VISIBLE,
	handler: (e) => e.closeMessage(),
	kbOpts: {
		weight: 130,
		primary: 9
	}
}));
var qS = class {
	static fadeOut(e) {
		let t = () => {
			e.dispose(), clearTimeout(n), e.getDomNode().removeEventListener("animationend", t);
		}, n = setTimeout(t, 110);
		return e.getDomNode().addEventListener("animationend", t), e.getDomNode().classList.add("fadeOut"), { dispose: t };
	}
	constructor(e, { lineNumber: t, column: n }, r) {
		this.allowEditorOverflow = !0, this.suppressMouseDown = !1, this._editor = e, this._editor.revealLinesInCenterIfOutsideViewport(t, t, 0), this._position = {
			lineNumber: t,
			column: n
		}, this._domNode = document.createElement("div"), this._domNode.classList.add("monaco-editor-overlaymessage"), this._domNode.style.marginLeft = "-6px";
		let i = document.createElement("div");
		i.classList.add("anchor", "top"), this._domNode.appendChild(i);
		let a = document.createElement("div");
		typeof r == "string" ? (a.classList.add("message"), a.textContent = r) : (r.classList.add("message"), a.appendChild(r)), this._domNode.appendChild(a);
		let o = document.createElement("div");
		o.classList.add("anchor", "below"), this._domNode.appendChild(o), this._editor.addContentWidget(this), this._domNode.classList.add("fadeIn");
	}
	dispose() {
		this._editor.removeContentWidget(this);
	}
	getId() {
		return "messageoverlay";
	}
	getDomNode() {
		return this._domNode;
	}
	getPosition() {
		return {
			position: this._position,
			preference: [1, 2],
			positionAffinity: 1
		};
	}
	afterRender(e) {
		this._domNode.classList.toggle("below", e === 2);
	}
};
T(GS.ID, GS, 4);
// ../../../node_modules/.pnpm/monaco-editor@0.52.2/node_modules/monaco-editor/esm/vs/base/common/errorMessage.js
function JS(e, t) {
	return t && (e.stack || e.stacktrace) ? B("stackTrace.format", "{0}: {1}", XS(e), YS(e.stack) || YS(e.stacktrace)) : XS(e);
}
function YS(e) {
	return Array.isArray(e) ? e.join("\n") : e;
}
function XS(e) {
	return e.code === "ERR_UNC_HOST_NOT_ALLOWED" ? `${e.message}. Please update the 'security.allowedUNCHosts' setting if you want to allow this host.` : typeof e.code == "string" && typeof e.errno == "number" && typeof e.syscall == "string" ? B("nodeExceptionMessage", "A system error occurred ({0})", e.message) : e.message || B("error.defaultMessage", "An unknown error occurred. Please consult the log for more details.");
}
function ZS(e = null, t = !1) {
	if (!e) return B("error.defaultMessage", "An unknown error occurred. Please consult the log for more details.");
	if (Array.isArray(e)) {
		let n = On(e), r = ZS(n[0], t);
		return n.length > 1 ? B("error.moreErrors", "{0} ({1} errors in total)", r, n.length) : r;
	}
	if (zn(e)) return e;
	if (e.detail) {
		let n = e.detail;
		if (n.error) return JS(n.error, t);
		if (n.exception) return JS(n.exception, t);
	}
	return e.stack ? JS(e, t) : e.message ? e.message : B("error.defaultMessage", "An unknown error occurred. Please consult the log for more details.");
}
// ../../../node_modules/.pnpm/monaco-editor@0.52.2/node_modules/monaco-editor/esm/vs/editor/contrib/dropOrPasteInto/browser/postEditWidget.js
var QS = function(e, t, n, r) {
	var i = arguments.length, a = i < 3 ? t : r === null ? r = Object.getOwnPropertyDescriptor(t, n) : r, o;
	if (typeof Reflect == "object" && typeof Reflect.decorate == "function") a = Reflect.decorate(e, t, n, r);
	else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (i < 3 ? o(a) : i > 3 ? o(t, n, a) : o(t, n)) || a);
	return i > 3 && a && Object.defineProperty(t, n, a), a;
}, $S = function(e, t) {
	return function(n, r) {
		t(n, r, e);
	};
}, eC, tC = class extends U {
	static {
		eC = this;
	}
	static {
		this.baseId = "editor.widget.postEditWidget";
	}
	constructor(e, t, n, r, i, a, o, s, c, l) {
		super(), this.typeId = e, this.editor = t, this.showCommand = r, this.range = i, this.edits = a, this.onSelectNewEdit = o, this._contextMenuService = s, this._keybindingService = l, this.allowEditorOverflow = !0, this.suppressMouseDown = !0, this.create(), this.visibleContext = n.bindTo(c), this.visibleContext.set(!0), this._register(Gt(() => this.visibleContext.reset())), this.editor.addContentWidget(this), this.editor.layoutContentWidget(this), this._register(Gt((() => this.editor.removeContentWidget(this)))), this._register(this.editor.onDidChangeCursorPosition((e) => {
			i.containsPosition(e.position) || this.dispose();
		})), this._register(wt.runAndSubscribe(l.onDidUpdateKeybindings, () => {
			this._updateButtonTitle();
		}));
	}
	_updateButtonTitle() {
		let e = this._keybindingService.lookupKeybinding(this.showCommand.id)?.getLabel();
		this.button.element.title = this.showCommand.label + (e ? ` (${e})` : "");
	}
	create() {
		this.domNode = w(".post-edit-widget"), this.button = this._register(new ko(this.domNode, { supportIcons: !0 })), this.button.label = "$(insert)", this._register(_(this.domNode, on.CLICK, () => this.showSelector()));
	}
	getId() {
		return eC.baseId + "." + this.typeId;
	}
	getDomNode() {
		return this.domNode;
	}
	getPosition() {
		return {
			position: this.range.getEndPosition(),
			preference: [2]
		};
	}
	showSelector() {
		this._contextMenuService.showContextMenu({
			getAnchor: () => {
				let e = Bi(this.button.element);
				return {
					x: e.left + e.width,
					y: e.top + e.height
				};
			},
			getActions: () => this.edits.allEdits.map((e, t) => Pr({
				id: "",
				label: e.title,
				checked: t === this.edits.activeEditIndex,
				run: () => {
					if (t !== this.edits.activeEditIndex) return this.onSelectNewEdit(t);
				}
			}))
		});
	}
};
tC = eC = QS([
	$S(7, Br),
	$S(8, j),
	$S(9, ft)
], tC);
var nC = class extends U {
	constructor(e, t, n, r, i, a, o) {
		super(), this._id = e, this._editor = t, this._visibleContext = n, this._showCommand = r, this._instantiationService = i, this._bulkEditService = a, this._notificationService = o, this._currentWidget = this._register(new Zr()), this._register(wt.any(t.onDidChangeModel, t.onDidChangeModelContent)(() => this.clear()));
	}
	async applyEditAndShowIfNeeded(e, t, n, r, i) {
		let a = this._editor.getModel();
		if (!a || !e.length) return;
		let o = t.allEdits.at(t.activeEditIndex);
		if (!o) return;
		let s = async (a) => {
			let o = this._editor.getModel();
			o && (await o.undo(), this.applyEditAndShowIfNeeded(e, {
				activeEditIndex: a,
				allEdits: t.allEdits
			}, n, r, i));
		}, c = (r, i) => {
			Li(r) || (this._notificationService.error(i), n && this.show(e[0], t, s));
		}, l;
		try {
			l = await r(o, i);
		} catch (e) {
			return c(e, B("resolveError", "Error resolving edit '{0}':\n{1}", o.title, ZS(e)));
		}
		if (i.isCancellationRequested) return;
		let u = FS(a.uri, e, l), d = e[0], f = a.deltaDecorations([], [{
			range: d,
			options: {
				description: "paste-line-suffix",
				stickiness: 0
			}
		}]);
		this._editor.focus();
		let p, m;
		try {
			p = await this._bulkEditService.apply(u, {
				editor: this._editor,
				token: i
			}), m = a.getDecorationRange(f[0]);
		} catch (e) {
			return c(e, B("applyError", "Error applying edit '{0}':\n{1}", o.title, ZS(e)));
		} finally {
			a.deltaDecorations(f, []);
		}
		i.isCancellationRequested || n && p.isApplied && t.allEdits.length > 1 && this.show(m ?? d, t, s);
	}
	show(e, t, n) {
		this.clear(), this._editor.hasModel() && (this._currentWidget.value = this._instantiationService.createInstance(tC, this._id, this._editor, this._visibleContext, this._showCommand, e, t, n));
	}
	clear() {
		this._currentWidget.clear();
	}
	tryShowSelector() {
		this._currentWidget.value?.showSelector();
	}
};
nC = QS([
	$S(4, P),
	$S(5, de),
	$S(6, t)
], nC);
// ../../../node_modules/.pnpm/monaco-editor@0.52.2/node_modules/monaco-editor/esm/vs/editor/contrib/dropOrPasteInto/browser/copyPasteController.js
var rC = function(e, t, n, r) {
	var i = arguments.length, a = i < 3 ? t : r === null ? r = Object.getOwnPropertyDescriptor(t, n) : r, o;
	if (typeof Reflect == "object" && typeof Reflect.decorate == "function") a = Reflect.decorate(e, t, n, r);
	else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (i < 3 ? o(a) : i > 3 ? o(t, n, a) : o(t, n)) || a);
	return i > 3 && a && Object.defineProperty(t, n, a), a;
}, iC = function(e, t) {
	return function(n, r) {
		t(n, r, e);
	};
}, aC, oC = "editor.changePasteType", sC = new z("pasteWidgetVisible", !1, B("pasteWidgetVisible", "Whether the paste widget is showing")), cC = "application/vnd.code.copyMetadata", lC = class extends U {
	static {
		aC = this;
	}
	static {
		this.ID = "editor.contrib.copyPasteActionController";
	}
	static get(e) {
		return e.getContribution(aC.ID);
	}
	constructor(e, t, n, r, i, a, o) {
		super(), this._bulkEditService = n, this._clipboardService = r, this._languageFeaturesService = i, this._quickInputService = a, this._progressService = o, this._editor = e;
		let s = e.getContainerDomNode();
		this._register(_(s, "copy", (e) => this.handleCopy(e))), this._register(_(s, "cut", (e) => this.handleCopy(e))), this._register(_(s, "paste", (e) => this.handlePaste(e), !0)), this._pasteProgressManager = this._register(new VS("pasteIntoEditor", e, t)), this._postPasteWidgetManager = this._register(t.createInstance(nC, "pasteIntoEditor", e, sC, {
			id: oC,
			label: B("postPasteWidgetTitle", "Show paste options...")
		}));
	}
	changePasteType() {
		this._postPasteWidgetManager.tryShowSelector();
	}
	pasteAs(e) {
		this._editor.focus();
		try {
			this._pasteAsActionContext = { preferred: e }, ac().execCommand("paste");
		} finally {
			this._pasteAsActionContext = void 0;
		}
	}
	clearWidgets() {
		this._postPasteWidgetManager.clear();
	}
	isPasteAsEnabled() {
		return this._editor.getOption(85).enabled;
	}
	async finishedPaste() {
		await this._currentPasteOperation;
	}
	handleCopy(e) {
		if (!this._editor.hasTextFocus() || (this._clipboardService.clearInternalState?.(), !e.clipboardData || !this.isPasteAsEnabled())) return;
		let t = this._editor.getModel(), n = this._editor.getSelections();
		if (!t || !n?.length) return;
		let r = this._editor.getOption(37), i = n, a = n.length === 1 && n[0].isEmpty();
		if (a) {
			if (!r) return;
			i = [new E(i[0].startLineNumber, 1, i[0].startLineNumber, 1 + t.getLineLength(i[0].startLineNumber))];
		}
		let o = this._editor._getViewModel()?.getPlainTextToCopy(n, r, mo), s = {
			multicursorText: Array.isArray(o) ? o : null,
			pasteOnNewLine: a,
			mode: null
		}, c = this._languageFeaturesService.documentPasteEditProvider.ordered(t).filter((e) => !!e.prepareDocumentPaste);
		if (!c.length) {
			this.setCopyMetadata(e.clipboardData, { defaultPastePayload: s });
			return;
		}
		let l = lS(e.clipboardData), u = c.flatMap((e) => e.copyMimeTypes ?? []), d = Zx();
		this.setCopyMetadata(e.clipboardData, {
			id: d,
			providerCopyMimeTypes: u,
			defaultPastePayload: s
		});
		let f = Te(async (e) => {
			let n = On(await Promise.all(c.map(async (n) => {
				try {
					return await n.prepareDocumentPaste(t, i, l, e);
				} catch (e) {
					console.error(e);
					return;
				}
			})));
			n.reverse();
			for (let e of n) for (let [t, n] of e) l.replace(t, n);
			return l;
		});
		aC._currentCopyOperation?.dataTransferPromise.cancel(), aC._currentCopyOperation = {
			handle: d,
			dataTransferPromise: f
		};
	}
	async handlePaste(e) {
		if (!e.clipboardData || !this._editor.hasTextFocus()) return;
		GS.get(this._editor)?.closeMessage(), this._currentPasteOperation?.cancel(), this._currentPasteOperation = void 0;
		let t = this._editor.getModel(), n = this._editor.getSelections();
		if (!n?.length || !t || this._editor.getOption(92) || !this.isPasteAsEnabled() && !this._pasteAsActionContext) return;
		let r = this.fetchCopyMetadata(e), i = fS(e.clipboardData);
		i.delete(cC);
		let a = [
			...e.clipboardData.types,
			...r?.providerCopyMimeTypes ?? [],
			Et.uriList
		], o = this._languageFeaturesService.documentPasteEditProvider.ordered(t).filter((e) => {
			let t = this._pasteAsActionContext?.preferred;
			return t && e.providedPasteEditKinds && !this.providerMatchesPreference(e, t) ? !1 : e.pasteMimeTypes?.some((e) => nS(e, a));
		});
		o.length ? (e.preventDefault(), e.stopImmediatePropagation(), this._pasteAsActionContext ? this.showPasteAsPick(this._pasteAsActionContext.preferred, o, n, i, r) : this.doPasteInline(o, n, i, r, e)) : this._pasteAsActionContext?.preferred && this.showPasteAsNoEditMessage(n, this._pasteAsActionContext.preferred);
	}
	showPasteAsNoEditMessage(e, t) {
		GS.get(this._editor)?.showMessage(B("pasteAsError", "No paste edits for '{0}' found", t instanceof aS ? t.value : t.providerId), e[0].getStartPosition());
	}
	doPasteInline(e, t, n, r, i) {
		let a = this._editor;
		if (!a.hasModel()) return;
		let o = new $c(a, 3, void 0), s = Te(async (a) => {
			let c = this._editor;
			if (!c.hasModel()) return;
			let l = c.getModel(), u = new g(), d = u.add(new Cn(a));
			u.add(o.token.onCancellationRequested(() => d.cancel()));
			let f = d.token;
			try {
				if (await this.mergeInDataFromCopy(n, r, f), f.isCancellationRequested) return;
				let a = e.filter((e) => this.isSupportedPasteProvider(e, n));
				if (!a.length || a.length === 1 && a[0] instanceof gS) return this.applyDefaultPasteHandler(n, r, f, i);
				let o = { triggerKind: is.Automatic }, s = await this.getPasteEdits(a, n, l, t, o, f);
				if (u.add(s), f.isCancellationRequested) return;
				if (s.edits.length === 1 && s.edits[0].provider instanceof gS) return this.applyDefaultPasteHandler(n, r, f, i);
				if (s.edits.length) {
					let e = c.getOption(85).showPasteSelector === "afterPaste";
					return this._postPasteWidgetManager.applyEditAndShowIfNeeded(t, {
						activeEditIndex: 0,
						allEdits: s.edits
					}, e, (e, n) => new Promise((r, i) => {
						(async () => {
							try {
								let a = e.provider.resolveDocumentPasteEdit?.(e, n), o = new vr(), s = a && await this._pasteProgressManager.showWhile(t[0].getEndPosition(), B("resolveProcess", "Resolving paste edit. Click to cancel"), Promise.race([o.p, a]), { cancel: () => (o.cancel(), i(new Di())) }, 0);
								return s && (e.additionalEdit = s.additionalEdit), r(e);
							} catch (e) {
								return i(e);
							}
						})();
					}), f);
				}
				await this.applyDefaultPasteHandler(n, r, f, i);
			} finally {
				u.dispose(), this._currentPasteOperation === s && (this._currentPasteOperation = void 0);
			}
		});
		this._pasteProgressManager.showWhile(t[0].getEndPosition(), B("pasteIntoEditorProgress", "Running paste handlers. Click to cancel and do basic paste"), s, { cancel: async () => {
			try {
				if (s.cancel(), o.token.isCancellationRequested) return;
				await this.applyDefaultPasteHandler(n, r, o.token, i);
			} finally {
				o.dispose();
			}
		} }).then(() => {
			o.dispose();
		}), this._currentPasteOperation = s;
	}
	showPasteAsPick(e, t, n, r, i) {
		let a = Te(async (o) => {
			let s = this._editor;
			if (!s.hasModel()) return;
			let c = s.getModel(), l = new g(), u = l.add(new $c(s, 3, void 0, o));
			try {
				if (await this.mergeInDataFromCopy(r, i, u.token), u.token.isCancellationRequested) return;
				let a = t.filter((t) => this.isSupportedPasteProvider(t, r, e));
				e && (a = a.filter((t) => this.providerMatchesPreference(t, e)));
				let o = {
					triggerKind: is.PasteAs,
					only: e && e instanceof aS ? e : void 0
				}, s = l.add(await this.getPasteEdits(a, r, c, n, o, u.token));
				if (u.token.isCancellationRequested) return;
				if (e && (s = {
					edits: s.edits.filter((t) => e instanceof aS ? e.contains(t.kind) : e.providerId === t.provider.id),
					dispose: s.dispose
				}), !s.edits.length) {
					o.only && this.showPasteAsNoEditMessage(n, o.only);
					return;
				}
				let d;
				if (d = e ? s.edits.at(0) : (await this._quickInputService.pick(s.edits.map((e) => ({
					label: e.title,
					description: e.kind?.value,
					edit: e
				})), { placeHolder: B("pasteAsPickerPlaceholder", "Select Paste Action") }))?.edit, !d) return;
				let f = FS(c.uri, n, d);
				await this._bulkEditService.apply(f, { editor: this._editor });
			} finally {
				l.dispose(), this._currentPasteOperation === a && (this._currentPasteOperation = void 0);
			}
		});
		this._progressService.withProgress({
			location: 10,
			title: B("pasteAsProgress", "Running paste handlers")
		}, () => a);
	}
	setCopyMetadata(e, t) {
		e.setData(cC, JSON.stringify(t));
	}
	fetchCopyMetadata(e) {
		if (!e.clipboardData) return;
		let t = e.clipboardData.getData(cC);
		if (t) try {
			return JSON.parse(t);
		} catch {
			return;
		}
		let [n, r] = Xi.getTextData(e.clipboardData);
		if (r) return { defaultPastePayload: {
			mode: r.mode,
			multicursorText: r.multicursorText ?? null,
			pasteOnNewLine: !!r.isFromEmptySelection
		} };
	}
	async mergeInDataFromCopy(e, t, n) {
		if (t?.id && aC._currentCopyOperation?.handle === t.id) {
			let t = await aC._currentCopyOperation.dataTransferPromise;
			if (n.isCancellationRequested) return;
			for (let [n, r] of t) e.replace(n, r);
		}
		if (!e.has(Et.uriList)) {
			let t = await this._clipboardService.readResources();
			if (n.isCancellationRequested) return;
			t.length && e.append(Et.uriList, Qx(iS.create(t)));
		}
	}
	async getPasteEdits(e, t, n, r, i, a) {
		let o = new g(), s = await f(Promise.all(e.map(async (e) => {
			try {
				let s = await e.provideDocumentPasteEdits?.(n, r, t, i, a);
				return s && o.add(s), s?.edits?.map((t) => ({
					...t,
					provider: e
				}));
			} catch (e) {
				Li(e) || console.error(e);
				return;
			}
		})), a);
		return {
			edits: IS(On(s ?? []).flat().filter((e) => !i.only || i.only.contains(e.kind))),
			dispose: () => o.dispose()
		};
	}
	async applyDefaultPasteHandler(e, t, n, r) {
		let i = await (e.get(Et.text) ?? e.get("text"))?.asString() ?? "";
		if (n.isCancellationRequested) return;
		let a = {
			clipboardEvent: r,
			text: i,
			pasteOnNewLine: t?.defaultPastePayload.pasteOnNewLine ?? !1,
			multicursorText: t?.defaultPastePayload.multicursorText ?? null,
			mode: null
		};
		this._editor.trigger("keyboard", "paste", a);
	}
	isSupportedPasteProvider(e, t, n) {
		return e.pasteMimeTypes?.some((e) => t.matches(e)) ? !n || this.providerMatchesPreference(e, n) : !1;
	}
	providerMatchesPreference(e, t) {
		return t instanceof aS ? !e.providedPasteEditKinds || e.providedPasteEditKinds.some((e) => t.contains(e)) : e.id === t.providerId;
	}
};
lC = aC = rC([
	iC(1, P),
	iC(2, de),
	iC(3, $o),
	iC(4, M),
	iC(5, Is),
	iC(6, Xe)
], lC);
// ../../../node_modules/.pnpm/monaco-editor@0.52.2/node_modules/monaco-editor/esm/vs/editor/contrib/clipboard/browser/clipboard.js
var uC = "9_cutcopypaste", dC = xs || document.queryCommandSupported("cut"), fC = xs || document.queryCommandSupported("copy"), pC = navigator.clipboard === void 0 || Ke ? document.queryCommandSupported("paste") : !0;
function mC(e) {
	return e.register(), e;
}
var hC = dC ? mC(new Lt({
	id: "editor.action.clipboardCutAction",
	precondition: void 0,
	kbOpts: xs ? {
		primary: 2102,
		win: {
			primary: 2102,
			secondary: [1044]
		},
		weight: 100
	} : void 0,
	menuOpts: [
		{
			menuId: F.MenubarEditMenu,
			group: "2_ccp",
			title: B({
				key: "miCut",
				comment: ["&& denotes a mnemonic"]
			}, "Cu&&t"),
			order: 1
		},
		{
			menuId: F.EditorContext,
			group: uC,
			title: B("actions.clipboard.cutLabel", "Cut"),
			when: I.writable,
			order: 1
		},
		{
			menuId: F.CommandPalette,
			group: "",
			title: B("actions.clipboard.cutLabel", "Cut"),
			order: 1
		},
		{
			menuId: F.SimpleEditorContext,
			group: uC,
			title: B("actions.clipboard.cutLabel", "Cut"),
			when: I.writable,
			order: 1
		}
	]
})) : void 0, gC = fC ? mC(new Lt({
	id: "editor.action.clipboardCopyAction",
	precondition: void 0,
	kbOpts: xs ? {
		primary: 2081,
		win: {
			primary: 2081,
			secondary: [2067]
		},
		weight: 100
	} : void 0,
	menuOpts: [
		{
			menuId: F.MenubarEditMenu,
			group: "2_ccp",
			title: B({
				key: "miCopy",
				comment: ["&& denotes a mnemonic"]
			}, "&&Copy"),
			order: 2
		},
		{
			menuId: F.EditorContext,
			group: uC,
			title: B("actions.clipboard.copyLabel", "Copy"),
			order: 2
		},
		{
			menuId: F.CommandPalette,
			group: "",
			title: B("actions.clipboard.copyLabel", "Copy"),
			order: 1
		},
		{
			menuId: F.SimpleEditorContext,
			group: uC,
			title: B("actions.clipboard.copyLabel", "Copy"),
			order: 2
		}
	]
})) : void 0;
Ta.appendMenuItem(F.MenubarEditMenu, {
	submenu: F.MenubarCopy,
	title: H("copy as", "Copy As"),
	group: "2_ccp",
	order: 3
}), Ta.appendMenuItem(F.EditorContext, {
	submenu: F.EditorContextCopy,
	title: H("copy as", "Copy As"),
	group: uC,
	order: 3
}), Ta.appendMenuItem(F.EditorContext, {
	submenu: F.EditorContextShare,
	title: H("share", "Share"),
	group: "11_share",
	order: -1,
	when: N.and(N.notEquals("resourceScheme", "output"), I.editorTextFocus)
}), Ta.appendMenuItem(F.ExplorerContext, {
	submenu: F.ExplorerContextShare,
	title: H("share", "Share"),
	group: "11_share",
	order: -1
});
var _C = pC ? mC(new Lt({
	id: "editor.action.clipboardPasteAction",
	precondition: void 0,
	kbOpts: xs ? {
		primary: 2100,
		win: {
			primary: 2100,
			secondary: [1043]
		},
		linux: {
			primary: 2100,
			secondary: [1043]
		},
		weight: 100
	} : void 0,
	menuOpts: [
		{
			menuId: F.MenubarEditMenu,
			group: "2_ccp",
			title: B({
				key: "miPaste",
				comment: ["&& denotes a mnemonic"]
			}, "&&Paste"),
			order: 4
		},
		{
			menuId: F.EditorContext,
			group: uC,
			title: B("actions.clipboard.pasteLabel", "Paste"),
			when: I.writable,
			order: 4
		},
		{
			menuId: F.CommandPalette,
			group: "",
			title: B("actions.clipboard.pasteLabel", "Paste"),
			order: 1
		},
		{
			menuId: F.SimpleEditorContext,
			group: uC,
			title: B("actions.clipboard.pasteLabel", "Paste"),
			when: I.writable,
			order: 4
		}
	]
})) : void 0, vC = class extends O {
	constructor() {
		super({
			id: "editor.action.clipboardCopyWithSyntaxHighlightingAction",
			label: B("actions.clipboard.copyWithSyntaxHighlightingLabel", "Copy With Syntax Highlighting"),
			alias: "Copy With Syntax Highlighting",
			precondition: void 0,
			kbOpts: {
				kbExpr: I.textInputFocus,
				primary: 0,
				weight: 100
			}
		});
	}
	run(e, t) {
		t.hasModel() && (t.getOption(37) || !t.getSelection().isEmpty()) && (Qc.forceCopyWithSyntaxHighlighting = !0, t.focus(), t.getContainerDomNode().ownerDocument.execCommand("copy"), Qc.forceCopyWithSyntaxHighlighting = !1);
	}
};
function yC(e, t) {
	e && (e.addImplementation(1e4, "code-editor", (e, n) => {
		let r = e.get(Ln).getFocusedCodeEditor();
		if (r && r.hasTextFocus()) {
			let e = r.getOption(37), n = r.getSelection();
			return n && n.isEmpty() && !e || r.getContainerDomNode().ownerDocument.execCommand(t), !0;
		}
		return !1;
	}), e.addImplementation(0, "generic-dom", (e, n) => (ac().execCommand(t), !0)));
}
yC(hC, "cut"), yC(gC, "copy"), _C && (_C.addImplementation(1e4, "code-editor", (e, t) => {
	let n = e.get(Ln), r = e.get($o), i = n.getFocusedCodeEditor();
	return i && i.hasTextFocus() ? i.getContainerDomNode().ownerDocument.execCommand("paste") ? lC.get(i)?.finishedPaste() ?? Promise.resolve() : !wo || (async () => {
		let e = await r.readText();
		if (e !== "") {
			let t = kl.INSTANCE.get(e), n = !1, r = null, a = null;
			t && (n = i.getOption(37) && !!t.isFromEmptySelection, r = t.multicursorText === void 0 ? null : t.multicursorText, a = t.mode), i.trigger("keyboard", "paste", {
				text: e,
				pasteOnNewLine: n,
				multicursorText: r,
				mode: a
			});
		}
	})() : !1;
}), _C.addImplementation(0, "generic-dom", (e, t) => (ac().execCommand("paste"), !0))), fC && k(vC);
// ../../../node_modules/.pnpm/monaco-editor@0.52.2/node_modules/monaco-editor/esm/vs/editor/contrib/codeAction/common/types.js
var bC = new class {
	constructor() {
		this.QuickFix = new aS("quickfix"), this.Refactor = new aS("refactor"), this.RefactorExtract = this.Refactor.append("extract"), this.RefactorInline = this.Refactor.append("inline"), this.RefactorMove = this.Refactor.append("move"), this.RefactorRewrite = this.Refactor.append("rewrite"), this.Notebook = new aS("notebook"), this.Source = new aS("source"), this.SourceOrganizeImports = this.Source.append("organizeImports"), this.SourceFixAll = this.Source.append("fixAll"), this.SurroundWith = this.Refactor.append("surround");
	}
}(), xC;
(function(e) {
	e.Refactor = "refactor", e.RefactorPreview = "refactor preview", e.Lightbulb = "lightbulb", e.Default = "other (default)", e.SourceAction = "source action", e.QuickFix = "quick fix action", e.FixAll = "fix all", e.OrganizeImports = "organize imports", e.AutoFix = "auto fix", e.QuickFixHover = "quick fix hover window", e.OnSave = "save participants", e.ProblemsView = "problems view";
})(xC ||= {});
function SC(e, t) {
	return !(e.include && !e.include.intersects(t) || e.excludes && e.excludes.some((n) => wC(t, n, e.include)) || !e.includeSourceActions && bC.Source.contains(t));
}
function CC(e, t) {
	let n = t.kind ? new aS(t.kind) : void 0;
	return !(e.include && (!n || !e.include.contains(n)) || e.excludes && n && e.excludes.some((t) => wC(n, t, e.include)) || !e.includeSourceActions && n && bC.Source.contains(n) || e.onlyIncludePreferredActions && !t.isPreferred);
}
function wC(e, t, n) {
	return !(!t.contains(e) || n && t.contains(n));
}
var TC = class e {
	static fromUser(t, n) {
		return !t || typeof t != "object" ? new e(n.kind, n.apply, !1) : new e(e.getKindFromUser(t, n.kind), e.getApplyFromUser(t, n.apply), e.getPreferredUser(t));
	}
	static getApplyFromUser(e, t) {
		switch (typeof e.apply == "string" ? e.apply.toLowerCase() : "") {
			case "first": return "first";
			case "never": return "never";
			case "ifsingle": return "ifSingle";
			default: return t;
		}
	}
	static getKindFromUser(e, t) {
		return typeof e.kind == "string" ? new aS(e.kind) : t;
	}
	static getPreferredUser(e) {
		return typeof e.preferred == "boolean" && e.preferred;
	}
	constructor(e, t, n) {
		this.kind = e, this.apply = t, this.preferred = n;
	}
}, EC = class {
	constructor(e, t, n) {
		this.action = e, this.provider = t, this.highlightRange = n;
	}
	async resolve(e) {
		if (this.provider?.resolveCodeAction && !this.action.edit) {
			let t;
			try {
				t = await this.provider.resolveCodeAction(this.action, e);
			} catch (e) {
				i(e);
			}
			t && (this.action.edit = t.edit);
		}
		return this;
	}
}, DC = "editor.action.codeAction", OC = "editor.action.quickFix", kC = "editor.action.autoFix", AC = "editor.action.refactor", jC = "editor.action.sourceAction", MC = "editor.action.organizeImports", NC = "editor.action.fixAll", PC = class e extends U {
	static codeActionsPreferredComparator(e, t) {
		return e.isPreferred && !t.isPreferred ? -1 : !e.isPreferred && t.isPreferred ? 1 : 0;
	}
	static codeActionsComparator({ action: t }, { action: n }) {
		return t.isAI && !n.isAI ? 1 : !t.isAI && n.isAI ? -1 : zl(t.diagnostics) ? zl(n.diagnostics) ? e.codeActionsPreferredComparator(t, n) : -1 : zl(n.diagnostics) ? 1 : e.codeActionsPreferredComparator(t, n);
	}
	constructor(t, n, r) {
		super(), this.documentation = n, this._register(r), this.allActions = [...t].sort(e.codeActionsComparator), this.validActions = this.allActions.filter(({ action: e }) => !e.disabled);
	}
	get hasAutoFix() {
		return this.validActions.some(({ action: e }) => !!e.kind && bC.QuickFix.contains(new aS(e.kind)) && !!e.isPreferred);
	}
	get hasAIFix() {
		return this.validActions.some(({ action: e }) => !!e.isAI);
	}
	get allAIFixes() {
		return this.validActions.every(({ action: e }) => !!e.isAI);
	}
}, FC = {
	actions: [],
	documentation: void 0
};
async function IC(e, t, n, r, a, o) {
	let s = r.filter || {}, c = {
		...s,
		excludes: [...s.excludes || [], bC.Notebook]
	}, l = {
		only: s.include?.value,
		trigger: r.type
	}, u = new Dr(t, o), d = LC(e, t, r.type === 2 ? c : s), f = new g(), p = d.map(async (e) => {
		try {
			a.report(e);
			let r = await e.provideCodeActions(t, n, l, u.token);
			if (r && f.add(r), u.token.isCancellationRequested) return FC;
			let i = (r?.actions || []).filter((e) => e && CC(s, e)), o = zC(e, i, s.include);
			return {
				actions: i.map((t) => new EC(t, e)),
				documentation: o
			};
		} catch (e) {
			if (Li(e)) throw e;
			return i(e), FC;
		}
	}), m = e.onDidChange(() => {
		let n = e.all(t);
		At(n, d) || u.cancel();
	});
	try {
		let n = await Promise.all(p), i = n.map((e) => e.actions).flat();
		return new PC(i, [...On(n.map((e) => e.documentation)), ...RC(e, t, r, i)], f);
	} finally {
		m.dispose(), u.dispose();
	}
}
function LC(e, t, n) {
	return e.all(t).filter((e) => !e.providedCodeActionKinds || e.providedCodeActionKinds.some((e) => SC(n, new aS(e))));
}
function* RC(e, t, n, r) {
	if (t && r.length) for (let i of e.all(t)) i._getAdditionalMenuItems && (yield* i._getAdditionalMenuItems?.({
		trigger: n.type,
		only: n.filter?.include?.value
	}, r.map((e) => e.action)));
}
function zC(e, t, n) {
	if (!e.documentation) return;
	let r = e.documentation.map((e) => ({
		kind: new aS(e.kind),
		command: e.command
	}));
	if (n) {
		let e;
		for (let t of r) t.kind.contains(n) && (e ? e.kind.contains(t.kind) && (e = t) : e = t);
		if (e) return e?.command;
	}
	for (let e of t) if (e.kind) {
		for (let t of r) if (t.kind.contains(new aS(e.kind))) return t.command;
	}
}
var BC;
(function(e) {
	e.OnSave = "onSave", e.FromProblemsView = "fromProblemsView", e.FromCodeActions = "fromCodeActions", e.FromAILightbulb = "fromAILightbulb";
})(BC ||= {});
async function VC(e, n, r, i, a = C.None) {
	let o = e.get(de), s = e.get(ga), c = e.get(mc), l = e.get(t);
	if (c.publicLog2("codeAction.applyCodeAction", {
		codeActionTitle: n.action.title,
		codeActionKind: n.action.kind,
		codeActionIsPreferred: !!n.action.isPreferred,
		reason: r
	}), await n.resolve(a), !a.isCancellationRequested && (!n.action.edit?.edits.length || (await o.apply(n.action.edit, {
		editor: i?.editor,
		label: n.action.title,
		quotableLabel: n.action.title,
		code: "undoredo.codeAction",
		respectAutoSaveConfig: r !== BC.OnSave,
		showPreview: i?.preview
	})).isApplied) && n.action.command) try {
		await s.executeCommand(n.action.command.id, ...n.action.command.arguments || []);
	} catch (e) {
		let t = HC(e);
		l.error(typeof t == "string" ? t : B("applyCodeActionFailed", "An unknown error occurred while applying the code action"));
	}
}
function HC(e) {
	if (typeof e == "string") return e;
	if (e instanceof Error && typeof e.message == "string") return e.message;
}
Ol.registerCommand("_executeCodeActionProvider", async function(e, t, n, r, i) {
	if (!(t instanceof De)) throw vi();
	let { codeActionProvider: a } = e.get(M), o = e.get(je).getModel(t);
	if (!o) throw vi();
	let s = V.isISelection(n) ? V.liftSelection(n) : E.isIRange(n) ? o.validateRange(n) : void 0;
	if (!s) throw vi();
	let c = typeof r == "string" ? new aS(r) : void 0, l = await IC(a, o, s, {
		type: 1,
		triggerAction: xC.Default,
		filter: {
			includeSourceActions: !0,
			include: c
		}
	}, Dt.None, C.None), u = [], d = Math.min(l.validActions.length, typeof i == "number" ? i : 0);
	for (let e = 0; e < d; e++) u.push(l.validActions[e].resolve(C.None));
	try {
		return await Promise.all(u), l.validActions.map((e) => e.action);
	} finally {
		setTimeout(() => l.dispose(), 100);
	}
});
// ../../../node_modules/.pnpm/monaco-editor@0.52.2/node_modules/monaco-editor/esm/vs/editor/contrib/codeAction/browser/codeActionKeybindingResolver.js
var UC = function(e, t, n, r) {
	var i = arguments.length, a = i < 3 ? t : r === null ? r = Object.getOwnPropertyDescriptor(t, n) : r, o;
	if (typeof Reflect == "object" && typeof Reflect.decorate == "function") a = Reflect.decorate(e, t, n, r);
	else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (i < 3 ? o(a) : i > 3 ? o(t, n, a) : o(t, n)) || a);
	return i > 3 && a && Object.defineProperty(t, n, a), a;
}, WC = function(e, t) {
	return function(n, r) {
		t(n, r, e);
	};
}, GC, KC = class {
	static {
		GC = this;
	}
	static {
		this.codeActionCommands = [
			AC,
			DC,
			jC,
			MC,
			NC
		];
	}
	constructor(e) {
		this.keybindingService = e;
	}
	getResolver() {
		let e = new Oo(() => this.keybindingService.getKeybindings().filter((e) => GC.codeActionCommands.indexOf(e.command) >= 0).filter((e) => e.resolvedKeybinding).map((e) => {
			let t = e.commandArgs;
			return e.command === "editor.action.organizeImports" ? t = { kind: bC.SourceOrganizeImports.value } : e.command === "editor.action.fixAll" && (t = { kind: bC.SourceFixAll.value }), {
				resolvedKeybinding: e.resolvedKeybinding,
				...TC.fromUser(t, {
					kind: aS.None,
					apply: "never"
				})
			};
		}));
		return (t) => {
			if (t.kind) return this.bestKeybindingForCodeAction(t, e.value)?.resolvedKeybinding;
		};
	}
	bestKeybindingForCodeAction(e, t) {
		if (!e.kind) return;
		let n = new aS(e.kind);
		return t.filter((e) => e.kind.contains(n)).filter((t) => !t.preferred || e.isPreferred).reduceRight((e, t) => e ? e.kind.contains(t.kind) ? t : e : t, void 0);
	}
};
KC = GC = UC([WC(0, ft)], KC), S("symbolIcon.arrayForeground", or, B("symbolIcon.arrayForeground", "The foreground color for array symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")), S("symbolIcon.booleanForeground", or, B("symbolIcon.booleanForeground", "The foreground color for boolean symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")), S("symbolIcon.classForeground", {
	dark: "#EE9D28",
	light: "#D67E00",
	hcDark: "#EE9D28",
	hcLight: "#D67E00"
}, B("symbolIcon.classForeground", "The foreground color for class symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")), S("symbolIcon.colorForeground", or, B("symbolIcon.colorForeground", "The foreground color for color symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")), S("symbolIcon.constantForeground", or, B("symbolIcon.constantForeground", "The foreground color for constant symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")), S("symbolIcon.constructorForeground", {
	dark: "#B180D7",
	light: "#652D90",
	hcDark: "#B180D7",
	hcLight: "#652D90"
}, B("symbolIcon.constructorForeground", "The foreground color for constructor symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")), S("symbolIcon.enumeratorForeground", {
	dark: "#EE9D28",
	light: "#D67E00",
	hcDark: "#EE9D28",
	hcLight: "#D67E00"
}, B("symbolIcon.enumeratorForeground", "The foreground color for enumerator symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")), S("symbolIcon.enumeratorMemberForeground", {
	dark: "#75BEFF",
	light: "#007ACC",
	hcDark: "#75BEFF",
	hcLight: "#007ACC"
}, B("symbolIcon.enumeratorMemberForeground", "The foreground color for enumerator member symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")), S("symbolIcon.eventForeground", {
	dark: "#EE9D28",
	light: "#D67E00",
	hcDark: "#EE9D28",
	hcLight: "#D67E00"
}, B("symbolIcon.eventForeground", "The foreground color for event symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")), S("symbolIcon.fieldForeground", {
	dark: "#75BEFF",
	light: "#007ACC",
	hcDark: "#75BEFF",
	hcLight: "#007ACC"
}, B("symbolIcon.fieldForeground", "The foreground color for field symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")), S("symbolIcon.fileForeground", or, B("symbolIcon.fileForeground", "The foreground color for file symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")), S("symbolIcon.folderForeground", or, B("symbolIcon.folderForeground", "The foreground color for folder symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")), S("symbolIcon.functionForeground", {
	dark: "#B180D7",
	light: "#652D90",
	hcDark: "#B180D7",
	hcLight: "#652D90"
}, B("symbolIcon.functionForeground", "The foreground color for function symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")), S("symbolIcon.interfaceForeground", {
	dark: "#75BEFF",
	light: "#007ACC",
	hcDark: "#75BEFF",
	hcLight: "#007ACC"
}, B("symbolIcon.interfaceForeground", "The foreground color for interface symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")), S("symbolIcon.keyForeground", or, B("symbolIcon.keyForeground", "The foreground color for key symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")), S("symbolIcon.keywordForeground", or, B("symbolIcon.keywordForeground", "The foreground color for keyword symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")), S("symbolIcon.methodForeground", {
	dark: "#B180D7",
	light: "#652D90",
	hcDark: "#B180D7",
	hcLight: "#652D90"
}, B("symbolIcon.methodForeground", "The foreground color for method symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")), S("symbolIcon.moduleForeground", or, B("symbolIcon.moduleForeground", "The foreground color for module symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")), S("symbolIcon.namespaceForeground", or, B("symbolIcon.namespaceForeground", "The foreground color for namespace symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")), S("symbolIcon.nullForeground", or, B("symbolIcon.nullForeground", "The foreground color for null symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")), S("symbolIcon.numberForeground", or, B("symbolIcon.numberForeground", "The foreground color for number symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")), S("symbolIcon.objectForeground", or, B("symbolIcon.objectForeground", "The foreground color for object symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")), S("symbolIcon.operatorForeground", or, B("symbolIcon.operatorForeground", "The foreground color for operator symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")), S("symbolIcon.packageForeground", or, B("symbolIcon.packageForeground", "The foreground color for package symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")), S("symbolIcon.propertyForeground", or, B("symbolIcon.propertyForeground", "The foreground color for property symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")), S("symbolIcon.referenceForeground", or, B("symbolIcon.referenceForeground", "The foreground color for reference symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")), S("symbolIcon.snippetForeground", or, B("symbolIcon.snippetForeground", "The foreground color for snippet symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")), S("symbolIcon.stringForeground", or, B("symbolIcon.stringForeground", "The foreground color for string symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")), S("symbolIcon.structForeground", or, B("symbolIcon.structForeground", "The foreground color for struct symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")), S("symbolIcon.textForeground", or, B("symbolIcon.textForeground", "The foreground color for text symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")), S("symbolIcon.typeParameterForeground", or, B("symbolIcon.typeParameterForeground", "The foreground color for type parameter symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")), S("symbolIcon.unitForeground", or, B("symbolIcon.unitForeground", "The foreground color for unit symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")), S("symbolIcon.variableForeground", {
	dark: "#75BEFF",
	light: "#007ACC",
	hcDark: "#75BEFF",
	hcLight: "#007ACC"
}, B("symbolIcon.variableForeground", "The foreground color for variable symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));
// ../../../node_modules/.pnpm/monaco-editor@0.52.2/node_modules/monaco-editor/esm/vs/editor/contrib/codeAction/browser/codeActionMenu.js
var qC = Object.freeze({
	kind: aS.Empty,
	title: B("codeAction.widget.id.more", "More Actions...")
}), JC = Object.freeze([
	{
		kind: bC.QuickFix,
		title: B("codeAction.widget.id.quickfix", "Quick Fix")
	},
	{
		kind: bC.RefactorExtract,
		title: B("codeAction.widget.id.extract", "Extract"),
		icon: v.wrench
	},
	{
		kind: bC.RefactorInline,
		title: B("codeAction.widget.id.inline", "Inline"),
		icon: v.wrench
	},
	{
		kind: bC.RefactorRewrite,
		title: B("codeAction.widget.id.convert", "Rewrite"),
		icon: v.wrench
	},
	{
		kind: bC.RefactorMove,
		title: B("codeAction.widget.id.move", "Move"),
		icon: v.wrench
	},
	{
		kind: bC.SurroundWith,
		title: B("codeAction.widget.id.surround", "Surround With"),
		icon: v.surroundWith
	},
	{
		kind: bC.Source,
		title: B("codeAction.widget.id.source", "Source Action"),
		icon: v.symbolFile
	},
	qC
]);
function YC(e, t, n) {
	if (!t) return e.map((e) => ({
		kind: "action",
		item: e,
		group: qC,
		disabled: !!e.action.disabled,
		label: e.action.disabled || e.action.title,
		canPreview: !!e.action.edit?.edits.length
	}));
	let r = JC.map((e) => ({
		group: e,
		actions: []
	}));
	for (let t of e) {
		let e = t.action.kind ? new aS(t.action.kind) : aS.None;
		for (let n of r) if (n.group.kind.contains(e)) {
			n.actions.push(t);
			break;
		}
	}
	let i = [];
	for (let e of r) if (e.actions.length) {
		i.push({
			kind: "header",
			group: e.group
		});
		for (let t of e.actions) {
			let r = e.group;
			i.push({
				kind: "action",
				item: t,
				group: t.action.isAI ? {
					title: r.title,
					kind: r.kind,
					icon: v.sparkle
				} : r,
				label: t.action.title,
				disabled: !!t.action.disabled,
				keybinding: n(t.action)
			});
		}
	}
	return i;
}
// ../../../node_modules/.pnpm/monaco-editor@0.52.2/node_modules/monaco-editor/esm/vs/editor/contrib/codeAction/browser/lightBulbWidget.js
var XC = function(e, t, n, r) {
	var i = arguments.length, a = i < 3 ? t : r === null ? r = Object.getOwnPropertyDescriptor(t, n) : r, o;
	if (typeof Reflect == "object" && typeof Reflect.decorate == "function") a = Reflect.decorate(e, t, n, r);
	else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (i < 3 ? o(a) : i > 3 ? o(t, n, a) : o(t, n)) || a);
	return i > 3 && a && Object.defineProperty(t, n, a), a;
}, ZC = function(e, t) {
	return function(n, r) {
		t(n, r, e);
	};
}, QC, $C = Jn("gutter-lightbulb", v.lightBulb, B("gutterLightbulbWidget", "Icon which spawns code actions menu from the gutter when there is no space in the editor.")), ew = Jn("gutter-lightbulb-auto-fix", v.lightbulbAutofix, B("gutterLightbulbAutoFixWidget", "Icon which spawns code actions menu from the gutter when there is no space in the editor and a quick fix is available.")), tw = Jn("gutter-lightbulb-sparkle", v.lightbulbSparkle, B("gutterLightbulbAIFixWidget", "Icon which spawns code actions menu from the gutter when there is no space in the editor and an AI fix is available.")), nw = Jn("gutter-lightbulb-aifix-auto-fix", v.lightbulbSparkleAutofix, B("gutterLightbulbAIFixAutoFixWidget", "Icon which spawns code actions menu from the gutter when there is no space in the editor and an AI fix and a quick fix is available.")), rw = Jn("gutter-lightbulb-sparkle-filled", v.sparkleFilled, B("gutterLightbulbSparkleFilledWidget", "Icon which spawns code actions menu from the gutter when there is no space in the editor and an AI fix and a quick fix is available.")), iw;
(function(e) {
	e.Hidden = { type: 0 };
	class t {
		constructor(e, t, n, r) {
			this.actions = e, this.trigger = t, this.editorPosition = n, this.widgetPosition = r, this.type = 1;
		}
	}
	e.Showing = t;
})(iw ||= {});
var aw = class extends U {
	static {
		QC = this;
	}
	static {
		this.GUTTER_DECORATION = L.register({
			description: "codicon-gutter-lightbulb-decoration",
			glyphMarginClassName: _l.asClassName(v.lightBulb),
			glyphMargin: { position: ye.Left },
			stickiness: 1
		});
	}
	static {
		this.ID = "editor.contrib.lightbulbWidget";
	}
	static {
		this._posPref = [0];
	}
	constructor(e, t) {
		super(), this._editor = e, this._keybindingService = t, this._onClick = this._register(new x()), this.onClick = this._onClick.event, this._state = iw.Hidden, this._gutterState = iw.Hidden, this._iconClasses = [], this.lightbulbClasses = [
			"codicon-" + $C.id,
			"codicon-" + nw.id,
			"codicon-" + ew.id,
			"codicon-" + tw.id,
			"codicon-" + rw.id
		], this.gutterDecoration = QC.GUTTER_DECORATION, this._domNode = w("div.lightBulbWidget"), this._domNode.role = "listbox", this._register(ce.ignoreTarget(this._domNode)), this._editor.addContentWidget(this), this._register(this._editor.onDidChangeModelContent((e) => {
			let t = this._editor.getModel();
			(this.state.type !== 1 || !t || this.state.editorPosition.lineNumber >= t.getLineCount()) && this.hide(), (this.gutterState.type !== 1 || !t || this.gutterState.editorPosition.lineNumber >= t.getLineCount()) && this.gutterHide();
		})), this._register(ti(this._domNode, (e) => {
			if (this.state.type !== 1) return;
			this._editor.focus(), e.preventDefault();
			let { top: t, height: n } = Bi(this._domNode), r = this._editor.getOption(67), i = Math.floor(r / 3);
			this.state.widgetPosition.position !== null && this.state.widgetPosition.position.lineNumber < this.state.editorPosition.lineNumber && (i += r), this._onClick.fire({
				x: e.posx,
				y: t + n + i,
				actions: this.state.actions,
				trigger: this.state.trigger
			});
		})), this._register(_(this._domNode, "mouseenter", (e) => {
			(e.buttons & 1) == 1 && this.hide();
		})), this._register(wt.runAndSubscribe(this._keybindingService.onDidUpdateKeybindings, () => {
			this._preferredKbLabel = this._keybindingService.lookupKeybinding("editor.action.autoFix")?.getLabel() ?? void 0, this._quickFixKbLabel = this._keybindingService.lookupKeybinding("editor.action.quickFix")?.getLabel() ?? void 0, this._updateLightBulbTitleAndIcon();
		})), this._register(this._editor.onMouseDown(async (e) => {
			if (!e.target.element || !this.lightbulbClasses.some((t) => e.target.element && e.target.element.classList.contains(t)) || this.gutterState.type !== 1) return;
			this._editor.focus();
			let { top: t, height: n } = Bi(e.target.element), r = this._editor.getOption(67), i = Math.floor(r / 3);
			this.gutterState.widgetPosition.position !== null && this.gutterState.widgetPosition.position.lineNumber < this.gutterState.editorPosition.lineNumber && (i += r), this._onClick.fire({
				x: e.event.posx,
				y: t + n + i,
				actions: this.gutterState.actions,
				trigger: this.gutterState.trigger
			});
		}));
	}
	dispose() {
		super.dispose(), this._editor.removeContentWidget(this), this._gutterDecorationID && this._removeGutterDecoration(this._gutterDecorationID);
	}
	getId() {
		return "LightBulbWidget";
	}
	getDomNode() {
		return this._domNode;
	}
	getPosition() {
		return this._state.type === 1 ? this._state.widgetPosition : null;
	}
	update(e, t, n) {
		if (e.validActions.length <= 0 || !this._editor.hasTextFocus() || !this._editor.getOptions().get(65).enabled) return this.gutterHide(), this.hide();
		let r = this._editor.getModel();
		if (!r) return this.gutterHide(), this.hide();
		let { lineNumber: i, column: a } = r.validatePosition(n), o = r.getOptions().tabSize, s = this._editor.getOptions().get(50), c = r.getLineContent(i), l = Qa(c, o), u = s.spaceWidth * l > 22, d = (e) => e > 2 && this._editor.getTopForLineNumber(e) === this._editor.getTopForLineNumber(e - 1), f = this._editor.getLineDecorations(i), p = !1;
		if (f) for (let e of f) {
			let t = e.options.glyphMarginClassName;
			if (t && !this.lightbulbClasses.some((e) => t.includes(e))) {
				p = !0;
				break;
			}
		}
		let m = i, h = 1;
		if (!u) {
			let o = (e) => {
				let t = r.getLineContent(e);
				return /^\s*$|^\s+/.test(t) || t.length <= h;
			};
			if (i > 1 && !d(i - 1)) {
				let a = i === r.getLineCount(), s = i > 1 && o(i - 1), c = !a && o(i + 1), l = o(i), u = !c && !s;
				if (!c && !s && !p) return this.gutterState = new iw.Showing(e, t, n, {
					position: {
						lineNumber: m,
						column: h
					},
					preference: QC._posPref
				}), this.renderGutterLightbub(), this.hide();
				s || a || s && !l ? --m : (c || u && l) && (m += 1);
			} else if (i === 1 && (i === r.getLineCount() || !o(i + 1) && !o(i))) {
				if (this.gutterState = new iw.Showing(e, t, n, {
					position: {
						lineNumber: m,
						column: h
					},
					preference: QC._posPref
				}), p) this.gutterHide();
				else return this.renderGutterLightbub(), this.hide();
			} else if (i < r.getLineCount() && !d(i + 1)) m += 1;
			else if (a * s.spaceWidth < 22) return this.hide();
			h = /^\S\s*$/.test(r.getLineContent(m)) ? 2 : 1;
		}
		this.state = new iw.Showing(e, t, n, {
			position: {
				lineNumber: m,
				column: h
			},
			preference: QC._posPref
		}), this._gutterDecorationID && (this._removeGutterDecoration(this._gutterDecorationID), this.gutterHide());
		let ee = e.validActions;
		e.validActions[0].action.kind, ee.length, this._editor.layoutContentWidget(this);
	}
	hide() {
		this.state !== iw.Hidden && (this.state = iw.Hidden, this._editor.layoutContentWidget(this));
	}
	gutterHide() {
		this.gutterState !== iw.Hidden && (this._gutterDecorationID && this._removeGutterDecoration(this._gutterDecorationID), this.gutterState = iw.Hidden);
	}
	get state() {
		return this._state;
	}
	set state(e) {
		this._state = e, this._updateLightBulbTitleAndIcon();
	}
	get gutterState() {
		return this._gutterState;
	}
	set gutterState(e) {
		this._gutterState = e, this._updateGutterLightBulbTitleAndIcon();
	}
	_updateLightBulbTitleAndIcon() {
		if (this._domNode.classList.remove(...this._iconClasses), this._iconClasses = [], this.state.type !== 1) return;
		let e, t = !1;
		this.state.actions.allAIFixes ? (e = v.sparkleFilled, this.state.actions.validActions.length === 1 && (t = !0)) : e = this.state.actions.hasAutoFix ? this.state.actions.hasAIFix ? v.lightbulbSparkleAutofix : v.lightbulbAutofix : this.state.actions.hasAIFix ? v.lightbulbSparkle : v.lightBulb, this._updateLightbulbTitle(this.state.actions.hasAutoFix, t), this._iconClasses = _l.asClassNameArray(e), this._domNode.classList.add(...this._iconClasses);
	}
	_updateGutterLightBulbTitleAndIcon() {
		if (this.gutterState.type !== 1) return;
		let e, t = !1;
		this.gutterState.actions.allAIFixes ? (e = rw, this.gutterState.actions.validActions.length === 1 && (t = !0)) : e = this.gutterState.actions.hasAutoFix ? this.gutterState.actions.hasAIFix ? nw : ew : this.gutterState.actions.hasAIFix ? tw : $C, this._updateLightbulbTitle(this.gutterState.actions.hasAutoFix, t);
		let n = L.register({
			description: "codicon-gutter-lightbulb-decoration",
			glyphMarginClassName: _l.asClassName(e),
			glyphMargin: { position: ye.Left },
			stickiness: 1
		});
		this.gutterDecoration = n;
	}
	renderGutterLightbub() {
		let e = this._editor.getSelection();
		e && (this._gutterDecorationID === void 0 ? this._addGutterDecoration(e.startLineNumber) : this._updateGutterDecoration(this._gutterDecorationID, e.startLineNumber));
	}
	_addGutterDecoration(e) {
		this._editor.changeDecorations((t) => {
			this._gutterDecorationID = t.addDecoration(new E(e, 0, e, 0), this.gutterDecoration);
		});
	}
	_removeGutterDecoration(e) {
		this._editor.changeDecorations((t) => {
			t.removeDecoration(e), this._gutterDecorationID = void 0;
		});
	}
	_updateGutterDecoration(e, t) {
		this._editor.changeDecorations((n) => {
			n.changeDecoration(e, new E(t, 0, t, 0)), n.changeDecorationOptions(e, this.gutterDecoration);
		});
	}
	_updateLightbulbTitle(e, t) {
		this.state.type === 1 && (t ? this.title = B("codeActionAutoRun", "Run: {0}", this.state.actions.validActions[0].action.title) : e && this._preferredKbLabel ? this.title = B("preferredcodeActionWithKb", "Show Code Actions. Preferred Quick Fix Available ({0})", this._preferredKbLabel) : !e && this._quickFixKbLabel ? this.title = B("codeActionWithKb", "Show Code Actions ({0})", this._quickFixKbLabel) : e || (this.title = B("codeAction", "Show Code Actions")));
	}
	set title(e) {
		this._domNode.title = e;
	}
};
aw = QC = XC([ZC(1, ft)], aw);
// ../../../node_modules/.pnpm/monaco-editor@0.52.2/node_modules/monaco-editor/esm/vs/platform/actionWidget/browser/actionList.js
var ow = function(e, t, n, r) {
	var i = arguments.length, a = i < 3 ? t : r === null ? r = Object.getOwnPropertyDescriptor(t, n) : r, o;
	if (typeof Reflect == "object" && typeof Reflect.decorate == "function") a = Reflect.decorate(e, t, n, r);
	else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (i < 3 ? o(a) : i > 3 ? o(t, n, a) : o(t, n)) || a);
	return i > 3 && a && Object.defineProperty(t, n, a), a;
}, sw = function(e, t) {
	return function(n, r) {
		t(n, r, e);
	};
}, cw = "acceptSelectedCodeAction", lw = "previewSelectedCodeAction", uw = class {
	get templateId() {
		return "header";
	}
	renderTemplate(e) {
		e.classList.add("group-header");
		let t = document.createElement("span");
		return e.append(t), {
			container: e,
			text: t
		};
	}
	renderElement(e, t, n) {
		n.text.textContent = e.group?.title ?? "";
	}
	disposeTemplate(e) {}
}, dw = class {
	get templateId() {
		return "action";
	}
	constructor(e, t) {
		this._supportsPreview = e, this._keybindingService = t;
	}
	renderTemplate(e) {
		e.classList.add(this.templateId);
		let t = document.createElement("div");
		t.className = "icon", e.append(t);
		let n = document.createElement("span");
		return n.className = "title", e.append(n), {
			container: e,
			icon: t,
			text: n,
			keybinding: new kt(e, us)
		};
	}
	renderElement(e, t, n) {
		if (e.group?.icon ? (n.icon.className = _l.asClassName(e.group.icon), e.group.icon.color && (n.icon.style.color = oe(e.group.icon.color.id))) : (n.icon.className = _l.asClassName(v.lightBulb), n.icon.style.color = "var(--vscode-editorLightBulb-foreground)"), !e.item || !e.label) return;
		n.text.textContent = gw(e.label), n.keybinding.set(e.keybinding), Ya(!!e.keybinding, n.keybinding.element);
		let r = this._keybindingService.lookupKeybinding(cw)?.getLabel(), i = this._keybindingService.lookupKeybinding(lw)?.getLabel();
		n.container.classList.toggle("option-disabled", e.disabled), e.disabled ? n.container.title = e.label : r && i ? this._supportsPreview && e.canPreview ? n.container.title = B({
			key: "label-preview",
			comment: ["placeholders are keybindings, e.g \"F2 to Apply, Shift+F2 to Preview\""]
		}, "{0} to Apply, {1} to Preview", r, i) : n.container.title = B({
			key: "label",
			comment: ["placeholder is a keybinding, e.g \"F2 to Apply\""]
		}, "{0} to Apply", r) : n.container.title = "";
	}
	disposeTemplate(e) {
		e.keybinding.dispose();
	}
};
dw = ow([sw(1, ft)], dw);
var fw = class extends UIEvent {
	constructor() {
		super("acceptSelectedAction");
	}
}, pw = class extends UIEvent {
	constructor() {
		super("previewSelectedAction");
	}
};
function mw(e) {
	if (e.kind === "action") return e.label;
}
var hw = class extends U {
	constructor(e, t, n, r, i, a) {
		super(), this._delegate = r, this._contextViewService = i, this._keybindingService = a, this._actionLineHeight = 24, this._headerLineHeight = 26, this.cts = this._register(new Cn()), this.domNode = document.createElement("div"), this.domNode.classList.add("actionList");
		let o = {
			getHeight: (e) => e.kind === "header" ? this._headerLineHeight : this._actionLineHeight,
			getTemplateId: (e) => e.kind
		};
		this._list = this._register(new mt(e, this.domNode, o, [new dw(t, this._keybindingService), new uw()], {
			keyboardSupport: !1,
			typeNavigationEnabled: !0,
			keyboardNavigationLabelProvider: { getKeyboardNavigationLabel: mw },
			accessibilityProvider: {
				getAriaLabel: (e) => {
					if (e.kind === "action") {
						let t = e.label ? gw(e?.label) : "";
						return e.disabled && (t = B({
							key: "customQuickFixWidget.labels",
							comment: ["Action widget labels for accessibility."]
						}, "{0}, Disabled Reason: {1}", t, e.disabled)), t;
					}
					return null;
				},
				getWidgetAriaLabel: () => B({
					key: "customQuickFixWidget",
					comment: ["An action widget option"]
				}, "Action Widget"),
				getRole: (e) => e.kind === "action" ? "option" : "separator",
				getWidgetRole: () => "listbox"
			}
		})), this._list.style(Je), this._register(this._list.onMouseClick((e) => this.onListClick(e))), this._register(this._list.onMouseOver((e) => this.onListHover(e))), this._register(this._list.onDidChangeFocus(() => this.onFocus())), this._register(this._list.onDidChangeSelection((e) => this.onListSelection(e))), this._allMenuItems = n, this._list.splice(0, this._list.length, this._allMenuItems), this._list.length && this.focusNext();
	}
	focusCondition(e) {
		return !e.disabled && e.kind === "action";
	}
	hide(e) {
		this._delegate.onHide(e), this.cts.cancel(), this._contextViewService.hideContextView();
	}
	layout(e) {
		let t = this._allMenuItems.filter((e) => e.kind === "header").length, n = this._allMenuItems.length * this._actionLineHeight + t * this._headerLineHeight - t * this._actionLineHeight;
		this._list.layout(n);
		let r = e;
		if (this._allMenuItems.length >= 50) r = 380;
		else {
			let t = this._allMenuItems.map((e, t) => {
				let n = this.domNode.ownerDocument.getElementById(this._list.getElementID(t));
				if (n) {
					n.style.width = "auto";
					let e = n.getBoundingClientRect().width;
					return n.style.width = "", e;
				}
				return 0;
			});
			r = Math.max(...t, e);
		}
		let i = Math.min(n, this.domNode.ownerDocument.body.clientHeight * .7);
		return this._list.layout(i, r), this.domNode.style.height = `${i}px`, this._list.domFocus(), r;
	}
	focusPrevious() {
		this._list.focusPrevious(1, !0, void 0, this.focusCondition);
	}
	focusNext() {
		this._list.focusNext(1, !0, void 0, this.focusCondition);
	}
	acceptSelected(e) {
		let t = this._list.getFocus();
		if (t.length === 0) return;
		let n = t[0], r = this._list.element(n);
		if (!this.focusCondition(r)) return;
		let i = e ? new pw() : new fw();
		this._list.setSelection([n], i);
	}
	onListSelection(e) {
		if (!e.elements.length) return;
		let t = e.elements[0];
		t.item && this.focusCondition(t) ? this._delegate.onSelect(t.item, e.browserEvent instanceof pw) : this._list.setSelection([]);
	}
	onFocus() {
		let e = this._list.getFocus();
		if (e.length === 0) return;
		let t = e[0], n = this._list.element(t);
		this._delegate.onFocus?.(n.item);
	}
	async onListHover(e) {
		let t = e.element;
		if (t && t.item && this.focusCondition(t)) {
			if (this._delegate.onHover && !t.disabled && t.kind === "action") {
				let e = await this._delegate.onHover(t.item, this.cts.token);
				t.canPreview = e ? e.canPreview : void 0;
			}
			e.index && this._list.splice(e.index, 1, [t]);
		}
		this._list.setFocus(typeof e.index == "number" ? [e.index] : []);
	}
	onListClick(e) {
		e.element && this.focusCondition(e.element) && this._list.setFocus([]);
	}
};
hw = ow([sw(4, si), sw(5, ft)], hw);
function gw(e) {
	return e.replace(/\r\n|\r|\n/g, " ");
}
// ../../../node_modules/.pnpm/monaco-editor@0.52.2/node_modules/monaco-editor/esm/vs/platform/actionWidget/browser/actionWidget.js
var _w = function(e, t, n, r) {
	var i = arguments.length, a = i < 3 ? t : r === null ? r = Object.getOwnPropertyDescriptor(t, n) : r, o;
	if (typeof Reflect == "object" && typeof Reflect.decorate == "function") a = Reflect.decorate(e, t, n, r);
	else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (i < 3 ? o(a) : i > 3 ? o(t, n, a) : o(t, n)) || a);
	return i > 3 && a && Object.defineProperty(t, n, a), a;
}, vw = function(e, t) {
	return function(n, r) {
		t(n, r, e);
	};
};
S("actionBar.toggledBackground", $n, B("actionBar.toggledBackground", "Background color for toggled action items in action bar."));
var yw = { Visible: new z("codeActionMenuVisible", !1, B("codeActionMenuVisible", "Whether the action widget list is visible")) }, bw = ne("actionWidgetService"), xw = class extends U {
	get isVisible() {
		return yw.Visible.getValue(this._contextKeyService) || !1;
	}
	constructor(e, t, n) {
		super(), this._contextViewService = e, this._contextKeyService = t, this._instantiationService = n, this._list = this._register(new Zr());
	}
	show(e, t, n, r, i, a, o) {
		let s = yw.Visible.bindTo(this._contextKeyService), c = this._instantiationService.createInstance(hw, e, t, n, r);
		this._contextViewService.showContextView({
			getAnchor: () => i,
			render: (e) => (s.set(!0), this._renderWidget(e, c, o ?? [])),
			onHide: (e) => {
				s.reset(), this._onWidgetClosed(e);
			}
		}, a, !1);
	}
	acceptSelected(e) {
		this._list.value?.acceptSelected(e);
	}
	focusPrevious() {
		this._list?.value?.focusPrevious();
	}
	focusNext() {
		this._list?.value?.focusNext();
	}
	hide(e) {
		this._list.value?.hide(e), this._list.clear();
	}
	_renderWidget(e, t, n) {
		let r = document.createElement("div");
		if (r.classList.add("action-widget"), e.appendChild(r), this._list.value = t, this._list.value) r.appendChild(this._list.value.domNode);
		else throw Error("List has no value");
		let i = new g(), a = document.createElement("div"), o = e.appendChild(a);
		o.classList.add("context-view-block"), i.add(_(o, on.MOUSE_DOWN, (e) => e.stopPropagation()));
		let s = document.createElement("div"), c = e.appendChild(s);
		c.classList.add("context-view-pointerBlock"), i.add(_(c, on.POINTER_MOVE, () => c.remove())), i.add(_(c, on.MOUSE_DOWN, () => c.remove()));
		let l = 0;
		if (n.length) {
			let e = this._createActionBar(".action-widget-action-bar", n);
			e && (r.appendChild(e.getContainer().parentElement), i.add(e), l = e.getContainer().offsetWidth);
		}
		let u = this._list.value?.layout(l);
		r.style.width = `${u}px`;
		let d = i.add(oo(e));
		return i.add(d.onDidBlur(() => this.hide(!0))), i;
	}
	_createActionBar(e, t) {
		if (!t.length) return;
		let n = w(e), r = new Pn(n);
		return r.push(t, {
			icon: !1,
			label: !0
		}), r;
	}
	_onWidgetClosed(e) {
		this._list.value?.hide(e);
	}
};
xw = _w([
	vw(0, si),
	vw(1, j),
	vw(2, P)
], xw), rn(bw, xw, 1);
var Sw = 1100;
Fa(class extends Mo {
	constructor() {
		super({
			id: "hideCodeActionWidget",
			title: H("hideCodeActionWidget.title", "Hide action widget"),
			precondition: yw.Visible,
			keybinding: {
				weight: Sw,
				primary: 9,
				secondary: [1033]
			}
		});
	}
	run(e) {
		e.get(bw).hide(!0);
	}
}), Fa(class extends Mo {
	constructor() {
		super({
			id: "selectPrevCodeAction",
			title: H("selectPrevCodeAction.title", "Select previous action"),
			precondition: yw.Visible,
			keybinding: {
				weight: Sw,
				primary: 16,
				secondary: [2064],
				mac: {
					primary: 16,
					secondary: [2064, 302]
				}
			}
		});
	}
	run(e) {
		let t = e.get(bw);
		t instanceof xw && t.focusPrevious();
	}
}), Fa(class extends Mo {
	constructor() {
		super({
			id: "selectNextCodeAction",
			title: H("selectNextCodeAction.title", "Select next action"),
			precondition: yw.Visible,
			keybinding: {
				weight: Sw,
				primary: 18,
				secondary: [2066],
				mac: {
					primary: 18,
					secondary: [2066, 300]
				}
			}
		});
	}
	run(e) {
		let t = e.get(bw);
		t instanceof xw && t.focusNext();
	}
}), Fa(class extends Mo {
	constructor() {
		super({
			id: cw,
			title: H("acceptSelected.title", "Accept selected action"),
			precondition: yw.Visible,
			keybinding: {
				weight: Sw,
				primary: 3,
				secondary: [2137]
			}
		});
	}
	run(e) {
		let t = e.get(bw);
		t instanceof xw && t.acceptSelected();
	}
}), Fa(class extends Mo {
	constructor() {
		super({
			id: lw,
			title: H("previewSelected.title", "Preview selected action"),
			precondition: yw.Visible,
			keybinding: {
				weight: Sw,
				primary: 2051
			}
		});
	}
	run(e) {
		let t = e.get(bw);
		t instanceof xw && t.acceptSelected(!0);
	}
});
// ../../../node_modules/.pnpm/monaco-editor@0.52.2/node_modules/monaco-editor/esm/vs/editor/contrib/codeAction/browser/codeActionModel.js
var Cw = new z("supportedCodeAction", ""), ww = class extends U {
	constructor(e, t, n, r = 250) {
		super(), this._editor = e, this._markerService = t, this._signalChange = n, this._delay = r, this._autoTriggerTimer = this._register(new kr()), this._register(this._markerService.onMarkerChanged((e) => this._onMarkerChanges(e))), this._register(this._editor.onDidChangeCursorPosition(() => this._tryAutoTrigger()));
	}
	trigger(e) {
		let t = this._getRangeOfSelectionUnlessWhitespaceEnclosed(e);
		this._signalChange(t ? {
			trigger: e,
			selection: t
		} : void 0);
	}
	_onMarkerChanges(e) {
		let t = this._editor.getModel();
		t && e.some((e) => Aa(e, t.uri)) && this._tryAutoTrigger();
	}
	_tryAutoTrigger() {
		this._autoTriggerTimer.cancelAndSet(() => {
			this.trigger({
				type: 2,
				triggerAction: xC.Default
			});
		}, this._delay);
	}
	_getRangeOfSelectionUnlessWhitespaceEnclosed(e) {
		if (!this._editor.hasModel()) return;
		let t = this._editor.getSelection();
		if (e.type === 1) return t;
		let n = this._editor.getOption(65).enabled;
		if (n !== gc.Off) {
			if (n === gc.On) return t;
			if (n === gc.OnCode) {
				if (!t.isEmpty()) return t;
				let e = this._editor.getModel(), { lineNumber: n, column: r } = t.getPosition(), i = e.getLineContent(n);
				if (i.length === 0) return;
				if (r === 1) {
					if (/\s/.test(i[0])) return;
				} else if (r === e.getLineMaxColumn(n)) {
					if (/\s/.test(i[i.length - 1])) return;
				} else if (/\s/.test(i[r - 2]) && /\s/.test(i[r - 1])) return;
			}
			return t;
		}
	}
}, Tw;
(function(e) {
	e.Empty = { type: 0 };
	class t {
		constructor(e, t, n) {
			this.trigger = e, this.position = t, this._cancellablePromise = n, this.type = 1, this.actions = n.catch((e) => {
				if (Li(e)) return Ew;
				throw e;
			});
		}
		cancel() {
			this._cancellablePromise.cancel();
		}
	}
	e.Triggered = t;
})(Tw ||= {});
var Ew = Object.freeze({
	allActions: [],
	validActions: [],
	dispose: () => {},
	documentation: [],
	hasAutoFix: !1,
	hasAIFix: !1,
	allAIFixes: !1
}), Dw = class extends U {
	constructor(e, t, n, r, i, a, o) {
		super(), this._editor = e, this._registry = t, this._markerService = n, this._progressService = i, this._configurationService = a, this._telemetryService = o, this._codeActionOracle = this._register(new Zr()), this._state = Tw.Empty, this._onDidChangeState = this._register(new x()), this.onDidChangeState = this._onDidChangeState.event, this._disposed = !1, this._supportedCodeActions = Cw.bindTo(r), this._register(this._editor.onDidChangeModel(() => this._update())), this._register(this._editor.onDidChangeModelLanguage(() => this._update())), this._register(this._registry.onDidChange(() => this._update())), this._register(this._editor.onDidChangeConfiguration((e) => {
			e.hasChanged(65) && this._update();
		})), this._update();
	}
	dispose() {
		this._disposed || (this._disposed = !0, super.dispose(), this.setState(Tw.Empty, !0));
	}
	_settingEnabledNearbyQuickfixes() {
		let e = this._editor?.getModel();
		return this._configurationService ? this._configurationService.getValue("editor.codeActionWidget.includeNearbyQuickFixes", { resource: e?.uri }) : !1;
	}
	_update() {
		if (this._disposed) return;
		this._codeActionOracle.value = void 0, this.setState(Tw.Empty);
		let e = this._editor.getModel();
		if (e && this._registry.has(e) && !this._editor.getOption(92)) {
			let t = this._registry.all(e).flatMap((e) => e.providedCodeActionKinds ?? []);
			this._supportedCodeActions.set(t.join(" ")), this._codeActionOracle.value = new ww(this._editor, this._markerService, (t) => {
				if (!t) {
					this.setState(Tw.Empty);
					return;
				}
				let n = t.selection.getStartPosition(), r = Te(async (n) => {
					if (this._settingEnabledNearbyQuickfixes() && t.trigger.type === 1 && (t.trigger.triggerAction === xC.QuickFix || t.trigger.filter?.include?.contains(bC.QuickFix))) {
						let r = await IC(this._registry, e, t.selection, t.trigger, Dt.None, n), i = [...r.allActions];
						if (n.isCancellationRequested) return Ew;
						let a = r.validActions?.some((e) => e.action.kind ? bC.QuickFix.contains(new aS(e.action.kind)) : !1), o = this._markerService.read({ resource: e.uri });
						if (a) {
							for (let e of r.validActions) e.action.command?.arguments?.some((e) => typeof e == "string" && e.includes("_typescript.applyFixAllCodeAction")) && (e.action.diagnostics = [...o.filter((e) => e.relatedInformation)]);
							return {
								validActions: r.validActions,
								allActions: i,
								documentation: r.documentation,
								hasAutoFix: r.hasAutoFix,
								hasAIFix: r.hasAIFix,
								allAIFixes: r.allAIFixes,
								dispose: () => {
									r.dispose();
								}
							};
						}
						if (!a && o.length > 0) {
							let a = t.selection.getPosition(), s = a, c = Number.MAX_VALUE, l = [...r.validActions];
							for (let u of o) {
								let d = u.endColumn, f = u.endLineNumber, p = u.startLineNumber;
								if (f === a.lineNumber || p === a.lineNumber) {
									s = new b(f, d);
									let u = {
										type: t.trigger.type,
										triggerAction: t.trigger.triggerAction,
										filter: { include: t.trigger.filter?.include ? t.trigger.filter?.include : bC.QuickFix },
										autoApply: t.trigger.autoApply,
										context: {
											notAvailableMessage: t.trigger.context?.notAvailableMessage || "",
											position: s
										}
									}, p = new V(s.lineNumber, s.column, s.lineNumber, s.column), m = await IC(this._registry, e, p, u, Dt.None, n);
									if (m.validActions.length !== 0) {
										for (let e of m.validActions) e.action.command?.arguments?.some((e) => typeof e == "string" && e.includes("_typescript.applyFixAllCodeAction")) && (e.action.diagnostics = [...o.filter((e) => e.relatedInformation)]);
										r.allActions.length === 0 && i.push(...m.allActions), Math.abs(a.column - d) < c ? l.unshift(...m.validActions) : l.push(...m.validActions);
									}
									c = Math.abs(a.column - d);
								}
							}
							let u = l.filter((e, t, n) => n.findIndex((t) => t.action.title === e.action.title) === t);
							return u.sort((e, t) => e.action.isPreferred && !t.action.isPreferred ? -1 : !e.action.isPreferred && t.action.isPreferred || e.action.isAI && !t.action.isAI ? 1 : !e.action.isAI && t.action.isAI ? -1 : 0), {
								validActions: u,
								allActions: i,
								documentation: r.documentation,
								hasAutoFix: r.hasAutoFix,
								hasAIFix: r.hasAIFix,
								allAIFixes: r.allAIFixes,
								dispose: () => {
									r.dispose();
								}
							};
						}
					}
					if (t.trigger.type === 1) {
						let r = new lr(), i = await IC(this._registry, e, t.selection, t.trigger, Dt.None, n);
						return this._telemetryService && this._telemetryService.publicLog2("codeAction.invokedDurations", {
							codeActions: i.validActions.length,
							duration: r.elapsed()
						}), i;
					}
					return IC(this._registry, e, t.selection, t.trigger, Dt.None, n);
				});
				t.trigger.type === 1 && this._progressService?.showWhile(r, 250);
				let i = new Tw.Triggered(t.trigger, n, r), a = !1;
				this._state.type === 1 && (a = this._state.trigger.type === 1 && i.type === 1 && i.trigger.type === 2 && this._state.position !== i.position), a ? setTimeout(() => {
					this.setState(i);
				}, 500) : this.setState(i);
			}, void 0), this._codeActionOracle.value.trigger({
				type: 2,
				triggerAction: xC.Default
			});
		} else this._supportedCodeActions.reset();
	}
	trigger(e) {
		this._codeActionOracle.value?.trigger(e);
	}
	setState(e, t) {
		e !== this._state && (this._state.type === 1 && this._state.cancel(), this._state = e, !t && !this._disposed && this._onDidChangeState.fire(e));
	}
}, Ow = function(e, t, n, r) {
	var i = arguments.length, a = i < 3 ? t : r === null ? r = Object.getOwnPropertyDescriptor(t, n) : r, o;
	if (typeof Reflect == "object" && typeof Reflect.decorate == "function") a = Reflect.decorate(e, t, n, r);
	else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (i < 3 ? o(a) : i > 3 ? o(t, n, a) : o(t, n)) || a);
	return i > 3 && a && Object.defineProperty(t, n, a), a;
}, kw = function(e, t) {
	return function(n, r) {
		t(n, r, e);
	};
}, Aw, jw = "quickfix-edit-highlight", Mw = class extends U {
	static {
		Aw = this;
	}
	static {
		this.ID = "editor.contrib.codeActionController";
	}
	static get(e) {
		return e.getContribution(Aw.ID);
	}
	constructor(e, t, n, r, i, a, o, s, c, l, u) {
		super(), this._commandService = o, this._configurationService = s, this._actionWidgetService = c, this._instantiationService = l, this._telemetryService = u, this._activeCodeActions = this._register(new Zr()), this._showDisabled = !1, this._disposed = !1, this._editor = e, this._model = this._register(new Dw(this._editor, i.codeActionProvider, t, n, a, s, this._telemetryService)), this._register(this._model.onDidChangeState((e) => this.update(e))), this._lightBulbWidget = new Oo(() => {
			let e = this._editor.getContribution(aw.ID);
			return e && this._register(e.onClick((e) => this.showCodeActionsFromLightbulb(e.actions, e))), e;
		}), this._resolver = r.createInstance(KC), this._register(this._editor.onDidLayoutChange(() => this._actionWidgetService.hide()));
	}
	dispose() {
		this._disposed = !0, super.dispose();
	}
	async showCodeActionsFromLightbulb(e, t) {
		if (e.allAIFixes && e.validActions.length === 1) {
			let t = e.validActions[0], n = t.action.command;
			n && n.id === "inlineChat.start" && n.arguments && n.arguments.length >= 1 && (n.arguments[0] = {
				...n.arguments[0],
				autoSend: !1
			}), await this._applyCodeAction(t, !1, !1, BC.FromAILightbulb);
		} else await this.showCodeActionList(e, t, {
			includeDisabledActions: !1,
			fromLightbulb: !0
		});
	}
	showCodeActions(e, t, n) {
		return this.showCodeActionList(t, n, {
			includeDisabledActions: !1,
			fromLightbulb: !1
		});
	}
	manualTriggerAtCurrentPosition(e, t, n, r) {
		if (!this._editor.hasModel()) return;
		GS.get(this._editor)?.closeMessage();
		let i = this._editor.getPosition();
		this._trigger({
			type: 1,
			triggerAction: t,
			filter: n,
			autoApply: r,
			context: {
				notAvailableMessage: e,
				position: i
			}
		});
	}
	_trigger(e) {
		return this._model.trigger(e);
	}
	async _applyCodeAction(e, t, n, r) {
		try {
			await this._instantiationService.invokeFunction(VC, e, r, {
				preview: n,
				editor: this._editor
			});
		} finally {
			t && this._trigger({
				type: 2,
				triggerAction: xC.QuickFix,
				filter: {}
			});
		}
	}
	hideLightBulbWidget() {
		this._lightBulbWidget.rawValue?.hide(), this._lightBulbWidget.rawValue?.gutterHide();
	}
	async update(e) {
		if (e.type !== 1) {
			this.hideLightBulbWidget();
			return;
		}
		let t;
		try {
			t = await e.actions;
		} catch (e) {
			er(e);
			return;
		}
		if (!this._disposed && this._editor.getSelection()?.startLineNumber === e.position.lineNumber) {
			if (this._lightBulbWidget.value?.update(t, e.trigger, e.position), e.trigger.type === 1) {
				if (e.trigger.filter?.include) {
					let n = this.tryGetValidActionToApply(e.trigger, t);
					if (n) {
						try {
							this.hideLightBulbWidget(), await this._applyCodeAction(n, !1, !1, BC.FromCodeActions);
						} finally {
							t.dispose();
						}
						return;
					}
					if (e.trigger.context) {
						let n = this.getInvalidActionThatWouldHaveBeenApplied(e.trigger, t);
						if (n && n.action.disabled) {
							GS.get(this._editor)?.showMessage(n.action.disabled, e.trigger.context.position), t.dispose();
							return;
						}
					}
				}
				let n = !!e.trigger.filter?.include;
				if (e.trigger.context && (!t.allActions.length || !n && !t.validActions.length)) {
					GS.get(this._editor)?.showMessage(e.trigger.context.notAvailableMessage, e.trigger.context.position), this._activeCodeActions.value = t, t.dispose();
					return;
				}
				this._activeCodeActions.value = t, this.showCodeActionList(t, this.toCoords(e.position), {
					includeDisabledActions: n,
					fromLightbulb: !1
				});
			} else this._actionWidgetService.isVisible ? t.dispose() : this._activeCodeActions.value = t;
		}
	}
	getInvalidActionThatWouldHaveBeenApplied(e, t) {
		if (t.allActions.length && (e.autoApply === "first" && t.validActions.length === 0 || e.autoApply === "ifSingle" && t.allActions.length === 1)) return t.allActions.find(({ action: e }) => e.disabled);
	}
	tryGetValidActionToApply(e, t) {
		if (t.validActions.length && (e.autoApply === "first" && t.validActions.length > 0 || e.autoApply === "ifSingle" && t.validActions.length === 1)) return t.validActions[0];
	}
	static {
		this.DECORATION = L.register({
			description: "quickfix-highlight",
			className: jw
		});
	}
	async showCodeActionList(e, t, n) {
		let r = this._editor.createDecorationsCollection(), i = this._editor.getDomNode();
		if (!i) return;
		let a = n.includeDisabledActions && (this._showDisabled || e.validActions.length === 0) ? e.allActions : e.validActions;
		if (!a.length) return;
		let o = b.isIPosition(t) ? this.toCoords(t) : t;
		this._actionWidgetService.show("codeActionWidget", !0, YC(a, this._shouldShowHeaders(), this._resolver.getResolver()), {
			onSelect: async (e, t) => {
				this._applyCodeAction(e, !0, !!t, n.fromLightbulb ? BC.FromAILightbulb : BC.FromCodeActions), this._actionWidgetService.hide(!1), r.clear();
			},
			onHide: (e) => {
				this._editor?.focus(), r.clear();
			},
			onHover: async (e, t) => {
				if (t.isCancellationRequested) return;
				let n = !1, r = e.action.kind;
				if (r) {
					let e = new aS(r);
					n = [
						bC.RefactorExtract,
						bC.RefactorInline,
						bC.RefactorRewrite,
						bC.RefactorMove,
						bC.Source
					].some((t) => t.contains(e));
				}
				return { canPreview: n || !!e.action.edit?.edits.length };
			},
			onFocus: (e) => {
				if (e && e.action) {
					let t = e.action.ranges, n = e.action.diagnostics;
					if (r.clear(), t && t.length > 0) {
						let e = n && n?.length > 1 ? n.map((e) => ({
							range: e,
							options: Aw.DECORATION
						})) : t.map((e) => ({
							range: e,
							options: Aw.DECORATION
						}));
						r.set(e);
					} else if (n && n.length > 0) {
						let e = n.map((e) => ({
							range: e,
							options: Aw.DECORATION
						}));
						r.set(e);
						let t = n[0];
						if (t.startLineNumber && t.startColumn) {
							let e = this._editor.getModel()?.getWordAtPosition({
								lineNumber: t.startLineNumber,
								column: t.startColumn
							})?.word;
							Wr(B("editingNewSelection", "Context: {0} at line {1} and column {2}.", e, t.startLineNumber, t.startColumn));
						}
					}
				} else r.clear();
			}
		}, o, i, this._getActionBarActions(e, t, n));
	}
	toCoords(e) {
		if (!this._editor.hasModel()) return {
			x: 0,
			y: 0
		};
		this._editor.revealPosition(e, 1), this._editor.render();
		let t = this._editor.getScrolledVisiblePosition(e), n = Bi(this._editor.getDomNode());
		return {
			x: n.left + t.left,
			y: n.top + t.top + t.height
		};
	}
	_shouldShowHeaders() {
		let e = this._editor?.getModel();
		return this._configurationService.getValue("editor.codeActionWidget.showHeaders", { resource: e?.uri });
	}
	_getActionBarActions(e, t, n) {
		if (n.fromLightbulb) return [];
		let r = e.documentation.map((e) => ({
			id: e.id,
			label: e.title,
			tooltip: e.tooltip ?? "",
			class: void 0,
			enabled: !0,
			run: () => this._commandService.executeCommand(e.id, ...e.arguments ?? [])
		}));
		return n.includeDisabledActions && e.validActions.length > 0 && e.allActions.length !== e.validActions.length && r.push(this._showDisabled ? {
			id: "hideMoreActions",
			label: B("hideMoreActions", "Hide Disabled"),
			enabled: !0,
			tooltip: "",
			class: void 0,
			run: () => (this._showDisabled = !1, this.showCodeActionList(e, t, n))
		} : {
			id: "showMoreActions",
			label: B("showMoreActions", "Show Disabled"),
			enabled: !0,
			tooltip: "",
			class: void 0,
			run: () => (this._showDisabled = !0, this.showCodeActionList(e, t, n))
		}), r;
	}
};
Mw = Aw = Ow([
	kw(1, jr),
	kw(2, j),
	kw(3, P),
	kw(4, M),
	kw(5, qn),
	kw(6, ga),
	kw(7, Fl),
	kw(8, bw),
	kw(9, P),
	kw(10, mc)
], Mw), Ao((e, t) => {
	((e, n) => {
		n && t.addRule(`.monaco-editor ${e} { background-color: ${n}; }`);
	})(".quickfix-edit-highlight", e.getColor(Oa));
	let n = e.getColor(Ja);
	n && t.addRule(`.monaco-editor .quickfix-edit-highlight { border: 1px ${Sc(e.type) ? "dotted" : "solid"} ${n}; box-sizing: border-box; }`);
});
// ../../../node_modules/.pnpm/monaco-editor@0.52.2/node_modules/monaco-editor/esm/vs/editor/contrib/codeAction/browser/codeActionCommands.js
function Nw(e) {
	return N.regex(Cw.keys()[0], RegExp("(\\s|^)" + zr(e.value) + "\\b"));
}
var Pw = {
	type: "object",
	defaultSnippets: [{ body: { kind: "" } }],
	properties: {
		kind: {
			type: "string",
			description: B("args.schema.kind", "Kind of the code action to run.")
		},
		apply: {
			type: "string",
			description: B("args.schema.apply", "Controls when the returned actions are applied."),
			default: "ifSingle",
			enum: [
				"first",
				"ifSingle",
				"never"
			],
			enumDescriptions: [
				B("args.schema.apply.first", "Always apply the first returned code action."),
				B("args.schema.apply.ifSingle", "Apply the first returned code action if it is the only one."),
				B("args.schema.apply.never", "Do not apply the returned code actions.")
			]
		},
		preferred: {
			type: "boolean",
			default: !1,
			description: B("args.schema.preferred", "Controls if only preferred code actions should be returned.")
		}
	}
};
function Fw(e, t, n, r, i = xC.Default) {
	e.hasModel() && Mw.get(e)?.manualTriggerAtCurrentPosition(t, i, n, r);
}
var Iw = class extends O {
	constructor() {
		super({
			id: OC,
			label: B("quickfix.trigger.label", "Quick Fix..."),
			alias: "Quick Fix...",
			precondition: N.and(I.writable, I.hasCodeActionsProvider),
			kbOpts: {
				kbExpr: I.textInputFocus,
				primary: 2137,
				weight: 100
			}
		});
	}
	run(e, t) {
		return Fw(t, B("editor.action.quickFix.noneMessage", "No code actions available"), void 0, void 0, xC.QuickFix);
	}
}, Lw = class extends qt {
	constructor() {
		super({
			id: DC,
			precondition: N.and(I.writable, I.hasCodeActionsProvider),
			metadata: {
				description: "Trigger a code action",
				args: [{
					name: "args",
					schema: Pw
				}]
			}
		});
	}
	runEditorCommand(e, t, n) {
		let r = TC.fromUser(n, {
			kind: aS.Empty,
			apply: "ifSingle"
		});
		return Fw(t, typeof n?.kind == "string" ? r.preferred ? B("editor.action.codeAction.noneMessage.preferred.kind", "No preferred code actions for '{0}' available", n.kind) : B("editor.action.codeAction.noneMessage.kind", "No code actions for '{0}' available", n.kind) : r.preferred ? B("editor.action.codeAction.noneMessage.preferred", "No preferred code actions available") : B("editor.action.codeAction.noneMessage", "No code actions available"), {
			include: r.kind,
			includeSourceActions: !0,
			onlyIncludePreferredActions: r.preferred
		}, r.apply);
	}
}, Rw = class extends O {
	constructor() {
		super({
			id: AC,
			label: B("refactor.label", "Refactor..."),
			alias: "Refactor...",
			precondition: N.and(I.writable, I.hasCodeActionsProvider),
			kbOpts: {
				kbExpr: I.textInputFocus,
				primary: 3120,
				mac: { primary: 1328 },
				weight: 100
			},
			contextMenuOpts: {
				group: "1_modification",
				order: 2,
				when: N.and(I.writable, Nw(bC.Refactor))
			},
			metadata: {
				description: "Refactor...",
				args: [{
					name: "args",
					schema: Pw
				}]
			}
		});
	}
	run(e, t, n) {
		let r = TC.fromUser(n, {
			kind: bC.Refactor,
			apply: "never"
		});
		return Fw(t, typeof n?.kind == "string" ? r.preferred ? B("editor.action.refactor.noneMessage.preferred.kind", "No preferred refactorings for '{0}' available", n.kind) : B("editor.action.refactor.noneMessage.kind", "No refactorings for '{0}' available", n.kind) : r.preferred ? B("editor.action.refactor.noneMessage.preferred", "No preferred refactorings available") : B("editor.action.refactor.noneMessage", "No refactorings available"), {
			include: bC.Refactor.contains(r.kind) ? r.kind : aS.None,
			onlyIncludePreferredActions: r.preferred
		}, r.apply, xC.Refactor);
	}
}, zw = class extends O {
	constructor() {
		super({
			id: jC,
			label: B("source.label", "Source Action..."),
			alias: "Source Action...",
			precondition: N.and(I.writable, I.hasCodeActionsProvider),
			contextMenuOpts: {
				group: "1_modification",
				order: 2.1,
				when: N.and(I.writable, Nw(bC.Source))
			},
			metadata: {
				description: "Source Action...",
				args: [{
					name: "args",
					schema: Pw
				}]
			}
		});
	}
	run(e, t, n) {
		let r = TC.fromUser(n, {
			kind: bC.Source,
			apply: "never"
		});
		return Fw(t, typeof n?.kind == "string" ? r.preferred ? B("editor.action.source.noneMessage.preferred.kind", "No preferred source actions for '{0}' available", n.kind) : B("editor.action.source.noneMessage.kind", "No source actions for '{0}' available", n.kind) : r.preferred ? B("editor.action.source.noneMessage.preferred", "No preferred source actions available") : B("editor.action.source.noneMessage", "No source actions available"), {
			include: bC.Source.contains(r.kind) ? r.kind : aS.None,
			includeSourceActions: !0,
			onlyIncludePreferredActions: r.preferred
		}, r.apply, xC.SourceAction);
	}
}, Bw = class extends O {
	constructor() {
		super({
			id: MC,
			label: B("organizeImports.label", "Organize Imports"),
			alias: "Organize Imports",
			precondition: N.and(I.writable, Nw(bC.SourceOrganizeImports)),
			kbOpts: {
				kbExpr: I.textInputFocus,
				primary: 1581,
				weight: 100
			}
		});
	}
	run(e, t) {
		return Fw(t, B("editor.action.organize.noneMessage", "No organize imports action available"), {
			include: bC.SourceOrganizeImports,
			includeSourceActions: !0
		}, "ifSingle", xC.OrganizeImports);
	}
}, Vw = class extends O {
	constructor() {
		super({
			id: NC,
			label: B("fixAll.label", "Fix All"),
			alias: "Fix All",
			precondition: N.and(I.writable, Nw(bC.SourceFixAll))
		});
	}
	run(e, t) {
		return Fw(t, B("fixAll.noneMessage", "No fix all action available"), {
			include: bC.SourceFixAll,
			includeSourceActions: !0
		}, "ifSingle", xC.FixAll);
	}
}, Hw = class extends O {
	constructor() {
		super({
			id: kC,
			label: B("autoFix.label", "Auto Fix..."),
			alias: "Auto Fix...",
			precondition: N.and(I.writable, Nw(bC.QuickFix)),
			kbOpts: {
				kbExpr: I.textInputFocus,
				primary: 1625,
				mac: { primary: 2649 },
				weight: 100
			}
		});
	}
	run(e, t) {
		return Fw(t, B("editor.action.autoFix.noneMessage", "No auto fixes available"), {
			include: bC.QuickFix,
			onlyIncludePreferredActions: !0
		}, "ifSingle", xC.AutoFix);
	}
};
T(Mw.ID, Mw, 3), T(aw.ID, aw, 4), k(Iw), k(Rw), k(zw), k(Bw), k(Hw), k(Vw), A(new Lw()), Js.as(Ye.Configuration).registerConfiguration({
	...Il,
	properties: { "editor.codeActionWidget.showHeaders": {
		type: "boolean",
		scope: 5,
		description: B("showCodeActionHeaders", "Enable/disable showing group headers in the Code Action menu."),
		default: !0
	} }
}), Js.as(Ye.Configuration).registerConfiguration({
	...Il,
	properties: { "editor.codeActionWidget.includeNearbyQuickFixes": {
		type: "boolean",
		scope: 5,
		description: B("includeNearbyQuickFixes", "Enable/disable showing nearest Quick Fix within a line when not currently on a diagnostic."),
		default: !0
	} }
}), Js.as(Ye.Configuration).registerConfiguration({
	...Il,
	properties: { "editor.codeActions.triggerOnFocusChange": {
		type: "boolean",
		scope: 5,
		markdownDescription: B("triggerOnFocusChange", "Enable triggering {0} when {1} is set to {2}. Code Actions must be set to {3} to be triggered for window and focus changes.", "`#editor.codeActionsOnSave#`", "`#files.autoSave#`", "`afterDelay`", "`always`"),
		default: !1
	} }
});
// ../../../node_modules/.pnpm/monaco-editor@0.52.2/node_modules/monaco-editor/esm/vs/editor/contrib/codelens/browser/codelens.js
var Uw = class {
	constructor() {
		this.lenses = [], this._disposables = new g();
	}
	dispose() {
		this._disposables.dispose();
	}
	get isDisposed() {
		return this._disposables.isDisposed;
	}
	add(e, t) {
		this._disposables.add(e);
		for (let n of e.lenses) this.lenses.push({
			symbol: n,
			provider: t
		});
	}
};
async function Ww(e, t, n) {
	let r = e.ordered(t), a = /* @__PURE__ */ new Map(), o = new Uw(), s = r.map(async (e, r) => {
		a.set(e, r);
		try {
			let r = await Promise.resolve(e.provideCodeLenses(t, n));
			r && o.add(r, e);
		} catch (e) {
			i(e);
		}
	});
	return await Promise.all(s), o.lenses = o.lenses.sort((e, t) => e.symbol.range.startLineNumber < t.symbol.range.startLineNumber ? -1 : e.symbol.range.startLineNumber > t.symbol.range.startLineNumber ? 1 : a.get(e.provider) < a.get(t.provider) ? -1 : a.get(e.provider) > a.get(t.provider) ? 1 : e.symbol.range.startColumn < t.symbol.range.startColumn ? -1 : +(e.symbol.range.startColumn > t.symbol.range.startColumn)), o;
}
Ol.registerCommand("_executeCodeLensProvider", function(e, ...t) {
	let [n, r] = t;
	y(De.isUri(n)), y(typeof r == "number" || !r);
	let { codeLensProvider: i } = e.get(M), a = e.get(je).getModel(n);
	if (!a) throw vi();
	let o = [], s = new g();
	return Ww(i, a, C.None).then((e) => {
		s.add(e);
		let t = [];
		for (let n of e.lenses) r == null || n.symbol.command ? o.push(n.symbol) : r-- > 0 && n.provider.resolveCodeLens && t.push(Promise.resolve(n.provider.resolveCodeLens(a, n.symbol, C.None)).then((e) => o.push(e || n.symbol)));
		return Promise.all(t);
	}).then(() => o).finally(() => {
		setTimeout(() => s.dispose(), 100);
	});
});
// ../../../node_modules/.pnpm/monaco-editor@0.52.2/node_modules/monaco-editor/esm/vs/editor/contrib/codelens/browser/codeLensCache.js
var Gw = function(e, t, n, r) {
	var i = arguments.length, a = i < 3 ? t : r === null ? r = Object.getOwnPropertyDescriptor(t, n) : r, o;
	if (typeof Reflect == "object" && typeof Reflect.decorate == "function") a = Reflect.decorate(e, t, n, r);
	else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (i < 3 ? o(a) : i > 3 ? o(t, n, a) : o(t, n)) || a);
	return i > 3 && a && Object.defineProperty(t, n, a), a;
}, Kw = function(e, t) {
	return function(n, r) {
		t(n, r, e);
	};
}, qw = ne("ICodeLensCache"), Jw = class {
	constructor(e, t) {
		this.lineCount = e, this.data = t;
	}
}, Yw = class {
	constructor(e) {
		this._fakeProvider = new class {
			provideCodeLenses() {
				throw Error("not supported");
			}
		}(), this._cache = new Fn(20, .75), ka(ta, () => e.remove("codelens/cache", 1));
		let t = "codelens/cache2", n = e.get(t, 1, "{}");
		this._deserialize(n);
		let r = wt.filter(e.onWillSaveState, (e) => e.reason === Pl.SHUTDOWN);
		wt.once(r)((n) => {
			e.store(t, this._serialize(), 1, 1);
		});
	}
	put(e, t) {
		let n = t.lenses.map((e) => ({
			range: e.symbol.range,
			command: e.symbol.command && {
				id: "",
				title: e.symbol.command?.title
			}
		})), r = new Uw();
		r.add({
			lenses: n,
			dispose: () => {}
		}, this._fakeProvider);
		let i = new Jw(e.getLineCount(), r);
		this._cache.set(e.uri.toString(), i);
	}
	get(e) {
		let t = this._cache.get(e.uri.toString());
		return t && t.lineCount === e.getLineCount() ? t.data : void 0;
	}
	delete(e) {
		this._cache.delete(e.uri.toString());
	}
	_serialize() {
		let e = Object.create(null);
		for (let [t, n] of this._cache) {
			let r = /* @__PURE__ */ new Set();
			for (let e of n.data.lenses) r.add(e.symbol.range.startLineNumber);
			e[t] = {
				lineCount: n.lineCount,
				lines: [...r.values()]
			};
		}
		return JSON.stringify(e);
	}
	_deserialize(e) {
		try {
			let t = JSON.parse(e);
			for (let e in t) {
				let n = t[e], r = [];
				for (let e of n.lines) r.push({ range: new E(e, 1, e, 11) });
				let i = new Uw();
				i.add({
					lenses: r,
					dispose() {}
				}, this._fakeProvider), this._cache.set(e, new Jw(n.lineCount, i));
			}
		} catch {}
	}
};
Yw = Gw([Kw(0, ur)], Yw), rn(qw, Yw, 1);
// ../../../node_modules/.pnpm/monaco-editor@0.52.2/node_modules/monaco-editor/esm/vs/editor/contrib/codelens/browser/codelensWidget.js
var Xw = class {
	constructor(e, t, n) {
		this.afterColumn = 1073741824, this.afterLineNumber = e, this.heightInPx = t, this._onHeight = n, this.suppressMouseDown = !0, this.domNode = document.createElement("div");
	}
	onComputedHeight(e) {
		this._lastHeight === void 0 ? this._lastHeight = e : this._lastHeight !== e && (this._lastHeight = e, this._onHeight());
	}
	isVisible() {
		return this._lastHeight !== 0 && this.domNode.hasAttribute("monaco-visible-view-zone");
	}
}, Zw = class e {
	static {
		this._idPool = 0;
	}
	constructor(t, n) {
		this.allowEditorOverflow = !1, this.suppressMouseDown = !0, this._commands = /* @__PURE__ */ new Map(), this._isEmpty = !0, this._editor = t, this._id = `codelens.widget-${e._idPool++}`, this.updatePosition(n), this._domNode = document.createElement("span"), this._domNode.className = "codelens-decoration";
	}
	withCommands(t, n) {
		this._commands.clear();
		let r = [], i = !1;
		for (let n = 0; n < t.length; n++) {
			let a = t[n];
			if (a && (i = !0, a.command)) {
				let i = Mn(a.command.title.trim());
				if (a.command.id) {
					let t = `c${e._idPool++}`;
					r.push(w("a", {
						id: t,
						title: a.command.tooltip,
						role: "button"
					}, ...i)), this._commands.set(t, a.command);
				} else r.push(w("span", { title: a.command.tooltip }, ...i));
				n + 1 < t.length && r.push(w("span", void 0, "\xA0|\xA0"));
			}
		}
		i ? (ns(this._domNode, ...r), this._isEmpty && n && this._domNode.classList.add("fadein"), this._isEmpty = !1) : ns(this._domNode, w("span", void 0, "no commands"));
	}
	getCommand(e) {
		return e.parentElement === this._domNode ? this._commands.get(e.id) : void 0;
	}
	getId() {
		return this._id;
	}
	getDomNode() {
		return this._domNode;
	}
	updatePosition(e) {
		let t = this._editor.getModel().getLineFirstNonWhitespaceColumn(e);
		this._widgetPosition = {
			position: {
				lineNumber: e,
				column: t
			},
			preference: [1]
		};
	}
	getPosition() {
		return this._widgetPosition || null;
	}
}, Qw = class {
	constructor() {
		this._removeDecorations = [], this._addDecorations = [], this._addDecorationsCallbacks = [];
	}
	addDecoration(e, t) {
		this._addDecorations.push(e), this._addDecorationsCallbacks.push(t);
	}
	removeDecoration(e) {
		this._removeDecorations.push(e);
	}
	commit(e) {
		let t = e.deltaDecorations(this._removeDecorations, this._addDecorations);
		for (let e = 0, n = t.length; e < n; e++) this._addDecorationsCallbacks[e](t[e]);
	}
}, $w = L.register({
	collapseOnReplaceEdit: !0,
	description: "codelens"
}), eT = class {
	constructor(e, t, n, r, i, a) {
		this._isDisposed = !1, this._editor = t, this._data = e, this._decorationIds = [];
		let o, s = [];
		this._data.forEach((e, t) => {
			e.symbol.command && s.push(e.symbol), n.addDecoration({
				range: e.symbol.range,
				options: $w
			}, (e) => this._decorationIds[t] = e), o = o ? E.plusRange(o, e.symbol.range) : E.lift(e.symbol.range);
		}), this._viewZone = new Xw(o.startLineNumber - 1, i, a), this._viewZoneId = r.addZone(this._viewZone), s.length > 0 && (this._createContentWidgetIfNecessary(), this._contentWidget.withCommands(s, !1));
	}
	_createContentWidgetIfNecessary() {
		this._contentWidget ? this._editor.layoutContentWidget(this._contentWidget) : (this._contentWidget = new Zw(this._editor, this._viewZone.afterLineNumber + 1), this._editor.addContentWidget(this._contentWidget));
	}
	dispose(e, t) {
		this._decorationIds.forEach(e.removeDecoration, e), this._decorationIds = [], t?.removeZone(this._viewZoneId), this._contentWidget &&= (this._editor.removeContentWidget(this._contentWidget), void 0), this._isDisposed = !0;
	}
	isDisposed() {
		return this._isDisposed;
	}
	isValid() {
		return this._decorationIds.some((e, t) => {
			let n = this._editor.getModel().getDecorationRange(e), r = this._data[t].symbol;
			return !!(n && E.isEmpty(r.range) === n.isEmpty());
		});
	}
	updateCodeLensSymbols(e, t) {
		this._decorationIds.forEach(t.removeDecoration, t), this._decorationIds = [], this._data = e, this._data.forEach((e, n) => {
			t.addDecoration({
				range: e.symbol.range,
				options: $w
			}, (e) => this._decorationIds[n] = e);
		});
	}
	updateHeight(e, t) {
		this._viewZone.heightInPx = e, t.layoutZone(this._viewZoneId), this._contentWidget && this._editor.layoutContentWidget(this._contentWidget);
	}
	computeIfNecessary(e) {
		if (!this._viewZone.isVisible()) return null;
		for (let t = 0; t < this._decorationIds.length; t++) {
			let n = e.getDecorationRange(this._decorationIds[t]);
			n && (this._data[t].symbol.range = n);
		}
		return this._data;
	}
	updateCommands(e) {
		this._createContentWidgetIfNecessary(), this._contentWidget.withCommands(e, !0);
		for (let t = 0; t < this._data.length; t++) {
			let n = e[t];
			if (n) {
				let { symbol: e } = this._data[t];
				e.command = n.command || e.command;
			}
		}
	}
	getCommand(e) {
		return this._contentWidget?.getCommand(e);
	}
	getLineNumber() {
		let e = this._editor.getModel().getDecorationRange(this._decorationIds[0]);
		return e ? e.startLineNumber : -1;
	}
	update(e) {
		if (this.isValid()) {
			let t = this._editor.getModel().getDecorationRange(this._decorationIds[0]);
			t && (this._viewZone.afterLineNumber = t.startLineNumber - 1, e.layoutZone(this._viewZoneId), this._contentWidget && (this._contentWidget.updatePosition(t.startLineNumber), this._editor.layoutContentWidget(this._contentWidget)));
		}
	}
}, tT = function(e, t, n, r) {
	var i = arguments.length, a = i < 3 ? t : r === null ? r = Object.getOwnPropertyDescriptor(t, n) : r, o;
	if (typeof Reflect == "object" && typeof Reflect.decorate == "function") a = Reflect.decorate(e, t, n, r);
	else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (i < 3 ? o(a) : i > 3 ? o(t, n, a) : o(t, n)) || a);
	return i > 3 && a && Object.defineProperty(t, n, a), a;
}, nT = function(e, t) {
	return function(n, r) {
		t(n, r, e);
	};
}, rT = class {
	static {
		this.ID = "css.editor.codeLens";
	}
	constructor(e, t, n, r, i, a) {
		this._editor = e, this._languageFeaturesService = t, this._commandService = r, this._notificationService = i, this._codeLensCache = a, this._disposables = new g(), this._localToDispose = new g(), this._lenses = [], this._oldCodeLensModels = new g(), this._provideCodeLensDebounce = n.for(t.codeLensProvider, "CodeLensProvide", { min: 250 }), this._resolveCodeLensesDebounce = n.for(t.codeLensProvider, "CodeLensResolve", {
			min: 250,
			salt: "resolve"
		}), this._resolveCodeLensesScheduler = new tl(() => this._resolveCodeLensesInViewport(), this._resolveCodeLensesDebounce.default()), this._disposables.add(this._editor.onDidChangeModel(() => this._onModelChange())), this._disposables.add(this._editor.onDidChangeModelLanguage(() => this._onModelChange())), this._disposables.add(this._editor.onDidChangeConfiguration((e) => {
			(e.hasChanged(50) || e.hasChanged(19) || e.hasChanged(18)) && this._updateLensStyle(), e.hasChanged(17) && this._onModelChange();
		})), this._disposables.add(t.codeLensProvider.onDidChange(this._onModelChange, this)), this._onModelChange(), this._updateLensStyle();
	}
	dispose() {
		this._localDispose(), this._disposables.dispose(), this._oldCodeLensModels.dispose(), this._currentCodeLensModel?.dispose();
	}
	_getLayoutInfo() {
		let e = Math.max(1.3, this._editor.getOption(67) / this._editor.getOption(52)), t = this._editor.getOption(19);
		return (!t || t < 5) && (t = this._editor.getOption(52) * .9 | 0), {
			fontSize: t,
			codeLensHeight: t * e | 0
		};
	}
	_updateLensStyle() {
		let { codeLensHeight: e, fontSize: t } = this._getLayoutInfo(), n = this._editor.getOption(18), r = this._editor.getOption(50), { style: i } = this._editor.getContainerDomNode();
		i.setProperty("--vscode-editorCodeLens-lineHeight", `${e}px`), i.setProperty("--vscode-editorCodeLens-fontSize", `${t}px`), i.setProperty("--vscode-editorCodeLens-fontFeatureSettings", r.fontFeatureSettings), n && (i.setProperty("--vscode-editorCodeLens-fontFamily", n), i.setProperty("--vscode-editorCodeLens-fontFamilyDefault", qa.fontFamily)), this._editor.changeViewZones((t) => {
			for (let n of this._lenses) n.updateHeight(e, t);
		});
	}
	_localDispose() {
		this._getCodeLensModelPromise?.cancel(), this._getCodeLensModelPromise = void 0, this._resolveCodeLensesPromise?.cancel(), this._resolveCodeLensesPromise = void 0, this._localToDispose.clear(), this._oldCodeLensModels.clear(), this._currentCodeLensModel?.dispose();
	}
	_onModelChange() {
		this._localDispose();
		let e = this._editor.getModel();
		if (!e || !this._editor.getOption(17) || e.isTooLargeForTokenization()) return;
		let t = this._codeLensCache.get(e);
		if (t && this._renderCodeLensSymbols(t), !this._languageFeaturesService.codeLensProvider.has(e)) {
			t && jn(() => {
				let n = this._codeLensCache.get(e);
				t === n && (this._codeLensCache.delete(e), this._onModelChange());
			}, 3e4, this._localToDispose);
			return;
		}
		for (let t of this._languageFeaturesService.codeLensProvider.all(e)) if (typeof t.onDidChange == "function") {
			let e = t.onDidChange(() => n.schedule());
			this._localToDispose.add(e);
		}
		let n = new tl(() => {
			let t = Date.now();
			this._getCodeLensModelPromise?.cancel(), this._getCodeLensModelPromise = Te((t) => Ww(this._languageFeaturesService.codeLensProvider, e, t)), this._getCodeLensModelPromise.then((r) => {
				this._currentCodeLensModel && this._oldCodeLensModels.add(this._currentCodeLensModel), this._currentCodeLensModel = r, this._codeLensCache.put(e, r);
				let i = this._provideCodeLensDebounce.update(e, Date.now() - t);
				n.delay = i, this._renderCodeLensSymbols(r), this._resolveCodeLensesInViewportSoon();
			}, er);
		}, this._provideCodeLensDebounce.get(e));
		this._localToDispose.add(n), this._localToDispose.add(Gt(() => this._resolveCodeLensesScheduler.cancel())), this._localToDispose.add(this._editor.onDidChangeModelContent(() => {
			this._editor.changeDecorations((e) => {
				this._editor.changeViewZones((t) => {
					let n = [], r = -1;
					this._lenses.forEach((e) => {
						!e.isValid() || r === e.getLineNumber() ? n.push(e) : (e.update(t), r = e.getLineNumber());
					});
					let i = new Qw();
					n.forEach((e) => {
						e.dispose(i, t), this._lenses.splice(this._lenses.indexOf(e), 1);
					}), i.commit(e);
				});
			}), n.schedule(), this._resolveCodeLensesScheduler.cancel(), this._resolveCodeLensesPromise?.cancel(), this._resolveCodeLensesPromise = void 0;
		})), this._localToDispose.add(this._editor.onDidFocusEditorText(() => {
			n.schedule();
		})), this._localToDispose.add(this._editor.onDidBlurEditorText(() => {
			n.cancel();
		})), this._localToDispose.add(this._editor.onDidScrollChange((e) => {
			e.scrollTopChanged && this._lenses.length > 0 && this._resolveCodeLensesInViewportSoon();
		})), this._localToDispose.add(this._editor.onDidLayoutChange(() => {
			this._resolveCodeLensesInViewportSoon();
		})), this._localToDispose.add(Gt(() => {
			if (this._editor.getModel()) {
				let e = jt.capture(this._editor);
				this._editor.changeDecorations((e) => {
					this._editor.changeViewZones((t) => {
						this._disposeAllLenses(e, t);
					});
				}), e.restore(this._editor);
			} else this._disposeAllLenses(void 0, void 0);
		})), this._localToDispose.add(this._editor.onMouseDown((e) => {
			if (e.target.type !== 9) return;
			let t = e.target.element;
			if (t?.tagName === "SPAN" && (t = t.parentElement), t?.tagName === "A") for (let e of this._lenses) {
				let n = e.getCommand(t);
				if (n) {
					this._commandService.executeCommand(n.id, ...n.arguments || []).catch((e) => this._notificationService.error(e));
					break;
				}
			}
		})), n.schedule();
	}
	_disposeAllLenses(e, t) {
		let n = new Qw();
		for (let e of this._lenses) e.dispose(n, t);
		e && n.commit(e), this._lenses.length = 0;
	}
	_renderCodeLensSymbols(e) {
		if (!this._editor.hasModel()) return;
		let t = this._editor.getModel().getLineCount(), n = [], r;
		for (let i of e.lenses) {
			let e = i.symbol.range.startLineNumber;
			e < 1 || e > t || (r && r[r.length - 1].symbol.range.startLineNumber === e ? r.push(i) : (r = [i], n.push(r)));
		}
		if (!n.length && !this._lenses.length) return;
		let i = jt.capture(this._editor), a = this._getLayoutInfo();
		this._editor.changeDecorations((e) => {
			this._editor.changeViewZones((t) => {
				let r = new Qw(), i = 0, o = 0;
				for (; o < n.length && i < this._lenses.length;) {
					let e = n[o][0].symbol.range.startLineNumber, s = this._lenses[i].getLineNumber();
					s < e ? (this._lenses[i].dispose(r, t), this._lenses.splice(i, 1)) : s === e ? (this._lenses[i].updateCodeLensSymbols(n[o], r), o++, i++) : (this._lenses.splice(i, 0, new eT(n[o], this._editor, r, t, a.codeLensHeight, () => this._resolveCodeLensesInViewportSoon())), i++, o++);
				}
				for (; i < this._lenses.length;) this._lenses[i].dispose(r, t), this._lenses.splice(i, 1);
				for (; o < n.length;) this._lenses.push(new eT(n[o], this._editor, r, t, a.codeLensHeight, () => this._resolveCodeLensesInViewportSoon())), o++;
				r.commit(e);
			});
		}), i.restore(this._editor);
	}
	_resolveCodeLensesInViewportSoon() {
		this._editor.getModel() && this._resolveCodeLensesScheduler.schedule();
	}
	_resolveCodeLensesInViewport() {
		this._resolveCodeLensesPromise?.cancel(), this._resolveCodeLensesPromise = void 0;
		let e = this._editor.getModel();
		if (!e) return;
		let t = [], n = [];
		if (this._lenses.forEach((r) => {
			let i = r.computeIfNecessary(e);
			i && (t.push(i), n.push(r));
		}), t.length === 0) return;
		let r = Date.now(), a = Te((r) => {
			let a = t.map((t, a) => {
				let o = Array(t.length), s = t.map((t, n) => !t.symbol.command && typeof t.provider.resolveCodeLens == "function" ? Promise.resolve(t.provider.resolveCodeLens(e, t.symbol, r)).then((e) => {
					o[n] = e;
				}, i) : (o[n] = t.symbol, Promise.resolve(void 0)));
				return Promise.all(s).then(() => {
					!r.isCancellationRequested && !n[a].isDisposed() && n[a].updateCommands(o);
				});
			});
			return Promise.all(a);
		});
		this._resolveCodeLensesPromise = a, this._resolveCodeLensesPromise.then(() => {
			let t = this._resolveCodeLensesDebounce.update(e, Date.now() - r);
			this._resolveCodeLensesScheduler.delay = t, this._currentCodeLensModel && this._codeLensCache.put(e, this._currentCodeLensModel), this._oldCodeLensModels.clear(), a === this._resolveCodeLensesPromise && (this._resolveCodeLensesPromise = void 0);
		}, (e) => {
			er(e), a === this._resolveCodeLensesPromise && (this._resolveCodeLensesPromise = void 0);
		});
	}
	async getModel() {
		return await this._getCodeLensModelPromise, await this._resolveCodeLensesPromise, this._currentCodeLensModel?.isDisposed ? void 0 : this._currentCodeLensModel;
	}
};
rT = tT([
	nT(1, M),
	nT(2, hi),
	nT(3, ga),
	nT(4, t),
	nT(5, qw)
], rT), T(rT.ID, rT, 1), k(class extends O {
	constructor() {
		super({
			id: "codelens.showLensesInCurrentLine",
			precondition: I.hasCodeLensProvider,
			label: B("showLensOnLine", "Show CodeLens Commands For Current Line"),
			alias: "Show CodeLens Commands For Current Line"
		});
	}
	async run(e, n) {
		if (!n.hasModel()) return;
		let r = e.get(Is), i = e.get(ga), a = e.get(t), o = n.getSelection().positionLineNumber, s = n.getContribution(rT.ID);
		if (!s) return;
		let c = await s.getModel();
		if (!c) return;
		let l = [];
		for (let e of c.lenses) e.symbol.command && e.symbol.range.startLineNumber === o && l.push({
			label: e.symbol.command.title,
			command: e.symbol.command
		});
		if (l.length === 0) return;
		let u = await r.pick(l, {
			canPickMany: !1,
			placeHolder: B("placeHolder", "Select a command")
		});
		if (!u) return;
		let d = u.command;
		if (c.isDisposed) {
			let e = (await s.getModel())?.lenses.find((e) => e.symbol.range.startLineNumber === o && e.symbol.command?.title === d.title);
			if (!e || !e.symbol.command) return;
			d = e.symbol.command;
		}
		try {
			await i.executeCommand(d.id, ...d.arguments || []);
		} catch (e) {
			a.error(e);
		}
	}
});
// ../../../node_modules/.pnpm/monaco-editor@0.52.2/node_modules/monaco-editor/esm/vs/editor/contrib/colorPicker/browser/defaultDocumentColorProvider.js
var iT = function(e, t, n, r) {
	var i = arguments.length, a = i < 3 ? t : r === null ? r = Object.getOwnPropertyDescriptor(t, n) : r, o;
	if (typeof Reflect == "object" && typeof Reflect.decorate == "function") a = Reflect.decorate(e, t, n, r);
	else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (i < 3 ? o(a) : i > 3 ? o(t, n, a) : o(t, n)) || a);
	return i > 3 && a && Object.defineProperty(t, n, a), a;
}, aT = function(e, t) {
	return function(n, r) {
		t(n, r, e);
	};
}, oT = class {
	constructor(e) {
		this._editorWorkerService = e;
	}
	async provideDocumentColors(e, t) {
		return this._editorWorkerService.computeDefaultDocumentColors(e.uri);
	}
	provideColorPresentations(e, t, n) {
		let r = t.range, i = t.color, a = i.alpha, o = new R(new $a(Math.round(255 * i.red), Math.round(255 * i.green), Math.round(255 * i.blue), a)), s = a ? R.Format.CSS.formatRGB(o) : R.Format.CSS.formatRGBA(o), c = a ? R.Format.CSS.formatHSL(o) : R.Format.CSS.formatHSLA(o), l = a ? R.Format.CSS.formatHex(o) : R.Format.CSS.formatHexA(o), u = [];
		return u.push({
			label: s,
			textEdit: {
				range: r,
				text: s
			}
		}), u.push({
			label: c,
			textEdit: {
				range: r,
				text: c
			}
		}), u.push({
			label: l,
			textEdit: {
				range: r,
				text: l
			}
		}), u;
	}
};
oT = iT([aT(0, Oe)], oT);
var sT = class extends U {
	constructor(e, t) {
		super(), this._register(e.colorProvider.register("*", new oT(t)));
	}
};
sT = iT([aT(0, M), aT(1, Oe)], sT), He(sT);
// ../../../node_modules/.pnpm/monaco-editor@0.52.2/node_modules/monaco-editor/esm/vs/editor/contrib/colorPicker/browser/color.js
async function cT(e, t, n, r = !0) {
	return pT(new uT(), e, t, n, r);
}
function lT(e, t, n, r) {
	return Promise.resolve(n.provideColorPresentations(e, t, r));
}
var uT = class {
	constructor() {}
	async compute(e, t, n, r) {
		let i = await e.provideDocumentColors(t, n);
		if (Array.isArray(i)) for (let t of i) r.push({
			colorInfo: t,
			provider: e
		});
		return Array.isArray(i);
	}
}, dT = class {
	constructor() {}
	async compute(e, t, n, r) {
		let i = await e.provideDocumentColors(t, n);
		if (Array.isArray(i)) for (let e of i) r.push({
			range: e.range,
			color: [
				e.color.red,
				e.color.green,
				e.color.blue,
				e.color.alpha
			]
		});
		return Array.isArray(i);
	}
}, fT = class {
	constructor(e) {
		this.colorInfo = e;
	}
	async compute(e, t, n, r) {
		let i = await e.provideColorPresentations(t, this.colorInfo, C.None);
		return Array.isArray(i) && r.push(...i), Array.isArray(i);
	}
};
async function pT(e, t, n, r, a) {
	let o = !1, s, c = [], l = t.ordered(n);
	for (let t = l.length - 1; t >= 0; t--) {
		let a = l[t];
		if (a instanceof oT) s = a;
		else try {
			await e.compute(a, n, r, c) && (o = !0);
		} catch (e) {
			i(e);
		}
	}
	return o ? c : s && a ? (await e.compute(s, n, r, c), c) : [];
}
function mT(e, t) {
	let { colorProvider: n } = e.get(M), r = e.get(je).getModel(t);
	if (!r) throw vi();
	return {
		model: r,
		colorProviderRegistry: n,
		isDefaultColorDecoratorsEnabled: e.get(Fl).getValue("editor.defaultColorDecorators", { resource: t })
	};
}
Ol.registerCommand("_executeDocumentColorProvider", function(e, ...t) {
	let [n] = t;
	if (!(n instanceof De)) throw vi();
	let { model: r, colorProviderRegistry: i, isDefaultColorDecoratorsEnabled: a } = mT(e, n);
	return pT(new dT(), i, r, C.None, a);
}), Ol.registerCommand("_executeColorPresentationProvider", function(e, ...t) {
	let [n, r] = t, { uri: i, range: a } = r;
	if (!(i instanceof De) || !Array.isArray(n) || n.length !== 4 || !E.isIRange(a)) throw vi();
	let { model: o, colorProviderRegistry: s, isDefaultColorDecoratorsEnabled: c } = mT(e, i), [l, u, d, f] = n;
	return pT(new fT({
		range: a,
		color: {
			red: l,
			green: u,
			blue: d,
			alpha: f
		}
	}), s, o, C.None, c);
});
// ../../../node_modules/.pnpm/monaco-editor@0.52.2/node_modules/monaco-editor/esm/vs/editor/contrib/colorPicker/browser/colorDetector.js
var hT = function(e, t, n, r) {
	var i = arguments.length, a = i < 3 ? t : r === null ? r = Object.getOwnPropertyDescriptor(t, n) : r, o;
	if (typeof Reflect == "object" && typeof Reflect.decorate == "function") a = Reflect.decorate(e, t, n, r);
	else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (i < 3 ? o(a) : i > 3 ? o(t, n, a) : o(t, n)) || a);
	return i > 3 && a && Object.defineProperty(t, n, a), a;
}, gT = function(e, t) {
	return function(n, r) {
		t(n, r, e);
	};
}, _T, vT = Object.create({}), yT = class extends U {
	static {
		_T = this;
	}
	static {
		this.ID = "editor.contrib.colorDetector";
	}
	static {
		this.RECOMPUTE_TIME = 1e3;
	}
	constructor(e, t, n, r) {
		super(), this._editor = e, this._configurationService = t, this._languageFeaturesService = n, this._localToDispose = this._register(new g()), this._decorationsIds = [], this._colorDatas = /* @__PURE__ */ new Map(), this._colorDecoratorIds = this._editor.createDecorationsCollection(), this._ruleFactory = new vl(this._editor), this._decoratorLimitReporter = new bT(), this._colorDecorationClassRefs = this._register(new g()), this._debounceInformation = r.for(n.colorProvider, "Document Colors", { min: _T.RECOMPUTE_TIME }), this._register(e.onDidChangeModel(() => {
			this._isColorDecoratorsEnabled = this.isEnabled(), this.updateColors();
		})), this._register(e.onDidChangeModelLanguage(() => this.updateColors())), this._register(n.colorProvider.onDidChange(() => this.updateColors())), this._register(e.onDidChangeConfiguration((e) => {
			let t = this._isColorDecoratorsEnabled;
			this._isColorDecoratorsEnabled = this.isEnabled(), this._isDefaultColorDecoratorsEnabled = this._editor.getOption(148);
			let n = t !== this._isColorDecoratorsEnabled || e.hasChanged(21), r = e.hasChanged(148);
			(n || r) && (this._isColorDecoratorsEnabled ? this.updateColors() : this.removeAllDecorations());
		})), this._timeoutTimer = null, this._computePromise = null, this._isColorDecoratorsEnabled = this.isEnabled(), this._isDefaultColorDecoratorsEnabled = this._editor.getOption(148), this.updateColors();
	}
	isEnabled() {
		let e = this._editor.getModel();
		if (!e) return !1;
		let t = e.getLanguageId(), n = this._configurationService.getValue(t);
		if (n && typeof n == "object") {
			let e = n.colorDecorators;
			if (e && e.enable !== void 0 && !e.enable) return e.enable;
		}
		return this._editor.getOption(20);
	}
	static get(e) {
		return e.getContribution(this.ID);
	}
	dispose() {
		this.stop(), this.removeAllDecorations(), super.dispose();
	}
	updateColors() {
		if (this.stop(), !this._isColorDecoratorsEnabled) return;
		let e = this._editor.getModel();
		e && this._languageFeaturesService.colorProvider.has(e) && (this._localToDispose.add(this._editor.onDidChangeModelContent(() => {
			this._timeoutTimer || (this._timeoutTimer = new kr(), this._timeoutTimer.cancelAndSet(() => {
				this._timeoutTimer = null, this.beginCompute();
			}, this._debounceInformation.get(e)));
		})), this.beginCompute());
	}
	async beginCompute() {
		this._computePromise = Te(async (e) => {
			let t = this._editor.getModel();
			if (!t) return [];
			let n = new lr(!1), r = await cT(this._languageFeaturesService.colorProvider, t, e, this._isDefaultColorDecoratorsEnabled);
			return this._debounceInformation.update(t, n.elapsed()), r;
		});
		try {
			let e = await this._computePromise;
			this.updateDecorations(e), this.updateColorDecorators(e), this._computePromise = null;
		} catch (e) {
			er(e);
		}
	}
	stop() {
		this._timeoutTimer &&= (this._timeoutTimer.cancel(), null), this._computePromise &&= (this._computePromise.cancel(), null), this._localToDispose.clear();
	}
	updateDecorations(e) {
		let t = e.map((e) => ({
			range: {
				startLineNumber: e.colorInfo.range.startLineNumber,
				startColumn: e.colorInfo.range.startColumn,
				endLineNumber: e.colorInfo.range.endLineNumber,
				endColumn: e.colorInfo.range.endColumn
			},
			options: L.EMPTY
		}));
		this._editor.changeDecorations((n) => {
			this._decorationsIds = n.deltaDecorations(this._decorationsIds, t), this._colorDatas = /* @__PURE__ */ new Map(), this._decorationsIds.forEach((t, n) => this._colorDatas.set(t, e[n]));
		});
	}
	updateColorDecorators(e) {
		this._colorDecorationClassRefs.clear();
		let t = [], n = this._editor.getOption(21);
		for (let r = 0; r < e.length && t.length < n; r++) {
			let { red: n, green: i, blue: a, alpha: o } = e[r].colorInfo.color, s = new $a(Math.round(n * 255), Math.round(i * 255), Math.round(a * 255), o), c = `rgba(${s.r}, ${s.g}, ${s.b}, ${s.a})`, l = this._colorDecorationClassRefs.add(this._ruleFactory.createClassNameRef({ backgroundColor: c }));
			t.push({
				range: {
					startLineNumber: e[r].colorInfo.range.startLineNumber,
					startColumn: e[r].colorInfo.range.startColumn,
					endLineNumber: e[r].colorInfo.range.endLineNumber,
					endColumn: e[r].colorInfo.range.endColumn
				},
				options: {
					description: "colorDetector",
					before: {
						content: "\xA0",
						inlineClassName: `${l.className} colorpicker-color-decoration`,
						inlineClassNameAffectsLetterSpacing: !0,
						attachedData: vT
					}
				}
			});
		}
		let r = n < e.length && n;
		this._decoratorLimitReporter.update(e.length, r), this._colorDecoratorIds.set(t);
	}
	removeAllDecorations() {
		this._editor.removeDecorations(this._decorationsIds), this._decorationsIds = [], this._colorDecoratorIds.clear(), this._colorDecorationClassRefs.clear();
	}
	getColorData(e) {
		let t = this._editor.getModel();
		if (!t) return null;
		let n = t.getDecorationsInRange(E.fromPositions(e, e)).filter((e) => this._colorDatas.has(e.id));
		return n.length === 0 ? null : this._colorDatas.get(n[0].id);
	}
	isColorDecoration(e) {
		return this._colorDecoratorIds.has(e);
	}
};
yT = _T = hT([
	gT(1, Fl),
	gT(2, M),
	gT(3, hi)
], yT);
var bT = class {
	constructor() {
		this._onDidChange = new x(), this._computed = 0, this._limited = !1;
	}
	update(e, t) {
		(e !== this._computed || t !== this._limited) && (this._computed = e, this._limited = t, this._onDidChange.fire());
	}
};
T(yT.ID, yT, 1);
// ../../../node_modules/.pnpm/monaco-editor@0.52.2/node_modules/monaco-editor/esm/vs/editor/contrib/colorPicker/browser/colorPickerModel.js
var xT = class {
	get color() {
		return this._color;
	}
	set color(e) {
		this._color.equals(e) || (this._color = e, this._onDidChangeColor.fire(e));
	}
	get presentation() {
		return this.colorPresentations[this.presentationIndex];
	}
	get colorPresentations() {
		return this._colorPresentations;
	}
	set colorPresentations(e) {
		this._colorPresentations = e, this.presentationIndex > e.length - 1 && (this.presentationIndex = 0), this._onDidChangePresentation.fire(this.presentation);
	}
	constructor(e, t, n) {
		this.presentationIndex = n, this._onColorFlushed = new x(), this.onColorFlushed = this._onColorFlushed.event, this._onDidChangeColor = new x(), this.onDidChangeColor = this._onDidChangeColor.event, this._onDidChangePresentation = new x(), this.onDidChangePresentation = this._onDidChangePresentation.event, this.originalColor = e, this._color = e, this._colorPresentations = t;
	}
	selectNextColorPresentation() {
		this.presentationIndex = (this.presentationIndex + 1) % this.colorPresentations.length, this.flushColor(), this._onDidChangePresentation.fire(this.presentation);
	}
	guessColorPresentation(e, t) {
		let n = -1;
		for (let e = 0; e < this.colorPresentations.length; e++) if (t.toLowerCase() === this.colorPresentations[e].label) {
			n = e;
			break;
		}
		if (n === -1) {
			let e = t.split("(")[0].toLowerCase();
			for (let t = 0; t < this.colorPresentations.length; t++) if (this.colorPresentations[t].label.toLowerCase().startsWith(e)) {
				n = t;
				break;
			}
		}
		n !== -1 && n !== this.presentationIndex && (this.presentationIndex = n, this._onDidChangePresentation.fire(this.presentation));
	}
	flushColor() {
		this._onColorFlushed.fire(this._color);
	}
}, ST = w, CT = class extends U {
	constructor(e, t, n, r = !1) {
		super(), this.model = t, this.showingStandaloneColorPicker = r, this._closeButton = null, this._domNode = ST(".colorpicker-header"), D(e, this._domNode), this._pickedColorNode = D(this._domNode, ST(".picked-color")), D(this._pickedColorNode, ST("span.codicon.codicon-color-mode")), this._pickedColorPresentation = D(this._pickedColorNode, document.createElement("span")), this._pickedColorPresentation.classList.add("picked-color-presentation");
		let i = B("clickToToggleColorOptions", "Click to toggle color options (rgb/hsl/hex)");
		this._pickedColorNode.setAttribute("title", i), this._originalColorNode = D(this._domNode, ST(".original-color")), this._originalColorNode.style.backgroundColor = R.Format.CSS.format(this.model.originalColor) || "", this.backgroundColor = n.getColorTheme().getColor(ao) || R.white, this._register(n.onDidColorThemeChange((e) => {
			this.backgroundColor = e.getColor(ao) || R.white;
		})), this._register(_(this._pickedColorNode, on.CLICK, () => this.model.selectNextColorPresentation())), this._register(_(this._originalColorNode, on.CLICK, () => {
			this.model.color = this.model.originalColor, this.model.flushColor();
		})), this._register(t.onDidChangeColor(this.onDidChangeColor, this)), this._register(t.onDidChangePresentation(this.onDidChangePresentation, this)), this._pickedColorNode.style.backgroundColor = R.Format.CSS.format(t.color) || "", this._pickedColorNode.classList.toggle("light", t.color.rgba.a < .5 ? this.backgroundColor.isLighter() : t.color.isLighter()), this.onDidChangeColor(this.model.color), this.showingStandaloneColorPicker && (this._domNode.classList.add("standalone-colorpicker"), this._closeButton = this._register(new wT(this._domNode)));
	}
	get closeButton() {
		return this._closeButton;
	}
	get pickedColorNode() {
		return this._pickedColorNode;
	}
	get originalColorNode() {
		return this._originalColorNode;
	}
	onDidChangeColor(e) {
		this._pickedColorNode.style.backgroundColor = R.Format.CSS.format(e) || "", this._pickedColorNode.classList.toggle("light", e.rgba.a < .5 ? this.backgroundColor.isLighter() : e.isLighter()), this.onDidChangePresentation();
	}
	onDidChangePresentation() {
		this._pickedColorPresentation.textContent = this.model.presentation ? this.model.presentation.label : "";
	}
}, wT = class extends U {
	constructor(e) {
		super(), this._onClicked = this._register(new x()), this.onClicked = this._onClicked.event, this._button = document.createElement("div"), this._button.classList.add("close-button"), D(e, this._button);
		let t = document.createElement("div");
		t.classList.add("close-button-inner-div"), D(this._button, t), D(t, ST(".button" + _l.asCSSSelector(Jn("color-picker-close", v.close, B("closeIcon", "Icon to close the color picker"))))).classList.add("close-icon"), this._register(_(this._button, on.CLICK, () => {
			this._onClicked.fire();
		}));
	}
}, TT = class extends U {
	constructor(e, t, n, r = !1) {
		super(), this.model = t, this.pixelRatio = n, this._insertButton = null, this._domNode = ST(".colorpicker-body"), D(e, this._domNode), this._saturationBox = new ET(this._domNode, this.model, this.pixelRatio), this._register(this._saturationBox), this._register(this._saturationBox.onDidChange(this.onDidSaturationValueChange, this)), this._register(this._saturationBox.onColorFlushed(this.flushColor, this)), this._opacityStrip = new OT(this._domNode, this.model, r), this._register(this._opacityStrip), this._register(this._opacityStrip.onDidChange(this.onDidOpacityChange, this)), this._register(this._opacityStrip.onColorFlushed(this.flushColor, this)), this._hueStrip = new kT(this._domNode, this.model, r), this._register(this._hueStrip), this._register(this._hueStrip.onDidChange(this.onDidHueChange, this)), this._register(this._hueStrip.onColorFlushed(this.flushColor, this)), r && (this._insertButton = this._register(new AT(this._domNode)), this._domNode.classList.add("standalone-colorpicker"));
	}
	flushColor() {
		this.model.flushColor();
	}
	onDidSaturationValueChange({ s: e, v: t }) {
		let n = this.model.color.hsva;
		this.model.color = new R(new Na(n.h, e, t, n.a));
	}
	onDidOpacityChange(e) {
		let t = this.model.color.hsva;
		this.model.color = new R(new Na(t.h, t.s, t.v, e));
	}
	onDidHueChange(e) {
		let t = this.model.color.hsva, n = (1 - e) * 360;
		this.model.color = new R(new Na(n === 360 ? 0 : n, t.s, t.v, t.a));
	}
	get domNode() {
		return this._domNode;
	}
	get saturationBox() {
		return this._saturationBox;
	}
	get enterButton() {
		return this._insertButton;
	}
	layout() {
		this._saturationBox.layout(), this._opacityStrip.layout(), this._hueStrip.layout();
	}
}, ET = class extends U {
	constructor(e, t, n) {
		super(), this.model = t, this.pixelRatio = n, this._onDidChange = new x(), this.onDidChange = this._onDidChange.event, this._onColorFlushed = new x(), this.onColorFlushed = this._onColorFlushed.event, this._domNode = ST(".saturation-wrap"), D(e, this._domNode), this._canvas = document.createElement("canvas"), this._canvas.className = "saturation-box", D(this._domNode, this._canvas), this.selection = ST(".saturation-selection"), D(this._domNode, this.selection), this.layout(), this._register(_(this._domNode, on.POINTER_DOWN, (e) => this.onPointerDown(e))), this._register(this.model.onDidChangeColor(this.onDidChangeColor, this)), this.monitor = null;
	}
	get domNode() {
		return this._domNode;
	}
	onPointerDown(e) {
		if (!e.target || !(e.target instanceof Element)) return;
		this.monitor = this._register(new Xr());
		let t = Bi(this._domNode);
		e.target !== this.selection && this.onDidChangePosition(e.offsetX, e.offsetY), this.monitor.startMonitoring(e.target, e.pointerId, e.buttons, (e) => this.onDidChangePosition(e.pageX - t.left, e.pageY - t.top), () => null);
		let n = _(e.target.ownerDocument, on.POINTER_UP, () => {
			this._onColorFlushed.fire(), n.dispose(), this.monitor &&= (this.monitor.stopMonitoring(!0), null);
		}, !0);
	}
	onDidChangePosition(e, t) {
		let n = Math.max(0, Math.min(1, e / this.width)), r = Math.max(0, Math.min(1, 1 - t / this.height));
		this.paintSelection(n, r), this._onDidChange.fire({
			s: n,
			v: r
		});
	}
	layout() {
		this.width = this._domNode.offsetWidth, this.height = this._domNode.offsetHeight, this._canvas.width = this.width * this.pixelRatio, this._canvas.height = this.height * this.pixelRatio, this.paint();
		let e = this.model.color.hsva;
		this.paintSelection(e.s, e.v);
	}
	paint() {
		let e = this.model.color.hsva, t = new R(new Na(e.h, 1, 1, 1)), n = this._canvas.getContext("2d"), r = n.createLinearGradient(0, 0, this._canvas.width, 0);
		r.addColorStop(0, "rgba(255, 255, 255, 1)"), r.addColorStop(.5, "rgba(255, 255, 255, 0.5)"), r.addColorStop(1, "rgba(255, 255, 255, 0)");
		let i = n.createLinearGradient(0, 0, 0, this._canvas.height);
		i.addColorStop(0, "rgba(0, 0, 0, 0)"), i.addColorStop(1, "rgba(0, 0, 0, 1)"), n.rect(0, 0, this._canvas.width, this._canvas.height), n.fillStyle = R.Format.CSS.format(t), n.fill(), n.fillStyle = r, n.fill(), n.fillStyle = i, n.fill();
	}
	paintSelection(e, t) {
		this.selection.style.left = `${e * this.width}px`, this.selection.style.top = `${this.height - t * this.height}px`;
	}
	onDidChangeColor(e) {
		if (this.monitor && this.monitor.isMonitoring()) return;
		this.paint();
		let t = e.hsva;
		this.paintSelection(t.s, t.v);
	}
}, DT = class extends U {
	constructor(e, t, n = !1) {
		super(), this.model = t, this._onDidChange = new x(), this.onDidChange = this._onDidChange.event, this._onColorFlushed = new x(), this.onColorFlushed = this._onColorFlushed.event, n ? (this.domNode = D(e, ST(".standalone-strip")), this.overlay = D(this.domNode, ST(".standalone-overlay"))) : (this.domNode = D(e, ST(".strip")), this.overlay = D(this.domNode, ST(".overlay"))), this.slider = D(this.domNode, ST(".slider")), this.slider.style.top = "0px", this._register(_(this.domNode, on.POINTER_DOWN, (e) => this.onPointerDown(e))), this._register(t.onDidChangeColor(this.onDidChangeColor, this)), this.layout();
	}
	layout() {
		this.height = this.domNode.offsetHeight - this.slider.offsetHeight;
		let e = this.getValue(this.model.color);
		this.updateSliderPosition(e);
	}
	onDidChangeColor(e) {
		let t = this.getValue(e);
		this.updateSliderPosition(t);
	}
	onPointerDown(e) {
		if (!e.target || !(e.target instanceof Element)) return;
		let t = this._register(new Xr()), n = Bi(this.domNode);
		this.domNode.classList.add("grabbing"), e.target !== this.slider && this.onDidChangeTop(e.offsetY), t.startMonitoring(e.target, e.pointerId, e.buttons, (e) => this.onDidChangeTop(e.pageY - n.top), () => null);
		let r = _(e.target.ownerDocument, on.POINTER_UP, () => {
			this._onColorFlushed.fire(), r.dispose(), t.stopMonitoring(!0), this.domNode.classList.remove("grabbing");
		}, !0);
	}
	onDidChangeTop(e) {
		let t = Math.max(0, Math.min(1, 1 - e / this.height));
		this.updateSliderPosition(t), this._onDidChange.fire(t);
	}
	updateSliderPosition(e) {
		this.slider.style.top = `${(1 - e) * this.height}px`;
	}
}, OT = class extends DT {
	constructor(e, t, n = !1) {
		super(e, t, n), this.domNode.classList.add("opacity-strip"), this.onDidChangeColor(this.model.color);
	}
	onDidChangeColor(e) {
		super.onDidChangeColor(e);
		let { r: t, g: n, b: r } = e.rgba, i = new R(new $a(t, n, r, 1)), a = new R(new $a(t, n, r, 0));
		this.overlay.style.background = `linear-gradient(to bottom, ${i} 0%, ${a} 100%)`;
	}
	getValue(e) {
		return e.hsva.a;
	}
}, kT = class extends DT {
	constructor(e, t, n = !1) {
		super(e, t, n), this.domNode.classList.add("hue-strip");
	}
	getValue(e) {
		return 1 - e.hsva.h / 360;
	}
}, AT = class extends U {
	constructor(e) {
		super(), this._onClicked = this._register(new x()), this.onClicked = this._onClicked.event, this._button = D(e, document.createElement("button")), this._button.classList.add("insert-button"), this._button.textContent = "Insert", this._register(_(this._button, on.CLICK, () => {
			this._onClicked.fire();
		}));
	}
	get button() {
		return this._button;
	}
}, jT = class extends cr {
	constructor(e, t, n, r, i = !1) {
		super(), this.model = t, this.pixelRatio = n, this._register(Dn.getInstance(Cs(e)).onDidChange(() => this.layout())), this._domNode = ST(".colorpicker-widget"), e.appendChild(this._domNode), this.header = this._register(new CT(this._domNode, this.model, r, i)), this.body = this._register(new TT(this._domNode, this.model, this.pixelRatio, i));
	}
	layout() {
		this.body.layout();
	}
	get domNode() {
		return this._domNode;
	}
}, MT = class {
	constructor(e, t, n, r) {
		this.priority = e, this.range = t, this.initialMousePosX = n, this.initialMousePosY = r, this.type = 1;
	}
	equals(e) {
		return e.type === 1 && this.range.equalsRange(e.range);
	}
	canAdoptVisibleHover(e, t) {
		return e.type === 1 && t.lineNumber === this.range.startLineNumber;
	}
}, NT = class {
	constructor(e, t, n, r, i, a) {
		this.priority = e, this.owner = t, this.range = n, this.initialMousePosX = r, this.initialMousePosY = i, this.supportsMarkerHover = a, this.type = 2;
	}
	equals(e) {
		return e.type === 2 && this.owner === e.owner;
	}
	canAdoptVisibleHover(e, t) {
		return e.type === 2 && this.owner === e.owner;
	}
}, PT = class {
	constructor(e) {
		this.renderedHoverParts = e;
	}
	dispose() {
		for (let e of this.renderedHoverParts) e.dispose();
	}
}, FT = new class {
	constructor() {
		this._participants = [];
	}
	register(e) {
		this._participants.push(e);
	}
	getAll() {
		return this._participants;
	}
}(), IT = function(e, t, n, r) {
	var i = arguments.length, a = i < 3 ? t : r === null ? r = Object.getOwnPropertyDescriptor(t, n) : r, o;
	if (typeof Reflect == "object" && typeof Reflect.decorate == "function") a = Reflect.decorate(e, t, n, r);
	else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (i < 3 ? o(a) : i > 3 ? o(t, n, a) : o(t, n)) || a);
	return i > 3 && a && Object.defineProperty(t, n, a), a;
}, LT = function(e, t) {
	return function(n, r) {
		t(n, r, e);
	};
}, RT = class {
	constructor(e, t, n, r) {
		this.owner = e, this.range = t, this.model = n, this.provider = r, this.forceShowAtRange = !0;
	}
	isValidForHoverAnchor(e) {
		return e.type === 1 && this.range.startColumn <= e.range.startColumn && this.range.endColumn >= e.range.endColumn;
	}
}, zT = class {
	constructor(e, t) {
		this._editor = e, this._themeService = t, this.hoverOrdinal = 2;
	}
	computeSync(e, t) {
		return [];
	}
	computeAsync(e, t, n) {
		return dl.fromPromise(this._computeAsync(e, t, n));
	}
	async _computeAsync(e, t, n) {
		if (!this._editor.hasModel()) return [];
		let r = yT.get(this._editor);
		if (!r) return [];
		for (let e of t) {
			if (!r.isColorDecoration(e)) continue;
			let t = r.getColorData(e.range.getStartPosition());
			if (t) return [await HT(this, this._editor.getModel(), t.colorInfo, t.provider)];
		}
		return [];
	}
	renderHoverParts(e, t) {
		let n = UT(this, this._editor, this._themeService, t, e);
		return n ? (this._colorPicker = n.colorPicker, new PT([{
			hoverPart: n.hoverPart,
			hoverElement: this._colorPicker.domNode,
			dispose() {
				n.disposables.dispose();
			}
		}])) : new PT([]);
	}
	handleResize() {
		this._colorPicker?.layout();
	}
	isColorPickerVisible() {
		return !!this._colorPicker;
	}
};
zT = IT([LT(1, fc)], zT);
var BT = class {
	constructor(e, t, n, r) {
		this.owner = e, this.range = t, this.model = n, this.provider = r;
	}
}, VT = class {
	constructor(e, t) {
		this._editor = e, this._themeService = t, this._color = null;
	}
	async createColorHover(e, t, n) {
		if (!this._editor.hasModel() || !yT.get(this._editor)) return null;
		let r = await cT(n, this._editor.getModel(), C.None), i = null, a = null;
		for (let t of r) {
			let n = t.colorInfo;
			E.containsRange(n.range, e.range) && (i = n, a = t.provider);
		}
		let o = i ?? e, s = a ?? t, c = !!i;
		return {
			colorHover: await HT(this, this._editor.getModel(), o, s),
			foundInEditor: c
		};
	}
	async updateEditorModel(e) {
		if (!this._editor.hasModel()) return;
		let t = e.model, n = new E(e.range.startLineNumber, e.range.startColumn, e.range.endLineNumber, e.range.endColumn);
		this._color && (await GT(this._editor.getModel(), t, this._color, n, e), n = WT(this._editor, n, t));
	}
	renderHoverParts(e, t) {
		return UT(this, this._editor, this._themeService, t, e);
	}
	set color(e) {
		this._color = e;
	}
	get color() {
		return this._color;
	}
};
VT = IT([LT(1, fc)], VT);
async function HT(e, t, n, r) {
	let i = t.getValueInRange(n.range), { red: a, green: o, blue: s, alpha: c } = n.color, l = new $a(Math.round(a * 255), Math.round(o * 255), Math.round(s * 255), c), u = new R(l), d = await lT(t, n, r, C.None), f = new xT(u, [], 0);
	return f.colorPresentations = d || [], f.guessColorPresentation(u, i), e instanceof zT ? new RT(e, E.lift(n.range), f, r) : new BT(e, E.lift(n.range), f, r);
}
function UT(e, t, n, r, i) {
	if (r.length === 0 || !t.hasModel()) return;
	if (i.setMinimumDimensions) {
		let e = t.getOption(67) + 8;
		i.setMinimumDimensions(new Ze(302, e));
	}
	let a = new g(), o = r[0], s = t.getModel(), c = o.model, l = a.add(new jT(i.fragment, c, t.getOption(144), n, e instanceof VT)), u = !1, d = new E(o.range.startLineNumber, o.range.startColumn, o.range.endLineNumber, o.range.endColumn);
	if (e instanceof VT) {
		let t = o.model.color;
		e.color = t, GT(s, c, t, d, o), a.add(c.onColorFlushed((t) => {
			e.color = t;
		}));
	} else a.add(c.onColorFlushed(async (e) => {
		await GT(s, c, e, d, o), u = !0, d = WT(t, d, c);
	}));
	return a.add(c.onDidChangeColor((e) => {
		GT(s, c, e, d, o);
	})), a.add(t.onDidChangeModelContent((e) => {
		u ? u = !1 : (i.hide(), t.focus());
	})), {
		hoverPart: o,
		colorPicker: l,
		disposables: a
	};
}
function WT(e, t, n) {
	let r = [], i = n.presentation.textEdit ?? {
		range: t,
		text: n.presentation.label,
		forceMoveMarkers: !1
	};
	r.push(i), n.presentation.additionalTextEdits && r.push(...n.presentation.additionalTextEdits);
	let a = E.lift(i.range), o = e.getModel()._setTrackedRange(null, a, 3);
	return e.executeEdits("colorpicker", r), e.pushUndoStop(), e.getModel()._getTrackedRange(o) ?? a;
}
async function GT(e, t, n, r, i) {
	t.colorPresentations = await lT(e, {
		range: r,
		color: {
			red: n.rgba.r / 255,
			green: n.rgba.g / 255,
			blue: n.rgba.b / 255,
			alpha: n.rgba.a
		}
	}, i.provider, C.None) || [];
}
// ../../../node_modules/.pnpm/monaco-editor@0.52.2/node_modules/monaco-editor/esm/vs/editor/contrib/hover/browser/hoverActionIds.js
var KT = "editor.action.showHover", qT = "editor.action.showDefinitionPreviewHover", JT = "editor.action.scrollUpHover", YT = "editor.action.scrollDownHover", XT = "editor.action.scrollLeftHover", ZT = "editor.action.scrollRightHover", QT = "editor.action.pageUpHover", $T = "editor.action.pageDownHover", eE = "editor.action.goToTopHover", tE = "editor.action.goToBottomHover", nE = "editor.action.increaseHoverVerbosityLevel", rE = B({
	key: "increaseHoverVerbosityLevel",
	comment: ["Label for action that will increase the hover verbosity level."]
}, "Increase Hover Verbosity Level"), iE = "editor.action.decreaseHoverVerbosityLevel", aE = B({
	key: "decreaseHoverVerbosityLevel",
	comment: ["Label for action that will decrease the hover verbosity level."]
}, "Decrease Hover Verbosity Level"), oE = "editor.action.inlineSuggest.commit", sE = "editor.action.inlineSuggest.showPrevious", cE = "editor.action.inlineSuggest.showNext", lE = function(e, t, n, r) {
	var i = arguments.length, a = i < 3 ? t : r === null ? r = Object.getOwnPropertyDescriptor(t, n) : r, o;
	if (typeof Reflect == "object" && typeof Reflect.decorate == "function") a = Reflect.decorate(e, t, n, r);
	else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (i < 3 ? o(a) : i > 3 ? o(t, n, a) : o(t, n)) || a);
	return i > 3 && a && Object.defineProperty(t, n, a), a;
}, uE = function(e, t) {
	return function(n, r) {
		t(n, r, e);
	};
}, dE, fE = class extends U {
	constructor(e, t, n) {
		super(), this.editor = e, this.model = t, this.instantiationService = n, this.alwaysShowToolbar = tr(this, this.editor.onDidChangeConfiguration, () => this.editor.getOption(62).showToolbar === "always"), this.sessionPosition = void 0, this.position = ia(this, (e) => {
			let t = this.model.read(e)?.primaryGhostText.read(e);
			if (!this.alwaysShowToolbar.read(e) || !t || t.parts.length === 0) return this.sessionPosition = void 0, null;
			let n = t.parts[0].column;
			this.sessionPosition && this.sessionPosition.lineNumber !== t.lineNumber && (this.sessionPosition = void 0);
			let r = new b(t.lineNumber, Math.min(n, this.sessionPosition?.column ?? 2 ** 53 - 1));
			return this.sessionPosition = r, r;
		}), this._register(jo((t, n) => {
			let r = this.model.read(t);
			if (!r || !this.alwaysShowToolbar.read(t)) return;
			let i = Bc((t, n) => {
				let i = n.add(this.instantiationService.createInstance(hE, this.editor, !0, this.position, r.selectedInlineCompletionIndex, r.inlineCompletionsCount, r.activeCommands));
				return e.addContentWidget(i), n.add(Gt(() => e.removeContentWidget(i))), n.add(Os((e) => {
					this.position.read(e) && r.lastTriggerKind.read(e) !== Ws.Explicit && r.triggerExplicitly();
				})), i;
			}), a = yi(this, (e, t) => !!this.position.read(e) || !!t);
			n.add(Os((e) => {
				a.read(e) && i.read(e);
			}));
		}));
	}
};
fE = lE([uE(2, P)], fE);
var pE = Jn("inline-suggestion-hints-next", v.chevronRight, B("parameterHintsNextIcon", "Icon for show next parameter hint.")), mE = Jn("inline-suggestion-hints-previous", v.chevronLeft, B("parameterHintsPreviousIcon", "Icon for show previous parameter hint.")), hE = class extends U {
	static {
		dE = this;
	}
	static {
		this._dropDownVisible = !1;
	}
	static get dropDownVisible() {
		return this._dropDownVisible;
	}
	static {
		this.id = 0;
	}
	createCommandAction(e, t, n) {
		let r = new wr(e, t, n, !0, () => this._commandService.executeCommand(e)), i = this.keybindingService.lookupKeybinding(e, this._contextKeyService), a = t;
		return i && (a = B({
			key: "content",
			comment: ["A label", "A keybinding"]
		}, "{0} ({1})", t, i.getLabel())), r.tooltip = a, r;
	}
	constructor(e, t, n, r, i, a, o, s, c, l, u) {
		super(), this.editor = e, this.withBorder = t, this._position = n, this._currentSuggestionIdx = r, this._suggestionCount = i, this._extraCommands = a, this._commandService = o, this.keybindingService = c, this._contextKeyService = l, this._menuService = u, this.id = `InlineSuggestionHintsContentWidget${dE.id++}`, this.allowEditorOverflow = !0, this.suppressMouseDown = !1, this.nodes = cc("div.inlineSuggestionsHints", { className: this.withBorder ? ".withBorder" : "" }, [cc("div@toolBar")]), this.previousAction = this.createCommandAction(sE, B("previous", "Previous"), _l.asClassName(mE)), this.availableSuggestionCountAction = new wr("inlineSuggestionHints.availableSuggestionCount", "", void 0, !1), this.nextAction = this.createCommandAction(cE, B("next", "Next"), _l.asClassName(pE)), this.inlineCompletionsActionsMenus = this._register(this._menuService.createMenu(F.InlineCompletionsActions, this._contextKeyService)), this.clearAvailableSuggestionCountLabelDebounced = this._register(new tl(() => {
			this.availableSuggestionCountAction.label = "";
		}, 100)), this.disableButtonsDebounced = this._register(new tl(() => {
			this.previousAction.enabled = this.nextAction.enabled = !1;
		}, 100)), this.toolBar = this._register(s.createInstance(vE, this.nodes.toolBar, F.InlineSuggestionToolbar, {
			menuOptions: { renderShortTitle: !0 },
			toolbarOptions: { primaryGroup: (e) => e.startsWith("primary") },
			actionViewItemProvider: (e, t) => {
				if (e instanceof wc) return s.createInstance(_E, e, void 0);
				if (e === this.availableSuggestionCountAction) {
					let t = new gE(void 0, e, {
						label: !0,
						icon: !1
					});
					return t.setClass("availableSuggestionCount"), t;
				}
			},
			telemetrySource: "InlineSuggestionToolbar"
		})), this.toolBar.setPrependedPrimaryActions([
			this.previousAction,
			this.availableSuggestionCountAction,
			this.nextAction
		]), this._register(this.toolBar.onDidChangeDropdownVisibility((e) => {
			dE._dropDownVisible = e;
		})), this._register(Os((e) => {
			this._position.read(e), this.editor.layoutContentWidget(this);
		})), this._register(Os((e) => {
			let t = this._suggestionCount.read(e), n = this._currentSuggestionIdx.read(e);
			t === void 0 ? this.clearAvailableSuggestionCountLabelDebounced.schedule() : (this.clearAvailableSuggestionCountLabelDebounced.cancel(), this.availableSuggestionCountAction.label = `${n + 1}/${t}`), t !== void 0 && t > 1 ? (this.disableButtonsDebounced.cancel(), this.previousAction.enabled = this.nextAction.enabled = !0) : this.disableButtonsDebounced.schedule();
		})), this._register(Os((e) => {
			let t = this._extraCommands.read(e).map((e) => ({
				class: void 0,
				id: e.id,
				enabled: !0,
				tooltip: e.tooltip || "",
				label: e.title,
				run: (t) => this._commandService.executeCommand(e.id)
			}));
			for (let [e, n] of this.inlineCompletionsActionsMenus.getActions()) for (let e of n) e instanceof wc && t.push(e);
			t.length > 0 && t.unshift(new xe()), this.toolBar.setAdditionalSecondaryActions(t);
		}));
	}
	getId() {
		return this.id;
	}
	getDomNode() {
		return this.nodes.root;
	}
	getPosition() {
		return {
			position: this._position.get(),
			preference: [1, 2],
			positionAffinity: 3
		};
	}
};
hE = dE = lE([
	uE(6, ga),
	uE(7, P),
	uE(8, ft),
	uE(9, j),
	uE(10, aa)
], hE);
var gE = class extends Qr {
	constructor() {
		super(...arguments), this._className = void 0;
	}
	setClass(e) {
		this._className = e;
	}
	render(e) {
		super.render(e), this._className && e.classList.add(this._className);
	}
	updateTooltip() {}
}, _E = class extends Xo {
	updateLabel() {
		let e = this._keybindingService.lookupKeybinding(this._action.id, this._contextKeyService);
		if (!e) return super.updateLabel();
		if (this.label) {
			let t = cc("div.keybinding").root;
			this._register(new kt(t, us, {
				disableTitle: !0,
				...sn
			})).set(e), this.label.textContent = this._action.label, this.label.appendChild(t), this.label.classList.add("inlineSuggestionStatusBarItemLabel");
		}
	}
	updateTooltip() {}
}, vE = class extends yn {
	constructor(e, t, n, r, i, a, o, s, c) {
		super(e, {
			resetMenu: t,
			...n
		}, r, i, a, o, s, c), this.menuId = t, this.options2 = n, this.menuService = r, this.contextKeyService = i, this.menu = this._store.add(this.menuService.createMenu(this.menuId, this.contextKeyService, { emitEventsForSubmenuChanges: !0 })), this.additionalActions = [], this.prependedPrimaryActions = [], this._store.add(this.menu.onDidChange(() => this.updateToolbar())), this.updateToolbar();
	}
	updateToolbar() {
		let e = [], t = [];
		pn(this.menu, this.options2?.menuOptions, {
			primary: e,
			secondary: t
		}, this.options2?.toolbarOptions?.primaryGroup, this.options2?.toolbarOptions?.shouldInlineSubmenu, this.options2?.toolbarOptions?.useSeparatorsInPrimaryActions), t.push(...this.additionalActions), e.unshift(...this.prependedPrimaryActions), this.setActions(e, t);
	}
	setPrependedPrimaryActions(e) {
		At(this.prependedPrimaryActions, e, (e, t) => e === t) || (this.prependedPrimaryActions = e, this.updateToolbar());
	}
	setAdditionalSecondaryActions(e) {
		At(this.additionalActions, e, (e, t) => e === t) || (this.additionalActions = e, this.updateToolbar());
	}
};
vE = lE([
	uE(3, aa),
	uE(4, j),
	uE(5, Br),
	uE(6, ft),
	uE(7, ga),
	uE(8, mc)
], vE);
// ../../../node_modules/.pnpm/monaco-editor@0.52.2/node_modules/monaco-editor/esm/vs/editor/contrib/hover/browser/hoverUtils.js
function yE(e, t, n) {
	let r = Bi(e);
	return !(t < r.left || t > r.left + r.width || n < r.top || n > r.top + r.height);
}
// ../../../node_modules/.pnpm/monaco-editor@0.52.2/node_modules/monaco-editor/esm/vs/editor/contrib/hover/browser/hoverOperation.js
var bE = class {
	constructor(e, t, n) {
		this.value = e, this.isComplete = t, this.hasLoadingMessage = n;
	}
}, xE = class extends U {
	constructor(e, t) {
		super(), this._editor = e, this._computer = t, this._onResult = this._register(new x()), this.onResult = this._onResult.event, this._firstWaitScheduler = this._register(new tl(() => this._triggerAsyncComputation(), 0)), this._secondWaitScheduler = this._register(new tl(() => this._triggerSyncComputation(), 0)), this._loadingMessageScheduler = this._register(new tl(() => this._triggerLoadingMessage(), 0)), this._state = 0, this._asyncIterable = null, this._asyncIterableDone = !1, this._result = [];
	}
	dispose() {
		this._asyncIterable &&= (this._asyncIterable.cancel(), null), super.dispose();
	}
	get _hoverTime() {
		return this._editor.getOption(60).delay;
	}
	get _firstWaitTime() {
		return this._hoverTime / 2;
	}
	get _secondWaitTime() {
		return this._hoverTime - this._firstWaitTime;
	}
	get _loadingMessageTime() {
		return 3 * this._hoverTime;
	}
	_setState(e, t = !0) {
		this._state = e, t && this._fireResult();
	}
	_triggerAsyncComputation() {
		this._setState(2), this._secondWaitScheduler.schedule(this._secondWaitTime), this._computer.computeAsync ? (this._asyncIterableDone = !1, this._asyncIterable = Ie((e) => this._computer.computeAsync(e)), (async () => {
			try {
				for await (let e of this._asyncIterable) e && (this._result.push(e), this._fireResult());
				this._asyncIterableDone = !0, (this._state === 3 || this._state === 4) && this._setState(0);
			} catch (e) {
				er(e);
			}
		})()) : this._asyncIterableDone = !0;
	}
	_triggerSyncComputation() {
		this._computer.computeSync && (this._result = this._result.concat(this._computer.computeSync())), this._setState(this._asyncIterableDone ? 0 : 3);
	}
	_triggerLoadingMessage() {
		this._state === 3 && this._setState(4);
	}
	_fireResult() {
		if (this._state === 1 || this._state === 2) return;
		let e = this._state === 0, t = this._state === 4;
		this._onResult.fire(new bE(this._result.slice(0), e, t));
	}
	start(e) {
		if (e === 0) this._state === 0 && (this._setState(1), this._firstWaitScheduler.schedule(this._firstWaitTime), this._loadingMessageScheduler.schedule(this._loadingMessageTime));
		else switch (this._state) {
			case 0:
				this._triggerAsyncComputation(), this._secondWaitScheduler.cancel(), this._triggerSyncComputation();
				break;
			case 2: this._secondWaitScheduler.cancel(), this._triggerSyncComputation();
		}
	}
	cancel() {
		this._firstWaitScheduler.cancel(), this._secondWaitScheduler.cancel(), this._loadingMessageScheduler.cancel(), this._asyncIterable &&= (this._asyncIterable.cancel(), null), this._result = [], this._setState(0, !1);
	}
}, SE = class {
	constructor() {
		this._onDidWillResize = new x(), this.onDidWillResize = this._onDidWillResize.event, this._onDidResize = new x(), this.onDidResize = this._onDidResize.event, this._sashListener = new g(), this._size = new Ze(0, 0), this._minSize = new Ze(0, 0), this._maxSize = new Ze(2 ** 53 - 1, 2 ** 53 - 1), this.domNode = document.createElement("div"), this._eastSash = new Vi(this.domNode, { getVerticalSashLeft: () => this._size.width }, { orientation: 0 }), this._westSash = new Vi(this.domNode, { getVerticalSashLeft: () => 0 }, { orientation: 0 }), this._northSash = new Vi(this.domNode, { getHorizontalSashTop: () => 0 }, {
			orientation: 1,
			orthogonalEdge: Si.North
		}), this._southSash = new Vi(this.domNode, { getHorizontalSashTop: () => this._size.height }, {
			orientation: 1,
			orthogonalEdge: Si.South
		}), this._northSash.orthogonalStartSash = this._westSash, this._northSash.orthogonalEndSash = this._eastSash, this._southSash.orthogonalStartSash = this._westSash, this._southSash.orthogonalEndSash = this._eastSash;
		let e, t = 0, n = 0;
		this._sashListener.add(wt.any(this._northSash.onDidStart, this._eastSash.onDidStart, this._southSash.onDidStart, this._westSash.onDidStart)(() => {
			e === void 0 && (this._onDidWillResize.fire(), e = this._size, t = 0, n = 0);
		})), this._sashListener.add(wt.any(this._northSash.onDidEnd, this._eastSash.onDidEnd, this._southSash.onDidEnd, this._westSash.onDidEnd)(() => {
			e !== void 0 && (e = void 0, t = 0, n = 0, this._onDidResize.fire({
				dimension: this._size,
				done: !0
			}));
		})), this._sashListener.add(this._eastSash.onDidChange((r) => {
			e && (n = r.currentX - r.startX, this.layout(e.height + t, e.width + n), this._onDidResize.fire({
				dimension: this._size,
				done: !1,
				east: !0
			}));
		})), this._sashListener.add(this._westSash.onDidChange((r) => {
			e && (n = -(r.currentX - r.startX), this.layout(e.height + t, e.width + n), this._onDidResize.fire({
				dimension: this._size,
				done: !1,
				west: !0
			}));
		})), this._sashListener.add(this._northSash.onDidChange((r) => {
			e && (t = -(r.currentY - r.startY), this.layout(e.height + t, e.width + n), this._onDidResize.fire({
				dimension: this._size,
				done: !1,
				north: !0
			}));
		})), this._sashListener.add(this._southSash.onDidChange((r) => {
			e && (t = r.currentY - r.startY, this.layout(e.height + t, e.width + n), this._onDidResize.fire({
				dimension: this._size,
				done: !1,
				south: !0
			}));
		})), this._sashListener.add(wt.any(this._eastSash.onDidReset, this._westSash.onDidReset)((e) => {
			this._preferredSize && (this.layout(this._size.height, this._preferredSize.width), this._onDidResize.fire({
				dimension: this._size,
				done: !0
			}));
		})), this._sashListener.add(wt.any(this._northSash.onDidReset, this._southSash.onDidReset)((e) => {
			this._preferredSize && (this.layout(this._preferredSize.height, this._size.width), this._onDidResize.fire({
				dimension: this._size,
				done: !0
			}));
		}));
	}
	dispose() {
		this._northSash.dispose(), this._southSash.dispose(), this._eastSash.dispose(), this._westSash.dispose(), this._sashListener.dispose(), this._onDidResize.dispose(), this._onDidWillResize.dispose(), this.domNode.remove();
	}
	enableSashes(e, t, n, r) {
		this._northSash.state = e ? 3 : 0, this._eastSash.state = t ? 3 : 0, this._southSash.state = n ? 3 : 0, this._westSash.state = r ? 3 : 0;
	}
	layout(e = this.size.height, t = this.size.width) {
		let { height: n, width: r } = this._minSize, { height: i, width: a } = this._maxSize;
		e = Math.max(n, Math.min(i, e)), t = Math.max(r, Math.min(a, t));
		let o = new Ze(t, e);
		Ze.equals(o, this._size) || (this.domNode.style.height = e + "px", this.domNode.style.width = t + "px", this._size = o, this._northSash.layout(), this._eastSash.layout(), this._southSash.layout(), this._westSash.layout());
	}
	clearSashHoverState() {
		this._eastSash.clearSashHoverState(), this._westSash.clearSashHoverState(), this._northSash.clearSashHoverState(), this._southSash.clearSashHoverState();
	}
	get size() {
		return this._size;
	}
	set maxSize(e) {
		this._maxSize = e;
	}
	get maxSize() {
		return this._maxSize;
	}
	set minSize(e) {
		this._minSize = e;
	}
	get minSize() {
		return this._minSize;
	}
	set preferredSize(e) {
		this._preferredSize = e;
	}
	get preferredSize() {
		return this._preferredSize;
	}
}, CE = 30, wE = 24, TE = class extends U {
	constructor(e, t = new Ze(10, 10)) {
		super(), this._editor = e, this.allowEditorOverflow = !0, this.suppressMouseDown = !1, this._resizableNode = this._register(new SE()), this._contentPosition = null, this._isResizing = !1, this._resizableNode.domNode.style.position = "absolute", this._resizableNode.minSize = Ze.lift(t), this._resizableNode.layout(t.height, t.width), this._resizableNode.enableSashes(!0, !0, !0, !0), this._register(this._resizableNode.onDidResize((e) => {
			this._resize(new Ze(e.dimension.width, e.dimension.height)), e.done && (this._isResizing = !1);
		})), this._register(this._resizableNode.onDidWillResize(() => {
			this._isResizing = !0;
		}));
	}
	get isResizing() {
		return this._isResizing;
	}
	getDomNode() {
		return this._resizableNode.domNode;
	}
	getPosition() {
		return this._contentPosition;
	}
	get position() {
		return this._contentPosition?.position ? b.lift(this._contentPosition.position) : void 0;
	}
	_availableVerticalSpaceAbove(e) {
		let t = this._editor.getDomNode(), n = this._editor.getScrolledVisiblePosition(e);
		if (t && n) return Bi(t).top + n.top - CE;
	}
	_availableVerticalSpaceBelow(e) {
		let t = this._editor.getDomNode(), n = this._editor.getScrolledVisiblePosition(e);
		if (!t || !n) return;
		let r = Bi(t), i = ji(t.ownerDocument.body), a = r.top + n.top + n.height;
		return i.height - a - wE;
	}
	_findPositionPreference(e, t) {
		let n = Math.min(this._availableVerticalSpaceBelow(t) ?? Infinity, e), r = Math.min(this._availableVerticalSpaceAbove(t) ?? Infinity, e), i = Math.min(e, Math.min(Math.max(r, n), e)), a;
		return a = this._editor.getOption(60).above ? i <= r ? 1 : 2 : i <= n ? 2 : 1, a === 1 ? this._resizableNode.enableSashes(!0, !0, !1, !1) : this._resizableNode.enableSashes(!1, !0, !0, !1), a;
	}
	_resize(e) {
		this._resizableNode.layout(e.height, e.width);
	}
}, EE = function(e, t, n, r) {
	var i = arguments.length, a = i < 3 ? t : r === null ? r = Object.getOwnPropertyDescriptor(t, n) : r, o;
	if (typeof Reflect == "object" && typeof Reflect.decorate == "function") a = Reflect.decorate(e, t, n, r);
	else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (i < 3 ? o(a) : i > 3 ? o(t, n, a) : o(t, n)) || a);
	return i > 3 && a && Object.defineProperty(t, n, a), a;
}, DE = function(e, t) {
	return function(n, r) {
		t(n, r, e);
	};
}, OE, kE = 30, AE = 6, jE = class extends TE {
	static {
		OE = this;
	}
	static {
		this.ID = "editor.contrib.resizableContentHoverWidget";
	}
	static {
		this._lastDimensions = new Ze(0, 0);
	}
	get isVisibleFromKeyboard() {
		return this._renderedHover?.source === 1;
	}
	get isVisible() {
		return this._hoverVisibleKey.get() ?? !1;
	}
	get isFocused() {
		return this._hoverFocusedKey.get() ?? !1;
	}
	constructor(e, t, n, r, i) {
		let a = e.getOption(67) + 8, o = new Ze(150, a);
		super(e, o), this._configurationService = n, this._accessibilityService = r, this._keybindingService = i, this._hover = this._register(new Sn()), this._onDidResize = this._register(new x()), this.onDidResize = this._onDidResize.event, this._minimumSize = o, this._hoverVisibleKey = I.hoverVisible.bindTo(t), this._hoverFocusedKey = I.hoverFocused.bindTo(t), D(this._resizableNode.domNode, this._hover.containerDomNode), this._resizableNode.domNode.style.zIndex = "50", this._register(this._editor.onDidLayoutChange(() => {
			this.isVisible && this._updateMaxDimensions();
		})), this._register(this._editor.onDidChangeConfiguration((e) => {
			e.hasChanged(50) && this._updateFont();
		}));
		let s = this._register(oo(this._resizableNode.domNode));
		this._register(s.onDidFocus(() => {
			this._hoverFocusedKey.set(!0);
		})), this._register(s.onDidBlur(() => {
			this._hoverFocusedKey.set(!1);
		})), this._setRenderedHover(void 0), this._editor.addContentWidget(this);
	}
	dispose() {
		super.dispose(), this._renderedHover?.dispose(), this._editor.removeContentWidget(this);
	}
	getId() {
		return OE.ID;
	}
	static _applyDimensions(e, t, n) {
		let r = typeof t == "number" ? `${t}px` : t, i = typeof n == "number" ? `${n}px` : n;
		e.style.width = r, e.style.height = i;
	}
	_setContentsDomNodeDimensions(e, t) {
		let n = this._hover.contentsDomNode;
		return OE._applyDimensions(n, e, t);
	}
	_setContainerDomNodeDimensions(e, t) {
		let n = this._hover.containerDomNode;
		return OE._applyDimensions(n, e, t);
	}
	_setHoverWidgetDimensions(e, t) {
		this._setContentsDomNodeDimensions(e, t), this._setContainerDomNodeDimensions(e, t), this._layoutContentWidget();
	}
	static _applyMaxDimensions(e, t, n) {
		let r = typeof t == "number" ? `${t}px` : t, i = typeof n == "number" ? `${n}px` : n;
		e.style.maxWidth = r, e.style.maxHeight = i;
	}
	_setHoverWidgetMaxDimensions(e, t) {
		OE._applyMaxDimensions(this._hover.contentsDomNode, e, t), OE._applyMaxDimensions(this._hover.containerDomNode, e, t), this._hover.containerDomNode.style.setProperty("--vscode-hover-maxWidth", typeof e == "number" ? `${e}px` : e), this._layoutContentWidget();
	}
	_setAdjustedHoverWidgetDimensions(e) {
		this._setHoverWidgetMaxDimensions("none", "none");
		let t = e.width, n = e.height;
		this._setHoverWidgetDimensions(t, n);
	}
	_updateResizableNodeMaxDimensions() {
		let e = this._findMaximumRenderingWidth() ?? Infinity, t = this._findMaximumRenderingHeight() ?? Infinity;
		this._resizableNode.maxSize = new Ze(e, t), this._setHoverWidgetMaxDimensions(e, t);
	}
	_resize(e) {
		OE._lastDimensions = new Ze(e.width, e.height), this._setAdjustedHoverWidgetDimensions(e), this._resizableNode.layout(e.height, e.width), this._updateResizableNodeMaxDimensions(), this._hover.scrollbar.scanDomNode(), this._editor.layoutContentWidget(this), this._onDidResize.fire();
	}
	_findAvailableSpaceVertically() {
		let e = this._renderedHover?.showAtPosition;
		if (e) return this._positionPreference === 1 ? this._availableVerticalSpaceAbove(e) : this._availableVerticalSpaceBelow(e);
	}
	_findMaximumRenderingHeight() {
		let e = this._findAvailableSpaceVertically();
		if (!e) return;
		let t = AE;
		return Array.from(this._hover.contentsDomNode.children).forEach((e) => {
			t += e.clientHeight;
		}), Math.min(e, t);
	}
	_isHoverTextOverflowing() {
		this._hover.containerDomNode.style.setProperty("--vscode-hover-whiteSpace", "nowrap"), this._hover.containerDomNode.style.setProperty("--vscode-hover-sourceWhiteSpace", "nowrap");
		let e = Array.from(this._hover.contentsDomNode.children).some((e) => e.scrollWidth > e.clientWidth);
		return this._hover.containerDomNode.style.removeProperty("--vscode-hover-whiteSpace"), this._hover.containerDomNode.style.removeProperty("--vscode-hover-sourceWhiteSpace"), e;
	}
	_findMaximumRenderingWidth() {
		if (!this._editor || !this._editor.hasModel()) return;
		let e = this._isHoverTextOverflowing(), t = this._contentWidth === void 0 ? 0 : this._contentWidth - 2;
		return e || this._hover.containerDomNode.clientWidth < t ? ji(this._hover.containerDomNode.ownerDocument.body).width - 14 : this._hover.containerDomNode.clientWidth + 2;
	}
	isMouseGettingCloser(e, t) {
		if (!this._renderedHover) return !1;
		if (this._renderedHover.initialMousePosX === void 0 || this._renderedHover.initialMousePosY === void 0) return this._renderedHover.initialMousePosX = e, this._renderedHover.initialMousePosY = t, !1;
		let n = Bi(this.getDomNode());
		this._renderedHover.closestMouseDistance === void 0 && (this._renderedHover.closestMouseDistance = ME(this._renderedHover.initialMousePosX, this._renderedHover.initialMousePosY, n.left, n.top, n.width, n.height));
		let r = ME(e, t, n.left, n.top, n.width, n.height);
		return r > this._renderedHover.closestMouseDistance + 4 ? !1 : (this._renderedHover.closestMouseDistance = Math.min(this._renderedHover.closestMouseDistance, r), !0);
	}
	_setRenderedHover(e) {
		this._renderedHover?.dispose(), this._renderedHover = e, this._hoverVisibleKey.set(!!e), this._hover.containerDomNode.classList.toggle("hidden", !e);
	}
	_updateFont() {
		let { fontSize: e, lineHeight: t } = this._editor.getOption(50), n = this._hover.contentsDomNode;
		n.style.fontSize = `${e}px`, n.style.lineHeight = `${t / e}`, Array.prototype.slice.call(this._hover.contentsDomNode.getElementsByClassName("code")).forEach((e) => this._editor.applyFontInfo(e));
	}
	_updateContent(e) {
		let t = this._hover.contentsDomNode;
		t.style.paddingBottom = "", t.textContent = "", t.appendChild(e);
	}
	_layoutContentWidget() {
		this._editor.layoutContentWidget(this), this._hover.onContentsChanged();
	}
	_updateMaxDimensions() {
		let e = Math.max(this._editor.getLayoutInfo().height / 4, 250, OE._lastDimensions.height), t = Math.max(this._editor.getLayoutInfo().width * .66, 500, OE._lastDimensions.width);
		this._setHoverWidgetMaxDimensions(t, e);
	}
	_render(e) {
		this._setRenderedHover(e), this._updateFont(), this._updateContent(e.domNode), this._updateMaxDimensions(), this.onContentsChanged(), this._editor.render();
	}
	getPosition() {
		return this._renderedHover ? {
			position: this._renderedHover.showAtPosition,
			secondaryPosition: this._renderedHover.showAtSecondaryPosition,
			positionAffinity: this._renderedHover.shouldAppearBeforeContent ? 3 : void 0,
			preference: [this._positionPreference ?? 1]
		} : null;
	}
	show(e) {
		if (!this._editor || !this._editor.hasModel()) return;
		this._render(e);
		let t = za(this._hover.containerDomNode), n = e.showAtPosition;
		this._positionPreference = this._findPositionPreference(t, n) ?? 1, this.onContentsChanged(), e.shouldFocus && this._hover.containerDomNode.focus(), this._onDidResize.fire();
		let r = this._hover.containerDomNode.ownerDocument.activeElement === this._hover.containerDomNode && qe(this._configurationService.getValue("accessibility.verbosity.hover") === !0 && this._accessibilityService.isScreenReaderOptimized(), this._keybindingService.lookupKeybinding("editor.action.accessibleView")?.getAriaLabel() ?? "");
		r && (this._hover.contentsDomNode.ariaLabel = this._hover.contentsDomNode.textContent + ", " + r);
	}
	hide() {
		if (!this._renderedHover) return;
		let e = this._renderedHover.shouldFocus || this._hoverFocusedKey.get();
		this._setRenderedHover(void 0), this._resizableNode.maxSize = new Ze(Infinity, Infinity), this._resizableNode.clearSashHoverState(), this._hoverFocusedKey.set(!1), this._editor.layoutContentWidget(this), e && this._editor.focus();
	}
	_removeConstraintsRenderNormally() {
		let e = this._editor.getLayoutInfo();
		this._resizableNode.layout(e.height, e.width), this._setHoverWidgetDimensions("auto", "auto");
	}
	setMinimumDimensions(e) {
		this._minimumSize = new Ze(Math.max(this._minimumSize.width, e.width), Math.max(this._minimumSize.height, e.height)), this._updateMinimumWidth();
	}
	_updateMinimumWidth() {
		let e = this._contentWidth === void 0 ? this._minimumSize.width : Math.min(this._contentWidth, this._minimumSize.width);
		this._resizableNode.minSize = new Ze(e, this._minimumSize.height);
	}
	onContentsChanged() {
		this._removeConstraintsRenderNormally();
		let e = this._hover.containerDomNode, t = za(e), n = Oc(e);
		if (this._resizableNode.layout(t, n), this._setHoverWidgetDimensions(n, t), t = za(e), n = Oc(e), this._contentWidth = n, this._updateMinimumWidth(), this._resizableNode.layout(t, n), this._renderedHover?.showAtPosition) {
			let e = za(this._hover.containerDomNode);
			this._positionPreference = this._findPositionPreference(e, this._renderedHover.showAtPosition);
		}
		this._layoutContentWidget();
	}
	focus() {
		this._hover.containerDomNode.focus();
	}
	scrollUp() {
		let e = this._hover.scrollbar.getScrollPosition().scrollTop, t = this._editor.getOption(50);
		this._hover.scrollbar.setScrollPosition({ scrollTop: e - t.lineHeight });
	}
	scrollDown() {
		let e = this._hover.scrollbar.getScrollPosition().scrollTop, t = this._editor.getOption(50);
		this._hover.scrollbar.setScrollPosition({ scrollTop: e + t.lineHeight });
	}
	scrollLeft() {
		let e = this._hover.scrollbar.getScrollPosition().scrollLeft;
		this._hover.scrollbar.setScrollPosition({ scrollLeft: e - kE });
	}
	scrollRight() {
		let e = this._hover.scrollbar.getScrollPosition().scrollLeft;
		this._hover.scrollbar.setScrollPosition({ scrollLeft: e + kE });
	}
	pageUp() {
		let e = this._hover.scrollbar.getScrollPosition().scrollTop, t = this._hover.scrollbar.getScrollDimensions().height;
		this._hover.scrollbar.setScrollPosition({ scrollTop: e - t });
	}
	pageDown() {
		let e = this._hover.scrollbar.getScrollPosition().scrollTop, t = this._hover.scrollbar.getScrollDimensions().height;
		this._hover.scrollbar.setScrollPosition({ scrollTop: e + t });
	}
	goToTop() {
		this._hover.scrollbar.setScrollPosition({ scrollTop: 0 });
	}
	goToBottom() {
		this._hover.scrollbar.setScrollPosition({ scrollTop: this._hover.scrollbar.getScrollDimensions().scrollHeight });
	}
};
jE = OE = EE([
	DE(1, j),
	DE(2, Fl),
	DE(3, st),
	DE(4, ft)
], jE);
function ME(e, t, n, r, i, a) {
	let o = n + i / 2, s = r + a / 2, c = Math.max(Math.abs(e - o) - i / 2, 0), l = Math.max(Math.abs(t - s) - a / 2, 0);
	return Math.sqrt(c * c + l * l);
}
// ../../../node_modules/.pnpm/monaco-editor@0.52.2/node_modules/monaco-editor/esm/vs/editor/contrib/hover/browser/contentHoverComputer.js
var NE = class e {
	get anchor() {
		return this._anchor;
	}
	set anchor(e) {
		this._anchor = e;
	}
	get shouldFocus() {
		return this._shouldFocus;
	}
	set shouldFocus(e) {
		this._shouldFocus = e;
	}
	get source() {
		return this._source;
	}
	set source(e) {
		this._source = e;
	}
	get insistOnKeepingHoverVisible() {
		return this._insistOnKeepingHoverVisible;
	}
	set insistOnKeepingHoverVisible(e) {
		this._insistOnKeepingHoverVisible = e;
	}
	constructor(e, t) {
		this._editor = e, this._participants = t, this._anchor = null, this._shouldFocus = !1, this._source = 0, this._insistOnKeepingHoverVisible = !1;
	}
	static _getLineDecorations(e, t) {
		if (t.type !== 1 && !t.supportsMarkerHover) return [];
		let n = e.getModel(), r = t.range.startLineNumber;
		if (r > n.getLineCount()) return [];
		let i = n.getLineMaxColumn(r);
		return e.getLineDecorations(r).filter((e) => {
			if (e.options.isWholeLine) return !0;
			let n = e.range.startLineNumber === r ? e.range.startColumn : 1, a = e.range.endLineNumber === r ? e.range.endColumn : i;
			if (e.options.showIfCollapsed) {
				if (n > t.range.startColumn + 1 || t.range.endColumn - 1 > a) return !1;
			} else if (n > t.range.startColumn || t.range.endColumn > a) return !1;
			return !0;
		});
	}
	computeAsync(t) {
		let n = this._anchor;
		if (!this._editor.hasModel() || !n) return dl.EMPTY;
		let r = e._getLineDecorations(this._editor, n);
		return dl.merge(this._participants.map((e) => e.computeAsync ? e.computeAsync(n, r, t) : dl.EMPTY));
	}
	computeSync() {
		if (!this._editor.hasModel() || !this._anchor) return [];
		let t = e._getLineDecorations(this._editor, this._anchor), n = [];
		for (let e of this._participants) n = n.concat(e.computeSync(this._anchor, t));
		return On(n);
	}
}, PE = class {
	constructor(e, t, n) {
		this.anchor = e, this.hoverParts = t, this.isComplete = n;
	}
	filter(e) {
		let t = this.hoverParts.filter((t) => t.isValidForHoverAnchor(e));
		return t.length === this.hoverParts.length ? this : new FE(this, this.anchor, t, this.isComplete);
	}
}, FE = class extends PE {
	constructor(e, t, n, r) {
		super(t, n, r), this.original = e;
	}
	filter(e) {
		return this.original.filter(e);
	}
}, IE = function(e, t, n, r) {
	var i = arguments.length, a = i < 3 ? t : r === null ? r = Object.getOwnPropertyDescriptor(t, n) : r, o;
	if (typeof Reflect == "object" && typeof Reflect.decorate == "function") a = Reflect.decorate(e, t, n, r);
	else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (i < 3 ? o(a) : i > 3 ? o(t, n, a) : o(t, n)) || a);
	return i > 3 && a && Object.defineProperty(t, n, a), a;
}, LE = function(e, t) {
	return function(n, r) {
		t(n, r, e);
	};
}, RE = w, zE = class extends U {
	get hasContent() {
		return this._hasContent;
	}
	constructor(e) {
		super(), this._keybindingService = e, this.actions = [], this._hasContent = !1, this.hoverElement = RE("div.hover-row.status-bar"), this.hoverElement.tabIndex = 0, this.actionsElement = D(this.hoverElement, RE("div.actions"));
	}
	addAction(e) {
		let t = this._keybindingService.lookupKeybinding(e.commandId), n = t ? t.getLabel() : null;
		this._hasContent = !0;
		let r = this._register(fn.render(this.actionsElement, e, n));
		return this.actions.push(r), r;
	}
	append(e) {
		let t = D(this.actionsElement, e);
		return this._hasContent = !0, t;
	}
};
zE = IE([LE(0, ft)], zE);
// ../../../node_modules/.pnpm/monaco-editor@0.52.2/node_modules/monaco-editor/esm/vs/editor/contrib/hover/browser/getHover.js
var BE = class {
	constructor(e, t, n) {
		this.provider = e, this.hover = t, this.ordinal = n;
	}
};
async function VE(e, t, n, r, a) {
	let o = await Promise.resolve(e.provideHover(n, r, a)).catch(i);
	if (o && WE(o)) return new BE(e, o, t);
}
function HE(e, t, n, r, i = !1) {
	let a = e.ordered(t, i).map((e, i) => VE(e, i, t, n, r));
	return dl.fromPromises(a).coalesce();
}
function UE(e, t, n, r, i = !1) {
	return HE(e, t, n, r, i).map((e) => e.hover).toPromise();
}
Ga("_executeHoverProvider", (e, t, n) => UE(e.get(M).hoverProvider, t, n, C.None)), Ga("_executeHoverProvider_recursive", (e, t, n) => UE(e.get(M).hoverProvider, t, n, C.None, !0));
function WE(e) {
	let t = e.range !== void 0, n = e.contents !== void 0 && e.contents && e.contents.length > 0;
	return t && n;
}
// ../../../node_modules/.pnpm/monaco-editor@0.52.2/node_modules/monaco-editor/esm/vs/editor/contrib/hover/browser/markdownHoverParticipant.js
var GE = function(e, t, n, r) {
	var i = arguments.length, a = i < 3 ? t : r === null ? r = Object.getOwnPropertyDescriptor(t, n) : r, o;
	if (typeof Reflect == "object" && typeof Reflect.decorate == "function") a = Reflect.decorate(e, t, n, r);
	else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (i < 3 ? o(a) : i > 3 ? o(t, n, a) : o(t, n)) || a);
	return i > 3 && a && Object.defineProperty(t, n, a), a;
}, KE = function(e, t) {
	return function(n, r) {
		t(n, r, e);
	};
}, qE = w, JE = Jn("hover-increase-verbosity", v.add, B("increaseHoverVerbosity", "Icon for increaseing hover verbosity.")), YE = Jn("hover-decrease-verbosity", v.remove, B("decreaseHoverVerbosity", "Icon for decreasing hover verbosity.")), XE = class {
	constructor(e, t, n, r, i, a = void 0) {
		this.owner = e, this.range = t, this.contents = n, this.isBeforeContent = r, this.ordinal = i, this.source = a;
	}
	isValidForHoverAnchor(e) {
		return e.type === 1 && this.range.startColumn <= e.range.startColumn && this.range.endColumn >= e.range.endColumn;
	}
}, ZE = class {
	constructor(e, t, n) {
		this.hover = e, this.hoverProvider = t, this.hoverPosition = n;
	}
	supportsVerbosityAction(e) {
		switch (e) {
			case ja.Increase: return this.hover.canIncreaseVerbosity ?? !1;
			case ja.Decrease: return this.hover.canDecreaseVerbosity ?? !1;
		}
	}
}, QE = class {
	constructor(e, t, n, r, i, a, o, s) {
		this._editor = e, this._languageService = t, this._openerService = n, this._configurationService = r, this._languageFeaturesService = i, this._keybindingService = a, this._hoverService = o, this._commandService = s, this.hoverOrdinal = 3;
	}
	createLoadingMessage(e) {
		return new XE(this, e.range, [new ws().appendText(B("modesContentHover.loading", "Loading..."))], !1, 2e3);
	}
	computeSync(e, t) {
		if (!this._editor.hasModel() || e.type !== 1) return [];
		let n = this._editor.getModel(), r = e.range.startLineNumber, i = n.getLineMaxColumn(r), a = [], o = 1e3, s = n.getLineLength(r), c = n.getLanguageIdAtPosition(e.range.startLineNumber, e.range.startColumn), l = this._editor.getOption(118), u = this._configurationService.getValue("editor.maxTokenizationLineLength", { overrideIdentifier: c }), d = !1;
		l >= 0 && s > l && e.range.startColumn >= l && (d = !0, a.push(new XE(this, e.range, [{ value: B("stopped rendering", "Rendering paused for long line for performance reasons. This can be configured via `editor.stopRenderingLineAfter`.") }], !1, o++))), !d && typeof u == "number" && s >= u && a.push(new XE(this, e.range, [{ value: B("too many characters", "Tokenization is skipped for long lines for performance reasons. This can be configured via `editor.maxTokenizationLineLength`.") }], !1, o++));
		let f = !1;
		for (let n of t) {
			let t = n.range.startLineNumber === r ? n.range.startColumn : 1, s = n.range.endLineNumber === r ? n.range.endColumn : i, c = n.options.hoverMessage;
			if (!c || lc(c)) continue;
			n.options.beforeContentClassName && (f = !0);
			let l = new E(e.range.startLineNumber, t, e.range.startLineNumber, s);
			a.push(new XE(this, l, Wo(c), f, o++));
		}
		return a;
	}
	computeAsync(e, t, n) {
		if (!this._editor.hasModel() || e.type !== 1) return dl.EMPTY;
		let r = this._editor.getModel(), i = this._languageFeaturesService.hoverProvider;
		return i.has(r) ? this._getMarkdownHovers(i, r, e, n) : dl.EMPTY;
	}
	_getMarkdownHovers(e, t, n, r) {
		let i = n.range.getStartPosition();
		return HE(e, t, i, r).filter((e) => !lc(e.hover.contents)).map((e) => {
			let t = e.hover.range ? E.lift(e.hover.range) : n.range, r = new ZE(e.hover, e.provider, i);
			return new XE(this, t, e.hover.contents, !1, e.ordinal, r);
		});
	}
	renderHoverParts(e, t) {
		return this._renderedHoverParts = new eD(t, e.fragment, this, this._editor, this._languageService, this._openerService, this._commandService, this._keybindingService, this._hoverService, this._configurationService, e.onContentsChanged), this._renderedHoverParts;
	}
	updateMarkdownHoverVerbosityLevel(e, t, n) {
		return Promise.resolve(this._renderedHoverParts?.updateMarkdownHoverPartVerbosityLevel(e, t, n));
	}
};
QE = GE([
	KE(1, dr),
	KE(2, p),
	KE(3, Fl),
	KE(4, M),
	KE(5, ft),
	KE(6, rt),
	KE(7, ga)
], QE);
var $E = class {
	constructor(e, t, n) {
		this.hoverPart = e, this.hoverElement = t, this.disposables = n;
	}
	dispose() {
		this.disposables.dispose();
	}
}, eD = class {
	constructor(e, t, n, r, i, a, o, s, c, l, u) {
		this._hoverParticipant = n, this._editor = r, this._languageService = i, this._openerService = a, this._commandService = o, this._keybindingService = s, this._hoverService = c, this._configurationService = l, this._onFinishedRendering = u, this._ongoingHoverOperations = /* @__PURE__ */ new Map(), this._disposables = new g(), this.renderedHoverParts = this._renderHoverParts(e, t, this._onFinishedRendering), this._disposables.add(Gt(() => {
			this.renderedHoverParts.forEach((e) => {
				e.dispose();
			}), this._ongoingHoverOperations.forEach((e) => {
				e.tokenSource.dispose(!0);
			});
		}));
	}
	_renderHoverParts(e, t, n) {
		return e.sort(Yn((e) => e.ordinal, pe)), e.map((e) => {
			let r = this._renderHoverPart(e, n);
			return t.appendChild(r.hoverElement), r;
		});
	}
	_renderHoverPart(e, t) {
		let n = this._renderMarkdownHover(e, t), r = n.hoverElement, i = e.source, a = new g();
		if (a.add(n), !i) return new $E(e, r, a);
		let o = i.supportsVerbosityAction(ja.Increase), s = i.supportsVerbosityAction(ja.Decrease);
		if (!o && !s) return new $E(e, r, a);
		let c = qE("div.verbosity-actions");
		return r.prepend(c), a.add(this._renderHoverExpansionAction(c, ja.Increase, o)), a.add(this._renderHoverExpansionAction(c, ja.Decrease, s)), new $E(e, r, a);
	}
	_renderMarkdownHover(e, t) {
		return nD(this._editor, e, this._languageService, this._openerService, t);
	}
	_renderHoverExpansionAction(e, t, n) {
		let r = new g(), i = t === ja.Increase, a = D(e, qE(_l.asCSSSelector(i ? JE : YE)));
		a.tabIndex = 0;
		let o = new Wt("mouse", !1, {
			target: e,
			position: { hoverPosition: 0 }
		}, this._configurationService, this._hoverService);
		if (r.add(this._hoverService.setupManagedHover(o, a, rD(this._keybindingService, t))), !n) return a.classList.add("disabled"), r;
		a.classList.add("enabled");
		let s = () => this._commandService.executeCommand(t === ja.Increase ? nE : iE);
		return r.add(new Lo(a, s)), r.add(new Un(a, s, [3, 10])), r;
	}
	async updateMarkdownHoverPartVerbosityLevel(e, t, n = !0) {
		let r = this._editor.getModel();
		if (!r) return;
		let i = this._getRenderedHoverPartAtIndex(t), a = i?.hoverPart.source;
		if (!i || !a?.supportsVerbosityAction(e)) return;
		let o = await this._fetchHover(a, r, e);
		if (!o) return;
		let s = new ZE(o, a.hoverProvider, a.hoverPosition), c = i.hoverPart, l = new XE(this._hoverParticipant, c.range, o.contents, c.isBeforeContent, c.ordinal, s), u = this._renderHoverPart(l, this._onFinishedRendering);
		return this._replaceRenderedHoverPartAtIndex(t, u, l), n && this._focusOnHoverPartWithIndex(t), {
			hoverPart: l,
			hoverElement: u.hoverElement
		};
	}
	async _fetchHover(e, t, n) {
		let r = n === ja.Increase ? 1 : -1, a = e.hoverProvider, o = this._ongoingHoverOperations.get(a);
		o && (o.tokenSource.cancel(), r += o.verbosityDelta);
		let s = new Cn();
		this._ongoingHoverOperations.set(a, {
			verbosityDelta: r,
			tokenSource: s
		});
		let c = { verbosityRequest: {
			verbosityDelta: r,
			previousHover: e.hover
		} }, l;
		try {
			l = await Promise.resolve(a.provideHover(t, e.hoverPosition, s.token, c));
		} catch (e) {
			i(e);
		}
		return s.dispose(), this._ongoingHoverOperations.delete(a), l;
	}
	_replaceRenderedHoverPartAtIndex(e, t, n) {
		if (e >= this.renderedHoverParts.length || e < 0) return;
		let r = this.renderedHoverParts[e], i = r.hoverElement, a = t.hoverElement, o = Array.from(a.children);
		i.replaceChildren(...o);
		let s = new $E(n, i, t.disposables);
		i.focus(), r.dispose(), this.renderedHoverParts[e] = s;
	}
	_focusOnHoverPartWithIndex(e) {
		this.renderedHoverParts[e].hoverElement.focus();
	}
	_getRenderedHoverPartAtIndex(e) {
		return this.renderedHoverParts[e];
	}
	dispose() {
		this._disposables.dispose();
	}
};
function tD(e, t, n, r, i) {
	t.sort(Yn((e) => e.ordinal, pe));
	let a = [];
	for (let o of t) a.push(nD(n, o, r, i, e.onContentsChanged));
	return new PT(a);
}
function nD(e, t, n, r, i) {
	let a = new g(), o = qE("div.hover-row"), s = qE("div.hover-row-contents");
	o.appendChild(s);
	let c = t.contents;
	for (let t of c) {
		if (lc(t)) continue;
		let o = qE("div.markdown-hover"), c = D(o, qE("div.hover-contents")), l = a.add(new Jt({ editor: e }, n, r));
		a.add(l.onDidRenderAsync(() => {
			c.className = "hover-contents code-hover-contents", i();
		}));
		let u = a.add(l.render(t));
		c.appendChild(u.element), s.appendChild(o);
	}
	return {
		hoverPart: t,
		hoverElement: o,
		dispose() {
			a.dispose();
		}
	};
}
function rD(e, t) {
	switch (t) {
		case ja.Increase: {
			let t = e.lookupKeybinding(nE);
			return t ? B("increaseVerbosityWithKb", "Increase Hover Verbosity ({0})", t.getLabel()) : B("increaseVerbosity", "Increase Hover Verbosity");
		}
		case ja.Decrease: {
			let t = e.lookupKeybinding(iE);
			return t ? B("decreaseVerbosityWithKb", "Decrease Hover Verbosity ({0})", t.getLabel()) : B("decreaseVerbosity", "Decrease Hover Verbosity");
		}
	}
}
// ../../../node_modules/.pnpm/monaco-editor@0.52.2/node_modules/monaco-editor/esm/vs/editor/contrib/gotoSymbol/browser/link/clickLinkGesture.js
function iD(e, t) {
	return !!e[t];
}
var aD = class {
	constructor(e, t) {
		this.target = e.target, this.isLeftClick = e.event.leftButton, this.isMiddleClick = e.event.middleButton, this.isRightClick = e.event.rightButton, this.hasTriggerModifier = iD(e.event, t.triggerModifier), this.hasSideBySideModifier = iD(e.event, t.triggerSideBySideModifier), this.isNoneOrSingleMouseDown = e.event.detail <= 1;
	}
}, oD = class {
	constructor(e, t) {
		this.keyCodeIsTriggerKey = e.keyCode === t.triggerKey, this.keyCodeIsSideBySideKey = e.keyCode === t.triggerSideBySideKey, this.hasTriggerModifier = iD(e, t.triggerModifier);
	}
}, sD = class {
	constructor(e, t, n, r) {
		this.triggerKey = e, this.triggerModifier = t, this.triggerSideBySideKey = n, this.triggerSideBySideModifier = r;
	}
	equals(e) {
		return this.triggerKey === e.triggerKey && this.triggerModifier === e.triggerModifier && this.triggerSideBySideKey === e.triggerSideBySideKey && this.triggerSideBySideModifier === e.triggerSideBySideModifier;
	}
};
function cD(e) {
	return e === "altKey" ? Xs ? new sD(57, "metaKey", 6, "altKey") : new sD(5, "ctrlKey", 6, "altKey") : Xs ? new sD(6, "altKey", 57, "metaKey") : new sD(6, "altKey", 5, "ctrlKey");
}
var lD = class extends U {
	constructor(e, t) {
		super(), this._onMouseMoveOrRelevantKeyDown = this._register(new x()), this.onMouseMoveOrRelevantKeyDown = this._onMouseMoveOrRelevantKeyDown.event, this._onExecute = this._register(new x()), this.onExecute = this._onExecute.event, this._onCancel = this._register(new x()), this.onCancel = this._onCancel.event, this._editor = e, this._extractLineNumberFromMouseEvent = t?.extractLineNumberFromMouseEvent ?? ((e) => e.target.position ? e.target.position.lineNumber : 0), this._opts = cD(this._editor.getOption(78)), this._lastMouseMoveEvent = null, this._hasTriggerKeyOnMouseDown = !1, this._lineNumberOnMouseDown = 0, this._register(this._editor.onDidChangeConfiguration((e) => {
			if (e.hasChanged(78)) {
				let e = cD(this._editor.getOption(78));
				if (this._opts.equals(e)) return;
				this._opts = e, this._lastMouseMoveEvent = null, this._hasTriggerKeyOnMouseDown = !1, this._lineNumberOnMouseDown = 0, this._onCancel.fire();
			}
		})), this._register(this._editor.onMouseMove((e) => this._onEditorMouseMove(new aD(e, this._opts)))), this._register(this._editor.onMouseDown((e) => this._onEditorMouseDown(new aD(e, this._opts)))), this._register(this._editor.onMouseUp((e) => this._onEditorMouseUp(new aD(e, this._opts)))), this._register(this._editor.onKeyDown((e) => this._onEditorKeyDown(new oD(e, this._opts)))), this._register(this._editor.onKeyUp((e) => this._onEditorKeyUp(new oD(e, this._opts)))), this._register(this._editor.onMouseDrag(() => this._resetHandler())), this._register(this._editor.onDidChangeCursorSelection((e) => this._onDidChangeCursorSelection(e))), this._register(this._editor.onDidChangeModel((e) => this._resetHandler())), this._register(this._editor.onDidChangeModelContent(() => this._resetHandler())), this._register(this._editor.onDidScrollChange((e) => {
			(e.scrollTopChanged || e.scrollLeftChanged) && this._resetHandler();
		}));
	}
	_onDidChangeCursorSelection(e) {
		e.selection && e.selection.startColumn !== e.selection.endColumn && this._resetHandler();
	}
	_onEditorMouseMove(e) {
		this._lastMouseMoveEvent = e, this._onMouseMoveOrRelevantKeyDown.fire([e, null]);
	}
	_onEditorMouseDown(e) {
		this._hasTriggerKeyOnMouseDown = e.hasTriggerModifier, this._lineNumberOnMouseDown = this._extractLineNumberFromMouseEvent(e);
	}
	_onEditorMouseUp(e) {
		let t = this._extractLineNumberFromMouseEvent(e);
		this._hasTriggerKeyOnMouseDown && this._lineNumberOnMouseDown && this._lineNumberOnMouseDown === t && this._onExecute.fire(e);
	}
	_onEditorKeyDown(e) {
		this._lastMouseMoveEvent && (e.keyCodeIsTriggerKey || e.keyCodeIsSideBySideKey && e.hasTriggerModifier) ? this._onMouseMoveOrRelevantKeyDown.fire([this._lastMouseMoveEvent, e]) : e.hasTriggerModifier && this._onCancel.fire();
	}
	_onEditorKeyUp(e) {
		e.keyCodeIsTriggerKey && this._onCancel.fire();
	}
	_resetHandler() {
		this._lastMouseMoveEvent = null, this._hasTriggerKeyOnMouseDown = !1, this._onCancel.fire();
	}
}, uD = class {
	constructor(e, t) {
		this.range = e, this.direction = t;
	}
}, dD = class e {
	constructor(e, t, n) {
		this.hint = e, this.anchor = t, this.provider = n, this._isResolved = !1;
	}
	with(t) {
		let n = new e(this.hint, t.anchor, this.provider);
		return n._isResolved = this._isResolved, n._currentResolve = this._currentResolve, n;
	}
	async resolve(e) {
		if (typeof this.provider.resolveInlayHint == "function") {
			if (this._currentResolve) return await this._currentResolve, e.isCancellationRequested ? void 0 : this.resolve(e);
			this._isResolved || (this._currentResolve = this._doResolve(e).finally(() => this._currentResolve = void 0)), await this._currentResolve;
		}
	}
	async _doResolve(e) {
		try {
			let t = await Promise.resolve(this.provider.resolveInlayHint(this.hint, e));
			this.hint.tooltip = t?.tooltip ?? this.hint.tooltip, this.hint.label = t?.label ?? this.hint.label, this.hint.textEdits = t?.textEdits ?? this.hint.textEdits, this._isResolved = !0;
		} catch (e) {
			i(e), this._isResolved = !1;
		}
	}
}, fD = class e {
	static {
		this._emptyInlayHintList = Object.freeze({
			dispose() {},
			hints: []
		});
	}
	static async create(t, n, r, a) {
		let o = [], s = t.ordered(n).reverse().map((t) => r.map(async (r) => {
			try {
				let i = await t.provideInlayHints(n, r, a);
				(i?.hints.length || t.onDidChangeInlayHints) && o.push([i ?? e._emptyInlayHintList, t]);
			} catch (e) {
				i(e);
			}
		}));
		if (await Promise.all(s.flat()), a.isCancellationRequested || n.isDisposed()) throw new Di();
		return new e(r, o, n);
	}
	constructor(t, n, r) {
		this._disposables = new g(), this.ranges = t, this.provider = /* @__PURE__ */ new Set();
		let i = [];
		for (let [t, a] of n) {
			this._disposables.add(t), this.provider.add(a);
			for (let n of t.hints) {
				let t = r.validatePosition(n.position), o = "before", s = e._getRangeAtPosition(r, t), c;
				s.getStartPosition().isBefore(t) ? (c = E.fromPositions(s.getStartPosition(), t), o = "after") : (c = E.fromPositions(t, s.getEndPosition()), o = "before"), i.push(new dD(n, new uD(c, o), a));
			}
		}
		this.items = i.sort((e, t) => b.compare(e.hint.position, t.hint.position));
	}
	dispose() {
		this._disposables.dispose();
	}
	static _getRangeAtPosition(e, t) {
		let n = t.lineNumber, r = e.getWordAtPosition(t);
		if (r) return new E(n, r.startColumn, n, r.endColumn);
		e.tokenization.tokenizeIfCheap(n);
		let i = e.tokenization.getLineTokens(n), a = t.column - 1, o = i.findTokenIndexAtOffset(a), s = i.getStartOffset(o), c = i.getEndOffset(o);
		return c - s === 1 && (s === a && o > 1 ? (s = i.getStartOffset(o - 1), c = i.getEndOffset(o - 1)) : c === a && o < i.getCount() - 1 && (s = i.getStartOffset(o + 1), c = i.getEndOffset(o + 1))), new E(n, s + 1, n, c + 1);
	}
};
function pD(e) {
	return De.from({
		scheme: Kc.command,
		path: e.id,
		query: e.arguments && encodeURIComponent(JSON.stringify(e.arguments))
	}).toString();
}
// ../../../node_modules/.pnpm/monaco-editor@0.52.2/node_modules/monaco-editor/esm/vs/editor/browser/widget/codeEditor/embeddedCodeEditorWidget.js
var mD = function(e, t, n, r) {
	var i = arguments.length, a = i < 3 ? t : r === null ? r = Object.getOwnPropertyDescriptor(t, n) : r, o;
	if (typeof Reflect == "object" && typeof Reflect.decorate == "function") a = Reflect.decorate(e, t, n, r);
	else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (i < 3 ? o(a) : i > 3 ? o(t, n, a) : o(t, n)) || a);
	return i > 3 && a && Object.defineProperty(t, n, a), a;
}, hD = function(e, t) {
	return function(n, r) {
		t(n, r, e);
	};
}, gD = class extends Ci {
	constructor(e, t, n, r, i, a, o, s, c, l, u, d, f) {
		super(e, {
			...r.getRawOptions(),
			overflowWidgetsDomNode: r.getOverflowWidgetsDomNode()
		}, n, i, a, o, s, c, l, u, d, f), this._parentEditor = r, this._overwriteOptions = t, super.updateOptions(this._overwriteOptions), this._register(r.onDidChangeConfiguration((e) => this._onParentConfigurationChanged(e)));
	}
	getParentEditor() {
		return this._parentEditor;
	}
	_onParentConfigurationChanged(e) {
		super.updateOptions(this._parentEditor.getRawOptions()), super.updateOptions(this._overwriteOptions);
	}
	updateOptions(e) {
		yl(this._overwriteOptions, e, !0), super.updateOptions(this._overwriteOptions);
	}
};
gD = mD([
	hD(4, P),
	hD(5, Ln),
	hD(6, ga),
	hD(7, j),
	hD(8, fc),
	hD(9, t),
	hD(10, st),
	hD(11, Tn),
	hD(12, M)
], gD);
// ../../../node_modules/.pnpm/monaco-editor@0.52.2/node_modules/monaco-editor/esm/vs/editor/contrib/zoneWidget/browser/zoneWidget.js
var _D = new R(new $a(0, 122, 204)), vD = {
	showArrow: !0,
	showFrame: !0,
	className: "",
	frameColor: _D,
	arrowColor: _D,
	keepEditorSelection: !1
}, yD = "vs.editor.contrib.zoneWidget", bD = class {
	constructor(e, t, n, r, i, a, o, s) {
		this.id = "", this.domNode = e, this.afterLineNumber = t, this.afterColumn = n, this.heightInLines = r, this.showInHiddenAreas = o, this.ordinal = s, this._onDomNodeTop = i, this._onComputedHeight = a;
	}
	onDomNodeTop(e) {
		this._onDomNodeTop(e);
	}
	onComputedHeight(e) {
		this._onComputedHeight(e);
	}
}, xD = class {
	constructor(e, t) {
		this._id = e, this._domNode = t;
	}
	getId() {
		return this._id;
	}
	getDomNode() {
		return this._domNode;
	}
	getPosition() {
		return null;
	}
}, SD = class e {
	static {
		this._IdGenerator = new Ba(".arrow-decoration-");
	}
	constructor(t) {
		this._editor = t, this._ruleName = e._IdGenerator.nextId(), this._decorations = this._editor.createDecorationsCollection(), this._color = null, this._height = -1;
	}
	dispose() {
		this.hide(), ba(this._ruleName);
	}
	set color(e) {
		this._color !== e && (this._color = e, this._updateStyle());
	}
	set height(e) {
		this._height !== e && (this._height = e, this._updateStyle());
	}
	_updateStyle() {
		ba(this._ruleName), ct(`.monaco-editor ${this._ruleName}`, `border-style: solid; border-color: transparent; border-bottom-color: ${this._color}; border-width: ${this._height}px; bottom: -${this._height}px !important; margin-left: -${this._height}px; `);
	}
	show(e) {
		e.column === 1 && (e = {
			lineNumber: e.lineNumber,
			column: 2
		}), this._decorations.set([{
			range: E.fromPositions(e),
			options: {
				description: "zone-widget-arrow",
				className: this._ruleName,
				stickiness: 1
			}
		}]);
	}
	hide() {
		this._decorations.clear();
	}
}, CD = class {
	constructor(e, t = {}) {
		this._arrow = null, this._overlayWidget = null, this._resizeSash = null, this._viewZone = null, this._disposables = new g(), this.container = null, this._isShowing = !1, this.editor = e, this._positionMarkerId = this.editor.createDecorationsCollection(), this.options = va(t), yl(this.options, vD, !1), this.domNode = document.createElement("div"), this.options.isAccessible || (this.domNode.setAttribute("aria-hidden", "true"), this.domNode.setAttribute("role", "presentation")), this._disposables.add(this.editor.onDidLayoutChange((e) => {
			let t = this._getWidth(e);
			this.domNode.style.width = t + "px", this.domNode.style.left = this._getLeft(e) + "px", this._onWidth(t);
		}));
	}
	dispose() {
		this._overlayWidget &&= (this.editor.removeOverlayWidget(this._overlayWidget), null), this._viewZone && this.editor.changeViewZones((e) => {
			this._viewZone && e.removeZone(this._viewZone.id), this._viewZone = null;
		}), this._positionMarkerId.clear(), this._disposables.dispose();
	}
	create() {
		this.domNode.classList.add("zone-widget"), this.options.className && this.domNode.classList.add(this.options.className), this.container = document.createElement("div"), this.container.classList.add("zone-widget-container"), this.domNode.appendChild(this.container), this.options.showArrow && (this._arrow = new SD(this.editor), this._disposables.add(this._arrow)), this._fillContainer(this.container), this._initSash(), this._applyStyles();
	}
	style(e) {
		e.frameColor && (this.options.frameColor = e.frameColor), e.arrowColor && (this.options.arrowColor = e.arrowColor), this._applyStyles();
	}
	_applyStyles() {
		if (this.container && this.options.frameColor) {
			let e = this.options.frameColor.toString();
			this.container.style.borderTopColor = e, this.container.style.borderBottomColor = e;
		}
		if (this._arrow && this.options.arrowColor) {
			let e = this.options.arrowColor.toString();
			this._arrow.color = e;
		}
	}
	_getWidth(e) {
		return e.width - e.minimap.minimapWidth - e.verticalScrollbarWidth;
	}
	_getLeft(e) {
		return e.minimap.minimapWidth > 0 && e.minimap.minimapLeft === 0 ? e.minimap.minimapWidth : 0;
	}
	_onViewZoneTop(e) {
		this.domNode.style.top = e + "px";
	}
	_onViewZoneHeight(e) {
		if (this.domNode.style.height = `${e}px`, this.container) {
			let t = e - this._decoratingElementsHeight();
			this.container.style.height = `${t}px`;
			let n = this.editor.getLayoutInfo();
			this._doLayout(t, this._getWidth(n));
		}
		this._resizeSash?.layout();
	}
	get position() {
		let e = this._positionMarkerId.getRange(0);
		if (e) return e.getStartPosition();
	}
	show(e, t) {
		let n = E.isIRange(e) ? E.lift(e) : E.fromPositions(e);
		this._isShowing = !0, this._showImpl(n, t), this._isShowing = !1, this._positionMarkerId.set([{
			range: n,
			options: L.EMPTY
		}]);
	}
	hide() {
		this._viewZone &&= (this.editor.changeViewZones((e) => {
			this._viewZone && e.removeZone(this._viewZone.id);
		}), null), this._overlayWidget &&= (this.editor.removeOverlayWidget(this._overlayWidget), null), this._arrow?.hide(), this._positionMarkerId.clear();
	}
	_decoratingElementsHeight() {
		let e = this.editor.getOption(67), t = 0;
		if (this.options.showArrow) {
			let n = Math.round(e / 3);
			t += 2 * n;
		}
		if (this.options.showFrame) {
			let n = Math.round(e / 9);
			t += 2 * n;
		}
		return t;
	}
	_showImpl(e, t) {
		let n = e.getStartPosition(), r = this.editor.getLayoutInfo(), i = this._getWidth(r);
		this.domNode.style.width = `${i}px`, this.domNode.style.left = this._getLeft(r) + "px";
		let a = document.createElement("div");
		a.style.overflow = "hidden";
		let o = this.editor.getOption(67);
		if (!this.options.allowUnlimitedHeight) {
			let e = Math.max(12, this.editor.getLayoutInfo().height / o * .8);
			t = Math.min(t, e);
		}
		let s = 0, c = 0;
		if (this._arrow && this.options.showArrow && (s = Math.round(o / 3), this._arrow.height = s, this._arrow.show(n)), this.options.showFrame && (c = Math.round(o / 9)), this.editor.changeViewZones((e) => {
			this._viewZone && e.removeZone(this._viewZone.id), this._overlayWidget &&= (this.editor.removeOverlayWidget(this._overlayWidget), null), this.domNode.style.top = "-1000px", this._viewZone = new bD(a, n.lineNumber, n.column, t, (e) => this._onViewZoneTop(e), (e) => this._onViewZoneHeight(e), this.options.showInHiddenAreas, this.options.ordinal), this._viewZone.id = e.addZone(this._viewZone), this._overlayWidget = new xD(yD + this._viewZone.id, this.domNode), this.editor.addOverlayWidget(this._overlayWidget);
		}), this.container && this.options.showFrame) {
			let e = this.options.frameWidth ? this.options.frameWidth : c;
			this.container.style.borderTopWidth = e + "px", this.container.style.borderBottomWidth = e + "px";
		}
		let l = t * o - this._decoratingElementsHeight();
		this.container && (this.container.style.top = s + "px", this.container.style.height = l + "px", this.container.style.overflow = "hidden"), this._doLayout(l, i), this.options.keepEditorSelection || this.editor.setSelection(e);
		let u = this.editor.getModel();
		if (u) {
			let t = u.validateRange(new E(e.startLineNumber, 1, e.endLineNumber + 1, 1));
			this.revealRange(t, t.startLineNumber === u.getLineCount());
		}
	}
	revealRange(e, t) {
		t ? this.editor.revealLineNearTop(e.endLineNumber, 0) : this.editor.revealRange(e, 0);
	}
	setCssClass(e, t) {
		this.container && (t && this.container.classList.remove(t), this.container.classList.add(e));
	}
	_onWidth(e) {}
	_doLayout(e, t) {}
	_relayout(e) {
		this._viewZone && this._viewZone.heightInLines !== e && this.editor.changeViewZones((t) => {
			this._viewZone && (this._viewZone.heightInLines = e, t.layoutZone(this._viewZone.id));
		});
	}
	_initSash() {
		if (this._resizeSash) return;
		this._resizeSash = this._disposables.add(new Vi(this.domNode, this, { orientation: 1 })), this.options.isResizeable || (this._resizeSash.state = 0);
		let e;
		this._disposables.add(this._resizeSash.onDidStart((t) => {
			this._viewZone && (e = {
				startY: t.startY,
				heightInLines: this._viewZone.heightInLines
			});
		})), this._disposables.add(this._resizeSash.onDidEnd(() => {
			e = void 0;
		})), this._disposables.add(this._resizeSash.onDidChange((t) => {
			if (e) {
				let n = (t.currentY - e.startY) / this.editor.getOption(67), r = n < 0 ? Math.ceil(n) : Math.floor(n), i = e.heightInLines + r;
				i > 5 && i < 35 && this._relayout(i);
			}
		}));
	}
	getHorizontalSashLeft() {
		return 0;
	}
	getHorizontalSashTop() {
		return (this.domNode.style.height === null ? 0 : parseInt(this.domNode.style.height)) - this._decoratingElementsHeight() / 2;
	}
	getHorizontalSashWidth() {
		let e = this.editor.getLayoutInfo();
		return e.width - e.minimap.minimapWidth;
	}
}, wD = function(e, t, n, r) {
	var i = arguments.length, a = i < 3 ? t : r === null ? r = Object.getOwnPropertyDescriptor(t, n) : r, o;
	if (typeof Reflect == "object" && typeof Reflect.decorate == "function") a = Reflect.decorate(e, t, n, r);
	else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (i < 3 ? o(a) : i > 3 ? o(t, n, a) : o(t, n)) || a);
	return i > 3 && a && Object.defineProperty(t, n, a), a;
}, TD = function(e, t) {
	return function(n, r) {
		t(n, r, e);
	};
}, ED = ne("IPeekViewService");
rn(ED, class {
	constructor() {
		this._widgets = /* @__PURE__ */ new Map();
	}
	addExclusiveWidget(e, t) {
		let n = this._widgets.get(e);
		n && (n.listener.dispose(), n.widget.dispose()), this._widgets.set(e, {
			widget: t,
			listener: t.onDidClose(() => {
				let n = this._widgets.get(e);
				n && n.widget === t && (n.listener.dispose(), this._widgets.delete(e));
			})
		});
	}
}, 1);
var DD;
(function(e) {
	e.inPeekEditor = new z("inReferenceSearchEditor", !0, B("inReferenceSearchEditor", "Whether the current code editor is embedded inside peek")), e.notInPeekEditor = e.inPeekEditor.toNegated();
})(DD ||= {});
var OD = class {
	static {
		this.ID = "editor.contrib.referenceController";
	}
	constructor(e, t) {
		e instanceof gD && DD.inPeekEditor.bindTo(t);
	}
	dispose() {}
};
OD = wD([TD(1, j)], OD), T(OD.ID, OD, 0);
function kD(e) {
	let t = e.get(Ln).getFocusedCodeEditor();
	return t instanceof gD ? t.getParentEditor() : t;
}
var AD = {
	headerBackgroundColor: R.white,
	primaryHeadingColor: R.fromHex("#333333"),
	secondaryHeadingColor: R.fromHex("#6c6c6cb3")
}, jD = class extends CD {
	constructor(e, t, n) {
		super(e, t), this.instantiationService = n, this._onDidClose = new x(), this.onDidClose = this._onDidClose.event, yl(this.options, AD, !1);
	}
	dispose() {
		this.disposed || (this.disposed = !0, super.dispose(), this._onDidClose.fire(this));
	}
	style(e) {
		let t = this.options;
		e.headerBackgroundColor && (t.headerBackgroundColor = e.headerBackgroundColor), e.primaryHeadingColor && (t.primaryHeadingColor = e.primaryHeadingColor), e.secondaryHeadingColor && (t.secondaryHeadingColor = e.secondaryHeadingColor), super.style(e);
	}
	_applyStyles() {
		super._applyStyles();
		let e = this.options;
		this._headElement && e.headerBackgroundColor && (this._headElement.style.backgroundColor = e.headerBackgroundColor.toString()), this._primaryHeading && e.primaryHeadingColor && (this._primaryHeading.style.color = e.primaryHeadingColor.toString()), this._secondaryHeading && e.secondaryHeadingColor && (this._secondaryHeading.style.color = e.secondaryHeadingColor.toString()), this._bodyElement && e.frameColor && (this._bodyElement.style.borderColor = e.frameColor.toString());
	}
	_fillContainer(e) {
		this.setCssClass("peekview-widget"), this._headElement = w(".head"), this._bodyElement = w(".body"), this._fillHead(this._headElement), this._fillBody(this._bodyElement), e.appendChild(this._headElement), e.appendChild(this._bodyElement);
	}
	_fillHead(e, t) {
		this._titleElement = w(".peekview-title"), this.options.supportOnTitleClick && (this._titleElement.classList.add("clickable"), _t(this._titleElement, "click", (e) => this._onTitleClick(e))), D(this._headElement, this._titleElement), this._fillTitleIcon(this._titleElement), this._primaryHeading = w("span.filename"), this._secondaryHeading = w("span.dirname"), this._metaHeading = w("span.meta"), D(this._titleElement, this._primaryHeading, this._secondaryHeading, this._metaHeading);
		let n = w(".peekview-actions");
		D(this._headElement, n);
		let r = this._getActionBarOptions();
		this._actionbarWidget = new Pn(n, r), this._disposables.add(this._actionbarWidget), t || this._actionbarWidget.push(new wr("peekview.close", B("label.close", "Close"), _l.asClassName(v.close), !0, () => (this.dispose(), Promise.resolve())), {
			label: !1,
			icon: !0
		});
	}
	_fillTitleIcon(e) {}
	_getActionBarOptions() {
		return {
			actionViewItemProvider: zo.bind(void 0, this.instantiationService),
			orientation: 0
		};
	}
	_onTitleClick(e) {}
	setTitle(e, t) {
		this._primaryHeading && this._secondaryHeading && (this._primaryHeading.innerText = e, this._primaryHeading.setAttribute("title", e), t ? this._secondaryHeading.innerText = t : di(this._secondaryHeading));
	}
	setMetaTitle(e) {
		this._metaHeading && (e ? (this._metaHeading.innerText = e, Hs(this._metaHeading)) : Eo(this._metaHeading));
	}
	_doLayout(e, t) {
		if (!this._isShowing && e < 0) {
			this.dispose();
			return;
		}
		let n = Math.ceil(this.editor.getOption(67) * 1.2), r = Math.round(e - (n + 2));
		this._doLayoutHead(n, t), this._doLayoutBody(r, t);
	}
	_doLayoutHead(e, t) {
		this._headElement && (this._headElement.style.height = `${e}px`, this._headElement.style.lineHeight = this._headElement.style.height);
	}
	_doLayoutBody(e, t) {
		this._bodyElement && (this._bodyElement.style.height = `${e}px`);
	}
};
jD = wD([TD(2, P)], jD);
var MD = S("peekViewTitle.background", {
	dark: "#252526",
	light: "#F3F3F3",
	hcDark: R.black,
	hcLight: R.white
}, B("peekViewTitleBackground", "Background color of the peek view title area.")), ND = S("peekViewTitleLabel.foreground", {
	dark: R.white,
	light: R.black,
	hcDark: R.white,
	hcLight: ho
}, B("peekViewTitleForeground", "Color of the peek view title.")), PD = S("peekViewTitleDescription.foreground", {
	dark: "#ccccccb3",
	light: "#616161",
	hcDark: "#FFFFFF99",
	hcLight: "#292929"
}, B("peekViewTitleInfoForeground", "Color of the peek view title info.")), FD = S("peekView.border", {
	dark: xl,
	light: xl,
	hcDark: Qt,
	hcLight: Qt
}, B("peekViewBorder", "Color of the peek view borders and arrow.")), ID = S("peekViewResult.background", {
	dark: "#252526",
	light: "#F3F3F3",
	hcDark: R.black,
	hcLight: R.white
}, B("peekViewResultsBackground", "Background color of the peek view result list."));
S("peekViewResult.lineForeground", {
	dark: "#bbbbbb",
	light: "#646465",
	hcDark: R.white,
	hcLight: ho
}, B("peekViewResultsMatchForeground", "Foreground color for line nodes in the peek view result list.")), S("peekViewResult.fileForeground", {
	dark: R.white,
	light: "#1E1E1E",
	hcDark: R.white,
	hcLight: ho
}, B("peekViewResultsFileForeground", "Foreground color for file nodes in the peek view result list.")), S("peekViewResult.selectionBackground", {
	dark: "#3399ff33",
	light: "#3399ff33",
	hcDark: null,
	hcLight: null
}, B("peekViewResultsSelectionBackground", "Background color of the selected entry in the peek view result list.")), S("peekViewResult.selectionForeground", {
	dark: R.white,
	light: "#6C6C6C",
	hcDark: R.white,
	hcLight: ho
}, B("peekViewResultsSelectionForeground", "Foreground color of the selected entry in the peek view result list."));
var LD = S("peekViewEditor.background", {
	dark: "#001F33",
	light: "#F2F8FC",
	hcDark: R.black,
	hcLight: R.white
}, B("peekViewEditorBackground", "Background color of the peek view editor."));
S("peekViewEditorGutter.background", LD, B("peekViewEditorGutterBackground", "Background color of the gutter in the peek view editor.")), S("peekViewEditorStickyScroll.background", LD, B("peekViewEditorStickScrollBackground", "Background color of sticky scroll in the peek view editor.")), S("peekViewResult.matchHighlightBackground", {
	dark: "#ea5c004d",
	light: "#ea5c004d",
	hcDark: null,
	hcLight: null
}, B("peekViewResultsMatchHighlight", "Match highlight color in the peek view result list.")), S("peekViewEditor.matchHighlightBackground", {
	dark: "#ff8f0099",
	light: "#f5d802de",
	hcDark: null,
	hcLight: null
}, B("peekViewEditorMatchHighlight", "Match highlight color in the peek view editor.")), S("peekViewEditor.matchHighlightBorder", {
	dark: null,
	light: null,
	hcDark: xt,
	hcLight: xt
}, B("peekViewEditorMatchHighlightBorder", "Match highlight border in the peek view editor."));
// ../../../node_modules/.pnpm/monaco-editor@0.52.2/node_modules/monaco-editor/esm/vs/editor/contrib/gotoSymbol/browser/referencesModel.js
var RD = class {
	constructor(e, t, n, r) {
		this.isProviderFirst = e, this.parent = t, this.link = n, this._rangeCallback = r, this.id = kc.nextId();
	}
	get uri() {
		return this.link.uri;
	}
	get range() {
		return this._range ?? this.link.targetSelectionRange ?? this.link.range;
	}
	set range(e) {
		this._range = e, this._rangeCallback(this);
	}
	get ariaMessage() {
		let e = this.parent.getPreview(this)?.preview(this.range);
		return e ? B({
			key: "aria.oneReference.preview",
			comment: ["Placeholders are: 0: filename, 1:line number, 2: column number, 3: preview snippet of source code"]
		}, "{0} in {1} on line {2} at column {3}", e.value, Ps(this.uri), this.range.startLineNumber, this.range.startColumn) : B("aria.oneReference", "in {0} on line {1} at column {2}", Ps(this.uri), this.range.startLineNumber, this.range.startColumn);
	}
}, zD = class {
	constructor(e) {
		this._modelReference = e;
	}
	dispose() {
		this._modelReference.dispose();
	}
	preview(e, t = 8) {
		let n = this._modelReference.object.textEditorModel;
		if (!n) return;
		let { startLineNumber: r, startColumn: i, endLineNumber: a, endColumn: o } = e, s = n.getWordUntilPosition({
			lineNumber: r,
			column: i - t
		}), c = new E(r, s.startColumn, r, i), l = new E(a, o, a, 1073741824), u = n.getValueInRange(c).replace(/^\s+/, ""), d = n.getValueInRange(e), f = n.getValueInRange(l).replace(/\s+$/, "");
		return {
			value: u + d + f,
			highlight: {
				start: u.length,
				end: u.length + d.length
			}
		};
	}
}, BD = class {
	constructor(e, t) {
		this.parent = e, this.uri = t, this.children = [], this._previews = new Zo();
	}
	dispose() {
		ci(this._previews.values()), this._previews.clear();
	}
	getPreview(e) {
		return this._previews.get(e.uri);
	}
	get ariaMessage() {
		let e = this.children.length;
		return e === 1 ? B("aria.fileReferences.1", "1 symbol in {0}, full path {1}", Ps(this.uri), this.uri.fsPath) : B("aria.fileReferences.N", "{0} symbols in {1}, full path {2}", e, Ps(this.uri), this.uri.fsPath);
	}
	async resolve(e) {
		if (this._previews.size !== 0) return this;
		for (let t of this.children) if (!this._previews.has(t.uri)) try {
			let n = await e.createModelReference(t.uri);
			this._previews.set(t.uri, new zD(n));
		} catch (e) {
			er(e);
		}
		return this;
	}
}, VD = class e {
	constructor(t, n) {
		this.groups = [], this.references = [], this._onDidChangeReferenceRange = new x(), this.onDidChangeReferenceRange = this._onDidChangeReferenceRange.event, this._links = t, this._title = n;
		let [r] = t;
		t.sort(e._compareReferences);
		let i;
		for (let n of t) if (i && rs.isEqual(i.uri, n.uri, !0) || (i = new BD(this, n.uri), this.groups.push(i)), i.children.length === 0 || e._compareReferences(n, i.children[i.children.length - 1]) !== 0) {
			let e = new RD(r === n, i, n, (e) => this._onDidChangeReferenceRange.fire(e));
			this.references.push(e), i.children.push(e);
		}
	}
	dispose() {
		ci(this.groups), this._onDidChangeReferenceRange.dispose(), this.groups.length = 0;
	}
	clone() {
		return new e(this._links, this._title);
	}
	get title() {
		return this._title;
	}
	get isEmpty() {
		return this.groups.length === 0;
	}
	get ariaMessage() {
		return this.isEmpty ? B("aria.result.0", "No results found") : this.references.length === 1 ? B("aria.result.1", "Found 1 symbol in {0}", this.references[0].uri.fsPath) : this.groups.length === 1 ? B("aria.result.n1", "Found {0} symbols in {1}", this.references.length, this.groups[0].uri.fsPath) : B("aria.result.nm", "Found {0} symbols in {1} files", this.references.length, this.groups.length);
	}
	nextOrPreviousReference(e, t) {
		let { parent: n } = e, r = n.children.indexOf(e), i = n.children.length, a = n.parent.groups.length;
		return a === 1 || t && r + 1 < i || !t && r > 0 ? (r = t ? (r + 1) % i : (r + i - 1) % i, n.children[r]) : (r = n.parent.groups.indexOf(n), t ? (r = (r + 1) % a, n.parent.groups[r].children[0]) : (r = (r + a - 1) % a, n.parent.groups[r].children[n.parent.groups[r].children.length - 1]));
	}
	nearestReference(e, t) {
		let n = this.references.map((n, r) => ({
			idx: r,
			prefixLen: $t(n.uri.toString(), e.toString()),
			offsetDist: Math.abs(n.range.startLineNumber - t.lineNumber) * 100 + Math.abs(n.range.startColumn - t.column)
		})).sort((e, t) => e.prefixLen > t.prefixLen ? -1 : e.prefixLen < t.prefixLen ? 1 : e.offsetDist < t.offsetDist ? -1 : +(e.offsetDist > t.offsetDist))[0];
		if (n) return this.references[n.idx];
	}
	referenceAt(e, t) {
		for (let n of this.references) if (n.uri.toString() === e.toString() && E.containsPosition(n.range, t)) return n;
	}
	firstReference() {
		for (let e of this.references) if (e.isProviderFirst) return e;
		return this.references[0];
	}
	static _compareReferences(e, t) {
		return rs.compare(e.uri, t.uri) || E.compareRangesUsingStarts(e.range, t.range);
	}
}, HD = function(e, t, n, r) {
	var i = arguments.length, a = i < 3 ? t : r === null ? r = Object.getOwnPropertyDescriptor(t, n) : r, o;
	if (typeof Reflect == "object" && typeof Reflect.decorate == "function") a = Reflect.decorate(e, t, n, r);
	else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (i < 3 ? o(a) : i > 3 ? o(t, n, a) : o(t, n)) || a);
	return i > 3 && a && Object.defineProperty(t, n, a), a;
}, UD = function(e, t) {
	return function(n, r) {
		t(n, r, e);
	};
}, WD, GD = class {
	constructor(e) {
		this._resolverService = e;
	}
	hasChildren(e) {
		return e instanceof VD || e instanceof BD;
	}
	getChildren(e) {
		if (e instanceof VD) return e.groups;
		if (e instanceof BD) return e.resolve(this._resolverService).then((e) => e.children);
		throw Error("bad tree");
	}
};
GD = HD([UD(0, Ve)], GD);
var KD = class {
	getHeight() {
		return 23;
	}
	getTemplateId(e) {
		return e instanceof BD ? XD.id : QD.id;
	}
}, qD = class {
	constructor(e) {
		this._keybindingService = e;
	}
	getKeyboardNavigationLabel(e) {
		if (e instanceof RD) {
			let t = e.parent.getPreview(e)?.preview(e.range);
			if (t) return t.value;
		}
		return Ps(e.uri);
	}
};
qD = HD([UD(0, ft)], qD);
var JD = class {
	getId(e) {
		return e instanceof RD ? e.id : e.uri;
	}
}, YD = class extends U {
	constructor(e, t) {
		super(), this._labelService = t;
		let n = document.createElement("div");
		n.classList.add("reference-file"), this.file = this._register(new mr(n, { supportHighlights: !0 })), this.badge = new dc(D(n, w(".count")), {}, wn), e.appendChild(n);
	}
	set(e, t) {
		let n = xa(e.uri);
		this.file.setLabel(this._labelService.getUriBasenameLabel(e.uri), this._labelService.getUriLabel(n, { relative: !0 }), {
			title: this._labelService.getUriLabel(e.uri),
			matches: t
		});
		let r = e.children.length;
		this.badge.setCount(r), r > 1 ? this.badge.setTitleFormat(B("referencesCount", "{0} references", r)) : this.badge.setTitleFormat(B("referenceCount", "{0} reference", r));
	}
};
YD = HD([UD(1, an)], YD);
var XD = class {
	static {
		WD = this;
	}
	static {
		this.id = "FileReferencesRenderer";
	}
	constructor(e) {
		this._instantiationService = e, this.templateId = WD.id;
	}
	renderTemplate(e) {
		return this._instantiationService.createInstance(YD, e);
	}
	renderElement(e, t, n) {
		n.set(e.element, Cl(e.filterData));
	}
	disposeTemplate(e) {
		e.dispose();
	}
};
XD = WD = HD([UD(0, P)], XD);
var ZD = class extends U {
	constructor(e) {
		super(), this.label = this._register(new Rl(e));
	}
	set(e, t) {
		let n = e.parent.getPreview(e)?.preview(e.range);
		if (!n || !n.value) this.label.set(`${Ps(e.uri)}:${e.range.startLineNumber + 1}:${e.range.startColumn + 1}`);
		else {
			let { value: e, highlight: r } = n;
			t && !so.isDefault(t) ? (this.label.element.classList.toggle("referenceMatch", !1), this.label.set(e, Cl(t))) : (this.label.element.classList.toggle("referenceMatch", !0), this.label.set(e, [r]));
		}
	}
}, QD = class e {
	constructor() {
		this.templateId = e.id;
	}
	static {
		this.id = "OneReferenceRenderer";
	}
	renderTemplate(e) {
		return new ZD(e);
	}
	renderElement(e, t, n) {
		n.set(e.element, e.filterData);
	}
	disposeTemplate(e) {
		e.dispose();
	}
}, $D = class {
	getWidgetAriaLabel() {
		return B("treeAriaLabel", "References");
	}
	getAriaLabel(e) {
		return e.ariaMessage;
	}
}, eO = function(e, t, n, r) {
	var i = arguments.length, a = i < 3 ? t : r === null ? r = Object.getOwnPropertyDescriptor(t, n) : r, o;
	if (typeof Reflect == "object" && typeof Reflect.decorate == "function") a = Reflect.decorate(e, t, n, r);
	else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (i < 3 ? o(a) : i > 3 ? o(t, n, a) : o(t, n)) || a);
	return i > 3 && a && Object.defineProperty(t, n, a), a;
}, tO = function(e, t) {
	return function(n, r) {
		t(n, r, e);
	};
}, nO = class e {
	static {
		this.DecorationOptions = L.register({
			description: "reference-decoration",
			stickiness: 1,
			className: "reference-decoration"
		});
	}
	constructor(e, t) {
		this._editor = e, this._model = t, this._decorations = /* @__PURE__ */ new Map(), this._decorationIgnoreSet = /* @__PURE__ */ new Set(), this._callOnDispose = new g(), this._callOnModelChange = new g(), this._callOnDispose.add(this._editor.onDidChangeModel(() => this._onModelChanged())), this._onModelChanged();
	}
	dispose() {
		this._callOnModelChange.dispose(), this._callOnDispose.dispose(), this.removeDecorations();
	}
	_onModelChanged() {
		this._callOnModelChange.clear();
		let e = this._editor.getModel();
		if (e) {
			for (let t of this._model.references) if (t.uri.toString() === e.uri.toString()) {
				this._addDecorations(t.parent);
				return;
			}
		}
	}
	_addDecorations(t) {
		if (!this._editor.hasModel()) return;
		this._callOnModelChange.add(this._editor.getModel().onDidChangeDecorations(() => this._onDecorationChanged()));
		let n = [], r = [];
		for (let i = 0, a = t.children.length; i < a; i++) {
			let a = t.children[i];
			this._decorationIgnoreSet.has(a.id) || a.uri.toString() === this._editor.getModel().uri.toString() && (n.push({
				range: a.range,
				options: e.DecorationOptions
			}), r.push(i));
		}
		this._editor.changeDecorations((e) => {
			let i = e.deltaDecorations([], n);
			for (let e = 0; e < i.length; e++) this._decorations.set(i[e], t.children[r[e]]);
		});
	}
	_onDecorationChanged() {
		let e = [], t = this._editor.getModel();
		if (t) {
			for (let [n, r] of this._decorations) {
				let i = t.getDecorationRange(n);
				if (!i) continue;
				let a = !1;
				E.equalsRange(i, r.range) || ((E.spansMultipleLines(i) || r.range.endColumn - r.range.startColumn !== i.endColumn - i.startColumn) && (a = !0), a ? (this._decorationIgnoreSet.add(r.id), e.push(n)) : r.range = i);
			}
			for (let t = 0, n = e.length; t < n; t++) this._decorations.delete(e[t]);
			this._editor.removeDecorations(e);
		}
	}
	removeDecorations() {
		this._editor.removeDecorations([...this._decorations.keys()]), this._decorations.clear();
	}
}, rO = class {
	constructor() {
		this.ratio = .7, this.heightInLines = 18;
	}
	static fromJSON(e) {
		let t, n;
		try {
			let r = JSON.parse(e);
			t = r.ratio, n = r.heightInLines;
		} catch {}
		return {
			ratio: t || .7,
			heightInLines: n || 18
		};
	}
}, iO = class extends ni {}, aO = class extends jD {
	constructor(e, t, n, r, i, a, o, s, c) {
		super(e, {
			showFrame: !1,
			showArrow: !0,
			isResizeable: !0,
			isAccessible: !0,
			supportOnTitleClick: !0
		}, a), this._defaultTreeKeyboardSupport = t, this.layoutData = n, this._textModelResolverService = i, this._instantiationService = a, this._peekViewService = o, this._uriLabel = s, this._keybindingService = c, this._disposeOnNewModel = new g(), this._callOnDispose = new g(), this._onDidSelectReference = new x(), this.onDidSelectReference = this._onDidSelectReference.event, this._dim = new Ze(0, 0), this._isClosing = !1, this._applyTheme(r.getColorTheme()), this._callOnDispose.add(r.onDidColorThemeChange(this._applyTheme.bind(this))), this._peekViewService.addExclusiveWidget(e, this), this.create();
	}
	get isClosing() {
		return this._isClosing;
	}
	dispose() {
		this._isClosing = !0, this.setModel(void 0), this._callOnDispose.dispose(), this._disposeOnNewModel.dispose(), ci(this._preview), ci(this._previewNotAvailableMessage), ci(this._tree), ci(this._previewModelReference), this._splitView.dispose(), super.dispose();
	}
	_applyTheme(e) {
		let t = e.getColor(FD) || R.transparent;
		this.style({
			arrowColor: t,
			frameColor: t,
			headerBackgroundColor: e.getColor(MD) || R.transparent,
			primaryHeadingColor: e.getColor(ND),
			secondaryHeadingColor: e.getColor(PD)
		});
	}
	show(e) {
		super.show(e, this.layoutData.heightInLines || 18);
	}
	focusOnReferenceTree() {
		this._tree.domFocus();
	}
	focusOnPreviewEditor() {
		this._preview.focus();
	}
	isPreviewEditorFocused() {
		return this._preview.hasTextFocus();
	}
	_onTitleClick(e) {
		this._preview && this._preview.getModel() && this._onDidSelectReference.fire({
			element: this._getFocusedReference(),
			kind: e.ctrlKey || e.metaKey || e.altKey ? "side" : "open",
			source: "title"
		});
	}
	_fillBody(e) {
		this.setCssClass("reference-zone-widget"), this._messageContainer = D(e, w("div.messages")), Eo(this._messageContainer), this._splitView = new Mi(e, { orientation: 1 }), this._previewContainer = D(e, w("div.preview.inline"));
		let t = {
			scrollBeyondLastLine: !1,
			scrollbar: {
				verticalScrollbarSize: 14,
				horizontal: "auto",
				useShadows: !0,
				verticalHasArrows: !1,
				horizontalHasArrows: !1,
				alwaysConsumeMouseWheel: !0
			},
			overviewRulerLanes: 2,
			fixedOverflowWidgets: !0,
			minimap: { enabled: !1 }
		};
		this._preview = this._instantiationService.createInstance(gD, this._previewContainer, t, {}, this.editor), Eo(this._previewContainer), this._previewNotAvailableMessage = this._instantiationService.createInstance(Ma, B("missingPreviewMessage", "no preview available"), Kn, Ma.DEFAULT_CREATION_OPTIONS, null), this._treeContainer = D(e, w("div.ref-tree.inline"));
		let n = {
			keyboardSupport: this._defaultTreeKeyboardSupport,
			accessibilityProvider: new $D(),
			keyboardNavigationLabelProvider: this._instantiationService.createInstance(qD),
			identityProvider: new JD(),
			openOnSingleClick: !0,
			selectionNavigation: !0,
			overrideStyles: { listBackground: ID }
		};
		this._defaultTreeKeyboardSupport && this._callOnDispose.add(_t(this._treeContainer, "keydown", (e) => {
			e.equals(9) && (this._keybindingService.dispatchEvent(e, e.target), e.stopPropagation());
		}, !0)), this._tree = this._instantiationService.createInstance(iO, "ReferencesWidget", this._treeContainer, new KD(), [this._instantiationService.createInstance(XD), this._instantiationService.createInstance(QD)], this._instantiationService.createInstance(GD), n), this._splitView.addView({
			onDidChange: wt.None,
			element: this._previewContainer,
			minimumSize: 200,
			maximumSize: Number.MAX_VALUE,
			layout: (e) => {
				this._preview.layout({
					height: this._dim.height,
					width: e
				});
			}
		}, Bt.Distribute), this._splitView.addView({
			onDidChange: wt.None,
			element: this._treeContainer,
			minimumSize: 100,
			maximumSize: Number.MAX_VALUE,
			layout: (e) => {
				this._treeContainer.style.height = `${this._dim.height}px`, this._treeContainer.style.width = `${e}px`, this._tree.layout(this._dim.height, e);
			}
		}, Bt.Distribute), this._disposables.add(this._splitView.onDidSashChange(() => {
			this._dim.width && (this.layoutData.ratio = this._splitView.getViewSize(0) / this._dim.width);
		}, void 0));
		let r = (e, t) => {
			e instanceof RD && (t === "show" && this._revealReference(e, !1), this._onDidSelectReference.fire({
				element: e,
				kind: t,
				source: "tree"
			}));
		};
		this._disposables.add(this._tree.onDidOpen((e) => {
			e.sideBySide ? r(e.element, "side") : e.editorOptions.pinned ? r(e.element, "goto") : r(e.element, "show");
		})), Eo(this._treeContainer);
	}
	_onWidth(e) {
		this._dim && this._doLayoutBody(this._dim.height, e);
	}
	_doLayoutBody(e, t) {
		super._doLayoutBody(e, t), this._dim = new Ze(t, e), this.layoutData.heightInLines = this._viewZone ? this._viewZone.heightInLines : this.layoutData.heightInLines, this._splitView.layout(t), this._splitView.resizeView(0, t * this.layoutData.ratio);
	}
	setSelection(e) {
		return this._revealReference(e, !0).then(() => {
			this._model && (this._tree.setSelection([e]), this._tree.setFocus([e]));
		});
	}
	setModel(e) {
		return this._disposeOnNewModel.clear(), this._model = e, this._model ? this._onNewModel() : Promise.resolve();
	}
	_onNewModel() {
		return this._model ? this._model.isEmpty ? (this.setTitle(""), this._messageContainer.innerText = B("noResults", "No results"), Hs(this._messageContainer), Promise.resolve(void 0)) : (Eo(this._messageContainer), this._decorationsManager = new nO(this._preview, this._model), this._disposeOnNewModel.add(this._decorationsManager), this._disposeOnNewModel.add(this._model.onDidChangeReferenceRange((e) => this._tree.rerender(e))), this._disposeOnNewModel.add(this._preview.onMouseDown((e) => {
			let { event: t, target: n } = e;
			if (t.detail !== 2) return;
			let r = this._getFocusedReference();
			r && this._onDidSelectReference.fire({
				element: {
					uri: r.uri,
					range: n.range
				},
				kind: t.ctrlKey || t.metaKey || t.altKey ? "side" : "open",
				source: "editor"
			});
		})), this.container.classList.add("results-loaded"), Hs(this._treeContainer), Hs(this._previewContainer), this._splitView.layout(this._dim.width), this.focusOnReferenceTree(), this._tree.setInput(this._model.groups.length === 1 ? this._model.groups[0] : this._model)) : Promise.resolve(void 0);
	}
	_getFocusedReference() {
		let [e] = this._tree.getFocus();
		if (e instanceof RD) return e;
		if (e instanceof BD && e.children.length > 0) return e.children[0];
	}
	async revealReference(e) {
		await this._revealReference(e, !1), this._onDidSelectReference.fire({
			element: e,
			kind: "goto",
			source: "tree"
		});
	}
	async _revealReference(e, t) {
		if (this._revealedReference === e) return;
		this._revealedReference = e, e.uri.scheme === Kc.inMemory ? this.setTitle(B("peekView.alternateTitle", "References")) : this.setTitle(yc(e.uri), this._uriLabel.getUriLabel(xa(e.uri)));
		let n = this._textModelResolverService.createModelReference(e.uri);
		this._tree.getInput() === e.parent || (t && this._tree.reveal(e.parent), await this._tree.expand(e.parent)), this._tree.reveal(e);
		let r = await n;
		if (!this._model) {
			r.dispose();
			return;
		}
		ci(this._previewModelReference);
		let i = r.object;
		if (i) {
			let t = this._preview.getModel() === i.textEditorModel ? 0 : 1, n = E.lift(e.range).collapseToStart();
			this._previewModelReference = r, this._preview.setModel(i.textEditorModel), this._preview.setSelection(n), this._preview.revealRangeInCenter(n, t);
		} else this._preview.setModel(this._previewNotAvailableMessage), r.dispose();
	}
};
aO = eO([
	tO(3, fc),
	tO(4, Ve),
	tO(5, P),
	tO(6, ED),
	tO(7, an),
	tO(8, ft)
], aO);
// ../../../node_modules/.pnpm/monaco-editor@0.52.2/node_modules/monaco-editor/esm/vs/editor/contrib/gotoSymbol/browser/peek/referencesController.js
var oO = function(e, t, n, r) {
	var i = arguments.length, a = i < 3 ? t : r === null ? r = Object.getOwnPropertyDescriptor(t, n) : r, o;
	if (typeof Reflect == "object" && typeof Reflect.decorate == "function") a = Reflect.decorate(e, t, n, r);
	else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (i < 3 ? o(a) : i > 3 ? o(t, n, a) : o(t, n)) || a);
	return i > 3 && a && Object.defineProperty(t, n, a), a;
}, sO = function(e, t) {
	return function(n, r) {
		t(n, r, e);
	};
}, cO, lO = new z("referenceSearchVisible", !1, B("referenceSearchVisible", "Whether reference peek is visible, like 'Peek References' or 'Peek Definition'")), uO = class {
	static {
		cO = this;
	}
	static {
		this.ID = "editor.contrib.referencesController";
	}
	static get(e) {
		return e.getContribution(cO.ID);
	}
	constructor(e, t, n, r, i, a, o, s) {
		this._defaultTreeKeyboardSupport = e, this._editor = t, this._editorService = r, this._notificationService = i, this._instantiationService = a, this._storageService = o, this._configurationService = s, this._disposables = new g(), this._requestIdPool = 0, this._ignoreModelChangeEvent = !1, this._referenceSearchVisible = lO.bindTo(n);
	}
	dispose() {
		this._referenceSearchVisible.reset(), this._disposables.dispose(), this._widget?.dispose(), this._model?.dispose(), this._widget = void 0, this._model = void 0;
	}
	toggleWidget(e, t, n) {
		let r;
		if (this._widget && (r = this._widget.position), this.closeWidget(), r && e.containsPosition(r)) return;
		this._peekMode = n, this._referenceSearchVisible.set(!0), this._disposables.add(this._editor.onDidChangeModelLanguage(() => {
			this.closeWidget();
		})), this._disposables.add(this._editor.onDidChangeModel(() => {
			this._ignoreModelChangeEvent || this.closeWidget();
		}));
		let i = "peekViewLayout", a = rO.fromJSON(this._storageService.get(i, 0, "{}"));
		this._widget = this._instantiationService.createInstance(aO, this._editor, this._defaultTreeKeyboardSupport, a), this._widget.setTitle(B("labelLoading", "Loading...")), this._widget.show(e), this._disposables.add(this._widget.onDidClose(() => {
			t.cancel(), this._widget ? (this._storageService.store(i, JSON.stringify(this._widget.layoutData), 0, 1), this._widget.isClosing || this.closeWidget(), this._widget = void 0) : this.closeWidget();
		})), this._disposables.add(this._widget.onDidSelectReference((e) => {
			let { element: t, kind: r } = e;
			if (t) switch (r) {
				case "open":
					e.source === "editor" && this._configurationService.getValue("editor.stablePeek") || this.openReference(t, !1, !1);
					break;
				case "side":
					this.openReference(t, !0, !1);
					break;
				case "goto": n ? this._gotoReference(t, !0) : this.openReference(t, !1, !0);
			}
		}));
		let o = ++this._requestIdPool;
		t.then((t) => {
			if (o !== this._requestIdPool || !this._widget) t.dispose();
			else return this._model?.dispose(), this._model = t, this._widget.setModel(this._model).then(() => {
				if (this._widget && this._model && this._editor.hasModel()) {
					this._model.isEmpty ? this._widget.setMetaTitle("") : this._widget.setMetaTitle(B("metaTitle.N", "{0} ({1})", this._model.title, this._model.references.length));
					let t = this._editor.getModel().uri, n = new b(e.startLineNumber, e.startColumn), r = this._model.nearestReference(t, n);
					if (r) return this._widget.setSelection(r).then(() => {
						this._widget && this._editor.getOption(87) === "editor" && this._widget.focusOnPreviewEditor();
					});
				}
			});
		}, (e) => {
			this._notificationService.error(e);
		});
	}
	changeFocusBetweenPreviewAndReferences() {
		this._widget && (this._widget.isPreviewEditorFocused() ? this._widget.focusOnReferenceTree() : this._widget.focusOnPreviewEditor());
	}
	async goToNextOrPreviousReference(e) {
		if (!this._editor.hasModel() || !this._model || !this._widget) return;
		let t = this._widget.position;
		if (!t) return;
		let n = this._model.nearestReference(this._editor.getModel().uri, t);
		if (!n) return;
		let r = this._model.nextOrPreviousReference(n, e), i = this._editor.hasTextFocus(), a = this._widget.isPreviewEditorFocused();
		await this._widget.setSelection(r), await this._gotoReference(r, !1), i ? this._editor.focus() : this._widget && a && this._widget.focusOnPreviewEditor();
	}
	async revealReference(e) {
		this._editor.hasModel() && this._model && this._widget && await this._widget.revealReference(e);
	}
	closeWidget(e = !0) {
		this._widget?.dispose(), this._model?.dispose(), this._referenceSearchVisible.reset(), this._disposables.clear(), this._widget = void 0, this._model = void 0, e && this._editor.focus(), this._requestIdPool += 1;
	}
	_gotoReference(e, t) {
		this._widget?.hide(), this._ignoreModelChangeEvent = !0;
		let n = E.lift(e.range).collapseToStart();
		return this._editorService.openCodeEditor({
			resource: e.uri,
			options: {
				selection: n,
				selectionSource: "code.jump",
				pinned: t
			}
		}, this._editor).then((e) => {
			if (this._ignoreModelChangeEvent = !1, !e || !this._widget) this.closeWidget();
			else if (this._editor === e) this._widget.show(n), this._widget.focusOnReferenceTree();
			else {
				let t = cO.get(e), r = this._model.clone();
				this.closeWidget(), e.focus(), t?.toggleWidget(n, Te((e) => Promise.resolve(r)), this._peekMode ?? !1);
			}
		}, (e) => {
			this._ignoreModelChangeEvent = !1, er(e);
		});
	}
	openReference(e, t, n) {
		t || this.closeWidget();
		let { uri: r, range: i } = e;
		this._editorService.openCodeEditor({
			resource: r,
			options: {
				selection: i,
				selectionSource: "code.jump",
				pinned: n
			}
		}, this._editor, t);
	}
};
uO = cO = oO([
	sO(2, j),
	sO(3, Ln),
	sO(4, t),
	sO(5, P),
	sO(6, ur),
	sO(7, Fl)
], uO);
function dO(e, t) {
	let n = kD(e);
	if (!n) return;
	let r = uO.get(n);
	r && t(r);
}
to.registerCommandAndKeybindingRule({
	id: "togglePeekWidgetFocus",
	weight: 100,
	primary: Ro(2089, 60),
	when: N.or(lO, DD.inPeekEditor),
	handler(e) {
		dO(e, (e) => {
			e.changeFocusBetweenPreviewAndReferences();
		});
	}
}), to.registerCommandAndKeybindingRule({
	id: "goToNextReference",
	weight: 90,
	primary: 62,
	secondary: [70],
	when: N.or(lO, DD.inPeekEditor),
	handler(e) {
		dO(e, (e) => {
			e.goToNextOrPreviousReference(!0);
		});
	}
}), to.registerCommandAndKeybindingRule({
	id: "goToPreviousReference",
	weight: 90,
	primary: 1086,
	secondary: [1094],
	when: N.or(lO, DD.inPeekEditor),
	handler(e) {
		dO(e, (e) => {
			e.goToNextOrPreviousReference(!1);
		});
	}
}), Ol.registerCommandAlias("goToNextReferenceFromEmbeddedEditor", "goToNextReference"), Ol.registerCommandAlias("goToPreviousReferenceFromEmbeddedEditor", "goToPreviousReference"), Ol.registerCommandAlias("closeReferenceSearchEditor", "closeReferenceSearch"), Ol.registerCommand("closeReferenceSearch", (e) => dO(e, (e) => e.closeWidget())), to.registerKeybindingRule({
	id: "closeReferenceSearch",
	weight: -1,
	primary: 9,
	secondary: [1033],
	when: N.and(DD.inPeekEditor, N.not("config.editor.stablePeek"))
}), to.registerKeybindingRule({
	id: "closeReferenceSearch",
	weight: 250,
	primary: 9,
	secondary: [1033],
	when: N.and(lO, N.not("config.editor.stablePeek"), N.or(I.editorTextFocus, lt.negate()))
}), to.registerCommandAndKeybindingRule({
	id: "revealReference",
	weight: 200,
	primary: 3,
	mac: {
		primary: 3,
		secondary: [2066]
	},
	when: N.and(lO, vt, Gr.negate(), fi.negate()),
	handler(e) {
		let t = e.get(fe).lastFocusedList?.getFocus();
		Array.isArray(t) && t[0] instanceof RD && dO(e, (e) => e.revealReference(t[0]));
	}
}), to.registerCommandAndKeybindingRule({
	id: "openReferenceToSide",
	weight: 100,
	primary: 2051,
	mac: { primary: 259 },
	when: N.and(lO, vt, Gr.negate(), fi.negate()),
	handler(e) {
		let t = e.get(fe).lastFocusedList?.getFocus();
		Array.isArray(t) && t[0] instanceof RD && dO(e, (e) => e.openReference(t[0], !0, !0));
	}
}), Ol.registerCommand("openReference", (e) => {
	let t = e.get(fe).lastFocusedList?.getFocus();
	Array.isArray(t) && t[0] instanceof RD && dO(e, (e) => e.openReference(t[0], !1, !0));
});
// ../../../node_modules/.pnpm/monaco-editor@0.52.2/node_modules/monaco-editor/esm/vs/editor/contrib/gotoSymbol/browser/symbolNavigation.js
var fO = function(e, t, n, r) {
	var i = arguments.length, a = i < 3 ? t : r === null ? r = Object.getOwnPropertyDescriptor(t, n) : r, o;
	if (typeof Reflect == "object" && typeof Reflect.decorate == "function") a = Reflect.decorate(e, t, n, r);
	else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (i < 3 ? o(a) : i > 3 ? o(t, n, a) : o(t, n)) || a);
	return i > 3 && a && Object.defineProperty(t, n, a), a;
}, pO = function(e, t) {
	return function(n, r) {
		t(n, r, e);
	};
}, mO = new z("hasSymbols", !1, B("hasSymbols", "Whether there are symbol locations that can be navigated via keyboard-only.")), hO = ne("ISymbolNavigationService"), gO = class {
	constructor(e, t, n, r) {
		this._editorService = t, this._notificationService = n, this._keybindingService = r, this._currentModel = void 0, this._currentIdx = -1, this._ignoreEditorChange = !1, this._ctxHasSymbols = mO.bindTo(e);
	}
	reset() {
		this._ctxHasSymbols.reset(), this._currentState?.dispose(), this._currentMessage?.dispose(), this._currentModel = void 0, this._currentIdx = -1;
	}
	put(e) {
		let t = e.parent.parent;
		if (t.references.length <= 1) {
			this.reset();
			return;
		}
		this._currentModel = t, this._currentIdx = t.references.indexOf(e), this._ctxHasSymbols.set(!0), this._showMessage();
		let n = new _O(this._editorService), r = n.onDidChange((e) => {
			if (this._ignoreEditorChange) return;
			let n = this._editorService.getActiveCodeEditor();
			if (!n) return;
			let r = n.getModel(), i = n.getPosition();
			if (!r || !i) return;
			let a = !1, o = !1;
			for (let e of t.references) if (Aa(e.uri, r.uri)) a = !0, o ||= E.containsPosition(e.range, i);
			else if (a) break;
			a && o || this.reset();
		});
		this._currentState = Vr(n, r);
	}
	revealNext(e) {
		if (!this._currentModel) return Promise.resolve();
		this._currentIdx += 1, this._currentIdx %= this._currentModel.references.length;
		let t = this._currentModel.references[this._currentIdx];
		return this._showMessage(), this._ignoreEditorChange = !0, this._editorService.openCodeEditor({
			resource: t.uri,
			options: {
				selection: E.collapseToStart(t.range),
				selectionRevealType: 3
			}
		}, e).finally(() => {
			this._ignoreEditorChange = !1;
		});
	}
	_showMessage() {
		this._currentMessage?.dispose();
		let e = this._keybindingService.lookupKeybinding("editor.gotoNextSymbolFromResult"), t = e ? B("location.kb", "Symbol {0} of {1}, {2} for next", this._currentIdx + 1, this._currentModel.references.length, e.getLabel()) : B("location", "Symbol {0} of {1}", this._currentIdx + 1, this._currentModel.references.length);
		this._currentMessage = this._notificationService.status(t);
	}
};
gO = fO([
	pO(0, j),
	pO(1, Ln),
	pO(2, t),
	pO(3, ft)
], gO), rn(hO, gO, 1), A(new class extends qt {
	constructor() {
		super({
			id: "editor.gotoNextSymbolFromResult",
			precondition: mO,
			kbOpts: {
				weight: 100,
				primary: 70
			}
		});
	}
	runEditorCommand(e, t) {
		return e.get(hO).revealNext(t);
	}
}()), to.registerCommandAndKeybindingRule({
	id: "editor.gotoNextSymbolFromResult.cancel",
	weight: 100,
	when: mO,
	primary: 9,
	handler(e) {
		e.get(hO).reset();
	}
});
var _O = class {
	constructor(e) {
		this._listener = /* @__PURE__ */ new Map(), this._disposables = new g(), this._onDidChange = new x(), this.onDidChange = this._onDidChange.event, this._disposables.add(e.onCodeEditorRemove(this._onDidRemoveEditor, this)), this._disposables.add(e.onCodeEditorAdd(this._onDidAddEditor, this)), e.listCodeEditors().forEach(this._onDidAddEditor, this);
	}
	dispose() {
		this._disposables.dispose(), this._onDidChange.dispose(), ci(this._listener.values());
	}
	_onDidAddEditor(e) {
		this._listener.set(e, Vr(e.onDidChangeCursorPosition((t) => this._onDidChange.fire({ editor: e })), e.onDidChangeModelContent((t) => this._onDidChange.fire({ editor: e }))));
	}
	_onDidRemoveEditor(e) {
		this._listener.get(e)?.dispose(), this._listener.delete(e);
	}
};
_O = fO([pO(0, Ln)], _O);
// ../../../node_modules/.pnpm/monaco-editor@0.52.2/node_modules/monaco-editor/esm/vs/editor/contrib/gotoSymbol/browser/goToSymbol.js
function vO(e, t) {
	return t.uri.scheme === e.uri.scheme || !ua(t.uri, Kc.walkThroughSnippet, Kc.vscodeChatCodeBlock, Kc.vscodeChatCodeCompareBlock);
}
async function yO(e, t, n, r, a) {
	let o = n.ordered(e, r).map((n) => Promise.resolve(a(n, e, t)).then(void 0, (e) => {
		i(e);
	})), s = await Promise.all(o);
	return On(s.flat()).filter((t) => vO(e, t));
}
function bO(e, t, n, r, i) {
	return yO(t, n, e, r, (e, t, n) => e.provideDefinition(t, n, i));
}
function xO(e, t, n, r, i) {
	return yO(t, n, e, r, (e, t, n) => e.provideDeclaration(t, n, i));
}
function SO(e, t, n, r, i) {
	return yO(t, n, e, r, (e, t, n) => e.provideImplementation(t, n, i));
}
function CO(e, t, n, r, i) {
	return yO(t, n, e, r, (e, t, n) => e.provideTypeDefinition(t, n, i));
}
function wO(e, t, n, r, i, a) {
	return yO(t, n, e, i, async (e, t, n) => {
		let i = (await e.provideReferences(t, n, { includeDeclaration: !0 }, a))?.filter((e) => vO(t, e));
		if (!r || !i || i.length !== 2) return i;
		let o = (await e.provideReferences(t, n, { includeDeclaration: !1 }, a))?.filter((e) => vO(t, e));
		return o && o.length === 1 ? o : i;
	});
}
async function TO(e) {
	let t = new VD(await e(), ""), n = t.references.map((e) => e.link);
	return t.dispose(), n;
}
// ../../../node_modules/.pnpm/monaco-editor@0.52.2/node_modules/monaco-editor/esm/vs/editor/contrib/gotoSymbol/browser/goToCommands.js
Ga("_executeDefinitionProvider", (e, t, n) => {
	let r = bO(e.get(M).definitionProvider, t, n, !1, C.None);
	return TO(() => r);
}), Ga("_executeDefinitionProvider_recursive", (e, t, n) => {
	let r = bO(e.get(M).definitionProvider, t, n, !0, C.None);
	return TO(() => r);
}), Ga("_executeTypeDefinitionProvider", (e, t, n) => {
	let r = CO(e.get(M).typeDefinitionProvider, t, n, !1, C.None);
	return TO(() => r);
}), Ga("_executeTypeDefinitionProvider_recursive", (e, t, n) => {
	let r = CO(e.get(M).typeDefinitionProvider, t, n, !0, C.None);
	return TO(() => r);
}), Ga("_executeDeclarationProvider", (e, t, n) => {
	let r = xO(e.get(M).declarationProvider, t, n, !1, C.None);
	return TO(() => r);
}), Ga("_executeDeclarationProvider_recursive", (e, t, n) => {
	let r = xO(e.get(M).declarationProvider, t, n, !0, C.None);
	return TO(() => r);
}), Ga("_executeReferenceProvider", (e, t, n) => {
	let r = wO(e.get(M).referenceProvider, t, n, !1, !1, C.None);
	return TO(() => r);
}), Ga("_executeReferenceProvider_recursive", (e, t, n) => {
	let r = wO(e.get(M).referenceProvider, t, n, !1, !0, C.None);
	return TO(() => r);
}), Ga("_executeImplementationProvider", (e, t, n) => {
	let r = SO(e.get(M).implementationProvider, t, n, !1, C.None);
	return TO(() => r);
}), Ga("_executeImplementationProvider_recursive", (e, t, n) => {
	let r = SO(e.get(M).implementationProvider, t, n, !0, C.None);
	return TO(() => r);
}), Ta.appendMenuItem(F.EditorContext, {
	submenu: F.EditorContextPeek,
	title: B("peek.submenu", "Peek"),
	group: "navigation",
	order: 100
});
var EO = class e {
	static is(t) {
		return !t || typeof t != "object" ? !1 : !!(t instanceof e || b.isIPosition(t.position) && t.model);
	}
	constructor(e, t) {
		this.model = e, this.position = t;
	}
}, DO = class e extends ot {
	static {
		this._allSymbolNavigationCommands = /* @__PURE__ */ new Map();
	}
	static {
		this._activeAlternativeCommands = /* @__PURE__ */ new Set();
	}
	static all() {
		return e._allSymbolNavigationCommands.values();
	}
	static _patchConfig(e) {
		let t = {
			...e,
			f1: !0
		};
		if (t.menu) for (let n of Da.wrap(t.menu)) (n.id === F.EditorContext || n.id === F.EditorContextPeek) && (n.when = N.and(e.precondition, n.when));
		return t;
	}
	constructor(t, n) {
		super(e._patchConfig(n)), this.configuration = t, e._allSymbolNavigationCommands.set(n.id, this);
	}
	runEditorCommand(n, r, i, a) {
		if (!r.hasModel()) return Promise.resolve(void 0);
		let o = n.get(t), s = n.get(Ln), c = n.get(qn), l = n.get(hO), u = n.get(M), d = n.get(P), p = r.getModel(), m = r.getPosition(), h = EO.is(i) ? i : new EO(p, m), ee = new $c(r, 5), te = f(this._getLocationModel(u, h.model, h.position, ee.token), ee.token).then(async (t) => {
			if (!t || ee.token.isCancellationRequested) return;
			gt(t.ariaMessage);
			let n;
			if (t.referenceAt(p.uri, m)) {
				let t = this._getAlternativeCommand(r);
				!e._activeAlternativeCommands.has(t) && e._allSymbolNavigationCommands.has(t) && (n = e._allSymbolNavigationCommands.get(t));
			}
			let o = t.references.length;
			if (o === 0) {
				if (!this.configuration.muteMessage) {
					let e = p.getWordAtPosition(m);
					GS.get(r)?.showMessage(this._getNoResultFoundMessage(e), m);
				}
			} else if (o === 1 && n) e._activeAlternativeCommands.add(this.desc.id), d.invokeFunction((t) => n.runEditorCommand(t, r, i, a).finally(() => {
				e._activeAlternativeCommands.delete(this.desc.id);
			}));
			else return this._onResult(s, l, r, t, a);
		}, (e) => {
			o.error(e);
		}).finally(() => {
			ee.dispose();
		});
		return c.showWhile(te, 250), te;
	}
	async _onResult(e, t, n, r, i) {
		let a = this._getGoToPreference(n);
		if (!(n instanceof gD) && (this.configuration.openInPeek || a === "peek" && r.references.length > 1)) this._openInPeek(n, r, i);
		else {
			let o = r.firstReference(), s = r.references.length > 1 && a === "gotoAndPeek", c = await this._openReference(n, e, o, this.configuration.openToSide, !s);
			s && c ? this._openInPeek(c, r, i) : r.dispose(), a === "goto" && t.put(o);
		}
	}
	async _openReference(e, t, n, r, i) {
		let a;
		if (br(n) && (a = n.targetSelectionRange), a ||= n.range, !a) return;
		let o = await t.openCodeEditor({
			resource: n.uri,
			options: {
				selection: E.collapseToStart(a),
				selectionRevealType: 3,
				selectionSource: "code.jump"
			}
		}, e, r);
		if (o) {
			if (i) {
				let e = o.getModel(), t = o.createDecorationsCollection([{
					range: a,
					options: {
						description: "symbol-navigate-action-highlight",
						className: "symbolHighlight"
					}
				}]);
				setTimeout(() => {
					o.getModel() === e && t.clear();
				}, 350);
			}
			return o;
		}
	}
	_openInPeek(e, t, n) {
		let r = uO.get(e);
		r && e.hasModel() ? r.toggleWidget(n ?? e.getSelection(), Te((e) => Promise.resolve(t)), this.configuration.openInPeek) : t.dispose();
	}
}, OO = class extends DO {
	async _getLocationModel(e, t, n, r) {
		return new VD(await bO(e.definitionProvider, t, n, !1, r), B("def.title", "Definitions"));
	}
	_getNoResultFoundMessage(e) {
		return e && e.word ? B("noResultWord", "No definition found for '{0}'", e.word) : B("generic.noResults", "No definition found");
	}
	_getAlternativeCommand(e) {
		return e.getOption(58).alternativeDefinitionCommand;
	}
	_getGoToPreference(e) {
		return e.getOption(58).multipleDefinitions;
	}
};
Fa(class e extends OO {
	static {
		this.id = "editor.action.revealDefinition";
	}
	constructor() {
		super({
			openToSide: !1,
			openInPeek: !1,
			muteMessage: !1
		}, {
			id: e.id,
			title: {
				...H("actions.goToDecl.label", "Go to Definition"),
				mnemonicTitle: B({
					key: "miGotoDefinition",
					comment: ["&& denotes a mnemonic"]
				}, "Go to &&Definition")
			},
			precondition: I.hasDefinitionProvider,
			keybinding: [{
				when: I.editorTextFocus,
				primary: 70,
				weight: 100
			}, {
				when: N.and(I.editorTextFocus, Xt),
				primary: 2118,
				weight: 100
			}],
			menu: [{
				id: F.EditorContext,
				group: "navigation",
				order: 1.1
			}, {
				id: F.MenubarGoMenu,
				precondition: null,
				group: "4_symbol_nav",
				order: 2
			}]
		}), Ol.registerCommandAlias("editor.action.goToDeclaration", e.id);
	}
}), Fa(class e extends OO {
	static {
		this.id = "editor.action.revealDefinitionAside";
	}
	constructor() {
		super({
			openToSide: !0,
			openInPeek: !1,
			muteMessage: !1
		}, {
			id: e.id,
			title: H("actions.goToDeclToSide.label", "Open Definition to the Side"),
			precondition: N.and(I.hasDefinitionProvider, I.isInEmbeddedEditor.toNegated()),
			keybinding: [{
				when: I.editorTextFocus,
				primary: Ro(2089, 70),
				weight: 100
			}, {
				when: N.and(I.editorTextFocus, Xt),
				primary: Ro(2089, 2118),
				weight: 100
			}]
		}), Ol.registerCommandAlias("editor.action.openDeclarationToTheSide", e.id);
	}
}), Fa(class e extends OO {
	static {
		this.id = "editor.action.peekDefinition";
	}
	constructor() {
		super({
			openToSide: !1,
			openInPeek: !0,
			muteMessage: !1
		}, {
			id: e.id,
			title: H("actions.previewDecl.label", "Peek Definition"),
			precondition: N.and(I.hasDefinitionProvider, DD.notInPeekEditor, I.isInEmbeddedEditor.toNegated()),
			keybinding: {
				when: I.editorTextFocus,
				primary: 582,
				linux: { primary: 3140 },
				weight: 100
			},
			menu: {
				id: F.EditorContextPeek,
				group: "peek",
				order: 2
			}
		}), Ol.registerCommandAlias("editor.action.previewDeclaration", e.id);
	}
});
var kO = class extends DO {
	async _getLocationModel(e, t, n, r) {
		return new VD(await xO(e.declarationProvider, t, n, !1, r), B("decl.title", "Declarations"));
	}
	_getNoResultFoundMessage(e) {
		return e && e.word ? B("decl.noResultWord", "No declaration found for '{0}'", e.word) : B("decl.generic.noResults", "No declaration found");
	}
	_getAlternativeCommand(e) {
		return e.getOption(58).alternativeDeclarationCommand;
	}
	_getGoToPreference(e) {
		return e.getOption(58).multipleDeclarations;
	}
};
Fa(class e extends kO {
	static {
		this.id = "editor.action.revealDeclaration";
	}
	constructor() {
		super({
			openToSide: !1,
			openInPeek: !1,
			muteMessage: !1
		}, {
			id: e.id,
			title: {
				...H("actions.goToDeclaration.label", "Go to Declaration"),
				mnemonicTitle: B({
					key: "miGotoDeclaration",
					comment: ["&& denotes a mnemonic"]
				}, "Go to &&Declaration")
			},
			precondition: N.and(I.hasDeclarationProvider, I.isInEmbeddedEditor.toNegated()),
			menu: [{
				id: F.EditorContext,
				group: "navigation",
				order: 1.3
			}, {
				id: F.MenubarGoMenu,
				precondition: null,
				group: "4_symbol_nav",
				order: 3
			}]
		});
	}
	_getNoResultFoundMessage(e) {
		return e && e.word ? B("decl.noResultWord", "No declaration found for '{0}'", e.word) : B("decl.generic.noResults", "No declaration found");
	}
}), Fa(class extends kO {
	constructor() {
		super({
			openToSide: !1,
			openInPeek: !0,
			muteMessage: !1
		}, {
			id: "editor.action.peekDeclaration",
			title: H("actions.peekDecl.label", "Peek Declaration"),
			precondition: N.and(I.hasDeclarationProvider, DD.notInPeekEditor, I.isInEmbeddedEditor.toNegated()),
			menu: {
				id: F.EditorContextPeek,
				group: "peek",
				order: 3
			}
		});
	}
});
var AO = class extends DO {
	async _getLocationModel(e, t, n, r) {
		return new VD(await CO(e.typeDefinitionProvider, t, n, !1, r), B("typedef.title", "Type Definitions"));
	}
	_getNoResultFoundMessage(e) {
		return e && e.word ? B("goToTypeDefinition.noResultWord", "No type definition found for '{0}'", e.word) : B("goToTypeDefinition.generic.noResults", "No type definition found");
	}
	_getAlternativeCommand(e) {
		return e.getOption(58).alternativeTypeDefinitionCommand;
	}
	_getGoToPreference(e) {
		return e.getOption(58).multipleTypeDefinitions;
	}
};
Fa(class e extends AO {
	static {
		this.ID = "editor.action.goToTypeDefinition";
	}
	constructor() {
		super({
			openToSide: !1,
			openInPeek: !1,
			muteMessage: !1
		}, {
			id: e.ID,
			title: {
				...H("actions.goToTypeDefinition.label", "Go to Type Definition"),
				mnemonicTitle: B({
					key: "miGotoTypeDefinition",
					comment: ["&& denotes a mnemonic"]
				}, "Go to &&Type Definition")
			},
			precondition: I.hasTypeDefinitionProvider,
			keybinding: {
				when: I.editorTextFocus,
				primary: 0,
				weight: 100
			},
			menu: [{
				id: F.EditorContext,
				group: "navigation",
				order: 1.4
			}, {
				id: F.MenubarGoMenu,
				precondition: null,
				group: "4_symbol_nav",
				order: 3
			}]
		});
	}
}), Fa(class e extends AO {
	static {
		this.ID = "editor.action.peekTypeDefinition";
	}
	constructor() {
		super({
			openToSide: !1,
			openInPeek: !0,
			muteMessage: !1
		}, {
			id: e.ID,
			title: H("actions.peekTypeDefinition.label", "Peek Type Definition"),
			precondition: N.and(I.hasTypeDefinitionProvider, DD.notInPeekEditor, I.isInEmbeddedEditor.toNegated()),
			menu: {
				id: F.EditorContextPeek,
				group: "peek",
				order: 4
			}
		});
	}
});
var jO = class extends DO {
	async _getLocationModel(e, t, n, r) {
		return new VD(await SO(e.implementationProvider, t, n, !1, r), B("impl.title", "Implementations"));
	}
	_getNoResultFoundMessage(e) {
		return e && e.word ? B("goToImplementation.noResultWord", "No implementation found for '{0}'", e.word) : B("goToImplementation.generic.noResults", "No implementation found");
	}
	_getAlternativeCommand(e) {
		return e.getOption(58).alternativeImplementationCommand;
	}
	_getGoToPreference(e) {
		return e.getOption(58).multipleImplementations;
	}
};
Fa(class e extends jO {
	static {
		this.ID = "editor.action.goToImplementation";
	}
	constructor() {
		super({
			openToSide: !1,
			openInPeek: !1,
			muteMessage: !1
		}, {
			id: e.ID,
			title: {
				...H("actions.goToImplementation.label", "Go to Implementations"),
				mnemonicTitle: B({
					key: "miGotoImplementation",
					comment: ["&& denotes a mnemonic"]
				}, "Go to &&Implementations")
			},
			precondition: I.hasImplementationProvider,
			keybinding: {
				when: I.editorTextFocus,
				primary: 2118,
				weight: 100
			},
			menu: [{
				id: F.EditorContext,
				group: "navigation",
				order: 1.45
			}, {
				id: F.MenubarGoMenu,
				precondition: null,
				group: "4_symbol_nav",
				order: 4
			}]
		});
	}
}), Fa(class e extends jO {
	static {
		this.ID = "editor.action.peekImplementation";
	}
	constructor() {
		super({
			openToSide: !1,
			openInPeek: !0,
			muteMessage: !1
		}, {
			id: e.ID,
			title: H("actions.peekImplementation.label", "Peek Implementations"),
			precondition: N.and(I.hasImplementationProvider, DD.notInPeekEditor, I.isInEmbeddedEditor.toNegated()),
			keybinding: {
				when: I.editorTextFocus,
				primary: 3142,
				weight: 100
			},
			menu: {
				id: F.EditorContextPeek,
				group: "peek",
				order: 5
			}
		});
	}
});
var MO = class extends DO {
	_getNoResultFoundMessage(e) {
		return e ? B("references.no", "No references found for '{0}'", e.word) : B("references.noGeneric", "No references found");
	}
	_getAlternativeCommand(e) {
		return e.getOption(58).alternativeReferenceCommand;
	}
	_getGoToPreference(e) {
		return e.getOption(58).multipleReferences;
	}
};
Fa(class extends MO {
	constructor() {
		super({
			openToSide: !1,
			openInPeek: !1,
			muteMessage: !1
		}, {
			id: "editor.action.goToReferences",
			title: {
				...H("goToReferences.label", "Go to References"),
				mnemonicTitle: B({
					key: "miGotoReference",
					comment: ["&& denotes a mnemonic"]
				}, "Go to &&References")
			},
			precondition: N.and(I.hasReferenceProvider, DD.notInPeekEditor, I.isInEmbeddedEditor.toNegated()),
			keybinding: {
				when: I.editorTextFocus,
				primary: 1094,
				weight: 100
			},
			menu: [{
				id: F.EditorContext,
				group: "navigation",
				order: 1.45
			}, {
				id: F.MenubarGoMenu,
				precondition: null,
				group: "4_symbol_nav",
				order: 5
			}]
		});
	}
	async _getLocationModel(e, t, n, r) {
		return new VD(await wO(e.referenceProvider, t, n, !0, !1, r), B("ref.title", "References"));
	}
}), Fa(class extends MO {
	constructor() {
		super({
			openToSide: !1,
			openInPeek: !0,
			muteMessage: !1
		}, {
			id: "editor.action.referenceSearch.trigger",
			title: H("references.action.label", "Peek References"),
			precondition: N.and(I.hasReferenceProvider, DD.notInPeekEditor, I.isInEmbeddedEditor.toNegated()),
			menu: {
				id: F.EditorContextPeek,
				group: "peek",
				order: 6
			}
		});
	}
	async _getLocationModel(e, t, n, r) {
		return new VD(await wO(e.referenceProvider, t, n, !1, !1, r), B("ref.title", "References"));
	}
});
var NO = class extends DO {
	constructor(e, t, n) {
		super(e, {
			id: "editor.action.goToLocation",
			title: H("label.generic", "Go to Any Symbol"),
			precondition: N.and(DD.notInPeekEditor, I.isInEmbeddedEditor.toNegated())
		}), this._references = t, this._gotoMultipleBehaviour = n;
	}
	async _getLocationModel(e, t, n, r) {
		return new VD(this._references, B("generic.title", "Locations"));
	}
	_getNoResultFoundMessage(e) {
		return e && B("generic.noResult", "No results for '{0}'", e.word) || "";
	}
	_getGoToPreference(e) {
		return this._gotoMultipleBehaviour ?? e.getOption(58).multipleReferences;
	}
	_getAlternativeCommand() {
		return "";
	}
};
Ol.registerCommand({
	id: "editor.action.goToLocations",
	metadata: {
		description: "Go to locations from a position in a file",
		args: [
			{
				name: "uri",
				description: "The text document in which to start",
				constraint: De
			},
			{
				name: "position",
				description: "The position at which to start",
				constraint: b.isIPosition
			},
			{
				name: "locations",
				description: "An array of locations.",
				constraint: Array
			},
			{
				name: "multiple",
				description: "Define what to do when having multiple results, either `peek`, `gotoAndPeek`, or `goto`"
			},
			{
				name: "noResultsMessage",
				description: "Human readable message that shows when locations is empty."
			}
		]
	},
	handler: async (e, t, n, r, i, a, o) => {
		y(De.isUri(t)), y(b.isIPosition(n)), y(Array.isArray(r)), y(i === void 0 || typeof i == "string"), y(o === void 0 || typeof o == "boolean");
		let s = e.get(Ln), c = await s.openCodeEditor({ resource: t }, s.getFocusedCodeEditor());
		if (ll(c)) return c.setPosition(n), c.revealPositionInCenterIfOutsideViewport(n, 0), c.invokeWithinContext((e) => {
			let t = new class extends NO {
				_getNoResultFoundMessage(e) {
					return a || super._getNoResultFoundMessage(e);
				}
			}({
				muteMessage: !a,
				openInPeek: !!o,
				openToSide: !1
			}, r, i);
			e.get(P).invokeFunction(t.run.bind(t), c);
		});
	}
}), Ol.registerCommand({
	id: "editor.action.peekLocations",
	metadata: {
		description: "Peek locations from a position in a file",
		args: [
			{
				name: "uri",
				description: "The text document in which to start",
				constraint: De
			},
			{
				name: "position",
				description: "The position at which to start",
				constraint: b.isIPosition
			},
			{
				name: "locations",
				description: "An array of locations.",
				constraint: Array
			},
			{
				name: "multiple",
				description: "Define what to do when having multiple results, either `peek`, `gotoAndPeek`, or `goto`"
			}
		]
	},
	handler: async (e, t, n, r, i) => {
		e.get(ga).executeCommand("editor.action.goToLocations", t, n, r, i, void 0, !0);
	}
}), Ol.registerCommand({
	id: "editor.action.findReferences",
	handler: (e, t, n) => {
		y(De.isUri(t)), y(b.isIPosition(n));
		let r = e.get(M), i = e.get(Ln);
		return i.openCodeEditor({ resource: t }, i.getFocusedCodeEditor()).then((e) => {
			if (!ll(e) || !e.hasModel()) return;
			let t = uO.get(e);
			if (!t) return;
			let i = Te((t) => wO(r.referenceProvider, e.getModel(), b.lift(n), !1, !1, t).then((e) => new VD(e, B("ref.title", "References")))), a = new E(n.lineNumber, n.column, n.lineNumber, n.column);
			return Promise.resolve(t.toggleWidget(a, i, !1));
		});
	}
}), Ol.registerCommandAlias("editor.action.showReferences", "editor.action.peekLocations");
// ../../../node_modules/.pnpm/monaco-editor@0.52.2/node_modules/monaco-editor/esm/vs/editor/contrib/inlayHints/browser/inlayHintsLocations.js
async function PO(e, n, r, i) {
	let a = e.get(Ve), o = e.get(Br), s = e.get(ga), c = e.get(P), l = e.get(t);
	if (await i.item.resolve(C.None), !i.part.location) return;
	let u = i.part.location, d = [], f = new Set(Ta.getMenuItems(F.EditorContext).map((e) => Vc(e) ? e.command.id : Zx()));
	for (let e of DO.all()) f.has(e.desc.id) && d.push(new wr(e.desc.id, wc.label(e.desc, { renderShortTitle: !0 }), void 0, !0, async () => {
		let t = await a.createModelReference(u.uri);
		try {
			let r = new EO(t.object.textEditorModel, E.getStartPosition(u.range)), a = i.item.anchor.range;
			await c.invokeFunction(e.runEditorCommand.bind(e), n, r, a);
		} finally {
			t.dispose();
		}
	}));
	if (i.part.command) {
		let { command: e } = i.part;
		d.push(new xe()), d.push(new wr(e.id, e.title, void 0, !0, async () => {
			try {
				await s.executeCommand(e.id, ...e.arguments ?? []);
			} catch (e) {
				l.notify({
					severity: Ua.Error,
					source: i.item.provider.displayName,
					message: e
				});
			}
		}));
	}
	let p = n.getOption(128);
	o.showContextMenu({
		domForShadowRoot: p ? n.getDomNode() ?? void 0 : void 0,
		getAnchor: () => {
			let e = Bi(r);
			return {
				x: e.left,
				y: e.top + e.height + 8
			};
		},
		getActions: () => d,
		onHide: () => {
			n.focus();
		},
		autoSelectFirstItem: !0
	});
}
async function FO(e, t, n, r) {
	let i = await e.get(Ve).createModelReference(r.uri);
	await n.invokeWithinContext(async (e) => {
		let a = t.hasSideBySideModifier, o = e.get(j), s = DD.inPeekEditor.getValue(o);
		return new OO({
			openToSide: a,
			openInPeek: !a && n.getOption(89) && !s,
			muteMessage: !0
		}, {
			title: {
				value: "",
				original: ""
			},
			id: "",
			precondition: void 0
		}).run(e, new EO(i.object.textEditorModel, E.getStartPosition(r.range)), E.lift(r.range));
	}), i.dispose();
}
// ../../../node_modules/.pnpm/monaco-editor@0.52.2/node_modules/monaco-editor/esm/vs/editor/contrib/inlayHints/browser/inlayHintsController.js
var IO = function(e, t, n, r) {
	var i = arguments.length, a = i < 3 ? t : r === null ? r = Object.getOwnPropertyDescriptor(t, n) : r, o;
	if (typeof Reflect == "object" && typeof Reflect.decorate == "function") a = Reflect.decorate(e, t, n, r);
	else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (i < 3 ? o(a) : i > 3 ? o(t, n, a) : o(t, n)) || a);
	return i > 3 && a && Object.defineProperty(t, n, a), a;
}, LO = function(e, t) {
	return function(n, r) {
		t(n, r, e);
	};
}, RO, zO = class e {
	constructor() {
		this._entries = new Fn(50);
	}
	get(t) {
		let n = e._key(t);
		return this._entries.get(n);
	}
	set(t, n) {
		let r = e._key(t);
		this._entries.set(r, n);
	}
	static _key(e) {
		return `${e.uri.toString()}/${e.getVersionId()}`;
	}
}, BO = ne("IInlayHintsCache");
rn(BO, zO, 1);
var VO = class {
	constructor(e, t) {
		this.item = e, this.index = t;
	}
	get part() {
		let e = this.item.hint.label;
		return typeof e == "string" ? { label: e } : e[this.index];
	}
}, HO = class {
	constructor(e, t) {
		this.part = e, this.hasTriggerModifier = t;
	}
}, UO = class {
	static {
		RO = this;
	}
	static {
		this.ID = "editor.contrib.InlayHints";
	}
	static {
		this._MAX_DECORATORS = 1500;
	}
	static {
		this._MAX_LABEL_LEN = 43;
	}
	static get(e) {
		return e.getContribution(RO.ID) ?? void 0;
	}
	constructor(e, t, n, r, i, a, o) {
		this._editor = e, this._languageFeaturesService = t, this._inlayHintsCache = r, this._commandService = i, this._notificationService = a, this._instaService = o, this._disposables = new g(), this._sessionDisposables = new g(), this._decorationsMetadata = /* @__PURE__ */ new Map(), this._ruleFactory = new vl(this._editor), this._activeRenderMode = 0, this._debounceInfo = n.for(t.inlayHintsProvider, "InlayHint", { min: 25 }), this._disposables.add(t.inlayHintsProvider.onDidChange(() => this._update())), this._disposables.add(e.onDidChangeModel(() => this._update())), this._disposables.add(e.onDidChangeModelLanguage(() => this._update())), this._disposables.add(e.onDidChangeConfiguration((e) => {
			e.hasChanged(142) && this._update();
		})), this._update();
	}
	dispose() {
		this._sessionDisposables.dispose(), this._removeAllDecorations(), this._disposables.dispose();
	}
	_update() {
		this._sessionDisposables.clear(), this._removeAllDecorations();
		let e = this._editor.getOption(142);
		if (e.enabled === "off") return;
		let t = this._editor.getModel();
		if (!t || !this._languageFeaturesService.inlayHintsProvider.has(t)) return;
		if (e.enabled === "on") this._activeRenderMode = 0;
		else {
			let t, n;
			e.enabled === "onUnlessPressed" ? (t = 0, n = 1) : (t = 1, n = 0), this._activeRenderMode = t, this._sessionDisposables.add(pr.getInstance().event((e) => {
				if (!this._editor.hasModel()) return;
				let r = e.altKey && e.ctrlKey && !(e.shiftKey || e.metaKey) ? n : t;
				if (r !== this._activeRenderMode) {
					this._activeRenderMode = r;
					let e = this._editor.getModel(), t = this._copyInlayHintsWithCurrentAnchor(e);
					this._updateHintsDecorators([e.getFullModelRange()], t), a.schedule(0);
				}
			}));
		}
		let n = this._inlayHintsCache.get(t);
		n && this._updateHintsDecorators([t.getFullModelRange()], n), this._sessionDisposables.add(Gt(() => {
			t.isDisposed() || this._cacheHintsForFastRestore(t);
		}));
		let r, i = /* @__PURE__ */ new Set(), a = new tl(async () => {
			let e = Date.now();
			r?.dispose(!0), r = new Cn();
			let n = t.onWillDispose(() => r?.cancel());
			try {
				let n = r.token, o = await fD.create(this._languageFeaturesService.inlayHintsProvider, t, this._getHintsRanges(), n);
				if (a.delay = this._debounceInfo.update(t, Date.now() - e), n.isCancellationRequested) {
					o.dispose();
					return;
				}
				for (let e of o.provider) typeof e.onDidChangeInlayHints == "function" && !i.has(e) && (i.add(e), this._sessionDisposables.add(e.onDidChangeInlayHints(() => {
					a.isScheduled() || a.schedule();
				})));
				this._sessionDisposables.add(o), this._updateHintsDecorators(o.ranges, o.items), this._cacheHintsForFastRestore(t);
			} catch (e) {
				er(e);
			} finally {
				r.dispose(), n.dispose();
			}
		}, this._debounceInfo.get(t));
		this._sessionDisposables.add(a), this._sessionDisposables.add(Gt(() => r?.dispose(!0))), a.schedule(0), this._sessionDisposables.add(this._editor.onDidScrollChange((e) => {
			(e.scrollTopChanged || !a.isScheduled()) && a.schedule();
		})), this._sessionDisposables.add(this._editor.onDidChangeModelContent((e) => {
			r?.cancel();
			let t = Math.max(a.delay, 1250);
			a.schedule(t);
		})), this._sessionDisposables.add(this._installDblClickGesture(() => a.schedule(0))), this._sessionDisposables.add(this._installLinkGesture()), this._sessionDisposables.add(this._installContextMenu());
	}
	_installLinkGesture() {
		let e = new g(), t = e.add(new lD(this._editor)), n = new g();
		return e.add(n), e.add(t.onMouseMoveOrRelevantKeyDown((e) => {
			let [t] = e, r = this._getInlayHintLabelPart(t), i = this._editor.getModel();
			if (!r || !i) {
				n.clear();
				return;
			}
			let a = new Cn();
			n.add(Gt(() => a.dispose(!0))), r.item.resolve(a.token), this._activeInlayHintPart = r.part.command || r.part.location ? new HO(r, t.hasTriggerModifier) : void 0;
			let o = i.validatePosition(r.item.hint.position).lineNumber, s = new E(o, 1, o, i.getLineMaxColumn(o)), c = this._getInlineHintsForRange(s);
			this._updateHintsDecorators([s], c), n.add(Gt(() => {
				this._activeInlayHintPart = void 0, this._updateHintsDecorators([s], c);
			}));
		})), e.add(t.onCancel(() => n.clear())), e.add(t.onExecute(async (e) => {
			let t = this._getInlayHintLabelPart(e);
			if (t) {
				let n = t.part;
				n.location ? this._instaService.invokeFunction(FO, e, this._editor, n.location) : Fs.is(n.command) && await this._invokeCommand(n.command, t.item);
			}
		})), e;
	}
	_getInlineHintsForRange(e) {
		let t = /* @__PURE__ */ new Set();
		for (let n of this._decorationsMetadata.values()) e.containsRange(n.item.anchor.range) && t.add(n.item);
		return Array.from(t);
	}
	_installDblClickGesture(e) {
		return this._editor.onMouseUp(async (t) => {
			if (t.event.detail !== 2) return;
			let n = this._getInlayHintLabelPart(t);
			if (n && (t.event.preventDefault(), await n.item.resolve(C.None), zl(n.item.hint.textEdits))) {
				let t = n.item.hint.textEdits.map((e) => fr.replace(E.lift(e.range), e.text));
				this._editor.executeEdits("inlayHint.default", t), e();
			}
		});
	}
	_installContextMenu() {
		return this._editor.onContextMenu(async (e) => {
			if (!vc(e.event.target)) return;
			let t = this._getInlayHintLabelPart(e);
			t && await this._instaService.invokeFunction(PO, this._editor, e.event.target, t);
		});
	}
	_getInlayHintLabelPart(e) {
		if (e.target.type !== 6) return;
		let t = e.target.detail.injectedText?.options;
		if (t instanceof as && t?.attachedData instanceof VO) return t.attachedData;
	}
	async _invokeCommand(e, t) {
		try {
			await this._commandService.executeCommand(e.id, ...e.arguments ?? []);
		} catch (e) {
			this._notificationService.notify({
				severity: Ua.Error,
				source: t.provider.displayName,
				message: e
			});
		}
	}
	_cacheHintsForFastRestore(e) {
		let t = this._copyInlayHintsWithCurrentAnchor(e);
		this._inlayHintsCache.set(e, t);
	}
	_copyInlayHintsWithCurrentAnchor(e) {
		let t = /* @__PURE__ */ new Map();
		for (let [n, r] of this._decorationsMetadata) {
			if (t.has(r.item)) continue;
			let i = e.getDecorationRange(n);
			if (i) {
				let e = new uD(i, r.item.anchor.direction), n = r.item.with({ anchor: e });
				t.set(r.item, n);
			}
		}
		return Array.from(t.values());
	}
	_getHintsRanges() {
		let e = this._editor.getModel(), t = this._editor.getVisibleRangesPlusViewportAboveBelow(), n = [];
		for (let r of t.sort(E.compareRangesUsingStarts)) {
			let t = e.validateRange(new E(r.startLineNumber - 30, r.startColumn, r.endLineNumber + 30, r.endColumn));
			n.length === 0 || !E.areIntersectingOrTouching(n[n.length - 1], t) ? n.push(t) : n[n.length - 1] = E.plusRange(n[n.length - 1], t);
		}
		return n;
	}
	_updateHintsDecorators(e, t) {
		let n = [], r = (e, t, r, i, a) => {
			let o = {
				content: r,
				inlineClassNameAffectsLetterSpacing: !0,
				inlineClassName: t.className,
				cursorStops: i,
				attachedData: a
			};
			n.push({
				item: e,
				classNameRef: t,
				decoration: {
					range: e.anchor.range,
					options: {
						description: "InlayHint",
						showIfCollapsed: e.anchor.range.isEmpty(),
						collapseOnReplaceEdit: !e.anchor.range.isEmpty(),
						stickiness: 0,
						[e.anchor.direction]: this._activeRenderMode === 0 ? o : void 0
					}
				}
			});
		}, i = (e, t) => {
			let n = this._ruleFactory.createClassNameRef({
				width: `${a / 3 | 0}px`,
				display: "inline-block"
			});
			r(e, n, " ", t ? il.Right : il.None);
		}, { fontSize: a, fontFamily: o, padding: s, isUniform: c } = this._getLayoutInfo(), l = "--code-editorInlayHintsFontFamily";
		this._editor.getContainerDomNode().style.setProperty(l, o);
		let u = {
			line: 0,
			totalLen: 0
		};
		for (let e of t) {
			if (u.line !== e.anchor.range.startLineNumber && (u = {
				line: e.anchor.range.startLineNumber,
				totalLen: 0
			}), u.totalLen > RO._MAX_LABEL_LEN) continue;
			e.hint.paddingLeft && i(e, !1);
			let t = typeof e.hint.label == "string" ? [{ label: e.hint.label }] : e.hint.label;
			for (let n = 0; n < t.length; n++) {
				let i = t[n], o = n === 0, d = n === t.length - 1, f = {
					fontSize: `${a}px`,
					fontFamily: `var(${l}), ${qa.fontFamily}`,
					verticalAlign: c ? "baseline" : "middle",
					unicodeBidi: "isolate"
				};
				zl(e.hint.textEdits) && (f.cursor = "default"), this._fillInColors(f, e.hint), (i.command || i.location) && this._activeInlayHintPart?.part.item === e && this._activeInlayHintPart.part.index === n && (f.textDecoration = "underline", this._activeInlayHintPart.hasTriggerModifier && (f.color = ra(Ms), f.cursor = "pointer")), s && (o && d ? (f.padding = `1px ${Math.max(1, a / 4) | 0}px`, f.borderRadius = `${a / 4 | 0}px`) : o ? (f.padding = `1px 0 1px ${Math.max(1, a / 4) | 0}px`, f.borderRadius = `${a / 4 | 0}px 0 0 ${a / 4 | 0}px`) : d ? (f.padding = `1px ${Math.max(1, a / 4) | 0}px 1px 0`, f.borderRadius = `0 ${a / 4 | 0}px ${a / 4 | 0}px 0`) : f.padding = "1px 0 1px 0");
				let p = i.label;
				u.totalLen += p.length;
				let m = !1, h = u.totalLen - RO._MAX_LABEL_LEN;
				if (h > 0 && (p = p.slice(0, -h) + "…", m = !0), r(e, this._ruleFactory.createClassNameRef(f), WO(p), d && !e.hint.paddingRight ? il.Right : il.None, new VO(e, n)), m) break;
			}
			if (e.hint.paddingRight && i(e, !0), n.length > RO._MAX_DECORATORS) break;
		}
		let d = [];
		for (let [t, n] of this._decorationsMetadata) {
			let r = this._editor.getModel()?.getDecorationRange(t);
			r && e.some((e) => e.containsRange(r)) && (d.push(t), n.classNameRef.dispose(), this._decorationsMetadata.delete(t));
		}
		let f = jt.capture(this._editor);
		this._editor.changeDecorations((e) => {
			let t = e.deltaDecorations(d, n.map((e) => e.decoration));
			for (let e = 0; e < t.length; e++) {
				let r = n[e];
				this._decorationsMetadata.set(t[e], r);
			}
		}), f.restore(this._editor);
	}
	_fillInColors(e, t) {
		t.kind === Za.Parameter ? (e.backgroundColor = ra(_r), e.color = ra(he)) : t.kind === Za.Type ? (e.backgroundColor = ra(el), e.color = ra(Or)) : (e.backgroundColor = ra(la), e.color = ra(ul));
	}
	_getLayoutInfo() {
		let e = this._editor.getOption(142), t = e.padding, n = this._editor.getOption(52), r = this._editor.getOption(49), i = e.fontSize;
		(!i || i < 5 || i > n) && (i = n);
		let a = e.fontFamily || r;
		return {
			fontSize: i,
			fontFamily: a,
			padding: t,
			isUniform: !t && a === r && i === n
		};
	}
	_removeAllDecorations() {
		this._editor.removeDecorations(Array.from(this._decorationsMetadata.keys()));
		for (let e of this._decorationsMetadata.values()) e.classNameRef.dispose();
		this._decorationsMetadata.clear();
	}
};
UO = RO = IO([
	LO(1, M),
	LO(2, hi),
	LO(3, BO),
	LO(4, ga),
	LO(5, t),
	LO(6, P)
], UO);
function WO(e) {
	return e.replace(/[ \t]/g, "\xA0");
}
Ol.registerCommand("_executeInlayHintProvider", async (e, ...t) => {
	let [n, r] = t;
	y(De.isUri(n)), y(E.isIRange(r));
	let { inlayHintsProvider: i } = e.get(M), a = await e.get(Ve).createModelReference(n);
	try {
		let e = await fD.create(i, a.object.textEditorModel, [E.lift(r)], C.None), t = e.items.map((e) => e.hint);
		return setTimeout(() => e.dispose(), 0), t;
	} finally {
		a.dispose();
	}
});
// ../../../node_modules/.pnpm/monaco-editor@0.52.2/node_modules/monaco-editor/esm/vs/editor/contrib/inlayHints/browser/inlayHintsHover.js
var GO = function(e, t, n, r) {
	var i = arguments.length, a = i < 3 ? t : r === null ? r = Object.getOwnPropertyDescriptor(t, n) : r, o;
	if (typeof Reflect == "object" && typeof Reflect.decorate == "function") a = Reflect.decorate(e, t, n, r);
	else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (i < 3 ? o(a) : i > 3 ? o(t, n, a) : o(t, n)) || a);
	return i > 3 && a && Object.defineProperty(t, n, a), a;
}, KO = function(e, t) {
	return function(n, r) {
		t(n, r, e);
	};
}, qO = class extends NT {
	constructor(e, t, n, r) {
		super(10, t, e.item.anchor.range, n, r, !0), this.part = e;
	}
}, JO = class extends QE {
	constructor(e, t, n, r, i, a, o, s, c) {
		super(e, t, n, a, s, r, i, c), this._resolverService = o, this.hoverOrdinal = 6;
	}
	suggestHoverAnchor(e) {
		if (!UO.get(this._editor) || e.target.type !== 6) return null;
		let t = e.target.detail.injectedText?.options;
		return t instanceof as && t.attachedData instanceof VO ? new qO(t.attachedData, this, e.event.posx, e.event.posy) : null;
	}
	computeSync() {
		return [];
	}
	computeAsync(e, t, n) {
		return e instanceof qO ? new dl(async (t) => {
			let { part: r } = e;
			if (await r.item.resolve(n), n.isCancellationRequested) return;
			let i;
			typeof r.item.hint.tooltip == "string" ? i = new ws().appendText(r.item.hint.tooltip) : r.item.hint.tooltip && (i = r.item.hint.tooltip), i && t.emitOne(new XE(this, e.range, [i], !1, 0)), zl(r.item.hint.textEdits) && t.emitOne(new XE(this, e.range, [new ws().appendText(B("hint.dbl", "Double-click to insert"))], !1, 10001));
			let a;
			if (typeof r.part.tooltip == "string" ? a = new ws().appendText(r.part.tooltip) : r.part.tooltip && (a = r.part.tooltip), a && t.emitOne(new XE(this, e.range, [a], !1, 1)), r.part.location || r.part.command) {
				let n, i = this._editor.getOption(78) === "altKey" ? Xs ? B("links.navigate.kb.meta.mac", "cmd + click") : B("links.navigate.kb.meta", "ctrl + click") : Xs ? B("links.navigate.kb.alt.mac", "option + click") : B("links.navigate.kb.alt", "alt + click");
				r.part.location && r.part.command ? n = new ws().appendText(B("hint.defAndCommand", "Go to Definition ({0}), right click for more", i)) : r.part.location ? n = new ws().appendText(B("hint.def", "Go to Definition ({0})", i)) : r.part.command && (n = new ws(`[${B("hint.cmd", "Execute Command")}](${pD(r.part.command)} "${r.part.command.title}") (${i})`, { isTrusted: !0 })), n && t.emitOne(new XE(this, e.range, [n], !1, 1e4));
			}
			let o = await this._resolveInlayHintLabelPartHover(r, n);
			for await (let e of o) t.emitOne(e);
		}) : dl.EMPTY;
	}
	async _resolveInlayHintLabelPartHover(e, t) {
		if (!e.part.location) return dl.EMPTY;
		let { uri: n, range: r } = e.part.location, i = await this._resolverService.createModelReference(n);
		try {
			let n = i.object.textEditorModel;
			return this._languageFeaturesService.hoverProvider.has(n) ? HE(this._languageFeaturesService.hoverProvider, n, new b(r.startLineNumber, r.startColumn), t).filter((e) => !lc(e.hover.contents)).map((t) => new XE(this, e.item.anchor.range, t.hover.contents, !1, 2 + t.ordinal)) : dl.EMPTY;
		} finally {
			i.dispose();
		}
	}
};
JO = GO([
	KO(1, dr),
	KO(2, p),
	KO(3, ft),
	KO(4, rt),
	KO(5, Fl),
	KO(6, Ve),
	KO(7, M),
	KO(8, ga)
], JO);
// ../../../node_modules/.pnpm/monaco-editor@0.52.2/node_modules/monaco-editor/esm/vs/editor/contrib/hover/browser/contentHoverRendered.js
var YO = class e extends U {
	constructor(t, n, r, i, a, o) {
		super();
		let s = n.anchor, c = n.hoverParts;
		this._renderedHoverParts = this._register(new ZO(t, r, c, o, a));
		let { showAtPosition: l, showAtSecondaryPosition: u } = e.computeHoverPositions(t, s.range, c);
		this.shouldAppearBeforeContent = c.some((e) => e.isBeforeContent), this.showAtPosition = l, this.showAtSecondaryPosition = u, this.initialMousePosX = s.initialMousePosX, this.initialMousePosY = s.initialMousePosY, this.shouldFocus = i.shouldFocus, this.source = i.source;
	}
	get domNode() {
		return this._renderedHoverParts.domNode;
	}
	get domNodeHasChildren() {
		return this._renderedHoverParts.domNodeHasChildren;
	}
	get focusedHoverPartIndex() {
		return this._renderedHoverParts.focusedHoverPartIndex;
	}
	async updateHoverVerbosityLevel(e, t, n) {
		this._renderedHoverParts.updateHoverVerbosityLevel(e, t, n);
	}
	isColorPickerVisible() {
		return this._renderedHoverParts.isColorPickerVisible();
	}
	static computeHoverPositions(e, t, n) {
		let r = 1;
		if (e.hasModel()) {
			let n = e._getViewModel(), i = n.coordinatesConverter, a = i.convertModelRangeToViewRange(t), o = n.getLineMinColumn(a.startLineNumber), s = new b(a.startLineNumber, o);
			r = i.convertViewPositionToModelPosition(s).column;
		}
		let i = t.startLineNumber, a = t.startColumn, o;
		for (let e of n) {
			let t = e.range, n = t.startLineNumber === i, s = t.endLineNumber === i;
			if (n && s) {
				let e = t.startColumn;
				a = Math.max(Math.min(a, e), r);
			}
			e.forceShowAtRange && (o = t);
		}
		let s, c;
		if (o) {
			let e = o.getStartPosition();
			s = e, c = e;
		} else s = t.getStartPosition(), c = new b(i, a);
		return {
			showAtPosition: s,
			showAtSecondaryPosition: c
		};
	}
}, XO = class {
	constructor(e, t) {
		this._statusBar = t, e.appendChild(this._statusBar.hoverElement);
	}
	get hoverElement() {
		return this._statusBar.hoverElement;
	}
	get actions() {
		return this._statusBar.actions;
	}
	dispose() {
		this._statusBar.dispose();
	}
}, ZO = class e extends U {
	static {
		this._DECORATION_OPTIONS = L.register({
			description: "content-hover-highlight",
			className: "hoverHighlight"
		});
	}
	constructor(e, t, n, r, i) {
		super(), this._renderedParts = [], this._focusedHoverPartIndex = -1, this._context = i, this._fragment = document.createDocumentFragment(), this._register(this._renderParts(t, n, i, r)), this._register(this._registerListenersOnRenderedParts()), this._register(this._createEditorDecorations(e, n)), this._updateMarkdownAndColorParticipantInfo(t);
	}
	_createEditorDecorations(t, n) {
		if (n.length === 0) return U.None;
		let r = n[0].range;
		for (let e of n) {
			let t = e.range;
			r = E.plusRange(r, t);
		}
		let i = t.createDecorationsCollection();
		return i.set([{
			range: r,
			options: e._DECORATION_OPTIONS
		}]), Gt(() => {
			i.clear();
		});
	}
	_renderParts(e, t, n, r) {
		let i = new zE(r), a = {
			fragment: this._fragment,
			statusBar: i,
			...n
		}, o = new g();
		for (let n of e) {
			let e = this._renderHoverPartsForParticipant(t, n, a);
			o.add(e);
			for (let t of e.renderedHoverParts) this._renderedParts.push({
				type: "hoverPart",
				participant: n,
				hoverPart: t.hoverPart,
				hoverElement: t.hoverElement
			});
		}
		let s = this._renderStatusBar(this._fragment, i);
		return s && (o.add(s), this._renderedParts.push({
			type: "statusBar",
			hoverElement: s.hoverElement,
			actions: s.actions
		})), Gt(() => {
			o.dispose();
		});
	}
	_renderHoverPartsForParticipant(e, t, n) {
		let r = e.filter((e) => e.owner === t);
		return r.length > 0 ? t.renderHoverParts(n, r) : new PT([]);
	}
	_renderStatusBar(e, t) {
		if (t.hasContent) return new XO(e, t);
	}
	_registerListenersOnRenderedParts() {
		let e = new g();
		return this._renderedParts.forEach((t, n) => {
			let r = t.hoverElement;
			r.tabIndex = 0, e.add(_(r, on.FOCUS_IN, (e) => {
				e.stopPropagation(), this._focusedHoverPartIndex = n;
			})), e.add(_(r, on.FOCUS_OUT, (e) => {
				e.stopPropagation(), this._focusedHoverPartIndex = -1;
			}));
		}), e;
	}
	_updateMarkdownAndColorParticipantInfo(e) {
		let t = e.find((e) => e instanceof QE && !(e instanceof JO));
		t && (this._markdownHoverParticipant = t), this._colorHoverParticipant = e.find((e) => e instanceof zT);
	}
	async updateHoverVerbosityLevel(e, t, n) {
		if (!this._markdownHoverParticipant) return;
		let r = this._normalizedIndexToMarkdownHoverIndexRange(this._markdownHoverParticipant, t);
		if (r === void 0) return;
		let i = await this._markdownHoverParticipant.updateMarkdownHoverVerbosityLevel(e, r, n);
		i && (this._renderedParts[t] = {
			type: "hoverPart",
			participant: this._markdownHoverParticipant,
			hoverPart: i.hoverPart,
			hoverElement: i.hoverElement
		}, this._context.onContentsChanged());
	}
	isColorPickerVisible() {
		return this._colorHoverParticipant?.isColorPickerVisible() ?? !1;
	}
	_normalizedIndexToMarkdownHoverIndexRange(e, t) {
		let n = this._renderedParts[t];
		if (!n || n.type !== "hoverPart" || n.participant !== e) return;
		let r = this._renderedParts.findIndex((t) => t.type === "hoverPart" && t.participant === e);
		if (r === -1) throw new Ft();
		return t - r;
	}
	get domNode() {
		return this._fragment;
	}
	get domNodeHasChildren() {
		return this._fragment.hasChildNodes();
	}
	get focusedHoverPartIndex() {
		return this._focusedHoverPartIndex;
	}
}, QO = function(e, t, n, r) {
	var i = arguments.length, a = i < 3 ? t : r === null ? r = Object.getOwnPropertyDescriptor(t, n) : r, o;
	if (typeof Reflect == "object" && typeof Reflect.decorate == "function") a = Reflect.decorate(e, t, n, r);
	else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (i < 3 ? o(a) : i > 3 ? o(t, n, a) : o(t, n)) || a);
	return i > 3 && a && Object.defineProperty(t, n, a), a;
}, $O = function(e, t) {
	return function(n, r) {
		t(n, r, e);
	};
}, ek = class extends U {
	constructor(e, t, n) {
		super(), this._editor = e, this._instantiationService = t, this._keybindingService = n, this._currentResult = null, this._onContentsChanged = this._register(new x()), this.onContentsChanged = this._onContentsChanged.event, this._contentHoverWidget = this._register(this._instantiationService.createInstance(jE, this._editor)), this._participants = this._initializeHoverParticipants(), this._computer = new NE(this._editor, this._participants), this._hoverOperation = this._register(new xE(this._editor, this._computer)), this._registerListeners();
	}
	_initializeHoverParticipants() {
		let e = [];
		for (let t of FT.getAll()) {
			let n = this._instantiationService.createInstance(t, this._editor);
			e.push(n);
		}
		return e.sort((e, t) => e.hoverOrdinal - t.hoverOrdinal), this._register(this._contentHoverWidget.onDidResize(() => {
			this._participants.forEach((e) => e.handleResize?.());
		})), e;
	}
	_registerListeners() {
		this._register(this._hoverOperation.onResult((e) => {
			if (!this._computer.anchor) return;
			let t = e.hasLoadingMessage ? this._addLoadingMessage(e.value) : e.value;
			this._withResult(new PE(this._computer.anchor, t, e.isComplete));
		}));
		let e = this._contentHoverWidget.getDomNode();
		this._register(_t(e, "keydown", (e) => {
			e.equals(9) && this.hide();
		})), this._register(_t(e, "mouseleave", (e) => {
			this._onMouseLeave(e);
		})), this._register(fa.onDidChange(() => {
			this._contentHoverWidget.position && this._currentResult && this._setCurrentResult(this._currentResult);
		}));
	}
	_startShowingOrUpdateHover(e, t, n, r, i) {
		if (!(this._contentHoverWidget.position && this._currentResult)) return e ? (this._startHoverOperationIfNecessary(e, t, n, r, !1), !0) : !1;
		let a = this._editor.getOption(60).sticky, o = i && this._contentHoverWidget.isMouseGettingCloser(i.event.posx, i.event.posy);
		return a && o ? (e && this._startHoverOperationIfNecessary(e, t, n, r, !0), !0) : e ? this._currentResult.anchor.equals(e) ? !0 : e.canAdoptVisibleHover(this._currentResult.anchor, this._contentHoverWidget.position) ? (this._setCurrentResult(this._currentResult.filter(e)), this._startHoverOperationIfNecessary(e, t, n, r, !1), !0) : (this._setCurrentResult(null), this._startHoverOperationIfNecessary(e, t, n, r, !1), !0) : (this._setCurrentResult(null), !1);
	}
	_startHoverOperationIfNecessary(e, t, n, r, i) {
		this._computer.anchor && this._computer.anchor.equals(e) || (this._hoverOperation.cancel(), this._computer.anchor = e, this._computer.shouldFocus = r, this._computer.source = n, this._computer.insistOnKeepingHoverVisible = i, this._hoverOperation.start(t));
	}
	_setCurrentResult(e) {
		let t = e;
		this._currentResult !== t && (t && t.hoverParts.length === 0 && (t = null), this._currentResult = t, this._currentResult ? this._showHover(this._currentResult) : this._hideHover());
	}
	_addLoadingMessage(e) {
		if (!this._computer.anchor) return e;
		for (let t of this._participants) {
			if (!t.createLoadingMessage) continue;
			let n = t.createLoadingMessage(this._computer.anchor);
			if (n) return e.slice(0).concat([n]);
		}
		return e;
	}
	_withResult(e) {
		if (this._contentHoverWidget.position && this._currentResult && this._currentResult.isComplete || this._setCurrentResult(e), !e.isComplete) return;
		let t = e.hoverParts.length === 0, n = this._computer.insistOnKeepingHoverVisible;
		t && n || this._setCurrentResult(e);
	}
	_showHover(e) {
		let t = this._getHoverContext();
		this._renderedContentHover = new YO(this._editor, e, this._participants, this._computer, t, this._keybindingService), this._renderedContentHover.domNodeHasChildren ? this._contentHoverWidget.show(this._renderedContentHover) : this._renderedContentHover.dispose();
	}
	_hideHover() {
		this._contentHoverWidget.hide();
	}
	_getHoverContext() {
		return {
			hide: () => {
				this.hide();
			},
			onContentsChanged: () => {
				this._onContentsChanged.fire(), this._contentHoverWidget.onContentsChanged();
			},
			setMinimumDimensions: (e) => {
				this._contentHoverWidget.setMinimumDimensions(e);
			}
		};
	}
	showsOrWillShow(e) {
		if (this._contentHoverWidget.isResizing) return !0;
		let t = this._findHoverAnchorCandidates(e);
		if (!(t.length > 0)) return this._startShowingOrUpdateHover(null, 0, 0, !1, e);
		let n = t[0];
		return this._startShowingOrUpdateHover(n, 0, 0, !1, e);
	}
	_findHoverAnchorCandidates(e) {
		let t = [];
		for (let n of this._participants) {
			if (!n.suggestHoverAnchor) continue;
			let r = n.suggestHoverAnchor(e);
			r && t.push(r);
		}
		let n = e.target;
		switch (n.type) {
			case 6:
				t.push(new MT(0, n.range, e.event.posx, e.event.posy));
				break;
			case 7: {
				let r = this._editor.getOption(50).typicalHalfwidthCharacterWidth / 2;
				if (!(!n.detail.isAfterLines && typeof n.detail.horizontalDistanceToText == "number" && n.detail.horizontalDistanceToText < r)) break;
				t.push(new MT(0, n.range, e.event.posx, e.event.posy));
				break;
			}
		}
		return t.sort((e, t) => t.priority - e.priority), t;
	}
	_onMouseLeave(e) {
		let t = this._editor.getDomNode();
		t && yE(t, e.x, e.y) || this.hide();
	}
	startShowingAtRange(e, t, n, r) {
		this._startShowingOrUpdateHover(new MT(0, e, void 0, void 0), t, n, r, null);
	}
	async updateHoverVerbosityLevel(e, t, n) {
		this._renderedContentHover?.updateHoverVerbosityLevel(e, t, n);
	}
	focusedHoverPartIndex() {
		return this._renderedContentHover?.focusedHoverPartIndex ?? -1;
	}
	containsNode(e) {
		return e ? this._contentHoverWidget.getDomNode().contains(e) : !1;
	}
	focus() {
		this._contentHoverWidget.focus();
	}
	scrollUp() {
		this._contentHoverWidget.scrollUp();
	}
	scrollDown() {
		this._contentHoverWidget.scrollDown();
	}
	scrollLeft() {
		this._contentHoverWidget.scrollLeft();
	}
	scrollRight() {
		this._contentHoverWidget.scrollRight();
	}
	pageUp() {
		this._contentHoverWidget.pageUp();
	}
	pageDown() {
		this._contentHoverWidget.pageDown();
	}
	goToTop() {
		this._contentHoverWidget.goToTop();
	}
	goToBottom() {
		this._contentHoverWidget.goToBottom();
	}
	hide() {
		this._computer.anchor = null, this._hoverOperation.cancel(), this._setCurrentResult(null);
	}
	getDomNode() {
		return this._contentHoverWidget.getDomNode();
	}
	get isColorPickerVisible() {
		return this._renderedContentHover?.isColorPickerVisible() ?? !1;
	}
	get isVisibleFromKeyboard() {
		return this._contentHoverWidget.isVisibleFromKeyboard;
	}
	get isVisible() {
		return this._contentHoverWidget.isVisible;
	}
	get isFocused() {
		return this._contentHoverWidget.isFocused;
	}
	get isResizing() {
		return this._contentHoverWidget.isResizing;
	}
	get widget() {
		return this._contentHoverWidget;
	}
};
ek = QO([$O(1, P), $O(2, ft)], ek);
// ../../../node_modules/.pnpm/monaco-editor@0.52.2/node_modules/monaco-editor/esm/vs/editor/contrib/hover/browser/contentHoverController2.js
var tk = function(e, t, n, r) {
	var i = arguments.length, a = i < 3 ? t : r === null ? r = Object.getOwnPropertyDescriptor(t, n) : r, o;
	if (typeof Reflect == "object" && typeof Reflect.decorate == "function") a = Reflect.decorate(e, t, n, r);
	else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (i < 3 ? o(a) : i > 3 ? o(t, n, a) : o(t, n)) || a);
	return i > 3 && a && Object.defineProperty(t, n, a), a;
}, nk = function(e, t) {
	return function(n, r) {
		t(n, r, e);
	};
}, rk, ik = class extends U {
	static {
		rk = this;
	}
	static {
		this.ID = "editor.contrib.contentHover";
	}
	constructor(e, t, n) {
		super(), this._editor = e, this._instantiationService = t, this._keybindingService = n, this._onHoverContentsChanged = this._register(new x()), this.shouldKeepOpenOnEditorMouseMoveOrLeave = !1, this._listenersStore = new g(), this._hoverState = {
			mouseDown: !1,
			activatedByDecoratorClick: !1
		}, this._reactToEditorMouseMoveRunner = this._register(new tl(() => this._reactToEditorMouseMove(this._mouseMoveEvent), 0)), this._hookListeners(), this._register(this._editor.onDidChangeConfiguration((e) => {
			e.hasChanged(60) && (this._unhookListeners(), this._hookListeners());
		}));
	}
	static get(e) {
		return e.getContribution(rk.ID);
	}
	_hookListeners() {
		let e = this._editor.getOption(60);
		this._hoverSettings = {
			enabled: e.enabled,
			sticky: e.sticky,
			hidingDelay: e.hidingDelay
		}, e.enabled ? (this._listenersStore.add(this._editor.onMouseDown((e) => this._onEditorMouseDown(e))), this._listenersStore.add(this._editor.onMouseUp(() => this._onEditorMouseUp())), this._listenersStore.add(this._editor.onMouseMove((e) => this._onEditorMouseMove(e))), this._listenersStore.add(this._editor.onKeyDown((e) => this._onKeyDown(e)))) : (this._listenersStore.add(this._editor.onMouseMove((e) => this._onEditorMouseMove(e))), this._listenersStore.add(this._editor.onKeyDown((e) => this._onKeyDown(e)))), this._listenersStore.add(this._editor.onMouseLeave((e) => this._onEditorMouseLeave(e))), this._listenersStore.add(this._editor.onDidChangeModel(() => {
			this._cancelScheduler(), this._hideWidgets();
		})), this._listenersStore.add(this._editor.onDidChangeModelContent(() => this._cancelScheduler())), this._listenersStore.add(this._editor.onDidScrollChange((e) => this._onEditorScrollChanged(e)));
	}
	_unhookListeners() {
		this._listenersStore.clear();
	}
	_cancelScheduler() {
		this._mouseMoveEvent = void 0, this._reactToEditorMouseMoveRunner.cancel();
	}
	_onEditorScrollChanged(e) {
		(e.scrollTopChanged || e.scrollLeftChanged) && this._hideWidgets();
	}
	_onEditorMouseDown(e) {
		this._hoverState.mouseDown = !0, this._shouldNotHideCurrentHoverWidget(e) || this._hideWidgets();
	}
	_shouldNotHideCurrentHoverWidget(e) {
		return this._isMouseOnContentHoverWidget(e) || this._isContentWidgetResizing();
	}
	_isMouseOnContentHoverWidget(e) {
		let t = this._contentWidget?.getDomNode();
		return t ? yE(t, e.event.posx, e.event.posy) : !1;
	}
	_onEditorMouseUp() {
		this._hoverState.mouseDown = !1;
	}
	_onEditorMouseLeave(e) {
		this.shouldKeepOpenOnEditorMouseMoveOrLeave || (this._cancelScheduler(), this._shouldNotHideCurrentHoverWidget(e) || this._hideWidgets());
	}
	_shouldNotRecomputeCurrentHoverWidget(e) {
		let t = this._hoverSettings.sticky;
		return ((e, t) => {
			let n = this._isMouseOnContentHoverWidget(e);
			return t && n;
		})(e, t) || ((e) => {
			let t = this._isMouseOnContentHoverWidget(e), n = this._contentWidget?.isColorPickerVisible ?? !1;
			return t && n;
		})(e) || ((e, t) => (t && this._contentWidget?.containsNode(e.event.browserEvent.view?.document.activeElement) && !e.event.browserEvent.view?.getSelection()?.isCollapsed) ?? !1)(e, t);
	}
	_onEditorMouseMove(e) {
		if (this.shouldKeepOpenOnEditorMouseMoveOrLeave || (this._mouseMoveEvent = e, this._contentWidget?.isFocused || this._contentWidget?.isResizing)) return;
		let t = this._hoverSettings.sticky;
		if (t && this._contentWidget?.isVisibleFromKeyboard) return;
		if (this._shouldNotRecomputeCurrentHoverWidget(e)) {
			this._reactToEditorMouseMoveRunner.cancel();
			return;
		}
		let n = this._hoverSettings.hidingDelay;
		this._contentWidget?.isVisible && t && n > 0 ? this._reactToEditorMouseMoveRunner.isScheduled() || this._reactToEditorMouseMoveRunner.schedule(n) : this._reactToEditorMouseMove(e);
	}
	_reactToEditorMouseMove(e) {
		if (!e) return;
		let t = e.target.element?.classList.contains("colorpicker-color-decoration"), n = this._editor.getOption(149), r = this._hoverSettings.enabled, i = this._hoverState.activatedByDecoratorClick;
		t && (n === "click" && !i || n === "hover" && !r || n === "clickAndHover" && !r && !i) || !t && !r && !i ? this._hideWidgets() : this._tryShowHoverWidget(e) || this._hideWidgets();
	}
	_tryShowHoverWidget(e) {
		return this._getOrCreateContentWidget().showsOrWillShow(e);
	}
	_onKeyDown(e) {
		if (!this._editor.hasModel()) return;
		let t = this._keybindingService.softDispatch(e, this._editor.getDomNode()), n = t.kind === 1 || t.kind === 2 && (t.commandId === "editor.action.showHover" || t.commandId === "editor.action.increaseHoverVerbosityLevel" || t.commandId === "editor.action.decreaseHoverVerbosityLevel") && this._contentWidget?.isVisible;
		e.keyCode === 5 || e.keyCode === 6 || e.keyCode === 57 || e.keyCode === 4 || n || this._hideWidgets();
	}
	_hideWidgets() {
		this._hoverState.mouseDown && this._contentWidget?.isColorPickerVisible || hE.dropDownVisible || (this._hoverState.activatedByDecoratorClick = !1, this._contentWidget?.hide());
	}
	_getOrCreateContentWidget() {
		return this._contentWidget || (this._contentWidget = this._instantiationService.createInstance(ek, this._editor), this._listenersStore.add(this._contentWidget.onContentsChanged(() => this._onHoverContentsChanged.fire()))), this._contentWidget;
	}
	showContentHover(e, t, n, r, i = !1) {
		this._hoverState.activatedByDecoratorClick = i, this._getOrCreateContentWidget().startShowingAtRange(e, t, n, r);
	}
	_isContentWidgetResizing() {
		return this._contentWidget?.widget.isResizing || !1;
	}
	focusedHoverPartIndex() {
		return this._getOrCreateContentWidget().focusedHoverPartIndex();
	}
	updateHoverVerbosityLevel(e, t, n) {
		this._getOrCreateContentWidget().updateHoverVerbosityLevel(e, t, n);
	}
	focus() {
		this._contentWidget?.focus();
	}
	scrollUp() {
		this._contentWidget?.scrollUp();
	}
	scrollDown() {
		this._contentWidget?.scrollDown();
	}
	scrollLeft() {
		this._contentWidget?.scrollLeft();
	}
	scrollRight() {
		this._contentWidget?.scrollRight();
	}
	pageUp() {
		this._contentWidget?.pageUp();
	}
	pageDown() {
		this._contentWidget?.pageDown();
	}
	goToTop() {
		this._contentWidget?.goToTop();
	}
	goToBottom() {
		this._contentWidget?.goToBottom();
	}
	get isColorPickerVisible() {
		return this._contentWidget?.isColorPickerVisible;
	}
	get isHoverVisible() {
		return this._contentWidget?.isVisible;
	}
	dispose() {
		super.dispose(), this._unhookListeners(), this._listenersStore.dispose(), this._contentWidget?.dispose();
	}
};
ik = rk = tk([nk(1, P), nk(2, ft)], ik);
// ../../../node_modules/.pnpm/monaco-editor@0.52.2/node_modules/monaco-editor/esm/vs/editor/contrib/colorPicker/browser/colorContributions.js
var ak = class extends U {
	static {
		this.ID = "editor.contrib.colorContribution";
	}
	constructor(e) {
		super(), this._editor = e, this._register(e.onMouseDown((e) => this.onMouseDown(e)));
	}
	dispose() {
		super.dispose();
	}
	onMouseDown(e) {
		let t = this._editor.getOption(149);
		if (t !== "click" && t !== "clickAndHover") return;
		let n = e.target;
		if (n.type !== 6 || !n.detail.injectedText || n.detail.injectedText.options.attachedData !== vT || !n.range) return;
		let r = this._editor.getContribution(ik.ID);
		if (r && !r.isColorPickerVisible) {
			let e = new E(n.range.startLineNumber, n.range.startColumn + 1, n.range.endLineNumber, n.range.endColumn + 1);
			r.showContentHover(e, 1, 0, !1, !0);
		}
	}
};
T(ak.ID, ak, 2), FT.register(zT);
// ../../../node_modules/.pnpm/monaco-editor@0.52.2/node_modules/monaco-editor/esm/vs/editor/contrib/colorPicker/browser/standaloneColorPickerWidget.js
var ok = function(e, t, n, r) {
	var i = arguments.length, a = i < 3 ? t : r === null ? r = Object.getOwnPropertyDescriptor(t, n) : r, o;
	if (typeof Reflect == "object" && typeof Reflect.decorate == "function") a = Reflect.decorate(e, t, n, r);
	else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (i < 3 ? o(a) : i > 3 ? o(t, n, a) : o(t, n)) || a);
	return i > 3 && a && Object.defineProperty(t, n, a), a;
}, sk = function(e, t) {
	return function(n, r) {
		t(n, r, e);
	};
}, ck, lk, uk = class extends U {
	static {
		ck = this;
	}
	static {
		this.ID = "editor.contrib.standaloneColorPickerController";
	}
	constructor(e, t, n) {
		super(), this._editor = e, this._instantiationService = n, this._standaloneColorPickerWidget = null, this._standaloneColorPickerVisible = I.standaloneColorPickerVisible.bindTo(t), this._standaloneColorPickerFocused = I.standaloneColorPickerFocused.bindTo(t);
	}
	showOrFocus() {
		this._editor.hasModel() && (this._standaloneColorPickerVisible.get() ? this._standaloneColorPickerFocused.get() || this._standaloneColorPickerWidget?.focus() : this._standaloneColorPickerWidget = this._instantiationService.createInstance(pk, this._editor, this._standaloneColorPickerVisible, this._standaloneColorPickerFocused));
	}
	hide() {
		this._standaloneColorPickerFocused.set(!1), this._standaloneColorPickerVisible.set(!1), this._standaloneColorPickerWidget?.hide(), this._editor.focus();
	}
	insertColor() {
		this._standaloneColorPickerWidget?.updateEditor(), this.hide();
	}
	static get(e) {
		return e.getContribution(ck.ID);
	}
};
uk = ck = ok([sk(1, j), sk(2, P)], uk), T(uk.ID, uk, 1);
var dk = 8, fk = 22, pk = class extends U {
	static {
		lk = this;
	}
	static {
		this.ID = "editor.contrib.standaloneColorPickerWidget";
	}
	constructor(e, t, n, r, i, a, o) {
		super(), this._editor = e, this._standaloneColorPickerVisible = t, this._standaloneColorPickerFocused = n, this._keybindingService = i, this._languageFeaturesService = a, this._editorWorkerService = o, this.allowEditorOverflow = !0, this._position = void 0, this._body = document.createElement("div"), this._colorHover = null, this._selectionSetInEditor = !1, this._onResult = this._register(new x()), this.onResult = this._onResult.event, this._standaloneColorPickerVisible.set(!0), this._standaloneColorPickerParticipant = r.createInstance(VT, this._editor), this._position = this._editor._getViewModel()?.getPrimaryCursorState().modelState.position;
		let s = this._editor.getSelection(), c = s ? {
			startLineNumber: s.startLineNumber,
			startColumn: s.startColumn,
			endLineNumber: s.endLineNumber,
			endColumn: s.endColumn
		} : {
			startLineNumber: 0,
			endLineNumber: 0,
			endColumn: 0,
			startColumn: 0
		}, l = this._register(oo(this._body));
		this._register(l.onDidBlur((e) => {
			this.hide();
		})), this._register(l.onDidFocus((e) => {
			this.focus();
		})), this._register(this._editor.onDidChangeCursorPosition(() => {
			this._selectionSetInEditor ? this._selectionSetInEditor = !1 : this.hide();
		})), this._register(this._editor.onMouseMove((e) => {
			let t = e.target.element?.classList;
			t && t.contains("colorpicker-color-decoration") && this.hide();
		})), this._register(this.onResult((e) => {
			this._render(e.value, e.foundInEditor);
		})), this._start(c), this._body.style.zIndex = "50", this._editor.addContentWidget(this);
	}
	updateEditor() {
		this._colorHover && this._standaloneColorPickerParticipant.updateEditorModel(this._colorHover);
	}
	getId() {
		return lk.ID;
	}
	getDomNode() {
		return this._body;
	}
	getPosition() {
		if (!this._position) return null;
		let e = this._editor.getOption(60).above;
		return {
			position: this._position,
			secondaryPosition: this._position,
			preference: e ? [1, 2] : [2, 1],
			positionAffinity: 2
		};
	}
	hide() {
		this.dispose(), this._standaloneColorPickerVisible.set(!1), this._standaloneColorPickerFocused.set(!1), this._editor.removeContentWidget(this), this._editor.focus();
	}
	focus() {
		this._standaloneColorPickerFocused.set(!0), this._body.focus();
	}
	async _start(e) {
		let t = await this._computeAsync(e);
		t && this._onResult.fire(new mk(t.result, t.foundInEditor));
	}
	async _computeAsync(e) {
		if (!this._editor.hasModel()) return null;
		let t = {
			range: e,
			color: {
				red: 0,
				green: 0,
				blue: 0,
				alpha: 1
			}
		}, n = await this._standaloneColorPickerParticipant.createColorHover(t, new oT(this._editorWorkerService), this._languageFeaturesService.colorProvider);
		return n ? {
			result: n.colorHover,
			foundInEditor: n.foundInEditor
		} : null;
	}
	_render(e, t) {
		let n = document.createDocumentFragment(), r = {
			fragment: n,
			statusBar: this._register(new zE(this._keybindingService)),
			onContentsChanged: () => {},
			hide: () => this.hide()
		};
		this._colorHover = e;
		let i = this._standaloneColorPickerParticipant.renderHoverParts(r, [e]);
		if (!i) return;
		this._register(i.disposables);
		let a = i.colorPicker;
		this._body.classList.add("standalone-colorpicker-body"), this._body.style.maxHeight = Math.max(this._editor.getLayoutInfo().height / 4, 250) + "px", this._body.style.maxWidth = Math.max(this._editor.getLayoutInfo().width * .66, 500) + "px", this._body.tabIndex = 0, this._body.appendChild(n), a.layout();
		let o = a.body, s = o.saturationBox.domNode.clientWidth, c = o.domNode.clientWidth - s - fk - dk, l = a.body.enterButton;
		l?.onClicked(() => {
			this.updateEditor(), this.hide();
		});
		let u = a.header, d = u.pickedColorNode;
		d.style.width = s + dk + "px";
		let f = u.originalColorNode;
		f.style.width = c + "px", a.header.closeButton?.onClicked(() => {
			this.hide();
		}), t && (l && (l.button.textContent = "Replace"), this._selectionSetInEditor = !0, this._editor.setSelection(e.range)), this._editor.layoutContentWidget(this);
	}
};
pk = lk = ok([
	sk(3, P),
	sk(4, ft),
	sk(5, M),
	sk(6, Oe)
], pk);
var mk = class {
	constructor(e, t) {
		this.value = e, this.foundInEditor = t;
	}
}, hk = class extends ot {
	constructor() {
		super({
			id: "editor.action.showOrFocusStandaloneColorPicker",
			title: {
				...H("showOrFocusStandaloneColorPicker", "Show or Focus Standalone Color Picker"),
				mnemonicTitle: B({
					key: "mishowOrFocusStandaloneColorPicker",
					comment: ["&& denotes a mnemonic"]
				}, "&&Show or Focus Standalone Color Picker")
			},
			precondition: void 0,
			menu: [{ id: F.CommandPalette }],
			metadata: { description: H("showOrFocusStandaloneColorPickerDescription", "Show or focus a standalone color picker which uses the default color provider. It displays hex/rgb/hsl colors.") }
		});
	}
	runEditorCommand(e, t) {
		uk.get(t)?.showOrFocus();
	}
}, gk = class extends O {
	constructor() {
		super({
			id: "editor.action.hideColorPicker",
			label: B({
				key: "hideColorPicker",
				comment: ["Action that hides the color picker"]
			}, "Hide the Color Picker"),
			alias: "Hide the Color Picker",
			precondition: I.standaloneColorPickerVisible.isEqualTo(!0),
			kbOpts: {
				primary: 9,
				weight: 100
			},
			metadata: { description: H("hideColorPickerDescription", "Hide the standalone color picker.") }
		});
	}
	run(e, t) {
		uk.get(t)?.hide();
	}
}, _k = class extends O {
	constructor() {
		super({
			id: "editor.action.insertColorWithStandaloneColorPicker",
			label: B({
				key: "insertColorWithStandaloneColorPicker",
				comment: ["Action that inserts color with standalone color picker"]
			}, "Insert Color with Standalone Color Picker"),
			alias: "Insert Color with Standalone Color Picker",
			precondition: I.standaloneColorPickerFocused.isEqualTo(!0),
			kbOpts: {
				primary: 3,
				weight: 100
			},
			metadata: { description: H("insertColorWithStandaloneColorPickerDescription", "Insert hex/rgb/hsl colors with the focused standalone color picker.") }
		});
	}
	run(e, t) {
		uk.get(t)?.insertColor();
	}
};
k(gk), k(_k), Fa(hk);
// ../../../node_modules/.pnpm/monaco-editor@0.52.2/node_modules/monaco-editor/esm/vs/editor/contrib/comment/browser/blockCommentCommand.js
var vk = class e {
	constructor(e, t, n) {
		this.languageConfigurationService = n, this._selection = e, this._insertSpace = t, this._usedEndToken = null;
	}
	static _haystackHasNeedleAtOffset(e, t, n) {
		if (n < 0) return !1;
		let r = t.length, i = e.length;
		if (n + r > i) return !1;
		for (let i = 0; i < r; i++) {
			let r = e.charCodeAt(n + i), a = t.charCodeAt(i);
			if (r !== a && !(r >= 65 && r <= 90 && r + 32 === a) && !(a >= 65 && a <= 90 && a + 32 === r)) return !1;
		}
		return !0;
	}
	_createOperationsForBlockComment(t, n, r, i, a, o) {
		let s = t.startLineNumber, c = t.startColumn, l = t.endLineNumber, u = t.endColumn, d = a.getLineContent(s), f = a.getLineContent(l), p = d.lastIndexOf(n, c - 1 + n.length), m = f.indexOf(r, u - 1 - r.length);
		if (p !== -1 && m !== -1) {
			if (s === l) d.substring(p + n.length, m).indexOf(r) >= 0 && (p = -1, m = -1);
			else {
				let e = d.substring(p + n.length), t = f.substring(0, m);
				(e.indexOf(r) >= 0 || t.indexOf(r) >= 0) && (p = -1, m = -1);
			}
		}
		let h;
		p !== -1 && m !== -1 ? (i && p + n.length < d.length && d.charCodeAt(p + n.length) === 32 && (n += " "), i && m > 0 && f.charCodeAt(m - 1) === 32 && (r = " " + r, --m), h = e._createRemoveBlockCommentOperations(new E(s, p + n.length + 1, l, m + 1), n, r)) : (h = e._createAddBlockCommentOperations(t, n, r, this._insertSpace), this._usedEndToken = h.length === 1 ? r : null);
		for (let e of h) o.addTrackedEditOperation(e.range, e.text);
	}
	static _createRemoveBlockCommentOperations(e, t, n) {
		let r = [];
		return E.isEmpty(e) ? r.push(fr.delete(new E(e.startLineNumber, e.startColumn - t.length, e.endLineNumber, e.endColumn + n.length))) : (r.push(fr.delete(new E(e.startLineNumber, e.startColumn - t.length, e.startLineNumber, e.startColumn))), r.push(fr.delete(new E(e.endLineNumber, e.endColumn, e.endLineNumber, e.endColumn + n.length)))), r;
	}
	static _createAddBlockCommentOperations(e, t, n, r) {
		let i = [];
		return E.isEmpty(e) ? i.push(fr.replace(new E(e.startLineNumber, e.startColumn, e.endLineNumber, e.endColumn), t + "  " + n)) : (i.push(fr.insert(new b(e.startLineNumber, e.startColumn), t + (r ? " " : ""))), i.push(fr.insert(new b(e.endLineNumber, e.endColumn), (r ? " " : "") + n))), i;
	}
	getEditOperations(e, t) {
		let n = this._selection.startLineNumber, r = this._selection.startColumn;
		e.tokenization.tokenizeIfCheap(n);
		let i = e.getLanguageIdAtPosition(n, r), a = this.languageConfigurationService.getLanguageConfiguration(i).comments;
		a && a.blockCommentStartToken && a.blockCommentEndToken && this._createOperationsForBlockComment(this._selection, a.blockCommentStartToken, a.blockCommentEndToken, this._insertSpace, e, t);
	}
	computeCursorState(e, t) {
		let n = t.getInverseEditOperations();
		if (n.length === 2) {
			let e = n[0], t = n[1];
			return new V(e.range.endLineNumber, e.range.endColumn, t.range.startLineNumber, t.range.startColumn);
		}
		{
			let e = n[0].range, t = this._usedEndToken ? -this._usedEndToken.length - 1 : 0;
			return new V(e.endLineNumber, e.endColumn + t, e.endLineNumber, e.endColumn + t);
		}
	}
}, yk = class e {
	constructor(e, t, n, r, i, a, o) {
		this.languageConfigurationService = e, this._selection = t, this._indentSize = n, this._type = r, this._insertSpace = i, this._selectionId = null, this._deltaColumn = 0, this._moveEndPositionDown = !1, this._ignoreEmptyLines = a, this._ignoreFirstLine = o || !1;
	}
	static _gatherPreflightCommentStrings(e, t, n, r) {
		e.tokenization.tokenizeIfCheap(t);
		let i = e.getLanguageIdAtPosition(t, 1), a = r.getLanguageConfiguration(i).comments, o = a ? a.lineCommentToken : null;
		if (!o) return null;
		let s = [];
		for (let e = 0, r = n - t + 1; e < r; e++) s[e] = {
			ignore: !1,
			commentStr: o,
			commentStrOffset: 0,
			commentStrLength: o.length
		};
		return s;
	}
	static _analyzeLines(e, t, n, r, i, a, o, s) {
		let c = !0, l;
		l = e === 0 || e !== 1;
		for (let s = 0, u = r.length; s < u; s++) {
			let u = r[s], d = i + s;
			if (d === i && o) {
				u.ignore = !0;
				continue;
			}
			let f = n.getLineContent(d), p = oi(f);
			if (p === -1) u.ignore = a, u.commentStrOffset = f.length;
			else if (c = !1, u.ignore = !1, u.commentStrOffset = p, l && !vk._haystackHasNeedleAtOffset(f, u.commentStr, p) && (e === 0 ? l = !1 : e === 1 || (u.ignore = !0)), l && t) {
				let e = p + u.commentStrLength;
				e < f.length && f.charCodeAt(e) === 32 && (u.commentStrLength += 1);
			}
		}
		if (e === 0 && c) {
			l = !1;
			for (let e = 0, t = r.length; e < t; e++) r[e].ignore = !1;
		}
		return {
			supported: !0,
			shouldRemoveComments: l,
			lines: r
		};
	}
	static _gatherPreflightData(t, n, r, i, a, o, s, c) {
		let l = e._gatherPreflightCommentStrings(r, i, a, c);
		return l === null ? { supported: !1 } : e._analyzeLines(t, n, r, l, i, o, s, c);
	}
	_executeLineComments(t, n, r, i) {
		let a;
		r.shouldRemoveComments ? a = e._createRemoveLineCommentsOperations(r.lines, i.startLineNumber) : (e._normalizeInsertionPoint(t, r.lines, i.startLineNumber, this._indentSize), a = this._createAddLineCommentsOperations(r.lines, i.startLineNumber));
		let o = new b(i.positionLineNumber, i.positionColumn);
		for (let e = 0, r = a.length; e < r; e++) n.addEditOperation(a[e].range, a[e].text), E.isEmpty(a[e].range) && E.getStartPosition(a[e].range).equals(o) && t.getLineContent(o.lineNumber).length + 1 === o.column && (this._deltaColumn = (a[e].text || "").length);
		this._selectionId = n.trackSelection(i);
	}
	_attemptRemoveBlockComment(e, t, n, r) {
		let i = t.startLineNumber, a = t.endLineNumber, o = r.length + Math.max(e.getLineFirstNonWhitespaceColumn(t.startLineNumber), t.startColumn), s = e.getLineContent(i).lastIndexOf(n, o - 1), c = e.getLineContent(a).indexOf(r, t.endColumn - 1 - n.length);
		return s !== -1 && c === -1 && (c = e.getLineContent(i).indexOf(r, s + n.length), a = i), s === -1 && c !== -1 && (s = e.getLineContent(a).lastIndexOf(n, c), i = a), t.isEmpty() && (s === -1 || c === -1) && (s = e.getLineContent(i).indexOf(n), s !== -1 && (c = e.getLineContent(i).indexOf(r, s + n.length))), s !== -1 && e.getLineContent(i).charCodeAt(s + n.length) === 32 && (n += " "), c !== -1 && e.getLineContent(a).charCodeAt(c - 1) === 32 && (r = " " + r, --c), s !== -1 && c !== -1 ? vk._createRemoveBlockCommentOperations(new E(i, s + n.length + 1, a, c + 1), n, r) : null;
	}
	_executeBlockComment(e, t, n) {
		e.tokenization.tokenizeIfCheap(n.startLineNumber);
		let r = e.getLanguageIdAtPosition(n.startLineNumber, 1), i = this.languageConfigurationService.getLanguageConfiguration(r).comments;
		if (!i || !i.blockCommentStartToken || !i.blockCommentEndToken) return;
		let a = i.blockCommentStartToken, o = i.blockCommentEndToken, s = this._attemptRemoveBlockComment(e, n, a, o);
		if (!s) {
			if (n.isEmpty()) {
				let t = e.getLineContent(n.startLineNumber), r = oi(t);
				r === -1 && (r = t.length), s = vk._createAddBlockCommentOperations(new E(n.startLineNumber, r + 1, n.startLineNumber, t.length + 1), a, o, this._insertSpace);
			} else s = vk._createAddBlockCommentOperations(new E(n.startLineNumber, e.getLineFirstNonWhitespaceColumn(n.startLineNumber), n.endLineNumber, e.getLineMaxColumn(n.endLineNumber)), a, o, this._insertSpace);
			s.length === 1 && (this._deltaColumn = a.length + 1);
		}
		this._selectionId = t.trackSelection(n);
		for (let e of s) t.addEditOperation(e.range, e.text);
	}
	getEditOperations(t, n) {
		let r = this._selection;
		if (this._moveEndPositionDown = !1, r.startLineNumber === r.endLineNumber && this._ignoreFirstLine) {
			n.addEditOperation(new E(r.startLineNumber, t.getLineMaxColumn(r.startLineNumber), r.startLineNumber + 1, 1), r.startLineNumber === t.getLineCount() ? "" : "\n"), this._selectionId = n.trackSelection(r);
			return;
		}
		r.startLineNumber < r.endLineNumber && r.endColumn === 1 && (this._moveEndPositionDown = !0, r = r.setEndPosition(r.endLineNumber - 1, t.getLineMaxColumn(r.endLineNumber - 1)));
		let i = e._gatherPreflightData(this._type, this._insertSpace, t, r.startLineNumber, r.endLineNumber, this._ignoreEmptyLines, this._ignoreFirstLine, this.languageConfigurationService);
		return i.supported ? this._executeLineComments(t, n, i, r) : this._executeBlockComment(t, n, r);
	}
	computeCursorState(e, t) {
		let n = t.getTrackedSelection(this._selectionId);
		return this._moveEndPositionDown && (n = n.setEndPosition(n.endLineNumber + 1, 1)), new V(n.selectionStartLineNumber, n.selectionStartColumn + this._deltaColumn, n.positionLineNumber, n.positionColumn + this._deltaColumn);
	}
	static _createRemoveLineCommentsOperations(e, t) {
		let n = [];
		for (let r = 0, i = e.length; r < i; r++) {
			let i = e[r];
			i.ignore || n.push(fr.delete(new E(t + r, i.commentStrOffset + 1, t + r, i.commentStrOffset + i.commentStrLength + 1)));
		}
		return n;
	}
	_createAddLineCommentsOperations(e, t) {
		let n = [], r = this._insertSpace ? " " : "";
		for (let i = 0, a = e.length; i < a; i++) {
			let a = e[i];
			a.ignore || n.push(fr.insert(new b(t + i, a.commentStrOffset + 1), a.commentStr + r));
		}
		return n;
	}
	static nextVisibleColumn(e, t, n, r) {
		return n ? e + (t - e % t) : e + r;
	}
	static _normalizeInsertionPoint(t, n, r, i) {
		let a = 1073741824, o, s;
		for (let o = 0, s = n.length; o < s; o++) {
			if (n[o].ignore) continue;
			let s = t.getLineContent(r + o), c = 0;
			for (let t = 0, r = n[o].commentStrOffset; c < a && t < r; t++) c = e.nextVisibleColumn(c, i, s.charCodeAt(t) === 9, 1);
			c < a && (a = c);
		}
		a = Math.floor(a / i) * i;
		for (let c = 0, l = n.length; c < l; c++) {
			if (n[c].ignore) continue;
			let l = t.getLineContent(r + c), u = 0;
			for (o = 0, s = n[c].commentStrOffset; u < a && o < s; o++) u = e.nextVisibleColumn(u, i, l.charCodeAt(o) === 9, 1);
			u > a ? n[c].commentStrOffset = o - 1 : n[c].commentStrOffset = o;
		}
	}
}, bk = class extends O {
	constructor(e, t) {
		super(t), this._type = e;
	}
	run(e, t) {
		let n = e.get(Tn);
		if (!t.hasModel()) return;
		let r = t.getModel(), i = [], a = r.getOptions(), o = t.getOption(23), s = t.getSelections().map((e, t) => ({
			selection: e,
			index: t,
			ignoreFirstLine: !1
		}));
		s.sort((e, t) => E.compareRangesUsingStarts(e.selection, t.selection));
		let c = s[0];
		for (let e = 1; e < s.length; e++) {
			let t = s[e];
			c.selection.endLineNumber === t.selection.startLineNumber && (c.index < t.index ? t.ignoreFirstLine = !0 : (c.ignoreFirstLine = !0, c = t));
		}
		for (let e of s) i.push(new yk(n, e.selection, a.indentSize, this._type, o.insertSpace, o.ignoreEmptyLines, e.ignoreFirstLine));
		t.pushUndoStop(), t.executeCommands(this.id, i), t.pushUndoStop();
	}
}, xk = class extends bk {
	constructor() {
		super(0, {
			id: "editor.action.commentLine",
			label: B("comment.line", "Toggle Line Comment"),
			alias: "Toggle Line Comment",
			precondition: I.writable,
			kbOpts: {
				kbExpr: I.editorTextFocus,
				primary: 2138,
				weight: 100
			},
			menuOpts: {
				menuId: F.MenubarEditMenu,
				group: "5_insert",
				title: B({
					key: "miToggleLineComment",
					comment: ["&& denotes a mnemonic"]
				}, "&&Toggle Line Comment"),
				order: 1
			}
		});
	}
}, Sk = class extends bk {
	constructor() {
		super(1, {
			id: "editor.action.addCommentLine",
			label: B("comment.line.add", "Add Line Comment"),
			alias: "Add Line Comment",
			precondition: I.writable,
			kbOpts: {
				kbExpr: I.editorTextFocus,
				primary: Ro(2089, 2081),
				weight: 100
			}
		});
	}
}, Ck = class extends bk {
	constructor() {
		super(2, {
			id: "editor.action.removeCommentLine",
			label: B("comment.line.remove", "Remove Line Comment"),
			alias: "Remove Line Comment",
			precondition: I.writable,
			kbOpts: {
				kbExpr: I.editorTextFocus,
				primary: Ro(2089, 2099),
				weight: 100
			}
		});
	}
}, wk = class extends O {
	constructor() {
		super({
			id: "editor.action.blockComment",
			label: B("comment.block", "Toggle Block Comment"),
			alias: "Toggle Block Comment",
			precondition: I.writable,
			kbOpts: {
				kbExpr: I.editorTextFocus,
				primary: 1567,
				linux: { primary: 3103 },
				weight: 100
			},
			menuOpts: {
				menuId: F.MenubarEditMenu,
				group: "5_insert",
				title: B({
					key: "miToggleBlockComment",
					comment: ["&& denotes a mnemonic"]
				}, "Toggle &&Block Comment"),
				order: 2
			}
		});
	}
	run(e, t) {
		let n = e.get(Tn);
		if (!t.hasModel()) return;
		let r = t.getOption(23), i = [], a = t.getSelections();
		for (let e of a) i.push(new vk(e, r.insertSpace, n));
		t.pushUndoStop(), t.executeCommands(this.id, i), t.pushUndoStop();
	}
};
k(xk), k(Sk), k(Ck), k(wk);
// ../../../node_modules/.pnpm/monaco-editor@0.52.2/node_modules/monaco-editor/esm/vs/editor/contrib/contextmenu/browser/contextmenu.js
var Tk = function(e, t, n, r) {
	var i = arguments.length, a = i < 3 ? t : r === null ? r = Object.getOwnPropertyDescriptor(t, n) : r, o;
	if (typeof Reflect == "object" && typeof Reflect.decorate == "function") a = Reflect.decorate(e, t, n, r);
	else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (i < 3 ? o(a) : i > 3 ? o(t, n, a) : o(t, n)) || a);
	return i > 3 && a && Object.defineProperty(t, n, a), a;
}, Ek = function(e, t) {
	return function(n, r) {
		t(n, r, e);
	};
}, Dk, Ok = class {
	static {
		Dk = this;
	}
	static {
		this.ID = "editor.contrib.contextmenu";
	}
	static get(e) {
		return e.getContribution(Dk.ID);
	}
	constructor(e, t, n, r, i, a, o, s) {
		this._contextMenuService = t, this._contextViewService = n, this._contextKeyService = r, this._keybindingService = i, this._menuService = a, this._configurationService = o, this._workspaceContextService = s, this._toDispose = new g(), this._contextMenuIsBeingShownCount = 0, this._editor = e, this._toDispose.add(this._editor.onContextMenu((e) => this._onContextMenu(e))), this._toDispose.add(this._editor.onMouseWheel((e) => {
			if (this._contextMenuIsBeingShownCount > 0) {
				let t = this._contextViewService.getContextViewElement(), n = e.srcElement;
				n.shadowRoot && rr(t) === n.shadowRoot || this._contextViewService.hideContextView();
			}
		})), this._toDispose.add(this._editor.onKeyDown((e) => {
			this._editor.getOption(24) && e.keyCode === 58 && (e.preventDefault(), e.stopPropagation(), this.showContextMenu());
		}));
	}
	_onContextMenu(e) {
		if (!this._editor.hasModel()) return;
		if (!this._editor.getOption(24)) {
			this._editor.focus(), e.target.position && !this._editor.getSelection().containsPosition(e.target.position) && this._editor.setPosition(e.target.position);
			return;
		}
		if (e.target.type === 12 || e.target.type === 6 && e.target.detail.injectedText) return;
		if (e.event.preventDefault(), e.event.stopPropagation(), e.target.type === 11) return this._showScrollbarContextMenu(e.event);
		if (e.target.type !== 6 && e.target.type !== 7 && e.target.type !== 1) return;
		if (this._editor.focus(), e.target.position) {
			let t = !1;
			for (let n of this._editor.getSelections()) if (n.containsPosition(e.target.position)) {
				t = !0;
				break;
			}
			t || this._editor.setPosition(e.target.position);
		}
		let t = null;
		e.target.type !== 1 && (t = e.event), this.showContextMenu(t);
	}
	showContextMenu(e) {
		if (!this._editor.getOption(24) || !this._editor.hasModel()) return;
		let t = this._getMenuActions(this._editor.getModel(), this._editor.contextMenuId);
		t.length > 0 && this._doShowContextMenu(t, e);
	}
	_getMenuActions(e, t) {
		let n = [], r = this._menuService.getMenuActions(t, this._contextKeyService, { arg: e.uri });
		for (let t of r) {
			let [, r] = t, i = 0;
			for (let t of r) if (t instanceof cs) {
				let r = this._getMenuActions(e, t.item.submenu);
				r.length > 0 && (n.push(new ol(t.id, t.label, r)), i++);
			} else n.push(t), i++;
			i && n.push(new xe());
		}
		return n.length && n.pop(), n;
	}
	_doShowContextMenu(e, t = null) {
		if (!this._editor.hasModel()) return;
		let n = this._editor.getOption(60);
		this._editor.updateOptions({ hover: { enabled: !1 } });
		let r = t;
		if (!r) {
			this._editor.revealPosition(this._editor.getPosition(), 1), this._editor.render();
			let e = this._editor.getScrolledVisiblePosition(this._editor.getPosition()), t = Bi(this._editor.getDomNode());
			r = {
				x: t.left + e.left,
				y: t.top + e.top + e.height
			};
		}
		let i = this._editor.getOption(128) && !Uc;
		this._contextMenuIsBeingShownCount++, this._contextMenuService.showContextMenu({
			domForShadowRoot: i ? this._editor.getOverflowWidgetsDomNode() ?? this._editor.getDomNode() : void 0,
			getAnchor: () => r,
			getActions: () => e,
			getActionViewItem: (e) => {
				let t = this._keybindingFor(e);
				if (t) return new Qr(e, e, {
					label: !0,
					keybinding: t.getLabel(),
					isMenu: !0
				});
				let n = e;
				return typeof n.getActionViewItem == "function" ? n.getActionViewItem() : new Qr(e, e, {
					icon: !0,
					label: !0,
					isMenu: !0
				});
			},
			getKeyBinding: (e) => this._keybindingFor(e),
			onHide: (e) => {
				this._contextMenuIsBeingShownCount--, this._editor.updateOptions({ hover: n });
			}
		});
	}
	_showScrollbarContextMenu(e) {
		if (!this._editor.hasModel() || Vo(this._workspaceContextService.getWorkspace())) return;
		let t = this._editor.getOption(73), n = 0, r = (e) => ({
			id: `menu-action-${++n}`,
			label: e.label,
			tooltip: "",
			class: void 0,
			enabled: e.enabled === void 0 || e.enabled,
			checked: e.checked,
			run: e.run
		}), i = (e, t) => new ol(`menu-action-${++n}`, e, t, void 0), a = (e, t, n, a, o) => {
			if (!t) return r({
				label: e,
				enabled: t,
				run: () => {}
			});
			let s = (e) => () => {
				this._configurationService.updateValue(n, e);
			}, c = [];
			for (let e of o) c.push(r({
				label: e.label,
				checked: a === e.value,
				run: s(e.value)
			}));
			return i(e, c);
		}, o = [];
		o.push(r({
			label: B("context.minimap.minimap", "Minimap"),
			checked: t.enabled,
			run: () => {
				this._configurationService.updateValue("editor.minimap.enabled", !t.enabled);
			}
		})), o.push(new xe()), o.push(r({
			label: B("context.minimap.renderCharacters", "Render Characters"),
			enabled: t.enabled,
			checked: t.renderCharacters,
			run: () => {
				this._configurationService.updateValue("editor.minimap.renderCharacters", !t.renderCharacters);
			}
		})), o.push(a(B("context.minimap.size", "Vertical size"), t.enabled, "editor.minimap.size", t.size, [
			{
				label: B("context.minimap.size.proportional", "Proportional"),
				value: "proportional"
			},
			{
				label: B("context.minimap.size.fill", "Fill"),
				value: "fill"
			},
			{
				label: B("context.minimap.size.fit", "Fit"),
				value: "fit"
			}
		])), o.push(a(B("context.minimap.slider", "Slider"), t.enabled, "editor.minimap.showSlider", t.showSlider, [{
			label: B("context.minimap.slider.mouseover", "Mouse Over"),
			value: "mouseover"
		}, {
			label: B("context.minimap.slider.always", "Always"),
			value: "always"
		}]));
		let s = this._editor.getOption(128) && !Uc;
		this._contextMenuIsBeingShownCount++, this._contextMenuService.showContextMenu({
			domForShadowRoot: s ? this._editor.getDomNode() : void 0,
			getAnchor: () => e,
			getActions: () => o,
			onHide: (e) => {
				this._contextMenuIsBeingShownCount--, this._editor.focus();
			}
		});
	}
	_keybindingFor(e) {
		return this._keybindingService.lookupKeybinding(e.id);
	}
	dispose() {
		this._contextMenuIsBeingShownCount > 0 && this._contextViewService.hideContextView(), this._toDispose.dispose();
	}
};
Ok = Dk = Tk([
	Ek(1, Br),
	Ek(2, si),
	Ek(3, j),
	Ek(4, ft),
	Ek(5, aa),
	Ek(6, Fl),
	Ek(7, Ae)
], Ok);
var kk = class extends O {
	constructor() {
		super({
			id: "editor.action.showContextMenu",
			label: B("action.showContextMenu.label", "Show Editor Context Menu"),
			alias: "Show Editor Context Menu",
			precondition: void 0,
			kbOpts: {
				kbExpr: I.textInputFocus,
				primary: 1092,
				weight: 100
			}
		});
	}
	run(e, t) {
		Ok.get(t)?.showContextMenu();
	}
};
T(Ok.ID, Ok, 2), k(kk);
// ../../../node_modules/.pnpm/monaco-editor@0.52.2/node_modules/monaco-editor/esm/vs/editor/contrib/cursorUndo/browser/cursorUndo.js
var Ak = class {
	constructor(e) {
		this.selections = e;
	}
	equals(e) {
		let t = this.selections.length;
		if (t !== e.selections.length) return !1;
		for (let n = 0; n < t; n++) if (!this.selections[n].equalsSelection(e.selections[n])) return !1;
		return !0;
	}
}, jk = class {
	constructor(e, t, n) {
		this.cursorState = e, this.scrollTop = t, this.scrollLeft = n;
	}
}, Mk = class e extends U {
	static {
		this.ID = "editor.contrib.cursorUndoRedoController";
	}
	static get(t) {
		return t.getContribution(e.ID);
	}
	constructor(e) {
		super(), this._editor = e, this._isCursorUndoRedo = !1, this._undoStack = [], this._redoStack = [], this._register(e.onDidChangeModel((e) => {
			this._undoStack = [], this._redoStack = [];
		})), this._register(e.onDidChangeModelContent((e) => {
			this._undoStack = [], this._redoStack = [];
		})), this._register(e.onDidChangeCursorSelection((t) => {
			if (this._isCursorUndoRedo || !t.oldSelections || t.oldModelVersionId !== t.modelVersionId) return;
			let n = new Ak(t.oldSelections);
			this._undoStack.length > 0 && this._undoStack[this._undoStack.length - 1].cursorState.equals(n) || (this._undoStack.push(new jk(n, e.getScrollTop(), e.getScrollLeft())), this._redoStack = [], this._undoStack.length > 50 && this._undoStack.shift());
		}));
	}
	cursorUndo() {
		this._editor.hasModel() && this._undoStack.length !== 0 && (this._redoStack.push(new jk(new Ak(this._editor.getSelections()), this._editor.getScrollTop(), this._editor.getScrollLeft())), this._applyState(this._undoStack.pop()));
	}
	cursorRedo() {
		this._editor.hasModel() && this._redoStack.length !== 0 && (this._undoStack.push(new jk(new Ak(this._editor.getSelections()), this._editor.getScrollTop(), this._editor.getScrollLeft())), this._applyState(this._redoStack.pop()));
	}
	_applyState(e) {
		this._isCursorUndoRedo = !0, this._editor.setSelections(e.cursorState.selections), this._editor.setScrollPosition({
			scrollTop: e.scrollTop,
			scrollLeft: e.scrollLeft
		}), this._isCursorUndoRedo = !1;
	}
}, Nk = class extends O {
	constructor() {
		super({
			id: "cursorUndo",
			label: B("cursor.undo", "Cursor Undo"),
			alias: "Cursor Undo",
			precondition: void 0,
			kbOpts: {
				kbExpr: I.textInputFocus,
				primary: 2099,
				weight: 100
			}
		});
	}
	run(e, t, n) {
		Mk.get(t)?.cursorUndo();
	}
}, Pk = class extends O {
	constructor() {
		super({
			id: "cursorRedo",
			label: B("cursor.redo", "Cursor Redo"),
			alias: "Cursor Redo",
			precondition: void 0
		});
	}
	run(e, t, n) {
		Mk.get(t)?.cursorRedo();
	}
};
T(Mk.ID, Mk, 0), k(Nk), k(Pk);
// ../../../node_modules/.pnpm/monaco-editor@0.52.2/node_modules/monaco-editor/esm/vs/editor/contrib/dnd/browser/dragAndDropCommand.js
var Fk = class {
	constructor(e, t, n) {
		this.selection = e, this.targetPosition = t, this.copy = n, this.targetSelection = null;
	}
	getEditOperations(e, t) {
		let n = e.getValueInRange(this.selection);
		this.copy || t.addEditOperation(this.selection, null), t.addEditOperation(new E(this.targetPosition.lineNumber, this.targetPosition.column, this.targetPosition.lineNumber, this.targetPosition.column), n), this.targetSelection = this.selection.containsPosition(this.targetPosition) && !(this.copy && (this.selection.getEndPosition().equals(this.targetPosition) || this.selection.getStartPosition().equals(this.targetPosition))) ? this.selection : this.copy ? new V(this.targetPosition.lineNumber, this.targetPosition.column, this.selection.endLineNumber - this.selection.startLineNumber + this.targetPosition.lineNumber, this.selection.startLineNumber === this.selection.endLineNumber ? this.targetPosition.column + this.selection.endColumn - this.selection.startColumn : this.selection.endColumn) : this.targetPosition.lineNumber > this.selection.endLineNumber ? new V(this.targetPosition.lineNumber - this.selection.endLineNumber + this.selection.startLineNumber, this.targetPosition.column, this.targetPosition.lineNumber, this.selection.startLineNumber === this.selection.endLineNumber ? this.targetPosition.column + this.selection.endColumn - this.selection.startColumn : this.selection.endColumn) : this.targetPosition.lineNumber < this.selection.endLineNumber ? new V(this.targetPosition.lineNumber, this.targetPosition.column, this.targetPosition.lineNumber + this.selection.endLineNumber - this.selection.startLineNumber, this.selection.startLineNumber === this.selection.endLineNumber ? this.targetPosition.column + this.selection.endColumn - this.selection.startColumn : this.selection.endColumn) : this.selection.endColumn <= this.targetPosition.column ? new V(this.targetPosition.lineNumber - this.selection.endLineNumber + this.selection.startLineNumber, (this.selection.startLineNumber, this.selection.endLineNumber, this.targetPosition.column - this.selection.endColumn + this.selection.startColumn), this.targetPosition.lineNumber, this.selection.startLineNumber === this.selection.endLineNumber ? this.targetPosition.column : this.selection.endColumn) : new V(this.targetPosition.lineNumber - this.selection.endLineNumber + this.selection.startLineNumber, this.targetPosition.column, this.targetPosition.lineNumber, this.targetPosition.column + this.selection.endColumn - this.selection.startColumn);
	}
	computeCursorState(e, t) {
		return this.targetSelection;
	}
};
// ../../../node_modules/.pnpm/monaco-editor@0.52.2/node_modules/monaco-editor/esm/vs/editor/contrib/dnd/browser/dnd.js
function Ik(e) {
	return Xs ? e.altKey : e.ctrlKey;
}
var Lk = class e extends U {
	static {
		this.ID = "editor.contrib.dragAndDrop";
	}
	static {
		this.TRIGGER_KEY_VALUE = Xs ? 6 : 5;
	}
	constructor(e) {
		super(), this._editor = e, this._dndDecorationIds = this._editor.createDecorationsCollection(), this._register(this._editor.onMouseDown((e) => this._onEditorMouseDown(e))), this._register(this._editor.onMouseUp((e) => this._onEditorMouseUp(e))), this._register(this._editor.onMouseDrag((e) => this._onEditorMouseDrag(e))), this._register(this._editor.onMouseDrop((e) => this._onEditorMouseDrop(e))), this._register(this._editor.onMouseDropCanceled(() => this._onEditorMouseDropCanceled())), this._register(this._editor.onKeyDown((e) => this.onEditorKeyDown(e))), this._register(this._editor.onKeyUp((e) => this.onEditorKeyUp(e))), this._register(this._editor.onDidBlurEditorWidget(() => this.onEditorBlur())), this._register(this._editor.onDidBlurEditorText(() => this.onEditorBlur())), this._mouseDown = !1, this._modifierPressed = !1, this._dragSelection = null;
	}
	onEditorBlur() {
		this._removeDecoration(), this._dragSelection = null, this._mouseDown = !1, this._modifierPressed = !1;
	}
	onEditorKeyDown(e) {
		this._editor.getOption(35) && !this._editor.getOption(22) && (Ik(e) && (this._modifierPressed = !0), this._mouseDown && Ik(e) && this._editor.updateOptions({ mouseStyle: "copy" }));
	}
	onEditorKeyUp(t) {
		this._editor.getOption(35) && !this._editor.getOption(22) && (Ik(t) && (this._modifierPressed = !1), this._mouseDown && t.keyCode === e.TRIGGER_KEY_VALUE && this._editor.updateOptions({ mouseStyle: "default" }));
	}
	_onEditorMouseDown(e) {
		this._mouseDown = !0;
	}
	_onEditorMouseUp(e) {
		this._mouseDown = !1, this._editor.updateOptions({ mouseStyle: "text" });
	}
	_onEditorMouseDrag(e) {
		let t = e.target;
		if (this._dragSelection === null) {
			let e = (this._editor.getSelections() || []).filter((e) => t.position && e.containsPosition(t.position));
			if (e.length === 1) this._dragSelection = e[0];
			else return;
		}
		Ik(e.event) ? this._editor.updateOptions({ mouseStyle: "copy" }) : this._editor.updateOptions({ mouseStyle: "default" }), t.position && (this._dragSelection.containsPosition(t.position) ? this._removeDecoration() : this.showAt(t.position));
	}
	_onEditorMouseDropCanceled() {
		this._editor.updateOptions({ mouseStyle: "text" }), this._removeDecoration(), this._dragSelection = null, this._mouseDown = !1;
	}
	_onEditorMouseDrop(t) {
		if (t.target && (this._hitContent(t.target) || this._hitMargin(t.target)) && t.target.position) {
			let n = new b(t.target.position.lineNumber, t.target.position.column);
			if (this._dragSelection === null) {
				let e = null;
				if (t.event.shiftKey) {
					let t = this._editor.getSelection();
					if (t) {
						let { selectionStartLineNumber: r, selectionStartColumn: i } = t;
						e = [new V(r, i, n.lineNumber, n.column)];
					}
				} else e = (this._editor.getSelections() || []).map((e) => e.containsPosition(n) ? new V(n.lineNumber, n.column, n.lineNumber, n.column) : e);
				this._editor.setSelections(e || [], "mouse", 3);
			} else (!this._dragSelection.containsPosition(n) || (Ik(t.event) || this._modifierPressed) && (this._dragSelection.getEndPosition().equals(n) || this._dragSelection.getStartPosition().equals(n))) && (this._editor.pushUndoStop(), this._editor.executeCommand(e.ID, new Fk(this._dragSelection, n, Ik(t.event) || this._modifierPressed)), this._editor.pushUndoStop());
		}
		this._editor.updateOptions({ mouseStyle: "text" }), this._removeDecoration(), this._dragSelection = null, this._mouseDown = !1;
	}
	static {
		this._DECORATION_OPTIONS = L.register({
			description: "dnd-target",
			className: "dnd-target"
		});
	}
	showAt(t) {
		this._dndDecorationIds.set([{
			range: new E(t.lineNumber, t.column, t.lineNumber, t.column),
			options: e._DECORATION_OPTIONS
		}]), this._editor.revealPosition(t, 1);
	}
	_removeDecoration() {
		this._dndDecorationIds.clear();
	}
	_hitContent(e) {
		return e.type === 6 || e.type === 7;
	}
	_hitMargin(e) {
		return e.type === 2 || e.type === 3 || e.type === 4;
	}
	dispose() {
		this._removeDecoration(), this._dragSelection = null, this._mouseDown = !1, this._modifierPressed = !1, super.dispose();
	}
};
T(Lk.ID, Lk, 2), T(lC.ID, lC, 0), He(SS), A(new class extends qt {
	constructor() {
		super({
			id: oC,
			precondition: sC,
			kbOpts: {
				weight: 100,
				primary: 2137
			}
		});
	}
	runEditorCommand(e, t) {
		return lC.get(t)?.changePasteType();
	}
}()), A(new class extends qt {
	constructor() {
		super({
			id: "editor.hidePasteWidget",
			precondition: sC,
			kbOpts: {
				weight: 100,
				primary: 9
			}
		});
	}
	runEditorCommand(e, t) {
		lC.get(t)?.clearWidgets();
	}
}()), k(class e extends O {
	static {
		this.argsSchema = {
			type: "object",
			properties: { kind: {
				type: "string",
				description: B("pasteAs.kind", "The kind of the paste edit to try applying. If not provided or there are multiple edits for this kind, the editor will show a picker.")
			} }
		};
	}
	constructor() {
		super({
			id: "editor.action.pasteAs",
			label: B("pasteAs", "Paste As..."),
			alias: "Paste As...",
			precondition: I.writable,
			metadata: {
				description: "Paste as",
				args: [{
					name: "args",
					schema: e.argsSchema
				}]
			}
		});
	}
	run(e, t, n) {
		let r = typeof n?.kind == "string" ? n.kind : void 0;
		return !r && n && (r = typeof n.id == "string" ? n.id : void 0), lC.get(t)?.pasteAs(r ? new aS(r) : void 0);
	}
}), k(class extends O {
	constructor() {
		super({
			id: "editor.action.pasteAsText",
			label: B("pasteAsText", "Paste as Text"),
			alias: "Paste as Text",
			precondition: I.writable
		});
	}
	run(e, t) {
		return lC.get(t)?.pasteAs({ providerId: gS.id });
	}
});
// ../../../node_modules/.pnpm/monaco-editor@0.52.2/node_modules/monaco-editor/esm/vs/editor/common/services/treeViewsDnd.js
var Rk = class {
	constructor() {
		this._dragOperations = /* @__PURE__ */ new Map();
	}
	removeDragOperationTransfer(e) {
		if (e && this._dragOperations.has(e)) {
			let t = this._dragOperations.get(e);
			return this._dragOperations.delete(e), t;
		}
	}
}, zk = class {
	constructor(e) {
		this.identifier = e;
	}
}, Bk = ne("treeViewsDndService");
rn(Bk, Rk, 1);
// ../../../node_modules/.pnpm/monaco-editor@0.52.2/node_modules/monaco-editor/esm/vs/editor/contrib/dropOrPasteInto/browser/dropIntoEditorController.js
var Vk = function(e, t, n, r) {
	var i = arguments.length, a = i < 3 ? t : r === null ? r = Object.getOwnPropertyDescriptor(t, n) : r, o;
	if (typeof Reflect == "object" && typeof Reflect.decorate == "function") a = Reflect.decorate(e, t, n, r);
	else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (i < 3 ? o(a) : i > 3 ? o(t, n, a) : o(t, n)) || a);
	return i > 3 && a && Object.defineProperty(t, n, a), a;
}, Hk = function(e, t) {
	return function(n, r) {
		t(n, r, e);
	};
}, Uk, Wk = "editor.experimental.dropIntoEditor.defaultProvider", Gk = "editor.changeDropType", Kk = new z("dropWidgetVisible", !1, B("dropWidgetVisible", "Whether the drop widget is showing")), qk = class extends U {
	static {
		Uk = this;
	}
	static {
		this.ID = "editor.contrib.dropIntoEditorController";
	}
	static get(e) {
		return e.getContribution(Uk.ID);
	}
	constructor(e, t, n, r, i) {
		super(), this._configService = n, this._languageFeaturesService = r, this._treeViewsDragAndDropService = i, this.treeItemsTransfer = cS.getInstance(), this._dropProgressManager = this._register(t.createInstance(VS, "dropIntoEditor", e)), this._postDropWidgetManager = this._register(t.createInstance(nC, "dropIntoEditor", e, Kk, {
			id: Gk,
			label: B("postDropWidgetTitle", "Show drop options...")
		})), this._register(e.onDropIntoEditor((t) => this.onDropIntoEditor(e, t.position, t.event)));
	}
	clearWidgets() {
		this._postDropWidgetManager.clear();
	}
	changeDropType() {
		this._postDropWidgetManager.tryShowSelector();
	}
	async onDropIntoEditor(e, t, n) {
		if (!n.dataTransfer || !e.hasModel()) return;
		this._currentOperation?.cancel(), e.focus(), e.setPosition(t);
		let r = Te(async (i) => {
			let a = new g(), o = a.add(new $c(e, 1, void 0, i));
			try {
				let r = await this.extractDataTransferData(n);
				if (r.size === 0 || o.token.isCancellationRequested) return;
				let s = e.getModel();
				if (!s) return;
				let c = this._languageFeaturesService.documentDropEditProvider.ordered(s).filter((e) => !e.dropMimeTypes || e.dropMimeTypes.some((e) => r.matches(e))), l = a.add(await this.getDropEdits(c, s, t, r, o));
				if (o.token.isCancellationRequested) return;
				if (l.edits.length) {
					let n = this.getInitialActiveEditIndex(s, l.edits), r = e.getOption(36).showDropSelector === "afterDrop";
					await this._postDropWidgetManager.applyEditAndShowIfNeeded([E.fromPositions(t)], {
						activeEditIndex: n,
						allEdits: l.edits
					}, r, async (e) => e, i);
				}
			} finally {
				a.dispose(), this._currentOperation === r && (this._currentOperation = void 0);
			}
		});
		this._dropProgressManager.showWhile(t, B("dropIntoEditorProgress", "Running drop handlers. Click to cancel"), r, { cancel: () => r.cancel() }), this._currentOperation = r;
	}
	async getDropEdits(e, t, n, r, i) {
		let a = new g(), o = await f(Promise.all(e.map(async (e) => {
			try {
				let o = await e.provideDocumentDropEdits(t, n, r, i.token);
				return o && a.add(o), o?.edits.map((t) => ({
					...t,
					providerId: e.id
				}));
			} catch (e) {
				console.error(e);
			}
		})), i.token);
		return {
			edits: IS(On(o ?? []).flat()),
			dispose: () => a.dispose()
		};
	}
	getInitialActiveEditIndex(e, t) {
		let n = this._configService.getValue(Wk, { resource: e.uri });
		for (let [e, r] of Object.entries(n)) {
			let n = new aS(r), i = t.findIndex((t) => n.value === t.providerId && t.handledMimeType && nS(e, [t.handledMimeType]));
			if (i >= 0) return i;
		}
		return 0;
	}
	async extractDataTransferData(e) {
		if (!e.dataTransfer) return new eS();
		let t = fS(e.dataTransfer);
		if (this.treeItemsTransfer.hasData(zk.prototype)) {
			let e = this.treeItemsTransfer.getData(zk.prototype);
			if (Array.isArray(e)) for (let n of e) {
				let e = await this._treeViewsDragAndDropService.removeDragOperationTransfer(n.identifier);
				if (e) for (let [n, r] of e) t.replace(n, r);
			}
		}
		return t;
	}
};
qk = Uk = Vk([
	Hk(1, P),
	Hk(2, Fl),
	Hk(3, M),
	Hk(4, Bk)
], qk), T(qk.ID, qk, 2), He(xS), A(new class extends qt {
	constructor() {
		super({
			id: Gk,
			precondition: Kk,
			kbOpts: {
				weight: 100,
				primary: 2137
			}
		});
	}
	runEditorCommand(e, t, n) {
		qk.get(t)?.changeDropType();
	}
}()), A(new class extends qt {
	constructor() {
		super({
			id: "editor.hideDropWidget",
			precondition: Kk,
			kbOpts: {
				weight: 100,
				primary: 9
			}
		});
	}
	runEditorCommand(e, t, n) {
		qk.get(t)?.clearWidgets();
	}
}()), Js.as(Ye.Configuration).registerConfiguration({
	...Il,
	properties: { [Wk]: {
		type: "object",
		scope: 5,
		description: B("defaultProviderDescription", "Configures the default drop provider to use for content of a given mime type."),
		default: {},
		additionalProperties: { type: "string" }
	} }
});
// ../../../node_modules/.pnpm/monaco-editor@0.52.2/node_modules/monaco-editor/esm/vs/editor/contrib/find/browser/findDecorations.js
var Jk = class e {
	constructor(e) {
		this._editor = e, this._decorations = [], this._overviewRulerApproximateDecorations = [], this._findScopeDecorationIds = [], this._rangeHighlightDecorationId = null, this._highlightedDecorationId = null, this._startPosition = this._editor.getPosition();
	}
	dispose() {
		this._editor.removeDecorations(this._allDecorations()), this._decorations = [], this._overviewRulerApproximateDecorations = [], this._findScopeDecorationIds = [], this._rangeHighlightDecorationId = null, this._highlightedDecorationId = null;
	}
	reset() {
		this._decorations = [], this._overviewRulerApproximateDecorations = [], this._findScopeDecorationIds = [], this._rangeHighlightDecorationId = null, this._highlightedDecorationId = null;
	}
	getCount() {
		return this._decorations.length;
	}
	getFindScope() {
		return this._findScopeDecorationIds[0] ? this._editor.getModel().getDecorationRange(this._findScopeDecorationIds[0]) : null;
	}
	getFindScopes() {
		if (this._findScopeDecorationIds.length) {
			let e = this._findScopeDecorationIds.map((e) => this._editor.getModel().getDecorationRange(e)).filter((e) => !!e);
			if (e.length) return e;
		}
		return null;
	}
	getStartPosition() {
		return this._startPosition;
	}
	setStartPosition(e) {
		this._startPosition = e, this.setCurrentFindMatch(null);
	}
	_getDecorationIndex(e) {
		let t = this._decorations.indexOf(e);
		return t >= 0 ? t + 1 : 1;
	}
	getDecorationRangeAt(e) {
		let t = e < this._decorations.length ? this._decorations[e] : null;
		return t ? this._editor.getModel().getDecorationRange(t) : null;
	}
	getCurrentMatchesPosition(t) {
		let n = this._editor.getModel().getDecorationsInRange(t);
		for (let t of n) {
			let n = t.options;
			if (n === e._FIND_MATCH_DECORATION || n === e._CURRENT_FIND_MATCH_DECORATION) return this._getDecorationIndex(t.id);
		}
		return 0;
	}
	setCurrentFindMatch(t) {
		let n = null, r = 0;
		if (t) for (let e = 0, i = this._decorations.length; e < i; e++) {
			let i = this._editor.getModel().getDecorationRange(this._decorations[e]);
			if (t.equalsRange(i)) {
				n = this._decorations[e], r = e + 1;
				break;
			}
		}
		return (this._highlightedDecorationId !== null || n !== null) && this._editor.changeDecorations((t) => {
			if (this._highlightedDecorationId !== null && (t.changeDecorationOptions(this._highlightedDecorationId, e._FIND_MATCH_DECORATION), this._highlightedDecorationId = null), n !== null && (this._highlightedDecorationId = n, t.changeDecorationOptions(this._highlightedDecorationId, e._CURRENT_FIND_MATCH_DECORATION)), this._rangeHighlightDecorationId !== null && (t.removeDecoration(this._rangeHighlightDecorationId), this._rangeHighlightDecorationId = null), n !== null) {
				let r = this._editor.getModel().getDecorationRange(n);
				if (r.startLineNumber !== r.endLineNumber && r.endColumn === 1) {
					let e = r.endLineNumber - 1, t = this._editor.getModel().getLineMaxColumn(e);
					r = new E(r.startLineNumber, r.startColumn, e, t);
				}
				this._rangeHighlightDecorationId = t.addDecoration(r, e._RANGE_HIGHLIGHT_DECORATION);
			}
		}), r;
	}
	set(t, n) {
		this._editor.changeDecorations((r) => {
			let i = e._FIND_MATCH_DECORATION, a = [];
			if (t.length > 1e3) {
				i = e._FIND_MATCH_NO_OVERVIEW_DECORATION;
				let n = this._editor.getModel().getLineCount(), r = this._editor.getLayoutInfo().height / n, o = Math.max(2, Math.ceil(3 / r)), s = t[0].range.startLineNumber, c = t[0].range.endLineNumber;
				for (let n = 1, r = t.length; n < r; n++) {
					let r = t[n].range;
					c + o >= r.startLineNumber ? r.endLineNumber > c && (c = r.endLineNumber) : (a.push({
						range: new E(s, 1, c, 1),
						options: e._FIND_MATCH_ONLY_OVERVIEW_DECORATION
					}), s = r.startLineNumber, c = r.endLineNumber);
				}
				a.push({
					range: new E(s, 1, c, 1),
					options: e._FIND_MATCH_ONLY_OVERVIEW_DECORATION
				});
			}
			let o = Array(t.length);
			for (let e = 0, n = t.length; e < n; e++) o[e] = {
				range: t[e].range,
				options: i
			};
			this._decorations = r.deltaDecorations(this._decorations, o), this._overviewRulerApproximateDecorations = r.deltaDecorations(this._overviewRulerApproximateDecorations, a), this._rangeHighlightDecorationId &&= (r.removeDecoration(this._rangeHighlightDecorationId), null), this._findScopeDecorationIds.length && (this._findScopeDecorationIds.forEach((e) => r.removeDecoration(e)), this._findScopeDecorationIds = []), n?.length && (this._findScopeDecorationIds = n.map((t) => r.addDecoration(t, e._FIND_SCOPE_DECORATION)));
		});
	}
	matchBeforePosition(e) {
		if (this._decorations.length === 0) return null;
		for (let t = this._decorations.length - 1; t >= 0; t--) {
			let n = this._decorations[t], r = this._editor.getModel().getDecorationRange(n);
			if (!(!r || r.endLineNumber > e.lineNumber) && (r.endLineNumber < e.lineNumber || !(r.endColumn > e.column))) return r;
		}
		return this._editor.getModel().getDecorationRange(this._decorations[this._decorations.length - 1]);
	}
	matchAfterPosition(e) {
		if (this._decorations.length === 0) return null;
		for (let t = 0, n = this._decorations.length; t < n; t++) {
			let n = this._decorations[t], r = this._editor.getModel().getDecorationRange(n);
			if (!(!r || r.startLineNumber < e.lineNumber) && (r.startLineNumber > e.lineNumber || !(r.startColumn < e.column))) return r;
		}
		return this._editor.getModel().getDecorationRange(this._decorations[0]);
	}
	_allDecorations() {
		let e = [];
		return e = e.concat(this._decorations), e = e.concat(this._overviewRulerApproximateDecorations), this._findScopeDecorationIds.length && e.push(...this._findScopeDecorationIds), this._rangeHighlightDecorationId && e.push(this._rangeHighlightDecorationId), e;
	}
	static {
		this._CURRENT_FIND_MATCH_DECORATION = L.register({
			description: "current-find-match",
			stickiness: 1,
			zIndex: 13,
			className: "currentFindMatch",
			inlineClassName: "currentFindMatchInline",
			showIfCollapsed: !0,
			overviewRuler: {
				color: ra(un),
				position: Mr.Center
			},
			minimap: {
				color: ra(To),
				position: 1
			}
		});
	}
	static {
		this._FIND_MATCH_DECORATION = L.register({
			description: "find-match",
			stickiness: 1,
			zIndex: 10,
			className: "findMatch",
			inlineClassName: "findMatchInline",
			showIfCollapsed: !0,
			overviewRuler: {
				color: ra(un),
				position: Mr.Center
			},
			minimap: {
				color: ra(To),
				position: 1
			}
		});
	}
	static {
		this._FIND_MATCH_NO_OVERVIEW_DECORATION = L.register({
			description: "find-match-no-overview",
			stickiness: 1,
			className: "findMatch",
			showIfCollapsed: !0
		});
	}
	static {
		this._FIND_MATCH_ONLY_OVERVIEW_DECORATION = L.register({
			description: "find-match-only-overview",
			stickiness: 1,
			overviewRuler: {
				color: ra(un),
				position: Mr.Center
			}
		});
	}
	static {
		this._RANGE_HIGHLIGHT_DECORATION = L.register({
			description: "find-range-highlight",
			stickiness: 1,
			className: "rangeHighlight",
			isWholeLine: !0
		});
	}
	static {
		this._FIND_SCOPE_DECORATION = L.register({
			description: "find-scope",
			className: "findScope",
			isWholeLine: !0
		});
	}
}, Yk = class {
	constructor(e, t, n) {
		this._editorSelection = e, this._ranges = t, this._replaceStrings = n, this._trackedEditorSelectionId = null;
	}
	getEditOperations(e, t) {
		if (this._ranges.length > 0) {
			let e = [];
			for (let t = 0; t < this._ranges.length; t++) e.push({
				range: this._ranges[t],
				text: this._replaceStrings[t]
			});
			e.sort((e, t) => E.compareRangesUsingStarts(e.range, t.range));
			let n = [], r = e[0];
			for (let t = 1; t < e.length; t++) r.range.endLineNumber === e[t].range.startLineNumber && r.range.endColumn === e[t].range.startColumn ? (r.range = r.range.plusRange(e[t].range), r.text += e[t].text) : (n.push(r), r = e[t]);
			n.push(r);
			for (let e of n) t.addEditOperation(e.range, e.text);
		}
		this._trackedEditorSelectionId = t.trackSelection(this._editorSelection);
	}
	computeCursorState(e, t) {
		return t.getTrackedSelection(this._trackedEditorSelectionId);
	}
};
// ../../../node_modules/.pnpm/monaco-editor@0.52.2/node_modules/monaco-editor/esm/vs/base/common/search.js
function Xk(e, t) {
	if (e && e[0] !== "") {
		let n = Zk(e, t, "-"), r = Zk(e, t, "_");
		return n && !r ? Qk(e, t, "-") : !n && r ? Qk(e, t, "_") : e[0].toUpperCase() === e[0] ? t.toUpperCase() : e[0].toLowerCase() === e[0] ? t.toLowerCase() : dt(e[0][0]) && t.length > 0 ? t[0].toUpperCase() + t.substr(1) : e[0][0].toUpperCase() !== e[0][0] && t.length > 0 ? t[0].toLowerCase() + t.substr(1) : t;
	}
	return t;
}
function Zk(e, t, n) {
	return e[0].indexOf(n) !== -1 && t.indexOf(n) !== -1 && e[0].split(n).length === t.split(n).length;
}
function Qk(e, t, n) {
	let r = t.split(n), i = e[0].split(n), a = "";
	return r.forEach((e, t) => {
		a += Xk([i[t]], e) + n;
	}), a.slice(0, -1);
}
// ../../../node_modules/.pnpm/monaco-editor@0.52.2/node_modules/monaco-editor/esm/vs/editor/contrib/find/browser/replacePattern.js
var $k = class {
	constructor(e) {
		this.staticValue = e, this.kind = 0;
	}
}, eA = class {
	constructor(e) {
		this.pieces = e, this.kind = 1;
	}
}, tA = class e {
	static fromStaticValue(t) {
		return new e([nA.staticValue(t)]);
	}
	get hasReplacementPatterns() {
		return this._state.kind === 1;
	}
	constructor(e) {
		this._state = !e || e.length === 0 ? new $k("") : e.length === 1 && e[0].staticValue !== null ? new $k(e[0].staticValue) : new eA(e);
	}
	buildReplaceString(t, n) {
		if (this._state.kind === 0) return n ? Xk(t, this._state.staticValue) : this._state.staticValue;
		let r = "";
		for (let n = 0, i = this._state.pieces.length; n < i; n++) {
			let i = this._state.pieces[n];
			if (i.staticValue !== null) {
				r += i.staticValue;
				continue;
			}
			let a = e._substitute(i.matchIndex, t);
			if (i.caseOps !== null && i.caseOps.length > 0) {
				let e = [], t = i.caseOps.length, n = 0;
				for (let r = 0, o = a.length; r < o; r++) {
					if (n >= t) {
						e.push(a.slice(r));
						break;
					}
					switch (i.caseOps[n]) {
						case "U":
							e.push(a[r].toUpperCase());
							break;
						case "u":
							e.push(a[r].toUpperCase()), n++;
							break;
						case "L":
							e.push(a[r].toLowerCase());
							break;
						case "l":
							e.push(a[r].toLowerCase()), n++;
							break;
						default: e.push(a[r]);
					}
				}
				a = e.join("");
			}
			r += a;
		}
		return r;
	}
	static _substitute(e, t) {
		if (t === null) return "";
		if (e === 0) return t[0];
		let n = "";
		for (; e > 0;) {
			if (e < t.length) return (t[e] || "") + n;
			n = String(e % 10) + n, e = Math.floor(e / 10);
		}
		return "$" + n;
	}
}, nA = class e {
	static staticValue(t) {
		return new e(t, -1, null);
	}
	static caseOps(t, n) {
		return new e(null, t, n);
	}
	constructor(e, t, n) {
		this.staticValue = e, this.matchIndex = t, this.caseOps = !n || n.length === 0 ? null : n.slice(0);
	}
}, rA = class {
	constructor(e) {
		this._source = e, this._lastCharIndex = 0, this._result = [], this._resultLen = 0, this._currentStaticPiece = "";
	}
	emitUnchanged(e) {
		this._emitStatic(this._source.substring(this._lastCharIndex, e)), this._lastCharIndex = e;
	}
	emitStatic(e, t) {
		this._emitStatic(e), this._lastCharIndex = t;
	}
	_emitStatic(e) {
		e.length !== 0 && (this._currentStaticPiece += e);
	}
	emitMatchIndex(e, t, n) {
		this._currentStaticPiece.length !== 0 && (this._result[this._resultLen++] = nA.staticValue(this._currentStaticPiece), this._currentStaticPiece = ""), this._result[this._resultLen++] = nA.caseOps(e, n), this._lastCharIndex = t;
	}
	finalize() {
		return this.emitUnchanged(this._source.length), this._currentStaticPiece.length !== 0 && (this._result[this._resultLen++] = nA.staticValue(this._currentStaticPiece), this._currentStaticPiece = ""), new tA(this._result);
	}
};
function iA(e) {
	if (!e || e.length === 0) return new tA(null);
	let t = [], n = new rA(e);
	for (let r = 0, i = e.length; r < i; r++) {
		let a = e.charCodeAt(r);
		if (a === 92) {
			if (r++, r >= i) break;
			let a = e.charCodeAt(r);
			switch (a) {
				case 92:
					n.emitUnchanged(r - 1), n.emitStatic("\\", r + 1);
					break;
				case 110:
					n.emitUnchanged(r - 1), n.emitStatic("\n", r + 1);
					break;
				case 116:
					n.emitUnchanged(r - 1), n.emitStatic("	", r + 1);
					break;
				case 117:
				case 85:
				case 108:
				case 76: n.emitUnchanged(r - 1), n.emitStatic("", r + 1), t.push(String.fromCharCode(a));
			}
		} else if (a === 36) {
			if (r++, r >= i) break;
			let a = e.charCodeAt(r);
			if (a === 36) {
				n.emitUnchanged(r - 1), n.emitStatic("$", r + 1);
				continue;
			}
			if (a === 48 || a === 38) {
				n.emitUnchanged(r - 1), n.emitMatchIndex(0, r + 1, t), t.length = 0;
				continue;
			}
			if (49 <= a && a <= 57) {
				let o = a - 48;
				if (r + 1 < i) {
					let i = e.charCodeAt(r + 1);
					if (48 <= i && i <= 57) {
						r++, o = o * 10 + (i - 48), n.emitUnchanged(r - 2), n.emitMatchIndex(o, r + 1, t), t.length = 0;
						continue;
					}
				}
				n.emitUnchanged(r - 1), n.emitMatchIndex(o, r + 1, t), t.length = 0;
				continue;
			}
		}
	}
	return n.finalize();
}
// ../../../node_modules/.pnpm/monaco-editor@0.52.2/node_modules/monaco-editor/esm/vs/editor/contrib/find/browser/findModel.js
var aA = new z("findWidgetVisible", !1);
aA.toNegated();
var oA = new z("findInputFocussed", !1), sA = new z("replaceInputFocussed", !1), cA = {
	primary: 545,
	mac: { primary: 2593 }
}, lA = {
	primary: 565,
	mac: { primary: 2613 }
}, uA = {
	primary: 560,
	mac: { primary: 2608 }
}, dA = {
	primary: 554,
	mac: { primary: 2602 }
}, fA = {
	primary: 558,
	mac: { primary: 2606 }
}, pA = {
	StartFindAction: "actions.find",
	StartFindWithSelection: "actions.findWithSelection",
	StartFindWithArgs: "editor.actions.findWithArgs",
	NextMatchFindAction: "editor.action.nextMatchFindAction",
	PreviousMatchFindAction: "editor.action.previousMatchFindAction",
	GoToMatchFindAction: "editor.action.goToMatchFindAction",
	NextSelectionMatchFindAction: "editor.action.nextSelectionMatchFindAction",
	PreviousSelectionMatchFindAction: "editor.action.previousSelectionMatchFindAction",
	StartFindReplaceAction: "editor.action.startFindReplaceAction",
	CloseFindWidgetCommand: "closeFindWidget",
	ToggleCaseSensitiveCommand: "toggleFindCaseSensitive",
	ToggleWholeWordCommand: "toggleFindWholeWord",
	ToggleRegexCommand: "toggleFindRegex",
	ToggleSearchScopeCommand: "toggleFindInSelection",
	TogglePreserveCaseCommand: "togglePreserveCase",
	ReplaceOneAction: "editor.action.replaceOne",
	ReplaceAllAction: "editor.action.replaceAll",
	SelectAllMatchesAction: "editor.action.selectAllMatches"
}, mA = 19999, hA = 240, gA = class e {
	constructor(e, t) {
		this._toDispose = new g(), this._editor = e, this._state = t, this._isDisposed = !1, this._startSearchingTimer = new kr(), this._decorations = new Jk(e), this._toDispose.add(this._decorations), this._updateDecorationsScheduler = new tl(() => {
			if (this._editor.hasModel()) return this.research(!1);
		}, 100), this._toDispose.add(this._updateDecorationsScheduler), this._toDispose.add(this._editor.onDidChangeCursorPosition((e) => {
			(e.reason === 3 || e.reason === 5 || e.reason === 6) && this._decorations.setStartPosition(this._editor.getPosition());
		})), this._ignoreModelContentChanged = !1, this._toDispose.add(this._editor.onDidChangeModelContent((e) => {
			this._ignoreModelContentChanged || (e.isFlush && this._decorations.reset(), this._decorations.setStartPosition(this._editor.getPosition()), this._updateDecorationsScheduler.schedule());
		})), this._toDispose.add(this._state.onFindReplaceStateChange((e) => this._onStateChanged(e))), this.research(!1, this._state.searchScope);
	}
	dispose() {
		this._isDisposed = !0, ci(this._startSearchingTimer), this._toDispose.dispose();
	}
	_onStateChanged(e) {
		this._isDisposed || this._editor.hasModel() && (e.searchString || e.isReplaceRevealed || e.isRegex || e.wholeWord || e.matchCase || e.searchScope) && (this._editor.getModel().isTooLargeForSyncing() ? (this._startSearchingTimer.cancel(), this._startSearchingTimer.setIfNotSet(() => {
			e.searchScope ? this.research(e.moveCursor, this._state.searchScope) : this.research(e.moveCursor);
		}, hA)) : e.searchScope ? this.research(e.moveCursor, this._state.searchScope) : this.research(e.moveCursor));
	}
	static _getSearchRange(e, t) {
		return t || e.getFullModelRange();
	}
	research(e, t) {
		let n = null;
		t === void 0 ? n = this._decorations.getFindScopes() : t !== null && (n = Array.isArray(t) ? t : [t]), n !== null && (n = n.map((e) => {
			if (e.startLineNumber !== e.endLineNumber) {
				let t = e.endLineNumber;
				return e.endColumn === 1 && --t, new E(e.startLineNumber, 1, t, this._editor.getModel().getLineMaxColumn(t));
			}
			return e;
		}));
		let r = this._findMatches(n, !1, mA);
		this._decorations.set(r, n);
		let i = this._editor.getSelection(), a = this._decorations.getCurrentMatchesPosition(i);
		if (a === 0 && r.length > 0) {
			let e = Ji(r.map((e) => e.range), (e) => E.compareRangesUsingStarts(e, i) >= 0);
			a = e > 0 ? e - 1 + 1 : a;
		}
		this._state.changeMatchInfo(a, this._decorations.getCount(), void 0), e && this._editor.getOption(41).cursorMoveOnType && this._moveToNextMatch(this._decorations.getStartPosition());
	}
	_hasMatches() {
		return this._state.matchesCount > 0;
	}
	_cannotFind() {
		if (!this._hasMatches()) {
			let e = this._decorations.getFindScope();
			return e && this._editor.revealRangeInCenterIfOutsideViewport(e, 0), !0;
		}
		return !1;
	}
	_setCurrentFindMatch(e) {
		let t = this._decorations.setCurrentFindMatch(e);
		this._state.changeMatchInfo(t, this._decorations.getCount(), e), this._editor.setSelection(e), this._editor.revealRangeInCenterIfOutsideViewport(e, 0);
	}
	_prevSearchPosition(e) {
		let t = this._state.isRegex && (this._state.searchString.indexOf("^") >= 0 || this._state.searchString.indexOf("$") >= 0), { lineNumber: n, column: r } = e, i = this._editor.getModel();
		return t || r === 1 ? (n === 1 ? n = i.getLineCount() : n--, r = i.getLineMaxColumn(n)) : r--, new b(n, r);
	}
	_moveToPrevMatch(t, n = !1) {
		if (!this._state.canNavigateBack()) {
			let e = this._decorations.matchAfterPosition(t);
			e && this._setCurrentFindMatch(e);
			return;
		}
		if (this._decorations.getCount() < 19999) {
			let e = this._decorations.matchBeforePosition(t);
			e && e.isEmpty() && e.getStartPosition().equals(t) && (t = this._prevSearchPosition(t), e = this._decorations.matchBeforePosition(t)), e && this._setCurrentFindMatch(e);
			return;
		}
		if (this._cannotFind()) return;
		let r = this._decorations.getFindScope(), i = e._getSearchRange(this._editor.getModel(), r);
		i.getEndPosition().isBefore(t) && (t = i.getEndPosition()), t.isBefore(i.getStartPosition()) && (t = i.getEndPosition());
		let { lineNumber: a, column: o } = t, s = this._editor.getModel(), c = new b(a, o), l = s.findPreviousMatch(this._state.searchString, c, this._state.isRegex, this._state.matchCase, this._state.wholeWord ? this._editor.getOption(132) : null, !1);
		if (l && l.range.isEmpty() && l.range.getStartPosition().equals(c) && (c = this._prevSearchPosition(c), l = s.findPreviousMatch(this._state.searchString, c, this._state.isRegex, this._state.matchCase, this._state.wholeWord ? this._editor.getOption(132) : null, !1)), l) {
			if (!n && !i.containsRange(l.range)) return this._moveToPrevMatch(l.range.getStartPosition(), !0);
			this._setCurrentFindMatch(l.range);
		}
	}
	moveToPrevMatch() {
		this._moveToPrevMatch(this._editor.getSelection().getStartPosition());
	}
	_nextSearchPosition(e) {
		let t = this._state.isRegex && (this._state.searchString.indexOf("^") >= 0 || this._state.searchString.indexOf("$") >= 0), { lineNumber: n, column: r } = e, i = this._editor.getModel();
		return t || r === i.getLineMaxColumn(n) ? (n === i.getLineCount() ? n = 1 : n++, r = 1) : r++, new b(n, r);
	}
	_moveToNextMatch(e) {
		if (!this._state.canNavigateForward()) {
			let t = this._decorations.matchBeforePosition(e);
			t && this._setCurrentFindMatch(t);
			return;
		}
		if (this._decorations.getCount() < 19999) {
			let t = this._decorations.matchAfterPosition(e);
			t && t.isEmpty() && t.getStartPosition().equals(e) && (e = this._nextSearchPosition(e), t = this._decorations.matchAfterPosition(e)), t && this._setCurrentFindMatch(t);
			return;
		}
		let t = this._getNextMatch(e, !1, !0);
		t && this._setCurrentFindMatch(t.range);
	}
	_getNextMatch(t, n, r, i = !1) {
		if (this._cannotFind()) return null;
		let a = this._decorations.getFindScope(), o = e._getSearchRange(this._editor.getModel(), a);
		o.getEndPosition().isBefore(t) && (t = o.getStartPosition()), t.isBefore(o.getStartPosition()) && (t = o.getStartPosition());
		let { lineNumber: s, column: c } = t, l = this._editor.getModel(), u = new b(s, c), d = l.findNextMatch(this._state.searchString, u, this._state.isRegex, this._state.matchCase, this._state.wholeWord ? this._editor.getOption(132) : null, n);
		return r && d && d.range.isEmpty() && d.range.getStartPosition().equals(u) && (u = this._nextSearchPosition(u), d = l.findNextMatch(this._state.searchString, u, this._state.isRegex, this._state.matchCase, this._state.wholeWord ? this._editor.getOption(132) : null, n)), d ? !i && !o.containsRange(d.range) ? this._getNextMatch(d.range.getEndPosition(), n, r, !0) : d : null;
	}
	moveToNextMatch() {
		this._moveToNextMatch(this._editor.getSelection().getEndPosition());
	}
	_moveToMatch(e) {
		let t = this._decorations.getDecorationRangeAt(e);
		t && this._setCurrentFindMatch(t);
	}
	moveToMatch(e) {
		this._moveToMatch(e);
	}
	_getReplacePattern() {
		return this._state.isRegex ? iA(this._state.replaceString) : tA.fromStaticValue(this._state.replaceString);
	}
	replace() {
		if (!this._hasMatches()) return;
		let e = this._getReplacePattern(), t = this._editor.getSelection(), n = this._getNextMatch(t.getStartPosition(), !0, !1);
		if (n) {
			if (t.equalsRange(n.range)) {
				let r = e.buildReplaceString(n.matches, this._state.preserveCase), i = new Ys(t, r);
				this._executeEditorCommand("replace", i), this._decorations.setStartPosition(new b(t.startLineNumber, t.startColumn + r.length)), this.research(!0);
			} else this._decorations.setStartPosition(this._editor.getPosition()), this._setCurrentFindMatch(n.range);
		}
	}
	_findMatches(t, n, r) {
		let i = (t || [null]).map((t) => e._getSearchRange(this._editor.getModel(), t));
		return this._editor.getModel().findMatches(this._state.searchString, i, this._state.isRegex, this._state.matchCase, this._state.wholeWord ? this._editor.getOption(132) : null, n, r);
	}
	replaceAll() {
		if (!this._hasMatches()) return;
		let e = this._decorations.getFindScopes();
		e === null && this._state.matchesCount >= 19999 ? this._largeReplaceAll() : this._regularReplaceAll(e), this.research(!1);
	}
	_largeReplaceAll() {
		let e = new Sr(this._state.searchString, this._state.isRegex, this._state.matchCase, this._state.wholeWord ? this._editor.getOption(132) : null).parseSearchRequest();
		if (!e) return;
		let t = e.regex;
		if (!t.multiline) {
			let e = "mu";
			t.ignoreCase && (e += "i"), t.global && (e += "g"), t = new RegExp(t.source, e);
		}
		let n = this._editor.getModel(), r = n.getValue(1), i = n.getFullModelRange(), a = this._getReplacePattern(), o, s = this._state.preserveCase;
		o = a.hasReplacementPatterns || s ? r.replace(t, function() {
			return a.buildReplaceString(arguments, s);
		}) : r.replace(t, a.buildReplaceString(null, s));
		let c = new bs(i, o, this._editor.getSelection());
		this._executeEditorCommand("replaceAll", c);
	}
	_regularReplaceAll(e) {
		let t = this._getReplacePattern(), n = this._findMatches(e, t.hasReplacementPatterns || this._state.preserveCase, 1073741824), r = [];
		for (let e = 0, i = n.length; e < i; e++) r[e] = t.buildReplaceString(n[e].matches, this._state.preserveCase);
		let i = new Yk(this._editor.getSelection(), n.map((e) => e.range), r);
		this._executeEditorCommand("replaceAll", i);
	}
	selectAllMatches() {
		if (!this._hasMatches()) return;
		let e = this._decorations.getFindScopes(), t = this._findMatches(e, !1, 1073741824).map((e) => new V(e.range.startLineNumber, e.range.startColumn, e.range.endLineNumber, e.range.endColumn)), n = this._editor.getSelection();
		for (let e = 0, r = t.length; e < r; e++) if (t[e].equalsRange(n)) {
			t = [n].concat(t.slice(0, e), t.slice(e + 1));
			break;
		}
		this._editor.setSelections(t);
	}
	_executeEditorCommand(e, t) {
		try {
			this._ignoreModelContentChanged = !0, this._editor.pushUndoStop(), this._editor.executeCommand(e, t), this._editor.pushUndoStop();
		} finally {
			this._ignoreModelContentChanged = !1;
		}
	}
}, _A = class e extends cr {
	static {
		this.ID = "editor.contrib.findOptionsWidget";
	}
	constructor(e, t, n) {
		super(), this._hideSoon = this._register(new tl(() => this._hide(), 2e3)), this._isVisible = !1, this._editor = e, this._state = t, this._keybindingService = n, this._domNode = document.createElement("div"), this._domNode.className = "findOptionsWidget", this._domNode.style.display = "none", this._domNode.style.top = "10px", this._domNode.style.zIndex = "12", this._domNode.setAttribute("role", "presentation"), this._domNode.setAttribute("aria-hidden", "true");
		let i = {
			inputActiveOptionBorder: oe(r),
			inputActiveOptionForeground: oe(Ra),
			inputActiveOptionBackground: oe($n)
		}, a = this._register(li());
		this.caseSensitive = this._register(new Ha({
			appendTitle: this._keybindingLabelFor(pA.ToggleCaseSensitiveCommand),
			isChecked: this._state.matchCase,
			hoverDelegate: a,
			...i
		})), this._domNode.appendChild(this.caseSensitive.domNode), this._register(this.caseSensitive.onChange(() => {
			this._state.change({ matchCase: this.caseSensitive.checked }, !1);
		})), this.wholeWords = this._register(new Es({
			appendTitle: this._keybindingLabelFor(pA.ToggleWholeWordCommand),
			isChecked: this._state.wholeWord,
			hoverDelegate: a,
			...i
		})), this._domNode.appendChild(this.wholeWords.domNode), this._register(this.wholeWords.onChange(() => {
			this._state.change({ wholeWord: this.wholeWords.checked }, !1);
		})), this.regex = this._register(new jc({
			appendTitle: this._keybindingLabelFor(pA.ToggleRegexCommand),
			isChecked: this._state.isRegex,
			hoverDelegate: a,
			...i
		})), this._domNode.appendChild(this.regex.domNode), this._register(this.regex.onChange(() => {
			this._state.change({ isRegex: this.regex.checked }, !1);
		})), this._editor.addOverlayWidget(this), this._register(this._state.onFindReplaceStateChange((e) => {
			let t = !1;
			e.isRegex && (this.regex.checked = this._state.isRegex, t = !0), e.wholeWord && (this.wholeWords.checked = this._state.wholeWord, t = !0), e.matchCase && (this.caseSensitive.checked = this._state.matchCase, t = !0), !this._state.isRevealed && t && this._revealTemporarily();
		})), this._register(_(this._domNode, on.MOUSE_LEAVE, (e) => this._onMouseLeave())), this._register(_(this._domNode, "mouseover", (e) => this._onMouseOver()));
	}
	_keybindingLabelFor(e) {
		let t = this._keybindingService.lookupKeybinding(e);
		return t ? ` (${t.getLabel()})` : "";
	}
	dispose() {
		this._editor.removeOverlayWidget(this), super.dispose();
	}
	getId() {
		return e.ID;
	}
	getDomNode() {
		return this._domNode;
	}
	getPosition() {
		return { preference: 0 };
	}
	highlightFindOptions() {
		this._revealTemporarily();
	}
	_revealTemporarily() {
		this._show(), this._hideSoon.schedule();
	}
	_onMouseLeave() {
		this._hideSoon.schedule();
	}
	_onMouseOver() {
		this._hideSoon.cancel();
	}
	_show() {
		this._isVisible || (this._isVisible = !0, this._domNode.style.display = "block");
	}
	_hide() {
		this._isVisible && (this._isVisible = !1, this._domNode.style.display = "none");
	}
};
// ../../../node_modules/.pnpm/monaco-editor@0.52.2/node_modules/monaco-editor/esm/vs/editor/contrib/find/browser/findState.js
function vA(e, t) {
	return e === 1 || e !== 2 && t;
}
var yA = class extends U {
	get searchString() {
		return this._searchString;
	}
	get replaceString() {
		return this._replaceString;
	}
	get isRevealed() {
		return this._isRevealed;
	}
	get isReplaceRevealed() {
		return this._isReplaceRevealed;
	}
	get isRegex() {
		return vA(this._isRegexOverride, this._isRegex);
	}
	get wholeWord() {
		return vA(this._wholeWordOverride, this._wholeWord);
	}
	get matchCase() {
		return vA(this._matchCaseOverride, this._matchCase);
	}
	get preserveCase() {
		return vA(this._preserveCaseOverride, this._preserveCase);
	}
	get actualIsRegex() {
		return this._isRegex;
	}
	get actualWholeWord() {
		return this._wholeWord;
	}
	get actualMatchCase() {
		return this._matchCase;
	}
	get actualPreserveCase() {
		return this._preserveCase;
	}
	get searchScope() {
		return this._searchScope;
	}
	get matchesPosition() {
		return this._matchesPosition;
	}
	get matchesCount() {
		return this._matchesCount;
	}
	get currentMatch() {
		return this._currentMatch;
	}
	constructor() {
		super(), this._onFindReplaceStateChange = this._register(new x()), this.onFindReplaceStateChange = this._onFindReplaceStateChange.event, this._searchString = "", this._replaceString = "", this._isRevealed = !1, this._isReplaceRevealed = !1, this._isRegex = !1, this._isRegexOverride = 0, this._wholeWord = !1, this._wholeWordOverride = 0, this._matchCase = !1, this._matchCaseOverride = 0, this._preserveCase = !1, this._preserveCaseOverride = 0, this._searchScope = null, this._matchesPosition = 0, this._matchesCount = 0, this._currentMatch = null, this._loop = !0, this._isSearching = !1, this._filters = null;
	}
	changeMatchInfo(e, t, n) {
		let r = {
			moveCursor: !1,
			updateHistory: !1,
			searchString: !1,
			replaceString: !1,
			isRevealed: !1,
			isReplaceRevealed: !1,
			isRegex: !1,
			wholeWord: !1,
			matchCase: !1,
			preserveCase: !1,
			searchScope: !1,
			matchesPosition: !1,
			matchesCount: !1,
			currentMatch: !1,
			loop: !1,
			isSearching: !1,
			filters: !1
		}, i = !1;
		t === 0 && (e = 0), e > t && (e = t), this._matchesPosition !== e && (this._matchesPosition = e, r.matchesPosition = !0, i = !0), this._matchesCount !== t && (this._matchesCount = t, r.matchesCount = !0, i = !0), n !== void 0 && (E.equalsRange(this._currentMatch, n) || (this._currentMatch = n, r.currentMatch = !0, i = !0)), i && this._onFindReplaceStateChange.fire(r);
	}
	change(e, t, n = !0) {
		let r = {
			moveCursor: t,
			updateHistory: n,
			searchString: !1,
			replaceString: !1,
			isRevealed: !1,
			isReplaceRevealed: !1,
			isRegex: !1,
			wholeWord: !1,
			matchCase: !1,
			preserveCase: !1,
			searchScope: !1,
			matchesPosition: !1,
			matchesCount: !1,
			currentMatch: !1,
			loop: !1,
			isSearching: !1,
			filters: !1
		}, i = !1, a = this.isRegex, o = this.wholeWord, s = this.matchCase, c = this.preserveCase;
		e.searchString !== void 0 && this._searchString !== e.searchString && (this._searchString = e.searchString, r.searchString = !0, i = !0), e.replaceString !== void 0 && this._replaceString !== e.replaceString && (this._replaceString = e.replaceString, r.replaceString = !0, i = !0), e.isRevealed !== void 0 && this._isRevealed !== e.isRevealed && (this._isRevealed = e.isRevealed, r.isRevealed = !0, i = !0), e.isReplaceRevealed !== void 0 && this._isReplaceRevealed !== e.isReplaceRevealed && (this._isReplaceRevealed = e.isReplaceRevealed, r.isReplaceRevealed = !0, i = !0), e.isRegex !== void 0 && (this._isRegex = e.isRegex), e.wholeWord !== void 0 && (this._wholeWord = e.wholeWord), e.matchCase !== void 0 && (this._matchCase = e.matchCase), e.preserveCase !== void 0 && (this._preserveCase = e.preserveCase), e.searchScope !== void 0 && (e.searchScope?.every((e) => this._searchScope?.some((t) => !E.equalsRange(t, e))) || (this._searchScope = e.searchScope, r.searchScope = !0, i = !0)), e.loop !== void 0 && this._loop !== e.loop && (this._loop = e.loop, r.loop = !0, i = !0), e.isSearching !== void 0 && this._isSearching !== e.isSearching && (this._isSearching = e.isSearching, r.isSearching = !0, i = !0), e.filters !== void 0 && (this._filters ? this._filters.update(e.filters) : this._filters = e.filters, r.filters = !0, i = !0), this._isRegexOverride = e.isRegexOverride === void 0 ? 0 : e.isRegexOverride, this._wholeWordOverride = e.wholeWordOverride === void 0 ? 0 : e.wholeWordOverride, this._matchCaseOverride = e.matchCaseOverride === void 0 ? 0 : e.matchCaseOverride, this._preserveCaseOverride = e.preserveCaseOverride === void 0 ? 0 : e.preserveCaseOverride, a !== this.isRegex && (i = !0, r.isRegex = !0), o !== this.wholeWord && (i = !0, r.wholeWord = !0), s !== this.matchCase && (i = !0, r.matchCase = !0), c !== this.preserveCase && (i = !0, r.preserveCase = !0), i && this._onFindReplaceStateChange.fire(r);
	}
	canNavigateBack() {
		return this.canNavigateInLoop() || this.matchesPosition !== 1;
	}
	canNavigateForward() {
		return this.canNavigateInLoop() || this.matchesPosition < this.matchesCount;
	}
	canNavigateInLoop() {
		return this._loop || this.matchesCount >= 19999;
	}
}, bA = B("defaultLabel", "input"), xA = B("label.preserveCaseToggle", "Preserve Case"), SA = class extends na {
	constructor(e) {
		super({
			icon: v.preserveCase,
			title: xA + e.appendTitle,
			isChecked: e.isChecked,
			hoverDelegate: e.hoverDelegate ?? at("element"),
			inputActiveOptionBorder: e.inputActiveOptionBorder,
			inputActiveOptionForeground: e.inputActiveOptionForeground,
			inputActiveOptionBackground: e.inputActiveOptionBackground
		});
	}
}, CA = class extends cr {
	constructor(e, t, n, r) {
		super(), this._showOptionButtons = n, this.fixFocusOnOptionClickEnabled = !0, this.cachedOptionsWidth = 0, this._onDidOptionChange = this._register(new x()), this.onDidOptionChange = this._onDidOptionChange.event, this._onKeyDown = this._register(new x()), this.onKeyDown = this._onKeyDown.event, this._onMouseDown = this._register(new x()), this._onInput = this._register(new x()), this._onKeyUp = this._register(new x()), this._onPreserveCaseKeyDown = this._register(new x()), this.onPreserveCaseKeyDown = this._onPreserveCaseKeyDown.event, this.contextViewProvider = t, this.placeholder = r.placeholder || "", this.validation = r.validation, this.label = r.label || bA;
		let i = r.appendPreserveCaseLabel || "", a = r.history || [], o = !!r.flexibleHeight, s = !!r.flexibleWidth, c = r.flexibleMaxHeight;
		this.domNode = document.createElement("div"), this.domNode.classList.add("monaco-findInput"), this.inputBox = this._register(new l(this.domNode, this.contextViewProvider, {
			ariaLabel: this.label || "",
			placeholder: this.placeholder || "",
			validationOptions: { validation: this.validation },
			history: a,
			showHistoryHint: r.showHistoryHint,
			flexibleHeight: o,
			flexibleWidth: s,
			flexibleMaxHeight: c,
			inputBoxStyles: r.inputBoxStyles
		})), this.preserveCase = this._register(new SA({
			appendTitle: i,
			isChecked: !1,
			...r.toggleStyles
		})), this._register(this.preserveCase.onChange((e) => {
			this._onDidOptionChange.fire(e), !e && this.fixFocusOnOptionClickEnabled && this.inputBox.focus(), this.validate();
		})), this._register(this.preserveCase.onKeyDown((e) => {
			this._onPreserveCaseKeyDown.fire(e);
		})), this.cachedOptionsWidth = this._showOptionButtons ? this.preserveCase.width() : 0;
		let u = [this.preserveCase.domNode];
		this.onkeydown(this.domNode, (e) => {
			if (e.equals(15) || e.equals(17) || e.equals(9)) {
				let t = u.indexOf(this.domNode.ownerDocument.activeElement);
				if (t >= 0) {
					let n = -1;
					e.equals(17) ? n = (t + 1) % u.length : e.equals(15) && (n = t === 0 ? u.length - 1 : t - 1), e.equals(9) ? (u[t].blur(), this.inputBox.focus()) : n >= 0 && u[n].focus(), Ot.stop(e, !0);
				}
			}
		});
		let d = document.createElement("div");
		d.className = "controls", d.style.display = this._showOptionButtons ? "block" : "none", d.appendChild(this.preserveCase.domNode), this.domNode.appendChild(d), e?.appendChild(this.domNode), this.onkeydown(this.inputBox.inputElement, (e) => this._onKeyDown.fire(e)), this.onkeyup(this.inputBox.inputElement, (e) => this._onKeyUp.fire(e)), this.oninput(this.inputBox.inputElement, (e) => this._onInput.fire()), this.onmousedown(this.inputBox.inputElement, (e) => this._onMouseDown.fire(e));
	}
	enable() {
		this.domNode.classList.remove("disabled"), this.inputBox.enable(), this.preserveCase.enable();
	}
	disable() {
		this.domNode.classList.add("disabled"), this.inputBox.disable(), this.preserveCase.disable();
	}
	setEnabled(e) {
		e ? this.enable() : this.disable();
	}
	select() {
		this.inputBox.select();
	}
	focus() {
		this.inputBox.focus();
	}
	getPreserveCase() {
		return this.preserveCase.checked;
	}
	setPreserveCase(e) {
		this.preserveCase.checked = e;
	}
	focusOnPreserve() {
		this.preserveCase.focus();
	}
	validate() {
		this.inputBox?.validate();
	}
	set width(e) {
		this.inputBox.paddingRight = this.cachedOptionsWidth, this.domNode.style.width = e + "px";
	}
	dispose() {
		super.dispose();
	}
}, wA = function(e, t, n, r) {
	var i = arguments.length, a = i < 3 ? t : r === null ? r = Object.getOwnPropertyDescriptor(t, n) : r, o;
	if (typeof Reflect == "object" && typeof Reflect.decorate == "function") a = Reflect.decorate(e, t, n, r);
	else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (i < 3 ? o(a) : i > 3 ? o(t, n, a) : o(t, n)) || a);
	return i > 3 && a && Object.defineProperty(t, n, a), a;
}, TA = function(e, t) {
	return function(n, r) {
		t(n, r, e);
	};
}, EA = new z("suggestWidgetVisible", !1, B("suggestWidgetVisible", "Whether suggestion are visible")), DA = "historyNavigationWidgetFocus", OA = "historyNavigationForwardsEnabled", kA = "historyNavigationBackwardsEnabled", AA = void 0, jA = [];
function MA(e, t) {
	if (jA.includes(t)) throw Error("Cannot register the same widget multiple times");
	jA.push(t);
	let n = new g(), r = new z(DA, !1).bindTo(e), i = new z(OA, !0).bindTo(e), a = new z(kA, !0).bindTo(e), o = () => {
		r.set(!0), AA = t;
	}, s = () => {
		r.set(!1), AA === t && (AA = void 0);
	};
	return $i(t.element) && o(), n.add(t.onDidFocus(() => o())), n.add(t.onDidBlur(() => s())), n.add(Gt(() => {
		jA.splice(jA.indexOf(t), 1), s();
	})), {
		historyNavigationForwardsEnablement: i,
		historyNavigationBackwardsEnablement: a,
		dispose() {
			n.dispose();
		}
	};
}
var NA = class extends ir {
	constructor(e, t, n, r) {
		super(e, t, n);
		let i = this._register(r.createScoped(this.inputBox.element));
		this._register(MA(i, this.inputBox));
	}
};
NA = wA([TA(3, j)], NA);
var PA = class extends CA {
	constructor(e, t, n, r, i = !1) {
		super(e, t, i, n);
		let a = this._register(r.createScoped(this.inputBox.element));
		this._register(MA(a, this.inputBox));
	}
};
PA = wA([TA(3, j)], PA), to.registerCommandAndKeybindingRule({
	id: "history.showPrevious",
	weight: 200,
	when: N.and(N.has(DA), N.equals(kA, !0), N.not("isComposing"), EA.isEqualTo(!1)),
	primary: 16,
	secondary: [528],
	handler: (e) => {
		AA?.showPreviousValue();
	}
}), to.registerCommandAndKeybindingRule({
	id: "history.showNext",
	weight: 200,
	when: N.and(N.has(DA), N.equals(OA, !0), N.not("isComposing"), EA.isEqualTo(!1)),
	primary: 18,
	secondary: [530],
	handler: (e) => {
		AA?.showNextValue();
	}
});
// ../../../node_modules/.pnpm/monaco-editor@0.52.2/node_modules/monaco-editor/esm/vs/platform/history/browser/historyWidgetKeybindingHint.js
function FA(e) {
	return e.lookupKeybinding("history.showPrevious")?.getElectronAccelerator() === "Up" && e.lookupKeybinding("history.showNext")?.getElectronAccelerator() === "Down";
}
// ../../../node_modules/.pnpm/monaco-editor@0.52.2/node_modules/monaco-editor/esm/vs/editor/contrib/find/browser/findWidget.js
var IA = Jn("find-collapsed", v.chevronRight, B("findCollapsedIcon", "Icon to indicate that the editor find widget is collapsed.")), LA = Jn("find-expanded", v.chevronDown, B("findExpandedIcon", "Icon to indicate that the editor find widget is expanded.")), RA = Jn("find-selection", v.selection, B("findSelectionIcon", "Icon for 'Find in Selection' in the editor find widget.")), zA = Jn("find-replace", v.replace, B("findReplaceIcon", "Icon for 'Replace' in the editor find widget.")), BA = Jn("find-replace-all", v.replaceAll, B("findReplaceAllIcon", "Icon for 'Replace All' in the editor find widget.")), VA = Jn("find-previous-match", v.arrowUp, B("findPreviousMatchIcon", "Icon for 'Find Previous' in the editor find widget.")), HA = Jn("find-next-match", v.arrowDown, B("findNextMatchIcon", "Icon for 'Find Next' in the editor find widget.")), UA = B("label.findDialog", "Find / Replace"), WA = B("label.find", "Find"), GA = B("placeholder.find", "Find"), KA = B("label.previousMatchButton", "Previous Match"), qA = B("label.nextMatchButton", "Next Match"), JA = B("label.toggleSelectionFind", "Find in Selection"), YA = B("label.closeButton", "Close"), XA = B("label.replace", "Replace"), ZA = B("placeholder.replace", "Replace"), QA = B("label.replaceButton", "Replace"), $A = B("label.replaceAllButton", "Replace All"), ej = B("label.toggleReplaceButton", "Toggle Replace"), tj = B("title.matchesCountLimit", "Only the first {0} results are highlighted, but all find operations work on the entire text.", mA), nj = B("label.matchesLocation", "{0} of {1}"), rj = B("label.noResults", "No results"), ij = 419, aj = 221, oj = 69, sj = 33, cj = "ctrlEnterReplaceAll.windows.donotask", lj = Xs ? 256 : 2048, uj = class {
	constructor(e) {
		this.afterLineNumber = e, this.heightInPx = sj, this.suppressMouseDown = !1, this.domNode = document.createElement("div"), this.domNode.className = "dock-find-viewzone";
	}
};
function dj(e, t, n) {
	let r = !!t.match(/\n/);
	n && r && n.selectionStart > 0 && e.stopPropagation();
}
function fj(e, t, n) {
	let r = !!t.match(/\n/);
	n && r && n.selectionEnd < n.value.length && e.stopPropagation();
}
var pj = class e extends cr {
	static {
		this.ID = "editor.contrib.findWidget";
	}
	constructor(e, t, n, r, i, a, o, s, c, l) {
		super(), this._hoverService = l, this._cachedHeight = null, this._revealTimeouts = [], this._codeEditor = e, this._controller = t, this._state = n, this._contextViewProvider = r, this._keybindingService = i, this._contextKeyService = a, this._storageService = s, this._notificationService = c, this._ctrlEnterReplaceAllWarningPrompted = !!s.getBoolean(cj, 0), this._isVisible = !1, this._isReplaceVisible = !1, this._ignoreChangeEvent = !1, this._updateHistoryDelayer = new ge(500), this._register(Gt(() => this._updateHistoryDelayer.cancel())), this._register(this._state.onFindReplaceStateChange((e) => this._onStateChanged(e))), this._buildDomNode(), this._updateButtons(), this._tryUpdateWidgetWidth(), this._findInput.inputBox.layout(), this._register(this._codeEditor.onDidChangeConfiguration((e) => {
			if (e.hasChanged(92) && (this._codeEditor.getOption(92) && this._state.change({ isReplaceRevealed: !1 }, !1), this._updateButtons()), e.hasChanged(146) && this._tryUpdateWidgetWidth(), e.hasChanged(2) && this.updateAccessibilitySupport(), e.hasChanged(41)) {
				let e = this._codeEditor.getOption(41).loop;
				this._state.change({ loop: e }, !1);
				let t = this._codeEditor.getOption(41).addExtraSpaceOnTop;
				t && !this._viewZone && (this._viewZone = new uj(0), this._showViewZone()), !t && this._viewZone && this._removeViewZone();
			}
		})), this.updateAccessibilitySupport(), this._register(this._codeEditor.onDidChangeCursorSelection(() => {
			this._isVisible && this._updateToggleSelectionFindButton();
		})), this._register(this._codeEditor.onDidFocusEditorWidget(async () => {
			if (this._isVisible) {
				let e = await this._controller.getGlobalBufferTerm();
				e && e !== this._state.searchString && (this._state.change({ searchString: e }, !1), this._findInput.select());
			}
		})), this._findInputFocused = oA.bindTo(a), this._findFocusTracker = this._register(oo(this._findInput.inputBox.inputElement)), this._register(this._findFocusTracker.onDidFocus(() => {
			this._findInputFocused.set(!0), this._updateSearchScope();
		})), this._register(this._findFocusTracker.onDidBlur(() => {
			this._findInputFocused.set(!1);
		})), this._replaceInputFocused = sA.bindTo(a), this._replaceFocusTracker = this._register(oo(this._replaceInput.inputBox.inputElement)), this._register(this._replaceFocusTracker.onDidFocus(() => {
			this._replaceInputFocused.set(!0), this._updateSearchScope();
		})), this._register(this._replaceFocusTracker.onDidBlur(() => {
			this._replaceInputFocused.set(!1);
		})), this._codeEditor.addOverlayWidget(this), this._codeEditor.getOption(41).addExtraSpaceOnTop && (this._viewZone = new uj(0)), this._register(this._codeEditor.onDidChangeModel(() => {
			this._isVisible && (this._viewZoneId = void 0);
		})), this._register(this._codeEditor.onDidScrollChange((e) => {
			e.scrollTopChanged ? this._layoutViewZone() : setTimeout(() => {
				this._layoutViewZone();
			}, 0);
		}));
	}
	getId() {
		return e.ID;
	}
	getDomNode() {
		return this._domNode;
	}
	getPosition() {
		return this._isVisible ? { preference: 0 } : null;
	}
	_onStateChanged(e) {
		if (e.searchString) {
			try {
				this._ignoreChangeEvent = !0, this._findInput.setValue(this._state.searchString);
			} finally {
				this._ignoreChangeEvent = !1;
			}
			this._updateButtons();
		}
		if (e.replaceString && (this._replaceInput.inputBox.value = this._state.replaceString), e.isRevealed && (this._state.isRevealed ? this._reveal() : this._hide(!0)), e.isReplaceRevealed && (this._state.isReplaceRevealed ? !this._codeEditor.getOption(92) && !this._isReplaceVisible && (this._isReplaceVisible = !0, this._replaceInput.width = Oc(this._findInput.domNode), this._updateButtons(), this._replaceInput.inputBox.layout()) : this._isReplaceVisible && (this._isReplaceVisible = !1, this._updateButtons())), (e.isRevealed || e.isReplaceRevealed) && (this._state.isRevealed || this._state.isReplaceRevealed) && this._tryUpdateHeight() && this._showViewZone(), e.isRegex && this._findInput.setRegex(this._state.isRegex), e.wholeWord && this._findInput.setWholeWords(this._state.wholeWord), e.matchCase && this._findInput.setCaseSensitive(this._state.matchCase), e.preserveCase && this._replaceInput.setPreserveCase(this._state.preserveCase), e.searchScope && (this._state.searchScope ? this._toggleSelectionFind.checked = !0 : this._toggleSelectionFind.checked = !1, this._updateToggleSelectionFindButton()), e.searchString || e.matchesCount || e.matchesPosition) {
			let e = this._state.searchString.length > 0 && this._state.matchesCount === 0;
			this._domNode.classList.toggle("no-results", e), this._updateMatchesCount(), this._updateButtons();
		}
		(e.searchString || e.currentMatch) && this._layoutViewZone(), e.updateHistory && this._delayedUpdateHistory(), e.loop && this._updateButtons();
	}
	_delayedUpdateHistory() {
		this._updateHistoryDelayer.trigger(this._updateHistory.bind(this)).then(void 0, er);
	}
	_updateHistory() {
		this._state.searchString && this._findInput.inputBox.addToHistory(), this._state.replaceString && this._replaceInput.inputBox.addToHistory();
	}
	_updateMatchesCount() {
		this._matchesCount.style.minWidth = oj + "px", this._state.matchesCount >= 19999 ? this._matchesCount.title = tj : this._matchesCount.title = "", this._matchesCount.firstChild?.remove();
		let e;
		if (this._state.matchesCount > 0) {
			let t = String(this._state.matchesCount);
			this._state.matchesCount >= 19999 && (t += "+");
			let n = String(this._state.matchesPosition);
			n === "0" && (n = "?"), e = nt(nj, n, t);
		} else e = rj;
		this._matchesCount.appendChild(document.createTextNode(e)), gt(this._getAriaLabel(e, this._state.currentMatch, this._state.searchString)), oj = Math.max(oj, this._matchesCount.clientWidth);
	}
	_getAriaLabel(e, t, n) {
		if (e === rj) return n === "" ? B("ariaSearchNoResultEmpty", "{0} found", e) : B("ariaSearchNoResult", "{0} found for '{1}'", e, n);
		if (t) {
			let r = B("ariaSearchNoResultWithLineNum", "{0} found for '{1}', at {2}", e, n, t.startLineNumber + ":" + t.startColumn), i = this._codeEditor.getModel();
			return i && t.startLineNumber <= i.getLineCount() && t.startLineNumber >= 1 ? `${i.getLineContent(t.startLineNumber)}, ${r}` : r;
		}
		return B("ariaSearchNoResultWithLineNumNoCurrentMatch", "{0} found for '{1}'", e, n);
	}
	_updateToggleSelectionFindButton() {
		let e = this._codeEditor.getSelection(), t = e ? e.startLineNumber !== e.endLineNumber || e.startColumn !== e.endColumn : !1, n = this._toggleSelectionFind.checked;
		this._isVisible && (n || t) ? this._toggleSelectionFind.enable() : this._toggleSelectionFind.disable();
	}
	_updateButtons() {
		this._findInput.setEnabled(this._isVisible), this._replaceInput.setEnabled(this._isVisible && this._isReplaceVisible), this._updateToggleSelectionFindButton(), this._closeBtn.setEnabled(this._isVisible);
		let e = this._state.searchString.length > 0, t = !!this._state.matchesCount;
		this._prevBtn.setEnabled(this._isVisible && e && t && this._state.canNavigateBack()), this._nextBtn.setEnabled(this._isVisible && e && t && this._state.canNavigateForward()), this._replaceBtn.setEnabled(this._isVisible && this._isReplaceVisible && e), this._replaceAllBtn.setEnabled(this._isVisible && this._isReplaceVisible && e), this._domNode.classList.toggle("replaceToggled", this._isReplaceVisible), this._toggleReplaceBtn.setExpanded(this._isReplaceVisible);
		let n = !this._codeEditor.getOption(92);
		this._toggleReplaceBtn.setEnabled(this._isVisible && n);
	}
	_reveal() {
		if (this._revealTimeouts.forEach((e) => {
			clearTimeout(e);
		}), this._revealTimeouts = [], !this._isVisible) {
			this._isVisible = !0;
			let e = this._codeEditor.getSelection();
			switch (this._codeEditor.getOption(41).autoFindInSelection) {
				case "always":
					this._toggleSelectionFind.checked = !0;
					break;
				case "never":
					this._toggleSelectionFind.checked = !1;
					break;
				case "multiline": {
					let t = !!e && e.startLineNumber !== e.endLineNumber;
					this._toggleSelectionFind.checked = t;
					break;
				}
			}
			this._tryUpdateWidgetWidth(), this._updateButtons(), this._revealTimeouts.push(setTimeout(() => {
				this._domNode.classList.add("visible"), this._domNode.setAttribute("aria-hidden", "false");
			}, 0)), this._revealTimeouts.push(setTimeout(() => {
				this._findInput.validate();
			}, 200)), this._codeEditor.layoutOverlayWidget(this);
			let t = !0;
			if (this._codeEditor.getOption(41).seedSearchStringFromSelection && e) {
				let n = this._codeEditor.getDomNode();
				if (n) {
					let r = Bi(n), i = this._codeEditor.getScrolledVisiblePosition(e.getStartPosition()), a = r.left + (i ? i.left : 0), o = i ? i.top : 0;
					if (this._viewZone && o < this._viewZone.heightInPx) {
						e.endLineNumber > e.startLineNumber && (t = !1);
						let n = c(this._domNode).left;
						a > n && (t = !1);
						let i = this._codeEditor.getScrolledVisiblePosition(e.getEndPosition());
						r.left + (i ? i.left : 0) > n && (t = !1);
					}
				}
			}
			this._showViewZone(t);
		}
	}
	_hide(e) {
		this._revealTimeouts.forEach((e) => {
			clearTimeout(e);
		}), this._revealTimeouts = [], this._isVisible && (this._isVisible = !1, this._updateButtons(), this._domNode.classList.remove("visible"), this._domNode.setAttribute("aria-hidden", "true"), this._findInput.clearMessage(), e && this._codeEditor.focus(), this._codeEditor.layoutOverlayWidget(this), this._removeViewZone());
	}
	_layoutViewZone(e) {
		if (!this._codeEditor.getOption(41).addExtraSpaceOnTop) {
			this._removeViewZone();
			return;
		}
		if (!this._isVisible) return;
		let t = this._viewZone;
		this._viewZoneId === void 0 && t && this._codeEditor.changeViewZones((n) => {
			t.heightInPx = this._getHeight(), this._viewZoneId = n.addZone(t), this._codeEditor.setScrollTop(e || this._codeEditor.getScrollTop() + t.heightInPx);
		});
	}
	_showViewZone(e = !0) {
		if (!this._isVisible || !this._codeEditor.getOption(41).addExtraSpaceOnTop) return;
		this._viewZone === void 0 && (this._viewZone = new uj(0));
		let t = this._viewZone;
		this._codeEditor.changeViewZones((n) => {
			if (this._viewZoneId !== void 0) {
				let r = this._getHeight();
				if (r === t.heightInPx) return;
				let i = r - t.heightInPx;
				t.heightInPx = r, n.layoutZone(this._viewZoneId), e && this._codeEditor.setScrollTop(this._codeEditor.getScrollTop() + i);
			} else {
				let r = this._getHeight();
				if (r -= this._codeEditor.getOption(84).top, r <= 0) return;
				t.heightInPx = r, this._viewZoneId = n.addZone(t), e && this._codeEditor.setScrollTop(this._codeEditor.getScrollTop() + r);
			}
		});
	}
	_removeViewZone() {
		this._codeEditor.changeViewZones((e) => {
			this._viewZoneId !== void 0 && (e.removeZone(this._viewZoneId), this._viewZoneId = void 0, this._viewZone &&= (this._codeEditor.setScrollTop(this._codeEditor.getScrollTop() - this._viewZone.heightInPx), void 0));
		});
	}
	_tryUpdateWidgetWidth() {
		if (!this._isVisible || !this._domNode.isConnected) return;
		let e = this._codeEditor.getLayoutInfo();
		if (e.contentWidth <= 0) {
			this._domNode.classList.add("hiddenEditor");
			return;
		}
		this._domNode.classList.contains("hiddenEditor") && this._domNode.classList.remove("hiddenEditor");
		let t = e.width, n = e.minimap.minimapWidth, r = !1, i = !1, a = !1;
		if (this._resized && Oc(this._domNode) > ij) this._domNode.style.maxWidth = `${t - 28 - n - 15}px`, this._replaceInput.width = Oc(this._findInput.domNode);
		else if (447 + n >= t && (i = !0), 447 + n - oj >= t && (a = !0), 447 + n - oj >= t + 50 && (r = !0), this._domNode.classList.toggle("collapsed-find-widget", r), this._domNode.classList.toggle("narrow-find-widget", a), this._domNode.classList.toggle("reduced-find-widget", i), !a && !r && (this._domNode.style.maxWidth = `${t - 28 - n - 15}px`), this._findInput.layout({
			collapsedFindWidget: r,
			narrowFindWidget: a,
			reducedFindWidget: i
		}), this._resized) {
			let e = this._findInput.inputBox.element.clientWidth;
			e > 0 && (this._replaceInput.width = e);
		} else this._isReplaceVisible && (this._replaceInput.width = Oc(this._findInput.domNode));
	}
	_getHeight() {
		let e = 0;
		return e += 4, e += this._findInput.inputBox.height + 2, this._isReplaceVisible && (e += 4, e += this._replaceInput.inputBox.height + 2), e += 4, e;
	}
	_tryUpdateHeight() {
		let e = this._getHeight();
		return this._cachedHeight !== null && this._cachedHeight === e ? !1 : (this._cachedHeight = e, this._domNode.style.height = `${e}px`, !0);
	}
	focusFindInput() {
		this._findInput.select(), this._findInput.focus();
	}
	focusReplaceInput() {
		this._replaceInput.select(), this._replaceInput.focus();
	}
	highlightFindOptions() {
		this._findInput.highlightFindOptions();
	}
	_updateSearchScope() {
		if (this._codeEditor.hasModel() && this._toggleSelectionFind.checked) {
			let e = this._codeEditor.getSelections();
			e.map((e) => {
				e.endColumn === 1 && e.endLineNumber > e.startLineNumber && (e = e.setEndPosition(e.endLineNumber - 1, this._codeEditor.getModel().getLineMaxColumn(e.endLineNumber - 1)));
				let t = this._state.currentMatch;
				return e.startLineNumber !== e.endLineNumber && !E.equalsRange(e, t) ? e : null;
			}).filter((e) => !!e), e.length && this._state.change({ searchScope: e }, !0);
		}
	}
	_onFindInputMouseDown(e) {
		e.middleButton && e.stopPropagation();
	}
	_onFindInputKeyDown(e) {
		if (e.equals(lj | 3)) {
			if (this._keybindingService.dispatchEvent(e, e.target)) {
				e.preventDefault();
				return;
			}
			this._findInput.inputBox.insertAtCursor("\n"), e.preventDefault();
		} else if (e.equals(2)) this._isReplaceVisible ? this._replaceInput.focus() : this._findInput.focusOnCaseSensitive(), e.preventDefault();
		else if (e.equals(2066)) this._codeEditor.focus(), e.preventDefault();
		else {
			if (e.equals(16)) return dj(e, this._findInput.getValue(), this._findInput.domNode.querySelector("textarea"));
			if (e.equals(18)) return fj(e, this._findInput.getValue(), this._findInput.domNode.querySelector("textarea"));
		}
	}
	_onReplaceInputKeyDown(e) {
		if (e.equals(lj | 3)) {
			if (this._keybindingService.dispatchEvent(e, e.target)) {
				e.preventDefault();
				return;
			}
			mo && xs && !this._ctrlEnterReplaceAllWarningPrompted && (this._notificationService.info(B("ctrlEnter.keybindingChanged", "Ctrl+Enter now inserts line break instead of replacing all. You can modify the keybinding for editor.action.replaceAll to override this behavior.")), this._ctrlEnterReplaceAllWarningPrompted = !0, this._storageService.store(cj, !0, 0, 0)), this._replaceInput.inputBox.insertAtCursor("\n"), e.preventDefault();
		} else if (e.equals(2)) this._findInput.focusOnCaseSensitive(), e.preventDefault();
		else if (e.equals(1026)) this._findInput.focus(), e.preventDefault();
		else if (e.equals(2066)) this._codeEditor.focus(), e.preventDefault();
		else {
			if (e.equals(16)) return dj(e, this._replaceInput.inputBox.value, this._replaceInput.inputBox.element.querySelector("textarea"));
			if (e.equals(18)) return fj(e, this._replaceInput.inputBox.value, this._replaceInput.inputBox.element.querySelector("textarea"));
		}
	}
	getVerticalSashLeft(e) {
		return 0;
	}
	_keybindingLabelFor(e) {
		let t = this._keybindingService.lookupKeybinding(e);
		return t ? ` (${t.getLabel()})` : "";
	}
	_buildDomNode() {
		this._findInput = this._register(new NA(null, this._contextViewProvider, {
			width: aj,
			label: WA,
			placeholder: GA,
			appendCaseSensitiveLabel: this._keybindingLabelFor(pA.ToggleCaseSensitiveCommand),
			appendWholeWordsLabel: this._keybindingLabelFor(pA.ToggleWholeWordCommand),
			appendRegexLabel: this._keybindingLabelFor(pA.ToggleRegexCommand),
			validation: (e) => {
				if (e.length === 0 || !this._findInput.getRegex()) return null;
				try {
					return new RegExp(e, "gu"), null;
				} catch (e) {
					return { content: e.message };
				}
			},
			flexibleHeight: !0,
			flexibleWidth: !0,
			flexibleMaxHeight: 118,
			showCommonFindToggles: !0,
			showHistoryHint: () => FA(this._keybindingService),
			inputBoxStyles: Gn,
			toggleStyles: Tt
		}, this._contextKeyService)), this._findInput.setRegex(!!this._state.isRegex), this._findInput.setCaseSensitive(!!this._state.matchCase), this._findInput.setWholeWords(!!this._state.wholeWord), this._register(this._findInput.onKeyDown((e) => this._onFindInputKeyDown(e))), this._register(this._findInput.inputBox.onDidChange(() => {
			this._ignoreChangeEvent || this._state.change({ searchString: this._findInput.getValue() }, !0);
		})), this._register(this._findInput.onDidOptionChange(() => {
			this._state.change({
				isRegex: this._findInput.getRegex(),
				wholeWord: this._findInput.getWholeWords(),
				matchCase: this._findInput.getCaseSensitive()
			}, !0);
		})), this._register(this._findInput.onCaseSensitiveKeyDown((e) => {
			e.equals(1026) && this._isReplaceVisible && (this._replaceInput.focus(), e.preventDefault());
		})), this._register(this._findInput.onRegexKeyDown((e) => {
			e.equals(2) && this._isReplaceVisible && (this._replaceInput.focusOnPreserve(), e.preventDefault());
		})), this._register(this._findInput.inputBox.onDidHeightChange((e) => {
			this._tryUpdateHeight() && this._showViewZone();
		})), La && this._register(this._findInput.onMouseDown((e) => this._onFindInputMouseDown(e))), this._matchesCount = document.createElement("div"), this._matchesCount.className = "matchesCount", this._updateMatchesCount();
		let e = this._register(li());
		this._prevBtn = this._register(new mj({
			label: KA + this._keybindingLabelFor(pA.PreviousMatchFindAction),
			icon: VA,
			hoverDelegate: e,
			onTrigger: () => {
				Er(this._codeEditor.getAction(pA.PreviousMatchFindAction)).run().then(void 0, er);
			}
		}, this._hoverService)), this._nextBtn = this._register(new mj({
			label: qA + this._keybindingLabelFor(pA.NextMatchFindAction),
			icon: HA,
			hoverDelegate: e,
			onTrigger: () => {
				Er(this._codeEditor.getAction(pA.NextMatchFindAction)).run().then(void 0, er);
			}
		}, this._hoverService));
		let t = document.createElement("div");
		t.className = "find-part", t.appendChild(this._findInput.domNode);
		let n = document.createElement("div");
		n.className = "find-actions", t.appendChild(n), n.appendChild(this._matchesCount), n.appendChild(this._prevBtn.domNode), n.appendChild(this._nextBtn.domNode), this._toggleSelectionFind = this._register(new na({
			icon: RA,
			title: JA + this._keybindingLabelFor(pA.ToggleSearchScopeCommand),
			isChecked: !1,
			hoverDelegate: e,
			inputActiveOptionBackground: oe($n),
			inputActiveOptionBorder: oe(r),
			inputActiveOptionForeground: oe(Ra)
		})), this._register(this._toggleSelectionFind.onChange(() => {
			if (this._toggleSelectionFind.checked) {
				if (this._codeEditor.hasModel()) {
					let e = this._codeEditor.getSelections();
					e = e.map((e) => (e.endColumn === 1 && e.endLineNumber > e.startLineNumber && (e = e.setEndPosition(e.endLineNumber - 1, this._codeEditor.getModel().getLineMaxColumn(e.endLineNumber - 1))), e.isEmpty() ? null : e)).filter((e) => !!e), e.length && this._state.change({ searchScope: e }, !0);
				}
			} else this._state.change({ searchScope: null }, !0);
		})), n.appendChild(this._toggleSelectionFind.domNode), this._closeBtn = this._register(new mj({
			label: YA + this._keybindingLabelFor(pA.CloseFindWidgetCommand),
			icon: Qe,
			hoverDelegate: e,
			onTrigger: () => {
				this._state.change({
					isRevealed: !1,
					searchScope: null
				}, !1);
			},
			onKeyDown: (e) => {
				e.equals(2) && this._isReplaceVisible && (this._replaceBtn.isEnabled() ? this._replaceBtn.focus() : this._codeEditor.focus(), e.preventDefault());
			}
		}, this._hoverService)), this._replaceInput = this._register(new PA(null, void 0, {
			label: XA,
			placeholder: ZA,
			appendPreserveCaseLabel: this._keybindingLabelFor(pA.TogglePreserveCaseCommand),
			history: [],
			flexibleHeight: !0,
			flexibleWidth: !0,
			flexibleMaxHeight: 118,
			showHistoryHint: () => FA(this._keybindingService),
			inputBoxStyles: Gn,
			toggleStyles: Tt
		}, this._contextKeyService, !0)), this._replaceInput.setPreserveCase(!!this._state.preserveCase), this._register(this._replaceInput.onKeyDown((e) => this._onReplaceInputKeyDown(e))), this._register(this._replaceInput.inputBox.onDidChange(() => {
			this._state.change({ replaceString: this._replaceInput.inputBox.value }, !1);
		})), this._register(this._replaceInput.inputBox.onDidHeightChange((e) => {
			this._isReplaceVisible && this._tryUpdateHeight() && this._showViewZone();
		})), this._register(this._replaceInput.onDidOptionChange(() => {
			this._state.change({ preserveCase: this._replaceInput.getPreserveCase() }, !0);
		})), this._register(this._replaceInput.onPreserveCaseKeyDown((e) => {
			e.equals(2) && (this._prevBtn.isEnabled() ? this._prevBtn.focus() : this._nextBtn.isEnabled() ? this._nextBtn.focus() : this._toggleSelectionFind.enabled ? this._toggleSelectionFind.focus() : this._closeBtn.isEnabled() && this._closeBtn.focus(), e.preventDefault());
		}));
		let i = this._register(li());
		this._replaceBtn = this._register(new mj({
			label: QA + this._keybindingLabelFor(pA.ReplaceOneAction),
			icon: zA,
			hoverDelegate: i,
			onTrigger: () => {
				this._controller.replace();
			},
			onKeyDown: (e) => {
				e.equals(1026) && (this._closeBtn.focus(), e.preventDefault());
			}
		}, this._hoverService)), this._replaceAllBtn = this._register(new mj({
			label: $A + this._keybindingLabelFor(pA.ReplaceAllAction),
			icon: BA,
			hoverDelegate: i,
			onTrigger: () => {
				this._controller.replaceAll();
			}
		}, this._hoverService));
		let a = document.createElement("div");
		a.className = "replace-part", a.appendChild(this._replaceInput.domNode);
		let o = document.createElement("div");
		o.className = "replace-actions", a.appendChild(o), o.appendChild(this._replaceBtn.domNode), o.appendChild(this._replaceAllBtn.domNode), this._toggleReplaceBtn = this._register(new mj({
			label: ej,
			className: "codicon toggle left",
			onTrigger: () => {
				this._state.change({ isReplaceRevealed: !this._isReplaceVisible }, !1), this._isReplaceVisible && (this._replaceInput.width = Oc(this._findInput.domNode), this._replaceInput.inputBox.layout()), this._showViewZone();
			}
		}, this._hoverService)), this._toggleReplaceBtn.setExpanded(this._isReplaceVisible), this._domNode = document.createElement("div"), this._domNode.className = "editor-widget find-widget", this._domNode.setAttribute("aria-hidden", "true"), this._domNode.ariaLabel = UA, this._domNode.role = "dialog", this._domNode.style.width = `${ij}px`, this._domNode.appendChild(this._toggleReplaceBtn.domNode), this._domNode.appendChild(t), this._domNode.appendChild(this._closeBtn.domNode), this._domNode.appendChild(a), this._resizeSash = this._register(new Vi(this._domNode, this, {
			orientation: 0,
			size: 2
		})), this._resized = !1;
		let s = ij;
		this._register(this._resizeSash.onDidStart(() => {
			s = Oc(this._domNode);
		})), this._register(this._resizeSash.onDidChange((e) => {
			this._resized = !0;
			let t = s + e.startX - e.currentX;
			t < ij || t > (parseFloat(xi(this._domNode).maxWidth) || 0) || (this._domNode.style.width = `${t}px`, this._isReplaceVisible && (this._replaceInput.width = Oc(this._findInput.domNode)), this._findInput.inputBox.layout(), this._tryUpdateHeight());
		})), this._register(this._resizeSash.onDidReset(() => {
			let e = Oc(this._domNode);
			if (e < ij) return;
			let t = ij;
			if (!this._resized || e === ij) {
				let e = this._codeEditor.getLayoutInfo();
				t = e.width - 28 - e.minimap.minimapWidth - 15, this._resized = !0;
			}
			this._domNode.style.width = `${t}px`, this._isReplaceVisible && (this._replaceInput.width = Oc(this._findInput.domNode)), this._findInput.inputBox.layout();
		}));
	}
	updateAccessibilitySupport() {
		let e = this._codeEditor.getOption(2);
		this._findInput.setFocusInputOnOptionClick(e !== 2);
	}
}, mj = class extends cr {
	constructor(e, t) {
		super(), this._opts = e;
		let n = "button";
		this._opts.className && (n = n + " " + this._opts.className), this._opts.icon && (n = n + " " + _l.asClassName(this._opts.icon)), this._domNode = document.createElement("div"), this._domNode.tabIndex = 0, this._domNode.className = n, this._domNode.setAttribute("role", "button"), this._domNode.setAttribute("aria-label", this._opts.label), this._register(t.setupManagedHover(e.hoverDelegate ?? at("element"), this._domNode, this._opts.label)), this.onclick(this._domNode, (e) => {
			this._opts.onTrigger(), e.preventDefault();
		}), this.onkeydown(this._domNode, (e) => {
			e.equals(10) || e.equals(3) ? (this._opts.onTrigger(), e.preventDefault()) : this._opts.onKeyDown?.(e);
		});
	}
	get domNode() {
		return this._domNode;
	}
	isEnabled() {
		return this._domNode.tabIndex >= 0;
	}
	focus() {
		this._domNode.focus();
	}
	setEnabled(e) {
		this._domNode.classList.toggle("disabled", !e), this._domNode.setAttribute("aria-disabled", String(!e)), this._domNode.tabIndex = e ? 0 : -1;
	}
	setExpanded(e) {
		this._domNode.setAttribute("aria-expanded", String(!!e)), e ? (this._domNode.classList.remove(..._l.asClassNameArray(IA)), this._domNode.classList.add(..._l.asClassNameArray(LA))) : (this._domNode.classList.remove(..._l.asClassNameArray(LA)), this._domNode.classList.add(..._l.asClassNameArray(IA)));
	}
};
Ao((e, t) => {
	let n = e.getColor(Ja);
	n && t.addRule(`.monaco-editor .findMatch { border: 1px ${Sc(e.type) ? "dotted" : "solid"} ${n}; box-sizing: border-box; }`);
	let r = e.getColor(fs);
	r && t.addRule(`.monaco-editor .findScope { border: 1px ${Sc(e.type) ? "dashed" : "solid"} ${r}; }`);
	let i = e.getColor(Qt);
	i && t.addRule(`.monaco-editor .find-widget { border: 1px solid ${i}; }`);
	let a = e.getColor(Ic);
	a && t.addRule(`.monaco-editor .findMatchInline { color: ${a}; }`);
	let o = e.getColor(Vs);
	o && t.addRule(`.monaco-editor .currentFindMatchInline { color: ${o}; }`);
});
// ../../../node_modules/.pnpm/monaco-editor@0.52.2/node_modules/monaco-editor/esm/vs/editor/contrib/find/browser/findController.js
var hj = function(e, t, n, r) {
	var i = arguments.length, a = i < 3 ? t : r === null ? r = Object.getOwnPropertyDescriptor(t, n) : r, o;
	if (typeof Reflect == "object" && typeof Reflect.decorate == "function") a = Reflect.decorate(e, t, n, r);
	else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (i < 3 ? o(a) : i > 3 ? o(t, n, a) : o(t, n)) || a);
	return i > 3 && a && Object.defineProperty(t, n, a), a;
}, gj = function(e, t) {
	return function(n, r) {
		t(n, r, e);
	};
}, _j, vj = 524288;
function yj(e, t = "single", n = !1) {
	if (!e.hasModel()) return null;
	let r = e.getSelection();
	if (t === "single" && r.startLineNumber === r.endLineNumber || t === "multiple") {
		if (r.isEmpty()) {
			let t = e.getConfiguredWordAtPosition(r.getStartPosition());
			if (t && !1 === n) return t.word;
		} else if (e.getModel().getValueLengthInRange(r) < vj) return e.getModel().getValueInRange(r);
	}
	return null;
}
var bj = class extends U {
	static {
		_j = this;
	}
	static {
		this.ID = "editor.contrib.findController";
	}
	get editor() {
		return this._editor;
	}
	static get(e) {
		return e.getContribution(_j.ID);
	}
	constructor(e, t, n, r, i, a) {
		super(), this._editor = e, this._findWidgetVisible = aA.bindTo(t), this._contextKeyService = t, this._storageService = n, this._clipboardService = r, this._notificationService = i, this._hoverService = a, this._updateHistoryDelayer = new ge(500), this._state = this._register(new yA()), this.loadQueryState(), this._register(this._state.onFindReplaceStateChange((e) => this._onStateChanged(e))), this._model = null, this._register(this._editor.onDidChangeModel(() => {
			let e = this._editor.getModel() && this._state.isRevealed;
			this.disposeModel(), this._state.change({
				searchScope: null,
				matchCase: this._storageService.getBoolean("editor.matchCase", 1, !1),
				wholeWord: this._storageService.getBoolean("editor.wholeWord", 1, !1),
				isRegex: this._storageService.getBoolean("editor.isRegex", 1, !1),
				preserveCase: this._storageService.getBoolean("editor.preserveCase", 1, !1)
			}, !1), e && this._start({
				forceRevealReplace: !1,
				seedSearchStringFromSelection: "none",
				seedSearchStringFromNonEmptySelection: !1,
				seedSearchStringFromGlobalClipboard: !1,
				shouldFocus: 0,
				shouldAnimate: !1,
				updateSearchScope: !1,
				loop: this._editor.getOption(41).loop
			});
		}));
	}
	dispose() {
		this.disposeModel(), super.dispose();
	}
	disposeModel() {
		this._model &&= (this._model.dispose(), null);
	}
	_onStateChanged(e) {
		this.saveQueryState(e), e.isRevealed && (this._state.isRevealed ? this._findWidgetVisible.set(!0) : (this._findWidgetVisible.reset(), this.disposeModel())), e.searchString && this.setGlobalBufferTerm(this._state.searchString);
	}
	saveQueryState(e) {
		e.isRegex && this._storageService.store("editor.isRegex", this._state.actualIsRegex, 1, 1), e.wholeWord && this._storageService.store("editor.wholeWord", this._state.actualWholeWord, 1, 1), e.matchCase && this._storageService.store("editor.matchCase", this._state.actualMatchCase, 1, 1), e.preserveCase && this._storageService.store("editor.preserveCase", this._state.actualPreserveCase, 1, 1);
	}
	loadQueryState() {
		this._state.change({
			matchCase: this._storageService.getBoolean("editor.matchCase", 1, this._state.matchCase),
			wholeWord: this._storageService.getBoolean("editor.wholeWord", 1, this._state.wholeWord),
			isRegex: this._storageService.getBoolean("editor.isRegex", 1, this._state.isRegex),
			preserveCase: this._storageService.getBoolean("editor.preserveCase", 1, this._state.preserveCase)
		}, !1);
	}
	isFindInputFocused() {
		return !!oA.getValue(this._contextKeyService);
	}
	getState() {
		return this._state;
	}
	closeFindWidget() {
		this._state.change({
			isRevealed: !1,
			searchScope: null
		}, !1), this._editor.focus();
	}
	toggleCaseSensitive() {
		this._state.change({ matchCase: !this._state.matchCase }, !1), this._state.isRevealed || this.highlightFindOptions();
	}
	toggleWholeWords() {
		this._state.change({ wholeWord: !this._state.wholeWord }, !1), this._state.isRevealed || this.highlightFindOptions();
	}
	toggleRegex() {
		this._state.change({ isRegex: !this._state.isRegex }, !1), this._state.isRevealed || this.highlightFindOptions();
	}
	togglePreserveCase() {
		this._state.change({ preserveCase: !this._state.preserveCase }, !1), this._state.isRevealed || this.highlightFindOptions();
	}
	toggleSearchScope() {
		if (this._state.searchScope) this._state.change({ searchScope: null }, !0);
		else if (this._editor.hasModel()) {
			let e = this._editor.getSelections();
			e = e.map((e) => (e.endColumn === 1 && e.endLineNumber > e.startLineNumber && (e = e.setEndPosition(e.endLineNumber - 1, this._editor.getModel().getLineMaxColumn(e.endLineNumber - 1))), e.isEmpty() ? null : e)).filter((e) => !!e), e.length && this._state.change({ searchScope: e }, !0);
		}
	}
	setSearchString(e) {
		this._state.isRegex && (e = zr(e)), this._state.change({ searchString: e }, !1);
	}
	highlightFindOptions(e = !1) {}
	async _start(e, t) {
		if (this.disposeModel(), !this._editor.hasModel()) return;
		let n = {
			...t,
			isRevealed: !0
		};
		if (e.seedSearchStringFromSelection === "single") {
			let t = yj(this._editor, e.seedSearchStringFromSelection, e.seedSearchStringFromNonEmptySelection);
			t && (n.searchString = this._state.isRegex ? zr(t) : t);
		} else if (e.seedSearchStringFromSelection === "multiple" && !e.updateSearchScope) {
			let t = yj(this._editor, e.seedSearchStringFromSelection);
			t && (n.searchString = t);
		}
		if (!n.searchString && e.seedSearchStringFromGlobalClipboard) {
			let e = await this.getGlobalBufferTerm();
			if (!this._editor.hasModel()) return;
			e && (n.searchString = e);
		}
		if (e.forceRevealReplace || n.isReplaceRevealed ? n.isReplaceRevealed = !0 : this._findWidgetVisible.get() || (n.isReplaceRevealed = !1), e.updateSearchScope) {
			let e = this._editor.getSelections();
			e.some((e) => !e.isEmpty()) && (n.searchScope = e);
		}
		n.loop = e.loop, this._state.change(n, !1), this._model ||= new gA(this._editor, this._state);
	}
	start(e, t) {
		return this._start(e, t);
	}
	moveToNextMatch() {
		return this._model ? (this._model.moveToNextMatch(), !0) : !1;
	}
	moveToPrevMatch() {
		return this._model ? (this._model.moveToPrevMatch(), !0) : !1;
	}
	goToMatch(e) {
		return this._model ? (this._model.moveToMatch(e), !0) : !1;
	}
	replace() {
		return this._model ? (this._model.replace(), !0) : !1;
	}
	replaceAll() {
		return this._model ? this._editor.getModel()?.isTooLargeForHeapOperation() ? (this._notificationService.warn(B("too.large.for.replaceall", "The file is too large to perform a replace all operation.")), !1) : (this._model.replaceAll(), !0) : !1;
	}
	selectAllMatches() {
		return this._model ? (this._model.selectAllMatches(), this._editor.focus(), !0) : !1;
	}
	async getGlobalBufferTerm() {
		return this._editor.getOption(41).globalFindClipboard && this._editor.hasModel() && !this._editor.getModel().isTooLargeForSyncing() ? this._clipboardService.readFindText() : "";
	}
	setGlobalBufferTerm(e) {
		this._editor.getOption(41).globalFindClipboard && this._editor.hasModel() && !this._editor.getModel().isTooLargeForSyncing() && this._clipboardService.writeFindText(e);
	}
};
bj = _j = hj([
	gj(1, j),
	gj(2, ur),
	gj(3, $o),
	gj(4, t),
	gj(5, rt)
], bj);
var xj = class extends bj {
	constructor(e, t, n, r, i, a, o, s, c) {
		super(e, n, o, s, a, c), this._contextViewService = t, this._keybindingService = r, this._themeService = i, this._widget = null, this._findOptionsWidget = null;
	}
	async _start(e, t) {
		this._widget || this._createFindWidget();
		let n = this._editor.getSelection(), r = !1;
		switch (this._editor.getOption(41).autoFindInSelection) {
			case "always":
				r = !0;
				break;
			case "never":
				r = !1;
				break;
			case "multiline": r = !!n && n.startLineNumber !== n.endLineNumber;
		}
		e.updateSearchScope = e.updateSearchScope || r, await super._start(e, t), this._widget && (e.shouldFocus === 2 ? this._widget.focusReplaceInput() : e.shouldFocus === 1 && this._widget.focusFindInput());
	}
	highlightFindOptions(e = !1) {
		this._widget || this._createFindWidget(), this._state.isRevealed && !e ? this._widget.highlightFindOptions() : this._findOptionsWidget.highlightFindOptions();
	}
	_createFindWidget() {
		this._widget = this._register(new pj(this._editor, this, this._state, this._contextViewService, this._keybindingService, this._contextKeyService, this._themeService, this._storageService, this._notificationService, this._hoverService)), this._findOptionsWidget = this._register(new _A(this._editor, this._state, this._keybindingService));
	}
};
xj = hj([
	gj(1, si),
	gj(2, j),
	gj(3, ft),
	gj(4, fc),
	gj(5, t),
	gj(6, ur),
	gj(7, $o),
	gj(8, rt)
], xj), Pc(new ki({
	id: pA.StartFindAction,
	label: B("startFindAction", "Find"),
	alias: "Find",
	precondition: N.or(I.focus, N.has("editorIsOpen")),
	kbOpts: {
		kbExpr: null,
		primary: 2084,
		weight: 100
	},
	menuOpts: {
		menuId: F.MenubarEditMenu,
		group: "3_find",
		title: B({
			key: "miFind",
			comment: ["&& denotes a mnemonic"]
		}, "&&Find"),
		order: 1
	}
})).addImplementation(0, (e, t, n) => {
	let r = bj.get(t);
	return r ? r.start({
		forceRevealReplace: !1,
		seedSearchStringFromSelection: t.getOption(41).seedSearchStringFromSelection === "never" ? "none" : "single",
		seedSearchStringFromNonEmptySelection: t.getOption(41).seedSearchStringFromSelection === "selection",
		seedSearchStringFromGlobalClipboard: t.getOption(41).globalFindClipboard,
		shouldFocus: 1,
		shouldAnimate: !0,
		updateSearchScope: !1,
		loop: t.getOption(41).loop
	}) : !1;
});
var Sj = {
	description: "Open a new In-Editor Find Widget.",
	args: [{
		name: "Open a new In-Editor Find Widget args",
		schema: { properties: {
			searchString: { type: "string" },
			replaceString: { type: "string" },
			isRegex: { type: "boolean" },
			matchWholeWord: { type: "boolean" },
			isCaseSensitive: { type: "boolean" },
			preserveCase: { type: "boolean" },
			findInSelection: { type: "boolean" }
		} }
	}]
}, Cj = class extends O {
	constructor() {
		super({
			id: pA.StartFindWithArgs,
			label: B("startFindWithArgsAction", "Find With Arguments"),
			alias: "Find With Arguments",
			precondition: void 0,
			kbOpts: {
				kbExpr: null,
				primary: 0,
				weight: 100
			},
			metadata: Sj
		});
	}
	async run(e, t, n) {
		let r = bj.get(t);
		if (r) {
			let e = n ? {
				searchString: n.searchString,
				replaceString: n.replaceString,
				isReplaceRevealed: n.replaceString !== void 0,
				isRegex: n.isRegex,
				wholeWord: n.matchWholeWord,
				matchCase: n.isCaseSensitive,
				preserveCase: n.preserveCase
			} : {};
			await r.start({
				forceRevealReplace: !1,
				seedSearchStringFromSelection: r.getState().searchString.length === 0 && t.getOption(41).seedSearchStringFromSelection !== "never" ? "single" : "none",
				seedSearchStringFromNonEmptySelection: t.getOption(41).seedSearchStringFromSelection === "selection",
				seedSearchStringFromGlobalClipboard: !0,
				shouldFocus: 1,
				shouldAnimate: !0,
				updateSearchScope: n?.findInSelection || !1,
				loop: t.getOption(41).loop
			}, e), r.setGlobalBufferTerm(r.getState().searchString);
		}
	}
}, wj = class extends O {
	constructor() {
		super({
			id: pA.StartFindWithSelection,
			label: B("startFindWithSelectionAction", "Find With Selection"),
			alias: "Find With Selection",
			precondition: void 0,
			kbOpts: {
				kbExpr: null,
				primary: 0,
				mac: { primary: 2083 },
				weight: 100
			}
		});
	}
	async run(e, t) {
		let n = bj.get(t);
		n && (await n.start({
			forceRevealReplace: !1,
			seedSearchStringFromSelection: "multiple",
			seedSearchStringFromNonEmptySelection: !1,
			seedSearchStringFromGlobalClipboard: !1,
			shouldFocus: 0,
			shouldAnimate: !0,
			updateSearchScope: !1,
			loop: t.getOption(41).loop
		}), n.setGlobalBufferTerm(n.getState().searchString));
	}
}, Tj = class extends O {
	async run(e, t) {
		let n = bj.get(t);
		n && !this._run(n) && (await n.start({
			forceRevealReplace: !1,
			seedSearchStringFromSelection: n.getState().searchString.length === 0 && t.getOption(41).seedSearchStringFromSelection !== "never" ? "single" : "none",
			seedSearchStringFromNonEmptySelection: t.getOption(41).seedSearchStringFromSelection === "selection",
			seedSearchStringFromGlobalClipboard: !0,
			shouldFocus: 0,
			shouldAnimate: !0,
			updateSearchScope: !1,
			loop: t.getOption(41).loop
		}), this._run(n));
	}
}, Ej = class extends Tj {
	constructor() {
		super({
			id: pA.NextMatchFindAction,
			label: B("findNextMatchAction", "Find Next"),
			alias: "Find Next",
			precondition: void 0,
			kbOpts: [{
				kbExpr: I.focus,
				primary: 61,
				mac: {
					primary: 2085,
					secondary: [61]
				},
				weight: 100
			}, {
				kbExpr: N.and(I.focus, oA),
				primary: 3,
				weight: 100
			}]
		});
	}
	_run(e) {
		return e.moveToNextMatch() ? (e.editor.pushUndoStop(), !0) : !1;
	}
}, Dj = class extends Tj {
	constructor() {
		super({
			id: pA.PreviousMatchFindAction,
			label: B("findPreviousMatchAction", "Find Previous"),
			alias: "Find Previous",
			precondition: void 0,
			kbOpts: [{
				kbExpr: I.focus,
				primary: 1085,
				mac: {
					primary: 3109,
					secondary: [1085]
				},
				weight: 100
			}, {
				kbExpr: N.and(I.focus, oA),
				primary: 1027,
				weight: 100
			}]
		});
	}
	_run(e) {
		return e.moveToPrevMatch();
	}
}, Oj = class extends O {
	constructor() {
		super({
			id: pA.GoToMatchFindAction,
			label: B("findMatchAction.goToMatch", "Go to Match..."),
			alias: "Go to Match...",
			precondition: aA
		}), this._highlightDecorations = [];
	}
	run(e, n, r) {
		let i = bj.get(n);
		if (!i) return;
		let a = i.getState().matchesCount;
		if (a < 1) {
			e.get(t).notify({
				severity: Ua.Warning,
				message: B("findMatchAction.noResults", "No matches. Try searching for something else.")
			});
			return;
		}
		let o = e.get(Is), s = new g(), c = s.add(o.createInputBox());
		c.placeholder = B("findMatchAction.inputPlaceHolder", "Type a number to go to a specific match (between 1 and {0})", a);
		let l = (e) => {
			let t = parseInt(e);
			if (isNaN(t)) return;
			let n = i.getState().matchesCount;
			if (t > 0 && t <= n) return t - 1;
			if (t < 0 && t >= -n) return n + t;
		}, u = (e) => {
			let t = l(e);
			if (typeof t == "number") {
				c.validationMessage = void 0, i.goToMatch(t);
				let e = i.getState().currentMatch;
				e && this.addDecorations(n, e);
			} else c.validationMessage = B("findMatchAction.inputValidationMessage", "Please type a number between 1 and {0}", i.getState().matchesCount), this.clearDecorations(n);
		};
		s.add(c.onDidChangeValue((e) => {
			u(e);
		})), s.add(c.onDidAccept(() => {
			let e = l(c.value);
			typeof e == "number" ? (i.goToMatch(e), c.hide()) : c.validationMessage = B("findMatchAction.inputValidationMessage", "Please type a number between 1 and {0}", i.getState().matchesCount);
		})), s.add(c.onDidHide(() => {
			this.clearDecorations(n), s.dispose();
		})), c.show();
	}
	clearDecorations(e) {
		e.changeDecorations((e) => {
			this._highlightDecorations = e.deltaDecorations(this._highlightDecorations, []);
		});
	}
	addDecorations(e, t) {
		e.changeDecorations((e) => {
			this._highlightDecorations = e.deltaDecorations(this._highlightDecorations, [{
				range: t,
				options: {
					description: "find-match-quick-access-range-highlight",
					className: "rangeHighlight",
					isWholeLine: !0
				}
			}, {
				range: t,
				options: {
					description: "find-match-quick-access-range-highlight-overview",
					overviewRuler: {
						color: ra(ve),
						position: Mr.Full
					}
				}
			}]);
		});
	}
}, kj = class extends O {
	async run(e, t) {
		let n = bj.get(t);
		if (!n) return;
		let r = yj(t, "single", !1);
		r && n.setSearchString(r), this._run(n) || (await n.start({
			forceRevealReplace: !1,
			seedSearchStringFromSelection: "none",
			seedSearchStringFromNonEmptySelection: !1,
			seedSearchStringFromGlobalClipboard: !1,
			shouldFocus: 0,
			shouldAnimate: !0,
			updateSearchScope: !1,
			loop: t.getOption(41).loop
		}), this._run(n));
	}
}, Aj = class extends kj {
	constructor() {
		super({
			id: pA.NextSelectionMatchFindAction,
			label: B("nextSelectionMatchFindAction", "Find Next Selection"),
			alias: "Find Next Selection",
			precondition: void 0,
			kbOpts: {
				kbExpr: I.focus,
				primary: 2109,
				weight: 100
			}
		});
	}
	_run(e) {
		return e.moveToNextMatch();
	}
}, jj = class extends kj {
	constructor() {
		super({
			id: pA.PreviousSelectionMatchFindAction,
			label: B("previousSelectionMatchFindAction", "Find Previous Selection"),
			alias: "Find Previous Selection",
			precondition: void 0,
			kbOpts: {
				kbExpr: I.focus,
				primary: 3133,
				weight: 100
			}
		});
	}
	_run(e) {
		return e.moveToPrevMatch();
	}
};
Pc(new ki({
	id: pA.StartFindReplaceAction,
	label: B("startReplace", "Replace"),
	alias: "Replace",
	precondition: N.or(I.focus, N.has("editorIsOpen")),
	kbOpts: {
		kbExpr: null,
		primary: 2086,
		mac: { primary: 2596 },
		weight: 100
	},
	menuOpts: {
		menuId: F.MenubarEditMenu,
		group: "3_find",
		title: B({
			key: "miReplace",
			comment: ["&& denotes a mnemonic"]
		}, "&&Replace"),
		order: 2
	}
})).addImplementation(0, (e, t, n) => {
	if (!t.hasModel() || t.getOption(92)) return !1;
	let r = bj.get(t);
	if (!r) return !1;
	let i = t.getSelection(), a = r.isFindInputFocused(), o = !i.isEmpty() && i.startLineNumber === i.endLineNumber && t.getOption(41).seedSearchStringFromSelection !== "never" && !a, s = a || o ? 2 : 1;
	return r.start({
		forceRevealReplace: !0,
		seedSearchStringFromSelection: o ? "single" : "none",
		seedSearchStringFromNonEmptySelection: t.getOption(41).seedSearchStringFromSelection === "selection",
		seedSearchStringFromGlobalClipboard: t.getOption(41).seedSearchStringFromSelection !== "never",
		shouldFocus: s,
		shouldAnimate: !0,
		updateSearchScope: !1,
		loop: t.getOption(41).loop
	});
}), T(bj.ID, xj, 0), k(Cj), k(wj), k(Ej), k(Dj), k(Oj), k(Aj), k(jj);
var Mj = qt.bindToContribution(bj.get);
A(new Mj({
	id: pA.CloseFindWidgetCommand,
	precondition: aA,
	handler: (e) => e.closeFindWidget(),
	kbOpts: {
		weight: 105,
		kbExpr: N.and(I.focus, N.not("isComposing")),
		primary: 9,
		secondary: [1033]
	}
})), A(new Mj({
	id: pA.ToggleCaseSensitiveCommand,
	precondition: void 0,
	handler: (e) => e.toggleCaseSensitive(),
	kbOpts: {
		weight: 105,
		kbExpr: I.focus,
		primary: cA.primary,
		mac: cA.mac,
		win: cA.win,
		linux: cA.linux
	}
})), A(new Mj({
	id: pA.ToggleWholeWordCommand,
	precondition: void 0,
	handler: (e) => e.toggleWholeWords(),
	kbOpts: {
		weight: 105,
		kbExpr: I.focus,
		primary: lA.primary,
		mac: lA.mac,
		win: lA.win,
		linux: lA.linux
	}
})), A(new Mj({
	id: pA.ToggleRegexCommand,
	precondition: void 0,
	handler: (e) => e.toggleRegex(),
	kbOpts: {
		weight: 105,
		kbExpr: I.focus,
		primary: uA.primary,
		mac: uA.mac,
		win: uA.win,
		linux: uA.linux
	}
})), A(new Mj({
	id: pA.ToggleSearchScopeCommand,
	precondition: void 0,
	handler: (e) => e.toggleSearchScope(),
	kbOpts: {
		weight: 105,
		kbExpr: I.focus,
		primary: dA.primary,
		mac: dA.mac,
		win: dA.win,
		linux: dA.linux
	}
})), A(new Mj({
	id: pA.TogglePreserveCaseCommand,
	precondition: void 0,
	handler: (e) => e.togglePreserveCase(),
	kbOpts: {
		weight: 105,
		kbExpr: I.focus,
		primary: fA.primary,
		mac: fA.mac,
		win: fA.win,
		linux: fA.linux
	}
})), A(new Mj({
	id: pA.ReplaceOneAction,
	precondition: aA,
	handler: (e) => e.replace(),
	kbOpts: {
		weight: 105,
		kbExpr: I.focus,
		primary: 3094
	}
})), A(new Mj({
	id: pA.ReplaceOneAction,
	precondition: aA,
	handler: (e) => e.replace(),
	kbOpts: {
		weight: 105,
		kbExpr: N.and(I.focus, sA),
		primary: 3
	}
})), A(new Mj({
	id: pA.ReplaceAllAction,
	precondition: aA,
	handler: (e) => e.replaceAll(),
	kbOpts: {
		weight: 105,
		kbExpr: I.focus,
		primary: 2563
	}
})), A(new Mj({
	id: pA.ReplaceAllAction,
	precondition: aA,
	handler: (e) => e.replaceAll(),
	kbOpts: {
		weight: 105,
		kbExpr: N.and(I.focus, sA),
		primary: void 0,
		mac: { primary: 2051 }
	}
})), A(new Mj({
	id: pA.SelectAllMatchesAction,
	precondition: aA,
	handler: (e) => e.selectAllMatches(),
	kbOpts: {
		weight: 105,
		kbExpr: I.focus,
		primary: 515
	}
}));
// ../../../node_modules/.pnpm/monaco-editor@0.52.2/node_modules/monaco-editor/esm/vs/editor/contrib/folding/browser/foldingRanges.js
var Nj = {
	0: " ",
	1: "u",
	2: "r"
}, Pj = 16777215, Fj = 4278190080, Ij = class {
	constructor(e) {
		let t = Math.ceil(e / 32);
		this._states = new Uint32Array(t);
	}
	get(e) {
		let t = e / 32 | 0, n = e % 32;
		return !!(this._states[t] & 1 << n);
	}
	set(e, t) {
		let n = e / 32 | 0, r = e % 32, i = this._states[n];
		t ? this._states[n] = i | 1 << r : this._states[n] = i & ~(1 << r);
	}
}, Lj = class e {
	constructor(e, t, n) {
		if (e.length !== t.length || e.length > 65535) throw Error("invalid startIndexes or endIndexes size");
		this._startIndexes = e, this._endIndexes = t, this._collapseStates = new Ij(e.length), this._userDefinedStates = new Ij(e.length), this._recoveredStates = new Ij(e.length), this._types = n, this._parentsComputed = !1;
	}
	ensureParentIndices() {
		if (!this._parentsComputed) {
			this._parentsComputed = !0;
			let e = [], t = (t, n) => {
				let r = e[e.length - 1];
				return this.getStartLineNumber(r) <= t && this.getEndLineNumber(r) >= n;
			};
			for (let n = 0, r = this._startIndexes.length; n < r; n++) {
				let r = this._startIndexes[n], i = this._endIndexes[n];
				if (r > 16777215 || i > 16777215) throw Error("startLineNumber or endLineNumber must not exceed 16777215");
				for (; e.length > 0 && !t(r, i);) e.pop();
				let a = e.length > 0 ? e[e.length - 1] : -1;
				e.push(n), this._startIndexes[n] = r + ((a & 255) << 24), this._endIndexes[n] = i + ((a & 65280) << 16);
			}
		}
	}
	get length() {
		return this._startIndexes.length;
	}
	getStartLineNumber(e) {
		return this._startIndexes[e] & Pj;
	}
	getEndLineNumber(e) {
		return this._endIndexes[e] & Pj;
	}
	getType(e) {
		return this._types ? this._types[e] : void 0;
	}
	hasTypes() {
		return !!this._types;
	}
	isCollapsed(e) {
		return this._collapseStates.get(e);
	}
	setCollapsed(e, t) {
		this._collapseStates.set(e, t);
	}
	isUserDefined(e) {
		return this._userDefinedStates.get(e);
	}
	setUserDefined(e, t) {
		return this._userDefinedStates.set(e, t);
	}
	isRecovered(e) {
		return this._recoveredStates.get(e);
	}
	setRecovered(e, t) {
		return this._recoveredStates.set(e, t);
	}
	getSource(e) {
		return this.isUserDefined(e) ? 1 : this.isRecovered(e) ? 2 : 0;
	}
	setSource(e, t) {
		t === 1 ? (this.setUserDefined(e, !0), this.setRecovered(e, !1)) : t === 2 ? (this.setUserDefined(e, !1), this.setRecovered(e, !0)) : (this.setUserDefined(e, !1), this.setRecovered(e, !1));
	}
	setCollapsedAllOfType(e, t) {
		let n = !1;
		if (this._types) for (let r = 0; r < this._types.length; r++) this._types[r] === e && (this.setCollapsed(r, t), n = !0);
		return n;
	}
	toRegion(e) {
		return new Rj(this, e);
	}
	getParentIndex(e) {
		this.ensureParentIndices();
		let t = ((this._startIndexes[e] & Fj) >>> 24) + ((this._endIndexes[e] & Fj) >>> 16);
		return t === 65535 ? -1 : t;
	}
	contains(e, t) {
		return this.getStartLineNumber(e) <= t && this.getEndLineNumber(e) >= t;
	}
	findIndex(e) {
		let t = 0, n = this._startIndexes.length;
		if (n === 0) return -1;
		for (; t < n;) {
			let r = Math.floor((t + n) / 2);
			e < this.getStartLineNumber(r) ? n = r : t = r + 1;
		}
		return t - 1;
	}
	findRange(e) {
		let t = this.findIndex(e);
		if (t >= 0) {
			if (this.getEndLineNumber(t) >= e) return t;
			for (t = this.getParentIndex(t); t !== -1;) {
				if (this.contains(t, e)) return t;
				t = this.getParentIndex(t);
			}
		}
		return -1;
	}
	toString() {
		let e = [];
		for (let t = 0; t < this.length; t++) e[t] = `[${Nj[this.getSource(t)]}${this.isCollapsed(t) ? "+" : "-"}] ${this.getStartLineNumber(t)}/${this.getEndLineNumber(t)}`;
		return e.join(", ");
	}
	toFoldRange(e) {
		return {
			startLineNumber: this._startIndexes[e] & Pj,
			endLineNumber: this._endIndexes[e] & Pj,
			type: this._types ? this._types[e] : void 0,
			isCollapsed: this.isCollapsed(e),
			source: this.getSource(e)
		};
	}
	static fromFoldRanges(t) {
		let n = t.length, r = new Uint32Array(n), i = new Uint32Array(n), a = [], o = !1;
		for (let e = 0; e < n; e++) {
			let n = t[e];
			r[e] = n.startLineNumber, i[e] = n.endLineNumber, a.push(n.type), n.type && (o = !0);
		}
		o || (a = void 0);
		let s = new e(r, i, a);
		for (let e = 0; e < n; e++) t[e].isCollapsed && s.setCollapsed(e, !0), s.setSource(e, t[e].source);
		return s;
	}
	static sanitizeAndMerge(e, t, n, r) {
		n ??= Number.MAX_VALUE;
		let i = (e, t) => Array.isArray(e) ? ((n) => n < t ? e[n] : void 0) : ((n) => n < t ? e.toFoldRange(n) : void 0), a = i(e, e.length), o = i(t, t.length), s = 0, c = 0, l = a(0), u = o(0), d = [], f, p = 0, m = [];
		for (; l || u;) {
			let e;
			if (u && (!l || l.startLineNumber >= u.startLineNumber)) l && l.startLineNumber === u.startLineNumber ? (u.source === 1 ? e = u : (e = l, e.isCollapsed = u.isCollapsed && (l.endLineNumber === u.endLineNumber || !r?.startsInside(l.startLineNumber + 1, l.endLineNumber + 1)), e.source = 0), l = a(++s)) : (e = u, u.isCollapsed && u.source === 0 && (e.source = 2)), u = o(++c);
			else {
				let t = c, n = u;
				for (;;) {
					if (!n || n.startLineNumber > l.endLineNumber) {
						e = l;
						break;
					}
					if (n.source === 1 && n.endLineNumber > l.endLineNumber) break;
					n = o(++t);
				}
				l = a(++s);
			}
			if (e) {
				for (; f && f.endLineNumber < e.startLineNumber;) f = d.pop();
				e.endLineNumber > e.startLineNumber && e.startLineNumber > p && e.endLineNumber <= n && (!f || f.endLineNumber >= e.endLineNumber) && (m.push(e), p = e.startLineNumber, f && d.push(f), f = e);
			}
		}
		return m;
	}
}, Rj = class {
	constructor(e, t) {
		this.ranges = e, this.index = t;
	}
	get startLineNumber() {
		return this.ranges.getStartLineNumber(this.index);
	}
	get endLineNumber() {
		return this.ranges.getEndLineNumber(this.index);
	}
	get regionIndex() {
		return this.index;
	}
	get parentIndex() {
		return this.ranges.getParentIndex(this.index);
	}
	get isCollapsed() {
		return this.ranges.isCollapsed(this.index);
	}
	containedBy(e) {
		return e.startLineNumber <= this.startLineNumber && e.endLineNumber >= this.endLineNumber;
	}
	containsLine(e) {
		return this.startLineNumber <= e && e <= this.endLineNumber;
	}
}, zj = class {
	get regions() {
		return this._regions;
	}
	get textModel() {
		return this._textModel;
	}
	constructor(e, t) {
		this._updateEventEmitter = new x(), this.onDidChange = this._updateEventEmitter.event, this._textModel = e, this._decorationProvider = t, this._regions = new Lj(/* @__PURE__ */ new Uint32Array(), /* @__PURE__ */ new Uint32Array()), this._editorDecorationIds = [];
	}
	toggleCollapseState(e) {
		if (!e.length) return;
		e = e.sort((e, t) => e.regionIndex - t.regionIndex);
		let t = {};
		this._decorationProvider.changeDecorations((n) => {
			let r = 0, i = -1, a = -1, o = (e) => {
				for (; r < e;) {
					let e = this._regions.getEndLineNumber(r), t = this._regions.isCollapsed(r);
					if (e <= i) {
						let i = this.regions.getSource(r) !== 0;
						n.changeDecorationOptions(this._editorDecorationIds[r], this._decorationProvider.getDecorationOption(t, e <= a, i));
					}
					t && e > a && (a = e), r++;
				}
			};
			for (let n of e) {
				let e = n.regionIndex, r = this._editorDecorationIds[e];
				if (r && !t[r]) {
					t[r] = !0, o(e);
					let n = !this._regions.isCollapsed(e);
					this._regions.setCollapsed(e, n), i = Math.max(i, this._regions.getEndLineNumber(e));
				}
			}
			o(this._regions.length);
		}), this._updateEventEmitter.fire({
			model: this,
			collapseStateChanged: e
		});
	}
	removeManualRanges(e) {
		let t = [], n = (t) => {
			for (let n of e) if (!(n.startLineNumber > t.endLineNumber || t.startLineNumber > n.endLineNumber)) return !0;
			return !1;
		};
		for (let e = 0; e < this._regions.length; e++) {
			let r = this._regions.toFoldRange(e);
			r.source !== 0 && n(r) || t.push(r);
		}
		this.updatePost(Lj.fromFoldRanges(t));
	}
	update(e, t) {
		let n = this._currentFoldedOrManualRanges(t), r = Lj.sanitizeAndMerge(e, n, this._textModel.getLineCount(), t);
		this.updatePost(Lj.fromFoldRanges(r));
	}
	updatePost(e) {
		let t = [], n = -1;
		for (let r = 0, i = e.length; r < i; r++) {
			let i = e.getStartLineNumber(r), a = e.getEndLineNumber(r), o = e.isCollapsed(r), s = e.getSource(r) !== 0, c = {
				startLineNumber: i,
				startColumn: this._textModel.getLineMaxColumn(i),
				endLineNumber: a,
				endColumn: this._textModel.getLineMaxColumn(a) + 1
			};
			t.push({
				range: c,
				options: this._decorationProvider.getDecorationOption(o, a <= n, s)
			}), o && a > n && (n = a);
		}
		this._decorationProvider.changeDecorations((e) => this._editorDecorationIds = e.deltaDecorations(this._editorDecorationIds, t)), this._regions = e, this._updateEventEmitter.fire({ model: this });
	}
	_currentFoldedOrManualRanges(e) {
		let t = [];
		for (let n = 0, r = this._regions.length; n < r; n++) {
			let r = this.regions.isCollapsed(n), i = this.regions.getSource(n);
			if (r || i !== 0) {
				let a = this._regions.toFoldRange(n), o = this._textModel.getDecorationRange(this._editorDecorationIds[n]);
				o && (r && e?.startsInside(o.startLineNumber + 1, o.endLineNumber) && (r = !1), t.push({
					startLineNumber: o.startLineNumber,
					endLineNumber: o.endLineNumber,
					type: a.type,
					isCollapsed: r,
					source: i
				}));
			}
		}
		return t;
	}
	getMemento() {
		let e = this._currentFoldedOrManualRanges(), t = [], n = this._textModel.getLineCount();
		for (let r = 0, i = e.length; r < i; r++) {
			let i = e[r];
			if (i.startLineNumber >= i.endLineNumber || i.startLineNumber < 1 || i.endLineNumber > n) continue;
			let a = this._getLinesChecksum(i.startLineNumber + 1, i.endLineNumber);
			t.push({
				startLineNumber: i.startLineNumber,
				endLineNumber: i.endLineNumber,
				isCollapsed: i.isCollapsed,
				source: i.source,
				checksum: a
			});
		}
		return t.length > 0 ? t : void 0;
	}
	applyMemento(e) {
		if (!Array.isArray(e)) return;
		let t = [], n = this._textModel.getLineCount();
		for (let r of e) {
			if (r.startLineNumber >= r.endLineNumber || r.startLineNumber < 1 || r.endLineNumber > n) continue;
			let e = this._getLinesChecksum(r.startLineNumber + 1, r.endLineNumber);
			r.checksum && e !== r.checksum || t.push({
				startLineNumber: r.startLineNumber,
				endLineNumber: r.endLineNumber,
				type: void 0,
				isCollapsed: r.isCollapsed ?? !0,
				source: r.source ?? 0
			});
		}
		let r = Lj.sanitizeAndMerge(this._regions, t, n);
		this.updatePost(Lj.fromFoldRanges(r));
	}
	_getLinesChecksum(e, t) {
		return Wi(this._textModel.getLineContent(e) + this._textModel.getLineContent(t)) % 1e6;
	}
	dispose() {
		this._decorationProvider.removeDecorations(this._editorDecorationIds);
	}
	getAllRegionsAtLine(e, t) {
		let n = [];
		if (this._regions) {
			let r = this._regions.findRange(e), i = 1;
			for (; r >= 0;) {
				let e = this._regions.toRegion(r);
				(!t || t(e, i)) && n.push(e), i++, r = e.parentIndex;
			}
		}
		return n;
	}
	getRegionAtLine(e) {
		if (this._regions) {
			let t = this._regions.findRange(e);
			if (t >= 0) return this._regions.toRegion(t);
		}
		return null;
	}
	getRegionsInside(e, t) {
		let n = [], r = e ? e.regionIndex + 1 : 0, i = e ? e.endLineNumber : Number.MAX_VALUE;
		if (t && t.length === 2) {
			let e = [];
			for (let a = r, o = this._regions.length; a < o; a++) {
				let r = this._regions.toRegion(a);
				if (this._regions.getStartLineNumber(a) < i) {
					for (; e.length > 0 && !r.containedBy(e[e.length - 1]);) e.pop();
					e.push(r), t(r, e.length) && n.push(r);
				} else break;
			}
		} else for (let e = r, a = this._regions.length; e < a; e++) {
			let r = this._regions.toRegion(e);
			if (this._regions.getStartLineNumber(e) < i) (!t || t(r)) && n.push(r);
			else break;
		}
		return n;
	}
};
function Bj(e, t, n) {
	let r = [];
	for (let i of n) {
		let n = e.getRegionAtLine(i);
		if (n) {
			let i = !n.isCollapsed;
			if (r.push(n), t > 1) {
				let a = e.getRegionsInside(n, (e, n) => e.isCollapsed !== i && n < t);
				r.push(...a);
			}
		}
	}
	e.toggleCollapseState(r);
}
function Vj(e, t, n = Number.MAX_VALUE, r) {
	let i = [];
	if (r && r.length > 0) for (let a of r) {
		let r = e.getRegionAtLine(a);
		if (r && (r.isCollapsed !== t && i.push(r), n > 1)) {
			let a = e.getRegionsInside(r, (e, r) => e.isCollapsed !== t && r < n);
			i.push(...a);
		}
	}
	else {
		let r = e.getRegionsInside(null, (e, r) => e.isCollapsed !== t && r < n);
		i.push(...r);
	}
	e.toggleCollapseState(i);
}
function Hj(e, t, n, r) {
	let i = [];
	for (let a of r) {
		let r = e.getAllRegionsAtLine(a, (e, r) => e.isCollapsed !== t && r <= n);
		i.push(...r);
	}
	e.toggleCollapseState(i);
}
function Uj(e, t, n) {
	let r = [];
	for (let i of n) {
		let n = e.getAllRegionsAtLine(i, (e) => e.isCollapsed !== t);
		n.length > 0 && r.push(n[0]);
	}
	e.toggleCollapseState(r);
}
function Wj(e, t, n, r) {
	let i = e.getRegionsInside(null, (e, i) => i === t && e.isCollapsed !== n && !r.some((t) => e.containsLine(t)));
	e.toggleCollapseState(i);
}
function Gj(e, t, n) {
	let r = [];
	for (let t of n) {
		let n = e.getAllRegionsAtLine(t, void 0);
		n.length > 0 && r.push(n[0]);
	}
	let i = e.getRegionsInside(null, (e) => r.every((t) => !t.containedBy(e) && !e.containedBy(t)) && e.isCollapsed !== t);
	e.toggleCollapseState(i);
}
function Kj(e, t, n) {
	let r = e.textModel, i = e.regions, a = [];
	for (let e = i.length - 1; e >= 0; e--) if (n !== i.isCollapsed(e)) {
		let n = i.getStartLineNumber(e);
		t.test(r.getLineContent(n)) && a.push(i.toRegion(e));
	}
	e.toggleCollapseState(a);
}
function qj(e, t, n) {
	let r = e.regions, i = [];
	for (let e = r.length - 1; e >= 0; e--) n !== r.isCollapsed(e) && t === r.getType(e) && i.push(r.toRegion(e));
	e.toggleCollapseState(i);
}
function Jj(e, t) {
	let n = null, r = t.getRegionAtLine(e);
	if (r !== null && (n = r.startLineNumber, e === n)) {
		let e = r.parentIndex;
		n = e === -1 ? null : t.regions.getStartLineNumber(e);
	}
	return n;
}
function Yj(e, t) {
	let n = t.getRegionAtLine(e);
	if (n !== null && n.startLineNumber === e) {
		if (e !== n.startLineNumber) return n.startLineNumber;
		{
			let e = n.parentIndex, r = 0;
			for (e !== -1 && (r = t.regions.getStartLineNumber(n.parentIndex)); n !== null;) if (n.regionIndex > 0) {
				if (n = t.regions.toRegion(n.regionIndex - 1), n.startLineNumber <= r) return null;
				if (n.parentIndex === e) return n.startLineNumber;
			} else return null;
		}
	} else if (t.regions.length > 0) for (n = t.regions.toRegion(t.regions.length - 1); n !== null;) {
		if (n.startLineNumber < e) return n.startLineNumber;
		n = n.regionIndex > 0 ? t.regions.toRegion(n.regionIndex - 1) : null;
	}
	return null;
}
function Xj(e, t) {
	let n = t.getRegionAtLine(e);
	if (n !== null && n.startLineNumber === e) {
		let e = n.parentIndex, r = 0;
		if (e !== -1) r = t.regions.getEndLineNumber(n.parentIndex);
		else if (t.regions.length === 0) return null;
		else r = t.regions.getEndLineNumber(t.regions.length - 1);
		for (; n !== null;) if (n.regionIndex < t.regions.length) {
			if (n = t.regions.toRegion(n.regionIndex + 1), n.startLineNumber >= r) return null;
			if (n.parentIndex === e) return n.startLineNumber;
		} else return null;
	} else if (t.regions.length > 0) for (n = t.regions.toRegion(0); n !== null;) {
		if (n.startLineNumber > e) return n.startLineNumber;
		n = n.regionIndex < t.regions.length ? t.regions.toRegion(n.regionIndex + 1) : null;
	}
	return null;
}
// ../../../node_modules/.pnpm/monaco-editor@0.52.2/node_modules/monaco-editor/esm/vs/editor/contrib/folding/browser/hiddenRangeModel.js
var Zj = class {
	get onDidChange() {
		return this._updateEventEmitter.event;
	}
	get hiddenRanges() {
		return this._hiddenRanges;
	}
	constructor(e) {
		this._updateEventEmitter = new x(), this._hasLineChanges = !1, this._foldingModel = e, this._foldingModelListener = e.onDidChange((e) => this.updateHiddenRanges()), this._hiddenRanges = [], e.regions.length && this.updateHiddenRanges();
	}
	notifyChangeModelContent(e) {
		this._hiddenRanges.length && !this._hasLineChanges && (this._hasLineChanges = e.changes.some((e) => e.range.endLineNumber !== e.range.startLineNumber || Mt(e.text)[0] !== 0));
	}
	updateHiddenRanges() {
		let e = !1, t = [], n = 0, r = 0, i = Number.MAX_VALUE, a = -1, o = this._foldingModel.regions;
		for (; n < o.length; n++) {
			if (!o.isCollapsed(n)) continue;
			let s = o.getStartLineNumber(n) + 1, c = o.getEndLineNumber(n);
			i <= s && c <= a || (!e && r < this._hiddenRanges.length && this._hiddenRanges[r].startLineNumber === s && this._hiddenRanges[r].endLineNumber === c ? (t.push(this._hiddenRanges[r]), r++) : (e = !0, t.push(new E(s, 1, c, 1))), i = s, a = c);
		}
		(this._hasLineChanges || e || r < this._hiddenRanges.length) && this.applyHiddenRanges(t);
	}
	applyHiddenRanges(e) {
		this._hiddenRanges = e, this._hasLineChanges = !1, this._updateEventEmitter.fire(e);
	}
	hasRanges() {
		return this._hiddenRanges.length > 0;
	}
	isHidden(e) {
		return $j(this._hiddenRanges, e) !== null;
	}
	adjustSelections(e) {
		let t = !1, n = this._foldingModel.textModel, r = null, i = (e) => (r && Qj(e, r) || (r = $j(this._hiddenRanges, e)), r ? r.startLineNumber - 1 : null);
		for (let r = 0, a = e.length; r < a; r++) {
			let a = e[r], o = i(a.startLineNumber);
			o && (a = a.setStartPosition(o, n.getLineMaxColumn(o)), t = !0);
			let s = i(a.endLineNumber);
			s && (a = a.setEndPosition(s, n.getLineMaxColumn(s)), t = !0), e[r] = a;
		}
		return t;
	}
	dispose() {
		this.hiddenRanges.length > 0 && (this._hiddenRanges = [], this._updateEventEmitter.fire(this._hiddenRanges)), this._foldingModelListener &&= (this._foldingModelListener.dispose(), null);
	}
};
function Qj(e, t) {
	return e >= t.startLineNumber && e <= t.endLineNumber;
}
function $j(e, t) {
	let n = Ji(e, (e) => t < e.startLineNumber) - 1;
	return n >= 0 && e[n].endLineNumber >= t ? e[n] : null;
}
// ../../../node_modules/.pnpm/monaco-editor@0.52.2/node_modules/monaco-editor/esm/vs/editor/contrib/folding/browser/indentRangeProvider.js
var eM = 5e3, tM = "indent", nM = class {
	constructor(e, t, n) {
		this.editorModel = e, this.languageConfigurationService = t, this.foldingRangesLimit = n, this.id = tM;
	}
	dispose() {}
	compute(e) {
		let t = this.languageConfigurationService.getLanguageConfiguration(this.editorModel.getLanguageId()).foldingRules, n = t && !!t.offSide, r = t && t.markers;
		return Promise.resolve(aM(this.editorModel, n, r, this.foldingRangesLimit));
	}
}, rM = class {
	constructor(e) {
		this._startIndexes = [], this._endIndexes = [], this._indentOccurrences = [], this._length = 0, this._foldingRangesLimit = e;
	}
	insertFirst(e, t, n) {
		if (e > 16777215 || t > 16777215) return;
		let r = this._length;
		this._startIndexes[r] = e, this._endIndexes[r] = t, this._length++, n < 1e3 && (this._indentOccurrences[n] = (this._indentOccurrences[n] || 0) + 1);
	}
	toIndentRanges(e) {
		let t = this._foldingRangesLimit.limit;
		if (this._length <= t) {
			this._foldingRangesLimit.update(this._length, !1);
			let e = new Uint32Array(this._length), t = new Uint32Array(this._length);
			for (let n = this._length - 1, r = 0; n >= 0; n--, r++) e[r] = this._startIndexes[n], t[r] = this._endIndexes[n];
			return new Lj(e, t);
		}
		{
			this._foldingRangesLimit.update(this._length, t);
			let n = 0, r = this._indentOccurrences.length;
			for (let e = 0; e < this._indentOccurrences.length; e++) {
				let i = this._indentOccurrences[e];
				if (i) {
					if (i + n > t) {
						r = e;
						break;
					}
					n += i;
				}
			}
			let i = e.getOptions().tabSize, a = new Uint32Array(t), o = new Uint32Array(t);
			for (let s = this._length - 1, c = 0; s >= 0; s--) {
				let l = this._startIndexes[s], u = e.getLineContent(l), d = Qa(u, i);
				(d < r || d === r && n++ < t) && (a[c] = l, o[c] = this._endIndexes[s], c++);
			}
			return new Lj(a, o);
		}
	}
}, iM = {
	limit: eM,
	update: () => {}
};
function aM(e, t, n, r = iM) {
	let i = e.getOptions().tabSize, a = new rM(r), o;
	n && (o = RegExp(`(${n.start.source})|(?:${n.end.source})`));
	let s = [], c = e.getLineCount() + 1;
	s.push({
		indent: -1,
		endAbove: c,
		line: c
	});
	for (let n = e.getLineCount(); n > 0; n--) {
		let r = e.getLineContent(n), c = Qa(r, i), l = s[s.length - 1];
		if (c === -1) {
			t && (l.endAbove = n);
			continue;
		}
		let u;
		if (o && (u = r.match(o))) {
			if (u[1]) {
				let e = s.length - 1;
				for (; e > 0 && s[e].indent !== -2;) e--;
				if (e > 0) {
					s.length = e + 1, l = s[e], a.insertFirst(n, l.line, c), l.line = n, l.indent = c, l.endAbove = n;
					continue;
				}
			} else {
				s.push({
					indent: -2,
					endAbove: n,
					line: n
				});
				continue;
			}
		}
		if (l.indent > c) {
			do
				s.pop(), l = s[s.length - 1];
			while (l.indent > c);
			let e = l.endAbove - 1;
			e - n >= 1 && a.insertFirst(n, e, c);
		}
		l.indent === c ? l.endAbove = n : s.push({
			indent: c,
			endAbove: n,
			line: n
		});
	}
	return a.toIndentRanges(e);
}
// ../../../node_modules/.pnpm/monaco-editor@0.52.2/node_modules/monaco-editor/esm/vs/editor/contrib/folding/browser/foldingDecorations.js
var oM = S("editor.foldBackground", {
	light: Rr(Fe, .3),
	dark: Rr(Fe, .3),
	hcDark: null,
	hcLight: null
}, B("foldBackgroundBackground", "Background color behind folded ranges. The color must not be opaque so as not to hide underlying decorations."), !0);
S("editor.foldPlaceholderForeground", {
	light: "#808080",
	dark: "#808080",
	hcDark: null,
	hcLight: null
}, B("collapsedTextColor", "Color of the collapsed text after the first line of a folded range.")), S("editorGutter.foldingControlForeground", jl, B("editorGutter.foldingControlForeground", "Color of the folding control in the editor gutter."));
var sM = Jn("folding-expanded", v.chevronDown, B("foldingExpandedIcon", "Icon for expanded ranges in the editor glyph margin.")), cM = Jn("folding-collapsed", v.chevronRight, B("foldingCollapsedIcon", "Icon for collapsed ranges in the editor glyph margin.")), lM = Jn("folding-manual-collapsed", cM, B("foldingManualCollapedIcon", "Icon for manually collapsed ranges in the editor glyph margin.")), uM = Jn("folding-manual-expanded", sM, B("foldingManualExpandedIcon", "Icon for manually expanded ranges in the editor glyph margin.")), dM = {
	color: ra(oM),
	position: 1
}, fM = B("linesCollapsed", "Click to expand the range."), pM = B("linesExpanded", "Click to collapse the range."), mM = class e {
	static {
		this.COLLAPSED_VISUAL_DECORATION = L.register({
			description: "folding-collapsed-visual-decoration",
			stickiness: 0,
			afterContentClassName: "inline-folded",
			isWholeLine: !0,
			linesDecorationsTooltip: fM,
			firstLineDecorationClassName: _l.asClassName(cM)
		});
	}
	static {
		this.COLLAPSED_HIGHLIGHTED_VISUAL_DECORATION = L.register({
			description: "folding-collapsed-highlighted-visual-decoration",
			stickiness: 0,
			afterContentClassName: "inline-folded",
			className: "folded-background",
			minimap: dM,
			isWholeLine: !0,
			linesDecorationsTooltip: fM,
			firstLineDecorationClassName: _l.asClassName(cM)
		});
	}
	static {
		this.MANUALLY_COLLAPSED_VISUAL_DECORATION = L.register({
			description: "folding-manually-collapsed-visual-decoration",
			stickiness: 0,
			afterContentClassName: "inline-folded",
			isWholeLine: !0,
			linesDecorationsTooltip: fM,
			firstLineDecorationClassName: _l.asClassName(lM)
		});
	}
	static {
		this.MANUALLY_COLLAPSED_HIGHLIGHTED_VISUAL_DECORATION = L.register({
			description: "folding-manually-collapsed-highlighted-visual-decoration",
			stickiness: 0,
			afterContentClassName: "inline-folded",
			className: "folded-background",
			minimap: dM,
			isWholeLine: !0,
			linesDecorationsTooltip: fM,
			firstLineDecorationClassName: _l.asClassName(lM)
		});
	}
	static {
		this.NO_CONTROLS_COLLAPSED_RANGE_DECORATION = L.register({
			description: "folding-no-controls-range-decoration",
			stickiness: 0,
			afterContentClassName: "inline-folded",
			isWholeLine: !0,
			linesDecorationsTooltip: fM
		});
	}
	static {
		this.NO_CONTROLS_COLLAPSED_HIGHLIGHTED_RANGE_DECORATION = L.register({
			description: "folding-no-controls-range-decoration",
			stickiness: 0,
			afterContentClassName: "inline-folded",
			className: "folded-background",
			minimap: dM,
			isWholeLine: !0,
			linesDecorationsTooltip: fM
		});
	}
	static {
		this.EXPANDED_VISUAL_DECORATION = L.register({
			description: "folding-expanded-visual-decoration",
			stickiness: 1,
			isWholeLine: !0,
			firstLineDecorationClassName: "alwaysShowFoldIcons " + _l.asClassName(sM),
			linesDecorationsTooltip: pM
		});
	}
	static {
		this.EXPANDED_AUTO_HIDE_VISUAL_DECORATION = L.register({
			description: "folding-expanded-auto-hide-visual-decoration",
			stickiness: 1,
			isWholeLine: !0,
			firstLineDecorationClassName: _l.asClassName(sM),
			linesDecorationsTooltip: pM
		});
	}
	static {
		this.MANUALLY_EXPANDED_VISUAL_DECORATION = L.register({
			description: "folding-manually-expanded-visual-decoration",
			stickiness: 0,
			isWholeLine: !0,
			firstLineDecorationClassName: "alwaysShowFoldIcons " + _l.asClassName(uM),
			linesDecorationsTooltip: pM
		});
	}
	static {
		this.MANUALLY_EXPANDED_AUTO_HIDE_VISUAL_DECORATION = L.register({
			description: "folding-manually-expanded-auto-hide-visual-decoration",
			stickiness: 0,
			isWholeLine: !0,
			firstLineDecorationClassName: _l.asClassName(uM),
			linesDecorationsTooltip: pM
		});
	}
	static {
		this.NO_CONTROLS_EXPANDED_RANGE_DECORATION = L.register({
			description: "folding-no-controls-range-decoration",
			stickiness: 0,
			isWholeLine: !0
		});
	}
	static {
		this.HIDDEN_RANGE_DECORATION = L.register({
			description: "folding-hidden-range-decoration",
			stickiness: 1
		});
	}
	constructor(e) {
		this.editor = e, this.showFoldingControls = "mouseover", this.showFoldingHighlights = !0;
	}
	getDecorationOption(t, n, r) {
		return n ? e.HIDDEN_RANGE_DECORATION : this.showFoldingControls === "never" ? t ? this.showFoldingHighlights ? e.NO_CONTROLS_COLLAPSED_HIGHLIGHTED_RANGE_DECORATION : e.NO_CONTROLS_COLLAPSED_RANGE_DECORATION : e.NO_CONTROLS_EXPANDED_RANGE_DECORATION : t ? r ? this.showFoldingHighlights ? e.MANUALLY_COLLAPSED_HIGHLIGHTED_VISUAL_DECORATION : e.MANUALLY_COLLAPSED_VISUAL_DECORATION : this.showFoldingHighlights ? e.COLLAPSED_HIGHLIGHTED_VISUAL_DECORATION : e.COLLAPSED_VISUAL_DECORATION : this.showFoldingControls === "mouseover" ? r ? e.MANUALLY_EXPANDED_AUTO_HIDE_VISUAL_DECORATION : e.EXPANDED_AUTO_HIDE_VISUAL_DECORATION : r ? e.MANUALLY_EXPANDED_VISUAL_DECORATION : e.EXPANDED_VISUAL_DECORATION;
	}
	changeDecorations(e) {
		return this.editor.changeDecorations(e);
	}
	removeDecorations(e) {
		this.editor.removeDecorations(e);
	}
}, hM = {}, gM = "syntax", _M = class {
	constructor(e, t, n, r, i) {
		this.editorModel = e, this.providers = t, this.handleFoldingRangesChange = n, this.foldingRangesLimit = r, this.fallbackRangeProvider = i, this.id = gM, this.disposables = new g(), i && this.disposables.add(i);
		for (let e of t) typeof e.onDidChange == "function" && this.disposables.add(e.onDidChange(n));
	}
	compute(e) {
		return vM(this.providers, this.editorModel, e).then((t) => t ? bM(t, this.foldingRangesLimit) : this.fallbackRangeProvider?.compute(e) ?? null);
	}
	dispose() {
		this.disposables.dispose();
	}
};
function vM(e, t, n) {
	let r = null, a = e.map((e, a) => Promise.resolve(e.provideFoldingRanges(t, hM, n)).then((e) => {
		if (!n.isCancellationRequested && Array.isArray(e)) {
			Array.isArray(r) || (r = []);
			let n = t.getLineCount();
			for (let t of e) t.start > 0 && t.end > t.start && t.end <= n && r.push({
				start: t.start,
				end: t.end,
				rank: a,
				kind: t.kind
			});
		}
	}, i));
	return Promise.all(a).then((e) => r);
}
var yM = class {
	constructor(e) {
		this._startIndexes = [], this._endIndexes = [], this._nestingLevels = [], this._nestingLevelCounts = [], this._types = [], this._length = 0, this._foldingRangesLimit = e;
	}
	add(e, t, n, r) {
		if (e > 16777215 || t > 16777215) return;
		let i = this._length;
		this._startIndexes[i] = e, this._endIndexes[i] = t, this._nestingLevels[i] = r, this._types[i] = n, this._length++, r < 30 && (this._nestingLevelCounts[r] = (this._nestingLevelCounts[r] || 0) + 1);
	}
	toIndentRanges() {
		let e = this._foldingRangesLimit.limit;
		if (this._length <= e) {
			this._foldingRangesLimit.update(this._length, !1);
			let e = new Uint32Array(this._length), t = new Uint32Array(this._length);
			for (let n = 0; n < this._length; n++) e[n] = this._startIndexes[n], t[n] = this._endIndexes[n];
			return new Lj(e, t, this._types);
		}
		{
			this._foldingRangesLimit.update(this._length, e);
			let t = 0, n = this._nestingLevelCounts.length;
			for (let r = 0; r < this._nestingLevelCounts.length; r++) {
				let i = this._nestingLevelCounts[r];
				if (i) {
					if (i + t > e) {
						n = r;
						break;
					}
					t += i;
				}
			}
			let r = new Uint32Array(e), i = new Uint32Array(e), a = [];
			for (let o = 0, s = 0; o < this._length; o++) {
				let c = this._nestingLevels[o];
				(c < n || c === n && t++ < e) && (r[s] = this._startIndexes[o], i[s] = this._endIndexes[o], a[s] = this._types[o], s++);
			}
			return new Lj(r, i, a);
		}
	}
};
function bM(e, t) {
	let n = e.sort((e, t) => {
		let n = e.start - t.start;
		return n === 0 && (n = e.rank - t.rank), n;
	}), r = new yM(t), i, a = [];
	for (let e of n) if (!i) i = e, r.add(e.start, e.end, e.kind && e.kind.value, a.length);
	else if (e.start > i.start) {
		if (e.end <= i.end) a.push(i), i = e, r.add(e.start, e.end, e.kind && e.kind.value, a.length);
		else {
			if (e.start > i.end) {
				do
					i = a.pop();
				while (i && e.start > i.end);
				i && a.push(i), i = e;
			}
			r.add(e.start, e.end, e.kind && e.kind.value, a.length);
		}
	}
	return r.toIndentRanges();
}
// ../../../node_modules/.pnpm/monaco-editor@0.52.2/node_modules/monaco-editor/esm/vs/editor/contrib/folding/browser/folding.js
var xM = function(e, t, n, r) {
	var i = arguments.length, a = i < 3 ? t : r === null ? r = Object.getOwnPropertyDescriptor(t, n) : r, o;
	if (typeof Reflect == "object" && typeof Reflect.decorate == "function") a = Reflect.decorate(e, t, n, r);
	else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (i < 3 ? o(a) : i > 3 ? o(t, n, a) : o(t, n)) || a);
	return i > 3 && a && Object.defineProperty(t, n, a), a;
}, SM = function(e, t) {
	return function(n, r) {
		t(n, r, e);
	};
}, CM, wM = new z("foldingEnabled", !1), TM = class extends U {
	static {
		CM = this;
	}
	static {
		this.ID = "editor.contrib.folding";
	}
	static get(e) {
		return e.getContribution(CM.ID);
	}
	static getFoldingRangeProviders(e, t) {
		let n = e.foldingRangeProvider.ordered(t);
		return CM._foldingRangeSelector?.(n, t) ?? n;
	}
	constructor(e, t, n, r, i, a) {
		super(), this.contextKeyService = t, this.languageConfigurationService = n, this.languageFeaturesService = a, this.localToDispose = this._register(new g()), this.editor = e, this._foldingLimitReporter = new EM(e);
		let o = this.editor.getOptions();
		this._isEnabled = o.get(43), this._useFoldingProviders = o.get(44) !== "indentation", this._unfoldOnClickAfterEndOfLine = o.get(48), this._restoringViewState = !1, this._currentModelHasFoldedImports = !1, this._foldingImportsByDefault = o.get(46), this.updateDebounceInfo = i.for(a.foldingRangeProvider, "Folding", { min: 200 }), this.foldingModel = null, this.hiddenRangeModel = null, this.rangeProvider = null, this.foldingRegionPromise = null, this.foldingModelPromise = null, this.updateScheduler = null, this.cursorChangedScheduler = null, this.mouseDownInfo = null, this.foldingDecorationProvider = new mM(e), this.foldingDecorationProvider.showFoldingControls = o.get(111), this.foldingDecorationProvider.showFoldingHighlights = o.get(45), this.foldingEnabled = wM.bindTo(this.contextKeyService), this.foldingEnabled.set(this._isEnabled), this._register(this.editor.onDidChangeModel(() => this.onModelChanged())), this._register(this.editor.onDidChangeConfiguration((e) => {
			if (e.hasChanged(43) && (this._isEnabled = this.editor.getOptions().get(43), this.foldingEnabled.set(this._isEnabled), this.onModelChanged()), e.hasChanged(47) && this.onModelChanged(), e.hasChanged(111) || e.hasChanged(45)) {
				let e = this.editor.getOptions();
				this.foldingDecorationProvider.showFoldingControls = e.get(111), this.foldingDecorationProvider.showFoldingHighlights = e.get(45), this.triggerFoldingModelChanged();
			}
			e.hasChanged(44) && (this._useFoldingProviders = this.editor.getOptions().get(44) !== "indentation", this.onFoldingStrategyChanged()), e.hasChanged(48) && (this._unfoldOnClickAfterEndOfLine = this.editor.getOptions().get(48)), e.hasChanged(46) && (this._foldingImportsByDefault = this.editor.getOptions().get(46));
		})), this.onModelChanged();
	}
	saveViewState() {
		let e = this.editor.getModel();
		if (!e || !this._isEnabled || e.isTooLargeForTokenization()) return {};
		if (this.foldingModel) {
			let t = this.foldingModel.getMemento(), n = this.rangeProvider ? this.rangeProvider.id : void 0;
			return {
				collapsedRegions: t,
				lineCount: e.getLineCount(),
				provider: n,
				foldedImports: this._currentModelHasFoldedImports
			};
		}
	}
	restoreViewState(e) {
		let t = this.editor.getModel();
		if (t && this._isEnabled && !t.isTooLargeForTokenization() && this.hiddenRangeModel && e && (this._currentModelHasFoldedImports = !!e.foldedImports, e.collapsedRegions && e.collapsedRegions.length > 0 && this.foldingModel)) {
			this._restoringViewState = !0;
			try {
				this.foldingModel.applyMemento(e.collapsedRegions);
			} finally {
				this._restoringViewState = !1;
			}
		}
	}
	onModelChanged() {
		this.localToDispose.clear();
		let e = this.editor.getModel();
		this._isEnabled && e && !e.isTooLargeForTokenization() && (this._currentModelHasFoldedImports = !1, this.foldingModel = new zj(e, this.foldingDecorationProvider), this.localToDispose.add(this.foldingModel), this.hiddenRangeModel = new Zj(this.foldingModel), this.localToDispose.add(this.hiddenRangeModel), this.localToDispose.add(this.hiddenRangeModel.onDidChange((e) => this.onHiddenRangesChanges(e))), this.updateScheduler = new ge(this.updateDebounceInfo.get(e)), this.cursorChangedScheduler = new tl(() => this.revealCursor(), 200), this.localToDispose.add(this.cursorChangedScheduler), this.localToDispose.add(this.languageFeaturesService.foldingRangeProvider.onDidChange(() => this.onFoldingStrategyChanged())), this.localToDispose.add(this.editor.onDidChangeModelLanguageConfiguration(() => this.onFoldingStrategyChanged())), this.localToDispose.add(this.editor.onDidChangeModelContent((e) => this.onDidChangeModelContent(e))), this.localToDispose.add(this.editor.onDidChangeCursorPosition(() => this.onCursorPositionChanged())), this.localToDispose.add(this.editor.onMouseDown((e) => this.onEditorMouseDown(e))), this.localToDispose.add(this.editor.onMouseUp((e) => this.onEditorMouseUp(e))), this.localToDispose.add({ dispose: () => {
			this.foldingRegionPromise &&= (this.foldingRegionPromise.cancel(), null), this.updateScheduler?.cancel(), this.updateScheduler = null, this.foldingModel = null, this.foldingModelPromise = null, this.hiddenRangeModel = null, this.cursorChangedScheduler = null, this.rangeProvider?.dispose(), this.rangeProvider = null;
		} }), this.triggerFoldingModelChanged());
	}
	onFoldingStrategyChanged() {
		this.rangeProvider?.dispose(), this.rangeProvider = null, this.triggerFoldingModelChanged();
	}
	getRangeProvider(e) {
		if (this.rangeProvider) return this.rangeProvider;
		let t = new nM(e, this.languageConfigurationService, this._foldingLimitReporter);
		if (this.rangeProvider = t, this._useFoldingProviders && this.foldingModel) {
			let n = CM.getFoldingRangeProviders(this.languageFeaturesService, e);
			n.length > 0 && (this.rangeProvider = new _M(e, n, () => this.triggerFoldingModelChanged(), this._foldingLimitReporter, t));
		}
		return this.rangeProvider;
	}
	getFoldingModel() {
		return this.foldingModelPromise;
	}
	onDidChangeModelContent(e) {
		this.hiddenRangeModel?.notifyChangeModelContent(e), this.triggerFoldingModelChanged();
	}
	triggerFoldingModelChanged() {
		this.updateScheduler && (this.foldingRegionPromise &&= (this.foldingRegionPromise.cancel(), null), this.foldingModelPromise = this.updateScheduler.trigger(() => {
			let e = this.foldingModel;
			if (!e) return null;
			let t = new lr(), n = this.getRangeProvider(e.textModel), r = this.foldingRegionPromise = Te((e) => n.compute(e));
			return r.then((n) => {
				if (n && r === this.foldingRegionPromise) {
					let r;
					if (this._foldingImportsByDefault && !this._currentModelHasFoldedImports) {
						let e = n.setCollapsedAllOfType(zc.Imports.value, !0);
						e && (r = jt.capture(this.editor), this._currentModelHasFoldedImports = e);
					}
					let i = this.editor.getSelections();
					e.update(n, OM(i)), r?.restore(this.editor);
					let a = this.updateDebounceInfo.update(e.textModel, t.elapsed());
					this.updateScheduler && (this.updateScheduler.defaultDelay = a);
				}
				return e;
			});
		}).then(void 0, (e) => (er(e), null)));
	}
	onHiddenRangesChanges(e) {
		if (this.hiddenRangeModel && e.length && !this._restoringViewState) {
			let e = this.editor.getSelections();
			e && this.hiddenRangeModel.adjustSelections(e) && this.editor.setSelections(e);
		}
		this.editor.setHiddenAreas(e, this);
	}
	onCursorPositionChanged() {
		this.hiddenRangeModel && this.hiddenRangeModel.hasRanges() && this.cursorChangedScheduler.schedule();
	}
	revealCursor() {
		let e = this.getFoldingModel();
		e && e.then((e) => {
			if (e) {
				let t = this.editor.getSelections();
				if (t && t.length > 0) {
					let n = [];
					for (let r of t) {
						let t = r.selectionStartLineNumber;
						this.hiddenRangeModel && this.hiddenRangeModel.isHidden(t) && n.push(...e.getAllRegionsAtLine(t, (e) => e.isCollapsed && t > e.startLineNumber));
					}
					n.length && (e.toggleCollapseState(n), this.reveal(t[0].getPosition()));
				}
			}
		}).then(void 0, er);
	}
	onEditorMouseDown(e) {
		if (this.mouseDownInfo = null, !this.hiddenRangeModel || !e.target || !e.target.range || !e.event.leftButton && !e.event.middleButton) return;
		let t = e.target.range, n = !1;
		switch (e.target.type) {
			case 4: {
				let t = e.target.detail, r = e.target.element.offsetLeft;
				if (t.offsetX - r < 4) return;
				n = !0;
				break;
			}
			case 7:
				if (this._unfoldOnClickAfterEndOfLine && this.hiddenRangeModel.hasRanges() && !e.target.detail.isAfterLines) break;
				return;
			case 6:
				if (this.hiddenRangeModel.hasRanges()) {
					let e = this.editor.getModel();
					if (e && t.startColumn === e.getLineMaxColumn(t.startLineNumber)) break;
				}
				return;
			default: return;
		}
		this.mouseDownInfo = {
			lineNumber: t.startLineNumber,
			iconClicked: n
		};
	}
	onEditorMouseUp(e) {
		let t = this.foldingModel;
		if (!t || !this.mouseDownInfo || !e.target) return;
		let n = this.mouseDownInfo.lineNumber, r = this.mouseDownInfo.iconClicked, i = e.target.range;
		if (!i || i.startLineNumber !== n) return;
		if (r) {
			if (e.target.type !== 4) return;
		} else {
			let e = this.editor.getModel();
			if (!e || i.startColumn !== e.getLineMaxColumn(n)) return;
		}
		let a = t.getRegionAtLine(n);
		if (a && a.startLineNumber === n) {
			let i = a.isCollapsed;
			if (r || i) {
				let r = e.event.altKey, o = [];
				if (r) {
					let e = t.getRegionsInside(null, (e) => !e.containedBy(a) && !a.containedBy(e));
					for (let t of e) t.isCollapsed && o.push(t);
					o.length === 0 && (o = e);
				} else {
					let n = e.event.middleButton || e.event.shiftKey;
					if (n) for (let e of t.getRegionsInside(a)) e.isCollapsed === i && o.push(e);
					(i || !n || o.length === 0) && o.push(a);
				}
				t.toggleCollapseState(o), this.reveal({
					lineNumber: n,
					column: 1
				});
			}
		}
	}
	reveal(e) {
		this.editor.revealPositionInCenterIfOutsideViewport(e, 0);
	}
};
TM = CM = xM([
	SM(1, j),
	SM(2, Tn),
	SM(3, t),
	SM(4, hi),
	SM(5, M)
], TM);
var EM = class {
	constructor(e) {
		this.editor = e, this._onDidChange = new x(), this._computed = 0, this._limited = !1;
	}
	get limit() {
		return this.editor.getOptions().get(47);
	}
	update(e, t) {
		(e !== this._computed || t !== this._limited) && (this._computed = e, this._limited = t, this._onDidChange.fire());
	}
}, DM = class extends O {
	runEditorCommand(e, t, n) {
		let r = e.get(Tn), i = TM.get(t);
		if (!i) return;
		let a = i.getFoldingModel();
		if (a) return this.reportTelemetry(e, t), a.then((e) => {
			if (e) {
				this.invoke(i, e, t, n, r);
				let a = t.getSelection();
				a && i.reveal(a.getStartPosition());
			}
		});
	}
	getSelectedLines(e) {
		let t = e.getSelections();
		return t ? t.map((e) => e.startLineNumber) : [];
	}
	getLineNumbers(e, t) {
		return e && e.selectionLines ? e.selectionLines.map((e) => e + 1) : this.getSelectedLines(t);
	}
	run(e, t) {}
};
function OM(e) {
	return !e || e.length === 0 ? { startsInside: () => !1 } : { startsInside(t, n) {
		for (let r of e) {
			let e = r.startLineNumber;
			if (e >= t && e <= n) return !0;
		}
		return !1;
	} };
}
function kM(e) {
	if (!es(e)) {
		if (!Ne(e)) return !1;
		let t = e;
		if (!es(t.levels) && !Ue(t.levels) || !es(t.direction) && !zn(t.direction) || !es(t.selectionLines) && (!Array.isArray(t.selectionLines) || !t.selectionLines.every(Ue))) return !1;
	}
	return !0;
}
var AM = class extends DM {
	constructor() {
		super({
			id: "editor.unfold",
			label: B("unfoldAction.label", "Unfold"),
			alias: "Unfold",
			precondition: wM,
			kbOpts: {
				kbExpr: I.editorTextFocus,
				primary: 3166,
				mac: { primary: 2654 },
				weight: 100
			},
			metadata: {
				description: "Unfold the content in the editor",
				args: [{
					name: "Unfold editor argument",
					description: "Property-value pairs that can be passed through this argument:\n						* 'levels': Number of levels to unfold. If not set, defaults to 1.\n						* 'direction': If 'up', unfold given number of levels up otherwise unfolds down.\n						* 'selectionLines': Array of the start lines (0-based) of the editor selections to apply the unfold action to. If not set, the active selection(s) will be used.\n						",
					constraint: kM,
					schema: {
						type: "object",
						properties: {
							levels: {
								type: "number",
								default: 1
							},
							direction: {
								type: "string",
								enum: ["up", "down"],
								default: "down"
							},
							selectionLines: {
								type: "array",
								items: { type: "number" }
							}
						}
					}
				}]
			}
		});
	}
	invoke(e, t, n, r) {
		let i = r && r.levels || 1, a = this.getLineNumbers(r, n);
		r && r.direction === "up" ? Hj(t, !1, i, a) : Vj(t, !1, i, a);
	}
}, jM = class extends DM {
	constructor() {
		super({
			id: "editor.unfoldRecursively",
			label: B("unFoldRecursivelyAction.label", "Unfold Recursively"),
			alias: "Unfold Recursively",
			precondition: wM,
			kbOpts: {
				kbExpr: I.editorTextFocus,
				primary: Ro(2089, 2142),
				weight: 100
			}
		});
	}
	invoke(e, t, n, r) {
		Vj(t, !1, Number.MAX_VALUE, this.getSelectedLines(n));
	}
}, MM = class extends DM {
	constructor() {
		super({
			id: "editor.fold",
			label: B("foldAction.label", "Fold"),
			alias: "Fold",
			precondition: wM,
			kbOpts: {
				kbExpr: I.editorTextFocus,
				primary: 3164,
				mac: { primary: 2652 },
				weight: 100
			},
			metadata: {
				description: "Fold the content in the editor",
				args: [{
					name: "Fold editor argument",
					description: "Property-value pairs that can be passed through this argument:\n							* 'levels': Number of levels to fold.\n							* 'direction': If 'up', folds given number of levels up otherwise folds down.\n							* 'selectionLines': Array of the start lines (0-based) of the editor selections to apply the fold action to. If not set, the active selection(s) will be used.\n							If no levels or direction is set, folds the region at the locations or if already collapsed, the first uncollapsed parent instead.\n						",
					constraint: kM,
					schema: {
						type: "object",
						properties: {
							levels: { type: "number" },
							direction: {
								type: "string",
								enum: ["up", "down"]
							},
							selectionLines: {
								type: "array",
								items: { type: "number" }
							}
						}
					}
				}]
			}
		});
	}
	invoke(e, t, n, r) {
		let i = this.getLineNumbers(r, n), a = r && r.levels, o = r && r.direction;
		typeof a != "number" && typeof o != "string" ? Uj(t, !0, i) : o === "up" ? Hj(t, !0, a || 1, i) : Vj(t, !0, a || 1, i);
	}
}, NM = class extends DM {
	constructor() {
		super({
			id: "editor.toggleFold",
			label: B("toggleFoldAction.label", "Toggle Fold"),
			alias: "Toggle Fold",
			precondition: wM,
			kbOpts: {
				kbExpr: I.editorTextFocus,
				primary: Ro(2089, 2090),
				weight: 100
			}
		});
	}
	invoke(e, t, n) {
		Bj(t, 1, this.getSelectedLines(n));
	}
}, PM = class extends DM {
	constructor() {
		super({
			id: "editor.foldRecursively",
			label: B("foldRecursivelyAction.label", "Fold Recursively"),
			alias: "Fold Recursively",
			precondition: wM,
			kbOpts: {
				kbExpr: I.editorTextFocus,
				primary: Ro(2089, 2140),
				weight: 100
			}
		});
	}
	invoke(e, t, n) {
		let r = this.getSelectedLines(n);
		Vj(t, !0, Number.MAX_VALUE, r);
	}
}, FM = class extends DM {
	constructor() {
		super({
			id: "editor.toggleFoldRecursively",
			label: B("toggleFoldRecursivelyAction.label", "Toggle Fold Recursively"),
			alias: "Toggle Fold Recursively",
			precondition: wM,
			kbOpts: {
				kbExpr: I.editorTextFocus,
				primary: Ro(2089, 3114),
				weight: 100
			}
		});
	}
	invoke(e, t, n) {
		let r = this.getSelectedLines(n);
		Bj(t, Number.MAX_VALUE, r);
	}
}, IM = class extends DM {
	constructor() {
		super({
			id: "editor.foldAllBlockComments",
			label: B("foldAllBlockComments.label", "Fold All Block Comments"),
			alias: "Fold All Block Comments",
			precondition: wM,
			kbOpts: {
				kbExpr: I.editorTextFocus,
				primary: Ro(2089, 2138),
				weight: 100
			}
		});
	}
	invoke(e, t, n, r, i) {
		if (t.regions.hasTypes()) qj(t, zc.Comment.value, !0);
		else {
			let e = n.getModel();
			if (!e) return;
			let r = i.getLanguageConfiguration(e.getLanguageId()).comments;
			r && r.blockCommentStartToken && Kj(t, RegExp("^\\s*" + zr(r.blockCommentStartToken)), !0);
		}
	}
}, LM = class extends DM {
	constructor() {
		super({
			id: "editor.foldAllMarkerRegions",
			label: B("foldAllMarkerRegions.label", "Fold All Regions"),
			alias: "Fold All Regions",
			precondition: wM,
			kbOpts: {
				kbExpr: I.editorTextFocus,
				primary: Ro(2089, 2077),
				weight: 100
			}
		});
	}
	invoke(e, t, n, r, i) {
		if (t.regions.hasTypes()) qj(t, zc.Region.value, !0);
		else {
			let e = n.getModel();
			if (!e) return;
			let r = i.getLanguageConfiguration(e.getLanguageId()).foldingRules;
			r && r.markers && r.markers.start && Kj(t, new RegExp(r.markers.start), !0);
		}
	}
}, RM = class extends DM {
	constructor() {
		super({
			id: "editor.unfoldAllMarkerRegions",
			label: B("unfoldAllMarkerRegions.label", "Unfold All Regions"),
			alias: "Unfold All Regions",
			precondition: wM,
			kbOpts: {
				kbExpr: I.editorTextFocus,
				primary: Ro(2089, 2078),
				weight: 100
			}
		});
	}
	invoke(e, t, n, r, i) {
		if (t.regions.hasTypes()) qj(t, zc.Region.value, !1);
		else {
			let e = n.getModel();
			if (!e) return;
			let r = i.getLanguageConfiguration(e.getLanguageId()).foldingRules;
			r && r.markers && r.markers.start && Kj(t, new RegExp(r.markers.start), !1);
		}
	}
}, zM = class extends DM {
	constructor() {
		super({
			id: "editor.foldAllExcept",
			label: B("foldAllExcept.label", "Fold All Except Selected"),
			alias: "Fold All Except Selected",
			precondition: wM,
			kbOpts: {
				kbExpr: I.editorTextFocus,
				primary: Ro(2089, 2136),
				weight: 100
			}
		});
	}
	invoke(e, t, n) {
		Gj(t, !0, this.getSelectedLines(n));
	}
}, BM = class extends DM {
	constructor() {
		super({
			id: "editor.unfoldAllExcept",
			label: B("unfoldAllExcept.label", "Unfold All Except Selected"),
			alias: "Unfold All Except Selected",
			precondition: wM,
			kbOpts: {
				kbExpr: I.editorTextFocus,
				primary: Ro(2089, 2134),
				weight: 100
			}
		});
	}
	invoke(e, t, n) {
		Gj(t, !1, this.getSelectedLines(n));
	}
}, VM = class extends DM {
	constructor() {
		super({
			id: "editor.foldAll",
			label: B("foldAllAction.label", "Fold All"),
			alias: "Fold All",
			precondition: wM,
			kbOpts: {
				kbExpr: I.editorTextFocus,
				primary: Ro(2089, 2069),
				weight: 100
			}
		});
	}
	invoke(e, t, n) {
		Vj(t, !0);
	}
}, HM = class extends DM {
	constructor() {
		super({
			id: "editor.unfoldAll",
			label: B("unfoldAllAction.label", "Unfold All"),
			alias: "Unfold All",
			precondition: wM,
			kbOpts: {
				kbExpr: I.editorTextFocus,
				primary: Ro(2089, 2088),
				weight: 100
			}
		});
	}
	invoke(e, t, n) {
		Vj(t, !1);
	}
}, UM = class e extends DM {
	static {
		this.ID_PREFIX = "editor.foldLevel";
	}
	static {
		this.ID = (t) => e.ID_PREFIX + t;
	}
	getFoldingLevel() {
		return parseInt(this.id.substr(e.ID_PREFIX.length));
	}
	invoke(e, t, n) {
		Wj(t, this.getFoldingLevel(), !0, this.getSelectedLines(n));
	}
}, WM = class extends DM {
	constructor() {
		super({
			id: "editor.gotoParentFold",
			label: B("gotoParentFold.label", "Go to Parent Fold"),
			alias: "Go to Parent Fold",
			precondition: wM,
			kbOpts: {
				kbExpr: I.editorTextFocus,
				weight: 100
			}
		});
	}
	invoke(e, t, n) {
		let r = this.getSelectedLines(n);
		if (r.length > 0) {
			let e = Jj(r[0], t);
			e !== null && n.setSelection({
				startLineNumber: e,
				startColumn: 1,
				endLineNumber: e,
				endColumn: 1
			});
		}
	}
}, GM = class extends DM {
	constructor() {
		super({
			id: "editor.gotoPreviousFold",
			label: B("gotoPreviousFold.label", "Go to Previous Folding Range"),
			alias: "Go to Previous Folding Range",
			precondition: wM,
			kbOpts: {
				kbExpr: I.editorTextFocus,
				weight: 100
			}
		});
	}
	invoke(e, t, n) {
		let r = this.getSelectedLines(n);
		if (r.length > 0) {
			let e = Yj(r[0], t);
			e !== null && n.setSelection({
				startLineNumber: e,
				startColumn: 1,
				endLineNumber: e,
				endColumn: 1
			});
		}
	}
}, KM = class extends DM {
	constructor() {
		super({
			id: "editor.gotoNextFold",
			label: B("gotoNextFold.label", "Go to Next Folding Range"),
			alias: "Go to Next Folding Range",
			precondition: wM,
			kbOpts: {
				kbExpr: I.editorTextFocus,
				weight: 100
			}
		});
	}
	invoke(e, t, n) {
		let r = this.getSelectedLines(n);
		if (r.length > 0) {
			let e = Xj(r[0], t);
			e !== null && n.setSelection({
				startLineNumber: e,
				startColumn: 1,
				endLineNumber: e,
				endColumn: 1
			});
		}
	}
}, qM = class extends DM {
	constructor() {
		super({
			id: "editor.createFoldingRangeFromSelection",
			label: B("createManualFoldRange.label", "Create Folding Range from Selection"),
			alias: "Create Folding Range from Selection",
			precondition: wM,
			kbOpts: {
				kbExpr: I.editorTextFocus,
				primary: Ro(2089, 2135),
				weight: 100
			}
		});
	}
	invoke(e, t, n) {
		let r = [], i = n.getSelections();
		if (i) {
			for (let e of i) {
				let t = e.endLineNumber;
				e.endColumn === 1 && --t, t > e.startLineNumber && (r.push({
					startLineNumber: e.startLineNumber,
					endLineNumber: t,
					type: void 0,
					isCollapsed: !0,
					source: 1
				}), n.setSelection({
					startLineNumber: e.startLineNumber,
					startColumn: 1,
					endLineNumber: e.startLineNumber,
					endColumn: 1
				}));
			}
			if (r.length > 0) {
				r.sort((e, t) => e.startLineNumber - t.startLineNumber);
				let e = Lj.sanitizeAndMerge(t.regions, r, n.getModel()?.getLineCount());
				t.updatePost(Lj.fromFoldRanges(e));
			}
		}
	}
}, JM = class extends DM {
	constructor() {
		super({
			id: "editor.removeManualFoldingRanges",
			label: B("removeManualFoldingRanges.label", "Remove Manual Folding Ranges"),
			alias: "Remove Manual Folding Ranges",
			precondition: wM,
			kbOpts: {
				kbExpr: I.editorTextFocus,
				primary: Ro(2089, 2137),
				weight: 100
			}
		});
	}
	invoke(e, t, n) {
		let r = n.getSelections();
		if (r) {
			let n = [];
			for (let e of r) {
				let { startLineNumber: t, endLineNumber: r } = e;
				n.push(r >= t ? {
					startLineNumber: t,
					endLineNumber: r
				} : {
					endLineNumber: r,
					startLineNumber: t
				});
			}
			t.removeManualRanges(n), e.triggerFoldingModelChanged();
		}
	}
};
T(TM.ID, TM, 0), k(AM), k(jM), k(MM), k(PM), k(FM), k(VM), k(HM), k(IM), k(LM), k(RM), k(zM), k(BM), k(NM), k(WM), k(GM), k(KM), k(qM), k(JM);
for (let e = 1; e <= 7; e++) o(new UM({
	id: UM.ID(e),
	label: B("foldLevelAction.label", "Fold Level {0}", e),
	alias: `Fold Level ${e}`,
	precondition: wM,
	kbOpts: {
		kbExpr: I.editorTextFocus,
		primary: Ro(2089, 2048 | 21 + e),
		weight: 100
	}
}));
Ol.registerCommand("_executeFoldingRangeProvider", async function(e, ...t) {
	let [n] = t;
	if (!(n instanceof De)) throw vi();
	let r = e.get(M), i = e.get(je).getModel(n);
	if (!i) throw vi();
	let a = e.get(Fl);
	if (!a.getValue("editor.folding", { resource: n })) return [];
	let o = e.get(Tn), s = a.getValue("editor.foldingStrategy", { resource: n }), c = {
		get limit() {
			return a.getValue("editor.foldingMaximumRegions", { resource: n });
		},
		update: (e, t) => {}
	}, l = new nM(i, o, c), u = l;
	if (s !== "indentation") {
		let e = TM.getFoldingRangeProviders(r, i);
		e.length && (u = new _M(i, e, () => {}, c, l));
	}
	let d = await u.compute(C.None), f = [];
	try {
		if (d) for (let e = 0; e < d.length; e++) {
			let t = d.getType(e);
			f.push({
				start: d.getStartLineNumber(e),
				end: d.getEndLineNumber(e),
				kind: t ? zc.fromValue(t) : void 0
			});
		}
		return f;
	} finally {
		u.dispose();
	}
});
// ../../../node_modules/.pnpm/monaco-editor@0.52.2/node_modules/monaco-editor/esm/vs/editor/contrib/fontZoom/browser/fontZoom.js
var YM = class extends O {
	constructor() {
		super({
			id: "editor.action.fontZoomIn",
			label: B("EditorFontZoomIn.label", "Increase Editor Font Size"),
			alias: "Increase Editor Font Size",
			precondition: void 0
		});
	}
	run(e, t) {
		Ho.setZoomLevel(Ho.getZoomLevel() + 1);
	}
}, XM = class extends O {
	constructor() {
		super({
			id: "editor.action.fontZoomOut",
			label: B("EditorFontZoomOut.label", "Decrease Editor Font Size"),
			alias: "Decrease Editor Font Size",
			precondition: void 0
		});
	}
	run(e, t) {
		Ho.setZoomLevel(Ho.getZoomLevel() - 1);
	}
}, ZM = class extends O {
	constructor() {
		super({
			id: "editor.action.fontZoomReset",
			label: B("EditorFontZoomReset.label", "Reset Editor Font Size"),
			alias: "Reset Editor Font Size",
			precondition: void 0
		});
	}
	run(e, t) {
		Ho.setZoomLevel(0);
	}
};
k(YM), k(XM), k(ZM);
// ../../../node_modules/.pnpm/monaco-editor@0.52.2/node_modules/monaco-editor/esm/vs/editor/contrib/format/browser/formatActions.js
var QM = function(e, t, n, r) {
	var i = arguments.length, a = i < 3 ? t : r === null ? r = Object.getOwnPropertyDescriptor(t, n) : r, o;
	if (typeof Reflect == "object" && typeof Reflect.decorate == "function") a = Reflect.decorate(e, t, n, r);
	else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (i < 3 ? o(a) : i > 3 ? o(t, n, a) : o(t, n)) || a);
	return i > 3 && a && Object.defineProperty(t, n, a), a;
}, $M = function(e, t) {
	return function(n, r) {
		t(n, r, e);
	};
}, eN = class {
	static {
		this.ID = "editor.contrib.autoFormat";
	}
	constructor(e, t, n, r) {
		this._editor = e, this._languageFeaturesService = t, this._workerService = n, this._accessibilitySignalService = r, this._disposables = new g(), this._sessionDisposables = new g(), this._disposables.add(t.onTypeFormattingEditProvider.onDidChange(this._update, this)), this._disposables.add(e.onDidChangeModel(() => this._update())), this._disposables.add(e.onDidChangeModelLanguage(() => this._update())), this._disposables.add(e.onDidChangeConfiguration((e) => {
			e.hasChanged(56) && this._update();
		})), this._update();
	}
	dispose() {
		this._disposables.dispose(), this._sessionDisposables.dispose();
	}
	_update() {
		if (this._sessionDisposables.clear(), !this._editor.getOption(56) || !this._editor.hasModel()) return;
		let e = this._editor.getModel(), [t] = this._languageFeaturesService.onTypeFormattingEditProvider.ordered(e);
		if (!t || !t.autoFormatTriggerCharacters) return;
		let n = new Bo();
		for (let e of t.autoFormatTriggerCharacters) n.add(e.charCodeAt(0));
		this._sessionDisposables.add(this._editor.onDidType((e) => {
			let t = e.charCodeAt(e.length - 1);
			n.has(t) && this._trigger(String.fromCharCode(t));
		}));
	}
	_trigger(e) {
		if (!this._editor.hasModel() || this._editor.getSelections().length > 1 || !this._editor.getSelection().isEmpty()) return;
		let t = this._editor.getModel(), n = this._editor.getPosition(), r = new Cn(), i = this._editor.onDidChangeModelContent((e) => {
			if (e.isFlush) r.cancel(), i.dispose();
			else for (let t = 0, a = e.changes.length; t < a; t++) if (e.changes[t].range.endLineNumber <= n.lineNumber) {
				r.cancel(), i.dispose();
				return;
			}
		});
		Wc(this._workerService, this._languageFeaturesService, t, n, e, t.getFormattingOptions(), r.token).then((e) => {
			r.token.isCancellationRequested || zl(e) && (this._accessibilitySignalService.playSignal(Me.format, { userGesture: !1 }), bl.execute(this._editor, e, !0));
		}).finally(() => {
			i.dispose();
		});
	}
};
eN = QM([
	$M(1, M),
	$M(2, Oe),
	$M(3, Rn)
], eN);
var tN = class {
	static {
		this.ID = "editor.contrib.formatOnPaste";
	}
	constructor(e, t, n) {
		this.editor = e, this._languageFeaturesService = t, this._instantiationService = n, this._callOnDispose = new g(), this._callOnModel = new g(), this._callOnDispose.add(e.onDidChangeConfiguration(() => this._update())), this._callOnDispose.add(e.onDidChangeModel(() => this._update())), this._callOnDispose.add(e.onDidChangeModelLanguage(() => this._update())), this._callOnDispose.add(t.documentRangeFormattingEditProvider.onDidChange(this._update, this));
	}
	dispose() {
		this._callOnDispose.dispose(), this._callOnModel.dispose();
	}
	_update() {
		this._callOnModel.clear(), this.editor.getOption(55) && this.editor.hasModel() && this._languageFeaturesService.documentRangeFormattingEditProvider.has(this.editor.getModel()) && this._callOnModel.add(this.editor.onDidPaste(({ range: e }) => this._trigger(e)));
	}
	_trigger(e) {
		this.editor.hasModel() && (this.editor.getSelections().length > 1 || this._instantiationService.invokeFunction(io, this.editor, e, 2, Dt.None, C.None, !1).catch(er));
	}
};
tN = QM([$M(1, M), $M(2, P)], tN);
var nN = class extends O {
	constructor() {
		super({
			id: "editor.action.formatDocument",
			label: B("formatDocument.label", "Format Document"),
			alias: "Format Document",
			precondition: N.and(I.notInCompositeEditor, I.writable, I.hasDocumentFormattingProvider),
			kbOpts: {
				kbExpr: I.editorTextFocus,
				primary: 1572,
				linux: { primary: 3111 },
				weight: 100
			},
			contextMenuOpts: {
				group: "1_modification",
				order: 1.3
			}
		});
	}
	async run(e, t) {
		if (t.hasModel()) {
			let n = e.get(P);
			await e.get(qn).showWhile(n.invokeFunction(Hi, t, 1, Dt.None, C.None, !0), 250);
		}
	}
}, rN = class extends O {
	constructor() {
		super({
			id: "editor.action.formatSelection",
			label: B("formatSelection.label", "Format Selection"),
			alias: "Format Selection",
			precondition: N.and(I.writable, I.hasDocumentSelectionFormattingProvider),
			kbOpts: {
				kbExpr: I.editorTextFocus,
				primary: Ro(2089, 2084),
				weight: 100
			},
			contextMenuOpts: {
				when: I.hasNonEmptySelection,
				group: "1_modification",
				order: 1.31
			}
		});
	}
	async run(e, t) {
		if (!t.hasModel()) return;
		let n = e.get(P), r = t.getModel(), i = t.getSelections().map((e) => e.isEmpty() ? new E(e.startLineNumber, 1, e.startLineNumber, r.getLineMaxColumn(e.startLineNumber)) : e);
		await e.get(qn).showWhile(n.invokeFunction(io, t, i, 1, Dt.None, C.None, !0), 250);
	}
};
T(eN.ID, eN, 2), T(tN.ID, tN, 2), k(nN), k(rN), Ol.registerCommand("editor.action.format", async (e) => {
	let t = e.get(Ln).getFocusedCodeEditor();
	if (!t || !t.hasModel()) return;
	let n = e.get(ga);
	t.getSelection().isEmpty() ? await n.executeCommand("editor.action.formatDocument") : await n.executeCommand("editor.action.formatSelection");
});
// ../../../node_modules/.pnpm/monaco-editor@0.52.2/node_modules/monaco-editor/esm/vs/editor/contrib/documentSymbols/browser/outlineModel.js
var iN = function(e, t, n, r) {
	var i = arguments.length, a = i < 3 ? t : r === null ? r = Object.getOwnPropertyDescriptor(t, n) : r, o;
	if (typeof Reflect == "object" && typeof Reflect.decorate == "function") a = Reflect.decorate(e, t, n, r);
	else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (i < 3 ? o(a) : i > 3 ? o(t, n, a) : o(t, n)) || a);
	return i > 3 && a && Object.defineProperty(t, n, a), a;
}, aN = function(e, t) {
	return function(n, r) {
		t(n, r, e);
	};
}, oN = class {
	remove() {
		this.parent?.children.delete(this.id);
	}
	static findId(e, t) {
		let n;
		typeof e == "string" ? n = `${t.id}/${e}` : (n = `${t.id}/${e.name}`, t.children.get(n) !== void 0 && (n = `${t.id}/${e.name}_${e.range.startLineNumber}_${e.range.startColumn}`));
		let r = n;
		for (let e = 0; t.children.get(r) !== void 0; e++) r = `${n}_${e}`;
		return r;
	}
	static empty(e) {
		return e.children.size === 0;
	}
}, sN = class extends oN {
	constructor(e, t, n) {
		super(), this.id = e, this.parent = t, this.symbol = n, this.children = /* @__PURE__ */ new Map();
	}
}, cN = class extends oN {
	constructor(e, t, n, r) {
		super(), this.id = e, this.parent = t, this.label = n, this.order = r, this.children = /* @__PURE__ */ new Map();
	}
}, lN = class e extends oN {
	static create(t, n, r) {
		let a = new Cn(r), o = new e(n.uri), s = t.ordered(n), c = s.map((t, r) => {
			let s = oN.findId(`provider_${r}`, o), c = new cN(s, o, t.displayName ?? "Unknown Outline Provider", r);
			return Promise.resolve(t.provideDocumentSymbols(n, a.token)).then((t) => {
				for (let n of t || []) e._makeOutlineElement(n, c);
				return c;
			}, (e) => (i(e), c)).then((e) => {
				oN.empty(e) ? e.remove() : o._groups.set(s, e);
			});
		}), l = t.onDidChange(() => {
			let e = t.ordered(n);
			At(e, s) || a.cancel();
		});
		return Promise.all(c).then(() => a.token.isCancellationRequested && !r.isCancellationRequested ? e.create(t, n, r) : o._compact()).finally(() => {
			a.dispose(), l.dispose(), a.dispose();
		});
	}
	static _makeOutlineElement(t, n) {
		let r = new sN(oN.findId(t, n), n, t);
		if (t.children) for (let n of t.children) e._makeOutlineElement(n, r);
		n.children.set(r.id, r);
	}
	constructor(e) {
		super(), this.uri = e, this.id = "root", this.parent = void 0, this._groups = /* @__PURE__ */ new Map(), this.children = /* @__PURE__ */ new Map(), this.id = "root", this.parent = void 0;
	}
	_compact() {
		let e = 0;
		for (let [t, n] of this._groups) n.children.size === 0 ? this._groups.delete(t) : e += 1;
		if (e !== 1) this.children = this._groups;
		else {
			let e = Da.first(this._groups.values());
			for (let [, t] of e.children) t.parent = this, this.children.set(t.id, t);
		}
		return this;
	}
	getTopLevelSymbols() {
		let e = [];
		for (let t of this.children.values()) t instanceof sN ? e.push(t.symbol) : e.push(...Da.map(t.children.values(), (e) => e.symbol));
		return e.sort((e, t) => E.compareRangesUsingStarts(e.range, t.range));
	}
	asListOfDocumentSymbols() {
		let t = this.getTopLevelSymbols(), n = [];
		return e._flattenDocumentSymbols(n, t, ""), n.sort((e, t) => b.compare(E.getStartPosition(e.range), E.getStartPosition(t.range)) || b.compare(E.getEndPosition(t.range), E.getEndPosition(e.range)));
	}
	static _flattenDocumentSymbols(t, n, r) {
		for (let i of n) t.push({
			kind: i.kind,
			tags: i.tags,
			name: i.name,
			detail: i.detail,
			containerName: i.containerName || r,
			range: i.range,
			selectionRange: i.selectionRange,
			children: void 0
		}), i.children && e._flattenDocumentSymbols(t, i.children, i.name);
	}
}, uN = ne("IOutlineModelService"), dN = class {
	constructor(e, t, n) {
		this._languageFeaturesService = e, this._disposables = new g(), this._cache = new Fn(10, .7), this._debounceInformation = t.for(e.documentSymbolProvider, "DocumentSymbols", { min: 350 }), this._disposables.add(n.onModelRemoved((e) => {
			this._cache.delete(e.id);
		}));
	}
	dispose() {
		this._disposables.dispose();
	}
	async getOrCreate(e, t) {
		let n = this._languageFeaturesService.documentSymbolProvider, r = n.ordered(e), i = this._cache.get(e.id);
		if (!i || i.versionId !== e.getVersionId() || !At(i.provider, r)) {
			let t = new Cn();
			i = {
				versionId: e.getVersionId(),
				provider: r,
				promiseCnt: 0,
				source: t,
				promise: lN.create(n, e, t.token),
				model: void 0
			}, this._cache.set(e.id, i);
			let a = Date.now();
			i.promise.then((t) => {
				i.model = t, this._debounceInformation.update(e, Date.now() - a);
			}).catch((t) => {
				this._cache.delete(e.id);
			});
		}
		if (i.model) return i.model;
		i.promiseCnt += 1;
		let a = t.onCancellationRequested(() => {
			--i.promiseCnt === 0 && (i.source.cancel(), this._cache.delete(e.id));
		});
		try {
			return await i.promise;
		} finally {
			a.dispose();
		}
	}
};
// ../../../node_modules/.pnpm/monaco-editor@0.52.2/node_modules/monaco-editor/esm/vs/editor/contrib/documentSymbols/browser/documentSymbols.js
dN = iN([
	aN(0, M),
	aN(1, hi),
	aN(2, je)
], dN), rn(uN, dN, 1), Ol.registerCommand("_executeDocumentSymbolProvider", async function(e, ...t) {
	let [n] = t;
	y(De.isUri(n));
	let r = e.get(uN), i = await e.get(Ve).createModelReference(n);
	try {
		return (await r.getOrCreate(i.object.textEditorModel, C.None)).getTopLevelSymbols();
	} finally {
		i.dispose();
	}
});
// ../../../node_modules/.pnpm/monaco-editor@0.52.2/node_modules/monaco-editor/esm/vs/editor/contrib/inlineCompletions/browser/controller/inlineCompletionContextKeys.js
var fN = class e extends U {
	static {
		this.inlineSuggestionVisible = new z("inlineSuggestionVisible", !1, B("inlineSuggestionVisible", "Whether an inline suggestion is visible"));
	}
	static {
		this.inlineSuggestionHasIndentation = new z("inlineSuggestionHasIndentation", !1, B("inlineSuggestionHasIndentation", "Whether the inline suggestion starts with whitespace"));
	}
	static {
		this.inlineSuggestionHasIndentationLessThanTabSize = new z("inlineSuggestionHasIndentationLessThanTabSize", !0, B("inlineSuggestionHasIndentationLessThanTabSize", "Whether the inline suggestion starts with whitespace that is less than what would be inserted by tab"));
	}
	static {
		this.suppressSuggestions = new z("inlineSuggestionSuppressSuggestions", void 0, B("suppressSuggestions", "Whether suggestions should be suppressed for the current suggestion"));
	}
	constructor(t, n) {
		super(), this.contextKeyService = t, this.model = n, this.inlineCompletionVisible = e.inlineSuggestionVisible.bindTo(this.contextKeyService), this.inlineCompletionSuggestsIndentation = e.inlineSuggestionHasIndentation.bindTo(this.contextKeyService), this.inlineCompletionSuggestsIndentationLessThanTabSize = e.inlineSuggestionHasIndentationLessThanTabSize.bindTo(this.contextKeyService), this.suppressSuggestions = e.suppressSuggestions.bindTo(this.contextKeyService), this._register(Os((e) => {
			let t = this.model.read(e)?.state.read(e), n = !!t?.inlineCompletion && t?.primaryGhostText !== void 0 && !t?.primaryGhostText.isEmpty();
			this.inlineCompletionVisible.set(n), t?.primaryGhostText && t?.inlineCompletion && this.suppressSuggestions.set(t.inlineCompletion.inlineCompletion.source.inlineCompletions.suppressSuggestions);
		})), this._register(Os((e) => {
			let t = this.model.read(e), n = !1, r = !0, i = t?.primaryGhostText.read(e);
			if (t?.selectedSuggestItem && i && i.parts.length > 0) {
				let { column: e, lines: a } = i.parts[0], o = a[0];
				if (e <= t.textModel.getLineIndentColumn(i.lineNumber)) {
					let e = oi(o);
					e === -1 && (e = o.length - 1), n = e > 0;
					let i = t.textModel.getOptions().tabSize;
					r = pa.visibleColumnFromColumn(o, e + 1, i) < i;
				}
			}
			this.inlineCompletionSuggestsIndentation.set(n), this.inlineCompletionSuggestsIndentationLessThanTabSize.set(r);
		}));
	}
};
// ../../../node_modules/.pnpm/monaco-editor@0.52.2/node_modules/monaco-editor/esm/vs/base/browser/domObservable.js
function pN(e) {
	let t = new g(), n = t.add(Yt());
	return t.add(Os((t) => {
		n.setStyle(e.read(t));
	})), t;
}
// ../../../node_modules/.pnpm/monaco-editor@0.52.2/node_modules/monaco-editor/esm/vs/editor/contrib/inlineCompletions/browser/model/ghostText.js
var mN = class {
	constructor(e, t) {
		this.lineNumber = e, this.parts = t;
	}
	equals(e) {
		return this.lineNumber === e.lineNumber && this.parts.length === e.parts.length && this.parts.every((t, n) => t.equals(e.parts[n]));
	}
	renderForScreenReader(e) {
		if (this.parts.length === 0) return "";
		let t = this.parts[this.parts.length - 1], n = e.substr(0, t.column - 1);
		return new _s([...this.parts.map((e) => new Ks(E.fromPositions(new b(1, e.column)), e.lines.join("\n")))]).applyToString(n).substring(this.parts[0].column - 1);
	}
	isEmpty() {
		return this.parts.every((e) => e.lines.length === 0);
	}
	get lineCount() {
		return 1 + this.parts.reduce((e, t) => e + t.lines.length - 1, 0);
	}
}, hN = class {
	constructor(e, t, n) {
		this.column = e, this.text = t, this.preview = n, this.lines = Va(this.text);
	}
	equals(e) {
		return this.column === e.column && this.lines.length === e.lines.length && this.lines.every((t, n) => t === e.lines[n]);
	}
}, gN = class {
	constructor(e, t, n, r = 0) {
		this.lineNumber = e, this.columnRange = t, this.text = n, this.additionalReservedLineCount = r, this.parts = [new hN(this.columnRange.endColumnExclusive, this.text, !1)], this.newLines = Va(this.text);
	}
	renderForScreenReader(e) {
		return this.newLines.join("\n");
	}
	get lineCount() {
		return this.newLines.length;
	}
	isEmpty() {
		return this.parts.every((e) => e.lines.length === 0);
	}
	equals(e) {
		return this.lineNumber === e.lineNumber && this.columnRange.equals(e.columnRange) && this.newLines.length === e.newLines.length && this.newLines.every((t, n) => t === e.newLines[n]) && this.additionalReservedLineCount === e.additionalReservedLineCount;
	}
};
function _N(e, t) {
	return At(e, t, vN);
}
function vN(e, t) {
	return e === t ? !0 : !e || !t ? !1 : e instanceof mN && t instanceof mN || e instanceof gN && t instanceof gN ? e.equals(t) : !1;
}
// ../../../node_modules/.pnpm/monaco-editor@0.52.2/node_modules/monaco-editor/esm/vs/editor/contrib/inlineCompletions/browser/utils.js
var yN = [];
function bN() {
	return yN;
}
var xN = class {
	constructor(e, t) {
		if (this.startColumn = e, this.endColumnExclusive = t, e > t) throw new Ft(`startColumn ${e} cannot be after endColumnExclusive ${t}`);
	}
	toRange(e) {
		return new E(e, this.startColumn, e, this.endColumnExclusive);
	}
	equals(e) {
		return this.startColumn === e.startColumn && this.endColumnExclusive === e.endColumnExclusive;
	}
};
function SN(e, t) {
	let n = new g(), r = e.createDecorationsCollection();
	return n.add(pc({ debugName: () => `Apply decorations from ${t.debugName}` }, (e) => {
		let n = t.read(e);
		r.set(n);
	})), n.add({ dispose: () => {
		r.clear();
	} }), n;
}
function CN(e, t) {
	return new b(e.lineNumber + t.lineNumber - 1, t.lineNumber === 1 ? e.column + t.column - 1 : t.column);
}
function wN(e, t) {
	return new b(e.lineNumber - t.lineNumber + 1, e.lineNumber - t.lineNumber === 0 ? e.column - t.column + 1 : e.column);
}
// ../../../node_modules/.pnpm/monaco-editor@0.52.2/node_modules/monaco-editor/esm/vs/editor/contrib/inlineCompletions/browser/view/ghostTextView.js
var TN = function(e, t, n, r) {
	var i = arguments.length, a = i < 3 ? t : r === null ? r = Object.getOwnPropertyDescriptor(t, n) : r, o;
	if (typeof Reflect == "object" && typeof Reflect.decorate == "function") a = Reflect.decorate(e, t, n, r);
	else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (i < 3 ? o(a) : i > 3 ? o(t, n, a) : o(t, n)) || a);
	return i > 3 && a && Object.defineProperty(t, n, a), a;
}, EN = function(e, t) {
	return function(n, r) {
		t(n, r, e);
	};
}, DN = "ghost-text", ON = class extends U {
	constructor(e, t, n) {
		super(), this.editor = e, this.model = t, this.languageService = n, this.isDisposed = qs(this, !1), this.currentTextModel = tr(this, this.editor.onDidChangeModel, () => this.editor.getModel()), this.uiState = ia(this, (e) => {
			if (this.isDisposed.read(e)) return;
			let t = this.currentTextModel.read(e);
			if (t !== this.model.targetTextModel.read(e)) return;
			let n = this.model.ghostText.read(e);
			if (!n) return;
			let r = n instanceof gN ? n.columnRange : void 0, i = [], a = [];
			function o(e, t) {
				if (a.length > 0) {
					let n = a[a.length - 1];
					t && n.decorations.push(new Fr(n.content.length + 1, n.content.length + 1 + e[0].length, t, 0)), n.content += e[0], e = e.slice(1);
				}
				for (let n of e) a.push({
					content: n,
					decorations: t ? [new Fr(1, n.length + 1, t, 0)] : []
				});
			}
			let s = t.getLineContent(n.lineNumber), c, l = 0;
			for (let e of n.parts) {
				let t = e.lines;
				c === void 0 ? (i.push({
					column: e.column,
					text: t[0],
					preview: e.preview
				}), t = t.slice(1)) : o([s.substring(l, e.column - 1)], void 0), t.length > 0 && (o(t, DN), c === void 0 && e.column <= s.length && (c = e.column)), l = e.column - 1;
			}
			return c !== void 0 && o([s.substring(l)], void 0), {
				replacedRange: r,
				inlineTexts: i,
				additionalLines: a,
				hiddenRange: c === void 0 ? void 0 : new xN(c, s.length + 1),
				lineNumber: n.lineNumber,
				additionalReservedLineCount: this.model.minReservedLineCount.read(e),
				targetTextModel: t
			};
		}), this.decorations = ia(this, (e) => {
			let t = this.uiState.read(e);
			if (!t) return [];
			let n = [];
			t.replacedRange && n.push({
				range: t.replacedRange.toRange(t.lineNumber),
				options: {
					inlineClassName: "inline-completion-text-to-replace",
					description: "GhostTextReplacement"
				}
			}), t.hiddenRange && n.push({
				range: t.hiddenRange.toRange(t.lineNumber),
				options: {
					inlineClassName: "ghost-text-hidden",
					description: "ghost-text-hidden"
				}
			});
			for (let e of t.inlineTexts) n.push({
				range: E.fromPositions(new b(t.lineNumber, e.column)),
				options: {
					description: DN,
					after: {
						content: e.text,
						inlineClassName: e.preview ? "ghost-text-decoration-preview" : "ghost-text-decoration",
						cursorStops: il.Left
					},
					showIfCollapsed: !0
				}
			});
			return n;
		}), this.additionalLinesWidget = this._register(new kN(this.editor, this.languageService.languageIdCodec, ia((e) => {
			let t = this.uiState.read(e);
			return t ? {
				lineNumber: t.lineNumber,
				additionalLines: t.additionalLines,
				minReservedLineCount: t.additionalReservedLineCount,
				targetTextModel: t.targetTextModel
			} : void 0;
		}))), this._register(Gt(() => {
			this.isDisposed.set(!0, void 0);
		})), this._register(SN(this.editor, this.decorations));
	}
	ownsViewZone(e) {
		return this.additionalLinesWidget.viewZoneId === e;
	}
};
ON = TN([EN(2, dr)], ON);
var kN = class extends U {
	get viewZoneId() {
		return this._viewZoneId;
	}
	constructor(e, t, n) {
		super(), this.editor = e, this.languageIdCodec = t, this.lines = n, this._viewZoneId = void 0, this.editorOptionsChanged = Wa("editorOptionChanged", wt.filter(this.editor.onDidChangeConfiguration, (e) => e.hasChanged(33) || e.hasChanged(118) || e.hasChanged(100) || e.hasChanged(95) || e.hasChanged(51) || e.hasChanged(50) || e.hasChanged(67))), this._register(Os((e) => {
			let t = this.lines.read(e);
			this.editorOptionsChanged.read(e), t ? this.updateLines(t.lineNumber, t.additionalLines, t.minReservedLineCount) : this.clear();
		}));
	}
	dispose() {
		super.dispose(), this.clear();
	}
	clear() {
		this.editor.changeViewZones((e) => {
			this._viewZoneId &&= (e.removeZone(this._viewZoneId), void 0);
		});
	}
	updateLines(e, t, n) {
		let r = this.editor.getModel();
		if (!r) return;
		let { tabSize: i } = r.getOptions();
		this.editor.changeViewZones((r) => {
			this._viewZoneId &&= (r.removeZone(this._viewZoneId), void 0);
			let a = Math.max(t.length, n);
			if (a > 0) {
				let n = document.createElement("div");
				AN(n, i, t, this.editor.getOptions(), this.languageIdCodec), this._viewZoneId = r.addZone({
					afterLineNumber: e,
					heightInLines: a,
					domNode: n,
					afterColumnAffinity: 1
				});
			}
		});
	}
};
function AN(e, t, n, r, i) {
	let a = r.get(33), o = r.get(118), s = r.get(95), c = r.get(51), l = r.get(50), u = r.get(67), d = new ue(1e4);
	d.appendString("<div class=\"suggest-preview-text\">");
	for (let e = 0, r = n.length; e < r; e++) {
		let r = n[e], f = r.content;
		d.appendString("<div class=\"view-line"), d.appendString("\" style=\"top:"), d.appendString(String(e * u)), d.appendString("px;width:1000000px;\">");
		let p = $s(f), m = Yr(f), h = zi.createEmpty(f, i);
		sl(new Se(l.isMonospace && !a, l.canUseHalfwidthRightwardsArrow, f, !1, p, m, 0, h, r.decorations, t, 0, l.spaceWidth, l.middotWidth, l.wsmiddotWidth, o, "none", s, c !== Fc.OFF, null), d), d.appendString("</div>");
	}
	d.appendString("</div>"), gn(e, l);
	let f = d.build();
	e.innerHTML = jN ? jN.createHTML(f) : f;
}
var jN = Ur("editorGhostText", { createHTML: (e) => e });
// ../../../node_modules/.pnpm/monaco-editor@0.52.2/node_modules/monaco-editor/esm/vs/editor/common/model/bracketPairsTextModelPart/fixBrackets.js
function MN(e, t) {
	let n = new lo(), r = new gs(n, (e) => t.getLanguageConfiguration(e)), i = new yo(new NN([e]), r), a = Gs(i, [], void 0, !0), o = "", s = e.getLineContent();
	function c(e, t) {
		if (e.kind === 2) {
			if (c(e.openingBracket, t), t = qi(t, e.openingBracket.length), e.child && (c(e.child, t), t = qi(t, e.child.length)), e.closingBracket) c(e.closingBracket, t), t = qi(t, e.closingBracket.length);
			else {
				let t = r.getSingleLanguageBracketTokens(e.openingBracket.languageId).findClosingTokenText(e.openingBracket.bracketIds);
				o += t;
			}
		} else if (e.kind !== 3) {
			if (e.kind === 0 || e.kind === 1) o += s.substring(Yc(t), Yc(qi(t, e.length)));
			else if (e.kind === 4) for (let n of e.children) c(n, t), t = qi(t, n.length);
		}
	}
	return c(a, 0), o;
}
var NN = class {
	constructor(e) {
		this.lines = e, this.tokenization = { getLineTokens: (e) => this.lines[e - 1] };
	}
	getLineCount() {
		return this.lines.length;
	}
	getLineLength(e) {
		return this.lines[e - 1].getLineContent().length;
	}
};
// ../../../node_modules/.pnpm/monaco-editor@0.52.2/node_modules/monaco-editor/esm/vs/editor/contrib/inlineCompletions/browser/model/provideInlineCompletions.js
async function PN(e, t, n, r, a = C.None, o) {
	let s = t instanceof b ? RN(t, n) : t, c = e.all(n), l = new ee();
	for (let e of c) e.groupId && l.add(e.groupId, e);
	function u(e) {
		if (!e.yieldsToGroupIds) return [];
		let t = [];
		for (let n of e.yieldsToGroupIds || []) {
			let e = l.get(n);
			for (let n of e) t.push(n);
		}
		return t;
	}
	let d = /* @__PURE__ */ new Map(), f = /* @__PURE__ */ new Set();
	function p(e, t) {
		if (t = [...t, e], f.has(e)) return t;
		f.add(e);
		try {
			let n = u(e);
			for (let e of n) {
				let n = p(e, t);
				if (n) return n;
			}
		} finally {
			f.delete(e);
		}
	}
	function m(e) {
		let o = d.get(e);
		if (o) return o;
		let s = p(e, []);
		s && i(/* @__PURE__ */ Error(`Inline completions: cyclic yield-to dependency detected. Path: ${s.map((e) => e.toString ? e.toString() : "" + e).join(" -> ")}`));
		let c = new vr();
		return d.set(e, c.p), (async () => {
			if (!s) {
				let t = u(e);
				for (let e of t) {
					let t = await m(e);
					if (t && t.items.length > 0) return;
				}
			}
			try {
				return t instanceof b ? await e.provideInlineCompletions(n, t, r, a) : await e.provideInlineEdits?.(n, t, r, a);
			} catch (e) {
				i(e);
				return;
			}
		})().then((e) => c.complete(e), (e) => c.error(e)), c.p;
	}
	let h = await Promise.all(c.map(async (e) => ({
		provider: e,
		completions: await m(e)
	}))), te = /* @__PURE__ */ new Map(), ne = [];
	for (let e of h) {
		let t = e.completions;
		if (!t) continue;
		let r = new IN(t, e.provider);
		ne.push(r);
		for (let e of t.items) {
			let t = LN.from(e, r, s, n, o);
			te.set(t.hash(), t);
		}
	}
	return new FN(Array.from(te.values()), new Set(te.keys()), ne);
}
var FN = class {
	constructor(e, t, n) {
		this.completions = e, this.hashs = t, this.providerResults = n;
	}
	has(e) {
		return this.hashs.has(e.hash());
	}
	dispose() {
		for (let e of this.providerResults) e.removeRef();
	}
}, IN = class {
	constructor(e, t) {
		this.inlineCompletions = e, this.provider = t, this.refCount = 1;
	}
	addRef() {
		this.refCount++;
	}
	removeRef() {
		this.refCount--, this.refCount === 0 && this.provider.freeInlineCompletions(this.inlineCompletions);
	}
}, LN = class e {
	static from(t, n, r, i, a) {
		let o, s, c = t.range ? E.lift(t.range) : r;
		if (typeof t.insertText == "string") {
			if (o = t.insertText, a && t.completeBracketPairs) {
				o = zN(o, c.getStartPosition(), i, a);
				let e = o.length - t.insertText.length;
				e !== 0 && (c = new E(c.startLineNumber, c.startColumn, c.endLineNumber, c.endColumn + e));
			}
			s = void 0;
		} else if ("snippet" in t.insertText) {
			let e = t.insertText.snippet.length;
			if (a && t.completeBracketPairs) {
				t.insertText.snippet = zN(t.insertText.snippet, c.getStartPosition(), i, a);
				let n = t.insertText.snippet.length - e;
				n !== 0 && (c = new E(c.startLineNumber, c.startColumn, c.endLineNumber, c.endColumn + n));
			}
			let n = new PS().parse(t.insertText.snippet);
			n.children.length === 1 && n.children[0] instanceof TS ? (o = n.children[0].value, s = void 0) : (o = n.toString(), s = {
				snippet: t.insertText.snippet,
				range: c
			});
		} else ys(t.insertText);
		return new e(o, t.command, c, o, s, t.additionalTextEdits || bN(), t, n);
	}
	constructor(e, t, n, r, i, a, o, s) {
		this.filterText = e, this.command = t, this.range = n, this.insertText = r, this.snippetInfo = i, this.additionalTextEdits = a, this.sourceInlineCompletion = o, this.source = s, e = e.replace(/\r\n|\r/g, "\n"), r = e.replace(/\r\n|\r/g, "\n");
	}
	withRange(t) {
		return new e(this.filterText, this.command, t, this.insertText, this.snippetInfo, this.additionalTextEdits, this.sourceInlineCompletion, this.source);
	}
	hash() {
		return JSON.stringify({
			insertText: this.insertText,
			range: this.range.toString()
		});
	}
	toSingleTextEdit() {
		return new Ks(this.range, this.insertText);
	}
};
function RN(e, t) {
	let n = t.getWordAtPosition(e), r = t.getLineMaxColumn(e.lineNumber);
	return n ? new E(e.lineNumber, n.startColumn, e.lineNumber, r) : E.fromPositions(e, e.with(void 0, r));
}
function zN(e, t, n, r) {
	let i = n.getLineContent(t.lineNumber).substring(0, t.column - 1) + e, a = n.tokenization.tokenizeLineWithEdit(t, i.length - (t.column - 1), e)?.sliceAndInflate(t.column - 1, i.length, 0);
	return a ? MN(a, r) : e;
}
// ../../../node_modules/.pnpm/monaco-editor@0.52.2/node_modules/monaco-editor/esm/vs/editor/contrib/inlineCompletions/browser/model/singleTextEdit.js
function BN(e, t, n) {
	let r = n ? e.range.intersectRanges(n) : e.range;
	if (!r) return e;
	let i = t.getValueInRange(r, 1), a = $t(i, e.text), o = bo.ofText(i.substring(0, a)).addToPosition(e.range.getStartPosition()), s = e.text.substring(a), c = E.fromPositions(o, e.range.getEndPosition());
	return new Ks(c, s);
}
function VN(e, t) {
	return e.text.startsWith(t.text) && UN(e.range, t.range);
}
function HN(e, t, n, r, i = 0) {
	let a = BN(e, t);
	if (a.range.endLineNumber !== a.range.startLineNumber) return;
	let o = t.getLineContent(a.range.startLineNumber), s = Ut(o).length;
	if (a.range.startColumn - 1 <= s) {
		let e = Ut(a.text).length, t = o.substring(a.range.startColumn - 1, s), [n, r] = [a.range.getStartPosition(), a.range.getEndPosition()], i = n.column + t.length <= r.column ? n.delta(0, t.length) : r, c = E.fromPositions(i, r), l = a.text.startsWith(t) ? a.text.substring(t.length) : a.text.substring(e);
		a = new Ks(c, l);
	}
	let c = t.getValueInRange(a.range), l = GN(c, a.text);
	if (!l) return;
	let u = a.range.startLineNumber, d = [];
	if (n === "prefix") {
		let e = l.filter((e) => e.originalLength === 0);
		if (e.length > 1 || e.length === 1 && e[0].originalStart !== c.length) return;
	}
	let f = a.text.length - i;
	for (let e of l) {
		let t = a.range.startColumn + e.originalStart + e.originalLength;
		if (n === "subwordSmart" && r && r.lineNumber === a.range.startLineNumber && t < r.column || e.originalLength > 0) return;
		if (e.modifiedLength === 0) continue;
		let i = e.modifiedStart + e.modifiedLength, o = Math.max(e.modifiedStart, Math.min(i, f)), s = a.text.substring(e.modifiedStart, o), c = a.text.substring(o, Math.max(e.modifiedStart, i));
		s.length > 0 && d.push(new hN(t, s, !1)), c.length > 0 && d.push(new hN(t, c, !0));
	}
	return new mN(u, d);
}
function UN(e, t) {
	return t.getStartPosition().equals(e.getStartPosition()) && t.getEndPosition().isBeforeOrEqual(e.getEndPosition());
}
var WN = void 0;
function GN(e, t) {
	if (WN?.originalValue === e && WN?.newValue === t) return WN?.changes;
	{
		let n = qN(e, t, !0);
		if (n) {
			let r = KN(n);
			if (r > 0) {
				let i = qN(e, t, !1);
				i && KN(i) < r && (n = i);
			}
		}
		return WN = {
			originalValue: e,
			newValue: t,
			changes: n
		}, n;
	}
}
function KN(e) {
	let t = 0;
	for (let n of e) t += n.originalLength;
	return t;
}
function qN(e, t, n) {
	if (e.length > 5e3 || t.length > 5e3) return;
	function r(e) {
		let t = 0;
		for (let n = 0, r = e.length; n < r; n++) {
			let r = e.charCodeAt(n);
			r > t && (t = r);
		}
		return t;
	}
	let i = Math.max(r(e), r(t));
	function a(e) {
		if (e < 0) throw Error("unexpected");
		return i + e + 1;
	}
	function o(e) {
		let t = 0, r = 0, i = new Int32Array(e.length);
		for (let o = 0, s = e.length; o < s; o++) if (n && e[o] === "(") {
			let e = r * 100 + t;
			i[o] = a(2 * e), t++;
		} else if (n && e[o] === ")") {
			t = Math.max(t - 1, 0);
			let e = r * 100 + t;
			i[o] = a(2 * e + 1), t === 0 && r++;
		} else i[o] = e.charCodeAt(o);
		return i;
	}
	let s = o(e), c = o(t);
	return new mn({ getElements: () => s }, { getElements: () => c }).ComputeDiff(!1).changes;
}
// ../../../node_modules/.pnpm/monaco-editor@0.52.2/node_modules/monaco-editor/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionsSource.js
var JN = function(e, t, n, r) {
	var i = arguments.length, a = i < 3 ? t : r === null ? r = Object.getOwnPropertyDescriptor(t, n) : r, o;
	if (typeof Reflect == "object" && typeof Reflect.decorate == "function") a = Reflect.decorate(e, t, n, r);
	else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (i < 3 ? o(a) : i > 3 ? o(t, n, a) : o(t, n)) || a);
	return i > 3 && a && Object.defineProperty(t, n, a), a;
}, YN = function(e, t) {
	return function(n, r) {
		t(n, r, e);
	};
}, XN = class extends U {
	constructor(e, t, n, r, i) {
		super(), this.textModel = e, this.versionId = t, this._debounceValue = n, this.languageFeaturesService = r, this.languageConfigurationService = i, this._updateOperation = this._register(new Zr()), this.inlineCompletions = eo("inlineCompletions", void 0), this.suggestWidgetInlineCompletions = eo("suggestWidgetInlineCompletions", void 0), this._register(this.textModel.onDidChangeContent(() => {
			this._updateOperation.clear();
		}));
	}
	fetch(e, t, n) {
		let r = new QN(e, t, this.textModel.getVersionId()), i = t.selectedSuggestionInfo ? this.suggestWidgetInlineCompletions : this.inlineCompletions;
		if (this._updateOperation.value?.request.satisfies(r)) return this._updateOperation.value.promise;
		if (i.get()?.request.satisfies(r)) return Promise.resolve(!0);
		let a = !!this._updateOperation.value;
		this._updateOperation.clear();
		let o = new Cn(), s = (async () => {
			if ((a || t.triggerKind === Ws.Automatic) && await ZN(this._debounceValue.get(this.textModel), o.token), o.token.isCancellationRequested || this._store.isDisposed || this.textModel.getVersionId() !== r.versionId) return !1;
			let s = /* @__PURE__ */ new Date(), c = await PN(this.languageFeaturesService.inlineCompletionsProvider, e, this.textModel, t, o.token, this.languageConfigurationService);
			if (o.token.isCancellationRequested || this._store.isDisposed || this.textModel.getVersionId() !== r.versionId) return !1;
			let l = /* @__PURE__ */ new Date();
			this._debounceValue.update(this.textModel, l.getTime() - s.getTime());
			let u = new eP(c, r, this.textModel, this.versionId);
			if (n) {
				let t = n.toInlineCompletion(void 0);
				n.canBeReused(this.textModel, e) && !c.has(t) && u.prepend(n.inlineCompletion, t.range, !0);
			}
			return this._updateOperation.clear(), xo((e) => {
				i.set(u, e);
			}), !0;
		})(), c = new $N(r, o, s);
		return this._updateOperation.value = c, s;
	}
	clear(e) {
		this._updateOperation.clear(), this.inlineCompletions.set(void 0, e), this.suggestWidgetInlineCompletions.set(void 0, e);
	}
	clearSuggestWidgetInlineCompletions(e) {
		this._updateOperation.value?.request.context.selectedSuggestionInfo && this._updateOperation.clear(), this.suggestWidgetInlineCompletions.set(void 0, e);
	}
	cancelUpdate() {
		this._updateOperation.clear();
	}
};
XN = JN([YN(3, M), YN(4, Tn)], XN);
function ZN(e, t) {
	return new Promise((n) => {
		let r, i = setTimeout(() => {
			r && r.dispose(), n();
		}, e);
		t && (r = t.onCancellationRequested(() => {
			clearTimeout(i), r && r.dispose(), n();
		}));
	});
}
var QN = class {
	constructor(e, t, n) {
		this.position = e, this.context = t, this.versionId = n;
	}
	satisfies(e) {
		return this.position.equals(e.position) && fo(this.context.selectedSuggestionInfo, e.context.selectedSuggestionInfo, Yi()) && (e.context.triggerKind === Ws.Automatic || this.context.triggerKind === Ws.Explicit) && this.versionId === e.versionId;
	}
}, $N = class {
	constructor(e, t, n) {
		this.request = e, this.cancellationTokenSource = t, this.promise = n;
	}
	dispose() {
		this.cancellationTokenSource.cancel();
	}
}, eP = class {
	get inlineCompletions() {
		return this._inlineCompletions;
	}
	constructor(e, t, n, r) {
		this.inlineCompletionProviderResult = e, this.request = t, this._textModel = n, this._versionId = r, this._refCount = 1, this._prependedInlineCompletionItems = [];
		let i = n.deltaDecorations([], e.completions.map((e) => ({
			range: e.range,
			options: { description: "inline-completion-tracking-range" }
		})));
		this._inlineCompletions = e.completions.map((e, t) => new tP(e, i[t], this._textModel, this._versionId));
	}
	clone() {
		return this._refCount++, this;
	}
	dispose() {
		if (this._refCount--, this._refCount === 0) {
			setTimeout(() => {
				this._textModel.isDisposed() || this._textModel.deltaDecorations(this._inlineCompletions.map((e) => e.decorationId), []);
			}, 0), this.inlineCompletionProviderResult.dispose();
			for (let e of this._prependedInlineCompletionItems) e.source.removeRef();
		}
	}
	prepend(e, t, n) {
		n && e.source.addRef();
		let r = this._textModel.deltaDecorations([], [{
			range: t,
			options: { description: "inline-completion-tracking-range" }
		}])[0];
		this._inlineCompletions.unshift(new tP(e, r, this._textModel, this._versionId)), this._prependedInlineCompletionItems.push(e);
	}
}, tP = class {
	get forwardStable() {
		return this.inlineCompletion.source.inlineCompletions.enableForwardStability ?? !1;
	}
	constructor(e, t, n, r) {
		this.inlineCompletion = e, this.decorationId = t, this._textModel = n, this._modelVersion = r, this.semanticId = JSON.stringify([
			this.inlineCompletion.filterText,
			this.inlineCompletion.insertText,
			this.inlineCompletion.range.getStartPosition().toString()
		]), this._updatedRange = wa({
			owner: this,
			equalsFn: E.equalsRange
		}, (e) => (this._modelVersion.read(e), this._textModel.getDecorationRange(this.decorationId)));
	}
	toInlineCompletion(e) {
		return this.inlineCompletion.withRange(this._updatedRange.read(e) ?? nP);
	}
	toSingleTextEdit(e) {
		return new Ks(this._updatedRange.read(e) ?? nP, this.inlineCompletion.insertText);
	}
	isVisible(e, t, n) {
		let r = BN(this._toFilterTextReplacement(n), e), i = this._updatedRange.read(n);
		if (!i || !this.inlineCompletion.range.getStartPosition().equals(i.getStartPosition()) || t.lineNumber !== r.range.startLineNumber) return !1;
		let a = e.getValueInRange(r.range, 1), o = r.text, s = Math.max(0, t.column - r.range.startColumn), c = o.substring(0, s), l = o.substring(s), u = a.substring(0, s), d = a.substring(s), f = e.getLineIndentColumn(r.range.startLineNumber);
		return r.range.startColumn <= f && (u = u.trimStart(), u.length === 0 && (d = d.trimStart()), c = c.trimStart(), c.length === 0 && (l = l.trimStart())), c.startsWith(u) && !!nl(d, l);
	}
	canBeReused(e, t) {
		let n = this._updatedRange.read(void 0);
		return !!n && n.containsPosition(t) && this.isVisible(e, t, void 0) && bo.ofRange(n).isGreaterThanOrEqualTo(bo.ofRange(this.inlineCompletion.range));
	}
	_toFilterTextReplacement(e) {
		return new Ks(this._updatedRange.read(e) ?? nP, this.inlineCompletion.filterText);
	}
}, nP = new E(1, 1, 1, 1), $ = {
	Visible: EA,
	HasFocusedSuggestion: new z("suggestWidgetHasFocusedSuggestion", !1, B("suggestWidgetHasSelection", "Whether any suggestion is focused")),
	DetailsVisible: new z("suggestWidgetDetailsVisible", !1, B("suggestWidgetDetailsVisible", "Whether suggestion details are visible")),
	MultipleSuggestions: new z("suggestWidgetMultipleSuggestions", !1, B("suggestWidgetMultipleSuggestions", "Whether there are multiple suggestions to pick from")),
	MakesTextEdit: new z("suggestionMakesTextEdit", !0, B("suggestionMakesTextEdit", "Whether inserting the current suggestion yields in a change or has everything already been typed")),
	AcceptSuggestionsOnEnter: new z("acceptSuggestionOnEnter", !0, B("acceptSuggestionOnEnter", "Whether suggestions are inserted when pressing Enter")),
	HasInsertAndReplaceRange: new z("suggestionHasInsertAndReplaceRange", !1, B("suggestionHasInsertAndReplaceRange", "Whether the current suggestion has insert and replace behaviour")),
	InsertMode: new z("suggestionInsertMode", void 0, {
		type: "string",
		description: B("suggestionInsertMode", "Whether the default behaviour is to insert or replace")
	}),
	CanResolve: new z("suggestionCanResolve", !1, B("suggestionCanResolve", "Whether the current suggestion supports to resolve further details"))
}, rP = new F("suggestWidgetStatusBar"), iP = class {
	constructor(e, t, n, r) {
		this.position = e, this.completion = t, this.container = n, this.provider = r, this.isInvalid = !1, this.score = so.Default, this.distance = 0, this.textLabel = typeof t.label == "string" ? t.label : t.label?.label, this.labelLow = this.textLabel.toLowerCase(), this.isInvalid = !this.textLabel, this.sortTextLow = t.sortText && t.sortText.toLowerCase(), this.filterTextLow = t.filterText && t.filterText.toLowerCase(), this.extensionId = t.extensionId, E.isIRange(t.range) ? (this.editStart = new b(t.range.startLineNumber, t.range.startColumn), this.editInsertEnd = new b(t.range.endLineNumber, t.range.endColumn), this.editReplaceEnd = new b(t.range.endLineNumber, t.range.endColumn), this.isInvalid = this.isInvalid || E.spansMultipleLines(t.range) || t.range.startLineNumber !== e.lineNumber) : (this.editStart = new b(t.range.insert.startLineNumber, t.range.insert.startColumn), this.editInsertEnd = new b(t.range.insert.endLineNumber, t.range.insert.endColumn), this.editReplaceEnd = new b(t.range.replace.endLineNumber, t.range.replace.endColumn), this.isInvalid = this.isInvalid || E.spansMultipleLines(t.range.insert) || E.spansMultipleLines(t.range.replace) || t.range.insert.startLineNumber !== e.lineNumber || t.range.replace.startLineNumber !== e.lineNumber || t.range.insert.startColumn !== t.range.replace.startColumn), typeof r.resolveCompletionItem != "function" && (this._resolveCache = Promise.resolve(), this._resolveDuration = 0);
	}
	get isResolved() {
		return this._resolveDuration !== void 0;
	}
	get resolveDuration() {
		return this._resolveDuration === void 0 ? -1 : this._resolveDuration;
	}
	async resolve(e) {
		if (!this._resolveCache) {
			let t = e.onCancellationRequested(() => {
				this._resolveCache = void 0, this._resolveDuration = void 0;
			}), n = new lr(!0);
			this._resolveCache = Promise.resolve(this.provider.resolveCompletionItem(this.completion, e)).then((e) => {
				Object.assign(this.completion, e), this._resolveDuration = n.elapsed();
			}, (e) => {
				Li(e) && (this._resolveCache = void 0, this._resolveDuration = void 0);
			}).finally(() => {
				t.dispose();
			});
		}
		return this._resolveCache;
	}
}, aP = class e {
	static {
		this.default = new e();
	}
	constructor(e = 2, t = /* @__PURE__ */ new Set(), n = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Map(), i = !0) {
		this.snippetSortOrder = e, this.kindFilter = t, this.providerFilter = n, this.providerItemsToReuse = r, this.showDeprecated = i;
	}
}, oP = class {
	constructor(e, t, n, r) {
		this.items = e, this.needsClipboard = t, this.durations = n, this.disposable = r;
	}
};
async function sP(e, t, n, r = aP.default, a = { triggerKind: 0 }, o = C.None) {
	let s = new lr();
	n = n.clone();
	let c = t.getWordAtPosition(n), l = c ? new E(n.lineNumber, c.startColumn, n.lineNumber, c.endColumn) : E.fromPositions(n), u = {
		replace: l,
		insert: l.setEndPosition(n.lineNumber, n.column)
	}, d = [], f = new g(), p = [], m = !1, h = (e, t, i) => {
		let a = !1;
		if (!t) return a;
		for (let i of t.suggestions) if (!r.kindFilter.has(i.kind)) {
			if (!r.showDeprecated && i?.tags?.includes(1)) continue;
			i.range ||= u, i.sortText ||= typeof i.label == "string" ? i.label : i.label.label, !m && i.insertTextRules && i.insertTextRules & 4 && (m = PS.guessNeedsClipboard(i.insertText)), d.push(new iP(n, i, t, e)), a = !0;
		}
		return it(t) && f.add(t), p.push({
			providerName: e._debugDisplayName ?? "unknown_provider",
			elapsedProvider: t.duration ?? -1,
			elapsedOverall: i.elapsed()
		}), a;
	}, ee = (async () => {})();
	for (let s of e.orderedGroups(t)) {
		let e = !1;
		if (await Promise.all(s.map(async (s) => {
			if (r.providerItemsToReuse.has(s)) {
				let t = r.providerItemsToReuse.get(s);
				t.forEach((e) => d.push(e)), e ||= t.length > 0;
			} else if (!(r.providerFilter.size > 0 && !r.providerFilter.has(s))) try {
				let r = new lr(), i = await s.provideCompletionItems(t, n, a, o);
				e = h(s, i, r) || e;
			} catch (e) {
				i(e);
			}
		})), e || o.isCancellationRequested) break;
	}
	return await ee, o.isCancellationRequested ? (f.dispose(), Promise.reject(new Di())) : new oP(d.sort(fP(r.snippetSortOrder)), m, {
		entries: p,
		elapsed: s.elapsed()
	}, f);
}
function cP(e, t) {
	if (e.sortTextLow && t.sortTextLow) {
		if (e.sortTextLow < t.sortTextLow) return -1;
		if (e.sortTextLow > t.sortTextLow) return 1;
	}
	return e.textLabel < t.textLabel ? -1 : e.textLabel > t.textLabel ? 1 : e.completion.kind - t.completion.kind;
}
function lP(e, t) {
	if (e.completion.kind !== t.completion.kind) {
		if (e.completion.kind === 27) return -1;
		if (t.completion.kind === 27) return 1;
	}
	return cP(e, t);
}
function uP(e, t) {
	if (e.completion.kind !== t.completion.kind) {
		if (e.completion.kind === 27) return 1;
		if (t.completion.kind === 27) return -1;
	}
	return cP(e, t);
}
var dP = /* @__PURE__ */ new Map();
dP.set(0, lP), dP.set(2, uP), dP.set(1, cP);
function fP(e) {
	return dP.get(e);
}
Ol.registerCommand("_executeCompletionItemProvider", async (e, ...t) => {
	let [n, r, i, a] = t;
	y(De.isUri(n)), y(b.isIPosition(r)), y(typeof i == "string" || !i), y(typeof a == "number" || !a);
	let { completionProvider: o } = e.get(M), s = await e.get(Ve).createModelReference(n);
	try {
		let e = {
			incomplete: !1,
			suggestions: []
		}, t = [], n = s.object.textEditorModel.validatePosition(r), c = await sP(o, s.object.textEditorModel, n, void 0, {
			triggerCharacter: i ?? void 0,
			triggerKind: +!!i
		});
		for (let n of c.items) t.length < (a ?? 0) && t.push(n.resolve(C.None)), e.incomplete = e.incomplete || n.container.incomplete, e.suggestions.push(n.completion);
		try {
			return await Promise.all(t), e;
		} finally {
			setTimeout(() => c.disposable.dispose(), 100);
		}
	} finally {
		s.dispose();
	}
});
function pP(e, t) {
	e.getContribution("editor.contrib.suggestController")?.triggerSuggest((/* @__PURE__ */ new Set()).add(t), void 0, !0);
}
var mP = class {
	static isAllOff(e) {
		return e.other === "off" && e.comments === "off" && e.strings === "off";
	}
	static isAllOn(e) {
		return e.other === "on" && e.comments === "on" && e.strings === "on";
	}
	static valueFor(e, t) {
		switch (t) {
			case 1: return e.comments;
			case 2: return e.strings;
			default: return e.other;
		}
	}
};
// ../../../node_modules/.pnpm/monaco-editor@0.52.2/node_modules/monaco-editor/esm/vs/base/common/labels.js
function hP(e, t = mo) {
	return tt(e, t) ? e.charAt(0).toUpperCase() + e.slice(1) : e;
}
// ../../../node_modules/.pnpm/monaco-editor@0.52.2/node_modules/monaco-editor/esm/vs/editor/contrib/snippet/browser/snippetVariables.js
var gP = function(e, t, n, r) {
	var i = arguments.length, a = i < 3 ? t : r === null ? r = Object.getOwnPropertyDescriptor(t, n) : r, o;
	if (typeof Reflect == "object" && typeof Reflect.decorate == "function") a = Reflect.decorate(e, t, n, r);
	else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (i < 3 ? o(a) : i > 3 ? o(t, n, a) : o(t, n)) || a);
	return i > 3 && a && Object.defineProperty(t, n, a), a;
}, _P = function(e, t) {
	return function(n, r) {
		t(n, r, e);
	};
};
Object.freeze({
	CURRENT_YEAR: !0,
	CURRENT_YEAR_SHORT: !0,
	CURRENT_MONTH: !0,
	CURRENT_DATE: !0,
	CURRENT_HOUR: !0,
	CURRENT_MINUTE: !0,
	CURRENT_SECOND: !0,
	CURRENT_DAY_NAME: !0,
	CURRENT_DAY_NAME_SHORT: !0,
	CURRENT_MONTH_NAME: !0,
	CURRENT_MONTH_NAME_SHORT: !0,
	CURRENT_SECONDS_UNIX: !0,
	CURRENT_TIMEZONE_OFFSET: !0,
	SELECTION: !0,
	CLIPBOARD: !0,
	TM_SELECTED_TEXT: !0,
	TM_CURRENT_LINE: !0,
	TM_CURRENT_WORD: !0,
	TM_LINE_INDEX: !0,
	TM_LINE_NUMBER: !0,
	TM_FILENAME: !0,
	TM_FILENAME_BASE: !0,
	TM_DIRECTORY: !0,
	TM_FILEPATH: !0,
	CURSOR_INDEX: !0,
	CURSOR_NUMBER: !0,
	RELATIVE_FILEPATH: !0,
	BLOCK_COMMENT_START: !0,
	BLOCK_COMMENT_END: !0,
	LINE_COMMENT: !0,
	WORKSPACE_NAME: !0,
	WORKSPACE_FOLDER: !0,
	RANDOM: !0,
	RANDOM_HEX: !0,
	UUID: !0
});
var vP = class {
	constructor(e) {
		this._delegates = e;
	}
	resolve(e) {
		for (let t of this._delegates) {
			let n = t.resolve(e);
			if (n !== void 0) return n;
		}
	}
}, yP = class {
	constructor(e, t, n, r) {
		this._model = e, this._selection = t, this._selectionIdx = n, this._overtypingCapturer = r;
	}
	resolve(e) {
		let { name: t } = e;
		if (t === "SELECTION" || t === "TM_SELECTED_TEXT") {
			let t = this._model.getValueInRange(this._selection) || void 0, n = this._selection.startLineNumber !== this._selection.endLineNumber;
			if (!t && this._overtypingCapturer) {
				let e = this._overtypingCapturer.getLastOvertypedInfo(this._selectionIdx);
				e && (t = e.value, n = e.multiline);
			}
			if (t && n && e.snippet) {
				let n = this._model.getLineContent(this._selection.startLineNumber), r = Ut(n, 0, this._selection.startColumn - 1), i = r;
				e.snippet.walk((t) => t !== e && (t instanceof TS && (i = Ut(Va(t.value).pop())), !0));
				let a = $t(i, r);
				t = t.replace(/(\r\n|\r|\n)(.*)/g, (e, t, n) => `${t}${i.substr(a)}${n}`);
			}
			return t;
		}
		if (t === "TM_CURRENT_LINE") return this._model.getLineContent(this._selection.positionLineNumber);
		if (t === "TM_CURRENT_WORD") {
			let e = this._model.getWordAtPosition({
				lineNumber: this._selection.positionLineNumber,
				column: this._selection.positionColumn
			});
			return e && e.word || void 0;
		}
		if (t === "TM_LINE_INDEX") return String(this._selection.positionLineNumber - 1);
		if (t === "TM_LINE_NUMBER") return String(this._selection.positionLineNumber);
		if (t === "CURSOR_INDEX") return String(this._selectionIdx);
		if (t === "CURSOR_NUMBER") return String(this._selectionIdx + 1);
	}
}, bP = class {
	constructor(e, t) {
		this._labelService = e, this._model = t;
	}
	resolve(e) {
		let { name: t } = e;
		if (t === "TM_FILENAME") return Nn(this._model.uri.fsPath);
		if (t === "TM_FILENAME_BASE") {
			let e = Nn(this._model.uri.fsPath), t = e.lastIndexOf(".");
			return t <= 0 ? e : e.slice(0, t);
		}
		if (t === "TM_DIRECTORY") return Yo(this._model.uri.fsPath) === "." ? "" : this._labelService.getUriLabel(xa(this._model.uri));
		if (t === "TM_FILEPATH") return this._labelService.getUriLabel(this._model.uri);
		if (t === "RELATIVE_FILEPATH") return this._labelService.getUriLabel(this._model.uri, {
			relative: !0,
			noPrefix: !0
		});
	}
}, xP = class {
	constructor(e, t, n, r) {
		this._readClipboardText = e, this._selectionIdx = t, this._selectionCount = n, this._spread = r;
	}
	resolve(e) {
		if (e.name !== "CLIPBOARD") return;
		let t = this._readClipboardText();
		if (t) {
			if (this._spread) {
				let e = t.split(/\r\n|\n|\r/).filter((e) => !Nt(e));
				if (e.length === this._selectionCount) return e[this._selectionIdx];
			}
			return t;
		}
	}
}, SP = class {
	constructor(e, t, n) {
		this._model = e, this._selection = t, this._languageConfigurationService = n;
	}
	resolve(e) {
		let { name: t } = e, n = this._model.getLanguageIdAtPosition(this._selection.selectionStartLineNumber, this._selection.selectionStartColumn), r = this._languageConfigurationService.getLanguageConfiguration(n).comments;
		if (r) {
			if (t === "LINE_COMMENT") return r.lineCommentToken || void 0;
			if (t === "BLOCK_COMMENT_START") return r.blockCommentStartToken || void 0;
			if (t === "BLOCK_COMMENT_END") return r.blockCommentEndToken || void 0;
		}
	}
};
SP = gP([_P(2, Tn)], SP);
var CP = class e {
	constructor() {
		this._date = /* @__PURE__ */ new Date();
	}
	static {
		this.dayNames = [
			B("Sunday", "Sunday"),
			B("Monday", "Monday"),
			B("Tuesday", "Tuesday"),
			B("Wednesday", "Wednesday"),
			B("Thursday", "Thursday"),
			B("Friday", "Friday"),
			B("Saturday", "Saturday")
		];
	}
	static {
		this.dayNamesShort = [
			B("SundayShort", "Sun"),
			B("MondayShort", "Mon"),
			B("TuesdayShort", "Tue"),
			B("WednesdayShort", "Wed"),
			B("ThursdayShort", "Thu"),
			B("FridayShort", "Fri"),
			B("SaturdayShort", "Sat")
		];
	}
	static {
		this.monthNames = [
			B("January", "January"),
			B("February", "February"),
			B("March", "March"),
			B("April", "April"),
			B("May", "May"),
			B("June", "June"),
			B("July", "July"),
			B("August", "August"),
			B("September", "September"),
			B("October", "October"),
			B("November", "November"),
			B("December", "December")
		];
	}
	static {
		this.monthNamesShort = [
			B("JanuaryShort", "Jan"),
			B("FebruaryShort", "Feb"),
			B("MarchShort", "Mar"),
			B("AprilShort", "Apr"),
			B("MayShort", "May"),
			B("JuneShort", "Jun"),
			B("JulyShort", "Jul"),
			B("AugustShort", "Aug"),
			B("SeptemberShort", "Sep"),
			B("OctoberShort", "Oct"),
			B("NovemberShort", "Nov"),
			B("DecemberShort", "Dec")
		];
	}
	resolve(t) {
		let { name: n } = t;
		if (n === "CURRENT_YEAR") return String(this._date.getFullYear());
		if (n === "CURRENT_YEAR_SHORT") return String(this._date.getFullYear()).slice(-2);
		if (n === "CURRENT_MONTH") return String(this._date.getMonth().valueOf() + 1).padStart(2, "0");
		if (n === "CURRENT_DATE") return String(this._date.getDate().valueOf()).padStart(2, "0");
		if (n === "CURRENT_HOUR") return String(this._date.getHours().valueOf()).padStart(2, "0");
		if (n === "CURRENT_MINUTE") return String(this._date.getMinutes().valueOf()).padStart(2, "0");
		if (n === "CURRENT_SECOND") return String(this._date.getSeconds().valueOf()).padStart(2, "0");
		if (n === "CURRENT_DAY_NAME") return e.dayNames[this._date.getDay()];
		if (n === "CURRENT_DAY_NAME_SHORT") return e.dayNamesShort[this._date.getDay()];
		if (n === "CURRENT_MONTH_NAME") return e.monthNames[this._date.getMonth()];
		if (n === "CURRENT_MONTH_NAME_SHORT") return e.monthNamesShort[this._date.getMonth()];
		if (n === "CURRENT_SECONDS_UNIX") return String(Math.floor(this._date.getTime() / 1e3));
		if (n === "CURRENT_TIMEZONE_OFFSET") {
			let e = this._date.getTimezoneOffset(), t = e > 0 ? "-" : "+", n = Math.trunc(Math.abs(e / 60)), r = n < 10 ? "0" + n : n, i = Math.abs(e) - n * 60, a = i < 10 ? "0" + i : i;
			return t + r + ":" + a;
		}
	}
}, wP = class {
	constructor(e) {
		this._workspaceService = e;
	}
	resolve(e) {
		if (!this._workspaceService) return;
		let t = hn(this._workspaceService.getWorkspace());
		if (!Qo(t)) {
			if (e.name === "WORKSPACE_NAME") return this._resolveWorkspaceName(t);
			if (e.name === "WORKSPACE_FOLDER") return this._resoveWorkspacePath(t);
		}
	}
	_resolveWorkspaceName(e) {
		if (te(e)) return Nn(e.uri.path);
		let t = Nn(e.configPath.path);
		return t.endsWith("code-workspace") && (t = t.substr(0, t.length - In.length - 1)), t;
	}
	_resoveWorkspacePath(e) {
		if (te(e)) return hP(e.uri.fsPath);
		let t = Nn(e.configPath.path), n = e.configPath.fsPath;
		return n.endsWith(t) && (n = n.substr(0, n.length - t.length - 1)), n ? hP(n) : "/";
	}
}, TP = class {
	resolve(e) {
		let { name: t } = e;
		if (t === "RANDOM") return Math.random().toString().slice(-6);
		if (t === "RANDOM_HEX") return Math.random().toString(16).slice(-6);
		if (t === "UUID") return Zx();
	}
}, EP = function(e, t, n, r) {
	var i = arguments.length, a = i < 3 ? t : r === null ? r = Object.getOwnPropertyDescriptor(t, n) : r, o;
	if (typeof Reflect == "object" && typeof Reflect.decorate == "function") a = Reflect.decorate(e, t, n, r);
	else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (i < 3 ? o(a) : i > 3 ? o(t, n, a) : o(t, n)) || a);
	return i > 3 && a && Object.defineProperty(t, n, a), a;
}, DP = function(e, t) {
	return function(n, r) {
		t(n, r, e);
	};
}, OP, kP = class e {
	static {
		this._decor = {
			active: L.register({
				description: "snippet-placeholder-1",
				stickiness: 0,
				className: "snippet-placeholder"
			}),
			inactive: L.register({
				description: "snippet-placeholder-2",
				stickiness: 1,
				className: "snippet-placeholder"
			}),
			activeFinal: L.register({
				description: "snippet-placeholder-3",
				stickiness: 1,
				className: "finish-snippet-placeholder"
			}),
			inactiveFinal: L.register({
				description: "snippet-placeholder-4",
				stickiness: 1,
				className: "finish-snippet-placeholder"
			})
		};
	}
	constructor(e, t, n) {
		this._editor = e, this._snippet = t, this._snippetLineLeadingWhitespace = n, this._offset = -1, this._nestingLevel = 1, this._placeholderGroups = cn(t.placeholders, DS.compareByIndex), this._placeholderGroupsIdx = -1;
	}
	initialize(e) {
		this._offset = e.newPosition;
	}
	dispose() {
		this._placeholderDecorations && this._editor.removeDecorations([...this._placeholderDecorations.values()]), this._placeholderGroups.length = 0;
	}
	_initDecorations() {
		if (this._offset === -1) throw Error("Snippet not initialized!");
		if (this._placeholderDecorations) return;
		this._placeholderDecorations = /* @__PURE__ */ new Map();
		let t = this._editor.getModel();
		this._editor.changeDecorations((n) => {
			for (let r of this._snippet.placeholders) {
				let i = this._snippet.offset(r), a = this._snippet.fullLen(r), o = E.fromPositions(t.getPositionAt(this._offset + i), t.getPositionAt(this._offset + i + a)), s = r.isFinalTabstop ? e._decor.inactiveFinal : e._decor.inactive, c = n.addDecoration(o, s);
				this._placeholderDecorations.set(r, c);
			}
		});
	}
	move(t) {
		if (!this._editor.hasModel()) return [];
		if (this._initDecorations(), this._placeholderGroupsIdx >= 0) {
			let e = [];
			for (let t of this._placeholderGroups[this._placeholderGroupsIdx]) if (t.transform) {
				let n = this._placeholderDecorations.get(t), r = this._editor.getModel().getDecorationRange(n), i = this._editor.getModel().getValueInRange(r), a = t.transform.resolve(i).split(/\r\n|\r|\n/);
				for (let e = 1; e < a.length; e++) a[e] = this._editor.getModel().normalizeIndentation(this._snippetLineLeadingWhitespace + a[e]);
				e.push(fr.replace(r, a.join(this._editor.getModel().getEOL())));
			}
			e.length > 0 && this._editor.executeEdits("snippet.placeholderTransform", e);
		}
		let n = !1;
		t === !0 && this._placeholderGroupsIdx < this._placeholderGroups.length - 1 ? (this._placeholderGroupsIdx += 1, n = !0) : t === !1 && this._placeholderGroupsIdx > 0 && (--this._placeholderGroupsIdx, n = !0);
		let r = this._editor.getModel().changeDecorations((t) => {
			let r = /* @__PURE__ */ new Set(), i = [];
			for (let a of this._placeholderGroups[this._placeholderGroupsIdx]) {
				let o = this._placeholderDecorations.get(a), s = this._editor.getModel().getDecorationRange(o);
				i.push(new V(s.startLineNumber, s.startColumn, s.endLineNumber, s.endColumn)), n &&= this._hasPlaceholderBeenCollapsed(a), t.changeDecorationOptions(o, a.isFinalTabstop ? e._decor.activeFinal : e._decor.active), r.add(a);
				for (let n of this._snippet.enclosingPlaceholders(a)) {
					let i = this._placeholderDecorations.get(n);
					t.changeDecorationOptions(i, n.isFinalTabstop ? e._decor.activeFinal : e._decor.active), r.add(n);
				}
			}
			for (let [n, i] of this._placeholderDecorations) r.has(n) || t.changeDecorationOptions(i, n.isFinalTabstop ? e._decor.inactiveFinal : e._decor.inactive);
			return i;
		});
		return n ? this.move(t) : r ?? [];
	}
	_hasPlaceholderBeenCollapsed(e) {
		let t = e;
		for (; t;) {
			if (t instanceof DS) {
				let e = this._placeholderDecorations.get(t);
				if (this._editor.getModel().getDecorationRange(e).isEmpty() && t.toString().length > 0) return !0;
			}
			t = t.parent;
		}
		return !1;
	}
	get isAtFirstPlaceholder() {
		return this._placeholderGroupsIdx <= 0 || this._placeholderGroups.length === 0;
	}
	get isAtLastPlaceholder() {
		return this._placeholderGroupsIdx === this._placeholderGroups.length - 1;
	}
	get hasPlaceholder() {
		return this._snippet.placeholders.length > 0;
	}
	get isTrivialSnippet() {
		if (this._snippet.placeholders.length === 0) return !0;
		if (this._snippet.placeholders.length === 1) {
			let [e] = this._snippet.placeholders;
			if (e.isFinalTabstop && this._snippet.rightMostDescendant === e) return !0;
		}
		return !1;
	}
	computePossibleSelections() {
		let e = /* @__PURE__ */ new Map();
		for (let t of this._placeholderGroups) {
			let n;
			for (let r of t) {
				if (r.isFinalTabstop) break;
				n || (n = [], e.set(r.index, n));
				let t = this._placeholderDecorations.get(r), i = this._editor.getModel().getDecorationRange(t);
				if (!i) {
					e.delete(r.index);
					break;
				}
				n.push(i);
			}
		}
		return e;
	}
	get activeChoice() {
		if (!this._placeholderDecorations) return;
		let e = this._placeholderGroups[this._placeholderGroupsIdx][0];
		if (!e?.choice) return;
		let t = this._placeholderDecorations.get(e);
		if (!t) return;
		let n = this._editor.getModel().getDecorationRange(t);
		if (n) return {
			range: n,
			choice: e.choice
		};
	}
	get hasChoice() {
		let e = !1;
		return this._snippet.walk((t) => (e = t instanceof OS, !e)), e;
	}
	merge(t) {
		let n = this._editor.getModel();
		this._nestingLevel *= 10, this._editor.changeDecorations((r) => {
			for (let i of this._placeholderGroups[this._placeholderGroupsIdx]) {
				let a = t.shift();
				console.assert(a._offset !== -1), console.assert(!a._placeholderDecorations);
				let o = a._snippet.placeholderInfo.last.index;
				for (let e of a._snippet.placeholderInfo.all) e.index = e.isFinalTabstop ? i.index + (o + 1) / this._nestingLevel : i.index + e.index / this._nestingLevel;
				this._snippet.replace(i, a._snippet.children);
				let s = this._placeholderDecorations.get(i);
				r.removeDecoration(s), this._placeholderDecorations.delete(i);
				for (let t of a._snippet.placeholders) {
					let i = a._snippet.offset(t), o = a._snippet.fullLen(t), s = E.fromPositions(n.getPositionAt(a._offset + i), n.getPositionAt(a._offset + i + o)), c = r.addDecoration(s, e._decor.inactive);
					this._placeholderDecorations.set(t, c);
				}
			}
			this._placeholderGroups = cn(this._snippet.placeholders, DS.compareByIndex);
		});
	}
}, AP = {
	overwriteBefore: 0,
	overwriteAfter: 0,
	adjustWhitespace: !0,
	clipboardText: void 0,
	overtypingCapturer: void 0
}, jP = OP = class {
	static adjustWhitespace(e, t, n, r, i) {
		let a = e.getLineContent(t.lineNumber), o = Ut(a, 0, t.column - 1), s;
		return r.walk((t) => {
			if (!(t instanceof TS) || t.parent instanceof OS || i && !i.has(t)) return !0;
			let a = t.value.split(/\r\n|\r|\n/);
			if (n) {
				let n = r.offset(t);
				if (n === 0) a[0] = e.normalizeIndentation(a[0]);
				else {
					s ??= r.toString();
					let t = s.charCodeAt(n - 1);
					(t === 10 || t === 13) && (a[0] = e.normalizeIndentation(o + a[0]));
				}
				for (let t = 1; t < a.length; t++) a[t] = e.normalizeIndentation(o + a[t]);
			}
			let c = a.join(e.getEOL());
			return c !== t.value && (t.parent.replace(t, [new TS(c)]), s = void 0), !0;
		}), o;
	}
	static adjustSelection(e, t, n, r) {
		if (n !== 0 || r !== 0) {
			let { positionLineNumber: i, positionColumn: a } = t, o = a - n, s = a + r, c = e.validateRange({
				startLineNumber: i,
				startColumn: o,
				endLineNumber: i,
				endColumn: s
			});
			t = V.createWithDirection(c.startLineNumber, c.startColumn, c.endLineNumber, c.endColumn, t.getDirection());
		}
		return t;
	}
	static createEditsAndSnippetsFromSelections(e, t, n, r, i, a, o, s, c) {
		let l = [], u = [];
		if (!e.hasModel()) return {
			edits: l,
			snippets: u
		};
		let d = e.getModel(), f = e.invokeWithinContext((e) => e.get(Ae)), p = e.invokeWithinContext((e) => new bP(e.get(an), d)), m = () => o, h = d.getValueInRange(OP.adjustSelection(d, e.getSelection(), n, 0)), ee = d.getValueInRange(OP.adjustSelection(d, e.getSelection(), 0, r)), te = d.getLineFirstNonWhitespaceColumn(e.getSelection().positionLineNumber), ne = e.getSelections().map((e, t) => ({
			selection: e,
			idx: t
		})).sort((e, t) => E.compareRangesUsingStarts(e.selection, t.selection));
		for (let { selection: o, idx: re } of ne) {
			let ie = OP.adjustSelection(d, o, n, 0), ae = OP.adjustSelection(d, o, 0, r);
			h !== d.getValueInRange(ie) && (ie = o), ee !== d.getValueInRange(ae) && (ae = o);
			let oe = o.setStartPosition(ie.startLineNumber, ie.startColumn).setEndPosition(ae.endLineNumber, ae.endColumn), se = new PS().parse(t, !0, i), ce = oe.getStartPosition(), g = OP.adjustWhitespace(d, ce, a || re > 0 && te !== d.getLineFirstNonWhitespaceColumn(o.positionLineNumber), se);
			se.resolveVariables(new vP([
				p,
				new xP(m, re, ne.length, e.getOption(79) === "spread"),
				new yP(d, o, re, s),
				new SP(d, o, c),
				new CP(),
				new wP(f),
				new TP()
			])), l[re] = fr.replace(oe, se.toString()), l[re].identifier = {
				major: re,
				minor: 0
			}, l[re]._isTracked = !0, u[re] = new kP(e, se, g);
		}
		return {
			edits: l,
			snippets: u
		};
	}
	static createEditsAndSnippetsFromEdits(e, t, n, r, i, a, o) {
		if (!e.hasModel() || t.length === 0) return {
			edits: [],
			snippets: []
		};
		let s = [], c = e.getModel(), l = new PS(), u = new NS(), d = new vP([
			e.invokeWithinContext((e) => new bP(e.get(an), c)),
			new xP(() => i, 0, e.getSelections().length, e.getOption(79) === "spread"),
			new yP(c, e.getSelection(), 0, a),
			new SP(c, e.getSelection(), o),
			new CP(),
			new wP(e.invokeWithinContext((e) => e.get(Ae))),
			new TP()
		]);
		t = t.sort((e, t) => E.compareRangesUsingStarts(e.range, t.range));
		let f = 0;
		for (let e = 0; e < t.length; e++) {
			let { range: n, template: r } = t[e];
			if (e > 0) {
				let r = t[e - 1].range, i = E.fromPositions(r.getEndPosition(), n.getStartPosition()), a = new TS(c.getValueInRange(i));
				u.appendChild(a), f += a.value.length;
			}
			let i = l.parseFragment(r, u);
			OP.adjustWhitespace(c, n.getStartPosition(), !0, u, new Set(i)), u.resolveVariables(d);
			let a = u.toString(), o = a.slice(f);
			f = a.length;
			let p = fr.replace(n, o);
			p.identifier = {
				major: e,
				minor: 0
			}, p._isTracked = !0, s.push(p);
		}
		return l.ensureFinalTabstop(u, n, !0), {
			edits: s,
			snippets: [new kP(e, u, "")]
		};
	}
	constructor(e, t, n = AP, r) {
		this._editor = e, this._template = t, this._options = n, this._languageConfigurationService = r, this._templateMerges = [], this._snippets = [];
	}
	dispose() {
		ci(this._snippets);
	}
	_logInfo() {
		return `template="${this._template}", merged_templates="${this._templateMerges.join(" -> ")}"`;
	}
	insert() {
		if (!this._editor.hasModel()) return;
		let { edits: e, snippets: t } = typeof this._template == "string" ? OP.createEditsAndSnippetsFromSelections(this._editor, this._template, this._options.overwriteBefore, this._options.overwriteAfter, !1, this._options.adjustWhitespace, this._options.clipboardText, this._options.overtypingCapturer, this._languageConfigurationService) : OP.createEditsAndSnippetsFromEdits(this._editor, this._template, !1, this._options.adjustWhitespace, this._options.clipboardText, this._options.overtypingCapturer, this._languageConfigurationService);
		this._snippets = t, this._editor.executeEdits("snippet", e, (e) => {
			let n = e.filter((e) => !!e.identifier);
			for (let e = 0; e < t.length; e++) t[e].initialize(n[e].textChange);
			return this._snippets[0].hasPlaceholder ? this._move(!0) : n.map((e) => V.fromPositions(e.range.getEndPosition()));
		}), this._editor.revealRange(this._editor.getSelections()[0]);
	}
	merge(e, t = AP) {
		if (!this._editor.hasModel()) return;
		this._templateMerges.push([
			this._snippets[0]._nestingLevel,
			this._snippets[0]._placeholderGroupsIdx,
			e
		]);
		let { edits: n, snippets: r } = OP.createEditsAndSnippetsFromSelections(this._editor, e, t.overwriteBefore, t.overwriteAfter, !0, t.adjustWhitespace, t.clipboardText, t.overtypingCapturer, this._languageConfigurationService);
		this._editor.executeEdits("snippet", n, (e) => {
			let t = e.filter((e) => !!e.identifier);
			for (let e = 0; e < r.length; e++) r[e].initialize(t[e].textChange);
			let n = r[0].isTrivialSnippet;
			if (!n) {
				for (let e of this._snippets) e.merge(r);
				console.assert(r.length === 0);
			}
			return this._snippets[0].hasPlaceholder && !n ? this._move(void 0) : t.map((e) => V.fromPositions(e.range.getEndPosition()));
		});
	}
	next() {
		let e = this._move(!0);
		this._editor.setSelections(e), this._editor.revealPositionInCenterIfOutsideViewport(e[0].getPosition());
	}
	prev() {
		let e = this._move(!1);
		this._editor.setSelections(e), this._editor.revealPositionInCenterIfOutsideViewport(e[0].getPosition());
	}
	_move(e) {
		let t = [];
		for (let n of this._snippets) {
			let r = n.move(e);
			t.push(...r);
		}
		return t;
	}
	get isAtFirstPlaceholder() {
		return this._snippets[0].isAtFirstPlaceholder;
	}
	get isAtLastPlaceholder() {
		return this._snippets[0].isAtLastPlaceholder;
	}
	get hasPlaceholder() {
		return this._snippets[0].hasPlaceholder;
	}
	get hasChoice() {
		return this._snippets[0].hasChoice;
	}
	get activeChoice() {
		return this._snippets[0].activeChoice;
	}
	isSelectionWithinPlaceholders() {
		if (!this.hasPlaceholder) return !1;
		let e = this._editor.getSelections();
		if (e.length < this._snippets.length) return !1;
		let t = /* @__PURE__ */ new Map();
		for (let n of this._snippets) {
			let r = n.computePossibleSelections();
			if (t.size === 0) for (let [n, i] of r) {
				i.sort(E.compareRangesUsingStarts);
				for (let r of e) if (i[0].containsRange(r)) {
					t.set(n, []);
					break;
				}
			}
			if (t.size === 0) return !1;
			t.forEach((e, t) => {
				e.push(...r.get(t));
			});
		}
		e.sort(E.compareRangesUsingStarts);
		for (let [n, r] of t) if (r.length !== e.length) t.delete(n);
		else {
			r.sort(E.compareRangesUsingStarts);
			for (let i = 0; i < r.length; i++) if (!r[i].containsRange(e[i])) {
				t.delete(n);
				continue;
			}
		}
		return t.size > 0;
	}
};
jP = OP = EP([DP(3, Tn)], jP);
// ../../../node_modules/.pnpm/monaco-editor@0.52.2/node_modules/monaco-editor/esm/vs/editor/contrib/snippet/browser/snippetController2.js
var MP = function(e, t, n, r) {
	var i = arguments.length, a = i < 3 ? t : r === null ? r = Object.getOwnPropertyDescriptor(t, n) : r, o;
	if (typeof Reflect == "object" && typeof Reflect.decorate == "function") a = Reflect.decorate(e, t, n, r);
	else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (i < 3 ? o(a) : i > 3 ? o(t, n, a) : o(t, n)) || a);
	return i > 3 && a && Object.defineProperty(t, n, a), a;
}, NP = function(e, t) {
	return function(n, r) {
		t(n, r, e);
	};
}, PP, FP = {
	overwriteBefore: 0,
	overwriteAfter: 0,
	undoStopBefore: !0,
	undoStopAfter: !0,
	adjustWhitespace: !0,
	clipboardText: void 0,
	overtypingCapturer: void 0
}, IP = class {
	static {
		PP = this;
	}
	static {
		this.ID = "snippetController2";
	}
	static get(e) {
		return e.getContribution(PP.ID);
	}
	static {
		this.InSnippetMode = new z("inSnippetMode", !1, B("inSnippetMode", "Whether the editor in current in snippet mode"));
	}
	static {
		this.HasNextTabstop = new z("hasNextTabstop", !1, B("hasNextTabstop", "Whether there is a next tab stop when in snippet mode"));
	}
	static {
		this.HasPrevTabstop = new z("hasPrevTabstop", !1, B("hasPrevTabstop", "Whether there is a previous tab stop when in snippet mode"));
	}
	constructor(e, t, n, r, i) {
		this._editor = e, this._logService = t, this._languageFeaturesService = n, this._languageConfigurationService = i, this._snippetListener = new g(), this._modelVersionId = -1, this._inSnippet = PP.InSnippetMode.bindTo(r), this._hasNextTabstop = PP.HasNextTabstop.bindTo(r), this._hasPrevTabstop = PP.HasPrevTabstop.bindTo(r);
	}
	dispose() {
		this._inSnippet.reset(), this._hasPrevTabstop.reset(), this._hasNextTabstop.reset(), this._session?.dispose(), this._snippetListener.dispose();
	}
	insert(e, t) {
		try {
			this._doInsert(e, t === void 0 ? FP : {
				...FP,
				...t
			});
		} catch (t) {
			this.cancel(), this._logService.error(t), this._logService.error("snippet_error"), this._logService.error("insert_template=", e), this._logService.error("existing_template=", this._session ? this._session._logInfo() : "<no_session>");
		}
	}
	_doInsert(e, t) {
		if (this._editor.hasModel()) {
			if (this._snippetListener.clear(), t.undoStopBefore && this._editor.getModel().pushStackElement(), this._session && typeof e != "string" && this.cancel(), this._session ? (y(typeof e == "string"), this._session.merge(e, t)) : (this._modelVersionId = this._editor.getModel().getAlternativeVersionId(), this._session = new jP(this._editor, e, t, this._languageConfigurationService), this._session.insert()), t.undoStopAfter && this._editor.getModel().pushStackElement(), this._session?.hasChoice) {
				let e = {
					_debugDisplayName: "snippetChoiceCompletions",
					provideCompletionItems: (e, t) => {
						if (!this._session || e !== this._editor.getModel() || !b.equals(this._editor.getPosition(), t)) return;
						let { activeChoice: n } = this._session;
						if (!n || n.choice.options.length === 0) return;
						let r = e.getValueInRange(n.range), i = !!n.choice.options.find((e) => e.value === r), a = [];
						for (let e = 0; e < n.choice.options.length; e++) {
							let t = n.choice.options[e];
							a.push({
								kind: 13,
								label: t.value,
								insertText: t.value,
								sortText: "a".repeat(e + 1),
								range: n.range,
								filterText: i ? `${r}_${t.value}` : void 0,
								command: {
									id: "jumpToNextSnippetPlaceholder",
									title: B("next", "Go to next placeholder...")
								}
							});
						}
						return { suggestions: a };
					}
				}, t = this._editor.getModel(), n, r = !1, i = () => {
					n?.dispose(), r = !1;
				}, a = () => {
					r ||= (n = this._languageFeaturesService.completionProvider.register({
						language: t.getLanguageId(),
						pattern: t.uri.fsPath,
						scheme: t.uri.scheme,
						exclusive: !0
					}, e), this._snippetListener.add(n), !0);
				};
				this._choiceCompletions = {
					provider: e,
					enable: a,
					disable: i
				};
			}
			this._updateState(), this._snippetListener.add(this._editor.onDidChangeModelContent((e) => e.isFlush && this.cancel())), this._snippetListener.add(this._editor.onDidChangeModel(() => this.cancel())), this._snippetListener.add(this._editor.onDidChangeCursorSelection(() => this._updateState()));
		}
	}
	_updateState() {
		if (this._session && this._editor.hasModel()) {
			if (this._modelVersionId === this._editor.getModel().getAlternativeVersionId() || !this._session.hasPlaceholder) return this.cancel();
			if (this._session.isAtLastPlaceholder || !this._session.isSelectionWithinPlaceholders()) return this._editor.getModel().pushStackElement(), this.cancel();
			this._inSnippet.set(!0), this._hasPrevTabstop.set(!this._session.isAtFirstPlaceholder), this._hasNextTabstop.set(!this._session.isAtLastPlaceholder), this._handleChoice();
		}
	}
	_handleChoice() {
		if (!this._session || !this._editor.hasModel()) {
			this._currentChoice = void 0;
			return;
		}
		let { activeChoice: e } = this._session;
		!e || !this._choiceCompletions ? (this._choiceCompletions?.disable(), this._currentChoice = void 0) : this._currentChoice !== e.choice && (this._currentChoice = e.choice, this._choiceCompletions.enable(), queueMicrotask(() => {
			pP(this._editor, this._choiceCompletions.provider);
		}));
	}
	finish() {
		for (; this._inSnippet.get();) this.next();
	}
	cancel(e = !1) {
		this._inSnippet.reset(), this._hasPrevTabstop.reset(), this._hasNextTabstop.reset(), this._snippetListener.clear(), this._currentChoice = void 0, this._session?.dispose(), this._session = void 0, this._modelVersionId = -1, e && this._editor.setSelections([this._editor.getSelection()]);
	}
	prev() {
		this._session?.prev(), this._updateState();
	}
	next() {
		this._session?.next(), this._updateState();
	}
	isInSnippet() {
		return !!this._inSnippet.get();
	}
};
IP = PP = MP([
	NP(1, ks),
	NP(2, M),
	NP(3, j),
	NP(4, Tn)
], IP), T(IP.ID, IP, 4);
var LP = qt.bindToContribution(IP.get);
A(new LP({
	id: "jumpToNextSnippetPlaceholder",
	precondition: N.and(IP.InSnippetMode, IP.HasNextTabstop),
	handler: (e) => e.next(),
	kbOpts: {
		weight: 130,
		kbExpr: I.textInputFocus,
		primary: 2
	}
})), A(new LP({
	id: "jumpToPrevSnippetPlaceholder",
	precondition: N.and(IP.InSnippetMode, IP.HasPrevTabstop),
	handler: (e) => e.prev(),
	kbOpts: {
		weight: 130,
		kbExpr: I.textInputFocus,
		primary: 1026
	}
})), A(new LP({
	id: "leaveSnippet",
	precondition: IP.InSnippetMode,
	handler: (e) => e.cancel(!0),
	kbOpts: {
		weight: 130,
		kbExpr: I.textInputFocus,
		primary: 9,
		secondary: [1033]
	}
})), A(new LP({
	id: "acceptSnippet",
	precondition: IP.InSnippetMode,
	handler: (e) => e.finish()
}));
// ../../../node_modules/.pnpm/monaco-editor@0.52.2/node_modules/monaco-editor/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionsModel.js
var RP = function(e, t, n, r) {
	var i = arguments.length, a = i < 3 ? t : r === null ? r = Object.getOwnPropertyDescriptor(t, n) : r, o;
	if (typeof Reflect == "object" && typeof Reflect.decorate == "function") a = Reflect.decorate(e, t, n, r);
	else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (i < 3 ? o(a) : i > 3 ? o(t, n, a) : o(t, n)) || a);
	return i > 3 && a && Object.defineProperty(t, n, a), a;
}, zP = function(e, t) {
	return function(n, r) {
		t(n, r, e);
	};
}, BP = class extends U {
	get isAcceptingPartially() {
		return this._isAcceptingPartially;
	}
	constructor(e, t, n, r, i, o, s, c, l, u, d, f) {
		super(), this.textModel = e, this.selectedSuggestItem = t, this._textModelVersionId = n, this._positions = r, this._debounceValue = i, this._suggestPreviewEnabled = o, this._suggestPreviewMode = s, this._inlineSuggestMode = c, this._enabled = l, this._instantiationService = u, this._commandService = d, this._languageConfigurationService = f, this._source = this._register(this._instantiationService.createInstance(XN, this.textModel, this._textModelVersionId, this._debounceValue)), this._isActive = qs(this, !1), this._forceUpdateExplicitlySignal = a(this), this._selectedInlineCompletionId = qs(this, void 0), this._primaryPosition = ia(this, (e) => this._positions.read(e)[0] ?? new b(1, 1)), this._isAcceptingPartially = !1, this._preserveCurrentCompletionReasons = /* @__PURE__ */ new Set([
			VP.Redo,
			VP.Undo,
			VP.AcceptWord
		]), this._fetchInlineCompletionsPromise = Cc({
			owner: this,
			createEmptyChangeSummary: () => ({
				preserveCurrentCompletion: !1,
				inlineCompletionTriggerKind: Ws.Automatic
			}),
			handleChange: (e, t) => (e.didChange(this._textModelVersionId) && this._preserveCurrentCompletionReasons.has(this._getReason(e.change)) ? t.preserveCurrentCompletion = !0 : e.didChange(this._forceUpdateExplicitlySignal) && (t.inlineCompletionTriggerKind = Ws.Explicit), !0)
		}, (e, t) => {
			if (this._forceUpdateExplicitlySignal.read(e), !(this._enabled.read(e) && this.selectedSuggestItem.read(e) || this._isActive.read(e))) {
				this._source.cancelUpdate();
				return;
			}
			this._textModelVersionId.read(e);
			let n = this._source.suggestWidgetInlineCompletions.get(), r = this.selectedSuggestItem.read(e);
			if (n && !r) {
				let e = this._source.inlineCompletions.get();
				xo((t) => {
					(!e || n.request.versionId > e.request.versionId) && this._source.inlineCompletions.set(n.clone(), t), this._source.clearSuggestWidgetInlineCompletions(t);
				});
			}
			let i = this._primaryPosition.read(e), a = {
				triggerKind: t.inlineCompletionTriggerKind,
				selectedSuggestionInfo: r?.toSelectedSuggestionInfo()
			}, o = this.selectedInlineCompletion.get(), s = t.preserveCurrentCompletion || o?.forwardStable ? o : void 0;
			return this._source.fetch(i, a, s);
		}), this._filteredInlineCompletionItems = wa({
			owner: this,
			equalsFn: Zc()
		}, (e) => {
			let t = this._source.inlineCompletions.read(e);
			if (!t) return [];
			let n = this._primaryPosition.read(e);
			return t.inlineCompletions.filter((t) => t.isVisible(this.textModel, n, e));
		}), this.selectedInlineCompletionIndex = ia(this, (e) => {
			let t = this._selectedInlineCompletionId.read(e), n = this._filteredInlineCompletionItems.read(e), r = this._selectedInlineCompletionId === void 0 ? -1 : n.findIndex((e) => e.semanticId === t);
			return r === -1 ? (this._selectedInlineCompletionId.set(void 0, void 0), 0) : r;
		}), this.selectedInlineCompletion = ia(this, (e) => this._filteredInlineCompletionItems.read(e)[this.selectedInlineCompletionIndex.read(e)]), this.activeCommands = wa({
			owner: this,
			equalsFn: Zc()
		}, (e) => this.selectedInlineCompletion.read(e)?.inlineCompletion.source.inlineCompletions.commands ?? []), this.lastTriggerKind = this._source.inlineCompletions.map(this, (e) => e?.request.context.triggerKind), this.inlineCompletionsCount = ia(this, (e) => {
			if (this.lastTriggerKind.read(e) === Ws.Explicit) return this._filteredInlineCompletionItems.read(e).length;
		}), this.state = wa({
			owner: this,
			equalsFn: (e, t) => !e || !t ? e === t : _N(e.ghostTexts, t.ghostTexts) && e.inlineCompletion === t.inlineCompletion && e.suggestItem === t.suggestItem
		}, (e) => {
			let t = this.textModel, n = this.selectedSuggestItem.read(e);
			if (n) {
				let r = BN(n.toSingleTextEdit(), t), i = this._computeAugmentation(r, e);
				if (!this._suggestPreviewEnabled.read(e) && !i) return;
				let a = i?.edit ?? r, o = i ? i.edit.text.length - r.text.length : 0, s = this._suggestPreviewMode.read(e), c = this._positions.read(e), l = [a, ...HP(this.textModel, c, a)], u = l.map((e, n) => HN(e, t, s, c[n], o)).filter(cl);
				return {
					edits: l,
					primaryGhostText: u[0] ?? new mN(a.range.endLineNumber, []),
					ghostTexts: u,
					inlineCompletion: i?.completion,
					suggestItem: n
				};
			}
			{
				if (!this._isActive.read(e)) return;
				let n = this.selectedInlineCompletion.read(e);
				if (!n) return;
				let r = n.toSingleTextEdit(e), i = this._inlineSuggestMode.read(e), a = this._positions.read(e), o = [r, ...HP(this.textModel, a, r)], s = o.map((e, n) => HN(e, t, i, a[n], 0)).filter(cl);
				return s[0] ? {
					edits: o,
					primaryGhostText: s[0],
					ghostTexts: s,
					inlineCompletion: n,
					suggestItem: void 0
				} : void 0;
			}
		}), this.ghostTexts = wa({
			owner: this,
			equalsFn: _N
		}, (e) => {
			let t = this.state.read(e);
			if (t) return t.ghostTexts;
		}), this.primaryGhostText = wa({
			owner: this,
			equalsFn: vN
		}, (e) => {
			let t = this.state.read(e);
			if (t) return t?.primaryGhostText;
		}), this._register(Nc(this._fetchInlineCompletionsPromise));
		let p;
		this._register(Os((e) => {
			let t = this.state.read(e)?.inlineCompletion;
			if (t?.semanticId !== p?.semanticId && (p = t, t)) {
				let e = t.inlineCompletion, n = e.source;
				n.provider.handleItemDidShow?.(n.inlineCompletions, e.sourceInlineCompletion, e.insertText);
			}
		}));
	}
	_getReason(e) {
		return e?.isUndoing ? VP.Undo : e?.isRedoing ? VP.Redo : this.isAcceptingPartially ? VP.AcceptWord : VP.Other;
	}
	async trigger(e) {
		this._isActive.set(!0, e), await this._fetchInlineCompletionsPromise.get();
	}
	async triggerExplicitly(e) {
		vs(e, (e) => {
			this._isActive.set(!0, e), this._forceUpdateExplicitlySignal.trigger(e);
		}), await this._fetchInlineCompletionsPromise.get();
	}
	stop(e) {
		vs(e, (e) => {
			this._isActive.set(!1, e), this._source.clear(e);
		});
	}
	_computeAugmentation(e, t) {
		let n = this.textModel, r = this._source.suggestWidgetInlineCompletions.read(t), i = r ? r.inlineCompletions : [this.selectedInlineCompletion.read(t)].filter(cl);
		return ma(i, (r) => {
			let i = r.toSingleTextEdit(t);
			return i = BN(i, n, E.fromPositions(i.range.getStartPosition(), e.range.getEndPosition())), VN(i, e) ? {
				completion: r,
				edit: i
			} : void 0;
		});
	}
	async _deltaSelectedInlineCompletionIndex(e) {
		await this.triggerExplicitly();
		let t = this._filteredInlineCompletionItems.get() || [];
		if (t.length > 0) {
			let n = (this.selectedInlineCompletionIndex.get() + e + t.length) % t.length;
			this._selectedInlineCompletionId.set(t[n].semanticId, void 0);
		} else this._selectedInlineCompletionId.set(void 0, void 0);
	}
	async next() {
		await this._deltaSelectedInlineCompletionIndex(1);
	}
	async previous() {
		await this._deltaSelectedInlineCompletionIndex(-1);
	}
	async accept(e) {
		if (e.getModel() !== this.textModel) throw new Ft();
		let t = this.state.get();
		if (!t || t.primaryGhostText.isEmpty() || !t.inlineCompletion) return;
		let n = t.inlineCompletion.toInlineCompletion(void 0);
		if (n.command && n.source.addRef(), e.pushUndoStop(), n.snippetInfo) e.executeEdits("inlineSuggestion.accept", [fr.replace(n.range, ""), ...n.additionalTextEdits]), e.setPosition(n.snippetInfo.range.getStartPosition(), "inlineCompletionAccept"), IP.get(e)?.insert(n.snippetInfo.snippet, { undoStopBefore: !1 });
		else {
			let r = t.edits, i = WP(r).map((e) => V.fromPositions(e));
			e.executeEdits("inlineSuggestion.accept", [...r.map((e) => fr.replace(e.range, e.text)), ...n.additionalTextEdits]), e.setSelections(i, "inlineCompletionAccept");
		}
		this.stop(), n.command && (await this._commandService.executeCommand(n.command.id, ...n.command.arguments || []).then(void 0, i), n.source.removeRef());
	}
	async acceptNextWord(e) {
		await this._acceptNext(e, (e, t) => {
			let n = this.textModel.getLanguageIdAtPosition(e.lineNumber, e.column), r = this._languageConfigurationService.getLanguageConfiguration(n), i = new RegExp(r.wordDefinition.source, r.wordDefinition.flags.replace("g", "")), a = t.match(i), o = 0;
			o = a && a.index !== void 0 ? a.index === 0 ? a[0].length : a.index : t.length;
			let s = /\s+/g.exec(t);
			return s && s.index !== void 0 && s.index + s[0].length < o && (o = s.index + s[0].length), o;
		}, 0);
	}
	async acceptNextLine(e) {
		await this._acceptNext(e, (e, t) => {
			let n = t.match(/\n/);
			return n && n.index !== void 0 ? n.index + 1 : t.length;
		}, 1);
	}
	async _acceptNext(e, t, n) {
		if (e.getModel() !== this.textModel) throw new Ft();
		let r = this.state.get();
		if (!r || r.primaryGhostText.isEmpty() || !r.inlineCompletion) return;
		let i = r.primaryGhostText, a = r.inlineCompletion.toInlineCompletion(void 0);
		if (a.snippetInfo || a.filterText !== a.insertText) {
			await this.accept(e);
			return;
		}
		let o = i.parts[0], s = new b(i.lineNumber, o.column), c = o.text, l = t(s, c);
		if (l === c.length && i.parts.length === 1) {
			this.accept(e);
			return;
		}
		let u = c.substring(0, l), d = this._positions.get(), f = d[0];
		a.source.addRef();
		try {
			this._isAcceptingPartially = !0;
			try {
				e.pushUndoStop();
				let t = E.fromPositions(f, s), n = e.getModel().getValueInRange(t) + u, r = new Ks(t, n), i = [r, ...HP(this.textModel, d, r)], a = WP(i).map((e) => V.fromPositions(e));
				e.executeEdits("inlineSuggestion.accept", i.map((e) => fr.replace(e.range, e.text))), e.setSelections(a, "inlineCompletionPartialAccept"), e.revealPositionInCenterIfOutsideViewport(e.getPosition(), 1);
			} finally {
				this._isAcceptingPartially = !1;
			}
			if (a.source.provider.handlePartialAccept) {
				let t = E.fromPositions(a.range.getStartPosition(), bo.ofText(u).addToPosition(s)), r = e.getModel().getValueInRange(t, 1);
				a.source.provider.handlePartialAccept(a.source.inlineCompletions, a.sourceInlineCompletion, r.length, { kind: n });
			}
		} finally {
			a.source.removeRef();
		}
	}
	handleSuggestAccepted(e) {
		let t = BN(e.toSingleTextEdit(), this.textModel), n = this._computeAugmentation(t, void 0);
		if (!n) return;
		let r = n.completion.inlineCompletion;
		r.source.provider.handlePartialAccept?.(r.source.inlineCompletions, r.sourceInlineCompletion, t.text.length, { kind: 2 });
	}
};
BP = RP([
	zP(9, P),
	zP(10, ga),
	zP(11, Tn)
], BP);
var VP;
(function(e) {
	e[e.Undo = 0] = "Undo", e[e.Redo = 1] = "Redo", e[e.AcceptWord = 2] = "AcceptWord", e[e.Other = 3] = "Other";
})(VP ||= {});
function HP(e, t, n) {
	if (t.length === 1) return [];
	let r = t[0], i = t.slice(1), a = n.range.getStartPosition(), o = n.range.getEndPosition(), s = e.getValueInRange(E.fromPositions(r, o)), c = wN(r, a);
	if (c.lineNumber < 1) return er(new Ft(`positionWithinTextEdit line number should be bigger than 0.
			Invalid subtraction between ${r.toString()} and ${a.toString()}`)), [];
	let l = UP(n.text, c);
	return i.map((t) => {
		let n = CN(wN(t, a), o), r = e.getValueInRange(E.fromPositions(t, n)), i = $t(s, r), c = E.fromPositions(t, t.delta(0, i));
		return new Ks(c, l);
	});
}
function UP(e, t) {
	let n = "", r = Ac(e);
	for (let e = t.lineNumber - 1; e < r.length; e++) n += r[e].substring(e === t.lineNumber - 1 ? t.column - 1 : 0);
	return n;
}
function WP(e) {
	let t = ie.createSortPermutation(e, Yn((e) => e.range, E.compareRangesUsingStarts)), n = new _s(t.apply(e)).getNewRanges();
	return t.inverse().apply(n).map((e) => e.getEndPosition());
}
// ../../../node_modules/.pnpm/monaco-editor@0.52.2/node_modules/monaco-editor/esm/vs/editor/contrib/suggest/browser/suggestMemory.js
var GP = function(e, t, n, r) {
	var i = arguments.length, a = i < 3 ? t : r === null ? r = Object.getOwnPropertyDescriptor(t, n) : r, o;
	if (typeof Reflect == "object" && typeof Reflect.decorate == "function") a = Reflect.decorate(e, t, n, r);
	else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (i < 3 ? o(a) : i > 3 ? o(t, n, a) : o(t, n)) || a);
	return i > 3 && a && Object.defineProperty(t, n, a), a;
}, KP = function(e, t) {
	return function(n, r) {
		t(n, r, e);
	};
}, qP, JP = class {
	constructor(e) {
		this.name = e;
	}
	select(e, t, n) {
		if (n.length === 0) return 0;
		let r = n[0].score[0];
		for (let e = 0; e < n.length; e++) {
			let { score: t, completion: i } = n[e];
			if (t[0] !== r) break;
			if (i.preselect) return e;
		}
		return 0;
	}
}, YP = class extends JP {
	constructor() {
		super("first");
	}
	memorize(e, t, n) {}
	toJSON() {}
	fromJSON() {}
}, XP = class extends JP {
	constructor() {
		super("recentlyUsed"), this._cache = new Fn(300, .66), this._seq = 0;
	}
	memorize(e, t, n) {
		let r = `${e.getLanguageId()}/${n.textLabel}`;
		this._cache.set(r, {
			touch: this._seq++,
			type: n.completion.kind,
			insertText: n.completion.insertText
		});
	}
	select(e, t, n) {
		if (n.length === 0) return 0;
		let r = e.getLineContent(t.lineNumber).substr(t.column - 10, t.column - 1);
		if (/\s$/.test(r)) return super.select(e, t, n);
		let i = n[0].score[0], a = -1, o = -1, s = -1;
		for (let t = 0; t < n.length && n[t].score[0] === i; t++) {
			let r = `${e.getLanguageId()}/${n[t].textLabel}`, i = this._cache.peek(r);
			if (i && i.touch > s && i.type === n[t].completion.kind && i.insertText === n[t].completion.insertText && (s = i.touch, o = t), n[t].completion.preselect && a === -1) return a = t;
		}
		return o === -1 ? a === -1 ? 0 : a : o;
	}
	toJSON() {
		return this._cache.toJSON();
	}
	fromJSON(e) {
		this._cache.clear();
		for (let [t, n] of e) n.touch = 0, n.type = typeof n.type == "number" ? n.type : bc.fromString(n.type), this._cache.set(t, n);
		this._seq = this._cache.size;
	}
}, ZP = class extends JP {
	constructor() {
		super("recentlyUsedByPrefix"), this._trie = En.forStrings(), this._seq = 0;
	}
	memorize(e, t, n) {
		let { word: r } = e.getWordUntilPosition(t), i = `${e.getLanguageId()}/${r}`;
		this._trie.set(i, {
			type: n.completion.kind,
			insertText: n.completion.insertText,
			touch: this._seq++
		});
	}
	select(e, t, n) {
		let { word: r } = e.getWordUntilPosition(t);
		if (!r) return super.select(e, t, n);
		let i = `${e.getLanguageId()}/${r}`, a = this._trie.get(i);
		if (a ||= this._trie.findSubstr(i), a) for (let e = 0; e < n.length; e++) {
			let { kind: t, insertText: r } = n[e].completion;
			if (t === a.type && r === a.insertText) return e;
		}
		return super.select(e, t, n);
	}
	toJSON() {
		let e = [];
		return this._trie.forEach((t, n) => e.push([n, t])), e.sort((e, t) => -(e[1].touch - t[1].touch)).forEach((e, t) => e[1].touch = t), e.slice(0, 200);
	}
	fromJSON(e) {
		if (this._trie.clear(), e.length > 0) {
			this._seq = e[0][1].touch + 1;
			for (let [t, n] of e) n.type = typeof n.type == "number" ? n.type : bc.fromString(n.type), this._trie.set(t, n);
		}
	}
}, QP = class {
	static {
		qP = this;
	}
	static {
		this._strategyCtors = /* @__PURE__ */ new Map([
			["recentlyUsedByPrefix", ZP],
			["recentlyUsed", XP],
			["first", YP]
		]);
	}
	static {
		this._storagePrefix = "suggest/memories";
	}
	constructor(e, t) {
		this._storageService = e, this._configService = t, this._disposables = new g(), this._persistSoon = new tl(() => this._saveState(), 500), this._disposables.add(e.onWillSaveState((e) => {
			e.reason === Pl.SHUTDOWN && this._saveState();
		}));
	}
	dispose() {
		this._disposables.dispose(), this._persistSoon.dispose();
	}
	memorize(e, t, n) {
		this._withStrategy(e, t).memorize(e, t, n), this._persistSoon.schedule();
	}
	select(e, t, n) {
		return this._withStrategy(e, t).select(e, t, n);
	}
	_withStrategy(e, t) {
		let n = this._configService.getValue("editor.suggestSelection", {
			overrideIdentifier: e.getLanguageIdAtPosition(t.lineNumber, t.column),
			resource: e.uri
		});
		if (this._strategy?.name !== n) {
			this._saveState();
			let e = qP._strategyCtors.get(n) || YP;
			this._strategy = new e();
			try {
				let e = +!this._configService.getValue("editor.suggest.shareSuggestSelections"), t = this._storageService.get(`${qP._storagePrefix}/${n}`, e);
				t && this._strategy.fromJSON(JSON.parse(t));
			} catch {}
		}
		return this._strategy;
	}
	_saveState() {
		if (this._strategy) {
			let e = +!this._configService.getValue("editor.suggest.shareSuggestSelections"), t = JSON.stringify(this._strategy);
			this._storageService.store(`${qP._storagePrefix}/${this._strategy.name}`, t, e, 1);
		}
	}
};
QP = qP = GP([KP(0, ur), KP(1, Fl)], QP);
var $P = ne("ISuggestMemories");
rn($P, QP, 1);
// ../../../node_modules/.pnpm/monaco-editor@0.52.2/node_modules/monaco-editor/esm/vs/editor/contrib/suggest/browser/wordContextKey.js
var eF = function(e, t, n, r) {
	var i = arguments.length, a = i < 3 ? t : r === null ? r = Object.getOwnPropertyDescriptor(t, n) : r, o;
	if (typeof Reflect == "object" && typeof Reflect.decorate == "function") a = Reflect.decorate(e, t, n, r);
	else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (i < 3 ? o(a) : i > 3 ? o(t, n, a) : o(t, n)) || a);
	return i > 3 && a && Object.defineProperty(t, n, a), a;
}, tF = function(e, t) {
	return function(n, r) {
		t(n, r, e);
	};
}, nF, rF = class {
	static {
		nF = this;
	}
	static {
		this.AtEnd = new z("atEndOfWord", !1);
	}
	constructor(e, t) {
		this._editor = e, this._enabled = !1, this._ckAtEnd = nF.AtEnd.bindTo(t), this._configListener = this._editor.onDidChangeConfiguration((e) => e.hasChanged(124) && this._update()), this._update();
	}
	dispose() {
		this._configListener.dispose(), this._selectionListener?.dispose(), this._ckAtEnd.reset();
	}
	_update() {
		let e = this._editor.getOption(124) === "on";
		if (this._enabled !== e) {
			if (this._enabled = e, this._enabled) {
				let e = () => {
					if (!this._editor.hasModel()) {
						this._ckAtEnd.set(!1);
						return;
					}
					let e = this._editor.getModel(), t = this._editor.getSelection(), n = e.getWordAtPosition(t.getStartPosition());
					n ? this._ckAtEnd.set(n.endColumn === t.getStartPosition().column) : this._ckAtEnd.set(!1);
				};
				this._selectionListener = this._editor.onDidChangeCursorSelection(e), e();
			} else this._selectionListener &&= (this._ckAtEnd.reset(), this._selectionListener.dispose(), void 0);
		}
	}
};
rF = nF = eF([tF(1, j)], rF);
// ../../../node_modules/.pnpm/monaco-editor@0.52.2/node_modules/monaco-editor/esm/vs/editor/contrib/suggest/browser/suggestAlternatives.js
var iF = function(e, t, n, r) {
	var i = arguments.length, a = i < 3 ? t : r === null ? r = Object.getOwnPropertyDescriptor(t, n) : r, o;
	if (typeof Reflect == "object" && typeof Reflect.decorate == "function") a = Reflect.decorate(e, t, n, r);
	else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (i < 3 ? o(a) : i > 3 ? o(t, n, a) : o(t, n)) || a);
	return i > 3 && a && Object.defineProperty(t, n, a), a;
}, aF = function(e, t) {
	return function(n, r) {
		t(n, r, e);
	};
}, oF, sF = class {
	static {
		oF = this;
	}
	static {
		this.OtherSuggestions = new z("hasOtherSuggestions", !1);
	}
	constructor(e, t) {
		this._editor = e, this._index = 0, this._ckOtherSuggestions = oF.OtherSuggestions.bindTo(t);
	}
	dispose() {
		this.reset();
	}
	reset() {
		this._ckOtherSuggestions.reset(), this._listener?.dispose(), this._model = void 0, this._acceptNext = void 0, this._ignore = !1;
	}
	set({ model: e, index: t }, n) {
		e.items.length === 0 || oF._moveIndex(!0, e, t) === t ? this.reset() : (this._acceptNext = n, this._model = e, this._index = t, this._listener = this._editor.onDidChangeCursorPosition(() => {
			this._ignore || this.reset();
		}), this._ckOtherSuggestions.set(!0));
	}
	static _moveIndex(e, t, n) {
		let r = n;
		for (let i = t.items.length; i > 0 && (r = (r + t.items.length + (e ? 1 : -1)) % t.items.length, r !== n && t.items[r].completion.additionalTextEdits); i--);
		return r;
	}
	next() {
		this._move(!0);
	}
	prev() {
		this._move(!1);
	}
	_move(e) {
		if (this._model) try {
			this._ignore = !0, this._index = oF._moveIndex(e, this._model, this._index), this._acceptNext({
				index: this._index,
				item: this._model.items[this._index],
				model: this._model
			});
		} finally {
			this._ignore = !1;
		}
	}
};
sF = oF = iF([aF(1, j)], sF);
// ../../../node_modules/.pnpm/monaco-editor@0.52.2/node_modules/monaco-editor/esm/vs/editor/contrib/suggest/browser/suggestCommitCharacters.js
var cF = class {
	constructor(e, t, n, r) {
		this._disposables = new g(), this._disposables.add(n.onDidSuggest((e) => {
			e.completionModel.items.length === 0 && this.reset();
		})), this._disposables.add(n.onDidCancel((e) => {
			this.reset();
		})), this._disposables.add(t.onDidShow(() => this._onItem(t.getFocusedItem()))), this._disposables.add(t.onDidFocus(this._onItem, this)), this._disposables.add(t.onDidHide(this.reset, this)), this._disposables.add(e.onWillType((i) => {
			if (this._active && !t.isFrozen() && n.state !== 0) {
				let t = i.charCodeAt(i.length - 1);
				this._active.acceptCharacters.has(t) && e.getOption(0) && r(this._active.item);
			}
		}));
	}
	_onItem(e) {
		if (!e || !zl(e.item.completion.commitCharacters)) {
			this.reset();
			return;
		}
		if (this._active && this._active.item.item === e.item) return;
		let t = new Bo();
		for (let n of e.item.completion.commitCharacters) n.length > 0 && t.add(n.charCodeAt(0));
		this._active = {
			acceptCharacters: t,
			item: e
		};
	}
	reset() {
		this._active = void 0;
	}
	dispose() {
		this._disposables.dispose();
	}
}, lF = class e {
	async provideSelectionRanges(t, n) {
		let r = [];
		for (let i of n) {
			let n = [];
			r.push(n);
			let a = /* @__PURE__ */ new Map();
			await new Promise((n) => e._bracketsRightYield(n, 0, t, i, a)), await new Promise((r) => e._bracketsLeftYield(r, 0, t, i, a, n));
		}
		return r;
	}
	static {
		this._maxDuration = 30;
	}
	static {
		this._maxRounds = 2;
	}
	static _bracketsRightYield(t, n, r, i, a) {
		let o = /* @__PURE__ */ new Map(), s = Date.now();
		for (;;) {
			if (n >= e._maxRounds || !i) {
				t();
				break;
			}
			let c = r.bracketPairs.findNextBracket(i);
			if (!c) {
				t();
				break;
			}
			if (Date.now() - s > e._maxDuration) {
				setTimeout(() => e._bracketsRightYield(t, n + 1, r, i, a));
				break;
			}
			if (c.bracketInfo.isOpeningBracket) {
				let e = c.bracketInfo.bracketText, t = o.has(e) ? o.get(e) : 0;
				o.set(e, t + 1);
			} else {
				let e = c.bracketInfo.getOpeningBrackets()[0].bracketText, t = o.has(e) ? o.get(e) : 0;
				if (--t, o.set(e, Math.max(0, t)), t < 0) {
					let t = a.get(e);
					t || (t = new Ec(), a.set(e, t)), t.push(c.range);
				}
			}
			i = c.range.getEndPosition();
		}
	}
	static _bracketsLeftYield(t, n, r, i, a, o) {
		let s = /* @__PURE__ */ new Map(), c = Date.now();
		for (;;) {
			if (n >= e._maxRounds && a.size === 0 || !i) {
				t();
				break;
			}
			let l = r.bracketPairs.findPrevBracket(i);
			if (!l) {
				t();
				break;
			}
			if (Date.now() - c > e._maxDuration) {
				setTimeout(() => e._bracketsLeftYield(t, n + 1, r, i, a, o));
				break;
			}
			if (l.bracketInfo.isOpeningBracket) {
				let t = l.bracketInfo.bracketText, n = s.has(t) ? s.get(t) : 0;
				if (--n, s.set(t, Math.max(0, n)), n < 0) {
					let n = a.get(t);
					if (n) {
						let i = n.shift();
						n.size === 0 && a.delete(t);
						let s = E.fromPositions(l.range.getEndPosition(), i.getStartPosition()), c = E.fromPositions(l.range.getStartPosition(), i.getEndPosition());
						o.push({ range: s }), o.push({ range: c }), e._addBracketLeading(r, c, o);
					}
				}
			} else {
				let e = l.bracketInfo.getOpeningBrackets()[0].bracketText, t = s.has(e) ? s.get(e) : 0;
				s.set(e, t + 1);
			}
			i = l.range.getStartPosition();
		}
	}
	static _addBracketLeading(e, t, n) {
		if (t.startLineNumber === t.endLineNumber) return;
		let r = t.startLineNumber, i = e.getLineFirstNonWhitespaceColumn(r);
		i !== 0 && i !== t.startColumn && (n.push({ range: E.fromPositions(new b(r, i), t.getEndPosition()) }), n.push({ range: E.fromPositions(new b(r, 1), t.getEndPosition()) }));
		let a = r - 1;
		if (a > 0) {
			let r = e.getLineFirstNonWhitespaceColumn(a);
			r === t.startColumn && r !== e.getLineLastNonWhitespaceColumn(a) && (n.push({ range: E.fromPositions(new b(a, r), t.getEndPosition()) }), n.push({ range: E.fromPositions(new b(a, 1), t.getEndPosition()) }));
		}
	}
}, uF = class e {
	static {
		this.None = new class extends e {
			distance() {
				return 0;
			}
		}();
	}
	static async create(t, n) {
		if (!n.getOption(119).localityBonus || !n.hasModel()) return e.None;
		let r = n.getModel(), i = n.getPosition();
		if (!t.canComputeWordRanges(r.uri)) return e.None;
		let [a] = await new lF().provideSelectionRanges(r, [i]);
		if (a.length === 0) return e.None;
		let o = await t.computeWordRanges(r.uri, a[0].range);
		if (!o) return e.None;
		let s = r.getWordUntilPosition(i);
		return delete o[s.word], new class extends e {
			distance(e, t) {
				if (!i.equals(n.getPosition())) return 0;
				if (t.kind === 17) return 2 << 20;
				let r = typeof t.label == "string" ? t.label : t.label.label, s = o[r];
				if (hr(s)) return 2 << 20;
				let c = vn(s, E.fromPositions(e), E.compareRangesUsingStarts), l = c >= 0 ? s[c] : s[Math.max(0, ~c - 1)], u = a.length;
				for (let e of a) {
					if (!E.containsRange(e.range, l)) break;
					--u;
				}
				return u;
			}
		}();
	}
}, dF = class {
	constructor(e, t) {
		this.leadingLineContent = e, this.characterCountDelta = t;
	}
}, fF = class e {
	constructor(t, n, r, i, a, o, s = Gi.default, c = void 0) {
		this.clipboardText = c, this._snippetCompareFn = e._compareCompletionItems, this._items = t, this._column = n, this._wordDistance = i, this._options = a, this._refilterKind = 1, this._lineContext = r, this._fuzzyScoreOptions = s, o === "top" ? this._snippetCompareFn = e._compareCompletionItemsSnippetsUp : o === "bottom" && (this._snippetCompareFn = e._compareCompletionItemsSnippetsDown);
	}
	get lineContext() {
		return this._lineContext;
	}
	set lineContext(e) {
		(this._lineContext.leadingLineContent !== e.leadingLineContent || this._lineContext.characterCountDelta !== e.characterCountDelta) && (this._refilterKind = this._lineContext.characterCountDelta < e.characterCountDelta && this._filteredItems ? 2 : 1, this._lineContext = e);
	}
	get items() {
		return this._ensureCachedState(), this._filteredItems;
	}
	getItemsByProvider() {
		return this._ensureCachedState(), this._itemsByProvider;
	}
	getIncompleteProvider() {
		this._ensureCachedState();
		let e = /* @__PURE__ */ new Set();
		for (let [t, n] of this.getItemsByProvider()) n.length > 0 && n[0].container.incomplete && e.add(t);
		return e;
	}
	get stats() {
		return this._ensureCachedState(), this._stats;
	}
	_ensureCachedState() {
		this._refilterKind !== 0 && this._createCachedState();
	}
	_createCachedState() {
		this._itemsByProvider = /* @__PURE__ */ new Map();
		let e = [], { leadingLineContent: t, characterCountDelta: n } = this._lineContext, r = "", i = "", a = this._refilterKind === 1 ? this._items : this._filteredItems, o = [], s = !this._options.filterGraceful || a.length > 2e3 ? da : fl;
		for (let c = 0; c < a.length; c++) {
			let l = a[c];
			if (l.isInvalid) continue;
			let u = this._itemsByProvider.get(l.provider);
			u ? u.push(l) : this._itemsByProvider.set(l.provider, [l]);
			let d = l.position.column - l.editStart.column, f = d + n - (l.position.column - this._column);
			if (r.length !== f && (r = f === 0 ? "" : t.slice(-f), i = r.toLowerCase()), l.word = r, f === 0) l.score = so.Default;
			else {
				let e = 0;
				for (; e < d;) {
					let t = r.charCodeAt(e);
					if (t === 32 || t === 9) e += 1;
					else break;
				}
				if (e >= f) l.score = so.Default;
				else if (typeof l.completion.filterText == "string") {
					let t = s(r, i, e, l.completion.filterText, l.filterTextLow, 0, this._fuzzyScoreOptions);
					if (!t) continue;
					se(l.completion.filterText, l.textLabel) === 0 ? l.score = t : (l.score = qc(r, i, e, l.textLabel, l.labelLow, 0), l.score[0] = t[0]);
				} else {
					let t = s(r, i, e, l.textLabel, l.labelLow, 0, this._fuzzyScoreOptions);
					if (!t) continue;
					l.score = t;
				}
			}
			l.idx = c, l.distance = this._wordDistance.distance(l.position, l.completion), o.push(l), e.push(l.textLabel.length);
		}
		this._filteredItems = o.sort(this._snippetCompareFn), this._refilterKind = 0, this._stats = { pLabelLen: e.length ? ri(e.length - .85, e, (e, t) => e - t) : 0 };
	}
	static _compareCompletionItems(e, t) {
		return e.score[0] > t.score[0] ? -1 : e.score[0] < t.score[0] ? 1 : e.distance < t.distance ? -1 : e.distance > t.distance ? 1 : e.idx < t.idx ? -1 : +(e.idx > t.idx);
	}
	static _compareCompletionItemsSnippetsDown(t, n) {
		if (t.completion.kind !== n.completion.kind) {
			if (t.completion.kind === 27) return 1;
			if (n.completion.kind === 27) return -1;
		}
		return e._compareCompletionItems(t, n);
	}
	static _compareCompletionItemsSnippetsUp(t, n) {
		if (t.completion.kind !== n.completion.kind) {
			if (t.completion.kind === 27) return -1;
			if (n.completion.kind === 27) return 1;
		}
		return e._compareCompletionItems(t, n);
	}
}, pF = function(e, t, n, r) {
	var i = arguments.length, a = i < 3 ? t : r === null ? r = Object.getOwnPropertyDescriptor(t, n) : r, o;
	if (typeof Reflect == "object" && typeof Reflect.decorate == "function") a = Reflect.decorate(e, t, n, r);
	else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (i < 3 ? o(a) : i > 3 ? o(t, n, a) : o(t, n)) || a);
	return i > 3 && a && Object.defineProperty(t, n, a), a;
}, mF = function(e, t) {
	return function(n, r) {
		t(n, r, e);
	};
}, hF, gF = class {
	static shouldAutoTrigger(e) {
		if (!e.hasModel()) return !1;
		let t = e.getModel(), n = e.getPosition();
		t.tokenization.tokenizeIfCheap(n.lineNumber);
		let r = t.getWordAtPosition(n);
		return !(!r || r.endColumn !== n.column && r.startColumn + 1 !== n.column || !isNaN(Number(r.word)));
	}
	constructor(e, t, n) {
		this.leadingLineContent = e.getLineContent(t.lineNumber).substr(0, t.column - 1), this.leadingWord = e.getWordUntilPosition(t), this.lineNumber = t.lineNumber, this.column = t.column, this.triggerOptions = n;
	}
};
function _F(e, t, n) {
	if (!t.getContextKeyValue(fN.inlineSuggestionVisible.key)) return !0;
	let r = t.getContextKeyValue(fN.suppressSuggestions.key);
	return r === void 0 ? !e.getOption(62).suppressSuggestions : !r;
}
function vF(e, t, n) {
	if (!t.getContextKeyValue("inlineSuggestionVisible")) return !0;
	let r = t.getContextKeyValue(fN.suppressSuggestions.key);
	return r === void 0 ? !e.getOption(62).suppressSuggestions : !r;
}
var yF = hF = class {
	constructor(e, t, n, r, i, a, o, s, c) {
		this._editor = e, this._editorWorkerService = t, this._clipboardService = n, this._telemetryService = r, this._logService = i, this._contextKeyService = a, this._configurationService = o, this._languageFeaturesService = s, this._envService = c, this._toDispose = new g(), this._triggerCharacterListener = new g(), this._triggerQuickSuggest = new kr(), this._triggerState = void 0, this._completionDisposables = new g(), this._onDidCancel = new x(), this._onDidTrigger = new x(), this._onDidSuggest = new x(), this.onDidCancel = this._onDidCancel.event, this.onDidTrigger = this._onDidTrigger.event, this.onDidSuggest = this._onDidSuggest.event, this._telemetryGate = 0, this._currentSelection = this._editor.getSelection() || new V(1, 1, 1, 1), this._toDispose.add(this._editor.onDidChangeModel(() => {
			this._updateTriggerCharacters(), this.cancel();
		})), this._toDispose.add(this._editor.onDidChangeModelLanguage(() => {
			this._updateTriggerCharacters(), this.cancel();
		})), this._toDispose.add(this._editor.onDidChangeConfiguration(() => {
			this._updateTriggerCharacters();
		})), this._toDispose.add(this._languageFeaturesService.completionProvider.onDidChange(() => {
			this._updateTriggerCharacters(), this._updateActiveSuggestSession();
		}));
		let l = !1;
		this._toDispose.add(this._editor.onDidCompositionStart(() => {
			l = !0;
		})), this._toDispose.add(this._editor.onDidCompositionEnd(() => {
			l = !1, this._onCompositionEnd();
		})), this._toDispose.add(this._editor.onDidChangeCursorSelection((e) => {
			l || this._onCursorChange(e);
		})), this._toDispose.add(this._editor.onDidChangeModelContent(() => {
			!l && this._triggerState !== void 0 && this._refilterCompletionItems();
		})), this._updateTriggerCharacters();
	}
	dispose() {
		ci(this._triggerCharacterListener), ci([
			this._onDidCancel,
			this._onDidSuggest,
			this._onDidTrigger,
			this._triggerQuickSuggest
		]), this._toDispose.dispose(), this._completionDisposables.dispose(), this.cancel();
	}
	_updateTriggerCharacters() {
		if (this._triggerCharacterListener.clear(), this._editor.getOption(92) || !this._editor.hasModel() || !this._editor.getOption(122)) return;
		let e = /* @__PURE__ */ new Map();
		for (let t of this._languageFeaturesService.completionProvider.all(this._editor.getModel())) for (let n of t.triggerCharacters || []) {
			let r = e.get(n);
			r || (r = /* @__PURE__ */ new Set(), e.set(n, r)), r.add(t);
		}
		let t = (t) => {
			if (!vF(this._editor, this._contextKeyService, this._configurationService) || gF.shouldAutoTrigger(this._editor)) return;
			if (!t) {
				let e = this._editor.getPosition();
				t = this._editor.getModel().getLineContent(e.lineNumber).substr(0, e.column - 1);
			}
			let n = "";
			gi(t.charCodeAt(t.length - 1)) ? Ti(t.charCodeAt(t.length - 2)) && (n = t.substr(t.length - 2)) : n = t.charAt(t.length - 1);
			let r = e.get(n);
			if (r) {
				let e = /* @__PURE__ */ new Map();
				if (this._completionModel) for (let [t, n] of this._completionModel.getItemsByProvider()) r.has(t) || e.set(t, n);
				this.trigger({
					auto: !0,
					triggerKind: 1,
					triggerCharacter: n,
					retrigger: !!this._completionModel,
					clipboardText: this._completionModel?.clipboardText,
					completionOptions: {
						providerFilter: r,
						providerItemsToReuse: e
					}
				});
			}
		};
		this._triggerCharacterListener.add(this._editor.onDidType(t)), this._triggerCharacterListener.add(this._editor.onDidCompositionEnd(() => t()));
	}
	get state() {
		return this._triggerState ? this._triggerState.auto ? 2 : 1 : 0;
	}
	cancel(e = !1) {
		this._triggerState !== void 0 && (this._triggerQuickSuggest.cancel(), this._requestToken?.cancel(), this._requestToken = void 0, this._triggerState = void 0, this._completionModel = void 0, this._context = void 0, this._onDidCancel.fire({ retrigger: e }));
	}
	clear() {
		this._completionDisposables.clear();
	}
	_updateActiveSuggestSession() {
		this._triggerState !== void 0 && (!this._editor.hasModel() || !this._languageFeaturesService.completionProvider.has(this._editor.getModel()) ? this.cancel() : this.trigger({
			auto: this._triggerState.auto,
			retrigger: !0
		}));
	}
	_onCursorChange(e) {
		if (!this._editor.hasModel()) return;
		let t = this._currentSelection;
		this._currentSelection = this._editor.getSelection(), !e.selection.isEmpty() || e.reason !== 0 && e.reason !== 3 || e.source !== "keyboard" && e.source !== "deleteLeft" ? this.cancel() : this._triggerState === void 0 && e.reason === 0 ? (t.containsRange(this._currentSelection) || t.getEndPosition().isBeforeOrEqual(this._currentSelection.getPosition())) && this._doTriggerQuickSuggest() : this._triggerState !== void 0 && e.reason === 3 && this._refilterCompletionItems();
	}
	_onCompositionEnd() {
		this._triggerState === void 0 ? this._doTriggerQuickSuggest() : this._refilterCompletionItems();
	}
	_doTriggerQuickSuggest() {
		mP.isAllOff(this._editor.getOption(90)) || this._editor.getOption(119).snippetsPreventQuickSuggestions && IP.get(this._editor)?.isInSnippet() || (this.cancel(), this._triggerQuickSuggest.cancelAndSet(() => {
			if (this._triggerState !== void 0 || !gF.shouldAutoTrigger(this._editor) || !this._editor.hasModel() || !this._editor.hasWidgetFocus()) return;
			let e = this._editor.getModel(), t = this._editor.getPosition(), n = this._editor.getOption(90);
			if (!mP.isAllOff(n)) {
				if (!mP.isAllOn(n)) {
					e.tokenization.tokenizeIfCheap(t.lineNumber);
					let r = e.tokenization.getLineTokens(t.lineNumber), i = r.getStandardTokenType(r.findTokenIndexAtOffset(Math.max(t.column - 1 - 1, 0)));
					if (mP.valueFor(n, i) !== "on") return;
				}
				_F(this._editor, this._contextKeyService, this._configurationService) && this._languageFeaturesService.completionProvider.has(e) && this.trigger({ auto: !0 });
			}
		}, this._editor.getOption(91)));
	}
	_refilterCompletionItems() {
		y(this._editor.hasModel()), y(this._triggerState !== void 0);
		let e = new gF(this._editor.getModel(), this._editor.getPosition(), {
			...this._triggerState,
			refilter: !0
		});
		this._onNewContext(e);
	}
	trigger(e) {
		if (!this._editor.hasModel()) return;
		let t = this._editor.getModel(), n = new gF(t, this._editor.getPosition(), e);
		this.cancel(e.retrigger), this._triggerState = e, this._onDidTrigger.fire({
			auto: e.auto,
			shy: e.shy ?? !1,
			position: this._editor.getPosition()
		}), this._context = n;
		let r = { triggerKind: e.triggerKind ?? 0 };
		e.triggerCharacter && (r = {
			triggerKind: 1,
			triggerCharacter: e.triggerCharacter
		}), this._requestToken = new Cn();
		let i = this._editor.getOption(113), a = 1;
		switch (i) {
			case "top":
				a = 0;
				break;
			case "bottom": a = 2;
		}
		let { itemKind: o, showDeprecated: s } = hF.createSuggestFilter(this._editor), c = new aP(a, e.completionOptions?.kindFilter ?? o, e.completionOptions?.providerFilter, e.completionOptions?.providerItemsToReuse, s), l = uF.create(this._editorWorkerService, this._editor), u = sP(this._languageFeaturesService.completionProvider, t, this._editor.getPosition(), c, r, this._requestToken.token);
		Promise.all([u, l]).then(async ([t, n]) => {
			if (this._requestToken?.dispose(), !this._editor.hasModel()) return;
			let r = e?.clipboardText;
			if (!r && t.needsClipboard && (r = await this._clipboardService.readText()), this._triggerState === void 0) return;
			let i = new gF(this._editor.getModel(), this._editor.getPosition(), e), a = {
				...Gi.default,
				firstMatchCanBeWeak: !this._editor.getOption(119).matchOnWordStartOnly
			};
			if (this._completionModel = new fF(t.items, this._context.column, {
				leadingLineContent: i.leadingLineContent,
				characterCountDelta: i.column - this._context.column
			}, n, this._editor.getOption(119), this._editor.getOption(113), a, r), this._completionDisposables.add(t.disposable), this._onNewContext(i), this._reportDurationsTelemetry(t.durations), !this._envService.isBuilt || this._envService.isExtensionDevelopment) for (let e of t.items) e.isInvalid && this._logService.warn(`[suggest] did IGNORE invalid completion item from ${e.provider._debugDisplayName}`, e.completion);
		}).catch(er);
	}
	_reportDurationsTelemetry(e) {
		this._telemetryGate++ % 230 == 0 && setTimeout(() => {
			this._telemetryService.publicLog2("suggest.durations.json", { data: JSON.stringify(e) }), this._logService.debug("suggest.durations.json", e);
		});
	}
	static createSuggestFilter(e) {
		let t = /* @__PURE__ */ new Set();
		e.getOption(113) === "none" && t.add(27);
		let n = e.getOption(119);
		return n.showMethods || t.add(0), n.showFunctions || t.add(1), n.showConstructors || t.add(2), n.showFields || t.add(3), n.showVariables || t.add(4), n.showClasses || t.add(5), n.showStructs || t.add(6), n.showInterfaces || t.add(7), n.showModules || t.add(8), n.showProperties || t.add(9), n.showEvents || t.add(10), n.showOperators || t.add(11), n.showUnits || t.add(12), n.showValues || t.add(13), n.showConstants || t.add(14), n.showEnums || t.add(15), n.showEnumMembers || t.add(16), n.showKeywords || t.add(17), n.showWords || t.add(18), n.showColors || t.add(19), n.showFiles || t.add(20), n.showReferences || t.add(21), n.showColors || t.add(22), n.showFolders || t.add(23), n.showTypeParameters || t.add(24), n.showSnippets || t.add(27), n.showUsers || t.add(25), n.showIssues || t.add(26), {
			itemKind: t,
			showDeprecated: n.showDeprecated
		};
	}
	_onNewContext(e) {
		if (this._context) {
			if (e.lineNumber !== this._context.lineNumber) this.cancel();
			else if (Ut(e.leadingLineContent) !== Ut(this._context.leadingLineContent)) this.cancel();
			else if (e.column < this._context.column) e.leadingWord.word ? this.trigger({
				auto: this._context.triggerOptions.auto,
				retrigger: !0
			}) : this.cancel();
			else if (this._completionModel) {
				if (e.leadingWord.word.length !== 0 && e.leadingWord.startColumn > this._context.leadingWord.startColumn) {
					if (gF.shouldAutoTrigger(this._editor) && this._context) {
						let e = this._completionModel.getItemsByProvider();
						this.trigger({
							auto: this._context.triggerOptions.auto,
							retrigger: !0,
							clipboardText: this._completionModel.clipboardText,
							completionOptions: { providerItemsToReuse: e }
						});
					}
				} else if (e.column > this._context.column && this._completionModel.getIncompleteProvider().size > 0 && e.leadingWord.word.length !== 0) {
					let e = /* @__PURE__ */ new Map(), t = /* @__PURE__ */ new Set();
					for (let [n, r] of this._completionModel.getItemsByProvider()) r.length > 0 && r[0].container.incomplete ? t.add(n) : e.set(n, r);
					this.trigger({
						auto: this._context.triggerOptions.auto,
						triggerKind: 2,
						retrigger: !0,
						clipboardText: this._completionModel.clipboardText,
						completionOptions: {
							providerFilter: t,
							providerItemsToReuse: e
						}
					});
				} else {
					let t = this._completionModel.lineContext, n = !1;
					if (this._completionModel.lineContext = {
						leadingLineContent: e.leadingLineContent,
						characterCountDelta: e.column - this._context.column
					}, this._completionModel.items.length === 0) {
						let r = gF.shouldAutoTrigger(this._editor);
						if (!this._context) {
							this.cancel();
							return;
						}
						if (r && this._context.leadingWord.endColumn < e.leadingWord.startColumn) {
							this.trigger({
								auto: this._context.triggerOptions.auto,
								retrigger: !0
							});
							return;
						}
						if (this._context.triggerOptions.auto || (this._completionModel.lineContext = t, n = this._completionModel.items.length > 0, n && e.leadingWord.word.length === 0)) {
							this.cancel();
							return;
						}
					}
					this._onDidSuggest.fire({
						completionModel: this._completionModel,
						triggerOptions: e.triggerOptions,
						isFrozen: n
					});
				}
			}
		}
	}
};
yF = hF = pF([
	mF(1, Oe),
	mF(2, $o),
	mF(3, mc),
	mF(4, ks),
	mF(5, j),
	mF(6, Fl),
	mF(7, M),
	mF(8, Pi)
], yF);
// ../../../node_modules/.pnpm/monaco-editor@0.52.2/node_modules/monaco-editor/esm/vs/editor/contrib/suggest/browser/suggestOvertypingCapturer.js
var bF = class e {
	static {
		this._maxSelectionLength = 51200;
	}
	constructor(t, n) {
		this._disposables = new g(), this._lastOvertyped = [], this._locked = !1, this._disposables.add(t.onWillType(() => {
			if (this._locked || !t.hasModel()) return;
			let n = t.getSelections(), r = n.length, i = !1;
			for (let e = 0; e < r; e++) if (!n[e].isEmpty()) {
				i = !0;
				break;
			}
			if (!i) {
				this._lastOvertyped.length !== 0 && (this._lastOvertyped.length = 0);
				return;
			}
			this._lastOvertyped = [];
			let a = t.getModel();
			for (let t = 0; t < r; t++) {
				let r = n[t];
				if (a.getValueLengthInRange(r) > e._maxSelectionLength) return;
				this._lastOvertyped[t] = {
					value: a.getValueInRange(r),
					multiline: r.startLineNumber !== r.endLineNumber
				};
			}
		})), this._disposables.add(n.onDidTrigger((e) => {
			this._locked = !0;
		})), this._disposables.add(n.onDidCancel((e) => {
			this._locked = !1;
		}));
	}
	getLastOvertypedInfo(e) {
		if (e >= 0 && e < this._lastOvertyped.length) return this._lastOvertyped[e];
	}
	dispose() {
		this._disposables.dispose();
	}
}, xF = function(e, t, n, r) {
	var i = arguments.length, a = i < 3 ? t : r === null ? r = Object.getOwnPropertyDescriptor(t, n) : r, o;
	if (typeof Reflect == "object" && typeof Reflect.decorate == "function") a = Reflect.decorate(e, t, n, r);
	else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (i < 3 ? o(a) : i > 3 ? o(t, n, a) : o(t, n)) || a);
	return i > 3 && a && Object.defineProperty(t, n, a), a;
}, SF = function(e, t) {
	return function(n, r) {
		t(n, r, e);
	};
}, CF = class {
	constructor(e, t, n, r, i) {
		this._menuId = t, this._menuService = r, this._contextKeyService = i, this._menuDisposables = new g(), this.element = D(e, w(".suggest-status-bar"));
		let a = ((e) => e instanceof wc ? n.createInstance(h, e, { useComma: !0 }) : void 0);
		this._leftActions = new Pn(this.element, { actionViewItemProvider: a }), this._rightActions = new Pn(this.element, { actionViewItemProvider: a }), this._leftActions.domNode.classList.add("left"), this._rightActions.domNode.classList.add("right");
	}
	dispose() {
		this._menuDisposables.dispose(), this._leftActions.dispose(), this._rightActions.dispose(), this.element.remove();
	}
	show() {
		let e = this._menuService.createMenu(this._menuId, this._contextKeyService), t = () => {
			let t = [], n = [];
			for (let [r, i] of e.getActions()) r === "left" ? t.push(...i) : n.push(...i);
			this._leftActions.clear(), this._leftActions.push(t), this._rightActions.clear(), this._rightActions.push(n);
		};
		this._menuDisposables.add(e.onDidChange(() => t())), this._menuDisposables.add(e);
	}
	hide() {
		this._menuDisposables.clear();
	}
};
CF = xF([
	SF(2, P),
	SF(3, aa),
	SF(4, j)
], CF);
// ../../../node_modules/.pnpm/monaco-editor@0.52.2/node_modules/monaco-editor/esm/vs/editor/contrib/suggest/browser/suggestWidgetDetails.js
var wF = function(e, t, n, r) {
	var i = arguments.length, a = i < 3 ? t : r === null ? r = Object.getOwnPropertyDescriptor(t, n) : r, o;
	if (typeof Reflect == "object" && typeof Reflect.decorate == "function") a = Reflect.decorate(e, t, n, r);
	else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (i < 3 ? o(a) : i > 3 ? o(t, n, a) : o(t, n)) || a);
	return i > 3 && a && Object.defineProperty(t, n, a), a;
}, TF = function(e, t) {
	return function(n, r) {
		t(n, r, e);
	};
};
function EF(e) {
	return !!e && !!(e.completion.documentation || e.completion.detail && e.completion.detail !== e.completion.label);
}
var DF = class {
	constructor(e, t) {
		this._editor = e, this._onDidClose = new x(), this.onDidClose = this._onDidClose.event, this._onDidChangeContents = new x(), this.onDidChangeContents = this._onDidChangeContents.event, this._disposables = new g(), this._renderDisposeable = new g(), this._borderWidth = 1, this._size = new Ze(330, 0), this.domNode = w(".suggest-details"), this.domNode.classList.add("no-docs"), this._markdownRenderer = t.createInstance(Jt, { editor: e }), this._body = w(".body"), this._scrollbar = new Ct(this._body, { alwaysConsumeMouseWheel: !0 }), D(this.domNode, this._scrollbar.getDomNode()), this._disposables.add(this._scrollbar), this._header = D(this._body, w(".header")), this._close = D(this._header, w("span" + _l.asCSSSelector(v.close))), this._close.title = B("details.close", "Close"), this._type = D(this._header, w("p.type")), this._docs = D(this._body, w("p.docs")), this._configureFont(), this._disposables.add(this._editor.onDidChangeConfiguration((e) => {
			e.hasChanged(50) && this._configureFont();
		}));
	}
	dispose() {
		this._disposables.dispose(), this._renderDisposeable.dispose();
	}
	_configureFont() {
		let e = this._editor.getOptions(), t = e.get(50), n = t.getMassagedFontFamily(), r = e.get(120) || t.fontSize, i = e.get(121) || t.lineHeight, a = t.fontWeight, o = `${r}px`, s = `${i}px`;
		this.domNode.style.fontSize = o, this.domNode.style.lineHeight = `${i / r}`, this.domNode.style.fontWeight = a, this.domNode.style.fontFeatureSettings = t.fontFeatureSettings, this._type.style.fontFamily = n, this._close.style.height = s, this._close.style.width = s;
	}
	getLayoutInfo() {
		let e = this._editor.getOption(121) || this._editor.getOption(50).lineHeight, t = this._borderWidth;
		return {
			lineHeight: e,
			borderWidth: t,
			borderHeight: t * 2,
			verticalPadding: 22,
			horizontalPadding: 14
		};
	}
	renderLoading() {
		this._type.textContent = B("loading", "Loading..."), this._docs.textContent = "", this.domNode.classList.remove("no-docs", "no-type"), this.layout(this.size.width, this.getLayoutInfo().lineHeight * 2), this._onDidChangeContents.fire(this);
	}
	renderItem(e, t) {
		this._renderDisposeable.clear();
		let { detail: n, documentation: r } = e.completion;
		if (t) {
			let t = "";
			t += `score: ${e.score[0]}\n`, t += `prefix: ${e.word ?? "(no prefix)"}\n`, t += `word: ${e.completion.filterText ? e.completion.filterText + " (filterText)" : e.textLabel}\n`, t += `distance: ${e.distance} (localityBonus-setting)\n`, t += `index: ${e.idx}, based on ${e.completion.sortText && `sortText: "${e.completion.sortText}"` || "label"}\n`, t += `commit_chars: ${e.completion.commitCharacters?.join("")}\n`, r = new ws().appendCodeblock("empty", t), n = `Provider: ${e.provider._debugDisplayName}`;
		}
		if (!t && !EF(e)) this.clearContents();
		else {
			if (this.domNode.classList.remove("no-docs", "no-type"), n) {
				let e = n.length > 1e5 ? `${n.substr(0, 1e5)}…` : n;
				this._type.textContent = e, this._type.title = e, Hs(this._type), this._type.classList.toggle("auto-wrap", !/\r?\n^\s+/gim.test(e));
			} else di(this._type), this._type.title = "", Eo(this._type), this.domNode.classList.add("no-type");
			if (di(this._docs), typeof r == "string") this._docs.classList.remove("markdown-docs"), this._docs.textContent = r;
			else if (r) {
				this._docs.classList.add("markdown-docs"), di(this._docs);
				let e = this._markdownRenderer.render(r);
				this._docs.appendChild(e.element), this._renderDisposeable.add(e), this._renderDisposeable.add(this._markdownRenderer.onDidRenderAsync(() => {
					this.layout(this._size.width, this._type.clientHeight + this._docs.clientHeight), this._onDidChangeContents.fire(this);
				}));
			}
			this.domNode.style.userSelect = "text", this.domNode.tabIndex = -1, this._close.onmousedown = (e) => {
				e.preventDefault(), e.stopPropagation();
			}, this._close.onclick = (e) => {
				e.preventDefault(), e.stopPropagation(), this._onDidClose.fire();
			}, this._body.scrollTop = 0, this.layout(this._size.width, this._type.clientHeight + this._docs.clientHeight), this._onDidChangeContents.fire(this);
		}
	}
	clearContents() {
		this.domNode.classList.add("no-docs"), this._type.textContent = "", this._docs.textContent = "";
	}
	get isEmpty() {
		return this.domNode.classList.contains("no-docs");
	}
	get size() {
		return this._size;
	}
	layout(e, t) {
		let n = new Ze(e, t);
		Ze.equals(n, this._size) || (this._size = n, ps(this.domNode, e, t)), this._scrollbar.scanDomNode();
	}
	scrollDown(e = 8) {
		this._body.scrollTop += e;
	}
	scrollUp(e = 8) {
		this._body.scrollTop -= e;
	}
	scrollTop() {
		this._body.scrollTop = 0;
	}
	scrollBottom() {
		this._body.scrollTop = this._body.scrollHeight;
	}
	pageDown() {
		this.scrollDown(80);
	}
	pageUp() {
		this.scrollUp(80);
	}
	set borderWidth(e) {
		this._borderWidth = e;
	}
	get borderWidth() {
		return this._borderWidth;
	}
};
DF = wF([TF(1, P)], DF);
var OF = class {
	constructor(e, t) {
		this.widget = e, this._editor = t, this.allowEditorOverflow = !0, this._disposables = new g(), this._added = !1, this._preferAlignAtTop = !0, this._resizable = new SE(), this._resizable.domNode.classList.add("suggest-details-container"), this._resizable.domNode.appendChild(e.domNode), this._resizable.enableSashes(!1, !0, !0, !1);
		let n, r, i = 0, a = 0;
		this._disposables.add(this._resizable.onDidWillResize(() => {
			n = this._topLeft, r = this._resizable.size;
		})), this._disposables.add(this._resizable.onDidResize((e) => {
			if (n && r) {
				this.widget.layout(e.dimension.width, e.dimension.height);
				let t = !1;
				e.west && (a = r.width - e.dimension.width, t = !0), e.north && (i = r.height - e.dimension.height, t = !0), t && this._applyTopLeft({
					top: n.top + i,
					left: n.left + a
				});
			}
			e.done && (n = void 0, r = void 0, i = 0, a = 0, this._userSize = e.dimension);
		})), this._disposables.add(this.widget.onDidChangeContents(() => {
			this._anchorBox && this._placeAtAnchor(this._anchorBox, this._userSize ?? this.widget.size, this._preferAlignAtTop);
		}));
	}
	dispose() {
		this._resizable.dispose(), this._disposables.dispose(), this.hide();
	}
	getId() {
		return "suggest.details";
	}
	getDomNode() {
		return this._resizable.domNode;
	}
	getPosition() {
		return this._topLeft ? { preference: this._topLeft } : null;
	}
	show() {
		this._added ||= (this._editor.addOverlayWidget(this), !0);
	}
	hide(e = !1) {
		this._resizable.clearSashHoverState(), this._added && (this._editor.removeOverlayWidget(this), this._added = !1, this._anchorBox = void 0, this._topLeft = void 0), e && (this._userSize = void 0, this.widget.clearContents());
	}
	placeAtAnchor(e, t) {
		let n = e.getBoundingClientRect();
		this._anchorBox = n, this._preferAlignAtTop = t, this._placeAtAnchor(this._anchorBox, this._userSize ?? this.widget.size, t);
	}
	_placeAtAnchor(e, t, n) {
		let r = ji(this.getDomNode().ownerDocument.body), i = this.widget.getLayoutInfo(), a = new Ze(220, 2 * i.lineHeight), o = e.top, s = (function() {
			let n = r.width - (e.left + e.width + i.borderWidth + i.horizontalPadding), s = -i.borderWidth + e.left + e.width, c = new Ze(n, r.height - e.top - i.borderHeight - i.verticalPadding), l = c.with(void 0, e.top + e.height - i.borderHeight - i.verticalPadding);
			return {
				top: o,
				left: s,
				fit: n - t.width,
				maxSizeTop: c,
				maxSizeBottom: l,
				minSize: a.with(Math.min(n, a.width))
			};
		})(), c = [
			s,
			(function() {
				let n = e.left - i.borderWidth - i.horizontalPadding, s = Math.max(i.horizontalPadding, e.left - t.width - i.borderWidth), c = new Ze(n, r.height - e.top - i.borderHeight - i.verticalPadding), l = c.with(void 0, e.top + e.height - i.borderHeight - i.verticalPadding);
				return {
					top: o,
					left: s,
					fit: n - t.width,
					maxSizeTop: c,
					maxSizeBottom: l,
					minSize: a.with(Math.min(n, a.width))
				};
			})(),
			(function() {
				let n = e.left, o = -i.borderWidth + e.top + e.height, s = new Ze(e.width - i.borderHeight, r.height - e.top - e.height - i.verticalPadding);
				return {
					top: o,
					left: n,
					fit: s.height - t.height,
					maxSizeBottom: s,
					maxSizeTop: s,
					minSize: a.with(s.width)
				};
			})()
		], l = c.find((e) => e.fit >= 0) ?? c.sort((e, t) => t.fit - e.fit)[0], u = e.top + e.height - i.borderHeight, d, f = t.height, p = Math.max(l.maxSizeTop.height, l.maxSizeBottom.height);
		f > p && (f = p);
		let m;
		n ? f <= l.maxSizeTop.height ? (d = !0, m = l.maxSizeTop) : (d = !1, m = l.maxSizeBottom) : f <= l.maxSizeBottom.height ? (d = !1, m = l.maxSizeBottom) : (d = !0, m = l.maxSizeTop);
		let { top: h, left: ee } = l;
		!d && f > e.height && (h = u - f);
		let te = this._editor.getDomNode();
		if (te) {
			let e = te.getBoundingClientRect();
			h -= e.top, ee -= e.left;
		}
		this._applyTopLeft({
			left: ee,
			top: h
		}), this._resizable.enableSashes(!d, l === s, d, l !== s), this._resizable.minSize = l.minSize, this._resizable.maxSize = m, this._resizable.layout(f, Math.min(m.width, t.width)), this.widget.layout(this._resizable.size.width, this._resizable.size.height);
	}
	_applyTopLeft(e) {
		this._topLeft = e, this._editor.layoutOverlayWidget(this);
	}
}, kF;
(function(e) {
	e[e.FILE = 0] = "FILE", e[e.FOLDER = 1] = "FOLDER", e[e.ROOT_FOLDER = 2] = "ROOT_FOLDER";
})(kF ||= {});
// ../../../node_modules/.pnpm/monaco-editor@0.52.2/node_modules/monaco-editor/esm/vs/editor/common/services/getIconClasses.js
var AF = /(?:\/|^)(?:([^\/]+)\/)?([^\/]+)$/;
function jF(e, t, n, r, i) {
	if (_l.isThemeIcon(i)) return [`codicon-${i.id}`, "predefined-file-icon"];
	if (De.isUri(i)) return [];
	let a = r === kF.ROOT_FOLDER ? ["rootfolder-icon"] : r === kF.FOLDER ? ["folder-icon"] : ["file-icon"];
	if (n) {
		let i;
		if (n.scheme === Kc.data) i = ea.parseMetaData(n).get(ea.META_DATA_LABEL);
		else {
			let e = n.path.match(AF);
			e ? (i = NF(e[2].toLowerCase()), e[1] && a.push(`${NF(e[1].toLowerCase())}-name-dir-icon`)) : i = NF(n.authority.toLowerCase());
		}
		if (r === kF.ROOT_FOLDER) a.push(`${i}-root-name-folder-icon`);
		else if (r === kF.FOLDER) a.push(`${i}-name-folder-icon`);
		else {
			if (i) {
				if (a.push(`${i}-name-file-icon`), a.push("name-file-icon"), i.length <= 255) {
					let e = i.split(".");
					for (let t = 1; t < e.length; t++) a.push(`${e.slice(t).join(".")}-ext-file-icon`);
				}
				a.push("ext-file-icon");
			}
			let r = MF(e, t, n);
			r && a.push(`${NF(r)}-lang-file-icon`);
		}
	}
	return a;
}
function MF(e, t, n) {
	if (!n) return null;
	let r = null;
	if (n.scheme === Kc.data) {
		let e = ea.parseMetaData(n).get(ea.META_DATA_MIME);
		e && (r = t.getLanguageIdByMimeType(e));
	} else {
		let t = e.getModel(n);
		t && (r = t.getLanguageId());
	}
	return r && r !== "plaintext" ? r : t.guessLanguageIdByFilepathOrFirstLine(n);
}
function NF(e) {
	return e.replace(/[\s]/g, "/");
}
// ../../../node_modules/.pnpm/monaco-editor@0.52.2/node_modules/monaco-editor/esm/vs/editor/contrib/suggest/browser/suggestWidgetRenderer.js
var PF = function(e, t, n, r) {
	var i = arguments.length, a = i < 3 ? t : r === null ? r = Object.getOwnPropertyDescriptor(t, n) : r, o;
	if (typeof Reflect == "object" && typeof Reflect.decorate == "function") a = Reflect.decorate(e, t, n, r);
	else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (i < 3 ? o(a) : i > 3 ? o(t, n, a) : o(t, n)) || a);
	return i > 3 && a && Object.defineProperty(t, n, a), a;
}, FF = function(e, t) {
	return function(n, r) {
		t(n, r, e);
	};
};
function IF(e) {
	return `suggest-aria-id:${e}`;
}
var LF = Jn("suggest-more-info", v.chevronRight, B("suggestMoreInfoIcon", "Icon for more information in the suggest widget.")), RF = new class e {
	static {
		this._regexRelaxed = /(#([\da-fA-F]{3}){1,2}|(rgb|hsl)a\(\s*(\d{1,3}%?\s*,\s*){3}(1|0?\.\d+)\)|(rgb|hsl)\(\s*\d{1,3}%?(\s*,\s*\d{1,3}%?){2}\s*\))/;
	}
	static {
		this._regexStrict = RegExp(`^${e._regexRelaxed.source}$`, "i");
	}
	extract(t, n) {
		if (t.textLabel.match(e._regexStrict)) return n[0] = t.textLabel, !0;
		if (t.completion.detail && t.completion.detail.match(e._regexStrict)) return n[0] = t.completion.detail, !0;
		if (t.completion.documentation) {
			let r = typeof t.completion.documentation == "string" ? t.completion.documentation : t.completion.documentation.value, i = e._regexRelaxed.exec(r);
			if (i && (i.index === 0 || i.index + i[0].length === r.length)) return n[0] = i[0], !0;
		}
		return !1;
	}
}(), zF = class {
	constructor(e, t, n, r) {
		this._editor = e, this._modelService = t, this._languageService = n, this._themeService = r, this._onDidToggleDetails = new x(), this.onDidToggleDetails = this._onDidToggleDetails.event, this.templateId = "suggestion";
	}
	dispose() {
		this._onDidToggleDetails.dispose();
	}
	renderTemplate(e) {
		let t = new g(), n = e;
		n.classList.add("show-file-icons");
		let r = D(e, w(".icon")), i = D(r, w("span.colorspan")), a = D(e, w(".contents")), o = D(a, w(".main")), s = D(o, w(".icon-label.codicon")), c = D(o, w("span.left")), l = D(o, w("span.right")), u = new mr(c, {
			supportHighlights: !0,
			supportIcons: !0
		});
		t.add(u);
		let d = D(c, w("span.signature-label")), f = D(c, w("span.qualifier-label")), p = D(l, w("span.details-label")), m = D(l, w("span.readMore" + _l.asCSSSelector(LF)));
		return m.title = B("readMore", "Read More"), {
			root: n,
			left: c,
			right: l,
			icon: r,
			colorspan: i,
			iconLabel: u,
			iconContainer: s,
			parametersLabel: d,
			qualifierLabel: f,
			detailsLabel: p,
			readMore: m,
			disposables: t,
			configureFont: () => {
				let e = this._editor.getOptions(), t = e.get(50), i = t.getMassagedFontFamily(), a = t.fontFeatureSettings, s = e.get(120) || t.fontSize, c = e.get(121) || t.lineHeight, l = t.fontWeight, u = t.letterSpacing, d = `${s}px`, f = `${c}px`, p = `${u}px`;
				n.style.fontSize = d, n.style.fontWeight = l, n.style.letterSpacing = p, o.style.fontFamily = i, o.style.fontFeatureSettings = a, o.style.lineHeight = f, r.style.height = f, r.style.width = f, m.style.height = f, m.style.width = f;
			}
		};
	}
	renderElement(e, t, n) {
		n.configureFont();
		let { completion: r } = e;
		n.root.id = IF(t), n.colorspan.style.backgroundColor = "";
		let i = {
			labelEscapeNewLines: !0,
			matches: Cl(e.score)
		}, a = [];
		if (r.kind === 19 && RF.extract(e, a)) n.icon.className = "icon customcolor", n.iconContainer.className = "icon hide", n.colorspan.style.backgroundColor = a[0];
		else if (r.kind === 20 && this._themeService.getFileIconTheme().hasFileIcons) {
			n.icon.className = "icon hide", n.iconContainer.className = "icon hide";
			let t = jF(this._modelService, this._languageService, De.from({
				scheme: "fake",
				path: e.textLabel
			}), kF.FILE), a = jF(this._modelService, this._languageService, De.from({
				scheme: "fake",
				path: r.detail
			}), kF.FILE);
			i.extraClasses = t.length > a.length ? t : a;
		} else r.kind === 23 && this._themeService.getFileIconTheme().hasFolderIcons ? (n.icon.className = "icon hide", n.iconContainer.className = "icon hide", i.extraClasses = [jF(this._modelService, this._languageService, De.from({
			scheme: "fake",
			path: e.textLabel
		}), kF.FOLDER), jF(this._modelService, this._languageService, De.from({
			scheme: "fake",
			path: r.detail
		}), kF.FOLDER)].flat()) : (n.icon.className = "icon hide", n.iconContainer.className = "", n.iconContainer.classList.add("suggest-icon", ..._l.asClassNameArray(bc.toIcon(r.kind))));
		r.tags && r.tags.indexOf(1) >= 0 && (i.extraClasses = (i.extraClasses || []).concat(["deprecated"]), i.matches = []), n.iconLabel.setLabel(e.textLabel, void 0, i), typeof r.label == "string" ? (n.parametersLabel.textContent = "", n.detailsLabel.textContent = BF(r.detail || ""), n.root.classList.add("string-label")) : (n.parametersLabel.textContent = BF(r.label.detail || ""), n.detailsLabel.textContent = BF(r.label.description || ""), n.root.classList.remove("string-label")), this._editor.getOption(119).showInlineDetails ? Hs(n.detailsLabel) : Eo(n.detailsLabel), EF(e) ? (n.right.classList.add("can-expand-details"), Hs(n.readMore), n.readMore.onmousedown = (e) => {
			e.stopPropagation(), e.preventDefault();
		}, n.readMore.onclick = (e) => {
			e.stopPropagation(), e.preventDefault(), this._onDidToggleDetails.fire();
		}) : (n.right.classList.remove("can-expand-details"), Eo(n.readMore), n.readMore.onmousedown = null, n.readMore.onclick = null);
	}
	disposeTemplate(e) {
		e.disposables.dispose();
	}
};
zF = PF([
	FF(1, je),
	FF(2, dr),
	FF(3, fc)
], zF);
function BF(e) {
	return e.replace(/\r\n|\r|\n/g, "");
}
// ../../../node_modules/.pnpm/monaco-editor@0.52.2/node_modules/monaco-editor/esm/vs/editor/contrib/suggest/browser/suggestWidget.js
var VF = function(e, t, n, r) {
	var i = arguments.length, a = i < 3 ? t : r === null ? r = Object.getOwnPropertyDescriptor(t, n) : r, o;
	if (typeof Reflect == "object" && typeof Reflect.decorate == "function") a = Reflect.decorate(e, t, n, r);
	else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (i < 3 ? o(a) : i > 3 ? o(t, n, a) : o(t, n)) || a);
	return i > 3 && a && Object.defineProperty(t, n, a), a;
}, HF = function(e, t) {
	return function(n, r) {
		t(n, r, e);
	};
}, UF;
S("editorSuggestWidget.background", d, B("editorSuggestWidgetBackground", "Background color of the suggest widget.")), S("editorSuggestWidget.border", Fo, B("editorSuggestWidgetBorder", "Border color of the suggest widget."));
var WF = S("editorSuggestWidget.foreground", ho, B("editorSuggestWidgetForeground", "Foreground color of the suggest widget."));
S("editorSuggestWidget.selectedForeground", Pt, B("editorSuggestWidgetSelectedForeground", "Foreground color of the selected entry in the suggest widget.")), S("editorSuggestWidget.selectedIconForeground", Ei, B("editorSuggestWidgetSelectedIconForeground", "Icon foreground color of the selected entry in the suggest widget."));
var GF = S("editorSuggestWidget.selectedBackground", ec, B("editorSuggestWidgetSelectedBackground", "Background color of the selected entry in the suggest widget."));
S("editorSuggestWidget.highlightForeground", Ii, B("editorSuggestWidgetHighlightForeground", "Color of the match highlights in the suggest widget.")), S("editorSuggestWidget.focusHighlightForeground", _i, B("editorSuggestWidgetFocusHighlightForeground", "Color of the match highlights in the suggest widget when an item is focused.")), S("editorSuggestWidgetStatus.foreground", Rr(WF, .5), B("editorSuggestWidgetStatusForeground", "Foreground color of the suggest widget status."));
var KF = class {
	constructor(e, t) {
		this._service = e, this._key = `suggestWidget.size/${t.getEditorType()}/${t instanceof gD}`;
	}
	restore() {
		let e = this._service.get(this._key, 0) ?? "";
		try {
			let t = JSON.parse(e);
			if (Ze.is(t)) return Ze.lift(t);
		} catch {}
	}
	store(e) {
		this._service.store(this._key, JSON.stringify(e), 0, 1);
	}
	reset() {
		this._service.remove(this._key, 0);
	}
}, qF = class {
	static {
		UF = this;
	}
	static {
		this.LOADING_MESSAGE = B("suggestWidget.loading", "Loading...");
	}
	static {
		this.NO_SUGGESTIONS_MESSAGE = B("suggestWidget.noSuggestions", "No suggestions.");
	}
	constructor(e, t, n, r, i) {
		this.editor = e, this._storageService = t, this._state = 0, this._isAuto = !1, this._pendingLayout = new Zr(), this._pendingShowDetails = new Zr(), this._ignoreFocusEvents = !1, this._forceRenderingAbove = !1, this._explainMode = !1, this._showTimeout = new kr(), this._disposables = new g(), this._onDidSelect = new tn(), this._onDidFocus = new tn(), this._onDidHide = new x(), this._onDidShow = new x(), this.onDidSelect = this._onDidSelect.event, this.onDidFocus = this._onDidFocus.event, this.onDidHide = this._onDidHide.event, this.onDidShow = this._onDidShow.event, this._onDetailsKeydown = new x(), this.onDetailsKeyDown = this._onDetailsKeydown.event, this.element = new SE(), this.element.domNode.classList.add("editor-widget", "suggest-widget"), this._contentWidget = new JF(this, e), this._persistedSize = new KF(t, e);
		class a {
			constructor(e, t, n = !1, r = !1) {
				this.persistedSize = e, this.currentSize = t, this.persistHeight = n, this.persistWidth = r;
			}
		}
		let o;
		this._disposables.add(this.element.onDidWillResize(() => {
			this._contentWidget.lockPreference(), o = new a(this._persistedSize.restore(), this.element.size);
		})), this._disposables.add(this.element.onDidResize((e) => {
			if (this._resize(e.dimension.width, e.dimension.height), o && (o.persistHeight = o.persistHeight || !!e.north || !!e.south, o.persistWidth = o.persistWidth || !!e.east || !!e.west), e.done) {
				if (o) {
					let { itemHeight: e, defaultSize: t } = this.getLayoutInfo(), n = Math.round(e / 2), { width: r, height: i } = this.element.size;
					(!o.persistHeight || Math.abs(o.currentSize.height - i) <= n) && (i = o.persistedSize?.height ?? t.height), (!o.persistWidth || Math.abs(o.currentSize.width - r) <= n) && (r = o.persistedSize?.width ?? t.width), this._persistedSize.store(new Ze(r, i));
				}
				this._contentWidget.unlockPreference(), o = void 0;
			}
		})), this._messageElement = D(this.element.domNode, w(".message")), this._listElement = D(this.element.domNode, w(".tree"));
		let s = this._disposables.add(i.createInstance(DF, this.editor));
		s.onDidClose(this.toggleDetails, this, this._disposables), this._details = new OF(s, this.editor);
		let c = () => this.element.domNode.classList.toggle("no-icons", !this.editor.getOption(119).showIcons);
		c();
		let l = i.createInstance(zF, this.editor);
		this._disposables.add(l), this._disposables.add(l.onDidToggleDetails(() => this.toggleDetails())), this._list = new mt("SuggestWidget", this._listElement, {
			getHeight: (e) => this.getLayoutInfo().itemHeight,
			getTemplateId: (e) => "suggestion"
		}, [l], {
			alwaysConsumeMouseWheel: !0,
			useShadows: !1,
			mouseSupport: !1,
			multipleSelectionSupport: !1,
			accessibilityProvider: {
				getRole: () => "option",
				getWidgetAriaLabel: () => B("suggest", "Suggest"),
				getWidgetRole: () => "listbox",
				getAriaLabel: (e) => {
					let t = e.textLabel;
					if (typeof e.completion.label != "string") {
						let { detail: n, description: r } = e.completion.label;
						n && r ? t = B("label.full", "{0} {1}, {2}", t, n, r) : n ? t = B("label.detail", "{0} {1}", t, n) : r && (t = B("label.desc", "{0}, {1}", t, r));
					}
					if (!e.isResolved || !this._isDetailsVisible()) return t;
					let { documentation: n, detail: r } = e.completion, i = nt("{0}{1}", r || "", n ? typeof n == "string" ? n : n.value : "");
					return B("ariaCurrenttSuggestionReadDetails", "{0}, docs: {1}", t, i);
				}
			}
		}), this._list.style(nn({
			listInactiveFocusBackground: GF,
			listInactiveFocusOutline: xt
		})), this._status = i.createInstance(CF, this.element.domNode, rP);
		let u = () => this.element.domNode.classList.toggle("with-status-bar", this.editor.getOption(119).showStatusBar);
		u(), this._disposables.add(r.onDidColorThemeChange((e) => this._onThemeChange(e))), this._onThemeChange(r.getColorTheme()), this._disposables.add(this._list.onMouseDown((e) => this._onListMouseDownOrTap(e))), this._disposables.add(this._list.onTap((e) => this._onListMouseDownOrTap(e))), this._disposables.add(this._list.onDidChangeSelection((e) => this._onListSelection(e))), this._disposables.add(this._list.onDidChangeFocus((e) => this._onListFocus(e))), this._disposables.add(this.editor.onDidChangeCursorSelection(() => this._onCursorSelectionChanged())), this._disposables.add(this.editor.onDidChangeConfiguration((e) => {
			e.hasChanged(119) && (u(), c()), this._completionModel && (e.hasChanged(50) || e.hasChanged(120) || e.hasChanged(121)) && this._list.splice(0, this._list.length, this._completionModel.items);
		})), this._ctxSuggestWidgetVisible = $.Visible.bindTo(n), this._ctxSuggestWidgetDetailsVisible = $.DetailsVisible.bindTo(n), this._ctxSuggestWidgetMultipleSuggestions = $.MultipleSuggestions.bindTo(n), this._ctxSuggestWidgetHasFocusedSuggestion = $.HasFocusedSuggestion.bindTo(n), this._disposables.add(_t(this._details.widget.domNode, "keydown", (e) => {
			this._onDetailsKeydown.fire(e);
		})), this._disposables.add(this.editor.onMouseDown((e) => this._onEditorMouseDown(e)));
	}
	dispose() {
		this._details.widget.dispose(), this._details.dispose(), this._list.dispose(), this._status.dispose(), this._disposables.dispose(), this._loadingTimeout?.dispose(), this._pendingLayout.dispose(), this._pendingShowDetails.dispose(), this._showTimeout.dispose(), this._contentWidget.dispose(), this.element.dispose();
	}
	_onEditorMouseDown(e) {
		this._details.widget.domNode.contains(e.target.element) ? this._details.widget.domNode.focus() : this.element.domNode.contains(e.target.element) && this.editor.focus();
	}
	_onCursorSelectionChanged() {
		this._state !== 0 && this._contentWidget.layout();
	}
	_onListMouseDownOrTap(e) {
		e.element !== void 0 && e.index !== void 0 && (e.browserEvent.preventDefault(), e.browserEvent.stopPropagation(), this._select(e.element, e.index));
	}
	_onListSelection(e) {
		e.elements.length && this._select(e.elements[0], e.indexes[0]);
	}
	_select(e, t) {
		let n = this._completionModel;
		n && (this._onDidSelect.fire({
			item: e,
			index: t,
			model: n
		}), this.editor.focus());
	}
	_onThemeChange(e) {
		this._details.widget.borderWidth = Sc(e.type) ? 2 : 1;
	}
	_onListFocus(e) {
		if (this._ignoreFocusEvents) return;
		if (!e.elements.length) {
			this._currentSuggestionDetails && (this._currentSuggestionDetails.cancel(), this._currentSuggestionDetails = void 0, this._focusedItem = void 0), this.editor.setAriaOptions({ activeDescendant: void 0 }), this._ctxSuggestWidgetHasFocusedSuggestion.set(!1);
			return;
		}
		if (!this._completionModel) return;
		this._ctxSuggestWidgetHasFocusedSuggestion.set(!0);
		let t = e.elements[0], n = e.indexes[0];
		t !== this._focusedItem && (this._currentSuggestionDetails?.cancel(), this._currentSuggestionDetails = void 0, this._focusedItem = t, this._list.reveal(n), this._currentSuggestionDetails = Te(async (e) => {
			let n = jn(() => {
				this._isDetailsVisible() && this.showDetails(!0);
			}, 250), r = e.onCancellationRequested(() => n.dispose());
			try {
				return await t.resolve(e);
			} finally {
				n.dispose(), r.dispose();
			}
		}), this._currentSuggestionDetails.then(() => {
			n >= this._list.length || t !== this._list.element(n) || (this._ignoreFocusEvents = !0, this._list.splice(n, 1, [t]), this._list.setFocus([n]), this._ignoreFocusEvents = !1, this._isDetailsVisible() ? this.showDetails(!1) : this.element.domNode.classList.remove("docs-side"), this.editor.setAriaOptions({ activeDescendant: IF(n) }));
		}).catch(er)), this._onDidFocus.fire({
			item: t,
			index: n,
			model: this._completionModel
		});
	}
	_setState(e) {
		if (this._state !== e) switch (this._state = e, this.element.domNode.classList.toggle("frozen", e === 4), this.element.domNode.classList.remove("message"), e) {
			case 0:
				Eo(this._messageElement, this._listElement, this._status.element), this._details.hide(!0), this._status.hide(), this._contentWidget.hide(), this._ctxSuggestWidgetVisible.reset(), this._ctxSuggestWidgetMultipleSuggestions.reset(), this._ctxSuggestWidgetHasFocusedSuggestion.reset(), this._showTimeout.cancel(), this.element.domNode.classList.remove("visible"), this._list.splice(0, this._list.length), this._focusedItem = void 0, this._cappedHeight = void 0, this._explainMode = !1;
				break;
			case 1:
				this.element.domNode.classList.add("message"), this._messageElement.textContent = UF.LOADING_MESSAGE, Eo(this._listElement, this._status.element), Hs(this._messageElement), this._details.hide(), this._show(), this._focusedItem = void 0, Wr(UF.LOADING_MESSAGE);
				break;
			case 2:
				this.element.domNode.classList.add("message"), this._messageElement.textContent = UF.NO_SUGGESTIONS_MESSAGE, Eo(this._listElement, this._status.element), Hs(this._messageElement), this._details.hide(), this._show(), this._focusedItem = void 0, Wr(UF.NO_SUGGESTIONS_MESSAGE);
				break;
			case 3:
				Eo(this._messageElement), Hs(this._listElement, this._status.element), this._show();
				break;
			case 4:
				Eo(this._messageElement), Hs(this._listElement, this._status.element), this._show();
				break;
			case 5: Eo(this._messageElement), Hs(this._listElement, this._status.element), this._details.show(), this._show();
		}
	}
	_show() {
		this._status.show(), this._contentWidget.show(), this._layout(this._persistedSize.restore()), this._ctxSuggestWidgetVisible.set(!0), this._showTimeout.cancelAndSet(() => {
			this.element.domNode.classList.add("visible"), this._onDidShow.fire(this);
		}, 100);
	}
	showTriggered(e, t) {
		this._state === 0 && (this._contentWidget.setPosition(this.editor.getPosition()), this._isAuto = !!e, this._isAuto || (this._loadingTimeout = jn(() => this._setState(1), t)));
	}
	showSuggestions(e, t, n, r, i) {
		if (this._contentWidget.setPosition(this.editor.getPosition()), this._loadingTimeout?.dispose(), this._currentSuggestionDetails?.cancel(), this._currentSuggestionDetails = void 0, this._completionModel !== e && (this._completionModel = e), n && this._state !== 2 && this._state !== 0) {
			this._setState(4);
			return;
		}
		let a = this._completionModel.items.length, o = a === 0;
		if (this._ctxSuggestWidgetMultipleSuggestions.set(a > 1), o) this._setState(r ? 0 : 2), this._completionModel = void 0;
		else {
			this._focusedItem = void 0, this._onDidFocus.pause(), this._onDidSelect.pause();
			try {
				this._list.splice(0, this._list.length, this._completionModel.items), this._setState(n ? 4 : 3), this._list.reveal(t, 0), this._list.setFocus(i ? [] : [t]);
			} finally {
				this._onDidFocus.resume(), this._onDidSelect.resume();
			}
			this._pendingLayout.value = Lc(Cs(this.element.domNode), () => {
				this._pendingLayout.clear(), this._layout(this.element.size), this._details.widget.domNode.classList.remove("focused");
			});
		}
	}
	focusSelected() {
		this._list.length > 0 && this._list.setFocus([0]);
	}
	selectNextPage() {
		switch (this._state) {
			case 0: return !1;
			case 5: return this._details.widget.pageDown(), !0;
			case 1: return !this._isAuto;
			default: return this._list.focusNextPage(), !0;
		}
	}
	selectNext() {
		switch (this._state) {
			case 0: return !1;
			case 1: return !this._isAuto;
			default: return this._list.focusNext(1, !0), !0;
		}
	}
	selectLast() {
		switch (this._state) {
			case 0: return !1;
			case 5: return this._details.widget.scrollBottom(), !0;
			case 1: return !this._isAuto;
			default: return this._list.focusLast(), !0;
		}
	}
	selectPreviousPage() {
		switch (this._state) {
			case 0: return !1;
			case 5: return this._details.widget.pageUp(), !0;
			case 1: return !this._isAuto;
			default: return this._list.focusPreviousPage(), !0;
		}
	}
	selectPrevious() {
		switch (this._state) {
			case 0: return !1;
			case 1: return !this._isAuto;
			default: return this._list.focusPrevious(1, !0), !1;
		}
	}
	selectFirst() {
		switch (this._state) {
			case 0: return !1;
			case 5: return this._details.widget.scrollTop(), !0;
			case 1: return !this._isAuto;
			default: return this._list.focusFirst(), !0;
		}
	}
	getFocusedItem() {
		if (this._state !== 0 && this._state !== 2 && this._state !== 1 && this._completionModel && this._list.getFocus().length > 0) return {
			item: this._list.getFocusedElements()[0],
			index: this._list.getFocus()[0],
			model: this._completionModel
		};
	}
	toggleDetailsFocus() {
		this._state === 5 ? (this._setState(3), this._details.widget.domNode.classList.remove("focused")) : this._state === 3 && this._isDetailsVisible() && (this._setState(5), this._details.widget.domNode.classList.add("focused"));
	}
	toggleDetails() {
		this._isDetailsVisible() ? (this._pendingShowDetails.clear(), this._ctxSuggestWidgetDetailsVisible.set(!1), this._setDetailsVisible(!1), this._details.hide(), this.element.domNode.classList.remove("shows-details")) : (EF(this._list.getFocusedElements()[0]) || this._explainMode) && (this._state === 3 || this._state === 5 || this._state === 4) && (this._ctxSuggestWidgetDetailsVisible.set(!0), this._setDetailsVisible(!0), this.showDetails(!1));
	}
	showDetails(e) {
		this._pendingShowDetails.value = Lc(Cs(this.element.domNode), () => {
			this._pendingShowDetails.clear(), this._details.show(), e ? this._details.widget.renderLoading() : this._details.widget.renderItem(this._list.getFocusedElements()[0], this._explainMode), this._details.widget.isEmpty ? this._details.hide() : (this._positionDetails(), this.element.domNode.classList.add("shows-details")), this.editor.focus();
		});
	}
	toggleExplainMode() {
		this._list.getFocusedElements()[0] && (this._explainMode = !this._explainMode, this._isDetailsVisible() ? this.showDetails(!1) : this.toggleDetails());
	}
	resetPersistedSize() {
		this._persistedSize.reset();
	}
	hideWidget() {
		this._pendingLayout.clear(), this._pendingShowDetails.clear(), this._loadingTimeout?.dispose(), this._setState(0), this._onDidHide.fire(this), this.element.clearSashHoverState();
		let e = this._persistedSize.restore(), t = Math.ceil(this.getLayoutInfo().itemHeight * 4.3);
		e && e.height < t && this._persistedSize.store(e.with(void 0, t));
	}
	isFrozen() {
		return this._state === 4;
	}
	_afterRender(e) {
		e === null ? this._isDetailsVisible() && this._details.hide() : this._state !== 2 && this._state !== 1 && (this._isDetailsVisible() && !this._details.widget.isEmpty && this._details.show(), this._positionDetails());
	}
	_layout(e) {
		if (!this.editor.hasModel() || !this.editor.getDomNode()) return;
		let t = ji(this.element.domNode.ownerDocument.body), n = this.getLayoutInfo();
		e ||= n.defaultSize;
		let r = e.height, i = e.width;
		if (this._status.element.style.height = `${n.itemHeight}px`, this._state === 2 || this._state === 1) r = n.itemHeight + n.borderHeight, i = n.defaultSize.width / 2, this.element.enableSashes(!1, !1, !1, !1), this.element.minSize = this.element.maxSize = new Ze(i, r), this._contentWidget.setPreference(2);
		else {
			let a = t.width - n.borderHeight - 2 * n.horizontalPadding;
			i > a && (i = a);
			let o = this._completionModel ? this._completionModel.stats.pLabelLen * n.typicalHalfwidthCharacterWidth : i, s = n.statusBarHeight + this._list.contentHeight + n.borderHeight, c = n.itemHeight + n.statusBarHeight, l = Bi(this.editor.getDomNode()), u = this.editor.getScrolledVisiblePosition(this.editor.getPosition()), d = l.top + u.top + u.height, f = Math.min(t.height - d - n.verticalPadding, s), p = l.top + u.top - n.verticalPadding, m = Math.min(p, s), h = Math.min(Math.max(m, f) + n.borderHeight, s);
			r === this._cappedHeight?.capped && (r = this._cappedHeight.wanted), r < c && (r = c), r > h && (r = h), r > f || this._forceRenderingAbove && p > 150 ? (this._contentWidget.setPreference(1), this.element.enableSashes(!0, !0, !1, !1), h = m) : (this._contentWidget.setPreference(2), this.element.enableSashes(!1, !0, !0, !1), h = f), this.element.preferredSize = new Ze(o, n.defaultSize.height), this.element.maxSize = new Ze(a, h), this.element.minSize = new Ze(220, c), this._cappedHeight = r === s ? {
				wanted: this._cappedHeight?.wanted ?? e.height,
				capped: r
			} : void 0;
		}
		this._resize(i, r);
	}
	_resize(e, t) {
		let { width: n, height: r } = this.element.maxSize;
		e = Math.min(n, e), t = Math.min(r, t);
		let { statusBarHeight: i } = this.getLayoutInfo();
		this._list.layout(t - i, e), this._listElement.style.height = `${t - i}px`, this.element.layout(t, e), this._contentWidget.layout(), this._positionDetails();
	}
	_positionDetails() {
		this._isDetailsVisible() && this._details.placeAtAnchor(this.element.domNode, this._contentWidget.getPosition()?.preference[0] === 2);
	}
	getLayoutInfo() {
		let e = this.editor.getOption(50), t = Zn(this.editor.getOption(121) || e.lineHeight, 8, 1e3), n = !this.editor.getOption(119).showStatusBar || this._state === 2 || this._state === 1 ? 0 : t, r = this._details.widget.borderWidth, i = 2 * r;
		return {
			itemHeight: t,
			statusBarHeight: n,
			borderWidth: r,
			borderHeight: i,
			typicalHalfwidthCharacterWidth: e.typicalHalfwidthCharacterWidth,
			verticalPadding: 22,
			horizontalPadding: 14,
			defaultSize: new Ze(430, n + 12 * t + i)
		};
	}
	_isDetailsVisible() {
		return this._storageService.getBoolean("expandSuggestionDocs", 0, !1);
	}
	_setDetailsVisible(e) {
		this._storageService.store("expandSuggestionDocs", e, 0, 0);
	}
	forceRenderingAbove() {
		this._forceRenderingAbove || (this._forceRenderingAbove = !0, this._layout(this._persistedSize.restore()));
	}
	stopForceRenderingAbove() {
		this._forceRenderingAbove = !1;
	}
};
qF = UF = VF([
	HF(1, ur),
	HF(2, j),
	HF(3, fc),
	HF(4, P)
], qF);
var JF = class {
	constructor(e, t) {
		this._widget = e, this._editor = t, this.allowEditorOverflow = !0, this.suppressMouseDown = !1, this._preferenceLocked = !1, this._added = !1, this._hidden = !1;
	}
	dispose() {
		this._added && (this._added = !1, this._editor.removeContentWidget(this));
	}
	getId() {
		return "editor.widget.suggestWidget";
	}
	getDomNode() {
		return this._widget.element.domNode;
	}
	show() {
		this._hidden = !1, this._added || (this._added = !0, this._editor.addContentWidget(this));
	}
	hide() {
		this._hidden || (this._hidden = !0, this.layout());
	}
	layout() {
		this._editor.layoutContentWidget(this);
	}
	getPosition() {
		return this._hidden || !this._position || !this._preference ? null : {
			position: this._position,
			preference: [this._preference]
		};
	}
	beforeRender() {
		let { height: e, width: t } = this._widget.element.size, { borderWidth: n, horizontalPadding: r } = this._widget.getLayoutInfo();
		return new Ze(t + 2 * n + r, e + 2 * n);
	}
	afterRender(e) {
		this._widget._afterRender(e);
	}
	setPreference(e) {
		this._preferenceLocked || (this._preference = e);
	}
	lockPreference() {
		this._preferenceLocked = !0;
	}
	unlockPreference() {
		this._preferenceLocked = !1;
	}
	setPosition(e) {
		this._position = e;
	}
}, YF = function(e, t, n, r) {
	var i = arguments.length, a = i < 3 ? t : r === null ? r = Object.getOwnPropertyDescriptor(t, n) : r, o;
	if (typeof Reflect == "object" && typeof Reflect.decorate == "function") a = Reflect.decorate(e, t, n, r);
	else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (i < 3 ? o(a) : i > 3 ? o(t, n, a) : o(t, n)) || a);
	return i > 3 && a && Object.defineProperty(t, n, a), a;
}, XF = function(e, t) {
	return function(n, r) {
		t(n, r, e);
	};
}, ZF, QF = class {
	constructor(e, t) {
		if (this._model = e, this._position = t, this._decorationOptions = L.register({
			description: "suggest-line-suffix",
			stickiness: 1
		}), e.getLineMaxColumn(t.lineNumber) !== t.column) {
			let n = e.getOffsetAt(t), r = e.getPositionAt(n + 1);
			e.changeDecorations((e) => {
				this._marker && e.removeDecoration(this._marker), this._marker = e.addDecoration(E.fromPositions(t, r), this._decorationOptions);
			});
		}
	}
	dispose() {
		this._marker && !this._model.isDisposed() && this._model.changeDecorations((e) => {
			e.removeDecoration(this._marker), this._marker = void 0;
		});
	}
	delta(e) {
		if (this._model.isDisposed() || this._position.lineNumber !== e.lineNumber) return 0;
		if (this._marker) {
			let t = this._model.getDecorationRange(this._marker);
			return this._model.getOffsetAt(t.getStartPosition()) - this._model.getOffsetAt(e);
		}
		return this._model.getLineMaxColumn(e.lineNumber) - e.column;
	}
}, $F = class {
	static {
		ZF = this;
	}
	static {
		this.ID = "editor.contrib.suggestController";
	}
	static get(e) {
		return e.getContribution(ZF.ID);
	}
	constructor(e, t, n, r, i, a, o) {
		this._memoryService = t, this._commandService = n, this._contextKeyService = r, this._instantiationService = i, this._logService = a, this._telemetryService = o, this._lineSuffix = new Zr(), this._toDispose = new g(), this._selectors = new eI((e) => e.priority), this._onWillInsertSuggestItem = new x(), this.onWillInsertSuggestItem = this._onWillInsertSuggestItem.event, this.editor = e, this.model = i.createInstance(yF, this.editor), this._selectors.register({
			priority: 0,
			select: (e, t, n) => this._memoryService.select(e, t, n)
		});
		let s = $.InsertMode.bindTo(r);
		s.set(e.getOption(119).insertMode), this._toDispose.add(this.model.onDidTrigger(() => s.set(e.getOption(119).insertMode))), this.widget = this._toDispose.add(new Ll(Cs(e.getDomNode()), () => {
			let e = this._instantiationService.createInstance(qF, this.editor);
			this._toDispose.add(e), this._toDispose.add(e.onDidSelect((e) => this._insertSuggestion(e, 0), this));
			let t = new cF(this.editor, e, this.model, (e) => this._insertSuggestion(e, 2));
			this._toDispose.add(t);
			let n = $.MakesTextEdit.bindTo(this._contextKeyService), r = $.HasInsertAndReplaceRange.bindTo(this._contextKeyService), i = $.CanResolve.bindTo(this._contextKeyService);
			return this._toDispose.add(Gt(() => {
				n.reset(), r.reset(), i.reset();
			})), this._toDispose.add(e.onDidFocus(({ item: e }) => {
				let t = this.editor.getPosition(), a = e.editStart.column, o = t.column, s = !0;
				this.editor.getOption(1) === "smart" && this.model.state === 2 && !e.completion.additionalTextEdits && !(e.completion.insertTextRules & 4) && o - a === e.completion.insertText.length && (s = this.editor.getModel().getValueInRange({
					startLineNumber: t.lineNumber,
					startColumn: a,
					endLineNumber: t.lineNumber,
					endColumn: o
				}) !== e.completion.insertText), n.set(s), r.set(!b.equals(e.editInsertEnd, e.editReplaceEnd)), i.set(!!e.provider.resolveCompletionItem || !!e.completion.documentation || e.completion.detail !== e.completion.label);
			})), this._toDispose.add(e.onDetailsKeyDown((e) => {
				e.toKeyCodeChord().equals(new Hn(!0, !1, !1, !1, 33)) || Xs && e.toKeyCodeChord().equals(new Hn(!1, !1, !1, !0, 33)) ? e.stopPropagation() : e.toKeyCodeChord().isModifierKey() || this.editor.focus();
			})), e;
		})), this._overtypingCapturer = this._toDispose.add(new Ll(Cs(e.getDomNode()), () => this._toDispose.add(new bF(this.editor, this.model)))), this._alternatives = this._toDispose.add(new Ll(Cs(e.getDomNode()), () => this._toDispose.add(new sF(this.editor, this._contextKeyService)))), this._toDispose.add(i.createInstance(rF, e)), this._toDispose.add(this.model.onDidTrigger((e) => {
			this.widget.value.showTriggered(e.auto, e.shy ? 250 : 50), this._lineSuffix.value = new QF(this.editor.getModel(), e.position);
		})), this._toDispose.add(this.model.onDidSuggest((e) => {
			if (e.triggerOptions.shy) return;
			let t = -1;
			for (let n of this._selectors.itemsOrderedByPriorityDesc) if (t = n.select(this.editor.getModel(), this.editor.getPosition(), e.completionModel.items), t !== -1) break;
			if (t === -1 && (t = 0), this.model.state === 0) return;
			let n = !1;
			if (e.triggerOptions.auto) {
				let t = this.editor.getOption(119);
				t.selectionMode === "never" || t.selectionMode === "always" ? n = t.selectionMode === "never" : t.selectionMode === "whenTriggerCharacter" ? n = e.triggerOptions.triggerKind !== 1 : t.selectionMode === "whenQuickSuggestion" && (n = e.triggerOptions.triggerKind === 1 && !e.triggerOptions.refilter);
			}
			this.widget.value.showSuggestions(e.completionModel, t, e.isFrozen, e.triggerOptions.auto, n);
		})), this._toDispose.add(this.model.onDidCancel((e) => {
			e.retrigger || this.widget.value.hideWidget();
		})), this._toDispose.add(this.editor.onDidBlurEditorWidget(() => {
			this.model.cancel(), this.model.clear();
		}));
		let c = $.AcceptSuggestionsOnEnter.bindTo(r), l = () => {
			let e = this.editor.getOption(1);
			c.set(e === "on" || e === "smart");
		};
		this._toDispose.add(this.editor.onDidChangeConfiguration(() => l())), l();
	}
	dispose() {
		this._alternatives.dispose(), this._toDispose.dispose(), this.widget.dispose(), this.model.dispose(), this._lineSuffix.dispose(), this._onWillInsertSuggestItem.dispose();
	}
	_insertSuggestion(e, t) {
		if (!e || !e.item) {
			this._alternatives.value.reset(), this.model.cancel(), this.model.clear();
			return;
		}
		if (!this.editor.hasModel()) return;
		let n = IP.get(this.editor);
		if (!n) return;
		this._onWillInsertSuggestItem.fire({ item: e.item });
		let r = this.editor.getModel(), a = r.getAlternativeVersionId(), { item: o } = e, s = [], c = new Cn();
		t & 1 || this.editor.pushUndoStop();
		let l = this.getOverwriteInfo(o, !!(t & 8));
		this._memoryService.memorize(r, this.editor.getPosition(), o);
		let u = o.isResolved, d = -1, f = -1;
		if (Array.isArray(o.completion.additionalTextEdits)) {
			this.model.cancel();
			let e = jt.capture(this.editor);
			this.editor.executeEdits("suggestController.additionalTextEdits.sync", o.completion.additionalTextEdits.map((e) => {
				let t = E.lift(e.range);
				if (t.startLineNumber === o.position.lineNumber && t.startColumn > o.position.column) {
					let e = this.editor.getPosition().column - o.position.column, n = e, r = E.spansMultipleLines(t) ? 0 : e;
					t = new E(t.startLineNumber, t.startColumn + n, t.endLineNumber, t.endColumn + r);
				}
				return fr.replaceMove(t, e.text);
			})), e.restoreRelativeVerticalPositionOfCursor(this.editor);
		} else if (!u) {
			let e = new lr(), n, i = r.onDidChangeContent((e) => {
				if (e.isFlush) c.cancel(), i.dispose();
				else for (let t of e.changes) {
					let e = E.getEndPosition(t.range);
					(!n || b.isBefore(e, n)) && (n = e);
				}
			}), a = t;
			t |= 2;
			let l = !1, u = this.editor.onWillType(() => {
				u.dispose(), l = !0, a & 2 || this.editor.pushUndoStop();
			});
			s.push(o.resolve(c.token).then(() => {
				if (!o.completion.additionalTextEdits || c.token.isCancellationRequested) return;
				if (n && o.completion.additionalTextEdits.some((e) => b.isBefore(n, E.getStartPosition(e.range)))) return !1;
				l && this.editor.pushUndoStop();
				let e = jt.capture(this.editor);
				return this.editor.executeEdits("suggestController.additionalTextEdits.async", o.completion.additionalTextEdits.map((e) => fr.replaceMove(E.lift(e.range), e.text))), e.restoreRelativeVerticalPositionOfCursor(this.editor), (l || !(a & 2)) && this.editor.pushUndoStop(), !0;
			}).then((t) => {
				this._logService.trace("[suggest] async resolving of edits DONE (ms, applied?)", e.elapsed(), t), f = t === !0 ? 1 : t === !1 ? 0 : -2;
			}).finally(() => {
				i.dispose(), u.dispose();
			}));
		}
		let { insertText: p } = o.completion;
		if (o.completion.insertTextRules & 4 || (p = PS.escape(p)), this.model.cancel(), n.insert(p, {
			overwriteBefore: l.overwriteBefore,
			overwriteAfter: l.overwriteAfter,
			undoStopBefore: !1,
			undoStopAfter: !1,
			adjustWhitespace: !(o.completion.insertTextRules & 1),
			clipboardText: e.model.clipboardText,
			overtypingCapturer: this._overtypingCapturer.value
		}), t & 2 || this.editor.pushUndoStop(), o.completion.command) {
			if (o.completion.command.id === tI.id) this.model.trigger({
				auto: !0,
				retrigger: !0
			});
			else {
				let e = new lr();
				s.push(this._commandService.executeCommand(o.completion.command.id, ...o.completion.command.arguments ? [...o.completion.command.arguments] : []).catch((e) => {
					o.completion.extensionId ? i(e) : er(e);
				}).finally(() => {
					d = e.elapsed();
				}));
			}
		}
		t & 4 && this._alternatives.value.set(e, (e) => {
			for (c.cancel(); r.canUndo();) {
				a !== r.getAlternativeVersionId() && r.undo(), this._insertSuggestion(e, 3 | (t & 8 ? 8 : 0));
				break;
			}
		}), this._alertCompletionItem(o), Promise.all(s).finally(() => {
			this._reportSuggestionAcceptedTelemetry(o, r, u, d, f, e.index, e.model.items), this.model.clear(), c.dispose();
		});
	}
	_reportSuggestionAcceptedTelemetry(e, t, n, r, i, a, o) {
		if (Math.floor(Math.random() * 100) === 0) return;
		let s = /* @__PURE__ */ new Map();
		for (let e = 0; e < Math.min(30, o.length); e++) {
			let t = o[e].textLabel;
			s.has(t) ? s.get(t).push(e) : s.set(t, [e]);
		}
		let c = s.get(e.textLabel), l = c && c.length > 1 ? c[0] : -1;
		this._telemetryService.publicLog2("suggest.acceptedSuggestion", {
			extensionId: e.extensionId?.value ?? "unknown",
			providerId: e.provider._debugDisplayName ?? "unknown",
			kind: e.completion.kind,
			basenameHash: Wi(Ps(t.uri)).toString(16),
			languageId: t.getLanguageId(),
			fileExtension: Rc(t.uri),
			resolveInfo: e.provider.resolveCompletionItem ? +!!n : -1,
			resolveDuration: e.resolveDuration,
			commandDuration: r,
			additionalEditsAsync: i,
			index: a,
			firstIndex: l
		});
	}
	getOverwriteInfo(e, t) {
		y(this.editor.hasModel());
		let n = this.editor.getOption(119).insertMode === "replace";
		t && (n = !n);
		let r = e.position.column - e.editStart.column, i = (n ? e.editReplaceEnd.column : e.editInsertEnd.column) - e.position.column, a = this.editor.getPosition().column - e.position.column, o = this._lineSuffix.value ? this._lineSuffix.value.delta(this.editor.getPosition()) : 0;
		return {
			overwriteBefore: r + a,
			overwriteAfter: i + o
		};
	}
	_alertCompletionItem(e) {
		if (zl(e.completion.additionalTextEdits)) {
			let t = B("aria.alert.snippet", "Accepting '{0}' made {1} additional edits", e.textLabel, e.completion.additionalTextEdits.length);
			gt(t);
		}
	}
	triggerSuggest(e, t, n) {
		this.editor.hasModel() && (this.model.trigger({
			auto: t ?? !1,
			completionOptions: {
				providerFilter: e,
				kindFilter: n ? /* @__PURE__ */ new Set() : void 0
			}
		}), this.editor.revealPosition(this.editor.getPosition(), 0), this.editor.focus());
	}
	triggerSuggestAndAcceptBest(e) {
		if (!this.editor.hasModel()) return;
		let t = this.editor.getPosition(), n = () => {
			t.equals(this.editor.getPosition()) && this._commandService.executeCommand(e.fallback);
		}, r = (e) => {
			if (e.completion.insertTextRules & 4 || e.completion.additionalTextEdits) return !0;
			let t = this.editor.getPosition(), n = e.editStart.column, r = t.column;
			return r - n !== e.completion.insertText.length || this.editor.getModel().getValueInRange({
				startLineNumber: t.lineNumber,
				startColumn: n,
				endLineNumber: t.lineNumber,
				endColumn: r
			}) !== e.completion.insertText;
		};
		wt.once(this.model.onDidTrigger)((e) => {
			let t = [];
			wt.any(this.model.onDidTrigger, this.model.onDidCancel)(() => {
				ci(t), n();
			}, void 0, t), this.model.onDidSuggest(({ completionModel: e }) => {
				if (ci(t), e.items.length === 0) {
					n();
					return;
				}
				let i = this._memoryService.select(this.editor.getModel(), this.editor.getPosition(), e.items), a = e.items[i];
				r(a) ? (this.editor.pushUndoStop(), this._insertSuggestion({
					index: i,
					item: a,
					model: e
				}, 7)) : n();
			}, void 0, t);
		}), this.model.trigger({
			auto: !1,
			shy: !0
		}), this.editor.revealPosition(t, 0), this.editor.focus();
	}
	acceptSelectedSuggestion(e, t) {
		let n = this.widget.value.getFocusedItem(), r = 0;
		e && (r |= 4), t && (r |= 8), this._insertSuggestion(n, r);
	}
	acceptNextSuggestion() {
		this._alternatives.value.next();
	}
	acceptPrevSuggestion() {
		this._alternatives.value.prev();
	}
	cancelSuggestWidget() {
		this.model.cancel(), this.model.clear(), this.widget.value.hideWidget();
	}
	focusSuggestion() {
		this.widget.value.focusSelected();
	}
	selectNextSuggestion() {
		this.widget.value.selectNext();
	}
	selectNextPageSuggestion() {
		this.widget.value.selectNextPage();
	}
	selectLastSuggestion() {
		this.widget.value.selectLast();
	}
	selectPrevSuggestion() {
		this.widget.value.selectPrevious();
	}
	selectPrevPageSuggestion() {
		this.widget.value.selectPreviousPage();
	}
	selectFirstSuggestion() {
		this.widget.value.selectFirst();
	}
	toggleSuggestionDetails() {
		this.widget.value.toggleDetails();
	}
	toggleExplainMode() {
		this.widget.value.toggleExplainMode();
	}
	toggleSuggestionFocus() {
		this.widget.value.toggleDetailsFocus();
	}
	resetWidgetSize() {
		this.widget.value.resetPersistedSize();
	}
	forceRenderingAbove() {
		this.widget.value.forceRenderingAbove();
	}
	stopForceRenderingAbove() {
		this.widget.isInitialized && this.widget.value.stopForceRenderingAbove();
	}
	registerSelector(e) {
		return this._selectors.register(e);
	}
};
$F = ZF = YF([
	XF(1, $P),
	XF(2, ga),
	XF(3, j),
	XF(4, P),
	XF(5, ks),
	XF(6, mc)
], $F);
var eI = class {
	constructor(e) {
		this.prioritySelector = e, this._items = [];
	}
	register(e) {
		if (this._items.indexOf(e) !== -1) throw Error("Value is already registered");
		return this._items.push(e), this._items.sort((e, t) => this.prioritySelector(t) - this.prioritySelector(e)), { dispose: () => {
			let t = this._items.indexOf(e);
			t >= 0 && this._items.splice(t, 1);
		} };
	}
	get itemsOrderedByPriorityDesc() {
		return this._items;
	}
}, tI = class e extends O {
	static {
		this.id = "editor.action.triggerSuggest";
	}
	constructor() {
		super({
			id: e.id,
			label: B("suggest.trigger.label", "Trigger Suggest"),
			alias: "Trigger Suggest",
			precondition: N.and(I.writable, I.hasCompletionItemProvider, $.Visible.toNegated()),
			kbOpts: {
				kbExpr: I.textInputFocus,
				primary: 2058,
				secondary: [2087],
				mac: {
					primary: 266,
					secondary: [521, 2087]
				},
				weight: 100
			}
		});
	}
	run(e, t, n) {
		let r = $F.get(t);
		if (!r) return;
		let i;
		n && typeof n == "object" && n.auto === !0 && (i = !0), r.triggerSuggest(void 0, i, void 0);
	}
};
T($F.ID, $F, 2), k(tI);
var nI = 190, rI = qt.bindToContribution($F.get);
A(new rI({
	id: "acceptSelectedSuggestion",
	precondition: N.and($.Visible, $.HasFocusedSuggestion),
	handler(e) {
		e.acceptSelectedSuggestion(!0, !1);
	},
	kbOpts: [{
		primary: 2,
		kbExpr: N.and($.Visible, I.textInputFocus),
		weight: nI
	}, {
		primary: 3,
		kbExpr: N.and($.Visible, I.textInputFocus, $.AcceptSuggestionsOnEnter, $.MakesTextEdit),
		weight: nI
	}],
	menuOpts: [
		{
			menuId: rP,
			title: B("accept.insert", "Insert"),
			group: "left",
			order: 1,
			when: $.HasInsertAndReplaceRange.toNegated()
		},
		{
			menuId: rP,
			title: B("accept.insert", "Insert"),
			group: "left",
			order: 1,
			when: N.and($.HasInsertAndReplaceRange, $.InsertMode.isEqualTo("insert"))
		},
		{
			menuId: rP,
			title: B("accept.replace", "Replace"),
			group: "left",
			order: 1,
			when: N.and($.HasInsertAndReplaceRange, $.InsertMode.isEqualTo("replace"))
		}
	]
})), A(new rI({
	id: "acceptAlternativeSelectedSuggestion",
	precondition: N.and($.Visible, I.textInputFocus, $.HasFocusedSuggestion),
	kbOpts: {
		weight: nI,
		kbExpr: I.textInputFocus,
		primary: 1027,
		secondary: [1026]
	},
	handler(e) {
		e.acceptSelectedSuggestion(!1, !0);
	},
	menuOpts: [{
		menuId: rP,
		group: "left",
		order: 2,
		when: N.and($.HasInsertAndReplaceRange, $.InsertMode.isEqualTo("insert")),
		title: B("accept.replace", "Replace")
	}, {
		menuId: rP,
		group: "left",
		order: 2,
		when: N.and($.HasInsertAndReplaceRange, $.InsertMode.isEqualTo("replace")),
		title: B("accept.insert", "Insert")
	}]
})), Ol.registerCommandAlias("acceptSelectedSuggestionOnEnter", "acceptSelectedSuggestion"), A(new rI({
	id: "hideSuggestWidget",
	precondition: $.Visible,
	handler: (e) => e.cancelSuggestWidget(),
	kbOpts: {
		weight: nI,
		kbExpr: I.textInputFocus,
		primary: 9,
		secondary: [1033]
	}
})), A(new rI({
	id: "selectNextSuggestion",
	precondition: N.and($.Visible, N.or($.MultipleSuggestions, $.HasFocusedSuggestion.negate())),
	handler: (e) => e.selectNextSuggestion(),
	kbOpts: {
		weight: nI,
		kbExpr: I.textInputFocus,
		primary: 18,
		secondary: [2066],
		mac: {
			primary: 18,
			secondary: [2066, 300]
		}
	}
})), A(new rI({
	id: "selectNextPageSuggestion",
	precondition: N.and($.Visible, N.or($.MultipleSuggestions, $.HasFocusedSuggestion.negate())),
	handler: (e) => e.selectNextPageSuggestion(),
	kbOpts: {
		weight: nI,
		kbExpr: I.textInputFocus,
		primary: 12,
		secondary: [2060]
	}
})), A(new rI({
	id: "selectLastSuggestion",
	precondition: N.and($.Visible, N.or($.MultipleSuggestions, $.HasFocusedSuggestion.negate())),
	handler: (e) => e.selectLastSuggestion()
})), A(new rI({
	id: "selectPrevSuggestion",
	precondition: N.and($.Visible, N.or($.MultipleSuggestions, $.HasFocusedSuggestion.negate())),
	handler: (e) => e.selectPrevSuggestion(),
	kbOpts: {
		weight: nI,
		kbExpr: I.textInputFocus,
		primary: 16,
		secondary: [2064],
		mac: {
			primary: 16,
			secondary: [2064, 302]
		}
	}
})), A(new rI({
	id: "selectPrevPageSuggestion",
	precondition: N.and($.Visible, N.or($.MultipleSuggestions, $.HasFocusedSuggestion.negate())),
	handler: (e) => e.selectPrevPageSuggestion(),
	kbOpts: {
		weight: nI,
		kbExpr: I.textInputFocus,
		primary: 11,
		secondary: [2059]
	}
})), A(new rI({
	id: "selectFirstSuggestion",
	precondition: N.and($.Visible, N.or($.MultipleSuggestions, $.HasFocusedSuggestion.negate())),
	handler: (e) => e.selectFirstSuggestion()
})), A(new rI({
	id: "focusSuggestion",
	precondition: N.and($.Visible, $.HasFocusedSuggestion.negate()),
	handler: (e) => e.focusSuggestion(),
	kbOpts: {
		weight: nI,
		kbExpr: I.textInputFocus,
		primary: 2058,
		secondary: [2087],
		mac: {
			primary: 266,
			secondary: [2087]
		}
	}
})), A(new rI({
	id: "focusAndAcceptSuggestion",
	precondition: N.and($.Visible, $.HasFocusedSuggestion.negate()),
	handler: (e) => {
		e.focusSuggestion(), e.acceptSelectedSuggestion(!0, !1);
	}
})), A(new rI({
	id: "toggleSuggestionDetails",
	precondition: N.and($.Visible, $.HasFocusedSuggestion),
	handler: (e) => e.toggleSuggestionDetails(),
	kbOpts: {
		weight: nI,
		kbExpr: I.textInputFocus,
		primary: 2058,
		secondary: [2087],
		mac: {
			primary: 266,
			secondary: [2087]
		}
	},
	menuOpts: [{
		menuId: rP,
		group: "right",
		order: 1,
		when: N.and($.DetailsVisible, $.CanResolve),
		title: B("detail.more", "Show Less")
	}, {
		menuId: rP,
		group: "right",
		order: 1,
		when: N.and($.DetailsVisible.toNegated(), $.CanResolve),
		title: B("detail.less", "Show More")
	}]
})), A(new rI({
	id: "toggleExplainMode",
	precondition: $.Visible,
	handler: (e) => e.toggleExplainMode(),
	kbOpts: {
		weight: 100,
		primary: 2138
	}
})), A(new rI({
	id: "toggleSuggestionFocus",
	precondition: $.Visible,
	handler: (e) => e.toggleSuggestionFocus(),
	kbOpts: {
		weight: nI,
		kbExpr: I.textInputFocus,
		primary: 2570,
		mac: { primary: 778 }
	}
})), A(new rI({
	id: "insertBestCompletion",
	precondition: N.and(I.textInputFocus, N.equals("config.editor.tabCompletion", "on"), rF.AtEnd, $.Visible.toNegated(), sF.OtherSuggestions.toNegated(), IP.InSnippetMode.toNegated()),
	handler: (e, t) => {
		e.triggerSuggestAndAcceptBest(Ne(t) ? {
			fallback: "tab",
			...t
		} : { fallback: "tab" });
	},
	kbOpts: {
		weight: nI,
		primary: 2
	}
})), A(new rI({
	id: "insertNextSuggestion",
	precondition: N.and(I.textInputFocus, N.equals("config.editor.tabCompletion", "on"), sF.OtherSuggestions, $.Visible.toNegated(), IP.InSnippetMode.toNegated()),
	handler: (e) => e.acceptNextSuggestion(),
	kbOpts: {
		weight: nI,
		kbExpr: I.textInputFocus,
		primary: 2
	}
})), A(new rI({
	id: "insertPrevSuggestion",
	precondition: N.and(I.textInputFocus, N.equals("config.editor.tabCompletion", "on"), sF.OtherSuggestions, $.Visible.toNegated(), IP.InSnippetMode.toNegated()),
	handler: (e) => e.acceptPrevSuggestion(),
	kbOpts: {
		weight: nI,
		kbExpr: I.textInputFocus,
		primary: 1026
	}
})), k(class extends O {
	constructor() {
		super({
			id: "editor.action.resetSuggestSize",
			label: B("suggest.reset.label", "Reset Suggest Widget Size"),
			alias: "Reset Suggest Widget Size",
			precondition: void 0
		});
	}
	run(e, t) {
		$F.get(t)?.resetWidgetSize();
	}
});
// ../../../node_modules/.pnpm/monaco-editor@0.52.2/node_modules/monaco-editor/esm/vs/editor/contrib/inlineCompletions/browser/model/suggestWidgetAdaptor.js
var iI = class extends U {
	get selectedItem() {
		return this._currentSuggestItemInfo;
	}
	constructor(e, t, n) {
		super(), this.editor = e, this.suggestControllerPreselector = t, this.onWillAccept = n, this.isSuggestWidgetVisible = !1, this.isShiftKeyPressed = !1, this._isActive = !1, this._currentSuggestItemInfo = void 0, this._onDidSelectedItemChange = this._register(new x()), this.onDidSelectedItemChange = this._onDidSelectedItemChange.event, this._register(e.onKeyDown((e) => {
			e.shiftKey && !this.isShiftKeyPressed && (this.isShiftKeyPressed = !0, this.update(this._isActive));
		})), this._register(e.onKeyUp((e) => {
			e.shiftKey && this.isShiftKeyPressed && (this.isShiftKeyPressed = !1, this.update(this._isActive));
		}));
		let r = $F.get(this.editor);
		if (r) {
			this._register(r.registerSelector({
				priority: 100,
				select: (e, t, n) => {
					let i = this.editor.getModel();
					if (!i) return -1;
					let a = this.suggestControllerPreselector(), o = a ? BN(a, i) : void 0;
					if (!o) return -1;
					let s = b.lift(t), c = n.map((e, t) => {
						let n = BN(aI.fromSuggestion(r, i, s, e, this.isShiftKeyPressed).toSingleTextEdit(), i);
						return {
							index: t,
							valid: VN(o, n),
							prefixLength: n.text.length,
							suggestItem: e
						};
					}).filter((e) => e && e.valid && e.prefixLength > 0), l = Xc(c, Yn((e) => e.prefixLength, pe));
					return l ? l.index : -1;
				}
			}));
			let e = !1, t = () => {
				e || (e = !0, this._register(r.widget.value.onDidShow(() => {
					this.isSuggestWidgetVisible = !0, this.update(!0);
				})), this._register(r.widget.value.onDidHide(() => {
					this.isSuggestWidgetVisible = !1, this.update(!1);
				})), this._register(r.widget.value.onDidFocus(() => {
					this.isSuggestWidgetVisible = !0, this.update(!0);
				})));
			};
			this._register(wt.once(r.model.onDidTrigger)((e) => {
				t();
			})), this._register(r.onWillInsertSuggestItem((e) => {
				let t = this.editor.getPosition(), n = this.editor.getModel();
				if (!t || !n) return;
				let i = aI.fromSuggestion(r, n, t, e.item, this.isShiftKeyPressed);
				this.onWillAccept(i);
			}));
		}
		this.update(this._isActive);
	}
	update(e) {
		let t = this.getSuggestItemInfo();
		this._isActive === e && oI(this._currentSuggestItemInfo, t) || (this._isActive = e, this._currentSuggestItemInfo = t, this._onDidSelectedItemChange.fire());
	}
	getSuggestItemInfo() {
		let e = $F.get(this.editor);
		if (!e || !this.isSuggestWidgetVisible) return;
		let t = e.widget.value.getFocusedItem(), n = this.editor.getPosition(), r = this.editor.getModel();
		if (t && n && r) return aI.fromSuggestion(e, r, n, t.item, this.isShiftKeyPressed);
	}
	stopForceRenderingAbove() {
		$F.get(this.editor)?.stopForceRenderingAbove();
	}
	forceRenderingAbove() {
		$F.get(this.editor)?.forceRenderingAbove();
	}
}, aI = class e {
	static fromSuggestion(t, n, r, i, a) {
		let { insertText: o } = i.completion, s = !1;
		if (i.completion.insertTextRules & 4) {
			let e = new PS().parse(o);
			e.children.length < 100 && jP.adjustWhitespace(n, r, !0, e), o = e.toString(), s = !0;
		}
		let c = t.getOverwriteInfo(i, a);
		return new e(E.fromPositions(r.delta(0, -c.overwriteBefore), r.delta(0, Math.max(c.overwriteAfter, 0))), o, i.completion.kind, s);
	}
	constructor(e, t, n, r) {
		this.range = e, this.insertText = t, this.completionItemKind = n, this.isSnippetText = r;
	}
	equals(e) {
		return this.range.equalsRange(e.range) && this.insertText === e.insertText && this.completionItemKind === e.completionItemKind && this.isSnippetText === e.isSnippetText;
	}
	toSelectedSuggestionInfo() {
		return new Ki(this.range, this.insertText, this.completionItemKind, this.isSnippetText);
	}
	toSingleTextEdit() {
		return new Ks(this.range, this.insertText);
	}
};
function oI(e, t) {
	return e === t ? !0 : !e || !t ? !1 : e.equals(t);
}
// ../../../node_modules/.pnpm/monaco-editor@0.52.2/node_modules/monaco-editor/esm/vs/editor/contrib/inlineCompletions/browser/controller/inlineCompletionsController.js
var sI = function(e, t, n, r) {
	var i = arguments.length, a = i < 3 ? t : r === null ? r = Object.getOwnPropertyDescriptor(t, n) : r, o;
	if (typeof Reflect == "object" && typeof Reflect.decorate == "function") a = Reflect.decorate(e, t, n, r);
	else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (i < 3 ? o(a) : i > 3 ? o(t, n, a) : o(t, n)) || a);
	return i > 3 && a && Object.defineProperty(t, n, a), a;
}, cI = function(e, t) {
	return function(n, r) {
		t(n, r, e);
	};
}, lI, uI = class extends U {
	static {
		lI = this;
	}
	static {
		this.ID = "editor.contrib.inlineCompletionsController";
	}
	static get(e) {
		return e.getContribution(lI.ID);
	}
	constructor(e, t, n, r, i, o, s, c, l, d) {
		super(), this.editor = e, this._instantiationService = t, this._contextKeyService = n, this._configurationService = r, this._commandService = i, this._debounceService = o, this._languageFeaturesService = s, this._accessibilitySignalService = c, this._keybindingService = l, this._accessibilityService = d, this._editorObs = u(this.editor), this._positions = ia(this, (e) => this._editorObs.selections.read(e)?.map((e) => e.getEndPosition()) ?? [new b(1, 1)]), this._suggestWidgetAdaptor = this._register(new iI(this.editor, () => (this._editorObs.forceUpdate(), this.model.get()?.selectedInlineCompletion.get()?.toSingleTextEdit(void 0)), (e) => this._editorObs.forceUpdate((t) => {
			this.model.get()?.handleSuggestAccepted(e);
		}))), this._suggestWidgetSelectedItem = tr(this, (e) => this._suggestWidgetAdaptor.onDidSelectedItemChange(() => {
			this._editorObs.forceUpdate((t) => e(void 0));
		}), () => this._suggestWidgetAdaptor.selectedItem), this._enabledInConfig = tr(this, this.editor.onDidChangeConfiguration, () => this.editor.getOption(62).enabled), this._isScreenReaderEnabled = tr(this, this._accessibilityService.onDidChangeScreenReaderOptimized, () => this._accessibilityService.isScreenReaderOptimized()), this._editorDictationInProgress = tr(this, this._contextKeyService.onDidChangeContext, () => this._contextKeyService.getContext(this.editor.getDomNode()).getValue("editorDictation.inProgress") === !0), this._enabled = ia(this, (e) => this._enabledInConfig.read(e) && (!this._isScreenReaderEnabled.read(e) || !this._editorDictationInProgress.read(e))), this._debounceValue = this._debounceService.for(this._languageFeaturesService.inlineCompletionsProvider, "InlineCompletionsDebounce", {
			min: 50,
			max: 50
		}), this.model = Rs(this, (e) => {
			if (this._editorObs.isReadonly.read(e)) return;
			let t = this._editorObs.model.read(e);
			if (t) return this._instantiationService.createInstance(BP, t, this._suggestWidgetSelectedItem, this._editorObs.versionId, this._positions, this._debounceValue, tr(this.editor.onDidChangeConfiguration, () => this.editor.getOption(119).preview), tr(this.editor.onDidChangeConfiguration, () => this.editor.getOption(119).previewMode), tr(this.editor.onDidChangeConfiguration, () => this.editor.getOption(62).mode), this._enabled);
		}).recomputeInitiallyAndOnChange(this._store), this._ghostTexts = ia(this, (e) => this.model.read(e)?.ghostTexts.read(e) ?? []), this._stablizedGhostTexts = dI(this._ghostTexts, this._store), this._ghostTextWidgets = Ri(this, this._stablizedGhostTexts, (e, t) => t.add(this._instantiationService.createInstance(ON, this.editor, {
			ghostText: e,
			minReservedLineCount: Oi(0),
			targetTextModel: this.model.map((e) => e?.textModel)
		}))).recomputeInitiallyAndOnChange(this._store), this._playAccessibilitySignal = a(this), this._fontFamily = tr(this, this.editor.onDidChangeConfiguration, () => this.editor.getOption(62).fontFamily), this._register(new fN(this._contextKeyService, this.model)), this._register(Po(this._editorObs.onDidType, (e, t) => {
			this._enabled.get() && this.model.get()?.trigger();
		})), this._register(this._commandService.onDidExecuteCommand((t) => {
			(/* @__PURE__ */ new Set([
				Ka.Tab.id,
				Ka.DeleteLeft.id,
				Ka.DeleteRight.id,
				"editor.action.inlineSuggest.commit",
				"acceptSelectedSuggestion"
			])).has(t.commandId) && e.hasTextFocus() && this._enabled.get() && this._editorObs.forceUpdate((e) => {
				this.model.get()?.trigger(e);
			});
		})), this._register(Po(this._editorObs.selections, (e, t) => {
			t.some((e) => e.reason === 3 || e.source === "api") && this.model.get()?.stop();
		})), this._register(this.editor.onDidBlurEditorWidget(() => {
			this._contextKeyService.getContextKeyValue("accessibleViewIsShown") || this._configurationService.getValue("editor.inlineSuggest.keepOnBlur") || e.getOption(62).keepOnBlur || hE.dropDownVisible || xo((e) => {
				this.model.get()?.stop(e);
			});
		})), this._register(Os((e) => {
			let t = this.model.read(e)?.state.read(e);
			t?.suggestItem ? t.primaryGhostText.lineCount >= 2 && this._suggestWidgetAdaptor.forceRenderingAbove() : this._suggestWidgetAdaptor.stopForceRenderingAbove();
		})), this._register(Gt(() => {
			this._suggestWidgetAdaptor.stopForceRenderingAbove();
		}));
		let f = yi(this, (e, t) => {
			let n = this.model.read(e)?.state.read(e);
			return this._suggestWidgetSelectedItem.get() ? t : n?.inlineCompletion?.semanticId;
		});
		this._register(ln(ia((e) => (this._playAccessibilitySignal.read(e), f.read(e), {})), async (e, t, n) => {
			let r = this.model.get(), i = r?.state.get();
			if (!i || !r) return;
			let a = r.textModel.getLineContent(i.primaryGhostText.lineNumber);
			await Io(50, Wn(n)), await It(this._suggestWidgetSelectedItem, es, () => !1, Wn(n)), await this._accessibilitySignalService.playSignal(Me.inlineSuggestion), this.editor.getOption(8) && this._provideScreenReaderUpdate(i.primaryGhostText.renderForScreenReader(a));
		})), this._register(new fE(this.editor, this.model, this._instantiationService)), this._register(pN(ia((e) => {
			let t = this._fontFamily.read(e);
			return t === "" || t === "default" ? "" : `
.monaco-editor .ghost-text-decoration,
.monaco-editor .ghost-text-decoration-preview,
.monaco-editor .ghost-text {
	font-family: ${t};
}`;
		}))), this._register(this._configurationService.onDidChangeConfiguration((e) => {
			e.affectsConfiguration("accessibility.verbosity.inlineCompletions") && this.editor.updateOptions({ inlineCompletionsAccessibilityVerbose: this._configurationService.getValue("accessibility.verbosity.inlineCompletions") });
		})), this.editor.updateOptions({ inlineCompletionsAccessibilityVerbose: this._configurationService.getValue("accessibility.verbosity.inlineCompletions") });
	}
	playAccessibilitySignal(e) {
		this._playAccessibilitySignal.trigger(e);
	}
	_provideScreenReaderUpdate(e) {
		let t = this._contextKeyService.getContextKeyValue("accessibleViewIsShown"), n = this._keybindingService.lookupKeybinding("editor.action.accessibleView"), r;
		!t && n && this.editor.getOption(150) && (r = B("showAccessibleViewHint", "Inspect this in the accessible view ({0})", n.getAriaLabel())), gt(r ? e + ", " + r : e);
	}
	shouldShowHoverAt(e) {
		let t = this.model.get()?.primaryGhostText.get();
		return t ? t.parts.some((n) => e.containsPosition(new b(t.lineNumber, n.column))) : !1;
	}
	shouldShowHoverAtViewZone(e) {
		return this._ghostTextWidgets.get()[0]?.ownsViewZone(e) ?? !1;
	}
};
uI = lI = sI([
	cI(1, P),
	cI(2, j),
	cI(3, Fl),
	cI(4, ga),
	cI(5, hi),
	cI(6, M),
	cI(7, Rn),
	cI(8, ft),
	cI(9, st)
], uI);
function dI(e, t) {
	let n = qs("result", []), r = [];
	return t.add(Os((t) => {
		let i = e.read(t);
		xo((e) => {
			if (i.length !== r.length) {
				r.length = i.length;
				for (let e = 0; e < r.length; e++) r[e] || (r[e] = qs("item", i[e]));
				n.set([...r], e);
			}
			r.forEach((t, n) => t.set(i[n], e));
		});
	})), n;
}
// ../../../node_modules/.pnpm/monaco-editor@0.52.2/node_modules/monaco-editor/esm/vs/editor/contrib/inlineCompletions/browser/controller/commands.js
var fI = class e extends O {
	static {
		this.ID = cE;
	}
	constructor() {
		super({
			id: e.ID,
			label: B("action.inlineSuggest.showNext", "Show Next Inline Suggestion"),
			alias: "Show Next Inline Suggestion",
			precondition: N.and(I.writable, fN.inlineSuggestionVisible),
			kbOpts: {
				weight: 100,
				primary: 606
			}
		});
	}
	async run(e, t) {
		uI.get(t)?.model.get()?.next();
	}
}, pI = class e extends O {
	static {
		this.ID = sE;
	}
	constructor() {
		super({
			id: e.ID,
			label: B("action.inlineSuggest.showPrevious", "Show Previous Inline Suggestion"),
			alias: "Show Previous Inline Suggestion",
			precondition: N.and(I.writable, fN.inlineSuggestionVisible),
			kbOpts: {
				weight: 100,
				primary: 604
			}
		});
	}
	async run(e, t) {
		uI.get(t)?.model.get()?.previous();
	}
}, mI = class extends O {
	constructor() {
		super({
			id: "editor.action.inlineSuggest.trigger",
			label: B("action.inlineSuggest.trigger", "Trigger Inline Suggestion"),
			alias: "Trigger Inline Suggestion",
			precondition: I.writable
		});
	}
	async run(e, t) {
		let n = uI.get(t);
		await Pa(async (e) => {
			await n?.model.get()?.triggerExplicitly(e), n?.playAccessibilitySignal(e);
		});
	}
}, hI = class extends O {
	constructor() {
		super({
			id: "editor.action.inlineSuggest.acceptNextWord",
			label: B("action.inlineSuggest.acceptNextWord", "Accept Next Word Of Inline Suggestion"),
			alias: "Accept Next Word Of Inline Suggestion",
			precondition: N.and(I.writable, fN.inlineSuggestionVisible),
			kbOpts: {
				weight: 101,
				primary: 2065,
				kbExpr: N.and(I.writable, fN.inlineSuggestionVisible)
			},
			menuOpts: [{
				menuId: F.InlineSuggestionToolbar,
				title: B("acceptWord", "Accept Word"),
				group: "primary",
				order: 2
			}]
		});
	}
	async run(e, t) {
		let n = uI.get(t);
		await n?.model.get()?.acceptNextWord(n.editor);
	}
}, gI = class extends O {
	constructor() {
		super({
			id: "editor.action.inlineSuggest.acceptNextLine",
			label: B("action.inlineSuggest.acceptNextLine", "Accept Next Line Of Inline Suggestion"),
			alias: "Accept Next Line Of Inline Suggestion",
			precondition: N.and(I.writable, fN.inlineSuggestionVisible),
			kbOpts: { weight: 101 },
			menuOpts: [{
				menuId: F.InlineSuggestionToolbar,
				title: B("acceptLine", "Accept Line"),
				group: "secondary",
				order: 2
			}]
		});
	}
	async run(e, t) {
		let n = uI.get(t);
		await n?.model.get()?.acceptNextLine(n.editor);
	}
}, _I = class extends O {
	constructor() {
		super({
			id: oE,
			label: B("action.inlineSuggest.accept", "Accept Inline Suggestion"),
			alias: "Accept Inline Suggestion",
			precondition: fN.inlineSuggestionVisible,
			menuOpts: [{
				menuId: F.InlineSuggestionToolbar,
				title: B("accept", "Accept"),
				group: "primary",
				order: 1
			}],
			kbOpts: {
				primary: 2,
				weight: 200,
				kbExpr: N.and(fN.inlineSuggestionVisible, I.tabMovesFocus.toNegated(), fN.inlineSuggestionHasIndentationLessThanTabSize, $.Visible.toNegated(), I.hoverFocused.toNegated())
			}
		});
	}
	async run(e, t) {
		let n = uI.get(t);
		n && (n.model.get()?.accept(n.editor), n.editor.focus());
	}
}, vI = class e extends O {
	static {
		this.ID = "editor.action.inlineSuggest.hide";
	}
	constructor() {
		super({
			id: e.ID,
			label: B("action.inlineSuggest.hide", "Hide Inline Suggestion"),
			alias: "Hide Inline Suggestion",
			precondition: fN.inlineSuggestionVisible,
			kbOpts: {
				weight: 100,
				primary: 9
			}
		});
	}
	async run(e, t) {
		let n = uI.get(t);
		xo((e) => {
			n?.model.get()?.stop(e);
		});
	}
}, yI = class e extends Mo {
	static {
		this.ID = "editor.action.inlineSuggest.toggleAlwaysShowToolbar";
	}
	constructor() {
		super({
			id: e.ID,
			title: B("action.inlineSuggest.alwaysShowToolbar", "Always Show Toolbar"),
			f1: !1,
			precondition: void 0,
			menu: [{
				id: F.InlineSuggestionToolbar,
				group: "secondary",
				order: 10
			}],
			toggled: N.equals("config.editor.inlineSuggest.showToolbar", "always")
		});
	}
	async run(e, t) {
		let n = e.get(Fl), r = n.getValue("editor.inlineSuggest.showToolbar") === "always" ? "onHover" : "always";
		n.updateValue("editor.inlineSuggest.showToolbar", r);
	}
}, bI = function(e, t, n, r) {
	var i = arguments.length, a = i < 3 ? t : r === null ? r = Object.getOwnPropertyDescriptor(t, n) : r, o;
	if (typeof Reflect == "object" && typeof Reflect.decorate == "function") a = Reflect.decorate(e, t, n, r);
	else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (i < 3 ? o(a) : i > 3 ? o(t, n, a) : o(t, n)) || a);
	return i > 3 && a && Object.defineProperty(t, n, a), a;
}, xI = function(e, t) {
	return function(n, r) {
		t(n, r, e);
	};
}, SI = class {
	constructor(e, t, n) {
		this.owner = e, this.range = t, this.controller = n;
	}
	isValidForHoverAnchor(e) {
		return e.type === 1 && this.range.startColumn <= e.range.startColumn && this.range.endColumn >= e.range.endColumn;
	}
}, CI = class {
	constructor(e, t, n, r, i, a) {
		this._editor = e, this._languageService = t, this._openerService = n, this.accessibilityService = r, this._instantiationService = i, this._telemetryService = a, this.hoverOrdinal = 4;
	}
	suggestHoverAnchor(e) {
		let t = uI.get(this._editor);
		if (!t) return null;
		let n = e.target;
		if (n.type === 8) {
			let r = n.detail;
			if (t.shouldShowHoverAtViewZone(r.viewZoneId)) return new NT(1e3, this, E.fromPositions(this._editor.getModel().validatePosition(r.positionBefore || r.position)), e.event.posx, e.event.posy, !1);
		}
		return n.type === 7 && t.shouldShowHoverAt(n.range) || n.type === 6 && n.detail.mightBeForeignElement && t.shouldShowHoverAt(n.range) ? new NT(1e3, this, n.range, e.event.posx, e.event.posy, !1) : null;
	}
	computeSync(e, t) {
		if (this._editor.getOption(62).showToolbar !== "onHover") return [];
		let n = uI.get(this._editor);
		return n && n.shouldShowHoverAt(e.range) ? [new SI(this, e.range, n)] : [];
	}
	renderHoverParts(e, t) {
		let n = new g(), r = t[0];
		this._telemetryService.publicLog2("inlineCompletionHover.shown"), this.accessibilityService.isScreenReaderOptimized() && !this._editor.getOption(8) && n.add(this.renderScreenReaderText(e, r));
		let i = r.controller.model.get(), a = this._instantiationService.createInstance(hE, this._editor, !1, Oi(null), i.selectedInlineCompletionIndex, i.inlineCompletionsCount, i.activeCommands), o = a.getDomNode();
		return e.fragment.appendChild(o), i.triggerExplicitly(), n.add(a), new PT([{
			hoverPart: r,
			hoverElement: o,
			dispose() {
				n.dispose();
			}
		}]);
	}
	renderScreenReaderText(e, t) {
		let n = new g(), r = w, i = r("div.hover-row.markdown-hover"), a = D(i, r("div.hover-contents", { "aria-live": "assertive" })), o = n.add(new Jt({ editor: this._editor }, this._languageService, this._openerService)), s = (t) => {
			n.add(o.onDidRenderAsync(() => {
				a.className = "hover-contents code-hover-contents", e.onContentsChanged();
			}));
			let r = B("inlineSuggestionFollows", "Suggestion:"), i = n.add(o.render(new ws().appendText(r).appendCodeblock("text", t)));
			a.replaceChildren(i.element);
		};
		return n.add(Os((e) => {
			let n = t.controller.model.read(e)?.primaryGhostText.read(e);
			if (n) {
				let e = this._editor.getModel().getLineContent(n.lineNumber);
				s(n.renderForScreenReader(e));
			} else ns(a);
		})), e.fragment.appendChild(i), n;
	}
};
CI = bI([
	xI(1, dr),
	xI(2, p),
	xI(3, st),
	xI(4, P),
	xI(5, mc)
], CI);
// ../../../node_modules/.pnpm/monaco-editor@0.52.2/node_modules/monaco-editor/esm/vs/editor/contrib/inlineCompletions/browser/inlineCompletionsAccessibleView.js
var wI = class {}, TI = new class {
	constructor() {
		this._implementations = [];
	}
	register(e) {
		return this._implementations.push(e), { dispose: () => {
			let t = this._implementations.indexOf(e);
			t !== -1 && this._implementations.splice(t, 1);
		} };
	}
	getImplementations() {
		return this._implementations;
	}
}();
T(uI.ID, uI, 3), k(mI), k(fI), k(pI), k(hI), k(gI), k(_I), k(vI), Fa(yI), FT.register(CI), TI.register(new wI());
// ../../../node_modules/.pnpm/monaco-editor@0.52.2/node_modules/monaco-editor/esm/vs/editor/contrib/gotoSymbol/browser/link/goToDefinitionAtPosition.js
var EI = function(e, t, n, r) {
	var i = arguments.length, a = i < 3 ? t : r === null ? r = Object.getOwnPropertyDescriptor(t, n) : r, o;
	if (typeof Reflect == "object" && typeof Reflect.decorate == "function") a = Reflect.decorate(e, t, n, r);
	else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (i < 3 ? o(a) : i > 3 ? o(t, n, a) : o(t, n)) || a);
	return i > 3 && a && Object.defineProperty(t, n, a), a;
}, DI = function(e, t) {
	return function(n, r) {
		t(n, r, e);
	};
}, OI, kI = class {
	static {
		OI = this;
	}
	static {
		this.ID = "editor.contrib.gotodefinitionatposition";
	}
	static {
		this.MAX_SOURCE_PREVIEW_LINES = 8;
	}
	constructor(e, t, n, r) {
		this.textModelResolverService = t, this.languageService = n, this.languageFeaturesService = r, this.toUnhook = new g(), this.toUnhookForKeyboard = new g(), this.currentWordAtPosition = null, this.previousPromise = null, this.editor = e, this.linkDecorations = this.editor.createDecorationsCollection();
		let i = new lD(e);
		this.toUnhook.add(i), this.toUnhook.add(i.onMouseMoveOrRelevantKeyDown(([e, t]) => {
			this.startFindDefinitionFromMouse(e, t ?? void 0);
		})), this.toUnhook.add(i.onExecute((e) => {
			this.isEnabled(e) && this.gotoDefinition(e.target.position, e.hasSideBySideModifier).catch((e) => {
				er(e);
			}).finally(() => {
				this.removeLinkDecorations();
			});
		})), this.toUnhook.add(i.onCancel(() => {
			this.removeLinkDecorations(), this.currentWordAtPosition = null;
		}));
	}
	static get(e) {
		return e.getContribution(OI.ID);
	}
	async startFindDefinitionFromCursor(e) {
		await this.startFindDefinition(e), this.toUnhookForKeyboard.add(this.editor.onDidChangeCursorPosition(() => {
			this.currentWordAtPosition = null, this.removeLinkDecorations(), this.toUnhookForKeyboard.clear();
		})), this.toUnhookForKeyboard.add(this.editor.onKeyDown((e) => {
			e && (this.currentWordAtPosition = null, this.removeLinkDecorations(), this.toUnhookForKeyboard.clear());
		}));
	}
	startFindDefinitionFromMouse(e, t) {
		if (e.target.type === 9 && this.linkDecorations.length > 0) return;
		if (!this.editor.hasModel() || !this.isEnabled(e, t)) {
			this.currentWordAtPosition = null, this.removeLinkDecorations();
			return;
		}
		let n = e.target.position;
		this.startFindDefinition(n);
	}
	async startFindDefinition(e) {
		this.toUnhookForKeyboard.clear();
		let t = e ? this.editor.getModel()?.getWordAtPosition(e) : null;
		if (!t) {
			this.currentWordAtPosition = null, this.removeLinkDecorations();
			return;
		}
		if (this.currentWordAtPosition && this.currentWordAtPosition.startColumn === t.startColumn && this.currentWordAtPosition.endColumn === t.endColumn && this.currentWordAtPosition.word === t.word) return;
		this.currentWordAtPosition = t;
		let n = new me(this.editor, 15);
		this.previousPromise &&= (this.previousPromise.cancel(), null), this.previousPromise = Te((t) => this.findDefinition(e, t));
		let r;
		try {
			r = await this.previousPromise;
		} catch (e) {
			er(e);
			return;
		}
		if (!r || !r.length || !n.validate(this.editor)) {
			this.removeLinkDecorations();
			return;
		}
		let i = r[0].originSelectionRange ? E.lift(r[0].originSelectionRange) : new E(e.lineNumber, t.startColumn, e.lineNumber, t.endColumn);
		if (r.length > 1) {
			let e = i;
			for (let { originSelectionRange: t } of r) t && (e = E.plusRange(e, t));
			this.addDecoration(e, new ws().appendText(B("multipleResults", "Click to show {0} definitions.", r.length)));
		} else {
			let e = r[0];
			if (!e.uri) return;
			this.textModelResolverService.createModelReference(e.uri).then((t) => {
				if (!t.object || !t.object.textEditorModel) {
					t.dispose();
					return;
				}
				let { object: { textEditorModel: n } } = t, { startLineNumber: r } = e.range;
				if (r < 1 || r > n.getLineCount()) {
					t.dispose();
					return;
				}
				let a = this.getPreviewValue(n, r, e), o = this.languageService.guessLanguageIdByFilepathOrFirstLine(n.uri);
				this.addDecoration(i, a ? new ws().appendCodeblock(o || "", a) : void 0), t.dispose();
			});
		}
	}
	getPreviewValue(e, t, n) {
		let r = n.range;
		return r.endLineNumber - r.startLineNumber >= OI.MAX_SOURCE_PREVIEW_LINES && (r = this.getPreviewRangeBasedOnIndentation(e, t)), this.stripIndentationFromPreviewRange(e, t, r);
	}
	stripIndentationFromPreviewRange(e, t, n) {
		let r = e.getLineFirstNonWhitespaceColumn(t);
		for (let i = t + 1; i < n.endLineNumber; i++) {
			let t = e.getLineFirstNonWhitespaceColumn(i);
			r = Math.min(r, t);
		}
		return e.getValueInRange(n).replace(RegExp(`^\\s{${r - 1}}`, "gm"), "").trim();
	}
	getPreviewRangeBasedOnIndentation(e, t) {
		let n = e.getLineFirstNonWhitespaceColumn(t), r = Math.min(e.getLineCount(), t + OI.MAX_SOURCE_PREVIEW_LINES), i = t + 1;
		for (; i < r && n !== e.getLineFirstNonWhitespaceColumn(i); i++);
		return new E(t, 1, i + 1, 1);
	}
	addDecoration(e, t) {
		let n = {
			range: e,
			options: {
				description: "goto-definition-link",
				inlineClassName: "goto-definition-link",
				hoverMessage: t
			}
		};
		this.linkDecorations.set([n]);
	}
	removeLinkDecorations() {
		this.linkDecorations.clear();
	}
	isEnabled(e, t) {
		return this.editor.hasModel() && e.isLeftClick && e.isNoneOrSingleMouseDown && e.target.type === 6 && !(e.target.detail.injectedText?.options instanceof as) && (e.hasTriggerModifier || (t ? t.keyCodeIsTriggerKey : !1)) && this.languageFeaturesService.definitionProvider.has(this.editor.getModel());
	}
	findDefinition(e, t) {
		let n = this.editor.getModel();
		return n ? bO(this.languageFeaturesService.definitionProvider, n, e, !1, t) : Promise.resolve(null);
	}
	gotoDefinition(e, t) {
		return this.editor.setPosition(e), this.editor.invokeWithinContext((e) => new OO({
			openToSide: t,
			openInPeek: !t && this.editor.getOption(89) && !this.isInPeekEditor(e),
			muteMessage: !0
		}, {
			title: {
				value: "",
				original: ""
			},
			id: "",
			precondition: void 0
		}).run(e));
	}
	isInPeekEditor(e) {
		let t = e.get(j);
		return DD.inPeekEditor.getValue(t);
	}
	dispose() {
		this.toUnhook.dispose(), this.toUnhookForKeyboard.dispose();
	}
};
kI = OI = EI([
	DI(1, Ve),
	DI(2, dr),
	DI(3, M)
], kI), T(kI.ID, kI, 2);
// ../../../node_modules/.pnpm/monaco-editor@0.52.2/node_modules/monaco-editor/esm/vs/editor/contrib/gotoError/browser/markerNavigationService.js
var AI = function(e, t, n, r) {
	var i = arguments.length, a = i < 3 ? t : r === null ? r = Object.getOwnPropertyDescriptor(t, n) : r, o;
	if (typeof Reflect == "object" && typeof Reflect.decorate == "function") a = Reflect.decorate(e, t, n, r);
	else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (i < 3 ? o(a) : i > 3 ? o(t, n, a) : o(t, n)) || a);
	return i > 3 && a && Object.defineProperty(t, n, a), a;
}, jI = function(e, t) {
	return function(n, r) {
		t(n, r, e);
	};
}, MI = class {
	constructor(e, t, n) {
		this.marker = e, this.index = t, this.total = n;
	}
}, NI = class {
	constructor(e, t, n) {
		this._markerService = t, this._configService = n, this._onDidChange = new x(), this.onDidChange = this._onDidChange.event, this._dispoables = new g(), this._markers = [], this._nextIdx = -1, De.isUri(e) ? this._resourceFilter = (t) => t.toString() === e.toString() : e && (this._resourceFilter = e);
		let r = this._configService.getValue("problems.sortOrder"), i = (e, t) => {
			let n = Ml(e.resource.toString(), t.resource.toString());
			return n === 0 && (n = r === "position" ? E.compareRangesUsingStarts(e, t) || Re.compare(e.severity, t.severity) : Re.compare(e.severity, t.severity) || E.compareRangesUsingStarts(e, t)), n;
		}, a = () => {
			this._markers = this._markerService.read({
				resource: De.isUri(e) ? e : void 0,
				severities: Re.Error | Re.Warning | Re.Info
			}), typeof e == "function" && (this._markers = this._markers.filter((e) => this._resourceFilter(e.resource))), this._markers.sort(i);
		};
		a(), this._dispoables.add(t.onMarkerChanged((e) => {
			(!this._resourceFilter || e.some((e) => this._resourceFilter(e))) && (a(), this._nextIdx = -1, this._onDidChange.fire());
		}));
	}
	dispose() {
		this._dispoables.dispose(), this._onDidChange.dispose();
	}
	matches(e) {
		return !this._resourceFilter && !e ? !0 : !this._resourceFilter || !e ? !1 : this._resourceFilter(e);
	}
	get selected() {
		let e = this._markers[this._nextIdx];
		return e && new MI(e, this._nextIdx + 1, this._markers.length);
	}
	_initIdx(e, t, n) {
		let r = !1, i = this._markers.findIndex((t) => t.resource.toString() === e.uri.toString());
		i < 0 && (i = vn(this._markers, { resource: e.uri }, (e, t) => Ml(e.resource.toString(), t.resource.toString())), i < 0 && (i = ~i));
		for (let n = i; n < this._markers.length; n++) {
			let i = E.lift(this._markers[n]);
			if (i.isEmpty()) {
				let t = e.getWordAtPosition(i.getStartPosition());
				t && (i = new E(i.startLineNumber, t.startColumn, i.startLineNumber, t.endColumn));
			}
			if (t && (i.containsPosition(t) || t.isBeforeOrEqual(i.getStartPosition()))) {
				this._nextIdx = n, r = !0;
				break;
			}
			if (this._markers[n].resource.toString() !== e.uri.toString()) break;
		}
		r || (this._nextIdx = n ? 0 : this._markers.length - 1), this._nextIdx < 0 && (this._nextIdx = this._markers.length - 1);
	}
	resetIndex() {
		this._nextIdx = -1;
	}
	move(e, t, n) {
		if (this._markers.length === 0) return !1;
		let r = this._nextIdx;
		return this._nextIdx === -1 ? this._initIdx(t, n, e) : e ? this._nextIdx = (this._nextIdx + 1) % this._markers.length : e || (this._nextIdx = (this._nextIdx - 1 + this._markers.length) % this._markers.length), r !== this._nextIdx;
	}
	find(e, t) {
		let n = this._markers.findIndex((t) => t.resource.toString() === e.toString());
		if (!(n < 0)) {
			for (; n < this._markers.length; n++) if (E.containsPosition(this._markers[n], t)) return new MI(this._markers[n], n + 1, this._markers.length);
		}
	}
};
NI = AI([jI(1, jr), jI(2, Fl)], NI);
var PI = ne("IMarkerNavigationService"), FI = class {
	constructor(e, t) {
		this._markerService = e, this._configService = t, this._provider = new Ec();
	}
	getMarkerList(e) {
		for (let t of this._provider) {
			let n = t.getMarkerList(e);
			if (n) return n;
		}
		return new NI(e, this._markerService, this._configService);
	}
};
FI = AI([jI(0, jr), jI(1, Fl)], FI), rn(PI, FI, 1);
// ../../../node_modules/.pnpm/monaco-editor@0.52.2/node_modules/monaco-editor/esm/vs/platform/severityIcon/browser/severityIcon.js
var II;
(function(e) {
	function t(e) {
		switch (e) {
			case Ds.Ignore: return "severity-ignore " + _l.asClassName(v.info);
			case Ds.Info: return _l.asClassName(v.info);
			case Ds.Warning: return _l.asClassName(v.warning);
			case Ds.Error: return _l.asClassName(v.error);
			default: return "";
		}
	}
	e.className = t;
})(II ||= {});
// ../../../node_modules/.pnpm/monaco-editor@0.52.2/node_modules/monaco-editor/esm/vs/editor/contrib/gotoError/browser/gotoErrorWidget.js
var LI = function(e, t, n, r) {
	var i = arguments.length, a = i < 3 ? t : r === null ? r = Object.getOwnPropertyDescriptor(t, n) : r, o;
	if (typeof Reflect == "object" && typeof Reflect.decorate == "function") a = Reflect.decorate(e, t, n, r);
	else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (i < 3 ? o(a) : i > 3 ? o(t, n, a) : o(t, n)) || a);
	return i > 3 && a && Object.defineProperty(t, n, a), a;
}, RI = function(e, t) {
	return function(n, r) {
		t(n, r, e);
	};
}, zI, BI = class {
	constructor(e, t, n, r, i) {
		this._openerService = r, this._labelService = i, this._lines = 0, this._longestLineLength = 0, this._relatedDiagnostics = /* @__PURE__ */ new WeakMap(), this._disposables = new g(), this._editor = t;
		let a = document.createElement("div");
		a.className = "descriptioncontainer", this._messageBlock = document.createElement("div"), this._messageBlock.classList.add("message"), this._messageBlock.setAttribute("aria-live", "assertive"), this._messageBlock.setAttribute("role", "alert"), a.appendChild(this._messageBlock), this._relatedBlock = document.createElement("div"), a.appendChild(this._relatedBlock), this._disposables.add(_t(this._relatedBlock, "click", (e) => {
			e.preventDefault();
			let t = this._relatedDiagnostics.get(e.target);
			t && n(t);
		})), this._scrollable = new en(a, {
			horizontal: 1,
			vertical: 1,
			useShadows: !1,
			horizontalScrollbarSize: 6,
			verticalScrollbarSize: 6
		}), e.appendChild(this._scrollable.getDomNode()), this._disposables.add(this._scrollable.onScroll((e) => {
			a.style.left = `-${e.scrollLeft}px`, a.style.top = `-${e.scrollTop}px`;
		})), this._disposables.add(this._scrollable);
	}
	dispose() {
		ci(this._disposables);
	}
	update(e) {
		let { source: t, message: n, relatedInformation: r, code: i } = e, a = (t?.length || 0) + 2;
		i && (a += typeof i == "string" ? i.length : i.value.length);
		let o = Va(n);
		this._lines = o.length, this._longestLineLength = 0;
		for (let e of o) this._longestLineLength = Math.max(e.length + a, this._longestLineLength);
		di(this._messageBlock), this._messageBlock.setAttribute("aria-label", this.getAriaLabel(e)), this._editor.applyFontInfo(this._messageBlock);
		let s = this._messageBlock;
		for (let e of o) s = document.createElement("div"), s.innerText = e, e === "" && (s.style.height = this._messageBlock.style.lineHeight), this._messageBlock.appendChild(s);
		if (t || i) {
			let e = document.createElement("span");
			if (e.classList.add("details"), s.appendChild(e), t) {
				let n = document.createElement("span");
				n.innerText = t, n.classList.add("source"), e.appendChild(n);
			}
			if (i) {
				if (typeof i == "string") {
					let t = document.createElement("span");
					t.innerText = `(${i})`, t.classList.add("code"), e.appendChild(t);
				} else {
					this._codeLink = w("a.code-link"), this._codeLink.setAttribute("href", `${i.target.toString()}`), this._codeLink.onclick = (e) => {
						this._openerService.open(i.target, { allowCommands: !0 }), e.preventDefault(), e.stopPropagation();
					};
					let t = D(this._codeLink, w("span"));
					t.innerText = i.value, e.appendChild(this._codeLink);
				}
			}
		}
		if (di(this._relatedBlock), this._editor.applyFontInfo(this._relatedBlock), zl(r)) {
			let e = this._relatedBlock.appendChild(document.createElement("div"));
			e.style.paddingTop = `${Math.floor(this._editor.getOption(67) * .66)}px`, this._lines += 1;
			for (let t of r) {
				let n = document.createElement("div"), r = document.createElement("a");
				r.classList.add("filename"), r.innerText = `${this._labelService.getUriBasenameLabel(t.resource)}(${t.startLineNumber}, ${t.startColumn}): `, r.title = this._labelService.getUriLabel(t.resource), this._relatedDiagnostics.set(r, t);
				let i = document.createElement("span");
				i.innerText = t.message, n.appendChild(r), n.appendChild(i), this._lines += 1, e.appendChild(n);
			}
		}
		let c = this._editor.getOption(50), l = Math.ceil(c.typicalFullwidthCharacterWidth * this._longestLineLength * .75), u = c.lineHeight * this._lines;
		this._scrollable.setScrollDimensions({
			scrollWidth: l,
			scrollHeight: u
		});
	}
	layout(e, t) {
		this._scrollable.getDomNode().style.height = `${e}px`, this._scrollable.getDomNode().style.width = `${t}px`, this._scrollable.setScrollDimensions({
			width: t,
			height: e
		});
	}
	getHeightInLines() {
		return Math.min(17, this._lines);
	}
	getAriaLabel(e) {
		let t = "";
		switch (e.severity) {
			case Re.Error:
				t = B("Error", "Error");
				break;
			case Re.Warning:
				t = B("Warning", "Warning");
				break;
			case Re.Info:
				t = B("Info", "Info");
				break;
			case Re.Hint: t = B("Hint", "Hint");
		}
		let n = B("marker aria", "{0} at {1}. ", t, e.startLineNumber + ":" + e.startColumn), r = this._editor.getModel();
		return r && e.startLineNumber <= r.getLineCount() && e.startLineNumber >= 1 && (n = `${r.getLineContent(e.startLineNumber)}, ${n}`), n;
	}
}, VI = class extends jD {
	static {
		zI = this;
	}
	static {
		this.TitleMenu = new F("gotoErrorTitleMenu");
	}
	constructor(e, t, n, r, i, a, o) {
		super(e, {
			showArrow: !0,
			showFrame: !0,
			isAccessible: !0,
			frameWidth: 1
		}, i), this._themeService = t, this._openerService = n, this._menuService = r, this._contextKeyService = a, this._labelService = o, this._callOnDispose = new g(), this._onDidSelectRelatedInformation = new x(), this.onDidSelectRelatedInformation = this._onDidSelectRelatedInformation.event, this._severity = Re.Warning, this._backgroundColor = R.white, this._applyTheme(t.getColorTheme()), this._callOnDispose.add(t.onDidColorThemeChange(this._applyTheme.bind(this))), this.create();
	}
	_applyTheme(e) {
		this._backgroundColor = e.getColor(ZI);
		let t = GI, n = KI;
		this._severity === Re.Warning ? (t = qI, n = JI) : this._severity === Re.Info && (t = YI, n = XI);
		let r = e.getColor(t), i = e.getColor(n);
		this.style({
			arrowColor: r,
			frameColor: r,
			headerBackgroundColor: i,
			primaryHeadingColor: e.getColor(ND),
			secondaryHeadingColor: e.getColor(PD)
		});
	}
	_applyStyles() {
		this._parentContainer && (this._parentContainer.style.backgroundColor = this._backgroundColor ? this._backgroundColor.toString() : ""), super._applyStyles();
	}
	dispose() {
		this._callOnDispose.dispose(), super.dispose();
	}
	_fillHead(e) {
		super._fillHead(e), this._disposables.add(this._actionbarWidget.actionRunner.onWillRun((e) => this.editor.focus()));
		let t = [], n = this._menuService.getMenuActions(zI.TitleMenu, this._contextKeyService);
		pn(n, t), this._actionbarWidget.push(t, {
			label: !1,
			icon: !0,
			index: 0
		});
	}
	_fillTitleIcon(e) {
		this._icon = D(e, w(""));
	}
	_fillBody(e) {
		this._parentContainer = e, e.classList.add("marker-widget"), this._parentContainer.tabIndex = 0, this._parentContainer.setAttribute("role", "tooltip"), this._container = document.createElement("div"), e.appendChild(this._container), this._message = new BI(this._container, this.editor, (e) => this._onDidSelectRelatedInformation.fire(e), this._openerService, this._labelService), this._disposables.add(this._message);
	}
	show() {
		throw Error("call showAtMarker");
	}
	showAtMarker(e, t, n) {
		this._container.classList.remove("stale"), this._message.update(e), this._severity = e.severity, this._applyTheme(this._themeService.getColorTheme());
		let r = E.lift(e), i = this.editor.getPosition(), a = i && r.containsPosition(i) ? i : r.getStartPosition();
		super.show(a, this.computeRequiredHeight());
		let o = this.editor.getModel();
		if (o) {
			let e = n > 1 ? B("problems", "{0} of {1} problems", t, n) : B("change", "{0} of {1} problem", t, n);
			this.setTitle(Ps(o.uri), e);
		}
		this._icon.className = `codicon ${II.className(Re.toSeverity(this._severity))}`, this.editor.revealPositionNearTop(a, 0), this.editor.focus();
	}
	updateMarker(e) {
		this._container.classList.remove("stale"), this._message.update(e);
	}
	showStale() {
		this._container.classList.add("stale"), this._relayout();
	}
	_doLayoutBody(e, t) {
		super._doLayoutBody(e, t), this._heightInPixel = e, this._message.layout(e, t), this._container.style.height = `${e}px`;
	}
	_onWidth(e) {
		this._message.layout(this._heightInPixel, e);
	}
	_relayout() {
		super._relayout(this.computeRequiredHeight());
	}
	computeRequiredHeight() {
		return 3 + this._message.getHeightInLines();
	}
};
VI = zI = LI([
	RI(1, fc),
	RI(2, p),
	RI(3, aa),
	RI(4, P),
	RI(5, j),
	RI(6, an)
], VI);
var HI = Jr(ts, ya), UI = Jr(Ko, An), WI = Jr(xl, Gc), GI = S("editorMarkerNavigationError.background", {
	dark: HI,
	light: HI,
	hcDark: Qt,
	hcLight: Qt
}, B("editorMarkerNavigationError", "Editor marker navigation widget error color.")), KI = S("editorMarkerNavigationError.headerBackground", {
	dark: Rr(GI, .1),
	light: Rr(GI, .1),
	hcDark: null,
	hcLight: null
}, B("editorMarkerNavigationErrorHeaderBackground", "Editor marker navigation widget error heading background.")), qI = S("editorMarkerNavigationWarning.background", {
	dark: UI,
	light: UI,
	hcDark: Qt,
	hcLight: Qt
}, B("editorMarkerNavigationWarning", "Editor marker navigation widget warning color.")), JI = S("editorMarkerNavigationWarning.headerBackground", {
	dark: Rr(qI, .1),
	light: Rr(qI, .1),
	hcDark: "#0C141F",
	hcLight: Rr(qI, .2)
}, B("editorMarkerNavigationWarningBackground", "Editor marker navigation widget warning heading background.")), YI = S("editorMarkerNavigationInfo.background", {
	dark: WI,
	light: WI,
	hcDark: Qt,
	hcLight: Qt
}, B("editorMarkerNavigationInfo", "Editor marker navigation widget info color.")), XI = S("editorMarkerNavigationInfo.headerBackground", {
	dark: Rr(YI, .1),
	light: Rr(YI, .1),
	hcDark: null,
	hcLight: null
}, B("editorMarkerNavigationInfoHeaderBackground", "Editor marker navigation widget info heading background.")), ZI = S("editorMarkerNavigation.background", _c, B("editorMarkerNavigationBackground", "Editor marker navigation widget background.")), QI = function(e, t, n, r) {
	var i = arguments.length, a = i < 3 ? t : r === null ? r = Object.getOwnPropertyDescriptor(t, n) : r, o;
	if (typeof Reflect == "object" && typeof Reflect.decorate == "function") a = Reflect.decorate(e, t, n, r);
	else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (i < 3 ? o(a) : i > 3 ? o(t, n, a) : o(t, n)) || a);
	return i > 3 && a && Object.defineProperty(t, n, a), a;
}, $I = function(e, t) {
	return function(n, r) {
		t(n, r, e);
	};
}, eL, tL = class {
	static {
		eL = this;
	}
	static {
		this.ID = "editor.contrib.markerController";
	}
	static get(e) {
		return e.getContribution(eL.ID);
	}
	constructor(e, t, n, r, i) {
		this._markerNavigationService = t, this._contextKeyService = n, this._editorService = r, this._instantiationService = i, this._sessionDispoables = new g(), this._editor = e, this._widgetVisible = sL.bindTo(this._contextKeyService);
	}
	dispose() {
		this._cleanUp(), this._sessionDispoables.dispose();
	}
	_cleanUp() {
		this._widgetVisible.reset(), this._sessionDispoables.clear(), this._widget = void 0, this._model = void 0;
	}
	_getOrCreateModel(e) {
		if (this._model && this._model.matches(e)) return this._model;
		let t = !1;
		return this._model && (t = !0, this._cleanUp()), this._model = this._markerNavigationService.getMarkerList(e), t && this._model.move(!0, this._editor.getModel(), this._editor.getPosition()), this._widget = this._instantiationService.createInstance(VI, this._editor), this._widget.onDidClose(() => this.close(), this, this._sessionDispoables), this._widgetVisible.set(!0), this._sessionDispoables.add(this._model), this._sessionDispoables.add(this._widget), this._sessionDispoables.add(this._editor.onDidChangeCursorPosition((e) => {
			this._model?.selected && E.containsPosition(this._model?.selected.marker, e.position) || this._model?.resetIndex();
		})), this._sessionDispoables.add(this._model.onDidChange(() => {
			if (!this._widget || !this._widget.position || !this._model) return;
			let e = this._model.find(this._editor.getModel().uri, this._widget.position);
			e ? this._widget.updateMarker(e.marker) : this._widget.showStale();
		})), this._sessionDispoables.add(this._widget.onDidSelectRelatedInformation((e) => {
			this._editorService.openCodeEditor({
				resource: e.resource,
				options: {
					pinned: !0,
					revealIfOpened: !0,
					selection: E.lift(e).collapseToStart()
				}
			}, this._editor), this.close(!1);
		})), this._sessionDispoables.add(this._editor.onDidChangeModel(() => this._cleanUp())), this._model;
	}
	close(e = !0) {
		this._cleanUp(), e && this._editor.focus();
	}
	showAtMarker(e) {
		if (this._editor.hasModel()) {
			let t = this._getOrCreateModel(this._editor.getModel().uri);
			t.resetIndex(), t.move(!0, this._editor.getModel(), new b(e.startLineNumber, e.startColumn)), t.selected && this._widget.showAtMarker(t.selected.marker, t.selected.index, t.selected.total);
		}
	}
	async nagivate(e, t) {
		if (this._editor.hasModel()) {
			let n = this._getOrCreateModel(t ? void 0 : this._editor.getModel().uri);
			if (n.move(e, this._editor.getModel(), this._editor.getPosition()), !n.selected) return;
			if (n.selected.marker.resource.toString() !== this._editor.getModel().uri.toString()) {
				this._cleanUp();
				let r = await this._editorService.openCodeEditor({
					resource: n.selected.marker.resource,
					options: {
						pinned: !1,
						revealIfOpened: !0,
						selectionRevealType: 2,
						selection: n.selected.marker
					}
				}, this._editor);
				r && (eL.get(r)?.close(), eL.get(r)?.nagivate(e, t));
			} else this._widget.showAtMarker(n.selected.marker, n.selected.index, n.selected.total);
		}
	}
};
tL = eL = QI([
	$I(1, PI),
	$I(2, j),
	$I(3, Ln),
	$I(4, P)
], tL);
var nL = class extends O {
	constructor(e, t, n) {
		super(n), this._next = e, this._multiFile = t;
	}
	async run(e, t) {
		t.hasModel() && tL.get(t)?.nagivate(this._next, this._multiFile);
	}
}, rL = class e extends nL {
	static {
		this.ID = "editor.action.marker.next";
	}
	static {
		this.LABEL = B("markerAction.next.label", "Go to Next Problem (Error, Warning, Info)");
	}
	constructor() {
		super(!0, !1, {
			id: e.ID,
			label: e.LABEL,
			alias: "Go to Next Problem (Error, Warning, Info)",
			precondition: void 0,
			kbOpts: {
				kbExpr: I.focus,
				primary: 578,
				weight: 100
			},
			menuOpts: {
				menuId: VI.TitleMenu,
				title: e.LABEL,
				icon: Jn("marker-navigation-next", v.arrowDown, B("nextMarkerIcon", "Icon for goto next marker.")),
				group: "navigation",
				order: 1
			}
		});
	}
}, iL = class e extends nL {
	static {
		this.ID = "editor.action.marker.prev";
	}
	static {
		this.LABEL = B("markerAction.previous.label", "Go to Previous Problem (Error, Warning, Info)");
	}
	constructor() {
		super(!1, !1, {
			id: e.ID,
			label: e.LABEL,
			alias: "Go to Previous Problem (Error, Warning, Info)",
			precondition: void 0,
			kbOpts: {
				kbExpr: I.focus,
				primary: 1602,
				weight: 100
			},
			menuOpts: {
				menuId: VI.TitleMenu,
				title: e.LABEL,
				icon: Jn("marker-navigation-previous", v.arrowUp, B("previousMarkerIcon", "Icon for goto previous marker.")),
				group: "navigation",
				order: 2
			}
		});
	}
}, aL = class extends nL {
	constructor() {
		super(!0, !0, {
			id: "editor.action.marker.nextInFiles",
			label: B("markerAction.nextInFiles.label", "Go to Next Problem in Files (Error, Warning, Info)"),
			alias: "Go to Next Problem in Files (Error, Warning, Info)",
			precondition: void 0,
			kbOpts: {
				kbExpr: I.focus,
				primary: 66,
				weight: 100
			},
			menuOpts: {
				menuId: F.MenubarGoMenu,
				title: B({
					key: "miGotoNextProblem",
					comment: ["&& denotes a mnemonic"]
				}, "Next &&Problem"),
				group: "6_problem_nav",
				order: 1
			}
		});
	}
}, oL = class extends nL {
	constructor() {
		super(!1, !0, {
			id: "editor.action.marker.prevInFiles",
			label: B("markerAction.previousInFiles.label", "Go to Previous Problem in Files (Error, Warning, Info)"),
			alias: "Go to Previous Problem in Files (Error, Warning, Info)",
			precondition: void 0,
			kbOpts: {
				kbExpr: I.focus,
				primary: 1090,
				weight: 100
			},
			menuOpts: {
				menuId: F.MenubarGoMenu,
				title: B({
					key: "miGotoPreviousProblem",
					comment: ["&& denotes a mnemonic"]
				}, "Previous &&Problem"),
				group: "6_problem_nav",
				order: 2
			}
		});
	}
};
T(tL.ID, tL, 4), k(rL), k(iL), k(aL), k(oL);
var sL = new z("markersNavigationVisible", !1), cL = qt.bindToContribution(tL.get);
A(new cL({
	id: "closeMarkersNavigation",
	precondition: sL,
	handler: (e) => e.close(),
	kbOpts: {
		weight: 150,
		kbExpr: I.focus,
		primary: 9,
		secondary: [1033]
	}
}));
// ../../../node_modules/.pnpm/monaco-editor@0.52.2/node_modules/monaco-editor/esm/vs/editor/contrib/hover/browser/hoverActions.js
var lL;
(function(e) {
	e.NoAutoFocus = "noAutoFocus", e.FocusIfVisible = "focusIfVisible", e.AutoFocusImmediately = "autoFocusImmediately";
})(lL ||= {});
var uL = class extends O {
	constructor() {
		super({
			id: KT,
			label: B({
				key: "showOrFocusHover",
				comment: [
					"Label for action that will trigger the showing/focusing of a hover in the editor.",
					"If the hover is not visible, it will show the hover.",
					"This allows for users to show the hover without using the mouse."
				]
			}, "Show or Focus Hover"),
			metadata: {
				description: H("showOrFocusHoverDescription", "Show or focus the editor hover which shows documentation, references, and other content for a symbol at the current cursor position."),
				args: [{
					name: "args",
					schema: {
						type: "object",
						properties: { focus: {
							description: "Controls if and when the hover should take focus upon being triggered by this action.",
							enum: [
								lL.NoAutoFocus,
								lL.FocusIfVisible,
								lL.AutoFocusImmediately
							],
							enumDescriptions: [
								B("showOrFocusHover.focus.noAutoFocus", "The hover will not automatically take focus."),
								B("showOrFocusHover.focus.focusIfVisible", "The hover will take focus only if it is already visible."),
								B("showOrFocusHover.focus.autoFocusImmediately", "The hover will automatically take focus when it appears.")
							],
							default: lL.FocusIfVisible
						} }
					}
				}]
			},
			alias: "Show or Focus Hover",
			precondition: void 0,
			kbOpts: {
				kbExpr: I.editorTextFocus,
				primary: Ro(2089, 2087),
				weight: 100
			}
		});
	}
	run(e, t, n) {
		if (!t.hasModel()) return;
		let r = ik.get(t);
		if (!r) return;
		let i = n?.focus, a = lL.FocusIfVisible;
		Object.values(lL).includes(i) ? a = i : typeof i == "boolean" && i && (a = lL.AutoFocusImmediately);
		let o = (e) => {
			let n = t.getPosition(), i = new E(n.lineNumber, n.column, n.lineNumber, n.column);
			r.showContentHover(i, 1, 1, e);
		}, s = t.getOption(2) === 2;
		r.isHoverVisible ? a === lL.NoAutoFocus ? o(s) : r.focus() : o(s || a === lL.AutoFocusImmediately);
	}
}, dL = class extends O {
	constructor() {
		super({
			id: qT,
			label: B({
				key: "showDefinitionPreviewHover",
				comment: ["Label for action that will trigger the showing of definition preview hover in the editor.", "This allows for users to show the definition preview hover without using the mouse."]
			}, "Show Definition Preview Hover"),
			alias: "Show Definition Preview Hover",
			precondition: void 0,
			metadata: { description: H("showDefinitionPreviewHoverDescription", "Show the definition preview hover in the editor.") }
		});
	}
	run(e, t) {
		let n = ik.get(t);
		if (!n) return;
		let r = t.getPosition();
		if (!r) return;
		let i = new E(r.lineNumber, r.column, r.lineNumber, r.column), a = kI.get(t);
		a && a.startFindDefinitionFromCursor(r).then(() => {
			n.showContentHover(i, 1, 1, !0);
		});
	}
}, fL = class extends O {
	constructor() {
		super({
			id: JT,
			label: B({
				key: "scrollUpHover",
				comment: ["Action that allows to scroll up in the hover widget with the up arrow when the hover widget is focused."]
			}, "Scroll Up Hover"),
			alias: "Scroll Up Hover",
			precondition: I.hoverFocused,
			kbOpts: {
				kbExpr: I.hoverFocused,
				primary: 16,
				weight: 100
			},
			metadata: { description: H("scrollUpHoverDescription", "Scroll up the editor hover.") }
		});
	}
	run(e, t) {
		let n = ik.get(t);
		n && n.scrollUp();
	}
}, pL = class extends O {
	constructor() {
		super({
			id: YT,
			label: B({
				key: "scrollDownHover",
				comment: ["Action that allows to scroll down in the hover widget with the up arrow when the hover widget is focused."]
			}, "Scroll Down Hover"),
			alias: "Scroll Down Hover",
			precondition: I.hoverFocused,
			kbOpts: {
				kbExpr: I.hoverFocused,
				primary: 18,
				weight: 100
			},
			metadata: { description: H("scrollDownHoverDescription", "Scroll down the editor hover.") }
		});
	}
	run(e, t) {
		let n = ik.get(t);
		n && n.scrollDown();
	}
}, mL = class extends O {
	constructor() {
		super({
			id: XT,
			label: B({
				key: "scrollLeftHover",
				comment: ["Action that allows to scroll left in the hover widget with the left arrow when the hover widget is focused."]
			}, "Scroll Left Hover"),
			alias: "Scroll Left Hover",
			precondition: I.hoverFocused,
			kbOpts: {
				kbExpr: I.hoverFocused,
				primary: 15,
				weight: 100
			},
			metadata: { description: H("scrollLeftHoverDescription", "Scroll left the editor hover.") }
		});
	}
	run(e, t) {
		let n = ik.get(t);
		n && n.scrollLeft();
	}
}, hL = class extends O {
	constructor() {
		super({
			id: ZT,
			label: B({
				key: "scrollRightHover",
				comment: ["Action that allows to scroll right in the hover widget with the right arrow when the hover widget is focused."]
			}, "Scroll Right Hover"),
			alias: "Scroll Right Hover",
			precondition: I.hoverFocused,
			kbOpts: {
				kbExpr: I.hoverFocused,
				primary: 17,
				weight: 100
			},
			metadata: { description: H("scrollRightHoverDescription", "Scroll right the editor hover.") }
		});
	}
	run(e, t) {
		let n = ik.get(t);
		n && n.scrollRight();
	}
}, gL = class extends O {
	constructor() {
		super({
			id: QT,
			label: B({
				key: "pageUpHover",
				comment: ["Action that allows to page up in the hover widget with the page up command when the hover widget is focused."]
			}, "Page Up Hover"),
			alias: "Page Up Hover",
			precondition: I.hoverFocused,
			kbOpts: {
				kbExpr: I.hoverFocused,
				primary: 11,
				secondary: [528],
				weight: 100
			},
			metadata: { description: H("pageUpHoverDescription", "Page up the editor hover.") }
		});
	}
	run(e, t) {
		let n = ik.get(t);
		n && n.pageUp();
	}
}, _L = class extends O {
	constructor() {
		super({
			id: $T,
			label: B({
				key: "pageDownHover",
				comment: ["Action that allows to page down in the hover widget with the page down command when the hover widget is focused."]
			}, "Page Down Hover"),
			alias: "Page Down Hover",
			precondition: I.hoverFocused,
			kbOpts: {
				kbExpr: I.hoverFocused,
				primary: 12,
				secondary: [530],
				weight: 100
			},
			metadata: { description: H("pageDownHoverDescription", "Page down the editor hover.") }
		});
	}
	run(e, t) {
		let n = ik.get(t);
		n && n.pageDown();
	}
}, vL = class extends O {
	constructor() {
		super({
			id: eE,
			label: B({
				key: "goToTopHover",
				comment: ["Action that allows to go to the top of the hover widget with the home command when the hover widget is focused."]
			}, "Go To Top Hover"),
			alias: "Go To Bottom Hover",
			precondition: I.hoverFocused,
			kbOpts: {
				kbExpr: I.hoverFocused,
				primary: 14,
				secondary: [2064],
				weight: 100
			},
			metadata: { description: H("goToTopHoverDescription", "Go to the top of the editor hover.") }
		});
	}
	run(e, t) {
		let n = ik.get(t);
		n && n.goToTop();
	}
}, yL = class extends O {
	constructor() {
		super({
			id: tE,
			label: B({
				key: "goToBottomHover",
				comment: ["Action that allows to go to the bottom in the hover widget with the end command when the hover widget is focused."]
			}, "Go To Bottom Hover"),
			alias: "Go To Bottom Hover",
			precondition: I.hoverFocused,
			kbOpts: {
				kbExpr: I.hoverFocused,
				primary: 13,
				secondary: [2066],
				weight: 100
			},
			metadata: { description: H("goToBottomHoverDescription", "Go to the bottom of the editor hover.") }
		});
	}
	run(e, t) {
		let n = ik.get(t);
		n && n.goToBottom();
	}
}, bL = class extends O {
	constructor() {
		super({
			id: nE,
			label: rE,
			alias: "Increase Hover Verbosity Level",
			precondition: I.hoverVisible
		});
	}
	run(e, t, n) {
		let r = ik.get(t);
		if (!r) return;
		let i = n?.index === void 0 ? r.focusedHoverPartIndex() : n.index;
		r.updateHoverVerbosityLevel(ja.Increase, i, n?.focus);
	}
}, xL = class extends O {
	constructor() {
		super({
			id: iE,
			label: aE,
			alias: "Decrease Hover Verbosity Level",
			precondition: I.hoverVisible
		});
	}
	run(e, t, n) {
		let r = ik.get(t);
		if (!r) return;
		let i = n?.index === void 0 ? r.focusedHoverPartIndex() : n.index;
		ik.get(t)?.updateHoverVerbosityLevel(ja.Decrease, i, n?.focus);
	}
}, SL = function(e, t, n, r) {
	var i = arguments.length, a = i < 3 ? t : r === null ? r = Object.getOwnPropertyDescriptor(t, n) : r, o;
	if (typeof Reflect == "object" && typeof Reflect.decorate == "function") a = Reflect.decorate(e, t, n, r);
	else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (i < 3 ? o(a) : i > 3 ? o(t, n, a) : o(t, n)) || a);
	return i > 3 && a && Object.defineProperty(t, n, a), a;
}, CL = function(e, t) {
	return function(n, r) {
		t(n, r, e);
	};
}, wL = w, TL = class {
	constructor(e, t, n) {
		this.owner = e, this.range = t, this.marker = n;
	}
	isValidForHoverAnchor(e) {
		return e.type === 1 && this.range.startColumn <= e.range.startColumn && this.range.endColumn >= e.range.endColumn;
	}
}, EL = {
	type: 1,
	filter: { include: bC.QuickFix },
	triggerAction: xC.QuickFixHover
}, DL = class {
	constructor(e, t, n, r) {
		this._editor = e, this._markerDecorationsService = t, this._openerService = n, this._languageFeaturesService = r, this.hoverOrdinal = 1, this.recentMarkerCodeActionsInfo = void 0;
	}
	computeSync(e, t) {
		if (!this._editor.hasModel() || e.type !== 1 && !e.supportsMarkerHover) return [];
		let n = this._editor.getModel(), r = e.range.startLineNumber, i = n.getLineMaxColumn(r), a = [];
		for (let o of t) {
			let t = o.range.startLineNumber === r ? o.range.startColumn : 1, s = o.range.endLineNumber === r ? o.range.endColumn : i, c = this._markerDecorationsService.getMarker(n.uri, o);
			if (!c) continue;
			let l = new E(e.range.startLineNumber, t, e.range.startLineNumber, s);
			a.push(new TL(this, l, c));
		}
		return a;
	}
	renderHoverParts(e, t) {
		if (!t.length) return new PT([]);
		let n = new g(), r = [];
		t.forEach((t) => {
			let n = this._renderMarkerHover(t);
			e.fragment.appendChild(n.hoverElement), r.push(n);
		});
		let i = t.length === 1 ? t[0] : t.sort((e, t) => Re.compare(e.marker.severity, t.marker.severity))[0];
		return this.renderMarkerStatusbar(e, i, n), new PT(r);
	}
	_renderMarkerHover(e) {
		let t = new g(), n = wL("div.hover-row"), r = D(n, wL("div.marker.hover-contents")), { source: i, message: a, code: o, relatedInformation: s } = e.marker;
		this._editor.applyFontInfo(r);
		let c = D(r, wL("span"));
		if (c.style.whiteSpace = "pre-wrap", c.innerText = a, i || o) {
			if (o && typeof o != "string") {
				let e = wL("span");
				if (i) {
					let t = D(e, wL("span"));
					t.innerText = i;
				}
				let n = D(e, wL("a.code-link"));
				n.setAttribute("href", o.target.toString()), t.add(_(n, "click", (e) => {
					this._openerService.open(o.target, { allowCommands: !0 }), e.preventDefault(), e.stopPropagation();
				}));
				let a = D(n, wL("span"));
				a.innerText = o.value;
				let s = D(r, e);
				s.style.opacity = "0.6", s.style.paddingLeft = "6px";
			} else {
				let e = D(r, wL("span"));
				e.style.opacity = "0.6", e.style.paddingLeft = "6px", e.innerText = i && o ? `${i}(${o})` : i || `(${o})`;
			}
		}
		if (zl(s)) for (let { message: e, resource: n, startLineNumber: i, startColumn: a } of s) {
			let o = D(r, wL("div"));
			o.style.marginTop = "8px";
			let s = D(o, wL("a"));
			s.innerText = `${Ps(n)}(${i}, ${a}): `, s.style.cursor = "pointer", t.add(_(s, "click", (e) => {
				if (e.stopPropagation(), e.preventDefault(), this._openerService) {
					let e = { selection: {
						startLineNumber: i,
						startColumn: a
					} };
					this._openerService.open(n, {
						fromUserGesture: !0,
						editorOptions: e
					}).catch(er);
				}
			}));
			let c = D(o, wL("span"));
			c.innerText = e, this._editor.applyFontInfo(c);
		}
		return {
			hoverPart: e,
			hoverElement: n,
			dispose: () => t.dispose()
		};
	}
	renderMarkerStatusbar(e, t, n) {
		if (t.marker.severity === Re.Error || t.marker.severity === Re.Warning || t.marker.severity === Re.Info) {
			let n = tL.get(this._editor);
			n && e.statusBar.addAction({
				label: B("view problem", "View Problem"),
				commandId: rL.ID,
				run: () => {
					e.hide(), n.showAtMarker(t.marker), this._editor.focus();
				}
			});
		}
		if (!this._editor.getOption(92)) {
			let r = e.statusBar.append(wL("div"));
			this.recentMarkerCodeActionsInfo && (rl.makeKey(this.recentMarkerCodeActionsInfo.marker) === rl.makeKey(t.marker) ? this.recentMarkerCodeActionsInfo.hasCodeActions || (r.textContent = B("noQuickFixes", "No quick fixes available")) : this.recentMarkerCodeActionsInfo = void 0);
			let i = this.recentMarkerCodeActionsInfo && !this.recentMarkerCodeActionsInfo.hasCodeActions ? U.None : jn(() => r.textContent = B("checkingForQuickFixes", "Checking for quick fixes..."), 200, n);
			r.textContent ||= "\xA0";
			let a = this.getCodeActions(t.marker);
			n.add(Gt(() => a.cancel())), a.then((a) => {
				if (i.dispose(), this.recentMarkerCodeActionsInfo = {
					marker: t.marker,
					hasCodeActions: a.validActions.length > 0
				}, !this.recentMarkerCodeActionsInfo.hasCodeActions) {
					a.dispose(), r.textContent = B("noQuickFixes", "No quick fixes available");
					return;
				}
				r.style.display = "none";
				let o = !1;
				n.add(Gt(() => {
					o || a.dispose();
				})), e.statusBar.addAction({
					label: B("quick fixes", "Quick Fix..."),
					commandId: OC,
					run: (t) => {
						o = !0;
						let n = Mw.get(this._editor), r = Bi(t);
						e.hide(), n?.showCodeActions(EL, a, {
							x: r.left,
							y: r.top,
							width: r.width,
							height: r.height
						});
					}
				});
			}, er);
		}
	}
	getCodeActions(e) {
		return Te((t) => IC(this._languageFeaturesService.codeActionProvider, this._editor.getModel(), new E(e.startLineNumber, e.startColumn, e.endLineNumber, e.endColumn), EL, Dt.None, t));
	}
};
DL = SL([
	CL(1, ml),
	CL(2, p),
	CL(3, M)
], DL);
// ../../../node_modules/.pnpm/monaco-editor@0.52.2/node_modules/monaco-editor/esm/vs/editor/contrib/hover/browser/marginHoverComputer.js
var OL = class {
	get lineNumber() {
		return this._lineNumber;
	}
	set lineNumber(e) {
		this._lineNumber = e;
	}
	get lane() {
		return this._laneOrLine;
	}
	set lane(e) {
		this._laneOrLine = e;
	}
	constructor(e) {
		this._editor = e, this._lineNumber = -1, this._laneOrLine = ye.Center;
	}
	computeSync() {
		let e = (e) => ({ value: e }), t = this._editor.getLineDecorations(this._lineNumber), n = [], r = this._laneOrLine === "lineNo";
		if (!t) return n;
		for (let i of t) {
			let t = i.options.glyphMargin?.position ?? ye.Center;
			if (!r && t !== this._laneOrLine) continue;
			let a = r ? i.options.lineNumberHoverMessage : i.options.glyphMarginHoverMessage;
			a && !lc(a) && n.push(...Wo(a).map(e));
		}
		return n;
	}
}, kL = function(e, t, n, r) {
	var i = arguments.length, a = i < 3 ? t : r === null ? r = Object.getOwnPropertyDescriptor(t, n) : r, o;
	if (typeof Reflect == "object" && typeof Reflect.decorate == "function") a = Reflect.decorate(e, t, n, r);
	else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (i < 3 ? o(a) : i > 3 ? o(t, n, a) : o(t, n)) || a);
	return i > 3 && a && Object.defineProperty(t, n, a), a;
}, AL = function(e, t) {
	return function(n, r) {
		t(n, r, e);
	};
}, jL, ML = w, NL = class extends U {
	static {
		jL = this;
	}
	static {
		this.ID = "editor.contrib.modesGlyphHoverWidget";
	}
	constructor(e, t, n) {
		super(), this._renderDisposeables = this._register(new g()), this._editor = e, this._isVisible = !1, this._messages = [], this._hover = this._register(new Sn()), this._hover.containerDomNode.classList.toggle("hidden", !this._isVisible), this._markdownRenderer = this._register(new Jt({ editor: this._editor }, t, n)), this._computer = new OL(this._editor), this._hoverOperation = this._register(new xE(this._editor, this._computer)), this._register(this._hoverOperation.onResult((e) => {
			this._withResult(e.value);
		})), this._register(this._editor.onDidChangeModelDecorations(() => this._onModelDecorationsChanged())), this._register(this._editor.onDidChangeConfiguration((e) => {
			e.hasChanged(50) && this._updateFont();
		})), this._register(_t(this._hover.containerDomNode, "mouseleave", (e) => {
			this._onMouseLeave(e);
		})), this._editor.addOverlayWidget(this);
	}
	dispose() {
		this._editor.removeOverlayWidget(this), super.dispose();
	}
	getId() {
		return jL.ID;
	}
	getDomNode() {
		return this._hover.containerDomNode;
	}
	getPosition() {
		return null;
	}
	_updateFont() {
		Array.prototype.slice.call(this._hover.contentsDomNode.getElementsByClassName("code")).forEach((e) => this._editor.applyFontInfo(e));
	}
	_onModelDecorationsChanged() {
		this._isVisible && (this._hoverOperation.cancel(), this._hoverOperation.start(0));
	}
	showsOrWillShow(e) {
		let t = e.target;
		return t.type === 2 && t.detail.glyphMarginLane ? (this._startShowingAt(t.position.lineNumber, t.detail.glyphMarginLane), !0) : t.type === 3 && (this._startShowingAt(t.position.lineNumber, "lineNo"), !0);
	}
	_startShowingAt(e, t) {
		(this._computer.lineNumber !== e || this._computer.lane !== t) && (this._hoverOperation.cancel(), this.hide(), this._computer.lineNumber = e, this._computer.lane = t, this._hoverOperation.start(0));
	}
	hide() {
		this._computer.lineNumber = -1, this._hoverOperation.cancel(), this._isVisible && (this._isVisible = !1, this._hover.containerDomNode.classList.toggle("hidden", !this._isVisible));
	}
	_withResult(e) {
		this._messages = e, this._messages.length > 0 ? this._renderMessages(this._computer.lineNumber, this._messages) : this.hide();
	}
	_renderMessages(e, t) {
		this._renderDisposeables.clear();
		let n = document.createDocumentFragment();
		for (let e of t) {
			let t = ML("div.hover-row.markdown-hover"), r = D(t, ML("div.hover-contents")), i = this._renderDisposeables.add(this._markdownRenderer.render(e.value));
			r.appendChild(i.element), n.appendChild(t);
		}
		this._updateContents(n), this._showAt(e);
	}
	_updateContents(e) {
		this._hover.contentsDomNode.textContent = "", this._hover.contentsDomNode.appendChild(e), this._updateFont();
	}
	_showAt(e) {
		this._isVisible || (this._isVisible = !0, this._hover.containerDomNode.classList.toggle("hidden", !this._isVisible));
		let t = this._editor.getLayoutInfo(), n = this._editor.getTopForLineNumber(e), r = this._editor.getScrollTop(), i = this._editor.getOption(67), a = this._hover.containerDomNode.clientHeight, o = n - r - (a - i) / 2, s = t.glyphMarginLeft + t.glyphMarginWidth + (this._computer.lane === "lineNo" ? t.lineNumbersWidth : 0);
		this._hover.containerDomNode.style.left = `${s}px`, this._hover.containerDomNode.style.top = `${Math.max(Math.round(o), 0)}px`;
	}
	_onMouseLeave(e) {
		let t = this._editor.getDomNode();
		t && yE(t, e.x, e.y) || this.hide();
	}
};
NL = jL = kL([AL(1, dr), AL(2, p)], NL);
// ../../../node_modules/.pnpm/monaco-editor@0.52.2/node_modules/monaco-editor/esm/vs/editor/contrib/hover/browser/marginHoverController.js
var PL = function(e, t, n, r) {
	var i = arguments.length, a = i < 3 ? t : r === null ? r = Object.getOwnPropertyDescriptor(t, n) : r, o;
	if (typeof Reflect == "object" && typeof Reflect.decorate == "function") a = Reflect.decorate(e, t, n, r);
	else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (i < 3 ? o(a) : i > 3 ? o(t, n, a) : o(t, n)) || a);
	return i > 3 && a && Object.defineProperty(t, n, a), a;
}, FL = function(e, t) {
	return function(n, r) {
		t(n, r, e);
	};
}, IL = class extends U {
	static {
		this.ID = "editor.contrib.marginHover";
	}
	constructor(e, t) {
		super(), this._editor = e, this._instantiationService = t, this.shouldKeepOpenOnEditorMouseMoveOrLeave = !1, this._listenersStore = new g(), this._hoverState = { mouseDown: !1 }, this._reactToEditorMouseMoveRunner = this._register(new tl(() => this._reactToEditorMouseMove(this._mouseMoveEvent), 0)), this._hookListeners(), this._register(this._editor.onDidChangeConfiguration((e) => {
			e.hasChanged(60) && (this._unhookListeners(), this._hookListeners());
		}));
	}
	_hookListeners() {
		let e = this._editor.getOption(60);
		this._hoverSettings = {
			enabled: e.enabled,
			sticky: e.sticky,
			hidingDelay: e.hidingDelay
		}, e.enabled ? (this._listenersStore.add(this._editor.onMouseDown((e) => this._onEditorMouseDown(e))), this._listenersStore.add(this._editor.onMouseUp(() => this._onEditorMouseUp())), this._listenersStore.add(this._editor.onMouseMove((e) => this._onEditorMouseMove(e))), this._listenersStore.add(this._editor.onKeyDown((e) => this._onKeyDown(e)))) : (this._listenersStore.add(this._editor.onMouseMove((e) => this._onEditorMouseMove(e))), this._listenersStore.add(this._editor.onKeyDown((e) => this._onKeyDown(e)))), this._listenersStore.add(this._editor.onMouseLeave((e) => this._onEditorMouseLeave(e))), this._listenersStore.add(this._editor.onDidChangeModel(() => {
			this._cancelScheduler(), this._hideWidgets();
		})), this._listenersStore.add(this._editor.onDidChangeModelContent(() => this._cancelScheduler())), this._listenersStore.add(this._editor.onDidScrollChange((e) => this._onEditorScrollChanged(e)));
	}
	_unhookListeners() {
		this._listenersStore.clear();
	}
	_cancelScheduler() {
		this._mouseMoveEvent = void 0, this._reactToEditorMouseMoveRunner.cancel();
	}
	_onEditorScrollChanged(e) {
		(e.scrollTopChanged || e.scrollLeftChanged) && this._hideWidgets();
	}
	_onEditorMouseDown(e) {
		this._hoverState.mouseDown = !0, this._isMouseOnMarginHoverWidget(e) || this._hideWidgets();
	}
	_isMouseOnMarginHoverWidget(e) {
		let t = this._glyphWidget?.getDomNode();
		return t ? yE(t, e.event.posx, e.event.posy) : !1;
	}
	_onEditorMouseUp() {
		this._hoverState.mouseDown = !1;
	}
	_onEditorMouseLeave(e) {
		this.shouldKeepOpenOnEditorMouseMoveOrLeave || (this._cancelScheduler(), this._isMouseOnMarginHoverWidget(e) || this._hideWidgets());
	}
	_shouldNotRecomputeCurrentHoverWidget(e) {
		let t = this._hoverSettings.sticky, n = this._isMouseOnMarginHoverWidget(e);
		return t && n;
	}
	_onEditorMouseMove(e) {
		this.shouldKeepOpenOnEditorMouseMoveOrLeave || (this._mouseMoveEvent = e, this._shouldNotRecomputeCurrentHoverWidget(e) ? this._reactToEditorMouseMoveRunner.cancel() : this._reactToEditorMouseMove(e));
	}
	_reactToEditorMouseMove(e) {
		e && (this._tryShowHoverWidget(e) || this._hideWidgets());
	}
	_tryShowHoverWidget(e) {
		return this._getOrCreateGlyphWidget().showsOrWillShow(e);
	}
	_onKeyDown(e) {
		this._editor.hasModel() && e.keyCode !== 5 && e.keyCode !== 6 && e.keyCode !== 57 && e.keyCode !== 4 && this._hideWidgets();
	}
	_hideWidgets() {
		this._glyphWidget?.hide();
	}
	_getOrCreateGlyphWidget() {
		return this._glyphWidget ||= this._instantiationService.createInstance(NL, this._editor), this._glyphWidget;
	}
	dispose() {
		super.dispose(), this._unhookListeners(), this._listenersStore.dispose(), this._glyphWidget?.dispose();
	}
};
IL = PL([FL(1, P)], IL);
// ../../../node_modules/.pnpm/monaco-editor@0.52.2/node_modules/monaco-editor/esm/vs/editor/contrib/hover/browser/hoverAccessibleViews.js
var LL = class {}, RL = class {}, zL = class {};
T(ik.ID, ik, 2), T(IL.ID, IL, 2), k(uL), k(dL), k(fL), k(pL), k(mL), k(hL), k(gL), k(_L), k(vL), k(yL), k(bL), k(xL), FT.register(QE), FT.register(DL), Ao((e, t) => {
	let n = e.getColor(Ui);
	n && (t.addRule(`.monaco-editor .monaco-hover .hover-row:not(:first-child):not(:empty) { border-top: 1px solid ${n.transparent(.5)}; }`), t.addRule(`.monaco-editor .monaco-hover hr { border-top: 1px solid ${n.transparent(.5)}; }`), t.addRule(`.monaco-editor .monaco-hover hr { border-bottom: 0px solid ${n.transparent(.5)}; }`));
}), TI.register(new LL()), TI.register(new RL()), TI.register(new zL());
// ../../../node_modules/.pnpm/monaco-editor@0.52.2/node_modules/monaco-editor/esm/vs/editor/contrib/indentation/common/indentUtils.js
function BL(e, t) {
	let n = 0;
	for (let r = 0; r < e.length; r++) e.charAt(r) === "	" ? n += t : n++;
	return n;
}
function VL(e, t, n) {
	e = e < 0 ? 0 : e;
	let r = "";
	if (!n) {
		let n = Math.floor(e / t);
		e %= t;
		for (let e = 0; e < n; e++) r += "	";
	}
	for (let t = 0; t < e; t++) r += " ";
	return r;
}
// ../../../node_modules/.pnpm/monaco-editor@0.52.2/node_modules/monaco-editor/esm/vs/editor/contrib/indentation/common/indentation.js
function HL(e, t, n, r) {
	if (e.getLineCount() === 1 && e.getLineMaxColumn(1) === 1) return [];
	let i = t.getLanguageConfiguration(e.getLanguageId()).indentRulesSupport;
	if (!i) return [];
	let a = new Ea(e, i, t);
	for (r = Math.min(r, e.getLineCount()); n <= r && a.shouldIgnore(n);) n++;
	if (n > r - 1) return [];
	let { tabSize: o, indentSize: s, insertSpaces: c } = e.getOptions(), l = (e, t) => (t ||= 1, zs.shiftIndent(e, e.length + t, o, s, c)), u = (e, t) => (t ||= 1, zs.unshiftIndent(e, e.length + t, o, s, c)), d = [], f = e.getLineContent(n), p = Ut(f), m = p;
	a.shouldIncrease(n) ? (m = l(m), p = l(p)) : a.shouldIndentNextLine(n) && (m = l(m)), n++;
	for (let t = n; t <= r; t++) {
		if (UL(e, t)) continue;
		let n = e.getLineContent(t), r = Ut(n), i = m;
		a.shouldDecrease(t, i) && (m = u(m), p = u(p)), r !== m && d.push(fr.replaceMove(new V(t, 1, t, r.length + 1), Tl(m, s, c))), a.shouldIgnore(t) || (a.shouldIncrease(t, i) ? (p = l(p), m = p) : m = a.shouldIndentNextLine(t, i) ? l(m) : p);
	}
	return d;
}
function UL(e, t) {
	return e.tokenization.isCheapToTokenize(t) ? e.tokenization.getLineTokens(t).getStandardTokenType(0) === 2 : !1;
}
// ../../../node_modules/.pnpm/monaco-editor@0.52.2/node_modules/monaco-editor/esm/vs/editor/contrib/indentation/browser/indentation.js
var WL = function(e, t, n, r) {
	var i = arguments.length, a = i < 3 ? t : r === null ? r = Object.getOwnPropertyDescriptor(t, n) : r, o;
	if (typeof Reflect == "object" && typeof Reflect.decorate == "function") a = Reflect.decorate(e, t, n, r);
	else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (i < 3 ? o(a) : i > 3 ? o(t, n, a) : o(t, n)) || a);
	return i > 3 && a && Object.defineProperty(t, n, a), a;
}, GL = function(e, t) {
	return function(n, r) {
		t(n, r, e);
	};
}, KL = class e extends O {
	static {
		this.ID = "editor.action.indentationToSpaces";
	}
	constructor() {
		super({
			id: e.ID,
			label: B("indentationToSpaces", "Convert Indentation to Spaces"),
			alias: "Convert Indentation to Spaces",
			precondition: I.writable,
			metadata: { description: H("indentationToSpacesDescription", "Convert the tab indentation to spaces.") }
		});
	}
	run(e, t) {
		let n = t.getModel();
		if (!n) return;
		let r = n.getOptions(), i = t.getSelection();
		if (!i) return;
		let a = new aR(i, r.tabSize);
		t.pushUndoStop(), t.executeCommands(this.id, [a]), t.pushUndoStop(), n.updateOptions({ insertSpaces: !0 });
	}
}, qL = class e extends O {
	static {
		this.ID = "editor.action.indentationToTabs";
	}
	constructor() {
		super({
			id: e.ID,
			label: B("indentationToTabs", "Convert Indentation to Tabs"),
			alias: "Convert Indentation to Tabs",
			precondition: I.writable,
			metadata: { description: H("indentationToTabsDescription", "Convert the spaces indentation to tabs.") }
		});
	}
	run(e, t) {
		let n = t.getModel();
		if (!n) return;
		let r = n.getOptions(), i = t.getSelection();
		if (!i) return;
		let a = new oR(i, r.tabSize);
		t.pushUndoStop(), t.executeCommands(this.id, [a]), t.pushUndoStop(), n.updateOptions({ insertSpaces: !1 });
	}
}, JL = class extends O {
	constructor(e, t, n) {
		super(n), this.insertSpaces = e, this.displaySizeOnly = t;
	}
	run(e, t) {
		let n = e.get(Is), r = e.get(je), i = t.getModel();
		if (!i) return;
		let a = r.getCreationOptions(i.getLanguageId(), i.uri, i.isForSimpleWidget), o = i.getOptions(), s = [
			1,
			2,
			3,
			4,
			5,
			6,
			7,
			8
		].map((e) => ({
			id: e.toString(),
			label: e.toString(),
			description: e === a.tabSize && e === o.tabSize ? B("configuredTabSize", "Configured Tab Size") : e === a.tabSize ? B("defaultTabSize", "Default Tab Size") : e === o.tabSize ? B("currentTabSize", "Current Tab Size") : void 0
		})), c = Math.min(i.getOptions().tabSize - 1, 7);
		setTimeout(() => {
			n.pick(s, {
				placeHolder: B({
					key: "selectTabWidth",
					comment: ["Tab corresponds to the tab key"]
				}, "Select Tab Size for Current File"),
				activeItem: s[c]
			}).then((e) => {
				if (e && i && !i.isDisposed()) {
					let t = parseInt(e.label, 10);
					this.displaySizeOnly ? i.updateOptions({ tabSize: t }) : i.updateOptions({
						tabSize: t,
						indentSize: t,
						insertSpaces: this.insertSpaces
					});
				}
			});
		}, 50);
	}
}, YL = class e extends JL {
	static {
		this.ID = "editor.action.indentUsingTabs";
	}
	constructor() {
		super(!1, !1, {
			id: e.ID,
			label: B("indentUsingTabs", "Indent Using Tabs"),
			alias: "Indent Using Tabs",
			precondition: void 0,
			metadata: { description: H("indentUsingTabsDescription", "Use indentation with tabs.") }
		});
	}
}, XL = class e extends JL {
	static {
		this.ID = "editor.action.indentUsingSpaces";
	}
	constructor() {
		super(!0, !1, {
			id: e.ID,
			label: B("indentUsingSpaces", "Indent Using Spaces"),
			alias: "Indent Using Spaces",
			precondition: void 0,
			metadata: { description: H("indentUsingSpacesDescription", "Use indentation with spaces.") }
		});
	}
}, ZL = class e extends JL {
	static {
		this.ID = "editor.action.changeTabDisplaySize";
	}
	constructor() {
		super(!0, !0, {
			id: e.ID,
			label: B("changeTabDisplaySize", "Change Tab Display Size"),
			alias: "Change Tab Display Size",
			precondition: void 0,
			metadata: { description: H("changeTabDisplaySizeDescription", "Change the space size equivalent of the tab.") }
		});
	}
}, QL = class e extends O {
	static {
		this.ID = "editor.action.detectIndentation";
	}
	constructor() {
		super({
			id: e.ID,
			label: B("detectIndentation", "Detect Indentation from Content"),
			alias: "Detect Indentation from Content",
			precondition: void 0,
			metadata: { description: H("detectIndentationDescription", "Detect the indentation from content.") }
		});
	}
	run(e, t) {
		let n = e.get(je), r = t.getModel();
		if (!r) return;
		let i = n.getCreationOptions(r.getLanguageId(), r.uri, r.isForSimpleWidget);
		r.detectIndentation(i.insertSpaces, i.tabSize);
	}
}, $L = class extends O {
	constructor() {
		super({
			id: "editor.action.reindentlines",
			label: B("editor.reindentlines", "Reindent Lines"),
			alias: "Reindent Lines",
			precondition: I.writable,
			metadata: { description: H("editor.reindentlinesDescription", "Reindent the lines of the editor.") }
		});
	}
	run(e, t) {
		let n = e.get(Tn), r = t.getModel();
		if (!r) return;
		let i = HL(r, n, 1, r.getLineCount());
		i.length > 0 && (t.pushUndoStop(), t.executeEdits(this.id, i), t.pushUndoStop());
	}
}, eR = class extends O {
	constructor() {
		super({
			id: "editor.action.reindentselectedlines",
			label: B("editor.reindentselectedlines", "Reindent Selected Lines"),
			alias: "Reindent Selected Lines",
			precondition: I.writable,
			metadata: { description: H("editor.reindentselectedlinesDescription", "Reindent the selected lines of the editor.") }
		});
	}
	run(e, t) {
		let n = e.get(Tn), r = t.getModel();
		if (!r) return;
		let i = t.getSelections();
		if (i === null) return;
		let a = [];
		for (let e of i) {
			let t = e.startLineNumber, i = e.endLineNumber;
			if (t !== i && e.endColumn === 1 && i--, t === 1) {
				if (t === i) continue;
			} else t--;
			let o = HL(r, n, t, i);
			a.push(...o);
		}
		a.length > 0 && (t.pushUndoStop(), t.executeEdits(this.id, a), t.pushUndoStop());
	}
}, tR = class {
	constructor(e, t) {
		this._initialSelection = t, this._edits = [], this._selectionId = null;
		for (let t of e) t.range && typeof t.text == "string" && this._edits.push(t);
	}
	getEditOperations(e, t) {
		for (let e of this._edits) t.addEditOperation(E.lift(e.range), e.text);
		let n = !1;
		Array.isArray(this._edits) && this._edits.length === 1 && this._initialSelection.isEmpty() && (this._edits[0].range.startColumn === this._initialSelection.endColumn && this._edits[0].range.startLineNumber === this._initialSelection.endLineNumber ? (n = !0, this._selectionId = t.trackSelection(this._initialSelection, !0)) : this._edits[0].range.endColumn === this._initialSelection.startColumn && this._edits[0].range.endLineNumber === this._initialSelection.startLineNumber && (n = !0, this._selectionId = t.trackSelection(this._initialSelection, !1))), n || (this._selectionId = t.trackSelection(this._initialSelection));
	}
	computeCursorState(e, t) {
		return t.getTrackedSelection(this._selectionId);
	}
}, nR = class {
	static {
		this.ID = "editor.contrib.autoIndentOnPaste";
	}
	constructor(e, t) {
		this.editor = e, this._languageConfigurationService = t, this.callOnDispose = new g(), this.callOnModel = new g(), this.callOnDispose.add(e.onDidChangeConfiguration(() => this.update())), this.callOnDispose.add(e.onDidChangeModel(() => this.update())), this.callOnDispose.add(e.onDidChangeModelLanguage(() => this.update()));
	}
	update() {
		this.callOnModel.clear(), this.editor.getOption(12) < 4 || this.editor.getOption(55) || this.editor.hasModel() && this.callOnModel.add(this.editor.onDidPaste(({ range: e }) => {
			this.trigger(e);
		}));
	}
	trigger(e) {
		let t = this.editor.getSelections();
		if (t === null || t.length > 1) return;
		let n = this.editor.getModel();
		if (!n || this.rangeContainsOnlyWhitespaceCharacters(n, e) || rR(n, e) || !n.tokenization.isCheapToTokenize(e.getStartPosition().lineNumber)) return;
		let r = this.editor.getOption(12), { tabSize: i, indentSize: a, insertSpaces: o } = n.getOptions(), s = [], c = {
			shiftIndent: (e) => zs.shiftIndent(e, e.length + 1, i, a, o),
			unshiftIndent: (e) => zs.unshiftIndent(e, e.length + 1, i, a, o)
		}, l = e.startLineNumber;
		for (; l <= e.endLineNumber && this.shouldIgnoreLine(n, l);) l++;
		if (l > e.endLineNumber) return;
		let u = n.getLineContent(l);
		if (!/\S/.test(u.substring(0, e.startColumn - 1))) {
			let e = No(r, n, n.getLanguageId(), l, c, this._languageConfigurationService);
			if (e !== null) {
				let t = Ut(u), r = BL(e, i);
				if (r !== BL(t, i)) {
					let e = VL(r, i, o);
					s.push({
						range: new E(l, 1, l, t.length + 1),
						text: e
					}), u = e + u.substring(t.length);
				} else {
					let e = oa(n, l, this._languageConfigurationService);
					if (e === 0 || e === 8) return;
				}
			}
		}
		let d = l;
		for (; l < e.endLineNumber && !/\S/.test(n.getLineContent(l + 1));) l++;
		if (l !== e.endLineNumber) {
			let t = No(r, {
				tokenization: {
					getLineTokens: (e) => n.tokenization.getLineTokens(e),
					getLanguageId: () => n.getLanguageId(),
					getLanguageIdAtPosition: (e, t) => n.getLanguageIdAtPosition(e, t)
				},
				getLineContent: (e) => e === d ? u : n.getLineContent(e)
			}, n.getLanguageId(), l + 1, c, this._languageConfigurationService);
			if (t !== null) {
				let r = BL(t, i), a = BL(Ut(n.getLineContent(l + 1)), i);
				if (r !== a) {
					let t = r - a;
					for (let r = l + 1; r <= e.endLineNumber; r++) {
						let e = n.getLineContent(r), a = Ut(e), c = VL(BL(a, i) + t, i, o);
						c !== a && s.push({
							range: new E(r, 1, r, a.length + 1),
							text: c
						});
					}
				}
			}
		}
		if (s.length > 0) {
			this.editor.pushUndoStop();
			let e = new tR(s, this.editor.getSelection());
			this.editor.executeCommand("autoIndentOnPaste", e), this.editor.pushUndoStop();
		}
	}
	rangeContainsOnlyWhitespaceCharacters(e, t) {
		let n = (e) => e.trim().length === 0, r = !0;
		if (t.startLineNumber === t.endLineNumber) r = n(e.getLineContent(t.startLineNumber).substring(t.startColumn - 1, t.endColumn - 1));
		else for (let i = t.startLineNumber; i <= t.endLineNumber; i++) {
			let a = e.getLineContent(i);
			if (r = i === t.startLineNumber ? n(a.substring(t.startColumn - 1)) : i === t.endLineNumber ? n(a.substring(0, t.endColumn - 1)) : e.getLineFirstNonWhitespaceColumn(i) === 0, !r) break;
		}
		return r;
	}
	shouldIgnoreLine(e, t) {
		e.tokenization.forceTokenization(t);
		let n = e.getLineFirstNonWhitespaceColumn(t);
		if (n === 0) return !0;
		let r = e.tokenization.getLineTokens(t);
		if (r.getCount() > 0) {
			let e = r.findTokenIndexAtOffset(n);
			if (e >= 0 && r.getStandardTokenType(e) === 1) return !0;
		}
		return !1;
	}
	dispose() {
		this.callOnDispose.dispose(), this.callOnModel.dispose();
	}
};
nR = WL([GL(1, Tn)], nR);
function rR(e, t) {
	let n = (t) => nr(e, t) === 2;
	return n(t.getStartPosition()) || n(t.getEndPosition());
}
function iR(e, t, n, r) {
	if (e.getLineCount() === 1 && e.getLineMaxColumn(1) === 1) return;
	let i = "";
	for (let e = 0; e < n; e++) i += " ";
	let a = new RegExp(i, "gi");
	for (let n = 1, o = e.getLineCount(); n <= o; n++) {
		let o = e.getLineFirstNonWhitespaceColumn(n);
		if (o === 0 && (o = e.getLineMaxColumn(n)), o === 1) continue;
		let s = new E(n, 1, n, o), c = e.getValueInRange(s), l = r ? c.replace(/\t/gi, i) : c.replace(a, "	");
		t.addEditOperation(s, l);
	}
}
var aR = class {
	constructor(e, t) {
		this.selection = e, this.tabSize = t, this.selectionId = null;
	}
	getEditOperations(e, t) {
		this.selectionId = t.trackSelection(this.selection), iR(e, t, this.tabSize, !0);
	}
	computeCursorState(e, t) {
		return t.getTrackedSelection(this.selectionId);
	}
}, oR = class {
	constructor(e, t) {
		this.selection = e, this.tabSize = t, this.selectionId = null;
	}
	getEditOperations(e, t) {
		this.selectionId = t.trackSelection(this.selection), iR(e, t, this.tabSize, !1);
	}
	computeCursorState(e, t) {
		return t.getTrackedSelection(this.selectionId);
	}
};
T(nR.ID, nR, 2), k(KL), k(qL), k(YL), k(XL), k(ZL), k(QL), k($L), k(eR), T(UO.ID, UO, 1), FT.register(JO);
// ../../../node_modules/.pnpm/monaco-editor@0.52.2/node_modules/monaco-editor/esm/vs/editor/contrib/inPlaceReplace/browser/inPlaceReplaceCommand.js
var sR = class {
	constructor(e, t, n) {
		this._editRange = e, this._originalSelection = t, this._text = n;
	}
	getEditOperations(e, t) {
		t.addTrackedEditOperation(this._editRange, this._text);
	}
	computeCursorState(e, t) {
		let n = t.getInverseEditOperations()[0].range;
		return this._originalSelection.isEmpty() ? new V(n.endLineNumber, Math.min(this._originalSelection.positionColumn, n.endColumn), n.endLineNumber, Math.min(this._originalSelection.positionColumn, n.endColumn)) : new V(n.endLineNumber, n.endColumn - this._text.length, n.endLineNumber, n.endColumn);
	}
}, cR = function(e, t, n, r) {
	var i = arguments.length, a = i < 3 ? t : r === null ? r = Object.getOwnPropertyDescriptor(t, n) : r, o;
	if (typeof Reflect == "object" && typeof Reflect.decorate == "function") a = Reflect.decorate(e, t, n, r);
	else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (i < 3 ? o(a) : i > 3 ? o(t, n, a) : o(t, n)) || a);
	return i > 3 && a && Object.defineProperty(t, n, a), a;
}, lR = function(e, t) {
	return function(n, r) {
		t(n, r, e);
	};
}, uR, dR = class {
	static {
		uR = this;
	}
	static {
		this.ID = "editor.contrib.inPlaceReplaceController";
	}
	static get(e) {
		return e.getContribution(uR.ID);
	}
	static {
		this.DECORATION = L.register({
			description: "in-place-replace",
			className: "valueSetReplacement"
		});
	}
	constructor(e, t) {
		this.editor = e, this.editorWorkerService = t, this.decorations = this.editor.createDecorationsCollection();
	}
	dispose() {}
	run(e, t) {
		this.currentRequest?.cancel();
		let n = this.editor.getSelection(), r = this.editor.getModel();
		if (!r || !n) return;
		let i = n;
		if (i.startLineNumber !== i.endLineNumber) return;
		let a = new me(this.editor, 5), o = r.uri;
		return this.editorWorkerService.canNavigateValueSet(o) ? (this.currentRequest = Te((e) => this.editorWorkerService.navigateValueSet(o, i, t)), this.currentRequest.then((t) => {
			if (!t || !t.range || !t.value || !a.validate(this.editor)) return;
			let n = E.lift(t.range), r = t.range, o = t.value.length - (i.endColumn - i.startColumn);
			r = {
				startLineNumber: r.startLineNumber,
				startColumn: r.startColumn,
				endLineNumber: r.endLineNumber,
				endColumn: r.startColumn + t.value.length
			}, o > 1 && (i = new V(i.startLineNumber, i.startColumn, i.endLineNumber, i.endColumn + o - 1));
			let s = new sR(n, i, t.value);
			this.editor.pushUndoStop(), this.editor.executeCommand(e, s), this.editor.pushUndoStop(), this.decorations.set([{
				range: r,
				options: uR.DECORATION
			}]), this.decorationRemover?.cancel(), this.decorationRemover = Io(350), this.decorationRemover.then(() => this.decorations.clear()).catch(er);
		}).catch(er)) : Promise.resolve(void 0);
	}
};
dR = uR = cR([lR(1, Oe)], dR);
var fR = class extends O {
	constructor() {
		super({
			id: "editor.action.inPlaceReplace.up",
			label: B("InPlaceReplaceAction.previous.label", "Replace with Previous Value"),
			alias: "Replace with Previous Value",
			precondition: I.writable,
			kbOpts: {
				kbExpr: I.editorTextFocus,
				primary: 3159,
				weight: 100
			}
		});
	}
	run(e, t) {
		let n = dR.get(t);
		return n ? n.run(this.id, !1) : Promise.resolve(void 0);
	}
}, pR = class extends O {
	constructor() {
		super({
			id: "editor.action.inPlaceReplace.down",
			label: B("InPlaceReplaceAction.next.label", "Replace with Next Value"),
			alias: "Replace with Next Value",
			precondition: I.writable,
			kbOpts: {
				kbExpr: I.editorTextFocus,
				primary: 3161,
				weight: 100
			}
		});
	}
	run(e, t) {
		let n = dR.get(t);
		return n ? n.run(this.id, !0) : Promise.resolve(void 0);
	}
};
T(dR.ID, dR, 4), k(fR), k(pR), k(class extends O {
	constructor() {
		super({
			id: "expandLineSelection",
			label: B("expandLineSelection", "Expand Line Selection"),
			alias: "Expand Line Selection",
			precondition: void 0,
			kbOpts: {
				weight: 0,
				kbExpr: I.textInputFocus,
				primary: 2090
			}
		});
	}
	run(e, t, n) {
		if (n ||= {}, !t.hasModel()) return;
		let r = t._getViewModel();
		r.model.pushStackElement(), r.setCursorStates(n.source, 3, ls.expandLineSelection(r, r.getCursorStates())), r.revealAllCursors(n.source, !0);
	}
});
// ../../../node_modules/.pnpm/monaco-editor@0.52.2/node_modules/monaco-editor/esm/vs/editor/common/commands/trimTrailingWhitespaceCommand.js
var mR = class {
	constructor(e, t, n) {
		this._selection = e, this._cursors = t, this._selectionId = null, this._trimInRegexesAndStrings = n;
	}
	getEditOperations(e, t) {
		let n = hR(e, this._cursors, this._trimInRegexesAndStrings);
		for (let e = 0, r = n.length; e < r; e++) {
			let r = n[e];
			t.addEditOperation(r.range, r.text);
		}
		this._selectionId = t.trackSelection(this._selection);
	}
	computeCursorState(e, t) {
		return t.getTrackedSelection(this._selectionId);
	}
};
function hR(e, t, r) {
	t.sort((e, t) => e.lineNumber === t.lineNumber ? e.column - t.column : e.lineNumber - t.lineNumber);
	for (let e = t.length - 2; e >= 0; e--) t[e].lineNumber === t[e + 1].lineNumber && t.splice(e, 1);
	let i = [], a = 0, o = 0, s = t.length;
	for (let c = 1, l = e.getLineCount(); c <= l; c++) {
		let l = e.getLineContent(c), u = l.length + 1, d = 0;
		if (o < s && t[o].lineNumber === c && (d = t[o].column, o++, d === u) || l.length === 0) continue;
		let f = n(l), p = 0;
		if (f === -1) p = 1;
		else if (f !== l.length - 1) p = f + 2;
		else continue;
		if (!r) {
			if (!e.tokenization.hasAccurateTokensForLine(c)) continue;
			let t = e.tokenization.getLineTokens(c), n = t.getStandardTokenType(t.findTokenIndexAtOffset(p));
			if (n === 2 || n === 3) continue;
		}
		p = Math.max(d, p), i[a++] = fr.delete(new E(c, p, c, u));
	}
	return i;
}
// ../../../node_modules/.pnpm/monaco-editor@0.52.2/node_modules/monaco-editor/esm/vs/editor/contrib/linesOperations/browser/copyLinesCommand.js
var gR = class {
	constructor(e, t, n) {
		this._selection = e, this._isCopyingDown = t, this._noop = n || !1, this._selectionDirection = 0, this._selectionId = null, this._startLineNumberDelta = 0, this._endLineNumberDelta = 0;
	}
	getEditOperations(e, t) {
		let n = this._selection;
		this._startLineNumberDelta = 0, this._endLineNumberDelta = 0, n.startLineNumber < n.endLineNumber && n.endColumn === 1 && (this._endLineNumberDelta = 1, n = n.setEndPosition(n.endLineNumber - 1, e.getLineMaxColumn(n.endLineNumber - 1)));
		let r = [];
		for (let t = n.startLineNumber; t <= n.endLineNumber; t++) r.push(e.getLineContent(t));
		let i = r.join("\n");
		i === "" && this._isCopyingDown && (this._startLineNumberDelta++, this._endLineNumberDelta++), this._noop ? t.addEditOperation(new E(n.endLineNumber, e.getLineMaxColumn(n.endLineNumber), n.endLineNumber + 1, 1), n.endLineNumber === e.getLineCount() ? "" : "\n") : this._isCopyingDown ? t.addEditOperation(new E(n.startLineNumber, 1, n.startLineNumber, 1), i + "\n") : t.addEditOperation(new E(n.endLineNumber, e.getLineMaxColumn(n.endLineNumber), n.endLineNumber, e.getLineMaxColumn(n.endLineNumber)), "\n" + i), this._selectionId = t.trackSelection(n), this._selectionDirection = this._selection.getDirection();
	}
	computeCursorState(e, t) {
		let n = t.getTrackedSelection(this._selectionId);
		if (this._startLineNumberDelta !== 0 || this._endLineNumberDelta !== 0) {
			let e = n.startLineNumber, t = n.startColumn, r = n.endLineNumber, i = n.endColumn;
			this._startLineNumberDelta !== 0 && (e += this._startLineNumberDelta, t = 1), this._endLineNumberDelta !== 0 && (r += this._endLineNumberDelta, i = 1), n = V.createWithDirection(e, t, r, i, this._selectionDirection);
		}
		return n;
	}
}, _R = function(e, t, n, r) {
	var i = arguments.length, a = i < 3 ? t : r === null ? r = Object.getOwnPropertyDescriptor(t, n) : r, o;
	if (typeof Reflect == "object" && typeof Reflect.decorate == "function") a = Reflect.decorate(e, t, n, r);
	else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (i < 3 ? o(a) : i > 3 ? o(t, n, a) : o(t, n)) || a);
	return i > 3 && a && Object.defineProperty(t, n, a), a;
}, vR = function(e, t) {
	return function(n, r) {
		t(n, r, e);
	};
}, yR = class {
	constructor(e, t, n, r) {
		this._languageConfigurationService = r, this._selection = e, this._isMovingDown = t, this._autoIndent = n, this._selectionId = null, this._moveEndLineSelectionShrink = !1;
	}
	getEditOperations(e, t) {
		let n = () => e.getLanguageId(), r = (t, n) => e.getLanguageIdAtPosition(t, n), i = e.getLineCount();
		if (this._isMovingDown && this._selection.endLineNumber === i || !this._isMovingDown && this._selection.startLineNumber === 1) {
			this._selectionId = t.trackSelection(this._selection);
			return;
		}
		this._moveEndPositionDown = !1;
		let a = this._selection;
		a.startLineNumber < a.endLineNumber && a.endColumn === 1 && (this._moveEndPositionDown = !0, a = a.setEndPosition(a.endLineNumber - 1, e.getLineMaxColumn(a.endLineNumber - 1)));
		let { tabSize: o, indentSize: s, insertSpaces: c } = e.getOptions(), l = this.buildIndentConverter(o, s, c);
		if (a.startLineNumber === a.endLineNumber && e.getLineMaxColumn(a.startLineNumber) === 1) {
			let n = a.startLineNumber, r = this._isMovingDown ? n + 1 : n - 1;
			e.getLineMaxColumn(r) === 1 ? t.addEditOperation(new E(1, 1, 1, 1), null) : (t.addEditOperation(new E(n, 1, n, 1), e.getLineContent(r)), t.addEditOperation(new E(r, 1, r, e.getLineMaxColumn(r)), null)), a = new V(r, 1, r, 1);
		} else {
			let i, s;
			if (this._isMovingDown) {
				i = a.endLineNumber + 1, s = e.getLineContent(i), t.addEditOperation(new E(i - 1, e.getLineMaxColumn(i - 1), i, e.getLineMaxColumn(i)), null);
				let u = s;
				if (this.shouldAutoIndent(e, a)) {
					let d = this.matchEnterRule(e, l, o, i, a.startLineNumber - 1);
					if (d !== null) u = VL(d + BL(Ut(e.getLineContent(i)), o), o, c) + this.trimStart(s);
					else {
						let t = {
							tokenization: {
								getLineTokens: (t) => t === a.startLineNumber ? e.tokenization.getLineTokens(i) : e.tokenization.getLineTokens(t),
								getLanguageId: n,
								getLanguageIdAtPosition: r
							},
							getLineContent: (t) => t === a.startLineNumber ? e.getLineContent(i) : e.getLineContent(t)
						}, d = No(this._autoIndent, t, e.getLanguageIdAtPosition(i, 1), a.startLineNumber, l, this._languageConfigurationService);
						if (d !== null) {
							let t = Ut(e.getLineContent(i)), n = BL(d, o);
							n !== BL(t, o) && (u = VL(n, o, c) + this.trimStart(s));
						}
					}
					t.addEditOperation(new E(a.startLineNumber, 1, a.startLineNumber, 1), u + "\n");
					let f = this.matchEnterRuleMovingDown(e, l, o, a.startLineNumber, i, u);
					if (f !== null) f !== 0 && this.getIndentEditsOfMovingBlock(e, t, a, o, c, f);
					else {
						let s = {
							tokenization: {
								getLineTokens: (t) => t === a.startLineNumber ? e.tokenization.getLineTokens(i) : t >= a.startLineNumber + 1 && t <= a.endLineNumber + 1 ? e.tokenization.getLineTokens(t - 1) : e.tokenization.getLineTokens(t),
								getLanguageId: n,
								getLanguageIdAtPosition: r
							},
							getLineContent: (t) => t === a.startLineNumber ? u : t >= a.startLineNumber + 1 && t <= a.endLineNumber + 1 ? e.getLineContent(t - 1) : e.getLineContent(t)
						}, d = No(this._autoIndent, s, e.getLanguageIdAtPosition(i, 1), a.startLineNumber + 1, l, this._languageConfigurationService);
						if (d !== null) {
							let n = Ut(e.getLineContent(a.startLineNumber)), r = BL(d, o), i = BL(n, o);
							if (r !== i) {
								let n = r - i;
								this.getIndentEditsOfMovingBlock(e, t, a, o, c, n);
							}
						}
					}
				} else t.addEditOperation(new E(a.startLineNumber, 1, a.startLineNumber, 1), u + "\n");
			} else if (i = a.startLineNumber - 1, s = e.getLineContent(i), t.addEditOperation(new E(i, 1, i + 1, 1), null), t.addEditOperation(new E(a.endLineNumber, e.getLineMaxColumn(a.endLineNumber), a.endLineNumber, e.getLineMaxColumn(a.endLineNumber)), "\n" + s), this.shouldAutoIndent(e, a)) {
				let s = {
					tokenization: {
						getLineTokens: (t) => t === i ? e.tokenization.getLineTokens(a.startLineNumber) : e.tokenization.getLineTokens(t),
						getLanguageId: n,
						getLanguageIdAtPosition: r
					},
					getLineContent: (t) => t === i ? e.getLineContent(a.startLineNumber) : e.getLineContent(t)
				}, u = this.matchEnterRule(e, l, o, a.startLineNumber, a.startLineNumber - 2);
				if (u !== null) u !== 0 && this.getIndentEditsOfMovingBlock(e, t, a, o, c, u);
				else {
					let n = No(this._autoIndent, s, e.getLanguageIdAtPosition(a.startLineNumber, 1), i, l, this._languageConfigurationService);
					if (n !== null) {
						let r = Ut(e.getLineContent(a.startLineNumber)), i = BL(n, o), s = BL(r, o);
						if (i !== s) {
							let n = i - s;
							this.getIndentEditsOfMovingBlock(e, t, a, o, c, n);
						}
					}
				}
			}
		}
		this._selectionId = t.trackSelection(a);
	}
	buildIndentConverter(e, t, n) {
		return {
			shiftIndent: (r) => zs.shiftIndent(r, r.length + 1, e, t, n),
			unshiftIndent: (r) => zs.unshiftIndent(r, r.length + 1, e, t, n)
		};
	}
	parseEnterResult(e, t, n, r, i) {
		if (i) {
			let a = i.indentation;
			i.indentAction === ht.None || i.indentAction === ht.Indent ? a = i.indentation + i.appendText : i.indentAction === ht.IndentOutdent ? a = i.indentation : i.indentAction === ht.Outdent && (a = t.unshiftIndent(i.indentation) + i.appendText);
			let o = e.getLineContent(r);
			if (this.trimStart(o).indexOf(this.trimStart(a)) >= 0) {
				let i = Ut(e.getLineContent(r)), o = Ut(a), s = oa(e, r, this._languageConfigurationService);
				return s !== null && s & 2 && (o = t.unshiftIndent(o)), BL(o, n) - BL(i, n);
			}
		}
		return null;
	}
	matchEnterRuleMovingDown(e, t, r, i, a, o) {
		if (n(o) >= 0) {
			let n = e.getLineMaxColumn(a), o = Tc(this._autoIndent, e, new E(a, n, a, n), this._languageConfigurationService);
			return this.parseEnterResult(e, t, r, i, o);
		}
		{
			let a = i - 1;
			for (; a >= 1;) {
				let t = e.getLineContent(a);
				if (n(t) >= 0) break;
				a--;
			}
			if (a < 1 || i > e.getLineCount()) return null;
			let o = e.getLineMaxColumn(a), s = Tc(this._autoIndent, e, new E(a, o, a, o), this._languageConfigurationService);
			return this.parseEnterResult(e, t, r, i, s);
		}
	}
	matchEnterRule(e, t, r, i, a, o) {
		let s = a;
		for (; s >= 1;) {
			let t;
			if (t = s === a && o !== void 0 ? o : e.getLineContent(s), n(t) >= 0) break;
			s--;
		}
		if (s < 1 || i > e.getLineCount()) return null;
		let c = e.getLineMaxColumn(s), l = Tc(this._autoIndent, e, new E(s, c, s, c), this._languageConfigurationService);
		return this.parseEnterResult(e, t, r, i, l);
	}
	trimStart(e) {
		return e.replace(/^\s+/, "");
	}
	shouldAutoIndent(e, t) {
		if (this._autoIndent < 4 || !e.tokenization.isCheapToTokenize(t.startLineNumber)) return !1;
		let n = e.getLanguageIdAtPosition(t.startLineNumber, 1);
		return n === e.getLanguageIdAtPosition(t.endLineNumber, 1) && this._languageConfigurationService.getLanguageConfiguration(n).indentRulesSupport !== null;
	}
	getIndentEditsOfMovingBlock(e, t, n, r, i, a) {
		for (let o = n.startLineNumber; o <= n.endLineNumber; o++) {
			let s = e.getLineContent(o), c = Ut(s), l = VL(BL(c, r) + a, r, i);
			l !== c && (t.addEditOperation(new E(o, 1, o, c.length + 1), l), o === n.endLineNumber && n.endColumn <= c.length + 1 && l === "" && (this._moveEndLineSelectionShrink = !0));
		}
	}
	computeCursorState(e, t) {
		let n = t.getTrackedSelection(this._selectionId);
		return this._moveEndPositionDown && (n = n.setEndPosition(n.endLineNumber + 1, 1)), this._moveEndLineSelectionShrink && n.startLineNumber < n.endLineNumber && (n = n.setEndPosition(n.endLineNumber, 2)), n;
	}
};
yR = _R([vR(3, Tn)], yR);
// ../../../node_modules/.pnpm/monaco-editor@0.52.2/node_modules/monaco-editor/esm/vs/editor/contrib/linesOperations/browser/sortLinesCommand.js
var bR = class e {
	static {
		this._COLLATOR = null;
	}
	static getCollator() {
		return e._COLLATOR ||= new Intl.Collator(), e._COLLATOR;
	}
	constructor(e, t) {
		this.selection = e, this.descending = t, this.selectionId = null;
	}
	getEditOperations(e, t) {
		let n = SR(e, this.selection, this.descending);
		n && t.addEditOperation(n.range, n.text), this.selectionId = t.trackSelection(this.selection);
	}
	computeCursorState(e, t) {
		return t.getTrackedSelection(this.selectionId);
	}
	static canRun(e, t, n) {
		if (e === null) return !1;
		let r = xR(e, t, n);
		if (!r) return !1;
		for (let e = 0, t = r.before.length; e < t; e++) if (r.before[e] !== r.after[e]) return !0;
		return !1;
	}
};
function xR(e, t, n) {
	let r = t.startLineNumber, i = t.endLineNumber;
	if (t.endColumn === 1 && i--, r >= i) return null;
	let a = [];
	for (let t = r; t <= i; t++) a.push(e.getLineContent(t));
	let o = a.slice(0);
	return o.sort(bR.getCollator().compare), n === !0 && (o = o.reverse()), {
		startLineNumber: r,
		endLineNumber: i,
		before: a,
		after: o
	};
}
function SR(e, t, n) {
	let r = xR(e, t, n);
	return r ? fr.replace(new E(r.startLineNumber, 1, r.endLineNumber, e.getLineMaxColumn(r.endLineNumber)), r.after.join("\n")) : null;
}
// ../../../node_modules/.pnpm/monaco-editor@0.52.2/node_modules/monaco-editor/esm/vs/editor/contrib/linesOperations/browser/linesOperations.js
var CR = class extends O {
	constructor(e, t) {
		super(t), this.down = e;
	}
	run(e, t) {
		if (!t.hasModel()) return;
		let n = t.getSelections().map((e, t) => ({
			selection: e,
			index: t,
			ignore: !1
		}));
		n.sort((e, t) => E.compareRangesUsingStarts(e.selection, t.selection));
		let r = n[0];
		for (let e = 1; e < n.length; e++) {
			let t = n[e];
			r.selection.endLineNumber === t.selection.startLineNumber && (r.index < t.index ? t.ignore = !0 : (r.ignore = !0, r = t));
		}
		let i = [];
		for (let e of n) i.push(new gR(e.selection, this.down, e.ignore));
		t.pushUndoStop(), t.executeCommands(this.id, i), t.pushUndoStop();
	}
}, wR = class extends CR {
	constructor() {
		super(!1, {
			id: "editor.action.copyLinesUpAction",
			label: B("lines.copyUp", "Copy Line Up"),
			alias: "Copy Line Up",
			precondition: I.writable,
			kbOpts: {
				kbExpr: I.editorTextFocus,
				primary: 1552,
				linux: { primary: 3600 },
				weight: 100
			},
			menuOpts: {
				menuId: F.MenubarSelectionMenu,
				group: "2_line",
				title: B({
					key: "miCopyLinesUp",
					comment: ["&& denotes a mnemonic"]
				}, "&&Copy Line Up"),
				order: 1
			}
		});
	}
}, TR = class extends CR {
	constructor() {
		super(!0, {
			id: "editor.action.copyLinesDownAction",
			label: B("lines.copyDown", "Copy Line Down"),
			alias: "Copy Line Down",
			precondition: I.writable,
			kbOpts: {
				kbExpr: I.editorTextFocus,
				primary: 1554,
				linux: { primary: 3602 },
				weight: 100
			},
			menuOpts: {
				menuId: F.MenubarSelectionMenu,
				group: "2_line",
				title: B({
					key: "miCopyLinesDown",
					comment: ["&& denotes a mnemonic"]
				}, "Co&&py Line Down"),
				order: 2
			}
		});
	}
}, ER = class extends O {
	constructor() {
		super({
			id: "editor.action.duplicateSelection",
			label: B("duplicateSelection", "Duplicate Selection"),
			alias: "Duplicate Selection",
			precondition: I.writable,
			menuOpts: {
				menuId: F.MenubarSelectionMenu,
				group: "2_line",
				title: B({
					key: "miDuplicateSelection",
					comment: ["&& denotes a mnemonic"]
				}, "&&Duplicate Selection"),
				order: 5
			}
		});
	}
	run(e, t, n) {
		if (!t.hasModel()) return;
		let r = [], i = t.getSelections(), a = t.getModel();
		for (let e of i) if (e.isEmpty()) r.push(new gR(e, !0));
		else {
			let t = new V(e.endLineNumber, e.endColumn, e.endLineNumber, e.endColumn);
			r.push(new Co(t, a.getValueInRange(e)));
		}
		t.pushUndoStop(), t.executeCommands(this.id, r), t.pushUndoStop();
	}
}, DR = class extends O {
	constructor(e, t) {
		super(t), this.down = e;
	}
	run(e, t) {
		let n = e.get(Tn), r = [], i = t.getSelections() || [], a = t.getOption(12);
		for (let e of i) r.push(new yR(e, this.down, a, n));
		t.pushUndoStop(), t.executeCommands(this.id, r), t.pushUndoStop();
	}
}, OR = class extends DR {
	constructor() {
		super(!1, {
			id: "editor.action.moveLinesUpAction",
			label: B("lines.moveUp", "Move Line Up"),
			alias: "Move Line Up",
			precondition: I.writable,
			kbOpts: {
				kbExpr: I.editorTextFocus,
				primary: 528,
				linux: { primary: 528 },
				weight: 100
			},
			menuOpts: {
				menuId: F.MenubarSelectionMenu,
				group: "2_line",
				title: B({
					key: "miMoveLinesUp",
					comment: ["&& denotes a mnemonic"]
				}, "Mo&&ve Line Up"),
				order: 3
			}
		});
	}
}, kR = class extends DR {
	constructor() {
		super(!0, {
			id: "editor.action.moveLinesDownAction",
			label: B("lines.moveDown", "Move Line Down"),
			alias: "Move Line Down",
			precondition: I.writable,
			kbOpts: {
				kbExpr: I.editorTextFocus,
				primary: 530,
				linux: { primary: 530 },
				weight: 100
			},
			menuOpts: {
				menuId: F.MenubarSelectionMenu,
				group: "2_line",
				title: B({
					key: "miMoveLinesDown",
					comment: ["&& denotes a mnemonic"]
				}, "Move &&Line Down"),
				order: 4
			}
		});
	}
}, AR = class extends O {
	constructor(e, t) {
		super(t), this.descending = e;
	}
	run(e, t) {
		if (!t.hasModel()) return;
		let n = t.getModel(), r = t.getSelections();
		r.length === 1 && r[0].isEmpty() && (r = [new V(1, 1, n.getLineCount(), n.getLineMaxColumn(n.getLineCount()))]);
		for (let e of r) if (!bR.canRun(t.getModel(), e, this.descending)) return;
		let i = [];
		for (let e = 0, t = r.length; e < t; e++) i[e] = new bR(r[e], this.descending);
		t.pushUndoStop(), t.executeCommands(this.id, i), t.pushUndoStop();
	}
}, jR = class extends AR {
	constructor() {
		super(!1, {
			id: "editor.action.sortLinesAscending",
			label: B("lines.sortAscending", "Sort Lines Ascending"),
			alias: "Sort Lines Ascending",
			precondition: I.writable
		});
	}
}, MR = class extends AR {
	constructor() {
		super(!0, {
			id: "editor.action.sortLinesDescending",
			label: B("lines.sortDescending", "Sort Lines Descending"),
			alias: "Sort Lines Descending",
			precondition: I.writable
		});
	}
}, NR = class extends O {
	constructor() {
		super({
			id: "editor.action.removeDuplicateLines",
			label: B("lines.deleteDuplicates", "Delete Duplicate Lines"),
			alias: "Delete Duplicate Lines",
			precondition: I.writable
		});
	}
	run(e, t) {
		if (!t.hasModel()) return;
		let n = t.getModel();
		if (n.getLineCount() === 1 && n.getLineMaxColumn(1) === 1) return;
		let r = [], i = [], a = 0, o = !0, s = t.getSelections();
		s.length === 1 && s[0].isEmpty() && (s = [new V(1, 1, n.getLineCount(), n.getLineMaxColumn(n.getLineCount()))], o = !1);
		for (let e of s) {
			let t = /* @__PURE__ */ new Set(), o = [];
			for (let r = e.startLineNumber; r <= e.endLineNumber; r++) {
				let e = n.getLineContent(r);
				t.has(e) || (o.push(e), t.add(e));
			}
			let s = new V(e.startLineNumber, 1, e.endLineNumber, n.getLineMaxColumn(e.endLineNumber)), c = e.startLineNumber - a, l = new V(c, 1, c + o.length - 1, o[o.length - 1].length);
			r.push(fr.replace(s, o.join("\n"))), i.push(l), a += e.endLineNumber - e.startLineNumber + 1 - o.length;
		}
		t.pushUndoStop(), t.executeEdits(this.id, r, o ? i : void 0), t.pushUndoStop();
	}
}, PR = class e extends O {
	static {
		this.ID = "editor.action.trimTrailingWhitespace";
	}
	constructor() {
		super({
			id: e.ID,
			label: B("lines.trimTrailingWhitespace", "Trim Trailing Whitespace"),
			alias: "Trim Trailing Whitespace",
			precondition: I.writable,
			kbOpts: {
				kbExpr: I.editorTextFocus,
				primary: Ro(2089, 2102),
				weight: 100
			}
		});
	}
	run(e, t, n) {
		let r = [];
		n.reason === "auto-save" && (r = (t.getSelections() || []).map((e) => new b(e.positionLineNumber, e.positionColumn)));
		let i = t.getSelection();
		if (i === null) return;
		let a = e.get(Fl), o = t.getModel(), s = a.getValue("files.trimTrailingWhitespaceInRegexAndStrings", {
			overrideIdentifier: o?.getLanguageId(),
			resource: o?.uri
		}), c = new mR(i, r, s);
		t.pushUndoStop(), t.executeCommands(this.id, [c]), t.pushUndoStop();
	}
}, FR = class extends O {
	constructor() {
		super({
			id: "editor.action.deleteLines",
			label: B("lines.delete", "Delete Line"),
			alias: "Delete Line",
			precondition: I.writable,
			kbOpts: {
				kbExpr: I.textInputFocus,
				primary: 3113,
				weight: 100
			}
		});
	}
	run(e, t) {
		if (!t.hasModel()) return;
		let n = this._getLinesToRemove(t), r = t.getModel();
		if (r.getLineCount() === 1 && r.getLineMaxColumn(1) === 1) return;
		let i = 0, a = [], o = [];
		for (let e = 0, t = n.length; e < t; e++) {
			let t = n[e], s = t.startLineNumber, c = t.endLineNumber, l = 1, u = r.getLineMaxColumn(c);
			c < r.getLineCount() ? (c += 1, u = 1) : s > 1 && (--s, l = r.getLineMaxColumn(s)), a.push(fr.replace(new V(s, l, c, u), "")), o.push(new V(s - i, t.positionColumn, s - i, t.positionColumn)), i += t.endLineNumber - t.startLineNumber + 1;
		}
		t.pushUndoStop(), t.executeEdits(this.id, a, o), t.pushUndoStop();
	}
	_getLinesToRemove(e) {
		let t = e.getSelections().map((e) => {
			let t = e.endLineNumber;
			return e.startLineNumber < e.endLineNumber && e.endColumn === 1 && --t, {
				startLineNumber: e.startLineNumber,
				selectionStartColumn: e.selectionStartColumn,
				endLineNumber: t,
				positionColumn: e.positionColumn
			};
		});
		t.sort((e, t) => e.startLineNumber === t.startLineNumber ? e.endLineNumber - t.endLineNumber : e.startLineNumber - t.startLineNumber);
		let n = [], r = t[0];
		for (let e = 1; e < t.length; e++) r.endLineNumber + 1 >= t[e].startLineNumber ? r.endLineNumber = t[e].endLineNumber : (n.push(r), r = t[e]);
		return n.push(r), n;
	}
}, IR = class extends O {
	constructor() {
		super({
			id: "editor.action.indentLines",
			label: B("lines.indent", "Indent Line"),
			alias: "Indent Line",
			precondition: I.writable,
			kbOpts: {
				kbExpr: I.editorTextFocus,
				primary: 2142,
				weight: 100
			}
		});
	}
	run(e, t) {
		let n = t._getViewModel();
		n && (t.pushUndoStop(), t.executeCommands(this.id, As.indent(n.cursorConfig, t.getModel(), t.getSelections())), t.pushUndoStop());
	}
}, LR = class extends O {
	constructor() {
		super({
			id: "editor.action.outdentLines",
			label: B("lines.outdent", "Outdent Line"),
			alias: "Outdent Line",
			precondition: I.writable,
			kbOpts: {
				kbExpr: I.editorTextFocus,
				primary: 2140,
				weight: 100
			}
		});
	}
	run(e, t) {
		Ka.Outdent.runEditorCommand(e, t, null);
	}
}, RR = class extends O {
	constructor() {
		super({
			id: "editor.action.insertLineBefore",
			label: B("lines.insertBefore", "Insert Line Above"),
			alias: "Insert Line Above",
			precondition: I.writable,
			kbOpts: {
				kbExpr: I.editorTextFocus,
				primary: 3075,
				weight: 100
			}
		});
	}
	run(e, t) {
		let n = t._getViewModel();
		n && (t.pushUndoStop(), t.executeCommands(this.id, hc.lineInsertBefore(n.cursorConfig, t.getModel(), t.getSelections())));
	}
}, zR = class extends O {
	constructor() {
		super({
			id: "editor.action.insertLineAfter",
			label: B("lines.insertAfter", "Insert Line Below"),
			alias: "Insert Line Below",
			precondition: I.writable,
			kbOpts: {
				kbExpr: I.editorTextFocus,
				primary: 2051,
				weight: 100
			}
		});
	}
	run(e, t) {
		let n = t._getViewModel();
		n && (t.pushUndoStop(), t.executeCommands(this.id, hc.lineInsertAfter(n.cursorConfig, t.getModel(), t.getSelections())));
	}
}, BR = class extends O {
	run(e, t) {
		if (!t.hasModel()) return;
		let n = t.getSelection(), r = this._getRangesToDelete(t), i = [];
		for (let e = 0, t = r.length - 1; e < t; e++) {
			let t = r[e], n = r[e + 1];
			E.intersectRanges(t, n) === null ? i.push(t) : r[e + 1] = E.plusRange(t, n);
		}
		i.push(r[r.length - 1]);
		let a = this._getEndCursorState(n, i), o = i.map((e) => fr.replace(e, ""));
		t.pushUndoStop(), t.executeEdits(this.id, o, a), t.pushUndoStop();
	}
}, VR = class extends BR {
	constructor() {
		super({
			id: "deleteAllLeft",
			label: B("lines.deleteAllLeft", "Delete All Left"),
			alias: "Delete All Left",
			precondition: I.writable,
			kbOpts: {
				kbExpr: I.textInputFocus,
				primary: 0,
				mac: { primary: 2049 },
				weight: 100
			}
		});
	}
	_getEndCursorState(e, t) {
		let n = null, r = [], i = 0;
		return t.forEach((t) => {
			let a;
			if (t.endColumn === 1 && i > 0) {
				let e = t.startLineNumber - i;
				a = new V(e, t.startColumn, e, t.startColumn);
			} else a = new V(t.startLineNumber, t.startColumn, t.startLineNumber, t.startColumn);
			i += t.endLineNumber - t.startLineNumber, t.intersectRanges(e) ? n = a : r.push(a);
		}), n && r.unshift(n), r;
	}
	_getRangesToDelete(e) {
		let t = e.getSelections();
		if (t === null) return [];
		let n = t, r = e.getModel();
		return r === null ? [] : (n.sort(E.compareRangesUsingStarts), n = n.map((e) => {
			if (e.isEmpty()) {
				if (e.startColumn === 1) {
					let t = Math.max(1, e.startLineNumber - 1), n = e.startLineNumber === 1 ? 1 : r.getLineLength(t) + 1;
					return new E(t, n, e.startLineNumber, 1);
				}
				return new E(e.startLineNumber, 1, e.startLineNumber, e.startColumn);
			}
			return new E(e.startLineNumber, 1, e.endLineNumber, e.endColumn);
		}), n);
	}
}, HR = class extends BR {
	constructor() {
		super({
			id: "deleteAllRight",
			label: B("lines.deleteAllRight", "Delete All Right"),
			alias: "Delete All Right",
			precondition: I.writable,
			kbOpts: {
				kbExpr: I.textInputFocus,
				primary: 0,
				mac: {
					primary: 297,
					secondary: [2068]
				},
				weight: 100
			}
		});
	}
	_getEndCursorState(e, t) {
		let n = null, r = [];
		for (let i = 0, a = t.length; i < a; i++) {
			let a = t[i], o = new V(a.startLineNumber - 0, a.startColumn, a.startLineNumber - 0, a.startColumn);
			a.intersectRanges(e) ? n = o : r.push(o);
		}
		return n && r.unshift(n), r;
	}
	_getRangesToDelete(e) {
		let t = e.getModel();
		if (t === null) return [];
		let n = e.getSelections();
		if (n === null) return [];
		let r = n.map((e) => {
			if (e.isEmpty()) {
				let n = t.getLineMaxColumn(e.startLineNumber);
				return e.startColumn === n ? new E(e.startLineNumber, e.startColumn, e.startLineNumber + 1, 1) : new E(e.startLineNumber, e.startColumn, e.startLineNumber, n);
			}
			return e;
		});
		return r.sort(E.compareRangesUsingStarts), r;
	}
}, UR = class extends O {
	constructor() {
		super({
			id: "editor.action.joinLines",
			label: B("lines.joinLines", "Join Lines"),
			alias: "Join Lines",
			precondition: I.writable,
			kbOpts: {
				kbExpr: I.editorTextFocus,
				primary: 0,
				mac: { primary: 296 },
				weight: 100
			}
		});
	}
	run(e, t) {
		let n = t.getSelections();
		if (n === null) return;
		let r = t.getSelection();
		if (r === null) return;
		n.sort(E.compareRangesUsingStarts);
		let i = [], a = n.reduce((e, t) => e.isEmpty() ? e.endLineNumber === t.startLineNumber ? (r.equalsSelection(e) && (r = t), t) : t.startLineNumber > e.endLineNumber + 1 ? (i.push(e), t) : new V(e.startLineNumber, e.startColumn, t.endLineNumber, t.endColumn) : t.startLineNumber > e.endLineNumber ? (i.push(e), t) : new V(e.startLineNumber, e.startColumn, t.endLineNumber, t.endColumn));
		i.push(a);
		let o = t.getModel();
		if (o === null) return;
		let s = [], c = [], l = r, u = 0;
		for (let e = 0, t = i.length; e < t; e++) {
			let t = i[e], n = t.startLineNumber, a = 0, d, f, p = o.getLineLength(t.endLineNumber) - t.endColumn;
			if (t.isEmpty() || t.startLineNumber === t.endLineNumber) {
				let e = t.getStartPosition();
				e.lineNumber < o.getLineCount() ? (d = n + 1, f = o.getLineMaxColumn(d)) : (d = e.lineNumber, f = o.getLineMaxColumn(e.lineNumber));
			} else d = t.endLineNumber, f = o.getLineMaxColumn(d);
			let m = o.getLineContent(n);
			for (let e = n + 1; e <= d; e++) {
				let t = o.getLineContent(e), n = o.getLineFirstNonWhitespaceColumn(e);
				if (n >= 1) {
					let e = !0;
					m === "" && (e = !1), e && (m.charAt(m.length - 1) === " " || m.charAt(m.length - 1) === "	") && (e = !1, m = m.replace(/[\s\uFEFF\xA0]+$/g, " "));
					let r = t.substr(n - 1);
					m += (e ? " " : "") + r, a = e ? r.length + 1 : r.length;
				} else a = 0;
			}
			let h = new E(n, 1, d, f);
			if (!h.isEmpty()) {
				let e;
				t.isEmpty() ? (s.push(fr.replace(h, m)), e = new V(h.startLineNumber - u, m.length - a + 1, n - u, m.length - a + 1)) : t.startLineNumber === t.endLineNumber ? (s.push(fr.replace(h, m)), e = new V(t.startLineNumber - u, t.startColumn, t.endLineNumber - u, t.endColumn)) : (s.push(fr.replace(h, m)), e = new V(t.startLineNumber - u, t.startColumn, t.startLineNumber - u, m.length - p)), E.intersectRanges(h, r) === null ? c.push(e) : l = e;
			}
			u += h.endLineNumber - h.startLineNumber;
		}
		c.unshift(l), t.pushUndoStop(), t.executeEdits(this.id, s, c), t.pushUndoStop();
	}
}, WR = class extends O {
	constructor() {
		super({
			id: "editor.action.transpose",
			label: B("editor.transpose", "Transpose Characters around the Cursor"),
			alias: "Transpose Characters around the Cursor",
			precondition: I.writable
		});
	}
	run(e, t) {
		let n = t.getSelections();
		if (n === null) return;
		let r = t.getModel();
		if (r === null) return;
		let i = [];
		for (let e = 0, t = n.length; e < t; e++) {
			let t = n[e];
			if (!t.isEmpty()) continue;
			let a = t.getStartPosition(), o = r.getLineMaxColumn(a.lineNumber);
			if (a.column >= o) {
				if (a.lineNumber === r.getLineCount()) continue;
				let e = new E(a.lineNumber, Math.max(1, a.column - 1), a.lineNumber + 1, 1), t = r.getValueInRange(e).split("").reverse().join("");
				i.push(new Ys(new V(a.lineNumber, Math.max(1, a.column - 1), a.lineNumber + 1, 1), t));
			} else {
				let e = new E(a.lineNumber, Math.max(1, a.column - 1), a.lineNumber, a.column + 1), t = r.getValueInRange(e).split("").reverse().join("");
				i.push(new bs(e, t, new V(a.lineNumber, a.column + 1, a.lineNumber, a.column + 1)));
			}
		}
		t.pushUndoStop(), t.executeCommands(this.id, i), t.pushUndoStop();
	}
}, GR = class extends O {
	run(e, t) {
		let n = t.getSelections();
		if (n === null) return;
		let r = t.getModel();
		if (r === null) return;
		let i = t.getOption(132), a = [];
		for (let e of n) if (e.isEmpty()) {
			let n = e.getStartPosition(), o = t.getConfiguredWordAtPosition(n);
			if (!o) continue;
			let s = new E(n.lineNumber, o.startColumn, n.lineNumber, o.endColumn), c = r.getValueInRange(s);
			a.push(fr.replace(s, this._modifyText(c, i)));
		} else {
			let t = r.getValueInRange(e);
			a.push(fr.replace(e, this._modifyText(t, i)));
		}
		t.pushUndoStop(), t.executeEdits(this.id, a), t.pushUndoStop();
	}
}, KR = class extends GR {
	constructor() {
		super({
			id: "editor.action.transformToUppercase",
			label: B("editor.transformToUppercase", "Transform to Uppercase"),
			alias: "Transform to Uppercase",
			precondition: I.writable
		});
	}
	_modifyText(e, t) {
		return e.toLocaleUpperCase();
	}
}, qR = class extends GR {
	constructor() {
		super({
			id: "editor.action.transformToLowercase",
			label: B("editor.transformToLowercase", "Transform to Lowercase"),
			alias: "Transform to Lowercase",
			precondition: I.writable
		});
	}
	_modifyText(e, t) {
		return e.toLocaleLowerCase();
	}
}, JR = class {
	constructor(e, t) {
		this._pattern = e, this._flags = t, this._actual = null, this._evaluated = !1;
	}
	get() {
		if (!this._evaluated) {
			this._evaluated = !0;
			try {
				this._actual = new RegExp(this._pattern, this._flags);
			} catch {}
		}
		return this._actual;
	}
	isSupported() {
		return this.get() !== null;
	}
}, YR = class e extends GR {
	static {
		this.titleBoundary = new JR("(^|[^\\p{L}\\p{N}']|((^|\\P{L})'))\\p{L}", "gmu");
	}
	constructor() {
		super({
			id: "editor.action.transformToTitlecase",
			label: B("editor.transformToTitlecase", "Transform to Title Case"),
			alias: "Transform to Title Case",
			precondition: I.writable
		});
	}
	_modifyText(t, n) {
		let r = e.titleBoundary.get();
		return r ? t.toLocaleLowerCase().replace(r, (e) => e.toLocaleUpperCase()) : t;
	}
}, XR = class e extends GR {
	static {
		this.caseBoundary = new JR("(\\p{Ll})(\\p{Lu})", "gmu");
	}
	static {
		this.singleLetters = new JR("(\\p{Lu}|\\p{N})(\\p{Lu})(\\p{Ll})", "gmu");
	}
	constructor() {
		super({
			id: "editor.action.transformToSnakecase",
			label: B("editor.transformToSnakecase", "Transform to Snake Case"),
			alias: "Transform to Snake Case",
			precondition: I.writable
		});
	}
	_modifyText(t, n) {
		let r = e.caseBoundary.get(), i = e.singleLetters.get();
		return !r || !i ? t : t.replace(r, "$1_$2").replace(i, "$1_$2$3").toLocaleLowerCase();
	}
}, ZR = class e extends GR {
	static {
		this.wordBoundary = new JR("[_\\s-]", "gm");
	}
	constructor() {
		super({
			id: "editor.action.transformToCamelcase",
			label: B("editor.transformToCamelcase", "Transform to Camel Case"),
			alias: "Transform to Camel Case",
			precondition: I.writable
		});
	}
	_modifyText(t, n) {
		let r = e.wordBoundary.get();
		if (!r) return t;
		let i = t.split(r);
		return i.shift() + i.map((e) => e.substring(0, 1).toLocaleUpperCase() + e.substring(1)).join("");
	}
}, QR = class e extends GR {
	static {
		this.wordBoundary = new JR("[_\\s-]", "gm");
	}
	static {
		this.wordBoundaryToMaintain = new JR("(?<=\\.)", "gm");
	}
	constructor() {
		super({
			id: "editor.action.transformToPascalcase",
			label: B("editor.transformToPascalcase", "Transform to Pascal Case"),
			alias: "Transform to Pascal Case",
			precondition: I.writable
		});
	}
	_modifyText(t, n) {
		let r = e.wordBoundary.get(), i = e.wordBoundaryToMaintain.get();
		return !r || !i ? t : t.split(i).map((e) => e.split(r)).flat().map((e) => e.substring(0, 1).toLocaleUpperCase() + e.substring(1)).join("");
	}
}, $R = class e extends GR {
	static isSupported() {
		return [
			this.caseBoundary,
			this.singleLetters,
			this.underscoreBoundary
		].every((e) => e.isSupported());
	}
	static {
		this.caseBoundary = new JR("(\\p{Ll})(\\p{Lu})", "gmu");
	}
	static {
		this.singleLetters = new JR("(\\p{Lu}|\\p{N})(\\p{Lu}\\p{Ll})", "gmu");
	}
	static {
		this.underscoreBoundary = new JR("(\\S)(_)(\\S)", "gm");
	}
	constructor() {
		super({
			id: "editor.action.transformToKebabcase",
			label: B("editor.transformToKebabcase", "Transform to Kebab Case"),
			alias: "Transform to Kebab Case",
			precondition: I.writable
		});
	}
	_modifyText(t, n) {
		let r = e.caseBoundary.get(), i = e.singleLetters.get(), a = e.underscoreBoundary.get();
		return !r || !i || !a ? t : t.replace(a, "$1-$3").replace(r, "$1-$2").replace(i, "$1-$2").toLocaleLowerCase();
	}
};
k(wR), k(TR), k(ER), k(OR), k(kR), k(jR), k(MR), k(NR), k(PR), k(FR), k(IR), k(LR), k(RR), k(zR), k(VR), k(HR), k(UR), k(WR), k(KR), k(qR), XR.caseBoundary.isSupported() && XR.singleLetters.isSupported() && k(XR), ZR.wordBoundary.isSupported() && k(ZR), QR.wordBoundary.isSupported() && k(QR), YR.titleBoundary.isSupported() && k(YR), $R.isSupported() && k($R);
// ../../../node_modules/.pnpm/monaco-editor@0.52.2/node_modules/monaco-editor/esm/vs/editor/contrib/linkedEditing/browser/linkedEditing.js
var ez = function(e, t, n, r) {
	var i = arguments.length, a = i < 3 ? t : r === null ? r = Object.getOwnPropertyDescriptor(t, n) : r, o;
	if (typeof Reflect == "object" && typeof Reflect.decorate == "function") a = Reflect.decorate(e, t, n, r);
	else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (i < 3 ? o(a) : i > 3 ? o(t, n, a) : o(t, n)) || a);
	return i > 3 && a && Object.defineProperty(t, n, a), a;
}, tz = function(e, t) {
	return function(n, r) {
		t(n, r, e);
	};
}, nz, rz = new z("LinkedEditingInputVisible", !1), iz = "linked-editing-decoration", az = class extends U {
	static {
		nz = this;
	}
	static {
		this.ID = "editor.contrib.linkedEditing";
	}
	static {
		this.DECORATION = L.register({
			description: "linked-editing",
			stickiness: 0,
			className: iz
		});
	}
	static get(e) {
		return e.getContribution(nz.ID);
	}
	constructor(e, t, n, r, i) {
		super(), this.languageConfigurationService = r, this._syncRangesToken = 0, this._localToDispose = this._register(new g()), this._editor = e, this._providers = n.linkedEditingRangeProvider, this._enabled = !1, this._visibleContextKey = rz.bindTo(t), this._debounceInformation = i.for(this._providers, "Linked Editing", { max: 200 }), this._currentDecorations = this._editor.createDecorationsCollection(), this._languageWordPattern = null, this._currentWordPattern = null, this._ignoreChangeEvent = !1, this._localToDispose = this._register(new g()), this._rangeUpdateTriggerPromise = null, this._rangeSyncTriggerPromise = null, this._currentRequestCts = null, this._currentRequestPosition = null, this._currentRequestModelVersion = null, this._register(this._editor.onDidChangeModel(() => this.reinitialize(!0))), this._register(this._editor.onDidChangeConfiguration((e) => {
			(e.hasChanged(70) || e.hasChanged(94)) && this.reinitialize(!1);
		})), this._register(this._providers.onDidChange(() => this.reinitialize(!1))), this._register(this._editor.onDidChangeModelLanguage(() => this.reinitialize(!0))), this.reinitialize(!0);
	}
	reinitialize(e) {
		let t = this._editor.getModel(), n = t !== null && (this._editor.getOption(70) || this._editor.getOption(94)) && this._providers.has(t);
		if (n === this._enabled && !e || (this._enabled = n, this.clearRanges(), this._localToDispose.clear(), !n || t === null)) return;
		this._localToDispose.add(wt.runAndSubscribe(t.onDidChangeLanguageConfiguration, () => {
			this._languageWordPattern = this.languageConfigurationService.getLanguageConfiguration(t.getLanguageId()).getWordDefinition();
		}));
		let r = new ge(this._debounceInformation.get(t)), i = () => {
			this._rangeUpdateTriggerPromise = r.trigger(() => this.updateRanges(), this._debounceDuration ?? this._debounceInformation.get(t));
		}, a = new ge(0), o = (e) => {
			this._rangeSyncTriggerPromise = a.trigger(() => this._syncRanges(e));
		};
		this._localToDispose.add(this._editor.onDidChangeCursorPosition(() => {
			i();
		})), this._localToDispose.add(this._editor.onDidChangeModelContent((e) => {
			if (!this._ignoreChangeEvent && this._currentDecorations.length > 0) {
				let t = this._currentDecorations.getRange(0);
				if (t && e.changes.every((e) => t.intersectRanges(e.range))) {
					o(this._syncRangesToken);
					return;
				}
			}
			i();
		})), this._localToDispose.add({ dispose: () => {
			r.dispose(), a.dispose();
		} }), this.updateRanges();
	}
	_syncRanges(e) {
		if (!this._editor.hasModel() || e !== this._syncRangesToken || this._currentDecorations.length === 0) return;
		let t = this._editor.getModel(), n = this._currentDecorations.getRange(0);
		if (!n || n.startLineNumber !== n.endLineNumber) return this.clearRanges();
		let r = t.getValueInRange(n);
		if (this._currentWordPattern) {
			let e = r.match(this._currentWordPattern);
			if ((e ? e[0].length : 0) !== r.length) return this.clearRanges();
		}
		let i = [];
		for (let e = 1, n = this._currentDecorations.length; e < n; e++) {
			let n = this._currentDecorations.getRange(e);
			if (n) {
				if (n.startLineNumber !== n.endLineNumber) i.push({
					range: n,
					text: r
				});
				else {
					let e = t.getValueInRange(n), a = r, o = n.startColumn, s = n.endColumn, c = $t(e, a);
					o += c, e = e.substr(c), a = a.substr(c);
					let l = sr(e, a);
					s -= l, e = e.substr(0, e.length - l), a = a.substr(0, a.length - l), (o !== s || a.length !== 0) && i.push({
						range: new E(n.startLineNumber, o, n.endLineNumber, s),
						text: a
					});
				}
			}
		}
		if (i.length !== 0) try {
			this._editor.popUndoStop(), this._ignoreChangeEvent = !0;
			let e = this._editor._getViewModel().getPrevEditOperationType();
			this._editor.executeEdits("linkedEditing", i), this._editor._getViewModel().setPrevEditOperationType(e);
		} finally {
			this._ignoreChangeEvent = !1;
		}
	}
	dispose() {
		this.clearRanges(), super.dispose();
	}
	clearRanges() {
		this._visibleContextKey.set(!1), this._currentDecorations.clear(), this._currentRequestCts && (this._currentRequestCts.cancel(), this._currentRequestCts = null, this._currentRequestPosition = null);
	}
	async updateRanges(e = !1) {
		if (!this._editor.hasModel()) {
			this.clearRanges();
			return;
		}
		let t = this._editor.getPosition();
		if (!this._enabled && !e || this._editor.getSelections().length > 1) {
			this.clearRanges();
			return;
		}
		let n = this._editor.getModel(), r = n.getVersionId();
		if (this._currentRequestPosition && this._currentRequestModelVersion === r) {
			if (t.equals(this._currentRequestPosition)) return;
			if (this._currentDecorations.length > 0) {
				let e = this._currentDecorations.getRange(0);
				if (e && e.containsPosition(t)) return;
			}
		}
		this.clearRanges(), this._currentRequestPosition = t, this._currentRequestModelVersion = r;
		let i = this._currentRequestCts = new Cn();
		try {
			let e = new lr(!1), a = await cz(this._providers, n, t, i.token);
			if (this._debounceInformation.update(n, e.elapsed()), i !== this._currentRequestCts || (this._currentRequestCts = null, r !== n.getVersionId())) return;
			let o = [];
			a?.ranges && (o = a.ranges), this._currentWordPattern = a?.wordPattern || this._languageWordPattern;
			let s = !1;
			for (let e = 0, n = o.length; e < n; e++) if (E.containsPosition(o[e], t)) {
				if (s = !0, e !== 0) {
					let t = o[e];
					o.splice(e, 1), o.unshift(t);
				}
				break;
			}
			if (!s) {
				this.clearRanges();
				return;
			}
			let c = o.map((e) => ({
				range: e,
				options: nz.DECORATION
			}));
			this._visibleContextKey.set(!0), this._currentDecorations.set(c), this._syncRangesToken++;
		} catch (e) {
			Li(e) || er(e), this._currentRequestCts !== i && this._currentRequestCts || this.clearRanges();
		}
	}
};
az = nz = ez([
	tz(1, j),
	tz(2, M),
	tz(3, Tn),
	tz(4, hi)
], az);
var oz = class extends O {
	constructor() {
		super({
			id: "editor.action.linkedEditing",
			label: B("linkedEditing.label", "Start Linked Editing"),
			alias: "Start Linked Editing",
			precondition: N.and(I.writable, I.hasRenameProvider),
			kbOpts: {
				kbExpr: I.editorTextFocus,
				primary: 3132,
				weight: 100
			}
		});
	}
	runCommand(e, t) {
		let n = e.get(Ln), [r, i] = Array.isArray(t) && t || [void 0, void 0];
		return De.isUri(r) && b.isIPosition(i) ? n.openCodeEditor({ resource: r }, n.getActiveCodeEditor()).then((e) => {
			e && (e.setPosition(i), e.invokeWithinContext((t) => (this.reportTelemetry(t, e), this.run(t, e))));
		}, er) : super.runCommand(e, t);
	}
	run(e, t) {
		let n = az.get(t);
		return n ? Promise.resolve(n.updateRanges(!0)) : Promise.resolve();
	}
}, sz = qt.bindToContribution(az.get);
A(new sz({
	id: "cancelLinkedEditingInput",
	precondition: rz,
	handler: (e) => e.clearRanges(),
	kbOpts: {
		kbExpr: I.editorTextFocus,
		weight: 199,
		primary: 9,
		secondary: [1033]
	}
}));
function cz(e, t, n, r) {
	let a = e.ordered(t);
	return qo(a.map((e) => async () => {
		try {
			return await e.provideLinkedEditingRanges(t, n, r);
		} catch (e) {
			i(e);
			return;
		}
	}), (e) => !!e && zl(e?.ranges));
}
S("editor.linkedEditingBackground", {
	dark: R.fromHex("#f00").transparent(.3),
	light: R.fromHex("#f00").transparent(.3),
	hcDark: R.fromHex("#f00").transparent(.3),
	hcLight: R.white
}, B("editorLinkedEditingBackground", "Background color when the editor auto renames on type.")), Ga("_executeLinkedEditingProvider", (e, t, n) => {
	let { linkedEditingRangeProvider: r } = e.get(M);
	return cz(r, t, n, C.None);
}), T(az.ID, az, 1), k(oz);
// ../../../node_modules/.pnpm/monaco-editor@0.52.2/node_modules/monaco-editor/esm/vs/editor/contrib/links/browser/getLinks.js
var lz = class {
	constructor(e, t) {
		this._link = e, this._provider = t;
	}
	toJSON() {
		return {
			range: this.range,
			url: this.url,
			tooltip: this.tooltip
		};
	}
	get range() {
		return this._link.range;
	}
	get url() {
		return this._link.url;
	}
	get tooltip() {
		return this._link.tooltip;
	}
	async resolve(e) {
		return this._link.url ? this._link.url : typeof this._provider.resolveLink == "function" ? Promise.resolve(this._provider.resolveLink(this._link, e)).then((t) => (this._link = t || this._link, this._link.url ? this.resolve(e) : Promise.reject(/* @__PURE__ */ Error("missing")))) : Promise.reject(/* @__PURE__ */ Error("missing"));
	}
}, uz = class e {
	constructor(t) {
		this._disposables = new g();
		let n = [];
		for (let [r, i] of t) {
			let t = r.links.map((e) => new lz(e, i));
			n = e._union(n, t), it(r) && this._disposables.add(r);
		}
		this.links = n;
	}
	dispose() {
		this._disposables.dispose(), this.links.length = 0;
	}
	static _union(e, t) {
		let n = [], r, i, a, o;
		for (r = 0, a = 0, i = e.length, o = t.length; r < i && a < o;) {
			let i = e[r], o = t[a];
			E.areIntersectingOrTouching(i.range, o.range) ? r++ : E.compareRangesUsingStarts(i.range, o.range) < 0 ? (n.push(i), r++) : (n.push(o), a++);
		}
		for (; r < i; r++) n.push(e[r]);
		for (; a < o; a++) n.push(t[a]);
		return n;
	}
};
function dz(e, t, n) {
	let r = [], a = e.ordered(t).reverse().map((e, a) => Promise.resolve(e.provideLinks(t, n)).then((t) => {
		t && (r[a] = [t, e]);
	}, i));
	return Promise.all(a).then(() => {
		let e = new uz(On(r));
		return n.isCancellationRequested ? (e.dispose(), new uz([])) : e;
	});
}
Ol.registerCommand("_executeLinkProvider", async (e, ...t) => {
	let [n, r] = t;
	y(n instanceof De), typeof r != "number" && (r = 0);
	let { linkProvider: i } = e.get(M), a = e.get(je).getModel(n);
	if (!a) return [];
	let o = await dz(i, a, C.None);
	if (!o) return [];
	for (let e = 0; e < Math.min(r, o.links.length); e++) await o.links[e].resolve(C.None);
	let s = o.links.slice(0);
	return o.dispose(), s;
});
// ../../../node_modules/.pnpm/monaco-editor@0.52.2/node_modules/monaco-editor/esm/vs/editor/contrib/links/browser/links.js
var fz = function(e, t, n, r) {
	var i = arguments.length, a = i < 3 ? t : r === null ? r = Object.getOwnPropertyDescriptor(t, n) : r, o;
	if (typeof Reflect == "object" && typeof Reflect.decorate == "function") a = Reflect.decorate(e, t, n, r);
	else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (i < 3 ? o(a) : i > 3 ? o(t, n, a) : o(t, n)) || a);
	return i > 3 && a && Object.defineProperty(t, n, a), a;
}, pz = function(e, t) {
	return function(n, r) {
		t(n, r, e);
	};
}, mz, hz = class extends U {
	static {
		mz = this;
	}
	static {
		this.ID = "editor.linkDetector";
	}
	static get(e) {
		return e.getContribution(mz.ID);
	}
	constructor(e, t, n, r, i) {
		super(), this.editor = e, this.openerService = t, this.notificationService = n, this.languageFeaturesService = r, this.providers = this.languageFeaturesService.linkProvider, this.debounceInformation = i.for(this.providers, "Links", {
			min: 1e3,
			max: 4e3
		}), this.computeLinks = this._register(new tl(() => this.computeLinksNow(), 1e3)), this.computePromise = null, this.activeLinksList = null, this.currentOccurrences = {}, this.activeLinkDecorationId = null;
		let a = this._register(new lD(e));
		this._register(a.onMouseMoveOrRelevantKeyDown(([e, t]) => {
			this._onEditorMouseMove(e, t);
		})), this._register(a.onExecute((e) => {
			this.onEditorMouseUp(e);
		})), this._register(a.onCancel((e) => {
			this.cleanUpActiveLinkDecoration();
		})), this._register(e.onDidChangeConfiguration((e) => {
			e.hasChanged(71) && (this.updateDecorations([]), this.stop(), this.computeLinks.schedule(0));
		})), this._register(e.onDidChangeModelContent((e) => {
			this.editor.hasModel() && this.computeLinks.schedule(this.debounceInformation.get(this.editor.getModel()));
		})), this._register(e.onDidChangeModel((e) => {
			this.currentOccurrences = {}, this.activeLinkDecorationId = null, this.stop(), this.computeLinks.schedule(0);
		})), this._register(e.onDidChangeModelLanguage((e) => {
			this.stop(), this.computeLinks.schedule(0);
		})), this._register(this.providers.onDidChange((e) => {
			this.stop(), this.computeLinks.schedule(0);
		})), this.computeLinks.schedule(0);
	}
	async computeLinksNow() {
		if (!this.editor.hasModel() || !this.editor.getOption(71)) return;
		let e = this.editor.getModel();
		if (!e.isTooLargeForSyncing() && this.providers.has(e)) {
			this.activeLinksList &&= (this.activeLinksList.dispose(), null), this.computePromise = Te((t) => dz(this.providers, e, t));
			try {
				let t = new lr(!1);
				if (this.activeLinksList = await this.computePromise, this.debounceInformation.update(e, t.elapsed()), e.isDisposed()) return;
				this.updateDecorations(this.activeLinksList.links);
			} catch (e) {
				er(e);
			} finally {
				this.computePromise = null;
			}
		}
	}
	updateDecorations(e) {
		let t = this.editor.getOption(78) === "altKey", n = [], r = Object.keys(this.currentOccurrences);
		for (let e of r) {
			let t = this.currentOccurrences[e];
			n.push(t.decorationId);
		}
		let i = [];
		if (e) for (let n of e) i.push(_z.decoration(n, t));
		this.editor.changeDecorations((t) => {
			let r = t.deltaDecorations(n, i);
			this.currentOccurrences = {}, this.activeLinkDecorationId = null;
			for (let t = 0, n = r.length; t < n; t++) {
				let n = new _z(e[t], r[t]);
				this.currentOccurrences[n.decorationId] = n;
			}
		});
	}
	_onEditorMouseMove(e, t) {
		let n = this.editor.getOption(78) === "altKey";
		if (this.isEnabled(e, t)) {
			this.cleanUpActiveLinkDecoration();
			let t = this.getLinkOccurrence(e.target.position);
			t && this.editor.changeDecorations((e) => {
				t.activate(e, n), this.activeLinkDecorationId = t.decorationId;
			});
		} else this.cleanUpActiveLinkDecoration();
	}
	cleanUpActiveLinkDecoration() {
		let e = this.editor.getOption(78) === "altKey";
		if (this.activeLinkDecorationId) {
			let t = this.currentOccurrences[this.activeLinkDecorationId];
			t && this.editor.changeDecorations((n) => {
				t.deactivate(n, e);
			}), this.activeLinkDecorationId = null;
		}
	}
	onEditorMouseUp(e) {
		if (!this.isEnabled(e)) return;
		let t = this.getLinkOccurrence(e.target.position);
		t && this.openLinkOccurrence(t, e.hasSideBySideModifier, !0);
	}
	openLinkOccurrence(e, t, n = !1) {
		if (!this.openerService) return;
		let { link: r } = e;
		r.resolve(C.None).then((e) => {
			if (typeof e == "string" && this.editor.hasModel()) {
				let t = this.editor.getModel().uri;
				if (t.scheme === Kc.file && e.startsWith(`${Kc.file}:`)) {
					let n = De.parse(e);
					if (n.scheme === Kc.file) {
						let r = Us(n), i = null;
						r.startsWith("/./") || r.startsWith("\\.\\") ? i = `.${r.substr(1)}` : (r.startsWith("//./") || r.startsWith("\\\\.\\")) && (i = `.${r.substr(2)}`), i && (e = Xa(t, i));
					}
				}
			}
			return this.openerService.open(e, {
				openToSide: t,
				fromUserGesture: n,
				allowContributedOpeners: !0,
				allowCommands: !0,
				fromWorkspace: !0
			});
		}, (e) => {
			let t = e instanceof Error ? e.message : e;
			t === "invalid" ? this.notificationService.warn(B("invalid.url", "Failed to open this link because it is not well-formed: {0}", r.url.toString())) : t === "missing" ? this.notificationService.warn(B("missing.url", "Failed to open this link because its target is missing.")) : er(e);
		});
	}
	getLinkOccurrence(e) {
		if (!this.editor.hasModel() || !e) return null;
		let t = this.editor.getModel().getDecorationsInRange({
			startLineNumber: e.lineNumber,
			startColumn: e.column,
			endLineNumber: e.lineNumber,
			endColumn: e.column
		}, 0, !0);
		for (let e of t) {
			let t = this.currentOccurrences[e.id];
			if (t) return t;
		}
		return null;
	}
	isEnabled(e, t) {
		return !!(e.target.type === 6 && (e.hasTriggerModifier || t && t.keyCodeIsTriggerKey));
	}
	stop() {
		this.computeLinks.cancel(), this.activeLinksList &&= (this.activeLinksList?.dispose(), null), this.computePromise &&= (this.computePromise.cancel(), null);
	}
	dispose() {
		super.dispose(), this.stop();
	}
};
hz = mz = fz([
	pz(1, p),
	pz(2, t),
	pz(3, M),
	pz(4, hi)
], hz);
var gz = {
	general: L.register({
		description: "detected-link",
		stickiness: 1,
		collapseOnReplaceEdit: !0,
		inlineClassName: "detected-link"
	}),
	active: L.register({
		description: "detected-link-active",
		stickiness: 1,
		collapseOnReplaceEdit: !0,
		inlineClassName: "detected-link-active"
	})
}, _z = class e {
	static decoration(t, n) {
		return {
			range: t.range,
			options: e._getOptions(t, n, !1)
		};
	}
	static _getOptions(e, t, n) {
		let r = { ...n ? gz.active : gz.general };
		return r.hoverMessage = vz(e, t), r;
	}
	constructor(e, t) {
		this.link = e, this.decorationId = t;
	}
	activate(t, n) {
		t.changeDecorationOptions(this.decorationId, e._getOptions(this.link, n, !0));
	}
	deactivate(t, n) {
		t.changeDecorationOptions(this.decorationId, e._getOptions(this.link, n, !1));
	}
};
function vz(e, t) {
	let n = e.url && /^command:/i.test(e.url.toString()), r = e.tooltip ? e.tooltip : n ? B("links.navigate.executeCmd", "Execute command") : B("links.navigate.follow", "Follow link"), i = t ? Xs ? B("links.navigate.kb.meta.mac", "cmd + click") : B("links.navigate.kb.meta", "ctrl + click") : Xs ? B("links.navigate.kb.alt.mac", "option + click") : B("links.navigate.kb.alt", "alt + click");
	if (e.url) {
		let t = "";
		if (/^command:/i.test(e.url.toString())) {
			let n = e.url.toString().match(/^command:([^?#]+)/);
			if (n) {
				let e = n[1];
				t = B("tooltip.explanation", "Execute command {0}", e);
			}
		}
		return new ws("", !0).appendLink(e.url.toString(!0).replace(/ /g, "%20"), r, t).appendMarkdown(` (${i})`);
	}
	return new ws().appendText(`${r} (${i})`);
}
var yz = class extends O {
	constructor() {
		super({
			id: "editor.action.openLink",
			label: B("label", "Open Link"),
			alias: "Open Link",
			precondition: void 0
		});
	}
	run(e, t) {
		let n = hz.get(t);
		if (!n || !t.hasModel()) return;
		let r = t.getSelections();
		for (let e of r) {
			let t = n.getLinkOccurrence(e.getEndPosition());
			t && n.openLinkOccurrence(t, !1);
		}
	}
};
T(hz.ID, hz, 1), k(yz);
// ../../../node_modules/.pnpm/monaco-editor@0.52.2/node_modules/monaco-editor/esm/vs/editor/contrib/longLinesHelper/browser/longLinesHelper.js
var bz = class extends U {
	static {
		this.ID = "editor.contrib.longLinesHelper";
	}
	constructor(e) {
		super(), this._editor = e, this._register(this._editor.onMouseDown((e) => {
			let t = this._editor.getOption(118);
			t >= 0 && e.target.type === 6 && e.target.position.column >= t && this._editor.updateOptions({ stopRenderingLineAfter: -1 });
		}));
	}
};
T(bz.ID, bz, 2);
// ../../../node_modules/.pnpm/monaco-editor@0.52.2/node_modules/monaco-editor/esm/vs/editor/contrib/wordHighlighter/browser/highlightDecorations.js
var xz = S("editor.wordHighlightBackground", {
	dark: "#575757B8",
	light: "#57575740",
	hcDark: null,
	hcLight: null
}, B("wordHighlight", "Background color of a symbol during read-access, like reading a variable. The color must not be opaque so as not to hide underlying decorations."), !0);
S("editor.wordHighlightStrongBackground", {
	dark: "#004972B8",
	light: "#0e639c40",
	hcDark: null,
	hcLight: null
}, B("wordHighlightStrong", "Background color of a symbol during write-access, like writing to a variable. The color must not be opaque so as not to hide underlying decorations."), !0), S("editor.wordHighlightTextBackground", xz, B("wordHighlightText", "Background color of a textual occurrence for a symbol. The color must not be opaque so as not to hide underlying decorations."), !0);
var Sz = S("editor.wordHighlightBorder", {
	light: null,
	dark: null,
	hcDark: xt,
	hcLight: xt
}, B("wordHighlightBorder", "Border color of a symbol during read-access, like reading a variable."));
S("editor.wordHighlightStrongBorder", {
	light: null,
	dark: null,
	hcDark: xt,
	hcLight: xt
}, B("wordHighlightStrongBorder", "Border color of a symbol during write-access, like writing to a variable.")), S("editor.wordHighlightTextBorder", Sz, B("wordHighlightTextBorder", "Border color of a textual occurrence for a symbol."));
var Cz = S("editorOverviewRuler.wordHighlightForeground", "#A0A0A0CC", B("overviewRulerWordHighlightForeground", "Overview ruler marker color for symbol highlights. The color must not be opaque so as not to hide underlying decorations."), !0), wz = S("editorOverviewRuler.wordHighlightStrongForeground", "#C0A0C0CC", B("overviewRulerWordHighlightStrongForeground", "Overview ruler marker color for write-access symbol highlights. The color must not be opaque so as not to hide underlying decorations."), !0), Tz = S("editorOverviewRuler.wordHighlightTextForeground", bn, B("overviewRulerWordHighlightTextForeground", "Overview ruler marker color of a textual occurrence for a symbol. The color must not be opaque so as not to hide underlying decorations."), !0), Ez = L.register({
	description: "word-highlight-strong",
	stickiness: 1,
	className: "wordHighlightStrong",
	overviewRuler: {
		color: ra(wz),
		position: Mr.Center
	},
	minimap: {
		color: ra(Qi),
		position: 1
	}
}), Dz = L.register({
	description: "word-highlight-text",
	stickiness: 1,
	className: "wordHighlightText",
	overviewRuler: {
		color: ra(Tz),
		position: Mr.Center
	},
	minimap: {
		color: ra(Qi),
		position: 1
	}
}), Oz = L.register({
	description: "selection-highlight-overview",
	stickiness: 1,
	className: "selectionHighlight",
	overviewRuler: {
		color: ra(bn),
		position: Mr.Center
	},
	minimap: {
		color: ra(Qi),
		position: 1
	}
}), kz = L.register({
	description: "selection-highlight",
	stickiness: 1,
	className: "selectionHighlight"
}), Az = L.register({
	description: "word-highlight",
	stickiness: 1,
	className: "wordHighlight",
	overviewRuler: {
		color: ra(Cz),
		position: Mr.Center
	},
	minimap: {
		color: ra(Qi),
		position: 1
	}
});
function jz(e) {
	return e === Sa.Write ? Ez : e === Sa.Text ? Dz : Az;
}
function Mz(e) {
	return e ? kz : Oz;
}
Ao((e, t) => {
	let n = e.getColor(we);
	n && t.addRule(`.monaco-editor .selectionHighlight { background-color: ${n.transparent(.5)}; }`);
});
// ../../../node_modules/.pnpm/monaco-editor@0.52.2/node_modules/monaco-editor/esm/vs/editor/contrib/multicursor/browser/multicursor.js
var Nz = function(e, t, n, r) {
	var i = arguments.length, a = i < 3 ? t : r === null ? r = Object.getOwnPropertyDescriptor(t, n) : r, o;
	if (typeof Reflect == "object" && typeof Reflect.decorate == "function") a = Reflect.decorate(e, t, n, r);
	else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (i < 3 ? o(a) : i > 3 ? o(t, n, a) : o(t, n)) || a);
	return i > 3 && a && Object.defineProperty(t, n, a), a;
}, Pz = function(e, t) {
	return function(n, r) {
		t(n, r, e);
	};
}, Fz;
function Iz(e, t) {
	let n = t.filter((t) => !e.find((e) => e.equals(t)));
	if (n.length >= 1) {
		let e = n.map((e) => `line ${e.viewState.position.lineNumber} column ${e.viewState.position.column}`).join(", "), t = n.length === 1 ? B("cursorAdded", "Cursor added: {0}", e) : B("cursorsAdded", "Cursors added: {0}", e);
		Wr(t);
	}
}
var Lz = class extends O {
	constructor() {
		super({
			id: "editor.action.insertCursorAbove",
			label: B("mutlicursor.insertAbove", "Add Cursor Above"),
			alias: "Add Cursor Above",
			precondition: void 0,
			kbOpts: {
				kbExpr: I.editorTextFocus,
				primary: 2576,
				linux: {
					primary: 1552,
					secondary: [3088]
				},
				weight: 100
			},
			menuOpts: {
				menuId: F.MenubarSelectionMenu,
				group: "3_multi",
				title: B({
					key: "miInsertCursorAbove",
					comment: ["&& denotes a mnemonic"]
				}, "&&Add Cursor Above"),
				order: 2
			}
		});
	}
	run(e, t, n) {
		if (!t.hasModel()) return;
		let r = !0;
		n && n.logicalLine === !1 && (r = !1);
		let i = t._getViewModel();
		if (i.cursorConfig.readOnly) return;
		i.model.pushStackElement();
		let a = i.getCursorStates();
		i.setCursorStates(n.source, 3, ls.addCursorUp(i, a, r)), i.revealTopMostCursor(n.source), Iz(a, i.getCursorStates());
	}
}, Rz = class extends O {
	constructor() {
		super({
			id: "editor.action.insertCursorBelow",
			label: B("mutlicursor.insertBelow", "Add Cursor Below"),
			alias: "Add Cursor Below",
			precondition: void 0,
			kbOpts: {
				kbExpr: I.editorTextFocus,
				primary: 2578,
				linux: {
					primary: 1554,
					secondary: [3090]
				},
				weight: 100
			},
			menuOpts: {
				menuId: F.MenubarSelectionMenu,
				group: "3_multi",
				title: B({
					key: "miInsertCursorBelow",
					comment: ["&& denotes a mnemonic"]
				}, "A&&dd Cursor Below"),
				order: 3
			}
		});
	}
	run(e, t, n) {
		if (!t.hasModel()) return;
		let r = !0;
		n && n.logicalLine === !1 && (r = !1);
		let i = t._getViewModel();
		if (i.cursorConfig.readOnly) return;
		i.model.pushStackElement();
		let a = i.getCursorStates();
		i.setCursorStates(n.source, 3, ls.addCursorDown(i, a, r)), i.revealBottomMostCursor(n.source), Iz(a, i.getCursorStates());
	}
}, zz = class extends O {
	constructor() {
		super({
			id: "editor.action.insertCursorAtEndOfEachLineSelected",
			label: B("mutlicursor.insertAtEndOfEachLineSelected", "Add Cursors to Line Ends"),
			alias: "Add Cursors to Line Ends",
			precondition: void 0,
			kbOpts: {
				kbExpr: I.editorTextFocus,
				primary: 1575,
				weight: 100
			},
			menuOpts: {
				menuId: F.MenubarSelectionMenu,
				group: "3_multi",
				title: B({
					key: "miInsertCursorAtEndOfEachLineSelected",
					comment: ["&& denotes a mnemonic"]
				}, "Add C&&ursors to Line Ends"),
				order: 4
			}
		});
	}
	getCursorsForSelection(e, t, n) {
		if (!e.isEmpty()) {
			for (let r = e.startLineNumber; r < e.endLineNumber; r++) {
				let e = t.getLineMaxColumn(r);
				n.push(new V(r, e, r, e));
			}
			e.endColumn > 1 && n.push(new V(e.endLineNumber, e.endColumn, e.endLineNumber, e.endColumn));
		}
	}
	run(e, t) {
		if (!t.hasModel()) return;
		let n = t.getModel(), r = t.getSelections(), i = t._getViewModel(), a = i.getCursorStates(), o = [];
		r.forEach((e) => this.getCursorsForSelection(e, n, o)), o.length > 0 && t.setSelections(o), Iz(a, i.getCursorStates());
	}
}, Bz = class extends O {
	constructor() {
		super({
			id: "editor.action.addCursorsToBottom",
			label: B("mutlicursor.addCursorsToBottom", "Add Cursors To Bottom"),
			alias: "Add Cursors To Bottom",
			precondition: void 0
		});
	}
	run(e, t) {
		if (!t.hasModel()) return;
		let n = t.getSelections(), r = t.getModel().getLineCount(), i = [];
		for (let e = n[0].startLineNumber; e <= r; e++) i.push(new V(e, n[0].startColumn, e, n[0].endColumn));
		let a = t._getViewModel(), o = a.getCursorStates();
		i.length > 0 && t.setSelections(i), Iz(o, a.getCursorStates());
	}
}, Vz = class extends O {
	constructor() {
		super({
			id: "editor.action.addCursorsToTop",
			label: B("mutlicursor.addCursorsToTop", "Add Cursors To Top"),
			alias: "Add Cursors To Top",
			precondition: void 0
		});
	}
	run(e, t) {
		if (!t.hasModel()) return;
		let n = t.getSelections(), r = [];
		for (let e = n[0].startLineNumber; e >= 1; e--) r.push(new V(e, n[0].startColumn, e, n[0].endColumn));
		let i = t._getViewModel(), a = i.getCursorStates();
		r.length > 0 && t.setSelections(r), Iz(a, i.getCursorStates());
	}
}, Hz = class {
	constructor(e, t, n) {
		this.selections = e, this.revealRange = t, this.revealScrollType = n;
	}
}, Uz = class e {
	static create(t, n) {
		if (!t.hasModel()) return null;
		let r = n.getState();
		if (!t.hasTextFocus() && r.isRevealed && r.searchString.length > 0) return new e(t, n, !1, r.searchString, r.wholeWord, r.matchCase, null);
		let i = !1, a, o, s = t.getSelections();
		s.length === 1 && s[0].isEmpty() ? (i = !0, a = !0, o = !0) : (a = r.wholeWord, o = r.matchCase);
		let c = t.getSelection(), l, u = null;
		if (c.isEmpty()) {
			let e = t.getConfiguredWordAtPosition(c.getStartPosition());
			if (!e) return null;
			l = e.word, u = new V(c.startLineNumber, e.startColumn, c.startLineNumber, e.endColumn);
		} else l = t.getModel().getValueInRange(c).replace(/\r\n/g, "\n");
		return new e(t, n, i, l, a, o, u);
	}
	constructor(e, t, n, r, i, a, o) {
		this._editor = e, this.findController = t, this.isDisconnectedFromFindController = n, this.searchText = r, this.wholeWord = i, this.matchCase = a, this.currentMatch = o;
	}
	addSelectionToNextFindMatch() {
		if (!this._editor.hasModel()) return null;
		let e = this._getNextMatch();
		return e ? new Hz(this._editor.getSelections().concat(e), e, 0) : null;
	}
	moveSelectionToNextFindMatch() {
		if (!this._editor.hasModel()) return null;
		let e = this._getNextMatch();
		if (!e) return null;
		let t = this._editor.getSelections();
		return new Hz(t.slice(0, t.length - 1).concat(e), e, 0);
	}
	_getNextMatch() {
		if (!this._editor.hasModel()) return null;
		if (this.currentMatch) {
			let e = this.currentMatch;
			return this.currentMatch = null, e;
		}
		this.findController.highlightFindOptions();
		let e = this._editor.getSelections(), t = e[e.length - 1], n = this._editor.getModel().findNextMatch(this.searchText, t.getEndPosition(), !1, this.matchCase, this.wholeWord ? this._editor.getOption(132) : null, !1);
		return n ? new V(n.range.startLineNumber, n.range.startColumn, n.range.endLineNumber, n.range.endColumn) : null;
	}
	addSelectionToPreviousFindMatch() {
		if (!this._editor.hasModel()) return null;
		let e = this._getPreviousMatch();
		return e ? new Hz(this._editor.getSelections().concat(e), e, 0) : null;
	}
	moveSelectionToPreviousFindMatch() {
		if (!this._editor.hasModel()) return null;
		let e = this._getPreviousMatch();
		if (!e) return null;
		let t = this._editor.getSelections();
		return new Hz(t.slice(0, t.length - 1).concat(e), e, 0);
	}
	_getPreviousMatch() {
		if (!this._editor.hasModel()) return null;
		if (this.currentMatch) {
			let e = this.currentMatch;
			return this.currentMatch = null, e;
		}
		this.findController.highlightFindOptions();
		let e = this._editor.getSelections(), t = e[e.length - 1], n = this._editor.getModel().findPreviousMatch(this.searchText, t.getStartPosition(), !1, this.matchCase, this.wholeWord ? this._editor.getOption(132) : null, !1);
		return n ? new V(n.range.startLineNumber, n.range.startColumn, n.range.endLineNumber, n.range.endColumn) : null;
	}
	selectAll(e) {
		if (!this._editor.hasModel()) return [];
		this.findController.highlightFindOptions();
		let t = this._editor.getModel();
		return e ? t.findMatches(this.searchText, e, !1, this.matchCase, this.wholeWord ? this._editor.getOption(132) : null, !1, 1073741824) : t.findMatches(this.searchText, !0, !1, this.matchCase, this.wholeWord ? this._editor.getOption(132) : null, !1, 1073741824);
	}
}, Wz = class e extends U {
	static {
		this.ID = "editor.contrib.multiCursorController";
	}
	static get(t) {
		return t.getContribution(e.ID);
	}
	constructor(e) {
		super(), this._sessionDispose = this._register(new g()), this._editor = e, this._ignoreSelectionChange = !1, this._session = null;
	}
	dispose() {
		this._endSession(), super.dispose();
	}
	_beginSessionIfNeeded(e) {
		if (!this._session) {
			let t = Uz.create(this._editor, e);
			if (!t) return;
			this._session = t;
			let n = { searchString: this._session.searchText };
			this._session.isDisconnectedFromFindController && (n.wholeWordOverride = 1, n.matchCaseOverride = 1, n.isRegexOverride = 2), e.getState().change(n, !1), this._sessionDispose.add(this._editor.onDidChangeCursorSelection((e) => {
				this._ignoreSelectionChange || this._endSession();
			})), this._sessionDispose.add(this._editor.onDidBlurEditorText(() => {
				this._endSession();
			})), this._sessionDispose.add(e.getState().onFindReplaceStateChange((e) => {
				(e.matchCase || e.wholeWord) && this._endSession();
			}));
		}
	}
	_endSession() {
		this._sessionDispose.clear(), this._session && this._session.isDisconnectedFromFindController && this._session.findController.getState().change({
			wholeWordOverride: 0,
			matchCaseOverride: 0,
			isRegexOverride: 0
		}, !1), this._session = null;
	}
	_setSelections(e) {
		this._ignoreSelectionChange = !0, this._editor.setSelections(e), this._ignoreSelectionChange = !1;
	}
	_expandEmptyToWord(e, t) {
		if (!t.isEmpty()) return t;
		let n = this._editor.getConfiguredWordAtPosition(t.getStartPosition());
		return n ? new V(t.startLineNumber, n.startColumn, t.startLineNumber, n.endColumn) : t;
	}
	_applySessionResult(e) {
		e && (this._setSelections(e.selections), e.revealRange && this._editor.revealRangeInCenterIfOutsideViewport(e.revealRange, e.revealScrollType));
	}
	getSession(e) {
		return this._session;
	}
	addSelectionToNextFindMatch(e) {
		if (this._editor.hasModel()) {
			if (!this._session) {
				let t = this._editor.getSelections();
				if (t.length > 1) {
					let n = e.getState().matchCase;
					if (!eB(this._editor.getModel(), t, n)) {
						let e = this._editor.getModel(), n = [];
						for (let r = 0, i = t.length; r < i; r++) n[r] = this._expandEmptyToWord(e, t[r]);
						this._editor.setSelections(n);
						return;
					}
				}
			}
			this._beginSessionIfNeeded(e), this._session && this._applySessionResult(this._session.addSelectionToNextFindMatch());
		}
	}
	addSelectionToPreviousFindMatch(e) {
		this._beginSessionIfNeeded(e), this._session && this._applySessionResult(this._session.addSelectionToPreviousFindMatch());
	}
	moveSelectionToNextFindMatch(e) {
		this._beginSessionIfNeeded(e), this._session && this._applySessionResult(this._session.moveSelectionToNextFindMatch());
	}
	moveSelectionToPreviousFindMatch(e) {
		this._beginSessionIfNeeded(e), this._session && this._applySessionResult(this._session.moveSelectionToPreviousFindMatch());
	}
	selectAll(e) {
		if (!this._editor.hasModel()) return;
		let t = null, n = e.getState();
		if (n.isRevealed && n.searchString.length > 0 && n.isRegex) {
			let e = this._editor.getModel();
			t = n.searchScope ? e.findMatches(n.searchString, n.searchScope, n.isRegex, n.matchCase, n.wholeWord ? this._editor.getOption(132) : null, !1, 1073741824) : e.findMatches(n.searchString, !0, n.isRegex, n.matchCase, n.wholeWord ? this._editor.getOption(132) : null, !1, 1073741824);
		} else {
			if (this._beginSessionIfNeeded(e), !this._session) return;
			t = this._session.selectAll(n.searchScope);
		}
		if (t.length > 0) {
			let e = this._editor.getSelection();
			for (let n = 0, r = t.length; n < r; n++) {
				let r = t[n];
				if (r.range.intersectRanges(e)) {
					t[n] = t[0], t[0] = r;
					break;
				}
			}
			this._setSelections(t.map((e) => new V(e.range.startLineNumber, e.range.startColumn, e.range.endLineNumber, e.range.endColumn)));
		}
	}
}, Gz = class extends O {
	run(e, t) {
		let n = Wz.get(t);
		if (!n) return;
		let r = t._getViewModel();
		if (r) {
			let i = r.getCursorStates(), a = bj.get(t);
			if (a) this._run(n, a);
			else {
				let r = e.get(P).createInstance(bj, t);
				this._run(n, r), r.dispose();
			}
			Iz(i, r.getCursorStates());
		}
	}
}, Kz = class extends Gz {
	constructor() {
		super({
			id: "editor.action.addSelectionToNextFindMatch",
			label: B("addSelectionToNextFindMatch", "Add Selection To Next Find Match"),
			alias: "Add Selection To Next Find Match",
			precondition: void 0,
			kbOpts: {
				kbExpr: I.focus,
				primary: 2082,
				weight: 100
			},
			menuOpts: {
				menuId: F.MenubarSelectionMenu,
				group: "3_multi",
				title: B({
					key: "miAddSelectionToNextFindMatch",
					comment: ["&& denotes a mnemonic"]
				}, "Add &&Next Occurrence"),
				order: 5
			}
		});
	}
	_run(e, t) {
		e.addSelectionToNextFindMatch(t);
	}
}, qz = class extends Gz {
	constructor() {
		super({
			id: "editor.action.addSelectionToPreviousFindMatch",
			label: B("addSelectionToPreviousFindMatch", "Add Selection To Previous Find Match"),
			alias: "Add Selection To Previous Find Match",
			precondition: void 0,
			menuOpts: {
				menuId: F.MenubarSelectionMenu,
				group: "3_multi",
				title: B({
					key: "miAddSelectionToPreviousFindMatch",
					comment: ["&& denotes a mnemonic"]
				}, "Add P&&revious Occurrence"),
				order: 6
			}
		});
	}
	_run(e, t) {
		e.addSelectionToPreviousFindMatch(t);
	}
}, Jz = class extends Gz {
	constructor() {
		super({
			id: "editor.action.moveSelectionToNextFindMatch",
			label: B("moveSelectionToNextFindMatch", "Move Last Selection To Next Find Match"),
			alias: "Move Last Selection To Next Find Match",
			precondition: void 0,
			kbOpts: {
				kbExpr: I.focus,
				primary: Ro(2089, 2082),
				weight: 100
			}
		});
	}
	_run(e, t) {
		e.moveSelectionToNextFindMatch(t);
	}
}, Yz = class extends Gz {
	constructor() {
		super({
			id: "editor.action.moveSelectionToPreviousFindMatch",
			label: B("moveSelectionToPreviousFindMatch", "Move Last Selection To Previous Find Match"),
			alias: "Move Last Selection To Previous Find Match",
			precondition: void 0
		});
	}
	_run(e, t) {
		e.moveSelectionToPreviousFindMatch(t);
	}
}, Xz = class extends Gz {
	constructor() {
		super({
			id: "editor.action.selectHighlights",
			label: B("selectAllOccurrencesOfFindMatch", "Select All Occurrences of Find Match"),
			alias: "Select All Occurrences of Find Match",
			precondition: void 0,
			kbOpts: {
				kbExpr: I.focus,
				primary: 3114,
				weight: 100
			},
			menuOpts: {
				menuId: F.MenubarSelectionMenu,
				group: "3_multi",
				title: B({
					key: "miSelectHighlights",
					comment: ["&& denotes a mnemonic"]
				}, "Select All &&Occurrences"),
				order: 7
			}
		});
	}
	_run(e, t) {
		e.selectAll(t);
	}
}, Zz = class extends Gz {
	constructor() {
		super({
			id: "editor.action.changeAll",
			label: B("changeAll.label", "Change All Occurrences"),
			alias: "Change All Occurrences",
			precondition: N.and(I.writable, I.editorTextFocus),
			kbOpts: {
				kbExpr: I.editorTextFocus,
				primary: 2108,
				weight: 100
			},
			contextMenuOpts: {
				group: "1_modification",
				order: 1.2
			}
		});
	}
	_run(e, t) {
		e.selectAll(t);
	}
}, Qz = class {
	constructor(e, t, n, r, i) {
		this._model = e, this._searchText = t, this._matchCase = n, this._wordSeparators = r, this._modelVersionId = this._model.getVersionId(), this._cachedFindMatches = null, i && this._model === i._model && this._searchText === i._searchText && this._matchCase === i._matchCase && this._wordSeparators === i._wordSeparators && this._modelVersionId === i._modelVersionId && (this._cachedFindMatches = i._cachedFindMatches);
	}
	findMatches() {
		return this._cachedFindMatches === null && (this._cachedFindMatches = this._model.findMatches(this._searchText, !0, !1, this._matchCase, this._wordSeparators, !1).map((e) => e.range), this._cachedFindMatches.sort(E.compareRangesUsingStarts)), this._cachedFindMatches;
	}
}, $z = class extends U {
	static {
		Fz = this;
	}
	static {
		this.ID = "editor.contrib.selectionHighlighter";
	}
	constructor(e, t) {
		super(), this._languageFeaturesService = t, this.editor = e, this._isEnabled = e.getOption(109), this._decorations = e.createDecorationsCollection(), this.updateSoon = this._register(new tl(() => this._update(), 300)), this.state = null, this._register(e.onDidChangeConfiguration((t) => {
			this._isEnabled = e.getOption(109);
		})), this._register(e.onDidChangeCursorSelection((e) => {
			this._isEnabled && (e.selection.isEmpty() ? e.reason === 3 ? (this.state && this._setState(null), this.updateSoon.schedule()) : this._setState(null) : this._update());
		})), this._register(e.onDidChangeModel((e) => {
			this._setState(null);
		})), this._register(e.onDidChangeModelContent((e) => {
			this._isEnabled && this.updateSoon.schedule();
		}));
		let n = bj.get(e);
		n && this._register(n.getState().onFindReplaceStateChange((e) => {
			this._update();
		})), this.updateSoon.schedule();
	}
	_update() {
		this._setState(Fz._createState(this.state, this._isEnabled, this.editor));
	}
	static _createState(e, t, n) {
		if (!t || !n.hasModel()) return null;
		let r = n.getSelection();
		if (r.startLineNumber !== r.endLineNumber) return null;
		let i = Wz.get(n);
		if (!i) return null;
		let a = bj.get(n);
		if (!a) return null;
		let o = i.getSession(a);
		if (!o) {
			let e = n.getSelections();
			if (e.length > 1) {
				let t = a.getState().matchCase;
				if (!eB(n.getModel(), e, t)) return null;
			}
			o = Uz.create(n, a);
		}
		if (!o || o.currentMatch || /^[ \t]+$/.test(o.searchText) || o.searchText.length > 200) return null;
		let s = a.getState(), c = s.matchCase;
		if (s.isRevealed) {
			let e = s.searchString;
			c || (e = e.toLowerCase());
			let t = o.searchText;
			if (c || (t = t.toLowerCase()), e === t && o.matchCase === s.matchCase && o.wholeWord === s.wholeWord && !s.isRegex) return null;
		}
		return new Qz(n.getModel(), o.searchText, o.matchCase, o.wholeWord ? n.getOption(132) : null, e);
	}
	_setState(e) {
		if (this.state = e, !this.state) {
			this._decorations.clear();
			return;
		}
		if (!this.editor.hasModel()) return;
		let t = this.editor.getModel();
		if (t.isTooLargeForTokenization()) return;
		let n = this.state.findMatches(), r = this.editor.getSelections();
		r.sort(E.compareRangesUsingStarts);
		let i = [];
		for (let e = 0, t = 0, a = n.length, o = r.length; e < a;) {
			let a = n[e];
			if (t >= o) i.push(a), e++;
			else {
				let n = E.compareRangesUsingStarts(a, r[t]);
				n < 0 ? ((r[t].isEmpty() || !E.areIntersecting(a, r[t])) && i.push(a), e++) : (n > 0 || e++, t++);
			}
		}
		let a = this.editor.getOption(81) !== "off", o = this._languageFeaturesService.documentHighlightProvider.has(t) && a, s = i.map((e) => ({
			range: e,
			options: Mz(o)
		}));
		this._decorations.set(s);
	}
	dispose() {
		this._setState(null), super.dispose();
	}
};
$z = Fz = Nz([Pz(1, M)], $z);
function eB(e, t, n) {
	let r = tB(e, t[0], !n);
	for (let i = 1, a = t.length; i < a; i++) {
		let a = t[i];
		if (a.isEmpty() || r !== tB(e, a, !n)) return !1;
	}
	return !0;
}
function tB(e, t, n) {
	let r = e.getValueInRange(t);
	return n ? r.toLowerCase() : r;
}
var nB = class extends O {
	constructor() {
		super({
			id: "editor.action.focusNextCursor",
			label: B("mutlicursor.focusNextCursor", "Focus Next Cursor"),
			metadata: {
				description: B("mutlicursor.focusNextCursor.description", "Focuses the next cursor"),
				args: []
			},
			alias: "Focus Next Cursor",
			precondition: void 0
		});
	}
	run(e, t, n) {
		if (!t.hasModel()) return;
		let r = t._getViewModel();
		if (r.cursorConfig.readOnly) return;
		r.model.pushStackElement();
		let i = Array.from(r.getCursorStates()), a = i.shift();
		a && (i.push(a), r.setCursorStates(n.source, 3, i), r.revealPrimaryCursor(n.source, !0), Iz(i, r.getCursorStates()));
	}
}, rB = class extends O {
	constructor() {
		super({
			id: "editor.action.focusPreviousCursor",
			label: B("mutlicursor.focusPreviousCursor", "Focus Previous Cursor"),
			metadata: {
				description: B("mutlicursor.focusPreviousCursor.description", "Focuses the previous cursor"),
				args: []
			},
			alias: "Focus Previous Cursor",
			precondition: void 0
		});
	}
	run(e, t, n) {
		if (!t.hasModel()) return;
		let r = t._getViewModel();
		if (r.cursorConfig.readOnly) return;
		r.model.pushStackElement();
		let i = Array.from(r.getCursorStates()), a = i.pop();
		a && (i.unshift(a), r.setCursorStates(n.source, 3, i), r.revealPrimaryCursor(n.source, !0), Iz(i, r.getCursorStates()));
	}
};
T(Wz.ID, Wz, 4), T($z.ID, $z, 1), k(Lz), k(Rz), k(zz), k(Kz), k(qz), k(Jz), k(Yz), k(Xz), k(Zz), k(Bz), k(Vz), k(nB), k(rB);
// ../../../node_modules/.pnpm/monaco-editor@0.52.2/node_modules/monaco-editor/esm/vs/editor/contrib/inlineEdit/browser/commandIds.js
var iB = "editor.action.inlineEdit.accept", aB = "editor.action.inlineEdit.reject", oB = "editor.action.inlineEdit.jumpTo", sB = "editor.action.inlineEdit.jumpBack", cB = function(e, t, n, r) {
	var i = arguments.length, a = i < 3 ? t : r === null ? r = Object.getOwnPropertyDescriptor(t, n) : r, o;
	if (typeof Reflect == "object" && typeof Reflect.decorate == "function") a = Reflect.decorate(e, t, n, r);
	else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (i < 3 ? o(a) : i > 3 ? o(t, n, a) : o(t, n)) || a);
	return i > 3 && a && Object.defineProperty(t, n, a), a;
}, lB = function(e, t) {
	return function(n, r) {
		t(n, r, e);
	};
}, uB = "inline-edit", dB = class extends U {
	constructor(e, t, n) {
		super(), this.editor = e, this.model = t, this.languageService = n, this.isDisposed = qs(this, !1), this.currentTextModel = tr(this, this.editor.onDidChangeModel, () => this.editor.getModel()), this.uiState = ia(this, (e) => {
			if (this.isDisposed.read(e)) return;
			let t = this.currentTextModel.read(e);
			if (t !== this.model.targetTextModel.read(e)) return;
			let n = this.model.ghostText.read(e);
			if (!n) return;
			let r = this.model.range?.read(e);
			r && r.startLineNumber === r.endLineNumber && r.startColumn === r.endColumn && (r = void 0);
			let i = (!r || r.startLineNumber === r.endLineNumber) && n.parts.length === 1 && n.parts[0].lines.length === 1, a = n.parts.length === 1 && n.parts[0].lines.every((e) => e.length === 0), o = [], s = [];
			function c(e, t) {
				if (s.length > 0) {
					let n = s[s.length - 1];
					t && n.decorations.push(new Fr(n.content.length + 1, n.content.length + 1 + e[0].length, t, 0)), n.content += e[0], e = e.slice(1);
				}
				for (let n of e) s.push({
					content: n,
					decorations: t ? [new Fr(1, n.length + 1, t, 0)] : []
				});
			}
			let l = t.getLineContent(n.lineNumber), u, d = 0;
			if (!a && (i || !r)) {
				for (let e of n.parts) {
					let t = e.lines;
					r && !i && (c(t, uB), t = []), u === void 0 ? (o.push({
						column: e.column,
						text: t[0],
						preview: e.preview
					}), t = t.slice(1)) : c([l.substring(d, e.column - 1)], void 0), t.length > 0 && (c(t, uB), u === void 0 && e.column <= l.length && (u = e.column)), d = e.column - 1;
				}
				u !== void 0 && c([l.substring(d)], void 0);
			}
			return {
				inlineTexts: o,
				additionalLines: s,
				hiddenRange: u === void 0 ? void 0 : new xN(u, l.length + 1),
				lineNumber: i || !r ? n.lineNumber : r.endLineNumber - 1,
				additionalReservedLineCount: this.model.minReservedLineCount.read(e),
				targetTextModel: t,
				range: r,
				isSingleLine: i,
				isPureRemove: a
			};
		}), this.decorations = ia(this, (e) => {
			let t = this.uiState.read(e);
			if (!t) return [];
			let n = [];
			if (t.hiddenRange && n.push({
				range: t.hiddenRange.toRange(t.lineNumber),
				options: {
					inlineClassName: "inline-edit-hidden",
					description: "inline-edit-hidden"
				}
			}), t.range) {
				let e = [];
				if (t.isSingleLine) e.push(t.range);
				else if (!t.isPureRemove) {
					let n = t.range.endLineNumber - t.range.startLineNumber;
					for (let r = 0; r < n; r++) {
						let n = t.range.startLineNumber + r, i = t.targetTextModel.getLineFirstNonWhitespaceColumn(n), a = t.targetTextModel.getLineLastNonWhitespaceColumn(n), o = new E(n, i, n, a);
						e.push(o);
					}
				}
				for (let t of e) n.push({
					range: t,
					options: Al
				});
			}
			if (t.range && !t.isSingleLine && t.isPureRemove) {
				let e = new E(t.range.startLineNumber, 1, t.range.endLineNumber - 1, 1);
				n.push({
					range: e,
					options: ut
				});
			}
			for (let e of t.inlineTexts) n.push({
				range: E.fromPositions(new b(t.lineNumber, e.column)),
				options: {
					description: uB,
					after: {
						content: e.text,
						inlineClassName: e.preview ? "inline-edit-decoration-preview" : "inline-edit-decoration",
						cursorStops: il.Left
					},
					showIfCollapsed: !0
				}
			});
			return n;
		}), this._register(Gt(() => {
			this.isDisposed.set(!0, void 0);
		})), this._register(SN(this.editor, this.decorations));
	}
};
dB = cB([lB(2, dr)], dB);
// ../../../node_modules/.pnpm/monaco-editor@0.52.2/node_modules/monaco-editor/esm/vs/editor/contrib/inlineEdit/browser/inlineEditHintsWidget.js
var fB = function(e, t, n, r) {
	var i = arguments.length, a = i < 3 ? t : r === null ? r = Object.getOwnPropertyDescriptor(t, n) : r, o;
	if (typeof Reflect == "object" && typeof Reflect.decorate == "function") a = Reflect.decorate(e, t, n, r);
	else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (i < 3 ? o(a) : i > 3 ? o(t, n, a) : o(t, n)) || a);
	return i > 3 && a && Object.defineProperty(t, n, a), a;
}, pB = function(e, t) {
	return function(n, r) {
		t(n, r, e);
	};
}, mB, hB = class extends U {
	constructor(e, t, n) {
		super(), this.editor = e, this.model = t, this.instantiationService = n, this.alwaysShowToolbar = tr(this, this.editor.onDidChangeConfiguration, () => this.editor.getOption(63).showToolbar === "always"), this.sessionPosition = void 0, this.position = ia(this, (e) => {
			let t = this.model.read(e)?.model.ghostText.read(e);
			if (!this.alwaysShowToolbar.read(e) || !t || t.parts.length === 0) return this.sessionPosition = void 0, null;
			let n = t.parts[0].column;
			this.sessionPosition && this.sessionPosition.lineNumber !== t.lineNumber && (this.sessionPosition = void 0);
			let r = new b(t.lineNumber, Math.min(n, this.sessionPosition?.column ?? 2 ** 53 - 1));
			return this.sessionPosition = r, r;
		}), this._register(jo((t, n) => {
			if (!this.model.read(t) || !this.alwaysShowToolbar.read(t)) return;
			let r = n.add(this.instantiationService.createInstance(gB, this.editor, !0, this.position));
			e.addContentWidget(r), n.add(Gt(() => e.removeContentWidget(r)));
		}));
	}
};
hB = fB([pB(2, P)], hB);
var gB = class extends U {
	static {
		mB = this;
	}
	static {
		this._dropDownVisible = !1;
	}
	static {
		this.id = 0;
	}
	constructor(e, t, n, r, i, a) {
		super(), this.editor = e, this.withBorder = t, this._position = n, this._contextKeyService = i, this._menuService = a, this.id = `InlineEditHintsContentWidget${mB.id++}`, this.allowEditorOverflow = !0, this.suppressMouseDown = !1, this.nodes = cc("div.inlineEditHints", { className: this.withBorder ? ".withBorder" : "" }, [cc("div@toolBar")]), this.inlineCompletionsActionsMenus = this._register(this._menuService.createMenu(F.InlineEditActions, this._contextKeyService)), this.toolBar = this._register(r.createInstance(vB, this.nodes.toolBar, this.editor, F.InlineEditToolbar, {
			menuOptions: { renderShortTitle: !0 },
			toolbarOptions: { primaryGroup: (e) => e.startsWith("primary") },
			actionViewItemProvider: (e, t) => {
				if (e instanceof wc) return r.createInstance(_B, e, void 0);
			},
			telemetrySource: "InlineEditToolbar"
		})), this._register(this.toolBar.onDidChangeDropdownVisibility((e) => {
			mB._dropDownVisible = e;
		})), this._register(Os((e) => {
			this._position.read(e), this.editor.layoutContentWidget(this);
		})), this._register(Os((e) => {
			let t = [];
			for (let [e, n] of this.inlineCompletionsActionsMenus.getActions()) for (let e of n) e instanceof wc && t.push(e);
			t.length > 0 && t.unshift(new xe()), this.toolBar.setAdditionalSecondaryActions(t);
		}));
	}
	getId() {
		return this.id;
	}
	getDomNode() {
		return this.nodes.root;
	}
	getPosition() {
		return {
			position: this._position.get(),
			preference: [1, 2],
			positionAffinity: 3
		};
	}
};
gB = mB = fB([
	pB(3, P),
	pB(4, j),
	pB(5, aa)
], gB);
var _B = class extends Xo {
	updateLabel() {
		let e = this._keybindingService.lookupKeybinding(this._action.id, this._contextKeyService);
		if (!e) return super.updateLabel();
		if (this.label) {
			let t = cc("div.keybinding").root;
			this._register(new kt(t, us, {
				disableTitle: !0,
				...sn
			})).set(e), this.label.textContent = this._action.label, this.label.appendChild(t), this.label.classList.add("inlineEditStatusBarItemLabel");
		}
	}
	updateTooltip() {}
}, vB = class extends yn {
	constructor(e, t, n, r, i, a, o, s, c, l) {
		super(e, {
			resetMenu: n,
			...r
		}, i, a, o, s, c, l), this.editor = t, this.menuId = n, this.options2 = r, this.menuService = i, this.contextKeyService = a, this.menu = this._store.add(this.menuService.createMenu(this.menuId, this.contextKeyService, { emitEventsForSubmenuChanges: !0 })), this.additionalActions = [], this.prependedPrimaryActions = [], this._store.add(this.menu.onDidChange(() => this.updateToolbar())), this._store.add(this.editor.onDidChangeCursorPosition(() => this.updateToolbar())), this.updateToolbar();
	}
	updateToolbar() {
		let e = [], t = [];
		pn(this.menu, this.options2?.menuOptions, {
			primary: e,
			secondary: t
		}, this.options2?.toolbarOptions?.primaryGroup, this.options2?.toolbarOptions?.shouldInlineSubmenu, this.options2?.toolbarOptions?.useSeparatorsInPrimaryActions), t.push(...this.additionalActions), e.unshift(...this.prependedPrimaryActions), this.setActions(e, t);
	}
	setAdditionalSecondaryActions(e) {
		At(this.additionalActions, e, (e, t) => e === t) || (this.additionalActions = e, this.updateToolbar());
	}
};
vB = fB([
	pB(4, aa),
	pB(5, j),
	pB(6, Br),
	pB(7, ft),
	pB(8, ga),
	pB(9, mc)
], vB);
// ../../../node_modules/.pnpm/monaco-editor@0.52.2/node_modules/monaco-editor/esm/vs/editor/contrib/inlineEdit/browser/inlineEditSideBySideWidget.js
var yB = function(e, t, n, r) {
	var i = arguments.length, a = i < 3 ? t : r === null ? r = Object.getOwnPropertyDescriptor(t, n) : r, o;
	if (typeof Reflect == "object" && typeof Reflect.decorate == "function") a = Reflect.decorate(e, t, n, r);
	else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (i < 3 ? o(a) : i > 3 ? o(t, n, a) : o(t, n)) || a);
	return i > 3 && a && Object.defineProperty(t, n, a), a;
}, bB = function(e, t) {
	return function(n, r) {
		t(n, r, e);
	};
}, xB, SB;
function* CB(e, t, n = 1) {
	t === void 0 && ([t, e] = [e, 0]);
	for (let r = e; r < t; r += n) yield r;
}
function wB(e) {
	let t = e[0].match(/^\s*/)?.[0] ?? "", n = t.length;
	return {
		text: e.map((e) => e.replace(RegExp("^" + t), "")),
		shift: n
	};
}
var TB = class extends U {
	static {
		xB = this;
	}
	static {
		this._modelId = 0;
	}
	static _createUniqueUri() {
		return De.from({
			scheme: "inline-edit-widget",
			path: (/* @__PURE__ */ new Date()).toString() + String(xB._modelId++)
		});
	}
	constructor(e, t, n, r, i) {
		super(), this._editor = e, this._model = t, this._instantiationService = n, this._diffProviderFactoryService = r, this._modelService = i, this._position = ia(this, (e) => {
			let t = this._model.read(e);
			if (!t || t.text.length === 0 || t.range.startLineNumber === t.range.endLineNumber && (t.range.startColumn !== t.range.endColumn || t.range.startColumn !== 1)) return null;
			let n = this._editor.getModel();
			if (!n) return null;
			let r = Array.from(CB(t.range.startLineNumber, t.range.endLineNumber + 1)), i = r.map((e) => n.getLineLastNonWhitespaceColumn(e)), a = Math.max(...i), o = r[i.indexOf(a)], s = new b(o, a);
			return {
				top: t.range.startLineNumber,
				left: s
			};
		}), this._text = ia(this, (e) => {
			let t = this._model.read(e);
			if (!t) return {
				text: "",
				shift: 0
			};
			let n = wB(t.text.split("\n"));
			return {
				text: n.text.join("\n"),
				shift: n.shift
			};
		}), this._originalModel = Rs(() => this._modelService.createModel("", null, xB._createUniqueUri())).keepObserved(this._store), this._modifiedModel = Rs(() => this._modelService.createModel("", null, xB._createUniqueUri())).keepObserved(this._store), this._diff = ia(this, (e) => this._diffPromise.read(e)?.promiseResult.read(e)?.data), this._diffPromise = ia(this, (e) => {
			let t = this._model.read(e);
			if (!t) return;
			let n = this._editor.getModel();
			if (!n) return;
			let r = wB(n.getValueInRange(t.range).split("\n")).text.join("\n"), i = wB(t.text.split("\n")).text.join("\n");
			this._originalModel.get().setValue(r), this._modifiedModel.get().setValue(i);
			let a = this._diffProviderFactoryService.createDiffProvider({ diffAlgorithm: "advanced" });
			return nc.fromFn(async () => {
				let e = await a.computeDiff(this._originalModel.get(), this._modifiedModel.get(), {
					computeMoves: !1,
					ignoreTrimWhitespace: !1,
					maxComputationTimeMs: 1e3
				}, C.None);
				if (!e.identical) return e.changes;
			});
		}), this._register(jo((t, n) => {
			if (!this._model.read(t) || this._position.get() === null) return;
			let r = n.add(this._instantiationService.createInstance(EB, this._editor, this._position, this._text.map((e) => e.text), this._text.map((e) => e.shift), this._diff));
			e.addOverlayWidget(r), n.add(Gt(() => e.removeOverlayWidget(r)));
		}));
	}
};
TB = xB = yB([
	bB(2, P),
	bB(3, bt),
	bB(4, je)
], TB);
var EB = class extends U {
	static {
		SB = this;
	}
	static {
		this.id = 0;
	}
	constructor(e, t, n, r, i, a) {
		super(), this._editor = e, this._position = t, this._text = n, this._shift = r, this._diff = i, this._instantiationService = a, this.id = `InlineEditSideBySideContentWidget${SB.id++}`, this.allowEditorOverflow = !1, this._nodes = w("div.inlineEditSideBySide", void 0), this._scrollChanged = Wa("editor.onDidScrollChange", this._editor.onDidScrollChange), this._previewEditor = this._register(this._instantiationService.createInstance(gD, this._nodes, {
			glyphMargin: !1,
			lineNumbers: "off",
			minimap: { enabled: !1 },
			guides: {
				indentation: !1,
				bracketPairs: !1,
				bracketPairsHorizontal: !1,
				highlightActiveIndentation: !1
			},
			folding: !1,
			selectOnLineNumbers: !1,
			selectionHighlight: !1,
			columnSelection: !1,
			overviewRulerBorder: !1,
			overviewRulerLanes: 0,
			lineDecorationsWidth: 0,
			lineNumbersMinChars: 0,
			scrollbar: {
				vertical: "hidden",
				horizontal: "hidden",
				alwaysConsumeMouseWheel: !1,
				handleMouseWheel: !1
			},
			readOnly: !0,
			wordWrap: "off",
			wordWrapOverride1: "off",
			wordWrapOverride2: "off",
			wrappingIndent: "none",
			wrappingStrategy: void 0
		}, {
			contributions: [],
			isSimpleWidget: !0
		}, this._editor)), this._previewEditorObs = u(this._previewEditor), this._editorObs = u(this._editor), this._previewTextModel = this._register(this._instantiationService.createInstance(Ma, "", this._editor.getModel()?.getLanguageId() ?? "plaintext", Ma.DEFAULT_CREATION_OPTIONS, null)), this._setText = ia((e) => {
			let t = this._text.read(e);
			t && this._previewTextModel.setValue(t);
		}).recomputeInitiallyAndOnChange(this._store), this._decorations = ia(this, (e) => {
			this._setText.read(e);
			let t = this._position.read(e);
			if (!t) return {
				org: [],
				mod: []
			};
			let n = this._diff.read(e);
			if (!n) return {
				org: [],
				mod: []
			};
			let r = [], i = [];
			if (n.length === 1 && n[0].innerChanges[0].modifiedRange.equalsRange(this._previewTextModel.getFullModelRange())) return {
				org: [],
				mod: []
			};
			let a = this._shift.get(), o = (e) => new E(e.startLineNumber + t.top - 1, e.startColumn + a, e.endLineNumber + t.top - 1, e.endColumn + a);
			for (let e of n) if (e.original.isEmpty || r.push({
				range: o(e.original.toInclusiveRange()),
				options: ut
			}), e.modified.isEmpty || i.push({
				range: e.modified.toInclusiveRange(),
				options: qr
			}), e.modified.isEmpty || e.original.isEmpty) e.original.isEmpty || r.push({
				range: o(e.original.toInclusiveRange()),
				options: ii
			}), e.modified.isEmpty || i.push({
				range: e.modified.toInclusiveRange(),
				options: Lr
			});
			else for (let t of e.innerChanges || []) e.original.contains(t.originalRange.startLineNumber) && r.push({
				range: o(t.originalRange),
				options: t.originalRange.isEmpty() ? ae : Al
			}), e.modified.contains(t.modifiedRange.startLineNumber) && i.push({
				range: t.modifiedRange,
				options: t.modifiedRange.isEmpty() ? ar : Zt
			});
			return {
				org: r,
				mod: i
			};
		}), this._originalDecorations = ia(this, (e) => this._decorations.read(e).org), this._modifiedDecorations = ia(this, (e) => this._decorations.read(e).mod), this._previewEditor.setModel(this._previewTextModel), this._register(this._editorObs.setDecorations(this._originalDecorations)), this._register(this._previewEditorObs.setDecorations(this._modifiedDecorations)), this._register(Os((e) => {
			let t = this._previewEditorObs.contentWidth.read(e), n = this._text.read(e).split("\n").length - 1, r = this._editor.getOption(67) * n;
			t <= 0 || this._previewEditor.layout({
				height: r,
				width: t
			});
		})), this._register(Os((e) => {
			this._position.read(e), this._editor.layoutOverlayWidget(this);
		})), this._register(Os((e) => {
			this._scrollChanged.read(e), this._position.read(e) && this._editor.layoutOverlayWidget(this);
		}));
	}
	getId() {
		return this.id;
	}
	getDomNode() {
		return this._nodes;
	}
	getPosition() {
		let e = this._position.get();
		if (!e) return null;
		let t = this._editor.getLayoutInfo(), n = this._editor.getScrolledVisiblePosition(new b(e.top, 1));
		if (!n) return null;
		let r = n.top - 1, i = this._editor.getOffsetForColumn(e.left.lineNumber, e.left.column);
		return { preference: {
			left: t.contentLeft + i + 10,
			top: r
		} };
	}
};
EB = SB = yB([bB(5, P)], EB);
// ../../../node_modules/.pnpm/monaco-editor@0.52.2/node_modules/monaco-editor/esm/vs/editor/contrib/inlineEdit/browser/inlineEditController.js
var DB = function(e, t, n, r) {
	var i = arguments.length, a = i < 3 ? t : r === null ? r = Object.getOwnPropertyDescriptor(t, n) : r, o;
	if (typeof Reflect == "object" && typeof Reflect.decorate == "function") a = Reflect.decorate(e, t, n, r);
	else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (i < 3 ? o(a) : i > 3 ? o(t, n, a) : o(t, n)) || a);
	return i > 3 && a && Object.defineProperty(t, n, a), a;
}, OB = function(e, t) {
	return function(n, r) {
		t(n, r, e);
	};
}, kB, AB = class extends U {
	static {
		kB = this;
	}
	static {
		this.ID = "editor.contrib.inlineEditController";
	}
	static {
		this.inlineEditVisibleKey = "inlineEditVisible";
	}
	static {
		this.inlineEditVisibleContext = new z(this.inlineEditVisibleKey, !1);
	}
	static {
		this.cursorAtInlineEditKey = "cursorAtInlineEdit";
	}
	static {
		this.cursorAtInlineEditContext = new z(this.cursorAtInlineEditKey, !1);
	}
	static get(e) {
		return e.getContribution(kB.ID);
	}
	constructor(e, t, n, r, i, a, o, s) {
		super(), this.editor = e, this.instantiationService = t, this.contextKeyService = n, this.languageFeaturesService = r, this._commandService = i, this._configurationService = a, this._diffProviderFactoryService = o, this._modelService = s, this._isVisibleContext = kB.inlineEditVisibleContext.bindTo(this.contextKeyService), this._isCursorAtInlineEditContext = kB.cursorAtInlineEditContext.bindTo(this.contextKeyService), this._currentEdit = qs(this, void 0), this._currentWidget = Rs(this._currentEdit, (e) => {
			let t = this._currentEdit.read(e);
			if (!t) return;
			let n = t.range.endLineNumber, r = t.range.endColumn, i = new mN(n, [new hN(r, t.text.endsWith("\n") && (t.range.startLineNumber !== t.range.endLineNumber || t.range.startColumn !== t.range.endColumn) ? t.text.slice(0, -1) : t.text, !1)]), a = t.range.startLineNumber === t.range.endLineNumber && i.parts.length === 1 && i.parts[0].lines.length === 1, o = t.text === "";
			if (a || o) return this.instantiationService.createInstance(dB, this.editor, {
				ghostText: Oi(i),
				minReservedLineCount: Oi(0),
				targetTextModel: Oi(this.editor.getModel() ?? void 0),
				range: Oi(t.range)
			});
		}), this._isAccepting = qs(this, !1), this._enabled = tr(this, this.editor.onDidChangeConfiguration, () => this.editor.getOption(63).enabled), this._fontFamily = tr(this, this.editor.onDidChangeConfiguration, () => this.editor.getOption(63).fontFamily);
		let c = Wa("InlineEditController.modelContentChangedSignal", e.onDidChangeModelContent);
		this._register(Os((t) => {
			this._enabled.read(t) && (c.read(t), this._isAccepting.read(t) || this.getInlineEdit(e, !0));
		}));
		let l = tr(this, e.onDidChangeCursorPosition, () => e.getPosition());
		this._register(Os((e) => {
			if (!this._enabled.read(e)) return;
			let t = l.read(e);
			t && this.checkCursorPosition(t);
		})), this._register(Os((t) => {
			let n = this._currentEdit.read(t);
			if (this._isCursorAtInlineEditContext.set(!1), !n) {
				this._isVisibleContext.set(!1);
				return;
			}
			this._isVisibleContext.set(!0);
			let r = e.getPosition();
			r && this.checkCursorPosition(r);
		}));
		let u = Wa("InlineEditController.editorBlurSignal", e.onDidBlurEditorWidget);
		this._register(Os(async (t) => {
			this._enabled.read(t) && (u.read(t), this._configurationService.getValue("editor.experimentalInlineEdit.keepOnBlur") || e.getOption(63).keepOnBlur || (this._currentRequestCts?.dispose(!0), this._currentRequestCts = void 0, await this.clear(!1)));
		}));
		let d = Wa("InlineEditController.editorFocusSignal", e.onDidFocusEditorText);
		this._register(Os((t) => {
			this._enabled.read(t) && (d.read(t), this.getInlineEdit(e, !0));
		}));
		let f = this._register(Yt());
		this._register(Os((e) => {
			let t = this._fontFamily.read(e);
			f.setStyle(t === "" || t === "default" ? "" : `
.monaco-editor .inline-edit-decoration,
.monaco-editor .inline-edit-decoration-preview,
.monaco-editor .inline-edit {
	font-family: ${t};
}`);
		})), this._register(new hB(this.editor, this._currentWidget, this.instantiationService)), this._register(new TB(this.editor, this._currentEdit, this.instantiationService, this._diffProviderFactoryService, this._modelService));
	}
	checkCursorPosition(e) {
		if (!this._currentEdit) {
			this._isCursorAtInlineEditContext.set(!1);
			return;
		}
		let t = this._currentEdit.get();
		t ? this._isCursorAtInlineEditContext.set(E.containsPosition(t.range, e)) : this._isCursorAtInlineEditContext.set(!1);
	}
	validateInlineEdit(e, t) {
		if (t.text.includes("\n") && t.range.startLineNumber !== t.range.endLineNumber && t.range.startColumn !== t.range.endColumn) {
			if (t.range.startColumn !== 1) return !1;
			let n = t.range.endLineNumber;
			if (t.range.endColumn !== (e.getModel()?.getLineLength(n) ?? 0) + 1) return !1;
		}
		return !0;
	}
	async fetchInlineEdit(e, t) {
		this._currentRequestCts && this._currentRequestCts.dispose(!0);
		let n = e.getModel();
		if (!n) return;
		let r = n.getVersionId(), i = this.languageFeaturesService.inlineEditProvider.all(n);
		if (i.length === 0) return;
		let a = i[0];
		this._currentRequestCts = new Cn();
		let o = this._currentRequestCts.token, s = t ? hs.Automatic : hs.Invoke;
		if (t && await jB(50, o), o.isCancellationRequested || n.isDisposed() || n.getVersionId() !== r) return;
		let c = await a.provideInlineEdit(n, { triggerKind: s }, o);
		if (c && !(o.isCancellationRequested || n.isDisposed() || n.getVersionId() !== r) && this.validateInlineEdit(e, c)) return c;
	}
	async getInlineEdit(e, t) {
		this._isCursorAtInlineEditContext.set(!1), await this.clear();
		let n = await this.fetchInlineEdit(e, t);
		n && this._currentEdit.set(n, void 0);
	}
	async trigger() {
		await this.getInlineEdit(this.editor, !1);
	}
	async jumpBack() {
		this._jumpBackPosition && (this.editor.setPosition(this._jumpBackPosition), this.editor.revealPositionInCenterIfOutsideViewport(this._jumpBackPosition));
	}
	async accept() {
		this._isAccepting.set(!0, void 0);
		let e = this._currentEdit.get();
		if (!e) return;
		let t = e.text;
		e.text.startsWith("\n") && (t = e.text.substring(1)), this.editor.pushUndoStop(), this.editor.executeEdits("acceptCurrent", [fr.replace(E.lift(e.range), t)]), e.accepted && await this._commandService.executeCommand(e.accepted.id, ...e.accepted.arguments || []).then(void 0, i), this.freeEdit(e), xo((e) => {
			this._currentEdit.set(void 0, e), this._isAccepting.set(!1, e);
		});
	}
	jumpToCurrent() {
		this._jumpBackPosition = this.editor.getSelection()?.getStartPosition();
		let e = this._currentEdit.get();
		if (!e) return;
		let t = b.lift({
			lineNumber: e.range.startLineNumber,
			column: e.range.startColumn
		});
		this.editor.setPosition(t), this.editor.revealPositionInCenterIfOutsideViewport(t);
	}
	async clear(e = !0) {
		let t = this._currentEdit.get();
		t && t?.rejected && e && await this._commandService.executeCommand(t.rejected.id, ...t.rejected.arguments || []).then(void 0, i), t && this.freeEdit(t), this._currentEdit.set(void 0, void 0);
	}
	freeEdit(e) {
		let t = this.editor.getModel();
		if (!t) return;
		let n = this.languageFeaturesService.inlineEditProvider.all(t);
		n.length !== 0 && n[0].freeInlineEdit(e);
	}
};
AB = kB = DB([
	OB(1, P),
	OB(2, j),
	OB(3, M),
	OB(4, ga),
	OB(5, Fl),
	OB(6, bt),
	OB(7, je)
], AB);
function jB(e, t) {
	return new Promise((n) => {
		let r, i = setTimeout(() => {
			r && r.dispose(), n();
		}, e);
		t && (r = t.onCancellationRequested(() => {
			clearTimeout(i), r && r.dispose(), n();
		}));
	});
}
// ../../../node_modules/.pnpm/monaco-editor@0.52.2/node_modules/monaco-editor/esm/vs/editor/contrib/inlineEdit/browser/commands.js
var MB = class extends O {
	constructor() {
		super({
			id: iB,
			label: "Accept Inline Edit",
			alias: "Accept Inline Edit",
			precondition: N.and(I.writable, AB.inlineEditVisibleContext),
			kbOpts: [{
				weight: 101,
				primary: 2,
				kbExpr: N.and(I.writable, AB.inlineEditVisibleContext, AB.cursorAtInlineEditContext)
			}],
			menuOpts: [{
				menuId: F.InlineEditToolbar,
				title: "Accept",
				group: "primary",
				order: 1
			}]
		});
	}
	async run(e, t) {
		await AB.get(t)?.accept();
	}
}, NB = class extends O {
	constructor() {
		let e = N.and(I.writable, N.not(AB.inlineEditVisibleKey));
		super({
			id: "editor.action.inlineEdit.trigger",
			label: "Trigger Inline Edit",
			alias: "Trigger Inline Edit",
			precondition: e,
			kbOpts: {
				weight: 101,
				primary: 2646,
				kbExpr: e
			}
		});
	}
	async run(e, t) {
		AB.get(t)?.trigger();
	}
}, PB = class extends O {
	constructor() {
		let e = N.and(I.writable, AB.inlineEditVisibleContext, N.not(AB.cursorAtInlineEditKey));
		super({
			id: oB,
			label: "Jump to Inline Edit",
			alias: "Jump to Inline Edit",
			precondition: e,
			kbOpts: {
				weight: 101,
				primary: 2646,
				kbExpr: e
			},
			menuOpts: [{
				menuId: F.InlineEditToolbar,
				title: "Jump To Edit",
				group: "primary",
				order: 3,
				when: e
			}]
		});
	}
	async run(e, t) {
		AB.get(t)?.jumpToCurrent();
	}
}, FB = class extends O {
	constructor() {
		let e = N.and(I.writable, AB.cursorAtInlineEditContext);
		super({
			id: sB,
			label: "Jump Back from Inline Edit",
			alias: "Jump Back from Inline Edit",
			precondition: e,
			kbOpts: {
				weight: 110,
				primary: 2646,
				kbExpr: e
			},
			menuOpts: [{
				menuId: F.InlineEditToolbar,
				title: "Jump Back",
				group: "primary",
				order: 3,
				when: e
			}]
		});
	}
	async run(e, t) {
		AB.get(t)?.jumpBack();
	}
}, IB = class extends O {
	constructor() {
		let e = N.and(I.writable, AB.inlineEditVisibleContext);
		super({
			id: aB,
			label: "Reject Inline Edit",
			alias: "Reject Inline Edit",
			precondition: e,
			kbOpts: {
				weight: 100,
				primary: 9,
				kbExpr: e
			},
			menuOpts: [{
				menuId: F.InlineEditToolbar,
				title: "Reject",
				group: "secondary",
				order: 2
			}]
		});
	}
	async run(e, t) {
		await AB.get(t)?.clear();
	}
};
k(MB), k(IB), k(PB), k(FB), k(NB), T(AB.ID, AB, 3);
// ../../../node_modules/.pnpm/monaco-editor@0.52.2/node_modules/monaco-editor/esm/vs/editor/contrib/inlineEdits/browser/consts.js
var LB = "editor.action.inlineEdits.accept", RB = "editor.action.inlineEdits.showPrevious", zB = "editor.action.inlineEdits.showNext", BB = new z("inlineEditsVisible", !1, B("inlineEditsVisible", "Whether an inline edit is visible")), VB = new z("inlineEditsIsPinned", !1, B("isPinned", "Whether an inline edit is visible")), HB = class extends U {
	static {
		this.ID = "editor.contrib.placeholderText";
	}
	constructor(e) {
		super(), this._editor = e, this._editorObs = u(this._editor), this._placeholderText = this._editorObs.getOption(88), this._state = wa({
			owner: this,
			equalsFn: Dl
		}, (e) => {
			let t = this._placeholderText.read(e);
			if (t && this._editorObs.valueIsEmpty.read(e)) return { placeholder: t };
		}), this._shouldViewBeAlive = UB(this, (e) => this._state.read(e)?.placeholder !== void 0), this._view = Bc((e, t) => {
			if (!this._shouldViewBeAlive.read(e)) return;
			let n = cc("div.editorPlaceholder");
			t.add(Os((e) => {
				let t = this._state.read(e), r = t?.placeholder !== void 0;
				n.root.style.display = r ? "block" : "none", n.root.innerText = t?.placeholder ?? "";
			})), t.add(Os((e) => {
				let t = this._editorObs.layoutInfo.read(e);
				n.root.style.left = `${t.contentLeft}px`, n.root.style.width = t.contentWidth - t.verticalScrollbarWidth + "px", n.root.style.top = `${this._editor.getTopForLineNumber(0)}px`;
			})), t.add(Os((e) => {
				n.root.style.fontFamily = this._editorObs.getOption(49).read(e), n.root.style.fontSize = this._editorObs.getOption(52).read(e) + "px", n.root.style.lineHeight = this._editorObs.getOption(67).read(e) + "px";
			})), t.add(this._editorObs.createOverlayWidget({
				allowEditorOverflow: !1,
				minContentWidthInPx: Oi(0),
				position: Oi(null),
				domNode: n.root
			}));
		}), this._view.recomputeInitiallyAndOnChange(this._store);
	}
};
function UB(e, t) {
	return yi(e, (e, n) => n === !0 || t(e));
}
// ../../../node_modules/.pnpm/monaco-editor@0.52.2/node_modules/monaco-editor/esm/vs/editor/contrib/inlineEdits/browser/inlineEditsWidget.js
var WB = function(e, t, n, r) {
	var i = arguments.length, a = i < 3 ? t : r === null ? r = Object.getOwnPropertyDescriptor(t, n) : r, o;
	if (typeof Reflect == "object" && typeof Reflect.decorate == "function") a = Reflect.decorate(e, t, n, r);
	else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (i < 3 ? o(a) : i > 3 ? o(t, n, a) : o(t, n)) || a);
	return i > 3 && a && Object.defineProperty(t, n, a), a;
}, GB = function(e, t) {
	return function(n, r) {
		t(n, r, e);
	};
}, KB = class {
	constructor(e, t, n) {
		this.range = e, this.newLines = t, this.changes = n;
	}
}, qB = class extends U {
	constructor(t, n, r, i) {
		super(), this._editor = t, this._edit = n, this._userPrompt = r, this._instantiationService = i, this._editorObs = u(this._editor), this._elements = cc("div.inline-edits-widget", { style: {
			position: "absolute",
			overflow: "visible",
			top: "0px",
			left: "0px"
		} }, [cc("div@editorContainer", { style: {
			position: "absolute",
			top: "0px",
			left: "0px",
			width: "500px",
			height: "500px"
		} }, [
			cc("div.toolbar@toolbar", { style: {
				position: "absolute",
				top: "-25px",
				left: "0px"
			} }),
			cc("div.promptEditor@promptEditor", { style: {
				position: "absolute",
				top: "-25px",
				left: "80px",
				width: "300px",
				height: "22px"
			} }),
			cc("div.preview@editor", { style: {
				position: "absolute",
				top: "0px",
				left: "0px"
			} })
		]), go("svg", { style: {
			overflow: "visible",
			pointerEvents: "none"
		} }, [go("defs", [go("linearGradient", {
			id: "Gradient2",
			x1: "0",
			y1: "0",
			x2: "1",
			y2: "0"
		}, [go("stop", {
			offset: "0%",
			class: "gradient-stop"
		}), go("stop", {
			offset: "100%",
			class: "gradient-stop"
		})])]), go("path@path", {
			d: "",
			fill: "url(#Gradient2)"
		})])]), this._previewTextModel = this._register(this._instantiationService.createInstance(Ma, "", Kn, Ma.DEFAULT_CREATION_OPTIONS, null)), this._setText = ia((e) => {
			let t = this._edit.read(e);
			t && this._previewTextModel.setValue(t.newLines.join("\n"));
		}).recomputeInitiallyAndOnChange(this._store), this._promptTextModel = this._register(this._instantiationService.createInstance(Ma, "", Kn, Ma.DEFAULT_CREATION_OPTIONS, null)), this._promptEditor = this._register(this._instantiationService.createInstance(gD, this._elements.promptEditor, {
			glyphMargin: !1,
			lineNumbers: "off",
			minimap: { enabled: !1 },
			guides: {
				indentation: !1,
				bracketPairs: !1,
				bracketPairsHorizontal: !1,
				highlightActiveIndentation: !1
			},
			folding: !1,
			selectOnLineNumbers: !1,
			selectionHighlight: !1,
			columnSelection: !1,
			overviewRulerBorder: !1,
			overviewRulerLanes: 0,
			lineDecorationsWidth: 0,
			lineNumbersMinChars: 0,
			placeholder: "Describe the change you want...",
			fontFamily: e
		}, {
			contributions: rc.getSomeEditorContributions([
				$F.ID,
				HB.ID,
				Ok.ID
			]),
			isSimpleWidget: !0
		}, this._editor)), this._previewEditor = this._register(this._instantiationService.createInstance(gD, this._elements.editor, {
			glyphMargin: !1,
			lineNumbers: "off",
			minimap: { enabled: !1 },
			guides: {
				indentation: !1,
				bracketPairs: !1,
				bracketPairsHorizontal: !1,
				highlightActiveIndentation: !1
			},
			folding: !1,
			selectOnLineNumbers: !1,
			selectionHighlight: !1,
			columnSelection: !1,
			overviewRulerBorder: !1,
			overviewRulerLanes: 0,
			lineDecorationsWidth: 0,
			lineNumbersMinChars: 0
		}, { contributions: [] }, this._editor)), this._previewEditorObs = u(this._previewEditor), this._decorations = ia(this, (e) => {
			this._setText.read(e);
			let t = this._edit.read(e)?.changes;
			if (!t) return [];
			let n = [], r = [];
			if (t.length === 1 && t[0].innerChanges[0].modifiedRange.equalsRange(this._previewTextModel.getFullModelRange())) return [];
			for (let e of t) if (e.original.isEmpty || n.push({
				range: e.original.toInclusiveRange(),
				options: ut
			}), e.modified.isEmpty || r.push({
				range: e.modified.toInclusiveRange(),
				options: qr
			}), e.modified.isEmpty || e.original.isEmpty) e.original.isEmpty || n.push({
				range: e.original.toInclusiveRange(),
				options: ii
			}), e.modified.isEmpty || r.push({
				range: e.modified.toInclusiveRange(),
				options: Lr
			});
			else for (let t of e.innerChanges || []) e.original.contains(t.originalRange.startLineNumber) && n.push({
				range: t.originalRange,
				options: t.originalRange.isEmpty() ? ae : Al
			}), e.modified.contains(t.modifiedRange.startLineNumber) && r.push({
				range: t.modifiedRange,
				options: t.modifiedRange.isEmpty() ? ar : Zt
			});
			return r;
		}), this._layout1 = ia(this, (e) => {
			let t = this._editor.getModel(), n = this._edit.read(e);
			if (!n) return null;
			let r = n.range, i = 0;
			for (let e = r.startLineNumber; e < r.endLineNumberExclusive; e++) {
				let n = t.getLineMaxColumn(e), r = this._editor.getOffsetForColumn(e, n);
				i = Math.max(i, r);
			}
			return { left: this._editor.getLayoutInfo().contentLeft + i };
		}), this._layout = ia(this, (e) => {
			let t = this._edit.read(e);
			if (!t) return null;
			let n = t.range, r = this._editorObs.scrollLeft.read(e), i = this._layout1.read(e).left + 20 - r, a = this._editor.getTopForLineNumber(n.startLineNumber) - this._editorObs.scrollTop.read(e), o = this._editor.getTopForLineNumber(n.endLineNumberExclusive) - this._editorObs.scrollTop.read(e), s = new YB(i, a), c = new YB(i, o), l = o - a, u = this._editor.getOption(67) * t.newLines.length, d = l - u;
			return {
				topCode: s,
				bottomCode: c,
				codeHeight: l,
				topEdit: new YB(i + 50, a + d / 2),
				bottomEdit: new YB(i + 50, o - d / 2),
				editHeight: u
			};
		});
		let a = ia(this, (e) => this._edit.read(e) !== void 0 || this._userPrompt.read(e) !== void 0);
		this._register(Zs(this._elements.root, { display: ia(this, (e) => a.read(e) ? "block" : "none") })), this._register(Vt(this._editor.getDomNode(), this._elements.root)), this._register(u(t).createOverlayWidget({
			domNode: this._elements.root,
			position: Oi(null),
			allowEditorOverflow: !1,
			minContentWidthInPx: ia((e) => {
				let t = this._layout1.read(e)?.left;
				return t === void 0 ? 0 : t + this._previewEditorObs.contentWidth.read(e);
			})
		})), this._previewEditor.setModel(this._previewTextModel), this._register(this._previewEditorObs.setDecorations(this._decorations)), this._register(Os((e) => {
			let t = this._layout.read(e);
			if (!t) return;
			let { topCode: n, bottomCode: r, topEdit: i, bottomEdit: a, editHeight: o } = t, s = new XB().moveTo(n).lineTo(n.deltaX(10)).curveTo(n.deltaX(50), i.deltaX(-40), i.deltaX(-0)).lineTo(i).lineTo(a).lineTo(a.deltaX(-0)).curveTo(a.deltaX(-40), r.deltaX(50), r.deltaX(10)).lineTo(r).build();
			this._elements.path.setAttribute("d", s), this._elements.editorContainer.style.top = `${i.y}px`, this._elements.editorContainer.style.left = `${i.x}px`, this._elements.editorContainer.style.height = `${o}px`;
			let c = this._previewEditorObs.contentWidth.read(e);
			this._previewEditor.layout({
				height: o,
				width: c
			});
		})), this._promptEditor.setModel(this._promptTextModel), this._promptEditor.layout(), this._register(ZB(JB(this._userPrompt, (e) => e ?? "", (e) => e), u(this._promptEditor).value)), this._register(Os((e) => {
			let t = u(this._promptEditor).isFocused.read(e);
			this._elements.root.classList.toggle("focused", t);
		}));
	}
};
qB = WB([GB(3, P)], qB);
function JB(e, t, n) {
	return ss(void 0, (n) => t(e.read(n)), (t, r) => e.set(n(t), r));
}
var YB = class e {
	constructor(e, t) {
		this.x = e, this.y = t;
	}
	deltaX(t) {
		return new e(this.x + t, this.y);
	}
}, XB = class {
	constructor() {
		this._data = "";
	}
	moveTo(e) {
		return this._data += `M ${e.x} ${e.y} `, this;
	}
	lineTo(e) {
		return this._data += `L ${e.x} ${e.y} `, this;
	}
	curveTo(e, t, n) {
		return this._data += `C ${e.x} ${e.y} ${t.x} ${t.y} ${n.x} ${n.y} `, this;
	}
	build() {
		return this._data;
	}
};
function ZB(e, t) {
	let n = new g();
	return n.add(Os((n) => {
		let r = e.read(n);
		t.set(r, void 0);
	})), n.add(Os((n) => {
		let r = t.read(n);
		e.set(r, void 0);
	})), n;
}
// ../../../node_modules/.pnpm/monaco-editor@0.52.2/node_modules/monaco-editor/esm/vs/editor/contrib/inlineEdits/browser/inlineEditsModel.js
var QB = function(e, t, n, r) {
	var i = arguments.length, a = i < 3 ? t : r === null ? r = Object.getOwnPropertyDescriptor(t, n) : r, o;
	if (typeof Reflect == "object" && typeof Reflect.decorate == "function") a = Reflect.decorate(e, t, n, r);
	else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (i < 3 ? o(a) : i > 3 ? o(t, n, a) : o(t, n)) || a);
	return i > 3 && a && Object.defineProperty(t, n, a), a;
}, $B = function(e, t) {
	return function(n, r) {
		t(n, r, e);
	};
}, eV, tV = class extends U {
	static {
		eV = this;
	}
	static {
		this._modelId = 0;
	}
	static _createUniqueUri() {
		return De.from({
			scheme: "inline-edits",
			path: (/* @__PURE__ */ new Date()).toString() + String(eV._modelId++)
		});
	}
	constructor(e, t, n, r, i, o, s) {
		super(), this.textModel = e, this._textModelVersionId = t, this._selection = n, this._debounceValue = r, this.languageFeaturesService = i, this._diffProviderFactoryService = o, this._modelService = s, this._forceUpdateExplicitlySignal = a(this), this._selectedInlineCompletionId = qs(this, void 0), this._isActive = qs(this, !1), this._originalModel = Rs(() => this._modelService.createModel("", null, eV._createUniqueUri())).keepObserved(this._store), this._modifiedModel = Rs(() => this._modelService.createModel("", null, eV._createUniqueUri())).keepObserved(this._store), this._pinnedRange = new rV(this.textModel, this._textModelVersionId), this.isPinned = this._pinnedRange.range.map((e) => !!e), this.userPrompt = qs(this, void 0), this.inlineEdit = ia(this, (e) => this._inlineEdit.read(e)?.promiseResult.read(e)?.data), this._inlineEdit = ia(this, (e) => {
			let t = this.selectedInlineEdit.read(e);
			if (!t) return;
			let n = t.inlineCompletion.range;
			if (t.inlineCompletion.insertText.trim() === "") return;
			let r = t.inlineCompletion.insertText.split(/\r\n|\r|\n/);
			function i(e) {
				let t = e[0].match(/^\s*/)?.[0] ?? "";
				return e.map((e) => e.replace(RegExp("^" + t), ""));
			}
			r = i(r);
			let a = this.textModel.getValueInRange(n).split(/\r\n|\r|\n/);
			a = i(a), this._originalModel.get().setValue(a.join("\n")), this._modifiedModel.get().setValue(r.join("\n"));
			let o = this._diffProviderFactoryService.createDiffProvider({ diffAlgorithm: "advanced" });
			return nc.fromFn(async () => {
				let e = await o.computeDiff(this._originalModel.get(), this._modifiedModel.get(), {
					computeMoves: !1,
					ignoreTrimWhitespace: !1,
					maxComputationTimeMs: 1e3
				}, C.None);
				if (!e.identical) return new KB(uo.fromRangeInclusive(n), i(r), e.changes);
			});
		}), this._fetchStore = this._register(new g()), this._inlineEditsFetchResult = eo(this, void 0), this._inlineEdits = wa({
			owner: this,
			equalsFn: Dl
		}, (e) => this._inlineEditsFetchResult.read(e)?.completions.map((e) => new nV(e)) ?? []), this._fetchInlineEditsPromise = Cc({
			owner: this,
			createEmptyChangeSummary: () => ({ inlineCompletionTriggerKind: Ws.Automatic }),
			handleChange: (e, t) => (e.didChange(this._forceUpdateExplicitlySignal) && (t.inlineCompletionTriggerKind = Ws.Explicit), !0)
		}, async (e, t) => {
			this._fetchStore.clear(), this._forceUpdateExplicitlySignal.read(e), this._textModelVersionId.read(e);
			function n(e, t) {
				return t(e);
			}
			let r = this._pinnedRange.range.read(e) ?? n(this._selection.read(e), (e) => e.isEmpty() ? void 0 : e);
			if (!r) {
				this._inlineEditsFetchResult.set(void 0, void 0), this.userPrompt.set(void 0, void 0);
				return;
			}
			let i = {
				triggerKind: t.inlineCompletionTriggerKind,
				selectedSuggestionInfo: void 0,
				userPrompt: this.userPrompt.read(e)
			}, a = Wn(this._fetchStore);
			await Io(200, a);
			let o = await PN(this.languageFeaturesService.inlineCompletionsProvider, r, this.textModel, i, a);
			a.isCancellationRequested || this._inlineEditsFetchResult.set(o, void 0);
		}), this._filteredInlineEditItems = wa({
			owner: this,
			equalsFn: Zc()
		}, (e) => this._inlineEdits.read(e)), this.selectedInlineCompletionIndex = ia(this, (e) => {
			let t = this._selectedInlineCompletionId.read(e), n = this._filteredInlineEditItems.read(e), r = this._selectedInlineCompletionId === void 0 ? -1 : n.findIndex((e) => e.semanticId === t);
			return r === -1 ? (this._selectedInlineCompletionId.set(void 0, void 0), 0) : r;
		}), this.selectedInlineEdit = ia(this, (e) => this._filteredInlineEditItems.read(e)[this.selectedInlineCompletionIndex.read(e)]), this._register(Nc(this._fetchInlineEditsPromise));
	}
	async triggerExplicitly(e) {
		vs(e, (e) => {
			this._isActive.set(!0, e), this._forceUpdateExplicitlySignal.trigger(e);
		}), await this._fetchInlineEditsPromise.get();
	}
	stop(e) {
		vs(e, (e) => {
			this.userPrompt.set(void 0, e), this._isActive.set(!1, e), this._inlineEditsFetchResult.set(void 0, e), this._pinnedRange.setRange(void 0, e);
		});
	}
	async _deltaSelectedInlineCompletionIndex(e) {
		await this.triggerExplicitly();
		let t = this._filteredInlineEditItems.get() || [];
		if (t.length > 0) {
			let n = (this.selectedInlineCompletionIndex.get() + e + t.length) % t.length;
			this._selectedInlineCompletionId.set(t[n].semanticId, void 0);
		} else this._selectedInlineCompletionId.set(void 0, void 0);
	}
	async next() {
		await this._deltaSelectedInlineCompletionIndex(1);
	}
	async previous() {
		await this._deltaSelectedInlineCompletionIndex(-1);
	}
	async accept(e) {
		if (e.getModel() !== this.textModel) throw new Ft();
		let t = this.selectedInlineEdit.get();
		t && (e.pushUndoStop(), e.executeEdits("inlineSuggestion.accept", [t.inlineCompletion.toSingleTextEdit().toSingleEditOperation()]), this.stop());
	}
};
tV = eV = QB([
	$B(4, M),
	$B(5, bt),
	$B(6, je)
], tV);
var nV = class {
	constructor(e) {
		this.inlineCompletion = e, this.semanticId = this.inlineCompletion.hash();
	}
}, rV = class extends U {
	constructor(e, t) {
		super(), this._textModel = e, this._versionId = t, this._decorations = qs(this, []), this.range = ia(this, (e) => {
			this._versionId.read(e);
			let t = this._decorations.read(e)[0];
			return t ? this._textModel.getDecorationRange(t) ?? null : null;
		}), this._register(Gt(() => {
			this._textModel.deltaDecorations(this._decorations.get(), []);
		}));
	}
	setRange(e, t) {
		this._decorations.set(this._textModel.deltaDecorations(this._decorations.get(), e ? [{
			range: e,
			options: { description: "trackedRange" }
		}] : []), t);
	}
}, iV = function(e, t, n, r) {
	var i = arguments.length, a = i < 3 ? t : r === null ? r = Object.getOwnPropertyDescriptor(t, n) : r, o;
	if (typeof Reflect == "object" && typeof Reflect.decorate == "function") a = Reflect.decorate(e, t, n, r);
	else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (i < 3 ? o(a) : i > 3 ? o(t, n, a) : o(t, n)) || a);
	return i > 3 && a && Object.defineProperty(t, n, a), a;
}, aV = function(e, t) {
	return function(n, r) {
		t(n, r, e);
	};
}, oV, sV = class extends U {
	static {
		oV = this;
	}
	static {
		this.ID = "editor.contrib.inlineEditsController";
	}
	static get(e) {
		return e.getContribution(oV.ID);
	}
	constructor(e, t, n, r, i, a) {
		super(), this.editor = e, this._instantiationService = t, this._contextKeyService = n, this._debounceService = r, this._languageFeaturesService = i, this._configurationService = a, this._enabled = kn("editor.inlineEdits.enabled", !1, this._configurationService), this._editorObs = u(this.editor), this._selection = ia(this, (e) => this._editorObs.cursorSelection.read(e) ?? new V(1, 1, 1, 1)), this._debounceValue = this._debounceService.for(this._languageFeaturesService.inlineCompletionsProvider, "InlineEditsDebounce", {
			min: 50,
			max: 50
		}), this.model = Rs(this, (e) => {
			if (!this._enabled.read(e) || this._editorObs.isReadonly.read(e)) return;
			let t = this._editorObs.model.read(e);
			if (t) return this._instantiationService.createInstance(Bn(tV, e), t, this._editorObs.versionId, this._selection, this._debounceValue);
		}), this._hadInlineEdit = yi(this, (e, t) => t || this.model.read(e)?.inlineEdit.read(e) !== void 0), this._widget = Rs(this, (e) => {
			if (this._hadInlineEdit.read(e)) return this._instantiationService.createInstance(Bn(qB, e), this.editor, this.model.map((e, t) => e?.inlineEdit.read(t)), cV((e) => this.model.read(e)?.userPrompt ?? qs("empty", "")));
		}), this._register(Ce(BB, this._contextKeyService, (e) => !!this.model.read(e)?.inlineEdit.read(e))), this._register(Ce(VB, this._contextKeyService, (e) => !!this.model.read(e)?.isPinned.read(e))), this.model.recomputeInitiallyAndOnChange(this._store), this._widget.recomputeInitiallyAndOnChange(this._store);
	}
};
sV = oV = iV([
	aV(1, P),
	aV(2, j),
	aV(3, hi),
	aV(4, M),
	aV(5, Fl)
], sV);
function cV(e) {
	return ss(void 0, (t) => e(t).read(t), (t, n) => {
		e(void 0).set(t, n);
	});
}
// ../../../node_modules/.pnpm/monaco-editor@0.52.2/node_modules/monaco-editor/esm/vs/editor/contrib/inlineEdits/browser/commands.js
function lV(e) {
	return {
		label: e.value,
		alias: e.original
	};
}
var uV = class e extends O {
	static {
		this.ID = zB;
	}
	constructor() {
		super({
			id: e.ID,
			...lV(H("action.inlineEdits.showNext", "Show Next Inline Edit")),
			precondition: N.and(I.writable, BB),
			kbOpts: {
				weight: 100,
				primary: 606
			}
		});
	}
	async run(e, t) {
		sV.get(t)?.model.get()?.next();
	}
}, dV = class e extends O {
	static {
		this.ID = RB;
	}
	constructor() {
		super({
			id: e.ID,
			...lV(H("action.inlineEdits.showPrevious", "Show Previous Inline Edit")),
			precondition: N.and(I.writable, BB),
			kbOpts: {
				weight: 100,
				primary: 604
			}
		});
	}
	async run(e, t) {
		sV.get(t)?.model.get()?.previous();
	}
}, fV = class extends O {
	constructor() {
		super({
			id: "editor.action.inlineEdits.trigger",
			...lV(H("action.inlineEdits.trigger", "Trigger Inline Edit")),
			precondition: I.writable
		});
	}
	async run(e, t) {
		let n = sV.get(t);
		await Pa(async (e) => {
			await n?.model.get()?.triggerExplicitly(e);
		});
	}
}, pV = class extends O {
	constructor() {
		super({
			id: LB,
			...lV(H("action.inlineEdits.accept", "Accept Inline Edit")),
			precondition: BB,
			menuOpts: {
				menuId: F.InlineEditsActions,
				title: B("inlineEditsActions", "Accept Inline Edit"),
				group: "primary",
				order: 1,
				icon: v.check
			},
			kbOpts: {
				primary: 2058,
				weight: 2e4,
				kbExpr: BB
			}
		});
	}
	async run(e, t) {
		t instanceof gD && (t = t.getParentEditor());
		let n = sV.get(t);
		n && (n.model.get()?.accept(n.editor), n.editor.focus());
	}
}, mV = class e extends O {
	static {
		this.ID = "editor.action.inlineEdits.hide";
	}
	constructor() {
		super({
			id: e.ID,
			...lV(H("action.inlineEdits.hide", "Hide Inline Edit")),
			precondition: BB,
			kbOpts: {
				weight: 100,
				primary: 9
			}
		});
	}
	async run(e, t) {
		let n = sV.get(t);
		xo((e) => {
			n?.model.get()?.stop(e);
		});
	}
};
T(sV.ID, sV, 3), k(fV), k(uV), k(dV), k(pV), k(mV);
// ../../../node_modules/.pnpm/monaco-editor@0.52.2/node_modules/monaco-editor/esm/vs/editor/contrib/parameterHints/browser/provideSignatureHelp.js
var hV = {
	Visible: new z("parameterHintsVisible", !1),
	MultipleSignatures: new z("parameterHintsMultipleSignatures", !1)
};
async function gV(e, t, n, r, a) {
	let o = e.ordered(t);
	for (let e of o) try {
		let i = await e.provideSignatureHelp(t, n, a, r);
		if (i) return i;
	} catch (e) {
		i(e);
	}
}
Ol.registerCommand("_executeSignatureHelpProvider", async (e, ...t) => {
	let [n, r, i] = t;
	y(De.isUri(n)), y(b.isIPosition(r)), y(typeof i == "string" || !i);
	let a = e.get(M), o = await e.get(Ve).createModelReference(n);
	try {
		let e = await gV(a.signatureHelpProvider, o.object.textEditorModel, b.lift(r), {
			triggerKind: Jc.Invoke,
			isRetrigger: !1,
			triggerCharacter: i
		}, C.None);
		return e ? (setTimeout(() => e.dispose(), 0), e.value) : void 0;
	} finally {
		o.dispose();
	}
});
// ../../../node_modules/.pnpm/monaco-editor@0.52.2/node_modules/monaco-editor/esm/vs/editor/contrib/parameterHints/browser/parameterHintsModel.js
var _V;
(function(e) {
	e.Default = { type: 0 };
	class t {
		constructor(e, t) {
			this.request = e, this.previouslyActiveHints = t, this.type = 2;
		}
	}
	e.Pending = t;
	class n {
		constructor(e) {
			this.hints = e, this.type = 1;
		}
	}
	e.Active = n;
})(_V ||= {});
var vV = class e extends U {
	static {
		this.DEFAULT_DELAY = 120;
	}
	constructor(t, n, r = e.DEFAULT_DELAY) {
		super(), this._onChangedHints = this._register(new x()), this.onChangedHints = this._onChangedHints.event, this.triggerOnType = !1, this._state = _V.Default, this._pendingTriggers = [], this._lastSignatureHelpResult = this._register(new Zr()), this.triggerChars = new Bo(), this.retriggerChars = new Bo(), this.triggerId = 0, this.editor = t, this.providers = n, this.throttledDelayer = new ge(r), this._register(this.editor.onDidBlurEditorWidget(() => this.cancel())), this._register(this.editor.onDidChangeConfiguration(() => this.onEditorConfigurationChange())), this._register(this.editor.onDidChangeModel((e) => this.onModelChanged())), this._register(this.editor.onDidChangeModelLanguage((e) => this.onModelChanged())), this._register(this.editor.onDidChangeCursorSelection((e) => this.onCursorChange(e))), this._register(this.editor.onDidChangeModelContent((e) => this.onModelContentChange())), this._register(this.providers.onDidChange(this.onModelChanged, this)), this._register(this.editor.onDidType((e) => this.onDidType(e))), this.onEditorConfigurationChange(), this.onModelChanged();
	}
	get state() {
		return this._state;
	}
	set state(e) {
		this._state.type === 2 && this._state.request.cancel(), this._state = e;
	}
	cancel(e = !1) {
		this.state = _V.Default, this.throttledDelayer.cancel(), e || this._onChangedHints.fire(void 0);
	}
	trigger(e, t) {
		let n = this.editor.getModel();
		if (!n || !this.providers.has(n)) return;
		let r = ++this.triggerId;
		this._pendingTriggers.push(e), this.throttledDelayer.trigger(() => this.doTrigger(r), t).catch(er);
	}
	next() {
		if (this.state.type !== 1) return;
		let e = this.state.hints.signatures.length, t = this.state.hints.activeSignature, n = t % e === e - 1, r = this.editor.getOption(86).cycle;
		(e < 2 || n) && !r ? this.cancel() : this.updateActiveSignature(n && r ? 0 : t + 1);
	}
	previous() {
		if (this.state.type !== 1) return;
		let e = this.state.hints.signatures.length, t = this.state.hints.activeSignature, n = t === 0, r = this.editor.getOption(86).cycle;
		(e < 2 || n) && !r ? this.cancel() : this.updateActiveSignature(n && r ? e - 1 : t - 1);
	}
	updateActiveSignature(e) {
		this.state.type === 1 && (this.state = new _V.Active({
			...this.state.hints,
			activeSignature: e
		}), this._onChangedHints.fire(this.state.hints));
	}
	async doTrigger(e) {
		let t = this.state.type === 1 || this.state.type === 2, n = this.getLastActiveHints();
		if (this.cancel(!0), this._pendingTriggers.length === 0) return !1;
		let r = this._pendingTriggers.reduce(yV);
		this._pendingTriggers = [];
		let i = {
			triggerKind: r.triggerKind,
			triggerCharacter: r.triggerCharacter,
			isRetrigger: t,
			activeSignatureHelp: n
		};
		if (!this.editor.hasModel()) return !1;
		let a = this.editor.getModel(), o = this.editor.getPosition();
		this.state = new _V.Pending(Te((e) => gV(this.providers, a, o, i, e)), n);
		try {
			let t = await this.state.request;
			return e === this.triggerId ? !t || !t.value.signatures || t.value.signatures.length === 0 ? (t?.dispose(), this._lastSignatureHelpResult.clear(), this.cancel(), !1) : (this.state = new _V.Active(t.value), this._lastSignatureHelpResult.value = t, this._onChangedHints.fire(this.state.hints), !0) : (t?.dispose(), !1);
		} catch (t) {
			return e === this.triggerId && (this.state = _V.Default), er(t), !1;
		}
	}
	getLastActiveHints() {
		switch (this.state.type) {
			case 1: return this.state.hints;
			case 2: return this.state.previouslyActiveHints;
			default: return;
		}
	}
	get isTriggered() {
		return this.state.type === 1 || this.state.type === 2 || this.throttledDelayer.isTriggered();
	}
	onModelChanged() {
		this.cancel(), this.triggerChars.clear(), this.retriggerChars.clear();
		let e = this.editor.getModel();
		if (e) for (let t of this.providers.ordered(e)) {
			for (let e of t.signatureHelpTriggerCharacters || []) if (e.length) {
				let t = e.charCodeAt(0);
				this.triggerChars.add(t), this.retriggerChars.add(t);
			}
			for (let e of t.signatureHelpRetriggerCharacters || []) e.length && this.retriggerChars.add(e.charCodeAt(0));
		}
	}
	onDidType(e) {
		if (!this.triggerOnType) return;
		let t = e.length - 1, n = e.charCodeAt(t);
		(this.triggerChars.has(n) || this.isTriggered && this.retriggerChars.has(n)) && this.trigger({
			triggerKind: Jc.TriggerCharacter,
			triggerCharacter: e.charAt(t)
		});
	}
	onCursorChange(e) {
		e.source === "mouse" ? this.cancel() : this.isTriggered && this.trigger({ triggerKind: Jc.ContentChange });
	}
	onModelContentChange() {
		this.isTriggered && this.trigger({ triggerKind: Jc.ContentChange });
	}
	onEditorConfigurationChange() {
		this.triggerOnType = this.editor.getOption(86).enabled, this.triggerOnType || this.cancel();
	}
	dispose() {
		this.cancel(!0), super.dispose();
	}
};
function yV(e, t) {
	switch (t.triggerKind) {
		case Jc.Invoke: return t;
		case Jc.ContentChange: return e;
		case Jc.TriggerCharacter:
		default: return t;
	}
}
// ../../../node_modules/.pnpm/monaco-editor@0.52.2/node_modules/monaco-editor/esm/vs/editor/contrib/parameterHints/browser/parameterHintsWidget.js
var bV = function(e, t, n, r) {
	var i = arguments.length, a = i < 3 ? t : r === null ? r = Object.getOwnPropertyDescriptor(t, n) : r, o;
	if (typeof Reflect == "object" && typeof Reflect.decorate == "function") a = Reflect.decorate(e, t, n, r);
	else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (i < 3 ? o(a) : i > 3 ? o(t, n, a) : o(t, n)) || a);
	return i > 3 && a && Object.defineProperty(t, n, a), a;
}, xV = function(e, t) {
	return function(n, r) {
		t(n, r, e);
	};
}, SV, CV = w, wV = Jn("parameter-hints-next", v.chevronDown, B("parameterHintsNextIcon", "Icon for show next parameter hint.")), TV = Jn("parameter-hints-previous", v.chevronUp, B("parameterHintsPreviousIcon", "Icon for show previous parameter hint.")), EV = class extends U {
	static {
		SV = this;
	}
	static {
		this.ID = "editor.widget.parameterHintsWidget";
	}
	constructor(e, t, n, r, i, a) {
		super(), this.editor = e, this.model = t, this.telemetryService = a, this.renderDisposeables = this._register(new g()), this.visible = !1, this.announcedLabel = null, this.allowEditorOverflow = !0, this.markdownRenderer = this._register(new Jt({ editor: e }, i, r)), this.keyVisible = hV.Visible.bindTo(n), this.keyMultipleSignatures = hV.MultipleSignatures.bindTo(n);
	}
	createParameterHintDOMNodes() {
		let e = CV(".editor-widget.parameter-hints-widget"), t = D(e, CV(".phwrapper"));
		t.tabIndex = -1;
		let n = D(t, CV(".controls")), r = D(n, CV(".button" + _l.asCSSSelector(TV))), i = D(n, CV(".overloads")), a = D(n, CV(".button" + _l.asCSSSelector(wV)));
		this._register(_(r, "click", (e) => {
			Ot.stop(e), this.previous();
		})), this._register(_(a, "click", (e) => {
			Ot.stop(e), this.next();
		}));
		let o = CV(".body"), s = new Ct(o, { alwaysConsumeMouseWheel: !0 });
		this._register(s), t.appendChild(s.getDomNode());
		let c = D(o, CV(".signature")), l = D(o, CV(".docs"));
		e.style.userSelect = "text", this.domNodes = {
			element: e,
			signature: c,
			overloads: i,
			docs: l,
			scrollbar: s
		}, this.editor.addContentWidget(this), this.hide(), this._register(this.editor.onDidChangeCursorSelection((e) => {
			this.visible && this.editor.layoutContentWidget(this);
		}));
		let u = () => {
			if (!this.domNodes) return;
			let e = this.editor.getOption(50), t = this.domNodes.element;
			t.style.fontSize = `${e.fontSize}px`, t.style.lineHeight = `${e.lineHeight / e.fontSize}`, t.style.setProperty("--vscode-parameterHintsWidget-editorFontFamily", e.fontFamily), t.style.setProperty("--vscode-parameterHintsWidget-editorFontFamilyDefault", qa.fontFamily);
		};
		u(), this._register(wt.chain(this.editor.onDidChangeConfiguration.bind(this.editor), (e) => e.filter((e) => e.hasChanged(50)))(u)), this._register(this.editor.onDidLayoutChange((e) => this.updateMaxHeight())), this.updateMaxHeight();
	}
	show() {
		this.visible || (this.domNodes || this.createParameterHintDOMNodes(), this.keyVisible.set(!0), this.visible = !0, setTimeout(() => {
			this.domNodes?.element.classList.add("visible");
		}, 100), this.editor.layoutContentWidget(this));
	}
	hide() {
		this.renderDisposeables.clear(), this.visible && (this.keyVisible.reset(), this.visible = !1, this.announcedLabel = null, this.domNodes?.element.classList.remove("visible"), this.editor.layoutContentWidget(this));
	}
	getPosition() {
		return this.visible ? {
			position: this.editor.getPosition(),
			preference: [1, 2]
		} : null;
	}
	render(e) {
		if (this.renderDisposeables.clear(), !this.domNodes) return;
		let t = e.signatures.length > 1;
		this.domNodes.element.classList.toggle("multiple", t), this.keyMultipleSignatures.set(t), this.domNodes.signature.innerText = "", this.domNodes.docs.innerText = "";
		let n = e.signatures[e.activeSignature];
		if (!n) return;
		let r = D(this.domNodes.signature, CV(".code")), i = n.parameters.length > 0, a = n.activeParameter ?? e.activeParameter;
		if (i) this.renderParameters(r, n, a);
		else {
			let e = D(r, CV("span"));
			e.textContent = n.label;
		}
		let o = n.parameters[a];
		if (o?.documentation) {
			let e = CV("span.documentation");
			if (typeof o.documentation == "string") e.textContent = o.documentation;
			else {
				let t = this.renderMarkdownDocs(o.documentation);
				e.appendChild(t.element);
			}
			D(this.domNodes.docs, CV("p", {}, e));
		}
		if (n.documentation !== void 0) {
			if (typeof n.documentation == "string") D(this.domNodes.docs, CV("p", {}, n.documentation));
			else {
				let e = this.renderMarkdownDocs(n.documentation);
				D(this.domNodes.docs, e.element);
			}
		}
		let s = this.hasDocs(n, o);
		if (this.domNodes.signature.classList.toggle("has-docs", s), this.domNodes.docs.classList.toggle("empty", !s), this.domNodes.overloads.textContent = String(e.activeSignature + 1).padStart(e.signatures.length.toString().length, "0") + "/" + e.signatures.length, o) {
			let e = "", t = n.parameters[a];
			e = Array.isArray(t.label) ? n.label.substring(t.label[0], t.label[1]) : t.label, t.documentation && (e += typeof t.documentation == "string" ? `, ${t.documentation}` : `, ${t.documentation.value}`), n.documentation && (e += typeof n.documentation == "string" ? `, ${n.documentation}` : `, ${n.documentation.value}`), this.announcedLabel !== e && (gt(B("hint", "{0}, hint", e)), this.announcedLabel = e);
		}
		this.editor.layoutContentWidget(this), this.domNodes.scrollbar.scanDomNode();
	}
	renderMarkdownDocs(e) {
		let t = new lr(), n = this.renderDisposeables.add(this.markdownRenderer.render(e, { asyncRenderCallback: () => {
			this.domNodes?.scrollbar.scanDomNode();
		} }));
		n.element.classList.add("markdown-docs");
		let r = t.elapsed();
		return r > 300 && this.telemetryService.publicLog2("parameterHints.parseMarkdown", { renderDuration: r }), n;
	}
	hasDocs(e, t) {
		return !!(t && typeof t.documentation == "string" && Er(t.documentation).length > 0 || t && typeof t.documentation == "object" && Er(t.documentation).value.length > 0 || e.documentation && typeof e.documentation == "string" && Er(e.documentation).length > 0 || e.documentation && typeof e.documentation == "object" && Er(e.documentation.value).length > 0);
	}
	renderParameters(e, t, n) {
		let [r, i] = this.getParameterLabelOffsets(t, n), a = document.createElement("span");
		a.textContent = t.label.substring(0, r);
		let o = document.createElement("span");
		o.textContent = t.label.substring(r, i), o.className = "parameter active";
		let s = document.createElement("span");
		s.textContent = t.label.substring(i), D(e, a, o, s);
	}
	getParameterLabelOffsets(e, t) {
		let n = e.parameters[t];
		if (!n) return [0, 0];
		if (Array.isArray(n.label)) return n.label;
		if (n.label.length) {
			let t = RegExp(`(\\W|^)${zr(n.label)}(?=\\W|$)`, "g");
			t.test(e.label);
			let r = t.lastIndex - n.label.length;
			return r >= 0 ? [r, t.lastIndex] : [0, 0];
		}
		return [0, 0];
	}
	next() {
		this.editor.focus(), this.model.next();
	}
	previous() {
		this.editor.focus(), this.model.previous();
	}
	getDomNode() {
		return this.domNodes || this.createParameterHintDOMNodes(), this.domNodes.element;
	}
	getId() {
		return SV.ID;
	}
	updateMaxHeight() {
		if (!this.domNodes) return;
		let e = `${Math.max(this.editor.getLayoutInfo().height / 4, 250)}px`;
		this.domNodes.element.style.maxHeight = e;
		let t = this.domNodes.element.getElementsByClassName("phwrapper");
		t.length && (t[0].style.maxHeight = e);
	}
};
EV = SV = bV([
	xV(2, j),
	xV(3, p),
	xV(4, dr),
	xV(5, mc)
], EV), S("editorHoverWidget.highlightForeground", Ii, B("editorHoverWidgetHighlightForeground", "Foreground color of the active item in the parameter hint."));
// ../../../node_modules/.pnpm/monaco-editor@0.52.2/node_modules/monaco-editor/esm/vs/editor/contrib/parameterHints/browser/parameterHints.js
var DV = function(e, t, n, r) {
	var i = arguments.length, a = i < 3 ? t : r === null ? r = Object.getOwnPropertyDescriptor(t, n) : r, o;
	if (typeof Reflect == "object" && typeof Reflect.decorate == "function") a = Reflect.decorate(e, t, n, r);
	else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (i < 3 ? o(a) : i > 3 ? o(t, n, a) : o(t, n)) || a);
	return i > 3 && a && Object.defineProperty(t, n, a), a;
}, OV = function(e, t) {
	return function(n, r) {
		t(n, r, e);
	};
}, kV, AV = class extends U {
	static {
		kV = this;
	}
	static {
		this.ID = "editor.controller.parameterHints";
	}
	static get(e) {
		return e.getContribution(kV.ID);
	}
	constructor(e, t, n) {
		super(), this.editor = e, this.model = this._register(new vV(e, n.signatureHelpProvider)), this._register(this.model.onChangedHints((e) => {
			e ? (this.widget.value.show(), this.widget.value.render(e)) : this.widget.rawValue?.hide();
		})), this.widget = new Oo(() => this._register(t.createInstance(EV, this.editor, this.model)));
	}
	cancel() {
		this.model.cancel();
	}
	previous() {
		this.widget.rawValue?.previous();
	}
	next() {
		this.widget.rawValue?.next();
	}
	trigger(e) {
		this.model.trigger(e, 0);
	}
};
AV = kV = DV([OV(1, P), OV(2, M)], AV);
var jV = class extends O {
	constructor() {
		super({
			id: "editor.action.triggerParameterHints",
			label: B("parameterHints.trigger.label", "Trigger Parameter Hints"),
			alias: "Trigger Parameter Hints",
			precondition: I.hasSignatureHelpProvider,
			kbOpts: {
				kbExpr: I.editorTextFocus,
				primary: 3082,
				weight: 100
			}
		});
	}
	run(e, t) {
		AV.get(t)?.trigger({ triggerKind: Jc.Invoke });
	}
};
T(AV.ID, AV, 2), k(jV);
var MV = 175, NV = qt.bindToContribution(AV.get);
A(new NV({
	id: "closeParameterHints",
	precondition: hV.Visible,
	handler: (e) => e.cancel(),
	kbOpts: {
		weight: MV,
		kbExpr: I.focus,
		primary: 9,
		secondary: [1033]
	}
})), A(new NV({
	id: "showPrevParameterHint",
	precondition: N.and(hV.Visible, hV.MultipleSignatures),
	handler: (e) => e.previous(),
	kbOpts: {
		weight: MV,
		kbExpr: I.focus,
		primary: 16,
		secondary: [528],
		mac: {
			primary: 16,
			secondary: [528, 302]
		}
	}
})), A(new NV({
	id: "showNextParameterHint",
	precondition: N.and(hV.Visible, hV.MultipleSignatures),
	handler: (e) => e.next(),
	kbOpts: {
		weight: MV,
		kbExpr: I.focus,
		primary: 18,
		secondary: [530],
		mac: {
			primary: 18,
			secondary: [530, 300]
		}
	}
}));
// ../../../node_modules/.pnpm/monaco-editor@0.52.2/node_modules/monaco-editor/esm/vs/platform/observable/common/wrapInReloadableClass.js
var PV = function(e, t, n, r) {
	var i = arguments.length, a = i < 3 ? t : r === null ? r = Object.getOwnPropertyDescriptor(t, n) : r, o;
	if (typeof Reflect == "object" && typeof Reflect.decorate == "function") a = Reflect.decorate(e, t, n, r);
	else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (i < 3 ? o(a) : i > 3 ? o(t, n, a) : o(t, n)) || a);
	return i > 3 && a && Object.defineProperty(t, n, a), a;
}, FV = function(e, t) {
	return function(n, r) {
		t(n, r, e);
	};
}, IV = class {
	constructor(e) {
		this.instantiationService = e;
	}
	init(...e) {}
};
function LV(e, t) {
	return class extends t {
		constructor() {
			super(...arguments), this._autorun = void 0;
		}
		init(...t) {
			this._autorun = jo((n, r) => {
				let i = Bn(e(), n);
				r.add(this.instantiationService.createInstance(i, ...t));
			});
		}
		dispose() {
			this._autorun?.dispose();
		}
	};
}
function RV(e) {
	return We() ? LV(e, zV) : e();
}
var zV = class extends IV {
	constructor(e, t) {
		super(t), this.init(e);
	}
};
zV = PV([FV(1, P)], zV), T(HB.ID, RV(() => HB), 0), S("editor.placeholder.foreground", xr, B("placeholderForeground", "Foreground color of the placeholder text in the editor."));
// ../../../node_modules/.pnpm/monaco-editor@0.52.2/node_modules/monaco-editor/esm/vs/editor/contrib/rename/browser/renameWidget.js
var BV = function(e, t, n, r) {
	var i = arguments.length, a = i < 3 ? t : r === null ? r = Object.getOwnPropertyDescriptor(t, n) : r, o;
	if (typeof Reflect == "object" && typeof Reflect.decorate == "function") a = Reflect.decorate(e, t, n, r);
	else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (i < 3 ? o(a) : i > 3 ? o(t, n, a) : o(t, n)) || a);
	return i > 3 && a && Object.defineProperty(t, n, a), a;
}, VV = function(e, t) {
	return function(n, r) {
		t(n, r, e);
	};
}, HV = new z("renameInputVisible", !1, B("renameInputVisible", "Whether the rename input widget is visible"));
new z("renameInputFocused", !1, B("renameInputFocused", "Whether the rename input widget is focused"));
var UV = class {
	constructor(e, t, n, r, i, a) {
		this._editor = e, this._acceptKeybindings = t, this._themeService = n, this._keybindingService = r, this._logService = a, this.allowEditorOverflow = !0, this._disposables = new g(), this._visibleContextKey = HV.bindTo(i), this._isEditingRenameCandidate = !1, this._nRenameSuggestionsInvocations = 0, this._hadAutomaticRenameSuggestionsInvocation = !1, this._candidates = /* @__PURE__ */ new Set(), this._beforeFirstInputFieldEditSW = new lr(), this._inputWithButton = new GV(), this._disposables.add(this._inputWithButton), this._editor.addContentWidget(this), this._disposables.add(this._editor.onDidChangeConfiguration((e) => {
			e.hasChanged(50) && this._updateFont();
		})), this._disposables.add(n.onDidColorThemeChange(this._updateStyles, this));
	}
	dispose() {
		this._disposables.dispose(), this._editor.removeContentWidget(this);
	}
	getId() {
		return "__renameInputWidget";
	}
	getDomNode() {
		return this._domNode || (this._domNode = document.createElement("div"), this._domNode.className = "monaco-editor rename-box", this._domNode.appendChild(this._inputWithButton.domNode), this._renameCandidateListView = this._disposables.add(new WV(this._domNode, {
			fontInfo: this._editor.getOption(50),
			onFocusChange: (e) => {
				this._inputWithButton.input.value = e, this._isEditingRenameCandidate = !1;
			},
			onSelectionChange: () => {
				this._isEditingRenameCandidate = !1, this.acceptInput(!1);
			}
		})), this._disposables.add(this._inputWithButton.onDidInputChange(() => {
			this._renameCandidateListView?.focusedCandidate !== void 0 && (this._isEditingRenameCandidate = !0), this._timeBeforeFirstInputFieldEdit ??= this._beforeFirstInputFieldEditSW.elapsed(), this._renameCandidateProvidersCts?.token.isCancellationRequested === !1 && this._renameCandidateProvidersCts.cancel(), this._renameCandidateListView?.clearFocus();
		})), this._label = document.createElement("div"), this._label.className = "rename-label", this._domNode.appendChild(this._label), this._updateFont(), this._updateStyles(this._themeService.getColorTheme())), this._domNode;
	}
	_updateStyles(e) {
		if (!this._domNode) return;
		let t = e.getColor(Ge), n = e.getColor(Vn);
		this._domNode.style.backgroundColor = String(e.getColor(d) ?? ""), this._domNode.style.boxShadow = t ? ` 0 0 8px 2px ${t}` : "", this._domNode.style.border = n ? `1px solid ${n}` : "", this._domNode.style.color = String(e.getColor(sc) ?? "");
		let r = e.getColor(Ss);
		this._inputWithButton.domNode.style.backgroundColor = String(e.getColor(Dc) ?? ""), this._inputWithButton.input.style.backgroundColor = String(e.getColor(Dc) ?? ""), this._inputWithButton.domNode.style.borderWidth = r ? "1px" : "0px", this._inputWithButton.domNode.style.borderStyle = r ? "solid" : "none", this._inputWithButton.domNode.style.borderColor = r?.toString() ?? "none";
	}
	_updateFont() {
		if (this._domNode === void 0) return;
		y(this._label !== void 0, "RenameWidget#_updateFont: _label must not be undefined given _domNode is defined"), this._editor.applyFontInfo(this._inputWithButton.input);
		let e = this._editor.getOption(50);
		this._label.style.fontSize = `${this._computeLabelFontSize(e.fontSize)}px`;
	}
	_computeLabelFontSize(e) {
		return e * .8;
	}
	getPosition() {
		if (!this._visible || !this._editor.hasModel() || !this._editor.getDomNode()) return null;
		let e = ji(this.getDomNode().ownerDocument.body), t = Bi(this._editor.getDomNode()), n = this._getTopForPosition();
		this._nPxAvailableAbove = n + t.top, this._nPxAvailableBelow = e.height - this._nPxAvailableAbove;
		let r = this._editor.getOption(67), { totalHeight: i } = KV.getLayoutInfo({ lineHeight: r }), a = this._nPxAvailableBelow > i * 6 ? [2, 1] : [1, 2];
		return {
			position: this._position,
			preference: a
		};
	}
	beforeRender() {
		let [e, t] = this._acceptKeybindings;
		return this._label.innerText = B({
			key: "label",
			comment: ["placeholders are keybindings, e.g \"F2 to Rename, Shift+F2 to Preview\""]
		}, "{0} to Rename, {1} to Preview", this._keybindingService.lookupKeybinding(e)?.getLabel(), this._keybindingService.lookupKeybinding(t)?.getLabel()), this._domNode.style.minWidth = "200px", null;
	}
	afterRender(e) {
		if (e === null) {
			this.cancelInput(!0, "afterRender (because position is null)");
			return;
		}
		if (!this._editor.hasModel() || !this._editor.getDomNode()) return;
		y(this._renameCandidateListView), y(this._nPxAvailableAbove !== void 0), y(this._nPxAvailableBelow !== void 0);
		let t = za(this._inputWithButton.domNode), n = za(this._label), r;
		r = e === 2 ? this._nPxAvailableBelow : this._nPxAvailableAbove, this._renameCandidateListView.layout({
			height: r - n - t,
			width: Oc(this._inputWithButton.domNode)
		});
	}
	acceptInput(e) {
		this._trace("invoking acceptInput"), this._currentAcceptInput?.(e);
	}
	cancelInput(e, t) {
		this._currentCancelInput?.(e);
	}
	focusNextRenameSuggestion() {
		this._renameCandidateListView?.focusNext() || (this._inputWithButton.input.value = this._currentName);
	}
	focusPreviousRenameSuggestion() {
		this._renameCandidateListView?.focusPrevious() || (this._inputWithButton.input.value = this._currentName);
	}
	getInput(e, t, n, r, i) {
		let { start: a, end: o } = this._getSelection(e, t);
		this._renameCts = i;
		let s = new g();
		this._nRenameSuggestionsInvocations = 0, this._hadAutomaticRenameSuggestionsInvocation = !1, r === void 0 ? this._inputWithButton.button.style.display = "none" : (this._inputWithButton.button.style.display = "flex", this._requestRenameCandidatesOnce = r, this._requestRenameCandidates(t, !1), s.add(_(this._inputWithButton.button, "click", () => this._requestRenameCandidates(t, !0))), s.add(_(this._inputWithButton.button, on.KEY_DOWN, (e) => {
			let n = new xn(e);
			(n.equals(3) || n.equals(10)) && (n.stopPropagation(), n.preventDefault(), this._requestRenameCandidates(t, !0));
		}))), this._isEditingRenameCandidate = !1, this._domNode.classList.toggle("preview", n), this._position = new b(e.startLineNumber, e.startColumn), this._currentName = t, this._inputWithButton.input.value = t, this._inputWithButton.input.setAttribute("selectionStart", a.toString()), this._inputWithButton.input.setAttribute("selectionEnd", o.toString()), this._inputWithButton.input.size = Math.max((e.endColumn - e.startColumn) * 1.1, 20), this._beforeFirstInputFieldEditSW.reset(), s.add(Gt(() => {
			this._renameCts = void 0, i.dispose(!0);
		})), s.add(Gt(() => {
			this._renameCandidateProvidersCts !== void 0 && (this._renameCandidateProvidersCts.dispose(!0), this._renameCandidateProvidersCts = void 0);
		})), s.add(Gt(() => this._candidates.clear()));
		let c = new vr();
		return c.p.finally(() => {
			s.dispose(), this._hide();
		}), this._currentCancelInput = (e) => (this._trace("invoking _currentCancelInput"), this._currentAcceptInput = void 0, this._currentCancelInput = void 0, this._renameCandidateListView?.clearCandidates(), c.complete(e), !0), this._currentAcceptInput = (e) => {
			this._trace("invoking _currentAcceptInput"), y(this._renameCandidateListView !== void 0);
			let r = this._renameCandidateListView.nCandidates, i, a, o = this._renameCandidateListView.focusedCandidate;
			o === void 0 ? (this._trace("using new name from inputField"), i = this._inputWithButton.input.value, a = this._isEditingRenameCandidate ? { k: "userEditedRenameSuggestion" } : { k: "inputField" }) : (this._trace("using new name from renameSuggestion"), i = o, a = { k: "renameSuggestion" }), i === t || i.trim().length === 0 ? this.cancelInput(!0, "_currentAcceptInput (because newName === value || newName.trim().length === 0)") : (this._currentAcceptInput = void 0, this._currentCancelInput = void 0, this._renameCandidateListView.clearCandidates(), c.complete({
				newName: i,
				wantsPreview: n && e,
				stats: {
					source: a,
					nRenameSuggestions: r,
					timeBeforeFirstInputFieldEdit: this._timeBeforeFirstInputFieldEdit,
					nRenameSuggestionsInvocations: this._nRenameSuggestionsInvocations,
					hadAutomaticRenameSuggestionsInvocation: this._hadAutomaticRenameSuggestionsInvocation
				}
			}));
		}, s.add(i.token.onCancellationRequested(() => this.cancelInput(!0, "cts.token.onCancellationRequested"))), s.add(this._editor.onDidBlurEditorWidget(() => this.cancelInput(!this._domNode?.ownerDocument.hasFocus(), "editor.onDidBlurEditorWidget"))), this._show(), c.p;
	}
	_requestRenameCandidates(e, t) {
		if (this._requestRenameCandidatesOnce !== void 0 && (this._renameCandidateProvidersCts !== void 0 && this._renameCandidateProvidersCts.dispose(!0), y(this._renameCts), this._inputWithButton.buttonState !== "stop")) {
			this._renameCandidateProvidersCts = new Cn();
			let n = t ? co.Invoke : co.Automatic, r = this._requestRenameCandidatesOnce(n, this._renameCandidateProvidersCts.token);
			if (r.length === 0) {
				this._inputWithButton.setSparkleButton();
				return;
			}
			t || (this._hadAutomaticRenameSuggestionsInvocation = !0), this._nRenameSuggestionsInvocations += 1, this._inputWithButton.setStopButton(), this._updateRenameCandidates(r, e, this._renameCts.token);
		}
	}
	_getSelection(e, t) {
		y(this._editor.hasModel());
		let n = this._editor.getSelection(), r = 0, i = t.length;
		return !E.isEmpty(n) && !E.spansMultipleLines(n) && E.containsRange(e, n) && (r = Math.max(0, n.startColumn - e.startColumn), i = Math.min(e.endColumn, n.endColumn) - e.startColumn), {
			start: r,
			end: i
		};
	}
	_show() {
		this._trace("invoking _show"), this._editor.revealLineInCenterIfOutsideViewport(this._position.lineNumber, 0), this._visible = !0, this._visibleContextKey.set(!0), this._editor.layoutContentWidget(this), setTimeout(() => {
			this._inputWithButton.input.focus(), this._inputWithButton.input.setSelectionRange(parseInt(this._inputWithButton.input.getAttribute("selectionStart")), parseInt(this._inputWithButton.input.getAttribute("selectionEnd")));
		}, 100);
	}
	async _updateRenameCandidates(e, t, n) {
		let r = (...e) => this._trace("_updateRenameCandidates", ...e);
		r("start");
		let i = await f(Promise.allSettled(e), n);
		if (this._inputWithButton.setSparkleButton(), i === void 0) {
			r("returning early - received updateRenameCandidates results - undefined");
			return;
		}
		let a = i.flatMap((e) => e.status === "fulfilled" && cl(e.value) ? e.value : []);
		r(`received updateRenameCandidates results - total (unfiltered) ${a.length} candidates.`);
		let o = $e(a, (e) => e.newSymbolName);
		r(`distinct candidates - ${o.length} candidates.`);
		let s = o.filter(({ newSymbolName: e }) => e.trim().length > 0 && e !== this._inputWithButton.input.value && e !== t && !this._candidates.has(e));
		r(`valid distinct candidates - ${a.length} candidates.`), s.forEach((e) => this._candidates.add(e.newSymbolName)), s.length < 1 ? r("returning early - no valid distinct candidates") : (r("setting candidates"), this._renameCandidateListView.setCandidates(s), r("asking editor to re-layout"), this._editor.layoutContentWidget(this));
	}
	_hide() {
		this._trace("invoked _hide"), this._visible = !1, this._visibleContextKey.reset(), this._editor.layoutContentWidget(this);
	}
	_getTopForPosition() {
		let e = this._editor.getVisibleRanges(), t;
		return e.length > 0 ? t = e[0].startLineNumber : (this._logService.warn("RenameWidget#_getTopForPosition: this should not happen - visibleRanges is empty"), t = Math.max(1, this._position.lineNumber - 5)), this._editor.getTopForLineNumber(this._position.lineNumber) - this._editor.getTopForLineNumber(t);
	}
	_trace(...e) {
		this._logService.trace("RenameWidget", ...e);
	}
};
UV = BV([
	VV(2, fc),
	VV(3, ft),
	VV(4, j),
	VV(5, ks)
], UV);
var WV = class e {
	constructor(t, n) {
		this._disposables = new g(), this._availableHeight = 0, this._minimumWidth = 0, this._lineHeight = n.fontInfo.lineHeight, this._typicalHalfwidthCharacterWidth = n.fontInfo.typicalHalfwidthCharacterWidth, this._listContainer = document.createElement("div"), this._listContainer.className = "rename-box rename-candidate-list-container", t.appendChild(this._listContainer), this._listWidget = e._createListWidget(this._listContainer, this._candidateViewHeight, n.fontInfo), this._listWidget.onDidChangeFocus((e) => {
			e.elements.length === 1 && n.onFocusChange(e.elements[0].newSymbolName);
		}, this._disposables), this._listWidget.onDidChangeSelection((e) => {
			e.elements.length === 1 && n.onSelectionChange();
		}, this._disposables), this._disposables.add(this._listWidget.onDidBlur((e) => {
			this._listWidget.setFocus([]);
		})), this._listWidget.style(nn({
			listInactiveFocusForeground: Pt,
			listInactiveFocusBackground: ec
		}));
	}
	dispose() {
		this._listWidget.dispose(), this._disposables.dispose();
	}
	layout({ height: e, width: t }) {
		this._availableHeight = e, this._minimumWidth = t;
	}
	setCandidates(e) {
		this._listWidget.splice(0, 0, e);
		let t = this._pickListHeight(this._listWidget.length), n = this._pickListWidth(e);
		this._listWidget.layout(t, n), this._listContainer.style.height = `${t}px`, this._listContainer.style.width = `${n}px`, Wr(B("renameSuggestionsReceivedAria", "Received {0} rename suggestions", e.length));
	}
	clearCandidates() {
		this._listContainer.style.height = "0px", this._listContainer.style.width = "0px", this._listWidget.splice(0, this._listWidget.length, []);
	}
	get nCandidates() {
		return this._listWidget.length;
	}
	get focusedCandidate() {
		if (this._listWidget.length === 0) return;
		let e = this._listWidget.getSelectedElements()[0];
		if (e !== void 0) return e.newSymbolName;
		let t = this._listWidget.getFocusedElements()[0];
		if (t !== void 0) return t.newSymbolName;
	}
	focusNext() {
		if (this._listWidget.length === 0) return !1;
		let e = this._listWidget.getFocus();
		if (e.length === 0) return this._listWidget.focusFirst(), this._listWidget.reveal(0), !0;
		if (e[0] === this._listWidget.length - 1) return this._listWidget.setFocus([]), this._listWidget.reveal(0), !1;
		{
			this._listWidget.focusNext();
			let e = this._listWidget.getFocus()[0];
			return this._listWidget.reveal(e), !0;
		}
	}
	focusPrevious() {
		if (this._listWidget.length === 0) return !1;
		let e = this._listWidget.getFocus();
		if (e.length === 0) {
			this._listWidget.focusLast();
			let e = this._listWidget.getFocus()[0];
			return this._listWidget.reveal(e), !0;
		}
		if (e[0] === 0) return this._listWidget.setFocus([]), !1;
		{
			this._listWidget.focusPrevious();
			let e = this._listWidget.getFocus()[0];
			return this._listWidget.reveal(e), !0;
		}
	}
	clearFocus() {
		this._listWidget.setFocus([]);
	}
	get _candidateViewHeight() {
		let { totalHeight: e } = KV.getLayoutInfo({ lineHeight: this._lineHeight });
		return e;
	}
	_pickListHeight(e) {
		let t = this._candidateViewHeight * e;
		return Math.min(t, this._availableHeight, this._candidateViewHeight * 7);
	}
	_pickListWidth(e) {
		let t = Math.ceil(Math.max(...e.map((e) => e.newSymbolName.length)) * this._typicalHalfwidthCharacterWidth);
		return Math.max(this._minimumWidth, 25 + t + 10);
	}
	static _createListWidget(e, t, n) {
		let r = new class {
			getTemplateId(e) {
				return "candidate";
			}
			getHeight(e) {
				return t;
			}
		}(), i = new class {
			constructor() {
				this.templateId = "candidate";
			}
			renderTemplate(e) {
				return new KV(e, n);
			}
			renderElement(e, t, n) {
				n.populate(e);
			}
			disposeTemplate(e) {
				e.dispose();
			}
		}();
		return new mt("NewSymbolNameCandidates", e, r, [i], {
			keyboardSupport: !1,
			mouseSupport: !0,
			multipleSelectionSupport: !1
		});
	}
}, GV = class {
	constructor() {
		this._onDidInputChange = new x(), this.onDidInputChange = this._onDidInputChange.event, this._disposables = new g();
	}
	get domNode() {
		return this._domNode || (this._domNode = document.createElement("div"), this._domNode.className = "rename-input-with-button", this._domNode.style.display = "flex", this._domNode.style.flexDirection = "row", this._domNode.style.alignItems = "center", this._inputNode = document.createElement("input"), this._inputNode.className = "rename-input", this._inputNode.type = "text", this._inputNode.style.border = "none", this._inputNode.setAttribute("aria-label", B("renameAriaLabel", "Rename input. Type new name and press Enter to commit.")), this._domNode.appendChild(this._inputNode), this._buttonNode = document.createElement("div"), this._buttonNode.className = "rename-suggestions-button", this._buttonNode.setAttribute("tabindex", "0"), this._buttonGenHoverText = B("generateRenameSuggestionsButton", "Generate new name suggestions"), this._buttonCancelHoverText = B("cancelRenameSuggestionsButton", "Cancel"), this._buttonHover = Hr().setupManagedHover(at("element"), this._buttonNode, this._buttonGenHoverText), this._disposables.add(this._buttonHover), this._domNode.appendChild(this._buttonNode), this._disposables.add(_(this.input, on.INPUT, () => this._onDidInputChange.fire())), this._disposables.add(_(this.input, on.KEY_DOWN, (e) => {
			let t = new xn(e);
			(t.keyCode === 15 || t.keyCode === 17) && this._onDidInputChange.fire();
		})), this._disposables.add(_(this.input, on.CLICK, () => this._onDidInputChange.fire())), this._disposables.add(_(this.input, on.FOCUS, () => {
			this.domNode.style.outlineWidth = "1px", this.domNode.style.outlineStyle = "solid", this.domNode.style.outlineOffset = "-1px", this.domNode.style.outlineColor = "var(--vscode-focusBorder)";
		})), this._disposables.add(_(this.input, on.BLUR, () => {
			this.domNode.style.outline = "none";
		}))), this._domNode;
	}
	get input() {
		return y(this._inputNode), this._inputNode;
	}
	get button() {
		return y(this._buttonNode), this._buttonNode;
	}
	get buttonState() {
		return this._buttonState;
	}
	setSparkleButton() {
		this._buttonState = "sparkle", this._sparkleIcon ??= Ee(v.sparkle), di(this.button), this.button.appendChild(this._sparkleIcon), this.button.setAttribute("aria-label", "Generating new name suggestions"), this._buttonHover?.update(this._buttonGenHoverText), this.input.focus();
	}
	setStopButton() {
		this._buttonState = "stop", this._stopIcon ??= Ee(v.primitiveSquare), di(this.button), this.button.appendChild(this._stopIcon), this.button.setAttribute("aria-label", "Cancel generating new name suggestions"), this._buttonHover?.update(this._buttonCancelHoverText), this.input.focus();
	}
	dispose() {
		this._disposables.dispose();
	}
}, KV = class e {
	static {
		this._PADDING = 2;
	}
	constructor(t, n) {
		this._domNode = document.createElement("div"), this._domNode.className = "rename-box rename-candidate", this._domNode.style.display = "flex", this._domNode.style.columnGap = "5px", this._domNode.style.alignItems = "center", this._domNode.style.height = `${n.lineHeight}px`, this._domNode.style.padding = `${e._PADDING}px`;
		let r = document.createElement("div");
		r.style.display = "flex", r.style.alignItems = "center", r.style.width = r.style.height = `${n.lineHeight * .8}px`, this._domNode.appendChild(r), this._icon = Ee(v.sparkle), this._icon.style.display = "none", r.appendChild(this._icon), this._label = document.createElement("div"), gn(this._label, n), this._domNode.appendChild(this._label), t.appendChild(this._domNode);
	}
	populate(e) {
		this._updateIcon(e), this._updateLabel(e);
	}
	_updateIcon(e) {
		let t = !!e.tags?.includes(vo.AIGenerated);
		this._icon.style.display = t ? "inherit" : "none";
	}
	_updateLabel(e) {
		this._label.innerText = e.newSymbolName;
	}
	static getLayoutInfo({ lineHeight: t }) {
		return { totalHeight: t + e._PADDING * 2 };
	}
	dispose() {}
}, qV = function(e, t, n, r) {
	var i = arguments.length, a = i < 3 ? t : r === null ? r = Object.getOwnPropertyDescriptor(t, n) : r, o;
	if (typeof Reflect == "object" && typeof Reflect.decorate == "function") a = Reflect.decorate(e, t, n, r);
	else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (i < 3 ? o(a) : i > 3 ? o(t, n, a) : o(t, n)) || a);
	return i > 3 && a && Object.defineProperty(t, n, a), a;
}, JV = function(e, t) {
	return function(n, r) {
		t(n, r, e);
	};
}, YV, XV = class {
	constructor(e, t, n) {
		this.model = e, this.position = t, this._providerRenameIdx = 0, this._providers = n.ordered(e);
	}
	hasProvider() {
		return this._providers.length > 0;
	}
	async resolveRenameLocation(e) {
		let t = [];
		for (this._providerRenameIdx = 0; this._providerRenameIdx < this._providers.length; this._providerRenameIdx++) {
			let n = this._providers[this._providerRenameIdx];
			if (!n.resolveRenameLocation) break;
			let r = await n.resolveRenameLocation(this.model, this.position, e);
			if (r) {
				if (r.rejectReason) t.push(r.rejectReason);
				else return r;
			}
		}
		this._providerRenameIdx = 0;
		let n = this.model.getWordAtPosition(this.position);
		return n ? {
			range: new E(this.position.lineNumber, n.startColumn, this.position.lineNumber, n.endColumn),
			text: n.word,
			rejectReason: t.length > 0 ? t.join("\n") : void 0
		} : {
			range: E.fromPositions(this.position),
			text: "",
			rejectReason: t.length > 0 ? t.join("\n") : void 0
		};
	}
	async provideRenameEdits(e, t) {
		return this._provideRenameEdits(e, this._providerRenameIdx, [], t);
	}
	async _provideRenameEdits(e, t, n, r) {
		let i = this._providers[t];
		if (!i) return {
			edits: [],
			rejectReason: n.join("\n")
		};
		let a = await i.provideRenameEdits(this.model, this.position, e, r);
		return a ? a.rejectReason ? this._provideRenameEdits(e, t + 1, n.concat(a.rejectReason), r) : a : this._provideRenameEdits(e, t + 1, n.concat(B("no result", "No result.")), r);
	}
};
async function ZV(e, t, n, r) {
	let i = new XV(t, n, e), a = await i.resolveRenameLocation(C.None);
	return a?.rejectReason ? {
		edits: [],
		rejectReason: a.rejectReason
	} : i.provideRenameEdits(r, C.None);
}
var QV = class {
	static {
		YV = this;
	}
	static {
		this.ID = "editor.contrib.renameController";
	}
	static get(e) {
		return e.getContribution(YV.ID);
	}
	constructor(e, t, n, r, i, a, o, s, c) {
		this.editor = e, this._instaService = t, this._notificationService = n, this._bulkEditService = r, this._progressService = i, this._logService = a, this._configService = o, this._languageFeaturesService = s, this._telemetryService = c, this._disposableStore = new g(), this._cts = new Cn(), this._renameWidget = this._disposableStore.add(this._instaService.createInstance(UV, this.editor, ["acceptRenameInput", "acceptRenameInputWithPreview"]));
	}
	dispose() {
		this._disposableStore.dispose(), this._cts.dispose(!0);
	}
	async run() {
		let e = this._logService.trace.bind(this._logService, "[rename]");
		if (this._cts.dispose(!0), this._cts = new Cn(), !this.editor.hasModel()) {
			e("editor has no model");
			return;
		}
		let t = this.editor.getPosition(), n = new XV(this.editor.getModel(), t, this._languageFeaturesService.renameProvider);
		if (!n.hasProvider()) {
			e("skeleton has no provider");
			return;
		}
		let r = new $c(this.editor, 5, void 0, this._cts.token), i;
		try {
			e("resolving rename location");
			let t = n.resolveRenameLocation(r.token);
			this._progressService.showWhile(t, 250), i = await t, e("resolved rename location");
		} catch (n) {
			n instanceof Di ? e("resolve rename location cancelled", JSON.stringify(n, null, "	")) : (e("resolve rename location failed", n instanceof Error ? n : JSON.stringify(n, null, "	")), (typeof n == "string" || Do(n)) && GS.get(this.editor)?.showMessage(n || B("resolveRenameLocationFailed", "An unknown error occurred while resolving rename location"), t));
			return;
		} finally {
			r.dispose();
		}
		if (!i) {
			e("returning early - no loc");
			return;
		}
		if (i.rejectReason) {
			e(`returning early - rejected with reason: ${i.rejectReason}`, i.rejectReason), GS.get(this.editor)?.showMessage(i.rejectReason, t);
			return;
		}
		if (r.token.isCancellationRequested) {
			e("returning early - cts1 cancelled");
			return;
		}
		let a = new $c(this.editor, 5, i.range, this._cts.token), o = this.editor.getModel(), s = this._languageFeaturesService.newSymbolNamesProvider.all(o), c = await Promise.all(s.map(async (e) => [e, await e.supportsAutomaticNewSymbolNamesTriggerKind ?? !1])), l = (e, t) => {
			let n = c.slice();
			return e === co.Automatic && (n = n.filter(([e, t]) => t)), n.map(([n]) => n.provideNewSymbolNames(o, i.range, e, t));
		};
		e("creating rename input field and awaiting its result");
		let u = this._bulkEditService.hasPreviewHandler() && this._configService.getValue(this.editor.getModel().uri, "editor.rename.enablePreview"), d = await this._renameWidget.getInput(i.range, i.text, u, s.length > 0 ? l : void 0, a);
		if (e("received response from rename input field"), s.length > 0 && this._reportTelemetry(s.length, o.getLanguageId(), d), typeof d == "boolean") {
			e(`returning early - rename input field response - ${d}`), d && this.editor.focus(), a.dispose();
			return;
		}
		this.editor.focus(), e("requesting rename edits");
		let p = f(n.provideRenameEdits(d.newName, a.token), a.token).then(async (t) => {
			t ? this.editor.hasModel() ? t.rejectReason ? (e(`returning early - rejected with reason: ${t.rejectReason}`), this._notificationService.info(t.rejectReason)) : (this.editor.setSelection(E.fromPositions(this.editor.getSelection().getPosition())), e("applying edits"), this._bulkEditService.apply(t, {
				editor: this.editor,
				showPreview: d.wantsPreview,
				label: B("label", "Renaming '{0}' to '{1}'", i?.text, d.newName),
				code: "undoredo.rename",
				quotableLabel: B("quotableLabel", "Renaming {0} to {1}", i?.text, d.newName),
				respectAutoSaveConfig: !0
			}).then((t) => {
				e("edits applied"), t.ariaSummary && gt(B("aria", "Successfully renamed '{0}' to '{1}'. Summary: {2}", i.text, d.newName, t.ariaSummary));
			}).catch((t) => {
				e(`error when applying edits ${JSON.stringify(t, null, "	")}`), this._notificationService.error(B("rename.failedApply", "Rename failed to apply edits")), this._logService.error(t);
			})) : e("returning early - no model after rename edits are provided") : e("returning early - no rename edits result");
		}, (t) => {
			e("error when providing rename edits", JSON.stringify(t, null, "	")), this._notificationService.error(B("rename.failed", "Rename failed to compute edits")), this._logService.error(t);
		}).finally(() => {
			a.dispose();
		});
		return e("returning rename operation"), this._progressService.showWhile(p, 250), p;
	}
	acceptRenameInput(e) {
		this._renameWidget.acceptInput(e);
	}
	cancelRenameInput() {
		this._renameWidget.cancelInput(!0, "cancelRenameInput command");
	}
	focusNextRenameSuggestion() {
		this._renameWidget.focusNextRenameSuggestion();
	}
	focusPreviousRenameSuggestion() {
		this._renameWidget.focusPreviousRenameSuggestion();
	}
	_reportTelemetry(e, t, n) {
		let r = typeof n == "boolean" ? {
			kind: "cancelled",
			languageId: t,
			nRenameSuggestionProviders: e
		} : {
			kind: "accepted",
			languageId: t,
			nRenameSuggestionProviders: e,
			source: n.stats.source.k,
			nRenameSuggestions: n.stats.nRenameSuggestions,
			timeBeforeFirstInputFieldEdit: n.stats.timeBeforeFirstInputFieldEdit,
			wantsPreview: n.wantsPreview,
			nRenameSuggestionsInvocations: n.stats.nRenameSuggestionsInvocations,
			hadAutomaticRenameSuggestionsInvocation: n.stats.hadAutomaticRenameSuggestionsInvocation
		};
		this._telemetryService.publicLog2("renameInvokedEvent", r);
	}
};
QV = YV = qV([
	JV(1, P),
	JV(2, t),
	JV(3, de),
	JV(4, qn),
	JV(5, ks),
	JV(6, os),
	JV(7, M),
	JV(8, mc)
], QV);
var $V = class extends O {
	constructor() {
		super({
			id: "editor.action.rename",
			label: B("rename.label", "Rename Symbol"),
			alias: "Rename Symbol",
			precondition: N.and(I.writable, I.hasRenameProvider),
			kbOpts: {
				kbExpr: I.editorTextFocus,
				primary: 60,
				weight: 100
			},
			contextMenuOpts: {
				group: "1_modification",
				order: 1.1
			}
		});
	}
	runCommand(e, t) {
		let n = e.get(Ln), [r, i] = Array.isArray(t) && t || [void 0, void 0];
		return De.isUri(r) && b.isIPosition(i) ? n.openCodeEditor({ resource: r }, n.getActiveCodeEditor()).then((e) => {
			e && (e.setPosition(i), e.invokeWithinContext((t) => (this.reportTelemetry(t, e), this.run(t, e))));
		}, er) : super.runCommand(e, t);
	}
	run(e, t) {
		let n = e.get(ks), r = QV.get(t);
		return r ? (n.trace("[RenameAction] got controller, running..."), r.run()) : (n.trace("[RenameAction] returning early - controller missing"), Promise.resolve());
	}
};
T(QV.ID, QV, 4), k($V);
var eH = qt.bindToContribution(QV.get);
A(new eH({
	id: "acceptRenameInput",
	precondition: HV,
	handler: (e) => e.acceptRenameInput(!1),
	kbOpts: {
		weight: 199,
		kbExpr: N.and(I.focus, N.not("isComposing")),
		primary: 3
	}
})), A(new eH({
	id: "acceptRenameInputWithPreview",
	precondition: N.and(HV, N.has("config.editor.rename.enablePreview")),
	handler: (e) => e.acceptRenameInput(!0),
	kbOpts: {
		weight: 199,
		kbExpr: N.and(I.focus, N.not("isComposing")),
		primary: 2051
	}
})), A(new eH({
	id: "cancelRenameInput",
	precondition: HV,
	handler: (e) => e.cancelRenameInput(),
	kbOpts: {
		weight: 199,
		kbExpr: I.focus,
		primary: 9,
		secondary: [1033]
	}
})), Fa(class extends Mo {
	constructor() {
		super({
			id: "focusNextRenameSuggestion",
			title: { ...H("focusNextRenameSuggestion", "Focus Next Rename Suggestion") },
			precondition: HV,
			keybinding: [{
				primary: 18,
				weight: 199
			}]
		});
	}
	run(e) {
		let t = e.get(Ln).getFocusedCodeEditor();
		if (!t) return;
		let n = QV.get(t);
		n && n.focusNextRenameSuggestion();
	}
}), Fa(class extends Mo {
	constructor() {
		super({
			id: "focusPreviousRenameSuggestion",
			title: { ...H("focusPreviousRenameSuggestion", "Focus Previous Rename Suggestion") },
			precondition: HV,
			keybinding: [{
				primary: 16,
				weight: 199
			}]
		});
	}
	run(e) {
		let t = e.get(Ln).getFocusedCodeEditor();
		if (!t) return;
		let n = QV.get(t);
		n && n.focusPreviousRenameSuggestion();
	}
}), Ga("_executeDocumentRenameProvider", function(e, t, n, ...r) {
	let [i] = r;
	y(typeof i == "string");
	let { renameProvider: a } = e.get(M);
	return ZV(a, t, n, i);
}), Ga("_executePrepareRename", async function(e, t, n) {
	let { renameProvider: r } = e.get(M), i = await new XV(t, n, r).resolveRenameLocation(C.None);
	if (i?.rejectReason) throw Error(i.rejectReason);
	return i;
}), Js.as(Ye.Configuration).registerConfiguration({
	id: "editor",
	properties: { "editor.rename.enablePreview": {
		scope: 5,
		description: B("enablePreview", "Enable/disable the ability to preview changes before renaming"),
		default: !0,
		type: "boolean"
	} }
});
// ../../../node_modules/.pnpm/monaco-editor@0.52.2/node_modules/monaco-editor/esm/vs/editor/contrib/sectionHeaders/browser/sectionHeaders.js
var tH = function(e, t, n, r) {
	var i = arguments.length, a = i < 3 ? t : r === null ? r = Object.getOwnPropertyDescriptor(t, n) : r, o;
	if (typeof Reflect == "object" && typeof Reflect.decorate == "function") a = Reflect.decorate(e, t, n, r);
	else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (i < 3 ? o(a) : i > 3 ? o(t, n, a) : o(t, n)) || a);
	return i > 3 && a && Object.defineProperty(t, n, a), a;
}, nH = function(e, t) {
	return function(n, r) {
		t(n, r, e);
	};
}, rH = class extends U {
	static {
		this.ID = "editor.sectionHeaderDetector";
	}
	constructor(e, t, n) {
		super(), this.editor = e, this.languageConfigurationService = t, this.editorWorkerService = n, this.decorations = this.editor.createDecorationsCollection(), this.options = this.createOptions(e.getOption(73)), this.computePromise = null, this.currentOccurrences = {}, this._register(e.onDidChangeModel((t) => {
			this.currentOccurrences = {}, this.options = this.createOptions(e.getOption(73)), this.stop(), this.computeSectionHeaders.schedule(0);
		})), this._register(e.onDidChangeModelLanguage((t) => {
			this.currentOccurrences = {}, this.options = this.createOptions(e.getOption(73)), this.stop(), this.computeSectionHeaders.schedule(0);
		})), this._register(t.onDidChange((t) => {
			let n = this.editor.getModel()?.getLanguageId();
			n && t.affects(n) && (this.currentOccurrences = {}, this.options = this.createOptions(e.getOption(73)), this.stop(), this.computeSectionHeaders.schedule(0));
		})), this._register(e.onDidChangeConfiguration((t) => {
			(!this.options || t.hasChanged(73)) && (this.options = this.createOptions(e.getOption(73)), this.updateDecorations([]), this.stop(), this.computeSectionHeaders.schedule(0));
		})), this._register(this.editor.onDidChangeModelContent((e) => {
			this.computeSectionHeaders.schedule();
		})), this._register(e.onDidChangeModelTokens((e) => {
			this.computeSectionHeaders.isScheduled() || this.computeSectionHeaders.schedule(1e3);
		})), this.computeSectionHeaders = this._register(new tl(() => {
			this.findSectionHeaders();
		}, 250)), this.computeSectionHeaders.schedule(0);
	}
	createOptions(e) {
		if (!e || !this.editor.hasModel()) return;
		let t = this.editor.getModel().getLanguageId();
		if (!t) return;
		let n = this.languageConfigurationService.getLanguageConfiguration(t).comments, r = this.languageConfigurationService.getLanguageConfiguration(t).foldingRules;
		if (n || r?.markers) return {
			foldingRules: r,
			findMarkSectionHeaders: e.showMarkSectionHeaders,
			findRegionSectionHeaders: e.showRegionSectionHeaders
		};
	}
	findSectionHeaders() {
		if (!this.editor.hasModel() || !this.options?.findMarkSectionHeaders && !this.options?.findRegionSectionHeaders) return;
		let e = this.editor.getModel();
		if (e.isDisposed() || e.isTooLargeForSyncing()) return;
		let t = e.getVersionId();
		this.editorWorkerService.findSectionHeaders(e.uri, this.options).then((n) => {
			e.isDisposed() || e.getVersionId() !== t || this.updateDecorations(n);
		});
	}
	updateDecorations(e) {
		let t = this.editor.getModel();
		t && (e = e.filter((e) => {
			if (!e.shouldBeInComments) return !0;
			let n = t.validateRange(e.range), r = t.tokenization.getLineTokens(n.startLineNumber), i = r.findTokenIndexAtOffset(n.startColumn - 1), a = r.getStandardTokenType(i);
			return r.getLanguageId(i) === t.getLanguageId() && a === 1;
		}));
		let n = Object.values(this.currentOccurrences).map((e) => e.decorationId), r = e.map((e) => iH(e));
		this.editor.changeDecorations((t) => {
			let i = t.deltaDecorations(n, r);
			this.currentOccurrences = {};
			for (let t = 0, n = i.length; t < n; t++) {
				let n = {
					sectionHeader: e[t],
					decorationId: i[t]
				};
				this.currentOccurrences[n.decorationId] = n;
			}
		});
	}
	stop() {
		this.computeSectionHeaders.cancel(), this.computePromise &&= (this.computePromise.cancel(), null);
	}
	dispose() {
		super.dispose(), this.stop(), this.decorations.clear();
	}
};
rH = tH([nH(1, Tn), nH(2, Oe)], rH);
function iH(e) {
	return {
		range: e.range,
		options: L.createDynamic({
			description: "section-header",
			stickiness: 3,
			collapseOnReplaceEdit: !0,
			minimap: {
				color: void 0,
				position: 1,
				sectionHeaderStyle: e.hasSeparatorLine ? 2 : 1,
				sectionHeaderText: e.text
			}
		})
	};
}
T(rH.ID, rH, 1);
// ../../../node_modules/.pnpm/monaco-editor@0.52.2/node_modules/monaco-editor/esm/vs/editor/common/services/semanticTokensDto.js
function aH(e) {
	for (let t = 0, n = e.length; t < n; t += 4) {
		let n = e[t + 0], r = e[t + 1], i = e[t + 2], a = e[t + 3];
		e[t + 0] = a, e[t + 1] = i, e[t + 2] = r, e[t + 3] = n;
	}
}
function oH(e) {
	let t = new Uint8Array(e.buffer, e.byteOffset, e.length * 4);
	return ro() || aH(t), $r.wrap(t);
}
function sH(e) {
	let t = new Uint32Array(cH(e)), n = 0;
	if (t[n++] = e.id, e.type === "full") t[n++] = 1, t[n++] = e.data.length, t.set(e.data, n), n += e.data.length;
	else {
		t[n++] = 2, t[n++] = e.deltas.length;
		for (let r of e.deltas) t[n++] = r.start, t[n++] = r.deleteCount, r.data ? (t[n++] = r.data.length, t.set(r.data, n), n += r.data.length) : t[n++] = 0;
	}
	return oH(t);
}
function cH(e) {
	let t = 0;
	if (t += 2, e.type === "full") t += 1 + e.data.length;
	else {
		t += 1, t += 3 * e.deltas.length;
		for (let n of e.deltas) n.data && (t += n.data.length);
	}
	return t;
}
// ../../../node_modules/.pnpm/monaco-editor@0.52.2/node_modules/monaco-editor/esm/vs/editor/contrib/semanticTokens/common/getSemanticTokens.js
function lH(e) {
	return e && !!e.data;
}
function uH(e) {
	return e && Array.isArray(e.edits);
}
var dH = class {
	constructor(e, t, n) {
		this.provider = e, this.tokens = t, this.error = n;
	}
};
function fH(e, t) {
	return e.has(t);
}
function pH(e, t) {
	let n = e.orderedGroups(t);
	return n.length > 0 ? n[0] : [];
}
async function mH(e, t, n, r, i) {
	let a = pH(e, t), o = await Promise.all(a.map(async (e) => {
		let a, o = null;
		try {
			a = await e.provideDocumentSemanticTokens(t, e === n ? r : null, i);
		} catch (e) {
			o = e, a = null;
		}
		return a && (lH(a) || uH(a)) || (a = null), new dH(e, a, o);
	}));
	for (let e of o) {
		if (e.error) throw e.error;
		if (e.tokens) return e;
	}
	return o.length > 0 ? o[0] : null;
}
function hH(e, t) {
	let n = e.orderedGroups(t);
	return n.length > 0 ? n[0] : null;
}
var gH = class {
	constructor(e, t) {
		this.provider = e, this.tokens = t;
	}
};
function _H(e, t) {
	return e.has(t);
}
function vH(e, t) {
	let n = e.orderedGroups(t);
	return n.length > 0 ? n[0] : [];
}
async function yH(e, t, n, r) {
	let a = vH(e, t), o = await Promise.all(a.map(async (e) => {
		let a;
		try {
			a = await e.provideDocumentRangeSemanticTokens(t, n, r);
		} catch (e) {
			i(e), a = null;
		}
		return a && lH(a) || (a = null), new gH(e, a);
	}));
	for (let e of o) if (e.tokens) return e;
	return o.length > 0 ? o[0] : null;
}
Ol.registerCommand("_provideDocumentSemanticTokensLegend", async (e, ...t) => {
	let [n] = t;
	y(n instanceof De);
	let r = e.get(je).getModel(n);
	if (!r) return;
	let { documentSemanticTokensProvider: i } = e.get(M), a = hH(i, r);
	return a ? a[0].getLegend() : e.get(ga).executeCommand("_provideDocumentRangeSemanticTokensLegend", n);
}), Ol.registerCommand("_provideDocumentSemanticTokens", async (e, ...t) => {
	let [n] = t;
	y(n instanceof De);
	let r = e.get(je).getModel(n);
	if (!r) return;
	let { documentSemanticTokensProvider: i } = e.get(M);
	if (!fH(i, r)) return e.get(ga).executeCommand("_provideDocumentRangeSemanticTokens", n, r.getFullModelRange());
	let a = await mH(i, r, null, null, C.None);
	if (!a) return;
	let { provider: o, tokens: s } = a;
	if (!s || !lH(s)) return;
	let c = sH({
		id: 0,
		type: "full",
		data: s.data
	});
	return s.resultId && o.releaseDocumentSemanticTokens(s.resultId), c;
}), Ol.registerCommand("_provideDocumentRangeSemanticTokensLegend", async (e, ...t) => {
	let [n, r] = t;
	y(n instanceof De);
	let i = e.get(je).getModel(n);
	if (!i) return;
	let { documentRangeSemanticTokensProvider: a } = e.get(M), o = vH(a, i);
	if (o.length === 0) return;
	if (o.length === 1) return o[0].getLegend();
	if (!r || !E.isIRange(r)) return console.warn("provideDocumentRangeSemanticTokensLegend might be out-of-sync with provideDocumentRangeSemanticTokens unless a range argument is passed in"), o[0].getLegend();
	let s = await yH(a, i, E.lift(r), C.None);
	if (s) return s.provider.getLegend();
}), Ol.registerCommand("_provideDocumentRangeSemanticTokens", async (e, ...t) => {
	let [n, r] = t;
	y(n instanceof De), y(E.isIRange(r));
	let i = e.get(je).getModel(n);
	if (!i) return;
	let { documentRangeSemanticTokensProvider: a } = e.get(M), o = await yH(a, i, E.lift(r), C.None);
	if (o && o.tokens) return sH({
		id: 0,
		type: "full",
		data: o.tokens.data
	});
});
// ../../../node_modules/.pnpm/monaco-editor@0.52.2/node_modules/monaco-editor/esm/vs/editor/contrib/semanticTokens/common/semanticTokensConfig.js
var bH = "editor.semanticHighlighting";
function xH(e, t, n) {
	let r = n.getValue(bH, {
		overrideIdentifier: e.getLanguageId(),
		resource: e.uri
	})?.enabled;
	return typeof r == "boolean" ? r : t.getColorTheme().semanticHighlighting;
}
// ../../../node_modules/.pnpm/monaco-editor@0.52.2/node_modules/monaco-editor/esm/vs/editor/contrib/semanticTokens/browser/documentSemanticTokens.js
var SH = function(e, t, n, r) {
	var i = arguments.length, a = i < 3 ? t : r === null ? r = Object.getOwnPropertyDescriptor(t, n) : r, o;
	if (typeof Reflect == "object" && typeof Reflect.decorate == "function") a = Reflect.decorate(e, t, n, r);
	else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (i < 3 ? o(a) : i > 3 ? o(t, n, a) : o(t, n)) || a);
	return i > 3 && a && Object.defineProperty(t, n, a), a;
}, CH = function(e, t) {
	return function(n, r) {
		t(n, r, e);
	};
}, wH, TH = class extends U {
	constructor(e, t, n, r, i, a) {
		super(), this._watchers = Object.create(null);
		let o = (t) => {
			this._watchers[t.uri.toString()] = new EH(t, e, n, i, a);
		}, s = (e, t) => {
			t.dispose(), delete this._watchers[e.uri.toString()];
		}, c = () => {
			for (let e of t.getModels()) {
				let t = this._watchers[e.uri.toString()];
				xH(e, n, r) ? t || o(e) : t && s(e, t);
			}
		};
		t.getModels().forEach((e) => {
			xH(e, n, r) && o(e);
		}), this._register(t.onModelAdded((e) => {
			xH(e, n, r) && o(e);
		})), this._register(t.onModelRemoved((e) => {
			let t = this._watchers[e.uri.toString()];
			t && s(e, t);
		})), this._register(r.onDidChangeConfiguration((e) => {
			e.affectsConfiguration("editor.semanticHighlighting") && c();
		})), this._register(n.onDidColorThemeChange(c));
	}
	dispose() {
		for (let e of Object.values(this._watchers)) e.dispose();
		super.dispose();
	}
};
TH = SH([
	CH(0, Ht),
	CH(1, je),
	CH(2, fc),
	CH(3, Fl),
	CH(4, hi),
	CH(5, M)
], TH);
var EH = class extends U {
	static {
		wH = this;
	}
	static {
		this.REQUEST_MIN_DELAY = 300;
	}
	static {
		this.REQUEST_MAX_DELAY = 2e3;
	}
	constructor(e, t, n, r, i) {
		super(), this._semanticTokensStylingService = t, this._isDisposed = !1, this._model = e, this._provider = i.documentSemanticTokensProvider, this._debounceInformation = r.for(this._provider, "DocumentSemanticTokens", {
			min: wH.REQUEST_MIN_DELAY,
			max: wH.REQUEST_MAX_DELAY
		}), this._fetchDocumentSemanticTokens = this._register(new tl(() => this._fetchDocumentSemanticTokensNow(), wH.REQUEST_MIN_DELAY)), this._currentDocumentResponse = null, this._currentDocumentRequestCancellationTokenSource = null, this._documentProvidersChangeListeners = [], this._providersChangedDuringRequest = !1, this._register(this._model.onDidChangeContent(() => {
			this._fetchDocumentSemanticTokens.isScheduled() || this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model));
		})), this._register(this._model.onDidChangeAttached(() => {
			this._fetchDocumentSemanticTokens.isScheduled() || this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model));
		})), this._register(this._model.onDidChangeLanguage(() => {
			this._currentDocumentResponse &&= (this._currentDocumentResponse.dispose(), null), this._currentDocumentRequestCancellationTokenSource &&= (this._currentDocumentRequestCancellationTokenSource.cancel(), null), this._setDocumentSemanticTokens(null, null, null, []), this._fetchDocumentSemanticTokens.schedule(0);
		}));
		let a = () => {
			ci(this._documentProvidersChangeListeners), this._documentProvidersChangeListeners = [];
			for (let t of this._provider.all(e)) typeof t.onDidChange == "function" && this._documentProvidersChangeListeners.push(t.onDidChange(() => {
				this._currentDocumentRequestCancellationTokenSource ? this._providersChangedDuringRequest = !0 : this._fetchDocumentSemanticTokens.schedule(0);
			}));
		};
		a(), this._register(this._provider.onDidChange(() => {
			a(), this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model));
		})), this._register(n.onDidColorThemeChange((e) => {
			this._setDocumentSemanticTokens(null, null, null, []), this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model));
		})), this._fetchDocumentSemanticTokens.schedule(0);
	}
	dispose() {
		this._currentDocumentResponse &&= (this._currentDocumentResponse.dispose(), null), this._currentDocumentRequestCancellationTokenSource &&= (this._currentDocumentRequestCancellationTokenSource.cancel(), null), ci(this._documentProvidersChangeListeners), this._documentProvidersChangeListeners = [], this._setDocumentSemanticTokens(null, null, null, []), this._isDisposed = !0, super.dispose();
	}
	_fetchDocumentSemanticTokensNow() {
		if (this._currentDocumentRequestCancellationTokenSource) return;
		if (!fH(this._provider, this._model)) {
			this._currentDocumentResponse && this._model.tokenization.setSemanticTokens(null, !1);
			return;
		}
		if (!this._model.isAttachedToEditor()) return;
		let e = new Cn(), t = this._currentDocumentResponse ? this._currentDocumentResponse.provider : null, n = this._currentDocumentResponse && this._currentDocumentResponse.resultId || null, r = mH(this._provider, this._model, t, n, e.token);
		this._currentDocumentRequestCancellationTokenSource = e, this._providersChangedDuringRequest = !1;
		let i = [], a = this._model.onDidChangeContent((e) => {
			i.push(e);
		}), o = new lr(!1);
		r.then((e) => {
			if (this._debounceInformation.update(this._model, o.elapsed()), this._currentDocumentRequestCancellationTokenSource = null, a.dispose(), !e) this._setDocumentSemanticTokens(null, null, null, i);
			else {
				let { provider: t, tokens: n } = e, r = this._semanticTokensStylingService.getStyling(t);
				this._setDocumentSemanticTokens(t, n || null, r, i);
			}
		}, (e) => {
			e && (Li(e) || typeof e.message == "string" && e.message.indexOf("busy") !== -1) || er(e), this._currentDocumentRequestCancellationTokenSource = null, a.dispose(), (i.length > 0 || this._providersChangedDuringRequest) && (this._fetchDocumentSemanticTokens.isScheduled() || this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model)));
		});
	}
	static _copy(e, t, n, r, i) {
		i = Math.min(i, n.length - r, e.length - t);
		for (let a = 0; a < i; a++) n[r + a] = e[t + a];
	}
	_setDocumentSemanticTokens(e, t, n, r) {
		let i = this._currentDocumentResponse, a = () => {
			(r.length > 0 || this._providersChangedDuringRequest) && !this._fetchDocumentSemanticTokens.isScheduled() && this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model));
		};
		if (this._currentDocumentResponse &&= (this._currentDocumentResponse.dispose(), null), this._isDisposed) e && t && e.releaseDocumentSemanticTokens(t.resultId);
		else if (!e || !n) this._model.tokenization.setSemanticTokens(null, !1);
		else if (!t) this._model.tokenization.setSemanticTokens(null, !0), a();
		else {
			if (uH(t)) {
				if (!i) {
					this._model.tokenization.setSemanticTokens(null, !0);
					return;
				}
				if (t.edits.length === 0) t = {
					resultId: t.resultId,
					data: i.data
				};
				else {
					let e = 0;
					for (let n of t.edits) e += (n.data ? n.data.length : 0) - n.deleteCount;
					let r = i.data, a = new Uint32Array(r.length + e), o = r.length, s = a.length;
					for (let e = t.edits.length - 1; e >= 0; e--) {
						let c = t.edits[e];
						if (c.start > r.length) {
							n.warnInvalidEditStart(i.resultId, t.resultId, e, c.start, r.length), this._model.tokenization.setSemanticTokens(null, !0);
							return;
						}
						let l = o - (c.start + c.deleteCount);
						l > 0 && (wH._copy(r, o - l, a, s - l, l), s -= l), c.data && (wH._copy(c.data, 0, a, s - c.data.length, c.data.length), s -= c.data.length), o = c.start;
					}
					o > 0 && wH._copy(r, 0, a, 0, o), t = {
						resultId: t.resultId,
						data: a
					};
				}
			}
			if (lH(t)) {
				this._currentDocumentResponse = new DH(e, t.resultId, t.data);
				let i = Qs(t, n, this._model.getLanguageId());
				if (r.length > 0) for (let e of r) for (let t of i) for (let n of e.changes) t.applyEdit(n.range, n.text);
				this._model.tokenization.setSemanticTokens(i, !0);
			} else this._model.tokenization.setSemanticTokens(null, !0);
			a();
		}
	}
};
EH = wH = SH([
	CH(1, Ht),
	CH(2, fc),
	CH(3, hi),
	CH(4, M)
], EH);
var DH = class {
	constructor(e, t, n) {
		this.provider = e, this.resultId = t, this.data = n;
	}
	dispose() {
		this.provider.releaseDocumentSemanticTokens(this.resultId);
	}
};
He(TH);
// ../../../node_modules/.pnpm/monaco-editor@0.52.2/node_modules/monaco-editor/esm/vs/editor/contrib/semanticTokens/browser/viewportSemanticTokens.js
var OH = function(e, t, n, r) {
	var i = arguments.length, a = i < 3 ? t : r === null ? r = Object.getOwnPropertyDescriptor(t, n) : r, o;
	if (typeof Reflect == "object" && typeof Reflect.decorate == "function") a = Reflect.decorate(e, t, n, r);
	else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (i < 3 ? o(a) : i > 3 ? o(t, n, a) : o(t, n)) || a);
	return i > 3 && a && Object.defineProperty(t, n, a), a;
}, kH = function(e, t) {
	return function(n, r) {
		t(n, r, e);
	};
}, AH = class extends U {
	static {
		this.ID = "editor.contrib.viewportSemanticTokens";
	}
	constructor(e, t, n, r, i, a) {
		super(), this._semanticTokensStylingService = t, this._themeService = n, this._configurationService = r, this._editor = e, this._provider = a.documentRangeSemanticTokensProvider, this._debounceInformation = i.for(this._provider, "DocumentRangeSemanticTokens", {
			min: 100,
			max: 500
		}), this._tokenizeViewport = this._register(new tl(() => this._tokenizeViewportNow(), 100)), this._outstandingRequests = [];
		let o = () => {
			this._editor.hasModel() && this._tokenizeViewport.schedule(this._debounceInformation.get(this._editor.getModel()));
		};
		this._register(this._editor.onDidScrollChange(() => {
			o();
		})), this._register(this._editor.onDidChangeModel(() => {
			this._cancelAll(), o();
		})), this._register(this._editor.onDidChangeModelContent((e) => {
			this._cancelAll(), o();
		})), this._register(this._provider.onDidChange(() => {
			this._cancelAll(), o();
		})), this._register(this._configurationService.onDidChangeConfiguration((e) => {
			e.affectsConfiguration("editor.semanticHighlighting") && (this._cancelAll(), o());
		})), this._register(this._themeService.onDidColorThemeChange(() => {
			this._cancelAll(), o();
		})), o();
	}
	_cancelAll() {
		for (let e of this._outstandingRequests) e.cancel();
		this._outstandingRequests = [];
	}
	_removeOutstandingRequest(e) {
		for (let t = 0, n = this._outstandingRequests.length; t < n; t++) if (this._outstandingRequests[t] === e) {
			this._outstandingRequests.splice(t, 1);
			return;
		}
	}
	_tokenizeViewportNow() {
		if (!this._editor.hasModel()) return;
		let e = this._editor.getModel();
		if (e.tokenization.hasCompleteSemanticTokens()) return;
		if (!xH(e, this._themeService, this._configurationService) || !_H(this._provider, e)) {
			e.tokenization.hasSomeSemanticTokens() && e.tokenization.setSemanticTokens(null, !1);
			return;
		}
		let t = this._editor.getVisibleRangesPlusViewportAboveBelow();
		this._outstandingRequests = this._outstandingRequests.concat(t.map((t) => this._requestRange(e, t)));
	}
	_requestRange(e, t) {
		let n = e.getVersionId(), r = Te((n) => Promise.resolve(yH(this._provider, e, t, n))), i = new lr(!1);
		return r.then((r) => {
			if (this._debounceInformation.update(e, i.elapsed()), !r || !r.tokens || e.isDisposed() || e.getVersionId() !== n) return;
			let { provider: a, tokens: o } = r, s = this._semanticTokensStylingService.getStyling(a);
			e.tokenization.setPartialSemanticTokens(t, Qs(o, s, e.getLanguageId()));
		}).then(() => this._removeOutstandingRequest(r), () => this._removeOutstandingRequest(r)), r;
	}
};
AH = OH([
	kH(1, Ht),
	kH(2, fc),
	kH(3, Fl),
	kH(4, hi),
	kH(5, M)
], AH), T(AH.ID, AH, 1);
// ../../../node_modules/.pnpm/monaco-editor@0.52.2/node_modules/monaco-editor/esm/vs/editor/contrib/smartSelect/browser/wordSelections.js
var jH = class {
	constructor(e = !0) {
		this.selectSubwords = e;
	}
	provideSelectionRanges(e, t) {
		let n = [];
		for (let r of t) {
			let t = [];
			n.push(t), this.selectSubwords && this._addInWordRanges(t, e, r), this._addWordRanges(t, e, r), this._addWhitespaceLine(t, e, r), t.push({ range: e.getFullModelRange() });
		}
		return n;
	}
	_addInWordRanges(e, t, n) {
		let r = t.getWordAtPosition(n);
		if (!r) return;
		let { word: i, startColumn: a } = r, o = n.column - a, s = o, c = o, l = 0;
		for (; s >= 0; s--) {
			let e = i.charCodeAt(s);
			if (s !== o && (e === 95 || e === 45) || Fi(e) && Qn(l)) break;
			l = e;
		}
		for (s += 1; c < i.length; c++) {
			let e = i.charCodeAt(c);
			if (Qn(e) && Fi(l) || e === 95 || e === 45) break;
			l = e;
		}
		s < c && e.push({ range: new E(n.lineNumber, a + s, n.lineNumber, a + c) });
	}
	_addWordRanges(e, t, n) {
		let r = t.getWordAtPosition(n);
		r && e.push({ range: new E(n.lineNumber, r.startColumn, n.lineNumber, r.endColumn) });
	}
	_addWhitespaceLine(e, t, n) {
		t.getLineLength(n.lineNumber) > 0 && t.getLineFirstNonWhitespaceColumn(n.lineNumber) === 0 && t.getLineLastNonWhitespaceColumn(n.lineNumber) === 0 && e.push({ range: new E(n.lineNumber, 1, n.lineNumber, t.getLineMaxColumn(n.lineNumber)) });
	}
}, MH = function(e, t, n, r) {
	var i = arguments.length, a = i < 3 ? t : r === null ? r = Object.getOwnPropertyDescriptor(t, n) : r, o;
	if (typeof Reflect == "object" && typeof Reflect.decorate == "function") a = Reflect.decorate(e, t, n, r);
	else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (i < 3 ? o(a) : i > 3 ? o(t, n, a) : o(t, n)) || a);
	return i > 3 && a && Object.defineProperty(t, n, a), a;
}, NH = function(e, t) {
	return function(n, r) {
		t(n, r, e);
	};
}, PH, FH = class e {
	constructor(e, t) {
		this.index = e, this.ranges = t;
	}
	mov(t) {
		let n = this.index + (t ? 1 : -1);
		if (n < 0 || n >= this.ranges.length) return this;
		let r = new e(n, this.ranges);
		return r.ranges[n].equalsRange(this.ranges[this.index]) ? r.mov(t) : r;
	}
}, IH = class {
	static {
		PH = this;
	}
	static {
		this.ID = "editor.contrib.smartSelectController";
	}
	static get(e) {
		return e.getContribution(PH.ID);
	}
	constructor(e, t) {
		this._editor = e, this._languageFeaturesService = t, this._ignoreSelection = !1;
	}
	dispose() {
		this._selectionListener?.dispose();
	}
	async run(e) {
		if (!this._editor.hasModel()) return;
		let t = this._editor.getSelections(), n = this._editor.getModel();
		if (this._state || await BH(this._languageFeaturesService.selectionRangeProvider, n, t.map((e) => e.getPosition()), this._editor.getOption(114), C.None).then((e) => {
			if (zl(e) && e.length === t.length && this._editor.hasModel() && At(this._editor.getSelections(), t, (e, t) => e.equalsSelection(t))) {
				for (let n = 0; n < e.length; n++) e[n] = e[n].filter((e) => e.containsPosition(t[n].getStartPosition()) && e.containsPosition(t[n].getEndPosition())), e[n].unshift(t[n]);
				this._state = e.map((e) => new FH(0, e)), this._selectionListener?.dispose(), this._selectionListener = this._editor.onDidChangeCursorPosition(() => {
					this._ignoreSelection || (this._selectionListener?.dispose(), this._state = void 0);
				});
			}
		}), !this._state) return;
		this._state = this._state.map((t) => t.mov(e));
		let r = this._state.map((e) => V.fromPositions(e.ranges[e.index].getStartPosition(), e.ranges[e.index].getEndPosition()));
		this._ignoreSelection = !0;
		try {
			this._editor.setSelections(r);
		} finally {
			this._ignoreSelection = !1;
		}
	}
};
IH = PH = MH([NH(1, M)], IH);
var LH = class extends O {
	constructor(e, t) {
		super(t), this._forward = e;
	}
	async run(e, t) {
		let n = IH.get(t);
		n && await n.run(this._forward);
	}
}, RH = class extends LH {
	constructor() {
		super(!0, {
			id: "editor.action.smartSelect.expand",
			label: B("smartSelect.expand", "Expand Selection"),
			alias: "Expand Selection",
			precondition: void 0,
			kbOpts: {
				kbExpr: I.editorTextFocus,
				primary: 1553,
				mac: {
					primary: 3345,
					secondary: [1297]
				},
				weight: 100
			},
			menuOpts: {
				menuId: F.MenubarSelectionMenu,
				group: "1_basic",
				title: B({
					key: "miSmartSelectGrow",
					comment: ["&& denotes a mnemonic"]
				}, "&&Expand Selection"),
				order: 2
			}
		});
	}
};
Ol.registerCommandAlias("editor.action.smartSelect.grow", "editor.action.smartSelect.expand");
var zH = class extends LH {
	constructor() {
		super(!1, {
			id: "editor.action.smartSelect.shrink",
			label: B("smartSelect.shrink", "Shrink Selection"),
			alias: "Shrink Selection",
			precondition: void 0,
			kbOpts: {
				kbExpr: I.editorTextFocus,
				primary: 1551,
				mac: {
					primary: 3343,
					secondary: [1295]
				},
				weight: 100
			},
			menuOpts: {
				menuId: F.MenubarSelectionMenu,
				group: "1_basic",
				title: B({
					key: "miSmartSelectShrink",
					comment: ["&& denotes a mnemonic"]
				}, "&&Shrink Selection"),
				order: 3
			}
		});
	}
};
T(IH.ID, IH, 4), k(RH), k(zH);
async function BH(e, t, n, r, a) {
	let o = e.all(t).concat(new jH(r.selectSubwords));
	o.length === 1 && o.unshift(new lF());
	let s = [], c = [];
	for (let e of o) s.push(Promise.resolve(e.provideSelectionRanges(t, n, a)).then((e) => {
		if (zl(e) && e.length === n.length) for (let t = 0; t < n.length; t++) {
			c[t] || (c[t] = []);
			for (let r of e[t]) E.isIRange(r.range) && E.containsPosition(r.range, n[t]) && c[t].push(E.lift(r.range));
		}
	}, i));
	return await Promise.all(s), c.map((e) => {
		if (e.length === 0) return [];
		e.sort((e, t) => b.isBefore(e.getStartPosition(), t.getStartPosition()) ? 1 : b.isBefore(t.getStartPosition(), e.getStartPosition()) || b.isBefore(e.getEndPosition(), t.getEndPosition()) ? -1 : +!!b.isBefore(t.getEndPosition(), e.getEndPosition()));
		let n = [], i;
		for (let t of e) (!i || E.containsRange(t, i) && !E.equalsRange(t, i)) && (n.push(t), i = t);
		if (!r.selectLeadingAndTrailingWhitespace) return n;
		let a = [n[0]];
		for (let e = 1; e < n.length; e++) {
			let r = n[e - 1], i = n[e];
			if (i.startLineNumber !== r.startLineNumber || i.endLineNumber !== r.endLineNumber) {
				let e = new E(r.startLineNumber, t.getLineFirstNonWhitespaceColumn(r.startLineNumber), r.endLineNumber, t.getLineLastNonWhitespaceColumn(r.endLineNumber));
				e.containsRange(r) && !e.equalsRange(r) && i.containsRange(e) && !i.equalsRange(e) && a.push(e);
				let n = new E(r.startLineNumber, 1, r.endLineNumber, t.getLineMaxColumn(r.endLineNumber));
				n.containsRange(r) && !n.equalsRange(e) && i.containsRange(n) && !i.equalsRange(n) && a.push(n);
			}
			a.push(i);
		}
		return a;
	});
}
Ol.registerCommand("_executeSelectionRangeProvider", async function(e, ...t) {
	let [n, r] = t;
	y(De.isUri(n));
	let i = e.get(M).selectionRangeProvider, a = await e.get(Ve).createModelReference(n);
	try {
		return BH(i, a.object.textEditorModel, r, {
			selectLeadingAndTrailingWhitespace: !0,
			selectSubwords: !0
		}, C.None);
	} finally {
		a.dispose();
	}
});
// ../../../node_modules/.pnpm/monaco-editor@0.52.2/node_modules/monaco-editor/esm/vs/platform/action/common/actionCommonCategories.js
var VH = Object.freeze({
	View: H("view", "View"),
	Help: H("help", "Help"),
	Test: H("test", "Test"),
	File: H("file", "File"),
	Preferences: H("preferences", "Preferences"),
	Developer: H({
		key: "developer",
		comment: ["A developer on Code itself or someone diagnosing issues in Code"]
	}, "Developer")
}), HH = class e {
	constructor(e, t, n, r = null) {
		this.startLineNumbers = e, this.endLineNumbers = t, this.lastLineRelativePosition = n, this.showEndForLine = r;
	}
	equals(e) {
		return !!e && this.lastLineRelativePosition === e.lastLineRelativePosition && this.showEndForLine === e.showEndForLine && At(this.startLineNumbers, e.startLineNumbers) && At(this.endLineNumbers, e.endLineNumbers);
	}
	static get Empty() {
		return new e([], [], 0);
	}
}, UH = Ur("stickyScrollViewLayer", { createHTML: (e) => e }), WH = "data-sticky-line-index", GH = "data-sticky-is-line", KH = "data-sticky-is-line-number", qH = "data-sticky-is-folding-icon", JH = class extends U {
	constructor(e) {
		super(), this._editor = e, this._foldingIconStore = new g(), this._rootDomNode = document.createElement("div"), this._lineNumbersDomNode = document.createElement("div"), this._linesDomNodeScrollable = document.createElement("div"), this._linesDomNode = document.createElement("div"), this._lineHeight = this._editor.getOption(67), this._renderedStickyLines = [], this._lineNumbers = [], this._lastLineRelativePosition = 0, this._minContentWidthInPx = 0, this._isOnGlyphMargin = !1, this._lineNumbersDomNode.className = "sticky-widget-line-numbers", this._lineNumbersDomNode.setAttribute("role", "none"), this._linesDomNode.className = "sticky-widget-lines", this._linesDomNode.setAttribute("role", "list"), this._linesDomNodeScrollable.className = "sticky-widget-lines-scrollable", this._linesDomNodeScrollable.appendChild(this._linesDomNode), this._rootDomNode.className = "sticky-widget", this._rootDomNode.classList.toggle("peek", e instanceof gD), this._rootDomNode.appendChild(this._lineNumbersDomNode), this._rootDomNode.appendChild(this._linesDomNodeScrollable);
		let t = () => {
			this._linesDomNode.style.left = this._editor.getOption(116).scrollWithEditor ? `-${this._editor.getScrollLeft()}px` : "0px";
		};
		this._register(this._editor.onDidChangeConfiguration((e) => {
			e.hasChanged(116) && t(), e.hasChanged(67) && (this._lineHeight = this._editor.getOption(67));
		})), this._register(this._editor.onDidScrollChange((e) => {
			e.scrollLeftChanged && t(), e.scrollWidthChanged && this._updateWidgetWidth();
		})), this._register(this._editor.onDidChangeModel(() => {
			t(), this._updateWidgetWidth();
		})), this._register(this._foldingIconStore), t(), this._register(this._editor.onDidLayoutChange((e) => {
			this._updateWidgetWidth();
		})), this._updateWidgetWidth();
	}
	get lineNumbers() {
		return this._lineNumbers;
	}
	get lineNumberCount() {
		return this._lineNumbers.length;
	}
	getRenderedStickyLine(e) {
		return this._renderedStickyLines.find((t) => t.lineNumber === e);
	}
	getCurrentLines() {
		return this._lineNumbers;
	}
	setState(e, t, n) {
		if (n === void 0 && (!this._previousState && !e || this._previousState && this._previousState.equals(e))) return;
		let r = this._isWidgetHeightZero(e), i = r ? void 0 : e, a = r ? 0 : this._findLineToRebuildWidgetFrom(e, n);
		this._renderRootNode(i, t, a), this._previousState = e;
	}
	_isWidgetHeightZero(e) {
		if (!e) return !0;
		let t = e.startLineNumbers.length * this._lineHeight + e.lastLineRelativePosition;
		if (t > 0) {
			this._lastLineRelativePosition = e.lastLineRelativePosition;
			let t = [...e.startLineNumbers];
			e.showEndForLine !== null && (t[e.showEndForLine] = e.endLineNumbers[e.showEndForLine]), this._lineNumbers = t;
		} else this._lastLineRelativePosition = 0, this._lineNumbers = [];
		return t === 0;
	}
	_findLineToRebuildWidgetFrom(e, t) {
		if (!e || !this._previousState) return 0;
		if (t !== void 0) return t;
		let n = this._previousState, r = e.startLineNumbers.findIndex((e) => !n.startLineNumbers.includes(e));
		return r === -1 ? 0 : r;
	}
	_updateWidgetWidth() {
		let e = this._editor.getLayoutInfo(), t = e.contentLeft;
		this._lineNumbersDomNode.style.width = `${t}px`, this._linesDomNodeScrollable.style.setProperty("--vscode-editorStickyScroll-scrollableWidth", `${this._editor.getScrollWidth() - e.verticalScrollbarWidth}px`), this._rootDomNode.style.width = `${e.width - e.verticalScrollbarWidth}px`;
	}
	_clearStickyLinesFromLine(e) {
		this._foldingIconStore.clear();
		for (let t = e; t < this._renderedStickyLines.length; t++) {
			let e = this._renderedStickyLines[t];
			e.lineNumberDomNode.remove(), e.lineDomNode.remove();
		}
		this._renderedStickyLines = this._renderedStickyLines.slice(0, e), this._rootDomNode.style.display = "none";
	}
	_useFoldingOpacityTransition(e) {
		this._lineNumbersDomNode.style.setProperty("--vscode-editorStickyScroll-foldingOpacityTransition", `opacity ${e ? .5 : 0}s`);
	}
	_setFoldingIconsVisibility(e) {
		for (let t of this._renderedStickyLines) {
			let n = t.foldingIcon;
			n && n.setVisible(e ? !0 : n.isCollapsed);
		}
	}
	async _renderRootNode(e, t, n) {
		if (this._clearStickyLinesFromLine(n), !e) return;
		for (let e of this._renderedStickyLines) this._updateTopAndZIndexOfStickyLine(e);
		let r = this._editor.getLayoutInfo(), i = this._lineNumbers.slice(n);
		for (let [e, a] of i.entries()) {
			let i = this._renderChildNode(e + n, a, t, r);
			i && (this._linesDomNode.appendChild(i.lineDomNode), this._lineNumbersDomNode.appendChild(i.lineNumberDomNode), this._renderedStickyLines.push(i));
		}
		t && (this._setFoldingHoverListeners(), this._useFoldingOpacityTransition(!this._isOnGlyphMargin));
		let a = this._lineNumbers.length * this._lineHeight + this._lastLineRelativePosition;
		this._rootDomNode.style.display = "block", this._lineNumbersDomNode.style.height = `${a}px`, this._linesDomNodeScrollable.style.height = `${a}px`, this._rootDomNode.style.height = `${a}px`, this._rootDomNode.style.marginLeft = "0px", this._minContentWidthInPx = Math.max(...this._renderedStickyLines.map((e) => e.scrollWidth)) + r.verticalScrollbarWidth, this._editor.layoutOverlayWidget(this);
	}
	_setFoldingHoverListeners() {
		this._editor.getOption(111) === "mouseover" && (this._foldingIconStore.add(_(this._lineNumbersDomNode, on.MOUSE_ENTER, () => {
			this._isOnGlyphMargin = !0, this._setFoldingIconsVisibility(!0);
		})), this._foldingIconStore.add(_(this._lineNumbersDomNode, on.MOUSE_LEAVE, () => {
			this._isOnGlyphMargin = !1, this._useFoldingOpacityTransition(!0), this._setFoldingIconsVisibility(!1);
		})));
	}
	_renderChildNode(e, t, n, r) {
		let i = this._editor._getViewModel();
		if (!i) return;
		let a = i.coordinatesConverter.convertModelPositionToViewPosition(new b(t, 1)).lineNumber, o = i.getViewLineRenderingData(a), s = this._editor.getOption(68), c;
		try {
			c = Fr.filter(o.inlineDecorations, a, o.minColumn, o.maxColumn);
		} catch {
			c = [];
		}
		let l = new Se(!0, !0, o.content, o.continuesWithWrappedLine, o.isBasicASCII, o.containsRTL, 0, o.tokens, c, o.tabSize, o.startVisibleColumn, 1, 1, 1, 500, "none", !0, !0, null), u = new ue(2e3), d = sl(l, u), f;
		f = UH ? UH.createHTML(u.build()) : u.build();
		let p = document.createElement("span");
		p.setAttribute(WH, String(e)), p.setAttribute(GH, ""), p.setAttribute("role", "listitem"), p.tabIndex = 0, p.className = "sticky-line-content", p.classList.add(`stickyLine${t}`), p.style.lineHeight = `${this._lineHeight}px`, p.innerHTML = f;
		let m = document.createElement("span");
		m.setAttribute(WH, String(e)), m.setAttribute(KH, ""), m.className = "sticky-line-number", m.style.lineHeight = `${this._lineHeight}px`;
		let h = r.contentLeft;
		m.style.width = `${h}px`;
		let ee = document.createElement("span");
		s.renderType === 1 || s.renderType === 3 && t % 10 == 0 ? ee.innerText = t.toString() : s.renderType === 2 && (ee.innerText = Math.abs(t - this._editor.getPosition().lineNumber).toString()), ee.className = "sticky-line-number-inner", ee.style.lineHeight = `${this._lineHeight}px`, ee.style.width = `${r.lineNumbersWidth}px`, ee.style.paddingLeft = `${r.lineNumbersLeft}px`, m.appendChild(ee);
		let te = this._renderFoldingIconForLine(n, t);
		te && m.appendChild(te.domNode), this._editor.applyFontInfo(p), this._editor.applyFontInfo(ee), m.style.lineHeight = `${this._lineHeight}px`, p.style.lineHeight = `${this._lineHeight}px`, m.style.height = `${this._lineHeight}px`, p.style.height = `${this._lineHeight}px`;
		let ne = new YH(e, t, p, m, te, d.characterMapping, p.scrollWidth);
		return this._updateTopAndZIndexOfStickyLine(ne);
	}
	_updateTopAndZIndexOfStickyLine(e) {
		let t = e.index, n = e.lineDomNode, r = e.lineNumberDomNode, i = t === this._lineNumbers.length - 1;
		n.style.zIndex = i ? "0" : "1", r.style.zIndex = i ? "0" : "1";
		let a = `${t * this._lineHeight + this._lastLineRelativePosition + +!!e.foldingIcon?.isCollapsed}px`, o = `${t * this._lineHeight}px`;
		return n.style.top = i ? a : o, r.style.top = i ? a : o, e;
	}
	_renderFoldingIconForLine(e, t) {
		let n = this._editor.getOption(111);
		if (!e || n === "never") return;
		let r = e.regions, i = r.findRange(t), a = r.getStartLineNumber(i);
		if (t !== a) return;
		let o = r.isCollapsed(i), s = new XH(o, a, r.getEndLineNumber(i), this._lineHeight);
		return s.setVisible(this._isOnGlyphMargin ? !0 : o || n === "always"), s.domNode.setAttribute(qH, ""), s;
	}
	getId() {
		return "editor.contrib.stickyScrollWidget";
	}
	getDomNode() {
		return this._rootDomNode;
	}
	getPosition() {
		return {
			preference: 2,
			stackOridinal: 10
		};
	}
	getMinContentWidthInPx() {
		return this._minContentWidthInPx;
	}
	focusLineWithIndex(e) {
		0 <= e && e < this._renderedStickyLines.length && this._renderedStickyLines[e].lineDomNode.focus();
	}
	getEditorPositionFromNode(e) {
		if (!e || e.children.length > 0) return null;
		let t = this._getRenderedStickyLineFromChildDomNode(e);
		if (!t) return null;
		let n = _a(t.characterMapping, e, 0);
		return new b(t.lineNumber, n);
	}
	getLineNumberFromChildDomNode(e) {
		return this._getRenderedStickyLineFromChildDomNode(e)?.lineNumber ?? null;
	}
	_getRenderedStickyLineFromChildDomNode(e) {
		let t = this.getLineIndexFromChildDomNode(e);
		return t === null || t < 0 || t >= this._renderedStickyLines.length ? null : this._renderedStickyLines[t];
	}
	getLineIndexFromChildDomNode(e) {
		let t = this._getAttributeValue(e, WH);
		return t ? parseInt(t, 10) : null;
	}
	isInStickyLine(e) {
		return this._getAttributeValue(e, GH) !== void 0;
	}
	isInFoldingIconDomNode(e) {
		return this._getAttributeValue(e, qH) !== void 0;
	}
	_getAttributeValue(e, t) {
		for (; e && e !== this._rootDomNode;) {
			let n = e.getAttribute(t);
			if (n !== null) return n;
			e = e.parentElement;
		}
	}
}, YH = class {
	constructor(e, t, n, r, i, a, o) {
		this.index = e, this.lineNumber = t, this.lineDomNode = n, this.lineNumberDomNode = r, this.foldingIcon = i, this.characterMapping = a, this.scrollWidth = o;
	}
}, XH = class {
	constructor(e, t, n, r) {
		this.isCollapsed = e, this.foldingStartLine = t, this.foldingEndLine = n, this.dimension = r, this.domNode = document.createElement("div"), this.domNode.style.width = `${r}px`, this.domNode.style.height = `${r}px`, this.domNode.className = _l.asClassName(e ? cM : sM);
	}
	setVisible(e) {
		this.domNode.style.cursor = e ? "pointer" : "default", this.domNode.style.opacity = e ? "1" : "0";
	}
}, ZH = class {
	constructor(e, t) {
		this.startLineNumber = e, this.endLineNumber = t;
	}
}, QH = class {
	constructor(e, t, n) {
		this.range = e, this.children = t, this.parent = n;
	}
}, $H = class {
	constructor(e, t, n, r) {
		this.uri = e, this.version = t, this.element = n, this.outlineProviderId = r;
	}
}, eU = function(e, t, n, r) {
	var i = arguments.length, a = i < 3 ? t : r === null ? r = Object.getOwnPropertyDescriptor(t, n) : r, o;
	if (typeof Reflect == "object" && typeof Reflect.decorate == "function") a = Reflect.decorate(e, t, n, r);
	else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (i < 3 ? o(a) : i > 3 ? o(t, n, a) : o(t, n)) || a);
	return i > 3 && a && Object.defineProperty(t, n, a), a;
}, tU = function(e, t) {
	return function(n, r) {
		t(n, r, e);
	};
}, nU;
(function(e) {
	e.OUTLINE_MODEL = "outlineModel", e.FOLDING_PROVIDER_MODEL = "foldingProviderModel", e.INDENTATION_MODEL = "indentationModel";
})(nU ||= {});
var rU;
(function(e) {
	e[e.VALID = 0] = "VALID", e[e.INVALID = 1] = "INVALID", e[e.CANCELED = 2] = "CANCELED";
})(rU ||= {});
var iU = class extends U {
	constructor(e, t, n, r) {
		switch (super(), this._editor = e, this._modelProviders = [], this._modelPromise = null, this._updateScheduler = this._register(new ge(300)), this._updateOperation = this._register(new g()), this._editor.getOption(116).defaultModel) {
			case nU.OUTLINE_MODEL: this._modelProviders.push(new oU(this._editor, r));
			case nU.FOLDING_PROVIDER_MODEL: this._modelProviders.push(new lU(this._editor, t, r));
			case nU.INDENTATION_MODEL: this._modelProviders.push(new cU(this._editor, n));
		}
	}
	dispose() {
		this._modelProviders.forEach((e) => e.dispose()), this._updateOperation.clear(), this._cancelModelPromise(), super.dispose();
	}
	_cancelModelPromise() {
		this._modelPromise &&= (this._modelPromise.cancel(), null);
	}
	async update(e) {
		return this._updateOperation.clear(), this._updateOperation.add({ dispose: () => {
			this._cancelModelPromise(), this._updateScheduler.cancel();
		} }), this._cancelModelPromise(), await this._updateScheduler.trigger(async () => {
			for (let t of this._modelProviders) {
				let { statusPromise: n, modelPromise: r } = t.computeStickyModel(e);
				this._modelPromise = r;
				let i = await n;
				if (this._modelPromise !== r) return null;
				switch (i) {
					case rU.CANCELED: return this._updateOperation.clear(), null;
					case rU.VALID: return t.stickyModel;
				}
			}
			return null;
		}).catch((e) => (er(e), null));
	}
};
iU = eU([tU(2, P), tU(3, M)], iU);
var aU = class extends U {
	constructor(e) {
		super(), this._editor = e, this._stickyModel = null;
	}
	get stickyModel() {
		return this._stickyModel;
	}
	_invalid() {
		return this._stickyModel = null, rU.INVALID;
	}
	computeStickyModel(e) {
		if (e.isCancellationRequested || !this.isProviderValid()) return {
			statusPromise: this._invalid(),
			modelPromise: null
		};
		let t = Te((e) => this.createModelFromProvider(e));
		return {
			statusPromise: t.then((t) => this.isModelValid(t) ? e.isCancellationRequested ? rU.CANCELED : (this._stickyModel = this.createStickyModel(e, t), rU.VALID) : this._invalid()).then(void 0, (e) => (er(e), rU.CANCELED)),
			modelPromise: t
		};
	}
	isModelValid(e) {
		return !0;
	}
	isProviderValid() {
		return !0;
	}
}, oU = class extends aU {
	constructor(e, t) {
		super(e), this._languageFeaturesService = t;
	}
	createModelFromProvider(e) {
		return lN.create(this._languageFeaturesService.documentSymbolProvider, this._editor.getModel(), e);
	}
	createStickyModel(e, t) {
		let { stickyOutlineElement: n, providerID: r } = this._stickyModelFromOutlineModel(t, this._stickyModel?.outlineProviderId), i = this._editor.getModel();
		return new $H(i.uri, i.getVersionId(), n, r);
	}
	isModelValid(e) {
		return e && e.children.size > 0;
	}
	_stickyModelFromOutlineModel(e, t) {
		let n;
		if (Da.first(e.children.values()) instanceof cN) {
			let r = Da.find(e.children.values(), (e) => e.id === t);
			if (r) n = r.children;
			else {
				let r = "", i = -1, a;
				for (let [t, n] of e.children.entries()) {
					let e = this._findSumOfRangesOfGroup(n);
					e > i && (a = n, i = e, r = n.id);
				}
				t = r, n = a.children;
			}
		} else n = e.children;
		let r = [], i = Array.from(n.values()).sort((e, t) => {
			let n = new ZH(e.symbol.range.startLineNumber, e.symbol.range.endLineNumber), r = new ZH(t.symbol.range.startLineNumber, t.symbol.range.endLineNumber);
			return this._comparator(n, r);
		});
		for (let e of i) r.push(this._stickyModelFromOutlineElement(e, e.symbol.selectionRange.startLineNumber));
		return {
			stickyOutlineElement: new QH(void 0, r, void 0),
			providerID: t
		};
	}
	_stickyModelFromOutlineElement(e, t) {
		let n = [];
		for (let r of e.children.values()) if (r.symbol.selectionRange.startLineNumber !== r.symbol.range.endLineNumber) {
			if (r.symbol.selectionRange.startLineNumber !== t) n.push(this._stickyModelFromOutlineElement(r, r.symbol.selectionRange.startLineNumber));
			else for (let e of r.children.values()) n.push(this._stickyModelFromOutlineElement(e, r.symbol.selectionRange.startLineNumber));
		}
		return n.sort((e, t) => this._comparator(e.range, t.range)), new QH(new ZH(e.symbol.selectionRange.startLineNumber, e.symbol.range.endLineNumber), n, void 0);
	}
	_comparator(e, t) {
		return e.startLineNumber === t.startLineNumber ? t.endLineNumber - e.endLineNumber : e.startLineNumber - t.startLineNumber;
	}
	_findSumOfRangesOfGroup(e) {
		let t = 0;
		for (let n of e.children.values()) t += this._findSumOfRangesOfGroup(n);
		return e instanceof sN ? t + e.symbol.range.endLineNumber - e.symbol.selectionRange.startLineNumber : t;
	}
};
oU = eU([tU(1, M)], oU);
var sU = class extends aU {
	constructor(e) {
		super(e), this._foldingLimitReporter = new EM(e);
	}
	createStickyModel(e, t) {
		let n = this._fromFoldingRegions(t), r = this._editor.getModel();
		return new $H(r.uri, r.getVersionId(), n, void 0);
	}
	isModelValid(e) {
		return e !== null;
	}
	_fromFoldingRegions(e) {
		let t = e.length, n = [], r = new QH(void 0, [], void 0);
		for (let i = 0; i < t; i++) {
			let t = e.getParentIndex(i), a;
			a = t === -1 ? r : n[t];
			let o = new QH(new ZH(e.getStartLineNumber(i), e.getEndLineNumber(i) + 1), [], a);
			a.children.push(o), n.push(o);
		}
		return r;
	}
}, cU = class extends sU {
	constructor(e, t) {
		super(e), this._languageConfigurationService = t, this.provider = this._register(new nM(e.getModel(), this._languageConfigurationService, this._foldingLimitReporter));
	}
	async createModelFromProvider(e) {
		return this.provider.compute(e);
	}
};
cU = eU([tU(1, Tn)], cU);
var lU = class extends sU {
	constructor(e, t, n) {
		super(e), this._languageFeaturesService = n;
		let r = TM.getFoldingRangeProviders(this._languageFeaturesService, e.getModel());
		r.length > 0 && (this.provider = this._register(new _M(e.getModel(), r, t, this._foldingLimitReporter, void 0)));
	}
	isProviderValid() {
		return this.provider !== void 0;
	}
	async createModelFromProvider(e) {
		return this.provider?.compute(e) ?? null;
	}
};
lU = eU([tU(2, M)], lU);
// ../../../node_modules/.pnpm/monaco-editor@0.52.2/node_modules/monaco-editor/esm/vs/editor/contrib/stickyScroll/browser/stickyScrollProvider.js
var uU = function(e, t, n, r) {
	var i = arguments.length, a = i < 3 ? t : r === null ? r = Object.getOwnPropertyDescriptor(t, n) : r, o;
	if (typeof Reflect == "object" && typeof Reflect.decorate == "function") a = Reflect.decorate(e, t, n, r);
	else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (i < 3 ? o(a) : i > 3 ? o(t, n, a) : o(t, n)) || a);
	return i > 3 && a && Object.defineProperty(t, n, a), a;
}, dU = function(e, t) {
	return function(n, r) {
		t(n, r, e);
	};
}, fU = class {
	constructor(e, t, n) {
		this.startLineNumber = e, this.endLineNumber = t, this.nestingDepth = n;
	}
}, pU = class extends U {
	constructor(e, t, n) {
		super(), this._languageFeaturesService = t, this._languageConfigurationService = n, this._onDidChangeStickyScroll = this._register(new x()), this.onDidChangeStickyScroll = this._onDidChangeStickyScroll.event, this._model = null, this._cts = null, this._stickyModelProvider = null, this._editor = e, this._sessionStore = this._register(new g()), this._updateSoon = this._register(new tl(() => this.update(), 50)), this._register(this._editor.onDidChangeConfiguration((e) => {
			e.hasChanged(116) && this.readConfiguration();
		})), this.readConfiguration();
	}
	readConfiguration() {
		this._sessionStore.clear(), this._editor.getOption(116).enabled && (this._sessionStore.add(this._editor.onDidChangeModel(() => {
			this._model = null, this.updateStickyModelProvider(), this._onDidChangeStickyScroll.fire(), this.update();
		})), this._sessionStore.add(this._editor.onDidChangeHiddenAreas(() => this.update())), this._sessionStore.add(this._editor.onDidChangeModelContent(() => this._updateSoon.schedule())), this._sessionStore.add(this._languageFeaturesService.documentSymbolProvider.onDidChange(() => this.update())), this._sessionStore.add(Gt(() => {
			this._stickyModelProvider?.dispose(), this._stickyModelProvider = null;
		})), this.updateStickyModelProvider(), this.update());
	}
	getVersionId() {
		return this._model?.version;
	}
	updateStickyModelProvider() {
		this._stickyModelProvider?.dispose(), this._stickyModelProvider = null;
		let e = this._editor;
		e.hasModel() && (this._stickyModelProvider = new iU(e, () => this._updateSoon.schedule(), this._languageConfigurationService, this._languageFeaturesService));
	}
	async update() {
		this._cts?.dispose(!0), this._cts = new Cn(), await this.updateStickyModel(this._cts.token), this._onDidChangeStickyScroll.fire();
	}
	async updateStickyModel(e) {
		if (!this._editor.hasModel() || !this._stickyModelProvider || this._editor.getModel().isTooLargeForTokenization()) {
			this._model = null;
			return;
		}
		let t = await this._stickyModelProvider.update(e);
		e.isCancellationRequested || (this._model = t);
	}
	updateIndex(e) {
		return e === -1 ? e = 0 : e < 0 && (e = -e - 2), e;
	}
	getCandidateStickyLinesIntersectingFromStickyModel(e, t, n, r, i) {
		if (t.children.length === 0) return;
		let a = i, o = [];
		for (let e = 0; e < t.children.length; e++) {
			let n = t.children[e];
			n.range && o.push(n.range.startLineNumber);
		}
		let s = this.updateIndex(vn(o, e.startLineNumber, (e, t) => e - t)), c = this.updateIndex(vn(o, e.startLineNumber + r, (e, t) => e - t));
		for (let o = s; o <= c; o++) {
			let s = t.children[o];
			if (!s) return;
			if (s.range) {
				let t = s.range.startLineNumber, i = s.range.endLineNumber;
				e.startLineNumber <= i + 1 && t - 1 <= e.endLineNumber && t !== a && (a = t, n.push(new fU(t, i - 1, r + 1)), this.getCandidateStickyLinesIntersectingFromStickyModel(e, s, n, r + 1, t));
			} else this.getCandidateStickyLinesIntersectingFromStickyModel(e, s, n, r, i);
		}
	}
	getCandidateStickyLinesIntersecting(e) {
		if (!this._model?.element) return [];
		let t = [];
		this.getCandidateStickyLinesIntersectingFromStickyModel(e, this._model.element, t, 0, -1);
		let n = this._editor._getViewModel()?.getHiddenAreas();
		if (n) for (let e of n) t = t.filter((t) => !(t.startLineNumber >= e.startLineNumber && t.endLineNumber <= e.endLineNumber + 1));
		return t;
	}
};
pU = uU([dU(1, M), dU(2, Tn)], pU);
// ../../../node_modules/.pnpm/monaco-editor@0.52.2/node_modules/monaco-editor/esm/vs/editor/contrib/stickyScroll/browser/stickyScrollController.js
var mU = function(e, t, n, r) {
	var i = arguments.length, a = i < 3 ? t : r === null ? r = Object.getOwnPropertyDescriptor(t, n) : r, o;
	if (typeof Reflect == "object" && typeof Reflect.decorate == "function") a = Reflect.decorate(e, t, n, r);
	else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (i < 3 ? o(a) : i > 3 ? o(t, n, a) : o(t, n)) || a);
	return i > 3 && a && Object.defineProperty(t, n, a), a;
}, hU = function(e, t) {
	return function(n, r) {
		t(n, r, e);
	};
}, gU, _U = class extends U {
	static {
		gU = this;
	}
	static {
		this.ID = "store.contrib.stickyScrollController";
	}
	constructor(e, t, n, r, i, a, o) {
		super(), this._editor = e, this._contextMenuService = t, this._languageFeaturesService = n, this._instaService = r, this._contextKeyService = o, this._sessionStore = new g(), this._maxStickyLines = 2 ** 53 - 1, this._candidateDefinitionsLength = -1, this._focusedStickyElementIndex = -1, this._enabled = !1, this._focused = !1, this._positionRevealed = !1, this._onMouseDown = !1, this._endLineNumbers = [], this._stickyScrollWidget = new JH(this._editor), this._stickyLineCandidateProvider = new pU(this._editor, n, i), this._register(this._stickyScrollWidget), this._register(this._stickyLineCandidateProvider), this._widgetState = HH.Empty, this._onDidResize(), this._readConfiguration();
		let s = this._stickyScrollWidget.getDomNode();
		this._register(this._editor.onDidChangeConfiguration((e) => {
			this._readConfigurationChange(e);
		})), this._register(_(s, on.CONTEXT_MENU, async (e) => {
			this._onContextMenu(Cs(s), e);
		})), this._stickyScrollFocusedContextKey = I.stickyScrollFocused.bindTo(this._contextKeyService), this._stickyScrollVisibleContextKey = I.stickyScrollVisible.bindTo(this._contextKeyService);
		let c = this._register(oo(s));
		this._register(c.onDidBlur((e) => {
			this._positionRevealed === !1 && s.clientHeight === 0 ? (this._focusedStickyElementIndex = -1, this.focus()) : this._disposeFocusStickyScrollStore();
		})), this._register(c.onDidFocus((e) => {
			this.focus();
		})), this._registerMouseListeners(), this._register(_(s, on.MOUSE_DOWN, (e) => {
			this._onMouseDown = !0;
		}));
	}
	static get(e) {
		return e.getContribution(gU.ID);
	}
	_disposeFocusStickyScrollStore() {
		this._stickyScrollFocusedContextKey.set(!1), this._focusDisposableStore?.dispose(), this._focused = !1, this._positionRevealed = !1, this._onMouseDown = !1;
	}
	focus() {
		this._onMouseDown ? (this._onMouseDown = !1, this._editor.focus()) : this._stickyScrollFocusedContextKey.get() !== !0 && (this._focused = !0, this._focusDisposableStore = new g(), this._stickyScrollFocusedContextKey.set(!0), this._focusedStickyElementIndex = this._stickyScrollWidget.lineNumbers.length - 1, this._stickyScrollWidget.focusLineWithIndex(this._focusedStickyElementIndex));
	}
	focusNext() {
		this._focusedStickyElementIndex < this._stickyScrollWidget.lineNumberCount - 1 && this._focusNav(!0);
	}
	focusPrevious() {
		this._focusedStickyElementIndex > 0 && this._focusNav(!1);
	}
	selectEditor() {
		this._editor.focus();
	}
	_focusNav(e) {
		this._focusedStickyElementIndex = e ? this._focusedStickyElementIndex + 1 : this._focusedStickyElementIndex - 1, this._stickyScrollWidget.focusLineWithIndex(this._focusedStickyElementIndex);
	}
	goToFocused() {
		let e = this._stickyScrollWidget.lineNumbers;
		this._disposeFocusStickyScrollStore(), this._revealPosition({
			lineNumber: e[this._focusedStickyElementIndex],
			column: 1
		});
	}
	_revealPosition(e) {
		this._reveaInEditor(e, () => this._editor.revealPosition(e));
	}
	_revealLineInCenterIfOutsideViewport(e) {
		this._reveaInEditor(e, () => this._editor.revealLineInCenterIfOutsideViewport(e.lineNumber, 0));
	}
	_reveaInEditor(e, t) {
		this._focused && this._disposeFocusStickyScrollStore(), this._positionRevealed = !0, t(), this._editor.setSelection(E.fromPositions(e)), this._editor.focus();
	}
	_registerMouseListeners() {
		let e = this._register(new g()), t = this._register(new lD(this._editor, { extractLineNumberFromMouseEvent: (e) => {
			let t = this._stickyScrollWidget.getEditorPositionFromNode(e.target.element);
			return t ? t.lineNumber : 0;
		} })), n = (e) => {
			if (!this._editor.hasModel() || e.target.type !== 12 || e.target.detail !== this._stickyScrollWidget.getId()) return null;
			let t = e.target.element;
			if (!t || t.innerText !== t.innerHTML) return null;
			let n = this._stickyScrollWidget.getEditorPositionFromNode(t);
			return n ? {
				range: new E(n.lineNumber, n.column, n.lineNumber, n.column + t.innerText.length),
				textElement: t
			} : null;
		}, r = this._stickyScrollWidget.getDomNode();
		this._register(_t(r, on.CLICK, (e) => {
			if (e.ctrlKey || e.altKey || e.metaKey || !e.leftButton) return;
			if (e.shiftKey) {
				let t = this._stickyScrollWidget.getLineIndexFromChildDomNode(e.target);
				if (t === null) return;
				let n = new b(this._endLineNumbers[t], 1);
				this._revealLineInCenterIfOutsideViewport(n);
				return;
			}
			if (this._stickyScrollWidget.isInFoldingIconDomNode(e.target)) {
				let t = this._stickyScrollWidget.getLineNumberFromChildDomNode(e.target);
				this._toggleFoldingRegionForLine(t);
				return;
			}
			if (!this._stickyScrollWidget.isInStickyLine(e.target)) return;
			let t = this._stickyScrollWidget.getEditorPositionFromNode(e.target);
			if (!t) {
				let n = this._stickyScrollWidget.getLineNumberFromChildDomNode(e.target);
				if (n === null) return;
				t = new b(n, 1);
			}
			this._revealPosition(t);
		})), this._register(_t(r, on.MOUSE_MOVE, (e) => {
			if (e.shiftKey) {
				let t = this._stickyScrollWidget.getLineIndexFromChildDomNode(e.target);
				if (t === null || this._showEndForLine !== null && this._showEndForLine === t) return;
				this._showEndForLine = t, this._renderStickyScroll();
			} else this._showEndForLine !== void 0 && (this._showEndForLine = void 0, this._renderStickyScroll());
		})), this._register(_(r, on.MOUSE_LEAVE, (e) => {
			this._showEndForLine !== void 0 && (this._showEndForLine = void 0, this._renderStickyScroll());
		})), this._register(t.onMouseMoveOrRelevantKeyDown(([t, r]) => {
			let i = n(t);
			if (!i || !t.hasTriggerModifier || !this._editor.hasModel()) {
				e.clear();
				return;
			}
			let { range: a, textElement: o } = i;
			if (!a.equalsRange(this._stickyRangeProjectedOnEditor)) this._stickyRangeProjectedOnEditor = a, e.clear();
			else if (o.style.textDecoration === "underline") return;
			let s = new Cn();
			e.add(Gt(() => s.dispose(!0)));
			let c;
			bO(this._languageFeaturesService.definitionProvider, this._editor.getModel(), new b(a.startLineNumber, a.startColumn + 1), !1, s.token).then(((t) => {
				if (!s.token.isCancellationRequested) {
					if (t.length !== 0) {
						this._candidateDefinitionsLength = t.length;
						let n = o;
						c === n ? c || (c = n, c.style.textDecoration = "underline", e.add(Gt(() => {
							c.style.textDecoration = "none";
						}))) : (e.clear(), c = n, c.style.textDecoration = "underline", e.add(Gt(() => {
							c.style.textDecoration = "none";
						})));
					} else e.clear();
				}
			}));
		})), this._register(t.onCancel(() => {
			e.clear();
		})), this._register(t.onExecute(async (e) => {
			if (e.target.type !== 12 || e.target.detail !== this._stickyScrollWidget.getId()) return;
			let t = this._stickyScrollWidget.getEditorPositionFromNode(e.target.element);
			t && this._editor.hasModel() && this._stickyRangeProjectedOnEditor && (this._candidateDefinitionsLength > 1 && (this._focused && this._disposeFocusStickyScrollStore(), this._revealPosition({
				lineNumber: t.lineNumber,
				column: 1
			})), this._instaService.invokeFunction(FO, e, this._editor, {
				uri: this._editor.getModel().uri,
				range: this._stickyRangeProjectedOnEditor
			}));
		}));
	}
	_onContextMenu(e, t) {
		let n = new dn(e, t);
		this._contextMenuService.showContextMenu({
			menuId: F.StickyScrollContext,
			getAnchor: () => n
		});
	}
	_toggleFoldingRegionForLine(e) {
		if (!this._foldingModel || e === null) return;
		let t = this._stickyScrollWidget.getRenderedStickyLine(e), n = t?.foldingIcon;
		if (!n) return;
		Bj(this._foldingModel, Number.MAX_VALUE, [e]), n.isCollapsed = !n.isCollapsed;
		let r = (n.isCollapsed ? this._editor.getTopForLineNumber(n.foldingEndLine) : this._editor.getTopForLineNumber(n.foldingStartLine)) - this._editor.getOption(67) * t.index + 1;
		this._editor.setScrollTop(r), this._renderStickyScroll(e);
	}
	_readConfiguration() {
		let e = this._editor.getOption(116);
		e.enabled === !1 ? (this._editor.removeOverlayWidget(this._stickyScrollWidget), this._sessionStore.clear(), this._enabled = !1) : (e.enabled && !this._enabled && (this._editor.addOverlayWidget(this._stickyScrollWidget), this._sessionStore.add(this._editor.onDidScrollChange((e) => {
			e.scrollTopChanged && (this._showEndForLine = void 0, this._renderStickyScroll());
		})), this._sessionStore.add(this._editor.onDidLayoutChange(() => this._onDidResize())), this._sessionStore.add(this._editor.onDidChangeModelTokens((e) => this._onTokensChange(e))), this._sessionStore.add(this._stickyLineCandidateProvider.onDidChangeStickyScroll(() => {
			this._showEndForLine = void 0, this._renderStickyScroll();
		})), this._enabled = !0), this._editor.getOption(68).renderType === 2 && this._sessionStore.add(this._editor.onDidChangeCursorPosition(() => {
			this._showEndForLine = void 0, this._renderStickyScroll(0);
		})));
	}
	_readConfigurationChange(e) {
		(e.hasChanged(116) || e.hasChanged(73) || e.hasChanged(67) || e.hasChanged(111) || e.hasChanged(68)) && this._readConfiguration(), e.hasChanged(68) && this._renderStickyScroll(0);
	}
	_needsUpdate(e) {
		let t = this._stickyScrollWidget.getCurrentLines();
		for (let n of t) for (let t of e.ranges) if (n >= t.fromLineNumber && n <= t.toLineNumber) return !0;
		return !1;
	}
	_onTokensChange(e) {
		this._needsUpdate(e) && this._renderStickyScroll(0);
	}
	_onDidResize() {
		let e = this._editor.getLayoutInfo().height / this._editor.getOption(67);
		this._maxStickyLines = Math.round(e * .25);
	}
	async _renderStickyScroll(e) {
		let t = this._editor.getModel();
		if (!t || t.isTooLargeForTokenization()) {
			this._resetState();
			return;
		}
		let n = this._updateAndGetMinRebuildFromLine(e), r = this._stickyLineCandidateProvider.getVersionId();
		if (r === void 0 || r === t.getVersionId()) {
			if (!this._focused) await this._updateState(n);
			else if (this._focusedStickyElementIndex === -1) await this._updateState(n), this._focusedStickyElementIndex = this._stickyScrollWidget.lineNumberCount - 1, this._focusedStickyElementIndex !== -1 && this._stickyScrollWidget.focusLineWithIndex(this._focusedStickyElementIndex);
			else {
				let e = this._stickyScrollWidget.lineNumbers[this._focusedStickyElementIndex];
				await this._updateState(n), this._stickyScrollWidget.lineNumberCount === 0 ? this._focusedStickyElementIndex = -1 : (this._stickyScrollWidget.lineNumbers.includes(e) || (this._focusedStickyElementIndex = this._stickyScrollWidget.lineNumberCount - 1), this._stickyScrollWidget.focusLineWithIndex(this._focusedStickyElementIndex));
			}
		}
	}
	_updateAndGetMinRebuildFromLine(e) {
		if (e !== void 0) {
			let t = this._minRebuildFromLine === void 0 ? Infinity : this._minRebuildFromLine;
			this._minRebuildFromLine = Math.min(e, t);
		}
		return this._minRebuildFromLine;
	}
	async _updateState(e) {
		this._minRebuildFromLine = void 0, this._foldingModel = await TM.get(this._editor)?.getFoldingModel() ?? void 0, this._widgetState = this.findScrollWidgetState();
		let t = this._widgetState.startLineNumbers.length > 0;
		this._stickyScrollVisibleContextKey.set(t), this._stickyScrollWidget.setState(this._widgetState, this._foldingModel, e);
	}
	async _resetState() {
		this._minRebuildFromLine = void 0, this._foldingModel = void 0, this._widgetState = HH.Empty, this._stickyScrollVisibleContextKey.set(!1), this._stickyScrollWidget.setState(void 0, void 0);
	}
	findScrollWidgetState() {
		let e = this._editor.getOption(67), t = Math.min(this._maxStickyLines, this._editor.getOption(116).maxLineCount), n = this._editor.getScrollTop(), r = 0, i = [], a = [], o = this._editor.getVisibleRanges();
		if (o.length !== 0) {
			let s = new ZH(o[0].startLineNumber, o[o.length - 1].endLineNumber), c = this._stickyLineCandidateProvider.getCandidateStickyLinesIntersecting(s);
			for (let o of c) {
				let s = o.startLineNumber, c = o.endLineNumber, l = o.nestingDepth;
				if (c - s > 0) {
					let o = (l - 1) * e, u = l * e, d = this._editor.getBottomForLineNumber(s) - n, f = this._editor.getTopForLineNumber(c) - n, p = this._editor.getBottomForLineNumber(c) - n;
					if (o > f && o <= p) {
						i.push(s), a.push(c + 1), r = p - u;
						break;
					}
					if (u > d && u <= p && (i.push(s), a.push(c + 1)), i.length === t) break;
				}
			}
		}
		return this._endLineNumbers = a, new HH(i, a, r, this._showEndForLine);
	}
	dispose() {
		super.dispose(), this._sessionStore.dispose();
	}
};
_U = gU = mU([
	hU(1, Br),
	hU(2, M),
	hU(3, P),
	hU(4, Tn),
	hU(5, hi),
	hU(6, j)
], _U);
// ../../../node_modules/.pnpm/monaco-editor@0.52.2/node_modules/monaco-editor/esm/vs/editor/contrib/stickyScroll/browser/stickyScrollActions.js
var vU = class extends Mo {
	constructor() {
		super({
			id: "editor.action.toggleStickyScroll",
			title: {
				...H("toggleEditorStickyScroll", "Toggle Editor Sticky Scroll"),
				mnemonicTitle: B({
					key: "mitoggleStickyScroll",
					comment: ["&& denotes a mnemonic"]
				}, "&&Toggle Editor Sticky Scroll")
			},
			metadata: { description: H("toggleEditorStickyScroll.description", "Toggle/enable the editor sticky scroll which shows the nested scopes at the top of the viewport") },
			category: VH.View,
			toggled: {
				condition: N.equals("config.editor.stickyScroll.enabled", !0),
				title: B("stickyScroll", "Sticky Scroll"),
				mnemonicTitle: B({
					key: "miStickyScroll",
					comment: ["&& denotes a mnemonic"]
				}, "&&Sticky Scroll")
			},
			menu: [
				{ id: F.CommandPalette },
				{
					id: F.MenubarAppearanceMenu,
					group: "4_editor",
					order: 3
				},
				{ id: F.StickyScrollContext }
			]
		});
	}
	async run(e) {
		let t = e.get(Fl), n = !t.getValue("editor.stickyScroll.enabled");
		return t.updateValue("editor.stickyScroll.enabled", n);
	}
}, yU = 100, bU = class extends ot {
	constructor() {
		super({
			id: "editor.action.focusStickyScroll",
			title: {
				...H("focusStickyScroll", "Focus on the editor sticky scroll"),
				mnemonicTitle: B({
					key: "mifocusStickyScroll",
					comment: ["&& denotes a mnemonic"]
				}, "&&Focus Sticky Scroll")
			},
			precondition: N.and(N.has("config.editor.stickyScroll.enabled"), I.stickyScrollVisible),
			menu: [{ id: F.CommandPalette }]
		});
	}
	runEditorCommand(e, t) {
		_U.get(t)?.focus();
	}
}, xU = class extends ot {
	constructor() {
		super({
			id: "editor.action.selectNextStickyScrollLine",
			title: H("selectNextStickyScrollLine.title", "Select the next editor sticky scroll line"),
			precondition: I.stickyScrollFocused.isEqualTo(!0),
			keybinding: {
				weight: yU,
				primary: 18
			}
		});
	}
	runEditorCommand(e, t) {
		_U.get(t)?.focusNext();
	}
}, SU = class extends ot {
	constructor() {
		super({
			id: "editor.action.selectPreviousStickyScrollLine",
			title: H("selectPreviousStickyScrollLine.title", "Select the previous sticky scroll line"),
			precondition: I.stickyScrollFocused.isEqualTo(!0),
			keybinding: {
				weight: yU,
				primary: 16
			}
		});
	}
	runEditorCommand(e, t) {
		_U.get(t)?.focusPrevious();
	}
}, CU = class extends ot {
	constructor() {
		super({
			id: "editor.action.goToFocusedStickyScrollLine",
			title: H("goToFocusedStickyScrollLine.title", "Go to the focused sticky scroll line"),
			precondition: I.stickyScrollFocused.isEqualTo(!0),
			keybinding: {
				weight: yU,
				primary: 3
			}
		});
	}
	runEditorCommand(e, t) {
		_U.get(t)?.goToFocused();
	}
}, wU = class extends ot {
	constructor() {
		super({
			id: "editor.action.selectEditor",
			title: H("selectEditor.title", "Select Editor"),
			precondition: I.stickyScrollFocused.isEqualTo(!0),
			keybinding: {
				weight: yU,
				primary: 9
			}
		});
	}
	runEditorCommand(e, t) {
		_U.get(t)?.selectEditor();
	}
};
T(_U.ID, _U, 1), Fa(vU), Fa(bU), Fa(SU), Fa(xU), Fa(CU), Fa(wU);
// ../../../node_modules/.pnpm/monaco-editor@0.52.2/node_modules/monaco-editor/esm/vs/editor/contrib/suggest/browser/suggestInlineCompletions.js
var TU = function(e, t, n, r) {
	var i = arguments.length, a = i < 3 ? t : r === null ? r = Object.getOwnPropertyDescriptor(t, n) : r, o;
	if (typeof Reflect == "object" && typeof Reflect.decorate == "function") a = Reflect.decorate(e, t, n, r);
	else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (i < 3 ? o(a) : i > 3 ? o(t, n, a) : o(t, n)) || a);
	return i > 3 && a && Object.defineProperty(t, n, a), a;
}, EU = function(e, t) {
	return function(n, r) {
		t(n, r, e);
	};
}, DU = class {
	constructor(e, t, n, r, i, a) {
		this.range = e, this.insertText = t, this.filterText = n, this.additionalTextEdits = r, this.command = i, this.completion = a;
	}
}, OU = class extends pt {
	constructor(e, t, n, r, i, a) {
		super(i.disposable), this.model = e, this.line = t, this.word = n, this.completionModel = r, this._suggestMemoryService = a;
	}
	canBeReused(e, t, n) {
		return this.model === e && this.line === t && this.word.word.length > 0 && this.word.startColumn === n.startColumn && this.word.endColumn < n.endColumn && this.completionModel.getIncompleteProvider().size === 0;
	}
	get items() {
		let e = [], { items: t } = this.completionModel, n = this._suggestMemoryService.select(this.model, {
			lineNumber: this.line,
			column: this.word.endColumn + this.completionModel.lineContext.characterCountDelta
		}, t), r = Da.slice(t, n), i = Da.slice(t, 0, n), a = 5;
		for (let t of Da.concat(r, i)) {
			if (t.score === so.Default) continue;
			let n = new E(t.editStart.lineNumber, t.editStart.column, t.editInsertEnd.lineNumber, t.editInsertEnd.column + this.completionModel.lineContext.characterCountDelta), r = t.completion.insertTextRules && t.completion.insertTextRules & 4 ? { snippet: t.completion.insertText } : t.completion.insertText;
			e.push(new DU(n, r, t.filterTextLow ?? t.labelLow, t.completion.additionalTextEdits, t.completion.command, t)), a-- >= 0 && t.resolve(C.None);
		}
		return e;
	}
};
OU = TU([EU(5, $P)], OU);
var kU = class extends U {
	constructor(e, t, n, r) {
		super(), this._languageFeatureService = e, this._clipboardService = t, this._suggestMemoryService = n, this._editorService = r, this._store.add(e.inlineCompletionsProvider.register("*", this));
	}
	async provideInlineCompletions(e, t, n, r) {
		if (n.selectedSuggestionInfo) return;
		let i;
		for (let t of this._editorService.listCodeEditors()) if (t.getModel() === e) {
			i = t;
			break;
		}
		if (!i) return;
		let a = i.getOption(90);
		if (mP.isAllOff(a)) return;
		e.tokenization.tokenizeIfCheap(t.lineNumber);
		let o = e.tokenization.getLineTokens(t.lineNumber), s = o.getStandardTokenType(o.findTokenIndexAtOffset(Math.max(t.column - 1 - 1, 0)));
		if (mP.valueFor(a, s) !== "inline") return;
		let c = e.getWordAtPosition(t), l;
		if (c?.word || (l = this._getTriggerCharacterInfo(e, t)), !c?.word && !l || (c ||= e.getWordUntilPosition(t), c.endColumn !== t.column)) return;
		let u, d = e.getValueInRange(new E(t.lineNumber, 1, t.lineNumber, t.column));
		if (!l && this._lastResult?.canBeReused(e, t.lineNumber, c)) {
			let e = new dF(d, t.column - this._lastResult.word.endColumn);
			this._lastResult.completionModel.lineContext = e, this._lastResult.acquire(), u = this._lastResult;
		} else {
			let n = await sP(this._languageFeatureService.completionProvider, e, t, new aP(void 0, yF.createSuggestFilter(i).itemKind, l?.providers), l && {
				triggerKind: 1,
				triggerCharacter: l.ch
			}, r), a;
			n.needsClipboard && (a = await this._clipboardService.readText());
			let o = new fF(n.items, t.column, new dF(d, 0), uF.None, i.getOption(119), i.getOption(113), {
				boostFullMatch: !1,
				firstMatchCanBeWeak: !1
			}, a);
			u = new OU(e, t.lineNumber, c, o, n, this._suggestMemoryService);
		}
		return this._lastResult = u, u;
	}
	handleItemDidShow(e, t) {
		t.completion.resolve(C.None);
	}
	freeInlineCompletions(e) {
		e.release();
	}
	_getTriggerCharacterInfo(e, t) {
		let n = e.getValueInRange(E.fromPositions({
			lineNumber: t.lineNumber,
			column: t.column - 1
		}, t)), r = /* @__PURE__ */ new Set();
		for (let t of this._languageFeatureService.completionProvider.all(e)) t.triggerCharacters?.includes(n) && r.add(t);
		if (r.size !== 0) return {
			providers: r,
			ch: n
		};
	}
};
kU = TU([
	EU(0, M),
	EU(1, $o),
	EU(2, $P),
	EU(3, Ln)
], kU), He(kU), k(class extends O {
	constructor() {
		super({
			id: "editor.action.forceRetokenize",
			label: B("forceRetokenize", "Developer: Force Retokenize"),
			alias: "Developer: Force Retokenize",
			precondition: void 0
		});
	}
	run(e, t) {
		if (!t.hasModel()) return;
		let n = t.getModel();
		n.tokenization.resetTokenization();
		let r = new lr();
		n.tokenization.forceTokenization(n.getLineCount()), r.stop(), console.log(`tokenization took ${r.elapsed()}`);
	}
});
// ../../../node_modules/.pnpm/monaco-editor@0.52.2/node_modules/monaco-editor/esm/vs/editor/contrib/toggleTabFocusMode/browser/toggleTabFocusMode.js
var AU = class e extends Mo {
	static {
		this.ID = "editor.action.toggleTabFocusMode";
	}
	constructor() {
		super({
			id: e.ID,
			title: H({
				key: "toggle.tabMovesFocus",
				comment: ["Turn on/off use of tab key for moving focus around VS Code"]
			}, "Toggle Tab Key Moves Focus"),
			precondition: void 0,
			keybinding: {
				primary: 2091,
				mac: { primary: 1323 },
				weight: 100
			},
			metadata: { description: H("tabMovesFocusDescriptions", "Determines whether the tab key moves focus around the workbench or inserts the tab character in the current editor. This is also called tab trapping, tab navigation, or tab focus mode.") },
			f1: !0
		});
	}
	run() {
		let e = !Tr.getTabFocusMode();
		Tr.setTabFocusMode(e), gt(e ? B("toggle.tabMovesFocus.on", "Pressing Tab will now move focus to the next focusable element") : B("toggle.tabMovesFocus.off", "Pressing Tab will now insert the tab character"));
	}
};
Fa(AU);
// ../../../node_modules/.pnpm/monaco-editor@0.52.2/node_modules/monaco-editor/esm/vs/platform/opener/browser/link.js
var jU = function(e, t, n, r) {
	var i = arguments.length, a = i < 3 ? t : r === null ? r = Object.getOwnPropertyDescriptor(t, n) : r, o;
	if (typeof Reflect == "object" && typeof Reflect.decorate == "function") a = Reflect.decorate(e, t, n, r);
	else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (i < 3 ? o(a) : i > 3 ? o(t, n, a) : o(t, n)) || a);
	return i > 3 && a && Object.defineProperty(t, n, a), a;
}, MU = function(e, t) {
	return function(n, r) {
		t(n, r, e);
	};
}, NU = class extends U {
	get enabled() {
		return this._enabled;
	}
	set enabled(e) {
		e ? (this.el.setAttribute("aria-disabled", "false"), this.el.tabIndex = 0, this.el.style.pointerEvents = "auto", this.el.style.opacity = "1", this.el.style.cursor = "pointer", this._enabled = !1) : (this.el.setAttribute("aria-disabled", "true"), this.el.tabIndex = -1, this.el.style.pointerEvents = "none", this.el.style.opacity = "0.4", this.el.style.cursor = "default", this._enabled = !0), this._enabled = e;
	}
	constructor(e, t, n = {}, r, i) {
		super(), this._link = t, this._hoverService = r, this._enabled = !0, this.el = D(e, w("a.monaco-link", {
			tabIndex: t.tabIndex ?? 0,
			href: t.href
		}, t.label)), this.hoverDelegate = n.hoverDelegate ?? at("mouse"), this.setTooltip(t.title), this.el.setAttribute("role", "button");
		let a = this._register(new Jo(this.el, "click")), o = this._register(new Jo(this.el, "keypress")), s = wt.chain(o.event, (e) => e.map((e) => new xn(e)).filter((e) => e.keyCode === 3)), c = this._register(new Jo(this.el, Nl.Tap)).event;
		this._register(ce.addTarget(this.el));
		let l = wt.any(a.event, s, c);
		this._register(l((e) => {
			this.enabled && (Ot.stop(e, !0), n?.opener ? n.opener(this._link.href) : i.open(this._link.href, { allowCommands: !0 }));
		})), this.enabled = !0;
	}
	setTooltip(e) {
		this.hoverDelegate.showNativeHover ? this.el.title = e ?? "" : !this.hover && e ? this.hover = this._register(this._hoverService.setupManagedHover(this.hoverDelegate, this.el, e)) : this.hover && this.hover.update(e);
	}
};
NU = jU([MU(3, rt), MU(4, p)], NU);
// ../../../node_modules/.pnpm/monaco-editor@0.52.2/node_modules/monaco-editor/esm/vs/editor/contrib/unicodeHighlighter/browser/bannerController.js
var PU = function(e, t, n, r) {
	var i = arguments.length, a = i < 3 ? t : r === null ? r = Object.getOwnPropertyDescriptor(t, n) : r, o;
	if (typeof Reflect == "object" && typeof Reflect.decorate == "function") a = Reflect.decorate(e, t, n, r);
	else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (i < 3 ? o(a) : i > 3 ? o(t, n, a) : o(t, n)) || a);
	return i > 3 && a && Object.defineProperty(t, n, a), a;
}, FU = function(e, t) {
	return function(n, r) {
		t(n, r, e);
	};
}, IU = 26, LU = class extends U {
	constructor(e, t) {
		super(), this._editor = e, this.instantiationService = t, this.banner = this._register(this.instantiationService.createInstance(RU));
	}
	hide() {
		this._editor.setBanner(null, 0), this.banner.clear();
	}
	show(e) {
		this.banner.show({
			...e,
			onClose: () => {
				this.hide(), e.onClose?.();
			}
		}), this._editor.setBanner(this.banner.element, IU);
	}
};
LU = PU([FU(1, P)], LU);
var RU = class extends U {
	constructor(e) {
		super(), this.instantiationService = e, this.markdownRenderer = this.instantiationService.createInstance(Jt, {}), this.element = w("div.editor-banner"), this.element.tabIndex = 0;
	}
	getAriaLabel(e) {
		if (e.ariaLabel) return e.ariaLabel;
		if (typeof e.message == "string") return e.message;
	}
	getBannerMessage(e) {
		if (typeof e == "string") {
			let t = w("span");
			return t.innerText = e, t;
		}
		return this.markdownRenderer.render(e).element;
	}
	clear() {
		di(this.element);
	}
	show(e) {
		di(this.element);
		let t = this.getAriaLabel(e);
		t && this.element.setAttribute("aria-label", t);
		let n = D(this.element, w("div.icon-container"));
		n.setAttribute("aria-hidden", "true"), e.icon && n.appendChild(w(`div${_l.asCSSSelector(e.icon)}`));
		let r = D(this.element, w("div.message-container"));
		if (r.setAttribute("aria-hidden", "true"), r.appendChild(this.getBannerMessage(e.message)), this.messageActionsContainer = D(this.element, w("div.message-actions-container")), e.actions) for (let t of e.actions) this._register(this.instantiationService.createInstance(NU, this.messageActionsContainer, {
			...t,
			tabIndex: -1
		}, {}));
		let i = D(this.element, w("div.action-container"));
		this.actionBar = this._register(new Pn(i)), this.actionBar.push(this._register(new wr("banner.close", "Close Banner", _l.asClassName(Qe), !0, () => {
			typeof e.onClose == "function" && e.onClose();
		})), {
			icon: !0,
			label: !1
		}), this.actionBar.setFocusable(!1);
	}
};
RU = PU([FU(0, P)], RU);
// ../../../node_modules/.pnpm/monaco-editor@0.52.2/node_modules/monaco-editor/esm/vs/editor/contrib/unicodeHighlighter/browser/unicodeHighlighter.js
var zU = function(e, t, n, r) {
	var i = arguments.length, a = i < 3 ? t : r === null ? r = Object.getOwnPropertyDescriptor(t, n) : r, o;
	if (typeof Reflect == "object" && typeof Reflect.decorate == "function") a = Reflect.decorate(e, t, n, r);
	else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (i < 3 ? o(a) : i > 3 ? o(t, n, a) : o(t, n)) || a);
	return i > 3 && a && Object.defineProperty(t, n, a), a;
}, BU = function(e, t) {
	return function(n, r) {
		t(n, r, e);
	};
}, VU = Jn("extensions-warning-message", v.warning, B("warningIcon", "Icon shown with a warning message in the extensions editor.")), HU = class extends U {
	static {
		this.ID = "editor.contrib.unicodeHighlighter";
	}
	constructor(e, t, n, r) {
		super(), this._editor = e, this._editorWorkerService = t, this._workspaceTrustService = n, this._highlighter = null, this._bannerClosed = !1, this._updateState = (e) => {
			if (e && e.hasMore) {
				if (this._bannerClosed) return;
				let t = Math.max(e.ambiguousCharacterCount, e.nonBasicAsciiCharacterCount, e.invisibleCharacterCount), n;
				if (e.nonBasicAsciiCharacterCount >= t) n = {
					message: B("unicodeHighlighting.thisDocumentHasManyNonBasicAsciiUnicodeCharacters", "This document contains many non-basic ASCII unicode characters"),
					command: new rW()
				};
				else if (e.ambiguousCharacterCount >= t) n = {
					message: B("unicodeHighlighting.thisDocumentHasManyAmbiguousUnicodeCharacters", "This document contains many ambiguous unicode characters"),
					command: new tW()
				};
				else if (e.invisibleCharacterCount >= t) n = {
					message: B("unicodeHighlighting.thisDocumentHasManyInvisibleUnicodeCharacters", "This document contains many invisible unicode characters"),
					command: new nW()
				};
				else throw Error("Unreachable");
				this._bannerController.show({
					id: "unicodeHighlightBanner",
					message: n.message,
					icon: VU,
					actions: [{
						label: n.command.shortLabel,
						href: `command:${n.command.id}`
					}],
					onClose: () => {
						this._bannerClosed = !0;
					}
				});
			} else this._bannerController.hide();
		}, this._bannerController = this._register(r.createInstance(LU, e)), this._register(this._editor.onDidChangeModel(() => {
			this._bannerClosed = !1, this._updateHighlighter();
		})), this._options = e.getOption(126), this._register(n.onDidChangeTrust((e) => {
			this._updateHighlighter();
		})), this._register(e.onDidChangeConfiguration((t) => {
			t.hasChanged(126) && (this._options = e.getOption(126), this._updateHighlighter());
		})), this._updateHighlighter();
	}
	dispose() {
		this._highlighter &&= (this._highlighter.dispose(), null), super.dispose();
	}
	_updateHighlighter() {
		if (this._updateState(null), this._highlighter &&= (this._highlighter.dispose(), null), !this._editor.hasModel()) return;
		let e = UU(this._workspaceTrustService.isWorkspaceTrusted(), this._options);
		if ([
			e.nonBasicASCII,
			e.ambiguousCharacters,
			e.invisibleCharacters
		].every((e) => e === !1)) return;
		let t = {
			nonBasicASCII: e.nonBasicASCII,
			ambiguousCharacters: e.ambiguousCharacters,
			invisibleCharacters: e.invisibleCharacters,
			includeComments: e.includeComments,
			includeStrings: e.includeStrings,
			allowedCodePoints: Object.keys(e.allowedCharacters).map((e) => e.codePointAt(0)),
			allowedLocales: Object.keys(e.allowedLocales).map((e) => e === "_os" ? new Intl.NumberFormat().resolvedOptions().locale : e === "_vscode" ? Zi : e)
		};
		this._highlighter = this._editorWorkerService.canComputeUnicodeHighlights(this._editor.getModel().uri) ? new WU(this._editor, t, this._updateState, this._editorWorkerService) : new GU(this._editor, t, this._updateState);
	}
	getDecorationInfo(e) {
		return this._highlighter ? this._highlighter.getDecorationInfo(e) : null;
	}
};
HU = zU([
	BU(1, Oe),
	BU(2, ha),
	BU(3, P)
], HU);
function UU(e, t) {
	return {
		nonBasicASCII: t.nonBasicASCII === "inUntrustedWorkspace" ? !e : t.nonBasicASCII,
		ambiguousCharacters: t.ambiguousCharacters,
		invisibleCharacters: t.invisibleCharacters,
		includeComments: t.includeComments === "inUntrustedWorkspace" ? !e : t.includeComments,
		includeStrings: t.includeStrings === "inUntrustedWorkspace" ? !e : t.includeStrings,
		allowedCharacters: t.allowedCharacters,
		allowedLocales: t.allowedLocales
	};
}
var WU = class extends U {
	constructor(e, t, n, r) {
		super(), this._editor = e, this._options = t, this._updateState = n, this._editorWorkerService = r, this._model = this._editor.getModel(), this._decorations = this._editor.createDecorationsCollection(), this._updateSoon = this._register(new tl(() => this._update(), 250)), this._register(this._editor.onDidChangeModelContent(() => {
			this._updateSoon.schedule();
		})), this._updateSoon.schedule();
	}
	dispose() {
		this._decorations.clear(), super.dispose();
	}
	_update() {
		if (this._model.isDisposed()) return;
		if (!this._model.mightContainNonBasicASCII()) {
			this._decorations.clear();
			return;
		}
		let e = this._model.getVersionId();
		this._editorWorkerService.computedUnicodeHighlights(this._model.uri, this._options).then((t) => {
			if (this._model.isDisposed() || this._model.getVersionId() !== e) return;
			this._updateState(t);
			let n = [];
			if (!t.hasMore) for (let e of t.ranges) n.push({
				range: e,
				options: QU.instance.getDecorationFromOptions(this._options)
			});
			this._decorations.set(n);
		});
	}
	getDecorationInfo(e) {
		if (!this._decorations.has(e)) return null;
		let t = this._editor.getModel();
		return Xn(t, e) ? {
			reason: ZU(t.getValueInRange(e.range), this._options),
			inComment: mi(t, e),
			inString: Ni(t, e)
		} : null;
	}
};
WU = zU([BU(3, Oe)], WU);
var GU = class extends U {
	constructor(e, t, n) {
		super(), this._editor = e, this._options = t, this._updateState = n, this._model = this._editor.getModel(), this._decorations = this._editor.createDecorationsCollection(), this._updateSoon = this._register(new tl(() => this._update(), 250)), this._register(this._editor.onDidLayoutChange(() => {
			this._updateSoon.schedule();
		})), this._register(this._editor.onDidScrollChange(() => {
			this._updateSoon.schedule();
		})), this._register(this._editor.onDidChangeHiddenAreas(() => {
			this._updateSoon.schedule();
		})), this._register(this._editor.onDidChangeModelContent(() => {
			this._updateSoon.schedule();
		})), this._updateSoon.schedule();
	}
	dispose() {
		this._decorations.clear(), super.dispose();
	}
	_update() {
		if (this._model.isDisposed()) return;
		if (!this._model.mightContainNonBasicASCII()) {
			this._decorations.clear();
			return;
		}
		let e = this._editor.getVisibleRanges(), t = [], n = {
			ranges: [],
			ambiguousCharacterCount: 0,
			invisibleCharacterCount: 0,
			nonBasicAsciiCharacterCount: 0,
			hasMore: !1
		};
		for (let t of e) {
			let e = hl.computeUnicodeHighlights(this._model, this._options, t);
			for (let t of e.ranges) n.ranges.push(t);
			n.ambiguousCharacterCount += n.ambiguousCharacterCount, n.invisibleCharacterCount += n.invisibleCharacterCount, n.nonBasicAsciiCharacterCount += n.nonBasicAsciiCharacterCount, n.hasMore = n.hasMore || e.hasMore;
		}
		if (!n.hasMore) for (let e of n.ranges) t.push({
			range: e,
			options: QU.instance.getDecorationFromOptions(this._options)
		});
		this._updateState(n), this._decorations.set(t);
	}
	getDecorationInfo(e) {
		if (!this._decorations.has(e)) return null;
		let t = this._editor.getModel(), n = t.getValueInRange(e.range);
		return Xn(t, e) ? {
			reason: ZU(n, this._options),
			inComment: mi(t, e),
			inString: Ni(t, e)
		} : null;
	}
}, KU = B("unicodeHighlight.configureUnicodeHighlightOptions", "Configure Unicode Highlight Options"), qU = class {
	constructor(e, t, n) {
		this._editor = e, this._languageService = t, this._openerService = n, this.hoverOrdinal = 5;
	}
	computeSync(e, t) {
		if (!this._editor.hasModel() || e.type !== 1) return [];
		let n = this._editor.getModel(), r = this._editor.getContribution(HU.ID);
		if (!r) return [];
		let i = [], a = /* @__PURE__ */ new Set(), o = 300;
		for (let e of t) {
			let t = r.getDecorationInfo(e);
			if (!t) continue;
			let s = n.getValueInRange(e.range).codePointAt(0), c = YU(s), l;
			switch (t.reason.kind) {
				case 0:
					l = $s(t.reason.confusableWith) ? B("unicodeHighlight.characterIsAmbiguousASCII", "The character {0} could be confused with the ASCII character {1}, which is more common in source code.", c, YU(t.reason.confusableWith.codePointAt(0))) : B("unicodeHighlight.characterIsAmbiguous", "The character {0} could be confused with the character {1}, which is more common in source code.", c, YU(t.reason.confusableWith.codePointAt(0)));
					break;
				case 1:
					l = B("unicodeHighlight.characterIsInvisible", "The character {0} is invisible.", c);
					break;
				case 2: l = B("unicodeHighlight.characterIsNonBasicAscii", "The character {0} is not a basic ASCII character.", c);
			}
			if (a.has(l)) continue;
			a.add(l);
			let u = {
				codePoint: s,
				reason: t.reason,
				inComment: t.inComment,
				inString: t.inString
			}, d = B("unicodeHighlight.adjustSettings", "Adjust settings"), f = `command:${iW.ID}?${encodeURIComponent(JSON.stringify(u))}`, p = new ws("", !0).appendMarkdown(l).appendText(" ").appendLink(f, d, KU);
			i.push(new XE(this, e.range, [p], !1, o++));
		}
		return i;
	}
	renderHoverParts(e, t) {
		return tD(e, t, this._editor, this._languageService, this._openerService);
	}
};
qU = zU([BU(1, dr), BU(2, p)], qU);
function JU(e) {
	return `U+${e.toString(16).padStart(4, "0")}`;
}
function YU(e) {
	let t = `\`${JU(e)}\``;
	return St.isInvisibleCharacter(e) || (t += ` "${`${XU(e)}`}"`), t;
}
function XU(e) {
	return e === 96 ? "`` ` ``" : "`" + String.fromCodePoint(e) + "`";
}
function ZU(e, t) {
	return hl.computeUnicodeHighlightReason(e, t);
}
var QU = class e {
	constructor() {
		this.map = /* @__PURE__ */ new Map();
	}
	static {
		this.instance = new e();
	}
	getDecorationFromOptions(e) {
		return this.getDecoration(!e.includeComments, !e.includeStrings);
	}
	getDecoration(e, t) {
		let n = `${e}${t}`, r = this.map.get(n);
		return r || (r = L.createDynamic({
			description: "unicode-highlight",
			stickiness: 1,
			className: "unicode-highlight",
			showIfCollapsed: !0,
			overviewRuler: null,
			minimap: null,
			hideInCommentTokens: e,
			hideInStringTokens: t
		}), this.map.set(n, r)), r;
	}
}, $U = class extends O {
	constructor() {
		super({
			id: tW.ID,
			label: B("action.unicodeHighlight.disableHighlightingInComments", "Disable highlighting of characters in comments"),
			alias: "Disable highlighting of characters in comments",
			precondition: void 0
		}), this.shortLabel = B("unicodeHighlight.disableHighlightingInComments.shortLabel", "Disable Highlight In Comments");
	}
	async run(e, t, n) {
		let r = e?.get(Fl);
		r && this.runAction(r);
	}
	async runAction(e) {
		await e.updateValue(sa.includeComments, !1, 2);
	}
}, eW = class extends O {
	constructor() {
		super({
			id: tW.ID,
			label: B("action.unicodeHighlight.disableHighlightingInStrings", "Disable highlighting of characters in strings"),
			alias: "Disable highlighting of characters in strings",
			precondition: void 0
		}), this.shortLabel = B("unicodeHighlight.disableHighlightingInStrings.shortLabel", "Disable Highlight In Strings");
	}
	async run(e, t, n) {
		let r = e?.get(Fl);
		r && this.runAction(r);
	}
	async runAction(e) {
		await e.updateValue(sa.includeStrings, !1, 2);
	}
}, tW = class e extends O {
	static {
		this.ID = "editor.action.unicodeHighlight.disableHighlightingOfAmbiguousCharacters";
	}
	constructor() {
		super({
			id: e.ID,
			label: B("action.unicodeHighlight.disableHighlightingOfAmbiguousCharacters", "Disable highlighting of ambiguous characters"),
			alias: "Disable highlighting of ambiguous characters",
			precondition: void 0
		}), this.shortLabel = B("unicodeHighlight.disableHighlightingOfAmbiguousCharacters.shortLabel", "Disable Ambiguous Highlight");
	}
	async run(e, t, n) {
		let r = e?.get(Fl);
		r && this.runAction(r);
	}
	async runAction(e) {
		await e.updateValue(sa.ambiguousCharacters, !1, 2);
	}
}, nW = class e extends O {
	static {
		this.ID = "editor.action.unicodeHighlight.disableHighlightingOfInvisibleCharacters";
	}
	constructor() {
		super({
			id: e.ID,
			label: B("action.unicodeHighlight.disableHighlightingOfInvisibleCharacters", "Disable highlighting of invisible characters"),
			alias: "Disable highlighting of invisible characters",
			precondition: void 0
		}), this.shortLabel = B("unicodeHighlight.disableHighlightingOfInvisibleCharacters.shortLabel", "Disable Invisible Highlight");
	}
	async run(e, t, n) {
		let r = e?.get(Fl);
		r && this.runAction(r);
	}
	async runAction(e) {
		await e.updateValue(sa.invisibleCharacters, !1, 2);
	}
}, rW = class e extends O {
	static {
		this.ID = "editor.action.unicodeHighlight.disableHighlightingOfNonBasicAsciiCharacters";
	}
	constructor() {
		super({
			id: e.ID,
			label: B("action.unicodeHighlight.disableHighlightingOfNonBasicAsciiCharacters", "Disable highlighting of non basic ASCII characters"),
			alias: "Disable highlighting of non basic ASCII characters",
			precondition: void 0
		}), this.shortLabel = B("unicodeHighlight.disableHighlightingOfNonBasicAsciiCharacters.shortLabel", "Disable Non ASCII Highlight");
	}
	async run(e, t, n) {
		let r = e?.get(Fl);
		r && this.runAction(r);
	}
	async runAction(e) {
		await e.updateValue(sa.nonBasicASCII, !1, 2);
	}
}, iW = class e extends O {
	static {
		this.ID = "editor.action.unicodeHighlight.showExcludeOptions";
	}
	constructor() {
		super({
			id: e.ID,
			label: B("action.unicodeHighlight.showExcludeOptions", "Show Exclude Options"),
			alias: "Show Exclude Options",
			precondition: void 0
		});
	}
	async run(e, t, n) {
		let { codePoint: r, reason: i, inString: a, inComment: o } = n, s = String.fromCodePoint(r), c = e.get(Is), l = e.get(Fl);
		function u(e) {
			return St.isInvisibleCharacter(e) ? B("unicodeHighlight.excludeInvisibleCharFromBeingHighlighted", "Exclude {0} (invisible character) from being highlighted", JU(e)) : B("unicodeHighlight.excludeCharFromBeingHighlighted", "Exclude {0} from being highlighted", `${JU(e)} "${s}"`);
		}
		let d = [];
		if (i.kind === 0) for (let e of i.notAmbiguousInLocales) d.push({
			label: B("unicodeHighlight.allowCommonCharactersInLanguage", "Allow unicode characters that are more common in the language \"{0}\".", e),
			run: async () => {
				oW(l, [e]);
			}
		});
		if (d.push({
			label: u(r),
			run: () => aW(l, [r])
		}), o) {
			let e = new $U();
			d.push({
				label: e.label,
				run: async () => e.runAction(l)
			});
		} else if (a) {
			let e = new eW();
			d.push({
				label: e.label,
				run: async () => e.runAction(l)
			});
		}
		if (i.kind === 0) {
			let e = new tW();
			d.push({
				label: e.label,
				run: async () => e.runAction(l)
			});
		} else if (i.kind === 1) {
			let e = new nW();
			d.push({
				label: e.label,
				run: async () => e.runAction(l)
			});
		} else if (i.kind === 2) {
			let e = new rW();
			d.push({
				label: e.label,
				run: async () => e.runAction(l)
			});
		} else sW(i);
		let f = await c.pick(d, { title: KU });
		f && await f.run();
	}
};
async function aW(e, t) {
	let n = e.getValue(sa.allowedCharacters), r;
	r = typeof n == "object" && n ? n : {};
	for (let e of t) r[String.fromCodePoint(e)] = !0;
	await e.updateValue(sa.allowedCharacters, r, 2);
}
async function oW(e, t) {
	let n = e.inspect(sa.allowedLocales).user?.value, r;
	r = typeof n == "object" && n ? Object.assign({}, n) : {};
	for (let e of t) r[e] = !0;
	await e.updateValue(sa.allowedLocales, r, 2);
}
function sW(e) {
	throw Error(`Unexpected value: ${e}`);
}
k(tW), k(nW), k(rW), k(iW), T(HU.ID, HU, 1), FT.register(qU);
// ../../../node_modules/.pnpm/monaco-editor@0.52.2/node_modules/monaco-editor/esm/vs/editor/contrib/unusualLineTerminators/browser/unusualLineTerminators.js
var cW = function(e, t, n, r) {
	var i = arguments.length, a = i < 3 ? t : r === null ? r = Object.getOwnPropertyDescriptor(t, n) : r, o;
	if (typeof Reflect == "object" && typeof Reflect.decorate == "function") a = Reflect.decorate(e, t, n, r);
	else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (i < 3 ? o(a) : i > 3 ? o(t, n, a) : o(t, n)) || a);
	return i > 3 && a && Object.defineProperty(t, n, a), a;
}, lW = function(e, t) {
	return function(n, r) {
		t(n, r, e);
	};
}, uW = "ignoreUnusualLineTerminators";
function dW(e, t, n) {
	e.setModelProperty(t.uri, uW, n);
}
function fW(e, t) {
	return e.getModelProperty(t.uri, uW);
}
var pW = class extends U {
	static {
		this.ID = "editor.contrib.unusualLineTerminatorsDetector";
	}
	constructor(e, t, n) {
		super(), this._editor = e, this._dialogService = t, this._codeEditorService = n, this._isPresentingDialog = !1, this._config = this._editor.getOption(127), this._register(this._editor.onDidChangeConfiguration((e) => {
			e.hasChanged(127) && (this._config = this._editor.getOption(127), this._checkForUnusualLineTerminators());
		})), this._register(this._editor.onDidChangeModel(() => {
			this._checkForUnusualLineTerminators();
		})), this._register(this._editor.onDidChangeModelContent((e) => {
			e.isUndoing || this._checkForUnusualLineTerminators();
		})), this._checkForUnusualLineTerminators();
	}
	async _checkForUnusualLineTerminators() {
		if (this._config === "off" || !this._editor.hasModel()) return;
		let e = this._editor.getModel();
		if (!e.mightContainUnusualLineTerminators() || fW(this._codeEditorService, e) === !0 || this._editor.getOption(92)) return;
		if (this._config === "auto") {
			e.removeUnusualLineTerminators(this._editor.getSelections());
			return;
		}
		if (this._isPresentingDialog) return;
		let t;
		try {
			this._isPresentingDialog = !0, t = await this._dialogService.confirm({
				title: B("unusualLineTerminators.title", "Unusual Line Terminators"),
				message: B("unusualLineTerminators.message", "Detected unusual line terminators"),
				detail: B("unusualLineTerminators.detail", "The file '{0}' contains one or more unusual line terminator characters, like Line Separator (LS) or Paragraph Separator (PS).\n\nIt is recommended to remove them from the file. This can be configured via `editor.unusualLineTerminators`.", Ps(e.uri)),
				primaryButton: B({
					key: "unusualLineTerminators.fix",
					comment: ["&& denotes a mnemonic"]
				}, "&&Remove Unusual Line Terminators"),
				cancelButton: B("unusualLineTerminators.ignore", "Ignore")
			});
		} finally {
			this._isPresentingDialog = !1;
		}
		t.confirmed ? e.removeUnusualLineTerminators(this._editor.getSelections()) : dW(this._codeEditorService, e, !0);
	}
};
pW = cW([lW(1, Mc), lW(2, Ln)], pW), T(pW.ID, pW, 1);
// ../../../node_modules/.pnpm/monaco-editor@0.52.2/node_modules/monaco-editor/esm/vs/editor/contrib/wordHighlighter/browser/textualHighlightProvider.js
var mW = function(e, t, n, r) {
	var i = arguments.length, a = i < 3 ? t : r === null ? r = Object.getOwnPropertyDescriptor(t, n) : r, o;
	if (typeof Reflect == "object" && typeof Reflect.decorate == "function") a = Reflect.decorate(e, t, n, r);
	else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (i < 3 ? o(a) : i > 3 ? o(t, n, a) : o(t, n)) || a);
	return i > 3 && a && Object.defineProperty(t, n, a), a;
}, hW = function(e, t) {
	return function(n, r) {
		t(n, r, e);
	};
}, gW = class {
	constructor() {
		this.selector = { language: "*" };
	}
	provideDocumentHighlights(e, t, n) {
		let r = [], i = e.getWordAtPosition({
			lineNumber: t.lineNumber,
			column: t.column
		});
		if (!i) return Promise.resolve(r);
		if (!e.isDisposed()) return e.findMatches(i.word, !0, !1, !0, Bs, !1).map((e) => ({
			range: e.range,
			kind: Sa.Text
		}));
	}
	provideMultiDocumentHighlights(e, t, n, r) {
		let i = new Zo(), a = e.getWordAtPosition({
			lineNumber: t.lineNumber,
			column: t.column
		});
		if (!a) return Promise.resolve(i);
		for (let t of [e, ...n]) {
			if (t.isDisposed()) continue;
			let e = t.findMatches(a.word, !0, !1, !0, Bs, !1).map((e) => ({
				range: e.range,
				kind: Sa.Text
			}));
			e && i.set(t.uri, e);
		}
		return i;
	}
}, _W = class extends U {
	constructor(e) {
		super(), this._register(e.documentHighlightProvider.register("*", new gW())), this._register(e.multiDocumentHighlightProvider.register("*", new gW()));
	}
};
_W = mW([hW(0, M)], _W);
// ../../../node_modules/.pnpm/monaco-editor@0.52.2/node_modules/monaco-editor/esm/vs/editor/contrib/wordHighlighter/browser/wordHighlighter.js
var vW = function(e, t, n, r) {
	var i = arguments.length, a = i < 3 ? t : r === null ? r = Object.getOwnPropertyDescriptor(t, n) : r, o;
	if (typeof Reflect == "object" && typeof Reflect.decorate == "function") a = Reflect.decorate(e, t, n, r);
	else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (i < 3 ? o(a) : i > 3 ? o(t, n, a) : o(t, n)) || a);
	return i > 3 && a && Object.defineProperty(t, n, a), a;
}, yW = function(e, t) {
	return function(n, r) {
		t(n, r, e);
	};
}, bW, xW, SW = new z("hasWordHighlights", !1);
function CW(e, t, n, r) {
	let a = e.ordered(t);
	return qo(a.map((e) => () => Promise.resolve(e.provideDocumentHighlights(t, n, r)).then(void 0, i)), (e) => e != null).then((e) => {
		if (e) {
			let n = new Zo();
			return n.set(t.uri, e), n;
		}
		return new Zo();
	});
}
function wW(e, t, n, r, a, o) {
	let s = e.ordered(t);
	return qo(s.map((e) => () => {
		let r = o.filter((e) => ze(e)).filter((t) => ai(e.selector, t.uri, t.getLanguageId(), !0, void 0, void 0) > 0);
		return Promise.resolve(e.provideMultiDocumentHighlights(t, n, r, a)).then(void 0, i);
	}), (e) => e != null);
}
var TW = class {
	constructor(e, t, n) {
		this._model = e, this._selection = t, this._wordSeparators = n, this._wordRange = this._getCurrentWordRange(e, t), this._result = null;
	}
	get result() {
		return this._result ||= Te((e) => this._compute(this._model, this._selection, this._wordSeparators, e)), this._result;
	}
	_getCurrentWordRange(e, t) {
		let n = e.getWordAtPosition(t.getPosition());
		return n ? new E(t.startLineNumber, n.startColumn, t.startLineNumber, n.endColumn) : null;
	}
	isValid(e, t, n) {
		let r = t.startLineNumber, i = t.startColumn, a = t.endColumn, o = this._getCurrentWordRange(e, t), s = !!(this._wordRange && this._wordRange.equalsRange(o));
		for (let e = 0, t = n.length; !s && e < t; e++) {
			let t = n.getRange(e);
			t && t.startLineNumber === r && t.startColumn <= i && t.endColumn >= a && (s = !0);
		}
		return s;
	}
	cancel() {
		this.result.cancel();
	}
}, EW = class extends TW {
	constructor(e, t, n, r) {
		super(e, t, n), this._providers = r;
	}
	_compute(e, t, n, r) {
		return CW(this._providers, e, t.getPosition(), r).then((e) => e || new Zo());
	}
}, DW = class extends TW {
	constructor(e, t, n, r, i) {
		super(e, t, n), this._providers = r, this._otherModels = i;
	}
	_compute(e, t, n, r) {
		return wW(this._providers, e, t.getPosition(), n, r, this._otherModels).then((e) => e || new Zo());
	}
};
function OW(e, t, n, r, i) {
	return new EW(t, n, i, e);
}
function kW(e, t, n, r, i, a) {
	return new DW(t, n, i, e, a);
}
Ga("_executeDocumentHighlights", async (e, t, n) => (await CW(e.get(M).documentHighlightProvider, t, n, C.None))?.get(t.uri));
var AW = class {
	static {
		bW = this;
	}
	static {
		this.storedDecorationIDs = new Zo();
	}
	static {
		this.query = null;
	}
	constructor(e, t, n, r, i) {
		this.toUnhook = new g(), this.workerRequestTokenId = 0, this.workerRequestCompleted = !1, this.workerRequestValue = new Zo(), this.lastCursorPositionChangeTime = 0, this.renderDecorationsTimer = -1, this.runDelayer = this.toUnhook.add(new ge(50)), this.editor = e, this.providers = t, this.multiDocumentProviders = n, this.codeEditorService = i, this._hasWordHighlights = SW.bindTo(r), this._ignorePositionChangeEvent = !1, this.occurrencesHighlight = this.editor.getOption(81), this.model = this.editor.getModel(), this.toUnhook.add(e.onDidChangeCursorPosition((e) => {
			this._ignorePositionChangeEvent || this.occurrencesHighlight !== "off" && this.runDelayer.trigger(() => {
				this._onPositionChanged(e);
			});
		})), this.toUnhook.add(e.onDidFocusEditorText((e) => {
			this.occurrencesHighlight !== "off" && (this.workerRequest || this.runDelayer.trigger(() => {
				this._run();
			}));
		})), this.toUnhook.add(e.onDidChangeModelContent((e) => {
			Sl(this.model.uri, "output") || this._stopAll();
		})), this.toUnhook.add(e.onDidChangeModel((e) => {
			!e.newModelUrl && e.oldModelUrl ? this._stopSingular() : bW.query && this._run();
		})), this.toUnhook.add(e.onDidChangeConfiguration((e) => {
			let t = this.editor.getOption(81);
			if (this.occurrencesHighlight !== t) switch (this.occurrencesHighlight = t, t) {
				case "off":
					this._stopAll();
					break;
				case "singleFile":
					this._stopAll(bW.query?.modelInfo?.model);
					break;
				case "multiFile":
					bW.query && this._run(!0);
					break;
				default: console.warn("Unknown occurrencesHighlight setting value:", t);
			}
		})), this.decorations = this.editor.createDecorationsCollection(), this.workerRequestTokenId = 0, this.workerRequest = null, this.workerRequestCompleted = !1, this.lastCursorPositionChangeTime = 0, this.renderDecorationsTimer = -1, bW.query && this._run();
	}
	hasDecorations() {
		return this.decorations.length > 0;
	}
	restore() {
		this.occurrencesHighlight !== "off" && (this.runDelayer.cancel(), this._run());
	}
	_getSortedHighlights() {
		return this.decorations.getRanges().sort(E.compareRangesUsingStarts);
	}
	moveNext() {
		let e = this._getSortedHighlights(), t = (e.findIndex((e) => e.containsPosition(this.editor.getPosition())) + 1) % e.length, n = e[t];
		try {
			this._ignorePositionChangeEvent = !0, this.editor.setPosition(n.getStartPosition()), this.editor.revealRangeInCenterIfOutsideViewport(n);
			let r = this._getWord();
			if (r) {
				let i = this.editor.getModel().getLineContent(n.startLineNumber);
				gt(`${i}, ${t + 1} of ${e.length} for '${r.word}'`);
			}
		} finally {
			this._ignorePositionChangeEvent = !1;
		}
	}
	moveBack() {
		let e = this._getSortedHighlights(), t = (e.findIndex((e) => e.containsPosition(this.editor.getPosition())) - 1 + e.length) % e.length, n = e[t];
		try {
			this._ignorePositionChangeEvent = !0, this.editor.setPosition(n.getStartPosition()), this.editor.revealRangeInCenterIfOutsideViewport(n);
			let r = this._getWord();
			if (r) {
				let i = this.editor.getModel().getLineContent(n.startLineNumber);
				gt(`${i}, ${t + 1} of ${e.length} for '${r.word}'`);
			}
		} finally {
			this._ignorePositionChangeEvent = !1;
		}
	}
	_removeSingleDecorations() {
		if (!this.editor.hasModel()) return;
		let e = bW.storedDecorationIDs.get(this.editor.getModel().uri);
		e && (this.editor.removeDecorations(e), bW.storedDecorationIDs.delete(this.editor.getModel().uri), this.decorations.length > 0 && (this.decorations.clear(), this._hasWordHighlights.set(!1)));
	}
	_removeAllDecorations(e) {
		let t = this.codeEditorService.listCodeEditors(), n = [];
		for (let r of t) {
			if (!r.hasModel() || Aa(r.getModel().uri, e?.uri)) continue;
			let t = bW.storedDecorationIDs.get(r.getModel().uri);
			if (!t) continue;
			r.removeDecorations(t), n.push(r.getModel().uri);
			let i = jW.get(r);
			i?.wordHighlighter && i.wordHighlighter.decorations.length > 0 && (i.wordHighlighter.decorations.clear(), i.wordHighlighter.workerRequest = null, i.wordHighlighter._hasWordHighlights.set(!1));
		}
		for (let e of n) bW.storedDecorationIDs.delete(e);
	}
	_stopSingular() {
		this._removeSingleDecorations(), this.editor.hasTextFocus() && (this.editor.getModel()?.uri.scheme !== Kc.vscodeNotebookCell && bW.query?.modelInfo?.model.uri.scheme !== Kc.vscodeNotebookCell ? (bW.query = null, this._run()) : bW.query?.modelInfo && (bW.query.modelInfo = null)), this.renderDecorationsTimer !== -1 && (clearTimeout(this.renderDecorationsTimer), this.renderDecorationsTimer = -1), this.workerRequest !== null && (this.workerRequest.cancel(), this.workerRequest = null), this.workerRequestCompleted ||= (this.workerRequestTokenId++, !0);
	}
	_stopAll(e) {
		this._removeAllDecorations(e), this.renderDecorationsTimer !== -1 && (clearTimeout(this.renderDecorationsTimer), this.renderDecorationsTimer = -1), this.workerRequest !== null && (this.workerRequest.cancel(), this.workerRequest = null), this.workerRequestCompleted ||= (this.workerRequestTokenId++, !0);
	}
	_onPositionChanged(e) {
		this.occurrencesHighlight === "off" || e.reason !== 3 && this.editor.getModel()?.uri.scheme !== Kc.vscodeNotebookCell ? this._stopAll() : this._run();
	}
	_getWord() {
		let e = this.editor.getSelection(), t = e.startLineNumber, n = e.startColumn;
		return this.model.isDisposed() ? null : this.model.getWordAtPosition({
			lineNumber: t,
			column: n
		});
	}
	getOtherModelsToHighlight(e) {
		if (!e) return [];
		if (e.uri.scheme === Kc.vscodeNotebookCell) {
			let t = [], n = this.codeEditorService.listCodeEditors();
			for (let r of n) {
				let n = r.getModel();
				n && n !== e && n.uri.scheme === Kc.vscodeNotebookCell && t.push(n);
			}
			return t;
		}
		let t = [], n = this.codeEditorService.listCodeEditors();
		for (let r of n) {
			if (!gr(r)) continue;
			let n = r.getModel();
			n && e === n.modified && t.push(n.modified);
		}
		if (t.length) return t;
		if (this.occurrencesHighlight === "singleFile") return [];
		for (let r of n) {
			let n = r.getModel();
			n && n !== e && t.push(n);
		}
		return t;
	}
	_run(e) {
		let t;
		if (this.editor.hasTextFocus()) {
			let e = this.editor.getSelection();
			if (!e || e.startLineNumber !== e.endLineNumber) {
				bW.query = null, this._stopAll();
				return;
			}
			let n = e.startColumn, r = e.endColumn, i = this._getWord();
			if (!i || i.startColumn > n || i.endColumn < r) {
				bW.query = null, this._stopAll();
				return;
			}
			t = this.workerRequest && this.workerRequest.isValid(this.model, e, this.decorations), bW.query = {
				modelInfo: {
					model: this.model,
					selection: e
				},
				word: i
			};
		} else if (!bW.query) {
			this._stopAll();
			return;
		}
		if (this.lastCursorPositionChangeTime = (/* @__PURE__ */ new Date()).getTime(), t) this.workerRequestCompleted && this.renderDecorationsTimer !== -1 && (clearTimeout(this.renderDecorationsTimer), this.renderDecorationsTimer = -1, this._beginRenderDecorations());
		else if (Aa(this.editor.getModel().uri, bW.query.modelInfo?.model.uri)) {
			if (!e) {
				let e = this.decorations.getRanges();
				for (let t of e) if (t.containsPosition(this.editor.getPosition())) return;
			}
			this._stopAll(e ? this.model : void 0);
			let t = ++this.workerRequestTokenId;
			this.workerRequestCompleted = !1;
			let n = this.getOtherModelsToHighlight(this.editor.getModel());
			if (!bW.query || !bW.query.modelInfo || bW.query.modelInfo.model.isDisposed()) return;
			this.workerRequest = this.computeWithModel(bW.query.modelInfo.model, bW.query.modelInfo.selection, bW.query.word, n), this.workerRequest?.result.then((e) => {
				t === this.workerRequestTokenId && (this.workerRequestCompleted = !0, this.workerRequestValue = e || [], this._beginRenderDecorations());
			}, er);
		}
	}
	computeWithModel(e, t, n, r) {
		return r.length ? kW(this.multiDocumentProviders, e, t, n, this.editor.getOption(132), r) : OW(this.providers, e, t, n, this.editor.getOption(132));
	}
	_beginRenderDecorations() {
		let e = (/* @__PURE__ */ new Date()).getTime(), t = this.lastCursorPositionChangeTime + 250;
		e >= t ? (this.renderDecorationsTimer = -1, this.renderDecorations()) : this.renderDecorationsTimer = setTimeout(() => {
			this.renderDecorations();
		}, t - e);
	}
	renderDecorations() {
		this.renderDecorationsTimer = -1;
		let e = this.codeEditorService.listCodeEditors();
		for (let t of e) {
			let e = jW.get(t);
			if (!e) continue;
			let n = [], r = t.getModel()?.uri;
			if (r && this.workerRequestValue.has(r)) {
				let i = bW.storedDecorationIDs.get(r), a = this.workerRequestValue.get(r);
				if (a) for (let e of a) e.range && n.push({
					range: e.range,
					options: jz(e.kind)
				});
				let o = [];
				t.changeDecorations((e) => {
					o = e.deltaDecorations(i ?? [], n);
				}), bW.storedDecorationIDs = bW.storedDecorationIDs.set(r, o), n.length > 0 && (e.wordHighlighter?.decorations.set(n), e.wordHighlighter?._hasWordHighlights.set(!0));
			}
		}
	}
	dispose() {
		this._stopSingular(), this.toUnhook.dispose();
	}
};
AW = bW = vW([yW(4, Ln)], AW);
var jW = class extends U {
	static {
		xW = this;
	}
	static {
		this.ID = "editor.contrib.wordHighlighter";
	}
	static get(e) {
		return e.getContribution(xW.ID);
	}
	constructor(e, t, n, r) {
		super(), this._wordHighlighter = null;
		let i = () => {
			e.hasModel() && !e.getModel().isTooLargeForTokenization() && (this._wordHighlighter = new AW(e, n.documentHighlightProvider, n.multiDocumentHighlightProvider, t, r));
		};
		this._register(e.onDidChangeModel((e) => {
			this._wordHighlighter &&= (this._wordHighlighter.dispose(), null), i();
		})), i();
	}
	get wordHighlighter() {
		return this._wordHighlighter;
	}
	saveViewState() {
		return !!(this._wordHighlighter && this._wordHighlighter.hasDecorations());
	}
	moveNext() {
		this._wordHighlighter?.moveNext();
	}
	moveBack() {
		this._wordHighlighter?.moveBack();
	}
	restoreViewState(e) {
		this._wordHighlighter && e && this._wordHighlighter.restore();
	}
	dispose() {
		this._wordHighlighter &&= (this._wordHighlighter.dispose(), null), super.dispose();
	}
};
jW = xW = vW([
	yW(1, j),
	yW(2, M),
	yW(3, Ln)
], jW);
var MW = class extends O {
	constructor(e, t) {
		super(t), this._isNext = e;
	}
	run(e, t) {
		let n = jW.get(t);
		n && (this._isNext ? n.moveNext() : n.moveBack());
	}
}, NW = class extends MW {
	constructor() {
		super(!0, {
			id: "editor.action.wordHighlight.next",
			label: B("wordHighlight.next.label", "Go to Next Symbol Highlight"),
			alias: "Go to Next Symbol Highlight",
			precondition: SW,
			kbOpts: {
				kbExpr: I.editorTextFocus,
				primary: 65,
				weight: 100
			}
		});
	}
}, PW = class extends MW {
	constructor() {
		super(!1, {
			id: "editor.action.wordHighlight.prev",
			label: B("wordHighlight.previous.label", "Go to Previous Symbol Highlight"),
			alias: "Go to Previous Symbol Highlight",
			precondition: SW,
			kbOpts: {
				kbExpr: I.editorTextFocus,
				primary: 1089,
				weight: 100
			}
		});
	}
}, FW = class extends O {
	constructor() {
		super({
			id: "editor.action.wordHighlight.trigger",
			label: B("wordHighlight.trigger.label", "Trigger Symbol Highlight"),
			alias: "Trigger Symbol Highlight",
			precondition: void 0,
			kbOpts: {
				kbExpr: I.editorTextFocus,
				primary: 0,
				weight: 100
			}
		});
	}
	run(e, t, n) {
		let r = jW.get(t);
		r && r.restoreViewState(!0);
	}
};
T(jW.ID, jW, 0), k(NW), k(PW), k(FW), He(_W);
// ../../../node_modules/.pnpm/monaco-editor@0.52.2/node_modules/monaco-editor/esm/vs/editor/contrib/wordOperations/browser/wordOperations.js
var IW = class extends qt {
	constructor(e) {
		super(e), this._inSelectionMode = e.inSelectionMode, this._wordNavigationType = e.wordNavigationType;
	}
	runEditorCommand(e, t, n) {
		if (!t.hasModel()) return;
		let r = ke(t.getOption(132), t.getOption(131)), i = t.getModel(), a = t.getSelections(), o = a.length > 1, s = a.map((e) => {
			let t = new b(e.positionLineNumber, e.positionColumn), n = this._move(r, i, t, this._wordNavigationType, o);
			return this._moveTo(e, n, this._inSelectionMode);
		});
		if (i.pushStackElement(), t._getViewModel().setCursorStates("moveWordCommand", 3, s.map((e) => po.fromModelSelection(e))), s.length === 1) {
			let e = new b(s[0].positionLineNumber, s[0].positionColumn);
			t.revealPosition(e, 0);
		}
	}
	_moveTo(e, t, n) {
		return n ? new V(e.selectionStartLineNumber, e.selectionStartColumn, t.lineNumber, t.column) : new V(t.lineNumber, t.column, t.lineNumber, t.column);
	}
}, LW = class extends IW {
	_move(e, t, n, r, i) {
		return Hc.moveWordLeft(e, t, n, r, i);
	}
}, RW = class extends IW {
	_move(e, t, n, r, i) {
		return Hc.moveWordRight(e, t, n, r);
	}
}, zW = class extends LW {
	constructor() {
		super({
			inSelectionMode: !1,
			wordNavigationType: 0,
			id: "cursorWordStartLeft",
			precondition: void 0
		});
	}
}, BW = class extends LW {
	constructor() {
		super({
			inSelectionMode: !1,
			wordNavigationType: 2,
			id: "cursorWordEndLeft",
			precondition: void 0
		});
	}
}, VW = class extends LW {
	constructor() {
		super({
			inSelectionMode: !1,
			wordNavigationType: 1,
			id: "cursorWordLeft",
			precondition: void 0,
			kbOpts: {
				kbExpr: N.and(I.textInputFocus, N.and(ui, oc)?.negate()),
				primary: 2063,
				mac: { primary: 527 },
				weight: 100
			}
		});
	}
}, HW = class extends LW {
	constructor() {
		super({
			inSelectionMode: !0,
			wordNavigationType: 0,
			id: "cursorWordStartLeftSelect",
			precondition: void 0
		});
	}
}, UW = class extends LW {
	constructor() {
		super({
			inSelectionMode: !0,
			wordNavigationType: 2,
			id: "cursorWordEndLeftSelect",
			precondition: void 0
		});
	}
}, WW = class extends LW {
	constructor() {
		super({
			inSelectionMode: !0,
			wordNavigationType: 1,
			id: "cursorWordLeftSelect",
			precondition: void 0,
			kbOpts: {
				kbExpr: N.and(I.textInputFocus, N.and(ui, oc)?.negate()),
				primary: 3087,
				mac: { primary: 1551 },
				weight: 100
			}
		});
	}
}, GW = class extends LW {
	constructor() {
		super({
			inSelectionMode: !1,
			wordNavigationType: 3,
			id: "cursorWordAccessibilityLeft",
			precondition: void 0
		});
	}
	_move(e, t, n, r, i) {
		return super._move(ke(js.wordSeparators.defaultValue, e.intlSegmenterLocales), t, n, r, i);
	}
}, KW = class extends LW {
	constructor() {
		super({
			inSelectionMode: !0,
			wordNavigationType: 3,
			id: "cursorWordAccessibilityLeftSelect",
			precondition: void 0
		});
	}
	_move(e, t, n, r, i) {
		return super._move(ke(js.wordSeparators.defaultValue, e.intlSegmenterLocales), t, n, r, i);
	}
}, qW = class extends RW {
	constructor() {
		super({
			inSelectionMode: !1,
			wordNavigationType: 0,
			id: "cursorWordStartRight",
			precondition: void 0
		});
	}
}, JW = class extends RW {
	constructor() {
		super({
			inSelectionMode: !1,
			wordNavigationType: 2,
			id: "cursorWordEndRight",
			precondition: void 0,
			kbOpts: {
				kbExpr: N.and(I.textInputFocus, N.and(ui, oc)?.negate()),
				primary: 2065,
				mac: { primary: 529 },
				weight: 100
			}
		});
	}
}, YW = class extends RW {
	constructor() {
		super({
			inSelectionMode: !1,
			wordNavigationType: 2,
			id: "cursorWordRight",
			precondition: void 0
		});
	}
}, XW = class extends RW {
	constructor() {
		super({
			inSelectionMode: !0,
			wordNavigationType: 0,
			id: "cursorWordStartRightSelect",
			precondition: void 0
		});
	}
}, ZW = class extends RW {
	constructor() {
		super({
			inSelectionMode: !0,
			wordNavigationType: 2,
			id: "cursorWordEndRightSelect",
			precondition: void 0,
			kbOpts: {
				kbExpr: N.and(I.textInputFocus, N.and(ui, oc)?.negate()),
				primary: 3089,
				mac: { primary: 1553 },
				weight: 100
			}
		});
	}
}, QW = class extends RW {
	constructor() {
		super({
			inSelectionMode: !0,
			wordNavigationType: 2,
			id: "cursorWordRightSelect",
			precondition: void 0
		});
	}
}, $W = class extends RW {
	constructor() {
		super({
			inSelectionMode: !1,
			wordNavigationType: 3,
			id: "cursorWordAccessibilityRight",
			precondition: void 0
		});
	}
	_move(e, t, n, r, i) {
		return super._move(ke(js.wordSeparators.defaultValue, e.intlSegmenterLocales), t, n, r, i);
	}
}, eG = class extends RW {
	constructor() {
		super({
			inSelectionMode: !0,
			wordNavigationType: 3,
			id: "cursorWordAccessibilityRightSelect",
			precondition: void 0
		});
	}
	_move(e, t, n, r, i) {
		return super._move(ke(js.wordSeparators.defaultValue, e.intlSegmenterLocales), t, n, r, i);
	}
}, tG = class extends qt {
	constructor(e) {
		super(e), this._whitespaceHeuristics = e.whitespaceHeuristics, this._wordNavigationType = e.wordNavigationType;
	}
	runEditorCommand(e, t, n) {
		let r = e.get(Tn);
		if (!t.hasModel()) return;
		let i = ke(t.getOption(132), t.getOption(131)), a = t.getModel(), o = t.getSelections(), s = t.getOption(6), c = t.getOption(11), l = r.getLanguageConfiguration(a.getLanguageId()).getAutoClosingPairs(), u = t._getViewModel(), d = o.map((e) => {
			let n = this._delete({
				wordSeparators: i,
				model: a,
				selection: e,
				whitespaceHeuristics: this._whitespaceHeuristics,
				autoClosingDelete: t.getOption(9),
				autoClosingBrackets: s,
				autoClosingQuotes: c,
				autoClosingPairs: l,
				autoClosedCharacters: u.getCursorAutoClosedCharacters()
			}, this._wordNavigationType);
			return new Ys(n, "");
		});
		t.pushUndoStop(), t.executeCommands(this.id, d), t.pushUndoStop();
	}
}, nG = class extends tG {
	_delete(e, t) {
		return Hc.deleteWordLeft(e, t) || new E(1, 1, 1, 1);
	}
}, rG = class extends tG {
	_delete(e, t) {
		let n = Hc.deleteWordRight(e, t);
		if (n) return n;
		let r = e.model.getLineCount(), i = e.model.getLineMaxColumn(r);
		return new E(r, i, r, i);
	}
}, iG = class extends nG {
	constructor() {
		super({
			whitespaceHeuristics: !1,
			wordNavigationType: 0,
			id: "deleteWordStartLeft",
			precondition: I.writable
		});
	}
}, aG = class extends nG {
	constructor() {
		super({
			whitespaceHeuristics: !1,
			wordNavigationType: 2,
			id: "deleteWordEndLeft",
			precondition: I.writable
		});
	}
}, oG = class extends nG {
	constructor() {
		super({
			whitespaceHeuristics: !0,
			wordNavigationType: 0,
			id: "deleteWordLeft",
			precondition: I.writable,
			kbOpts: {
				kbExpr: I.textInputFocus,
				primary: 2049,
				mac: { primary: 513 },
				weight: 100
			}
		});
	}
}, sG = class extends rG {
	constructor() {
		super({
			whitespaceHeuristics: !1,
			wordNavigationType: 0,
			id: "deleteWordStartRight",
			precondition: I.writable
		});
	}
}, cG = class extends rG {
	constructor() {
		super({
			whitespaceHeuristics: !1,
			wordNavigationType: 2,
			id: "deleteWordEndRight",
			precondition: I.writable
		});
	}
}, lG = class extends rG {
	constructor() {
		super({
			whitespaceHeuristics: !0,
			wordNavigationType: 2,
			id: "deleteWordRight",
			precondition: I.writable,
			kbOpts: {
				kbExpr: I.textInputFocus,
				primary: 2068,
				mac: { primary: 532 },
				weight: 100
			}
		});
	}
}, uG = class extends O {
	constructor() {
		super({
			id: "deleteInsideWord",
			precondition: I.writable,
			label: B("deleteInsideWord", "Delete Word"),
			alias: "Delete Word"
		});
	}
	run(e, t, n) {
		if (!t.hasModel()) return;
		let r = ke(t.getOption(132), t.getOption(131)), i = t.getModel(), a = t.getSelections().map((e) => {
			let t = Hc.deleteInsideWord(r, i, e);
			return new Ys(t, "");
		});
		t.pushUndoStop(), t.executeCommands(this.id, a), t.pushUndoStop();
	}
};
A(new zW()), A(new BW()), A(new VW()), A(new HW()), A(new UW()), A(new WW()), A(new qW()), A(new JW()), A(new YW()), A(new XW()), A(new ZW()), A(new QW()), A(new GW()), A(new KW()), A(new $W()), A(new eG()), A(new iG()), A(new aG()), A(new oG()), A(new sG()), A(new cG()), A(new lG()), k(uG);
// ../../../node_modules/.pnpm/monaco-editor@0.52.2/node_modules/monaco-editor/esm/vs/editor/contrib/wordPartOperations/browser/wordPartOperations.js
var dG = class extends tG {
	constructor() {
		super({
			whitespaceHeuristics: !0,
			wordNavigationType: 0,
			id: "deleteWordPartLeft",
			precondition: I.writable,
			kbOpts: {
				kbExpr: I.textInputFocus,
				primary: 0,
				mac: { primary: 769 },
				weight: 100
			}
		});
	}
	_delete(e, t) {
		return Ia.deleteWordPartLeft(e) || new E(1, 1, 1, 1);
	}
}, fG = class extends tG {
	constructor() {
		super({
			whitespaceHeuristics: !0,
			wordNavigationType: 2,
			id: "deleteWordPartRight",
			precondition: I.writable,
			kbOpts: {
				kbExpr: I.textInputFocus,
				primary: 0,
				mac: { primary: 788 },
				weight: 100
			}
		});
	}
	_delete(e, t) {
		let n = Ia.deleteWordPartRight(e);
		if (n) return n;
		let r = e.model.getLineCount(), i = e.model.getLineMaxColumn(r);
		return new E(r, i, r, i);
	}
}, pG = class extends IW {
	_move(e, t, n, r, i) {
		return Ia.moveWordPartLeft(e, t, n, i);
	}
}, mG = class extends pG {
	constructor() {
		super({
			inSelectionMode: !1,
			wordNavigationType: 0,
			id: "cursorWordPartLeft",
			precondition: void 0,
			kbOpts: {
				kbExpr: I.textInputFocus,
				primary: 0,
				mac: { primary: 783 },
				weight: 100
			}
		});
	}
};
Ol.registerCommandAlias("cursorWordPartStartLeft", "cursorWordPartLeft");
var hG = class extends pG {
	constructor() {
		super({
			inSelectionMode: !0,
			wordNavigationType: 0,
			id: "cursorWordPartLeftSelect",
			precondition: void 0,
			kbOpts: {
				kbExpr: I.textInputFocus,
				primary: 0,
				mac: { primary: 1807 },
				weight: 100
			}
		});
	}
};
Ol.registerCommandAlias("cursorWordPartStartLeftSelect", "cursorWordPartLeftSelect");
var gG = class extends IW {
	_move(e, t, n, r, i) {
		return Ia.moveWordPartRight(e, t, n);
	}
}, _G = class extends gG {
	constructor() {
		super({
			inSelectionMode: !1,
			wordNavigationType: 2,
			id: "cursorWordPartRight",
			precondition: void 0,
			kbOpts: {
				kbExpr: I.textInputFocus,
				primary: 0,
				mac: { primary: 785 },
				weight: 100
			}
		});
	}
}, vG = class extends gG {
	constructor() {
		super({
			inSelectionMode: !0,
			wordNavigationType: 2,
			id: "cursorWordPartRightSelect",
			precondition: void 0,
			kbOpts: {
				kbExpr: I.textInputFocus,
				primary: 0,
				mac: { primary: 1809 },
				weight: 100
			}
		});
	}
};
A(new dG()), A(new fG()), A(new mG()), A(new hG()), A(new _G()), A(new vG());
// ../../../node_modules/.pnpm/monaco-editor@0.52.2/node_modules/monaco-editor/esm/vs/editor/contrib/readOnlyMessage/browser/contribution.js
var yG = class extends U {
	static {
		this.ID = "editor.contrib.readOnlyMessageController";
	}
	constructor(e) {
		super(), this.editor = e, this._register(this.editor.onDidAttemptReadOnlyEdit(() => this._onDidAttemptReadOnlyEdit()));
	}
	_onDidAttemptReadOnlyEdit() {
		let e = GS.get(this.editor);
		if (e && this.editor.hasModel()) {
			let t = this.editor.getOptions().get(93);
			t ||= this.editor.isSimpleWidget ? new ws(B("editor.simple.readonly", "Cannot edit in read-only input")) : new ws(B("editor.readonly", "Cannot edit in read-only editor")), e.showMessage(t, this.editor.getPosition());
		}
	}
};
T(yG.ID, yG, 2);
// ../../../node_modules/.pnpm/monaco-editor@0.52.2/node_modules/monaco-editor/esm/vs/editor/contrib/diffEditorBreadcrumbs/browser/contribution.js
var bG = function(e, t, n, r) {
	var i = arguments.length, a = i < 3 ? t : r === null ? r = Object.getOwnPropertyDescriptor(t, n) : r, o;
	if (typeof Reflect == "object" && typeof Reflect.decorate == "function") a = Reflect.decorate(e, t, n, r);
	else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (i < 3 ? o(a) : i > 3 ? o(t, n, a) : o(t, n)) || a);
	return i > 3 && a && Object.defineProperty(t, n, a), a;
}, xG = function(e, t) {
	return function(n, r) {
		t(n, r, e);
	};
}, SG = class extends U {
	constructor(e, t, n) {
		super(), this._textModel = e, this._languageFeaturesService = t, this._outlineModelService = n, this._currentModel = qs(this, void 0);
		let r = Wa("documentSymbolProvider.onDidChange", this._languageFeaturesService.documentSymbolProvider.onDidChange), i = Wa("_textModel.onDidChangeContent", wt.debounce((e) => this._textModel.onDidChangeContent(e), () => void 0, 100));
		this._register(jo(async (e, t) => {
			r.read(e), i.read(e);
			let n = t.add(new et()), a = await this._outlineModelService.getOrCreate(this._textModel, n.token);
			t.isDisposed || this._currentModel.set(a, void 0);
		}));
	}
	getBreadcrumbItems(e, t) {
		let n = this._currentModel.read(t);
		if (!n) return [];
		let r = n.asListOfDocumentSymbols().filter((t) => e.contains(t.range.startLineNumber) && !e.contains(t.range.endLineNumber));
		return r.sort(yt(Yn((e) => e.range.endLineNumber - e.range.startLineNumber, pe))), r.map((e) => ({
			name: e.name,
			kind: e.kind,
			startLineNumber: e.range.startLineNumber
		}));
	}
};
SG = bG([xG(1, M), xG(2, uN)], SG), Go.setBreadcrumbsSourceFactory((e, t) => t.createInstance(SG, e));
// ../../../node_modules/.pnpm/monaco-editor@0.52.2/node_modules/monaco-editor/esm/vs/editor/standalone/browser/iPadShowKeyboard/iPadShowKeyboard.js
var CG = class extends U {
	static {
		this.ID = "editor.contrib.iPadShowKeyboard";
	}
	constructor(e) {
		super(), this.editor = e, this.widget = null, Uc && (this._register(e.onDidChangeConfiguration(() => this.update())), this.update());
	}
	update() {
		let e = !this.editor.getOption(92);
		!this.widget && e ? this.widget = new wG(this.editor) : this.widget && !e && (this.widget.dispose(), this.widget = null);
	}
	dispose() {
		super.dispose(), this.widget &&= (this.widget.dispose(), null);
	}
}, wG = class e extends U {
	static {
		this.ID = "editor.contrib.ShowKeyboardWidget";
	}
	constructor(e) {
		super(), this.editor = e, this._domNode = document.createElement("textarea"), this._domNode.className = "iPadShowKeyboard", this._register(_(this._domNode, "touchstart", (e) => {
			this.editor.focus();
		})), this._register(_(this._domNode, "focus", (e) => {
			this.editor.focus();
		})), this.editor.addOverlayWidget(this);
	}
	dispose() {
		this.editor.removeOverlayWidget(this), super.dispose();
	}
	getId() {
		return e.ID;
	}
	getDomNode() {
		return this._domNode;
	}
	getPosition() {
		return { preference: 1 };
	}
};
T(CG.ID, CG, 3);
// ../../../node_modules/.pnpm/monaco-editor@0.52.2/node_modules/monaco-editor/esm/vs/editor/standalone/browser/inspectTokens/inspectTokens.js
var TG = function(e, t, n, r) {
	var i = arguments.length, a = i < 3 ? t : r === null ? r = Object.getOwnPropertyDescriptor(t, n) : r, o;
	if (typeof Reflect == "object" && typeof Reflect.decorate == "function") a = Reflect.decorate(e, t, n, r);
	else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (i < 3 ? o(a) : i > 3 ? o(t, n, a) : o(t, n)) || a);
	return i > 3 && a && Object.defineProperty(t, n, a), a;
}, EG = function(e, t) {
	return function(n, r) {
		t(n, r, e);
	};
}, DG, OG = class extends U {
	static {
		DG = this;
	}
	static {
		this.ID = "editor.contrib.inspectTokens";
	}
	static get(e) {
		return e.getContribution(DG.ID);
	}
	constructor(e, t, n) {
		super(), this._editor = e, this._languageService = n, this._widget = null, this._register(this._editor.onDidChangeModel((e) => this.stop())), this._register(this._editor.onDidChangeModelLanguage((e) => this.stop())), this._register(fa.onDidChange((e) => this.stop())), this._register(this._editor.onKeyUp((e) => e.keyCode === 9 && this.stop()));
	}
	dispose() {
		this.stop(), super.dispose();
	}
	launch() {
		this._widget || this._editor.hasModel() && (this._widget = new MG(this._editor, this._languageService));
	}
	stop() {
		this._widget &&= (this._widget.dispose(), null);
	}
};
OG = DG = TG([EG(1, re), EG(2, dr)], OG);
var kG = class extends O {
	constructor() {
		super({
			id: "editor.action.inspectTokens",
			label: Cr.inspectTokensAction,
			alias: "Developer: Inspect Tokens",
			precondition: void 0
		});
	}
	run(e, t) {
		OG.get(t)?.launch();
	}
};
function AG(e) {
	let t = "";
	for (let n = 0, r = e.length; n < r; n++) {
		let r = e.charCodeAt(n);
		switch (r) {
			case 9:
				t += "→";
				break;
			case 32:
				t += "·";
				break;
			default: t += String.fromCharCode(r);
		}
	}
	return t;
}
function jG(e, t) {
	let n = fa.get(t);
	if (n) return n;
	let r = e.encodeLanguageId(t);
	return {
		getInitialState: () => Rt,
		tokenize: (e, n, r) => Ai(t, r),
		tokenizeEncoded: (e, t, n) => bi(r, n)
	};
}
var MG = class e extends U {
	static {
		this._ID = "editor.contrib.inspectTokensWidget";
	}
	constructor(e, t) {
		super(), this.allowEditorOverflow = !0, this._editor = e, this._languageService = t, this._model = this._editor.getModel(), this._domNode = document.createElement("div"), this._domNode.className = "tokens-inspect-widget", this._tokenizationSupport = jG(this._languageService.languageIdCodec, this._model.getLanguageId()), this._compute(this._editor.getPosition()), this._register(this._editor.onDidChangeCursorPosition((e) => this._compute(this._editor.getPosition()))), this._editor.addContentWidget(this);
	}
	dispose() {
		this._editor.removeContentWidget(this), super.dispose();
	}
	getId() {
		return e._ID;
	}
	_compute(e) {
		let t = this._getTokensAtLine(e.lineNumber), n = 0;
		for (let r = t.tokens1.length - 1; r >= 0; r--) {
			let i = t.tokens1[r];
			if (e.column - 1 >= i.offset) {
				n = r;
				break;
			}
		}
		let r = 0;
		for (let n = t.tokens2.length >>> 1; n >= 0; n--) if (e.column - 1 >= t.tokens2[n << 1]) {
			r = n;
			break;
		}
		let i = this._model.getLineContent(e.lineNumber), a = "";
		if (n < t.tokens1.length) {
			let e = t.tokens1[n].offset, r = n + 1 < t.tokens1.length ? t.tokens1[n + 1].offset : i.length;
			a = i.substring(e, r);
		}
		ns(this._domNode, w("h2.tm-token", void 0, AG(a), w("span.tm-token-length", void 0, `${a.length} ${a.length === 1 ? "char" : "chars"}`))), D(this._domNode, w("hr.tokens-inspect-separator", { style: "clear:both" }));
		let o = (r << 1) + 1 < t.tokens2.length ? this._decodeMetadata(t.tokens2[(r << 1) + 1]) : null;
		D(this._domNode, w("table.tm-metadata-table", void 0, w("tbody", void 0, w("tr", void 0, w("td.tm-metadata-key", void 0, "language"), w("td.tm-metadata-value", void 0, `${o ? o.languageId : "-?-"}`)), w("tr", void 0, w("td.tm-metadata-key", void 0, "token type"), w("td.tm-metadata-value", void 0, `${o ? this._tokenTypeToString(o.tokenType) : "-?-"}`)), w("tr", void 0, w("td.tm-metadata-key", void 0, "font style"), w("td.tm-metadata-value", void 0, `${o ? this._fontStyleToString(o.fontStyle) : "-?-"}`)), w("tr", void 0, w("td.tm-metadata-key", void 0, "foreground"), w("td.tm-metadata-value", void 0, `${o ? R.Format.CSS.formatHex(o.foreground) : "-?-"}`)), w("tr", void 0, w("td.tm-metadata-key", void 0, "background"), w("td.tm-metadata-value", void 0, `${o ? R.Format.CSS.formatHex(o.background) : "-?-"}`))))), D(this._domNode, w("hr.tokens-inspect-separator")), n < t.tokens1.length && D(this._domNode, w("span.tm-token-type", void 0, t.tokens1[n].type)), this._editor.layoutContentWidget(this);
	}
	_decodeMetadata(e) {
		let t = fa.getColorMap(), n = wi.getLanguageId(e), r = wi.getTokenType(e), i = wi.getFontStyle(e), a = wi.getForeground(e), o = wi.getBackground(e);
		return {
			languageId: this._languageService.languageIdCodec.decodeLanguageId(n),
			tokenType: r,
			fontStyle: i,
			foreground: t[a],
			background: t[o]
		};
	}
	_tokenTypeToString(e) {
		switch (e) {
			case 0: return "Other";
			case 1: return "Comment";
			case 2: return "String";
			case 3: return "RegEx";
			default: return "??";
		}
	}
	_fontStyleToString(e) {
		let t = "";
		return e & 1 && (t += "italic "), e & 2 && (t += "bold "), e & 4 && (t += "underline "), e & 8 && (t += "strikethrough "), t.length === 0 && (t = "---"), t;
	}
	_getTokensAtLine(e) {
		let t = this._getStateBeforeLine(e), n = this._tokenizationSupport.tokenize(this._model.getLineContent(e), !0, t), r = this._tokenizationSupport.tokenizeEncoded(this._model.getLineContent(e), !0, t);
		return {
			startState: t,
			tokens1: n.tokens,
			tokens2: r.tokens,
			endState: n.endState
		};
	}
	_getStateBeforeLine(e) {
		let t = this._tokenizationSupport.getInitialState();
		for (let n = 1; n < e; n++) t = this._tokenizationSupport.tokenize(this._model.getLineContent(n), !0, t).endState;
		return t;
	}
	getDomNode() {
		return this._domNode;
	}
	getPosition() {
		return {
			position: this._editor.getPosition(),
			preference: [2, 1]
		};
	}
};
T(OG.ID, OG, 4), k(kG);
// ../../../node_modules/.pnpm/monaco-editor@0.52.2/node_modules/monaco-editor/esm/vs/platform/quickinput/browser/helpQuickAccess.js
var NG = function(e, t, n, r) {
	var i = arguments.length, a = i < 3 ? t : r === null ? r = Object.getOwnPropertyDescriptor(t, n) : r, o;
	if (typeof Reflect == "object" && typeof Reflect.decorate == "function") a = Reflect.decorate(e, t, n, r);
	else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (i < 3 ? o(a) : i > 3 ? o(t, n, a) : o(t, n)) || a);
	return i > 3 && a && Object.defineProperty(t, n, a), a;
}, PG = function(e, t) {
	return function(n, r) {
		t(n, r, e);
	};
}, FG, IG = class {
	static {
		FG = this;
	}
	static {
		this.PREFIX = "?";
	}
	constructor(e, t) {
		this.quickInputService = e, this.keybindingService = t, this.registry = Js.as(Ca.Quickaccess);
	}
	provide(e) {
		let t = new g();
		return t.add(e.onDidAccept(() => {
			let [t] = e.selectedItems;
			t && this.quickInputService.quickAccess.show(t.prefix, { preserveValue: !0 });
		})), t.add(e.onDidChangeValue((e) => {
			let t = this.registry.getQuickAccessProvider(e.substr(FG.PREFIX.length));
			t && t.prefix && t.prefix !== FG.PREFIX && this.quickInputService.quickAccess.show(t.prefix, { preserveValue: !0 });
		})), e.items = this.getQuickAccessProviders().filter((e) => e.prefix !== FG.PREFIX), t;
	}
	getQuickAccessProviders() {
		return this.registry.getQuickAccessProviders().sort((e, t) => e.prefix.localeCompare(t.prefix)).flatMap((e) => this.createPicks(e));
	}
	createPicks(e) {
		return e.helpEntries.map((t) => {
			let n = t.prefix || e.prefix, r = n || "…";
			return {
				prefix: n,
				label: r,
				keybinding: t.commandId ? this.keybindingService.lookupKeybinding(t.commandId) : void 0,
				ariaLabel: B("helpPickAriaLabel", "{0}, {1}", r, t.description),
				description: t.description
			};
		});
	}
};
// ../../../node_modules/.pnpm/monaco-editor@0.52.2/node_modules/monaco-editor/esm/vs/editor/standalone/browser/quickAccess/standaloneHelpQuickAccess.js
IG = FG = NG([PG(0, Is), PG(1, ft)], IG), Js.as(Ca.Quickaccess).registerQuickAccessProvider({
	ctor: IG,
	prefix: "",
	helpEntries: [{ description: al.helpQuickAccessActionLabel }]
});
// ../../../node_modules/.pnpm/monaco-editor@0.52.2/node_modules/monaco-editor/esm/vs/editor/contrib/quickAccess/browser/editorNavigationQuickAccess.js
var LG = class {
	constructor(e) {
		this.options = e, this.rangeHighlightDecorationId = void 0;
	}
	provide(e, t, n) {
		let r = new g();
		e.canAcceptInBackground = !!this.options?.canAcceptInBackground, e.matchOnLabel = e.matchOnDescription = e.matchOnDetail = e.sortByLabel = !1;
		let i = r.add(new Zr());
		return i.value = this.doProvide(e, t, n), r.add(this.onDidActiveTextEditorControlChange(() => {
			i.value = void 0, i.value = this.doProvide(e, t);
		})), r;
	}
	doProvide(e, t, n) {
		let r = new g(), i = this.activeTextEditorControl;
		if (i && this.canProvideWithTextEditor(i)) {
			let a = { editor: i }, o = ca(i);
			if (o) {
				let e = i.saveViewState() ?? void 0;
				r.add(o.onDidChangeCursorPosition(() => {
					e = i.saveViewState() ?? void 0;
				})), a.restoreViewState = () => {
					e && i === this.activeTextEditorControl && i.restoreViewState(e);
				}, r.add(tc(t.onCancellationRequested)(() => a.restoreViewState?.()));
			}
			r.add(Gt(() => this.clearDecorations(i))), r.add(this.provideWithTextEditor(a, e, t, n));
		} else r.add(this.provideWithoutTextEditor(e, t));
		return r;
	}
	canProvideWithTextEditor(e) {
		return !0;
	}
	gotoLocation({ editor: e }, t) {
		e.setSelection(t.range, "code.jump"), e.revealRangeInCenter(t.range, 0), t.preserveFocus || e.focus();
		let n = e.getModel();
		n && "getLineContent" in n && Wr(`${n.getLineContent(t.range.startLineNumber)}`);
	}
	getModel(e) {
		return gr(e) ? e.getModel()?.modified : e.getModel();
	}
	addDecorations(e, t) {
		e.changeDecorations((e) => {
			let n = [];
			this.rangeHighlightDecorationId &&= (n.push(this.rangeHighlightDecorationId.overviewRulerDecorationId), n.push(this.rangeHighlightDecorationId.rangeHighlightId), void 0);
			let r = [{
				range: t,
				options: {
					description: "quick-access-range-highlight",
					className: "rangeHighlight",
					isWholeLine: !0
				}
			}, {
				range: t,
				options: {
					description: "quick-access-range-highlight-overview",
					overviewRuler: {
						color: ra(ve),
						position: Mr.Full
					}
				}
			}], [i, a] = e.deltaDecorations(n, r);
			this.rangeHighlightDecorationId = {
				rangeHighlightId: i,
				overviewRulerDecorationId: a
			};
		});
	}
	clearDecorations(e) {
		let t = this.rangeHighlightDecorationId;
		t && (e.changeDecorations((e) => {
			e.deltaDecorations([t.overviewRulerDecorationId, t.rangeHighlightId], []);
		}), this.rangeHighlightDecorationId = void 0);
	}
}, RG = class e extends LG {
	static {
		this.PREFIX = ":";
	}
	constructor() {
		super({ canAcceptInBackground: !0 });
	}
	provideWithoutTextEditor(e) {
		let t = B("cannotRunGotoLine", "Open a text editor first to go to a line.");
		return e.items = [{ label: t }], e.ariaLabel = t, U.None;
	}
	provideWithTextEditor(t, n, r) {
		let i = t.editor, a = new g();
		a.add(n.onDidAccept((e) => {
			let [r] = n.selectedItems;
			if (r) {
				if (!this.isValidLineNumber(i, r.lineNumber)) return;
				this.gotoLocation(t, {
					range: this.toRange(r.lineNumber, r.column),
					keyMods: n.keyMods,
					preserveFocus: e.inBackground
				}), e.inBackground || n.hide();
			}
		}));
		let o = () => {
			let t = this.parsePosition(i, n.value.trim().substr(e.PREFIX.length)), r = this.getPickLabel(i, t.lineNumber, t.column);
			if (n.items = [{
				lineNumber: t.lineNumber,
				column: t.column,
				label: r
			}], n.ariaLabel = r, !this.isValidLineNumber(i, t.lineNumber)) {
				this.clearDecorations(i);
				return;
			}
			let a = this.toRange(t.lineNumber, t.column);
			i.revealRangeInCenter(a, 0), this.addDecorations(i, a);
		};
		o(), a.add(n.onDidChangeValue(() => o()));
		let s = ca(i);
		return s && s.getOptions().get(68).renderType === 2 && (s.updateOptions({ lineNumbers: "on" }), a.add(Gt(() => s.updateOptions({ lineNumbers: "relative" })))), a;
	}
	toRange(e = 1, t = 1) {
		return {
			startLineNumber: e,
			startColumn: t,
			endLineNumber: e,
			endColumn: t
		};
	}
	parsePosition(e, t) {
		let n = t.split(/,|:|#/).map((e) => parseInt(e, 10)).filter((e) => !isNaN(e)), r = this.lineCount(e) + 1;
		return {
			lineNumber: n[0] > 0 ? n[0] : r + n[0],
			column: n[1]
		};
	}
	getPickLabel(e, t, n) {
		if (this.isValidLineNumber(e, t)) return this.isValidColumn(e, t, n) ? B("gotoLineColumnLabel", "Go to line {0} and character {1}.", t, n) : B("gotoLineLabel", "Go to line {0}.", t);
		let r = e.getPosition() || {
			lineNumber: 1,
			column: 1
		}, i = this.lineCount(e);
		return i > 1 ? B("gotoLineLabelEmptyWithLimit", "Current Line: {0}, Character: {1}. Type a line number between 1 and {2} to navigate to.", r.lineNumber, r.column, i) : B("gotoLineLabelEmpty", "Current Line: {0}, Character: {1}. Type a line number to navigate to.", r.lineNumber, r.column);
	}
	isValidLineNumber(e, t) {
		return !t || typeof t != "number" ? !1 : t > 0 && t <= this.lineCount(e);
	}
	isValidColumn(e, t, n) {
		if (!n || typeof n != "number") return !1;
		let r = this.getModel(e);
		if (!r) return !1;
		let i = {
			lineNumber: t,
			column: n
		};
		return r.validatePosition(i).equals(i);
	}
	lineCount(e) {
		return this.getModel(e)?.getLineCount() ?? 0;
	}
}, zG = function(e, t, n, r) {
	var i = arguments.length, a = i < 3 ? t : r === null ? r = Object.getOwnPropertyDescriptor(t, n) : r, o;
	if (typeof Reflect == "object" && typeof Reflect.decorate == "function") a = Reflect.decorate(e, t, n, r);
	else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (i < 3 ? o(a) : i > 3 ? o(t, n, a) : o(t, n)) || a);
	return i > 3 && a && Object.defineProperty(t, n, a), a;
}, BG = function(e, t) {
	return function(n, r) {
		t(n, r, e);
	};
}, VG = class extends RG {
	constructor(e) {
		super(), this.editorService = e, this.onDidActiveTextEditorControlChange = wt.None;
	}
	get activeTextEditorControl() {
		return this.editorService.getFocusedCodeEditor() ?? void 0;
	}
};
VG = zG([BG(0, Ln)], VG);
var HG = class e extends O {
	static {
		this.ID = "editor.action.gotoLine";
	}
	constructor() {
		super({
			id: e.ID,
			label: gl.gotoLineActionLabel,
			alias: "Go to Line/Column...",
			precondition: void 0,
			kbOpts: {
				kbExpr: I.focus,
				primary: 2085,
				mac: { primary: 293 },
				weight: 100
			}
		});
	}
	run(e) {
		e.get(Is).quickAccess.show(VG.PREFIX);
	}
};
k(HG), Js.as(Ca.Quickaccess).registerQuickAccessProvider({
	ctor: VG,
	prefix: VG.PREFIX,
	helpEntries: [{
		description: gl.gotoLineActionLabel,
		commandId: HG.ID
	}]
});
// ../../../node_modules/.pnpm/monaco-editor@0.52.2/node_modules/monaco-editor/esm/vs/base/common/fuzzyScorer.js
var UG = [void 0, []];
function WG(e, t, n = 0, r = 0) {
	let i = t;
	return i.values && i.values.length > 1 ? GG(e, i.values, n, r) : KG(e, t, n, r);
}
function GG(e, t, n, r) {
	let i = 0, a = [];
	for (let o of t) {
		let [t, s] = KG(e, o, n, r);
		if (typeof t != "number") return UG;
		i += t, a.push(...s);
	}
	return [i, qG(a)];
}
function KG(e, t, n, r) {
	let i = da(t.original, t.originalLowercase, n, e, e.toLowerCase(), r, {
		firstMatchCanBeWeak: !0,
		boostFullMatch: !0
	});
	return i ? [i[0], Cl(i)] : UG;
}
Object.freeze({ score: 0 });
function qG(e) {
	let t = e.sort((e, t) => e.start - t.start), n = [], r;
	for (let e of t) !r || !JG(r, e) ? (r = e, n.push(e)) : (r.start = Math.min(r.start, e.start), r.end = Math.max(r.end, e.end));
	return n;
}
function JG(e, t) {
	return !(e.end < t.start || t.end < e.start);
}
function YG(e) {
	return e.startsWith("\"") && e.endsWith("\"");
}
var XG = " ";
function ZG(e) {
	typeof e != "string" && (e = "");
	let t = e.toLowerCase(), { pathNormalized: n, normalized: r, normalizedLowercase: i } = QG(e), a = n.indexOf(m) >= 0, o = YG(e), s, c = e.split(XG);
	if (c.length > 1) for (let e of c) {
		let t = YG(e), { pathNormalized: n, normalized: r, normalizedLowercase: i } = QG(e);
		r && (s ||= [], s.push({
			original: e,
			originalLowercase: e.toLowerCase(),
			pathNormalized: n,
			normalized: r,
			normalizedLowercase: i,
			expectContiguousMatch: t
		}));
	}
	return {
		original: e,
		originalLowercase: t,
		pathNormalized: n,
		normalized: r,
		normalizedLowercase: i,
		values: s,
		containsPathSeparator: a,
		expectContiguousMatch: o
	};
}
function QG(e) {
	let t;
	t = mo ? e.replace(/\//g, m) : e.replace(/\\/g, m);
	let n = Ts(t).replace(/\s|"/g, "");
	return {
		pathNormalized: t,
		normalized: n,
		normalizedLowercase: n.toLowerCase()
	};
}
function $G(e) {
	return ZG(Array.isArray(e) ? e.map((e) => e.original).join(XG) : e.original);
}
// ../../../node_modules/.pnpm/monaco-editor@0.52.2/node_modules/monaco-editor/esm/vs/editor/contrib/quickAccess/browser/gotoSymbolQuickAccess.js
var eK = function(e, t, n, r) {
	var i = arguments.length, a = i < 3 ? t : r === null ? r = Object.getOwnPropertyDescriptor(t, n) : r, o;
	if (typeof Reflect == "object" && typeof Reflect.decorate == "function") a = Reflect.decorate(e, t, n, r);
	else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (i < 3 ? o(a) : i > 3 ? o(t, n, a) : o(t, n)) || a);
	return i > 3 && a && Object.defineProperty(t, n, a), a;
}, tK = function(e, t) {
	return function(n, r) {
		t(n, r, e);
	};
}, nK, rK = class extends LG {
	static {
		nK = this;
	}
	static {
		this.PREFIX = "@";
	}
	static {
		this.SCOPE_PREFIX = ":";
	}
	static {
		this.PREFIX_BY_CATEGORY = `${this.PREFIX}${this.SCOPE_PREFIX}`;
	}
	constructor(e, t, n = Object.create(null)) {
		super(n), this._languageFeaturesService = e, this._outlineModelService = t, this.options = n, this.options.canAcceptInBackground = !0;
	}
	provideWithoutTextEditor(e) {
		return this.provideLabelPick(e, B("cannotRunGotoSymbolWithoutEditor", "To go to a symbol, first open a text editor with symbol information.")), U.None;
	}
	provideWithTextEditor(e, t, n, r) {
		let i = e.editor, a = this.getModel(i);
		return a ? this._languageFeaturesService.documentSymbolProvider.has(a) ? this.doProvideWithEditorSymbols(e, a, t, n, r) : this.doProvideWithoutEditorSymbols(e, a, t, n) : U.None;
	}
	doProvideWithoutEditorSymbols(e, t, n, r) {
		let i = new g();
		return this.provideLabelPick(n, B("cannotRunGotoSymbolWithoutSymbolProvider", "The active text editor does not provide symbol information.")), (async () => {
			await this.waitForLanguageSymbolRegistry(t, i) && !r.isCancellationRequested && i.add(this.doProvideWithEditorSymbols(e, t, n, r));
		})(), i;
	}
	provideLabelPick(e, t) {
		e.items = [{
			label: t,
			index: 0,
			kind: 14
		}], e.ariaLabel = t;
	}
	async waitForLanguageSymbolRegistry(e, t) {
		if (this._languageFeaturesService.documentSymbolProvider.has(e)) return !0;
		let n = new vr(), r = t.add(this._languageFeaturesService.documentSymbolProvider.onDidChange(() => {
			this._languageFeaturesService.documentSymbolProvider.has(e) && (r.dispose(), n.complete(!0));
		}));
		return t.add(Gt(() => n.complete(!1))), n.p;
	}
	doProvideWithEditorSymbols(e, t, n, r, i) {
		let a = e.editor, o = new g();
		o.add(n.onDidAccept((t) => {
			let [r] = n.selectedItems;
			r && r.range && (this.gotoLocation(e, {
				range: r.range.selection,
				keyMods: n.keyMods,
				preserveFocus: t.inBackground
			}), i?.handleAccept?.(r), t.inBackground || n.hide());
		})), o.add(n.onDidTriggerItemButton(({ item: t }) => {
			t && t.range && (this.gotoLocation(e, {
				range: t.range.selection,
				keyMods: n.keyMods,
				forceSideBySide: !0
			}), n.hide());
		}));
		let s = this.getDocumentSymbols(t, r), c, l = async (e) => {
			c?.dispose(!0), n.busy = !1, c = new Cn(r), n.busy = !0;
			try {
				let i = ZG(n.value.substr(nK.PREFIX.length).trim()), a = await this.doGetSymbolPicks(s, i, void 0, c.token, t);
				if (r.isCancellationRequested) return;
				if (a.length > 0) {
					if (n.items = a, e && i.original.length === 0) {
						let t = El(a, (t) => !!(t.type !== "separator" && t.range && E.containsPosition(t.range.decoration, e)));
						t && (n.activeItems = [t]);
					}
				} else i.original.length > 0 ? this.provideLabelPick(n, B("noMatchingSymbolResults", "No matching editor symbols")) : this.provideLabelPick(n, B("noSymbolResults", "No editor symbols"));
			} finally {
				r.isCancellationRequested || (n.busy = !1);
			}
		};
		return o.add(n.onDidChangeValue(() => l(void 0))), l(a.getSelection()?.getPosition()), o.add(n.onDidChangeActive(() => {
			let [e] = n.activeItems;
			e && e.range && (a.revealRangeInCenter(e.range.selection, 0), this.addDecorations(a, e.range.decoration));
		})), o;
	}
	async doGetSymbolPicks(e, t, n, r, i) {
		let a = await e;
		if (r.isCancellationRequested) return [];
		let o = t.original.indexOf(nK.SCOPE_PREFIX) === 0, s = +!!o, c, l;
		t.values && t.values.length > 1 ? (c = $G(t.values[0]), l = $G(t.values.slice(1))) : c = t;
		let u, d = this.options?.openSideBySideDirection?.();
		d && (u = [{
			iconClass: d === "right" ? _l.asClassName(v.splitHorizontal) : _l.asClassName(v.splitVertical),
			tooltip: d === "right" ? B("openToSide", "Open to the Side") : B("openToBottom", "Open to the Bottom")
		}]);
		let f = [];
		for (let e = 0; e < a.length; e++) {
			let r = a[e], o = uc(r.name), d = `$(${wl.toIcon(r.kind).id}) ${o}`, p = d.length - o.length, m = r.containerName;
			n?.extraContainerLabel && (m = m ? `${n.extraContainerLabel} • ${m}` : n.extraContainerLabel);
			let h, ee, te, ne;
			if (t.original.length > s) {
				let e = !1;
				if (c !== t && ([h, ee] = WG(d, {
					...t,
					values: void 0
				}, s, p), typeof h == "number" && (e = !0)), typeof h != "number" && ([h, ee] = WG(d, c, s, p), typeof h != "number")) continue;
				if (!e && l) {
					if (m && l.original.length > 0 && ([te, ne] = WG(m, l)), typeof te != "number") continue;
					typeof h == "number" && (h += te);
				}
			}
			let re = r.tags && r.tags.indexOf(1) >= 0;
			f.push({
				index: e,
				kind: r.kind,
				score: h,
				label: d,
				ariaLabel: pl(r.name, r.kind),
				description: m,
				highlights: re ? void 0 : {
					label: ee,
					description: ne
				},
				range: {
					selection: E.collapseToStart(r.selectionRange),
					decoration: r.range
				},
				uri: i.uri,
				symbolName: o,
				strikethrough: re,
				buttons: u
			});
		}
		let p = f.sort((e, t) => o ? this.compareByKindAndScore(e, t) : this.compareByScore(e, t)), m = [];
		if (o) {
			let e, t, n = 0;
			function r() {
				t && typeof e == "number" && n > 0 && (t.label = nt(aK[e] || iK, n));
			}
			for (let i of p) e === i.kind ? n++ : (r(), e = i.kind, n = 1, t = { type: "separator" }, m.push(t)), m.push(i);
			r();
		} else p.length > 0 && (m = [{
			label: B("symbols", "symbols ({0})", f.length),
			type: "separator"
		}, ...p]);
		return m;
	}
	compareByScore(e, t) {
		if (typeof e.score != "number" && typeof t.score == "number") return 1;
		if (typeof e.score == "number" && typeof t.score != "number") return -1;
		if (typeof e.score == "number" && typeof t.score == "number") {
			if (e.score > t.score) return -1;
			if (e.score < t.score) return 1;
		}
		return e.index < t.index ? -1 : +(e.index > t.index);
	}
	compareByKindAndScore(e, t) {
		let n = aK[e.kind] || iK, r = aK[t.kind] || iK, i = n.localeCompare(r);
		return i === 0 ? this.compareByScore(e, t) : i;
	}
	async getDocumentSymbols(e, t) {
		let n = await this._outlineModelService.getOrCreate(e, t);
		return t.isCancellationRequested ? [] : n.asListOfDocumentSymbols();
	}
};
rK = nK = eK([tK(0, M), tK(1, uN)], rK);
var iK = B("property", "properties ({0})"), aK = {
	5: B("method", "methods ({0})"),
	11: B("function", "functions ({0})"),
	8: B("_constructor", "constructors ({0})"),
	12: B("variable", "variables ({0})"),
	4: B("class", "classes ({0})"),
	22: B("struct", "structs ({0})"),
	23: B("event", "events ({0})"),
	24: B("operator", "operators ({0})"),
	10: B("interface", "interfaces ({0})"),
	2: B("namespace", "namespaces ({0})"),
	3: B("package", "packages ({0})"),
	25: B("typeParameter", "type parameters ({0})"),
	1: B("modules", "modules ({0})"),
	6: B("property", "properties ({0})"),
	9: B("enum", "enumerations ({0})"),
	21: B("enumMember", "enumeration members ({0})"),
	14: B("string", "strings ({0})"),
	0: B("file", "files ({0})"),
	17: B("array", "arrays ({0})"),
	15: B("number", "numbers ({0})"),
	16: B("boolean", "booleans ({0})"),
	18: B("object", "objects ({0})"),
	19: B("key", "keys ({0})"),
	7: B("field", "fields ({0})"),
	13: B("constant", "constants ({0})")
}, oK = function(e, t, n, r) {
	var i = arguments.length, a = i < 3 ? t : r === null ? r = Object.getOwnPropertyDescriptor(t, n) : r, o;
	if (typeof Reflect == "object" && typeof Reflect.decorate == "function") a = Reflect.decorate(e, t, n, r);
	else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (i < 3 ? o(a) : i > 3 ? o(t, n, a) : o(t, n)) || a);
	return i > 3 && a && Object.defineProperty(t, n, a), a;
}, sK = function(e, t) {
	return function(n, r) {
		t(n, r, e);
	};
}, cK = class extends rK {
	constructor(e, t, n) {
		super(t, n), this.editorService = e, this.onDidActiveTextEditorControlChange = wt.None;
	}
	get activeTextEditorControl() {
		return this.editorService.getFocusedCodeEditor() ?? void 0;
	}
};
cK = oK([
	sK(0, Ln),
	sK(1, M),
	sK(2, uN)
], cK);
var lK = class e extends O {
	static {
		this.ID = "editor.action.quickOutline";
	}
	constructor() {
		super({
			id: e.ID,
			label: Nr.quickOutlineActionLabel,
			alias: "Go to Symbol...",
			precondition: I.hasDocumentSymbolProvider,
			kbOpts: {
				kbExpr: I.focus,
				primary: 3117,
				weight: 100
			},
			contextMenuOpts: {
				group: "navigation",
				order: 3
			}
		});
	}
	run(e) {
		e.get(Is).quickAccess.show(rK.PREFIX, { itemActivation: xc.NONE });
	}
};
k(lK), Js.as(Ca.Quickaccess).registerQuickAccessProvider({
	ctor: cK,
	prefix: rK.PREFIX,
	helpEntries: [{
		description: Nr.quickOutlineActionLabel,
		prefix: rK.PREFIX,
		commandId: lK.ID
	}, {
		description: Nr.quickOutlineByCategoryActionLabel,
		prefix: rK.PREFIX_BY_CATEGORY
	}]
});
// ../../../node_modules/.pnpm/monaco-editor@0.52.2/node_modules/monaco-editor/esm/vs/base/common/tfIdf.js
function uK(e) {
	let t = /* @__PURE__ */ new Map();
	for (let n of e) t.set(n, (t.get(n) ?? 0) + 1);
	return t;
}
var dK = class e {
	constructor() {
		this.chunkCount = 0, this.chunkOccurrences = /* @__PURE__ */ new Map(), this.documents = /* @__PURE__ */ new Map();
	}
	calculateScores(e, t) {
		let n = this.computeEmbedding(e), r = /* @__PURE__ */ new Map(), i = [];
		for (let [e, a] of this.documents) {
			if (t.isCancellationRequested) return [];
			for (let t of a.chunks) {
				let a = this.computeSimilarityScore(t, n, r);
				a > 0 && i.push({
					key: e,
					score: a
				});
			}
		}
		return i;
	}
	static termFrequencies(t) {
		return uK(e.splitTerms(t));
	}
	static *splitTerms(e) {
		let t = (e) => e.toLowerCase();
		for (let [n] of e.matchAll(/\b\p{Letter}[\p{Letter}\d]{2,}\b/gu)) {
			yield t(n);
			let e = n.replace(/([a-z])([A-Z])/g, "$1 $2").split(/\s+/g);
			if (e.length > 1) for (let n of e) n.length > 2 && /\p{Letter}{3,}/gu.test(n) && (yield t(n));
		}
	}
	updateDocuments(t) {
		for (let { key: e } of t) this.deleteDocument(e);
		for (let n of t) {
			let t = [];
			for (let r of n.textChunks) {
				let n = e.termFrequencies(r);
				for (let e of n.keys()) this.chunkOccurrences.set(e, (this.chunkOccurrences.get(e) ?? 0) + 1);
				t.push({
					text: r,
					tf: n
				});
			}
			this.chunkCount += t.length, this.documents.set(n.key, { chunks: t });
		}
		return this;
	}
	deleteDocument(e) {
		let t = this.documents.get(e);
		if (t) {
			this.documents.delete(e), this.chunkCount -= t.chunks.length;
			for (let e of t.chunks) for (let t of e.tf.keys()) {
				let e = this.chunkOccurrences.get(t);
				if (typeof e == "number") {
					let n = e - 1;
					n <= 0 ? this.chunkOccurrences.delete(t) : this.chunkOccurrences.set(t, n);
				}
			}
		}
	}
	computeSimilarityScore(e, t, n) {
		let r = 0;
		for (let [i, a] of Object.entries(t)) {
			let t = e.tf.get(i);
			if (!t) continue;
			let o = n.get(i);
			typeof o != "number" && (o = this.computeIdf(i), n.set(i, o));
			let s = t * o;
			r += s * a;
		}
		return r;
	}
	computeEmbedding(t) {
		let n = e.termFrequencies(t);
		return this.computeTfidf(n);
	}
	computeIdf(e) {
		let t = this.chunkOccurrences.get(e) ?? 0;
		return t > 0 ? Math.log((this.chunkCount + 1) / t) : 0;
	}
	computeTfidf(e) {
		let t = Object.create(null);
		for (let [n, r] of e) {
			let e = this.computeIdf(n);
			e > 0 && (t[n] = r * e);
		}
		return t;
	}
};
function fK(e) {
	let t = e.slice(0);
	t.sort((e, t) => t.score - e.score);
	let n = t[0]?.score ?? 0;
	if (n > 0) for (let e of t) e.score /= n;
	return t;
}
// ../../../node_modules/.pnpm/monaco-editor@0.52.2/node_modules/monaco-editor/esm/vs/platform/quickinput/browser/pickerQuickAccess.js
var pK;
(function(e) {
	e[e.NO_ACTION = 0] = "NO_ACTION", e[e.CLOSE_PICKER = 1] = "CLOSE_PICKER", e[e.REFRESH_PICKER = 2] = "REFRESH_PICKER", e[e.REMOVE_ITEM = 3] = "REMOVE_ITEM";
})(pK ||= {});
function mK(e) {
	let t = e;
	return Array.isArray(t.items);
}
function hK(e) {
	let t = e;
	return !!t.picks && t.additionalPicks instanceof Promise;
}
var gK = class extends U {
	constructor(e, t) {
		super(), this.prefix = e, this.options = t;
	}
	provide(e, t, n) {
		let r = new g();
		e.canAcceptInBackground = !!this.options?.canAcceptInBackground, e.matchOnLabel = e.matchOnDescription = e.matchOnDetail = e.sortByLabel = !1;
		let i, a = r.add(new Zr()), o = async () => {
			let r = a.value = new g();
			i?.dispose(!0), e.busy = !1, i = new Cn(t);
			let o = i.token, s = e.value.substring(this.prefix.length);
			this.options?.shouldSkipTrimPickFilter || (s = s.trim());
			let c = this._getPicks(s, r, o, n), l = (t, n) => {
				let r, i;
				if (mK(t) ? (r = t.items, i = t.active) : r = t, r.length === 0) {
					if (n) return !1;
					(s.length > 0 || e.hideInput) && this.options?.noResultsPick && (r = Ir(this.options.noResultsPick) ? [this.options.noResultsPick(s)] : [this.options.noResultsPick]);
				}
				return e.items = r, i && (e.activeItems = [i]), !0;
			}, u = async (t) => {
				let n = !1, r = !1;
				await Promise.all([(async () => {
					typeof t.mergeDelay == "number" && (await Io(t.mergeDelay), o.isCancellationRequested) || r || (n = l(t.picks, !0));
				})(), (async () => {
					e.busy = !0;
					try {
						let r = await t.additionalPicks;
						if (o.isCancellationRequested) return;
						let i, a;
						mK(t.picks) ? (i = t.picks.items, a = t.picks.active) : i = t.picks;
						let s, c;
						if (mK(r) ? (s = r.items, c = r.active) : s = r, s.length > 0 || !n) {
							let t;
							if (!a && !c) {
								let n = e.activeItems[0];
								n && i.indexOf(n) !== -1 && (t = n);
							}
							l({
								items: [...i, ...s],
								active: a || c || t
							});
						}
					} finally {
						o.isCancellationRequested || (e.busy = !1), r = !0;
					}
				})()]);
			};
			if (c !== null) {
				if (hK(c)) await u(c);
				else if (!(c instanceof Promise)) l(c);
				else {
					e.busy = !0;
					try {
						let e = await c;
						if (o.isCancellationRequested) return;
						hK(e) ? await u(e) : l(e);
					} finally {
						o.isCancellationRequested || (e.busy = !1);
					}
				}
			}
		};
		r.add(e.onDidChangeValue(() => o())), o(), r.add(e.onDidAccept((t) => {
			if (n?.handleAccept) {
				t.inBackground || e.hide(), n.handleAccept?.(e.activeItems[0]);
				return;
			}
			let [r] = e.selectedItems;
			typeof r?.accept == "function" && (t.inBackground || e.hide(), r.accept(e.keyMods, t));
		}));
		let s = async (n, r) => {
			if (typeof r.trigger != "function") return;
			let i = r.buttons?.indexOf(n) ?? -1;
			if (i >= 0) {
				let n = r.trigger(i, e.keyMods), a = typeof n == "number" ? n : await n;
				if (t.isCancellationRequested) return;
				switch (a) {
					case pK.NO_ACTION: break;
					case pK.CLOSE_PICKER:
						e.hide();
						break;
					case pK.REFRESH_PICKER:
						o();
						break;
					case pK.REMOVE_ITEM: {
						let t = e.items.indexOf(r);
						if (t !== -1) {
							let n = e.items.slice(), r = n.splice(t, 1), i = e.activeItems.filter((e) => e !== r[0]), a = e.keepScrollPosition;
							e.keepScrollPosition = !0, e.items = n, i && (e.activeItems = i), e.keepScrollPosition = a;
						}
						break;
					}
				}
			}
		};
		return r.add(e.onDidTriggerItemButton(({ button: e, item: t }) => s(e, t))), r.add(e.onDidTriggerSeparatorButton(({ button: e, separator: t }) => s(e, t))), r;
	}
}, _K = function(e, t, n, r) {
	var i = arguments.length, a = i < 3 ? t : r === null ? r = Object.getOwnPropertyDescriptor(t, n) : r, o;
	if (typeof Reflect == "object" && typeof Reflect.decorate == "function") a = Reflect.decorate(e, t, n, r);
	else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (i < 3 ? o(a) : i > 3 ? o(t, n, a) : o(t, n)) || a);
	return i > 3 && a && Object.defineProperty(t, n, a), a;
}, vK = function(e, t) {
	return function(n, r) {
		t(n, r, e);
	};
}, yK, bK, xK = class extends gK {
	static {
		yK = this;
	}
	static {
		this.PREFIX = ">";
	}
	static {
		this.TFIDF_THRESHOLD = .5;
	}
	static {
		this.TFIDF_MAX_RESULTS = 5;
	}
	static {
		this.WORD_FILTER = Le(_e, Ar, yr);
	}
	constructor(e, t, n, r, i, a) {
		super(yK.PREFIX, e), this.instantiationService = t, this.keybindingService = n, this.commandService = r, this.telemetryService = i, this.dialogService = a, this.commandsHistory = this._register(this.instantiationService.createInstance(SK)), this.options = e;
	}
	async _getPicks(e, t, n, r) {
		let i = await this.getCommandPicks(n);
		if (n.isCancellationRequested) return [];
		let a = tc(() => {
			let t = new dK();
			return t.updateDocuments(i.map((e) => ({
				key: e.commandId,
				textChunks: [this.getTfIdfChunk(e)]
			}))), fK(t.calculateScores(e, n)).filter((e) => e.score > yK.TFIDF_THRESHOLD).slice(0, yK.TFIDF_MAX_RESULTS);
		}), o = [];
		for (let t of i) {
			let r = yK.WORD_FILTER(e, t.label) ?? void 0, i = t.commandAlias ? yK.WORD_FILTER(e, t.commandAlias) ?? void 0 : void 0;
			if (r || i) t.highlights = {
				label: r,
				detail: this.options.showAlias ? i : void 0
			}, o.push(t);
			else if (e === t.commandId) o.push(t);
			else if (e.length >= 3) {
				let e = a();
				if (n.isCancellationRequested) return [];
				let r = e.find((e) => e.key === t.commandId);
				r && (t.tfIdfScore = r.score, o.push(t));
			}
		}
		let s = /* @__PURE__ */ new Map();
		for (let e of o) {
			let t = s.get(e.label);
			t ? (e.description = e.commandId, t.description = t.commandId) : s.set(e.label, e);
		}
		o.sort((e, t) => {
			if (e.tfIdfScore && t.tfIdfScore) return e.tfIdfScore === t.tfIdfScore ? e.label.localeCompare(t.label) : t.tfIdfScore - e.tfIdfScore;
			if (e.tfIdfScore) return 1;
			if (t.tfIdfScore) return -1;
			let n = this.commandsHistory.peek(e.commandId), r = this.commandsHistory.peek(t.commandId);
			if (n && r) return n > r ? -1 : 1;
			if (n) return -1;
			if (r) return 1;
			if (this.options.suggestedCommandIds) {
				let n = this.options.suggestedCommandIds.has(e.commandId), r = this.options.suggestedCommandIds.has(t.commandId);
				if (n && r) return 0;
				if (n) return -1;
				if (r) return 1;
			}
			return e.label.localeCompare(t.label);
		});
		let c = [], l = !1, u = !0, d = !!this.options.suggestedCommandIds;
		for (let e = 0; e < o.length; e++) {
			let t = o[e];
			e === 0 && this.commandsHistory.peek(t.commandId) && (c.push({
				type: "separator",
				label: B("recentlyUsed", "recently used")
			}), l = !0), u && t.tfIdfScore !== void 0 && (c.push({
				type: "separator",
				label: B("suggested", "similar commands")
			}), u = !1), d && t.tfIdfScore === void 0 && !this.commandsHistory.peek(t.commandId) && this.options.suggestedCommandIds?.has(t.commandId) && (c.push({
				type: "separator",
				label: B("commonlyUsed", "commonly used")
			}), l = !0, d = !1), l && t.tfIdfScore === void 0 && !this.commandsHistory.peek(t.commandId) && !this.options.suggestedCommandIds?.has(t.commandId) && (c.push({
				type: "separator",
				label: B("morecCommands", "other commands")
			}), l = !1), c.push(this.toCommandPick(t, r));
		}
		return this.hasAdditionalCommandPicks(e, n) ? {
			picks: c,
			additionalPicks: (async () => {
				let t = await this.getAdditionalCommandPicks(i, o, e, n);
				if (n.isCancellationRequested) return [];
				let a = t.map((e) => this.toCommandPick(e, r));
				return u && a[0]?.type !== "separator" && a.unshift({
					type: "separator",
					label: B("suggested", "similar commands")
				}), a;
			})()
		} : c;
	}
	toCommandPick(e, t) {
		if (e.type === "separator") return e;
		let n = this.keybindingService.lookupKeybinding(e.commandId), r = n ? B("commandPickAriaLabelWithKeybinding", "{0}, {1}", e.label, n.getAriaLabel()) : e.label;
		return {
			...e,
			ariaLabel: r,
			detail: this.options.showAlias && e.commandAlias !== e.label ? e.commandAlias : void 0,
			keybinding: n,
			accept: async () => {
				this.commandsHistory.push(e.commandId), this.telemetryService.publicLog2("workbenchActionExecuted", {
					id: e.commandId,
					from: t?.from ?? "quick open"
				});
				try {
					e.args?.length ? await this.commandService.executeCommand(e.commandId, ...e.args) : await this.commandService.executeCommand(e.commandId);
				} catch (t) {
					Li(t) || this.dialogService.error(B("canNotRun", "Command '{0}' resulted in an error", e.label), ZS(t));
				}
			}
		};
	}
	getTfIdfChunk({ label: e, commandAlias: t, commandDescription: n }) {
		let r = e;
		return t && t !== e && (r += ` - ${t}`), n && n.value !== e && (r += ` - ${n.value === n.original ? n.value : `${n.value} (${n.original})`}`), r;
	}
};
xK = yK = _K([
	vK(1, P),
	vK(2, ft),
	vK(3, ga),
	vK(4, mc),
	vK(5, Mc)
], xK);
var SK = class extends U {
	static {
		bK = this;
	}
	static {
		this.DEFAULT_COMMANDS_HISTORY_LENGTH = 50;
	}
	static {
		this.PREF_KEY_CACHE = "commandPalette.mru.cache";
	}
	static {
		this.PREF_KEY_COUNTER = "commandPalette.mru.counter";
	}
	static {
		this.counter = 1;
	}
	static {
		this.hasChanges = !1;
	}
	constructor(e, t, n) {
		super(), this.storageService = e, this.configurationService = t, this.logService = n, this.configuredCommandsHistoryLength = 0, this.updateConfiguration(), this.load(), this.registerListeners();
	}
	registerListeners() {
		this._register(this.configurationService.onDidChangeConfiguration((e) => this.updateConfiguration(e))), this._register(this.storageService.onWillSaveState((e) => {
			e.reason === Pl.SHUTDOWN && this.saveState();
		}));
	}
	updateConfiguration(e) {
		(!e || e.affectsConfiguration("workbench.commandPalette.history")) && (this.configuredCommandsHistoryLength = bK.getConfiguredCommandHistoryLength(this.configurationService), bK.cache && bK.cache.limit !== this.configuredCommandsHistoryLength && (bK.cache.limit = this.configuredCommandsHistoryLength, bK.hasChanges = !0));
	}
	load() {
		let e = this.storageService.get(bK.PREF_KEY_CACHE, 0), t;
		if (e) try {
			t = JSON.parse(e);
		} catch (e) {
			this.logService.error(`[CommandsHistory] invalid data: ${e}`);
		}
		let n = bK.cache = new Fn(this.configuredCommandsHistoryLength, 1);
		if (t) {
			let e;
			e = t.usesLRU ? t.entries : t.entries.sort((e, t) => e.value - t.value), e.forEach((e) => n.set(e.key, e.value));
		}
		bK.counter = this.storageService.getNumber(bK.PREF_KEY_COUNTER, 0, bK.counter);
	}
	push(e) {
		bK.cache && (bK.cache.set(e, bK.counter++), bK.hasChanges = !0);
	}
	peek(e) {
		return bK.cache?.peek(e);
	}
	saveState() {
		if (!bK.cache || !bK.hasChanges) return;
		let e = {
			usesLRU: !0,
			entries: []
		};
		bK.cache.forEach((t, n) => e.entries.push({
			key: n,
			value: t
		})), this.storageService.store(bK.PREF_KEY_CACHE, JSON.stringify(e), 0, 0), this.storageService.store(bK.PREF_KEY_COUNTER, bK.counter, 0, 0), bK.hasChanges = !1;
	}
	static getConfiguredCommandHistoryLength(e) {
		let t = e.getValue().workbench?.commandPalette?.history;
		return typeof t == "number" ? t : bK.DEFAULT_COMMANDS_HISTORY_LENGTH;
	}
};
SK = bK = _K([
	vK(0, ur),
	vK(1, Fl),
	vK(2, ks)
], SK);
// ../../../node_modules/.pnpm/monaco-editor@0.52.2/node_modules/monaco-editor/esm/vs/editor/contrib/quickAccess/browser/commandsQuickAccess.js
var CK = class extends xK {
	constructor(e, t, n, r, i, a) {
		super(e, t, n, r, i, a);
	}
	getCodeEditorCommandPicks() {
		let e = this.activeTextEditorControl;
		if (!e) return [];
		let t = [];
		for (let n of e.getSupportedActions()) {
			let e;
			n.metadata?.description && (e = le(n.metadata.description) ? n.metadata.description : {
				original: n.metadata.description,
				value: n.metadata.description
			}), t.push({
				commandId: n.id,
				commandAlias: n.alias,
				commandDescription: e,
				label: _o(n.label) || n.id
			});
		}
		return t;
	}
}, wK = function(e, t, n, r) {
	var i = arguments.length, a = i < 3 ? t : r === null ? r = Object.getOwnPropertyDescriptor(t, n) : r, o;
	if (typeof Reflect == "object" && typeof Reflect.decorate == "function") a = Reflect.decorate(e, t, n, r);
	else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (i < 3 ? o(a) : i > 3 ? o(t, n, a) : o(t, n)) || a);
	return i > 3 && a && Object.defineProperty(t, n, a), a;
}, TK = function(e, t) {
	return function(n, r) {
		t(n, r, e);
	};
}, EK = class extends CK {
	get activeTextEditorControl() {
		return this.codeEditorService.getFocusedCodeEditor() ?? void 0;
	}
	constructor(e, t, n, r, i, a) {
		super({ showAlias: !1 }, e, n, r, i, a), this.codeEditorService = t;
	}
	async getCommandPicks() {
		return this.getCodeEditorCommandPicks();
	}
	hasAdditionalCommandPicks() {
		return !1;
	}
	async getAdditionalCommandPicks() {
		return [];
	}
};
EK = wK([
	TK(0, P),
	TK(1, Ln),
	TK(2, ft),
	TK(3, ga),
	TK(4, mc),
	TK(5, Mc)
], EK);
var DK = class e extends O {
	static {
		this.ID = "editor.action.quickCommand";
	}
	constructor() {
		super({
			id: e.ID,
			label: be.quickCommandActionLabel,
			alias: "Command Palette",
			precondition: void 0,
			kbOpts: {
				kbExpr: I.focus,
				primary: 59,
				weight: 100
			},
			contextMenuOpts: {
				group: "z_commands",
				order: 1
			}
		});
	}
	run(e) {
		e.get(Is).quickAccess.show(EK.PREFIX);
	}
};
k(DK), Js.as(Ca.Quickaccess).registerQuickAccessProvider({
	ctor: EK,
	prefix: EK.PREFIX,
	helpEntries: [{
		description: be.quickCommandHelp,
		commandId: DK.ID
	}]
});
// ../../../node_modules/.pnpm/monaco-editor@0.52.2/node_modules/monaco-editor/esm/vs/editor/standalone/browser/referenceSearch/standaloneReferenceSearch.js
var OK = function(e, t, n, r) {
	var i = arguments.length, a = i < 3 ? t : r === null ? r = Object.getOwnPropertyDescriptor(t, n) : r, o;
	if (typeof Reflect == "object" && typeof Reflect.decorate == "function") a = Reflect.decorate(e, t, n, r);
	else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (i < 3 ? o(a) : i > 3 ? o(t, n, a) : o(t, n)) || a);
	return i > 3 && a && Object.defineProperty(t, n, a), a;
}, kK = function(e, t) {
	return function(n, r) {
		t(n, r, e);
	};
}, AK = class extends uO {
	constructor(e, t, n, r, i, a, o) {
		super(!0, e, t, n, r, i, a, o);
	}
};
AK = OK([
	kK(1, j),
	kK(2, Ln),
	kK(3, t),
	kK(4, P),
	kK(5, ur),
	kK(6, Fl)
], AK), T(uO.ID, AK, 4), k(class extends O {
	constructor() {
		super({
			id: "editor.action.toggleHighContrast",
			label: Be.toggleHighContrast,
			alias: "Toggle High Contrast Theme",
			precondition: void 0
		}), this._originalThemeName = null;
	}
	run(e, t) {
		let n = e.get(re), r = n.getColorTheme();
		Sc(r.type) ? (n.setTheme(this._originalThemeName || (Ls(r.type) ? "vs-dark" : "vs")), this._originalThemeName = null) : (n.setTheme(Ls(r.type) ? Uo : _n), this._originalThemeName = r.themeName);
	}
});
export { Np as $, ju as $t, oh as A, G as An, bf as At, xm as B, Cf as Bt, Nh as C, Bu as Cn, Kf as Ct, X as D, hu as Dn, Tf as Dt, ph as E, wu as En, Rf as Et, Dm as F, W as Fn, Hf as Ft, tm as G, Ed as Gt, Cm as H, Yd as Ht, wm as I, mf as It, Xp as J, Vu as Jt, Yp as K, Sd as Kt, ym as L, Ff as Lt, uh as M, Ql as Mn, jf as Mt, dh as N, Xl as Nn, Gf as Nt, ah as O, du as On, Of as Ot, Am as P, Zl as Pn, Nf as Pt, am as Q, od as Qt, _m as R, fp as Rt, Lh as S, Au as Sn, hf as St, fh as T, ku as Tn, zf as Tt, lm as U, Hd as Ut, Sm as V, sf as Vt, em as W, Ud as Wt, $p as X, Du as Xt, Zp as Y, qu as Yt, om as Z, Uu as Zt, qh as _, Gu as _n, Yf as _t, Nv as a, sd as an, Fp as at, Uh as b, fd as bn, Lf as bt, hv as c, Ru as cn, _p as ct, N_ as d, Wu as dn, ap as dt, td as en, jp as et, I_ as f, Yu as fn, lp as ft, og as g, Hu as gn, Xf as gt, C_ as h, Xu as hn, J as ht, Fb as i, Fu as in, Ip as it, ch as j, eu as jn, If as jt, sh as k, lu as kn, Pf as kt, L_ as l, rd as ln, hp as lt, O_ as m, Ju as mn, Bf as mt, qb as n, Iu as nn, Ap as nt, Pv as o, gd as on, Y as ot, k_ as p, Eu as pn, np as pt, im as q, Mu as qt, Ub as r, Pu as rn, Mp as rt, xv as s, nd as sn, gp as st, gx as t, zu as tn, Pp as tt, R_ as u, pd as un, mp as ut, Yh as v, Ku as vn, rp as vt, Ph as w, Lu as wn, Wf as wt, Fh as x, Ou as xn, Uf as xt, Kh as y, ed as yn, xf as yt, bm as z, ff as zt };