@omniviewdev/editors 3.0.3 → 5.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,359 +1,359 @@
1
- import Ge, { forwardRef as ve, useRef as Y, useState as Ne, useMemo as pt, useEffect as z, useImperativeHandle as yt, useCallback as vt, Suspense as Dt, lazy as $t, Children as It, isValidElement as Wt, useId as Bt } from "react";
2
- import * as L from "monaco-editor";
3
- import { useTheme as zt, Checkbox as We, Separator as Ht, Blockquote as Ut, Link as Vt, Table as ye, CodeBlock as Ft, Code as Yt, Accordion as tt, CommandList as fe } from "@omniviewdev/base-ui";
4
- import qt from "remark-gfm";
5
- import Jt from "rehype-raw";
6
- import Gt, { defaultSchema as Be } from "rehype-sanitize";
1
+ import et, { forwardRef as _e, useRef as G, useState as me, useMemo as Oe, useEffect as U, useImperativeHandle as xt, useCallback as De, Suspense as kt, lazy as Rt, Children as Ft, isValidElement as Ut, useId as Yt, useLayoutEffect as St, useSyncExternalStore as Gt } from "react";
2
+ import { useTheme as Jt, Checkbox as Ve, Separator as Kt, Blockquote as Xt, Link as Zt, Table as be, CodeBlock as Qt, Code as er, Accordion as st, CommandList as ue, useCommandListConfig as tr, useCommandListStoreContext as rr, utf16ToUtf8 as nr, utf8ToUtf16 as or } from "@omniviewdev/base-ui";
3
+ import * as W from "monaco-editor";
4
+ import ir from "remark-gfm";
5
+ import sr from "rehype-raw";
6
+ import ar, { defaultSchema as Fe } from "rehype-sanitize";
7
7
  import "@xterm/xterm/css/xterm.css";
8
- var Se = { exports: {} }, ke = {};
9
- var rt;
10
- function Xt() {
11
- if (rt) return ke;
12
- rt = 1;
8
+ var je = { exports: {} }, Re = {};
9
+ var at;
10
+ function cr() {
11
+ if (at) return Re;
12
+ at = 1;
13
13
  var e = /* @__PURE__ */ Symbol.for("react.transitional.element"), t = /* @__PURE__ */ Symbol.for("react.fragment");
14
- function n(r, c, l) {
15
- var f = null;
16
- if (l !== void 0 && (f = "" + l), c.key !== void 0 && (f = "" + c.key), "key" in c) {
17
- l = {};
18
- for (var a in c)
19
- a !== "key" && (l[a] = c[a]);
20
- } else l = c;
21
- return c = l.ref, {
14
+ function r(n, c, i) {
15
+ var l = null;
16
+ if (i !== void 0 && (l = "" + i), c.key !== void 0 && (l = "" + c.key), "key" in c) {
17
+ i = {};
18
+ for (var d in c)
19
+ d !== "key" && (i[d] = c[d]);
20
+ } else i = c;
21
+ return c = i.ref, {
22
22
  $$typeof: e,
23
- type: r,
24
- key: f,
23
+ type: n,
24
+ key: l,
25
25
  ref: c !== void 0 ? c : null,
26
- props: l
26
+ props: i
27
27
  };
28
28
  }
29
- return ke.Fragment = t, ke.jsx = n, ke.jsxs = n, ke;
30
- }
31
- var xe = {};
32
- var nt;
33
- function Qt() {
34
- return nt || (nt = 1, process.env.NODE_ENV !== "production" && (function() {
35
- function e(o) {
36
- if (o == null) return null;
37
- if (typeof o == "function")
38
- return o.$$typeof === y ? null : o.displayName || o.name || null;
39
- if (typeof o == "string") return o;
40
- switch (o) {
41
- case j:
29
+ return Re.Fragment = t, Re.jsx = r, Re.jsxs = r, Re;
30
+ }
31
+ var Se = {};
32
+ var ct;
33
+ function lr() {
34
+ return ct || (ct = 1, process.env.NODE_ENV !== "production" && (function() {
35
+ function e(a) {
36
+ if (a == null) return null;
37
+ if (typeof a == "function")
38
+ return a.$$typeof === b ? null : a.displayName || a.name || null;
39
+ if (typeof a == "string") return a;
40
+ switch (a) {
41
+ case x:
42
42
  return "Fragment";
43
- case H:
43
+ case S:
44
44
  return "Profiler";
45
- case W:
45
+ case z:
46
46
  return "StrictMode";
47
- case D:
47
+ case N:
48
48
  return "Suspense";
49
- case V:
49
+ case q:
50
50
  return "SuspenseList";
51
- case ne:
51
+ case K:
52
52
  return "Activity";
53
53
  }
54
- if (typeof o == "object")
55
- switch (typeof o.tag == "number" && console.error(
54
+ if (typeof a == "object")
55
+ switch (typeof a.tag == "number" && console.error(
56
56
  "Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
57
- ), o.$$typeof) {
58
- case I:
57
+ ), a.$$typeof) {
58
+ case H:
59
59
  return "Portal";
60
- case J:
61
- return o.displayName || "Context";
62
- case q:
63
- return (o._context.displayName || "Context") + ".Consumer";
64
- case U:
65
- var _ = o.render;
66
- return o = o.displayName, o || (o = _.displayName || _.name || "", o = o !== "" ? "ForwardRef(" + o + ")" : "ForwardRef"), o;
60
+ case I:
61
+ return a.displayName || "Context";
62
+ case D:
63
+ return (a._context.displayName || "Context") + ".Consumer";
64
+ case B:
65
+ var w = a.render;
66
+ return a = a.displayName, a || (a = w.displayName || w.name || "", a = a !== "" ? "ForwardRef(" + a + ")" : "ForwardRef"), a;
67
67
  case P:
68
- return _ = o.displayName || null, _ !== null ? _ : e(o.type) || "Memo";
69
- case X:
70
- _ = o._payload, o = o._init;
68
+ return w = a.displayName || null, w !== null ? w : e(a.type) || "Memo";
69
+ case V:
70
+ w = a._payload, a = a._init;
71
71
  try {
72
- return e(o(_));
72
+ return e(a(w));
73
73
  } catch {
74
74
  }
75
75
  }
76
76
  return null;
77
77
  }
78
- function t(o) {
79
- return "" + o;
78
+ function t(a) {
79
+ return "" + a;
80
80
  }
81
- function n(o) {
81
+ function r(a) {
82
82
  try {
83
- t(o);
84
- var _ = !1;
83
+ t(a);
84
+ var w = !1;
85
85
  } catch {
86
- _ = !0;
86
+ w = !0;
87
87
  }
88
- if (_) {
89
- _ = console;
90
- var M = _.error, E = typeof Symbol == "function" && Symbol.toStringTag && o[Symbol.toStringTag] || o.constructor.name || "Object";
91
- return M.call(
92
- _,
88
+ if (w) {
89
+ w = console;
90
+ var A = w.error, L = typeof Symbol == "function" && Symbol.toStringTag && a[Symbol.toStringTag] || a.constructor.name || "Object";
91
+ return A.call(
92
+ w,
93
93
  "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
94
- E
95
- ), t(o);
94
+ L
95
+ ), t(a);
96
96
  }
97
97
  }
98
- function r(o) {
99
- if (o === j) return "<>";
100
- if (typeof o == "object" && o !== null && o.$$typeof === X)
98
+ function n(a) {
99
+ if (a === x) return "<>";
100
+ if (typeof a == "object" && a !== null && a.$$typeof === V)
101
101
  return "<...>";
102
102
  try {
103
- var _ = e(o);
104
- return _ ? "<" + _ + ">" : "<...>";
103
+ var w = e(a);
104
+ return w ? "<" + w + ">" : "<...>";
105
105
  } catch {
106
106
  return "<...>";
107
107
  }
108
108
  }
109
109
  function c() {
110
- var o = s.A;
111
- return o === null ? null : o.getOwner();
110
+ var a = o.A;
111
+ return a === null ? null : a.getOwner();
112
112
  }
113
- function l() {
113
+ function i() {
114
114
  return Error("react-stack-top-frame");
115
115
  }
116
- function f(o) {
117
- if (w.call(o, "key")) {
118
- var _ = Object.getOwnPropertyDescriptor(o, "key").get;
119
- if (_ && _.isReactWarning) return !1;
116
+ function l(a) {
117
+ if (v.call(a, "key")) {
118
+ var w = Object.getOwnPropertyDescriptor(a, "key").get;
119
+ if (w && w.isReactWarning) return !1;
120
120
  }
121
- return o.key !== void 0;
121
+ return a.key !== void 0;
122
122
  }
123
- function a(o, _) {
124
- function M() {
123
+ function d(a, w) {
124
+ function A() {
125
125
  u || (u = !0, console.error(
126
126
  "%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
127
- _
127
+ w
128
128
  ));
129
129
  }
130
- M.isReactWarning = !0, Object.defineProperty(o, "key", {
131
- get: M,
130
+ A.isReactWarning = !0, Object.defineProperty(a, "key", {
131
+ get: A,
132
132
  configurable: !0
133
133
  });
134
134
  }
135
- function v() {
136
- var o = e(this.type);
137
- return m[o] || (m[o] = !0, console.error(
135
+ function y() {
136
+ var a = e(this.type);
137
+ return f[a] || (f[a] = !0, console.error(
138
138
  "Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
139
- )), o = this.props.ref, o !== void 0 ? o : null;
140
- }
141
- function g(o, _, M, E, $, N) {
142
- var O = M.ref;
143
- return o = {
144
- $$typeof: C,
145
- type: o,
146
- key: _,
147
- props: M,
148
- _owner: E
149
- }, (O !== void 0 ? O : null) !== null ? Object.defineProperty(o, "ref", {
139
+ )), a = this.props.ref, a !== void 0 ? a : null;
140
+ }
141
+ function h(a, w, A, L, F, O) {
142
+ var $ = A.ref;
143
+ return a = {
144
+ $$typeof: R,
145
+ type: a,
146
+ key: w,
147
+ props: A,
148
+ _owner: L
149
+ }, ($ !== void 0 ? $ : null) !== null ? Object.defineProperty(a, "ref", {
150
150
  enumerable: !1,
151
- get: v
152
- }) : Object.defineProperty(o, "ref", { enumerable: !1, value: null }), o._store = {}, Object.defineProperty(o._store, "validated", {
151
+ get: y
152
+ }) : Object.defineProperty(a, "ref", { enumerable: !1, value: null }), a._store = {}, Object.defineProperty(a._store, "validated", {
153
153
  configurable: !1,
154
154
  enumerable: !1,
155
155
  writable: !0,
156
156
  value: 0
157
- }), Object.defineProperty(o, "_debugInfo", {
157
+ }), Object.defineProperty(a, "_debugInfo", {
158
158
  configurable: !1,
159
159
  enumerable: !1,
160
160
  writable: !0,
161
161
  value: null
162
- }), Object.defineProperty(o, "_debugStack", {
162
+ }), Object.defineProperty(a, "_debugStack", {
163
163
  configurable: !1,
164
164
  enumerable: !1,
165
165
  writable: !0,
166
- value: $
167
- }), Object.defineProperty(o, "_debugTask", {
166
+ value: F
167
+ }), Object.defineProperty(a, "_debugTask", {
168
168
  configurable: !1,
169
169
  enumerable: !1,
170
170
  writable: !0,
171
- value: N
172
- }), Object.freeze && (Object.freeze(o.props), Object.freeze(o)), o;
173
- }
174
- function x(o, _, M, E, $, N) {
175
- var O = _.children;
176
- if (O !== void 0)
177
- if (E)
178
- if (k(O)) {
179
- for (E = 0; E < O.length; E++)
180
- A(O[E]);
181
- Object.freeze && Object.freeze(O);
171
+ value: O
172
+ }), Object.freeze && (Object.freeze(a.props), Object.freeze(a)), a;
173
+ }
174
+ function k(a, w, A, L, F, O) {
175
+ var $ = w.children;
176
+ if ($ !== void 0)
177
+ if (L)
178
+ if (p($)) {
179
+ for (L = 0; L < $.length; L++)
180
+ j($[L]);
181
+ Object.freeze && Object.freeze($);
182
182
  } else
183
183
  console.error(
184
184
  "React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
185
185
  );
186
- else A(O);
187
- if (w.call(_, "key")) {
188
- O = e(o);
189
- var F = Object.keys(_).filter(function(oe) {
186
+ else j($);
187
+ if (v.call(w, "key")) {
188
+ $ = e(a);
189
+ var J = Object.keys(w).filter(function(oe) {
190
190
  return oe !== "key";
191
191
  });
192
- E = 0 < F.length ? "{key: someKey, " + F.join(": ..., ") + ": ...}" : "{key: someKey}", b[O + E] || (F = 0 < F.length ? "{" + F.join(": ..., ") + ": ...}" : "{}", console.error(
192
+ L = 0 < J.length ? "{key: someKey, " + J.join(": ..., ") + ": ...}" : "{key: someKey}", C[$ + L] || (J = 0 < J.length ? "{" + J.join(": ..., ") + ": ...}" : "{}", console.error(
193
193
  `A props object containing a "key" prop is being spread into JSX:
194
194
  let props = %s;
195
195
  <%s {...props} />
196
196
  React keys must be passed directly to JSX without using spread:
197
197
  let props = %s;
198
198
  <%s key={someKey} {...props} />`,
199
- E,
200
- O,
201
- F,
202
- O
203
- ), b[O + E] = !0);
199
+ L,
200
+ $,
201
+ J,
202
+ $
203
+ ), C[$ + L] = !0);
204
204
  }
205
- if (O = null, M !== void 0 && (n(M), O = "" + M), f(_) && (n(_.key), O = "" + _.key), "key" in _) {
206
- M = {};
207
- for (var Q in _)
208
- Q !== "key" && (M[Q] = _[Q]);
209
- } else M = _;
210
- return O && a(
211
- M,
212
- typeof o == "function" ? o.displayName || o.name || "Unknown" : o
213
- ), g(
214
- o,
215
- O,
216
- M,
217
- c(),
205
+ if ($ = null, A !== void 0 && (r(A), $ = "" + A), l(w) && (r(w.key), $ = "" + w.key), "key" in w) {
206
+ A = {};
207
+ for (var Z in w)
208
+ Z !== "key" && (A[Z] = w[Z]);
209
+ } else A = w;
210
+ return $ && d(
211
+ A,
212
+ typeof a == "function" ? a.displayName || a.name || "Unknown" : a
213
+ ), h(
214
+ a,
218
215
  $,
219
- N
216
+ A,
217
+ c(),
218
+ F,
219
+ O
220
220
  );
221
221
  }
222
- function A(o) {
223
- h(o) ? o._store && (o._store.validated = 1) : typeof o == "object" && o !== null && o.$$typeof === X && (o._payload.status === "fulfilled" ? h(o._payload.value) && o._payload.value._store && (o._payload.value._store.validated = 1) : o._store && (o._store.validated = 1));
222
+ function j(a) {
223
+ m(a) ? a._store && (a._store.validated = 1) : typeof a == "object" && a !== null && a.$$typeof === V && (a._payload.status === "fulfilled" ? m(a._payload.value) && a._payload.value._store && (a._payload.value._store.validated = 1) : a._store && (a._store.validated = 1));
224
224
  }
225
- function h(o) {
226
- return typeof o == "object" && o !== null && o.$$typeof === C;
225
+ function m(a) {
226
+ return typeof a == "object" && a !== null && a.$$typeof === R;
227
227
  }
228
- var S = Ge, C = /* @__PURE__ */ Symbol.for("react.transitional.element"), I = /* @__PURE__ */ Symbol.for("react.portal"), j = /* @__PURE__ */ Symbol.for("react.fragment"), W = /* @__PURE__ */ Symbol.for("react.strict_mode"), H = /* @__PURE__ */ Symbol.for("react.profiler"), q = /* @__PURE__ */ Symbol.for("react.consumer"), J = /* @__PURE__ */ Symbol.for("react.context"), U = /* @__PURE__ */ Symbol.for("react.forward_ref"), D = /* @__PURE__ */ Symbol.for("react.suspense"), V = /* @__PURE__ */ Symbol.for("react.suspense_list"), P = /* @__PURE__ */ Symbol.for("react.memo"), X = /* @__PURE__ */ Symbol.for("react.lazy"), ne = /* @__PURE__ */ Symbol.for("react.activity"), y = /* @__PURE__ */ Symbol.for("react.client.reference"), s = S.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, w = Object.prototype.hasOwnProperty, k = Array.isArray, i = console.createTask ? console.createTask : function() {
228
+ var T = et, R = /* @__PURE__ */ Symbol.for("react.transitional.element"), H = /* @__PURE__ */ Symbol.for("react.portal"), x = /* @__PURE__ */ Symbol.for("react.fragment"), z = /* @__PURE__ */ Symbol.for("react.strict_mode"), S = /* @__PURE__ */ Symbol.for("react.profiler"), D = /* @__PURE__ */ Symbol.for("react.consumer"), I = /* @__PURE__ */ Symbol.for("react.context"), B = /* @__PURE__ */ Symbol.for("react.forward_ref"), N = /* @__PURE__ */ Symbol.for("react.suspense"), q = /* @__PURE__ */ Symbol.for("react.suspense_list"), P = /* @__PURE__ */ Symbol.for("react.memo"), V = /* @__PURE__ */ Symbol.for("react.lazy"), K = /* @__PURE__ */ Symbol.for("react.activity"), b = /* @__PURE__ */ Symbol.for("react.client.reference"), o = T.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, v = Object.prototype.hasOwnProperty, p = Array.isArray, s = console.createTask ? console.createTask : function() {
229
229
  return null;
230
230
  };
231
- S = {
232
- react_stack_bottom_frame: function(o) {
233
- return o();
231
+ T = {
232
+ react_stack_bottom_frame: function(a) {
233
+ return a();
234
234
  }
235
235
  };
236
- var u, m = {}, d = S.react_stack_bottom_frame.bind(
237
- S,
238
- l
239
- )(), p = i(r(l)), b = {};
240
- xe.Fragment = j, xe.jsx = function(o, _, M) {
241
- var E = 1e4 > s.recentlyCreatedOwnerStacks++;
242
- return x(
243
- o,
244
- _,
245
- M,
236
+ var u, f = {}, g = T.react_stack_bottom_frame.bind(
237
+ T,
238
+ i
239
+ )(), _ = s(n(i)), C = {};
240
+ Se.Fragment = x, Se.jsx = function(a, w, A) {
241
+ var L = 1e4 > o.recentlyCreatedOwnerStacks++;
242
+ return k(
243
+ a,
244
+ w,
245
+ A,
246
246
  !1,
247
- E ? Error("react-stack-top-frame") : d,
248
- E ? i(r(o)) : p
247
+ L ? Error("react-stack-top-frame") : g,
248
+ L ? s(n(a)) : _
249
249
  );
250
- }, xe.jsxs = function(o, _, M) {
251
- var E = 1e4 > s.recentlyCreatedOwnerStacks++;
252
- return x(
253
- o,
254
- _,
255
- M,
250
+ }, Se.jsxs = function(a, w, A) {
251
+ var L = 1e4 > o.recentlyCreatedOwnerStacks++;
252
+ return k(
253
+ a,
254
+ w,
255
+ A,
256
256
  !0,
257
- E ? Error("react-stack-top-frame") : d,
258
- E ? i(r(o)) : p
257
+ L ? Error("react-stack-top-frame") : g,
258
+ L ? s(n(a)) : _
259
259
  );
260
260
  };
261
- })()), xe;
262
- }
263
- var ot;
264
- function Zt() {
265
- return ot || (ot = 1, process.env.NODE_ENV === "production" ? Se.exports = Xt() : Se.exports = Qt()), Se.exports;
266
- }
267
- var T = Zt(), Te = { exports: {} }, ze = {};
268
- var it;
269
- function Kt() {
270
- if (it) return ze;
271
- it = 1;
272
- var e = Ge.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
273
- return ze.c = function(t) {
261
+ })()), Se;
262
+ }
263
+ var lt;
264
+ function ur() {
265
+ return lt || (lt = 1, process.env.NODE_ENV === "production" ? je.exports = cr() : je.exports = lr()), je.exports;
266
+ }
267
+ var E = ur(), Ne = { exports: {} }, Ue = {};
268
+ var ut;
269
+ function dr() {
270
+ if (ut) return Ue;
271
+ ut = 1;
272
+ var e = et.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
273
+ return Ue.c = function(t) {
274
274
  return e.H.useMemoCache(t);
275
- }, ze;
276
- }
277
- var He = {};
278
- var st;
279
- function er() {
280
- return st || (st = 1, process.env.NODE_ENV !== "production" && (function() {
281
- var e = Ge.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
282
- He.c = function(t) {
283
- var n = e.H;
284
- return n === null && console.error(
275
+ }, Ue;
276
+ }
277
+ var Ye = {};
278
+ var dt;
279
+ function fr() {
280
+ return dt || (dt = 1, process.env.NODE_ENV !== "production" && (function() {
281
+ var e = et.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
282
+ Ye.c = function(t) {
283
+ var r = e.H;
284
+ return r === null && console.error(
285
285
  `Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
286
286
  1. You might have mismatching versions of React and the renderer (such as React DOM)
287
287
  2. You might be breaking the Rules of Hooks
288
288
  3. You might have more than one copy of React in the same app
289
289
  See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.`
290
- ), n.useMemoCache(t);
290
+ ), r.useMemoCache(t);
291
291
  };
292
- })()), He;
292
+ })()), Ye;
293
293
  }
294
- var at;
295
- function tr() {
296
- return at || (at = 1, process.env.NODE_ENV === "production" ? Te.exports = Kt() : Te.exports = er()), Te.exports;
294
+ var ft;
295
+ function gr() {
296
+ return ft || (ft = 1, process.env.NODE_ENV === "production" ? Ne.exports = dr() : Ne.exports = fr()), Ne.exports;
297
297
  }
298
- var be = tr();
299
- function bt(e) {
298
+ var Ce = gr();
299
+ function Et(e) {
300
300
  return typeof document > "u" ? null : e?.closest("[data-ov-theme]") ?? e ?? document.documentElement;
301
301
  }
302
- function Xe(e) {
303
- const t = bt(e);
302
+ function tt(e) {
303
+ const t = Et(e);
304
304
  return t ? getComputedStyle(t) : null;
305
305
  }
306
- function no(e, t) {
307
- return Xe(t)?.getPropertyValue(e).trim() ?? "";
306
+ function To(e, t) {
307
+ return tt(t)?.getPropertyValue(e).trim() ?? "";
308
308
  }
309
- function Qe() {
310
- const e = be.c(2), {
309
+ function rt() {
310
+ const e = Ce.c(2), {
311
311
  activeTheme: t
312
- } = zt();
313
- let n;
314
- return e[0] !== t ? (n = {
312
+ } = Jt();
313
+ let r;
314
+ return e[0] !== t ? (r = {
315
315
  id: t.id,
316
316
  base: t.base,
317
317
  registration: t
318
- }, e[0] = t, e[1] = n) : n = e[1], n;
318
+ }, e[0] = t, e[1] = r) : r = e[1], r;
319
319
  }
320
- const rr = /^#(?:[0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/i, nr = /^rgba?\(\s*([\d.]+)(?:\s*,\s*|\s+)([\d.]+)(?:\s*,\s*|\s+)([\d.]+)(?:\s*(?:,|\/)\s*([\d.]+))?\s*\)$/i;
321
- function me(e) {
320
+ const mr = /^#(?:[0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/i, hr = /^rgba?\(\s*([\d.]+)(?:\s*,\s*|\s+)([\d.]+)(?:\s*,\s*|\s+)([\d.]+)(?:\s*(?:,|\/)\s*([\d.]+))?\s*\)$/i;
321
+ function he(e) {
322
322
  return Math.max(0, Math.min(255, Math.round(e))).toString(16).padStart(2, "0");
323
323
  }
324
- function Ue(e) {
324
+ function Ge(e) {
325
325
  const t = e.trim();
326
- if (rr.test(t)) return t;
327
- const n = t.match(nr);
328
- if (!n) return "";
329
- const r = n[4] === void 0 ? 1 : Number(n[4]), c = `#${me(Number(n[1]))}${me(Number(n[2]))}${me(Number(n[3]))}`;
330
- return r >= 1 ? c : `${c}${me(r * 255)}`;
326
+ if (mr.test(t)) return t;
327
+ const r = t.match(hr);
328
+ if (!r) return "";
329
+ const n = r[4] === void 0 ? 1 : Number(r[4]), c = `#${he(Number(r[1]))}${he(Number(r[2]))}${he(Number(r[3]))}`;
330
+ return n >= 1 ? c : `${c}${he(n * 255)}`;
331
331
  }
332
- function or(e) {
332
+ function pr(e) {
333
333
  if (!e)
334
334
  return {
335
- normalize: Ue,
335
+ normalize: Ge,
336
336
  dispose() {
337
337
  }
338
338
  };
339
339
  const t = e.ownerDocument.createElement("canvas");
340
340
  t.width = 1, t.height = 1, t.setAttribute("aria-hidden", "true"), t.style.cssText = "position:absolute;width:0;height:0;overflow:hidden;pointer-events:none;visibility:hidden", e.append(t);
341
- let n;
341
+ let r;
342
342
  return {
343
- normalize(r) {
344
- const c = Ue(r);
343
+ normalize(n) {
344
+ const c = Ge(n);
345
345
  if (c) return c;
346
- if (t.style.color = "", t.style.color = r.trim(), !t.style.color) return "";
347
- const l = getComputedStyle(t).color, f = Ue(l);
348
- if (f) return f;
349
- if (!/^(?:color|lab|lch|oklab|oklch)\(/i.test(l)) return "";
346
+ if (t.style.color = "", t.style.color = n.trim(), !t.style.color) return "";
347
+ const i = getComputedStyle(t).color, l = Ge(i);
348
+ if (l) return l;
349
+ if (!/^(?:color|lab|lch|oklab|oklch)\(/i.test(i)) return "";
350
350
  try {
351
- if (n ??= t.getContext("2d", {
351
+ if (r ??= t.getContext("2d", {
352
352
  willReadFrequently: !0
353
- }), !n || (n.clearRect(0, 0, 1, 1), n.fillStyle = "#010203", n.fillStyle = l, n.fillStyle === "#010203")) return "";
354
- n.fillRect(0, 0, 1, 1);
355
- const a = n.getImageData(0, 0, 1, 1).data, v = `#${me(a[0])}${me(a[1])}${me(a[2])}`;
356
- return a[3] === 255 ? v : `${v}${me(a[3])}`;
353
+ }), !r || (r.clearRect(0, 0, 1, 1), r.fillStyle = "#010203", r.fillStyle = i, r.fillStyle === "#010203")) return "";
354
+ r.fillRect(0, 0, 1, 1);
355
+ const d = r.getImageData(0, 0, 1, 1).data, y = `#${he(d[0])}${he(d[1])}${he(d[2])}`;
356
+ return d[3] === 255 ? y : `${y}${he(d[3])}`;
357
357
  } catch {
358
358
  return "";
359
359
  }
@@ -363,7 +363,7 @@ function or(e) {
363
363
  }
364
364
  };
365
365
  }
366
- function ir(e) {
366
+ function yr(e) {
367
367
  switch (e) {
368
368
  case "light":
369
369
  case "solarized-light":
@@ -376,73 +376,73 @@ function ir(e) {
376
376
  return "vs-dark";
377
377
  }
378
378
  }
379
- function sr(e, t, n, r, c, l) {
380
- const f = r.normalize(n?.getPropertyValue(t).trim() ?? "");
381
- if (!f) return null;
382
- const a = {
379
+ function vr(e, t, r, n, c, i) {
380
+ const l = n.normalize(r?.getPropertyValue(t).trim() ?? "");
381
+ if (!l) return null;
382
+ const d = {
383
383
  token: e,
384
- foreground: f.slice(1)
384
+ foreground: l.slice(1)
385
385
  };
386
- return c && (a.fontStyle = n?.getPropertyValue(c).trim() || l || ""), a;
386
+ return c && (d.fontStyle = r?.getPropertyValue(c).trim() || i || ""), d;
387
387
  }
388
- function ar(e) {
388
+ function br(e) {
389
389
  const t = {};
390
- for (const [n, r] of Object.entries(e))
391
- r && (t[n] = r);
390
+ for (const [r, n] of Object.entries(e))
391
+ n && (t[r] = n);
392
392
  return t;
393
393
  }
394
- function Ae(e, t) {
395
- const n = bt(t), r = Xe(n), c = or(n), l = (a, v, g, x) => sr(a, v, r, c, g, x), f = (a) => c.normalize(r?.getPropertyValue(a).trim() ?? "");
394
+ function $e(e, t) {
395
+ const r = Et(t), n = tt(r), c = pr(r), i = (d, y, h, k) => vr(d, y, n, c, h, k), l = (d) => c.normalize(n?.getPropertyValue(d).trim() ?? "");
396
396
  try {
397
- const a = [l("comment", "--ov-syntax-comment", "--ov-syntax-style-comment", "italic"), l("string", "--ov-syntax-string"), l("string.escape", "--ov-syntax-string-escape"), l("number", "--ov-syntax-number"), l("keyword", "--ov-syntax-keyword", "--ov-syntax-style-keyword"), l("keyword.control", "--ov-syntax-keyword-control"), l("keyword.operator", "--ov-syntax-keyword-operator"), l("type", "--ov-syntax-type", "--ov-syntax-style-type"), l("type.identifier", "--ov-syntax-type"), l("class", "--ov-syntax-class"), l("interface", "--ov-syntax-interface"), l("function", "--ov-syntax-function", "--ov-syntax-style-function"), l("function.declaration", "--ov-syntax-function"), l("method", "--ov-syntax-method"), l("variable", "--ov-syntax-variable"), l("parameter", "--ov-syntax-parameter"), l("property", "--ov-syntax-property"), l("namespace", "--ov-syntax-namespace"), l("decorator", "--ov-syntax-decorator"), l("regexp", "--ov-syntax-regexp"), l("operator", "--ov-syntax-operator"), l("delimiter", "--ov-syntax-punctuation"), l("delimiter.bracket", "--ov-syntax-punctuation")].filter((v) => v !== null);
397
+ const d = [i("comment", "--ov-syntax-comment", "--ov-syntax-style-comment", "italic"), i("string", "--ov-syntax-string"), i("string.escape", "--ov-syntax-string-escape"), i("number", "--ov-syntax-number"), i("keyword", "--ov-syntax-keyword", "--ov-syntax-style-keyword"), i("keyword.control", "--ov-syntax-keyword-control"), i("keyword.operator", "--ov-syntax-keyword-operator"), i("type", "--ov-syntax-type", "--ov-syntax-style-type"), i("type.identifier", "--ov-syntax-type"), i("class", "--ov-syntax-class"), i("interface", "--ov-syntax-interface"), i("function", "--ov-syntax-function", "--ov-syntax-style-function"), i("function.declaration", "--ov-syntax-function"), i("method", "--ov-syntax-method"), i("variable", "--ov-syntax-variable"), i("parameter", "--ov-syntax-parameter"), i("property", "--ov-syntax-property"), i("namespace", "--ov-syntax-namespace"), i("decorator", "--ov-syntax-decorator"), i("regexp", "--ov-syntax-regexp"), i("operator", "--ov-syntax-operator"), i("delimiter", "--ov-syntax-punctuation"), i("delimiter.bracket", "--ov-syntax-punctuation")].filter((y) => y !== null);
398
398
  return {
399
- base: ir(e),
399
+ base: yr(e),
400
400
  inherit: !0,
401
- rules: a,
402
- colors: ar({
403
- "editor.background": f("--ov-color-editor-bg"),
404
- "editor.foreground": f("--ov-color-editor-fg"),
405
- "editorCursor.foreground": f("--ov-color-editor-cursor"),
406
- "editor.selectionBackground": f("--ov-color-editor-selection-bg"),
407
- "editor.inactiveSelectionBackground": f("--ov-color-editor-selection-inactive-bg"),
408
- "editor.lineHighlightBackground": f("--ov-color-editor-line-highlight-bg"),
409
- "editor.lineHighlightBorder": f("--ov-color-editor-line-highlight-border"),
410
- "editorLineNumber.foreground": f("--ov-color-editor-line-number"),
411
- "editorLineNumber.activeForeground": f("--ov-color-editor-line-number-active"),
412
- "editorWhitespace.foreground": f("--ov-color-editor-whitespace"),
413
- "editorIndentGuide.background": f("--ov-color-editor-indent-guide"),
414
- "editorIndentGuide.activeBackground": f("--ov-color-editor-indent-guide-active"),
415
- "editorRuler.foreground": f("--ov-color-editor-ruler"),
416
- "editor.findMatchBackground": f("--ov-color-editor-find-match-bg"),
417
- "editor.findMatchBorder": f("--ov-color-editor-find-match-border"),
418
- "editor.findMatchHighlightBackground": f("--ov-color-editor-find-range-bg"),
419
- "editorLink.activeForeground": f("--ov-color-editor-link"),
420
- "editorBracketMatch.background": f("--ov-color-editor-bracket-match-bg"),
421
- "editorBracketMatch.border": f("--ov-color-editor-bracket-match-border"),
422
- "editorBracketHighlight.foreground1": f("--ov-color-editor-bracket-1"),
423
- "editorBracketHighlight.foreground2": f("--ov-color-editor-bracket-2"),
424
- "editorBracketHighlight.foreground3": f("--ov-color-editor-bracket-3"),
425
- "editorBracketHighlight.foreground4": f("--ov-color-editor-bracket-4"),
426
- "editorBracketHighlight.foreground5": f("--ov-color-editor-bracket-5"),
427
- "editorBracketHighlight.foreground6": f("--ov-color-editor-bracket-6"),
428
- "editorGutter.background": f("--ov-color-gutter-bg"),
429
- "editorGutter.addedBackground": f("--ov-color-gutter-added"),
430
- "editorGutter.modifiedBackground": f("--ov-color-gutter-modified"),
431
- "editorGutter.deletedBackground": f("--ov-color-gutter-deleted"),
432
- "diffEditor.insertedTextBackground": f("--ov-color-diff-insert-bg"),
433
- "diffEditor.removedTextBackground": f("--ov-color-diff-remove-bg"),
434
- "minimap.background": f("--ov-color-minimap-bg"),
435
- "minimap.selectionHighlight": f("--ov-color-minimap-selection"),
436
- "minimap.errorHighlight": f("--ov-color-minimap-error"),
437
- "minimap.warningHighlight": f("--ov-color-minimap-warning"),
438
- "minimap.findMatchHighlight": f("--ov-color-minimap-find-match")
401
+ rules: d,
402
+ colors: br({
403
+ "editor.background": l("--ov-color-editor-bg"),
404
+ "editor.foreground": l("--ov-color-editor-fg"),
405
+ "editorCursor.foreground": l("--ov-color-editor-cursor"),
406
+ "editor.selectionBackground": l("--ov-color-editor-selection-bg"),
407
+ "editor.inactiveSelectionBackground": l("--ov-color-editor-selection-inactive-bg"),
408
+ "editor.lineHighlightBackground": l("--ov-color-editor-line-highlight-bg"),
409
+ "editor.lineHighlightBorder": l("--ov-color-editor-line-highlight-border"),
410
+ "editorLineNumber.foreground": l("--ov-color-editor-line-number"),
411
+ "editorLineNumber.activeForeground": l("--ov-color-editor-line-number-active"),
412
+ "editorWhitespace.foreground": l("--ov-color-editor-whitespace"),
413
+ "editorIndentGuide.background": l("--ov-color-editor-indent-guide"),
414
+ "editorIndentGuide.activeBackground": l("--ov-color-editor-indent-guide-active"),
415
+ "editorRuler.foreground": l("--ov-color-editor-ruler"),
416
+ "editor.findMatchBackground": l("--ov-color-editor-find-match-bg"),
417
+ "editor.findMatchBorder": l("--ov-color-editor-find-match-border"),
418
+ "editor.findMatchHighlightBackground": l("--ov-color-editor-find-range-bg"),
419
+ "editorLink.activeForeground": l("--ov-color-editor-link"),
420
+ "editorBracketMatch.background": l("--ov-color-editor-bracket-match-bg"),
421
+ "editorBracketMatch.border": l("--ov-color-editor-bracket-match-border"),
422
+ "editorBracketHighlight.foreground1": l("--ov-color-editor-bracket-1"),
423
+ "editorBracketHighlight.foreground2": l("--ov-color-editor-bracket-2"),
424
+ "editorBracketHighlight.foreground3": l("--ov-color-editor-bracket-3"),
425
+ "editorBracketHighlight.foreground4": l("--ov-color-editor-bracket-4"),
426
+ "editorBracketHighlight.foreground5": l("--ov-color-editor-bracket-5"),
427
+ "editorBracketHighlight.foreground6": l("--ov-color-editor-bracket-6"),
428
+ "editorGutter.background": l("--ov-color-gutter-bg"),
429
+ "editorGutter.addedBackground": l("--ov-color-gutter-added"),
430
+ "editorGutter.modifiedBackground": l("--ov-color-gutter-modified"),
431
+ "editorGutter.deletedBackground": l("--ov-color-gutter-deleted"),
432
+ "diffEditor.insertedTextBackground": l("--ov-color-diff-insert-bg"),
433
+ "diffEditor.removedTextBackground": l("--ov-color-diff-remove-bg"),
434
+ "minimap.background": l("--ov-color-minimap-bg"),
435
+ "minimap.selectionHighlight": l("--ov-color-minimap-selection"),
436
+ "minimap.errorHighlight": l("--ov-color-minimap-error"),
437
+ "minimap.warningHighlight": l("--ov-color-minimap-warning"),
438
+ "minimap.findMatchHighlight": l("--ov-color-minimap-find-match")
439
439
  })
440
440
  };
441
441
  } finally {
442
442
  c.dispose();
443
443
  }
444
444
  }
445
- const ge = "ov-theme", cr = {
445
+ const pe = "ov-theme", wr = {
446
446
  js: "javascript",
447
447
  jsx: "javascript",
448
448
  ts: "typescript",
@@ -501,32 +501,32 @@ const ge = "ov-theme", cr = {
501
501
  vue: "html",
502
502
  svelte: "html"
503
503
  };
504
- function lr(e) {
505
- const t = e.toLowerCase(), n = t.split("/").pop() ?? t;
506
- if (n === "dockerfile") return "dockerfile";
507
- if (n === "makefile") return "makefile";
508
- const r = n.split(".").pop();
509
- if (r)
510
- return cr[r];
504
+ function _r(e) {
505
+ const t = e.toLowerCase(), r = t.split("/").pop() ?? t;
506
+ if (r === "dockerfile") return "dockerfile";
507
+ if (r === "makefile") return "makefile";
508
+ const n = r.split(".").pop();
509
+ if (n)
510
+ return wr[n];
511
511
  }
512
512
  function se(...e) {
513
513
  }
514
- function ur(e, t) {
515
- let n = 0, r = 0, c = -1, l = -1;
516
- for (; r < t.length; )
517
- if (n < e.length && (e[n] === t[r] || e[n] === "?"))
518
- n++, r++;
519
- else if (n < e.length && e[n] === "*")
520
- c = n, l = r, n++;
514
+ function Cr(e, t) {
515
+ let r = 0, n = 0, c = -1, i = -1;
516
+ for (; n < t.length; )
517
+ if (r < e.length && (e[r] === t[n] || e[r] === "?"))
518
+ r++, n++;
519
+ else if (r < e.length && e[r] === "*")
520
+ c = r, i = n, r++;
521
521
  else if (c >= 0)
522
- n = c + 1, l++, r = l;
522
+ r = c + 1, i++, n = i;
523
523
  else
524
524
  return !1;
525
- for (; n < e.length && e[n] === "*"; )
526
- n++;
527
- return n === e.length;
525
+ for (; r < e.length && e[r] === "*"; )
526
+ r++;
527
+ return r === e.length;
528
528
  }
529
- class dr {
529
+ class xr {
530
530
  _schemas = /* @__PURE__ */ new Map();
531
531
  _listeners = /* @__PURE__ */ new Set();
532
532
  _yamlHandle = null;
@@ -551,15 +551,15 @@ class dr {
551
551
  }
552
552
  /** Register multiple schemas at once. */
553
553
  registerAll(t) {
554
- se("registerAll() —", t.length, "schemas:", t.map((n) => n.uri));
555
- for (const n of t)
556
- this._schemas.set(n.uri, n);
554
+ se("registerAll() —", t.length, "schemas:", t.map((r) => r.uri));
555
+ for (const r of t)
556
+ this._schemas.set(r.uri, r);
557
557
  this._notify();
558
558
  }
559
559
  /** Unregister a schema by URI. */
560
560
  unregister(t) {
561
- const n = this._schemas.delete(t);
562
- return n && this._notify(), n;
561
+ const r = this._schemas.delete(t);
562
+ return r && this._notify(), r;
563
563
  }
564
564
  /** Clear all registered schemas. */
565
565
  clear() {
@@ -570,7 +570,7 @@ class dr {
570
570
  * model URI string. Uses the same glob-like matching that monaco-yaml uses.
571
571
  */
572
572
  getSchemasForUri(t) {
573
- return this.schemas.filter((n) => n.fileMatch.some((r) => ur(r, t)));
573
+ return this.schemas.filter((r) => r.fileMatch.some((n) => Cr(n, t)));
574
574
  }
575
575
  /** Whether the YAML handle has been injected (workers initialized). */
576
576
  get isYamlReady() {
@@ -589,22 +589,22 @@ class dr {
589
589
  applyYamlSchemas() {
590
590
  if (!this._yamlHandle)
591
591
  return;
592
- const t = this.schemas, n = t.map((r) => ({
593
- uri: r.uri,
594
- fileMatch: r.fileMatch,
595
- schema: r.schema,
592
+ const t = this.schemas, r = t.map((n) => ({
593
+ uri: n.uri,
594
+ fileMatch: n.fileMatch,
595
+ schema: n.schema,
596
596
  // name/description are passed through to yaml-language-server's
597
597
  // registerExternalSchema — they appear in hover tooltips.
598
- ...r.name && {
599
- name: r.name
598
+ ...n.name && {
599
+ name: n.name
600
600
  },
601
- ...r.description && {
602
- description: r.description
601
+ ...n.description && {
602
+ description: n.description
603
603
  }
604
604
  }));
605
605
  se("applyYamlSchemas() — pushing", t.length, "schemas"), this._yamlHandle.update({
606
606
  enableSchemaRequest: !1,
607
- schemas: n
607
+ schemas: r
608
608
  });
609
609
  }
610
610
  /**
@@ -613,21 +613,21 @@ class dr {
613
613
  * `monaco-editor` — keeping it usable before Monaco loads.
614
614
  */
615
615
  applyJsonSchemas(t) {
616
- const n = t, r = {
616
+ const r = t, n = {
617
617
  validate: !0,
618
- schemas: this.schemas.map((l) => ({
619
- uri: l.uri,
620
- fileMatch: l.fileMatch,
621
- schema: l.schema
618
+ schemas: this.schemas.map((i) => ({
619
+ uri: i.uri,
620
+ fileMatch: i.fileMatch,
621
+ schema: i.schema
622
622
  }))
623
- }, c = n.json?.jsonDefaults ?? n.languages?.json?.jsonDefaults;
624
- se("applyJsonSchemas() —", this.schemas.length, "schemas, jsonDefaults available:", !!c), c?.setDiagnosticsOptions(r);
623
+ }, c = r.json?.jsonDefaults ?? r.languages?.json?.jsonDefaults;
624
+ se("applyJsonSchemas() —", this.schemas.length, "schemas, jsonDefaults available:", !!c), c?.setDiagnosticsOptions(n);
625
625
  }
626
626
  /** Log the current state of the registry for debugging. */
627
627
  debugState() {
628
628
  se(" Schemas:", this._schemas.size);
629
- for (const [t, n] of this._schemas)
630
- se(` ${t} → fileMatch: ${JSON.stringify(n.fileMatch)}`);
629
+ for (const [t, r] of this._schemas)
630
+ se(` ${t} → fileMatch: ${JSON.stringify(r.fileMatch)}`);
631
631
  se(" Listeners:", this._listeners.size), se(" YAML handle:", this._yamlHandle ? "SET" : "NOT SET");
632
632
  }
633
633
  _notify() {
@@ -635,47 +635,47 @@ class dr {
635
635
  for (const t of this._listeners)
636
636
  try {
637
637
  t();
638
- } catch (n) {
639
- console.error("[schema-registry] listener threw during _notify():", n);
638
+ } catch (r) {
639
+ console.error("[schema-registry] listener threw during _notify():", r);
640
640
  }
641
641
  }
642
642
  }
643
- const de = new dr(), fr = "_Root_1729c_1", hr = "_Inner_1729c_17", ct = {
644
- Root: fr,
645
- Inner: hr
643
+ const fe = new xr(), kr = "_Root_1729c_1", Rr = "_Inner_1729c_17", gt = {
644
+ Root: kr,
645
+ Inner: Rr
646
646
  };
647
- function Me(...e) {
647
+ function Pe(...e) {
648
648
  }
649
- function mr(...e) {
649
+ function Sr(...e) {
650
650
  return e.filter(Boolean).join(" ");
651
651
  }
652
- function lt(e, t, n) {
653
- if (n) {
654
- const r = L.Uri.parse(n);
655
- Me("getOrCreateModel — parsed URI:", r.toString(), "| language:", t);
656
- const c = L.editor.getModel(r);
657
- return c || L.editor.createModel(e, t, r);
652
+ function mt(e, t, r) {
653
+ if (r) {
654
+ const n = W.Uri.parse(r);
655
+ Pe("getOrCreateModel — parsed URI:", n.toString(), "| language:", t);
656
+ const c = W.editor.getModel(n);
657
+ return c || W.editor.createModel(e, t, n);
658
658
  }
659
- return L.editor.createModel(e, t);
659
+ return W.editor.createModel(e, t);
660
660
  }
661
- function _t(e) {
661
+ function Tt(e) {
662
662
  switch (e) {
663
- case L.MarkerSeverity.Error:
663
+ case W.MarkerSeverity.Error:
664
664
  return "error";
665
- case L.MarkerSeverity.Warning:
665
+ case W.MarkerSeverity.Warning:
666
666
  return "warning";
667
- case L.MarkerSeverity.Info:
667
+ case W.MarkerSeverity.Info:
668
668
  return "info";
669
669
  default:
670
670
  return "hint";
671
671
  }
672
672
  }
673
- function ut(e) {
674
- return L.editor.getModelMarkers({
673
+ function ht(e) {
674
+ return W.editor.getModelMarkers({
675
675
  resource: e.uri
676
676
  }).map((t) => ({
677
677
  message: t.message,
678
- severity: _t(t.severity),
678
+ severity: Tt(t.severity),
679
679
  startLineNumber: t.startLineNumber,
680
680
  startColumn: t.startColumn,
681
681
  endLineNumber: t.endLineNumber,
@@ -684,39 +684,39 @@ function ut(e) {
684
684
  code: typeof t.code == "string" ? t.code : t.code?.value
685
685
  }));
686
686
  }
687
- const gr = ve(function({
687
+ const Mt = _e(function({
688
688
  value: t,
689
- onChange: n,
690
- onMount: r,
689
+ onChange: r,
690
+ onMount: n,
691
691
  onDiagnostics: c,
692
- onCursorChange: l,
693
- language: f,
694
- filename: a,
695
- readOnly: v = !1,
696
- lineNumbers: g = !0,
697
- minimap: x = !1,
698
- wordWrap: A = !1,
699
- tabSize: h = 2,
700
- diagnostics: S = !1,
701
- quickSuggestions: C = !1,
702
- syntaxHighlighting: I = !0,
703
- height: j = "100%",
704
- width: W = "100%",
705
- bordered: H = !0,
706
- className: q
707
- }, J) {
708
- const U = Qe(), D = Y(null), V = Y(null), [P, X] = Ne(!1), ne = Y(!1), y = Y(null), s = Y(null), w = Y(null), k = f ?? (a ? lr(a) : void 0), i = pt(() => {
709
- if (k === "json" && t)
692
+ onCursorChange: i,
693
+ language: l,
694
+ filename: d,
695
+ readOnly: y = !1,
696
+ lineNumbers: h = !0,
697
+ minimap: k = !1,
698
+ wordWrap: j = !1,
699
+ tabSize: m = 2,
700
+ diagnostics: T = !1,
701
+ quickSuggestions: R = !1,
702
+ syntaxHighlighting: H = !0,
703
+ height: x = "100%",
704
+ width: z = "100%",
705
+ bordered: S = !0,
706
+ className: D
707
+ }, I) {
708
+ const B = rt(), N = G(null), q = G(null), [P, V] = me(!1), K = G(!1), b = G(null), o = G(null), v = G(null), p = l ?? (d ? _r(d) : void 0), s = Oe(() => {
709
+ if (p === "json" && t)
710
710
  try {
711
711
  return JSON.stringify(JSON.parse(t), null, 2);
712
712
  } catch {
713
713
  return t;
714
714
  }
715
715
  return t;
716
- }, [k, t]);
717
- z(() => {
718
- if (!V.current) return;
719
- L.editor.defineTheme(ge, Ae(U.base, V.current)), L.editor.setTheme(ge), L.languages.typescript.typescriptDefaults.setCompilerOptions({
716
+ }, [p, t]);
717
+ U(() => {
718
+ if (!q.current) return;
719
+ W.editor.defineTheme(pe, $e(B.base, q.current)), W.editor.setTheme(pe), W.languages.typescript.typescriptDefaults.setCompilerOptions({
720
720
  jsx: 2,
721
721
  // JsxEmit.React
722
722
  jsxFactory: "React.createElement",
@@ -725,17 +725,17 @@ const gr = ve(function({
725
725
  target: 99
726
726
  // ESNext
727
727
  });
728
- const d = lt(i, I ? k : "plaintext", a);
729
- Me(" model created — uri:", d.uri.toString());
730
- const p = L.editor.create(V.current, {
731
- model: d,
732
- readOnly: v,
733
- lineNumbers: g ? "on" : "off",
728
+ const g = mt(s, H ? p : "plaintext", d);
729
+ Pe(" model created — uri:", g.uri.toString());
730
+ const _ = W.editor.create(q.current, {
731
+ model: g,
732
+ readOnly: y,
733
+ lineNumbers: h ? "on" : "off",
734
734
  minimap: {
735
- enabled: x
735
+ enabled: k
736
736
  },
737
- wordWrap: A ? "on" : "off",
738
- quickSuggestions: C ? {
737
+ wordWrap: j ? "on" : "off",
738
+ quickSuggestions: R ? {
739
739
  other: !0,
740
740
  strings: !0,
741
741
  comments: !1
@@ -744,1327 +744,1858 @@ const gr = ve(function({
744
744
  automaticLayout: !0,
745
745
  fontSize: 13,
746
746
  fontFamily: "var(--ov-font-family-mono, monospace)",
747
- tabSize: h,
748
- renderValidationDecorations: S ? "on" : "off"
747
+ tabSize: m,
748
+ renderValidationDecorations: T ? "on" : "off"
749
749
  });
750
- return D.current = p, de.applyYamlSchemas(), de.applyJsonSchemas(L), r?.(p, L), X(!0), () => {
751
- y.current?.dispose(), y.current = null, s.current?.dispose(), s.current = null, w.current?.dispose(), w.current = null;
752
- const b = p.getModel();
753
- p.setModel(null), b?.dispose(), p.dispose(), D.current = null, X(!1);
750
+ return N.current = _, fe.applyYamlSchemas(), fe.applyJsonSchemas(W), n?.(_, W), V(!0), () => {
751
+ b.current?.dispose(), b.current = null, o.current?.dispose(), o.current = null, v.current?.dispose(), v.current = null;
752
+ const C = _.getModel();
753
+ _.setModel(null), C?.dispose(), _.dispose(), N.current = null, V(!1);
754
754
  };
755
- }, []), z(() => {
756
- const d = D.current;
757
- if (!(!d || !P || i === void 0)) {
758
- if (d.getOption(L.editor.EditorOption.readOnly))
759
- d.setValue(i);
760
- else if (i !== d.getValue()) {
761
- const p = d.getModel();
762
- if (!p) return;
763
- ne.current = !0, d.executeEdits("", [{
764
- range: p.getFullModelRange(),
765
- text: i,
755
+ }, []), U(() => {
756
+ const g = N.current;
757
+ if (!(!g || !P || s === void 0)) {
758
+ if (g.getOption(W.editor.EditorOption.readOnly))
759
+ g.setValue(s);
760
+ else if (s !== g.getValue()) {
761
+ const _ = g.getModel();
762
+ if (!_) return;
763
+ K.current = !0, g.executeEdits("", [{
764
+ range: _.getFullModelRange(),
765
+ text: s,
766
766
  forceMoveMarkers: !0
767
- }]), d.pushUndoStop(), ne.current = !1;
767
+ }]), g.pushUndoStop(), K.current = !1;
768
768
  }
769
769
  }
770
- }, [i, P]), z(() => {
771
- !D.current || !P || D.current.updateOptions({
772
- readOnly: v,
773
- lineNumbers: g ? "on" : "off",
770
+ }, [s, P]), U(() => {
771
+ !N.current || !P || N.current.updateOptions({
772
+ readOnly: y,
773
+ lineNumbers: h ? "on" : "off",
774
774
  minimap: {
775
- enabled: x
775
+ enabled: k
776
776
  },
777
- wordWrap: A ? "on" : "off",
778
- quickSuggestions: C ? {
777
+ wordWrap: j ? "on" : "off",
778
+ quickSuggestions: R ? {
779
779
  other: !0,
780
780
  strings: !0,
781
781
  comments: !1
782
782
  } : !1,
783
- tabSize: h,
784
- renderValidationDecorations: S ? "on" : "off"
783
+ tabSize: m,
784
+ renderValidationDecorations: T ? "on" : "off"
785
785
  });
786
- }, [v, g, x, A, C, h, S, P]), z(() => {
787
- if (!D.current || !P) return;
788
- const d = D.current.getModel();
789
- if (d) {
790
- const p = I ? k ?? "plaintext" : "plaintext";
791
- L.editor.setModelLanguage(d, p);
792
- }
793
- }, [k, I, P]);
794
- const u = Y(a);
795
- z(() => {
796
- const d = D.current;
797
- if (!d || !P || u.current === a) return;
798
- Me("filename changed:", u.current, "→", a), u.current = a;
799
- const p = d.getModel(), b = p?.getValue?.() ?? i;
800
- d.setModel(null), p?.dispose();
801
- const o = lt(b, I ? k : "plaintext", a);
802
- d.setModel(o), Me(" new model set — uri:", o.uri.toString());
803
- }, [a, P, k, I, i]), z(() => {
804
- P && (L.editor.defineTheme(ge, Ae(U.base, V.current)), L.editor.setTheme(ge));
805
- }, [P, U.registration]), z(() => {
806
- !D.current || !P || (y.current?.dispose(), n && (y.current = D.current.onDidChangeModelContent(() => {
807
- ne.current || n(D.current.getValue());
786
+ }, [y, h, k, j, R, m, T, P]), U(() => {
787
+ if (!N.current || !P) return;
788
+ const g = N.current.getModel();
789
+ if (g) {
790
+ const _ = H ? p ?? "plaintext" : "plaintext";
791
+ W.editor.setModelLanguage(g, _);
792
+ }
793
+ }, [p, H, P]);
794
+ const u = G(d);
795
+ U(() => {
796
+ const g = N.current;
797
+ if (!g || !P || u.current === d) return;
798
+ Pe("filename changed:", u.current, "→", d), u.current = d;
799
+ const _ = g.getModel(), C = _?.getValue?.() ?? s;
800
+ g.setModel(null), _?.dispose();
801
+ const a = mt(C, H ? p : "plaintext", d);
802
+ g.setModel(a), Pe(" new model set — uri:", a.uri.toString());
803
+ }, [d, P, p, H, s]), U(() => {
804
+ P && (W.editor.defineTheme(pe, $e(B.base, q.current)), W.editor.setTheme(pe));
805
+ }, [P, B.registration]), U(() => {
806
+ !N.current || !P || (b.current?.dispose(), r && (b.current = N.current.onDidChangeModelContent(() => {
807
+ K.current || r(N.current.getValue());
808
808
  })));
809
- }, [n, P]), z(() => {
810
- P && (s.current?.dispose(), c && (s.current = L.editor.onDidChangeMarkers((d) => {
811
- const p = D.current?.getModel();
812
- if (!p) return;
813
- const b = p.uri.toString();
814
- d.some((o) => o.toString() === b) && c(ut(p));
809
+ }, [r, P]), U(() => {
810
+ P && (o.current?.dispose(), c && (o.current = W.editor.onDidChangeMarkers((g) => {
811
+ const _ = N.current?.getModel();
812
+ if (!_) return;
813
+ const C = _.uri.toString();
814
+ g.some((a) => a.toString() === C) && c(ht(_));
815
815
  })));
816
- }, [c, P]), z(() => {
817
- !D.current || !P || (w.current?.dispose(), l && (w.current = D.current.onDidChangeCursorPosition((d) => {
818
- l({
819
- lineNumber: d.position.lineNumber,
820
- column: d.position.column
816
+ }, [c, P]), U(() => {
817
+ !N.current || !P || (v.current?.dispose(), i && (v.current = N.current.onDidChangeCursorPosition((g) => {
818
+ i({
819
+ lineNumber: g.position.lineNumber,
820
+ column: g.position.column
821
821
  });
822
822
  })));
823
- }, [l, P]), z(() => {
823
+ }, [i, P]), U(() => {
824
824
  if (P)
825
- return de.onChange(() => {
826
- de.applyYamlSchemas(), de.applyJsonSchemas(L);
825
+ return fe.onChange(() => {
826
+ fe.applyYamlSchemas(), fe.applyJsonSchemas(W);
827
827
  });
828
- }, [P]), yt(J, () => ({
829
- getEditor: () => D.current,
830
- getMonaco: () => L,
831
- focus: () => D.current?.focus(),
828
+ }, [P]), xt(I, () => ({
829
+ getEditor: () => N.current,
830
+ getMonaco: () => W,
831
+ focus: () => N.current?.focus(),
832
832
  getDiagnostics: () => {
833
- const d = D.current?.getModel();
834
- return d ? ut(d) : [];
833
+ const g = N.current?.getModel();
834
+ return g ? ht(g) : [];
835
835
  },
836
836
  getDebugState: () => {
837
- const d = D.current, p = d?.getModel() ?? null, b = p ? L.editor.getModelMarkers({
838
- resource: p.uri
839
- }) : [], o = p?.uri.toString() ?? null, _ = {
837
+ const g = N.current, _ = g?.getModel() ?? null, C = _ ? W.editor.getModelMarkers({
838
+ resource: _.uri
839
+ }) : [], a = _?.uri.toString() ?? null, w = {
840
840
  error: 0,
841
841
  warning: 0,
842
842
  info: 0,
843
843
  hint: 0
844
- }, M = {};
845
- for (const O of b) {
846
- const F = _t(O.severity);
847
- _[F]++;
848
- const Q = O.source ?? "unknown";
849
- M[Q] = (M[Q] ?? 0) + 1;
844
+ }, A = {};
845
+ for (const $ of C) {
846
+ const J = Tt($.severity);
847
+ w[J]++;
848
+ const Z = $.source ?? "unknown";
849
+ A[Z] = (A[Z] ?? 0) + 1;
850
850
  }
851
- const E = o ? de.getSchemasForUri(o).map((O) => ({
852
- uri: O.uri,
853
- name: O.name,
854
- fileMatch: O.fileMatch
855
- })) : [], $ = d?.getPosition() ?? null, N = d?.getSelections() ?? [];
851
+ const L = a ? fe.getSchemasForUri(a).map(($) => ({
852
+ uri: $.uri,
853
+ name: $.name,
854
+ fileMatch: $.fileMatch
855
+ })) : [], F = g?.getPosition() ?? null, O = g?.getSelections() ?? [];
856
856
  return {
857
- modelUri: o,
858
- modelLanguage: p?.getLanguageId() ?? null,
859
- modelLineCount: p?.getLineCount() ?? 0,
860
- modelContentLength: p?.getValueLength() ?? 0,
861
- modelVersionId: p?.getVersionId() ?? 0,
862
- modelEOL: p?.getEOL() ?? null,
863
- cursorPosition: $ ? {
864
- lineNumber: $.lineNumber,
865
- column: $.column
857
+ modelUri: a,
858
+ modelLanguage: _?.getLanguageId() ?? null,
859
+ modelLineCount: _?.getLineCount() ?? 0,
860
+ modelContentLength: _?.getValueLength() ?? 0,
861
+ modelVersionId: _?.getVersionId() ?? 0,
862
+ modelEOL: _?.getEOL() ?? null,
863
+ cursorPosition: F ? {
864
+ lineNumber: F.lineNumber,
865
+ column: F.column
866
866
  } : null,
867
- selections: N.map((O) => ({
868
- startLineNumber: O.startLineNumber,
869
- startColumn: O.startColumn,
870
- endLineNumber: O.endLineNumber,
871
- endColumn: O.endColumn
867
+ selections: O.map(($) => ({
868
+ startLineNumber: $.startLineNumber,
869
+ startColumn: $.startColumn,
870
+ endLineNumber: $.endLineNumber,
871
+ endColumn: $.endColumn
872
872
  })),
873
- diagnosticsTotal: b.length,
874
- diagnosticsBySeverity: _,
875
- diagnosticsBySource: M,
876
- registeredSchemaCount: de.schemas.length,
877
- matchingSchemas: E,
878
- isReadOnly: d?.getOption(L.editor.EditorOption.readOnly) ?? !1,
879
- isFocused: d?.hasWidgetFocus() ?? !1,
880
- totalModelCount: L.editor.getModels().length,
881
- registeredLanguageCount: L.languages.getLanguages().length,
882
- yamlHandleSet: de.isYamlReady
873
+ diagnosticsTotal: C.length,
874
+ diagnosticsBySeverity: w,
875
+ diagnosticsBySource: A,
876
+ registeredSchemaCount: fe.schemas.length,
877
+ matchingSchemas: L,
878
+ isReadOnly: g?.getOption(W.editor.EditorOption.readOnly) ?? !1,
879
+ isFocused: g?.hasWidgetFocus() ?? !1,
880
+ totalModelCount: W.editor.getModels().length,
881
+ registeredLanguageCount: W.languages.getLanguages().length,
882
+ yamlHandleSet: fe.isYamlReady
883
883
  };
884
884
  }
885
885
  }));
886
- const m = (d) => typeof d == "number" ? `${d}px` : d;
887
- return /* @__PURE__ */ T.jsx("div", { className: mr(ct.Root, q), style: {
888
- "--_editor-height": m(j),
889
- "--_editor-width": m(W)
890
- }, "data-testid": "code-editor", ...H ? {} : {
886
+ const f = (g) => typeof g == "number" ? `${g}px` : g;
887
+ return /* @__PURE__ */ E.jsx("div", { className: Sr(gt.Root, D), style: {
888
+ "--_editor-height": f(x),
889
+ "--_editor-width": f(z)
890
+ }, "data-testid": "code-editor", ...S ? {} : {
891
891
  "data-borderless": ""
892
- }, children: /* @__PURE__ */ T.jsx("div", { ref: V, className: ct.Inner }) });
892
+ }, children: /* @__PURE__ */ E.jsx("div", { ref: q, className: gt.Inner }) });
893
893
  });
894
- gr.displayName = "CodeEditor";
895
- const pr = "_Root_1ltbg_1", yr = "_Inner_1ltbg_16", dt = {
896
- Root: pr,
897
- Inner: yr
894
+ Mt.displayName = "CodeEditor";
895
+ const Er = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
896
+ __proto__: null,
897
+ CodeEditor: Mt
898
+ }, Symbol.toStringTag, { value: "Module" })), Tr = "_Root_1ltbg_1", Mr = "_Inner_1ltbg_16", pt = {
899
+ Root: Tr,
900
+ Inner: Mr
898
901
  };
899
- function vr(...e) {
902
+ function jr(...e) {
900
903
  return e.filter(Boolean).join(" ");
901
904
  }
902
- const br = ve(function({
905
+ const Nr = _e(function({
903
906
  original: t,
904
- modified: n,
905
- language: r,
907
+ modified: r,
908
+ language: n,
906
909
  mode: c = "side-by-side",
907
- readOnly: l = !0,
908
- height: f = "100%",
909
- bordered: a = !0,
910
- className: v
911
- }, g) {
912
- const x = Qe(), A = Y(null), h = Y(null), [S, C] = Ne(!1);
913
- z(() => {
914
- if (!A.current) return;
915
- L.editor.defineTheme(ge, Ae(x.base, A.current)), L.editor.setTheme(ge);
916
- const j = L.editor.createDiffEditor(A.current, {
917
- readOnly: l,
910
+ readOnly: i = !0,
911
+ height: l = "100%",
912
+ bordered: d = !0,
913
+ className: y
914
+ }, h) {
915
+ const k = rt(), j = G(null), m = G(null), [T, R] = me(!1);
916
+ U(() => {
917
+ if (!j.current) return;
918
+ W.editor.defineTheme(pe, $e(k.base, j.current)), W.editor.setTheme(pe);
919
+ const x = W.editor.createDiffEditor(j.current, {
920
+ readOnly: i,
918
921
  renderSideBySide: c === "side-by-side",
919
922
  renderValidationDecorations: "off",
920
923
  scrollBeyondLastLine: !1,
921
924
  automaticLayout: !0,
922
925
  fontSize: 13,
923
926
  fontFamily: "var(--ov-font-family-mono, monospace)"
924
- }), W = L.editor.createModel(t, r), H = L.editor.createModel(n, r);
925
- return j.setModel({
926
- original: W,
927
- modified: H
928
- }), h.current = j, C(!0), () => {
929
- j.getModel()?.original?.dispose(), j.getModel()?.modified?.dispose(), j.dispose(), h.current = null, C(!1);
927
+ }), z = W.editor.createModel(t, n), S = W.editor.createModel(r, n);
928
+ return x.setModel({
929
+ original: z,
930
+ modified: S
931
+ }), m.current = x, R(!0), () => {
932
+ x.getModel()?.original?.dispose(), x.getModel()?.modified?.dispose(), x.dispose(), m.current = null, R(!1);
930
933
  };
931
- }, []), z(() => {
932
- if (!h.current || !S) return;
933
- const j = h.current.getModel()?.original;
934
- j && t !== j.getValue() && j.setValue(t);
935
- }, [t, S]), z(() => {
936
- if (!h.current || !S) return;
937
- const j = h.current.getModifiedEditor();
938
- n !== j.getValue() && h.current.getModel()?.modified?.setValue(n);
939
- }, [n, S]), z(() => {
940
- if (!h.current || !S) return;
941
- const j = r ?? "plaintext", W = h.current.getModel();
942
- W?.original && L.editor.setModelLanguage(W.original, j), W?.modified && L.editor.setModelLanguage(W.modified, j);
943
- }, [r, S]), z(() => {
944
- !h.current || !S || h.current.updateOptions({
945
- readOnly: l,
934
+ }, []), U(() => {
935
+ if (!m.current || !T) return;
936
+ const x = m.current.getModel()?.original;
937
+ x && t !== x.getValue() && x.setValue(t);
938
+ }, [t, T]), U(() => {
939
+ if (!m.current || !T) return;
940
+ const x = m.current.getModifiedEditor();
941
+ r !== x.getValue() && m.current.getModel()?.modified?.setValue(r);
942
+ }, [r, T]), U(() => {
943
+ if (!m.current || !T) return;
944
+ const x = n ?? "plaintext", z = m.current.getModel();
945
+ z?.original && W.editor.setModelLanguage(z.original, x), z?.modified && W.editor.setModelLanguage(z.modified, x);
946
+ }, [n, T]), U(() => {
947
+ !m.current || !T || m.current.updateOptions({
948
+ readOnly: i,
946
949
  renderSideBySide: c === "side-by-side"
947
950
  });
948
- }, [l, c, S]), z(() => {
949
- S && (L.editor.defineTheme(ge, Ae(x.base, A.current)), L.editor.setTheme(ge));
950
- }, [S, x.registration]);
951
- const I = (j) => typeof j == "number" ? `${j}px` : j;
952
- return /* @__PURE__ */ T.jsx("div", { ref: g, className: vr(dt.Root, v), style: {
953
- "--_diff-height": I(f ?? "100%")
954
- }, "data-testid": "diff-viewer", ...a ? {} : {
951
+ }, [i, c, T]), U(() => {
952
+ T && (W.editor.defineTheme(pe, $e(k.base, j.current)), W.editor.setTheme(pe));
953
+ }, [T, k.registration]);
954
+ const H = (x) => typeof x == "number" ? `${x}px` : x;
955
+ return /* @__PURE__ */ E.jsx("div", { ref: h, className: jr(pt.Root, y), style: {
956
+ "--_diff-height": H(l ?? "100%")
957
+ }, "data-testid": "diff-viewer", ...d ? {} : {
955
958
  "data-borderless": ""
956
- }, children: /* @__PURE__ */ T.jsx("div", { ref: A, className: dt.Inner }) });
959
+ }, children: /* @__PURE__ */ E.jsx("div", { ref: j, className: pt.Inner }) });
957
960
  });
958
- br.displayName = "DiffViewer";
959
- function Ve(e) {
960
- const t = Xe(e), n = (r, c = "") => t?.getPropertyValue(r).trim() || c;
961
+ Nr.displayName = "DiffViewer";
962
+ function Je(e) {
963
+ const t = tt(e), r = (n, c = "") => t?.getPropertyValue(n).trim() || c;
961
964
  return {
962
- background: n("--ov-color-terminal-bg", "#0d0e10"),
963
- foreground: n("--ov-color-terminal-fg", "#e2e7ee"),
964
- cursor: n("--ov-color-terminal-cursor", "#89a7ee"),
965
- selectionBackground: n("--ov-color-terminal-selection-bg", "rgba(90,127,226,0.18)"),
966
- selectionForeground: n("--ov-color-terminal-selection-fg") || void 0,
967
- black: n("--ov-color-ansi-black", "#3b4252"),
968
- red: n("--ov-color-ansi-red", "#bf616a"),
969
- green: n("--ov-color-ansi-green", "#a3be8c"),
970
- yellow: n("--ov-color-ansi-yellow", "#ebcb8b"),
971
- blue: n("--ov-color-ansi-blue", "#81a1c1"),
972
- magenta: n("--ov-color-ansi-magenta", "#b48ead"),
973
- cyan: n("--ov-color-ansi-cyan", "#88c0d0"),
974
- white: n("--ov-color-ansi-white", "#e5e9f0"),
975
- brightBlack: n("--ov-color-ansi-bright-black", "#4c566a"),
976
- brightRed: n("--ov-color-ansi-bright-red", "#d08770"),
977
- brightGreen: n("--ov-color-ansi-bright-green", "#a3be8c"),
978
- brightYellow: n("--ov-color-ansi-bright-yellow", "#ebcb8b"),
979
- brightBlue: n("--ov-color-ansi-bright-blue", "#81a1c1"),
980
- brightMagenta: n("--ov-color-ansi-bright-magenta", "#b48ead"),
981
- brightCyan: n("--ov-color-ansi-bright-cyan", "#8fbcbb"),
982
- brightWhite: n("--ov-color-ansi-bright-white", "#eceff4")
965
+ background: r("--ov-color-terminal-bg", "#0d0e10"),
966
+ foreground: r("--ov-color-terminal-fg", "#e2e7ee"),
967
+ cursor: r("--ov-color-terminal-cursor", "#89a7ee"),
968
+ selectionBackground: r("--ov-color-terminal-selection-bg", "rgba(90,127,226,0.18)"),
969
+ selectionForeground: r("--ov-color-terminal-selection-fg") || void 0,
970
+ black: r("--ov-color-ansi-black", "#3b4252"),
971
+ red: r("--ov-color-ansi-red", "#bf616a"),
972
+ green: r("--ov-color-ansi-green", "#a3be8c"),
973
+ yellow: r("--ov-color-ansi-yellow", "#ebcb8b"),
974
+ blue: r("--ov-color-ansi-blue", "#81a1c1"),
975
+ magenta: r("--ov-color-ansi-magenta", "#b48ead"),
976
+ cyan: r("--ov-color-ansi-cyan", "#88c0d0"),
977
+ white: r("--ov-color-ansi-white", "#e5e9f0"),
978
+ brightBlack: r("--ov-color-ansi-bright-black", "#4c566a"),
979
+ brightRed: r("--ov-color-ansi-bright-red", "#d08770"),
980
+ brightGreen: r("--ov-color-ansi-bright-green", "#a3be8c"),
981
+ brightYellow: r("--ov-color-ansi-bright-yellow", "#ebcb8b"),
982
+ brightBlue: r("--ov-color-ansi-bright-blue", "#81a1c1"),
983
+ brightMagenta: r("--ov-color-ansi-bright-magenta", "#b48ead"),
984
+ brightCyan: r("--ov-color-ansi-bright-cyan", "#8fbcbb"),
985
+ brightWhite: r("--ov-color-ansi-bright-white", "#eceff4")
983
986
  };
984
987
  }
985
- const _r = "_Root_1s8vo_1", wr = {
986
- Root: _r
988
+ const Ar = "_Root_1s8vo_1", Lr = {
989
+ Root: Ar
987
990
  };
988
- function kr(...e) {
991
+ function Pr(...e) {
989
992
  return e.filter(Boolean).join(" ");
990
993
  }
991
- function xr(e, t) {
992
- let n = null;
994
+ function Or(e, t) {
995
+ let r = null;
993
996
  return {
994
- run: (...r) => {
995
- n !== null && clearTimeout(n), n = setTimeout(() => {
996
- n = null, e(...r);
997
+ run: (...n) => {
998
+ r !== null && clearTimeout(r), r = setTimeout(() => {
999
+ r = null, e(...n);
997
1000
  }, t);
998
1001
  },
999
1002
  cancel: () => {
1000
- n !== null && (clearTimeout(n), n = null);
1003
+ r !== null && (clearTimeout(r), r = null);
1001
1004
  }
1002
1005
  };
1003
1006
  }
1004
- const Cr = ve(function({
1007
+ const Dr = _e(function({
1005
1008
  onData: t,
1006
- onBinaryData: n,
1007
- onResize: r,
1009
+ onBinaryData: r,
1010
+ onResize: n,
1008
1011
  onSignal: c,
1009
- onError: l,
1010
- onClose: f,
1011
- onReady: a,
1012
- onBell: v,
1013
- onTitleChange: g,
1014
- onKey: x,
1015
- onSelectionChange: A,
1016
- onLineFeed: h,
1017
- onScroll: S,
1018
- onWriteParsed: C,
1019
- fontSize: I = 13,
1020
- fontFamily: j,
1021
- fontWeight: W,
1022
- fontWeightBold: H,
1023
- scrollback: q = 5e3,
1024
- cursorBlink: J = !0,
1025
- cursorStyle: U,
1026
- cursorWidth: D,
1027
- lineHeight: V,
1012
+ onError: i,
1013
+ onClose: l,
1014
+ onReady: d,
1015
+ onBell: y,
1016
+ onTitleChange: h,
1017
+ onKey: k,
1018
+ onSelectionChange: j,
1019
+ onLineFeed: m,
1020
+ onScroll: T,
1021
+ onWriteParsed: R,
1022
+ fontSize: H = 13,
1023
+ fontFamily: x,
1024
+ fontWeight: z,
1025
+ fontWeightBold: S,
1026
+ scrollback: D = 5e3,
1027
+ cursorBlink: I = !0,
1028
+ cursorStyle: B,
1029
+ cursorWidth: N,
1030
+ lineHeight: q,
1028
1031
  letterSpacing: P,
1029
- drawBoldTextInBrightColors: X = !0,
1030
- convertEol: ne = !0,
1031
- allowTransparency: y = !0,
1032
- macOptionIsMeta: s = !0,
1033
- macOptionClickForcesSelection: w = !0,
1034
- linkHandling: k = !0,
1035
- disableStdin: i,
1032
+ drawBoldTextInBrightColors: V = !0,
1033
+ convertEol: K = !0,
1034
+ allowTransparency: b = !0,
1035
+ macOptionIsMeta: o = !0,
1036
+ macOptionClickForcesSelection: v = !0,
1037
+ linkHandling: p = !0,
1038
+ disableStdin: s,
1036
1039
  customKeyEventHandler: u,
1037
- autoFocus: m = !1,
1038
- renderer: d = "auto",
1039
- rows: p,
1040
- cols: b,
1041
- screenReaderMode: o,
1042
- minimumContrastRatio: _,
1043
- className: M
1044
- }, E) {
1045
- const $ = Y(null), N = Y(null), O = Y(null), F = Y(null), Q = Y(null), oe = Y([]), le = Y(null), ae = Y(null), G = Y(null), ce = Qe(), ee = Y({
1040
+ autoFocus: f = !1,
1041
+ renderer: g = "auto",
1042
+ rows: _,
1043
+ cols: C,
1044
+ screenReaderMode: a,
1045
+ minimumContrastRatio: w,
1046
+ className: A
1047
+ }, L) {
1048
+ const F = G(null), O = G(null), $ = G(null), J = G(null), Z = G(null), oe = G([]), le = G(null), ae = G(null), X = G(null), ce = rt(), te = G({
1046
1049
  onData: t,
1047
- onBinaryData: n,
1048
- onResize: r,
1050
+ onBinaryData: r,
1051
+ onResize: n,
1049
1052
  onSignal: c,
1050
- onError: l,
1051
- onClose: f,
1052
- onReady: a,
1053
- onBell: v,
1054
- onTitleChange: g,
1055
- onKey: x,
1056
- onSelectionChange: A,
1057
- onLineFeed: h,
1058
- onScroll: S,
1059
- onWriteParsed: C
1053
+ onError: i,
1054
+ onClose: l,
1055
+ onReady: d,
1056
+ onBell: y,
1057
+ onTitleChange: h,
1058
+ onKey: k,
1059
+ onSelectionChange: j,
1060
+ onLineFeed: m,
1061
+ onScroll: T,
1062
+ onWriteParsed: R
1060
1063
  });
1061
- ee.current = {
1064
+ te.current = {
1062
1065
  onData: t,
1063
- onBinaryData: n,
1064
- onResize: r,
1066
+ onBinaryData: r,
1067
+ onResize: n,
1065
1068
  onSignal: c,
1066
- onError: l,
1067
- onClose: f,
1068
- onReady: a,
1069
- onBell: v,
1070
- onTitleChange: g,
1071
- onKey: x,
1072
- onSelectionChange: A,
1073
- onLineFeed: h,
1074
- onScroll: S,
1075
- onWriteParsed: C
1069
+ onError: i,
1070
+ onClose: l,
1071
+ onReady: d,
1072
+ onBell: y,
1073
+ onTitleChange: h,
1074
+ onKey: k,
1075
+ onSelectionChange: j,
1076
+ onLineFeed: m,
1077
+ onScroll: T,
1078
+ onWriteParsed: R
1076
1079
  };
1077
- const Oe = vt(() => {
1080
+ const Ie = De(() => {
1078
1081
  try {
1079
- O.current?.fit?.();
1082
+ $.current?.fit?.();
1080
1083
  } catch {
1081
1084
  }
1082
1085
  }, []);
1083
- return yt(E, () => ({
1084
- write: (R) => {
1085
- N.current?.write?.(R);
1086
+ return xt(L, () => ({
1087
+ write: (M) => {
1088
+ O.current?.write?.(M);
1086
1089
  },
1087
- writeln: (R) => {
1088
- N.current?.writeln?.(R);
1090
+ writeln: (M) => {
1091
+ O.current?.writeln?.(M);
1089
1092
  },
1090
1093
  clear: () => {
1091
- N.current?.clear?.();
1094
+ O.current?.clear?.();
1092
1095
  },
1093
1096
  focus: () => {
1094
- N.current?.focus?.();
1097
+ O.current?.focus?.();
1095
1098
  },
1096
1099
  blur: () => {
1097
- N.current?.blur?.();
1100
+ O.current?.blur?.();
1098
1101
  },
1099
- fit: Oe,
1102
+ fit: Ie,
1100
1103
  getDimensions: () => {
1101
- const R = N.current;
1102
- return R && typeof R.cols == "number" && typeof R.rows == "number" ? {
1103
- cols: R.cols,
1104
- rows: R.rows
1104
+ const M = O.current;
1105
+ return M && typeof M.cols == "number" && typeof M.rows == "number" ? {
1106
+ cols: M.cols,
1107
+ rows: M.rows
1105
1108
  } : null;
1106
1109
  },
1107
1110
  reset: () => {
1108
- N.current?.reset?.();
1111
+ O.current?.reset?.();
1109
1112
  },
1110
1113
  scrollToBottom: () => {
1111
- N.current?.scrollToBottom?.();
1114
+ O.current?.scrollToBottom?.();
1112
1115
  },
1113
- findNext: (R, te) => F.current?.findNext?.(R, te) ?? !1,
1114
- findPrevious: (R, te) => F.current?.findPrevious?.(R, te) ?? !1,
1116
+ findNext: (M, re) => J.current?.findNext?.(M, re) ?? !1,
1117
+ findPrevious: (M, re) => J.current?.findPrevious?.(M, re) ?? !1,
1115
1118
  clearSearch: () => {
1116
- F.current?.clearDecorations?.();
1119
+ J.current?.clearDecorations?.();
1117
1120
  },
1118
- getSelection: () => N.current?.getSelection?.() ?? "",
1119
- hasSelection: () => N.current?.hasSelection?.() ?? !1,
1121
+ getSelection: () => O.current?.getSelection?.() ?? "",
1122
+ hasSelection: () => O.current?.hasSelection?.() ?? !1,
1120
1123
  selectAll: () => {
1121
- N.current?.selectAll?.();
1124
+ O.current?.selectAll?.();
1122
1125
  },
1123
1126
  clearSelection: () => {
1124
- N.current?.clearSelection?.();
1127
+ O.current?.clearSelection?.();
1125
1128
  },
1126
- scrollToLine: (R) => {
1127
- N.current?.scrollToLine?.(R);
1129
+ scrollToLine: (M) => {
1130
+ O.current?.scrollToLine?.(M);
1128
1131
  },
1129
- scrollUp: (R) => {
1130
- N.current?.scrollLines?.(-R);
1132
+ scrollUp: (M) => {
1133
+ O.current?.scrollLines?.(-M);
1131
1134
  },
1132
- scrollDown: (R) => {
1133
- N.current?.scrollLines?.(R);
1135
+ scrollDown: (M) => {
1136
+ O.current?.scrollLines?.(M);
1134
1137
  },
1135
- paste: (R) => {
1136
- N.current?.paste?.(R);
1138
+ paste: (M) => {
1139
+ O.current?.paste?.(M);
1137
1140
  },
1138
- getBufferContent: () => Q.current?.serialize?.() ?? ""
1139
- })), z(() => {
1140
- const R = $.current;
1141
- if (!R) return;
1142
- let te = !1;
1143
- async function Pe() {
1141
+ getBufferContent: () => Z.current?.serialize?.() ?? ""
1142
+ })), U(() => {
1143
+ const M = F.current;
1144
+ if (!M) return;
1145
+ let re = !1;
1146
+ async function We() {
1144
1147
  await document.fonts.ready;
1145
1148
  const [{
1146
- Terminal: pe
1149
+ Terminal: ye
1147
1150
  }, {
1148
- FitAddon: Le
1151
+ FitAddon: He
1149
1152
  }, {
1150
- SearchAddon: Nt
1153
+ SearchAddon: Bt
1151
1154
  }, {
1152
- SerializeAddon: Ot
1155
+ SerializeAddon: qt
1153
1156
  }, {
1154
- Unicode11Addon: Pt
1157
+ Unicode11Addon: zt
1155
1158
  }] = await Promise.all([import("@xterm/xterm"), import("@xterm/addon-fit"), import("@xterm/addon-search"), import("@xterm/addon-serialize"), import("@xterm/addon-unicode11")]);
1156
- if (te) return;
1157
- const Lt = Ve(R), ie = {
1158
- fontSize: I,
1159
- fontFamily: j || "'Menlo', 'Monaco', 'Consolas', 'Liberation Mono', 'Courier New', monospace",
1160
- theme: Lt,
1161
- allowTransparency: y,
1162
- cursorBlink: J,
1163
- convertEol: ne,
1164
- scrollback: q,
1165
- macOptionIsMeta: s,
1166
- macOptionClickForcesSelection: w,
1159
+ if (re) return;
1160
+ const Vt = Je(M), ie = {
1161
+ fontSize: H,
1162
+ fontFamily: x || "'Menlo', 'Monaco', 'Consolas', 'Liberation Mono', 'Courier New', monospace",
1163
+ theme: Vt,
1164
+ allowTransparency: b,
1165
+ cursorBlink: I,
1166
+ convertEol: K,
1167
+ scrollback: D,
1168
+ macOptionIsMeta: o,
1169
+ macOptionClickForcesSelection: v,
1167
1170
  allowProposedApi: !0,
1168
- drawBoldTextInBrightColors: X
1171
+ drawBoldTextInBrightColors: V
1169
1172
  };
1170
- W !== void 0 && (ie.fontWeight = W), H !== void 0 && (ie.fontWeightBold = H), i !== void 0 && (ie.disableStdin = i), U !== void 0 && (ie.cursorStyle = U), D !== void 0 && (ie.cursorWidth = D), V !== void 0 && (ie.lineHeight = V), P !== void 0 && (ie.letterSpacing = P), p !== void 0 && (ie.rows = p), b !== void 0 && (ie.cols = b), o !== void 0 && (ie.screenReaderMode = o), _ !== void 0 && (ie.minimumContrastRatio = _);
1171
- const B = new pe(ie);
1172
- u && B.attachCustomKeyEventHandler(u);
1173
- const _e = [], we = new Le(), De = new Nt(), $e = new Ot(), Ze = new Pt();
1174
- if (B.loadAddon(we), B.loadAddon(De), B.loadAddon($e), B.loadAddon(Ze), _e.push(we, De, $e, Ze), B.unicode.activeVersion = "11", k)
1173
+ z !== void 0 && (ie.fontWeight = z), S !== void 0 && (ie.fontWeightBold = S), s !== void 0 && (ie.disableStdin = s), B !== void 0 && (ie.cursorStyle = B), N !== void 0 && (ie.cursorWidth = N), q !== void 0 && (ie.lineHeight = q), P !== void 0 && (ie.letterSpacing = P), _ !== void 0 && (ie.rows = _), C !== void 0 && (ie.cols = C), a !== void 0 && (ie.screenReaderMode = a), w !== void 0 && (ie.minimumContrastRatio = w);
1174
+ const Y = new ye(ie);
1175
+ u && Y.attachCustomKeyEventHandler(u);
1176
+ const xe = [], ke = new He(), Be = new Bt(), qe = new qt(), nt = new zt();
1177
+ if (Y.loadAddon(ke), Y.loadAddon(Be), Y.loadAddon(qe), Y.loadAddon(nt), xe.push(ke, Be, qe, nt), Y.unicode.activeVersion = "11", p)
1175
1178
  try {
1176
1179
  const {
1177
- WebLinksAddon: Z
1180
+ WebLinksAddon: Q
1178
1181
  } = await import("@xterm/addon-web-links");
1179
- if (!te) {
1180
- const ue = new Z();
1181
- B.loadAddon(ue), _e.push(ue);
1182
+ if (!re) {
1183
+ const de = new Q();
1184
+ Y.loadAddon(de), xe.push(de);
1182
1185
  }
1183
1186
  } catch {
1184
1187
  }
1185
- if (te) {
1186
- B.dispose();
1188
+ if (re) {
1189
+ Y.dispose();
1187
1190
  return;
1188
1191
  }
1189
- if (B.open(R), d === "auto" || d === "webgl")
1192
+ if (Y.open(M), g === "auto" || g === "webgl")
1190
1193
  try {
1191
1194
  const {
1192
- WebglAddon: Z
1195
+ WebglAddon: Q
1193
1196
  } = await import("@xterm/addon-webgl");
1194
- if (!te) {
1195
- const ue = new Z();
1196
- ue.onContextLoss(() => {
1197
- ue.dispose();
1198
- }), B.loadAddon(ue), _e.push(ue);
1197
+ if (!re) {
1198
+ const de = new Q();
1199
+ de.onContextLoss(() => {
1200
+ de.dispose();
1201
+ }), Y.loadAddon(de), xe.push(de);
1199
1202
  }
1200
1203
  } catch {
1201
1204
  }
1202
- if (te) {
1203
- for (const Z of _e)
1205
+ if (re) {
1206
+ for (const Q of xe)
1204
1207
  try {
1205
- Z.dispose();
1208
+ Q.dispose();
1206
1209
  } catch {
1207
1210
  }
1208
- B.dispose();
1211
+ Y.dispose();
1209
1212
  return;
1210
1213
  }
1211
- B.options.theme = Ve(R), we.fit(), N.current = B, O.current = we, F.current = De, Q.current = $e, oe.current = _e, B.onData((Z) => {
1212
- ee.current.onData?.(Z);
1213
- }), B.onBinary((Z) => {
1214
- ee.current.onBinaryData?.(Z);
1215
- }), B.onResize(({
1216
- cols: Z,
1217
- rows: ue
1214
+ Y.options.theme = Je(M), ke.fit(), O.current = Y, $.current = ke, J.current = Be, Z.current = qe, oe.current = xe, Y.onData((Q) => {
1215
+ te.current.onData?.(Q);
1216
+ }), Y.onBinary((Q) => {
1217
+ te.current.onBinaryData?.(Q);
1218
+ }), Y.onResize(({
1219
+ cols: Q,
1220
+ rows: de
1218
1221
  }) => {
1219
- ee.current.onResize?.(Z, ue);
1220
- }), B.onBell(() => {
1221
- ee.current.onBell?.();
1222
- }), B.onTitleChange((Z) => {
1223
- ee.current.onTitleChange?.(Z);
1224
- }), B.onKey((Z) => {
1225
- ee.current.onKey?.(Z);
1226
- }), B.onSelectionChange(() => {
1227
- ee.current.onSelectionChange?.();
1228
- }), B.onLineFeed(() => {
1229
- ee.current.onLineFeed?.();
1230
- }), B.onScroll((Z) => {
1231
- ee.current.onScroll?.(Z);
1232
- }), B.onWriteParsed(() => {
1233
- ee.current.onWriteParsed?.();
1222
+ te.current.onResize?.(Q, de);
1223
+ }), Y.onBell(() => {
1224
+ te.current.onBell?.();
1225
+ }), Y.onTitleChange((Q) => {
1226
+ te.current.onTitleChange?.(Q);
1227
+ }), Y.onKey((Q) => {
1228
+ te.current.onKey?.(Q);
1229
+ }), Y.onSelectionChange(() => {
1230
+ te.current.onSelectionChange?.();
1231
+ }), Y.onLineFeed(() => {
1232
+ te.current.onLineFeed?.();
1233
+ }), Y.onScroll((Q) => {
1234
+ te.current.onScroll?.(Q);
1235
+ }), Y.onWriteParsed(() => {
1236
+ te.current.onWriteParsed?.();
1234
1237
  });
1235
- const Ie = xr(() => {
1238
+ const ze = Or(() => {
1236
1239
  try {
1237
- we.fit();
1240
+ ke.fit();
1238
1241
  } catch {
1239
1242
  }
1240
1243
  }, 10);
1241
- ae.current = Ie;
1242
- const Ke = new ResizeObserver(() => {
1243
- Ie.run();
1244
+ ae.current = ze;
1245
+ const ot = new ResizeObserver(() => {
1246
+ ze.run();
1244
1247
  });
1245
- Ke.observe(R), le.current = Ke;
1246
- const et = () => {
1247
- Ie.run();
1248
+ ot.observe(M), le.current = ot;
1249
+ const it = () => {
1250
+ ze.run();
1248
1251
  };
1249
- window.addEventListener("resize", et), G.current = () => {
1250
- window.removeEventListener("resize", et);
1251
- }, m && B.focus(), ee.current.onReady?.({
1252
- cols: B.cols,
1253
- rows: B.rows
1252
+ window.addEventListener("resize", it), X.current = () => {
1253
+ window.removeEventListener("resize", it);
1254
+ }, f && Y.focus(), te.current.onReady?.({
1255
+ cols: Y.cols,
1256
+ rows: Y.rows
1254
1257
  });
1255
1258
  }
1256
- return Pe().catch((pe) => {
1257
- ee.current.onError?.(pe instanceof Error ? pe : new Error(String(pe)));
1259
+ return We().catch((ye) => {
1260
+ te.current.onError?.(ye instanceof Error ? ye : new Error(String(ye)));
1258
1261
  }), () => {
1259
- te = !0, ae.current?.cancel(), ae.current = null, le.current?.disconnect(), le.current = null, G.current?.(), G.current = null;
1260
- for (const Le of oe.current)
1262
+ re = !0, ae.current?.cancel(), ae.current = null, le.current?.disconnect(), le.current = null, X.current?.(), X.current = null;
1263
+ for (const He of oe.current)
1261
1264
  try {
1262
- Le.dispose();
1265
+ He.dispose();
1263
1266
  } catch {
1264
1267
  }
1265
1268
  oe.current = [];
1266
- const pe = N.current;
1269
+ const ye = O.current;
1267
1270
  try {
1268
- pe?.dispose?.();
1271
+ ye?.dispose?.();
1269
1272
  } catch {
1270
1273
  }
1271
- N.current = null, O.current = null, F.current = null, Q.current = null;
1274
+ O.current = null, $.current = null, J.current = null, Z.current = null;
1272
1275
  };
1273
- }, []), z(() => {
1274
- const R = N.current;
1275
- R?.options && (R.options.theme = Ve($.current));
1276
- }, [ce.registration]), z(() => {
1277
- const R = N.current;
1278
- R?.options && (R.options.fontSize = I, ae.current?.run());
1279
- }, [I]), z(() => {
1280
- const R = N.current;
1281
- R?.options && J !== void 0 && (R.options.cursorBlink = J);
1282
- }, [J]), z(() => {
1283
- const R = N.current;
1284
- R?.options && U !== void 0 && (R.options.cursorStyle = U);
1285
- }, [U]), z(() => {
1286
- const R = N.current;
1287
- R?.options && q !== void 0 && (R.options.scrollback = q);
1288
- }, [q]), z(() => {
1289
- const R = N.current;
1290
- R?.options && V !== void 0 && (R.options.lineHeight = V, ae.current?.run());
1291
- }, [V]), z(() => {
1292
- const R = N.current;
1293
- R?.options && P !== void 0 && (R.options.letterSpacing = P, ae.current?.run());
1294
- }, [P]), /* @__PURE__ */ T.jsx("div", { ref: $, className: kr(wr.Root, M), "data-testid": "terminal" });
1276
+ }, []), U(() => {
1277
+ const M = O.current;
1278
+ M?.options && (M.options.theme = Je(F.current));
1279
+ }, [ce.registration]), U(() => {
1280
+ const M = O.current;
1281
+ M?.options && (M.options.fontSize = H, ae.current?.run());
1282
+ }, [H]), U(() => {
1283
+ const M = O.current;
1284
+ M?.options && I !== void 0 && (M.options.cursorBlink = I);
1285
+ }, [I]), U(() => {
1286
+ const M = O.current;
1287
+ M?.options && B !== void 0 && (M.options.cursorStyle = B);
1288
+ }, [B]), U(() => {
1289
+ const M = O.current;
1290
+ M?.options && D !== void 0 && (M.options.scrollback = D);
1291
+ }, [D]), U(() => {
1292
+ const M = O.current;
1293
+ M?.options && q !== void 0 && (M.options.lineHeight = q, ae.current?.run());
1294
+ }, [q]), U(() => {
1295
+ const M = O.current;
1296
+ M?.options && P !== void 0 && (M.options.letterSpacing = P, ae.current?.run());
1297
+ }, [P]), /* @__PURE__ */ E.jsx("div", { ref: F, className: Pr(Lr.Root, A), "data-testid": "terminal" });
1295
1298
  });
1296
- Cr.displayName = "Terminal";
1297
- const Rr = "_Root_1wl3o_1", Sr = "_Loading_1wl3o_92", ft = {
1298
- Root: Rr,
1299
- Loading: Sr
1300
- }, Tr = [qt], Er = $t(() => import("react-markdown"));
1301
- function jr(...e) {
1299
+ Dr.displayName = "Terminal";
1300
+ const $r = "_Root_1wl3o_1", Ir = "_Loading_1wl3o_92", yt = {
1301
+ Root: $r,
1302
+ Loading: Ir
1303
+ }, Wr = [ir], Hr = Rt(() => import("react-markdown"));
1304
+ function Br(...e) {
1302
1305
  return e.filter(Boolean).join(" ");
1303
1306
  }
1304
- function wt(e) {
1305
- return e ? e.type === "text" ? e.value ?? "" : Array.isArray(e.children) ? e.children.map(wt).join("") : "" : "";
1307
+ function jt(e) {
1308
+ return e ? e.type === "text" ? e.value ?? "" : Array.isArray(e.children) ? e.children.map(jt).join("") : "" : "";
1306
1309
  }
1307
- function Mr(e) {
1308
- const t = be.c(4), {
1309
- summaryText: n,
1310
- children: r
1311
- } = e, l = `md-details-${Bt()}`;
1312
- let f;
1313
- return t[0] !== r || t[1] !== l || t[2] !== n ? (f = /* @__PURE__ */ T.jsx(tt, { animation: "fast", children: /* @__PURE__ */ T.jsx(tt.Item, { id: l, title: n, children: r }) }), t[0] = r, t[1] = l, t[2] = n, t[3] = f) : f = t[3], f;
1310
+ function qr(e) {
1311
+ const t = Ce.c(4), {
1312
+ summaryText: r,
1313
+ children: n
1314
+ } = e, i = `md-details-${Yt()}`;
1315
+ let l;
1316
+ return t[0] !== n || t[1] !== i || t[2] !== r ? (l = /* @__PURE__ */ E.jsx(st, { animation: "fast", children: /* @__PURE__ */ E.jsx(st.Item, { id: i, title: r, children: n }) }), t[0] = n, t[1] = i, t[2] = r, t[3] = l) : l = t[3], l;
1314
1317
  }
1315
- const Ar = {
1318
+ const zr = {
1316
1319
  // Code blocks & inline code
1317
1320
  pre: ({
1318
1321
  children: e
1319
- }) => /* @__PURE__ */ T.jsx(T.Fragment, { children: e }),
1322
+ }) => /* @__PURE__ */ E.jsx(E.Fragment, { children: e }),
1320
1323
  code: ({
1321
1324
  className: e,
1322
1325
  children: t
1323
1326
  }) => {
1324
- const n = /language-([^\s]+)/.exec(e ?? ""), r = String(t).replace(/\n$/, "");
1325
- return n || r.includes(`
1326
- `) ? /* @__PURE__ */ T.jsx(Ft, { language: n?.[1], copyable: !0, children: r }) : /* @__PURE__ */ T.jsx(Yt, { children: t });
1327
+ const r = /language-([^\s]+)/.exec(e ?? ""), n = String(t).replace(/\n$/, "");
1328
+ return r || n.includes(`
1329
+ `) ? /* @__PURE__ */ E.jsx(Qt, { language: r?.[1], copyable: !0, children: n }) : /* @__PURE__ */ E.jsx(er, { children: t });
1327
1330
  },
1328
1331
  // Tables
1329
1332
  table: ({
1330
1333
  children: e
1331
- }) => /* @__PURE__ */ T.jsx(ye.Root, { striped: !0, hoverable: !0, size: "sm", children: e }),
1334
+ }) => /* @__PURE__ */ E.jsx(be.Root, { striped: !0, hoverable: !0, size: "sm", children: e }),
1332
1335
  thead: ({
1333
1336
  children: e
1334
- }) => /* @__PURE__ */ T.jsx(ye.Head, { children: e }),
1337
+ }) => /* @__PURE__ */ E.jsx(be.Head, { children: e }),
1335
1338
  tbody: ({
1336
1339
  children: e
1337
- }) => /* @__PURE__ */ T.jsx(ye.Body, { children: e }),
1340
+ }) => /* @__PURE__ */ E.jsx(be.Body, { children: e }),
1338
1341
  tr: ({
1339
1342
  children: e
1340
- }) => /* @__PURE__ */ T.jsx(ye.Row, { children: e }),
1343
+ }) => /* @__PURE__ */ E.jsx(be.Row, { children: e }),
1341
1344
  th: ({
1342
1345
  children: e,
1343
1346
  style: t
1344
- }) => /* @__PURE__ */ T.jsx(ye.HeaderCell, { style: t, children: e }),
1347
+ }) => /* @__PURE__ */ E.jsx(be.HeaderCell, { style: t, children: e }),
1345
1348
  td: ({
1346
1349
  children: e,
1347
1350
  style: t
1348
- }) => /* @__PURE__ */ T.jsx(ye.Cell, { style: t, children: e }),
1351
+ }) => /* @__PURE__ */ E.jsx(be.Cell, { style: t, children: e }),
1349
1352
  // Links
1350
1353
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
1351
1354
  a: ({
1352
1355
  children: e,
1353
1356
  href: t,
1354
- node: n,
1355
- ...r
1356
- }) => /* @__PURE__ */ T.jsx(Vt, { ...r, href: t, target: "_blank", rel: "noopener noreferrer", underline: "hover", children: e }),
1357
+ node: r,
1358
+ ...n
1359
+ }) => /* @__PURE__ */ E.jsx(Zt, { ...n, href: t, target: "_blank", rel: "noopener noreferrer", underline: "hover", children: e }),
1357
1360
  // Blockquotes
1358
1361
  blockquote: ({
1359
1362
  children: e
1360
- }) => /* @__PURE__ */ T.jsx(Ut, { variant: "plain", children: e }),
1363
+ }) => /* @__PURE__ */ E.jsx(Xt, { variant: "plain", children: e }),
1361
1364
  // Horizontal rules
1362
- hr: () => /* @__PURE__ */ T.jsx(Ht, {}),
1365
+ hr: () => /* @__PURE__ */ E.jsx(Kt, {}),
1363
1366
  // Details/summary → Accordion — extract title from the hast node's summary child
1364
1367
  details: ({
1365
1368
  children: e,
1366
1369
  node: t
1367
1370
  }) => {
1368
- let n = "Details";
1371
+ let r = "Details";
1369
1372
  if (t?.children) {
1370
- const c = t.children.find((l) => l.tagName === "summary");
1373
+ const c = t.children.find((i) => i.tagName === "summary");
1371
1374
  if (c) {
1372
- const l = wt(c).trim();
1373
- l && (n = l);
1375
+ const i = jt(c).trim();
1376
+ i && (r = i);
1374
1377
  }
1375
1378
  }
1376
- const r = [];
1377
- return It.forEach(e, (c) => {
1378
- Wt(c) && c.props?.["data-md-summary"] || r.push(c);
1379
- }), /* @__PURE__ */ T.jsx(Mr, { summaryText: n, children: r });
1379
+ const n = [];
1380
+ return Ft.forEach(e, (c) => {
1381
+ Ut(c) && c.props?.["data-md-summary"] || n.push(c);
1382
+ }), /* @__PURE__ */ E.jsx(qr, { summaryText: r, children: n });
1380
1383
  },
1381
1384
  // Mark summary so details can filter it out; text is extracted from hast node
1382
1385
  summary: ({
1383
1386
  children: e
1384
- }) => /* @__PURE__ */ T.jsx("span", { hidden: !0, "data-md-summary": !0, children: e }),
1387
+ }) => /* @__PURE__ */ E.jsx("span", { hidden: !0, "data-md-summary": !0, children: e }),
1385
1388
  // Task list checkboxes — use compound parts for inline rendering
1386
1389
  input: ({
1387
1390
  type: e,
1388
1391
  checked: t,
1389
- disabled: n
1390
- }) => e === "checkbox" ? /* @__PURE__ */ T.jsx(We.Root, { checked: t, disabled: n, size: "sm", className: "ov-md-checkbox", children: /* @__PURE__ */ T.jsx(We.Control, { children: /* @__PURE__ */ T.jsx(We.Indicator, { keepMounted: !0 }) }) }) : null
1391
- }, Nr = ve(function(t, n) {
1392
- const r = be.c(16);
1393
- let c, l, f, a;
1394
- r[0] !== t ? ({
1395
- content: l,
1396
- allowHtml: a,
1392
+ disabled: r
1393
+ }) => e === "checkbox" ? /* @__PURE__ */ E.jsx(Ve.Root, { checked: t, disabled: r, size: "sm", className: "ov-md-checkbox", children: /* @__PURE__ */ E.jsx(Ve.Control, { children: /* @__PURE__ */ E.jsx(Ve.Indicator, { keepMounted: !0 }) }) }) : null
1394
+ }, Vr = _e(function(t, r) {
1395
+ const n = Ce.c(16);
1396
+ let c, i, l, d;
1397
+ n[0] !== t ? ({
1398
+ content: i,
1399
+ allowHtml: d,
1397
1400
  className: c,
1398
- ...f
1399
- } = t, r[0] = t, r[1] = c, r[2] = l, r[3] = f, r[4] = a) : (c = r[1], l = r[2], f = r[3], a = r[4]);
1400
- const v = a === void 0 ? !1 : a;
1401
- let g;
1402
- r[5] !== c ? (g = jr(ft.Root, c), r[5] = c, r[6] = g) : g = r[6];
1403
- let x;
1404
- r[7] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (x = /* @__PURE__ */ T.jsx("div", { className: ft.Loading, "data-testid": "markdown-loading", children: "Loading…" }), r[7] = x) : x = r[7];
1405
- let A;
1406
- r[8] !== v || r[9] !== l ? (A = /* @__PURE__ */ T.jsx(Dt, { fallback: x, children: /* @__PURE__ */ T.jsx(Pr, { content: l, allowHtml: v }) }), r[8] = v, r[9] = l, r[10] = A) : A = r[10];
1401
+ ...l
1402
+ } = t, n[0] = t, n[1] = c, n[2] = i, n[3] = l, n[4] = d) : (c = n[1], i = n[2], l = n[3], d = n[4]);
1403
+ const y = d === void 0 ? !1 : d;
1407
1404
  let h;
1408
- return r[11] !== f || r[12] !== n || r[13] !== g || r[14] !== A ? (h = /* @__PURE__ */ T.jsx("div", { ref: n, className: g, "data-testid": "markdown-preview", ...f, children: A }), r[11] = f, r[12] = n, r[13] = g, r[14] = A, r[15] = h) : h = r[15], h;
1405
+ n[5] !== c ? (h = Br(yt.Root, c), n[5] = c, n[6] = h) : h = n[6];
1406
+ let k;
1407
+ n[7] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (k = /* @__PURE__ */ E.jsx("div", { className: yt.Loading, "data-testid": "markdown-loading", children: "Loading…" }), n[7] = k) : k = n[7];
1408
+ let j;
1409
+ n[8] !== y || n[9] !== i ? (j = /* @__PURE__ */ E.jsx(kt, { fallback: k, children: /* @__PURE__ */ E.jsx(Ur, { content: i, allowHtml: y }) }), n[8] = y, n[9] = i, n[10] = j) : j = n[10];
1410
+ let m;
1411
+ return n[11] !== l || n[12] !== r || n[13] !== h || n[14] !== j ? (m = /* @__PURE__ */ E.jsx("div", { ref: r, className: h, "data-testid": "markdown-preview", ...l, children: j }), n[11] = l, n[12] = r, n[13] = h, n[14] = j, n[15] = m) : m = n[15], m;
1409
1412
  });
1410
- Nr.displayName = "MarkdownPreview";
1411
- const Or = {
1412
- ...Be,
1413
+ Vr.displayName = "MarkdownPreview";
1414
+ const Fr = {
1415
+ ...Fe,
1413
1416
  attributes: {
1414
- ...Be.attributes,
1415
- "*": [...Be.attributes?.["*"] ?? [], "className"]
1417
+ ...Fe.attributes,
1418
+ "*": [...Fe.attributes?.["*"] ?? [], "className"]
1416
1419
  }
1417
1420
  };
1418
- function Pr(e) {
1419
- const t = be.c(6), {
1420
- content: n,
1421
- allowHtml: r
1421
+ function Ur(e) {
1422
+ const t = Ce.c(6), {
1423
+ content: r,
1424
+ allowHtml: n
1422
1425
  } = e;
1423
1426
  let c;
1424
- t[0] !== r ? (c = r ? [Jt, [Gt, Or]] : [], t[0] = r, t[1] = c) : c = t[1];
1425
- const l = c, f = !r, a = l;
1426
- let v;
1427
- return t[2] !== n || t[3] !== f || t[4] !== a ? (v = /* @__PURE__ */ T.jsx(Er, { skipHtml: f, remarkPlugins: Tr, rehypePlugins: a, components: Ar, children: n }), t[2] = n, t[3] = f, t[4] = a, t[5] = v) : v = t[5], v;
1428
- }
1429
- const Lr = "_Overlay_a3q8o_1", Dr = "_Root_a3q8o_11", $r = "_CommandList_a3q8o_24", Ir = "_Results_a3q8o_29", Ee = {
1430
- Overlay: Lr,
1431
- Root: Dr,
1432
- CommandList: $r,
1433
- Results: Ir
1427
+ t[0] !== n ? (c = n ? [sr, [ar, Fr]] : [], t[0] = n, t[1] = c) : c = t[1];
1428
+ const i = c, l = !n, d = i;
1429
+ let y;
1430
+ return t[2] !== r || t[3] !== l || t[4] !== d ? (y = /* @__PURE__ */ E.jsx(Hr, { skipHtml: l, remarkPlugins: Wr, rehypePlugins: d, components: zr, children: r }), t[2] = r, t[3] = l, t[4] = d, t[5] = y) : y = t[5], y;
1431
+ }
1432
+ const Yr = "_Overlay_pgin5_1", Gr = "_Root_pgin5_12", Jr = "_CommandList_pgin5_25", Kr = "_Results_pgin5_30", Xr = "_Message_pgin5_35", Ee = {
1433
+ Overlay: Yr,
1434
+ Root: Gr,
1435
+ CommandList: Jr,
1436
+ Results: Kr,
1437
+ Message: Xr
1434
1438
  };
1435
- function Wr(e) {
1439
+ function Zr(e) {
1436
1440
  return e.id;
1437
1441
  }
1438
- function Fe(e, t) {
1439
- const n = e.toLowerCase(), r = t.toLowerCase();
1442
+ function Ke(e, t) {
1443
+ const r = e.toLowerCase(), n = t.toLowerCase();
1440
1444
  let c = 0;
1441
- for (let l = 0; l < n.length && c < r.length; l++)
1442
- n[l] === r[c] && c++;
1443
- return c === r.length;
1444
- }
1445
- const Br = ve(function(t, n) {
1446
- const r = be.c(22), {
1447
- open: c,
1448
- onClose: l,
1449
- commands: f,
1450
- onSelect: a,
1451
- placeholder: v
1452
- } = t, g = v === void 0 ? "Type a command…" : v;
1453
- let x;
1454
- r[0] !== f ? (x = f.filter(zr), r[0] = f, r[1] = x) : x = r[1];
1455
- const A = x;
1456
- if (!c)
1457
- return null;
1445
+ for (let i = 0; i < r.length && c < n.length; i++)
1446
+ r[i] === n[c] && c++;
1447
+ return c === n.length;
1448
+ }
1449
+ function Qr(e, t) {
1450
+ return Ke(e.label, t) || (e.description ? Ke(e.description, t) : !1) || (e.group ? Ke(e.group, t) : !1);
1451
+ }
1452
+ const en = [];
1453
+ function tn(e) {
1454
+ const t = Ce.c(7), {
1455
+ inputRef: r
1456
+ } = e, {
1457
+ listId: n
1458
+ } = tr(), c = rr(), {
1459
+ activeKey: i
1460
+ } = Gt(c.subscribe, c.getSnapshot, c.getSnapshot), l = i != null ? `${n}-item-${i}` : void 0;
1461
+ let d, y;
1462
+ t[0] !== l || t[1] !== r ? (d = () => {
1463
+ l && r.current?.ownerDocument.getElementById(l)?.scrollIntoView?.({
1464
+ block: "nearest"
1465
+ });
1466
+ }, y = [l, r], t[0] = l, t[1] = r, t[2] = d, t[3] = y) : (d = t[2], y = t[3]), St(d, y);
1458
1467
  let h;
1459
- r[2] !== l ? (h = (J) => {
1460
- J.key === "Escape" && l();
1461
- }, r[2] = l, r[3] = h) : h = r[3];
1462
- let S;
1463
- r[4] !== l || r[5] !== a ? (S = (J, U) => {
1464
- a(U), l();
1465
- }, r[4] = l, r[5] = a, r[6] = S) : S = r[6];
1466
- let C, I, j;
1467
- r[7] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (C = /* @__PURE__ */ T.jsx(fe.Input, { "data-testid": "command-palette-input" }), I = /* @__PURE__ */ T.jsx(fe.Results, { className: Ee.Results, "data-testid": "command-palette-list" }), j = /* @__PURE__ */ T.jsx(fe.Empty, { "data-testid": "command-palette-empty", children: "No matching commands" }), r[7] = C, r[8] = I, r[9] = j) : (C = r[7], I = r[8], j = r[9]);
1468
- let W;
1469
- r[10] !== A || r[11] !== l || r[12] !== g || r[13] !== S ? (W = /* @__PURE__ */ T.jsxs(fe.Root, { className: Ee.CommandList, items: A, itemKey: Wr, renderItem: Vr, filterFn: Fr, groupBy: Yr, onAction: S, onDismiss: l, placeholder: g, density: "compact", children: [
1470
- C,
1471
- I,
1472
- j
1473
- ] }), r[10] = A, r[11] = l, r[12] = g, r[13] = S, r[14] = W) : W = r[14];
1474
- let H;
1475
- r[15] !== n || r[16] !== W ? (H = /* @__PURE__ */ T.jsx("div", { ref: n, className: Ee.Root, onClick: Hr, onKeyDown: Ur, role: "dialog", "aria-modal": "true", "aria-label": "Command palette", "data-testid": "command-palette", children: W }), r[15] = n, r[16] = W, r[17] = H) : H = r[17];
1476
- let q;
1477
- return r[18] !== l || r[19] !== h || r[20] !== H ? (q = /* @__PURE__ */ T.jsx("div", { role: "presentation", className: Ee.Overlay, onClick: l, onKeyDown: h, "data-testid": "command-palette-overlay", children: H }), r[18] = l, r[19] = h, r[20] = H, r[21] = q) : q = r[21], q;
1468
+ return t[4] !== l || t[5] !== r ? (h = /* @__PURE__ */ E.jsx(ue.Input, { ref: r, autoFocus: !1, role: "combobox", "aria-label": "Search commands", "aria-expanded": "true", "aria-haspopup": "listbox", "aria-activedescendant": l, autoComplete: "off", spellCheck: !1, "data-testid": "command-palette-input" }), t[4] = l, t[5] = r, t[6] = h) : h = t[6], h;
1469
+ }
1470
+ const rn = _e(function({
1471
+ open: t,
1472
+ onClose: r,
1473
+ commands: n,
1474
+ onSelect: c,
1475
+ placeholder: i = "Type a command…",
1476
+ loading: l = !1,
1477
+ error: d
1478
+ }, y) {
1479
+ const h = G(null), k = G(null), j = G(!1), m = d !== void 0, T = Oe(() => n.filter((S) => !S.disabled), [n]), R = m || l ? en : T, H = Oe(() => {
1480
+ const S = /* @__PURE__ */ new Map(), D = /* @__PURE__ */ new Map();
1481
+ let I, B = -1;
1482
+ for (const N of R) {
1483
+ const q = N.group || "Other commands";
1484
+ q !== I && B++, I = q;
1485
+ const P = String(B);
1486
+ S.set(N.id, P), D.set(P, q);
1487
+ }
1488
+ return {
1489
+ keys: S,
1490
+ labels: D,
1491
+ grouped: R.some((N) => N.group)
1492
+ };
1493
+ }, [R]), x = De((S) => H.keys.get(S.id), [H]), z = De((S) => H.labels.get(S), [H]);
1494
+ return St(() => {
1495
+ if (!t) return;
1496
+ const S = h.current, D = S?.ownerDocument, I = D?.activeElement;
1497
+ return j.current = !1, k.current?.focus({
1498
+ preventScroll: !0
1499
+ }), () => {
1500
+ I instanceof HTMLElement && I.isConnected && (D?.activeElement === D?.body || S?.contains(D?.activeElement ?? null)) && I.focus({
1501
+ preventScroll: !0
1502
+ });
1503
+ };
1504
+ }, [t]), t ? /* @__PURE__ */ E.jsx("div", { role: "presentation", className: Ee.Overlay, onClick: r, "data-testid": "command-palette-overlay", children: /* @__PURE__ */ E.jsx("div", { ref: (S) => {
1505
+ if (h.current = S, typeof y == "function") return y(S);
1506
+ y && (y.current = S);
1507
+ }, className: Ee.Root, onClick: (S) => S.stopPropagation(), onMouseDown: (S) => {
1508
+ S.button === 0 && S.target instanceof Element && !S.target.closest("input, button") && (S.preventDefault(), k.current?.focus({
1509
+ preventScroll: !0
1510
+ }));
1511
+ }, onKeyDown: (S) => S.stopPropagation(), onCompositionStartCapture: () => {
1512
+ j.current = !0;
1513
+ }, onCompositionEndCapture: () => {
1514
+ j.current = !1;
1515
+ }, onKeyDownCapture: (S) => {
1516
+ if (j.current || S.nativeEvent.isComposing || S.keyCode === 229) {
1517
+ S.stopPropagation();
1518
+ return;
1519
+ }
1520
+ if (S.target instanceof HTMLButtonElement && S.key !== "Escape" && S.key !== "Tab") {
1521
+ S.stopPropagation();
1522
+ return;
1523
+ }
1524
+ if (S.key === "Escape")
1525
+ S.preventDefault(), S.stopPropagation(), r();
1526
+ else if (S.key === "Tab") {
1527
+ const D = h.current?.querySelectorAll("input:not(:disabled), button:not(:disabled)");
1528
+ if (!D?.length) return;
1529
+ const I = D[0], B = D[D.length - 1], N = I.ownerDocument.activeElement;
1530
+ (S.shiftKey && N === I || !S.shiftKey && N === B) && (S.preventDefault(), (S.shiftKey ? B : I).focus());
1531
+ }
1532
+ }, role: "dialog", "aria-modal": "true", "aria-label": "Command palette", "data-testid": "command-palette", children: /* @__PURE__ */ E.jsxs(ue.Root, { className: Ee.CommandList, role: "presentation", "aria-expanded": void 0, "aria-haspopup": void 0, "aria-owns": void 0, "aria-activedescendant": void 0, items: R, itemKey: Zr, renderItem: (S, D) => /* @__PURE__ */ E.jsxs(ue.Item, { itemKey: D.key, "data-testid": `command-item-${S.id}`, children: [
1533
+ S.icon && /* @__PURE__ */ E.jsx(ue.ItemIcon, { "aria-hidden": "true", children: S.icon }),
1534
+ /* @__PURE__ */ E.jsx(ue.ItemLabel, { children: S.label }),
1535
+ S.description && /* @__PURE__ */ E.jsx(ue.ItemDescription, { children: S.description }),
1536
+ S.shortcut && /* @__PURE__ */ E.jsx(ue.ItemShortcut, { children: S.shortcut })
1537
+ ] }), filterFn: Qr, sortByScore: !1, groupBy: H.grouped ? x : void 0, groupLabel: z, loading: l && !m, onAction: (S) => {
1538
+ const D = R.find((I) => I.id === S && !I.disabled);
1539
+ D && (c(D), r());
1540
+ }, onDismiss: r, placeholder: i, density: "compact", children: [
1541
+ /* @__PURE__ */ E.jsx(tn, { inputRef: k }),
1542
+ /* @__PURE__ */ E.jsx(ue.Results, { className: Ee.Results, "aria-label": "Commands", "aria-busy": l && !m, "data-testid": "command-palette-list" }),
1543
+ m ? /* @__PURE__ */ E.jsx("div", { role: "alert", className: Ee.Message, "data-testid": "command-palette-error", children: d || "Unable to load commands." }) : /* @__PURE__ */ E.jsxs(E.Fragment, { children: [
1544
+ /* @__PURE__ */ E.jsx(ue.Loading, { role: "status", "data-testid": "command-palette-loading", children: "Loading commands…" }),
1545
+ /* @__PURE__ */ E.jsx(ue.Empty, { role: "status", "data-testid": "command-palette-empty", children: "No matching commands" })
1546
+ ] })
1547
+ ] }) }) }) : null;
1478
1548
  });
1479
- Br.displayName = "CommandPalette";
1480
- function zr(e) {
1481
- return !e.disabled;
1482
- }
1483
- function Hr(e) {
1484
- return e.stopPropagation();
1485
- }
1486
- function Ur(e) {
1487
- return e.stopPropagation();
1488
- }
1489
- function Vr(e, t) {
1490
- return /* @__PURE__ */ T.jsxs(fe.Item, { itemKey: t.key, "data-testid": `command-item-${e.id}`, children: [
1491
- e.icon && /* @__PURE__ */ T.jsx(fe.ItemIcon, { children: e.icon }),
1492
- /* @__PURE__ */ T.jsx(fe.ItemLabel, { children: e.label }),
1493
- e.description && /* @__PURE__ */ T.jsx(fe.ItemDescription, { children: e.description }),
1494
- e.shortcut && /* @__PURE__ */ T.jsx(fe.ItemShortcut, { children: e.shortcut })
1495
- ] });
1496
- }
1497
- function Fr(e, t) {
1498
- return Fe(e.label, t) || (e.description ? Fe(e.description, t) : !1) || (e.group ? Fe(e.group, t) : !1);
1499
- }
1500
- function Yr(e) {
1501
- return e.group || "";
1502
- }
1503
- const qr = "_Root_1b5sv_1", Jr = "_Toolbar_1b5sv_12", Gr = "_SearchInput_1b5sv_20", Xr = "_CopyButton_1b5sv_41", Qr = "_Tree_1b5sv_55", Zr = "_Node_1b5sv_59", Kr = "_Row_1b5sv_63", en = "_RowHighlight_1b5sv_76", tn = "_Chevron_1b5sv_80", rn = "_ChevronExpanded_1b5sv_93", nn = "_ChevronSpacer_1b5sv_97", on = "_Key_1b5sv_103", sn = "_Colon_1b5sv_107", an = "_Value_1b5sv_111", cn = "_Preview_1b5sv_129", ln = "_Comma_1b5sv_134", re = {
1504
- Root: qr,
1505
- Toolbar: Jr,
1506
- SearchInput: Gr,
1507
- CopyButton: Xr,
1508
- Tree: Qr,
1509
- Node: Zr,
1510
- Row: Kr,
1511
- RowHighlight: en,
1512
- Chevron: tn,
1513
- ChevronExpanded: rn,
1514
- ChevronSpacer: nn,
1515
- Key: on,
1516
- Colon: sn,
1517
- Value: an,
1518
- Preview: cn,
1519
- Comma: ln
1549
+ rn.displayName = "CommandPalette";
1550
+ const nn = "_Root_1b5sv_1", on = "_Toolbar_1b5sv_12", sn = "_SearchInput_1b5sv_20", an = "_CopyButton_1b5sv_41", cn = "_Tree_1b5sv_55", ln = "_Node_1b5sv_59", un = "_Row_1b5sv_63", dn = "_RowHighlight_1b5sv_76", fn = "_Chevron_1b5sv_80", gn = "_ChevronExpanded_1b5sv_93", mn = "_ChevronSpacer_1b5sv_97", hn = "_Key_1b5sv_103", pn = "_Colon_1b5sv_107", yn = "_Value_1b5sv_111", vn = "_Preview_1b5sv_129", bn = "_Comma_1b5sv_134", ne = {
1551
+ Root: nn,
1552
+ Toolbar: on,
1553
+ SearchInput: sn,
1554
+ CopyButton: an,
1555
+ Tree: cn,
1556
+ Node: ln,
1557
+ Row: un,
1558
+ RowHighlight: dn,
1559
+ Chevron: fn,
1560
+ ChevronExpanded: gn,
1561
+ ChevronSpacer: mn,
1562
+ Key: hn,
1563
+ Colon: pn,
1564
+ Value: yn,
1565
+ Preview: vn,
1566
+ Comma: bn
1520
1567
  };
1521
- function Ye(...e) {
1568
+ function Xe(...e) {
1522
1569
  return e.filter(Boolean).join(" ");
1523
1570
  }
1524
- function kt(e) {
1571
+ function Nt(e) {
1525
1572
  return e === null ? "null" : e === void 0 ? "undefined" : Array.isArray(e) ? "array" : typeof e;
1526
1573
  }
1527
- function un(e) {
1574
+ function wn(e) {
1528
1575
  return e === null ? "null" : e === void 0 ? "undefined" : typeof e == "string" ? JSON.stringify(e) : String(e);
1529
1576
  }
1530
- function dn(e, t) {
1577
+ function _n(e, t) {
1531
1578
  return typeof e == "boolean" ? e : t < e;
1532
1579
  }
1533
- function xt(e, t, n) {
1534
- const r = n.toLowerCase();
1535
- return !!(e.toLowerCase().includes(r) || typeof t == "string" && t.toLowerCase().includes(r) || typeof t == "number" && String(t).includes(r) || typeof t == "boolean" && String(t).includes(r));
1580
+ function At(e, t, r) {
1581
+ const n = r.toLowerCase();
1582
+ return !!(e.toLowerCase().includes(n) || typeof t == "string" && t.toLowerCase().includes(n) || typeof t == "number" && String(t).includes(n) || typeof t == "boolean" && String(t).includes(n));
1536
1583
  }
1537
- function Re(e) {
1584
+ function Me(e) {
1538
1585
  return e !== null && (typeof e == "object" || typeof e == "function");
1539
1586
  }
1540
- function Ct(e, t, n, r) {
1587
+ function Lt(e, t, r, n) {
1541
1588
  if (!t) return !1;
1542
- const c = kt(e);
1543
- if (c !== "object" && c !== "array" || e == null || Re(e) && n.has(e)) return !1;
1544
- if (Re(e) && r.has(e)) return r.get(e);
1545
- const l = {
1546
- has: (a) => a === e || n.has(a)
1589
+ const c = Nt(e);
1590
+ if (c !== "object" && c !== "array" || e == null || Me(e) && r.has(e)) return !1;
1591
+ if (Me(e) && n.has(e)) return n.get(e);
1592
+ const i = {
1593
+ has: (d) => d === e || r.has(d)
1547
1594
  };
1548
- let f = !1;
1549
- for (const [a, v] of Object.entries(e))
1550
- if (xt(a, v, t) || Ct(v, t, l, r)) {
1551
- f = !0;
1595
+ let l = !1;
1596
+ for (const [d, y] of Object.entries(e))
1597
+ if (At(d, y, t) || Lt(y, t, i, n)) {
1598
+ l = !0;
1552
1599
  break;
1553
1600
  }
1554
- return Re(e) && r.set(e, f), f;
1601
+ return Me(e) && n.set(e, l), l;
1555
1602
  }
1556
- function Rt(e) {
1557
- const t = be.c(80), {
1558
- nodeKey: n,
1559
- value: r,
1603
+ function Pt(e) {
1604
+ const t = Ce.c(80), {
1605
+ nodeKey: r,
1606
+ value: n,
1560
1607
  depth: c,
1561
- defaultExpanded: l,
1562
- searchQuery: f,
1563
- isLast: a,
1564
- ancestors: v,
1565
- searchCache: g
1608
+ defaultExpanded: i,
1609
+ searchQuery: l,
1610
+ isLast: d,
1611
+ ancestors: y,
1612
+ searchCache: h
1566
1613
  } = e;
1567
- let x;
1568
- t[0] !== r ? (x = kt(r), t[0] = r, t[1] = x) : x = t[1];
1569
- const A = x, h = A === "object" || A === "array";
1570
- let S;
1571
- t[2] !== v || t[3] !== h || t[4] !== r ? (S = h && Re(r) && v.has(r), t[2] = v, t[3] = h, t[4] = r, t[5] = S) : S = t[5];
1572
- const C = S;
1614
+ let k;
1615
+ t[0] !== n ? (k = Nt(n), t[0] = n, t[1] = k) : k = t[1];
1616
+ const j = k, m = j === "object" || j === "array";
1617
+ let T;
1618
+ t[2] !== y || t[3] !== m || t[4] !== n ? (T = m && Me(n) && y.has(n), t[2] = y, t[3] = m, t[4] = n, t[5] = T) : T = t[5];
1619
+ const R = T;
1620
+ let H;
1621
+ t[6] !== i || t[7] !== c || t[8] !== R || t[9] !== m ? (H = () => m && !R && _n(i, c), t[6] = i, t[7] = c, t[8] = R, t[9] = m, t[10] = H) : H = t[10];
1622
+ const [x, z] = me(H), S = G(!1), D = G(!1);
1573
1623
  let I;
1574
- t[6] !== l || t[7] !== c || t[8] !== C || t[9] !== h ? (I = () => h && !C && dn(l, c), t[6] = l, t[7] = c, t[8] = C, t[9] = h, t[10] = I) : I = t[10];
1575
- const [j, W] = Ne(I), H = Y(!1), q = Y(!1);
1576
- let J;
1577
- t[11] !== v || t[12] !== g || t[13] !== f || t[14] !== r ? (J = f ? Ct(r, f, v, g) : !1, t[11] = v, t[12] = g, t[13] = f, t[14] = r, t[15] = J) : J = t[15];
1578
- const U = J;
1579
- let D, V;
1580
- t[16] !== j || t[17] !== U || t[18] !== C || t[19] !== h || t[20] !== f ? (D = () => {
1581
- f && U && h && !C && !j && (H.current || (q.current = j), H.current = !0, W(!0)), H.current && (!f || !U) && (H.current = !1, W(q.current));
1582
- }, V = [f, U, h, C, j], t[16] = j, t[17] = U, t[18] = C, t[19] = h, t[20] = f, t[21] = D, t[22] = V) : (D = t[21], V = t[22]), z(D, V);
1624
+ t[11] !== y || t[12] !== h || t[13] !== l || t[14] !== n ? (I = l ? Lt(n, l, y, h) : !1, t[11] = y, t[12] = h, t[13] = l, t[14] = n, t[15] = I) : I = t[15];
1625
+ const B = I;
1626
+ let N, q;
1627
+ t[16] !== x || t[17] !== B || t[18] !== R || t[19] !== m || t[20] !== l ? (N = () => {
1628
+ l && B && m && !R && !x && (S.current || (D.current = x), S.current = !0, z(!0)), S.current && (!l || !B) && (S.current = !1, z(D.current));
1629
+ }, q = [l, B, m, R, x], t[16] = x, t[17] = B, t[18] = R, t[19] = m, t[20] = l, t[21] = N, t[22] = q) : (N = t[21], q = t[22]), U(N, q);
1583
1630
  let P;
1584
1631
  e: {
1585
- if (!h || !Re(r) || C) {
1586
- P = v;
1632
+ if (!m || !Me(n) || R) {
1633
+ P = y;
1587
1634
  break e;
1588
1635
  }
1589
- let G;
1590
- t[23] !== v || t[24] !== r ? (G = {
1591
- has: (ce) => ce === r || v.has(ce)
1592
- }, t[23] = v, t[24] = r, t[25] = G) : G = t[25], P = G;
1636
+ let X;
1637
+ t[23] !== y || t[24] !== n ? (X = {
1638
+ has: (ce) => ce === n || y.has(ce)
1639
+ }, t[23] = y, t[24] = n, t[25] = X) : X = t[25], P = X;
1593
1640
  }
1594
- const X = P;
1595
- let ne;
1641
+ const V = P;
1642
+ let K;
1596
1643
  e: {
1597
- if (!h || r === null || r === void 0 || C) {
1644
+ if (!m || n === null || n === void 0 || R) {
1598
1645
  let ce;
1599
- t[26] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (ce = [], t[26] = ce) : ce = t[26], ne = ce;
1646
+ t[26] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (ce = [], t[26] = ce) : ce = t[26], K = ce;
1600
1647
  break e;
1601
1648
  }
1602
- let G;
1603
- t[27] !== r ? (G = Object.entries(r), t[27] = r, t[28] = G) : G = t[28], ne = G;
1649
+ let X;
1650
+ t[27] !== n ? (X = Object.entries(n), t[27] = n, t[28] = X) : X = t[28], K = X;
1604
1651
  }
1605
- const y = ne;
1606
- let s;
1607
- t[29] !== C || t[30] !== h ? (s = () => {
1608
- h && !C && W(fn);
1609
- }, t[29] = C, t[30] = h, t[31] = s) : s = t[31];
1610
- const w = s;
1611
- let k;
1612
- t[32] !== n || t[33] !== f || t[34] !== r ? (k = f && xt(n, r, f), t[32] = n, t[33] = f, t[34] = r, t[35] = k) : k = t[35];
1613
- const i = k, u = C ? "[Circular]" : h ? A === "array" ? `Array(${r.length})` : `{${y.length}}` : null, m = i && re.RowHighlight;
1614
- let d;
1615
- t[36] !== m ? (d = Ye(re.Row, m), t[36] = m, t[37] = d) : d = t[37];
1616
- const p = `${c * 16}px`;
1617
- let b;
1618
- t[38] !== p ? (b = {
1619
- "--_inspector-depth-indent": p
1620
- }, t[38] = p, t[39] = b) : b = t[39];
1621
- const o = b;
1622
- let _;
1623
- t[40] !== w ? (_ = (G) => {
1624
- (G.key === "Enter" || G.key === " ") && (G.preventDefault(), w());
1625
- }, t[40] = w, t[41] = _) : _ = t[41];
1626
- const M = h && !C ? j : void 0, E = `inspector-node-${n}`;
1627
- let $;
1628
- t[42] !== j || t[43] !== C || t[44] !== h ? ($ = h && !C ? /* @__PURE__ */ T.jsx("span", { className: Ye(re.Chevron, j && re.ChevronExpanded), children: "▸" }) : /* @__PURE__ */ T.jsx("span", { className: re.ChevronSpacer }), t[42] = j, t[43] = C, t[44] = h, t[45] = $) : $ = t[45];
1629
- let N;
1630
- t[46] !== n ? (N = /* @__PURE__ */ T.jsx("span", { className: re.Key, children: n }), t[46] = n, t[47] = N) : N = t[47];
1631
- let O;
1632
- t[48] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (O = /* @__PURE__ */ T.jsx("span", { className: re.Colon, children: ": " }), t[48] = O) : O = t[48];
1652
+ const b = K;
1653
+ let o;
1654
+ t[29] !== R || t[30] !== m ? (o = () => {
1655
+ m && !R && z(Cn);
1656
+ }, t[29] = R, t[30] = m, t[31] = o) : o = t[31];
1657
+ const v = o;
1658
+ let p;
1659
+ t[32] !== r || t[33] !== l || t[34] !== n ? (p = l && At(r, n, l), t[32] = r, t[33] = l, t[34] = n, t[35] = p) : p = t[35];
1660
+ const s = p, u = R ? "[Circular]" : m ? j === "array" ? `Array(${n.length})` : `{${b.length}}` : null, f = s && ne.RowHighlight;
1661
+ let g;
1662
+ t[36] !== f ? (g = Xe(ne.Row, f), t[36] = f, t[37] = g) : g = t[37];
1663
+ const _ = `${c * 16}px`;
1664
+ let C;
1665
+ t[38] !== _ ? (C = {
1666
+ "--_inspector-depth-indent": _
1667
+ }, t[38] = _, t[39] = C) : C = t[39];
1668
+ const a = C;
1669
+ let w;
1670
+ t[40] !== v ? (w = (X) => {
1671
+ (X.key === "Enter" || X.key === " ") && (X.preventDefault(), v());
1672
+ }, t[40] = v, t[41] = w) : w = t[41];
1673
+ const A = m && !R ? x : void 0, L = `inspector-node-${r}`;
1633
1674
  let F;
1634
- t[49] !== h || t[50] !== u || t[51] !== A || t[52] !== r ? (F = h ? /* @__PURE__ */ T.jsx("span", { className: re.Preview, children: u }) : /* @__PURE__ */ T.jsx("span", { className: re.Value, "data-type": A, children: un(r) }), t[49] = h, t[50] = u, t[51] = A, t[52] = r, t[53] = F) : F = t[53];
1635
- let Q;
1636
- t[54] !== j || t[55] !== a ? (Q = !a && !j && /* @__PURE__ */ T.jsx("span", { className: re.Comma, children: "," }), t[54] = j, t[55] = a, t[56] = Q) : Q = t[56];
1675
+ t[42] !== x || t[43] !== R || t[44] !== m ? (F = m && !R ? /* @__PURE__ */ E.jsx("span", { className: Xe(ne.Chevron, x && ne.ChevronExpanded), children: "▸" }) : /* @__PURE__ */ E.jsx("span", { className: ne.ChevronSpacer }), t[42] = x, t[43] = R, t[44] = m, t[45] = F) : F = t[45];
1676
+ let O;
1677
+ t[46] !== r ? (O = /* @__PURE__ */ E.jsx("span", { className: ne.Key, children: r }), t[46] = r, t[47] = O) : O = t[47];
1678
+ let $;
1679
+ t[48] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? ($ = /* @__PURE__ */ E.jsx("span", { className: ne.Colon, children: ": " }), t[48] = $) : $ = t[48];
1680
+ let J;
1681
+ t[49] !== m || t[50] !== u || t[51] !== j || t[52] !== n ? (J = m ? /* @__PURE__ */ E.jsx("span", { className: ne.Preview, children: u }) : /* @__PURE__ */ E.jsx("span", { className: ne.Value, "data-type": j, children: wn(n) }), t[49] = m, t[50] = u, t[51] = j, t[52] = n, t[53] = J) : J = t[53];
1682
+ let Z;
1683
+ t[54] !== x || t[55] !== d ? (Z = !d && !x && /* @__PURE__ */ E.jsx("span", { className: ne.Comma, children: "," }), t[54] = x, t[55] = d, t[56] = Z) : Z = t[56];
1637
1684
  let oe;
1638
- t[57] !== d || t[58] !== o || t[59] !== _ || t[60] !== M || t[61] !== E || t[62] !== $ || t[63] !== N || t[64] !== F || t[65] !== Q || t[66] !== w ? (oe = /* @__PURE__ */ T.jsxs("div", { className: d, style: o, onClick: w, onKeyDown: _, tabIndex: 0, role: "treeitem", "aria-expanded": M, "data-testid": E, children: [
1639
- $,
1640
- N,
1641
- O,
1685
+ t[57] !== g || t[58] !== a || t[59] !== w || t[60] !== A || t[61] !== L || t[62] !== F || t[63] !== O || t[64] !== J || t[65] !== Z || t[66] !== v ? (oe = /* @__PURE__ */ E.jsxs("div", { className: g, style: a, onClick: v, onKeyDown: w, tabIndex: 0, role: "treeitem", "aria-expanded": A, "data-testid": L, children: [
1642
1686
  F,
1643
- Q
1644
- ] }), t[57] = d, t[58] = o, t[59] = _, t[60] = M, t[61] = E, t[62] = $, t[63] = N, t[64] = F, t[65] = Q, t[66] = w, t[67] = oe) : oe = t[67];
1687
+ O,
1688
+ $,
1689
+ J,
1690
+ Z
1691
+ ] }), t[57] = g, t[58] = a, t[59] = w, t[60] = A, t[61] = L, t[62] = F, t[63] = O, t[64] = J, t[65] = Z, t[66] = v, t[67] = oe) : oe = t[67];
1645
1692
  let le;
1646
- t[68] !== X || t[69] !== l || t[70] !== c || t[71] !== y || t[72] !== j || t[73] !== g || t[74] !== f ? (le = j && y.map((G, ce) => {
1647
- const [ee, Oe] = G;
1648
- return /* @__PURE__ */ T.jsx(Rt, { nodeKey: ee, value: Oe, depth: c + 1, defaultExpanded: l, searchQuery: f, isLast: ce === y.length - 1, ancestors: X, searchCache: g }, ee);
1649
- }), t[68] = X, t[69] = l, t[70] = c, t[71] = y, t[72] = j, t[73] = g, t[74] = f, t[75] = le) : le = t[75];
1693
+ t[68] !== V || t[69] !== i || t[70] !== c || t[71] !== b || t[72] !== x || t[73] !== h || t[74] !== l ? (le = x && b.map((X, ce) => {
1694
+ const [te, Ie] = X;
1695
+ return /* @__PURE__ */ E.jsx(Pt, { nodeKey: te, value: Ie, depth: c + 1, defaultExpanded: i, searchQuery: l, isLast: ce === b.length - 1, ancestors: V, searchCache: h }, te);
1696
+ }), t[68] = V, t[69] = i, t[70] = c, t[71] = b, t[72] = x, t[73] = h, t[74] = l, t[75] = le) : le = t[75];
1650
1697
  let ae;
1651
- return t[76] !== c || t[77] !== oe || t[78] !== le ? (ae = /* @__PURE__ */ T.jsxs("div", { className: re.Node, "data-depth": c, children: [
1698
+ return t[76] !== c || t[77] !== oe || t[78] !== le ? (ae = /* @__PURE__ */ E.jsxs("div", { className: ne.Node, "data-depth": c, children: [
1652
1699
  oe,
1653
1700
  le
1654
1701
  ] }), t[76] = c, t[77] = oe, t[78] = le, t[79] = ae) : ae = t[79], ae;
1655
1702
  }
1656
- function fn(e) {
1703
+ function Cn(e) {
1657
1704
  return !e;
1658
1705
  }
1659
- const hn = /* @__PURE__ */ new WeakSet(), mn = ve(function({
1706
+ const xn = /* @__PURE__ */ new WeakSet(), kn = _e(function({
1660
1707
  data: t,
1661
- format: n = "json",
1662
- defaultExpanded: r = 1,
1708
+ format: r = "json",
1709
+ defaultExpanded: n = 1,
1663
1710
  searchable: c = !1,
1664
- copyable: l = !1,
1665
- className: f,
1666
- ...a
1667
- }, v) {
1668
- const [g, x] = Ne(""), A = vt(async () => {
1711
+ copyable: i = !1,
1712
+ className: l,
1713
+ ...d
1714
+ }, y) {
1715
+ const [h, k] = me(""), j = De(async () => {
1669
1716
  try {
1670
- let C;
1671
- n === "yaml" ? C = qe(t) : C = gn(t), await navigator.clipboard.writeText(C);
1717
+ let R;
1718
+ r === "yaml" ? R = Ze(t) : R = Rn(t), await navigator.clipboard.writeText(R);
1672
1719
  } catch {
1673
1720
  }
1674
- }, [t, n]), h = hn, S = pt(() => /* @__PURE__ */ new WeakMap(), [g]);
1675
- return /* @__PURE__ */ T.jsxs("div", { ref: v, className: Ye(re.Root, f), "data-testid": "object-inspector", "data-format": n, ...a, children: [
1676
- (c || l) && /* @__PURE__ */ T.jsxs("div", { className: re.Toolbar, children: [
1677
- c && /* @__PURE__ */ T.jsx("input", { className: re.SearchInput, type: "text", value: g, onChange: (C) => x(C.target.value), placeholder: "Search keys/values…", "aria-label": "Search object", "data-testid": "inspector-search" }),
1678
- l && /* @__PURE__ */ T.jsx("button", { className: re.CopyButton, onClick: A, "data-testid": "inspector-copy", type: "button", children: "Copy" })
1721
+ }, [t, r]), m = xn, T = Oe(() => /* @__PURE__ */ new WeakMap(), [h]);
1722
+ return /* @__PURE__ */ E.jsxs("div", { ref: y, className: Xe(ne.Root, l), "data-testid": "object-inspector", "data-format": r, ...d, children: [
1723
+ (c || i) && /* @__PURE__ */ E.jsxs("div", { className: ne.Toolbar, children: [
1724
+ c && /* @__PURE__ */ E.jsx("input", { className: ne.SearchInput, type: "text", value: h, onChange: (R) => k(R.target.value), placeholder: "Search keys/values…", "aria-label": "Search object", "data-testid": "inspector-search" }),
1725
+ i && /* @__PURE__ */ E.jsx("button", { className: ne.CopyButton, onClick: j, "data-testid": "inspector-copy", type: "button", children: "Copy" })
1679
1726
  ] }),
1680
- /* @__PURE__ */ T.jsx("div", { className: re.Tree, role: "tree", "data-testid": "inspector-tree", children: /* @__PURE__ */ T.jsx(Rt, { nodeKey: "root", value: t, depth: 0, defaultExpanded: r, searchQuery: g, isLast: !0, ancestors: h, searchCache: S }) })
1727
+ /* @__PURE__ */ E.jsx("div", { className: ne.Tree, role: "tree", "data-testid": "inspector-tree", children: /* @__PURE__ */ E.jsx(Pt, { nodeKey: "root", value: t, depth: 0, defaultExpanded: n, searchQuery: h, isLast: !0, ancestors: m, searchCache: T }) })
1681
1728
  ] });
1682
1729
  });
1683
- mn.displayName = "ObjectInspector";
1684
- function gn(e) {
1730
+ kn.displayName = "ObjectInspector";
1731
+ function Rn(e) {
1685
1732
  const t = [];
1686
- return JSON.stringify(e, function(n, r) {
1687
- if (typeof r != "object" || r === null) return r;
1733
+ return JSON.stringify(e, function(r, n) {
1734
+ if (typeof n != "object" || n === null) return n;
1688
1735
  for (; t.length > 0 && t[t.length - 1] !== this; )
1689
1736
  t.pop();
1690
- return t.includes(r) ? "[Circular]" : (t.push(r), r);
1737
+ return t.includes(n) ? "[Circular]" : (t.push(n), n);
1691
1738
  }, 2);
1692
1739
  }
1693
- function St(e) {
1740
+ function Ot(e) {
1694
1741
  return !!(e === "" || /^[\s]/.test(e) || /[\s]$/.test(e) || /^[-?:,[\]{}#&*!|>'"%@`]/.test(e) || /[:\s]#|:\s|[{}[\],]/.test(e) || /^(true|false|yes|no|on|off|null|~)$/i.test(e) || /^[+-]?(\d+\.?\d*|\.inf|\.nan)$/i.test(e));
1695
1742
  }
1696
- function Tt(e) {
1743
+ function Dt(e) {
1697
1744
  return '"' + e.replace(/\\/g, "\\\\").replace(/"/g, '\\"').replace(/\n/g, "\\n").replace(/\t/g, "\\t").replace(/\r/g, "\\r") + '"';
1698
1745
  }
1699
- function pn(e, t) {
1700
- const n = " ".repeat(t);
1746
+ function Sn(e, t) {
1747
+ const r = " ".repeat(t);
1701
1748
  return e.includes(`
1702
1749
  `) ? `|
1703
- ${n} ${e.split(`
1750
+ ${r} ${e.split(`
1704
1751
  `).join(`
1705
- ${n} `)}` : St(e) ? Tt(e) : e;
1752
+ ${r} `)}` : Ot(e) ? Dt(e) : e;
1706
1753
  }
1707
- function qe(e, t = 0, n) {
1708
- const r = " ".repeat(t);
1754
+ function Ze(e, t = 0, r) {
1755
+ const n = " ".repeat(t);
1709
1756
  if (e === null || e === void 0) return "null";
1710
- if (typeof e == "string") return pn(e, t);
1757
+ if (typeof e == "string") return Sn(e, t);
1711
1758
  if (typeof e == "number" || typeof e == "boolean") return String(e);
1712
1759
  if (typeof e == "object") {
1713
- const c = n ?? [];
1760
+ const c = r ?? [];
1714
1761
  if (c.includes(e)) return '"[Circular]"';
1715
- const l = [...c, e];
1762
+ const i = [...c, e];
1716
1763
  if (Array.isArray(e))
1717
- return e.length === 0 ? "[]" : e.map((a) => `${r}- ${qe(a, t + 1, l).trimStart()}`).join(`
1764
+ return e.length === 0 ? "[]" : e.map((d) => `${n}- ${Ze(d, t + 1, i).trimStart()}`).join(`
1718
1765
  `);
1719
- const f = Object.entries(e);
1720
- return f.length === 0 ? "{}" : f.map(([a, v]) => {
1721
- const g = St(a) ? Tt(a) : a, x = qe(v, t + 1, l);
1722
- return typeof v == "object" && v !== null && (Array.isArray(v) ? v.length > 0 : Object.keys(v).length > 0) ? `${r}${g}:
1723
- ${x}` : `${r}${g}: ${x}`;
1766
+ const l = Object.entries(e);
1767
+ return l.length === 0 ? "{}" : l.map(([d, y]) => {
1768
+ const h = Ot(d) ? Dt(d) : d, k = Ze(y, t + 1, i);
1769
+ return typeof y == "object" && y !== null && (Array.isArray(y) ? y.length > 0 : Object.keys(y).length > 0) ? `${n}${h}:
1770
+ ${k}` : `${n}${h}: ${k}`;
1724
1771
  }).join(`
1725
1772
  `);
1726
1773
  }
1727
1774
  return String(e);
1728
1775
  }
1729
- var Et;
1776
+ const we = "cel", vt = /* @__PURE__ */ new WeakSet();
1777
+ function En(e) {
1778
+ vt.has(e) || (vt.add(e), e.languages.register({
1779
+ id: we,
1780
+ extensions: [".cel"],
1781
+ aliases: ["CEL"]
1782
+ }), e.languages.setLanguageConfiguration(we, {
1783
+ comments: {
1784
+ lineComment: "//"
1785
+ },
1786
+ brackets: [["{", "}"], ["[", "]"], ["(", ")"]],
1787
+ autoClosingPairs: [{
1788
+ open: "{",
1789
+ close: "}"
1790
+ }, {
1791
+ open: "[",
1792
+ close: "]"
1793
+ }, {
1794
+ open: "(",
1795
+ close: ")"
1796
+ }, {
1797
+ open: '"',
1798
+ close: '"',
1799
+ notIn: ["string", "comment"]
1800
+ }, {
1801
+ open: "'",
1802
+ close: "'",
1803
+ notIn: ["string", "comment"]
1804
+ }],
1805
+ surroundingPairs: [{
1806
+ open: "{",
1807
+ close: "}"
1808
+ }, {
1809
+ open: "[",
1810
+ close: "]"
1811
+ }, {
1812
+ open: "(",
1813
+ close: ")"
1814
+ }, {
1815
+ open: '"',
1816
+ close: '"'
1817
+ }, {
1818
+ open: "'",
1819
+ close: "'"
1820
+ }],
1821
+ wordPattern: /[a-zA-Z_][a-zA-Z_0-9]*/g
1822
+ }), e.languages.setMonarchTokensProvider(we, {
1823
+ keywords: ["true", "false", "null", "in"],
1824
+ tokenizer: {
1825
+ root: [[/\/\/.*$/, "comment"], [/[rR]?[bB]?'''/, "string", "@tripleSingle"], [/[rR]?[bB]?"""/, "string", "@tripleDouble"], [/[rR]?[bB]?'/, "string", "@single"], [/[rR]?[bB]?"/, "string", "@double"], [/0[xX][0-9a-fA-F]+[uU]?/, "number.hex"], [/(?:\d+\.\d*|\.\d+|\d+)(?:[eE][+-]?\d+)?[uU]?/, "number"], [/[a-zA-Z_][a-zA-Z_0-9]*(?=\s*\()/, "type.identifier"], [/[a-zA-Z_][a-zA-Z_0-9]*/, {
1826
+ cases: {
1827
+ "@keywords": "keyword",
1828
+ "@default": "identifier"
1829
+ }
1830
+ }], [/[{}()[\]]/, "@brackets"], [/[!<>=&|+*/%?:-]+/, "operator"], [/[.,]/, "delimiter"], [/\s+/, "white"]],
1831
+ single: [[/\\./, "string.escape"], [/'/, "string", "@pop"], [/[^'\\]+/, "string"]],
1832
+ double: [[/\\./, "string.escape"], [/"/, "string", "@pop"], [/[^"\\]+/, "string"]],
1833
+ tripleSingle: [[/'''/, "string", "@pop"], [/\\./, "string.escape"], [/[^'\\]+|'/, "string"]],
1834
+ tripleDouble: [[/"""/, "string", "@pop"], [/\\./, "string.escape"], [/[^"\\]+|"/, "string"]]
1835
+ }
1836
+ }));
1837
+ }
1838
+ function bt(e, t) {
1839
+ const r = or(e, t);
1840
+ let n = 1, c = 0;
1841
+ for (let i = 0; i < r; i++)
1842
+ if (e[i] === "\r" || e[i] === `
1843
+ `) {
1844
+ if (e[i] === "\r" && e[i + 1] === `
1845
+ ` && i++, i >= r) throw new RangeError("Offset splits a line ending");
1846
+ n++, c = i + 1;
1847
+ }
1848
+ return {
1849
+ lineNumber: n,
1850
+ column: r - c + 1
1851
+ };
1852
+ }
1853
+ function Tn(e, t) {
1854
+ if (!Number.isSafeInteger(t.lineNumber) || t.lineNumber < 1 || !Number.isSafeInteger(t.column) || t.column < 1) throw new RangeError("Expected a one-based source position");
1855
+ let r = 1, n = 0;
1856
+ for (; r < t.lineNumber; ) {
1857
+ let l = n;
1858
+ for (; l < e.length && e[l] !== "\r" && e[l] !== `
1859
+ `; ) l++;
1860
+ if (l === e.length) throw new RangeError("Position exceeds source lines");
1861
+ n = l + (e[l] === "\r" && e[l + 1] === `
1862
+ ` ? 2 : 1), r++;
1863
+ }
1864
+ const c = n + t.column - 1;
1865
+ let i = n;
1866
+ for (; i < e.length && e[i] !== "\r" && e[i] !== `
1867
+ `; ) i++;
1868
+ if (c > i) throw new RangeError("Position exceeds source line");
1869
+ return nr(e, c);
1870
+ }
1871
+ function Mn(e, t) {
1872
+ let r = 0;
1873
+ const n = e.toLocaleLowerCase();
1874
+ for (const c of t.toLocaleLowerCase())
1875
+ if (c === n[r] && r++, r === n.length) return !0;
1876
+ return n.length === 0;
1877
+ }
1878
+ function Ae() {
1879
+ let e;
1880
+ return {
1881
+ begin() {
1882
+ return e?.abort(), e = new AbortController(), e;
1883
+ },
1884
+ current(t) {
1885
+ return e === t && !t.signal.aborted;
1886
+ },
1887
+ cancel() {
1888
+ e?.abort(), e = void 0;
1889
+ }
1890
+ };
1891
+ }
1892
+ function jn(e, t = 250) {
1893
+ let r;
1894
+ const n = () => {
1895
+ clearTimeout(r), r = void 0;
1896
+ };
1897
+ return {
1898
+ schedule(c = t) {
1899
+ n(), r = setTimeout(() => {
1900
+ r = void 0, e();
1901
+ }, c);
1902
+ },
1903
+ immediate() {
1904
+ n(), e();
1905
+ },
1906
+ cancel: n
1907
+ };
1908
+ }
1909
+ function Nn(e, t, r, n, c = 250) {
1910
+ const i = e.getModel();
1911
+ if (!i) throw new Error("CEL editor requires its own model");
1912
+ En(t), t.editor.setModelLanguage(i, we);
1913
+ const l = Ae(), d = Ae(), y = Ae(), h = Ae();
1914
+ let k = !1, j = !1, m = 0, T, R = !1, H = !1, x;
1915
+ const z = `cel:${i.uri.toString()}`, S = {
1916
+ language: we,
1917
+ scheme: i.uri.scheme,
1918
+ pattern: i.uri.path
1919
+ }, D = () => {
1920
+ const o = r();
1921
+ return k || i.isDisposed() || j || o.disabled || !!(o.availability && o.availability.status !== "ready");
1922
+ };
1923
+ function I() {
1924
+ e.trigger("cel", "closeParameterHints", {}), e.getContribution("editor.contrib.contentHover")?._hideWidgets();
1925
+ }
1926
+ function B(o, v) {
1927
+ if (v.unit !== "utf8-byte" || v.end < v.start) throw new RangeError("Expected a half-open UTF-8 range");
1928
+ const p = bt(o, v.start), s = bt(o, v.end);
1929
+ return {
1930
+ startLineNumber: p.lineNumber,
1931
+ startColumn: p.column,
1932
+ endLineNumber: s.lineNumber,
1933
+ endColumn: s.column
1934
+ };
1935
+ }
1936
+ async function N(o, v, p, s) {
1937
+ if (!o || D() || s?.isCancellationRequested) return;
1938
+ const u = r(), f = {
1939
+ ...u.document,
1940
+ uri: i.uri.toString()
1941
+ }, g = i.getVersionId(), _ = m, C = p.begin(), a = s?.onCancellationRequested(() => C.abort());
1942
+ try {
1943
+ const w = await o({
1944
+ document: f,
1945
+ contextKey: u.contextKey,
1946
+ cursor: {
1947
+ offset: Tn(f.text, v),
1948
+ unit: "utf8-byte"
1949
+ },
1950
+ signal: C.signal
1951
+ }), A = r();
1952
+ return D() || !p.current(C) || _ !== m || i.isDisposed() || i.getVersionId() !== g || A.contextKey !== u.contextKey || A.document.version !== f.version || A.document.text !== f.text || w.documentVersion !== f.version || w.contextKey !== u.contextKey ? void 0 : (w.status !== "ready" && w.status !== "empty" && n(w.message ?? `CEL language service ${w.status}.`), w);
1953
+ } catch (w) {
1954
+ !C.signal.aborted && p.current(C) && !k && n(w instanceof Error ? w.message : "CEL language service request failed.");
1955
+ return;
1956
+ } finally {
1957
+ a?.dispose();
1958
+ }
1959
+ }
1960
+ function q(o) {
1961
+ if (o.status === "denied" || o.status === "unavailable") {
1962
+ t.editor.setModelMarkers(i, z, []);
1963
+ return;
1964
+ }
1965
+ const v = {
1966
+ error: t.MarkerSeverity.Error,
1967
+ warning: t.MarkerSeverity.Warning,
1968
+ info: t.MarkerSeverity.Info,
1969
+ hint: t.MarkerSeverity.Hint
1970
+ }, p = [];
1971
+ for (const s of o.diagnostics)
1972
+ try {
1973
+ p.push({
1974
+ ...B(r().document.text, s.range),
1975
+ severity: v[s.severity],
1976
+ message: s.message,
1977
+ source: "CEL",
1978
+ code: s.id
1979
+ });
1980
+ } catch {
1981
+ n("The language service returned an invalid UTF-8 diagnostic range.");
1982
+ }
1983
+ t.editor.setModelMarkers(i, z, p);
1984
+ }
1985
+ function P(o, v, p) {
1986
+ if (o.disabledReason) return;
1987
+ const s = r().document.text, u = B(s, o.edit.range);
1988
+ if (u.startLineNumber !== p.lineNumber || u.endLineNumber !== p.lineNumber || u.startColumn > p.column || u.endColumn < p.column) throw new RangeError("Completion range must contain the cursor on one line");
1989
+ const f = i.getValueInRange({
1990
+ ...u,
1991
+ endColumn: p.column
1992
+ });
1993
+ if (!Mn(f, o.filterText ?? o.label)) return;
1994
+ const g = {
1995
+ field: t.languages.CompletionItemKind.Field,
1996
+ operator: t.languages.CompletionItemKind.Operator,
1997
+ value: t.languages.CompletionItemKind.Value,
1998
+ parameter: t.languages.CompletionItemKind.Variable,
1999
+ function: t.languages.CompletionItemKind.Function
2000
+ };
2001
+ return {
2002
+ label: {
2003
+ label: o.label,
2004
+ detail: o.type ? `: ${o.type}` : void 0
2005
+ },
2006
+ kind: g[o.kind],
2007
+ detail: o.detail ?? o.type,
2008
+ documentation: o.description || o.condition ? {
2009
+ value: [o.description, o.condition].filter(Boolean).join(`
2010
+
2011
+ `),
2012
+ isTrusted: !1
2013
+ } : void 0,
2014
+ filterText: o.filterText ?? o.label,
2015
+ sortText: o.sortText ?? String(v).padStart(6, "0"),
2016
+ insertText: o.edit.text,
2017
+ insertTextRules: o.insertTextFormat === "snippet" ? t.languages.CompletionItemInsertTextRule.InsertAsSnippet : void 0,
2018
+ range: u
2019
+ };
2020
+ }
2021
+ const V = jn(() => {
2022
+ if (D()) return;
2023
+ const o = r(), v = e.getPosition();
2024
+ v && (o.check && N(o.check, v, d).then((p) => {
2025
+ p && (n(p.message), q(p));
2026
+ }), o.request && !R && e.hasTextFocus() && (T = i.getVersionId(), e.trigger("cel", "editor.action.triggerSuggest", {})));
2027
+ }, c), K = [t.languages.registerCompletionItemProvider(S, {
2028
+ async provideCompletionItems(o, v, p, s) {
2029
+ if (o !== i || D()) return {
2030
+ suggestions: []
2031
+ };
2032
+ if (p.triggerKind !== 0 || T !== i.getVersionId()) return {
2033
+ suggestions: []
2034
+ };
2035
+ T = void 0;
2036
+ const u = r(), f = await N(u.request, v, l, s);
2037
+ if (!f) return {
2038
+ suggestions: []
2039
+ };
2040
+ if (u.check || q(f), f.status !== "ready") return {
2041
+ suggestions: []
2042
+ };
2043
+ n(f.message);
2044
+ const g = [];
2045
+ for (const [_, C] of f.completions.slice(0, u.maxSuggestions ?? 100).entries())
2046
+ try {
2047
+ const a = P(C, _, v);
2048
+ a && g.push(a);
2049
+ } catch {
2050
+ n("The language service returned an invalid UTF-8 completion range.");
2051
+ }
2052
+ return {
2053
+ suggestions: g,
2054
+ incomplete: f.incomplete ?? !1
2055
+ };
2056
+ }
2057
+ }), t.languages.registerHoverProvider(S, {
2058
+ async provideHover(o, v, p) {
2059
+ if (o !== i) return;
2060
+ const s = await N(r().hover, v, y, p);
2061
+ if (!(s?.status !== "ready" || !s.hover))
2062
+ try {
2063
+ return {
2064
+ range: B(r().document.text, s.hover.range),
2065
+ contents: [{
2066
+ value: s.hover.contents,
2067
+ isTrusted: !1
2068
+ }]
2069
+ };
2070
+ } catch {
2071
+ n("The language service returned an invalid UTF-8 hover range.");
2072
+ return;
2073
+ }
2074
+ }
2075
+ }), t.languages.registerSignatureHelpProvider(S, {
2076
+ signatureHelpTriggerCharacters: ["(", ","],
2077
+ signatureHelpRetriggerCharacters: [","],
2078
+ async provideSignatureHelp(o, v, p) {
2079
+ if (o !== i) return;
2080
+ const s = await N(r().signature, v, h, p);
2081
+ if (s?.status !== "ready" || !s.signature) return;
2082
+ const u = s.signature;
2083
+ return {
2084
+ value: {
2085
+ activeSignature: 0,
2086
+ activeParameter: Math.max(0, Math.min(u.activeParameter, u.parameters.length - 1)),
2087
+ signatures: [{
2088
+ label: u.label,
2089
+ documentation: u.documentation ? {
2090
+ value: u.documentation,
2091
+ isTrusted: !1
2092
+ } : void 0,
2093
+ parameters: u.parameters.map((f) => ({
2094
+ label: f.label,
2095
+ documentation: f.documentation ? {
2096
+ value: f.documentation,
2097
+ isTrusted: !1
2098
+ } : void 0
2099
+ }))
2100
+ }]
2101
+ },
2102
+ dispose() {
2103
+ }
2104
+ };
2105
+ }
2106
+ }), e.onDidChangeModelContent(() => {
2107
+ H = !0, R = !1, T = void 0, l.cancel(), d.cancel(), y.cancel(), h.cancel(), e.trigger("cel", "hideSuggestWidget", {}), t.editor.setModelMarkers(i, z, []), j || V.schedule(r().debounceMs ?? c);
2108
+ }), e.onDidChangeCursorPosition(() => {
2109
+ T = void 0, l.cancel(), h.cancel();
2110
+ }), e.onDidCompositionStart(() => {
2111
+ j = !0, T = void 0, V.cancel(), l.cancel(), d.cancel(), y.cancel(), h.cancel(), e.trigger("cel", "hideSuggestWidget", {}), I();
2112
+ }), e.onDidCompositionEnd(() => {
2113
+ j = !1, V.schedule(r().debounceMs ?? c);
2114
+ }), e.onKeyDown((o) => {
2115
+ o.keyCode === t.KeyCode.Escape && (T = void 0, R = !0, l.cancel());
2116
+ }), e.addAction({
2117
+ id: `cel.complete.${i.id}`,
2118
+ label: "CEL: Show contextual suggestions",
2119
+ precondition: "!suggestWidgetVisible || !suggestWidgetHasFocusedSuggestion",
2120
+ keybindings: [t.KeyMod.CtrlCmd | t.KeyCode.Space, t.KeyMod.WinCtrl | t.KeyCode.Space],
2121
+ run: () => {
2122
+ D() || (R = !1, V.immediate());
2123
+ }
2124
+ }), e.addAction({
2125
+ id: `cel.run.${i.id}`,
2126
+ label: "CEL: Run query",
2127
+ keybindings: [t.KeyMod.CtrlCmd | t.KeyCode.Enter],
2128
+ run: () => {
2129
+ D() || r().onSubmit?.();
2130
+ }
2131
+ })];
2132
+ function b() {
2133
+ if (k || i.isDisposed()) return;
2134
+ const o = r(), v = x && x.contextKey === o.contextKey && x.request === o.request && x.check === o.check && x.hover === o.hover && x.signature === o.signature && x.disabled === o.disabled && x.maxSuggestions === o.maxSuggestions && x.debounceMs === o.debounceMs && x.availability?.status === o.availability?.status && x.availability?.message === o.availability?.message;
2135
+ x && (x.contextKey !== o.contextKey || x.request !== o.request || x.check !== o.check || x.hover !== o.hover || x.signature !== o.signature) && x.onDocumentClose?.(i.uri.toString());
2136
+ const p = H && i.getValue() === o.document.text, s = x?.document.text === o.document.text && x.document.version === o.document.version;
2137
+ x = {
2138
+ ...o,
2139
+ document: {
2140
+ ...o.document
2141
+ },
2142
+ availability: o.availability ? {
2143
+ ...o.availability
2144
+ } : void 0
2145
+ }, H = !1, !(v && (p || s)) && (T = void 0, R = !1, m++, l.cancel(), d.cancel(), y.cancel(), h.cancel(), V.cancel(), e.trigger("cel", "hideSuggestWidget", {}), I(), t.editor.setModelMarkers(i, z, []), e.updateOptions({
2146
+ quickSuggestions: !1,
2147
+ suggestOnTriggerCharacters: !1,
2148
+ wordBasedSuggestions: "off",
2149
+ parameterHints: {
2150
+ enabled: !0
2151
+ },
2152
+ suggest: {
2153
+ showWords: !1,
2154
+ showStatusBar: !0,
2155
+ preview: !1,
2156
+ selectionMode: "always"
2157
+ },
2158
+ acceptSuggestionOnEnter: "on",
2159
+ tabCompletion: "off",
2160
+ renderValidationDecorations: "on",
2161
+ fixedOverflowWidgets: !0,
2162
+ padding: {
2163
+ top: 8,
2164
+ bottom: 8
2165
+ }
2166
+ }), n(r().availability?.message), D() || V.schedule(o.debounceMs ?? c));
2167
+ }
2168
+ return b(), {
2169
+ refresh: b,
2170
+ dispose() {
2171
+ if (!k) {
2172
+ k = !0, T = void 0, V.cancel(), l.cancel(), d.cancel(), y.cancel(), h.cancel(), x?.onDocumentClose?.(i.uri.toString());
2173
+ for (const o of K) o.dispose();
2174
+ i.isDisposed() || I(), i.isDisposed() || t.editor.setModelMarkers(i, z, []);
2175
+ }
2176
+ }
2177
+ };
2178
+ }
2179
+ const An = "_Root_im36v_1", Ln = "_Label_im36v_7", Pn = "_Surface_im36v_12", On = "_Placeholder_im36v_24", Dn = "_Loading_im36v_31", $n = "_Message_im36v_35", In = "_Hint_im36v_40", ve = {
2180
+ Root: An,
2181
+ Label: Ln,
2182
+ Surface: Pn,
2183
+ Placeholder: On,
2184
+ Loading: Dn,
2185
+ Message: $n,
2186
+ Hint: In
2187
+ }, Wn = Rt(() => Promise.resolve().then(() => Er).then((e) => ({
2188
+ default: e.CodeEditor
2189
+ })));
2190
+ let Hn = 0;
2191
+ function Mo(e) {
2192
+ const {
2193
+ document: t,
2194
+ contextKey: r,
2195
+ request: n,
2196
+ check: c,
2197
+ hover: i,
2198
+ signature: l,
2199
+ disabled: d,
2200
+ availability: y,
2201
+ debounceMs: h = 250,
2202
+ maxSuggestions: k = 100,
2203
+ label: j = "CEL query",
2204
+ placeholder: m = "Enter a CEL expression…",
2205
+ minHeight: T = 52,
2206
+ maxHeight: R = 180,
2207
+ className: H
2208
+ } = e, x = G(e);
2209
+ x.current = e;
2210
+ const [z] = me(() => `cel-query-${++Hn}:///query.cel`), [S, D] = me(T), [I, B] = me(), [N, q] = me(null), P = G(null), V = d || !!(y && y.status !== "ready");
2211
+ U(() => {
2212
+ const b = N?.editor.getModel();
2213
+ if (!N || !b || b.isDisposed()) return;
2214
+ const {
2215
+ editor: o,
2216
+ monaco: v
2217
+ } = N, p = Nn(o, v, () => x.current, B);
2218
+ P.current = p;
2219
+ const s = () => D(Math.max(x.current.minHeight ?? 52, Math.min(x.current.maxHeight ?? 180, o.getContentHeight())));
2220
+ s();
2221
+ const u = o.onDidContentSizeChange(s);
2222
+ return () => {
2223
+ u.dispose(), p.dispose(), P.current === p && (P.current = null);
2224
+ };
2225
+ }, [N]), U(() => {
2226
+ P.current?.refresh();
2227
+ }, [t.text, t.version, r, n, c, i, l, d, y?.status, y?.message, k, h, N]), U(() => {
2228
+ const b = N?.editor;
2229
+ b?.getModel() && (b.updateOptions({
2230
+ ariaLabel: j
2231
+ }), D(Math.max(T, Math.min(R, b.getContentHeight()))));
2232
+ }, [j, T, R, N]);
2233
+ function K(b, o) {
2234
+ q({
2235
+ editor: b,
2236
+ monaco: o
2237
+ }), x.current.onMount?.(b, o);
2238
+ }
2239
+ return /* @__PURE__ */ E.jsxs("div", { className: `${ve.Root} ${H ?? ""}`, "data-testid": "cel-query-editor", "data-context-key": r, "data-availability": y?.status ?? "ready", children: [
2240
+ /* @__PURE__ */ E.jsx("div", { className: ve.Label, children: j }),
2241
+ /* @__PURE__ */ E.jsxs("div", { className: ve.Surface, style: {
2242
+ "--_cel-editor-min-height": `${T}px`
2243
+ }, children: [
2244
+ /* @__PURE__ */ E.jsx(kt, { fallback: /* @__PURE__ */ E.jsx("div", { role: "status", className: ve.Loading, children: "Loading CEL editor…" }), children: /* @__PURE__ */ E.jsx(Wn, { value: t.text, onChange: (b) => {
2245
+ const o = x.current;
2246
+ x.current = {
2247
+ ...o,
2248
+ document: {
2249
+ text: b,
2250
+ version: o.document.version + 1
2251
+ }
2252
+ }, o.onChange(b);
2253
+ }, filename: z, language: we, readOnly: V, lineNumbers: !1, minimap: !1, wordWrap: !0, quickSuggestions: !1, diagnostics: !0, bordered: !1, height: S, onMount: K }) }),
2254
+ !t.text && !V ? /* @__PURE__ */ E.jsx("div", { className: ve.Placeholder, "aria-hidden": "true", children: m }) : null
2255
+ ] }),
2256
+ I || y?.message ? /* @__PURE__ */ E.jsx("div", { role: y?.status === "denied" || y?.status === "error" ? "alert" : "status", className: ve.Message, children: I ?? y?.message }) : null,
2257
+ /* @__PURE__ */ E.jsx("div", { className: ve.Hint, children: "Ctrl+Space suggestions · ⌘/Ctrl+Enter run · Enter accepts a suggestion" })
2258
+ ] });
2259
+ }
2260
+ var $t;
1730
2261
  (() => {
1731
- var e = { 975: (y) => {
1732
- function s(i) {
1733
- if (typeof i != "string") throw new TypeError("Path must be a string. Received " + JSON.stringify(i));
2262
+ var e = { 975: (b) => {
2263
+ function o(s) {
2264
+ if (typeof s != "string") throw new TypeError("Path must be a string. Received " + JSON.stringify(s));
1734
2265
  }
1735
- function w(i, u) {
1736
- for (var m, d = "", p = 0, b = -1, o = 0, _ = 0; _ <= i.length; ++_) {
1737
- if (_ < i.length) m = i.charCodeAt(_);
2266
+ function v(s, u) {
2267
+ for (var f, g = "", _ = 0, C = -1, a = 0, w = 0; w <= s.length; ++w) {
2268
+ if (w < s.length) f = s.charCodeAt(w);
1738
2269
  else {
1739
- if (m === 47) break;
1740
- m = 47;
2270
+ if (f === 47) break;
2271
+ f = 47;
1741
2272
  }
1742
- if (m === 47) {
1743
- if (!(b === _ - 1 || o === 1)) if (b !== _ - 1 && o === 2) {
1744
- if (d.length < 2 || p !== 2 || d.charCodeAt(d.length - 1) !== 46 || d.charCodeAt(d.length - 2) !== 46) {
1745
- if (d.length > 2) {
1746
- var M = d.lastIndexOf("/");
1747
- if (M !== d.length - 1) {
1748
- M === -1 ? (d = "", p = 0) : p = (d = d.slice(0, M)).length - 1 - d.lastIndexOf("/"), b = _, o = 0;
2273
+ if (f === 47) {
2274
+ if (!(C === w - 1 || a === 1)) if (C !== w - 1 && a === 2) {
2275
+ if (g.length < 2 || _ !== 2 || g.charCodeAt(g.length - 1) !== 46 || g.charCodeAt(g.length - 2) !== 46) {
2276
+ if (g.length > 2) {
2277
+ var A = g.lastIndexOf("/");
2278
+ if (A !== g.length - 1) {
2279
+ A === -1 ? (g = "", _ = 0) : _ = (g = g.slice(0, A)).length - 1 - g.lastIndexOf("/"), C = w, a = 0;
1749
2280
  continue;
1750
2281
  }
1751
- } else if (d.length === 2 || d.length === 1) {
1752
- d = "", p = 0, b = _, o = 0;
2282
+ } else if (g.length === 2 || g.length === 1) {
2283
+ g = "", _ = 0, C = w, a = 0;
1753
2284
  continue;
1754
2285
  }
1755
2286
  }
1756
- u && (d.length > 0 ? d += "/.." : d = "..", p = 2);
1757
- } else d.length > 0 ? d += "/" + i.slice(b + 1, _) : d = i.slice(b + 1, _), p = _ - b - 1;
1758
- b = _, o = 0;
1759
- } else m === 46 && o !== -1 ? ++o : o = -1;
2287
+ u && (g.length > 0 ? g += "/.." : g = "..", _ = 2);
2288
+ } else g.length > 0 ? g += "/" + s.slice(C + 1, w) : g = s.slice(C + 1, w), _ = w - C - 1;
2289
+ C = w, a = 0;
2290
+ } else f === 46 && a !== -1 ? ++a : a = -1;
1760
2291
  }
1761
- return d;
2292
+ return g;
1762
2293
  }
1763
- var k = { resolve: function() {
1764
- for (var i, u = "", m = !1, d = arguments.length - 1; d >= -1 && !m; d--) {
1765
- var p;
1766
- d >= 0 ? p = arguments[d] : (i === void 0 && (i = process.cwd()), p = i), s(p), p.length !== 0 && (u = p + "/" + u, m = p.charCodeAt(0) === 47);
2294
+ var p = { resolve: function() {
2295
+ for (var s, u = "", f = !1, g = arguments.length - 1; g >= -1 && !f; g--) {
2296
+ var _;
2297
+ g >= 0 ? _ = arguments[g] : (s === void 0 && (s = process.cwd()), _ = s), o(_), _.length !== 0 && (u = _ + "/" + u, f = _.charCodeAt(0) === 47);
1767
2298
  }
1768
- return u = w(u, !m), m ? u.length > 0 ? "/" + u : "/" : u.length > 0 ? u : ".";
1769
- }, normalize: function(i) {
1770
- if (s(i), i.length === 0) return ".";
1771
- var u = i.charCodeAt(0) === 47, m = i.charCodeAt(i.length - 1) === 47;
1772
- return (i = w(i, !u)).length !== 0 || u || (i = "."), i.length > 0 && m && (i += "/"), u ? "/" + i : i;
1773
- }, isAbsolute: function(i) {
1774
- return s(i), i.length > 0 && i.charCodeAt(0) === 47;
2299
+ return u = v(u, !f), f ? u.length > 0 ? "/" + u : "/" : u.length > 0 ? u : ".";
2300
+ }, normalize: function(s) {
2301
+ if (o(s), s.length === 0) return ".";
2302
+ var u = s.charCodeAt(0) === 47, f = s.charCodeAt(s.length - 1) === 47;
2303
+ return (s = v(s, !u)).length !== 0 || u || (s = "."), s.length > 0 && f && (s += "/"), u ? "/" + s : s;
2304
+ }, isAbsolute: function(s) {
2305
+ return o(s), s.length > 0 && s.charCodeAt(0) === 47;
1775
2306
  }, join: function() {
1776
2307
  if (arguments.length === 0) return ".";
1777
- for (var i, u = 0; u < arguments.length; ++u) {
1778
- var m = arguments[u];
1779
- s(m), m.length > 0 && (i === void 0 ? i = m : i += "/" + m);
2308
+ for (var s, u = 0; u < arguments.length; ++u) {
2309
+ var f = arguments[u];
2310
+ o(f), f.length > 0 && (s === void 0 ? s = f : s += "/" + f);
1780
2311
  }
1781
- return i === void 0 ? "." : k.normalize(i);
1782
- }, relative: function(i, u) {
1783
- if (s(i), s(u), i === u || (i = k.resolve(i)) === (u = k.resolve(u))) return "";
1784
- for (var m = 1; m < i.length && i.charCodeAt(m) === 47; ++m) ;
1785
- for (var d = i.length, p = d - m, b = 1; b < u.length && u.charCodeAt(b) === 47; ++b) ;
1786
- for (var o = u.length - b, _ = p < o ? p : o, M = -1, E = 0; E <= _; ++E) {
1787
- if (E === _) {
1788
- if (o > _) {
1789
- if (u.charCodeAt(b + E) === 47) return u.slice(b + E + 1);
1790
- if (E === 0) return u.slice(b + E);
1791
- } else p > _ && (i.charCodeAt(m + E) === 47 ? M = E : E === 0 && (M = 0));
2312
+ return s === void 0 ? "." : p.normalize(s);
2313
+ }, relative: function(s, u) {
2314
+ if (o(s), o(u), s === u || (s = p.resolve(s)) === (u = p.resolve(u))) return "";
2315
+ for (var f = 1; f < s.length && s.charCodeAt(f) === 47; ++f) ;
2316
+ for (var g = s.length, _ = g - f, C = 1; C < u.length && u.charCodeAt(C) === 47; ++C) ;
2317
+ for (var a = u.length - C, w = _ < a ? _ : a, A = -1, L = 0; L <= w; ++L) {
2318
+ if (L === w) {
2319
+ if (a > w) {
2320
+ if (u.charCodeAt(C + L) === 47) return u.slice(C + L + 1);
2321
+ if (L === 0) return u.slice(C + L);
2322
+ } else _ > w && (s.charCodeAt(f + L) === 47 ? A = L : L === 0 && (A = 0));
1792
2323
  break;
1793
2324
  }
1794
- var $ = i.charCodeAt(m + E);
1795
- if ($ !== u.charCodeAt(b + E)) break;
1796
- $ === 47 && (M = E);
2325
+ var F = s.charCodeAt(f + L);
2326
+ if (F !== u.charCodeAt(C + L)) break;
2327
+ F === 47 && (A = L);
1797
2328
  }
1798
- var N = "";
1799
- for (E = m + M + 1; E <= d; ++E) E !== d && i.charCodeAt(E) !== 47 || (N.length === 0 ? N += ".." : N += "/..");
1800
- return N.length > 0 ? N + u.slice(b + M) : (b += M, u.charCodeAt(b) === 47 && ++b, u.slice(b));
1801
- }, _makeLong: function(i) {
1802
- return i;
1803
- }, dirname: function(i) {
1804
- if (s(i), i.length === 0) return ".";
1805
- for (var u = i.charCodeAt(0), m = u === 47, d = -1, p = !0, b = i.length - 1; b >= 1; --b) if ((u = i.charCodeAt(b)) === 47) {
1806
- if (!p) {
1807
- d = b;
2329
+ var O = "";
2330
+ for (L = f + A + 1; L <= g; ++L) L !== g && s.charCodeAt(L) !== 47 || (O.length === 0 ? O += ".." : O += "/..");
2331
+ return O.length > 0 ? O + u.slice(C + A) : (C += A, u.charCodeAt(C) === 47 && ++C, u.slice(C));
2332
+ }, _makeLong: function(s) {
2333
+ return s;
2334
+ }, dirname: function(s) {
2335
+ if (o(s), s.length === 0) return ".";
2336
+ for (var u = s.charCodeAt(0), f = u === 47, g = -1, _ = !0, C = s.length - 1; C >= 1; --C) if ((u = s.charCodeAt(C)) === 47) {
2337
+ if (!_) {
2338
+ g = C;
1808
2339
  break;
1809
2340
  }
1810
- } else p = !1;
1811
- return d === -1 ? m ? "/" : "." : m && d === 1 ? "//" : i.slice(0, d);
1812
- }, basename: function(i, u) {
2341
+ } else _ = !1;
2342
+ return g === -1 ? f ? "/" : "." : f && g === 1 ? "//" : s.slice(0, g);
2343
+ }, basename: function(s, u) {
1813
2344
  if (u !== void 0 && typeof u != "string") throw new TypeError('"ext" argument must be a string');
1814
- s(i);
1815
- var m, d = 0, p = -1, b = !0;
1816
- if (u !== void 0 && u.length > 0 && u.length <= i.length) {
1817
- if (u.length === i.length && u === i) return "";
1818
- var o = u.length - 1, _ = -1;
1819
- for (m = i.length - 1; m >= 0; --m) {
1820
- var M = i.charCodeAt(m);
1821
- if (M === 47) {
1822
- if (!b) {
1823
- d = m + 1;
2345
+ o(s);
2346
+ var f, g = 0, _ = -1, C = !0;
2347
+ if (u !== void 0 && u.length > 0 && u.length <= s.length) {
2348
+ if (u.length === s.length && u === s) return "";
2349
+ var a = u.length - 1, w = -1;
2350
+ for (f = s.length - 1; f >= 0; --f) {
2351
+ var A = s.charCodeAt(f);
2352
+ if (A === 47) {
2353
+ if (!C) {
2354
+ g = f + 1;
1824
2355
  break;
1825
2356
  }
1826
- } else _ === -1 && (b = !1, _ = m + 1), o >= 0 && (M === u.charCodeAt(o) ? --o == -1 && (p = m) : (o = -1, p = _));
2357
+ } else w === -1 && (C = !1, w = f + 1), a >= 0 && (A === u.charCodeAt(a) ? --a == -1 && (_ = f) : (a = -1, _ = w));
1827
2358
  }
1828
- return d === p ? p = _ : p === -1 && (p = i.length), i.slice(d, p);
2359
+ return g === _ ? _ = w : _ === -1 && (_ = s.length), s.slice(g, _);
1829
2360
  }
1830
- for (m = i.length - 1; m >= 0; --m) if (i.charCodeAt(m) === 47) {
1831
- if (!b) {
1832
- d = m + 1;
2361
+ for (f = s.length - 1; f >= 0; --f) if (s.charCodeAt(f) === 47) {
2362
+ if (!C) {
2363
+ g = f + 1;
1833
2364
  break;
1834
2365
  }
1835
- } else p === -1 && (b = !1, p = m + 1);
1836
- return p === -1 ? "" : i.slice(d, p);
1837
- }, extname: function(i) {
1838
- s(i);
1839
- for (var u = -1, m = 0, d = -1, p = !0, b = 0, o = i.length - 1; o >= 0; --o) {
1840
- var _ = i.charCodeAt(o);
1841
- if (_ !== 47) d === -1 && (p = !1, d = o + 1), _ === 46 ? u === -1 ? u = o : b !== 1 && (b = 1) : u !== -1 && (b = -1);
1842
- else if (!p) {
1843
- m = o + 1;
2366
+ } else _ === -1 && (C = !1, _ = f + 1);
2367
+ return _ === -1 ? "" : s.slice(g, _);
2368
+ }, extname: function(s) {
2369
+ o(s);
2370
+ for (var u = -1, f = 0, g = -1, _ = !0, C = 0, a = s.length - 1; a >= 0; --a) {
2371
+ var w = s.charCodeAt(a);
2372
+ if (w !== 47) g === -1 && (_ = !1, g = a + 1), w === 46 ? u === -1 ? u = a : C !== 1 && (C = 1) : u !== -1 && (C = -1);
2373
+ else if (!_) {
2374
+ f = a + 1;
1844
2375
  break;
1845
2376
  }
1846
2377
  }
1847
- return u === -1 || d === -1 || b === 0 || b === 1 && u === d - 1 && u === m + 1 ? "" : i.slice(u, d);
1848
- }, format: function(i) {
1849
- if (i === null || typeof i != "object") throw new TypeError('The "pathObject" argument must be of type Object. Received type ' + typeof i);
1850
- return (function(u, m) {
1851
- var d = m.dir || m.root, p = m.base || (m.name || "") + (m.ext || "");
1852
- return d ? d === m.root ? d + p : d + "/" + p : p;
1853
- })(0, i);
1854
- }, parse: function(i) {
1855
- s(i);
2378
+ return u === -1 || g === -1 || C === 0 || C === 1 && u === g - 1 && u === f + 1 ? "" : s.slice(u, g);
2379
+ }, format: function(s) {
2380
+ if (s === null || typeof s != "object") throw new TypeError('The "pathObject" argument must be of type Object. Received type ' + typeof s);
2381
+ return (function(u, f) {
2382
+ var g = f.dir || f.root, _ = f.base || (f.name || "") + (f.ext || "");
2383
+ return g ? g === f.root ? g + _ : g + "/" + _ : _;
2384
+ })(0, s);
2385
+ }, parse: function(s) {
2386
+ o(s);
1856
2387
  var u = { root: "", dir: "", base: "", ext: "", name: "" };
1857
- if (i.length === 0) return u;
1858
- var m, d = i.charCodeAt(0), p = d === 47;
1859
- p ? (u.root = "/", m = 1) : m = 0;
1860
- for (var b = -1, o = 0, _ = -1, M = !0, E = i.length - 1, $ = 0; E >= m; --E) if ((d = i.charCodeAt(E)) !== 47) _ === -1 && (M = !1, _ = E + 1), d === 46 ? b === -1 ? b = E : $ !== 1 && ($ = 1) : b !== -1 && ($ = -1);
1861
- else if (!M) {
1862
- o = E + 1;
2388
+ if (s.length === 0) return u;
2389
+ var f, g = s.charCodeAt(0), _ = g === 47;
2390
+ _ ? (u.root = "/", f = 1) : f = 0;
2391
+ for (var C = -1, a = 0, w = -1, A = !0, L = s.length - 1, F = 0; L >= f; --L) if ((g = s.charCodeAt(L)) !== 47) w === -1 && (A = !1, w = L + 1), g === 46 ? C === -1 ? C = L : F !== 1 && (F = 1) : C !== -1 && (F = -1);
2392
+ else if (!A) {
2393
+ a = L + 1;
1863
2394
  break;
1864
2395
  }
1865
- return b === -1 || _ === -1 || $ === 0 || $ === 1 && b === _ - 1 && b === o + 1 ? _ !== -1 && (u.base = u.name = o === 0 && p ? i.slice(1, _) : i.slice(o, _)) : (o === 0 && p ? (u.name = i.slice(1, b), u.base = i.slice(1, _)) : (u.name = i.slice(o, b), u.base = i.slice(o, _)), u.ext = i.slice(b, _)), o > 0 ? u.dir = i.slice(0, o - 1) : p && (u.dir = "/"), u;
2396
+ return C === -1 || w === -1 || F === 0 || F === 1 && C === w - 1 && C === a + 1 ? w !== -1 && (u.base = u.name = a === 0 && _ ? s.slice(1, w) : s.slice(a, w)) : (a === 0 && _ ? (u.name = s.slice(1, C), u.base = s.slice(1, w)) : (u.name = s.slice(a, C), u.base = s.slice(a, w)), u.ext = s.slice(C, w)), a > 0 ? u.dir = s.slice(0, a - 1) : _ && (u.dir = "/"), u;
1866
2397
  }, sep: "/", delimiter: ":", win32: null, posix: null };
1867
- k.posix = k, y.exports = k;
2398
+ p.posix = p, b.exports = p;
1868
2399
  } }, t = {};
1869
- function n(y) {
1870
- var s = t[y];
1871
- if (s !== void 0) return s.exports;
1872
- var w = t[y] = { exports: {} };
1873
- return e[y](w, w.exports, n), w.exports;
2400
+ function r(b) {
2401
+ var o = t[b];
2402
+ if (o !== void 0) return o.exports;
2403
+ var v = t[b] = { exports: {} };
2404
+ return e[b](v, v.exports, r), v.exports;
1874
2405
  }
1875
- n.d = (y, s) => {
1876
- for (var w in s) n.o(s, w) && !n.o(y, w) && Object.defineProperty(y, w, { enumerable: !0, get: s[w] });
1877
- }, n.o = (y, s) => Object.prototype.hasOwnProperty.call(y, s), n.r = (y) => {
1878
- typeof Symbol < "u" && Symbol.toStringTag && Object.defineProperty(y, Symbol.toStringTag, { value: "Module" }), Object.defineProperty(y, "__esModule", { value: !0 });
2406
+ r.d = (b, o) => {
2407
+ for (var v in o) r.o(o, v) && !r.o(b, v) && Object.defineProperty(b, v, { enumerable: !0, get: o[v] });
2408
+ }, r.o = (b, o) => Object.prototype.hasOwnProperty.call(b, o), r.r = (b) => {
2409
+ typeof Symbol < "u" && Symbol.toStringTag && Object.defineProperty(b, Symbol.toStringTag, { value: "Module" }), Object.defineProperty(b, "__esModule", { value: !0 });
1879
2410
  };
1880
- var r = {};
2411
+ var n = {};
1881
2412
  let c;
1882
- n.r(r), n.d(r, { URI: () => h, Utils: () => ne }), typeof process == "object" ? c = process.platform === "win32" : typeof navigator == "object" && (c = navigator.userAgent.indexOf("Windows") >= 0);
1883
- const l = /^\w[\w\d+.-]*$/, f = /^\//, a = /^\/\//;
1884
- function v(y, s) {
1885
- if (!y.scheme && s) throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${y.authority}", path: "${y.path}", query: "${y.query}", fragment: "${y.fragment}"}`);
1886
- if (y.scheme && !l.test(y.scheme)) throw new Error("[UriError]: Scheme contains illegal characters.");
1887
- if (y.path) {
1888
- if (y.authority) {
1889
- if (!f.test(y.path)) throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character');
1890
- } else if (a.test(y.path)) throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")');
2413
+ r.r(n), r.d(n, { URI: () => m, Utils: () => K }), typeof process == "object" ? c = process.platform === "win32" : typeof navigator == "object" && (c = navigator.userAgent.indexOf("Windows") >= 0);
2414
+ const i = /^\w[\w\d+.-]*$/, l = /^\//, d = /^\/\//;
2415
+ function y(b, o) {
2416
+ if (!b.scheme && o) throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${b.authority}", path: "${b.path}", query: "${b.query}", fragment: "${b.fragment}"}`);
2417
+ if (b.scheme && !i.test(b.scheme)) throw new Error("[UriError]: Scheme contains illegal characters.");
2418
+ if (b.path) {
2419
+ if (b.authority) {
2420
+ if (!l.test(b.path)) throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character');
2421
+ } else if (d.test(b.path)) throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")');
1891
2422
  }
1892
2423
  }
1893
- const g = "", x = "/", A = /^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;
1894
- class h {
1895
- static isUri(s) {
1896
- return s instanceof h || !!s && typeof s.authority == "string" && typeof s.fragment == "string" && typeof s.path == "string" && typeof s.query == "string" && typeof s.scheme == "string" && typeof s.fsPath == "string" && typeof s.with == "function" && typeof s.toString == "function";
2424
+ const h = "", k = "/", j = /^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;
2425
+ class m {
2426
+ static isUri(o) {
2427
+ return o instanceof m || !!o && typeof o.authority == "string" && typeof o.fragment == "string" && typeof o.path == "string" && typeof o.query == "string" && typeof o.scheme == "string" && typeof o.fsPath == "string" && typeof o.with == "function" && typeof o.toString == "function";
1897
2428
  }
1898
2429
  scheme;
1899
2430
  authority;
1900
2431
  path;
1901
2432
  query;
1902
2433
  fragment;
1903
- constructor(s, w, k, i, u, m = !1) {
1904
- typeof s == "object" ? (this.scheme = s.scheme || g, this.authority = s.authority || g, this.path = s.path || g, this.query = s.query || g, this.fragment = s.fragment || g) : (this.scheme = /* @__PURE__ */ (function(d, p) {
1905
- return d || p ? d : "file";
1906
- })(s, m), this.authority = w || g, this.path = (function(d, p) {
1907
- switch (d) {
2434
+ constructor(o, v, p, s, u, f = !1) {
2435
+ typeof o == "object" ? (this.scheme = o.scheme || h, this.authority = o.authority || h, this.path = o.path || h, this.query = o.query || h, this.fragment = o.fragment || h) : (this.scheme = /* @__PURE__ */ (function(g, _) {
2436
+ return g || _ ? g : "file";
2437
+ })(o, f), this.authority = v || h, this.path = (function(g, _) {
2438
+ switch (g) {
1908
2439
  case "https":
1909
2440
  case "http":
1910
2441
  case "file":
1911
- p ? p[0] !== x && (p = x + p) : p = x;
2442
+ _ ? _[0] !== k && (_ = k + _) : _ = k;
1912
2443
  }
1913
- return p;
1914
- })(this.scheme, k || g), this.query = i || g, this.fragment = u || g, v(this, m));
2444
+ return _;
2445
+ })(this.scheme, p || h), this.query = s || h, this.fragment = u || h, y(this, f));
1915
2446
  }
1916
2447
  get fsPath() {
1917
- return H(this);
1918
- }
1919
- with(s) {
1920
- if (!s) return this;
1921
- let { scheme: w, authority: k, path: i, query: u, fragment: m } = s;
1922
- return w === void 0 ? w = this.scheme : w === null && (w = g), k === void 0 ? k = this.authority : k === null && (k = g), i === void 0 ? i = this.path : i === null && (i = g), u === void 0 ? u = this.query : u === null && (u = g), m === void 0 ? m = this.fragment : m === null && (m = g), w === this.scheme && k === this.authority && i === this.path && u === this.query && m === this.fragment ? this : new C(w, k, i, u, m);
1923
- }
1924
- static parse(s, w = !1) {
1925
- const k = A.exec(s);
1926
- return k ? new C(k[2] || g, D(k[4] || g), D(k[5] || g), D(k[7] || g), D(k[9] || g), w) : new C(g, g, g, g, g);
1927
- }
1928
- static file(s) {
1929
- let w = g;
1930
- if (c && (s = s.replace(/\\/g, x)), s[0] === x && s[1] === x) {
1931
- const k = s.indexOf(x, 2);
1932
- k === -1 ? (w = s.substring(2), s = x) : (w = s.substring(2, k), s = s.substring(k) || x);
2448
+ return S(this);
2449
+ }
2450
+ with(o) {
2451
+ if (!o) return this;
2452
+ let { scheme: v, authority: p, path: s, query: u, fragment: f } = o;
2453
+ return v === void 0 ? v = this.scheme : v === null && (v = h), p === void 0 ? p = this.authority : p === null && (p = h), s === void 0 ? s = this.path : s === null && (s = h), u === void 0 ? u = this.query : u === null && (u = h), f === void 0 ? f = this.fragment : f === null && (f = h), v === this.scheme && p === this.authority && s === this.path && u === this.query && f === this.fragment ? this : new R(v, p, s, u, f);
2454
+ }
2455
+ static parse(o, v = !1) {
2456
+ const p = j.exec(o);
2457
+ return p ? new R(p[2] || h, N(p[4] || h), N(p[5] || h), N(p[7] || h), N(p[9] || h), v) : new R(h, h, h, h, h);
2458
+ }
2459
+ static file(o) {
2460
+ let v = h;
2461
+ if (c && (o = o.replace(/\\/g, k)), o[0] === k && o[1] === k) {
2462
+ const p = o.indexOf(k, 2);
2463
+ p === -1 ? (v = o.substring(2), o = k) : (v = o.substring(2, p), o = o.substring(p) || k);
1933
2464
  }
1934
- return new C("file", w, s, g, g);
2465
+ return new R("file", v, o, h, h);
1935
2466
  }
1936
- static from(s) {
1937
- const w = new C(s.scheme, s.authority, s.path, s.query, s.fragment);
1938
- return v(w, !0), w;
2467
+ static from(o) {
2468
+ const v = new R(o.scheme, o.authority, o.path, o.query, o.fragment);
2469
+ return y(v, !0), v;
1939
2470
  }
1940
- toString(s = !1) {
1941
- return q(this, s);
2471
+ toString(o = !1) {
2472
+ return D(this, o);
1942
2473
  }
1943
2474
  toJSON() {
1944
2475
  return this;
1945
2476
  }
1946
- static revive(s) {
1947
- if (s) {
1948
- if (s instanceof h) return s;
2477
+ static revive(o) {
2478
+ if (o) {
2479
+ if (o instanceof m) return o;
1949
2480
  {
1950
- const w = new C(s);
1951
- return w._formatted = s.external, w._fsPath = s._sep === S ? s.fsPath : null, w;
2481
+ const v = new R(o);
2482
+ return v._formatted = o.external, v._fsPath = o._sep === T ? o.fsPath : null, v;
1952
2483
  }
1953
2484
  }
1954
- return s;
2485
+ return o;
1955
2486
  }
1956
2487
  }
1957
- const S = c ? 1 : void 0;
1958
- class C extends h {
2488
+ const T = c ? 1 : void 0;
2489
+ class R extends m {
1959
2490
  _formatted = null;
1960
2491
  _fsPath = null;
1961
2492
  get fsPath() {
1962
- return this._fsPath || (this._fsPath = H(this)), this._fsPath;
2493
+ return this._fsPath || (this._fsPath = S(this)), this._fsPath;
1963
2494
  }
1964
- toString(s = !1) {
1965
- return s ? q(this, !0) : (this._formatted || (this._formatted = q(this, !1)), this._formatted);
2495
+ toString(o = !1) {
2496
+ return o ? D(this, !0) : (this._formatted || (this._formatted = D(this, !1)), this._formatted);
1966
2497
  }
1967
2498
  toJSON() {
1968
- const s = { $mid: 1 };
1969
- return this._fsPath && (s.fsPath = this._fsPath, s._sep = S), this._formatted && (s.external = this._formatted), this.path && (s.path = this.path), this.scheme && (s.scheme = this.scheme), this.authority && (s.authority = this.authority), this.query && (s.query = this.query), this.fragment && (s.fragment = this.fragment), s;
2499
+ const o = { $mid: 1 };
2500
+ return this._fsPath && (o.fsPath = this._fsPath, o._sep = T), this._formatted && (o.external = this._formatted), this.path && (o.path = this.path), this.scheme && (o.scheme = this.scheme), this.authority && (o.authority = this.authority), this.query && (o.query = this.query), this.fragment && (o.fragment = this.fragment), o;
1970
2501
  }
1971
2502
  }
1972
- const I = { 58: "%3A", 47: "%2F", 63: "%3F", 35: "%23", 91: "%5B", 93: "%5D", 64: "%40", 33: "%21", 36: "%24", 38: "%26", 39: "%27", 40: "%28", 41: "%29", 42: "%2A", 43: "%2B", 44: "%2C", 59: "%3B", 61: "%3D", 32: "%20" };
1973
- function j(y, s, w) {
1974
- let k, i = -1;
1975
- for (let u = 0; u < y.length; u++) {
1976
- const m = y.charCodeAt(u);
1977
- if (m >= 97 && m <= 122 || m >= 65 && m <= 90 || m >= 48 && m <= 57 || m === 45 || m === 46 || m === 95 || m === 126 || s && m === 47 || w && m === 91 || w && m === 93 || w && m === 58) i !== -1 && (k += encodeURIComponent(y.substring(i, u)), i = -1), k !== void 0 && (k += y.charAt(u));
2503
+ const H = { 58: "%3A", 47: "%2F", 63: "%3F", 35: "%23", 91: "%5B", 93: "%5D", 64: "%40", 33: "%21", 36: "%24", 38: "%26", 39: "%27", 40: "%28", 41: "%29", 42: "%2A", 43: "%2B", 44: "%2C", 59: "%3B", 61: "%3D", 32: "%20" };
2504
+ function x(b, o, v) {
2505
+ let p, s = -1;
2506
+ for (let u = 0; u < b.length; u++) {
2507
+ const f = b.charCodeAt(u);
2508
+ if (f >= 97 && f <= 122 || f >= 65 && f <= 90 || f >= 48 && f <= 57 || f === 45 || f === 46 || f === 95 || f === 126 || o && f === 47 || v && f === 91 || v && f === 93 || v && f === 58) s !== -1 && (p += encodeURIComponent(b.substring(s, u)), s = -1), p !== void 0 && (p += b.charAt(u));
1978
2509
  else {
1979
- k === void 0 && (k = y.substr(0, u));
1980
- const d = I[m];
1981
- d !== void 0 ? (i !== -1 && (k += encodeURIComponent(y.substring(i, u)), i = -1), k += d) : i === -1 && (i = u);
2510
+ p === void 0 && (p = b.substr(0, u));
2511
+ const g = H[f];
2512
+ g !== void 0 ? (s !== -1 && (p += encodeURIComponent(b.substring(s, u)), s = -1), p += g) : s === -1 && (s = u);
1982
2513
  }
1983
2514
  }
1984
- return i !== -1 && (k += encodeURIComponent(y.substring(i))), k !== void 0 ? k : y;
2515
+ return s !== -1 && (p += encodeURIComponent(b.substring(s))), p !== void 0 ? p : b;
1985
2516
  }
1986
- function W(y) {
1987
- let s;
1988
- for (let w = 0; w < y.length; w++) {
1989
- const k = y.charCodeAt(w);
1990
- k === 35 || k === 63 ? (s === void 0 && (s = y.substr(0, w)), s += I[k]) : s !== void 0 && (s += y[w]);
2517
+ function z(b) {
2518
+ let o;
2519
+ for (let v = 0; v < b.length; v++) {
2520
+ const p = b.charCodeAt(v);
2521
+ p === 35 || p === 63 ? (o === void 0 && (o = b.substr(0, v)), o += H[p]) : o !== void 0 && (o += b[v]);
1991
2522
  }
1992
- return s !== void 0 ? s : y;
2523
+ return o !== void 0 ? o : b;
1993
2524
  }
1994
- function H(y, s) {
1995
- let w;
1996
- return w = y.authority && y.path.length > 1 && y.scheme === "file" ? `//${y.authority}${y.path}` : y.path.charCodeAt(0) === 47 && (y.path.charCodeAt(1) >= 65 && y.path.charCodeAt(1) <= 90 || y.path.charCodeAt(1) >= 97 && y.path.charCodeAt(1) <= 122) && y.path.charCodeAt(2) === 58 ? y.path[1].toLowerCase() + y.path.substr(2) : y.path, c && (w = w.replace(/\//g, "\\")), w;
2525
+ function S(b, o) {
2526
+ let v;
2527
+ return v = b.authority && b.path.length > 1 && b.scheme === "file" ? `//${b.authority}${b.path}` : b.path.charCodeAt(0) === 47 && (b.path.charCodeAt(1) >= 65 && b.path.charCodeAt(1) <= 90 || b.path.charCodeAt(1) >= 97 && b.path.charCodeAt(1) <= 122) && b.path.charCodeAt(2) === 58 ? b.path[1].toLowerCase() + b.path.substr(2) : b.path, c && (v = v.replace(/\//g, "\\")), v;
1997
2528
  }
1998
- function q(y, s) {
1999
- const w = s ? W : j;
2000
- let k = "", { scheme: i, authority: u, path: m, query: d, fragment: p } = y;
2001
- if (i && (k += i, k += ":"), (u || i === "file") && (k += x, k += x), u) {
2002
- let b = u.indexOf("@");
2003
- if (b !== -1) {
2004
- const o = u.substr(0, b);
2005
- u = u.substr(b + 1), b = o.lastIndexOf(":"), b === -1 ? k += w(o, !1, !1) : (k += w(o.substr(0, b), !1, !1), k += ":", k += w(o.substr(b + 1), !1, !0)), k += "@";
2529
+ function D(b, o) {
2530
+ const v = o ? z : x;
2531
+ let p = "", { scheme: s, authority: u, path: f, query: g, fragment: _ } = b;
2532
+ if (s && (p += s, p += ":"), (u || s === "file") && (p += k, p += k), u) {
2533
+ let C = u.indexOf("@");
2534
+ if (C !== -1) {
2535
+ const a = u.substr(0, C);
2536
+ u = u.substr(C + 1), C = a.lastIndexOf(":"), C === -1 ? p += v(a, !1, !1) : (p += v(a.substr(0, C), !1, !1), p += ":", p += v(a.substr(C + 1), !1, !0)), p += "@";
2006
2537
  }
2007
- u = u.toLowerCase(), b = u.lastIndexOf(":"), b === -1 ? k += w(u, !1, !0) : (k += w(u.substr(0, b), !1, !0), k += u.substr(b));
2008
- }
2009
- if (m) {
2010
- if (m.length >= 3 && m.charCodeAt(0) === 47 && m.charCodeAt(2) === 58) {
2011
- const b = m.charCodeAt(1);
2012
- b >= 65 && b <= 90 && (m = `/${String.fromCharCode(b + 32)}:${m.substr(3)}`);
2013
- } else if (m.length >= 2 && m.charCodeAt(1) === 58) {
2014
- const b = m.charCodeAt(0);
2015
- b >= 65 && b <= 90 && (m = `${String.fromCharCode(b + 32)}:${m.substr(2)}`);
2538
+ u = u.toLowerCase(), C = u.lastIndexOf(":"), C === -1 ? p += v(u, !1, !0) : (p += v(u.substr(0, C), !1, !0), p += u.substr(C));
2539
+ }
2540
+ if (f) {
2541
+ if (f.length >= 3 && f.charCodeAt(0) === 47 && f.charCodeAt(2) === 58) {
2542
+ const C = f.charCodeAt(1);
2543
+ C >= 65 && C <= 90 && (f = `/${String.fromCharCode(C + 32)}:${f.substr(3)}`);
2544
+ } else if (f.length >= 2 && f.charCodeAt(1) === 58) {
2545
+ const C = f.charCodeAt(0);
2546
+ C >= 65 && C <= 90 && (f = `${String.fromCharCode(C + 32)}:${f.substr(2)}`);
2016
2547
  }
2017
- k += w(m, !0, !1);
2548
+ p += v(f, !0, !1);
2018
2549
  }
2019
- return d && (k += "?", k += w(d, !1, !1)), p && (k += "#", k += s ? p : j(p, !1, !1)), k;
2550
+ return g && (p += "?", p += v(g, !1, !1)), _ && (p += "#", p += o ? _ : x(_, !1, !1)), p;
2020
2551
  }
2021
- function J(y) {
2552
+ function I(b) {
2022
2553
  try {
2023
- return decodeURIComponent(y);
2554
+ return decodeURIComponent(b);
2024
2555
  } catch {
2025
- return y.length > 3 ? y.substr(0, 3) + J(y.substr(3)) : y;
2556
+ return b.length > 3 ? b.substr(0, 3) + I(b.substr(3)) : b;
2026
2557
  }
2027
2558
  }
2028
- const U = /(%[0-9A-Za-z][0-9A-Za-z])+/g;
2029
- function D(y) {
2030
- return y.match(U) ? y.replace(U, ((s) => J(s))) : y;
2559
+ const B = /(%[0-9A-Za-z][0-9A-Za-z])+/g;
2560
+ function N(b) {
2561
+ return b.match(B) ? b.replace(B, ((o) => I(o))) : b;
2031
2562
  }
2032
- var V = n(975);
2033
- const P = V.posix || V, X = "/";
2034
- var ne;
2035
- (function(y) {
2036
- y.joinPath = function(s, ...w) {
2037
- return s.with({ path: P.join(s.path, ...w) });
2038
- }, y.resolvePath = function(s, ...w) {
2039
- let k = s.path, i = !1;
2040
- k[0] !== X && (k = X + k, i = !0);
2041
- let u = P.resolve(k, ...w);
2042
- return i && u[0] === X && !s.authority && (u = u.substring(1)), s.with({ path: u });
2043
- }, y.dirname = function(s) {
2044
- if (s.path.length === 0 || s.path === X) return s;
2045
- let w = P.dirname(s.path);
2046
- return w.length === 1 && w.charCodeAt(0) === 46 && (w = ""), s.with({ path: w });
2047
- }, y.basename = function(s) {
2048
- return P.basename(s.path);
2049
- }, y.extname = function(s) {
2050
- return P.extname(s.path);
2563
+ var q = r(975);
2564
+ const P = q.posix || q, V = "/";
2565
+ var K;
2566
+ (function(b) {
2567
+ b.joinPath = function(o, ...v) {
2568
+ return o.with({ path: P.join(o.path, ...v) });
2569
+ }, b.resolvePath = function(o, ...v) {
2570
+ let p = o.path, s = !1;
2571
+ p[0] !== V && (p = V + p, s = !0);
2572
+ let u = P.resolve(p, ...v);
2573
+ return s && u[0] === V && !o.authority && (u = u.substring(1)), o.with({ path: u });
2574
+ }, b.dirname = function(o) {
2575
+ if (o.path.length === 0 || o.path === V) return o;
2576
+ let v = P.dirname(o.path);
2577
+ return v.length === 1 && v.charCodeAt(0) === 46 && (v = ""), o.with({ path: v });
2578
+ }, b.basename = function(o) {
2579
+ return P.basename(o.path);
2580
+ }, b.extname = function(o) {
2581
+ return P.extname(o.path);
2051
2582
  };
2052
- })(ne || (ne = {})), Et = r;
2583
+ })(K || (K = {})), $t = n;
2053
2584
  })();
2054
- const { URI: he, Utils: oo } = Et;
2055
- function yn(e) {
2585
+ const { URI: ge, Utils: jo } = $t;
2586
+ function Bn(e) {
2056
2587
  return e === 4 ? 1 : e === 3 ? 2 : e === 2 ? 4 : 8;
2057
2588
  }
2058
- function vn(e) {
2589
+ function qn(e) {
2059
2590
  return e;
2060
2591
  }
2061
- function bn(e) {
2592
+ function zn(e) {
2062
2593
  return {
2063
2594
  start: { line: e.startLineNumber - 1, character: e.startColumn - 1 },
2064
2595
  end: { line: e.endLineNumber - 1, character: e.endColumn - 1 }
2065
2596
  };
2066
2597
  }
2067
- function K(e) {
2598
+ function ee(e) {
2068
2599
  return {
2069
2600
  startLineNumber: e.start.line + 1,
2070
2601
  startColumn: e.start.character + 1,
@@ -2072,263 +2603,263 @@ function K(e) {
2072
2603
  endColumn: e.end.character + 1
2073
2604
  };
2074
2605
  }
2075
- function _n(e) {
2606
+ function Vn(e) {
2076
2607
  return {
2077
- ...K(e.location.range),
2608
+ ...ee(e.location.range),
2078
2609
  message: e.message,
2079
- resource: he.parse(e.location.uri)
2610
+ resource: ge.parse(e.location.uri)
2080
2611
  };
2081
2612
  }
2082
- function jt(e) {
2613
+ function It(e) {
2083
2614
  const t = {
2084
- ...K(e.range),
2615
+ ...ee(e.range),
2085
2616
  message: e.message,
2086
- severity: e.severity ? yn(e.severity) : 8
2617
+ severity: e.severity ? Bn(e.severity) : 8
2087
2618
  };
2088
- return e.code != null && (t.code = e.codeDescription == null ? String(e.code) : { value: String(e.code), target: he.parse(e.codeDescription.href) }), e.relatedInformation && (t.relatedInformation = e.relatedInformation.map(_n)), e.tags && (t.tags = e.tags.map(vn)), e.source != null && (t.source = e.source), t;
2619
+ return e.code != null && (t.code = e.codeDescription == null ? String(e.code) : { value: String(e.code), target: ge.parse(e.codeDescription.href) }), e.relatedInformation && (t.relatedInformation = e.relatedInformation.map(Vn)), e.tags && (t.tags = e.tags.map(qn)), e.source != null && (t.source = e.source), t;
2089
2620
  }
2090
- function Je(e) {
2621
+ function Qe(e) {
2091
2622
  return {
2092
- range: K(e.range),
2623
+ range: ee(e.range),
2093
2624
  text: e.newText
2094
2625
  };
2095
2626
  }
2096
- function wn(e) {
2627
+ function Fn(e) {
2097
2628
  const t = {};
2098
2629
  return e.ignoreIfExists != null && (t.ignoreIfExists = e.ignoreIfExists), e.ignoreIfNotExists != null && (t.ignoreIfNotExists = e.ignoreIfNotExists), e.overwrite != null && (t.overwrite = e.overwrite), e.recursive != null && (t.recursive = e.recursive), t;
2099
2630
  }
2100
- function kn(e) {
2101
- const t = e.kind === "create" ? { newResource: he.parse(e.uri) } : e.kind === "delete" ? { oldResource: he.parse(e.uri) } : {
2102
- oldResource: he.parse(e.oldUri),
2103
- newResource: he.parse(e.newUri)
2631
+ function Un(e) {
2632
+ const t = e.kind === "create" ? { newResource: ge.parse(e.uri) } : e.kind === "delete" ? { oldResource: ge.parse(e.uri) } : {
2633
+ oldResource: ge.parse(e.oldUri),
2634
+ newResource: ge.parse(e.newUri)
2104
2635
  };
2105
- return e.options && (t.options = wn(e.options)), t;
2636
+ return e.options && (t.options = Fn(e.options)), t;
2106
2637
  }
2107
- function ht(e, t, n) {
2638
+ function wt(e, t, r) {
2108
2639
  return {
2109
- resource: he.parse(t),
2110
- versionId: n,
2111
- textEdit: Je(e)
2640
+ resource: ge.parse(t),
2641
+ versionId: r,
2642
+ textEdit: Qe(e)
2112
2643
  };
2113
2644
  }
2114
- function xn(e) {
2645
+ function Yn(e) {
2115
2646
  var t;
2116
- const n = [];
2647
+ const r = [];
2117
2648
  if (e.changes)
2118
- for (const [r, c] of Object.entries(e.changes))
2119
- for (const l of c)
2120
- n.push(ht(l, r));
2649
+ for (const [n, c] of Object.entries(e.changes))
2650
+ for (const i of c)
2651
+ r.push(wt(i, n));
2121
2652
  if (e.documentChanges)
2122
- for (const r of e.documentChanges)
2123
- if ("textDocument" in r)
2124
- for (const c of r.edits)
2125
- n.push(ht(c, r.textDocument.uri, (t = r.textDocument.version) !== null && t !== void 0 ? t : void 0));
2653
+ for (const n of e.documentChanges)
2654
+ if ("textDocument" in n)
2655
+ for (const c of n.edits)
2656
+ r.push(wt(c, n.textDocument.uri, (t = n.textDocument.version) !== null && t !== void 0 ? t : void 0));
2126
2657
  else
2127
- n.push(kn(r));
2658
+ r.push(Un(n));
2128
2659
  return {
2129
- edits: n
2660
+ edits: r
2130
2661
  };
2131
2662
  }
2132
- function Cn(e) {
2663
+ function Gn(e) {
2133
2664
  const t = {
2134
2665
  title: e.title,
2135
2666
  isPreferred: e.isPreferred
2136
2667
  };
2137
- return e.diagnostics && (t.diagnostics = e.diagnostics.map(jt)), e.disabled && (t.disabled = e.disabled.reason), e.edit && (t.edit = xn(e.edit)), e.isPreferred != null && (t.isPreferred = e.isPreferred), e.kind && (t.kind = e.kind), t;
2668
+ return e.diagnostics && (t.diagnostics = e.diagnostics.map(It)), e.disabled && (t.disabled = e.disabled.reason), e.edit && (t.edit = Yn(e.edit)), e.isPreferred != null && (t.isPreferred = e.isPreferred), e.kind && (t.kind = e.kind), t;
2138
2669
  }
2139
- function Rn(e) {
2670
+ function Jn(e) {
2140
2671
  const t = {
2141
2672
  title: e.title,
2142
2673
  id: e.command
2143
2674
  };
2144
2675
  return e.arguments && (t.arguments = e.arguments), t;
2145
2676
  }
2146
- function Sn(e) {
2677
+ function Kn(e) {
2147
2678
  return e === 1 ? 18 : e === 2 ? 0 : e === 3 ? 1 : e === 4 ? 2 : e === 5 ? 3 : e === 6 ? 4 : e === 7 ? 5 : e === 8 ? 7 : e === 9 ? 8 : e === 10 ? 9 : e === 11 ? 12 : e === 12 ? 13 : e === 13 ? 15 : e === 14 ? 17 : e === 15 ? 27 : e === 16 ? 19 : e === 17 ? 20 : e === 18 ? 21 : e === 19 ? 23 : e === 20 ? 16 : e === 21 ? 14 : e === 22 ? 6 : e === 23 ? 10 : e === 24 ? 11 : 24;
2148
2679
  }
2149
- function Tn(e) {
2680
+ function Xn(e) {
2150
2681
  return e;
2151
2682
  }
2152
- function Mt(e) {
2683
+ function Wt(e) {
2153
2684
  return {
2154
2685
  value: e.value
2155
2686
  };
2156
2687
  }
2157
- function En(e) {
2688
+ function Zn(e) {
2158
2689
  return {
2159
- range: K(e.range),
2690
+ range: ee(e.range),
2160
2691
  text: e.newText
2161
2692
  };
2162
2693
  }
2163
- function jn(e) {
2164
- return "range" in e ? K(e.range) : "insert" in e && "replace" in e ? {
2165
- insert: K(e.insert),
2166
- replace: K(e.replace)
2167
- } : K(e);
2168
- }
2169
- function Mn(e, t) {
2170
- var n, r, c, l, f;
2171
- const a = (n = t.itemDefaults) !== null && n !== void 0 ? n : {}, v = (r = e.textEdit) !== null && r !== void 0 ? r : a.editRange, g = (c = e.commitCharacters) !== null && c !== void 0 ? c : a.commitCharacters, x = (l = e.insertTextFormat) !== null && l !== void 0 ? l : a.insertTextFormat, A = (f = e.insertTextMode) !== null && f !== void 0 ? f : a.insertTextMode;
2172
- let h = e.insertText, S;
2173
- v ? (S = jn(v), "newText" in v && (h = v.newText)) : S = { ...t.range };
2174
- const C = {
2175
- insertText: h ?? e.label,
2176
- kind: e.kind == null ? 18 : Sn(e.kind),
2694
+ function Qn(e) {
2695
+ return "range" in e ? ee(e.range) : "insert" in e && "replace" in e ? {
2696
+ insert: ee(e.insert),
2697
+ replace: ee(e.replace)
2698
+ } : ee(e);
2699
+ }
2700
+ function eo(e, t) {
2701
+ var r, n, c, i, l;
2702
+ const d = (r = t.itemDefaults) !== null && r !== void 0 ? r : {}, y = (n = e.textEdit) !== null && n !== void 0 ? n : d.editRange, h = (c = e.commitCharacters) !== null && c !== void 0 ? c : d.commitCharacters, k = (i = e.insertTextFormat) !== null && i !== void 0 ? i : d.insertTextFormat, j = (l = e.insertTextMode) !== null && l !== void 0 ? l : d.insertTextMode;
2703
+ let m = e.insertText, T;
2704
+ y ? (T = Qn(y), "newText" in y && (m = y.newText)) : T = { ...t.range };
2705
+ const R = {
2706
+ insertText: m ?? e.label,
2707
+ kind: e.kind == null ? 18 : Kn(e.kind),
2177
2708
  label: e.label,
2178
- range: S
2709
+ range: T
2179
2710
  };
2180
- return e.additionalTextEdits && (C.additionalTextEdits = e.additionalTextEdits.map(En)), e.command && (C.command = Rn(e.command)), g && (C.commitCharacters = g), e.detail != null && (C.detail = e.detail), typeof e.documentation == "string" ? C.documentation = e.documentation : e.documentation && (C.documentation = Mt(e.documentation)), e.filterText != null && (C.filterText = e.filterText), x === 2 ? C.insertTextRules = 4 : A === 2 && (C.insertTextRules = 1), e.preselect != null && (C.preselect = e.preselect), e.sortText != null && (C.sortText = e.sortText), e.tags && (C.tags = e.tags.map(Tn)), C;
2711
+ return e.additionalTextEdits && (R.additionalTextEdits = e.additionalTextEdits.map(Zn)), e.command && (R.command = Jn(e.command)), h && (R.commitCharacters = h), e.detail != null && (R.detail = e.detail), typeof e.documentation == "string" ? R.documentation = e.documentation : e.documentation && (R.documentation = Wt(e.documentation)), e.filterText != null && (R.filterText = e.filterText), k === 2 ? R.insertTextRules = 4 : j === 2 && (R.insertTextRules = 1), e.preselect != null && (R.preselect = e.preselect), e.sortText != null && (R.sortText = e.sortText), e.tags && (R.tags = e.tags.map(Xn)), R;
2181
2712
  }
2182
- function An(e, t) {
2713
+ function to(e, t) {
2183
2714
  return {
2184
2715
  incomplete: !!e.isIncomplete,
2185
- suggestions: e.items.map((n) => Mn(n, { range: t.range, itemDefaults: e.itemDefaults }))
2716
+ suggestions: e.items.map((r) => eo(r, { range: t.range, itemDefaults: e.itemDefaults }))
2186
2717
  };
2187
2718
  }
2188
- function Nn(e) {
2719
+ function ro(e) {
2189
2720
  return e === 1 ? 0 : e === 2 ? 1 : e === 3 ? 2 : e === 4 ? 3 : e === 5 ? 4 : e === 6 ? 5 : e === 7 ? 6 : e === 8 ? 7 : e === 9 ? 8 : e === 10 ? 9 : e === 11 ? 10 : e === 12 ? 11 : e === 13 ? 12 : e === 14 ? 13 : e === 15 ? 14 : e === 16 ? 15 : e === 17 ? 16 : e === 18 ? 17 : e === 19 ? 18 : e === 20 ? 19 : e === 21 ? 20 : e === 22 ? 21 : e === 23 ? 22 : e === 24 ? 23 : e === 25 ? 24 : 25;
2190
2721
  }
2191
- function On(e) {
2722
+ function no(e) {
2192
2723
  return e;
2193
2724
  }
2194
- function At(e) {
2195
- var t, n, r;
2725
+ function Ht(e) {
2726
+ var t, r, n;
2196
2727
  const c = {
2197
2728
  detail: (t = e.detail) !== null && t !== void 0 ? t : "",
2198
- kind: Nn(e.kind),
2729
+ kind: ro(e.kind),
2199
2730
  name: e.name,
2200
- range: K(e.range),
2201
- selectionRange: K(e.selectionRange),
2202
- tags: (r = (n = e.tags) === null || n === void 0 ? void 0 : n.map(On)) !== null && r !== void 0 ? r : []
2731
+ range: ee(e.range),
2732
+ selectionRange: ee(e.selectionRange),
2733
+ tags: (n = (r = e.tags) === null || r === void 0 ? void 0 : r.map(no)) !== null && n !== void 0 ? n : []
2203
2734
  };
2204
- return e.children && (c.children = e.children.map(At)), c;
2735
+ return e.children && (c.children = e.children.map(Ht)), c;
2205
2736
  }
2206
- function Pn(e) {
2737
+ function oo(e) {
2207
2738
  const t = {
2208
2739
  start: e.startLine + 1,
2209
2740
  end: e.endLine + 1
2210
2741
  };
2211
2742
  return e.kind != null && (t.kind = { value: e.kind }), t;
2212
2743
  }
2213
- function Ln(e) {
2744
+ function io(e) {
2214
2745
  return {
2215
2746
  insertSpaces: e.insertSpaces,
2216
2747
  tabSize: e.tabSize
2217
2748
  };
2218
2749
  }
2219
- function mt(e) {
2750
+ function _t(e) {
2220
2751
  return typeof e == "string" ? { value: e } : { value: `\`\`\`${e.language}
2221
2752
  ${e.value}
2222
2753
  \`\`\`` };
2223
2754
  }
2224
- function Dn(e) {
2225
- return typeof e == "string" || "language" in e ? [mt(e)] : Array.isArray(e) ? e.map(mt) : [Mt(e)];
2755
+ function so(e) {
2756
+ return typeof e == "string" || "language" in e ? [_t(e)] : Array.isArray(e) ? e.map(_t) : [Wt(e)];
2226
2757
  }
2227
- function $n(e) {
2758
+ function ao(e) {
2228
2759
  const t = {
2229
- contents: Dn(e.contents)
2760
+ contents: so(e.contents)
2230
2761
  };
2231
- return e.range && (t.range = K(e.range)), t;
2762
+ return e.range && (t.range = ee(e.range)), t;
2232
2763
  }
2233
- function Ce(e) {
2764
+ function Te(e) {
2234
2765
  return { character: e.column - 1, line: e.lineNumber - 1 };
2235
2766
  }
2236
- function In(e) {
2767
+ function co(e) {
2237
2768
  const t = {
2238
- range: K(e.range)
2769
+ range: ee(e.range)
2239
2770
  };
2240
- return e.tooltip != null && (t.tooltip = e.tooltip), e.target != null && (t.url = he.parse(e.target)), t;
2771
+ return e.tooltip != null && (t.tooltip = e.tooltip), e.target != null && (t.url = ge.parse(e.target)), t;
2241
2772
  }
2242
- function Wn(e) {
2773
+ function lo(e) {
2243
2774
  const t = {
2244
- range: K(e.targetRange),
2245
- targetSelectionRange: K(e.targetSelectionRange),
2246
- uri: he.parse(e.targetUri)
2775
+ range: ee(e.targetRange),
2776
+ targetSelectionRange: ee(e.targetSelectionRange),
2777
+ uri: ge.parse(e.targetUri)
2247
2778
  };
2248
- return e.originSelectionRange && (t.originSelectionRange = K(e.originSelectionRange)), t;
2779
+ return e.originSelectionRange && (t.originSelectionRange = ee(e.originSelectionRange)), t;
2249
2780
  }
2250
- function Bn(e) {
2781
+ function uo(e) {
2251
2782
  const t = [];
2252
- let n = e;
2253
- for (; n; )
2783
+ let r = e;
2784
+ for (; r; )
2254
2785
  t.push({
2255
- range: K(n.range)
2256
- }), n = n.parent;
2786
+ range: ee(r.range)
2787
+ }), r = r.parent;
2257
2788
  return t;
2258
2789
  }
2259
- function zn(e, t, n) {
2260
- const r = /* @__PURE__ */ new Map(), c = (h) => Array.isArray(t) ? t.includes(h) : t === h, l = async (h) => {
2261
- const S = h.getVersionId(), C = await n.provideMarkerData(h);
2262
- !h.isDisposed() && S === h.getVersionId() && c(h.getLanguageId()) && e.editor.setModelMarkers(h, n.owner, C ?? []);
2263
- }, f = (h) => {
2264
- if (!c(h.getLanguageId()))
2790
+ function fo(e, t, r) {
2791
+ const n = /* @__PURE__ */ new Map(), c = (m) => Array.isArray(t) ? t.includes(m) : t === m, i = async (m) => {
2792
+ const T = m.getVersionId(), R = await r.provideMarkerData(m);
2793
+ !m.isDisposed() && T === m.getVersionId() && c(m.getLanguageId()) && e.editor.setModelMarkers(m, r.owner, R ?? []);
2794
+ }, l = (m) => {
2795
+ if (!c(m.getLanguageId()))
2265
2796
  return;
2266
- let S;
2267
- const C = h.onDidChangeContent(() => {
2268
- clearTimeout(S), S = setTimeout(() => {
2269
- l(h);
2797
+ let T;
2798
+ const R = m.onDidChangeContent(() => {
2799
+ clearTimeout(T), T = setTimeout(() => {
2800
+ i(m);
2270
2801
  }, 500);
2271
2802
  });
2272
- r.set(h, {
2803
+ n.set(m, {
2273
2804
  dispose() {
2274
- clearTimeout(S), C.dispose();
2805
+ clearTimeout(T), R.dispose();
2275
2806
  }
2276
- }), l(h);
2277
- }, a = (h) => {
2278
- e.editor.setModelMarkers(h, n.owner, []);
2279
- const S = r.get(h);
2280
- S && (S.dispose(), r.delete(h));
2807
+ }), i(m);
2808
+ }, d = (m) => {
2809
+ e.editor.setModelMarkers(m, r.owner, []);
2810
+ const T = n.get(m);
2811
+ T && (T.dispose(), n.delete(m));
2281
2812
  };
2282
- function v(h, S = h.getLanguageId()) {
2283
- n.doReset && c(S) && n.doReset(h);
2813
+ function y(m, T = m.getLanguageId()) {
2814
+ r.doReset && c(T) && r.doReset(m);
2284
2815
  }
2285
- const g = e.editor.onDidCreateModel(f), x = e.editor.onWillDisposeModel((h) => {
2286
- a(h), v(h);
2287
- }), A = e.editor.onDidChangeModelLanguage(({ model: h, oldLanguage: S }) => {
2288
- a(h), f(h), v(h, S);
2816
+ const h = e.editor.onDidCreateModel(l), k = e.editor.onWillDisposeModel((m) => {
2817
+ d(m), y(m);
2818
+ }), j = e.editor.onDidChangeModelLanguage(({ model: m, oldLanguage: T }) => {
2819
+ d(m), l(m), y(m, T);
2289
2820
  });
2290
- for (const h of e.editor.getModels())
2291
- f(h);
2821
+ for (const m of e.editor.getModels())
2822
+ l(m);
2292
2823
  return {
2293
2824
  dispose() {
2294
- for (const h of r.keys())
2295
- a(h);
2296
- g.dispose(), x.dispose(), A.dispose();
2825
+ for (const m of n.keys())
2826
+ d(m);
2827
+ h.dispose(), k.dispose(), j.dispose();
2297
2828
  },
2298
2829
  async revalidate() {
2299
- await Promise.all(e.editor.getModels().map(l));
2830
+ await Promise.all(e.editor.getModels().map(i));
2300
2831
  }
2301
2832
  };
2302
2833
  }
2303
- function Hn(e, t) {
2304
- let { createData: n, interval: r = 3e4, label: c, moduleId: l, stopWhenIdleFor: f = 12e4 } = t, a, v = 0, g = !1;
2305
- const x = () => {
2306
- a && (a.dispose(), a = void 0);
2307
- }, A = setInterval(() => {
2308
- if (!a)
2834
+ function go(e, t) {
2835
+ let { createData: r, interval: n = 3e4, label: c, moduleId: i, stopWhenIdleFor: l = 12e4 } = t, d, y = 0, h = !1;
2836
+ const k = () => {
2837
+ d && (d.dispose(), d = void 0);
2838
+ }, j = setInterval(() => {
2839
+ if (!d)
2309
2840
  return;
2310
- Date.now() - v > f && x();
2311
- }, r);
2841
+ Date.now() - y > l && k();
2842
+ }, n);
2312
2843
  return {
2313
2844
  dispose() {
2314
- g = !0, clearInterval(A), x();
2845
+ h = !0, clearInterval(j), k();
2315
2846
  },
2316
- getWorker(...h) {
2317
- if (g)
2847
+ getWorker(...m) {
2848
+ if (h)
2318
2849
  throw new Error("Worker manager has been disposed");
2319
- return v = Date.now(), a || (a = e.editor.createWebWorker({
2320
- createData: n,
2850
+ return y = Date.now(), d || (d = e.editor.createWebWorker({
2851
+ createData: r,
2321
2852
  label: c,
2322
- moduleId: l
2323
- })), a.withSyncedResources(h);
2853
+ moduleId: i
2854
+ })), d.withSyncedResources(m);
2324
2855
  },
2325
- updateCreateData(h) {
2326
- n = h, x();
2856
+ updateCreateData(m) {
2857
+ r = m, k();
2327
2858
  }
2328
2859
  };
2329
2860
  }
2330
- function Un(e, t) {
2331
- const n = {
2861
+ function mo(e, t) {
2862
+ const r = {
2332
2863
  completion: !0,
2333
2864
  customTags: [],
2334
2865
  enableSchemaRequest: !1,
@@ -2346,93 +2877,93 @@ function Un(e, t) {
2346
2877
  aliases: ["YAML", "yaml", "YML", "yml"],
2347
2878
  mimetypes: ["application/x-yaml"]
2348
2879
  });
2349
- const r = Hn(e, {
2880
+ const n = go(e, {
2350
2881
  label: "yaml",
2351
2882
  moduleId: "monaco-yaml/yaml.worker",
2352
- createData: n
2353
- }), c = /* @__PURE__ */ new WeakMap(), l = zn(e, "yaml", {
2883
+ createData: r
2884
+ }), c = /* @__PURE__ */ new WeakMap(), i = fo(e, "yaml", {
2354
2885
  owner: "yaml",
2355
- async provideMarkerData(a) {
2356
- const g = await (await r.getWorker(a.uri)).doValidation(String(a.uri));
2357
- return c.set(a, g), g?.map(jt);
2886
+ async provideMarkerData(d) {
2887
+ const h = await (await n.getWorker(d.uri)).doValidation(String(d.uri));
2888
+ return c.set(d, h), h?.map(It);
2358
2889
  },
2359
- async doReset(a) {
2360
- await (await r.getWorker(a.uri)).resetSchema(String(a.uri));
2890
+ async doReset(d) {
2891
+ await (await n.getWorker(d.uri)).resetSchema(String(d.uri));
2361
2892
  }
2362
- }), f = [
2363
- r,
2364
- l,
2893
+ }), l = [
2894
+ n,
2895
+ i,
2365
2896
  e.languages.registerCompletionItemProvider("yaml", {
2366
2897
  triggerCharacters: [" ", ":"],
2367
- async provideCompletionItems(a, v) {
2368
- const g = a.getWordUntilPosition(v), A = await (await r.getWorker(a.uri)).doComplete(String(a.uri), Ce(v));
2369
- if (A)
2370
- return An(A, {
2898
+ async provideCompletionItems(d, y) {
2899
+ const h = d.getWordUntilPosition(y), j = await (await n.getWorker(d.uri)).doComplete(String(d.uri), Te(y));
2900
+ if (j)
2901
+ return to(j, {
2371
2902
  range: {
2372
- startLineNumber: v.lineNumber,
2373
- startColumn: g.startColumn,
2374
- endLineNumber: v.lineNumber,
2375
- endColumn: g.endColumn
2903
+ startLineNumber: y.lineNumber,
2904
+ startColumn: h.startColumn,
2905
+ endLineNumber: y.lineNumber,
2906
+ endColumn: h.endColumn
2376
2907
  }
2377
2908
  });
2378
2909
  }
2379
2910
  }),
2380
2911
  e.languages.registerHoverProvider("yaml", {
2381
- async provideHover(a, v) {
2382
- const x = await (await r.getWorker(a.uri)).doHover(String(a.uri), Ce(v));
2383
- if (x)
2384
- return $n(x);
2912
+ async provideHover(d, y) {
2913
+ const k = await (await n.getWorker(d.uri)).doHover(String(d.uri), Te(y));
2914
+ if (k)
2915
+ return ao(k);
2385
2916
  }
2386
2917
  }),
2387
2918
  e.languages.registerDefinitionProvider("yaml", {
2388
- async provideDefinition(a, v) {
2389
- const x = await (await r.getWorker(a.uri)).doDefinition(String(a.uri), Ce(v));
2390
- return x?.map(Wn);
2919
+ async provideDefinition(d, y) {
2920
+ const k = await (await n.getWorker(d.uri)).doDefinition(String(d.uri), Te(y));
2921
+ return k?.map(lo);
2391
2922
  }
2392
2923
  }),
2393
2924
  e.languages.registerDocumentSymbolProvider("yaml", {
2394
2925
  displayName: "yaml",
2395
- async provideDocumentSymbols(a) {
2396
- const g = await (await r.getWorker(a.uri)).findDocumentSymbols(String(a.uri));
2397
- return g?.map(At);
2926
+ async provideDocumentSymbols(d) {
2927
+ const h = await (await n.getWorker(d.uri)).findDocumentSymbols(String(d.uri));
2928
+ return h?.map(Ht);
2398
2929
  }
2399
2930
  }),
2400
2931
  e.languages.registerDocumentFormattingEditProvider("yaml", {
2401
2932
  displayName: "yaml",
2402
- async provideDocumentFormattingEdits(a) {
2403
- const g = await (await r.getWorker(a.uri)).format(String(a.uri));
2404
- return g?.map(Je);
2933
+ async provideDocumentFormattingEdits(d) {
2934
+ const h = await (await n.getWorker(d.uri)).format(String(d.uri));
2935
+ return h?.map(Qe);
2405
2936
  }
2406
2937
  }),
2407
2938
  e.languages.registerLinkProvider("yaml", {
2408
- async provideLinks(a) {
2409
- const g = await (await r.getWorker(a.uri)).findLinks(String(a.uri));
2410
- if (g)
2939
+ async provideLinks(d) {
2940
+ const h = await (await n.getWorker(d.uri)).findLinks(String(d.uri));
2941
+ if (h)
2411
2942
  return {
2412
- links: g.map(In)
2943
+ links: h.map(co)
2413
2944
  };
2414
2945
  }
2415
2946
  }),
2416
2947
  e.languages.registerCodeActionProvider("yaml", {
2417
- async provideCodeActions(a, v, g) {
2418
- var x;
2419
- const h = await (await r.getWorker(a.uri)).getCodeAction(String(a.uri), bn(v), {
2420
- diagnostics: ((x = c.get(a)) == null ? void 0 : x.filter((S) => v.intersectRanges(K(S.range)))) || [],
2421
- only: g.only ? [g.only] : void 0,
2422
- triggerKind: g.trigger
2948
+ async provideCodeActions(d, y, h) {
2949
+ var k;
2950
+ const m = await (await n.getWorker(d.uri)).getCodeAction(String(d.uri), zn(y), {
2951
+ diagnostics: ((k = c.get(d)) == null ? void 0 : k.filter((T) => y.intersectRanges(ee(T.range)))) || [],
2952
+ only: h.only ? [h.only] : void 0,
2953
+ triggerKind: h.trigger
2423
2954
  });
2424
- if (h)
2955
+ if (m)
2425
2956
  return {
2426
- actions: h.map(Cn),
2957
+ actions: m.map(Gn),
2427
2958
  dispose() {
2428
2959
  }
2429
2960
  };
2430
2961
  }
2431
2962
  }),
2432
2963
  e.languages.registerFoldingRangeProvider("yaml", {
2433
- async provideFoldingRanges(a) {
2434
- const g = await (await r.getWorker(a.uri)).getFoldingRanges(String(a.uri));
2435
- return g?.map(Pn);
2964
+ async provideFoldingRanges(d) {
2965
+ const h = await (await n.getWorker(d.uri)).getFoldingRanges(String(d.uri));
2966
+ return h?.map(oo);
2436
2967
  }
2437
2968
  }),
2438
2969
  e.languages.setLanguageConfiguration("yaml", {
@@ -2462,145 +2993,146 @@ function Un(e, t) {
2462
2993
  e.languages.registerOnTypeFormattingEditProvider("yaml", {
2463
2994
  autoFormatTriggerCharacters: [`
2464
2995
  `],
2465
- async provideOnTypeFormattingEdits(a, v, g, x) {
2466
- const h = await (await r.getWorker(a.uri)).doDocumentOnTypeFormatting(
2467
- String(a.uri),
2468
- Ce(v),
2469
- g,
2470
- Ln(x)
2996
+ async provideOnTypeFormattingEdits(d, y, h, k) {
2997
+ const m = await (await n.getWorker(d.uri)).doDocumentOnTypeFormatting(
2998
+ String(d.uri),
2999
+ Te(y),
3000
+ h,
3001
+ io(k)
2471
3002
  );
2472
- return h?.map(Je);
3003
+ return m?.map(Qe);
2473
3004
  }
2474
3005
  }),
2475
3006
  e.languages.registerSelectionRangeProvider("yaml", {
2476
- async provideSelectionRanges(a, v) {
2477
- const x = await (await r.getWorker(a.uri)).getSelectionRanges(
2478
- String(a.uri),
2479
- v.map(Ce)
3007
+ async provideSelectionRanges(d, y) {
3008
+ const k = await (await n.getWorker(d.uri)).getSelectionRanges(
3009
+ String(d.uri),
3010
+ y.map(Te)
2480
3011
  );
2481
- return x?.map(Bn);
3012
+ return k?.map(uo);
2482
3013
  }
2483
3014
  })
2484
3015
  ];
2485
3016
  return {
2486
3017
  dispose() {
2487
- for (const a of f)
2488
- a.dispose();
3018
+ for (const d of l)
3019
+ d.dispose();
2489
3020
  },
2490
- async update(a) {
2491
- r.updateCreateData(Object.assign(n, a)), await l.revalidate();
3021
+ async update(d) {
3022
+ n.updateCreateData(Object.assign(r, d)), await i.revalidate();
2492
3023
  },
2493
3024
  getOptions() {
2494
- return n;
3025
+ return r;
2495
3026
  }
2496
3027
  };
2497
3028
  }
2498
- function Vn(e) {
3029
+ function ho(e) {
2499
3030
  return new Worker("/assets/editor.worker-CpuX8TSY.js", {
2500
3031
  name: e?.name
2501
3032
  });
2502
3033
  }
2503
- function Fn(e) {
3034
+ function po(e) {
2504
3035
  return new Worker("/assets/json.worker-B4VHhH6h.js", {
2505
3036
  name: e?.name
2506
3037
  });
2507
3038
  }
2508
- function Yn(e) {
3039
+ function yo(e) {
2509
3040
  return new Worker("/assets/ts.worker-sl17zBDo.js", {
2510
3041
  name: e?.name
2511
3042
  });
2512
3043
  }
2513
- function qn(e) {
3044
+ function vo(e) {
2514
3045
  return new Worker("/assets/css.worker-Dmf38jDD.js", {
2515
3046
  name: e?.name
2516
3047
  });
2517
3048
  }
2518
- function Jn(e) {
3049
+ function bo(e) {
2519
3050
  return new Worker("/assets/html.worker-DotaEs7v.js", {
2520
3051
  name: e?.name
2521
3052
  });
2522
3053
  }
2523
- function Gn(e) {
3054
+ function wo(e) {
2524
3055
  return new Worker("/assets/yaml.worker-JJoHBMla.js", {
2525
3056
  name: e?.name
2526
3057
  });
2527
3058
  }
2528
- function je(...e) {
3059
+ function Le(...e) {
2529
3060
  }
2530
- function Xn(...e) {
3061
+ function _o(...e) {
2531
3062
  }
2532
- const gt = "__omniview_monaco_setup__";
2533
- if (!globalThis[gt]) {
2534
- globalThis[gt] = !0;
3063
+ const Ct = "__omniview_monaco_setup__";
3064
+ if (!globalThis[Ct]) {
3065
+ globalThis[Ct] = !0;
2535
3066
  const e = self.MonacoEnvironment ?? {};
2536
3067
  self.MonacoEnvironment = {
2537
3068
  ...e,
2538
- getWorker(t, n) {
2539
- let r;
3069
+ getWorker(t, r) {
3070
+ let n;
2540
3071
  try {
2541
- switch (n) {
3072
+ switch (r) {
2542
3073
  case "yaml":
2543
- r = new Gn();
3074
+ n = new wo();
2544
3075
  break;
2545
3076
  case "json":
2546
- r = new Fn();
3077
+ n = new po();
2547
3078
  break;
2548
3079
  case "typescript":
2549
3080
  case "javascript":
2550
- r = new Yn();
3081
+ n = new yo();
2551
3082
  break;
2552
3083
  case "css":
2553
3084
  case "scss":
2554
3085
  case "less":
2555
- r = new qn();
3086
+ n = new vo();
2556
3087
  break;
2557
3088
  case "html":
2558
3089
  case "handlebars":
2559
3090
  case "razor":
2560
- r = new Jn();
3091
+ n = new bo();
2561
3092
  break;
2562
3093
  default:
2563
- r = new Vn();
3094
+ n = new ho();
2564
3095
  break;
2565
3096
  }
2566
- je(`Worker created for "${n}" — instanceof Worker: ${r instanceof Worker}`);
3097
+ Le(`Worker created for "${r}" — instanceof Worker: ${n instanceof Worker}`);
2567
3098
  } catch (c) {
2568
3099
  throw c;
2569
3100
  }
2570
- return r.onerror = (c) => {
2571
- Xn(`Worker "${n}" error:`, c.message, "| filename:", c.filename);
2572
- }, r.addEventListener("message", (c) => {
2573
- je(`Worker "${n}" first message:`, JSON.stringify(c.data).slice(0, 200));
3101
+ return n.onerror = (c) => {
3102
+ _o(`Worker "${r}" error:`, c.message, "| filename:", c.filename);
3103
+ }, n.addEventListener("message", (c) => {
3104
+ Le(`Worker "${r}" first message:`, JSON.stringify(c.data).slice(0, 200));
2574
3105
  }, {
2575
3106
  once: !0
2576
- }), r;
3107
+ }), n;
2577
3108
  }
2578
3109
  };
2579
3110
  try {
2580
- const t = Un(L, {
3111
+ const t = mo(W, {
2581
3112
  enableSchemaRequest: !1,
2582
3113
  schemas: []
2583
3114
  });
2584
- je("configureMonacoYaml succeeded — handle keys:", Object.keys(t)), de._setYamlHandle(t), je("YAML handle injected into EditorSchemaRegistry");
3115
+ Le("configureMonacoYaml succeeded — handle keys:", Object.keys(t)), fe._setYamlHandle(t), Le("YAML handle injected into EditorSchemaRegistry");
2585
3116
  } catch (t) {
2586
3117
  console.error("[monaco-setup] configureMonacoYaml FAILED:", t);
2587
3118
  }
2588
3119
  }
2589
- function io() {
3120
+ function No() {
2590
3121
  }
2591
3122
  export {
2592
- gr as CodeEditor,
2593
- Br as CommandPalette,
2594
- br as DiffViewer,
2595
- Nr as MarkdownPreview,
2596
- ge as OV_MONACO_THEME,
2597
- mn as ObjectInspector,
2598
- Cr as Terminal,
2599
- Ae as buildMonacoTheme,
2600
- Ve as buildXtermTheme,
2601
- de as editorSchemas,
2602
- no as getComputedToken,
2603
- io as setupMonacoWorkers,
2604
- Qe as useEditorTheme
3123
+ Mo as CelQueryEditor,
3124
+ Mt as CodeEditor,
3125
+ rn as CommandPalette,
3126
+ Nr as DiffViewer,
3127
+ Vr as MarkdownPreview,
3128
+ pe as OV_MONACO_THEME,
3129
+ kn as ObjectInspector,
3130
+ Dr as Terminal,
3131
+ $e as buildMonacoTheme,
3132
+ Je as buildXtermTheme,
3133
+ fe as editorSchemas,
3134
+ To as getComputedToken,
3135
+ No as setupMonacoWorkers,
3136
+ rt as useEditorTheme
2605
3137
  };
2606
3138
  //# sourceMappingURL=index.js.map