@omniviewdev/editors 1.0.2 → 2.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.d.ts +12 -6
- package/dist/index.js +1323 -1293
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1,75 +1,75 @@
|
|
|
1
|
-
import
|
|
2
|
-
import * as
|
|
3
|
-
import { Checkbox as
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
1
|
+
import Ge, { forwardRef as ve, useRef as F, 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 qt, Code as Ft, Accordion as tt, CommandList as fe } from "@omniviewdev/base-ui";
|
|
4
|
+
import Yt from "remark-gfm";
|
|
5
|
+
import Jt from "rehype-raw";
|
|
6
|
+
import Gt, { defaultSchema as Be } from "rehype-sanitize";
|
|
7
7
|
import "@xterm/xterm/css/xterm.css";
|
|
8
|
-
var
|
|
8
|
+
var Se = { exports: {} }, ke = {};
|
|
9
9
|
var rt;
|
|
10
|
-
function
|
|
11
|
-
if (rt) return
|
|
10
|
+
function Xt() {
|
|
11
|
+
if (rt) return ke;
|
|
12
12
|
rt = 1;
|
|
13
13
|
var e = /* @__PURE__ */ Symbol.for("react.transitional.element"), t = /* @__PURE__ */ Symbol.for("react.fragment");
|
|
14
|
-
function n(r,
|
|
15
|
-
var
|
|
16
|
-
if (
|
|
17
|
-
|
|
18
|
-
for (var
|
|
19
|
-
|
|
20
|
-
} else
|
|
21
|
-
return
|
|
14
|
+
function n(r, c, l) {
|
|
15
|
+
var f = null;
|
|
16
|
+
if (l !== void 0 && (f = "" + l), c.key !== void 0 && (f = "" + c.key), "key" in c) {
|
|
17
|
+
l = {};
|
|
18
|
+
for (var a in c)
|
|
19
|
+
a !== "key" && (l[a] = c[a]);
|
|
20
|
+
} else l = c;
|
|
21
|
+
return c = l.ref, {
|
|
22
22
|
$$typeof: e,
|
|
23
23
|
type: r,
|
|
24
|
-
key:
|
|
25
|
-
ref:
|
|
26
|
-
props:
|
|
24
|
+
key: f,
|
|
25
|
+
ref: c !== void 0 ? c : null,
|
|
26
|
+
props: l
|
|
27
27
|
};
|
|
28
28
|
}
|
|
29
|
-
return
|
|
29
|
+
return ke.Fragment = t, ke.jsx = n, ke.jsxs = n, ke;
|
|
30
30
|
}
|
|
31
|
-
var
|
|
31
|
+
var xe = {};
|
|
32
32
|
var nt;
|
|
33
|
-
function
|
|
33
|
+
function Qt() {
|
|
34
34
|
return nt || (nt = 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 ===
|
|
38
|
+
return o.$$typeof === y ? null : o.displayName || o.name || null;
|
|
39
39
|
if (typeof o == "string") return o;
|
|
40
40
|
switch (o) {
|
|
41
41
|
case j:
|
|
42
42
|
return "Fragment";
|
|
43
|
-
case
|
|
43
|
+
case H:
|
|
44
44
|
return "Profiler";
|
|
45
|
-
case
|
|
45
|
+
case W:
|
|
46
46
|
return "StrictMode";
|
|
47
|
-
case
|
|
47
|
+
case D:
|
|
48
48
|
return "Suspense";
|
|
49
|
-
case
|
|
49
|
+
case V:
|
|
50
50
|
return "SuspenseList";
|
|
51
|
-
case
|
|
51
|
+
case ne:
|
|
52
52
|
return "Activity";
|
|
53
53
|
}
|
|
54
54
|
if (typeof o == "object")
|
|
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
|
|
58
|
+
case I:
|
|
59
59
|
return "Portal";
|
|
60
|
-
case
|
|
60
|
+
case J:
|
|
61
61
|
return o.displayName || "Context";
|
|
62
|
-
case
|
|
62
|
+
case Y:
|
|
63
63
|
return (o._context.displayName || "Context") + ".Consumer";
|
|
64
|
-
case
|
|
65
|
-
var
|
|
66
|
-
return o = o.displayName, o || (o =
|
|
64
|
+
case U:
|
|
65
|
+
var _ = o.render;
|
|
66
|
+
return o = o.displayName, o || (o = _.displayName || _.name || "", o = o !== "" ? "ForwardRef(" + o + ")" : "ForwardRef"), o;
|
|
67
67
|
case P:
|
|
68
|
-
return
|
|
69
|
-
case
|
|
70
|
-
|
|
68
|
+
return _ = o.displayName || null, _ !== null ? _ : e(o.type) || "Memo";
|
|
69
|
+
case X:
|
|
70
|
+
_ = o._payload, o = o._init;
|
|
71
71
|
try {
|
|
72
|
-
return e(o(
|
|
72
|
+
return e(o(_));
|
|
73
73
|
} catch {
|
|
74
74
|
}
|
|
75
75
|
}
|
|
@@ -81,15 +81,15 @@ function Kt() {
|
|
|
81
81
|
function n(o) {
|
|
82
82
|
try {
|
|
83
83
|
t(o);
|
|
84
|
-
var
|
|
84
|
+
var _ = !1;
|
|
85
85
|
} catch {
|
|
86
|
-
|
|
86
|
+
_ = !0;
|
|
87
87
|
}
|
|
88
|
-
if (
|
|
89
|
-
|
|
90
|
-
var M =
|
|
88
|
+
if (_) {
|
|
89
|
+
_ = console;
|
|
90
|
+
var M = _.error, E = typeof Symbol == "function" && Symbol.toStringTag && o[Symbol.toStringTag] || o.constructor.name || "Object";
|
|
91
91
|
return M.call(
|
|
92
|
-
|
|
92
|
+
_,
|
|
93
93
|
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
94
94
|
E
|
|
95
95
|
), t(o);
|
|
@@ -97,34 +97,34 @@ function Kt() {
|
|
|
97
97
|
}
|
|
98
98
|
function r(o) {
|
|
99
99
|
if (o === j) return "<>";
|
|
100
|
-
if (typeof o == "object" && o !== null && o.$$typeof ===
|
|
100
|
+
if (typeof o == "object" && o !== null && o.$$typeof === X)
|
|
101
101
|
return "<...>";
|
|
102
102
|
try {
|
|
103
|
-
var
|
|
104
|
-
return
|
|
103
|
+
var _ = e(o);
|
|
104
|
+
return _ ? "<" + _ + ">" : "<...>";
|
|
105
105
|
} catch {
|
|
106
106
|
return "<...>";
|
|
107
107
|
}
|
|
108
108
|
}
|
|
109
|
-
function
|
|
109
|
+
function c() {
|
|
110
110
|
var o = s.A;
|
|
111
111
|
return o === null ? null : o.getOwner();
|
|
112
112
|
}
|
|
113
|
-
function
|
|
113
|
+
function l() {
|
|
114
114
|
return Error("react-stack-top-frame");
|
|
115
115
|
}
|
|
116
|
-
function
|
|
117
|
-
if (
|
|
118
|
-
var
|
|
119
|
-
if (
|
|
116
|
+
function f(o) {
|
|
117
|
+
if (w.call(o, "key")) {
|
|
118
|
+
var _ = Object.getOwnPropertyDescriptor(o, "key").get;
|
|
119
|
+
if (_ && _.isReactWarning) return !1;
|
|
120
120
|
}
|
|
121
121
|
return o.key !== void 0;
|
|
122
122
|
}
|
|
123
|
-
function
|
|
123
|
+
function a(o, _) {
|
|
124
124
|
function M() {
|
|
125
|
-
|
|
125
|
+
u || (u = !0, console.error(
|
|
126
126
|
"%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
|
|
127
|
-
|
|
127
|
+
_
|
|
128
128
|
));
|
|
129
129
|
}
|
|
130
130
|
M.isReactWarning = !0, Object.defineProperty(o, "key", {
|
|
@@ -132,23 +132,23 @@ function Kt() {
|
|
|
132
132
|
configurable: !0
|
|
133
133
|
});
|
|
134
134
|
}
|
|
135
|
-
function
|
|
135
|
+
function v() {
|
|
136
136
|
var o = e(this.type);
|
|
137
|
-
return
|
|
137
|
+
return m[o] || (m[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
|
|
141
|
+
function g(o, _, M, E, $, N) {
|
|
142
142
|
var O = M.ref;
|
|
143
143
|
return o = {
|
|
144
144
|
$$typeof: C,
|
|
145
145
|
type: o,
|
|
146
|
-
key:
|
|
146
|
+
key: _,
|
|
147
147
|
props: M,
|
|
148
148
|
_owner: E
|
|
149
149
|
}, (O !== void 0 ? O : null) !== null ? Object.defineProperty(o, "ref", {
|
|
150
150
|
enumerable: !1,
|
|
151
|
-
get:
|
|
151
|
+
get: v
|
|
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,7 +163,7 @@ function Kt() {
|
|
|
163
163
|
configurable: !1,
|
|
164
164
|
enumerable: !1,
|
|
165
165
|
writable: !0,
|
|
166
|
-
value:
|
|
166
|
+
value: $
|
|
167
167
|
}), Object.defineProperty(o, "_debugTask", {
|
|
168
168
|
configurable: !1,
|
|
169
169
|
enumerable: !1,
|
|
@@ -171,11 +171,11 @@ function Kt() {
|
|
|
171
171
|
value: N
|
|
172
172
|
}), Object.freeze && (Object.freeze(o.props), Object.freeze(o)), o;
|
|
173
173
|
}
|
|
174
|
-
function x(o,
|
|
175
|
-
var O =
|
|
174
|
+
function x(o, _, M, E, $, N) {
|
|
175
|
+
var O = _.children;
|
|
176
176
|
if (O !== void 0)
|
|
177
177
|
if (E)
|
|
178
|
-
if (
|
|
178
|
+
if (k(O)) {
|
|
179
179
|
for (E = 0; E < O.length; E++)
|
|
180
180
|
A(O[E]);
|
|
181
181
|
Object.freeze && Object.freeze(O);
|
|
@@ -184,12 +184,12 @@ function Kt() {
|
|
|
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
186
|
else A(O);
|
|
187
|
-
if (
|
|
187
|
+
if (w.call(_, "key")) {
|
|
188
188
|
O = e(o);
|
|
189
|
-
var
|
|
190
|
-
return
|
|
189
|
+
var q = Object.keys(_).filter(function(oe) {
|
|
190
|
+
return oe !== "key";
|
|
191
191
|
});
|
|
192
|
-
E = 0 <
|
|
192
|
+
E = 0 < q.length ? "{key: someKey, " + q.join(": ..., ") + ": ...}" : "{key: someKey}", b[O + E] || (q = 0 < q.length ? "{" + q.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} />
|
|
@@ -198,88 +198,88 @@ React keys must be passed directly to JSX without using spread:
|
|
|
198
198
|
<%s key={someKey} {...props} />`,
|
|
199
199
|
E,
|
|
200
200
|
O,
|
|
201
|
-
|
|
201
|
+
q,
|
|
202
202
|
O
|
|
203
|
-
),
|
|
203
|
+
), b[O + E] = !0);
|
|
204
204
|
}
|
|
205
|
-
if (O = null, M !== void 0 && (n(M), O = "" + M),
|
|
205
|
+
if (O = null, M !== void 0 && (n(M), O = "" + M), f(_) && (n(_.key), O = "" + _.key), "key" in _) {
|
|
206
206
|
M = {};
|
|
207
|
-
for (var
|
|
208
|
-
|
|
209
|
-
} else M =
|
|
210
|
-
return O &&
|
|
207
|
+
for (var Q in _)
|
|
208
|
+
Q !== "key" && (M[Q] = _[Q]);
|
|
209
|
+
} else M = _;
|
|
210
|
+
return O && a(
|
|
211
211
|
M,
|
|
212
212
|
typeof o == "function" ? o.displayName || o.name || "Unknown" : o
|
|
213
|
-
),
|
|
213
|
+
), g(
|
|
214
214
|
o,
|
|
215
215
|
O,
|
|
216
216
|
M,
|
|
217
|
-
|
|
218
|
-
|
|
217
|
+
c(),
|
|
218
|
+
$,
|
|
219
219
|
N
|
|
220
220
|
);
|
|
221
221
|
}
|
|
222
222
|
function A(o) {
|
|
223
|
-
|
|
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));
|
|
224
224
|
}
|
|
225
|
-
function
|
|
225
|
+
function h(o) {
|
|
226
226
|
return typeof o == "object" && o !== null && o.$$typeof === C;
|
|
227
227
|
}
|
|
228
|
-
var
|
|
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"), Y = /* @__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() {
|
|
229
229
|
return null;
|
|
230
230
|
};
|
|
231
|
-
|
|
231
|
+
S = {
|
|
232
232
|
react_stack_bottom_frame: function(o) {
|
|
233
233
|
return o();
|
|
234
234
|
}
|
|
235
235
|
};
|
|
236
|
-
var
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
)(),
|
|
240
|
-
|
|
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
241
|
var E = 1e4 > s.recentlyCreatedOwnerStacks++;
|
|
242
242
|
return x(
|
|
243
243
|
o,
|
|
244
|
-
|
|
244
|
+
_,
|
|
245
245
|
M,
|
|
246
246
|
!1,
|
|
247
|
-
E ? Error("react-stack-top-frame") :
|
|
248
|
-
E ? i(r(o)) :
|
|
247
|
+
E ? Error("react-stack-top-frame") : d,
|
|
248
|
+
E ? i(r(o)) : p
|
|
249
249
|
);
|
|
250
|
-
},
|
|
250
|
+
}, xe.jsxs = function(o, _, M) {
|
|
251
251
|
var E = 1e4 > s.recentlyCreatedOwnerStacks++;
|
|
252
252
|
return x(
|
|
253
253
|
o,
|
|
254
|
-
|
|
254
|
+
_,
|
|
255
255
|
M,
|
|
256
256
|
!0,
|
|
257
|
-
E ? Error("react-stack-top-frame") :
|
|
258
|
-
E ? i(r(o)) :
|
|
257
|
+
E ? Error("react-stack-top-frame") : d,
|
|
258
|
+
E ? i(r(o)) : p
|
|
259
259
|
);
|
|
260
260
|
};
|
|
261
|
-
})()),
|
|
261
|
+
})()), xe;
|
|
262
262
|
}
|
|
263
263
|
var ot;
|
|
264
|
-
function
|
|
265
|
-
return ot || (ot = 1, process.env.NODE_ENV === "production" ?
|
|
264
|
+
function Zt() {
|
|
265
|
+
return ot || (ot = 1, process.env.NODE_ENV === "production" ? Se.exports = Xt() : Se.exports = Qt()), Se.exports;
|
|
266
266
|
}
|
|
267
|
-
var T =
|
|
267
|
+
var T = Zt(), Te = { exports: {} }, ze = {};
|
|
268
268
|
var it;
|
|
269
|
-
function
|
|
270
|
-
if (it) return
|
|
269
|
+
function Kt() {
|
|
270
|
+
if (it) return ze;
|
|
271
271
|
it = 1;
|
|
272
|
-
var e =
|
|
273
|
-
return
|
|
272
|
+
var e = Ge.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
|
|
273
|
+
return ze.c = function(t) {
|
|
274
274
|
return e.H.useMemoCache(t);
|
|
275
|
-
},
|
|
275
|
+
}, ze;
|
|
276
276
|
}
|
|
277
|
-
var
|
|
277
|
+
var He = {};
|
|
278
278
|
var st;
|
|
279
|
-
function
|
|
279
|
+
function er() {
|
|
280
280
|
return st || (st = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
281
|
-
var e =
|
|
282
|
-
|
|
281
|
+
var e = Ge.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
|
|
282
|
+
He.c = function(t) {
|
|
283
283
|
var n = e.H;
|
|
284
284
|
return n === 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:
|
|
@@ -289,57 +289,84 @@ function rr() {
|
|
|
289
289
|
See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.`
|
|
290
290
|
), n.useMemoCache(t);
|
|
291
291
|
};
|
|
292
|
-
})()),
|
|
292
|
+
})()), He;
|
|
293
293
|
}
|
|
294
294
|
var at;
|
|
295
|
-
function
|
|
296
|
-
return at || (at = 1, process.env.NODE_ENV === "production" ?
|
|
295
|
+
function tr() {
|
|
296
|
+
return at || (at = 1, process.env.NODE_ENV === "production" ? Te.exports = Kt() : Te.exports = er()), Te.exports;
|
|
297
297
|
}
|
|
298
|
-
var
|
|
299
|
-
function
|
|
300
|
-
|
|
301
|
-
const e = document.documentElement.getAttribute("data-ov-theme");
|
|
302
|
-
return e === "light" || e === "high-contrast-dark" || e === "high-contrast-light" ? e : "dark";
|
|
298
|
+
var be = tr();
|
|
299
|
+
function bt(e) {
|
|
300
|
+
return typeof document > "u" ? null : e?.closest("[data-ov-theme]") ?? e ?? document.documentElement;
|
|
303
301
|
}
|
|
304
|
-
function
|
|
305
|
-
|
|
302
|
+
function Xe(e) {
|
|
303
|
+
const t = bt(e);
|
|
304
|
+
return t ? getComputedStyle(t) : null;
|
|
306
305
|
}
|
|
307
|
-
function
|
|
308
|
-
|
|
309
|
-
let r, a;
|
|
310
|
-
return e[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (r = () => {
|
|
311
|
-
const h = document.documentElement, k = new MutationObserver(() => {
|
|
312
|
-
n(ct());
|
|
313
|
-
});
|
|
314
|
-
return k.observe(h, {
|
|
315
|
-
attributes: !0,
|
|
316
|
-
attributeFilter: ["data-ov-theme"]
|
|
317
|
-
}), () => k.disconnect();
|
|
318
|
-
}, a = [], e[0] = r, e[1] = a) : (r = e[0], a = e[1]), U(r, a), t;
|
|
306
|
+
function no(e, t) {
|
|
307
|
+
return Xe(t)?.getPropertyValue(e).trim() ?? "";
|
|
319
308
|
}
|
|
320
|
-
function
|
|
309
|
+
function Qe() {
|
|
310
|
+
const e = be.c(2), {
|
|
311
|
+
activeTheme: t
|
|
312
|
+
} = zt();
|
|
313
|
+
let n;
|
|
314
|
+
return e[0] !== t ? (n = {
|
|
315
|
+
id: t.id,
|
|
316
|
+
base: t.base,
|
|
317
|
+
registration: t
|
|
318
|
+
}, e[0] = t, e[1] = n) : n = e[1], n;
|
|
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) {
|
|
322
|
+
return Math.max(0, Math.min(255, Math.round(e))).toString(16).padStart(2, "0");
|
|
323
|
+
}
|
|
324
|
+
function Ue(e) {
|
|
321
325
|
const t = e.trim();
|
|
322
|
-
if (
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
return k >= 1 ? `#${c(r)}${c(a)}${c(h)}` : `#${c(r)}${c(a)}${c(h)}${c(Math.round(k * 255))}`;
|
|
328
|
-
}
|
|
329
|
-
return "";
|
|
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)}`;
|
|
330
331
|
}
|
|
331
332
|
function or(e) {
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
}
|
|
337
|
-
|
|
338
|
-
|
|
333
|
+
if (!e)
|
|
334
|
+
return {
|
|
335
|
+
normalize: Ue,
|
|
336
|
+
dispose() {
|
|
337
|
+
}
|
|
338
|
+
};
|
|
339
|
+
const t = e.ownerDocument.createElement("canvas");
|
|
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;
|
|
342
|
+
return {
|
|
343
|
+
normalize(r) {
|
|
344
|
+
const c = Ue(r);
|
|
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 "";
|
|
350
|
+
try {
|
|
351
|
+
if (n ??= t.getContext("2d", {
|
|
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])}`;
|
|
357
|
+
} catch {
|
|
358
|
+
return "";
|
|
359
|
+
}
|
|
360
|
+
},
|
|
361
|
+
dispose() {
|
|
362
|
+
t.remove();
|
|
363
|
+
}
|
|
364
|
+
};
|
|
339
365
|
}
|
|
340
366
|
function ir(e) {
|
|
341
367
|
switch (e) {
|
|
342
368
|
case "light":
|
|
369
|
+
case "solarized-light":
|
|
343
370
|
return "vs";
|
|
344
371
|
case "high-contrast-dark":
|
|
345
372
|
return "hc-black";
|
|
@@ -349,68 +376,73 @@ function ir(e) {
|
|
|
349
376
|
return "vs-dark";
|
|
350
377
|
}
|
|
351
378
|
}
|
|
352
|
-
function
|
|
353
|
-
const
|
|
354
|
-
if (!
|
|
355
|
-
const
|
|
379
|
+
function sr(e, t, n, r, c, l) {
|
|
380
|
+
const f = r.normalize(n?.getPropertyValue(t).trim() ?? "");
|
|
381
|
+
if (!f) return null;
|
|
382
|
+
const a = {
|
|
356
383
|
token: e,
|
|
357
|
-
foreground:
|
|
384
|
+
foreground: f.slice(1)
|
|
358
385
|
};
|
|
359
|
-
return
|
|
386
|
+
return c && (a.fontStyle = n?.getPropertyValue(c).trim() || l || ""), a;
|
|
360
387
|
}
|
|
361
|
-
function
|
|
388
|
+
function ar(e) {
|
|
362
389
|
const t = {};
|
|
363
390
|
for (const [n, r] of Object.entries(e))
|
|
364
391
|
r && (t[n] = r);
|
|
365
392
|
return t;
|
|
366
393
|
}
|
|
367
|
-
function
|
|
368
|
-
const
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
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() ?? "");
|
|
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);
|
|
398
|
+
return {
|
|
399
|
+
base: ir(e),
|
|
400
|
+
inherit: !0,
|
|
401
|
+
rules: a,
|
|
402
|
+
colors: ar({
|
|
403
|
+
"editor.background": f("--ov-color-editor-bg"),
|
|
404
|
+
"editor.foreground": f("--ov-color-editor-fg"),
|
|
405
|
+
"editorCursor.foreground": f("--ov-color-editor-cursor"),
|
|
406
|
+
"editor.selectionBackground": f("--ov-color-editor-selection-bg"),
|
|
407
|
+
"editor.inactiveSelectionBackground": f("--ov-color-editor-selection-inactive-bg"),
|
|
408
|
+
"editor.lineHighlightBackground": f("--ov-color-editor-line-highlight-bg"),
|
|
409
|
+
"editor.lineHighlightBorder": f("--ov-color-editor-line-highlight-border"),
|
|
410
|
+
"editorLineNumber.foreground": f("--ov-color-editor-line-number"),
|
|
411
|
+
"editorLineNumber.activeForeground": f("--ov-color-editor-line-number-active"),
|
|
412
|
+
"editorWhitespace.foreground": f("--ov-color-editor-whitespace"),
|
|
413
|
+
"editorIndentGuide.background": f("--ov-color-editor-indent-guide"),
|
|
414
|
+
"editorIndentGuide.activeBackground": f("--ov-color-editor-indent-guide-active"),
|
|
415
|
+
"editorRuler.foreground": f("--ov-color-editor-ruler"),
|
|
416
|
+
"editor.findMatchBackground": f("--ov-color-editor-find-match-bg"),
|
|
417
|
+
"editor.findMatchBorder": f("--ov-color-editor-find-match-border"),
|
|
418
|
+
"editor.findMatchHighlightBackground": f("--ov-color-editor-find-range-bg"),
|
|
419
|
+
"editorLink.activeForeground": f("--ov-color-editor-link"),
|
|
420
|
+
"editorBracketMatch.background": f("--ov-color-editor-bracket-match-bg"),
|
|
421
|
+
"editorBracketMatch.border": f("--ov-color-editor-bracket-match-border"),
|
|
422
|
+
"editorBracketHighlight.foreground1": f("--ov-color-editor-bracket-1"),
|
|
423
|
+
"editorBracketHighlight.foreground2": f("--ov-color-editor-bracket-2"),
|
|
424
|
+
"editorBracketHighlight.foreground3": f("--ov-color-editor-bracket-3"),
|
|
425
|
+
"editorBracketHighlight.foreground4": f("--ov-color-editor-bracket-4"),
|
|
426
|
+
"editorBracketHighlight.foreground5": f("--ov-color-editor-bracket-5"),
|
|
427
|
+
"editorBracketHighlight.foreground6": f("--ov-color-editor-bracket-6"),
|
|
428
|
+
"editorGutter.background": f("--ov-color-gutter-bg"),
|
|
429
|
+
"editorGutter.addedBackground": f("--ov-color-gutter-added"),
|
|
430
|
+
"editorGutter.modifiedBackground": f("--ov-color-gutter-modified"),
|
|
431
|
+
"editorGutter.deletedBackground": f("--ov-color-gutter-deleted"),
|
|
432
|
+
"diffEditor.insertedTextBackground": f("--ov-color-diff-insert-bg"),
|
|
433
|
+
"diffEditor.removedTextBackground": f("--ov-color-diff-remove-bg"),
|
|
434
|
+
"minimap.background": f("--ov-color-minimap-bg"),
|
|
435
|
+
"minimap.selectionHighlight": f("--ov-color-minimap-selection"),
|
|
436
|
+
"minimap.errorHighlight": f("--ov-color-minimap-error"),
|
|
437
|
+
"minimap.warningHighlight": f("--ov-color-minimap-warning"),
|
|
438
|
+
"minimap.findMatchHighlight": f("--ov-color-minimap-find-match")
|
|
439
|
+
})
|
|
440
|
+
};
|
|
441
|
+
} finally {
|
|
442
|
+
c.dispose();
|
|
443
|
+
}
|
|
412
444
|
}
|
|
413
|
-
const
|
|
445
|
+
const ge = "ov-theme", cr = {
|
|
414
446
|
js: "javascript",
|
|
415
447
|
jsx: "javascript",
|
|
416
448
|
ts: "typescript",
|
|
@@ -469,32 +501,32 @@ const ye = "ov-theme", ar = {
|
|
|
469
501
|
vue: "html",
|
|
470
502
|
svelte: "html"
|
|
471
503
|
};
|
|
472
|
-
function
|
|
504
|
+
function lr(e) {
|
|
473
505
|
const t = e.toLowerCase(), n = t.split("/").pop() ?? t;
|
|
474
506
|
if (n === "dockerfile") return "dockerfile";
|
|
475
507
|
if (n === "makefile") return "makefile";
|
|
476
508
|
const r = n.split(".").pop();
|
|
477
509
|
if (r)
|
|
478
|
-
return
|
|
510
|
+
return cr[r];
|
|
479
511
|
}
|
|
480
|
-
function
|
|
512
|
+
function se(...e) {
|
|
481
513
|
}
|
|
482
|
-
function
|
|
483
|
-
let n = 0, r = 0,
|
|
514
|
+
function ur(e, t) {
|
|
515
|
+
let n = 0, r = 0, c = -1, l = -1;
|
|
484
516
|
for (; r < t.length; )
|
|
485
517
|
if (n < e.length && (e[n] === t[r] || e[n] === "?"))
|
|
486
518
|
n++, r++;
|
|
487
519
|
else if (n < e.length && e[n] === "*")
|
|
488
|
-
|
|
489
|
-
else if (
|
|
490
|
-
n =
|
|
520
|
+
c = n, l = r, n++;
|
|
521
|
+
else if (c >= 0)
|
|
522
|
+
n = c + 1, l++, r = l;
|
|
491
523
|
else
|
|
492
524
|
return !1;
|
|
493
525
|
for (; n < e.length && e[n] === "*"; )
|
|
494
526
|
n++;
|
|
495
527
|
return n === e.length;
|
|
496
528
|
}
|
|
497
|
-
class
|
|
529
|
+
class dr {
|
|
498
530
|
_schemas = /* @__PURE__ */ new Map();
|
|
499
531
|
_listeners = /* @__PURE__ */ new Set();
|
|
500
532
|
_yamlHandle = null;
|
|
@@ -515,11 +547,11 @@ class ur {
|
|
|
515
547
|
* Notifies all listeners (active editors) to reconfigure.
|
|
516
548
|
*/
|
|
517
549
|
register(t) {
|
|
518
|
-
|
|
550
|
+
se("register() — uri:", t.uri, "fileMatch:", t.fileMatch, "schema keys:", Object.keys(t.schema).slice(0, 10)), this._schemas.set(t.uri, t), this._notify();
|
|
519
551
|
}
|
|
520
552
|
/** Register multiple schemas at once. */
|
|
521
553
|
registerAll(t) {
|
|
522
|
-
|
|
554
|
+
se("registerAll() —", t.length, "schemas:", t.map((n) => n.uri));
|
|
523
555
|
for (const n of t)
|
|
524
556
|
this._schemas.set(n.uri, n);
|
|
525
557
|
this._notify();
|
|
@@ -531,14 +563,14 @@ class ur {
|
|
|
531
563
|
}
|
|
532
564
|
/** Clear all registered schemas. */
|
|
533
565
|
clear() {
|
|
534
|
-
|
|
566
|
+
se("clear() — removing", this._schemas.size, "schemas"), this._schemas.clear(), this._notify();
|
|
535
567
|
}
|
|
536
568
|
/**
|
|
537
569
|
* Find all registered schemas whose `fileMatch` patterns match the given
|
|
538
570
|
* model URI string. Uses the same glob-like matching that monaco-yaml uses.
|
|
539
571
|
*/
|
|
540
572
|
getSchemasForUri(t) {
|
|
541
|
-
return this.schemas.filter((n) => n.fileMatch.some((r) =>
|
|
573
|
+
return this.schemas.filter((n) => n.fileMatch.some((r) => ur(r, t)));
|
|
542
574
|
}
|
|
543
575
|
/** Whether the YAML handle has been injected (workers initialized). */
|
|
544
576
|
get isYamlReady() {
|
|
@@ -546,8 +578,8 @@ class ur {
|
|
|
546
578
|
}
|
|
547
579
|
/** Subscribe to schema changes. Returns an unsubscribe function. */
|
|
548
580
|
onChange(t) {
|
|
549
|
-
return this._listeners.add(t),
|
|
550
|
-
this._listeners.delete(t),
|
|
581
|
+
return this._listeners.add(t), se("onChange() — listener added, total listeners:", this._listeners.size), () => {
|
|
582
|
+
this._listeners.delete(t), se("onChange() — listener removed, total listeners:", this._listeners.size);
|
|
551
583
|
};
|
|
552
584
|
}
|
|
553
585
|
/**
|
|
@@ -570,7 +602,7 @@ class ur {
|
|
|
570
602
|
description: r.description
|
|
571
603
|
}
|
|
572
604
|
}));
|
|
573
|
-
|
|
605
|
+
se("applyYamlSchemas() — pushing", t.length, "schemas"), this._yamlHandle.update({
|
|
574
606
|
enableSchemaRequest: !1,
|
|
575
607
|
schemas: n
|
|
576
608
|
});
|
|
@@ -583,23 +615,23 @@ class ur {
|
|
|
583
615
|
applyJsonSchemas(t) {
|
|
584
616
|
const n = t, r = {
|
|
585
617
|
validate: !0,
|
|
586
|
-
schemas: this.schemas.map((
|
|
587
|
-
uri:
|
|
588
|
-
fileMatch:
|
|
589
|
-
schema:
|
|
618
|
+
schemas: this.schemas.map((l) => ({
|
|
619
|
+
uri: l.uri,
|
|
620
|
+
fileMatch: l.fileMatch,
|
|
621
|
+
schema: l.schema
|
|
590
622
|
}))
|
|
591
|
-
},
|
|
592
|
-
|
|
623
|
+
}, c = n.json?.jsonDefaults ?? n.languages?.json?.jsonDefaults;
|
|
624
|
+
se("applyJsonSchemas() —", this.schemas.length, "schemas, jsonDefaults available:", !!c), c?.setDiagnosticsOptions(r);
|
|
593
625
|
}
|
|
594
626
|
/** Log the current state of the registry for debugging. */
|
|
595
627
|
debugState() {
|
|
596
|
-
|
|
628
|
+
se(" Schemas:", this._schemas.size);
|
|
597
629
|
for (const [t, n] of this._schemas)
|
|
598
|
-
|
|
599
|
-
|
|
630
|
+
se(` ${t} → fileMatch: ${JSON.stringify(n.fileMatch)}`);
|
|
631
|
+
se(" Listeners:", this._listeners.size), se(" YAML handle:", this._yamlHandle ? "SET" : "NOT SET");
|
|
600
632
|
}
|
|
601
633
|
_notify() {
|
|
602
|
-
|
|
634
|
+
se("_notify() — notifying", this._listeners.size, "listeners");
|
|
603
635
|
for (const t of this._listeners)
|
|
604
636
|
try {
|
|
605
637
|
t();
|
|
@@ -608,42 +640,42 @@ class ur {
|
|
|
608
640
|
}
|
|
609
641
|
}
|
|
610
642
|
}
|
|
611
|
-
const
|
|
612
|
-
Root:
|
|
613
|
-
Inner:
|
|
643
|
+
const de = new dr(), fr = "_Root_1729c_1", hr = "_Inner_1729c_17", ct = {
|
|
644
|
+
Root: fr,
|
|
645
|
+
Inner: hr
|
|
614
646
|
};
|
|
615
|
-
function
|
|
647
|
+
function Me(...e) {
|
|
616
648
|
}
|
|
617
|
-
function
|
|
649
|
+
function mr(...e) {
|
|
618
650
|
return e.filter(Boolean).join(" ");
|
|
619
651
|
}
|
|
620
|
-
function
|
|
652
|
+
function lt(e, t, n) {
|
|
621
653
|
if (n) {
|
|
622
|
-
const r =
|
|
623
|
-
|
|
624
|
-
const
|
|
625
|
-
return
|
|
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);
|
|
626
658
|
}
|
|
627
|
-
return
|
|
659
|
+
return L.editor.createModel(e, t);
|
|
628
660
|
}
|
|
629
|
-
function
|
|
661
|
+
function _t(e) {
|
|
630
662
|
switch (e) {
|
|
631
|
-
case
|
|
663
|
+
case L.MarkerSeverity.Error:
|
|
632
664
|
return "error";
|
|
633
|
-
case
|
|
665
|
+
case L.MarkerSeverity.Warning:
|
|
634
666
|
return "warning";
|
|
635
|
-
case
|
|
667
|
+
case L.MarkerSeverity.Info:
|
|
636
668
|
return "info";
|
|
637
669
|
default:
|
|
638
670
|
return "hint";
|
|
639
671
|
}
|
|
640
672
|
}
|
|
641
|
-
function
|
|
642
|
-
return
|
|
673
|
+
function ut(e) {
|
|
674
|
+
return L.editor.getModelMarkers({
|
|
643
675
|
resource: e.uri
|
|
644
676
|
}).map((t) => ({
|
|
645
677
|
message: t.message,
|
|
646
|
-
severity:
|
|
678
|
+
severity: _t(t.severity),
|
|
647
679
|
startLineNumber: t.startLineNumber,
|
|
648
680
|
startColumn: t.startColumn,
|
|
649
681
|
endLineNumber: t.endLineNumber,
|
|
@@ -652,39 +684,39 @@ function dt(e) {
|
|
|
652
684
|
code: typeof t.code == "string" ? t.code : t.code?.value
|
|
653
685
|
}));
|
|
654
686
|
}
|
|
655
|
-
const
|
|
687
|
+
const gr = ve(function({
|
|
656
688
|
value: t,
|
|
657
689
|
onChange: n,
|
|
658
690
|
onMount: r,
|
|
659
|
-
onDiagnostics:
|
|
660
|
-
onCursorChange:
|
|
661
|
-
language:
|
|
662
|
-
filename:
|
|
663
|
-
readOnly:
|
|
664
|
-
lineNumbers:
|
|
691
|
+
onDiagnostics: c,
|
|
692
|
+
onCursorChange: l,
|
|
693
|
+
language: f,
|
|
694
|
+
filename: a,
|
|
695
|
+
readOnly: v = !1,
|
|
696
|
+
lineNumbers: g = !0,
|
|
665
697
|
minimap: x = !1,
|
|
666
698
|
wordWrap: A = !1,
|
|
667
|
-
tabSize:
|
|
668
|
-
diagnostics:
|
|
699
|
+
tabSize: h = 2,
|
|
700
|
+
diagnostics: S = !1,
|
|
669
701
|
quickSuggestions: C = !1,
|
|
670
|
-
syntaxHighlighting:
|
|
702
|
+
syntaxHighlighting: I = !0,
|
|
671
703
|
height: j = "100%",
|
|
672
|
-
width:
|
|
673
|
-
bordered:
|
|
674
|
-
className:
|
|
675
|
-
},
|
|
676
|
-
const
|
|
677
|
-
if (
|
|
704
|
+
width: W = "100%",
|
|
705
|
+
bordered: H = !0,
|
|
706
|
+
className: Y
|
|
707
|
+
}, J) {
|
|
708
|
+
const U = Qe(), D = F(null), V = F(null), [P, X] = Ne(!1), ne = F(!1), y = F(null), s = F(null), w = F(null), k = f ?? (a ? lr(a) : void 0), i = pt(() => {
|
|
709
|
+
if (k === "json" && t)
|
|
678
710
|
try {
|
|
679
711
|
return JSON.stringify(JSON.parse(t), null, 2);
|
|
680
712
|
} catch {
|
|
681
713
|
return t;
|
|
682
714
|
}
|
|
683
715
|
return t;
|
|
684
|
-
}, [
|
|
685
|
-
|
|
686
|
-
if (!
|
|
687
|
-
|
|
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({
|
|
688
720
|
jsx: 2,
|
|
689
721
|
// JsxEmit.React
|
|
690
722
|
jsxFactory: "React.createElement",
|
|
@@ -693,12 +725,12 @@ const mr = _e(function({
|
|
|
693
725
|
target: 99
|
|
694
726
|
// ESNext
|
|
695
727
|
});
|
|
696
|
-
const
|
|
697
|
-
|
|
698
|
-
const
|
|
699
|
-
model:
|
|
700
|
-
readOnly:
|
|
701
|
-
lineNumbers:
|
|
728
|
+
const d = lt(i, I ? k : "plaintext", a);
|
|
729
|
+
Me(" model created — uri:", d.uri.toString());
|
|
730
|
+
const p = L.editor.create(V.current, {
|
|
731
|
+
model: d,
|
|
732
|
+
readOnly: v,
|
|
733
|
+
lineNumbers: g ? "on" : "off",
|
|
702
734
|
minimap: {
|
|
703
735
|
enabled: x
|
|
704
736
|
},
|
|
@@ -712,33 +744,33 @@ const mr = _e(function({
|
|
|
712
744
|
automaticLayout: !0,
|
|
713
745
|
fontSize: 13,
|
|
714
746
|
fontFamily: "var(--ov-font-family-mono, monospace)",
|
|
715
|
-
tabSize:
|
|
716
|
-
renderValidationDecorations:
|
|
747
|
+
tabSize: h,
|
|
748
|
+
renderValidationDecorations: S ? "on" : "off"
|
|
717
749
|
});
|
|
718
|
-
return
|
|
719
|
-
|
|
720
|
-
const
|
|
721
|
-
|
|
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);
|
|
722
754
|
};
|
|
723
|
-
}, []),
|
|
724
|
-
const
|
|
725
|
-
if (!(!
|
|
726
|
-
if (
|
|
727
|
-
|
|
728
|
-
else if (i !==
|
|
729
|
-
const
|
|
730
|
-
if (!
|
|
731
|
-
|
|
732
|
-
range:
|
|
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(),
|
|
733
765
|
text: i,
|
|
734
766
|
forceMoveMarkers: !0
|
|
735
|
-
}]),
|
|
767
|
+
}]), d.pushUndoStop(), ne.current = !1;
|
|
736
768
|
}
|
|
737
769
|
}
|
|
738
|
-
}, [i, P]),
|
|
739
|
-
|
|
740
|
-
readOnly:
|
|
741
|
-
lineNumbers:
|
|
770
|
+
}, [i, P]), z(() => {
|
|
771
|
+
!D.current || !P || D.current.updateOptions({
|
|
772
|
+
readOnly: v,
|
|
773
|
+
lineNumbers: g ? "on" : "off",
|
|
742
774
|
minimap: {
|
|
743
775
|
enabled: x
|
|
744
776
|
},
|
|
@@ -748,89 +780,89 @@ const mr = _e(function({
|
|
|
748
780
|
strings: !0,
|
|
749
781
|
comments: !1
|
|
750
782
|
} : !1,
|
|
751
|
-
tabSize:
|
|
752
|
-
renderValidationDecorations:
|
|
783
|
+
tabSize: h,
|
|
784
|
+
renderValidationDecorations: S ? "on" : "off"
|
|
753
785
|
});
|
|
754
|
-
}, [
|
|
755
|
-
if (
|
|
756
|
-
const
|
|
757
|
-
if (
|
|
758
|
-
const
|
|
759
|
-
|
|
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);
|
|
760
792
|
}
|
|
761
|
-
}, [
|
|
762
|
-
const
|
|
763
|
-
|
|
764
|
-
const
|
|
765
|
-
if (!
|
|
766
|
-
|
|
767
|
-
const
|
|
768
|
-
|
|
769
|
-
const o =
|
|
770
|
-
|
|
771
|
-
}, [
|
|
772
|
-
P && (
|
|
773
|
-
}, [
|
|
774
|
-
|
|
775
|
-
|
|
793
|
+
}, [k, I, P]);
|
|
794
|
+
const u = F(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());
|
|
776
808
|
})));
|
|
777
|
-
}, [n, P]),
|
|
778
|
-
P && (s.current?.dispose(),
|
|
779
|
-
const
|
|
780
|
-
if (!
|
|
781
|
-
const
|
|
782
|
-
|
|
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));
|
|
783
815
|
})));
|
|
784
|
-
}, [
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
lineNumber:
|
|
788
|
-
column:
|
|
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
|
|
789
821
|
});
|
|
790
822
|
})));
|
|
791
|
-
}, [
|
|
823
|
+
}, [l, P]), z(() => {
|
|
792
824
|
if (P)
|
|
793
|
-
return
|
|
794
|
-
|
|
825
|
+
return de.onChange(() => {
|
|
826
|
+
de.applyYamlSchemas(), de.applyJsonSchemas(L);
|
|
795
827
|
});
|
|
796
|
-
}, [P]),
|
|
797
|
-
getEditor: () =>
|
|
798
|
-
getMonaco: () =>
|
|
799
|
-
focus: () =>
|
|
828
|
+
}, [P]), yt(J, () => ({
|
|
829
|
+
getEditor: () => D.current,
|
|
830
|
+
getMonaco: () => L,
|
|
831
|
+
focus: () => D.current?.focus(),
|
|
800
832
|
getDiagnostics: () => {
|
|
801
|
-
const
|
|
802
|
-
return
|
|
833
|
+
const d = D.current?.getModel();
|
|
834
|
+
return d ? ut(d) : [];
|
|
803
835
|
},
|
|
804
836
|
getDebugState: () => {
|
|
805
|
-
const
|
|
806
|
-
resource:
|
|
807
|
-
}) : [], o =
|
|
837
|
+
const d = D.current, p = d?.getModel() ?? null, b = p ? L.editor.getModelMarkers({
|
|
838
|
+
resource: p.uri
|
|
839
|
+
}) : [], o = p?.uri.toString() ?? null, _ = {
|
|
808
840
|
error: 0,
|
|
809
841
|
warning: 0,
|
|
810
842
|
info: 0,
|
|
811
843
|
hint: 0
|
|
812
844
|
}, M = {};
|
|
813
|
-
for (const O of
|
|
814
|
-
const
|
|
815
|
-
|
|
816
|
-
const
|
|
817
|
-
M[
|
|
845
|
+
for (const O of b) {
|
|
846
|
+
const q = _t(O.severity);
|
|
847
|
+
_[q]++;
|
|
848
|
+
const Q = O.source ?? "unknown";
|
|
849
|
+
M[Q] = (M[Q] ?? 0) + 1;
|
|
818
850
|
}
|
|
819
|
-
const E = o ?
|
|
851
|
+
const E = o ? de.getSchemasForUri(o).map((O) => ({
|
|
820
852
|
uri: O.uri,
|
|
821
853
|
name: O.name,
|
|
822
854
|
fileMatch: O.fileMatch
|
|
823
|
-
})) : [],
|
|
855
|
+
})) : [], $ = d?.getPosition() ?? null, N = d?.getSelections() ?? [];
|
|
824
856
|
return {
|
|
825
857
|
modelUri: o,
|
|
826
|
-
modelLanguage:
|
|
827
|
-
modelLineCount:
|
|
828
|
-
modelContentLength:
|
|
829
|
-
modelVersionId:
|
|
830
|
-
modelEOL:
|
|
831
|
-
cursorPosition:
|
|
832
|
-
lineNumber:
|
|
833
|
-
column:
|
|
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
|
|
834
866
|
} : null,
|
|
835
867
|
selections: N.map((O) => ({
|
|
836
868
|
startLineNumber: O.startLineNumber,
|
|
@@ -838,127 +870,125 @@ const mr = _e(function({
|
|
|
838
870
|
endLineNumber: O.endLineNumber,
|
|
839
871
|
endColumn: O.endColumn
|
|
840
872
|
})),
|
|
841
|
-
diagnosticsTotal:
|
|
842
|
-
diagnosticsBySeverity:
|
|
873
|
+
diagnosticsTotal: b.length,
|
|
874
|
+
diagnosticsBySeverity: _,
|
|
843
875
|
diagnosticsBySource: M,
|
|
844
|
-
registeredSchemaCount:
|
|
876
|
+
registeredSchemaCount: de.schemas.length,
|
|
845
877
|
matchingSchemas: E,
|
|
846
|
-
isReadOnly:
|
|
847
|
-
isFocused:
|
|
848
|
-
totalModelCount:
|
|
849
|
-
registeredLanguageCount:
|
|
850
|
-
yamlHandleSet:
|
|
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
|
|
851
883
|
};
|
|
852
884
|
}
|
|
853
885
|
}));
|
|
854
|
-
const
|
|
855
|
-
return /* @__PURE__ */ T.jsx("div", { className:
|
|
856
|
-
"--_editor-height":
|
|
857
|
-
"--_editor-width":
|
|
858
|
-
}, "data-testid": "code-editor", ...
|
|
886
|
+
const m = (d) => typeof d == "number" ? `${d}px` : d;
|
|
887
|
+
return /* @__PURE__ */ T.jsx("div", { className: mr(ct.Root, Y), style: {
|
|
888
|
+
"--_editor-height": m(j),
|
|
889
|
+
"--_editor-width": m(W)
|
|
890
|
+
}, "data-testid": "code-editor", ...H ? {} : {
|
|
859
891
|
"data-borderless": ""
|
|
860
|
-
}, children: /* @__PURE__ */ T.jsx("div", { ref:
|
|
892
|
+
}, children: /* @__PURE__ */ T.jsx("div", { ref: V, className: ct.Inner }) });
|
|
861
893
|
});
|
|
862
|
-
|
|
863
|
-
const
|
|
864
|
-
Root:
|
|
865
|
-
Inner:
|
|
894
|
+
gr.displayName = "CodeEditor";
|
|
895
|
+
const pr = "_Root_1ltbg_1", yr = "_Inner_1ltbg_16", dt = {
|
|
896
|
+
Root: pr,
|
|
897
|
+
Inner: yr
|
|
866
898
|
};
|
|
867
|
-
function
|
|
899
|
+
function vr(...e) {
|
|
868
900
|
return e.filter(Boolean).join(" ");
|
|
869
901
|
}
|
|
870
|
-
const
|
|
902
|
+
const br = ve(function({
|
|
871
903
|
original: t,
|
|
872
904
|
modified: n,
|
|
873
905
|
language: r,
|
|
874
|
-
mode:
|
|
875
|
-
readOnly:
|
|
876
|
-
height:
|
|
877
|
-
bordered:
|
|
878
|
-
className:
|
|
879
|
-
},
|
|
880
|
-
const x = Qe(), A =
|
|
881
|
-
|
|
906
|
+
mode: c = "side-by-side",
|
|
907
|
+
readOnly: l = !0,
|
|
908
|
+
height: f = "100%",
|
|
909
|
+
bordered: a = !0,
|
|
910
|
+
className: v
|
|
911
|
+
}, g) {
|
|
912
|
+
const x = Qe(), A = F(null), h = F(null), [S, C] = Ne(!1);
|
|
913
|
+
z(() => {
|
|
882
914
|
if (!A.current) return;
|
|
883
|
-
|
|
884
|
-
const j =
|
|
885
|
-
readOnly:
|
|
886
|
-
renderSideBySide:
|
|
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,
|
|
918
|
+
renderSideBySide: c === "side-by-side",
|
|
887
919
|
renderValidationDecorations: "off",
|
|
888
920
|
scrollBeyondLastLine: !1,
|
|
889
921
|
automaticLayout: !0,
|
|
890
922
|
fontSize: 13,
|
|
891
923
|
fontFamily: "var(--ov-font-family-mono, monospace)"
|
|
892
|
-
}),
|
|
924
|
+
}), W = L.editor.createModel(t, r), H = L.editor.createModel(n, r);
|
|
893
925
|
return j.setModel({
|
|
894
|
-
original:
|
|
895
|
-
modified:
|
|
896
|
-
}),
|
|
897
|
-
j.getModel()?.original?.dispose(), j.getModel()?.modified?.dispose(), j.dispose(),
|
|
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);
|
|
898
930
|
};
|
|
899
|
-
}, []),
|
|
900
|
-
if (!
|
|
901
|
-
const j =
|
|
931
|
+
}, []), z(() => {
|
|
932
|
+
if (!h.current || !S) return;
|
|
933
|
+
const j = h.current.getModel()?.original;
|
|
902
934
|
j && t !== j.getValue() && j.setValue(t);
|
|
903
|
-
}, [t,
|
|
904
|
-
if (!
|
|
905
|
-
const j =
|
|
906
|
-
n !== j.getValue() &&
|
|
907
|
-
}, [n,
|
|
908
|
-
if (!
|
|
909
|
-
const j = r ?? "plaintext",
|
|
910
|
-
|
|
911
|
-
}, [r,
|
|
912
|
-
!
|
|
913
|
-
readOnly:
|
|
914
|
-
renderSideBySide:
|
|
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,
|
|
946
|
+
renderSideBySide: c === "side-by-side"
|
|
915
947
|
});
|
|
916
|
-
}, [
|
|
917
|
-
|
|
918
|
-
}, [
|
|
919
|
-
const
|
|
920
|
-
return /* @__PURE__ */ T.jsx("div", { ref:
|
|
921
|
-
"--_diff-height":
|
|
922
|
-
}, "data-testid": "diff-viewer", ...
|
|
948
|
+
}, [l, c, S]), z(() => {
|
|
949
|
+
S && (L.editor.defineTheme(ge, Ae(x.base, A.current)), L.editor.setTheme(ge));
|
|
950
|
+
}, [S, x.registration]);
|
|
951
|
+
const I = (j) => typeof j == "number" ? `${j}px` : j;
|
|
952
|
+
return /* @__PURE__ */ T.jsx("div", { ref: g, className: vr(dt.Root, v), style: {
|
|
953
|
+
"--_diff-height": I(f ?? "100%")
|
|
954
|
+
}, "data-testid": "diff-viewer", ...a ? {} : {
|
|
923
955
|
"data-borderless": ""
|
|
924
|
-
}, children: /* @__PURE__ */ T.jsx("div", { ref: A, className:
|
|
956
|
+
}, children: /* @__PURE__ */ T.jsx("div", { ref: A, className: dt.Inner }) });
|
|
925
957
|
});
|
|
926
|
-
|
|
927
|
-
function
|
|
928
|
-
|
|
929
|
-
}
|
|
930
|
-
function ht() {
|
|
958
|
+
br.displayName = "DiffViewer";
|
|
959
|
+
function Ve(e) {
|
|
960
|
+
const t = Xe(e), n = (r, c = "") => t?.getPropertyValue(r).trim() || c;
|
|
931
961
|
return {
|
|
932
|
-
background:
|
|
933
|
-
foreground:
|
|
934
|
-
cursor:
|
|
935
|
-
selectionBackground:
|
|
936
|
-
selectionForeground:
|
|
937
|
-
black:
|
|
938
|
-
red:
|
|
939
|
-
green:
|
|
940
|
-
yellow:
|
|
941
|
-
blue:
|
|
942
|
-
magenta:
|
|
943
|
-
cyan:
|
|
944
|
-
white:
|
|
945
|
-
brightBlack:
|
|
946
|
-
brightRed:
|
|
947
|
-
brightGreen:
|
|
948
|
-
brightYellow:
|
|
949
|
-
brightBlue:
|
|
950
|
-
brightMagenta:
|
|
951
|
-
brightCyan:
|
|
952
|
-
brightWhite:
|
|
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")
|
|
953
983
|
};
|
|
954
984
|
}
|
|
955
|
-
const
|
|
956
|
-
Root:
|
|
985
|
+
const _r = "_Root_1s8vo_1", wr = {
|
|
986
|
+
Root: _r
|
|
957
987
|
};
|
|
958
|
-
function
|
|
988
|
+
function kr(...e) {
|
|
959
989
|
return e.filter(Boolean).join(" ");
|
|
960
990
|
}
|
|
961
|
-
function
|
|
991
|
+
function xr(e, t) {
|
|
962
992
|
let n = null;
|
|
963
993
|
return {
|
|
964
994
|
run: (...r) => {
|
|
@@ -971,91 +1001,91 @@ function kr(e, t) {
|
|
|
971
1001
|
}
|
|
972
1002
|
};
|
|
973
1003
|
}
|
|
974
|
-
const
|
|
1004
|
+
const Cr = ve(function({
|
|
975
1005
|
onData: t,
|
|
976
1006
|
onBinaryData: n,
|
|
977
1007
|
onResize: r,
|
|
978
|
-
onSignal:
|
|
979
|
-
onError:
|
|
980
|
-
onClose:
|
|
981
|
-
onReady:
|
|
982
|
-
onBell:
|
|
983
|
-
onTitleChange:
|
|
1008
|
+
onSignal: c,
|
|
1009
|
+
onError: l,
|
|
1010
|
+
onClose: f,
|
|
1011
|
+
onReady: a,
|
|
1012
|
+
onBell: v,
|
|
1013
|
+
onTitleChange: g,
|
|
984
1014
|
onKey: x,
|
|
985
1015
|
onSelectionChange: A,
|
|
986
|
-
onLineFeed:
|
|
987
|
-
onScroll:
|
|
1016
|
+
onLineFeed: h,
|
|
1017
|
+
onScroll: S,
|
|
988
1018
|
onWriteParsed: C,
|
|
989
|
-
fontSize:
|
|
1019
|
+
fontSize: I = 13,
|
|
990
1020
|
fontFamily: j,
|
|
991
|
-
fontWeight:
|
|
992
|
-
fontWeightBold:
|
|
993
|
-
scrollback:
|
|
994
|
-
cursorBlink:
|
|
995
|
-
cursorStyle:
|
|
996
|
-
cursorWidth:
|
|
997
|
-
lineHeight:
|
|
1021
|
+
fontWeight: W,
|
|
1022
|
+
fontWeightBold: H,
|
|
1023
|
+
scrollback: Y = 5e3,
|
|
1024
|
+
cursorBlink: J = !0,
|
|
1025
|
+
cursorStyle: U,
|
|
1026
|
+
cursorWidth: D,
|
|
1027
|
+
lineHeight: V,
|
|
998
1028
|
letterSpacing: P,
|
|
999
|
-
drawBoldTextInBrightColors:
|
|
1000
|
-
convertEol:
|
|
1001
|
-
allowTransparency:
|
|
1029
|
+
drawBoldTextInBrightColors: X = !0,
|
|
1030
|
+
convertEol: ne = !0,
|
|
1031
|
+
allowTransparency: y = !0,
|
|
1002
1032
|
macOptionIsMeta: s = !0,
|
|
1003
|
-
macOptionClickForcesSelection:
|
|
1004
|
-
linkHandling:
|
|
1033
|
+
macOptionClickForcesSelection: w = !0,
|
|
1034
|
+
linkHandling: k = !0,
|
|
1005
1035
|
disableStdin: i,
|
|
1006
|
-
customKeyEventHandler:
|
|
1007
|
-
autoFocus:
|
|
1008
|
-
renderer:
|
|
1009
|
-
rows:
|
|
1010
|
-
cols:
|
|
1036
|
+
customKeyEventHandler: u,
|
|
1037
|
+
autoFocus: m = !1,
|
|
1038
|
+
renderer: d = "auto",
|
|
1039
|
+
rows: p,
|
|
1040
|
+
cols: b,
|
|
1011
1041
|
screenReaderMode: o,
|
|
1012
|
-
minimumContrastRatio:
|
|
1042
|
+
minimumContrastRatio: _,
|
|
1013
1043
|
className: M
|
|
1014
1044
|
}, E) {
|
|
1015
|
-
const
|
|
1045
|
+
const $ = F(null), N = F(null), O = F(null), q = F(null), Q = F(null), oe = F([]), le = F(null), ae = F(null), G = F(null), ce = Qe(), ee = F({
|
|
1016
1046
|
onData: t,
|
|
1017
1047
|
onBinaryData: n,
|
|
1018
1048
|
onResize: r,
|
|
1019
|
-
onSignal:
|
|
1020
|
-
onError:
|
|
1021
|
-
onClose:
|
|
1022
|
-
onReady:
|
|
1023
|
-
onBell:
|
|
1024
|
-
onTitleChange:
|
|
1049
|
+
onSignal: c,
|
|
1050
|
+
onError: l,
|
|
1051
|
+
onClose: f,
|
|
1052
|
+
onReady: a,
|
|
1053
|
+
onBell: v,
|
|
1054
|
+
onTitleChange: g,
|
|
1025
1055
|
onKey: x,
|
|
1026
1056
|
onSelectionChange: A,
|
|
1027
|
-
onLineFeed:
|
|
1028
|
-
onScroll:
|
|
1057
|
+
onLineFeed: h,
|
|
1058
|
+
onScroll: S,
|
|
1029
1059
|
onWriteParsed: C
|
|
1030
1060
|
});
|
|
1031
|
-
|
|
1061
|
+
ee.current = {
|
|
1032
1062
|
onData: t,
|
|
1033
1063
|
onBinaryData: n,
|
|
1034
1064
|
onResize: r,
|
|
1035
|
-
onSignal:
|
|
1036
|
-
onError:
|
|
1037
|
-
onClose:
|
|
1038
|
-
onReady:
|
|
1039
|
-
onBell:
|
|
1040
|
-
onTitleChange:
|
|
1065
|
+
onSignal: c,
|
|
1066
|
+
onError: l,
|
|
1067
|
+
onClose: f,
|
|
1068
|
+
onReady: a,
|
|
1069
|
+
onBell: v,
|
|
1070
|
+
onTitleChange: g,
|
|
1041
1071
|
onKey: x,
|
|
1042
1072
|
onSelectionChange: A,
|
|
1043
|
-
onLineFeed:
|
|
1044
|
-
onScroll:
|
|
1073
|
+
onLineFeed: h,
|
|
1074
|
+
onScroll: S,
|
|
1045
1075
|
onWriteParsed: C
|
|
1046
1076
|
};
|
|
1047
|
-
const
|
|
1077
|
+
const Oe = vt(() => {
|
|
1048
1078
|
try {
|
|
1049
1079
|
O.current?.fit?.();
|
|
1050
1080
|
} catch {
|
|
1051
1081
|
}
|
|
1052
1082
|
}, []);
|
|
1053
|
-
return
|
|
1054
|
-
write: (
|
|
1055
|
-
N.current?.write?.(
|
|
1083
|
+
return yt(E, () => ({
|
|
1084
|
+
write: (R) => {
|
|
1085
|
+
N.current?.write?.(R);
|
|
1056
1086
|
},
|
|
1057
|
-
writeln: (
|
|
1058
|
-
N.current?.writeln?.(
|
|
1087
|
+
writeln: (R) => {
|
|
1088
|
+
N.current?.writeln?.(R);
|
|
1059
1089
|
},
|
|
1060
1090
|
clear: () => {
|
|
1061
1091
|
N.current?.clear?.();
|
|
@@ -1066,12 +1096,12 @@ const xr = _e(function({
|
|
|
1066
1096
|
blur: () => {
|
|
1067
1097
|
N.current?.blur?.();
|
|
1068
1098
|
},
|
|
1069
|
-
fit:
|
|
1099
|
+
fit: Oe,
|
|
1070
1100
|
getDimensions: () => {
|
|
1071
|
-
const
|
|
1072
|
-
return
|
|
1073
|
-
cols:
|
|
1074
|
-
rows:
|
|
1101
|
+
const R = N.current;
|
|
1102
|
+
return R && typeof R.cols == "number" && typeof R.rows == "number" ? {
|
|
1103
|
+
cols: R.cols,
|
|
1104
|
+
rows: R.rows
|
|
1075
1105
|
} : null;
|
|
1076
1106
|
},
|
|
1077
1107
|
reset: () => {
|
|
@@ -1080,10 +1110,10 @@ const xr = _e(function({
|
|
|
1080
1110
|
scrollToBottom: () => {
|
|
1081
1111
|
N.current?.scrollToBottom?.();
|
|
1082
1112
|
},
|
|
1083
|
-
findNext: (
|
|
1084
|
-
findPrevious: (
|
|
1113
|
+
findNext: (R, te) => q.current?.findNext?.(R, te) ?? !1,
|
|
1114
|
+
findPrevious: (R, te) => q.current?.findPrevious?.(R, te) ?? !1,
|
|
1085
1115
|
clearSearch: () => {
|
|
1086
|
-
|
|
1116
|
+
q.current?.clearDecorations?.();
|
|
1087
1117
|
},
|
|
1088
1118
|
getSelection: () => N.current?.getSelection?.() ?? "",
|
|
1089
1119
|
hasSelection: () => N.current?.hasSelection?.() ?? !1,
|
|
@@ -1093,196 +1123,196 @@ const xr = _e(function({
|
|
|
1093
1123
|
clearSelection: () => {
|
|
1094
1124
|
N.current?.clearSelection?.();
|
|
1095
1125
|
},
|
|
1096
|
-
scrollToLine: (
|
|
1097
|
-
N.current?.scrollToLine?.(
|
|
1126
|
+
scrollToLine: (R) => {
|
|
1127
|
+
N.current?.scrollToLine?.(R);
|
|
1098
1128
|
},
|
|
1099
|
-
scrollUp: (
|
|
1100
|
-
N.current?.scrollLines?.(-
|
|
1129
|
+
scrollUp: (R) => {
|
|
1130
|
+
N.current?.scrollLines?.(-R);
|
|
1101
1131
|
},
|
|
1102
|
-
scrollDown: (
|
|
1103
|
-
N.current?.scrollLines?.(
|
|
1132
|
+
scrollDown: (R) => {
|
|
1133
|
+
N.current?.scrollLines?.(R);
|
|
1104
1134
|
},
|
|
1105
|
-
paste: (
|
|
1106
|
-
N.current?.paste?.(
|
|
1135
|
+
paste: (R) => {
|
|
1136
|
+
N.current?.paste?.(R);
|
|
1107
1137
|
},
|
|
1108
|
-
getBufferContent: () =>
|
|
1109
|
-
})),
|
|
1110
|
-
const
|
|
1111
|
-
if (!
|
|
1112
|
-
let
|
|
1113
|
-
async function
|
|
1138
|
+
getBufferContent: () => Q.current?.serialize?.() ?? ""
|
|
1139
|
+
})), z(() => {
|
|
1140
|
+
const R = $.current;
|
|
1141
|
+
if (!R) return;
|
|
1142
|
+
let te = !1;
|
|
1143
|
+
async function Pe() {
|
|
1114
1144
|
await document.fonts.ready;
|
|
1115
1145
|
const [{
|
|
1116
|
-
Terminal:
|
|
1146
|
+
Terminal: pe
|
|
1117
1147
|
}, {
|
|
1118
|
-
FitAddon:
|
|
1148
|
+
FitAddon: Le
|
|
1119
1149
|
}, {
|
|
1120
|
-
SearchAddon:
|
|
1150
|
+
SearchAddon: Nt
|
|
1121
1151
|
}, {
|
|
1122
|
-
SerializeAddon:
|
|
1152
|
+
SerializeAddon: Ot
|
|
1123
1153
|
}, {
|
|
1124
|
-
Unicode11Addon:
|
|
1154
|
+
Unicode11Addon: Pt
|
|
1125
1155
|
}] = await Promise.all([import("@xterm/xterm"), import("@xterm/addon-fit"), import("@xterm/addon-search"), import("@xterm/addon-serialize"), import("@xterm/addon-unicode11")]);
|
|
1126
|
-
if (
|
|
1127
|
-
const
|
|
1128
|
-
fontSize:
|
|
1156
|
+
if (te) return;
|
|
1157
|
+
const Lt = Ve(R), ie = {
|
|
1158
|
+
fontSize: I,
|
|
1129
1159
|
fontFamily: j || "'Menlo', 'Monaco', 'Consolas', 'Liberation Mono', 'Courier New', monospace",
|
|
1130
|
-
theme:
|
|
1131
|
-
allowTransparency:
|
|
1132
|
-
cursorBlink:
|
|
1133
|
-
convertEol:
|
|
1134
|
-
scrollback:
|
|
1160
|
+
theme: Lt,
|
|
1161
|
+
allowTransparency: y,
|
|
1162
|
+
cursorBlink: J,
|
|
1163
|
+
convertEol: ne,
|
|
1164
|
+
scrollback: Y,
|
|
1135
1165
|
macOptionIsMeta: s,
|
|
1136
|
-
macOptionClickForcesSelection:
|
|
1166
|
+
macOptionClickForcesSelection: w,
|
|
1137
1167
|
allowProposedApi: !0,
|
|
1138
|
-
drawBoldTextInBrightColors:
|
|
1168
|
+
drawBoldTextInBrightColors: X
|
|
1139
1169
|
};
|
|
1140
|
-
|
|
1141
|
-
const
|
|
1142
|
-
|
|
1143
|
-
const
|
|
1144
|
-
if (
|
|
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)
|
|
1145
1175
|
try {
|
|
1146
1176
|
const {
|
|
1147
|
-
WebLinksAddon:
|
|
1177
|
+
WebLinksAddon: Z
|
|
1148
1178
|
} = await import("@xterm/addon-web-links");
|
|
1149
|
-
if (!
|
|
1150
|
-
const
|
|
1151
|
-
|
|
1179
|
+
if (!te) {
|
|
1180
|
+
const ue = new Z();
|
|
1181
|
+
B.loadAddon(ue), _e.push(ue);
|
|
1152
1182
|
}
|
|
1153
1183
|
} catch {
|
|
1154
1184
|
}
|
|
1155
|
-
if (
|
|
1156
|
-
|
|
1185
|
+
if (te) {
|
|
1186
|
+
B.dispose();
|
|
1157
1187
|
return;
|
|
1158
1188
|
}
|
|
1159
|
-
if (
|
|
1189
|
+
if (B.open(R), d === "auto" || d === "webgl")
|
|
1160
1190
|
try {
|
|
1161
1191
|
const {
|
|
1162
|
-
WebglAddon:
|
|
1192
|
+
WebglAddon: Z
|
|
1163
1193
|
} = await import("@xterm/addon-webgl");
|
|
1164
|
-
if (!
|
|
1165
|
-
const
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
}),
|
|
1194
|
+
if (!te) {
|
|
1195
|
+
const ue = new Z();
|
|
1196
|
+
ue.onContextLoss(() => {
|
|
1197
|
+
ue.dispose();
|
|
1198
|
+
}), B.loadAddon(ue), _e.push(ue);
|
|
1169
1199
|
}
|
|
1170
1200
|
} catch {
|
|
1171
1201
|
}
|
|
1172
|
-
if (
|
|
1173
|
-
for (const
|
|
1202
|
+
if (te) {
|
|
1203
|
+
for (const Z of _e)
|
|
1174
1204
|
try {
|
|
1175
|
-
|
|
1205
|
+
Z.dispose();
|
|
1176
1206
|
} catch {
|
|
1177
1207
|
}
|
|
1178
|
-
|
|
1208
|
+
B.dispose();
|
|
1179
1209
|
return;
|
|
1180
1210
|
}
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
}),
|
|
1184
|
-
|
|
1185
|
-
}),
|
|
1186
|
-
cols:
|
|
1187
|
-
rows:
|
|
1211
|
+
B.options.theme = Ve(R), we.fit(), N.current = B, O.current = we, q.current = De, Q.current = $e, oe.current = _e, B.onData((Z) => {
|
|
1212
|
+
ee.current.onData?.(Z);
|
|
1213
|
+
}), B.onBinary((Z) => {
|
|
1214
|
+
ee.current.onBinaryData?.(Z);
|
|
1215
|
+
}), B.onResize(({
|
|
1216
|
+
cols: Z,
|
|
1217
|
+
rows: ue
|
|
1188
1218
|
}) => {
|
|
1189
|
-
|
|
1190
|
-
}),
|
|
1191
|
-
|
|
1192
|
-
}),
|
|
1193
|
-
|
|
1194
|
-
}),
|
|
1195
|
-
|
|
1196
|
-
}),
|
|
1197
|
-
|
|
1198
|
-
}),
|
|
1199
|
-
|
|
1200
|
-
}),
|
|
1201
|
-
|
|
1202
|
-
}),
|
|
1203
|
-
|
|
1219
|
+
ee.current.onResize?.(Z, ue);
|
|
1220
|
+
}), B.onBell(() => {
|
|
1221
|
+
ee.current.onBell?.();
|
|
1222
|
+
}), B.onTitleChange((Z) => {
|
|
1223
|
+
ee.current.onTitleChange?.(Z);
|
|
1224
|
+
}), B.onKey((Z) => {
|
|
1225
|
+
ee.current.onKey?.(Z);
|
|
1226
|
+
}), B.onSelectionChange(() => {
|
|
1227
|
+
ee.current.onSelectionChange?.();
|
|
1228
|
+
}), B.onLineFeed(() => {
|
|
1229
|
+
ee.current.onLineFeed?.();
|
|
1230
|
+
}), B.onScroll((Z) => {
|
|
1231
|
+
ee.current.onScroll?.(Z);
|
|
1232
|
+
}), B.onWriteParsed(() => {
|
|
1233
|
+
ee.current.onWriteParsed?.();
|
|
1204
1234
|
});
|
|
1205
|
-
const
|
|
1235
|
+
const Ie = xr(() => {
|
|
1206
1236
|
try {
|
|
1207
|
-
|
|
1237
|
+
we.fit();
|
|
1208
1238
|
} catch {
|
|
1209
1239
|
}
|
|
1210
1240
|
}, 10);
|
|
1211
|
-
|
|
1241
|
+
ae.current = Ie;
|
|
1212
1242
|
const Ke = new ResizeObserver(() => {
|
|
1213
|
-
|
|
1243
|
+
Ie.run();
|
|
1214
1244
|
});
|
|
1215
|
-
Ke.observe(
|
|
1245
|
+
Ke.observe(R), le.current = Ke;
|
|
1216
1246
|
const et = () => {
|
|
1217
|
-
|
|
1247
|
+
Ie.run();
|
|
1218
1248
|
};
|
|
1219
|
-
window.addEventListener("resize", et),
|
|
1249
|
+
window.addEventListener("resize", et), G.current = () => {
|
|
1220
1250
|
window.removeEventListener("resize", et);
|
|
1221
|
-
},
|
|
1222
|
-
cols:
|
|
1223
|
-
rows:
|
|
1251
|
+
}, m && B.focus(), ee.current.onReady?.({
|
|
1252
|
+
cols: B.cols,
|
|
1253
|
+
rows: B.rows
|
|
1224
1254
|
});
|
|
1225
1255
|
}
|
|
1226
|
-
return
|
|
1227
|
-
|
|
1256
|
+
return Pe().catch((pe) => {
|
|
1257
|
+
ee.current.onError?.(pe instanceof Error ? pe : new Error(String(pe)));
|
|
1228
1258
|
}), () => {
|
|
1229
|
-
|
|
1230
|
-
for (const
|
|
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)
|
|
1231
1261
|
try {
|
|
1232
|
-
|
|
1262
|
+
Le.dispose();
|
|
1233
1263
|
} catch {
|
|
1234
1264
|
}
|
|
1235
|
-
|
|
1236
|
-
const
|
|
1265
|
+
oe.current = [];
|
|
1266
|
+
const pe = N.current;
|
|
1237
1267
|
try {
|
|
1238
|
-
|
|
1268
|
+
pe?.dispose?.();
|
|
1239
1269
|
} catch {
|
|
1240
1270
|
}
|
|
1241
|
-
N.current = null, O.current = null,
|
|
1271
|
+
N.current = null, O.current = null, q.current = null, Q.current = null;
|
|
1242
1272
|
};
|
|
1243
|
-
}, []),
|
|
1244
|
-
const
|
|
1245
|
-
|
|
1246
|
-
}, [
|
|
1247
|
-
const
|
|
1248
|
-
|
|
1249
|
-
}, [
|
|
1250
|
-
const
|
|
1251
|
-
|
|
1252
|
-
}, [
|
|
1253
|
-
const
|
|
1254
|
-
|
|
1255
|
-
}, [
|
|
1256
|
-
const
|
|
1257
|
-
|
|
1258
|
-
}, [
|
|
1259
|
-
const
|
|
1260
|
-
|
|
1261
|
-
}, [
|
|
1262
|
-
const
|
|
1263
|
-
|
|
1264
|
-
}, [P]), /* @__PURE__ */ T.jsx("div", { ref:
|
|
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 && Y !== void 0 && (R.options.scrollback = Y);
|
|
1288
|
+
}, [Y]), 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" });
|
|
1265
1295
|
});
|
|
1266
|
-
|
|
1267
|
-
const
|
|
1268
|
-
Root:
|
|
1269
|
-
Loading:
|
|
1270
|
-
},
|
|
1271
|
-
function
|
|
1296
|
+
Cr.displayName = "Terminal";
|
|
1297
|
+
const Rr = "_Root_1q0x1_1", Sr = "_Loading_1q0x1_92", ft = {
|
|
1298
|
+
Root: Rr,
|
|
1299
|
+
Loading: Sr
|
|
1300
|
+
}, Tr = [Yt], Er = $t(() => import("react-markdown"));
|
|
1301
|
+
function jr(...e) {
|
|
1272
1302
|
return e.filter(Boolean).join(" ");
|
|
1273
1303
|
}
|
|
1274
|
-
function
|
|
1275
|
-
return e ? e.type === "text" ? e.value ?? "" : Array.isArray(e.children) ? e.children.map(
|
|
1304
|
+
function wt(e) {
|
|
1305
|
+
return e ? e.type === "text" ? e.value ?? "" : Array.isArray(e.children) ? e.children.map(wt).join("") : "" : "";
|
|
1276
1306
|
}
|
|
1277
|
-
function
|
|
1278
|
-
const t =
|
|
1307
|
+
function Mr(e) {
|
|
1308
|
+
const t = be.c(4), {
|
|
1279
1309
|
summaryText: n,
|
|
1280
1310
|
children: r
|
|
1281
|
-
} = e,
|
|
1282
|
-
let
|
|
1283
|
-
return t[0] !== r || t[1] !==
|
|
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;
|
|
1284
1314
|
}
|
|
1285
|
-
const
|
|
1315
|
+
const Ar = {
|
|
1286
1316
|
// Code blocks & inline code
|
|
1287
1317
|
pre: ({
|
|
1288
1318
|
children: e
|
|
@@ -1293,29 +1323,29 @@ const Mr = {
|
|
|
1293
1323
|
}) => {
|
|
1294
1324
|
const n = /language-([^\s]+)/.exec(e ?? ""), r = String(t).replace(/\n$/, "");
|
|
1295
1325
|
return n || r.includes(`
|
|
1296
|
-
`) ? /* @__PURE__ */ T.jsx(
|
|
1326
|
+
`) ? /* @__PURE__ */ T.jsx(qt, { language: n?.[1], copyable: !0, children: r }) : /* @__PURE__ */ T.jsx(Ft, { children: t });
|
|
1297
1327
|
},
|
|
1298
1328
|
// Tables
|
|
1299
1329
|
table: ({
|
|
1300
1330
|
children: e
|
|
1301
|
-
}) => /* @__PURE__ */ T.jsx(
|
|
1331
|
+
}) => /* @__PURE__ */ T.jsx(ye.Root, { striped: !0, hoverable: !0, size: "sm", children: e }),
|
|
1302
1332
|
thead: ({
|
|
1303
1333
|
children: e
|
|
1304
|
-
}) => /* @__PURE__ */ T.jsx(
|
|
1334
|
+
}) => /* @__PURE__ */ T.jsx(ye.Head, { children: e }),
|
|
1305
1335
|
tbody: ({
|
|
1306
1336
|
children: e
|
|
1307
|
-
}) => /* @__PURE__ */ T.jsx(
|
|
1337
|
+
}) => /* @__PURE__ */ T.jsx(ye.Body, { children: e }),
|
|
1308
1338
|
tr: ({
|
|
1309
1339
|
children: e
|
|
1310
|
-
}) => /* @__PURE__ */ T.jsx(
|
|
1340
|
+
}) => /* @__PURE__ */ T.jsx(ye.Row, { children: e }),
|
|
1311
1341
|
th: ({
|
|
1312
1342
|
children: e,
|
|
1313
1343
|
style: t
|
|
1314
|
-
}) => /* @__PURE__ */ T.jsx(
|
|
1344
|
+
}) => /* @__PURE__ */ T.jsx(ye.HeaderCell, { style: t, children: e }),
|
|
1315
1345
|
td: ({
|
|
1316
1346
|
children: e,
|
|
1317
1347
|
style: t
|
|
1318
|
-
}) => /* @__PURE__ */ T.jsx(
|
|
1348
|
+
}) => /* @__PURE__ */ T.jsx(ye.Cell, { style: t, children: e }),
|
|
1319
1349
|
// Links
|
|
1320
1350
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
1321
1351
|
a: ({
|
|
@@ -1327,9 +1357,9 @@ const Mr = {
|
|
|
1327
1357
|
// Blockquotes
|
|
1328
1358
|
blockquote: ({
|
|
1329
1359
|
children: e
|
|
1330
|
-
}) => /* @__PURE__ */ T.jsx(
|
|
1360
|
+
}) => /* @__PURE__ */ T.jsx(Ut, { variant: "plain", children: e }),
|
|
1331
1361
|
// Horizontal rules
|
|
1332
|
-
hr: () => /* @__PURE__ */ T.jsx(
|
|
1362
|
+
hr: () => /* @__PURE__ */ T.jsx(Ht, {}),
|
|
1333
1363
|
// Details/summary → Accordion — extract title from the hast node's summary child
|
|
1334
1364
|
details: ({
|
|
1335
1365
|
children: e,
|
|
@@ -1337,16 +1367,16 @@ const Mr = {
|
|
|
1337
1367
|
}) => {
|
|
1338
1368
|
let n = "Details";
|
|
1339
1369
|
if (t?.children) {
|
|
1340
|
-
const
|
|
1341
|
-
if (
|
|
1342
|
-
const
|
|
1343
|
-
|
|
1370
|
+
const c = t.children.find((l) => l.tagName === "summary");
|
|
1371
|
+
if (c) {
|
|
1372
|
+
const l = wt(c).trim();
|
|
1373
|
+
l && (n = l);
|
|
1344
1374
|
}
|
|
1345
1375
|
}
|
|
1346
1376
|
const r = [];
|
|
1347
|
-
return
|
|
1348
|
-
|
|
1349
|
-
}), /* @__PURE__ */ T.jsx(
|
|
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 });
|
|
1350
1380
|
},
|
|
1351
1381
|
// Mark summary so details can filter it out; text is extracted from hast node
|
|
1352
1382
|
summary: ({
|
|
@@ -1357,301 +1387,301 @@ const Mr = {
|
|
|
1357
1387
|
type: e,
|
|
1358
1388
|
checked: t,
|
|
1359
1389
|
disabled: n
|
|
1360
|
-
}) => e === "checkbox" ? /* @__PURE__ */ T.jsx(
|
|
1361
|
-
},
|
|
1362
|
-
const r =
|
|
1363
|
-
let
|
|
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;
|
|
1364
1394
|
r[0] !== t ? ({
|
|
1365
|
-
content:
|
|
1366
|
-
allowHtml:
|
|
1367
|
-
className:
|
|
1368
|
-
...
|
|
1369
|
-
} = t, r[0] = t, r[1] =
|
|
1370
|
-
const
|
|
1371
|
-
let
|
|
1372
|
-
r[5] !==
|
|
1395
|
+
content: l,
|
|
1396
|
+
allowHtml: a,
|
|
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;
|
|
1401
|
+
let g;
|
|
1402
|
+
r[5] !== c ? (g = jr(ft.Root, c), r[5] = c, r[6] = g) : g = r[6];
|
|
1373
1403
|
let x;
|
|
1374
|
-
r[7] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (x = /* @__PURE__ */ T.jsx("div", { className:
|
|
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];
|
|
1375
1405
|
let A;
|
|
1376
|
-
r[8] !==
|
|
1377
|
-
let
|
|
1378
|
-
return r[11] !==
|
|
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;
|
|
1379
1409
|
});
|
|
1380
|
-
|
|
1381
|
-
const
|
|
1382
|
-
...
|
|
1410
|
+
Nr.displayName = "MarkdownPreview";
|
|
1411
|
+
const Or = {
|
|
1412
|
+
...Be,
|
|
1383
1413
|
attributes: {
|
|
1384
|
-
...
|
|
1385
|
-
"*": [...
|
|
1414
|
+
...Be.attributes,
|
|
1415
|
+
"*": [...Be.attributes?.["*"] ?? [], "className"]
|
|
1386
1416
|
}
|
|
1387
1417
|
};
|
|
1388
|
-
function
|
|
1389
|
-
const t =
|
|
1418
|
+
function Pr(e) {
|
|
1419
|
+
const t = be.c(6), {
|
|
1390
1420
|
content: n,
|
|
1391
1421
|
allowHtml: r
|
|
1392
1422
|
} = e;
|
|
1393
|
-
let
|
|
1394
|
-
t[0] !== r ? (
|
|
1395
|
-
const
|
|
1396
|
-
let
|
|
1397
|
-
return t[2] !== n || t[3] !==
|
|
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;
|
|
1398
1428
|
}
|
|
1399
|
-
const
|
|
1400
|
-
Overlay:
|
|
1401
|
-
Root:
|
|
1402
|
-
CommandList:
|
|
1403
|
-
Results:
|
|
1429
|
+
const Lr = "_Overlay_1mqkc_1", Dr = "_Root_1mqkc_11", $r = "_CommandList_1mqkc_24", Ir = "_Results_1mqkc_29", Ee = {
|
|
1430
|
+
Overlay: Lr,
|
|
1431
|
+
Root: Dr,
|
|
1432
|
+
CommandList: $r,
|
|
1433
|
+
Results: Ir
|
|
1404
1434
|
};
|
|
1405
|
-
function
|
|
1435
|
+
function Wr(e) {
|
|
1406
1436
|
return e.id;
|
|
1407
1437
|
}
|
|
1408
1438
|
function qe(e, t) {
|
|
1409
1439
|
const n = e.toLowerCase(), r = t.toLowerCase();
|
|
1410
|
-
let
|
|
1411
|
-
for (let
|
|
1412
|
-
n[
|
|
1413
|
-
return
|
|
1414
|
-
}
|
|
1415
|
-
const
|
|
1416
|
-
const r =
|
|
1417
|
-
open:
|
|
1418
|
-
onClose:
|
|
1419
|
-
commands:
|
|
1420
|
-
onSelect:
|
|
1421
|
-
placeholder:
|
|
1422
|
-
} = t,
|
|
1440
|
+
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;
|
|
1423
1453
|
let x;
|
|
1424
|
-
r[0] !==
|
|
1454
|
+
r[0] !== f ? (x = f.filter(zr), r[0] = f, r[1] = x) : x = r[1];
|
|
1425
1455
|
const A = x;
|
|
1426
|
-
if (!
|
|
1456
|
+
if (!c)
|
|
1427
1457
|
return null;
|
|
1428
|
-
let
|
|
1429
|
-
r[2] !==
|
|
1430
|
-
|
|
1431
|
-
}, r[2] =
|
|
1432
|
-
let
|
|
1433
|
-
r[4] !==
|
|
1434
|
-
|
|
1435
|
-
}, r[4] =
|
|
1436
|
-
let C,
|
|
1437
|
-
r[7] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (C = /* @__PURE__ */ T.jsx(
|
|
1438
|
-
let
|
|
1439
|
-
r[10] !== A || r[11] !==
|
|
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: qr, groupBy: Fr, onAction: S, onDismiss: l, placeholder: g, density: "compact", children: [
|
|
1440
1470
|
C,
|
|
1441
|
-
|
|
1471
|
+
I,
|
|
1442
1472
|
j
|
|
1443
|
-
] }), r[10] = A, r[11] =
|
|
1444
|
-
let
|
|
1445
|
-
r[15] !== n || r[16] !==
|
|
1446
|
-
let
|
|
1447
|
-
return r[18] !==
|
|
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 Y;
|
|
1477
|
+
return r[18] !== l || r[19] !== h || r[20] !== H ? (Y = /* @__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] = Y) : Y = r[21], Y;
|
|
1448
1478
|
});
|
|
1449
|
-
|
|
1450
|
-
function
|
|
1479
|
+
Br.displayName = "CommandPalette";
|
|
1480
|
+
function zr(e) {
|
|
1451
1481
|
return !e.disabled;
|
|
1452
1482
|
}
|
|
1453
|
-
function
|
|
1483
|
+
function Hr(e) {
|
|
1454
1484
|
return e.stopPropagation();
|
|
1455
1485
|
}
|
|
1456
|
-
function
|
|
1486
|
+
function Ur(e) {
|
|
1457
1487
|
return e.stopPropagation();
|
|
1458
1488
|
}
|
|
1459
|
-
function
|
|
1460
|
-
return /* @__PURE__ */ T.jsxs(
|
|
1461
|
-
e.icon && /* @__PURE__ */ T.jsx(
|
|
1462
|
-
/* @__PURE__ */ T.jsx(
|
|
1463
|
-
e.description && /* @__PURE__ */ T.jsx(
|
|
1464
|
-
e.shortcut && /* @__PURE__ */ T.jsx(
|
|
1489
|
+
function Vr(e, t) {
|
|
1490
|
+
return /* @__PURE__ */ T.jsxs(fe.Item, { itemKey: t.key, "data-testid": `command-item-${e.id}`, children: [
|
|
1491
|
+
e.icon && /* @__PURE__ */ T.jsx(fe.ItemIcon, { children: e.icon }),
|
|
1492
|
+
/* @__PURE__ */ T.jsx(fe.ItemLabel, { children: e.label }),
|
|
1493
|
+
e.description && /* @__PURE__ */ T.jsx(fe.ItemDescription, { children: e.description }),
|
|
1494
|
+
e.shortcut && /* @__PURE__ */ T.jsx(fe.ItemShortcut, { children: e.shortcut })
|
|
1465
1495
|
] });
|
|
1466
1496
|
}
|
|
1467
|
-
function
|
|
1497
|
+
function qr(e, t) {
|
|
1468
1498
|
return qe(e.label, t) || (e.description ? qe(e.description, t) : !1) || (e.group ? qe(e.group, t) : !1);
|
|
1469
1499
|
}
|
|
1470
|
-
function
|
|
1500
|
+
function Fr(e) {
|
|
1471
1501
|
return e.group || "";
|
|
1472
1502
|
}
|
|
1473
|
-
const
|
|
1474
|
-
Root:
|
|
1475
|
-
Toolbar:
|
|
1476
|
-
SearchInput:
|
|
1477
|
-
CopyButton:
|
|
1478
|
-
Tree:
|
|
1479
|
-
Node:
|
|
1480
|
-
Row:
|
|
1481
|
-
RowHighlight:
|
|
1482
|
-
Chevron:
|
|
1483
|
-
ChevronExpanded:
|
|
1484
|
-
ChevronSpacer:
|
|
1485
|
-
Key:
|
|
1486
|
-
Colon:
|
|
1487
|
-
Value:
|
|
1488
|
-
Preview:
|
|
1489
|
-
Comma:
|
|
1503
|
+
const Yr = "_Root_11wha_1", Jr = "_Toolbar_11wha_12", Gr = "_SearchInput_11wha_20", Xr = "_CopyButton_11wha_41", Qr = "_Tree_11wha_55", Zr = "_Node_11wha_59", Kr = "_Row_11wha_63", en = "_RowHighlight_11wha_76", tn = "_Chevron_11wha_80", rn = "_ChevronExpanded_11wha_93", nn = "_ChevronSpacer_11wha_97", on = "_Key_11wha_103", sn = "_Colon_11wha_107", an = "_Value_11wha_111", cn = "_Preview_11wha_129", ln = "_Comma_11wha_134", re = {
|
|
1504
|
+
Root: Yr,
|
|
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
|
|
1490
1520
|
};
|
|
1491
|
-
function
|
|
1521
|
+
function Fe(...e) {
|
|
1492
1522
|
return e.filter(Boolean).join(" ");
|
|
1493
1523
|
}
|
|
1494
|
-
function
|
|
1524
|
+
function kt(e) {
|
|
1495
1525
|
return e === null ? "null" : e === void 0 ? "undefined" : Array.isArray(e) ? "array" : typeof e;
|
|
1496
1526
|
}
|
|
1497
|
-
function
|
|
1527
|
+
function un(e) {
|
|
1498
1528
|
return e === null ? "null" : e === void 0 ? "undefined" : typeof e == "string" ? JSON.stringify(e) : String(e);
|
|
1499
1529
|
}
|
|
1500
|
-
function
|
|
1530
|
+
function dn(e, t) {
|
|
1501
1531
|
return typeof e == "boolean" ? e : t < e;
|
|
1502
1532
|
}
|
|
1503
|
-
function
|
|
1533
|
+
function xt(e, t, n) {
|
|
1504
1534
|
const r = n.toLowerCase();
|
|
1505
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));
|
|
1506
1536
|
}
|
|
1507
|
-
function
|
|
1537
|
+
function Re(e) {
|
|
1508
1538
|
return e !== null && (typeof e == "object" || typeof e == "function");
|
|
1509
1539
|
}
|
|
1510
|
-
function
|
|
1540
|
+
function Ct(e, t, n, r) {
|
|
1511
1541
|
if (!t) return !1;
|
|
1512
|
-
const
|
|
1513
|
-
if (
|
|
1514
|
-
if (
|
|
1515
|
-
const
|
|
1516
|
-
has: (
|
|
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)
|
|
1517
1547
|
};
|
|
1518
|
-
let
|
|
1519
|
-
for (const [
|
|
1520
|
-
if (
|
|
1521
|
-
|
|
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;
|
|
1522
1552
|
break;
|
|
1523
1553
|
}
|
|
1524
|
-
return
|
|
1554
|
+
return Re(e) && r.set(e, f), f;
|
|
1525
1555
|
}
|
|
1526
|
-
function
|
|
1527
|
-
const t =
|
|
1556
|
+
function Rt(e) {
|
|
1557
|
+
const t = be.c(80), {
|
|
1528
1558
|
nodeKey: n,
|
|
1529
1559
|
value: r,
|
|
1530
|
-
depth:
|
|
1531
|
-
defaultExpanded:
|
|
1532
|
-
searchQuery:
|
|
1533
|
-
isLast:
|
|
1534
|
-
ancestors:
|
|
1535
|
-
searchCache:
|
|
1560
|
+
depth: c,
|
|
1561
|
+
defaultExpanded: l,
|
|
1562
|
+
searchQuery: f,
|
|
1563
|
+
isLast: a,
|
|
1564
|
+
ancestors: v,
|
|
1565
|
+
searchCache: g
|
|
1536
1566
|
} = e;
|
|
1537
1567
|
let x;
|
|
1538
|
-
t[0] !== r ? (x =
|
|
1539
|
-
const A = x,
|
|
1540
|
-
let
|
|
1541
|
-
t[2] !==
|
|
1542
|
-
const C =
|
|
1543
|
-
let
|
|
1544
|
-
t[6] !==
|
|
1545
|
-
const [j,
|
|
1546
|
-
let
|
|
1547
|
-
t[11] !==
|
|
1548
|
-
const
|
|
1549
|
-
let
|
|
1550
|
-
t[16] !== j || t[17] !==
|
|
1551
|
-
|
|
1552
|
-
},
|
|
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 = F(!1), Y = F(!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 || (Y.current = j), H.current = !0, W(!0)), H.current && (!f || !U) && (H.current = !1, W(Y.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);
|
|
1553
1583
|
let P;
|
|
1554
1584
|
e: {
|
|
1555
|
-
if (!
|
|
1556
|
-
P =
|
|
1585
|
+
if (!h || !Re(r) || C) {
|
|
1586
|
+
P = v;
|
|
1557
1587
|
break e;
|
|
1558
1588
|
}
|
|
1559
|
-
let
|
|
1560
|
-
t[23] !==
|
|
1561
|
-
has: (
|
|
1562
|
-
}, t[23] =
|
|
1589
|
+
let G;
|
|
1590
|
+
t[23] !== v || t[24] !== r ? (G = {
|
|
1591
|
+
has: (ce) => ce === r || v.has(ce)
|
|
1592
|
+
}, t[23] = v, t[24] = r, t[25] = G) : G = t[25], P = G;
|
|
1563
1593
|
}
|
|
1564
|
-
const
|
|
1565
|
-
let
|
|
1594
|
+
const X = P;
|
|
1595
|
+
let ne;
|
|
1566
1596
|
e: {
|
|
1567
|
-
if (!
|
|
1568
|
-
let
|
|
1569
|
-
t[26] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (
|
|
1597
|
+
if (!h || r === null || r === void 0 || C) {
|
|
1598
|
+
let ce;
|
|
1599
|
+
t[26] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (ce = [], t[26] = ce) : ce = t[26], ne = ce;
|
|
1570
1600
|
break e;
|
|
1571
1601
|
}
|
|
1572
|
-
let
|
|
1573
|
-
t[27] !== r ? (
|
|
1602
|
+
let G;
|
|
1603
|
+
t[27] !== r ? (G = Object.entries(r), t[27] = r, t[28] = G) : G = t[28], ne = G;
|
|
1574
1604
|
}
|
|
1575
|
-
const
|
|
1605
|
+
const y = ne;
|
|
1576
1606
|
let s;
|
|
1577
|
-
t[29] !== C || t[30] !==
|
|
1578
|
-
|
|
1579
|
-
}, t[29] = C, t[30] =
|
|
1580
|
-
const
|
|
1581
|
-
let
|
|
1582
|
-
t[32] !== n || t[33] !==
|
|
1583
|
-
const i =
|
|
1584
|
-
let
|
|
1585
|
-
t[36] !==
|
|
1586
|
-
const
|
|
1587
|
-
let
|
|
1588
|
-
t[38] !==
|
|
1589
|
-
"--_inspector-depth-indent":
|
|
1590
|
-
}, t[38] =
|
|
1591
|
-
const o =
|
|
1592
|
-
let
|
|
1593
|
-
t[40] !==
|
|
1594
|
-
(
|
|
1595
|
-
}, t[40] =
|
|
1596
|
-
const M =
|
|
1597
|
-
let
|
|
1598
|
-
t[42] !== j || t[43] !== C || t[44] !==
|
|
1607
|
+
t[29] !== C || t[30] !== h ? (s = () => {
|
|
1608
|
+
h && !C && W(fn);
|
|
1609
|
+
}, t[29] = C, t[30] = h, t[31] = s) : s = t[31];
|
|
1610
|
+
const w = s;
|
|
1611
|
+
let k;
|
|
1612
|
+
t[32] !== n || t[33] !== f || t[34] !== r ? (k = f && xt(n, r, f), t[32] = n, t[33] = f, t[34] = r, t[35] = k) : k = t[35];
|
|
1613
|
+
const i = k, u = C ? "[Circular]" : h ? A === "array" ? `Array(${r.length})` : `{${y.length}}` : null, m = i && re.RowHighlight;
|
|
1614
|
+
let d;
|
|
1615
|
+
t[36] !== m ? (d = Fe(re.Row, m), t[36] = m, t[37] = d) : d = t[37];
|
|
1616
|
+
const p = `${c * 16}px`;
|
|
1617
|
+
let b;
|
|
1618
|
+
t[38] !== p ? (b = {
|
|
1619
|
+
"--_inspector-depth-indent": p
|
|
1620
|
+
}, t[38] = p, t[39] = b) : b = t[39];
|
|
1621
|
+
const o = b;
|
|
1622
|
+
let _;
|
|
1623
|
+
t[40] !== w ? (_ = (G) => {
|
|
1624
|
+
(G.key === "Enter" || G.key === " ") && (G.preventDefault(), w());
|
|
1625
|
+
}, t[40] = w, t[41] = _) : _ = t[41];
|
|
1626
|
+
const M = h && !C ? j : void 0, E = `inspector-node-${n}`;
|
|
1627
|
+
let $;
|
|
1628
|
+
t[42] !== j || t[43] !== C || t[44] !== h ? ($ = h && !C ? /* @__PURE__ */ T.jsx("span", { className: Fe(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];
|
|
1599
1629
|
let N;
|
|
1600
|
-
t[46] !== n ? (N = /* @__PURE__ */ T.jsx("span", { className:
|
|
1630
|
+
t[46] !== n ? (N = /* @__PURE__ */ T.jsx("span", { className: re.Key, children: n }), t[46] = n, t[47] = N) : N = t[47];
|
|
1601
1631
|
let O;
|
|
1602
|
-
t[48] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (O = /* @__PURE__ */ T.jsx("span", { className:
|
|
1603
|
-
let
|
|
1604
|
-
t[49] !==
|
|
1605
|
-
let
|
|
1606
|
-
t[54] !== j || t[55] !==
|
|
1607
|
-
let
|
|
1608
|
-
t[57] !==
|
|
1609
|
-
|
|
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 q;
|
|
1634
|
+
t[49] !== h || t[50] !== u || t[51] !== A || t[52] !== r ? (q = 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] = q) : q = t[53];
|
|
1635
|
+
let Q;
|
|
1636
|
+
t[54] !== j || t[55] !== a ? (Q = !a && !j && /* @__PURE__ */ T.jsx("span", { className: re.Comma, children: "," }), t[54] = j, t[55] = a, t[56] = Q) : Q = t[56];
|
|
1637
|
+
let oe;
|
|
1638
|
+
t[57] !== d || t[58] !== o || t[59] !== _ || t[60] !== M || t[61] !== E || t[62] !== $ || t[63] !== N || t[64] !== q || 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
|
+
$,
|
|
1610
1640
|
N,
|
|
1611
1641
|
O,
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
] }), t[57] =
|
|
1615
|
-
let
|
|
1616
|
-
t[68] !==
|
|
1617
|
-
const [
|
|
1618
|
-
return /* @__PURE__ */ T.jsx(
|
|
1619
|
-
}), t[68] =
|
|
1620
|
-
let
|
|
1621
|
-
return t[76] !==
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
] }), t[76] =
|
|
1625
|
-
}
|
|
1626
|
-
function
|
|
1642
|
+
q,
|
|
1643
|
+
Q
|
|
1644
|
+
] }), t[57] = d, t[58] = o, t[59] = _, t[60] = M, t[61] = E, t[62] = $, t[63] = N, t[64] = q, t[65] = Q, t[66] = w, t[67] = oe) : oe = t[67];
|
|
1645
|
+
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];
|
|
1650
|
+
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: [
|
|
1652
|
+
oe,
|
|
1653
|
+
le
|
|
1654
|
+
] }), t[76] = c, t[77] = oe, t[78] = le, t[79] = ae) : ae = t[79], ae;
|
|
1655
|
+
}
|
|
1656
|
+
function fn(e) {
|
|
1627
1657
|
return !e;
|
|
1628
1658
|
}
|
|
1629
|
-
const
|
|
1659
|
+
const hn = /* @__PURE__ */ new WeakSet(), mn = ve(function({
|
|
1630
1660
|
data: t,
|
|
1631
1661
|
format: n = "json",
|
|
1632
1662
|
defaultExpanded: r = 1,
|
|
1633
|
-
searchable:
|
|
1634
|
-
copyable:
|
|
1635
|
-
className:
|
|
1636
|
-
...
|
|
1637
|
-
},
|
|
1638
|
-
const [
|
|
1663
|
+
searchable: c = !1,
|
|
1664
|
+
copyable: l = !1,
|
|
1665
|
+
className: f,
|
|
1666
|
+
...a
|
|
1667
|
+
}, v) {
|
|
1668
|
+
const [g, x] = Ne(""), A = vt(async () => {
|
|
1639
1669
|
try {
|
|
1640
1670
|
let C;
|
|
1641
|
-
n === "yaml" ? C =
|
|
1671
|
+
n === "yaml" ? C = Ye(t) : C = gn(t), await navigator.clipboard.writeText(C);
|
|
1642
1672
|
} catch {
|
|
1643
1673
|
}
|
|
1644
|
-
}, [t, n]),
|
|
1645
|
-
return /* @__PURE__ */ T.jsxs("div", { ref:
|
|
1646
|
-
(
|
|
1647
|
-
|
|
1648
|
-
|
|
1674
|
+
}, [t, n]), h = hn, S = pt(() => /* @__PURE__ */ new WeakMap(), [g]);
|
|
1675
|
+
return /* @__PURE__ */ T.jsxs("div", { ref: v, className: Fe(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" })
|
|
1649
1679
|
] }),
|
|
1650
|
-
/* @__PURE__ */ T.jsx("div", { className:
|
|
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 }) })
|
|
1651
1681
|
] });
|
|
1652
1682
|
});
|
|
1653
|
-
|
|
1654
|
-
function
|
|
1683
|
+
mn.displayName = "ObjectInspector";
|
|
1684
|
+
function gn(e) {
|
|
1655
1685
|
const t = [];
|
|
1656
1686
|
return JSON.stringify(e, function(n, r) {
|
|
1657
1687
|
if (typeof r != "object" || r === null) return r;
|
|
@@ -1660,381 +1690,381 @@ function mn(e) {
|
|
|
1660
1690
|
return t.includes(r) ? "[Circular]" : (t.push(r), r);
|
|
1661
1691
|
}, 2);
|
|
1662
1692
|
}
|
|
1663
|
-
function
|
|
1693
|
+
function St(e) {
|
|
1664
1694
|
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));
|
|
1665
1695
|
}
|
|
1666
|
-
function
|
|
1696
|
+
function Tt(e) {
|
|
1667
1697
|
return '"' + e.replace(/\\/g, "\\\\").replace(/"/g, '\\"').replace(/\n/g, "\\n").replace(/\t/g, "\\t").replace(/\r/g, "\\r") + '"';
|
|
1668
1698
|
}
|
|
1669
|
-
function
|
|
1699
|
+
function pn(e, t) {
|
|
1670
1700
|
const n = " ".repeat(t);
|
|
1671
1701
|
return e.includes(`
|
|
1672
1702
|
`) ? `|
|
|
1673
1703
|
${n} ${e.split(`
|
|
1674
1704
|
`).join(`
|
|
1675
|
-
${n} `)}` :
|
|
1705
|
+
${n} `)}` : St(e) ? Tt(e) : e;
|
|
1676
1706
|
}
|
|
1677
|
-
function
|
|
1707
|
+
function Ye(e, t = 0, n) {
|
|
1678
1708
|
const r = " ".repeat(t);
|
|
1679
1709
|
if (e === null || e === void 0) return "null";
|
|
1680
|
-
if (typeof e == "string") return
|
|
1710
|
+
if (typeof e == "string") return pn(e, t);
|
|
1681
1711
|
if (typeof e == "number" || typeof e == "boolean") return String(e);
|
|
1682
1712
|
if (typeof e == "object") {
|
|
1683
|
-
const
|
|
1684
|
-
if (
|
|
1685
|
-
const
|
|
1713
|
+
const c = n ?? [];
|
|
1714
|
+
if (c.includes(e)) return '"[Circular]"';
|
|
1715
|
+
const l = [...c, e];
|
|
1686
1716
|
if (Array.isArray(e))
|
|
1687
|
-
return e.length === 0 ? "[]" : e.map((
|
|
1717
|
+
return e.length === 0 ? "[]" : e.map((a) => `${r}- ${Ye(a, t + 1, l).trimStart()}`).join(`
|
|
1688
1718
|
`);
|
|
1689
|
-
const
|
|
1690
|
-
return
|
|
1691
|
-
const
|
|
1692
|
-
return typeof
|
|
1693
|
-
${x}` : `${r}${
|
|
1719
|
+
const f = Object.entries(e);
|
|
1720
|
+
return f.length === 0 ? "{}" : f.map(([a, v]) => {
|
|
1721
|
+
const g = St(a) ? Tt(a) : a, x = Ye(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}`;
|
|
1694
1724
|
}).join(`
|
|
1695
1725
|
`);
|
|
1696
1726
|
}
|
|
1697
1727
|
return String(e);
|
|
1698
1728
|
}
|
|
1699
|
-
var
|
|
1729
|
+
var Et;
|
|
1700
1730
|
(() => {
|
|
1701
|
-
var e = { 975: (
|
|
1731
|
+
var e = { 975: (y) => {
|
|
1702
1732
|
function s(i) {
|
|
1703
1733
|
if (typeof i != "string") throw new TypeError("Path must be a string. Received " + JSON.stringify(i));
|
|
1704
1734
|
}
|
|
1705
|
-
function
|
|
1706
|
-
for (var
|
|
1707
|
-
if (
|
|
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(_);
|
|
1708
1738
|
else {
|
|
1709
|
-
if (
|
|
1710
|
-
|
|
1739
|
+
if (m === 47) break;
|
|
1740
|
+
m = 47;
|
|
1711
1741
|
}
|
|
1712
|
-
if (
|
|
1713
|
-
if (!(
|
|
1714
|
-
if (
|
|
1715
|
-
if (
|
|
1716
|
-
var M =
|
|
1717
|
-
if (M !==
|
|
1718
|
-
M === -1 ? (
|
|
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;
|
|
1719
1749
|
continue;
|
|
1720
1750
|
}
|
|
1721
|
-
} else if (
|
|
1722
|
-
|
|
1751
|
+
} else if (d.length === 2 || d.length === 1) {
|
|
1752
|
+
d = "", p = 0, b = _, o = 0;
|
|
1723
1753
|
continue;
|
|
1724
1754
|
}
|
|
1725
1755
|
}
|
|
1726
|
-
|
|
1727
|
-
} else
|
|
1728
|
-
|
|
1729
|
-
} else
|
|
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;
|
|
1730
1760
|
}
|
|
1731
|
-
return
|
|
1761
|
+
return d;
|
|
1732
1762
|
}
|
|
1733
|
-
var
|
|
1734
|
-
for (var i,
|
|
1735
|
-
var
|
|
1736
|
-
|
|
1763
|
+
var k = { resolve: function() {
|
|
1764
|
+
for (var i, u = "", m = !1, d = arguments.length - 1; d >= -1 && !m; d--) {
|
|
1765
|
+
var p;
|
|
1766
|
+
d >= 0 ? p = arguments[d] : (i === void 0 && (i = process.cwd()), p = i), s(p), p.length !== 0 && (u = p + "/" + u, m = p.charCodeAt(0) === 47);
|
|
1737
1767
|
}
|
|
1738
|
-
return
|
|
1768
|
+
return u = w(u, !m), m ? u.length > 0 ? "/" + u : "/" : u.length > 0 ? u : ".";
|
|
1739
1769
|
}, normalize: function(i) {
|
|
1740
1770
|
if (s(i), i.length === 0) return ".";
|
|
1741
|
-
var
|
|
1742
|
-
return (i =
|
|
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;
|
|
1743
1773
|
}, isAbsolute: function(i) {
|
|
1744
1774
|
return s(i), i.length > 0 && i.charCodeAt(0) === 47;
|
|
1745
1775
|
}, join: function() {
|
|
1746
1776
|
if (arguments.length === 0) return ".";
|
|
1747
|
-
for (var i,
|
|
1748
|
-
var
|
|
1749
|
-
s(
|
|
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);
|
|
1750
1780
|
}
|
|
1751
|
-
return i === void 0 ? "." :
|
|
1752
|
-
}, relative: function(i,
|
|
1753
|
-
if (s(i), s(
|
|
1754
|
-
for (var
|
|
1755
|
-
for (var
|
|
1756
|
-
for (var o =
|
|
1757
|
-
if (E ===
|
|
1758
|
-
if (o >
|
|
1759
|
-
if (
|
|
1760
|
-
if (E === 0) return
|
|
1761
|
-
} else
|
|
1781
|
+
return i === void 0 ? "." : k.normalize(i);
|
|
1782
|
+
}, relative: function(i, u) {
|
|
1783
|
+
if (s(i), s(u), i === u || (i = k.resolve(i)) === (u = k.resolve(u))) return "";
|
|
1784
|
+
for (var m = 1; m < i.length && i.charCodeAt(m) === 47; ++m) ;
|
|
1785
|
+
for (var d = i.length, p = d - m, b = 1; b < u.length && u.charCodeAt(b) === 47; ++b) ;
|
|
1786
|
+
for (var o = u.length - b, _ = p < o ? p : o, M = -1, E = 0; E <= _; ++E) {
|
|
1787
|
+
if (E === _) {
|
|
1788
|
+
if (o > _) {
|
|
1789
|
+
if (u.charCodeAt(b + E) === 47) return u.slice(b + E + 1);
|
|
1790
|
+
if (E === 0) return u.slice(b + E);
|
|
1791
|
+
} else p > _ && (i.charCodeAt(m + E) === 47 ? M = E : E === 0 && (M = 0));
|
|
1762
1792
|
break;
|
|
1763
1793
|
}
|
|
1764
|
-
var
|
|
1765
|
-
if (
|
|
1766
|
-
|
|
1794
|
+
var $ = i.charCodeAt(m + E);
|
|
1795
|
+
if ($ !== u.charCodeAt(b + E)) break;
|
|
1796
|
+
$ === 47 && (M = E);
|
|
1767
1797
|
}
|
|
1768
1798
|
var N = "";
|
|
1769
|
-
for (E =
|
|
1770
|
-
return N.length > 0 ? 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));
|
|
1771
1801
|
}, _makeLong: function(i) {
|
|
1772
1802
|
return i;
|
|
1773
1803
|
}, dirname: function(i) {
|
|
1774
1804
|
if (s(i), i.length === 0) return ".";
|
|
1775
|
-
for (var
|
|
1776
|
-
if (!
|
|
1777
|
-
|
|
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;
|
|
1778
1808
|
break;
|
|
1779
1809
|
}
|
|
1780
|
-
} else
|
|
1781
|
-
return
|
|
1782
|
-
}, basename: function(i,
|
|
1783
|
-
if (
|
|
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');
|
|
1784
1814
|
s(i);
|
|
1785
|
-
var
|
|
1786
|
-
if (
|
|
1787
|
-
if (
|
|
1788
|
-
var o =
|
|
1789
|
-
for (
|
|
1790
|
-
var M = i.charCodeAt(
|
|
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);
|
|
1791
1821
|
if (M === 47) {
|
|
1792
|
-
if (!
|
|
1793
|
-
|
|
1822
|
+
if (!b) {
|
|
1823
|
+
d = m + 1;
|
|
1794
1824
|
break;
|
|
1795
1825
|
}
|
|
1796
|
-
} else
|
|
1826
|
+
} else _ === -1 && (b = !1, _ = m + 1), o >= 0 && (M === u.charCodeAt(o) ? --o == -1 && (p = m) : (o = -1, p = _));
|
|
1797
1827
|
}
|
|
1798
|
-
return
|
|
1828
|
+
return d === p ? p = _ : p === -1 && (p = i.length), i.slice(d, p);
|
|
1799
1829
|
}
|
|
1800
|
-
for (
|
|
1801
|
-
if (!
|
|
1802
|
-
|
|
1830
|
+
for (m = i.length - 1; m >= 0; --m) if (i.charCodeAt(m) === 47) {
|
|
1831
|
+
if (!b) {
|
|
1832
|
+
d = m + 1;
|
|
1803
1833
|
break;
|
|
1804
1834
|
}
|
|
1805
|
-
} else
|
|
1806
|
-
return
|
|
1835
|
+
} else p === -1 && (b = !1, p = m + 1);
|
|
1836
|
+
return p === -1 ? "" : i.slice(d, p);
|
|
1807
1837
|
}, extname: function(i) {
|
|
1808
1838
|
s(i);
|
|
1809
|
-
for (var
|
|
1810
|
-
var
|
|
1811
|
-
if (
|
|
1812
|
-
else if (!
|
|
1813
|
-
|
|
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;
|
|
1814
1844
|
break;
|
|
1815
1845
|
}
|
|
1816
1846
|
}
|
|
1817
|
-
return
|
|
1847
|
+
return u === -1 || d === -1 || b === 0 || b === 1 && u === d - 1 && u === m + 1 ? "" : i.slice(u, d);
|
|
1818
1848
|
}, format: function(i) {
|
|
1819
1849
|
if (i === null || typeof i != "object") throw new TypeError('The "pathObject" argument must be of type Object. Received type ' + typeof i);
|
|
1820
|
-
return (function(
|
|
1821
|
-
var
|
|
1822
|
-
return
|
|
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;
|
|
1823
1853
|
})(0, i);
|
|
1824
1854
|
}, parse: function(i) {
|
|
1825
1855
|
s(i);
|
|
1826
|
-
var
|
|
1827
|
-
if (i.length === 0) return
|
|
1828
|
-
var
|
|
1829
|
-
|
|
1830
|
-
for (var
|
|
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);
|
|
1831
1861
|
else if (!M) {
|
|
1832
1862
|
o = E + 1;
|
|
1833
1863
|
break;
|
|
1834
1864
|
}
|
|
1835
|
-
return
|
|
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;
|
|
1836
1866
|
}, sep: "/", delimiter: ":", win32: null, posix: null };
|
|
1837
|
-
|
|
1867
|
+
k.posix = k, y.exports = k;
|
|
1838
1868
|
} }, t = {};
|
|
1839
|
-
function n(
|
|
1840
|
-
var s = t[
|
|
1869
|
+
function n(y) {
|
|
1870
|
+
var s = t[y];
|
|
1841
1871
|
if (s !== void 0) return s.exports;
|
|
1842
|
-
var
|
|
1843
|
-
return e[
|
|
1872
|
+
var w = t[y] = { exports: {} };
|
|
1873
|
+
return e[y](w, w.exports, n), w.exports;
|
|
1844
1874
|
}
|
|
1845
|
-
n.d = (
|
|
1846
|
-
for (var
|
|
1847
|
-
}, n.o = (
|
|
1848
|
-
typeof Symbol < "u" && Symbol.toStringTag && Object.defineProperty(
|
|
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 });
|
|
1849
1879
|
};
|
|
1850
1880
|
var r = {};
|
|
1851
|
-
let
|
|
1852
|
-
n.r(r), n.d(r, { URI: () =>
|
|
1853
|
-
const
|
|
1854
|
-
function
|
|
1855
|
-
if (!
|
|
1856
|
-
if (
|
|
1857
|
-
if (
|
|
1858
|
-
if (
|
|
1859
|
-
if (!
|
|
1860
|
-
} else if (
|
|
1881
|
+
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 ("//")');
|
|
1861
1891
|
}
|
|
1862
1892
|
}
|
|
1863
|
-
const
|
|
1864
|
-
class
|
|
1893
|
+
const g = "", x = "/", A = /^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;
|
|
1894
|
+
class h {
|
|
1865
1895
|
static isUri(s) {
|
|
1866
|
-
return s instanceof
|
|
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";
|
|
1867
1897
|
}
|
|
1868
1898
|
scheme;
|
|
1869
1899
|
authority;
|
|
1870
1900
|
path;
|
|
1871
1901
|
query;
|
|
1872
1902
|
fragment;
|
|
1873
|
-
constructor(s,
|
|
1874
|
-
typeof s == "object" ? (this.scheme = s.scheme ||
|
|
1875
|
-
return
|
|
1876
|
-
})(s,
|
|
1877
|
-
switch (
|
|
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) {
|
|
1878
1908
|
case "https":
|
|
1879
1909
|
case "http":
|
|
1880
1910
|
case "file":
|
|
1881
|
-
|
|
1911
|
+
p ? p[0] !== x && (p = x + p) : p = x;
|
|
1882
1912
|
}
|
|
1883
|
-
return
|
|
1884
|
-
})(this.scheme,
|
|
1913
|
+
return p;
|
|
1914
|
+
})(this.scheme, k || g), this.query = i || g, this.fragment = u || g, v(this, m));
|
|
1885
1915
|
}
|
|
1886
1916
|
get fsPath() {
|
|
1887
|
-
return
|
|
1917
|
+
return H(this);
|
|
1888
1918
|
}
|
|
1889
1919
|
with(s) {
|
|
1890
1920
|
if (!s) return this;
|
|
1891
|
-
let { scheme:
|
|
1892
|
-
return
|
|
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);
|
|
1893
1923
|
}
|
|
1894
|
-
static parse(s,
|
|
1895
|
-
const
|
|
1896
|
-
return
|
|
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);
|
|
1897
1927
|
}
|
|
1898
1928
|
static file(s) {
|
|
1899
|
-
let
|
|
1900
|
-
if (
|
|
1901
|
-
const
|
|
1902
|
-
|
|
1929
|
+
let w = g;
|
|
1930
|
+
if (c && (s = s.replace(/\\/g, x)), s[0] === x && s[1] === x) {
|
|
1931
|
+
const k = s.indexOf(x, 2);
|
|
1932
|
+
k === -1 ? (w = s.substring(2), s = x) : (w = s.substring(2, k), s = s.substring(k) || x);
|
|
1903
1933
|
}
|
|
1904
|
-
return new C("file",
|
|
1934
|
+
return new C("file", w, s, g, g);
|
|
1905
1935
|
}
|
|
1906
1936
|
static from(s) {
|
|
1907
|
-
const
|
|
1908
|
-
return
|
|
1937
|
+
const w = new C(s.scheme, s.authority, s.path, s.query, s.fragment);
|
|
1938
|
+
return v(w, !0), w;
|
|
1909
1939
|
}
|
|
1910
1940
|
toString(s = !1) {
|
|
1911
|
-
return
|
|
1941
|
+
return Y(this, s);
|
|
1912
1942
|
}
|
|
1913
1943
|
toJSON() {
|
|
1914
1944
|
return this;
|
|
1915
1945
|
}
|
|
1916
1946
|
static revive(s) {
|
|
1917
1947
|
if (s) {
|
|
1918
|
-
if (s instanceof
|
|
1948
|
+
if (s instanceof h) return s;
|
|
1919
1949
|
{
|
|
1920
|
-
const
|
|
1921
|
-
return
|
|
1950
|
+
const w = new C(s);
|
|
1951
|
+
return w._formatted = s.external, w._fsPath = s._sep === S ? s.fsPath : null, w;
|
|
1922
1952
|
}
|
|
1923
1953
|
}
|
|
1924
1954
|
return s;
|
|
1925
1955
|
}
|
|
1926
1956
|
}
|
|
1927
|
-
const
|
|
1928
|
-
class C extends
|
|
1957
|
+
const S = c ? 1 : void 0;
|
|
1958
|
+
class C extends h {
|
|
1929
1959
|
_formatted = null;
|
|
1930
1960
|
_fsPath = null;
|
|
1931
1961
|
get fsPath() {
|
|
1932
|
-
return this._fsPath || (this._fsPath =
|
|
1962
|
+
return this._fsPath || (this._fsPath = H(this)), this._fsPath;
|
|
1933
1963
|
}
|
|
1934
1964
|
toString(s = !1) {
|
|
1935
|
-
return s ?
|
|
1965
|
+
return s ? Y(this, !0) : (this._formatted || (this._formatted = Y(this, !1)), this._formatted);
|
|
1936
1966
|
}
|
|
1937
1967
|
toJSON() {
|
|
1938
1968
|
const s = { $mid: 1 };
|
|
1939
|
-
return this._fsPath && (s.fsPath = this._fsPath, s._sep =
|
|
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;
|
|
1940
1970
|
}
|
|
1941
1971
|
}
|
|
1942
|
-
const
|
|
1943
|
-
function j(
|
|
1944
|
-
let
|
|
1945
|
-
for (let
|
|
1946
|
-
const
|
|
1947
|
-
if (
|
|
1972
|
+
const I = { 58: "%3A", 47: "%2F", 63: "%3F", 35: "%23", 91: "%5B", 93: "%5D", 64: "%40", 33: "%21", 36: "%24", 38: "%26", 39: "%27", 40: "%28", 41: "%29", 42: "%2A", 43: "%2B", 44: "%2C", 59: "%3B", 61: "%3D", 32: "%20" };
|
|
1973
|
+
function j(y, s, w) {
|
|
1974
|
+
let k, i = -1;
|
|
1975
|
+
for (let u = 0; u < y.length; u++) {
|
|
1976
|
+
const m = y.charCodeAt(u);
|
|
1977
|
+
if (m >= 97 && m <= 122 || m >= 65 && m <= 90 || m >= 48 && m <= 57 || m === 45 || m === 46 || m === 95 || m === 126 || s && m === 47 || w && m === 91 || w && m === 93 || w && m === 58) i !== -1 && (k += encodeURIComponent(y.substring(i, u)), i = -1), k !== void 0 && (k += y.charAt(u));
|
|
1948
1978
|
else {
|
|
1949
|
-
|
|
1950
|
-
const
|
|
1951
|
-
|
|
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);
|
|
1952
1982
|
}
|
|
1953
1983
|
}
|
|
1954
|
-
return i !== -1 && (
|
|
1984
|
+
return i !== -1 && (k += encodeURIComponent(y.substring(i))), k !== void 0 ? k : y;
|
|
1955
1985
|
}
|
|
1956
|
-
function
|
|
1986
|
+
function W(y) {
|
|
1957
1987
|
let s;
|
|
1958
|
-
for (let
|
|
1959
|
-
const
|
|
1960
|
-
|
|
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]);
|
|
1961
1991
|
}
|
|
1962
|
-
return s !== void 0 ? s :
|
|
1992
|
+
return s !== void 0 ? s : y;
|
|
1963
1993
|
}
|
|
1964
|
-
function
|
|
1965
|
-
let
|
|
1966
|
-
return
|
|
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;
|
|
1967
1997
|
}
|
|
1968
|
-
function
|
|
1969
|
-
const
|
|
1970
|
-
let
|
|
1971
|
-
if (i && (
|
|
1972
|
-
let
|
|
1973
|
-
if (
|
|
1974
|
-
const o =
|
|
1975
|
-
|
|
1998
|
+
function Y(y, s) {
|
|
1999
|
+
const w = s ? W : j;
|
|
2000
|
+
let k = "", { scheme: i, authority: u, path: m, query: d, fragment: p } = y;
|
|
2001
|
+
if (i && (k += i, k += ":"), (u || i === "file") && (k += x, k += x), u) {
|
|
2002
|
+
let b = u.indexOf("@");
|
|
2003
|
+
if (b !== -1) {
|
|
2004
|
+
const o = u.substr(0, b);
|
|
2005
|
+
u = u.substr(b + 1), b = o.lastIndexOf(":"), b === -1 ? k += w(o, !1, !1) : (k += w(o.substr(0, b), !1, !1), k += ":", k += w(o.substr(b + 1), !1, !0)), k += "@";
|
|
1976
2006
|
}
|
|
1977
|
-
|
|
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));
|
|
1978
2008
|
}
|
|
1979
|
-
if (
|
|
1980
|
-
if (
|
|
1981
|
-
const
|
|
1982
|
-
|
|
1983
|
-
} else if (
|
|
1984
|
-
const
|
|
1985
|
-
|
|
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)}`);
|
|
1986
2016
|
}
|
|
1987
|
-
|
|
2017
|
+
k += w(m, !0, !1);
|
|
1988
2018
|
}
|
|
1989
|
-
return
|
|
2019
|
+
return d && (k += "?", k += w(d, !1, !1)), p && (k += "#", k += s ? p : j(p, !1, !1)), k;
|
|
1990
2020
|
}
|
|
1991
|
-
function
|
|
2021
|
+
function J(y) {
|
|
1992
2022
|
try {
|
|
1993
|
-
return decodeURIComponent(
|
|
2023
|
+
return decodeURIComponent(y);
|
|
1994
2024
|
} catch {
|
|
1995
|
-
return
|
|
2025
|
+
return y.length > 3 ? y.substr(0, 3) + J(y.substr(3)) : y;
|
|
1996
2026
|
}
|
|
1997
2027
|
}
|
|
1998
|
-
const
|
|
1999
|
-
function
|
|
2000
|
-
return
|
|
2028
|
+
const U = /(%[0-9A-Za-z][0-9A-Za-z])+/g;
|
|
2029
|
+
function D(y) {
|
|
2030
|
+
return y.match(U) ? y.replace(U, ((s) => J(s))) : y;
|
|
2001
2031
|
}
|
|
2002
|
-
var
|
|
2003
|
-
const P =
|
|
2004
|
-
var
|
|
2005
|
-
(function(
|
|
2006
|
-
|
|
2007
|
-
return s.with({ path: P.join(s.path, ...
|
|
2008
|
-
},
|
|
2009
|
-
let
|
|
2010
|
-
|
|
2011
|
-
let
|
|
2012
|
-
return i &&
|
|
2013
|
-
},
|
|
2014
|
-
if (s.path.length === 0 || s.path ===
|
|
2015
|
-
let
|
|
2016
|
-
return
|
|
2017
|
-
},
|
|
2032
|
+
var V = n(975);
|
|
2033
|
+
const P = V.posix || V, X = "/";
|
|
2034
|
+
var ne;
|
|
2035
|
+
(function(y) {
|
|
2036
|
+
y.joinPath = function(s, ...w) {
|
|
2037
|
+
return s.with({ path: P.join(s.path, ...w) });
|
|
2038
|
+
}, y.resolvePath = function(s, ...w) {
|
|
2039
|
+
let k = s.path, i = !1;
|
|
2040
|
+
k[0] !== X && (k = X + k, i = !0);
|
|
2041
|
+
let u = P.resolve(k, ...w);
|
|
2042
|
+
return i && u[0] === X && !s.authority && (u = u.substring(1)), s.with({ path: u });
|
|
2043
|
+
}, y.dirname = function(s) {
|
|
2044
|
+
if (s.path.length === 0 || s.path === X) return s;
|
|
2045
|
+
let w = P.dirname(s.path);
|
|
2046
|
+
return w.length === 1 && w.charCodeAt(0) === 46 && (w = ""), s.with({ path: w });
|
|
2047
|
+
}, y.basename = function(s) {
|
|
2018
2048
|
return P.basename(s.path);
|
|
2019
|
-
},
|
|
2049
|
+
}, y.extname = function(s) {
|
|
2020
2050
|
return P.extname(s.path);
|
|
2021
2051
|
};
|
|
2022
|
-
})(
|
|
2052
|
+
})(ne || (ne = {})), Et = r;
|
|
2023
2053
|
})();
|
|
2024
|
-
const { URI:
|
|
2025
|
-
function
|
|
2054
|
+
const { URI: he, Utils: oo } = Et;
|
|
2055
|
+
function yn(e) {
|
|
2026
2056
|
return e === 4 ? 1 : e === 3 ? 2 : e === 2 ? 4 : 8;
|
|
2027
2057
|
}
|
|
2028
|
-
function
|
|
2058
|
+
function vn(e) {
|
|
2029
2059
|
return e;
|
|
2030
2060
|
}
|
|
2031
|
-
function
|
|
2061
|
+
function bn(e) {
|
|
2032
2062
|
return {
|
|
2033
2063
|
start: { line: e.startLineNumber - 1, character: e.startColumn - 1 },
|
|
2034
2064
|
end: { line: e.endLineNumber - 1, character: e.endColumn - 1 }
|
|
2035
2065
|
};
|
|
2036
2066
|
}
|
|
2037
|
-
function
|
|
2067
|
+
function K(e) {
|
|
2038
2068
|
return {
|
|
2039
2069
|
startLineNumber: e.start.line + 1,
|
|
2040
2070
|
startColumn: e.start.character + 1,
|
|
@@ -2042,262 +2072,262 @@ function re(e) {
|
|
|
2042
2072
|
endColumn: e.end.character + 1
|
|
2043
2073
|
};
|
|
2044
2074
|
}
|
|
2045
|
-
function
|
|
2075
|
+
function _n(e) {
|
|
2046
2076
|
return {
|
|
2047
|
-
...
|
|
2077
|
+
...K(e.location.range),
|
|
2048
2078
|
message: e.message,
|
|
2049
|
-
resource:
|
|
2079
|
+
resource: he.parse(e.location.uri)
|
|
2050
2080
|
};
|
|
2051
2081
|
}
|
|
2052
|
-
function
|
|
2082
|
+
function jt(e) {
|
|
2053
2083
|
const t = {
|
|
2054
|
-
...
|
|
2084
|
+
...K(e.range),
|
|
2055
2085
|
message: e.message,
|
|
2056
|
-
severity: e.severity ?
|
|
2086
|
+
severity: e.severity ? yn(e.severity) : 8
|
|
2057
2087
|
};
|
|
2058
|
-
return e.code != null && (t.code = e.codeDescription == null ? String(e.code) : { value: String(e.code), target:
|
|
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;
|
|
2059
2089
|
}
|
|
2060
|
-
function
|
|
2090
|
+
function Je(e) {
|
|
2061
2091
|
return {
|
|
2062
|
-
range:
|
|
2092
|
+
range: K(e.range),
|
|
2063
2093
|
text: e.newText
|
|
2064
2094
|
};
|
|
2065
2095
|
}
|
|
2066
|
-
function
|
|
2096
|
+
function wn(e) {
|
|
2067
2097
|
const t = {};
|
|
2068
2098
|
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;
|
|
2069
2099
|
}
|
|
2070
|
-
function
|
|
2071
|
-
const t = e.kind === "create" ? { newResource:
|
|
2072
|
-
oldResource:
|
|
2073
|
-
newResource:
|
|
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)
|
|
2074
2104
|
};
|
|
2075
|
-
return e.options && (t.options =
|
|
2105
|
+
return e.options && (t.options = wn(e.options)), t;
|
|
2076
2106
|
}
|
|
2077
|
-
function
|
|
2107
|
+
function ht(e, t, n) {
|
|
2078
2108
|
return {
|
|
2079
|
-
resource:
|
|
2109
|
+
resource: he.parse(t),
|
|
2080
2110
|
versionId: n,
|
|
2081
|
-
textEdit:
|
|
2111
|
+
textEdit: Je(e)
|
|
2082
2112
|
};
|
|
2083
2113
|
}
|
|
2084
|
-
function
|
|
2114
|
+
function xn(e) {
|
|
2085
2115
|
var t;
|
|
2086
2116
|
const n = [];
|
|
2087
2117
|
if (e.changes)
|
|
2088
|
-
for (const [r,
|
|
2089
|
-
for (const
|
|
2090
|
-
n.push(
|
|
2118
|
+
for (const [r, c] of Object.entries(e.changes))
|
|
2119
|
+
for (const l of c)
|
|
2120
|
+
n.push(ht(l, r));
|
|
2091
2121
|
if (e.documentChanges)
|
|
2092
2122
|
for (const r of e.documentChanges)
|
|
2093
2123
|
if ("textDocument" in r)
|
|
2094
|
-
for (const
|
|
2095
|
-
n.push(
|
|
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));
|
|
2096
2126
|
else
|
|
2097
|
-
n.push(
|
|
2127
|
+
n.push(kn(r));
|
|
2098
2128
|
return {
|
|
2099
2129
|
edits: n
|
|
2100
2130
|
};
|
|
2101
2131
|
}
|
|
2102
|
-
function
|
|
2132
|
+
function Cn(e) {
|
|
2103
2133
|
const t = {
|
|
2104
2134
|
title: e.title,
|
|
2105
2135
|
isPreferred: e.isPreferred
|
|
2106
2136
|
};
|
|
2107
|
-
return e.diagnostics && (t.diagnostics = e.diagnostics.map(
|
|
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;
|
|
2108
2138
|
}
|
|
2109
|
-
function
|
|
2139
|
+
function Rn(e) {
|
|
2110
2140
|
const t = {
|
|
2111
2141
|
title: e.title,
|
|
2112
2142
|
id: e.command
|
|
2113
2143
|
};
|
|
2114
2144
|
return e.arguments && (t.arguments = e.arguments), t;
|
|
2115
2145
|
}
|
|
2116
|
-
function
|
|
2146
|
+
function Sn(e) {
|
|
2117
2147
|
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;
|
|
2118
2148
|
}
|
|
2119
|
-
function
|
|
2149
|
+
function Tn(e) {
|
|
2120
2150
|
return e;
|
|
2121
2151
|
}
|
|
2122
|
-
function
|
|
2152
|
+
function Mt(e) {
|
|
2123
2153
|
return {
|
|
2124
2154
|
value: e.value
|
|
2125
2155
|
};
|
|
2126
2156
|
}
|
|
2127
|
-
function
|
|
2157
|
+
function En(e) {
|
|
2128
2158
|
return {
|
|
2129
|
-
range:
|
|
2159
|
+
range: K(e.range),
|
|
2130
2160
|
text: e.newText
|
|
2131
2161
|
};
|
|
2132
2162
|
}
|
|
2133
|
-
function
|
|
2134
|
-
return "range" in e ?
|
|
2135
|
-
insert:
|
|
2136
|
-
replace:
|
|
2137
|
-
} :
|
|
2138
|
-
}
|
|
2139
|
-
function
|
|
2140
|
-
var n, r,
|
|
2141
|
-
const
|
|
2142
|
-
let
|
|
2143
|
-
|
|
2163
|
+
function jn(e) {
|
|
2164
|
+
return "range" in e ? K(e.range) : "insert" in e && "replace" in e ? {
|
|
2165
|
+
insert: K(e.insert),
|
|
2166
|
+
replace: K(e.replace)
|
|
2167
|
+
} : K(e);
|
|
2168
|
+
}
|
|
2169
|
+
function Mn(e, t) {
|
|
2170
|
+
var n, r, c, l, f;
|
|
2171
|
+
const a = (n = t.itemDefaults) !== null && n !== void 0 ? n : {}, v = (r = e.textEdit) !== null && r !== void 0 ? r : a.editRange, g = (c = e.commitCharacters) !== null && c !== void 0 ? c : a.commitCharacters, x = (l = e.insertTextFormat) !== null && l !== void 0 ? l : a.insertTextFormat, A = (f = e.insertTextMode) !== null && f !== void 0 ? f : a.insertTextMode;
|
|
2172
|
+
let h = e.insertText, S;
|
|
2173
|
+
v ? (S = jn(v), "newText" in v && (h = v.newText)) : S = { ...t.range };
|
|
2144
2174
|
const C = {
|
|
2145
|
-
insertText:
|
|
2146
|
-
kind: e.kind == null ? 18 :
|
|
2175
|
+
insertText: h ?? e.label,
|
|
2176
|
+
kind: e.kind == null ? 18 : Sn(e.kind),
|
|
2147
2177
|
label: e.label,
|
|
2148
|
-
range:
|
|
2178
|
+
range: S
|
|
2149
2179
|
};
|
|
2150
|
-
return e.additionalTextEdits && (C.additionalTextEdits = e.additionalTextEdits.map(
|
|
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;
|
|
2151
2181
|
}
|
|
2152
|
-
function
|
|
2182
|
+
function An(e, t) {
|
|
2153
2183
|
return {
|
|
2154
2184
|
incomplete: !!e.isIncomplete,
|
|
2155
|
-
suggestions: e.items.map((n) =>
|
|
2185
|
+
suggestions: e.items.map((n) => Mn(n, { range: t.range, itemDefaults: e.itemDefaults }))
|
|
2156
2186
|
};
|
|
2157
2187
|
}
|
|
2158
|
-
function
|
|
2188
|
+
function Nn(e) {
|
|
2159
2189
|
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;
|
|
2160
2190
|
}
|
|
2161
|
-
function
|
|
2191
|
+
function On(e) {
|
|
2162
2192
|
return e;
|
|
2163
2193
|
}
|
|
2164
|
-
function
|
|
2194
|
+
function At(e) {
|
|
2165
2195
|
var t, n, r;
|
|
2166
|
-
const
|
|
2196
|
+
const c = {
|
|
2167
2197
|
detail: (t = e.detail) !== null && t !== void 0 ? t : "",
|
|
2168
|
-
kind:
|
|
2198
|
+
kind: Nn(e.kind),
|
|
2169
2199
|
name: e.name,
|
|
2170
|
-
range:
|
|
2171
|
-
selectionRange:
|
|
2172
|
-
tags: (r = (n = e.tags) === null || n === void 0 ? void 0 : n.map(
|
|
2200
|
+
range: K(e.range),
|
|
2201
|
+
selectionRange: K(e.selectionRange),
|
|
2202
|
+
tags: (r = (n = e.tags) === null || n === void 0 ? void 0 : n.map(On)) !== null && r !== void 0 ? r : []
|
|
2173
2203
|
};
|
|
2174
|
-
return e.children && (
|
|
2204
|
+
return e.children && (c.children = e.children.map(At)), c;
|
|
2175
2205
|
}
|
|
2176
|
-
function
|
|
2206
|
+
function Pn(e) {
|
|
2177
2207
|
const t = {
|
|
2178
2208
|
start: e.startLine + 1,
|
|
2179
2209
|
end: e.endLine + 1
|
|
2180
2210
|
};
|
|
2181
2211
|
return e.kind != null && (t.kind = { value: e.kind }), t;
|
|
2182
2212
|
}
|
|
2183
|
-
function
|
|
2213
|
+
function Ln(e) {
|
|
2184
2214
|
return {
|
|
2185
2215
|
insertSpaces: e.insertSpaces,
|
|
2186
2216
|
tabSize: e.tabSize
|
|
2187
2217
|
};
|
|
2188
2218
|
}
|
|
2189
|
-
function
|
|
2219
|
+
function mt(e) {
|
|
2190
2220
|
return typeof e == "string" ? { value: e } : { value: `\`\`\`${e.language}
|
|
2191
2221
|
${e.value}
|
|
2192
2222
|
\`\`\`` };
|
|
2193
2223
|
}
|
|
2194
|
-
function Ln(e) {
|
|
2195
|
-
return typeof e == "string" || "language" in e ? [pt(e)] : Array.isArray(e) ? e.map(pt) : [Ot(e)];
|
|
2196
|
-
}
|
|
2197
2224
|
function Dn(e) {
|
|
2225
|
+
return typeof e == "string" || "language" in e ? [mt(e)] : Array.isArray(e) ? e.map(mt) : [Mt(e)];
|
|
2226
|
+
}
|
|
2227
|
+
function $n(e) {
|
|
2198
2228
|
const t = {
|
|
2199
|
-
contents:
|
|
2229
|
+
contents: Dn(e.contents)
|
|
2200
2230
|
};
|
|
2201
|
-
return e.range && (t.range =
|
|
2231
|
+
return e.range && (t.range = K(e.range)), t;
|
|
2202
2232
|
}
|
|
2203
|
-
function
|
|
2233
|
+
function Ce(e) {
|
|
2204
2234
|
return { character: e.column - 1, line: e.lineNumber - 1 };
|
|
2205
2235
|
}
|
|
2206
|
-
function
|
|
2236
|
+
function In(e) {
|
|
2207
2237
|
const t = {
|
|
2208
|
-
range:
|
|
2238
|
+
range: K(e.range)
|
|
2209
2239
|
};
|
|
2210
|
-
return e.tooltip != null && (t.tooltip = e.tooltip), e.target != null && (t.url =
|
|
2240
|
+
return e.tooltip != null && (t.tooltip = e.tooltip), e.target != null && (t.url = he.parse(e.target)), t;
|
|
2211
2241
|
}
|
|
2212
|
-
function
|
|
2242
|
+
function Wn(e) {
|
|
2213
2243
|
const t = {
|
|
2214
|
-
range:
|
|
2215
|
-
targetSelectionRange:
|
|
2216
|
-
uri:
|
|
2244
|
+
range: K(e.targetRange),
|
|
2245
|
+
targetSelectionRange: K(e.targetSelectionRange),
|
|
2246
|
+
uri: he.parse(e.targetUri)
|
|
2217
2247
|
};
|
|
2218
|
-
return e.originSelectionRange && (t.originSelectionRange =
|
|
2248
|
+
return e.originSelectionRange && (t.originSelectionRange = K(e.originSelectionRange)), t;
|
|
2219
2249
|
}
|
|
2220
|
-
function
|
|
2250
|
+
function Bn(e) {
|
|
2221
2251
|
const t = [];
|
|
2222
2252
|
let n = e;
|
|
2223
2253
|
for (; n; )
|
|
2224
2254
|
t.push({
|
|
2225
|
-
range:
|
|
2255
|
+
range: K(n.range)
|
|
2226
2256
|
}), n = n.parent;
|
|
2227
2257
|
return t;
|
|
2228
2258
|
}
|
|
2229
|
-
function
|
|
2230
|
-
const r = /* @__PURE__ */ new Map(),
|
|
2231
|
-
const
|
|
2232
|
-
!
|
|
2233
|
-
},
|
|
2234
|
-
if (!
|
|
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()))
|
|
2235
2265
|
return;
|
|
2236
|
-
let
|
|
2237
|
-
const C =
|
|
2238
|
-
clearTimeout(
|
|
2239
|
-
h
|
|
2266
|
+
let S;
|
|
2267
|
+
const C = h.onDidChangeContent(() => {
|
|
2268
|
+
clearTimeout(S), S = setTimeout(() => {
|
|
2269
|
+
l(h);
|
|
2240
2270
|
}, 500);
|
|
2241
2271
|
});
|
|
2242
|
-
r.set(
|
|
2272
|
+
r.set(h, {
|
|
2243
2273
|
dispose() {
|
|
2244
|
-
clearTimeout(
|
|
2274
|
+
clearTimeout(S), C.dispose();
|
|
2245
2275
|
}
|
|
2246
|
-
}), h
|
|
2247
|
-
},
|
|
2248
|
-
e.editor.setModelMarkers(
|
|
2249
|
-
const
|
|
2250
|
-
|
|
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));
|
|
2251
2281
|
};
|
|
2252
|
-
function
|
|
2253
|
-
n.doReset &&
|
|
2282
|
+
function v(h, S = h.getLanguageId()) {
|
|
2283
|
+
n.doReset && c(S) && n.doReset(h);
|
|
2254
2284
|
}
|
|
2255
|
-
const
|
|
2256
|
-
|
|
2257
|
-
}), A = e.editor.onDidChangeModelLanguage(({ model:
|
|
2258
|
-
|
|
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);
|
|
2259
2289
|
});
|
|
2260
|
-
for (const
|
|
2261
|
-
|
|
2290
|
+
for (const h of e.editor.getModels())
|
|
2291
|
+
f(h);
|
|
2262
2292
|
return {
|
|
2263
2293
|
dispose() {
|
|
2264
|
-
for (const
|
|
2265
|
-
|
|
2266
|
-
|
|
2294
|
+
for (const h of r.keys())
|
|
2295
|
+
a(h);
|
|
2296
|
+
g.dispose(), x.dispose(), A.dispose();
|
|
2267
2297
|
},
|
|
2268
2298
|
async revalidate() {
|
|
2269
|
-
await Promise.all(e.editor.getModels().map(
|
|
2299
|
+
await Promise.all(e.editor.getModels().map(l));
|
|
2270
2300
|
}
|
|
2271
2301
|
};
|
|
2272
2302
|
}
|
|
2273
|
-
function
|
|
2274
|
-
let { createData: n, interval: r = 3e4, label:
|
|
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;
|
|
2275
2305
|
const x = () => {
|
|
2276
|
-
|
|
2306
|
+
a && (a.dispose(), a = void 0);
|
|
2277
2307
|
}, A = setInterval(() => {
|
|
2278
|
-
if (!
|
|
2308
|
+
if (!a)
|
|
2279
2309
|
return;
|
|
2280
|
-
Date.now() -
|
|
2310
|
+
Date.now() - v > f && x();
|
|
2281
2311
|
}, r);
|
|
2282
2312
|
return {
|
|
2283
2313
|
dispose() {
|
|
2284
|
-
|
|
2314
|
+
g = !0, clearInterval(A), x();
|
|
2285
2315
|
},
|
|
2286
|
-
getWorker(...
|
|
2287
|
-
if (
|
|
2316
|
+
getWorker(...h) {
|
|
2317
|
+
if (g)
|
|
2288
2318
|
throw new Error("Worker manager has been disposed");
|
|
2289
|
-
return
|
|
2319
|
+
return v = Date.now(), a || (a = e.editor.createWebWorker({
|
|
2290
2320
|
createData: n,
|
|
2291
|
-
label:
|
|
2292
|
-
moduleId:
|
|
2293
|
-
})),
|
|
2321
|
+
label: c,
|
|
2322
|
+
moduleId: l
|
|
2323
|
+
})), a.withSyncedResources(h);
|
|
2294
2324
|
},
|
|
2295
|
-
updateCreateData(
|
|
2296
|
-
n =
|
|
2325
|
+
updateCreateData(h) {
|
|
2326
|
+
n = h, x();
|
|
2297
2327
|
}
|
|
2298
2328
|
};
|
|
2299
2329
|
}
|
|
2300
|
-
function
|
|
2330
|
+
function Un(e, t) {
|
|
2301
2331
|
const n = {
|
|
2302
2332
|
completion: !0,
|
|
2303
2333
|
customTags: [],
|
|
@@ -2316,93 +2346,93 @@ function Hn(e, t) {
|
|
|
2316
2346
|
aliases: ["YAML", "yaml", "YML", "yml"],
|
|
2317
2347
|
mimetypes: ["application/x-yaml"]
|
|
2318
2348
|
});
|
|
2319
|
-
const r =
|
|
2349
|
+
const r = Hn(e, {
|
|
2320
2350
|
label: "yaml",
|
|
2321
2351
|
moduleId: "monaco-yaml/yaml.worker",
|
|
2322
2352
|
createData: n
|
|
2323
|
-
}),
|
|
2353
|
+
}), c = /* @__PURE__ */ new WeakMap(), l = zn(e, "yaml", {
|
|
2324
2354
|
owner: "yaml",
|
|
2325
|
-
async provideMarkerData(
|
|
2326
|
-
const
|
|
2327
|
-
return
|
|
2355
|
+
async provideMarkerData(a) {
|
|
2356
|
+
const g = await (await r.getWorker(a.uri)).doValidation(String(a.uri));
|
|
2357
|
+
return c.set(a, g), g?.map(jt);
|
|
2328
2358
|
},
|
|
2329
|
-
async doReset(
|
|
2330
|
-
await (await r.getWorker(
|
|
2359
|
+
async doReset(a) {
|
|
2360
|
+
await (await r.getWorker(a.uri)).resetSchema(String(a.uri));
|
|
2331
2361
|
}
|
|
2332
|
-
}),
|
|
2362
|
+
}), f = [
|
|
2333
2363
|
r,
|
|
2334
|
-
|
|
2364
|
+
l,
|
|
2335
2365
|
e.languages.registerCompletionItemProvider("yaml", {
|
|
2336
2366
|
triggerCharacters: [" ", ":"],
|
|
2337
|
-
async provideCompletionItems(
|
|
2338
|
-
const
|
|
2367
|
+
async provideCompletionItems(a, v) {
|
|
2368
|
+
const g = a.getWordUntilPosition(v), A = await (await r.getWorker(a.uri)).doComplete(String(a.uri), Ce(v));
|
|
2339
2369
|
if (A)
|
|
2340
|
-
return
|
|
2370
|
+
return An(A, {
|
|
2341
2371
|
range: {
|
|
2342
|
-
startLineNumber:
|
|
2343
|
-
startColumn:
|
|
2344
|
-
endLineNumber:
|
|
2345
|
-
endColumn:
|
|
2372
|
+
startLineNumber: v.lineNumber,
|
|
2373
|
+
startColumn: g.startColumn,
|
|
2374
|
+
endLineNumber: v.lineNumber,
|
|
2375
|
+
endColumn: g.endColumn
|
|
2346
2376
|
}
|
|
2347
2377
|
});
|
|
2348
2378
|
}
|
|
2349
2379
|
}),
|
|
2350
2380
|
e.languages.registerHoverProvider("yaml", {
|
|
2351
|
-
async provideHover(
|
|
2352
|
-
const x = await (await r.getWorker(
|
|
2381
|
+
async provideHover(a, v) {
|
|
2382
|
+
const x = await (await r.getWorker(a.uri)).doHover(String(a.uri), Ce(v));
|
|
2353
2383
|
if (x)
|
|
2354
|
-
return
|
|
2384
|
+
return $n(x);
|
|
2355
2385
|
}
|
|
2356
2386
|
}),
|
|
2357
2387
|
e.languages.registerDefinitionProvider("yaml", {
|
|
2358
|
-
async provideDefinition(
|
|
2359
|
-
const x = await (await r.getWorker(
|
|
2360
|
-
return x?.map(
|
|
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);
|
|
2361
2391
|
}
|
|
2362
2392
|
}),
|
|
2363
2393
|
e.languages.registerDocumentSymbolProvider("yaml", {
|
|
2364
2394
|
displayName: "yaml",
|
|
2365
|
-
async provideDocumentSymbols(
|
|
2366
|
-
const
|
|
2367
|
-
return
|
|
2395
|
+
async provideDocumentSymbols(a) {
|
|
2396
|
+
const g = await (await r.getWorker(a.uri)).findDocumentSymbols(String(a.uri));
|
|
2397
|
+
return g?.map(At);
|
|
2368
2398
|
}
|
|
2369
2399
|
}),
|
|
2370
2400
|
e.languages.registerDocumentFormattingEditProvider("yaml", {
|
|
2371
2401
|
displayName: "yaml",
|
|
2372
|
-
async provideDocumentFormattingEdits(
|
|
2373
|
-
const
|
|
2374
|
-
return
|
|
2402
|
+
async provideDocumentFormattingEdits(a) {
|
|
2403
|
+
const g = await (await r.getWorker(a.uri)).format(String(a.uri));
|
|
2404
|
+
return g?.map(Je);
|
|
2375
2405
|
}
|
|
2376
2406
|
}),
|
|
2377
2407
|
e.languages.registerLinkProvider("yaml", {
|
|
2378
|
-
async provideLinks(
|
|
2379
|
-
const
|
|
2380
|
-
if (
|
|
2408
|
+
async provideLinks(a) {
|
|
2409
|
+
const g = await (await r.getWorker(a.uri)).findLinks(String(a.uri));
|
|
2410
|
+
if (g)
|
|
2381
2411
|
return {
|
|
2382
|
-
links:
|
|
2412
|
+
links: g.map(In)
|
|
2383
2413
|
};
|
|
2384
2414
|
}
|
|
2385
2415
|
}),
|
|
2386
2416
|
e.languages.registerCodeActionProvider("yaml", {
|
|
2387
|
-
async provideCodeActions(
|
|
2417
|
+
async provideCodeActions(a, v, g) {
|
|
2388
2418
|
var x;
|
|
2389
|
-
const
|
|
2390
|
-
diagnostics: ((x =
|
|
2391
|
-
only:
|
|
2392
|
-
triggerKind:
|
|
2419
|
+
const h = await (await r.getWorker(a.uri)).getCodeAction(String(a.uri), bn(v), {
|
|
2420
|
+
diagnostics: ((x = c.get(a)) == null ? void 0 : x.filter((S) => v.intersectRanges(K(S.range)))) || [],
|
|
2421
|
+
only: g.only ? [g.only] : void 0,
|
|
2422
|
+
triggerKind: g.trigger
|
|
2393
2423
|
});
|
|
2394
|
-
if (
|
|
2424
|
+
if (h)
|
|
2395
2425
|
return {
|
|
2396
|
-
actions:
|
|
2426
|
+
actions: h.map(Cn),
|
|
2397
2427
|
dispose() {
|
|
2398
2428
|
}
|
|
2399
2429
|
};
|
|
2400
2430
|
}
|
|
2401
2431
|
}),
|
|
2402
2432
|
e.languages.registerFoldingRangeProvider("yaml", {
|
|
2403
|
-
async provideFoldingRanges(
|
|
2404
|
-
const
|
|
2405
|
-
return
|
|
2433
|
+
async provideFoldingRanges(a) {
|
|
2434
|
+
const g = await (await r.getWorker(a.uri)).getFoldingRanges(String(a.uri));
|
|
2435
|
+
return g?.map(Pn);
|
|
2406
2436
|
}
|
|
2407
2437
|
}),
|
|
2408
2438
|
e.languages.setLanguageConfiguration("yaml", {
|
|
@@ -2432,76 +2462,76 @@ function Hn(e, t) {
|
|
|
2432
2462
|
e.languages.registerOnTypeFormattingEditProvider("yaml", {
|
|
2433
2463
|
autoFormatTriggerCharacters: [`
|
|
2434
2464
|
`],
|
|
2435
|
-
async provideOnTypeFormattingEdits(
|
|
2436
|
-
const
|
|
2437
|
-
String(
|
|
2438
|
-
|
|
2439
|
-
|
|
2440
|
-
|
|
2465
|
+
async provideOnTypeFormattingEdits(a, v, g, x) {
|
|
2466
|
+
const h = await (await r.getWorker(a.uri)).doDocumentOnTypeFormatting(
|
|
2467
|
+
String(a.uri),
|
|
2468
|
+
Ce(v),
|
|
2469
|
+
g,
|
|
2470
|
+
Ln(x)
|
|
2441
2471
|
);
|
|
2442
|
-
return
|
|
2472
|
+
return h?.map(Je);
|
|
2443
2473
|
}
|
|
2444
2474
|
}),
|
|
2445
2475
|
e.languages.registerSelectionRangeProvider("yaml", {
|
|
2446
|
-
async provideSelectionRanges(
|
|
2447
|
-
const x = await (await r.getWorker(
|
|
2448
|
-
String(
|
|
2449
|
-
|
|
2476
|
+
async provideSelectionRanges(a, v) {
|
|
2477
|
+
const x = await (await r.getWorker(a.uri)).getSelectionRanges(
|
|
2478
|
+
String(a.uri),
|
|
2479
|
+
v.map(Ce)
|
|
2450
2480
|
);
|
|
2451
|
-
return x?.map(
|
|
2481
|
+
return x?.map(Bn);
|
|
2452
2482
|
}
|
|
2453
2483
|
})
|
|
2454
2484
|
];
|
|
2455
2485
|
return {
|
|
2456
2486
|
dispose() {
|
|
2457
|
-
for (const
|
|
2458
|
-
|
|
2487
|
+
for (const a of f)
|
|
2488
|
+
a.dispose();
|
|
2459
2489
|
},
|
|
2460
|
-
async update(
|
|
2461
|
-
r.updateCreateData(Object.assign(n,
|
|
2490
|
+
async update(a) {
|
|
2491
|
+
r.updateCreateData(Object.assign(n, a)), await l.revalidate();
|
|
2462
2492
|
},
|
|
2463
2493
|
getOptions() {
|
|
2464
2494
|
return n;
|
|
2465
2495
|
}
|
|
2466
2496
|
};
|
|
2467
2497
|
}
|
|
2468
|
-
function
|
|
2498
|
+
function Vn(e) {
|
|
2469
2499
|
return new Worker("/assets/editor.worker-CpuX8TSY.js", {
|
|
2470
2500
|
name: e?.name
|
|
2471
2501
|
});
|
|
2472
2502
|
}
|
|
2473
|
-
function
|
|
2503
|
+
function qn(e) {
|
|
2474
2504
|
return new Worker("/assets/json.worker-B4VHhH6h.js", {
|
|
2475
2505
|
name: e?.name
|
|
2476
2506
|
});
|
|
2477
2507
|
}
|
|
2478
|
-
function
|
|
2508
|
+
function Fn(e) {
|
|
2479
2509
|
return new Worker("/assets/ts.worker-sl17zBDo.js", {
|
|
2480
2510
|
name: e?.name
|
|
2481
2511
|
});
|
|
2482
2512
|
}
|
|
2483
|
-
function
|
|
2513
|
+
function Yn(e) {
|
|
2484
2514
|
return new Worker("/assets/css.worker-Dmf38jDD.js", {
|
|
2485
2515
|
name: e?.name
|
|
2486
2516
|
});
|
|
2487
2517
|
}
|
|
2488
|
-
function
|
|
2518
|
+
function Jn(e) {
|
|
2489
2519
|
return new Worker("/assets/html.worker-DotaEs7v.js", {
|
|
2490
2520
|
name: e?.name
|
|
2491
2521
|
});
|
|
2492
2522
|
}
|
|
2493
|
-
function
|
|
2523
|
+
function Gn(e) {
|
|
2494
2524
|
return new Worker("/assets/yaml.worker-JJoHBMla.js", {
|
|
2495
2525
|
name: e?.name
|
|
2496
2526
|
});
|
|
2497
2527
|
}
|
|
2498
|
-
function
|
|
2528
|
+
function je(...e) {
|
|
2499
2529
|
}
|
|
2500
|
-
function
|
|
2530
|
+
function Xn(...e) {
|
|
2501
2531
|
}
|
|
2502
|
-
const
|
|
2503
|
-
if (!globalThis[
|
|
2504
|
-
globalThis[
|
|
2532
|
+
const gt = "__omniview_monaco_setup__";
|
|
2533
|
+
if (!globalThis[gt]) {
|
|
2534
|
+
globalThis[gt] = !0;
|
|
2505
2535
|
const e = self.MonacoEnvironment ?? {};
|
|
2506
2536
|
self.MonacoEnvironment = {
|
|
2507
2537
|
...e,
|
|
@@ -2510,67 +2540,67 @@ if (!globalThis[yt]) {
|
|
|
2510
2540
|
try {
|
|
2511
2541
|
switch (n) {
|
|
2512
2542
|
case "yaml":
|
|
2513
|
-
r = new
|
|
2543
|
+
r = new Gn();
|
|
2514
2544
|
break;
|
|
2515
2545
|
case "json":
|
|
2516
|
-
r = new
|
|
2546
|
+
r = new qn();
|
|
2517
2547
|
break;
|
|
2518
2548
|
case "typescript":
|
|
2519
2549
|
case "javascript":
|
|
2520
|
-
r = new
|
|
2550
|
+
r = new Fn();
|
|
2521
2551
|
break;
|
|
2522
2552
|
case "css":
|
|
2523
2553
|
case "scss":
|
|
2524
2554
|
case "less":
|
|
2525
|
-
r = new
|
|
2555
|
+
r = new Yn();
|
|
2526
2556
|
break;
|
|
2527
2557
|
case "html":
|
|
2528
2558
|
case "handlebars":
|
|
2529
2559
|
case "razor":
|
|
2530
|
-
r = new
|
|
2560
|
+
r = new Jn();
|
|
2531
2561
|
break;
|
|
2532
2562
|
default:
|
|
2533
|
-
r = new
|
|
2563
|
+
r = new Vn();
|
|
2534
2564
|
break;
|
|
2535
2565
|
}
|
|
2536
|
-
|
|
2537
|
-
} catch (
|
|
2538
|
-
throw
|
|
2566
|
+
je(`Worker created for "${n}" — instanceof Worker: ${r instanceof Worker}`);
|
|
2567
|
+
} catch (c) {
|
|
2568
|
+
throw c;
|
|
2539
2569
|
}
|
|
2540
|
-
return r.onerror = (
|
|
2541
|
-
|
|
2542
|
-
}, r.addEventListener("message", (
|
|
2543
|
-
|
|
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));
|
|
2544
2574
|
}, {
|
|
2545
2575
|
once: !0
|
|
2546
2576
|
}), r;
|
|
2547
2577
|
}
|
|
2548
2578
|
};
|
|
2549
2579
|
try {
|
|
2550
|
-
const t =
|
|
2580
|
+
const t = Un(L, {
|
|
2551
2581
|
enableSchemaRequest: !1,
|
|
2552
2582
|
schemas: []
|
|
2553
2583
|
});
|
|
2554
|
-
|
|
2584
|
+
je("configureMonacoYaml succeeded — handle keys:", Object.keys(t)), de._setYamlHandle(t), je("YAML handle injected into EditorSchemaRegistry");
|
|
2555
2585
|
} catch (t) {
|
|
2556
2586
|
console.error("[monaco-setup] configureMonacoYaml FAILED:", t);
|
|
2557
2587
|
}
|
|
2558
2588
|
}
|
|
2559
|
-
function
|
|
2589
|
+
function io() {
|
|
2560
2590
|
}
|
|
2561
2591
|
export {
|
|
2562
|
-
|
|
2563
|
-
|
|
2564
|
-
|
|
2565
|
-
|
|
2566
|
-
|
|
2567
|
-
|
|
2568
|
-
|
|
2569
|
-
|
|
2570
|
-
|
|
2571
|
-
|
|
2572
|
-
|
|
2573
|
-
|
|
2592
|
+
gr as CodeEditor,
|
|
2593
|
+
Br as CommandPalette,
|
|
2594
|
+
br as DiffViewer,
|
|
2595
|
+
Nr as MarkdownPreview,
|
|
2596
|
+
ge as OV_MONACO_THEME,
|
|
2597
|
+
mn as ObjectInspector,
|
|
2598
|
+
Cr as Terminal,
|
|
2599
|
+
Ae as buildMonacoTheme,
|
|
2600
|
+
Ve as buildXtermTheme,
|
|
2601
|
+
de as editorSchemas,
|
|
2602
|
+
no as getComputedToken,
|
|
2603
|
+
io as setupMonacoWorkers,
|
|
2574
2604
|
Qe as useEditorTheme
|
|
2575
2605
|
};
|
|
2576
2606
|
//# sourceMappingURL=index.js.map
|