@omniviewdev/editors 3.0.3 → 4.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,52 +1,52 @@
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 Qe, { forwardRef as ve, useRef as Y, useState as Pe, useMemo as Ae, useEffect as V, useImperativeHandle as vt, useCallback as Ne, Suspense as $t, lazy as It, Children as Wt, isValidElement as Bt, useId as Ht, useLayoutEffect as bt, useSyncExternalStore as Ut } from "react";
2
+ import * as $ from "monaco-editor";
3
+ import { useTheme as zt, Checkbox as He, Separator as Ft, Blockquote as Vt, Link as Yt, Table as ye, CodeBlock as qt, Code as Jt, Accordion as nt, CommandList as ue, useCommandListConfig as Gt, useCommandListStoreContext as Xt } from "@omniviewdev/base-ui";
4
+ import Qt from "remark-gfm";
5
+ import Zt from "rehype-raw";
6
+ import Kt, { defaultSchema as Ue } 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 Ee = { exports: {} }, ke = {};
9
+ var ot;
10
+ function er() {
11
+ if (ot) return ke;
12
+ ot = 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 = {};
14
+ function r(n, c, u) {
15
+ var l = null;
16
+ if (u !== void 0 && (l = "" + u), c.key !== void 0 && (l = "" + c.key), "key" in c) {
17
+ u = {};
18
18
  for (var a in c)
19
- a !== "key" && (l[a] = c[a]);
20
- } else l = c;
21
- return c = l.ref, {
19
+ a !== "key" && (u[a] = c[a]);
20
+ } else u = c;
21
+ return c = u.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: u
27
27
  };
28
28
  }
29
- return ke.Fragment = t, ke.jsx = n, ke.jsxs = n, ke;
29
+ return ke.Fragment = t, ke.jsx = r, ke.jsxs = r, ke;
30
30
  }
31
31
  var xe = {};
32
- var nt;
33
- function Qt() {
34
- return nt || (nt = 1, process.env.NODE_ENV !== "production" && (function() {
32
+ var it;
33
+ function tr() {
34
+ return it || (it = 1, process.env.NODE_ENV !== "production" && (function() {
35
35
  function e(o) {
36
36
  if (o == null) return null;
37
37
  if (typeof o == "function")
38
- return o.$$typeof === y ? null : o.displayName || o.name || null;
38
+ return o.$$typeof === v ? null : o.displayName || o.name || null;
39
39
  if (typeof o == "string") return o;
40
40
  switch (o) {
41
- case j:
41
+ case N:
42
42
  return "Fragment";
43
- case H:
43
+ case C:
44
44
  return "Profiler";
45
- case W:
45
+ case q:
46
46
  return "StrictMode";
47
- case D:
47
+ case P:
48
48
  return "Suspense";
49
- case V:
49
+ case F:
50
50
  return "SuspenseList";
51
51
  case ne:
52
52
  return "Activity";
@@ -55,21 +55,21 @@ function Qt() {
55
55
  switch (typeof o.tag == "number" && console.error(
56
56
  "Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
57
57
  ), o.$$typeof) {
58
- case I:
58
+ case H:
59
59
  return "Portal";
60
- case J:
60
+ case W:
61
61
  return o.displayName || "Context";
62
- case q:
62
+ case I:
63
63
  return (o._context.displayName || "Context") + ".Consumer";
64
64
  case U:
65
- var _ = o.render;
66
- return o = o.displayName, o || (o = _.displayName || _.name || "", o = o !== "" ? "ForwardRef(" + o + ")" : "ForwardRef"), o;
67
- case P:
68
- return _ = o.displayName || null, _ !== null ? _ : e(o.type) || "Memo";
65
+ var w = o.render;
66
+ return o = o.displayName, o || (o = w.displayName || w.name || "", o = o !== "" ? "ForwardRef(" + o + ")" : "ForwardRef"), o;
67
+ case D:
68
+ return w = o.displayName || null, w !== null ? w : e(o.type) || "Memo";
69
69
  case X:
70
- _ = o._payload, o = o._init;
70
+ w = o._payload, o = o._init;
71
71
  try {
72
- return e(o(_));
72
+ return e(o(w));
73
73
  } catch {
74
74
  }
75
75
  }
@@ -78,30 +78,30 @@ function Qt() {
78
78
  function t(o) {
79
79
  return "" + o;
80
80
  }
81
- function n(o) {
81
+ function r(o) {
82
82
  try {
83
83
  t(o);
84
- var _ = !1;
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, j = typeof Symbol == "function" && Symbol.toStringTag && o[Symbol.toStringTag] || o.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
94
+ j
95
95
  ), t(o);
96
96
  }
97
97
  }
98
- function r(o) {
99
- if (o === j) return "<>";
98
+ function n(o) {
99
+ if (o === N) return "<>";
100
100
  if (typeof o == "object" && o !== null && o.$$typeof === X)
101
101
  return "<...>";
102
102
  try {
103
- var _ = e(o);
104
- return _ ? "<" + _ + ">" : "<...>";
103
+ var w = e(o);
104
+ return w ? "<" + w + ">" : "<...>";
105
105
  } catch {
106
106
  return "<...>";
107
107
  }
@@ -110,45 +110,45 @@ function Qt() {
110
110
  var o = s.A;
111
111
  return o === null ? null : o.getOwner();
112
112
  }
113
- function l() {
113
+ function u() {
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(o) {
117
+ if (_.call(o, "key")) {
118
+ var w = Object.getOwnPropertyDescriptor(o, "key").get;
119
+ if (w && w.isReactWarning) return !1;
120
120
  }
121
121
  return o.key !== void 0;
122
122
  }
123
- function a(o, _) {
124
- function M() {
125
- u || (u = !0, console.error(
123
+ function a(o, w) {
124
+ function A() {
125
+ d || (d = !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(o, "key", {
131
+ get: A,
132
132
  configurable: !0
133
133
  });
134
134
  }
135
- function v() {
135
+ function p() {
136
136
  var o = e(this.type);
137
- return m[o] || (m[o] = !0, console.error(
137
+ return h[o] || (h[o] = !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
139
  )), o = this.props.ref, o !== void 0 ? o : null;
140
140
  }
141
- function g(o, _, M, E, $, N) {
142
- var O = M.ref;
141
+ function g(o, w, A, j, B, O) {
142
+ var L = A.ref;
143
143
  return o = {
144
- $$typeof: C,
144
+ $$typeof: R,
145
145
  type: o,
146
- key: _,
147
- props: M,
148
- _owner: E
149
- }, (O !== void 0 ? O : null) !== null ? Object.defineProperty(o, "ref", {
146
+ key: w,
147
+ props: A,
148
+ _owner: j
149
+ }, (L !== void 0 ? L : null) !== null ? Object.defineProperty(o, "ref", {
150
150
  enumerable: !1,
151
- get: v
151
+ get: p
152
152
  }) : Object.defineProperty(o, "ref", { enumerable: !1, value: null }), o._store = {}, Object.defineProperty(o._store, "validated", {
153
153
  configurable: !1,
154
154
  enumerable: !1,
@@ -163,197 +163,197 @@ function Qt() {
163
163
  configurable: !1,
164
164
  enumerable: !1,
165
165
  writable: !0,
166
- value: $
166
+ value: B
167
167
  }), Object.defineProperty(o, "_debugTask", {
168
168
  configurable: !1,
169
169
  enumerable: !1,
170
170
  writable: !0,
171
- value: N
171
+ value: O
172
172
  }), Object.freeze && (Object.freeze(o.props), Object.freeze(o)), o;
173
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);
174
+ function x(o, w, A, j, B, O) {
175
+ var L = w.children;
176
+ if (L !== void 0)
177
+ if (j)
178
+ if (k(L)) {
179
+ for (j = 0; j < L.length; j++)
180
+ M(L[j]);
181
+ Object.freeze && Object.freeze(L);
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 M(L);
187
+ if (_.call(w, "key")) {
188
+ L = e(o);
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
+ j = 0 < J.length ? "{key: someKey, " + J.join(": ..., ") + ": ...}" : "{key: someKey}", b[L + j] || (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
+ j,
200
+ L,
201
+ J,
202
+ L
203
+ ), b[L + j] = !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,
205
+ if (L = null, A !== void 0 && (r(A), L = "" + A), l(w) && (r(w.key), L = "" + w.key), "key" in w) {
206
+ A = {};
207
+ for (var Q in w)
208
+ Q !== "key" && (A[Q] = w[Q]);
209
+ } else A = w;
210
+ return L && a(
211
+ A,
212
212
  typeof o == "function" ? o.displayName || o.name || "Unknown" : o
213
213
  ), g(
214
214
  o,
215
- O,
216
- M,
215
+ L,
216
+ A,
217
217
  c(),
218
- $,
219
- N
218
+ B,
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 M(o) {
223
+ m(o) ? o._store && (o._store.validated = 1) : typeof o == "object" && o !== null && o.$$typeof === X && (o._payload.status === "fulfilled" ? m(o._payload.value) && o._payload.value._store && (o._payload.value._store.validated = 1) : o._store && (o._store.validated = 1));
224
224
  }
225
- function h(o) {
226
- return typeof o == "object" && o !== null && o.$$typeof === C;
225
+ function m(o) {
226
+ return typeof o == "object" && o !== null && o.$$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 = Qe, R = /* @__PURE__ */ Symbol.for("react.transitional.element"), H = /* @__PURE__ */ Symbol.for("react.portal"), N = /* @__PURE__ */ Symbol.for("react.fragment"), q = /* @__PURE__ */ Symbol.for("react.strict_mode"), C = /* @__PURE__ */ Symbol.for("react.profiler"), I = /* @__PURE__ */ Symbol.for("react.consumer"), W = /* @__PURE__ */ Symbol.for("react.context"), U = /* @__PURE__ */ Symbol.for("react.forward_ref"), P = /* @__PURE__ */ Symbol.for("react.suspense"), F = /* @__PURE__ */ Symbol.for("react.suspense_list"), D = /* @__PURE__ */ Symbol.for("react.memo"), X = /* @__PURE__ */ Symbol.for("react.lazy"), ne = /* @__PURE__ */ Symbol.for("react.activity"), v = /* @__PURE__ */ Symbol.for("react.client.reference"), s = T.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, _ = Object.prototype.hasOwnProperty, k = Array.isArray, i = console.createTask ? console.createTask : function() {
229
229
  return null;
230
230
  };
231
- S = {
231
+ T = {
232
232
  react_stack_bottom_frame: function(o) {
233
233
  return o();
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++;
236
+ var d, h = {}, f = T.react_stack_bottom_frame.bind(
237
+ T,
238
+ u
239
+ )(), y = i(n(u)), b = {};
240
+ xe.Fragment = N, xe.jsx = function(o, w, A) {
241
+ var j = 1e4 > s.recentlyCreatedOwnerStacks++;
242
242
  return x(
243
243
  o,
244
- _,
245
- M,
244
+ w,
245
+ A,
246
246
  !1,
247
- E ? Error("react-stack-top-frame") : d,
248
- E ? i(r(o)) : p
247
+ j ? Error("react-stack-top-frame") : f,
248
+ j ? i(n(o)) : y
249
249
  );
250
- }, xe.jsxs = function(o, _, M) {
251
- var E = 1e4 > s.recentlyCreatedOwnerStacks++;
250
+ }, xe.jsxs = function(o, w, A) {
251
+ var j = 1e4 > s.recentlyCreatedOwnerStacks++;
252
252
  return x(
253
253
  o,
254
- _,
255
- M,
254
+ w,
255
+ A,
256
256
  !0,
257
- E ? Error("react-stack-top-frame") : d,
258
- E ? i(r(o)) : p
257
+ j ? Error("react-stack-top-frame") : f,
258
+ j ? i(n(o)) : y
259
259
  );
260
260
  };
261
261
  })()), xe;
262
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;
263
+ var st;
264
+ function rr() {
265
+ return st || (st = 1, process.env.NODE_ENV === "production" ? Ee.exports = er() : Ee.exports = tr()), Ee.exports;
266
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;
267
+ var S = rr(), Te = { exports: {} }, ze = {};
268
+ var at;
269
+ function nr() {
270
+ if (at) return ze;
271
+ at = 1;
272
+ var e = Qe.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
273
273
  return ze.c = function(t) {
274
274
  return e.H.useMemoCache(t);
275
275
  }, ze;
276
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(
277
+ var Fe = {};
278
+ var ct;
279
+ function or() {
280
+ return ct || (ct = 1, process.env.NODE_ENV !== "production" && (function() {
281
+ var e = Qe.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
282
+ Fe.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
+ })()), Fe;
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 lt;
295
+ function ir() {
296
+ return lt || (lt = 1, process.env.NODE_ENV === "production" ? Te.exports = nr() : Te.exports = or()), Te.exports;
297
297
  }
298
- var be = tr();
299
- function bt(e) {
298
+ var be = ir();
299
+ function wt(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 Ze(e) {
303
+ const t = wt(e);
304
304
  return t ? getComputedStyle(t) : null;
305
305
  }
306
- function no(e, t) {
307
- return Xe(t)?.getPropertyValue(e).trim() ?? "";
306
+ function io(e, t) {
307
+ return Ze(t)?.getPropertyValue(e).trim() ?? "";
308
308
  }
309
- function Qe() {
309
+ function Ke() {
310
310
  const e = be.c(2), {
311
311
  activeTheme: t
312
312
  } = zt();
313
- let n;
314
- return e[0] !== t ? (n = {
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 sr = /^#(?:[0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/i, ar = /^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 Ve(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 (sr.test(t)) return t;
327
+ const r = t.match(ar);
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 cr(e) {
333
333
  if (!e)
334
334
  return {
335
- normalize: Ue,
335
+ normalize: Ve,
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 = Ve(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 u = getComputedStyle(t).color, l = Ve(u);
348
+ if (l) return l;
349
+ if (!/^(?:color|lab|lch|oklab|oklch)\(/i.test(u)) 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 = u, r.fillStyle === "#010203")) return "";
354
+ r.fillRect(0, 0, 1, 1);
355
+ const a = r.getImageData(0, 0, 1, 1).data, p = `#${he(a[0])}${he(a[1])}${he(a[2])}`;
356
+ return a[3] === 255 ? p : `${p}${he(a[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 lr(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;
379
+ function ur(e, t, r, n, c, u) {
380
+ const l = n.normalize(r?.getPropertyValue(t).trim() ?? "");
381
+ if (!l) return null;
382
382
  const a = {
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 && (a.fontStyle = r?.getPropertyValue(c).trim() || u || ""), a;
387
387
  }
388
- function ar(e) {
388
+ function dr(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 Oe(e, t) {
395
+ const r = wt(t), n = Ze(r), c = cr(r), u = (a, p, g, x) => ur(a, p, n, c, g, x), l = (a) => c.normalize(n?.getPropertyValue(a).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 a = [u("comment", "--ov-syntax-comment", "--ov-syntax-style-comment", "italic"), u("string", "--ov-syntax-string"), u("string.escape", "--ov-syntax-string-escape"), u("number", "--ov-syntax-number"), u("keyword", "--ov-syntax-keyword", "--ov-syntax-style-keyword"), u("keyword.control", "--ov-syntax-keyword-control"), u("keyword.operator", "--ov-syntax-keyword-operator"), u("type", "--ov-syntax-type", "--ov-syntax-style-type"), u("type.identifier", "--ov-syntax-type"), u("class", "--ov-syntax-class"), u("interface", "--ov-syntax-interface"), u("function", "--ov-syntax-function", "--ov-syntax-style-function"), u("function.declaration", "--ov-syntax-function"), u("method", "--ov-syntax-method"), u("variable", "--ov-syntax-variable"), u("parameter", "--ov-syntax-parameter"), u("property", "--ov-syntax-property"), u("namespace", "--ov-syntax-namespace"), u("decorator", "--ov-syntax-decorator"), u("regexp", "--ov-syntax-regexp"), u("operator", "--ov-syntax-operator"), u("delimiter", "--ov-syntax-punctuation"), u("delimiter.bracket", "--ov-syntax-punctuation")].filter((p) => p !== null);
398
398
  return {
399
- base: ir(e),
399
+ base: lr(e),
400
400
  inherit: !0,
401
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")
402
+ colors: dr({
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 ge = "ov-theme", fr = {
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 mr(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 fr[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 hr(e, t) {
515
+ let r = 0, n = 0, c = -1, u = -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, u = n, r++;
521
521
  else if (c >= 0)
522
- n = c + 1, l++, r = l;
522
+ r = c + 1, u++, n = u;
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 gr {
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) => hr(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((u) => ({
619
+ uri: u.uri,
620
+ fileMatch: u.fileMatch,
621
+ schema: u.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,43 +635,43 @@ 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 gr(), pr = "_Root_1729c_1", yr = "_Inner_1729c_17", ut = {
644
+ Root: pr,
645
+ Inner: yr
646
646
  };
647
647
  function Me(...e) {
648
648
  }
649
- function mr(...e) {
649
+ function vr(...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 dt(e, t, r) {
653
+ if (r) {
654
+ const n = $.Uri.parse(r);
655
+ Me("getOrCreateModel — parsed URI:", n.toString(), "| language:", t);
656
+ const c = $.editor.getModel(n);
657
+ return c || $.editor.createModel(e, t, n);
658
658
  }
659
- return L.editor.createModel(e, t);
659
+ return $.editor.createModel(e, t);
660
660
  }
661
661
  function _t(e) {
662
662
  switch (e) {
663
- case L.MarkerSeverity.Error:
663
+ case $.MarkerSeverity.Error:
664
664
  return "error";
665
- case L.MarkerSeverity.Warning:
665
+ case $.MarkerSeverity.Warning:
666
666
  return "warning";
667
- case L.MarkerSeverity.Info:
667
+ case $.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 ft(e) {
674
+ return $.editor.getModelMarkers({
675
675
  resource: e.uri
676
676
  }).map((t) => ({
677
677
  message: t.message,
@@ -684,28 +684,28 @@ 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 br = ve(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,
692
+ onCursorChange: u,
693
+ language: l,
694
694
  filename: a,
695
- readOnly: v = !1,
695
+ readOnly: p = !1,
696
696
  lineNumbers: g = !0,
697
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(() => {
698
+ wordWrap: M = !1,
699
+ tabSize: m = 2,
700
+ diagnostics: T = !1,
701
+ quickSuggestions: R = !1,
702
+ syntaxHighlighting: H = !0,
703
+ height: N = "100%",
704
+ width: q = "100%",
705
+ bordered: C = !0,
706
+ className: I
707
+ }, W) {
708
+ const U = Ke(), P = Y(null), F = Y(null), [D, X] = Pe(!1), ne = Y(!1), v = Y(null), s = Y(null), _ = Y(null), k = l ?? (a ? mr(a) : void 0), i = Ae(() => {
709
709
  if (k === "json" && t)
710
710
  try {
711
711
  return JSON.stringify(JSON.parse(t), null, 2);
@@ -714,9 +714,9 @@ const gr = ve(function({
714
714
  }
715
715
  return t;
716
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({
717
+ V(() => {
718
+ if (!F.current) return;
719
+ $.editor.defineTheme(ge, Oe(U.base, F.current)), $.editor.setTheme(ge), $.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,
728
+ const f = dt(i, H ? k : "plaintext", a);
729
+ Me(" model created — uri:", f.uri.toString());
730
+ const y = $.editor.create(F.current, {
731
+ model: f,
732
+ readOnly: p,
733
733
  lineNumbers: g ? "on" : "off",
734
734
  minimap: {
735
735
  enabled: x
736
736
  },
737
- wordWrap: A ? "on" : "off",
738
- quickSuggestions: C ? {
737
+ wordWrap: M ? "on" : "off",
738
+ quickSuggestions: R ? {
739
739
  other: !0,
740
740
  strings: !0,
741
741
  comments: !1
@@ -744,1321 +744,1365 @@ 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 P.current = y, fe.applyYamlSchemas(), fe.applyJsonSchemas($), n?.(y, $), X(!0), () => {
751
+ v.current?.dispose(), v.current = null, s.current?.dispose(), s.current = null, _.current?.dispose(), _.current = null;
752
+ const b = y.getModel();
753
+ y.setModel(null), b?.dispose(), y.dispose(), P.current = null, X(!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(),
755
+ }, []), V(() => {
756
+ const f = P.current;
757
+ if (!(!f || !D || i === void 0)) {
758
+ if (f.getOption($.editor.EditorOption.readOnly))
759
+ f.setValue(i);
760
+ else if (i !== f.getValue()) {
761
+ const y = f.getModel();
762
+ if (!y) return;
763
+ ne.current = !0, f.executeEdits("", [{
764
+ range: y.getFullModelRange(),
765
765
  text: i,
766
766
  forceMoveMarkers: !0
767
- }]), d.pushUndoStop(), ne.current = !1;
767
+ }]), f.pushUndoStop(), ne.current = !1;
768
768
  }
769
769
  }
770
- }, [i, P]), z(() => {
771
- !D.current || !P || D.current.updateOptions({
772
- readOnly: v,
770
+ }, [i, D]), V(() => {
771
+ !P.current || !D || P.current.updateOptions({
772
+ readOnly: p,
773
773
  lineNumbers: g ? "on" : "off",
774
774
  minimap: {
775
775
  enabled: x
776
776
  },
777
- wordWrap: A ? "on" : "off",
778
- quickSuggestions: C ? {
777
+ wordWrap: M ? "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);
786
+ }, [p, g, x, M, R, m, T, D]), V(() => {
787
+ if (!P.current || !D) return;
788
+ const f = P.current.getModel();
789
+ if (f) {
790
+ const y = H ? k ?? "plaintext" : "plaintext";
791
+ $.editor.setModelLanguage(f, y);
792
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());
793
+ }, [k, H, D]);
794
+ const d = Y(a);
795
+ V(() => {
796
+ const f = P.current;
797
+ if (!f || !D || d.current === a) return;
798
+ Me("filename changed:", d.current, "→", a), d.current = a;
799
+ const y = f.getModel(), b = y?.getValue?.() ?? i;
800
+ f.setModel(null), y?.dispose();
801
+ const o = dt(b, H ? k : "plaintext", a);
802
+ f.setModel(o), Me(" new model set — uri:", o.uri.toString());
803
+ }, [a, D, k, H, i]), V(() => {
804
+ D && ($.editor.defineTheme(ge, Oe(U.base, F.current)), $.editor.setTheme(ge));
805
+ }, [D, U.registration]), V(() => {
806
+ !P.current || !D || (v.current?.dispose(), r && (v.current = P.current.onDidChangeModelContent(() => {
807
+ ne.current || r(P.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, D]), V(() => {
810
+ D && (s.current?.dispose(), c && (s.current = $.editor.onDidChangeMarkers((f) => {
811
+ const y = P.current?.getModel();
812
+ if (!y) return;
813
+ const b = y.uri.toString();
814
+ f.some((o) => o.toString() === b) && c(ft(y));
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, D]), V(() => {
817
+ !P.current || !D || (_.current?.dispose(), u && (_.current = P.current.onDidChangeCursorPosition((f) => {
818
+ u({
819
+ lineNumber: f.position.lineNumber,
820
+ column: f.position.column
821
821
  });
822
822
  })));
823
- }, [l, P]), z(() => {
824
- if (P)
825
- return de.onChange(() => {
826
- de.applyYamlSchemas(), de.applyJsonSchemas(L);
823
+ }, [u, D]), V(() => {
824
+ if (D)
825
+ return fe.onChange(() => {
826
+ fe.applyYamlSchemas(), fe.applyJsonSchemas($);
827
827
  });
828
- }, [P]), yt(J, () => ({
829
- getEditor: () => D.current,
830
- getMonaco: () => L,
831
- focus: () => D.current?.focus(),
828
+ }, [D]), vt(W, () => ({
829
+ getEditor: () => P.current,
830
+ getMonaco: () => $,
831
+ focus: () => P.current?.focus(),
832
832
  getDiagnostics: () => {
833
- const d = D.current?.getModel();
834
- return d ? ut(d) : [];
833
+ const f = P.current?.getModel();
834
+ return f ? ft(f) : [];
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 f = P.current, y = f?.getModel() ?? null, b = y ? $.editor.getModelMarkers({
838
+ resource: y.uri
839
+ }) : [], o = y?.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 L of b) {
846
+ const J = _t(L.severity);
847
+ w[J]++;
848
+ const Q = L.source ?? "unknown";
849
+ A[Q] = (A[Q] ?? 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 j = o ? fe.getSchemasForUri(o).map((L) => ({
852
+ uri: L.uri,
853
+ name: L.name,
854
+ fileMatch: L.fileMatch
855
+ })) : [], B = f?.getPosition() ?? null, O = f?.getSelections() ?? [];
856
856
  return {
857
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
858
+ modelLanguage: y?.getLanguageId() ?? null,
859
+ modelLineCount: y?.getLineCount() ?? 0,
860
+ modelContentLength: y?.getValueLength() ?? 0,
861
+ modelVersionId: y?.getVersionId() ?? 0,
862
+ modelEOL: y?.getEOL() ?? null,
863
+ cursorPosition: B ? {
864
+ lineNumber: B.lineNumber,
865
+ column: B.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((L) => ({
868
+ startLineNumber: L.startLineNumber,
869
+ startColumn: L.startColumn,
870
+ endLineNumber: L.endLineNumber,
871
+ endColumn: L.endColumn
872
872
  })),
873
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
874
+ diagnosticsBySeverity: w,
875
+ diagnosticsBySource: A,
876
+ registeredSchemaCount: fe.schemas.length,
877
+ matchingSchemas: j,
878
+ isReadOnly: f?.getOption($.editor.EditorOption.readOnly) ?? !1,
879
+ isFocused: f?.hasWidgetFocus() ?? !1,
880
+ totalModelCount: $.editor.getModels().length,
881
+ registeredLanguageCount: $.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 h = (f) => typeof f == "number" ? `${f}px` : f;
887
+ return /* @__PURE__ */ S.jsx("div", { className: vr(ut.Root, I), style: {
888
+ "--_editor-height": h(N),
889
+ "--_editor-width": h(q)
890
+ }, "data-testid": "code-editor", ...C ? {} : {
891
891
  "data-borderless": ""
892
- }, children: /* @__PURE__ */ T.jsx("div", { ref: V, className: ct.Inner }) });
892
+ }, children: /* @__PURE__ */ S.jsx("div", { ref: F, className: ut.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
+ br.displayName = "CodeEditor";
895
+ const wr = "_Root_1ltbg_1", _r = "_Inner_1ltbg_16", mt = {
896
+ Root: wr,
897
+ Inner: _r
898
898
  };
899
- function vr(...e) {
899
+ function kr(...e) {
900
900
  return e.filter(Boolean).join(" ");
901
901
  }
902
- const br = ve(function({
902
+ const xr = ve(function({
903
903
  original: t,
904
- modified: n,
905
- language: r,
904
+ modified: r,
905
+ language: n,
906
906
  mode: c = "side-by-side",
907
- readOnly: l = !0,
908
- height: f = "100%",
907
+ readOnly: u = !0,
908
+ height: l = "100%",
909
909
  bordered: a = !0,
910
- className: v
910
+ className: p
911
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,
912
+ const x = Ke(), M = Y(null), m = Y(null), [T, R] = Pe(!1);
913
+ V(() => {
914
+ if (!M.current) return;
915
+ $.editor.defineTheme(ge, Oe(x.base, M.current)), $.editor.setTheme(ge);
916
+ const N = $.editor.createDiffEditor(M.current, {
917
+ readOnly: u,
918
918
  renderSideBySide: c === "side-by-side",
919
919
  renderValidationDecorations: "off",
920
920
  scrollBeyondLastLine: !1,
921
921
  automaticLayout: !0,
922
922
  fontSize: 13,
923
923
  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);
924
+ }), q = $.editor.createModel(t, n), C = $.editor.createModel(r, n);
925
+ return N.setModel({
926
+ original: q,
927
+ modified: C
928
+ }), m.current = N, R(!0), () => {
929
+ N.getModel()?.original?.dispose(), N.getModel()?.modified?.dispose(), N.dispose(), m.current = null, R(!1);
930
930
  };
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,
931
+ }, []), V(() => {
932
+ if (!m.current || !T) return;
933
+ const N = m.current.getModel()?.original;
934
+ N && t !== N.getValue() && N.setValue(t);
935
+ }, [t, T]), V(() => {
936
+ if (!m.current || !T) return;
937
+ const N = m.current.getModifiedEditor();
938
+ r !== N.getValue() && m.current.getModel()?.modified?.setValue(r);
939
+ }, [r, T]), V(() => {
940
+ if (!m.current || !T) return;
941
+ const N = n ?? "plaintext", q = m.current.getModel();
942
+ q?.original && $.editor.setModelLanguage(q.original, N), q?.modified && $.editor.setModelLanguage(q.modified, N);
943
+ }, [n, T]), V(() => {
944
+ !m.current || !T || m.current.updateOptions({
945
+ readOnly: u,
946
946
  renderSideBySide: c === "side-by-side"
947
947
  });
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%")
948
+ }, [u, c, T]), V(() => {
949
+ T && ($.editor.defineTheme(ge, Oe(x.base, M.current)), $.editor.setTheme(ge));
950
+ }, [T, x.registration]);
951
+ const H = (N) => typeof N == "number" ? `${N}px` : N;
952
+ return /* @__PURE__ */ S.jsx("div", { ref: g, className: kr(mt.Root, p), style: {
953
+ "--_diff-height": H(l ?? "100%")
954
954
  }, "data-testid": "diff-viewer", ...a ? {} : {
955
955
  "data-borderless": ""
956
- }, children: /* @__PURE__ */ T.jsx("div", { ref: A, className: dt.Inner }) });
956
+ }, children: /* @__PURE__ */ S.jsx("div", { ref: M, className: mt.Inner }) });
957
957
  });
958
- br.displayName = "DiffViewer";
959
- function Ve(e) {
960
- const t = Xe(e), n = (r, c = "") => t?.getPropertyValue(r).trim() || c;
958
+ xr.displayName = "DiffViewer";
959
+ function Ye(e) {
960
+ const t = Ze(e), r = (n, c = "") => t?.getPropertyValue(n).trim() || c;
961
961
  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")
962
+ background: r("--ov-color-terminal-bg", "#0d0e10"),
963
+ foreground: r("--ov-color-terminal-fg", "#e2e7ee"),
964
+ cursor: r("--ov-color-terminal-cursor", "#89a7ee"),
965
+ selectionBackground: r("--ov-color-terminal-selection-bg", "rgba(90,127,226,0.18)"),
966
+ selectionForeground: r("--ov-color-terminal-selection-fg") || void 0,
967
+ black: r("--ov-color-ansi-black", "#3b4252"),
968
+ red: r("--ov-color-ansi-red", "#bf616a"),
969
+ green: r("--ov-color-ansi-green", "#a3be8c"),
970
+ yellow: r("--ov-color-ansi-yellow", "#ebcb8b"),
971
+ blue: r("--ov-color-ansi-blue", "#81a1c1"),
972
+ magenta: r("--ov-color-ansi-magenta", "#b48ead"),
973
+ cyan: r("--ov-color-ansi-cyan", "#88c0d0"),
974
+ white: r("--ov-color-ansi-white", "#e5e9f0"),
975
+ brightBlack: r("--ov-color-ansi-bright-black", "#4c566a"),
976
+ brightRed: r("--ov-color-ansi-bright-red", "#d08770"),
977
+ brightGreen: r("--ov-color-ansi-bright-green", "#a3be8c"),
978
+ brightYellow: r("--ov-color-ansi-bright-yellow", "#ebcb8b"),
979
+ brightBlue: r("--ov-color-ansi-bright-blue", "#81a1c1"),
980
+ brightMagenta: r("--ov-color-ansi-bright-magenta", "#b48ead"),
981
+ brightCyan: r("--ov-color-ansi-bright-cyan", "#8fbcbb"),
982
+ brightWhite: r("--ov-color-ansi-bright-white", "#eceff4")
983
983
  };
984
984
  }
985
- const _r = "_Root_1s8vo_1", wr = {
986
- Root: _r
985
+ const Cr = "_Root_1s8vo_1", Rr = {
986
+ Root: Cr
987
987
  };
988
- function kr(...e) {
988
+ function Sr(...e) {
989
989
  return e.filter(Boolean).join(" ");
990
990
  }
991
- function xr(e, t) {
992
- let n = null;
991
+ function Er(e, t) {
992
+ let r = null;
993
993
  return {
994
- run: (...r) => {
995
- n !== null && clearTimeout(n), n = setTimeout(() => {
996
- n = null, e(...r);
994
+ run: (...n) => {
995
+ r !== null && clearTimeout(r), r = setTimeout(() => {
996
+ r = null, e(...n);
997
997
  }, t);
998
998
  },
999
999
  cancel: () => {
1000
- n !== null && (clearTimeout(n), n = null);
1000
+ r !== null && (clearTimeout(r), r = null);
1001
1001
  }
1002
1002
  };
1003
1003
  }
1004
- const Cr = ve(function({
1004
+ const Tr = ve(function({
1005
1005
  onData: t,
1006
- onBinaryData: n,
1007
- onResize: r,
1006
+ onBinaryData: r,
1007
+ onResize: n,
1008
1008
  onSignal: c,
1009
- onError: l,
1010
- onClose: f,
1009
+ onError: u,
1010
+ onClose: l,
1011
1011
  onReady: a,
1012
- onBell: v,
1012
+ onBell: p,
1013
1013
  onTitleChange: g,
1014
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,
1015
+ onSelectionChange: M,
1016
+ onLineFeed: m,
1017
+ onScroll: T,
1018
+ onWriteParsed: R,
1019
+ fontSize: H = 13,
1020
+ fontFamily: N,
1021
+ fontWeight: q,
1022
+ fontWeightBold: C,
1023
+ scrollback: I = 5e3,
1024
+ cursorBlink: W = !0,
1025
1025
  cursorStyle: U,
1026
- cursorWidth: D,
1027
- lineHeight: V,
1028
- letterSpacing: P,
1026
+ cursorWidth: P,
1027
+ lineHeight: F,
1028
+ letterSpacing: D,
1029
1029
  drawBoldTextInBrightColors: X = !0,
1030
1030
  convertEol: ne = !0,
1031
- allowTransparency: y = !0,
1031
+ allowTransparency: v = !0,
1032
1032
  macOptionIsMeta: s = !0,
1033
- macOptionClickForcesSelection: w = !0,
1033
+ macOptionClickForcesSelection: _ = !0,
1034
1034
  linkHandling: k = !0,
1035
1035
  disableStdin: i,
1036
- customKeyEventHandler: u,
1037
- autoFocus: m = !1,
1038
- renderer: d = "auto",
1039
- rows: p,
1036
+ customKeyEventHandler: d,
1037
+ autoFocus: h = !1,
1038
+ renderer: f = "auto",
1039
+ rows: y,
1040
1040
  cols: b,
1041
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({
1042
+ minimumContrastRatio: w,
1043
+ className: A
1044
+ }, j) {
1045
+ const B = Y(null), O = Y(null), L = Y(null), J = Y(null), Q = Y(null), oe = Y([]), le = Y(null), ae = Y(null), G = Y(null), ce = Ke(), ee = Y({
1046
1046
  onData: t,
1047
- onBinaryData: n,
1048
- onResize: r,
1047
+ onBinaryData: r,
1048
+ onResize: n,
1049
1049
  onSignal: c,
1050
- onError: l,
1051
- onClose: f,
1050
+ onError: u,
1051
+ onClose: l,
1052
1052
  onReady: a,
1053
- onBell: v,
1053
+ onBell: p,
1054
1054
  onTitleChange: g,
1055
1055
  onKey: x,
1056
- onSelectionChange: A,
1057
- onLineFeed: h,
1058
- onScroll: S,
1059
- onWriteParsed: C
1056
+ onSelectionChange: M,
1057
+ onLineFeed: m,
1058
+ onScroll: T,
1059
+ onWriteParsed: R
1060
1060
  });
1061
1061
  ee.current = {
1062
1062
  onData: t,
1063
- onBinaryData: n,
1064
- onResize: r,
1063
+ onBinaryData: r,
1064
+ onResize: n,
1065
1065
  onSignal: c,
1066
- onError: l,
1067
- onClose: f,
1066
+ onError: u,
1067
+ onClose: l,
1068
1068
  onReady: a,
1069
- onBell: v,
1069
+ onBell: p,
1070
1070
  onTitleChange: g,
1071
1071
  onKey: x,
1072
- onSelectionChange: A,
1073
- onLineFeed: h,
1074
- onScroll: S,
1075
- onWriteParsed: C
1072
+ onSelectionChange: M,
1073
+ onLineFeed: m,
1074
+ onScroll: T,
1075
+ onWriteParsed: R
1076
1076
  };
1077
- const Oe = vt(() => {
1077
+ const Le = Ne(() => {
1078
1078
  try {
1079
- O.current?.fit?.();
1079
+ L.current?.fit?.();
1080
1080
  } catch {
1081
1081
  }
1082
1082
  }, []);
1083
- return yt(E, () => ({
1084
- write: (R) => {
1085
- N.current?.write?.(R);
1083
+ return vt(j, () => ({
1084
+ write: (E) => {
1085
+ O.current?.write?.(E);
1086
1086
  },
1087
- writeln: (R) => {
1088
- N.current?.writeln?.(R);
1087
+ writeln: (E) => {
1088
+ O.current?.writeln?.(E);
1089
1089
  },
1090
1090
  clear: () => {
1091
- N.current?.clear?.();
1091
+ O.current?.clear?.();
1092
1092
  },
1093
1093
  focus: () => {
1094
- N.current?.focus?.();
1094
+ O.current?.focus?.();
1095
1095
  },
1096
1096
  blur: () => {
1097
- N.current?.blur?.();
1097
+ O.current?.blur?.();
1098
1098
  },
1099
- fit: Oe,
1099
+ fit: Le,
1100
1100
  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
1101
+ const E = O.current;
1102
+ return E && typeof E.cols == "number" && typeof E.rows == "number" ? {
1103
+ cols: E.cols,
1104
+ rows: E.rows
1105
1105
  } : null;
1106
1106
  },
1107
1107
  reset: () => {
1108
- N.current?.reset?.();
1108
+ O.current?.reset?.();
1109
1109
  },
1110
1110
  scrollToBottom: () => {
1111
- N.current?.scrollToBottom?.();
1111
+ O.current?.scrollToBottom?.();
1112
1112
  },
1113
- findNext: (R, te) => F.current?.findNext?.(R, te) ?? !1,
1114
- findPrevious: (R, te) => F.current?.findPrevious?.(R, te) ?? !1,
1113
+ findNext: (E, te) => J.current?.findNext?.(E, te) ?? !1,
1114
+ findPrevious: (E, te) => J.current?.findPrevious?.(E, te) ?? !1,
1115
1115
  clearSearch: () => {
1116
- F.current?.clearDecorations?.();
1116
+ J.current?.clearDecorations?.();
1117
1117
  },
1118
- getSelection: () => N.current?.getSelection?.() ?? "",
1119
- hasSelection: () => N.current?.hasSelection?.() ?? !1,
1118
+ getSelection: () => O.current?.getSelection?.() ?? "",
1119
+ hasSelection: () => O.current?.hasSelection?.() ?? !1,
1120
1120
  selectAll: () => {
1121
- N.current?.selectAll?.();
1121
+ O.current?.selectAll?.();
1122
1122
  },
1123
1123
  clearSelection: () => {
1124
- N.current?.clearSelection?.();
1124
+ O.current?.clearSelection?.();
1125
1125
  },
1126
- scrollToLine: (R) => {
1127
- N.current?.scrollToLine?.(R);
1126
+ scrollToLine: (E) => {
1127
+ O.current?.scrollToLine?.(E);
1128
1128
  },
1129
- scrollUp: (R) => {
1130
- N.current?.scrollLines?.(-R);
1129
+ scrollUp: (E) => {
1130
+ O.current?.scrollLines?.(-E);
1131
1131
  },
1132
- scrollDown: (R) => {
1133
- N.current?.scrollLines?.(R);
1132
+ scrollDown: (E) => {
1133
+ O.current?.scrollLines?.(E);
1134
1134
  },
1135
- paste: (R) => {
1136
- N.current?.paste?.(R);
1135
+ paste: (E) => {
1136
+ O.current?.paste?.(E);
1137
1137
  },
1138
1138
  getBufferContent: () => Q.current?.serialize?.() ?? ""
1139
- })), z(() => {
1140
- const R = $.current;
1141
- if (!R) return;
1139
+ })), V(() => {
1140
+ const E = B.current;
1141
+ if (!E) return;
1142
1142
  let te = !1;
1143
- async function Pe() {
1143
+ async function De() {
1144
1144
  await document.fonts.ready;
1145
1145
  const [{
1146
1146
  Terminal: pe
1147
1147
  }, {
1148
- FitAddon: Le
1148
+ FitAddon: $e
1149
1149
  }, {
1150
- SearchAddon: Nt
1150
+ SearchAddon: Ot
1151
1151
  }, {
1152
- SerializeAddon: Ot
1152
+ SerializeAddon: Pt
1153
1153
  }, {
1154
- Unicode11Addon: Pt
1154
+ Unicode11Addon: Lt
1155
1155
  }] = await Promise.all([import("@xterm/xterm"), import("@xterm/addon-fit"), import("@xterm/addon-search"), import("@xterm/addon-serialize"), import("@xterm/addon-unicode11")]);
1156
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,
1157
+ const Dt = Ye(E), ie = {
1158
+ fontSize: H,
1159
+ fontFamily: N || "'Menlo', 'Monaco', 'Consolas', 'Liberation Mono', 'Courier New', monospace",
1160
+ theme: Dt,
1161
+ allowTransparency: v,
1162
+ cursorBlink: W,
1163
1163
  convertEol: ne,
1164
- scrollback: q,
1164
+ scrollback: I,
1165
1165
  macOptionIsMeta: s,
1166
- macOptionClickForcesSelection: w,
1166
+ macOptionClickForcesSelection: _,
1167
1167
  allowProposedApi: !0,
1168
1168
  drawBoldTextInBrightColors: X
1169
1169
  };
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)
1170
+ q !== void 0 && (ie.fontWeight = q), C !== void 0 && (ie.fontWeightBold = C), i !== void 0 && (ie.disableStdin = i), U !== void 0 && (ie.cursorStyle = U), P !== void 0 && (ie.cursorWidth = P), F !== void 0 && (ie.lineHeight = F), D !== void 0 && (ie.letterSpacing = D), y !== void 0 && (ie.rows = y), b !== void 0 && (ie.cols = b), o !== void 0 && (ie.screenReaderMode = o), w !== void 0 && (ie.minimumContrastRatio = w);
1171
+ const z = new pe(ie);
1172
+ d && z.attachCustomKeyEventHandler(d);
1173
+ const we = [], _e = new $e(), Ie = new Ot(), We = new Pt(), et = new Lt();
1174
+ if (z.loadAddon(_e), z.loadAddon(Ie), z.loadAddon(We), z.loadAddon(et), we.push(_e, Ie, We, et), z.unicode.activeVersion = "11", k)
1175
1175
  try {
1176
1176
  const {
1177
1177
  WebLinksAddon: Z
1178
1178
  } = await import("@xterm/addon-web-links");
1179
1179
  if (!te) {
1180
- const ue = new Z();
1181
- B.loadAddon(ue), _e.push(ue);
1180
+ const de = new Z();
1181
+ z.loadAddon(de), we.push(de);
1182
1182
  }
1183
1183
  } catch {
1184
1184
  }
1185
1185
  if (te) {
1186
- B.dispose();
1186
+ z.dispose();
1187
1187
  return;
1188
1188
  }
1189
- if (B.open(R), d === "auto" || d === "webgl")
1189
+ if (z.open(E), f === "auto" || f === "webgl")
1190
1190
  try {
1191
1191
  const {
1192
1192
  WebglAddon: Z
1193
1193
  } = await import("@xterm/addon-webgl");
1194
1194
  if (!te) {
1195
- const ue = new Z();
1196
- ue.onContextLoss(() => {
1197
- ue.dispose();
1198
- }), B.loadAddon(ue), _e.push(ue);
1195
+ const de = new Z();
1196
+ de.onContextLoss(() => {
1197
+ de.dispose();
1198
+ }), z.loadAddon(de), we.push(de);
1199
1199
  }
1200
1200
  } catch {
1201
1201
  }
1202
1202
  if (te) {
1203
- for (const Z of _e)
1203
+ for (const Z of we)
1204
1204
  try {
1205
1205
  Z.dispose();
1206
1206
  } catch {
1207
1207
  }
1208
- B.dispose();
1208
+ z.dispose();
1209
1209
  return;
1210
1210
  }
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) => {
1211
+ z.options.theme = Ye(E), _e.fit(), O.current = z, L.current = _e, J.current = Ie, Q.current = We, oe.current = we, z.onData((Z) => {
1212
1212
  ee.current.onData?.(Z);
1213
- }), B.onBinary((Z) => {
1213
+ }), z.onBinary((Z) => {
1214
1214
  ee.current.onBinaryData?.(Z);
1215
- }), B.onResize(({
1215
+ }), z.onResize(({
1216
1216
  cols: Z,
1217
- rows: ue
1217
+ rows: de
1218
1218
  }) => {
1219
- ee.current.onResize?.(Z, ue);
1220
- }), B.onBell(() => {
1219
+ ee.current.onResize?.(Z, de);
1220
+ }), z.onBell(() => {
1221
1221
  ee.current.onBell?.();
1222
- }), B.onTitleChange((Z) => {
1222
+ }), z.onTitleChange((Z) => {
1223
1223
  ee.current.onTitleChange?.(Z);
1224
- }), B.onKey((Z) => {
1224
+ }), z.onKey((Z) => {
1225
1225
  ee.current.onKey?.(Z);
1226
- }), B.onSelectionChange(() => {
1226
+ }), z.onSelectionChange(() => {
1227
1227
  ee.current.onSelectionChange?.();
1228
- }), B.onLineFeed(() => {
1228
+ }), z.onLineFeed(() => {
1229
1229
  ee.current.onLineFeed?.();
1230
- }), B.onScroll((Z) => {
1230
+ }), z.onScroll((Z) => {
1231
1231
  ee.current.onScroll?.(Z);
1232
- }), B.onWriteParsed(() => {
1232
+ }), z.onWriteParsed(() => {
1233
1233
  ee.current.onWriteParsed?.();
1234
1234
  });
1235
- const Ie = xr(() => {
1235
+ const Be = Er(() => {
1236
1236
  try {
1237
- we.fit();
1237
+ _e.fit();
1238
1238
  } catch {
1239
1239
  }
1240
1240
  }, 10);
1241
- ae.current = Ie;
1242
- const Ke = new ResizeObserver(() => {
1243
- Ie.run();
1241
+ ae.current = Be;
1242
+ const tt = new ResizeObserver(() => {
1243
+ Be.run();
1244
1244
  });
1245
- Ke.observe(R), le.current = Ke;
1246
- const et = () => {
1247
- Ie.run();
1245
+ tt.observe(E), le.current = tt;
1246
+ const rt = () => {
1247
+ Be.run();
1248
1248
  };
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
1249
+ window.addEventListener("resize", rt), G.current = () => {
1250
+ window.removeEventListener("resize", rt);
1251
+ }, h && z.focus(), ee.current.onReady?.({
1252
+ cols: z.cols,
1253
+ rows: z.rows
1254
1254
  });
1255
1255
  }
1256
- return Pe().catch((pe) => {
1256
+ return De().catch((pe) => {
1257
1257
  ee.current.onError?.(pe instanceof Error ? pe : new Error(String(pe)));
1258
1258
  }), () => {
1259
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)
1260
+ for (const $e of oe.current)
1261
1261
  try {
1262
- Le.dispose();
1262
+ $e.dispose();
1263
1263
  } catch {
1264
1264
  }
1265
1265
  oe.current = [];
1266
- const pe = N.current;
1266
+ const pe = O.current;
1267
1267
  try {
1268
1268
  pe?.dispose?.();
1269
1269
  } catch {
1270
1270
  }
1271
- N.current = null, O.current = null, F.current = null, Q.current = null;
1271
+ O.current = null, L.current = null, J.current = null, Q.current = null;
1272
1272
  };
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" });
1273
+ }, []), V(() => {
1274
+ const E = O.current;
1275
+ E?.options && (E.options.theme = Ye(B.current));
1276
+ }, [ce.registration]), V(() => {
1277
+ const E = O.current;
1278
+ E?.options && (E.options.fontSize = H, ae.current?.run());
1279
+ }, [H]), V(() => {
1280
+ const E = O.current;
1281
+ E?.options && W !== void 0 && (E.options.cursorBlink = W);
1282
+ }, [W]), V(() => {
1283
+ const E = O.current;
1284
+ E?.options && U !== void 0 && (E.options.cursorStyle = U);
1285
+ }, [U]), V(() => {
1286
+ const E = O.current;
1287
+ E?.options && I !== void 0 && (E.options.scrollback = I);
1288
+ }, [I]), V(() => {
1289
+ const E = O.current;
1290
+ E?.options && F !== void 0 && (E.options.lineHeight = F, ae.current?.run());
1291
+ }, [F]), V(() => {
1292
+ const E = O.current;
1293
+ E?.options && D !== void 0 && (E.options.letterSpacing = D, ae.current?.run());
1294
+ }, [D]), /* @__PURE__ */ S.jsx("div", { ref: B, className: Sr(Rr.Root, A), "data-testid": "terminal" });
1295
1295
  });
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) {
1296
+ Tr.displayName = "Terminal";
1297
+ const jr = "_Root_1wl3o_1", Mr = "_Loading_1wl3o_92", ht = {
1298
+ Root: jr,
1299
+ Loading: Mr
1300
+ }, Ar = [Qt], Nr = It(() => import("react-markdown"));
1301
+ function Or(...e) {
1302
1302
  return e.filter(Boolean).join(" ");
1303
1303
  }
1304
- function wt(e) {
1305
- return e ? e.type === "text" ? e.value ?? "" : Array.isArray(e.children) ? e.children.map(wt).join("") : "" : "";
1304
+ function kt(e) {
1305
+ return e ? e.type === "text" ? e.value ?? "" : Array.isArray(e.children) ? e.children.map(kt).join("") : "" : "";
1306
1306
  }
1307
- function Mr(e) {
1307
+ function Pr(e) {
1308
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;
1309
+ summaryText: r,
1310
+ children: n
1311
+ } = e, u = `md-details-${Ht()}`;
1312
+ let l;
1313
+ return t[0] !== n || t[1] !== u || t[2] !== r ? (l = /* @__PURE__ */ S.jsx(nt, { animation: "fast", children: /* @__PURE__ */ S.jsx(nt.Item, { id: u, title: r, children: n }) }), t[0] = n, t[1] = u, t[2] = r, t[3] = l) : l = t[3], l;
1314
1314
  }
1315
- const Ar = {
1315
+ const Lr = {
1316
1316
  // Code blocks & inline code
1317
1317
  pre: ({
1318
1318
  children: e
1319
- }) => /* @__PURE__ */ T.jsx(T.Fragment, { children: e }),
1319
+ }) => /* @__PURE__ */ S.jsx(S.Fragment, { children: e }),
1320
1320
  code: ({
1321
1321
  className: e,
1322
1322
  children: t
1323
1323
  }) => {
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 });
1324
+ const r = /language-([^\s]+)/.exec(e ?? ""), n = String(t).replace(/\n$/, "");
1325
+ return r || n.includes(`
1326
+ `) ? /* @__PURE__ */ S.jsx(qt, { language: r?.[1], copyable: !0, children: n }) : /* @__PURE__ */ S.jsx(Jt, { children: t });
1327
1327
  },
1328
1328
  // Tables
1329
1329
  table: ({
1330
1330
  children: e
1331
- }) => /* @__PURE__ */ T.jsx(ye.Root, { striped: !0, hoverable: !0, size: "sm", children: e }),
1331
+ }) => /* @__PURE__ */ S.jsx(ye.Root, { striped: !0, hoverable: !0, size: "sm", children: e }),
1332
1332
  thead: ({
1333
1333
  children: e
1334
- }) => /* @__PURE__ */ T.jsx(ye.Head, { children: e }),
1334
+ }) => /* @__PURE__ */ S.jsx(ye.Head, { children: e }),
1335
1335
  tbody: ({
1336
1336
  children: e
1337
- }) => /* @__PURE__ */ T.jsx(ye.Body, { children: e }),
1337
+ }) => /* @__PURE__ */ S.jsx(ye.Body, { children: e }),
1338
1338
  tr: ({
1339
1339
  children: e
1340
- }) => /* @__PURE__ */ T.jsx(ye.Row, { children: e }),
1340
+ }) => /* @__PURE__ */ S.jsx(ye.Row, { children: e }),
1341
1341
  th: ({
1342
1342
  children: e,
1343
1343
  style: t
1344
- }) => /* @__PURE__ */ T.jsx(ye.HeaderCell, { style: t, children: e }),
1344
+ }) => /* @__PURE__ */ S.jsx(ye.HeaderCell, { style: t, children: e }),
1345
1345
  td: ({
1346
1346
  children: e,
1347
1347
  style: t
1348
- }) => /* @__PURE__ */ T.jsx(ye.Cell, { style: t, children: e }),
1348
+ }) => /* @__PURE__ */ S.jsx(ye.Cell, { style: t, children: e }),
1349
1349
  // Links
1350
1350
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
1351
1351
  a: ({
1352
1352
  children: e,
1353
1353
  href: t,
1354
- node: n,
1355
- ...r
1356
- }) => /* @__PURE__ */ T.jsx(Vt, { ...r, href: t, target: "_blank", rel: "noopener noreferrer", underline: "hover", children: e }),
1354
+ node: r,
1355
+ ...n
1356
+ }) => /* @__PURE__ */ S.jsx(Yt, { ...n, href: t, target: "_blank", rel: "noopener noreferrer", underline: "hover", children: e }),
1357
1357
  // Blockquotes
1358
1358
  blockquote: ({
1359
1359
  children: e
1360
- }) => /* @__PURE__ */ T.jsx(Ut, { variant: "plain", children: e }),
1360
+ }) => /* @__PURE__ */ S.jsx(Vt, { variant: "plain", children: e }),
1361
1361
  // Horizontal rules
1362
- hr: () => /* @__PURE__ */ T.jsx(Ht, {}),
1362
+ hr: () => /* @__PURE__ */ S.jsx(Ft, {}),
1363
1363
  // Details/summary → Accordion — extract title from the hast node's summary child
1364
1364
  details: ({
1365
1365
  children: e,
1366
1366
  node: t
1367
1367
  }) => {
1368
- let n = "Details";
1368
+ let r = "Details";
1369
1369
  if (t?.children) {
1370
- const c = t.children.find((l) => l.tagName === "summary");
1370
+ const c = t.children.find((u) => u.tagName === "summary");
1371
1371
  if (c) {
1372
- const l = wt(c).trim();
1373
- l && (n = l);
1372
+ const u = kt(c).trim();
1373
+ u && (r = u);
1374
1374
  }
1375
1375
  }
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 });
1376
+ const n = [];
1377
+ return Wt.forEach(e, (c) => {
1378
+ Bt(c) && c.props?.["data-md-summary"] || n.push(c);
1379
+ }), /* @__PURE__ */ S.jsx(Pr, { summaryText: r, children: n });
1380
1380
  },
1381
1381
  // Mark summary so details can filter it out; text is extracted from hast node
1382
1382
  summary: ({
1383
1383
  children: e
1384
- }) => /* @__PURE__ */ T.jsx("span", { hidden: !0, "data-md-summary": !0, children: e }),
1384
+ }) => /* @__PURE__ */ S.jsx("span", { hidden: !0, "data-md-summary": !0, children: e }),
1385
1385
  // Task list checkboxes — use compound parts for inline rendering
1386
1386
  input: ({
1387
1387
  type: e,
1388
1388
  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,
1389
+ disabled: r
1390
+ }) => e === "checkbox" ? /* @__PURE__ */ S.jsx(He.Root, { checked: t, disabled: r, size: "sm", className: "ov-md-checkbox", children: /* @__PURE__ */ S.jsx(He.Control, { children: /* @__PURE__ */ S.jsx(He.Indicator, { keepMounted: !0 }) }) }) : null
1391
+ }, Dr = ve(function(t, r) {
1392
+ const n = be.c(16);
1393
+ let c, u, l, a;
1394
+ n[0] !== t ? ({
1395
+ content: u,
1396
1396
  allowHtml: a,
1397
1397
  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;
1398
+ ...l
1399
+ } = t, n[0] = t, n[1] = c, n[2] = u, n[3] = l, n[4] = a) : (c = n[1], u = n[2], l = n[3], a = n[4]);
1400
+ const p = a === void 0 ? !1 : a;
1401
1401
  let g;
1402
- r[5] !== c ? (g = jr(ft.Root, c), r[5] = c, r[6] = g) : g = r[6];
1402
+ n[5] !== c ? (g = Or(ht.Root, c), n[5] = c, n[6] = g) : g = n[6];
1403
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];
1407
- 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;
1404
+ n[7] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (x = /* @__PURE__ */ S.jsx("div", { className: ht.Loading, "data-testid": "markdown-loading", children: "Loading…" }), n[7] = x) : x = n[7];
1405
+ let M;
1406
+ n[8] !== p || n[9] !== u ? (M = /* @__PURE__ */ S.jsx($t, { fallback: x, children: /* @__PURE__ */ S.jsx(Ir, { content: u, allowHtml: p }) }), n[8] = p, n[9] = u, n[10] = M) : M = n[10];
1407
+ let m;
1408
+ return n[11] !== l || n[12] !== r || n[13] !== g || n[14] !== M ? (m = /* @__PURE__ */ S.jsx("div", { ref: r, className: g, "data-testid": "markdown-preview", ...l, children: M }), n[11] = l, n[12] = r, n[13] = g, n[14] = M, n[15] = m) : m = n[15], m;
1409
1409
  });
1410
- Nr.displayName = "MarkdownPreview";
1411
- const Or = {
1412
- ...Be,
1410
+ Dr.displayName = "MarkdownPreview";
1411
+ const $r = {
1412
+ ...Ue,
1413
1413
  attributes: {
1414
- ...Be.attributes,
1415
- "*": [...Be.attributes?.["*"] ?? [], "className"]
1414
+ ...Ue.attributes,
1415
+ "*": [...Ue.attributes?.["*"] ?? [], "className"]
1416
1416
  }
1417
1417
  };
1418
- function Pr(e) {
1418
+ function Ir(e) {
1419
1419
  const t = be.c(6), {
1420
- content: n,
1421
- allowHtml: r
1420
+ content: r,
1421
+ allowHtml: n
1422
1422
  } = e;
1423
1423
  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
1424
+ t[0] !== n ? (c = n ? [Zt, [Kt, $r]] : [], t[0] = n, t[1] = c) : c = t[1];
1425
+ const u = c, l = !n, a = u;
1426
+ let p;
1427
+ return t[2] !== r || t[3] !== l || t[4] !== a ? (p = /* @__PURE__ */ S.jsx(Nr, { skipHtml: l, remarkPlugins: Ar, rehypePlugins: a, components: Lr, children: r }), t[2] = r, t[3] = l, t[4] = a, t[5] = p) : p = t[5], p;
1428
+ }
1429
+ const Wr = "_Overlay_pgin5_1", Br = "_Root_pgin5_12", Hr = "_CommandList_pgin5_25", Ur = "_Results_pgin5_30", zr = "_Message_pgin5_35", Ce = {
1430
+ Overlay: Wr,
1431
+ Root: Br,
1432
+ CommandList: Hr,
1433
+ Results: Ur,
1434
+ Message: zr
1434
1435
  };
1435
- function Wr(e) {
1436
+ function Fr(e) {
1436
1437
  return e.id;
1437
1438
  }
1438
- function Fe(e, t) {
1439
- const n = e.toLowerCase(), r = t.toLowerCase();
1439
+ function qe(e, t) {
1440
+ const r = e.toLowerCase(), n = t.toLowerCase();
1440
1441
  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;
1458
- 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;
1478
- });
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();
1442
+ for (let u = 0; u < r.length && c < n.length; u++)
1443
+ r[u] === n[c] && c++;
1444
+ return c === n.length;
1488
1445
  }
1489
1446
  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
1447
+ return qe(e.label, t) || (e.description ? qe(e.description, t) : !1) || (e.group ? qe(e.group, t) : !1);
1448
+ }
1449
+ const Yr = [];
1450
+ function qr(e) {
1451
+ const t = be.c(7), {
1452
+ inputRef: r
1453
+ } = e, {
1454
+ listId: n
1455
+ } = Gt(), c = Xt(), {
1456
+ activeKey: u
1457
+ } = Ut(c.subscribe, c.getSnapshot, c.getSnapshot), l = u != null ? `${n}-item-${u}` : void 0;
1458
+ let a, p;
1459
+ t[0] !== l || t[1] !== r ? (a = () => {
1460
+ l && r.current?.ownerDocument.getElementById(l)?.scrollIntoView?.({
1461
+ block: "nearest"
1462
+ });
1463
+ }, p = [l, r], t[0] = l, t[1] = r, t[2] = a, t[3] = p) : (a = t[2], p = t[3]), bt(a, p);
1464
+ let g;
1465
+ return t[4] !== l || t[5] !== r ? (g = /* @__PURE__ */ S.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] = g) : g = t[6], g;
1466
+ }
1467
+ const Jr = ve(function({
1468
+ open: t,
1469
+ onClose: r,
1470
+ commands: n,
1471
+ onSelect: c,
1472
+ placeholder: u = "Type a command…",
1473
+ loading: l = !1,
1474
+ error: a
1475
+ }, p) {
1476
+ const g = Y(null), x = Y(null), M = Y(!1), m = a !== void 0, T = Ae(() => n.filter((C) => !C.disabled), [n]), R = m || l ? Yr : T, H = Ae(() => {
1477
+ const C = /* @__PURE__ */ new Map(), I = /* @__PURE__ */ new Map();
1478
+ let W, U = -1;
1479
+ for (const P of R) {
1480
+ const F = P.group || "Other commands";
1481
+ F !== W && U++, W = F;
1482
+ const D = String(U);
1483
+ C.set(P.id, D), I.set(D, F);
1484
+ }
1485
+ return {
1486
+ keys: C,
1487
+ labels: I,
1488
+ grouped: R.some((P) => P.group)
1489
+ };
1490
+ }, [R]), N = Ne((C) => H.keys.get(C.id), [H]), q = Ne((C) => H.labels.get(C), [H]);
1491
+ return bt(() => {
1492
+ if (!t) return;
1493
+ const C = g.current, I = C?.ownerDocument, W = I?.activeElement;
1494
+ return M.current = !1, x.current?.focus({
1495
+ preventScroll: !0
1496
+ }), () => {
1497
+ W instanceof HTMLElement && W.isConnected && (I?.activeElement === I?.body || C?.contains(I?.activeElement ?? null)) && W.focus({
1498
+ preventScroll: !0
1499
+ });
1500
+ };
1501
+ }, [t]), t ? /* @__PURE__ */ S.jsx("div", { role: "presentation", className: Ce.Overlay, onClick: r, "data-testid": "command-palette-overlay", children: /* @__PURE__ */ S.jsx("div", { ref: (C) => {
1502
+ if (g.current = C, typeof p == "function") return p(C);
1503
+ p && (p.current = C);
1504
+ }, className: Ce.Root, onClick: (C) => C.stopPropagation(), onMouseDown: (C) => {
1505
+ C.button === 0 && C.target instanceof Element && !C.target.closest("input, button") && (C.preventDefault(), x.current?.focus({
1506
+ preventScroll: !0
1507
+ }));
1508
+ }, onKeyDown: (C) => C.stopPropagation(), onCompositionStartCapture: () => {
1509
+ M.current = !0;
1510
+ }, onCompositionEndCapture: () => {
1511
+ M.current = !1;
1512
+ }, onKeyDownCapture: (C) => {
1513
+ if (M.current || C.nativeEvent.isComposing || C.keyCode === 229) {
1514
+ C.stopPropagation();
1515
+ return;
1516
+ }
1517
+ if (C.target instanceof HTMLButtonElement && C.key !== "Escape" && C.key !== "Tab") {
1518
+ C.stopPropagation();
1519
+ return;
1520
+ }
1521
+ if (C.key === "Escape")
1522
+ C.preventDefault(), C.stopPropagation(), r();
1523
+ else if (C.key === "Tab") {
1524
+ const I = g.current?.querySelectorAll("input:not(:disabled), button:not(:disabled)");
1525
+ if (!I?.length) return;
1526
+ const W = I[0], U = I[I.length - 1], P = W.ownerDocument.activeElement;
1527
+ (C.shiftKey && P === W || !C.shiftKey && P === U) && (C.preventDefault(), (C.shiftKey ? U : W).focus());
1528
+ }
1529
+ }, role: "dialog", "aria-modal": "true", "aria-label": "Command palette", "data-testid": "command-palette", children: /* @__PURE__ */ S.jsxs(ue.Root, { className: Ce.CommandList, role: "presentation", "aria-expanded": void 0, "aria-haspopup": void 0, "aria-owns": void 0, "aria-activedescendant": void 0, items: R, itemKey: Fr, renderItem: (C, I) => /* @__PURE__ */ S.jsxs(ue.Item, { itemKey: I.key, "data-testid": `command-item-${C.id}`, children: [
1530
+ C.icon && /* @__PURE__ */ S.jsx(ue.ItemIcon, { "aria-hidden": "true", children: C.icon }),
1531
+ /* @__PURE__ */ S.jsx(ue.ItemLabel, { children: C.label }),
1532
+ C.description && /* @__PURE__ */ S.jsx(ue.ItemDescription, { children: C.description }),
1533
+ C.shortcut && /* @__PURE__ */ S.jsx(ue.ItemShortcut, { children: C.shortcut })
1534
+ ] }), filterFn: Vr, sortByScore: !1, groupBy: H.grouped ? N : void 0, groupLabel: q, loading: l && !m, onAction: (C) => {
1535
+ const I = R.find((W) => W.id === C && !W.disabled);
1536
+ I && (c(I), r());
1537
+ }, onDismiss: r, placeholder: u, density: "compact", children: [
1538
+ /* @__PURE__ */ S.jsx(qr, { inputRef: x }),
1539
+ /* @__PURE__ */ S.jsx(ue.Results, { className: Ce.Results, "aria-label": "Commands", "aria-busy": l && !m, "data-testid": "command-palette-list" }),
1540
+ m ? /* @__PURE__ */ S.jsx("div", { role: "alert", className: Ce.Message, "data-testid": "command-palette-error", children: a || "Unable to load commands." }) : /* @__PURE__ */ S.jsxs(S.Fragment, { children: [
1541
+ /* @__PURE__ */ S.jsx(ue.Loading, { role: "status", "data-testid": "command-palette-loading", children: "Loading commands…" }),
1542
+ /* @__PURE__ */ S.jsx(ue.Empty, { role: "status", "data-testid": "command-palette-empty", children: "No matching commands" })
1543
+ ] })
1544
+ ] }) }) }) : null;
1545
+ });
1546
+ Jr.displayName = "CommandPalette";
1547
+ const Gr = "_Root_1b5sv_1", Xr = "_Toolbar_1b5sv_12", Qr = "_SearchInput_1b5sv_20", Zr = "_CopyButton_1b5sv_41", Kr = "_Tree_1b5sv_55", en = "_Node_1b5sv_59", tn = "_Row_1b5sv_63", rn = "_RowHighlight_1b5sv_76", nn = "_Chevron_1b5sv_80", on = "_ChevronExpanded_1b5sv_93", sn = "_ChevronSpacer_1b5sv_97", an = "_Key_1b5sv_103", cn = "_Colon_1b5sv_107", ln = "_Value_1b5sv_111", un = "_Preview_1b5sv_129", dn = "_Comma_1b5sv_134", re = {
1548
+ Root: Gr,
1549
+ Toolbar: Xr,
1550
+ SearchInput: Qr,
1551
+ CopyButton: Zr,
1552
+ Tree: Kr,
1553
+ Node: en,
1554
+ Row: tn,
1555
+ RowHighlight: rn,
1556
+ Chevron: nn,
1557
+ ChevronExpanded: on,
1558
+ ChevronSpacer: sn,
1559
+ Key: an,
1560
+ Colon: cn,
1561
+ Value: ln,
1562
+ Preview: un,
1563
+ Comma: dn
1520
1564
  };
1521
- function Ye(...e) {
1565
+ function Je(...e) {
1522
1566
  return e.filter(Boolean).join(" ");
1523
1567
  }
1524
- function kt(e) {
1568
+ function xt(e) {
1525
1569
  return e === null ? "null" : e === void 0 ? "undefined" : Array.isArray(e) ? "array" : typeof e;
1526
1570
  }
1527
- function un(e) {
1571
+ function fn(e) {
1528
1572
  return e === null ? "null" : e === void 0 ? "undefined" : typeof e == "string" ? JSON.stringify(e) : String(e);
1529
1573
  }
1530
- function dn(e, t) {
1574
+ function mn(e, t) {
1531
1575
  return typeof e == "boolean" ? e : t < e;
1532
1576
  }
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));
1577
+ function Ct(e, t, r) {
1578
+ const n = r.toLowerCase();
1579
+ 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
1580
  }
1537
- function Re(e) {
1581
+ function Se(e) {
1538
1582
  return e !== null && (typeof e == "object" || typeof e == "function");
1539
1583
  }
1540
- function Ct(e, t, n, r) {
1584
+ function Rt(e, t, r, n) {
1541
1585
  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)
1586
+ const c = xt(e);
1587
+ if (c !== "object" && c !== "array" || e == null || Se(e) && r.has(e)) return !1;
1588
+ if (Se(e) && n.has(e)) return n.get(e);
1589
+ const u = {
1590
+ has: (a) => a === e || r.has(a)
1547
1591
  };
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;
1592
+ let l = !1;
1593
+ for (const [a, p] of Object.entries(e))
1594
+ if (Ct(a, p, t) || Rt(p, t, u, n)) {
1595
+ l = !0;
1552
1596
  break;
1553
1597
  }
1554
- return Re(e) && r.set(e, f), f;
1598
+ return Se(e) && n.set(e, l), l;
1555
1599
  }
1556
- function Rt(e) {
1600
+ function St(e) {
1557
1601
  const t = be.c(80), {
1558
- nodeKey: n,
1559
- value: r,
1602
+ nodeKey: r,
1603
+ value: n,
1560
1604
  depth: c,
1561
- defaultExpanded: l,
1562
- searchQuery: f,
1605
+ defaultExpanded: u,
1606
+ searchQuery: l,
1563
1607
  isLast: a,
1564
- ancestors: v,
1608
+ ancestors: p,
1565
1609
  searchCache: g
1566
1610
  } = e;
1567
1611
  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;
1573
- 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);
1583
- let P;
1612
+ t[0] !== n ? (x = xt(n), t[0] = n, t[1] = x) : x = t[1];
1613
+ const M = x, m = M === "object" || M === "array";
1614
+ let T;
1615
+ t[2] !== p || t[3] !== m || t[4] !== n ? (T = m && Se(n) && p.has(n), t[2] = p, t[3] = m, t[4] = n, t[5] = T) : T = t[5];
1616
+ const R = T;
1617
+ let H;
1618
+ t[6] !== u || t[7] !== c || t[8] !== R || t[9] !== m ? (H = () => m && !R && mn(u, c), t[6] = u, t[7] = c, t[8] = R, t[9] = m, t[10] = H) : H = t[10];
1619
+ const [N, q] = Pe(H), C = Y(!1), I = Y(!1);
1620
+ let W;
1621
+ t[11] !== p || t[12] !== g || t[13] !== l || t[14] !== n ? (W = l ? Rt(n, l, p, g) : !1, t[11] = p, t[12] = g, t[13] = l, t[14] = n, t[15] = W) : W = t[15];
1622
+ const U = W;
1623
+ let P, F;
1624
+ t[16] !== N || t[17] !== U || t[18] !== R || t[19] !== m || t[20] !== l ? (P = () => {
1625
+ l && U && m && !R && !N && (C.current || (I.current = N), C.current = !0, q(!0)), C.current && (!l || !U) && (C.current = !1, q(I.current));
1626
+ }, F = [l, U, m, R, N], t[16] = N, t[17] = U, t[18] = R, t[19] = m, t[20] = l, t[21] = P, t[22] = F) : (P = t[21], F = t[22]), V(P, F);
1627
+ let D;
1584
1628
  e: {
1585
- if (!h || !Re(r) || C) {
1586
- P = v;
1629
+ if (!m || !Se(n) || R) {
1630
+ D = p;
1587
1631
  break e;
1588
1632
  }
1589
1633
  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;
1634
+ t[23] !== p || t[24] !== n ? (G = {
1635
+ has: (ce) => ce === n || p.has(ce)
1636
+ }, t[23] = p, t[24] = n, t[25] = G) : G = t[25], D = G;
1593
1637
  }
1594
- const X = P;
1638
+ const X = D;
1595
1639
  let ne;
1596
1640
  e: {
1597
- if (!h || r === null || r === void 0 || C) {
1641
+ if (!m || n === null || n === void 0 || R) {
1598
1642
  let ce;
1599
1643
  t[26] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (ce = [], t[26] = ce) : ce = t[26], ne = ce;
1600
1644
  break e;
1601
1645
  }
1602
1646
  let G;
1603
- t[27] !== r ? (G = Object.entries(r), t[27] = r, t[28] = G) : G = t[28], ne = G;
1647
+ t[27] !== n ? (G = Object.entries(n), t[27] = n, t[28] = G) : G = t[28], ne = G;
1604
1648
  }
1605
- const y = ne;
1649
+ const v = ne;
1606
1650
  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;
1651
+ t[29] !== R || t[30] !== m ? (s = () => {
1652
+ m && !R && q(hn);
1653
+ }, t[29] = R, t[30] = m, t[31] = s) : s = t[31];
1654
+ const _ = s;
1611
1655
  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`;
1656
+ t[32] !== r || t[33] !== l || t[34] !== n ? (k = l && Ct(r, n, l), t[32] = r, t[33] = l, t[34] = n, t[35] = k) : k = t[35];
1657
+ const i = k, d = R ? "[Circular]" : m ? M === "array" ? `Array(${n.length})` : `{${v.length}}` : null, h = i && re.RowHighlight;
1658
+ let f;
1659
+ t[36] !== h ? (f = Je(re.Row, h), t[36] = h, t[37] = f) : f = t[37];
1660
+ const y = `${c * 16}px`;
1617
1661
  let b;
1618
- t[38] !== p ? (b = {
1619
- "--_inspector-depth-indent": p
1620
- }, t[38] = p, t[39] = b) : b = t[39];
1662
+ t[38] !== y ? (b = {
1663
+ "--_inspector-depth-indent": y
1664
+ }, t[38] = y, t[39] = b) : b = t[39];
1621
1665
  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];
1666
+ let w;
1667
+ t[40] !== _ ? (w = (G) => {
1668
+ (G.key === "Enter" || G.key === " ") && (G.preventDefault(), _());
1669
+ }, t[40] = _, t[41] = w) : w = t[41];
1670
+ const A = m && !R ? N : void 0, j = `inspector-node-${r}`;
1671
+ let B;
1672
+ t[42] !== N || t[43] !== R || t[44] !== m ? (B = m && !R ? /* @__PURE__ */ S.jsx("span", { className: Je(re.Chevron, N && re.ChevronExpanded), children: "▸" }) : /* @__PURE__ */ S.jsx("span", { className: re.ChevronSpacer }), t[42] = N, t[43] = R, t[44] = m, t[45] = B) : B = t[45];
1631
1673
  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];
1633
- 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];
1674
+ t[46] !== r ? (O = /* @__PURE__ */ S.jsx("span", { className: re.Key, children: r }), t[46] = r, t[47] = O) : O = t[47];
1675
+ let L;
1676
+ t[48] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (L = /* @__PURE__ */ S.jsx("span", { className: re.Colon, children: ": " }), t[48] = L) : L = t[48];
1677
+ let J;
1678
+ t[49] !== m || t[50] !== d || t[51] !== M || t[52] !== n ? (J = m ? /* @__PURE__ */ S.jsx("span", { className: re.Preview, children: d }) : /* @__PURE__ */ S.jsx("span", { className: re.Value, "data-type": M, children: fn(n) }), t[49] = m, t[50] = d, t[51] = M, t[52] = n, t[53] = J) : J = t[53];
1635
1679
  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];
1680
+ t[54] !== N || t[55] !== a ? (Q = !a && !N && /* @__PURE__ */ S.jsx("span", { className: re.Comma, children: "," }), t[54] = N, t[55] = a, t[56] = Q) : Q = t[56];
1637
1681
  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,
1682
+ t[57] !== f || t[58] !== o || t[59] !== w || t[60] !== A || t[61] !== j || t[62] !== B || t[63] !== O || t[64] !== J || t[65] !== Q || t[66] !== _ ? (oe = /* @__PURE__ */ S.jsxs("div", { className: f, style: o, onClick: _, onKeyDown: w, tabIndex: 0, role: "treeitem", "aria-expanded": A, "data-testid": j, children: [
1683
+ B,
1641
1684
  O,
1642
- F,
1685
+ L,
1686
+ J,
1643
1687
  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];
1688
+ ] }), t[57] = f, t[58] = o, t[59] = w, t[60] = A, t[61] = j, t[62] = B, t[63] = O, t[64] = J, t[65] = Q, t[66] = _, t[67] = oe) : oe = t[67];
1645
1689
  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];
1690
+ t[68] !== X || t[69] !== u || t[70] !== c || t[71] !== v || t[72] !== N || t[73] !== g || t[74] !== l ? (le = N && v.map((G, ce) => {
1691
+ const [ee, Le] = G;
1692
+ return /* @__PURE__ */ S.jsx(St, { nodeKey: ee, value: Le, depth: c + 1, defaultExpanded: u, searchQuery: l, isLast: ce === v.length - 1, ancestors: X, searchCache: g }, ee);
1693
+ }), t[68] = X, t[69] = u, t[70] = c, t[71] = v, t[72] = N, t[73] = g, t[74] = l, t[75] = le) : le = t[75];
1650
1694
  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: [
1695
+ return t[76] !== c || t[77] !== oe || t[78] !== le ? (ae = /* @__PURE__ */ S.jsxs("div", { className: re.Node, "data-depth": c, children: [
1652
1696
  oe,
1653
1697
  le
1654
1698
  ] }), t[76] = c, t[77] = oe, t[78] = le, t[79] = ae) : ae = t[79], ae;
1655
1699
  }
1656
- function fn(e) {
1700
+ function hn(e) {
1657
1701
  return !e;
1658
1702
  }
1659
- const hn = /* @__PURE__ */ new WeakSet(), mn = ve(function({
1703
+ const gn = /* @__PURE__ */ new WeakSet(), pn = ve(function({
1660
1704
  data: t,
1661
- format: n = "json",
1662
- defaultExpanded: r = 1,
1705
+ format: r = "json",
1706
+ defaultExpanded: n = 1,
1663
1707
  searchable: c = !1,
1664
- copyable: l = !1,
1665
- className: f,
1708
+ copyable: u = !1,
1709
+ className: l,
1666
1710
  ...a
1667
- }, v) {
1668
- const [g, x] = Ne(""), A = vt(async () => {
1711
+ }, p) {
1712
+ const [g, x] = Pe(""), M = Ne(async () => {
1669
1713
  try {
1670
- let C;
1671
- n === "yaml" ? C = qe(t) : C = gn(t), await navigator.clipboard.writeText(C);
1714
+ let R;
1715
+ r === "yaml" ? R = Ge(t) : R = yn(t), await navigator.clipboard.writeText(R);
1672
1716
  } catch {
1673
1717
  }
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" })
1718
+ }, [t, r]), m = gn, T = Ae(() => /* @__PURE__ */ new WeakMap(), [g]);
1719
+ return /* @__PURE__ */ S.jsxs("div", { ref: p, className: Je(re.Root, l), "data-testid": "object-inspector", "data-format": r, ...a, children: [
1720
+ (c || u) && /* @__PURE__ */ S.jsxs("div", { className: re.Toolbar, children: [
1721
+ c && /* @__PURE__ */ S.jsx("input", { className: re.SearchInput, type: "text", value: g, onChange: (R) => x(R.target.value), placeholder: "Search keys/values…", "aria-label": "Search object", "data-testid": "inspector-search" }),
1722
+ u && /* @__PURE__ */ S.jsx("button", { className: re.CopyButton, onClick: M, "data-testid": "inspector-copy", type: "button", children: "Copy" })
1679
1723
  ] }),
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 }) })
1724
+ /* @__PURE__ */ S.jsx("div", { className: re.Tree, role: "tree", "data-testid": "inspector-tree", children: /* @__PURE__ */ S.jsx(St, { nodeKey: "root", value: t, depth: 0, defaultExpanded: n, searchQuery: g, isLast: !0, ancestors: m, searchCache: T }) })
1681
1725
  ] });
1682
1726
  });
1683
- mn.displayName = "ObjectInspector";
1684
- function gn(e) {
1727
+ pn.displayName = "ObjectInspector";
1728
+ function yn(e) {
1685
1729
  const t = [];
1686
- return JSON.stringify(e, function(n, r) {
1687
- if (typeof r != "object" || r === null) return r;
1730
+ return JSON.stringify(e, function(r, n) {
1731
+ if (typeof n != "object" || n === null) return n;
1688
1732
  for (; t.length > 0 && t[t.length - 1] !== this; )
1689
1733
  t.pop();
1690
- return t.includes(r) ? "[Circular]" : (t.push(r), r);
1734
+ return t.includes(n) ? "[Circular]" : (t.push(n), n);
1691
1735
  }, 2);
1692
1736
  }
1693
- function St(e) {
1737
+ function Et(e) {
1694
1738
  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
1739
  }
1696
1740
  function Tt(e) {
1697
1741
  return '"' + e.replace(/\\/g, "\\\\").replace(/"/g, '\\"').replace(/\n/g, "\\n").replace(/\t/g, "\\t").replace(/\r/g, "\\r") + '"';
1698
1742
  }
1699
- function pn(e, t) {
1700
- const n = " ".repeat(t);
1743
+ function vn(e, t) {
1744
+ const r = " ".repeat(t);
1701
1745
  return e.includes(`
1702
1746
  `) ? `|
1703
- ${n} ${e.split(`
1747
+ ${r} ${e.split(`
1704
1748
  `).join(`
1705
- ${n} `)}` : St(e) ? Tt(e) : e;
1749
+ ${r} `)}` : Et(e) ? Tt(e) : e;
1706
1750
  }
1707
- function qe(e, t = 0, n) {
1708
- const r = " ".repeat(t);
1751
+ function Ge(e, t = 0, r) {
1752
+ const n = " ".repeat(t);
1709
1753
  if (e === null || e === void 0) return "null";
1710
- if (typeof e == "string") return pn(e, t);
1754
+ if (typeof e == "string") return vn(e, t);
1711
1755
  if (typeof e == "number" || typeof e == "boolean") return String(e);
1712
1756
  if (typeof e == "object") {
1713
- const c = n ?? [];
1757
+ const c = r ?? [];
1714
1758
  if (c.includes(e)) return '"[Circular]"';
1715
- const l = [...c, e];
1759
+ const u = [...c, e];
1716
1760
  if (Array.isArray(e))
1717
- return e.length === 0 ? "[]" : e.map((a) => `${r}- ${qe(a, t + 1, l).trimStart()}`).join(`
1761
+ return e.length === 0 ? "[]" : e.map((a) => `${n}- ${Ge(a, t + 1, u).trimStart()}`).join(`
1718
1762
  `);
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}`;
1763
+ const l = Object.entries(e);
1764
+ return l.length === 0 ? "{}" : l.map(([a, p]) => {
1765
+ const g = Et(a) ? Tt(a) : a, x = Ge(p, t + 1, u);
1766
+ return typeof p == "object" && p !== null && (Array.isArray(p) ? p.length > 0 : Object.keys(p).length > 0) ? `${n}${g}:
1767
+ ${x}` : `${n}${g}: ${x}`;
1724
1768
  }).join(`
1725
1769
  `);
1726
1770
  }
1727
1771
  return String(e);
1728
1772
  }
1729
- var Et;
1773
+ var jt;
1730
1774
  (() => {
1731
- var e = { 975: (y) => {
1775
+ var e = { 975: (v) => {
1732
1776
  function s(i) {
1733
1777
  if (typeof i != "string") throw new TypeError("Path must be a string. Received " + JSON.stringify(i));
1734
1778
  }
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(_);
1779
+ function _(i, d) {
1780
+ for (var h, f = "", y = 0, b = -1, o = 0, w = 0; w <= i.length; ++w) {
1781
+ if (w < i.length) h = i.charCodeAt(w);
1738
1782
  else {
1739
- if (m === 47) break;
1740
- m = 47;
1783
+ if (h === 47) break;
1784
+ h = 47;
1741
1785
  }
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;
1786
+ if (h === 47) {
1787
+ if (!(b === w - 1 || o === 1)) if (b !== w - 1 && o === 2) {
1788
+ if (f.length < 2 || y !== 2 || f.charCodeAt(f.length - 1) !== 46 || f.charCodeAt(f.length - 2) !== 46) {
1789
+ if (f.length > 2) {
1790
+ var A = f.lastIndexOf("/");
1791
+ if (A !== f.length - 1) {
1792
+ A === -1 ? (f = "", y = 0) : y = (f = f.slice(0, A)).length - 1 - f.lastIndexOf("/"), b = w, o = 0;
1749
1793
  continue;
1750
1794
  }
1751
- } else if (d.length === 2 || d.length === 1) {
1752
- d = "", p = 0, b = _, o = 0;
1795
+ } else if (f.length === 2 || f.length === 1) {
1796
+ f = "", y = 0, b = w, o = 0;
1753
1797
  continue;
1754
1798
  }
1755
1799
  }
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;
1800
+ d && (f.length > 0 ? f += "/.." : f = "..", y = 2);
1801
+ } else f.length > 0 ? f += "/" + i.slice(b + 1, w) : f = i.slice(b + 1, w), y = w - b - 1;
1802
+ b = w, o = 0;
1803
+ } else h === 46 && o !== -1 ? ++o : o = -1;
1760
1804
  }
1761
- return d;
1805
+ return f;
1762
1806
  }
1763
1807
  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);
1808
+ for (var i, d = "", h = !1, f = arguments.length - 1; f >= -1 && !h; f--) {
1809
+ var y;
1810
+ f >= 0 ? y = arguments[f] : (i === void 0 && (i = process.cwd()), y = i), s(y), y.length !== 0 && (d = y + "/" + d, h = y.charCodeAt(0) === 47);
1767
1811
  }
1768
- return u = w(u, !m), m ? u.length > 0 ? "/" + u : "/" : u.length > 0 ? u : ".";
1812
+ return d = _(d, !h), h ? d.length > 0 ? "/" + d : "/" : d.length > 0 ? d : ".";
1769
1813
  }, normalize: function(i) {
1770
1814
  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;
1815
+ var d = i.charCodeAt(0) === 47, h = i.charCodeAt(i.length - 1) === 47;
1816
+ return (i = _(i, !d)).length !== 0 || d || (i = "."), i.length > 0 && h && (i += "/"), d ? "/" + i : i;
1773
1817
  }, isAbsolute: function(i) {
1774
1818
  return s(i), i.length > 0 && i.charCodeAt(0) === 47;
1775
1819
  }, join: function() {
1776
1820
  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);
1821
+ for (var i, d = 0; d < arguments.length; ++d) {
1822
+ var h = arguments[d];
1823
+ s(h), h.length > 0 && (i === void 0 ? i = h : i += "/" + h);
1780
1824
  }
1781
1825
  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));
1826
+ }, relative: function(i, d) {
1827
+ if (s(i), s(d), i === d || (i = k.resolve(i)) === (d = k.resolve(d))) return "";
1828
+ for (var h = 1; h < i.length && i.charCodeAt(h) === 47; ++h) ;
1829
+ for (var f = i.length, y = f - h, b = 1; b < d.length && d.charCodeAt(b) === 47; ++b) ;
1830
+ for (var o = d.length - b, w = y < o ? y : o, A = -1, j = 0; j <= w; ++j) {
1831
+ if (j === w) {
1832
+ if (o > w) {
1833
+ if (d.charCodeAt(b + j) === 47) return d.slice(b + j + 1);
1834
+ if (j === 0) return d.slice(b + j);
1835
+ } else y > w && (i.charCodeAt(h + j) === 47 ? A = j : j === 0 && (A = 0));
1792
1836
  break;
1793
1837
  }
1794
- var $ = i.charCodeAt(m + E);
1795
- if ($ !== u.charCodeAt(b + E)) break;
1796
- $ === 47 && (M = E);
1838
+ var B = i.charCodeAt(h + j);
1839
+ if (B !== d.charCodeAt(b + j)) break;
1840
+ B === 47 && (A = j);
1797
1841
  }
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));
1842
+ var O = "";
1843
+ for (j = h + A + 1; j <= f; ++j) j !== f && i.charCodeAt(j) !== 47 || (O.length === 0 ? O += ".." : O += "/..");
1844
+ return O.length > 0 ? O + d.slice(b + A) : (b += A, d.charCodeAt(b) === 47 && ++b, d.slice(b));
1801
1845
  }, _makeLong: function(i) {
1802
1846
  return i;
1803
1847
  }, dirname: function(i) {
1804
1848
  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;
1849
+ for (var d = i.charCodeAt(0), h = d === 47, f = -1, y = !0, b = i.length - 1; b >= 1; --b) if ((d = i.charCodeAt(b)) === 47) {
1850
+ if (!y) {
1851
+ f = b;
1808
1852
  break;
1809
1853
  }
1810
- } else p = !1;
1811
- return d === -1 ? m ? "/" : "." : m && d === 1 ? "//" : i.slice(0, d);
1812
- }, basename: function(i, u) {
1813
- if (u !== void 0 && typeof u != "string") throw new TypeError('"ext" argument must be a string');
1854
+ } else y = !1;
1855
+ return f === -1 ? h ? "/" : "." : h && f === 1 ? "//" : i.slice(0, f);
1856
+ }, basename: function(i, d) {
1857
+ if (d !== void 0 && typeof d != "string") throw new TypeError('"ext" argument must be a string');
1814
1858
  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) {
1859
+ var h, f = 0, y = -1, b = !0;
1860
+ if (d !== void 0 && d.length > 0 && d.length <= i.length) {
1861
+ if (d.length === i.length && d === i) return "";
1862
+ var o = d.length - 1, w = -1;
1863
+ for (h = i.length - 1; h >= 0; --h) {
1864
+ var A = i.charCodeAt(h);
1865
+ if (A === 47) {
1822
1866
  if (!b) {
1823
- d = m + 1;
1867
+ f = h + 1;
1824
1868
  break;
1825
1869
  }
1826
- } else _ === -1 && (b = !1, _ = m + 1), o >= 0 && (M === u.charCodeAt(o) ? --o == -1 && (p = m) : (o = -1, p = _));
1870
+ } else w === -1 && (b = !1, w = h + 1), o >= 0 && (A === d.charCodeAt(o) ? --o == -1 && (y = h) : (o = -1, y = w));
1827
1871
  }
1828
- return d === p ? p = _ : p === -1 && (p = i.length), i.slice(d, p);
1872
+ return f === y ? y = w : y === -1 && (y = i.length), i.slice(f, y);
1829
1873
  }
1830
- for (m = i.length - 1; m >= 0; --m) if (i.charCodeAt(m) === 47) {
1874
+ for (h = i.length - 1; h >= 0; --h) if (i.charCodeAt(h) === 47) {
1831
1875
  if (!b) {
1832
- d = m + 1;
1876
+ f = h + 1;
1833
1877
  break;
1834
1878
  }
1835
- } else p === -1 && (b = !1, p = m + 1);
1836
- return p === -1 ? "" : i.slice(d, p);
1879
+ } else y === -1 && (b = !1, y = h + 1);
1880
+ return y === -1 ? "" : i.slice(f, y);
1837
1881
  }, extname: function(i) {
1838
1882
  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;
1883
+ for (var d = -1, h = 0, f = -1, y = !0, b = 0, o = i.length - 1; o >= 0; --o) {
1884
+ var w = i.charCodeAt(o);
1885
+ if (w !== 47) f === -1 && (y = !1, f = o + 1), w === 46 ? d === -1 ? d = o : b !== 1 && (b = 1) : d !== -1 && (b = -1);
1886
+ else if (!y) {
1887
+ h = o + 1;
1844
1888
  break;
1845
1889
  }
1846
1890
  }
1847
- return u === -1 || d === -1 || b === 0 || b === 1 && u === d - 1 && u === m + 1 ? "" : i.slice(u, d);
1891
+ return d === -1 || f === -1 || b === 0 || b === 1 && d === f - 1 && d === h + 1 ? "" : i.slice(d, f);
1848
1892
  }, format: function(i) {
1849
1893
  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;
1894
+ return (function(d, h) {
1895
+ var f = h.dir || h.root, y = h.base || (h.name || "") + (h.ext || "");
1896
+ return f ? f === h.root ? f + y : f + "/" + y : y;
1853
1897
  })(0, i);
1854
1898
  }, parse: function(i) {
1855
1899
  s(i);
1856
- 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;
1900
+ var d = { root: "", dir: "", base: "", ext: "", name: "" };
1901
+ if (i.length === 0) return d;
1902
+ var h, f = i.charCodeAt(0), y = f === 47;
1903
+ y ? (d.root = "/", h = 1) : h = 0;
1904
+ for (var b = -1, o = 0, w = -1, A = !0, j = i.length - 1, B = 0; j >= h; --j) if ((f = i.charCodeAt(j)) !== 47) w === -1 && (A = !1, w = j + 1), f === 46 ? b === -1 ? b = j : B !== 1 && (B = 1) : b !== -1 && (B = -1);
1905
+ else if (!A) {
1906
+ o = j + 1;
1863
1907
  break;
1864
1908
  }
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;
1909
+ return b === -1 || w === -1 || B === 0 || B === 1 && b === w - 1 && b === o + 1 ? w !== -1 && (d.base = d.name = o === 0 && y ? i.slice(1, w) : i.slice(o, w)) : (o === 0 && y ? (d.name = i.slice(1, b), d.base = i.slice(1, w)) : (d.name = i.slice(o, b), d.base = i.slice(o, w)), d.ext = i.slice(b, w)), o > 0 ? d.dir = i.slice(0, o - 1) : y && (d.dir = "/"), d;
1866
1910
  }, sep: "/", delimiter: ":", win32: null, posix: null };
1867
- k.posix = k, y.exports = k;
1911
+ k.posix = k, v.exports = k;
1868
1912
  } }, t = {};
1869
- function n(y) {
1870
- var s = t[y];
1913
+ function r(v) {
1914
+ var s = t[v];
1871
1915
  if (s !== void 0) return s.exports;
1872
- var w = t[y] = { exports: {} };
1873
- return e[y](w, w.exports, n), w.exports;
1916
+ var _ = t[v] = { exports: {} };
1917
+ return e[v](_, _.exports, r), _.exports;
1874
1918
  }
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 });
1919
+ r.d = (v, s) => {
1920
+ for (var _ in s) r.o(s, _) && !r.o(v, _) && Object.defineProperty(v, _, { enumerable: !0, get: s[_] });
1921
+ }, r.o = (v, s) => Object.prototype.hasOwnProperty.call(v, s), r.r = (v) => {
1922
+ typeof Symbol < "u" && Symbol.toStringTag && Object.defineProperty(v, Symbol.toStringTag, { value: "Module" }), Object.defineProperty(v, "__esModule", { value: !0 });
1879
1923
  };
1880
- var r = {};
1924
+ var n = {};
1881
1925
  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 ("//")');
1926
+ r.r(n), r.d(n, { URI: () => m, Utils: () => ne }), typeof process == "object" ? c = process.platform === "win32" : typeof navigator == "object" && (c = navigator.userAgent.indexOf("Windows") >= 0);
1927
+ const u = /^\w[\w\d+.-]*$/, l = /^\//, a = /^\/\//;
1928
+ function p(v, s) {
1929
+ if (!v.scheme && s) throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${v.authority}", path: "${v.path}", query: "${v.query}", fragment: "${v.fragment}"}`);
1930
+ if (v.scheme && !u.test(v.scheme)) throw new Error("[UriError]: Scheme contains illegal characters.");
1931
+ if (v.path) {
1932
+ if (v.authority) {
1933
+ if (!l.test(v.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');
1934
+ } else if (a.test(v.path)) throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")');
1891
1935
  }
1892
1936
  }
1893
- const g = "", x = "/", A = /^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;
1894
- class h {
1937
+ const g = "", x = "/", M = /^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;
1938
+ class m {
1895
1939
  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";
1940
+ return s instanceof m || !!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";
1897
1941
  }
1898
1942
  scheme;
1899
1943
  authority;
1900
1944
  path;
1901
1945
  query;
1902
1946
  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) {
1947
+ constructor(s, _, k, i, d, h = !1) {
1948
+ 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(f, y) {
1949
+ return f || y ? f : "file";
1950
+ })(s, h), this.authority = _ || g, this.path = (function(f, y) {
1951
+ switch (f) {
1908
1952
  case "https":
1909
1953
  case "http":
1910
1954
  case "file":
1911
- p ? p[0] !== x && (p = x + p) : p = x;
1955
+ y ? y[0] !== x && (y = x + y) : y = x;
1912
1956
  }
1913
- return p;
1914
- })(this.scheme, k || g), this.query = i || g, this.fragment = u || g, v(this, m));
1957
+ return y;
1958
+ })(this.scheme, k || g), this.query = i || g, this.fragment = d || g, p(this, h));
1915
1959
  }
1916
1960
  get fsPath() {
1917
- return H(this);
1961
+ return C(this);
1918
1962
  }
1919
1963
  with(s) {
1920
1964
  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);
1965
+ let { scheme: _, authority: k, path: i, query: d, fragment: h } = s;
1966
+ return _ === void 0 ? _ = this.scheme : _ === null && (_ = g), k === void 0 ? k = this.authority : k === null && (k = g), i === void 0 ? i = this.path : i === null && (i = g), d === void 0 ? d = this.query : d === null && (d = g), h === void 0 ? h = this.fragment : h === null && (h = g), _ === this.scheme && k === this.authority && i === this.path && d === this.query && h === this.fragment ? this : new R(_, k, i, d, h);
1923
1967
  }
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);
1968
+ static parse(s, _ = !1) {
1969
+ const k = M.exec(s);
1970
+ return k ? new R(k[2] || g, P(k[4] || g), P(k[5] || g), P(k[7] || g), P(k[9] || g), _) : new R(g, g, g, g, g);
1927
1971
  }
1928
1972
  static file(s) {
1929
- let w = g;
1973
+ let _ = g;
1930
1974
  if (c && (s = s.replace(/\\/g, x)), s[0] === x && s[1] === x) {
1931
1975
  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);
1976
+ k === -1 ? (_ = s.substring(2), s = x) : (_ = s.substring(2, k), s = s.substring(k) || x);
1933
1977
  }
1934
- return new C("file", w, s, g, g);
1978
+ return new R("file", _, s, g, g);
1935
1979
  }
1936
1980
  static from(s) {
1937
- const w = new C(s.scheme, s.authority, s.path, s.query, s.fragment);
1938
- return v(w, !0), w;
1981
+ const _ = new R(s.scheme, s.authority, s.path, s.query, s.fragment);
1982
+ return p(_, !0), _;
1939
1983
  }
1940
1984
  toString(s = !1) {
1941
- return q(this, s);
1985
+ return I(this, s);
1942
1986
  }
1943
1987
  toJSON() {
1944
1988
  return this;
1945
1989
  }
1946
1990
  static revive(s) {
1947
1991
  if (s) {
1948
- if (s instanceof h) return s;
1992
+ if (s instanceof m) return s;
1949
1993
  {
1950
- const w = new C(s);
1951
- return w._formatted = s.external, w._fsPath = s._sep === S ? s.fsPath : null, w;
1994
+ const _ = new R(s);
1995
+ return _._formatted = s.external, _._fsPath = s._sep === T ? s.fsPath : null, _;
1952
1996
  }
1953
1997
  }
1954
1998
  return s;
1955
1999
  }
1956
2000
  }
1957
- const S = c ? 1 : void 0;
1958
- class C extends h {
2001
+ const T = c ? 1 : void 0;
2002
+ class R extends m {
1959
2003
  _formatted = null;
1960
2004
  _fsPath = null;
1961
2005
  get fsPath() {
1962
- return this._fsPath || (this._fsPath = H(this)), this._fsPath;
2006
+ return this._fsPath || (this._fsPath = C(this)), this._fsPath;
1963
2007
  }
1964
2008
  toString(s = !1) {
1965
- return s ? q(this, !0) : (this._formatted || (this._formatted = q(this, !1)), this._formatted);
2009
+ return s ? I(this, !0) : (this._formatted || (this._formatted = I(this, !1)), this._formatted);
1966
2010
  }
1967
2011
  toJSON() {
1968
2012
  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;
2013
+ return this._fsPath && (s.fsPath = this._fsPath, s._sep = T), 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;
1970
2014
  }
1971
2015
  }
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) {
2016
+ 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" };
2017
+ function N(v, s, _) {
1974
2018
  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));
2019
+ for (let d = 0; d < v.length; d++) {
2020
+ const h = v.charCodeAt(d);
2021
+ if (h >= 97 && h <= 122 || h >= 65 && h <= 90 || h >= 48 && h <= 57 || h === 45 || h === 46 || h === 95 || h === 126 || s && h === 47 || _ && h === 91 || _ && h === 93 || _ && h === 58) i !== -1 && (k += encodeURIComponent(v.substring(i, d)), i = -1), k !== void 0 && (k += v.charAt(d));
1978
2022
  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);
2023
+ k === void 0 && (k = v.substr(0, d));
2024
+ const f = H[h];
2025
+ f !== void 0 ? (i !== -1 && (k += encodeURIComponent(v.substring(i, d)), i = -1), k += f) : i === -1 && (i = d);
1982
2026
  }
1983
2027
  }
1984
- return i !== -1 && (k += encodeURIComponent(y.substring(i))), k !== void 0 ? k : y;
2028
+ return i !== -1 && (k += encodeURIComponent(v.substring(i))), k !== void 0 ? k : v;
1985
2029
  }
1986
- function W(y) {
2030
+ function q(v) {
1987
2031
  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]);
2032
+ for (let _ = 0; _ < v.length; _++) {
2033
+ const k = v.charCodeAt(_);
2034
+ k === 35 || k === 63 ? (s === void 0 && (s = v.substr(0, _)), s += H[k]) : s !== void 0 && (s += v[_]);
1991
2035
  }
1992
- return s !== void 0 ? s : y;
2036
+ return s !== void 0 ? s : v;
1993
2037
  }
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;
2038
+ function C(v, s) {
2039
+ let _;
2040
+ return _ = v.authority && v.path.length > 1 && v.scheme === "file" ? `//${v.authority}${v.path}` : v.path.charCodeAt(0) === 47 && (v.path.charCodeAt(1) >= 65 && v.path.charCodeAt(1) <= 90 || v.path.charCodeAt(1) >= 97 && v.path.charCodeAt(1) <= 122) && v.path.charCodeAt(2) === 58 ? v.path[1].toLowerCase() + v.path.substr(2) : v.path, c && (_ = _.replace(/\//g, "\\")), _;
1997
2041
  }
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("@");
2042
+ function I(v, s) {
2043
+ const _ = s ? q : N;
2044
+ let k = "", { scheme: i, authority: d, path: h, query: f, fragment: y } = v;
2045
+ if (i && (k += i, k += ":"), (d || i === "file") && (k += x, k += x), d) {
2046
+ let b = d.indexOf("@");
2003
2047
  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 += "@";
2048
+ const o = d.substr(0, b);
2049
+ d = d.substr(b + 1), b = o.lastIndexOf(":"), b === -1 ? k += _(o, !1, !1) : (k += _(o.substr(0, b), !1, !1), k += ":", k += _(o.substr(b + 1), !1, !0)), k += "@";
2006
2050
  }
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));
2051
+ d = d.toLowerCase(), b = d.lastIndexOf(":"), b === -1 ? k += _(d, !1, !0) : (k += _(d.substr(0, b), !1, !0), k += d.substr(b));
2008
2052
  }
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)}`);
2053
+ if (h) {
2054
+ if (h.length >= 3 && h.charCodeAt(0) === 47 && h.charCodeAt(2) === 58) {
2055
+ const b = h.charCodeAt(1);
2056
+ b >= 65 && b <= 90 && (h = `/${String.fromCharCode(b + 32)}:${h.substr(3)}`);
2057
+ } else if (h.length >= 2 && h.charCodeAt(1) === 58) {
2058
+ const b = h.charCodeAt(0);
2059
+ b >= 65 && b <= 90 && (h = `${String.fromCharCode(b + 32)}:${h.substr(2)}`);
2016
2060
  }
2017
- k += w(m, !0, !1);
2061
+ k += _(h, !0, !1);
2018
2062
  }
2019
- return d && (k += "?", k += w(d, !1, !1)), p && (k += "#", k += s ? p : j(p, !1, !1)), k;
2063
+ return f && (k += "?", k += _(f, !1, !1)), y && (k += "#", k += s ? y : N(y, !1, !1)), k;
2020
2064
  }
2021
- function J(y) {
2065
+ function W(v) {
2022
2066
  try {
2023
- return decodeURIComponent(y);
2067
+ return decodeURIComponent(v);
2024
2068
  } catch {
2025
- return y.length > 3 ? y.substr(0, 3) + J(y.substr(3)) : y;
2069
+ return v.length > 3 ? v.substr(0, 3) + W(v.substr(3)) : v;
2026
2070
  }
2027
2071
  }
2028
2072
  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;
2073
+ function P(v) {
2074
+ return v.match(U) ? v.replace(U, ((s) => W(s))) : v;
2031
2075
  }
2032
- var V = n(975);
2033
- const P = V.posix || V, X = "/";
2076
+ var F = r(975);
2077
+ const D = F.posix || F, X = "/";
2034
2078
  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) {
2079
+ (function(v) {
2080
+ v.joinPath = function(s, ..._) {
2081
+ return s.with({ path: D.join(s.path, ..._) });
2082
+ }, v.resolvePath = function(s, ..._) {
2039
2083
  let k = s.path, i = !1;
2040
2084
  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) {
2085
+ let d = D.resolve(k, ..._);
2086
+ return i && d[0] === X && !s.authority && (d = d.substring(1)), s.with({ path: d });
2087
+ }, v.dirname = function(s) {
2044
2088
  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);
2089
+ let _ = D.dirname(s.path);
2090
+ return _.length === 1 && _.charCodeAt(0) === 46 && (_ = ""), s.with({ path: _ });
2091
+ }, v.basename = function(s) {
2092
+ return D.basename(s.path);
2093
+ }, v.extname = function(s) {
2094
+ return D.extname(s.path);
2051
2095
  };
2052
- })(ne || (ne = {})), Et = r;
2096
+ })(ne || (ne = {})), jt = n;
2053
2097
  })();
2054
- const { URI: he, Utils: oo } = Et;
2055
- function yn(e) {
2098
+ const { URI: me, Utils: so } = jt;
2099
+ function bn(e) {
2056
2100
  return e === 4 ? 1 : e === 3 ? 2 : e === 2 ? 4 : 8;
2057
2101
  }
2058
- function vn(e) {
2102
+ function wn(e) {
2059
2103
  return e;
2060
2104
  }
2061
- function bn(e) {
2105
+ function _n(e) {
2062
2106
  return {
2063
2107
  start: { line: e.startLineNumber - 1, character: e.startColumn - 1 },
2064
2108
  end: { line: e.endLineNumber - 1, character: e.endColumn - 1 }
@@ -2072,263 +2116,263 @@ function K(e) {
2072
2116
  endColumn: e.end.character + 1
2073
2117
  };
2074
2118
  }
2075
- function _n(e) {
2119
+ function kn(e) {
2076
2120
  return {
2077
2121
  ...K(e.location.range),
2078
2122
  message: e.message,
2079
- resource: he.parse(e.location.uri)
2123
+ resource: me.parse(e.location.uri)
2080
2124
  };
2081
2125
  }
2082
- function jt(e) {
2126
+ function Mt(e) {
2083
2127
  const t = {
2084
2128
  ...K(e.range),
2085
2129
  message: e.message,
2086
- severity: e.severity ? yn(e.severity) : 8
2130
+ severity: e.severity ? bn(e.severity) : 8
2087
2131
  };
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;
2132
+ return e.code != null && (t.code = e.codeDescription == null ? String(e.code) : { value: String(e.code), target: me.parse(e.codeDescription.href) }), e.relatedInformation && (t.relatedInformation = e.relatedInformation.map(kn)), e.tags && (t.tags = e.tags.map(wn)), e.source != null && (t.source = e.source), t;
2089
2133
  }
2090
- function Je(e) {
2134
+ function Xe(e) {
2091
2135
  return {
2092
2136
  range: K(e.range),
2093
2137
  text: e.newText
2094
2138
  };
2095
2139
  }
2096
- function wn(e) {
2140
+ function xn(e) {
2097
2141
  const t = {};
2098
2142
  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
2143
  }
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)
2144
+ function Cn(e) {
2145
+ const t = e.kind === "create" ? { newResource: me.parse(e.uri) } : e.kind === "delete" ? { oldResource: me.parse(e.uri) } : {
2146
+ oldResource: me.parse(e.oldUri),
2147
+ newResource: me.parse(e.newUri)
2104
2148
  };
2105
- return e.options && (t.options = wn(e.options)), t;
2149
+ return e.options && (t.options = xn(e.options)), t;
2106
2150
  }
2107
- function ht(e, t, n) {
2151
+ function gt(e, t, r) {
2108
2152
  return {
2109
- resource: he.parse(t),
2110
- versionId: n,
2111
- textEdit: Je(e)
2153
+ resource: me.parse(t),
2154
+ versionId: r,
2155
+ textEdit: Xe(e)
2112
2156
  };
2113
2157
  }
2114
- function xn(e) {
2158
+ function Rn(e) {
2115
2159
  var t;
2116
- const n = [];
2160
+ const r = [];
2117
2161
  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));
2162
+ for (const [n, c] of Object.entries(e.changes))
2163
+ for (const u of c)
2164
+ r.push(gt(u, n));
2121
2165
  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));
2166
+ for (const n of e.documentChanges)
2167
+ if ("textDocument" in n)
2168
+ for (const c of n.edits)
2169
+ r.push(gt(c, n.textDocument.uri, (t = n.textDocument.version) !== null && t !== void 0 ? t : void 0));
2126
2170
  else
2127
- n.push(kn(r));
2171
+ r.push(Cn(n));
2128
2172
  return {
2129
- edits: n
2173
+ edits: r
2130
2174
  };
2131
2175
  }
2132
- function Cn(e) {
2176
+ function Sn(e) {
2133
2177
  const t = {
2134
2178
  title: e.title,
2135
2179
  isPreferred: e.isPreferred
2136
2180
  };
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;
2181
+ return e.diagnostics && (t.diagnostics = e.diagnostics.map(Mt)), e.disabled && (t.disabled = e.disabled.reason), e.edit && (t.edit = Rn(e.edit)), e.isPreferred != null && (t.isPreferred = e.isPreferred), e.kind && (t.kind = e.kind), t;
2138
2182
  }
2139
- function Rn(e) {
2183
+ function En(e) {
2140
2184
  const t = {
2141
2185
  title: e.title,
2142
2186
  id: e.command
2143
2187
  };
2144
2188
  return e.arguments && (t.arguments = e.arguments), t;
2145
2189
  }
2146
- function Sn(e) {
2190
+ function Tn(e) {
2147
2191
  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
2192
  }
2149
- function Tn(e) {
2193
+ function jn(e) {
2150
2194
  return e;
2151
2195
  }
2152
- function Mt(e) {
2196
+ function At(e) {
2153
2197
  return {
2154
2198
  value: e.value
2155
2199
  };
2156
2200
  }
2157
- function En(e) {
2201
+ function Mn(e) {
2158
2202
  return {
2159
2203
  range: K(e.range),
2160
2204
  text: e.newText
2161
2205
  };
2162
2206
  }
2163
- function jn(e) {
2207
+ function An(e) {
2164
2208
  return "range" in e ? K(e.range) : "insert" in e && "replace" in e ? {
2165
2209
  insert: K(e.insert),
2166
2210
  replace: K(e.replace)
2167
2211
  } : K(e);
2168
2212
  }
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),
2213
+ function Nn(e, t) {
2214
+ var r, n, c, u, l;
2215
+ const a = (r = t.itemDefaults) !== null && r !== void 0 ? r : {}, p = (n = e.textEdit) !== null && n !== void 0 ? n : a.editRange, g = (c = e.commitCharacters) !== null && c !== void 0 ? c : a.commitCharacters, x = (u = e.insertTextFormat) !== null && u !== void 0 ? u : a.insertTextFormat, M = (l = e.insertTextMode) !== null && l !== void 0 ? l : a.insertTextMode;
2216
+ let m = e.insertText, T;
2217
+ p ? (T = An(p), "newText" in p && (m = p.newText)) : T = { ...t.range };
2218
+ const R = {
2219
+ insertText: m ?? e.label,
2220
+ kind: e.kind == null ? 18 : Tn(e.kind),
2177
2221
  label: e.label,
2178
- range: S
2222
+ range: T
2179
2223
  };
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;
2224
+ return e.additionalTextEdits && (R.additionalTextEdits = e.additionalTextEdits.map(Mn)), e.command && (R.command = En(e.command)), g && (R.commitCharacters = g), e.detail != null && (R.detail = e.detail), typeof e.documentation == "string" ? R.documentation = e.documentation : e.documentation && (R.documentation = At(e.documentation)), e.filterText != null && (R.filterText = e.filterText), x === 2 ? R.insertTextRules = 4 : M === 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(jn)), R;
2181
2225
  }
2182
- function An(e, t) {
2226
+ function On(e, t) {
2183
2227
  return {
2184
2228
  incomplete: !!e.isIncomplete,
2185
- suggestions: e.items.map((n) => Mn(n, { range: t.range, itemDefaults: e.itemDefaults }))
2229
+ suggestions: e.items.map((r) => Nn(r, { range: t.range, itemDefaults: e.itemDefaults }))
2186
2230
  };
2187
2231
  }
2188
- function Nn(e) {
2232
+ function Pn(e) {
2189
2233
  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
2234
  }
2191
- function On(e) {
2235
+ function Ln(e) {
2192
2236
  return e;
2193
2237
  }
2194
- function At(e) {
2195
- var t, n, r;
2238
+ function Nt(e) {
2239
+ var t, r, n;
2196
2240
  const c = {
2197
2241
  detail: (t = e.detail) !== null && t !== void 0 ? t : "",
2198
- kind: Nn(e.kind),
2242
+ kind: Pn(e.kind),
2199
2243
  name: e.name,
2200
2244
  range: K(e.range),
2201
2245
  selectionRange: K(e.selectionRange),
2202
- tags: (r = (n = e.tags) === null || n === void 0 ? void 0 : n.map(On)) !== null && r !== void 0 ? r : []
2246
+ tags: (n = (r = e.tags) === null || r === void 0 ? void 0 : r.map(Ln)) !== null && n !== void 0 ? n : []
2203
2247
  };
2204
- return e.children && (c.children = e.children.map(At)), c;
2248
+ return e.children && (c.children = e.children.map(Nt)), c;
2205
2249
  }
2206
- function Pn(e) {
2250
+ function Dn(e) {
2207
2251
  const t = {
2208
2252
  start: e.startLine + 1,
2209
2253
  end: e.endLine + 1
2210
2254
  };
2211
2255
  return e.kind != null && (t.kind = { value: e.kind }), t;
2212
2256
  }
2213
- function Ln(e) {
2257
+ function $n(e) {
2214
2258
  return {
2215
2259
  insertSpaces: e.insertSpaces,
2216
2260
  tabSize: e.tabSize
2217
2261
  };
2218
2262
  }
2219
- function mt(e) {
2263
+ function pt(e) {
2220
2264
  return typeof e == "string" ? { value: e } : { value: `\`\`\`${e.language}
2221
2265
  ${e.value}
2222
2266
  \`\`\`` };
2223
2267
  }
2224
- function Dn(e) {
2225
- return typeof e == "string" || "language" in e ? [mt(e)] : Array.isArray(e) ? e.map(mt) : [Mt(e)];
2268
+ function In(e) {
2269
+ return typeof e == "string" || "language" in e ? [pt(e)] : Array.isArray(e) ? e.map(pt) : [At(e)];
2226
2270
  }
2227
- function $n(e) {
2271
+ function Wn(e) {
2228
2272
  const t = {
2229
- contents: Dn(e.contents)
2273
+ contents: In(e.contents)
2230
2274
  };
2231
2275
  return e.range && (t.range = K(e.range)), t;
2232
2276
  }
2233
- function Ce(e) {
2277
+ function Re(e) {
2234
2278
  return { character: e.column - 1, line: e.lineNumber - 1 };
2235
2279
  }
2236
- function In(e) {
2280
+ function Bn(e) {
2237
2281
  const t = {
2238
2282
  range: K(e.range)
2239
2283
  };
2240
- return e.tooltip != null && (t.tooltip = e.tooltip), e.target != null && (t.url = he.parse(e.target)), t;
2284
+ return e.tooltip != null && (t.tooltip = e.tooltip), e.target != null && (t.url = me.parse(e.target)), t;
2241
2285
  }
2242
- function Wn(e) {
2286
+ function Hn(e) {
2243
2287
  const t = {
2244
2288
  range: K(e.targetRange),
2245
2289
  targetSelectionRange: K(e.targetSelectionRange),
2246
- uri: he.parse(e.targetUri)
2290
+ uri: me.parse(e.targetUri)
2247
2291
  };
2248
2292
  return e.originSelectionRange && (t.originSelectionRange = K(e.originSelectionRange)), t;
2249
2293
  }
2250
- function Bn(e) {
2294
+ function Un(e) {
2251
2295
  const t = [];
2252
- let n = e;
2253
- for (; n; )
2296
+ let r = e;
2297
+ for (; r; )
2254
2298
  t.push({
2255
- range: K(n.range)
2256
- }), n = n.parent;
2299
+ range: K(r.range)
2300
+ }), r = r.parent;
2257
2301
  return t;
2258
2302
  }
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()))
2303
+ function zn(e, t, r) {
2304
+ const n = /* @__PURE__ */ new Map(), c = (m) => Array.isArray(t) ? t.includes(m) : t === m, u = async (m) => {
2305
+ const T = m.getVersionId(), R = await r.provideMarkerData(m);
2306
+ !m.isDisposed() && T === m.getVersionId() && c(m.getLanguageId()) && e.editor.setModelMarkers(m, r.owner, R ?? []);
2307
+ }, l = (m) => {
2308
+ if (!c(m.getLanguageId()))
2265
2309
  return;
2266
- let S;
2267
- const C = h.onDidChangeContent(() => {
2268
- clearTimeout(S), S = setTimeout(() => {
2269
- l(h);
2310
+ let T;
2311
+ const R = m.onDidChangeContent(() => {
2312
+ clearTimeout(T), T = setTimeout(() => {
2313
+ u(m);
2270
2314
  }, 500);
2271
2315
  });
2272
- r.set(h, {
2316
+ n.set(m, {
2273
2317
  dispose() {
2274
- clearTimeout(S), C.dispose();
2318
+ clearTimeout(T), R.dispose();
2275
2319
  }
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));
2320
+ }), u(m);
2321
+ }, a = (m) => {
2322
+ e.editor.setModelMarkers(m, r.owner, []);
2323
+ const T = n.get(m);
2324
+ T && (T.dispose(), n.delete(m));
2281
2325
  };
2282
- function v(h, S = h.getLanguageId()) {
2283
- n.doReset && c(S) && n.doReset(h);
2326
+ function p(m, T = m.getLanguageId()) {
2327
+ r.doReset && c(T) && r.doReset(m);
2284
2328
  }
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);
2329
+ const g = e.editor.onDidCreateModel(l), x = e.editor.onWillDisposeModel((m) => {
2330
+ a(m), p(m);
2331
+ }), M = e.editor.onDidChangeModelLanguage(({ model: m, oldLanguage: T }) => {
2332
+ a(m), l(m), p(m, T);
2289
2333
  });
2290
- for (const h of e.editor.getModels())
2291
- f(h);
2334
+ for (const m of e.editor.getModels())
2335
+ l(m);
2292
2336
  return {
2293
2337
  dispose() {
2294
- for (const h of r.keys())
2295
- a(h);
2296
- g.dispose(), x.dispose(), A.dispose();
2338
+ for (const m of n.keys())
2339
+ a(m);
2340
+ g.dispose(), x.dispose(), M.dispose();
2297
2341
  },
2298
2342
  async revalidate() {
2299
- await Promise.all(e.editor.getModels().map(l));
2343
+ await Promise.all(e.editor.getModels().map(u));
2300
2344
  }
2301
2345
  };
2302
2346
  }
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;
2347
+ function Fn(e, t) {
2348
+ let { createData: r, interval: n = 3e4, label: c, moduleId: u, stopWhenIdleFor: l = 12e4 } = t, a, p = 0, g = !1;
2305
2349
  const x = () => {
2306
2350
  a && (a.dispose(), a = void 0);
2307
- }, A = setInterval(() => {
2351
+ }, M = setInterval(() => {
2308
2352
  if (!a)
2309
2353
  return;
2310
- Date.now() - v > f && x();
2311
- }, r);
2354
+ Date.now() - p > l && x();
2355
+ }, n);
2312
2356
  return {
2313
2357
  dispose() {
2314
- g = !0, clearInterval(A), x();
2358
+ g = !0, clearInterval(M), x();
2315
2359
  },
2316
- getWorker(...h) {
2360
+ getWorker(...m) {
2317
2361
  if (g)
2318
2362
  throw new Error("Worker manager has been disposed");
2319
- return v = Date.now(), a || (a = e.editor.createWebWorker({
2320
- createData: n,
2363
+ return p = Date.now(), a || (a = e.editor.createWebWorker({
2364
+ createData: r,
2321
2365
  label: c,
2322
- moduleId: l
2323
- })), a.withSyncedResources(h);
2366
+ moduleId: u
2367
+ })), a.withSyncedResources(m);
2324
2368
  },
2325
- updateCreateData(h) {
2326
- n = h, x();
2369
+ updateCreateData(m) {
2370
+ r = m, x();
2327
2371
  }
2328
2372
  };
2329
2373
  }
2330
- function Un(e, t) {
2331
- const n = {
2374
+ function Vn(e, t) {
2375
+ const r = {
2332
2376
  completion: !0,
2333
2377
  customTags: [],
2334
2378
  enableSchemaRequest: !1,
@@ -2346,84 +2390,84 @@ function Un(e, t) {
2346
2390
  aliases: ["YAML", "yaml", "YML", "yml"],
2347
2391
  mimetypes: ["application/x-yaml"]
2348
2392
  });
2349
- const r = Hn(e, {
2393
+ const n = Fn(e, {
2350
2394
  label: "yaml",
2351
2395
  moduleId: "monaco-yaml/yaml.worker",
2352
- createData: n
2353
- }), c = /* @__PURE__ */ new WeakMap(), l = zn(e, "yaml", {
2396
+ createData: r
2397
+ }), c = /* @__PURE__ */ new WeakMap(), u = zn(e, "yaml", {
2354
2398
  owner: "yaml",
2355
2399
  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);
2400
+ const g = await (await n.getWorker(a.uri)).doValidation(String(a.uri));
2401
+ return c.set(a, g), g?.map(Mt);
2358
2402
  },
2359
2403
  async doReset(a) {
2360
- await (await r.getWorker(a.uri)).resetSchema(String(a.uri));
2404
+ await (await n.getWorker(a.uri)).resetSchema(String(a.uri));
2361
2405
  }
2362
- }), f = [
2363
- r,
2364
- l,
2406
+ }), l = [
2407
+ n,
2408
+ u,
2365
2409
  e.languages.registerCompletionItemProvider("yaml", {
2366
2410
  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, {
2411
+ async provideCompletionItems(a, p) {
2412
+ const g = a.getWordUntilPosition(p), M = await (await n.getWorker(a.uri)).doComplete(String(a.uri), Re(p));
2413
+ if (M)
2414
+ return On(M, {
2371
2415
  range: {
2372
- startLineNumber: v.lineNumber,
2416
+ startLineNumber: p.lineNumber,
2373
2417
  startColumn: g.startColumn,
2374
- endLineNumber: v.lineNumber,
2418
+ endLineNumber: p.lineNumber,
2375
2419
  endColumn: g.endColumn
2376
2420
  }
2377
2421
  });
2378
2422
  }
2379
2423
  }),
2380
2424
  e.languages.registerHoverProvider("yaml", {
2381
- async provideHover(a, v) {
2382
- const x = await (await r.getWorker(a.uri)).doHover(String(a.uri), Ce(v));
2425
+ async provideHover(a, p) {
2426
+ const x = await (await n.getWorker(a.uri)).doHover(String(a.uri), Re(p));
2383
2427
  if (x)
2384
- return $n(x);
2428
+ return Wn(x);
2385
2429
  }
2386
2430
  }),
2387
2431
  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);
2432
+ async provideDefinition(a, p) {
2433
+ const x = await (await n.getWorker(a.uri)).doDefinition(String(a.uri), Re(p));
2434
+ return x?.map(Hn);
2391
2435
  }
2392
2436
  }),
2393
2437
  e.languages.registerDocumentSymbolProvider("yaml", {
2394
2438
  displayName: "yaml",
2395
2439
  async provideDocumentSymbols(a) {
2396
- const g = await (await r.getWorker(a.uri)).findDocumentSymbols(String(a.uri));
2397
- return g?.map(At);
2440
+ const g = await (await n.getWorker(a.uri)).findDocumentSymbols(String(a.uri));
2441
+ return g?.map(Nt);
2398
2442
  }
2399
2443
  }),
2400
2444
  e.languages.registerDocumentFormattingEditProvider("yaml", {
2401
2445
  displayName: "yaml",
2402
2446
  async provideDocumentFormattingEdits(a) {
2403
- const g = await (await r.getWorker(a.uri)).format(String(a.uri));
2404
- return g?.map(Je);
2447
+ const g = await (await n.getWorker(a.uri)).format(String(a.uri));
2448
+ return g?.map(Xe);
2405
2449
  }
2406
2450
  }),
2407
2451
  e.languages.registerLinkProvider("yaml", {
2408
2452
  async provideLinks(a) {
2409
- const g = await (await r.getWorker(a.uri)).findLinks(String(a.uri));
2453
+ const g = await (await n.getWorker(a.uri)).findLinks(String(a.uri));
2410
2454
  if (g)
2411
2455
  return {
2412
- links: g.map(In)
2456
+ links: g.map(Bn)
2413
2457
  };
2414
2458
  }
2415
2459
  }),
2416
2460
  e.languages.registerCodeActionProvider("yaml", {
2417
- async provideCodeActions(a, v, g) {
2461
+ async provideCodeActions(a, p, g) {
2418
2462
  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)))) || [],
2463
+ const m = await (await n.getWorker(a.uri)).getCodeAction(String(a.uri), _n(p), {
2464
+ diagnostics: ((x = c.get(a)) == null ? void 0 : x.filter((T) => p.intersectRanges(K(T.range)))) || [],
2421
2465
  only: g.only ? [g.only] : void 0,
2422
2466
  triggerKind: g.trigger
2423
2467
  });
2424
- if (h)
2468
+ if (m)
2425
2469
  return {
2426
- actions: h.map(Cn),
2470
+ actions: m.map(Sn),
2427
2471
  dispose() {
2428
2472
  }
2429
2473
  };
@@ -2431,8 +2475,8 @@ function Un(e, t) {
2431
2475
  }),
2432
2476
  e.languages.registerFoldingRangeProvider("yaml", {
2433
2477
  async provideFoldingRanges(a) {
2434
- const g = await (await r.getWorker(a.uri)).getFoldingRanges(String(a.uri));
2435
- return g?.map(Pn);
2478
+ const g = await (await n.getWorker(a.uri)).getFoldingRanges(String(a.uri));
2479
+ return g?.map(Dn);
2436
2480
  }
2437
2481
  }),
2438
2482
  e.languages.setLanguageConfiguration("yaml", {
@@ -2462,145 +2506,145 @@ function Un(e, t) {
2462
2506
  e.languages.registerOnTypeFormattingEditProvider("yaml", {
2463
2507
  autoFormatTriggerCharacters: [`
2464
2508
  `],
2465
- async provideOnTypeFormattingEdits(a, v, g, x) {
2466
- const h = await (await r.getWorker(a.uri)).doDocumentOnTypeFormatting(
2509
+ async provideOnTypeFormattingEdits(a, p, g, x) {
2510
+ const m = await (await n.getWorker(a.uri)).doDocumentOnTypeFormatting(
2467
2511
  String(a.uri),
2468
- Ce(v),
2512
+ Re(p),
2469
2513
  g,
2470
- Ln(x)
2514
+ $n(x)
2471
2515
  );
2472
- return h?.map(Je);
2516
+ return m?.map(Xe);
2473
2517
  }
2474
2518
  }),
2475
2519
  e.languages.registerSelectionRangeProvider("yaml", {
2476
- async provideSelectionRanges(a, v) {
2477
- const x = await (await r.getWorker(a.uri)).getSelectionRanges(
2520
+ async provideSelectionRanges(a, p) {
2521
+ const x = await (await n.getWorker(a.uri)).getSelectionRanges(
2478
2522
  String(a.uri),
2479
- v.map(Ce)
2523
+ p.map(Re)
2480
2524
  );
2481
- return x?.map(Bn);
2525
+ return x?.map(Un);
2482
2526
  }
2483
2527
  })
2484
2528
  ];
2485
2529
  return {
2486
2530
  dispose() {
2487
- for (const a of f)
2531
+ for (const a of l)
2488
2532
  a.dispose();
2489
2533
  },
2490
2534
  async update(a) {
2491
- r.updateCreateData(Object.assign(n, a)), await l.revalidate();
2535
+ n.updateCreateData(Object.assign(r, a)), await u.revalidate();
2492
2536
  },
2493
2537
  getOptions() {
2494
- return n;
2538
+ return r;
2495
2539
  }
2496
2540
  };
2497
2541
  }
2498
- function Vn(e) {
2542
+ function Yn(e) {
2499
2543
  return new Worker("/assets/editor.worker-CpuX8TSY.js", {
2500
2544
  name: e?.name
2501
2545
  });
2502
2546
  }
2503
- function Fn(e) {
2547
+ function qn(e) {
2504
2548
  return new Worker("/assets/json.worker-B4VHhH6h.js", {
2505
2549
  name: e?.name
2506
2550
  });
2507
2551
  }
2508
- function Yn(e) {
2552
+ function Jn(e) {
2509
2553
  return new Worker("/assets/ts.worker-sl17zBDo.js", {
2510
2554
  name: e?.name
2511
2555
  });
2512
2556
  }
2513
- function qn(e) {
2557
+ function Gn(e) {
2514
2558
  return new Worker("/assets/css.worker-Dmf38jDD.js", {
2515
2559
  name: e?.name
2516
2560
  });
2517
2561
  }
2518
- function Jn(e) {
2562
+ function Xn(e) {
2519
2563
  return new Worker("/assets/html.worker-DotaEs7v.js", {
2520
2564
  name: e?.name
2521
2565
  });
2522
2566
  }
2523
- function Gn(e) {
2567
+ function Qn(e) {
2524
2568
  return new Worker("/assets/yaml.worker-JJoHBMla.js", {
2525
2569
  name: e?.name
2526
2570
  });
2527
2571
  }
2528
2572
  function je(...e) {
2529
2573
  }
2530
- function Xn(...e) {
2574
+ function Zn(...e) {
2531
2575
  }
2532
- const gt = "__omniview_monaco_setup__";
2533
- if (!globalThis[gt]) {
2534
- globalThis[gt] = !0;
2576
+ const yt = "__omniview_monaco_setup__";
2577
+ if (!globalThis[yt]) {
2578
+ globalThis[yt] = !0;
2535
2579
  const e = self.MonacoEnvironment ?? {};
2536
2580
  self.MonacoEnvironment = {
2537
2581
  ...e,
2538
- getWorker(t, n) {
2539
- let r;
2582
+ getWorker(t, r) {
2583
+ let n;
2540
2584
  try {
2541
- switch (n) {
2585
+ switch (r) {
2542
2586
  case "yaml":
2543
- r = new Gn();
2587
+ n = new Qn();
2544
2588
  break;
2545
2589
  case "json":
2546
- r = new Fn();
2590
+ n = new qn();
2547
2591
  break;
2548
2592
  case "typescript":
2549
2593
  case "javascript":
2550
- r = new Yn();
2594
+ n = new Jn();
2551
2595
  break;
2552
2596
  case "css":
2553
2597
  case "scss":
2554
2598
  case "less":
2555
- r = new qn();
2599
+ n = new Gn();
2556
2600
  break;
2557
2601
  case "html":
2558
2602
  case "handlebars":
2559
2603
  case "razor":
2560
- r = new Jn();
2604
+ n = new Xn();
2561
2605
  break;
2562
2606
  default:
2563
- r = new Vn();
2607
+ n = new Yn();
2564
2608
  break;
2565
2609
  }
2566
- je(`Worker created for "${n}" — instanceof Worker: ${r instanceof Worker}`);
2610
+ je(`Worker created for "${r}" — instanceof Worker: ${n instanceof Worker}`);
2567
2611
  } catch (c) {
2568
2612
  throw c;
2569
2613
  }
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));
2614
+ return n.onerror = (c) => {
2615
+ Zn(`Worker "${r}" error:`, c.message, "| filename:", c.filename);
2616
+ }, n.addEventListener("message", (c) => {
2617
+ je(`Worker "${r}" first message:`, JSON.stringify(c.data).slice(0, 200));
2574
2618
  }, {
2575
2619
  once: !0
2576
- }), r;
2620
+ }), n;
2577
2621
  }
2578
2622
  };
2579
2623
  try {
2580
- const t = Un(L, {
2624
+ const t = Vn($, {
2581
2625
  enableSchemaRequest: !1,
2582
2626
  schemas: []
2583
2627
  });
2584
- je("configureMonacoYaml succeeded — handle keys:", Object.keys(t)), de._setYamlHandle(t), je("YAML handle injected into EditorSchemaRegistry");
2628
+ je("configureMonacoYaml succeeded — handle keys:", Object.keys(t)), fe._setYamlHandle(t), je("YAML handle injected into EditorSchemaRegistry");
2585
2629
  } catch (t) {
2586
2630
  console.error("[monaco-setup] configureMonacoYaml FAILED:", t);
2587
2631
  }
2588
2632
  }
2589
- function io() {
2633
+ function ao() {
2590
2634
  }
2591
2635
  export {
2592
- gr as CodeEditor,
2593
- Br as CommandPalette,
2594
- br as DiffViewer,
2595
- Nr as MarkdownPreview,
2636
+ br as CodeEditor,
2637
+ Jr as CommandPalette,
2638
+ xr as DiffViewer,
2639
+ Dr as MarkdownPreview,
2596
2640
  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
2641
+ pn as ObjectInspector,
2642
+ Tr as Terminal,
2643
+ Oe as buildMonacoTheme,
2644
+ Ye as buildXtermTheme,
2645
+ fe as editorSchemas,
2646
+ io as getComputedToken,
2647
+ ao as setupMonacoWorkers,
2648
+ Ke as useEditorTheme
2605
2649
  };
2606
2650
  //# sourceMappingURL=index.js.map