@ws-ui/code-editor 0.1.3 → 0.1.5

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.es.js CHANGED
@@ -1,70 +1,19 @@
1
- var Pt = Object.defineProperty;
2
- var jt = (r, n, t) => n in r ? Pt(r, n, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[n] = t;
3
- var U = (r, n, t) => (jt(r, typeof n != "symbol" ? n + "" : n, t), t);
4
- import z, { useEffect as J, createContext as Qe, useState as oe, useRef as Ve, useContext as et, memo as kt } from "react";
5
- import { loader as At, useMonaco as Lt, Editor as Dt } from "@monaco-editor/react";
6
- import { getMonacoTheme as $t, lspSubject as Ft, LspActions as G, hasAttributesString as tt, FileFolderType as Mt } from "@ws-ui/shared";
7
- import { initServices as Wt, MonacoLanguageClient as Kt } from "monaco-languageclient";
8
- import { ErrorAction as Yt, CloseAction as Ut } from "vscode-languageclient";
9
- import * as c from "monaco-editor";
10
- import { Selection as Vt, KeyMod as Q, KeyCode as ee, editor as nt, Uri as qt } from "monaco-editor";
11
- import { WebSocketMessageReader as Bt, WebSocketMessageWriter as zt, toSocket as Gt } from "vscode-ws-jsonrpc";
12
- import { WillSaveTextDocumentNotification as Zt, TextDocumentSaveReason as Jt, DidSaveTextDocumentNotification as Ht, WillCreateFilesRequest as Xt, WillRenameFilesRequest as Qt, WillDeleteFilesRequest as en, DidCreateFilesNotification as tn, DidRenameFilesNotification as nn, DidDeleteFilesNotification as rn } from "vscode-languageserver-protocol";
13
- import { ICodeEditorService as qe, StandaloneServices as xe, ILanguageFeaturesService as Be, ITextModelService as ze } from "vscode/services";
14
- var Re = { exports: {} }, te = {};
15
- /*
16
- object-assign
17
- (c) Sindre Sorhus
18
- @license MIT
19
- */
20
- var Ce, Ge;
21
- function rt() {
22
- if (Ge)
23
- return Ce;
24
- Ge = 1;
25
- var r = Object.getOwnPropertySymbols, n = Object.prototype.hasOwnProperty, t = Object.prototype.propertyIsEnumerable;
26
- function i(u) {
27
- if (u == null)
28
- throw new TypeError("Object.assign cannot be called with null or undefined");
29
- return Object(u);
30
- }
31
- function l() {
32
- try {
33
- if (!Object.assign)
34
- return !1;
35
- var u = new String("abc");
36
- if (u[5] = "de", Object.getOwnPropertyNames(u)[0] === "5")
37
- return !1;
38
- for (var f = {}, s = 0; s < 10; s++)
39
- f["_" + String.fromCharCode(s)] = s;
40
- var d = Object.getOwnPropertyNames(f).map(function(b) {
41
- return f[b];
42
- });
43
- if (d.join("") !== "0123456789")
44
- return !1;
45
- var h = {};
46
- return "abcdefghijklmnopqrst".split("").forEach(function(b) {
47
- h[b] = b;
48
- }), Object.keys(Object.assign({}, h)).join("") === "abcdefghijklmnopqrst";
49
- } catch {
50
- return !1;
51
- }
52
- }
53
- return Ce = l() ? Object.assign : function(u, f) {
54
- for (var s, d = i(u), h, b = 1; b < arguments.length; b++) {
55
- s = Object(arguments[b]);
56
- for (var S in s)
57
- n.call(s, S) && (d[S] = s[S]);
58
- if (r) {
59
- h = r(s);
60
- for (var v = 0; v < h.length; v++)
61
- t.call(s, h[v]) && (d[h[v]] = s[h[v]]);
62
- }
63
- }
64
- return d;
65
- }, Ce;
66
- }
67
- /** @license React v17.0.2
1
+ var Lt = Object.defineProperty;
2
+ var At = (r, n, t) => n in r ? Lt(r, n, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[n] = t;
3
+ var W = (r, n, t) => (At(r, typeof n != "symbol" ? n + "" : n, t), t);
4
+ import z, { useEffect as J, createContext as Qe, useState as se, useRef as qe, useContext as et, memo as Dt } from "react";
5
+ import { loader as Ft, useMonaco as $t, Editor as Mt } from "@monaco-editor/react";
6
+ import { getMonacoTheme as Wt, lspSubject as Kt, LspActions as Z, hasAttributesString as tt, FileFolderType as Ut } from "@ws-ui/shared";
7
+ import { initServices as Vt, MonacoLanguageClient as Yt } from "monaco-languageclient";
8
+ import { ErrorAction as qt, CloseAction as zt } from "vscode-languageclient";
9
+ import * as a from "monaco-editor";
10
+ import { Selection as Bt, KeyMod as Q, KeyCode as ee, editor as nt, Uri as Zt } from "monaco-editor";
11
+ import { WebSocketMessageReader as Gt, WebSocketMessageWriter as Jt, toSocket as Ht } from "vscode-ws-jsonrpc";
12
+ import { WillSaveTextDocumentNotification as Xt, TextDocumentSaveReason as Qt, DidSaveTextDocumentNotification as en, WillCreateFilesRequest as tn, WillRenameFilesRequest as nn, WillDeleteFilesRequest as rn, DidCreateFilesNotification as on, DidRenameFilesNotification as sn, DidDeleteFilesNotification as an } from "vscode-languageserver-protocol";
13
+ import { ICodeEditorService as ze, StandaloneServices as Se, ILanguageFeaturesService as Be, ITextModelService as Ze } from "vscode/services";
14
+ var Ee = { exports: {} }, re = {};
15
+ /**
16
+ * @license React
68
17
  * react-jsx-runtime.production.min.js
69
18
  *
70
19
  * Copyright (c) Facebook, Inc. and its affiliates.
@@ -72,31 +21,27 @@ function rt() {
72
21
  * This source code is licensed under the MIT license found in the
73
22
  * LICENSE file in the root directory of this source tree.
74
23
  */
75
- var Ze;
76
- function on() {
77
- if (Ze)
78
- return te;
79
- Ze = 1, rt();
80
- var r = z, n = 60103;
81
- if (te.Fragment = 60107, typeof Symbol == "function" && Symbol.for) {
82
- var t = Symbol.for;
83
- n = t("react.element"), te.Fragment = t("react.fragment");
84
- }
85
- var i = r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, l = Object.prototype.hasOwnProperty, u = { key: !0, ref: !0, __self: !0, __source: !0 };
86
- function f(s, d, h) {
87
- var b, S = {}, v = null, O = null;
88
- h !== void 0 && (v = "" + h), d.key !== void 0 && (v = "" + d.key), d.ref !== void 0 && (O = d.ref);
89
- for (b in d)
90
- l.call(d, b) && !u.hasOwnProperty(b) && (S[b] = d[b]);
91
- if (s && s.defaultProps)
92
- for (b in d = s.defaultProps, d)
93
- S[b] === void 0 && (S[b] = d[b]);
94
- return { $$typeof: n, type: s, key: v, ref: O, props: S, _owner: i.current };
24
+ var Ge;
25
+ function ln() {
26
+ if (Ge)
27
+ return re;
28
+ Ge = 1;
29
+ var r = z, n = Symbol.for("react.element"), t = Symbol.for("react.fragment"), i = Object.prototype.hasOwnProperty, l = r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, p = { key: !0, ref: !0, __self: !0, __source: !0 };
30
+ function m(v, g, T) {
31
+ var _, w = {}, x = null, P = null;
32
+ T !== void 0 && (x = "" + T), g.key !== void 0 && (x = "" + g.key), g.ref !== void 0 && (P = g.ref);
33
+ for (_ in g)
34
+ i.call(g, _) && !p.hasOwnProperty(_) && (w[_] = g[_]);
35
+ if (v && v.defaultProps)
36
+ for (_ in g = v.defaultProps, g)
37
+ w[_] === void 0 && (w[_] = g[_]);
38
+ return { $$typeof: n, type: v, key: x, ref: P, props: w, _owner: l.current };
95
39
  }
96
- return te.jsx = f, te.jsxs = f, te;
40
+ return re.Fragment = t, re.jsx = m, re.jsxs = m, re;
97
41
  }
98
- var Ee = {};
99
- /** @license React v17.0.2
42
+ var oe = {};
43
+ /**
44
+ * @license React
100
45
  * react-jsx-runtime.development.js
101
46
  *
102
47
  * Copyright (c) Facebook, Inc. and its affiliates.
@@ -105,578 +50,598 @@ var Ee = {};
105
50
  * LICENSE file in the root directory of this source tree.
106
51
  */
107
52
  var Je;
108
- function an() {
109
- return Je || (Je = 1, function(r) {
110
- process.env.NODE_ENV !== "production" && function() {
111
- var n = z, t = rt(), i = 60103, l = 60106;
112
- r.Fragment = 60107;
113
- var u = 60108, f = 60114, s = 60109, d = 60110, h = 60112, b = 60113, S = 60120, v = 60115, O = 60116, k = 60121, P = 60122, $ = 60117, _ = 60129, R = 60131;
114
- if (typeof Symbol == "function" && Symbol.for) {
115
- var y = Symbol.for;
116
- i = y("react.element"), l = y("react.portal"), r.Fragment = y("react.fragment"), u = y("react.strict_mode"), f = y("react.profiler"), s = y("react.provider"), d = y("react.context"), h = y("react.forward_ref"), b = y("react.suspense"), S = y("react.suspense_list"), v = y("react.memo"), O = y("react.lazy"), k = y("react.block"), P = y("react.server.block"), $ = y("react.fundamental"), y("react.scope"), y("react.opaque.id"), _ = y("react.debug_trace_mode"), y("react.offscreen"), R = y("react.legacy_hidden");
117
- }
118
- var g = typeof Symbol == "function" && Symbol.iterator, p = "@@iterator";
119
- function M(e) {
120
- if (e === null || typeof e != "object")
121
- return null;
122
- var o = g && e[g] || e[p];
123
- return typeof o == "function" ? o : null;
124
- }
125
- var F = n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
126
- function A(e) {
127
- {
128
- for (var o = arguments.length, a = new Array(o > 1 ? o - 1 : 0), m = 1; m < o; m++)
129
- a[m - 1] = arguments[m];
130
- Y("error", e, a);
131
- }
132
- }
133
- function Y(e, o, a) {
134
- {
135
- var m = F.ReactDebugCurrentFrame, T = m.getStackAddendum();
136
- T !== "" && (o += "%s", a = a.concat([T]));
137
- var N = a.map(function(E) {
138
- return "" + E;
139
- });
140
- N.unshift("Warning: " + o), Function.prototype.apply.call(console[e], console, N);
141
- }
142
- }
143
- var ce = !1;
144
- function x(e) {
145
- return !!(typeof e == "string" || typeof e == "function" || e === r.Fragment || e === f || e === _ || e === u || e === b || e === S || e === R || ce || typeof e == "object" && e !== null && (e.$$typeof === O || e.$$typeof === v || e.$$typeof === s || e.$$typeof === d || e.$$typeof === h || e.$$typeof === $ || e.$$typeof === k || e[0] === P));
146
- }
147
- function I(e, o, a) {
148
- var m = o.displayName || o.name || "";
149
- return e.displayName || (m !== "" ? a + "(" + m + ")" : a);
53
+ function un() {
54
+ return Je || (Je = 1, process.env.NODE_ENV !== "production" && function() {
55
+ var r = z, n = Symbol.for("react.element"), t = Symbol.for("react.portal"), i = Symbol.for("react.fragment"), l = Symbol.for("react.strict_mode"), p = Symbol.for("react.profiler"), m = Symbol.for("react.provider"), v = Symbol.for("react.context"), g = Symbol.for("react.forward_ref"), T = Symbol.for("react.suspense"), _ = Symbol.for("react.suspense_list"), w = Symbol.for("react.memo"), x = Symbol.for("react.lazy"), P = Symbol.for("react.offscreen"), j = Symbol.iterator, k = "@@iterator";
56
+ function A(e) {
57
+ if (e === null || typeof e != "object")
58
+ return null;
59
+ var o = j && e[j] || e[k];
60
+ return typeof o == "function" ? o : null;
61
+ }
62
+ var R = r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
63
+ function c(e) {
64
+ {
65
+ for (var o = arguments.length, s = new Array(o > 1 ? o - 1 : 0), u = 1; u < o; u++)
66
+ s[u - 1] = arguments[u];
67
+ Y("error", e, s);
150
68
  }
151
- function w(e) {
152
- return e.displayName || "Context";
69
+ }
70
+ function Y(e, o, s) {
71
+ {
72
+ var u = R.ReactDebugCurrentFrame, S = u.getStackAddendum();
73
+ S !== "" && (o += "%s", s = s.concat([S]));
74
+ var I = s.map(function(C) {
75
+ return String(C);
76
+ });
77
+ I.unshift("Warning: " + o), Function.prototype.apply.call(console[e], console, I);
153
78
  }
154
- function W(e) {
155
- if (e == null)
156
- return null;
157
- if (typeof e.tag == "number" && A("Received an unexpected object in getComponentName(). This is likely a bug in React. Please file an issue."), typeof e == "function")
158
- return e.displayName || e.name || null;
159
- if (typeof e == "string")
160
- return e;
161
- switch (e) {
162
- case r.Fragment:
163
- return "Fragment";
164
- case l:
165
- return "Portal";
166
- case f:
167
- return "Profiler";
168
- case u:
169
- return "StrictMode";
170
- case b:
171
- return "Suspense";
172
- case S:
173
- return "SuspenseList";
174
- }
175
- if (typeof e == "object")
176
- switch (e.$$typeof) {
177
- case d:
178
- var o = e;
179
- return w(o) + ".Consumer";
180
- case s:
181
- var a = e;
182
- return w(a._context) + ".Provider";
183
- case h:
184
- return I(e, e.render, "ForwardRef");
185
- case v:
186
- return W(e.type);
187
- case k:
188
- return W(e._render);
189
- case O: {
190
- var m = e, T = m._payload, N = m._init;
191
- try {
192
- return W(N(T));
193
- } catch {
194
- return null;
195
- }
196
- }
197
- }
79
+ }
80
+ var f = !1, d = !1, D = !1, M = !1, B = !1, F;
81
+ F = Symbol.for("react.module.reference");
82
+ function de(e) {
83
+ return !!(typeof e == "string" || typeof e == "function" || e === i || e === p || B || e === l || e === T || e === _ || M || e === P || f || d || D || typeof e == "object" && e !== null && (e.$$typeof === x || e.$$typeof === w || e.$$typeof === m || e.$$typeof === v || e.$$typeof === g || // This needs to include all possible module reference object
84
+ // types supported by any Flight configuration anywhere since
85
+ // we don't know which Flight build this will end up being used
86
+ // with.
87
+ e.$$typeof === F || e.getModuleId !== void 0));
88
+ }
89
+ function E(e, o, s) {
90
+ var u = e.displayName;
91
+ if (u)
92
+ return u;
93
+ var S = o.displayName || o.name || "";
94
+ return S !== "" ? s + "(" + S + ")" : s;
95
+ }
96
+ function y(e) {
97
+ return e.displayName || "Context";
98
+ }
99
+ function b(e) {
100
+ if (e == null)
198
101
  return null;
102
+ if (typeof e.tag == "number" && c("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof e == "function")
103
+ return e.displayName || e.name || null;
104
+ if (typeof e == "string")
105
+ return e;
106
+ switch (e) {
107
+ case i:
108
+ return "Fragment";
109
+ case t:
110
+ return "Portal";
111
+ case p:
112
+ return "Profiler";
113
+ case l:
114
+ return "StrictMode";
115
+ case T:
116
+ return "Suspense";
117
+ case _:
118
+ return "SuspenseList";
199
119
  }
200
- var ne = 0, Se, ye, we, _e, Ie, Te, Ne;
201
- function Oe() {
202
- }
203
- Oe.__reactDisabledLog = !0;
204
- function ct() {
205
- {
206
- if (ne === 0) {
207
- Se = console.log, ye = console.info, we = console.warn, _e = console.error, Ie = console.group, Te = console.groupCollapsed, Ne = console.groupEnd;
208
- var e = {
209
- configurable: !0,
210
- enumerable: !0,
211
- value: Oe,
212
- writable: !0
213
- };
214
- Object.defineProperties(console, {
215
- info: e,
216
- log: e,
217
- warn: e,
218
- error: e,
219
- group: e,
220
- groupCollapsed: e,
221
- groupEnd: e
222
- });
120
+ if (typeof e == "object")
121
+ switch (e.$$typeof) {
122
+ case v:
123
+ var o = e;
124
+ return y(o) + ".Consumer";
125
+ case m:
126
+ var s = e;
127
+ return y(s._context) + ".Provider";
128
+ case g:
129
+ return E(e, e.render, "ForwardRef");
130
+ case w:
131
+ var u = e.displayName || null;
132
+ return u !== null ? u : b(e.type) || "Memo";
133
+ case x: {
134
+ var S = e, I = S._payload, C = S._init;
135
+ try {
136
+ return b(C(I));
137
+ } catch {
138
+ return null;
139
+ }
223
140
  }
224
- ne++;
225
141
  }
226
- }
227
- function ft() {
228
- {
229
- if (ne--, ne === 0) {
230
- var e = {
231
- configurable: !0,
232
- enumerable: !0,
233
- writable: !0
234
- };
235
- Object.defineProperties(console, {
236
- log: t({}, e, {
237
- value: Se
238
- }),
239
- info: t({}, e, {
240
- value: ye
241
- }),
242
- warn: t({}, e, {
243
- value: we
244
- }),
245
- error: t({}, e, {
246
- value: _e
247
- }),
248
- group: t({}, e, {
249
- value: Ie
250
- }),
251
- groupCollapsed: t({}, e, {
252
- value: Te
253
- }),
254
- groupEnd: t({}, e, {
255
- value: Ne
256
- })
257
- });
258
- }
259
- ne < 0 && A("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
142
+ return null;
143
+ }
144
+ var K = Object.assign, te = 0, xe, ye, Ie, we, Te, _e, Ne;
145
+ function Pe() {
146
+ }
147
+ Pe.__reactDisabledLog = !0;
148
+ function ut() {
149
+ {
150
+ if (te === 0) {
151
+ xe = console.log, ye = console.info, Ie = console.warn, we = console.error, Te = console.group, _e = console.groupCollapsed, Ne = console.groupEnd;
152
+ var e = {
153
+ configurable: !0,
154
+ enumerable: !0,
155
+ value: Pe,
156
+ writable: !0
157
+ };
158
+ Object.defineProperties(console, {
159
+ info: e,
160
+ log: e,
161
+ warn: e,
162
+ error: e,
163
+ group: e,
164
+ groupCollapsed: e,
165
+ groupEnd: e
166
+ });
260
167
  }
168
+ te++;
261
169
  }
262
- var fe = F.ReactCurrentDispatcher, de;
263
- function ae(e, o, a) {
264
- {
265
- if (de === void 0)
266
- try {
267
- throw Error();
268
- } catch (T) {
269
- var m = T.stack.trim().match(/\n( *(at )?)/);
270
- de = m && m[1] || "";
271
- }
272
- return `
273
- ` + de + e;
170
+ }
171
+ function ct() {
172
+ {
173
+ if (te--, te === 0) {
174
+ var e = {
175
+ configurable: !0,
176
+ enumerable: !0,
177
+ writable: !0
178
+ };
179
+ Object.defineProperties(console, {
180
+ log: K({}, e, {
181
+ value: xe
182
+ }),
183
+ info: K({}, e, {
184
+ value: ye
185
+ }),
186
+ warn: K({}, e, {
187
+ value: Ie
188
+ }),
189
+ error: K({}, e, {
190
+ value: we
191
+ }),
192
+ group: K({}, e, {
193
+ value: Te
194
+ }),
195
+ groupCollapsed: K({}, e, {
196
+ value: _e
197
+ }),
198
+ groupEnd: K({}, e, {
199
+ value: Ne
200
+ })
201
+ });
274
202
  }
203
+ te < 0 && c("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
275
204
  }
276
- var me = !1, se;
205
+ }
206
+ var me = R.ReactCurrentDispatcher, ge;
207
+ function ae(e, o, s) {
277
208
  {
278
- var dt = typeof WeakMap == "function" ? WeakMap : Map;
279
- se = new dt();
209
+ if (ge === void 0)
210
+ try {
211
+ throw Error();
212
+ } catch (S) {
213
+ var u = S.stack.trim().match(/\n( *(at )?)/);
214
+ ge = u && u[1] || "";
215
+ }
216
+ return `
217
+ ` + ge + e;
280
218
  }
281
- function Pe(e, o) {
282
- if (!e || me)
283
- return "";
284
- {
285
- var a = se.get(e);
286
- if (a !== void 0)
287
- return a;
288
- }
289
- var m;
290
- me = !0;
291
- var T = Error.prepareStackTrace;
292
- Error.prepareStackTrace = void 0;
293
- var N;
294
- N = fe.current, fe.current = null, ct();
295
- try {
296
- if (o) {
297
- var E = function() {
219
+ }
220
+ var pe = !1, le;
221
+ {
222
+ var ft = typeof WeakMap == "function" ? WeakMap : Map;
223
+ le = new ft();
224
+ }
225
+ function ke(e, o) {
226
+ if (!e || pe)
227
+ return "";
228
+ {
229
+ var s = le.get(e);
230
+ if (s !== void 0)
231
+ return s;
232
+ }
233
+ var u;
234
+ pe = !0;
235
+ var S = Error.prepareStackTrace;
236
+ Error.prepareStackTrace = void 0;
237
+ var I;
238
+ I = me.current, me.current = null, ut();
239
+ try {
240
+ if (o) {
241
+ var C = function() {
242
+ throw Error();
243
+ };
244
+ if (Object.defineProperty(C.prototype, "props", {
245
+ set: function() {
298
246
  throw Error();
299
- };
300
- if (Object.defineProperty(E.prototype, "props", {
301
- set: function() {
302
- throw Error();
303
- }
304
- }), typeof Reflect == "object" && Reflect.construct) {
305
- try {
306
- Reflect.construct(E, []);
307
- } catch (B) {
308
- m = B;
309
- }
310
- Reflect.construct(e, [], E);
311
- } else {
312
- try {
313
- E.call();
314
- } catch (B) {
315
- m = B;
316
- }
317
- e.call(E.prototype);
318
247
  }
248
+ }), typeof Reflect == "object" && Reflect.construct) {
249
+ try {
250
+ Reflect.construct(C, []);
251
+ } catch (q) {
252
+ u = q;
253
+ }
254
+ Reflect.construct(e, [], C);
319
255
  } else {
320
256
  try {
321
- throw Error();
322
- } catch (B) {
323
- m = B;
257
+ C.call();
258
+ } catch (q) {
259
+ u = q;
324
260
  }
325
- e();
261
+ e.call(C.prototype);
326
262
  }
327
- } catch (B) {
328
- if (B && m && typeof B.stack == "string") {
329
- for (var C = B.stack.split(`
330
- `), K = m.stack.split(`
331
- `), L = C.length - 1, D = K.length - 1; L >= 1 && D >= 0 && C[L] !== K[D]; )
332
- D--;
333
- for (; L >= 1 && D >= 0; L--, D--)
334
- if (C[L] !== K[D]) {
335
- if (L !== 1 || D !== 1)
336
- do
337
- if (L--, D--, D < 0 || C[L] !== K[D]) {
338
- var q = `
339
- ` + C[L].replace(" at new ", " at ");
340
- return typeof e == "function" && se.set(e, q), q;
341
- }
342
- while (L >= 1 && D >= 0);
343
- break;
344
- }
263
+ } else {
264
+ try {
265
+ throw Error();
266
+ } catch (q) {
267
+ u = q;
345
268
  }
346
- } finally {
347
- me = !1, fe.current = N, ft(), Error.prepareStackTrace = T;
269
+ e();
348
270
  }
349
- var X = e ? e.displayName || e.name : "", Ue = X ? ae(X) : "";
350
- return typeof e == "function" && se.set(e, Ue), Ue;
351
- }
352
- function je(e, o, a) {
353
- return Pe(e, !1);
271
+ } catch (q) {
272
+ if (q && u && typeof q.stack == "string") {
273
+ for (var h = q.stack.split(`
274
+ `), $ = u.stack.split(`
275
+ `), O = h.length - 1, L = $.length - 1; O >= 1 && L >= 0 && h[O] !== $[L]; )
276
+ L--;
277
+ for (; O >= 1 && L >= 0; O--, L--)
278
+ if (h[O] !== $[L]) {
279
+ if (O !== 1 || L !== 1)
280
+ do
281
+ if (O--, L--, L < 0 || h[O] !== $[L]) {
282
+ var U = `
283
+ ` + h[O].replace(" at new ", " at ");
284
+ return e.displayName && U.includes("<anonymous>") && (U = U.replace("<anonymous>", e.displayName)), typeof e == "function" && le.set(e, U), U;
285
+ }
286
+ while (O >= 1 && L >= 0);
287
+ break;
288
+ }
289
+ }
290
+ } finally {
291
+ pe = !1, me.current = I, ct(), Error.prepareStackTrace = S;
354
292
  }
355
- function mt(e) {
356
- var o = e.prototype;
357
- return !!(o && o.isReactComponent);
293
+ var X = e ? e.displayName || e.name : "", Ye = X ? ae(X) : "";
294
+ return typeof e == "function" && le.set(e, Ye), Ye;
295
+ }
296
+ function dt(e, o, s) {
297
+ return ke(e, !1);
298
+ }
299
+ function mt(e) {
300
+ var o = e.prototype;
301
+ return !!(o && o.isReactComponent);
302
+ }
303
+ function ue(e, o, s) {
304
+ if (e == null)
305
+ return "";
306
+ if (typeof e == "function")
307
+ return ke(e, mt(e));
308
+ if (typeof e == "string")
309
+ return ae(e);
310
+ switch (e) {
311
+ case T:
312
+ return ae("Suspense");
313
+ case _:
314
+ return ae("SuspenseList");
358
315
  }
359
- function le(e, o, a) {
360
- if (e == null)
361
- return "";
362
- if (typeof e == "function")
363
- return Pe(e, mt(e));
364
- if (typeof e == "string")
365
- return ae(e);
366
- switch (e) {
367
- case b:
368
- return ae("Suspense");
369
- case S:
370
- return ae("SuspenseList");
316
+ if (typeof e == "object")
317
+ switch (e.$$typeof) {
318
+ case g:
319
+ return dt(e.render);
320
+ case w:
321
+ return ue(e.type, o, s);
322
+ case x: {
323
+ var u = e, S = u._payload, I = u._init;
324
+ try {
325
+ return ue(I(S), o, s);
326
+ } catch {
327
+ }
328
+ }
371
329
  }
372
- if (typeof e == "object")
373
- switch (e.$$typeof) {
374
- case h:
375
- return je(e.render);
376
- case v:
377
- return le(e.type, o, a);
378
- case k:
379
- return je(e._render);
380
- case O: {
381
- var m = e, T = m._payload, N = m._init;
382
- try {
383
- return le(N(T), o, a);
384
- } catch {
330
+ return "";
331
+ }
332
+ var ce = Object.prototype.hasOwnProperty, Oe = {}, je = R.ReactDebugCurrentFrame;
333
+ function fe(e) {
334
+ if (e) {
335
+ var o = e._owner, s = ue(e.type, e._source, o ? o.type : null);
336
+ je.setExtraStackFrame(s);
337
+ } else
338
+ je.setExtraStackFrame(null);
339
+ }
340
+ function gt(e, o, s, u, S) {
341
+ {
342
+ var I = Function.call.bind(ce);
343
+ for (var C in e)
344
+ if (I(e, C)) {
345
+ var h = void 0;
346
+ try {
347
+ if (typeof e[C] != "function") {
348
+ var $ = Error((u || "React class") + ": " + s + " type `" + C + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[C] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
349
+ throw $.name = "Invariant Violation", $;
385
350
  }
351
+ h = e[C](o, C, u, s, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
352
+ } catch (O) {
353
+ h = O;
386
354
  }
355
+ h && !(h instanceof Error) && (fe(S), c("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", u || "React class", s, C, typeof h), fe(null)), h instanceof Error && !(h.message in Oe) && (Oe[h.message] = !0, fe(S), c("Failed %s type: %s", s, h.message), fe(null));
387
356
  }
388
- return "";
389
357
  }
390
- var ke = {}, Ae = F.ReactDebugCurrentFrame;
391
- function ue(e) {
392
- if (e) {
393
- var o = e._owner, a = le(e.type, e._source, o ? o.type : null);
394
- Ae.setExtraStackFrame(a);
395
- } else
396
- Ae.setExtraStackFrame(null);
397
- }
398
- function gt(e, o, a, m, T) {
399
- {
400
- var N = Function.call.bind(Object.prototype.hasOwnProperty);
401
- for (var E in e)
402
- if (N(e, E)) {
403
- var C = void 0;
404
- try {
405
- if (typeof e[E] != "function") {
406
- var K = Error((m || "React class") + ": " + a + " type `" + E + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[E] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
407
- throw K.name = "Invariant Violation", K;
408
- }
409
- C = e[E](o, E, m, a, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
410
- } catch (L) {
411
- C = L;
412
- }
413
- C && !(C instanceof Error) && (ue(T), A("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", m || "React class", a, E, typeof C), ue(null)), C instanceof Error && !(C.message in ke) && (ke[C.message] = !0, ue(T), A("Failed %s type: %s", a, C.message), ue(null));
414
- }
415
- }
358
+ }
359
+ var pt = Array.isArray;
360
+ function ve(e) {
361
+ return pt(e);
362
+ }
363
+ function vt(e) {
364
+ {
365
+ var o = typeof Symbol == "function" && Symbol.toStringTag, s = o && e[Symbol.toStringTag] || e.constructor.name || "Object";
366
+ return s;
416
367
  }
417
- var re = F.ReactCurrentOwner, ge = Object.prototype.hasOwnProperty, pt = {
418
- key: !0,
419
- ref: !0,
420
- __self: !0,
421
- __source: !0
422
- }, Le, De, pe;
423
- pe = {};
424
- function vt(e) {
425
- if (ge.call(e, "ref")) {
426
- var o = Object.getOwnPropertyDescriptor(e, "ref").get;
427
- if (o && o.isReactWarning)
428
- return !1;
429
- }
430
- return e.ref !== void 0;
368
+ }
369
+ function ht(e) {
370
+ try {
371
+ return Le(e), !1;
372
+ } catch {
373
+ return !0;
431
374
  }
432
- function ht(e) {
433
- if (ge.call(e, "key")) {
434
- var o = Object.getOwnPropertyDescriptor(e, "key").get;
435
- if (o && o.isReactWarning)
436
- return !1;
437
- }
438
- return e.key !== void 0;
375
+ }
376
+ function Le(e) {
377
+ return "" + e;
378
+ }
379
+ function Ae(e) {
380
+ if (ht(e))
381
+ return c("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", vt(e)), Le(e);
382
+ }
383
+ var ne = R.ReactCurrentOwner, bt = {
384
+ key: !0,
385
+ ref: !0,
386
+ __self: !0,
387
+ __source: !0
388
+ }, De, Fe, he;
389
+ he = {};
390
+ function Ct(e) {
391
+ if (ce.call(e, "ref")) {
392
+ var o = Object.getOwnPropertyDescriptor(e, "ref").get;
393
+ if (o && o.isReactWarning)
394
+ return !1;
439
395
  }
440
- function bt(e, o) {
441
- if (typeof e.ref == "string" && re.current && o && re.current.stateNode !== o) {
442
- var a = W(re.current.type);
443
- pe[a] || (A('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', W(re.current.type), e.ref), pe[a] = !0);
444
- }
396
+ return e.ref !== void 0;
397
+ }
398
+ function Rt(e) {
399
+ if (ce.call(e, "key")) {
400
+ var o = Object.getOwnPropertyDescriptor(e, "key").get;
401
+ if (o && o.isReactWarning)
402
+ return !1;
445
403
  }
446
- function Ct(e, o) {
447
- {
448
- var a = function() {
449
- Le || (Le = !0, A("%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://reactjs.org/link/special-props)", o));
450
- };
451
- a.isReactWarning = !0, Object.defineProperty(e, "key", {
452
- get: a,
453
- configurable: !0
454
- });
455
- }
404
+ return e.key !== void 0;
405
+ }
406
+ function Et(e, o) {
407
+ if (typeof e.ref == "string" && ne.current && o && ne.current.stateNode !== o) {
408
+ var s = b(ne.current.type);
409
+ he[s] || (c('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', b(ne.current.type), e.ref), he[s] = !0);
456
410
  }
457
- function Et(e, o) {
458
- {
459
- var a = function() {
460
- De || (De = !0, A("%s: `ref` 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://reactjs.org/link/special-props)", o));
461
- };
462
- a.isReactWarning = !0, Object.defineProperty(e, "ref", {
463
- get: a,
464
- configurable: !0
465
- });
466
- }
411
+ }
412
+ function St(e, o) {
413
+ {
414
+ var s = function() {
415
+ De || (De = !0, c("%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://reactjs.org/link/special-props)", o));
416
+ };
417
+ s.isReactWarning = !0, Object.defineProperty(e, "key", {
418
+ get: s,
419
+ configurable: !0
420
+ });
467
421
  }
468
- var Rt = function(e, o, a, m, T, N, E) {
469
- var C = {
470
- // This tag allows us to uniquely identify this as a React Element
471
- $$typeof: i,
472
- // Built-in properties that belong on the element
473
- type: e,
474
- key: o,
475
- ref: a,
476
- props: E,
477
- // Record the component responsible for creating this element.
478
- _owner: N
422
+ }
423
+ function xt(e, o) {
424
+ {
425
+ var s = function() {
426
+ Fe || (Fe = !0, c("%s: `ref` 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://reactjs.org/link/special-props)", o));
479
427
  };
480
- return C._store = {}, Object.defineProperty(C._store, "validated", {
481
- configurable: !1,
482
- enumerable: !1,
483
- writable: !0,
484
- value: !1
485
- }), Object.defineProperty(C, "_self", {
486
- configurable: !1,
487
- enumerable: !1,
488
- writable: !1,
489
- value: m
490
- }), Object.defineProperty(C, "_source", {
491
- configurable: !1,
492
- enumerable: !1,
493
- writable: !1,
494
- value: T
495
- }), Object.freeze && (Object.freeze(C.props), Object.freeze(C)), C;
428
+ s.isReactWarning = !0, Object.defineProperty(e, "ref", {
429
+ get: s,
430
+ configurable: !0
431
+ });
432
+ }
433
+ }
434
+ var yt = function(e, o, s, u, S, I, C) {
435
+ var h = {
436
+ // This tag allows us to uniquely identify this as a React Element
437
+ $$typeof: n,
438
+ // Built-in properties that belong on the element
439
+ type: e,
440
+ key: o,
441
+ ref: s,
442
+ props: C,
443
+ // Record the component responsible for creating this element.
444
+ _owner: I
496
445
  };
497
- function xt(e, o, a, m, T) {
498
- {
499
- var N, E = {}, C = null, K = null;
500
- a !== void 0 && (C = "" + a), ht(o) && (C = "" + o.key), vt(o) && (K = o.ref, bt(o, T));
501
- for (N in o)
502
- ge.call(o, N) && !pt.hasOwnProperty(N) && (E[N] = o[N]);
503
- if (e && e.defaultProps) {
504
- var L = e.defaultProps;
505
- for (N in L)
506
- E[N] === void 0 && (E[N] = L[N]);
507
- }
508
- if (C || K) {
509
- var D = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
510
- C && Ct(E, D), K && Et(E, D);
511
- }
512
- return Rt(e, C, K, T, m, re.current, E);
446
+ return h._store = {}, Object.defineProperty(h._store, "validated", {
447
+ configurable: !1,
448
+ enumerable: !1,
449
+ writable: !0,
450
+ value: !1
451
+ }), Object.defineProperty(h, "_self", {
452
+ configurable: !1,
453
+ enumerable: !1,
454
+ writable: !1,
455
+ value: u
456
+ }), Object.defineProperty(h, "_source", {
457
+ configurable: !1,
458
+ enumerable: !1,
459
+ writable: !1,
460
+ value: S
461
+ }), Object.freeze && (Object.freeze(h.props), Object.freeze(h)), h;
462
+ };
463
+ function It(e, o, s, u, S) {
464
+ {
465
+ var I, C = {}, h = null, $ = null;
466
+ s !== void 0 && (Ae(s), h = "" + s), Rt(o) && (Ae(o.key), h = "" + o.key), Ct(o) && ($ = o.ref, Et(o, S));
467
+ for (I in o)
468
+ ce.call(o, I) && !bt.hasOwnProperty(I) && (C[I] = o[I]);
469
+ if (e && e.defaultProps) {
470
+ var O = e.defaultProps;
471
+ for (I in O)
472
+ C[I] === void 0 && (C[I] = O[I]);
513
473
  }
474
+ if (h || $) {
475
+ var L = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
476
+ h && St(C, L), $ && xt(C, L);
477
+ }
478
+ return yt(e, h, $, S, u, ne.current, C);
514
479
  }
515
- var ve = F.ReactCurrentOwner, $e = F.ReactDebugCurrentFrame;
516
- function H(e) {
517
- if (e) {
518
- var o = e._owner, a = le(e.type, e._source, o ? o.type : null);
519
- $e.setExtraStackFrame(a);
520
- } else
521
- $e.setExtraStackFrame(null);
522
- }
523
- var he;
524
- he = !1;
525
- function be(e) {
526
- return typeof e == "object" && e !== null && e.$$typeof === i;
527
- }
528
- function Fe() {
529
- {
530
- if (ve.current) {
531
- var e = W(ve.current.type);
532
- if (e)
533
- return `
480
+ }
481
+ var be = R.ReactCurrentOwner, $e = R.ReactDebugCurrentFrame;
482
+ function H(e) {
483
+ if (e) {
484
+ var o = e._owner, s = ue(e.type, e._source, o ? o.type : null);
485
+ $e.setExtraStackFrame(s);
486
+ } else
487
+ $e.setExtraStackFrame(null);
488
+ }
489
+ var Ce;
490
+ Ce = !1;
491
+ function Re(e) {
492
+ return typeof e == "object" && e !== null && e.$$typeof === n;
493
+ }
494
+ function Me() {
495
+ {
496
+ if (be.current) {
497
+ var e = b(be.current.type);
498
+ if (e)
499
+ return `
534
500
 
535
501
  Check the render method of \`` + e + "`.";
536
- }
537
- return "";
538
502
  }
503
+ return "";
539
504
  }
540
- function St(e) {
541
- {
542
- if (e !== void 0) {
543
- var o = e.fileName.replace(/^.*[\\\/]/, ""), a = e.lineNumber;
544
- return `
505
+ }
506
+ function wt(e) {
507
+ {
508
+ if (e !== void 0) {
509
+ var o = e.fileName.replace(/^.*[\\\/]/, ""), s = e.lineNumber;
510
+ return `
545
511
 
546
- Check your code at ` + o + ":" + a + ".";
547
- }
548
- return "";
512
+ Check your code at ` + o + ":" + s + ".";
549
513
  }
514
+ return "";
550
515
  }
551
- var Me = {};
552
- function yt(e) {
553
- {
554
- var o = Fe();
555
- if (!o) {
556
- var a = typeof e == "string" ? e : e.displayName || e.name;
557
- a && (o = `
516
+ }
517
+ var We = {};
518
+ function Tt(e) {
519
+ {
520
+ var o = Me();
521
+ if (!o) {
522
+ var s = typeof e == "string" ? e : e.displayName || e.name;
523
+ s && (o = `
558
524
 
559
- Check the top-level render call using <` + a + ">.");
560
- }
561
- return o;
525
+ Check the top-level render call using <` + s + ">.");
562
526
  }
527
+ return o;
563
528
  }
564
- function We(e, o) {
565
- {
566
- if (!e._store || e._store.validated || e.key != null)
567
- return;
568
- e._store.validated = !0;
569
- var a = yt(o);
570
- if (Me[a])
571
- return;
572
- Me[a] = !0;
573
- var m = "";
574
- e && e._owner && e._owner !== ve.current && (m = " It was passed a child from " + W(e._owner.type) + "."), H(e), A('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', a, m), H(null);
575
- }
529
+ }
530
+ function Ke(e, o) {
531
+ {
532
+ if (!e._store || e._store.validated || e.key != null)
533
+ return;
534
+ e._store.validated = !0;
535
+ var s = Tt(o);
536
+ if (We[s])
537
+ return;
538
+ We[s] = !0;
539
+ var u = "";
540
+ e && e._owner && e._owner !== be.current && (u = " It was passed a child from " + b(e._owner.type) + "."), H(e), c('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', s, u), H(null);
576
541
  }
577
- function Ke(e, o) {
578
- {
579
- if (typeof e != "object")
580
- return;
581
- if (Array.isArray(e))
582
- for (var a = 0; a < e.length; a++) {
583
- var m = e[a];
584
- be(m) && We(m, o);
585
- }
586
- else if (be(e))
587
- e._store && (e._store.validated = !0);
588
- else if (e) {
589
- var T = M(e);
590
- if (typeof T == "function" && T !== e.entries)
591
- for (var N = T.call(e), E; !(E = N.next()).done; )
592
- be(E.value) && We(E.value, o);
542
+ }
543
+ function Ue(e, o) {
544
+ {
545
+ if (typeof e != "object")
546
+ return;
547
+ if (ve(e))
548
+ for (var s = 0; s < e.length; s++) {
549
+ var u = e[s];
550
+ Re(u) && Ke(u, o);
593
551
  }
552
+ else if (Re(e))
553
+ e._store && (e._store.validated = !0);
554
+ else if (e) {
555
+ var S = A(e);
556
+ if (typeof S == "function" && S !== e.entries)
557
+ for (var I = S.call(e), C; !(C = I.next()).done; )
558
+ Re(C.value) && Ke(C.value, o);
594
559
  }
595
560
  }
596
- function wt(e) {
597
- {
598
- var o = e.type;
599
- if (o == null || typeof o == "string")
600
- return;
601
- var a;
602
- if (typeof o == "function")
603
- a = o.propTypes;
604
- else if (typeof o == "object" && (o.$$typeof === h || // Note: Memo only checks outer props here.
605
- // Inner props are checked in the reconciler.
606
- o.$$typeof === v))
607
- a = o.propTypes;
608
- else
609
- return;
610
- if (a) {
611
- var m = W(o);
612
- gt(a, e.props, "prop", m, e);
613
- } else if (o.PropTypes !== void 0 && !he) {
614
- he = !0;
615
- var T = W(o);
616
- A("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", T || "Unknown");
617
- }
618
- typeof o.getDefaultProps == "function" && !o.getDefaultProps.isReactClassApproved && A("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
561
+ }
562
+ function _t(e) {
563
+ {
564
+ var o = e.type;
565
+ if (o == null || typeof o == "string")
566
+ return;
567
+ var s;
568
+ if (typeof o == "function")
569
+ s = o.propTypes;
570
+ else if (typeof o == "object" && (o.$$typeof === g || // Note: Memo only checks outer props here.
571
+ // Inner props are checked in the reconciler.
572
+ o.$$typeof === w))
573
+ s = o.propTypes;
574
+ else
575
+ return;
576
+ if (s) {
577
+ var u = b(o);
578
+ gt(s, e.props, "prop", u, e);
579
+ } else if (o.PropTypes !== void 0 && !Ce) {
580
+ Ce = !0;
581
+ var S = b(o);
582
+ c("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", S || "Unknown");
619
583
  }
584
+ typeof o.getDefaultProps == "function" && !o.getDefaultProps.isReactClassApproved && c("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
620
585
  }
621
- function _t(e) {
622
- {
623
- for (var o = Object.keys(e.props), a = 0; a < o.length; a++) {
624
- var m = o[a];
625
- if (m !== "children" && m !== "key") {
626
- H(e), A("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", m), H(null);
627
- break;
628
- }
586
+ }
587
+ function Nt(e) {
588
+ {
589
+ for (var o = Object.keys(e.props), s = 0; s < o.length; s++) {
590
+ var u = o[s];
591
+ if (u !== "children" && u !== "key") {
592
+ H(e), c("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", u), H(null);
593
+ break;
629
594
  }
630
- e.ref !== null && (H(e), A("Invalid attribute `ref` supplied to `React.Fragment`."), H(null));
631
595
  }
596
+ e.ref !== null && (H(e), c("Invalid attribute `ref` supplied to `React.Fragment`."), H(null));
632
597
  }
633
- function Ye(e, o, a, m, T, N) {
634
- {
635
- var E = x(e);
636
- if (!E) {
637
- var C = "";
638
- (e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (C += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
639
- var K = St(T);
640
- K ? C += K : C += Fe();
641
- var L;
642
- e === null ? L = "null" : Array.isArray(e) ? L = "array" : e !== void 0 && e.$$typeof === i ? (L = "<" + (W(e.type) || "Unknown") + " />", C = " Did you accidentally export a JSX literal instead of a component?") : L = typeof e, A("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", L, C);
643
- }
644
- var D = xt(e, o, a, T, N);
645
- if (D == null)
646
- return D;
647
- if (E) {
648
- var q = o.children;
649
- if (q !== void 0)
650
- if (m)
651
- if (Array.isArray(q)) {
652
- for (var X = 0; X < q.length; X++)
653
- Ke(q[X], e);
654
- Object.freeze && Object.freeze(q);
655
- } else
656
- A("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
657
- else
658
- Ke(q, e);
659
- }
660
- return e === r.Fragment ? _t(D) : wt(D), D;
598
+ }
599
+ function Ve(e, o, s, u, S, I) {
600
+ {
601
+ var C = de(e);
602
+ if (!C) {
603
+ var h = "";
604
+ (e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (h += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
605
+ var $ = wt(S);
606
+ $ ? h += $ : h += Me();
607
+ var O;
608
+ e === null ? O = "null" : ve(e) ? O = "array" : e !== void 0 && e.$$typeof === n ? (O = "<" + (b(e.type) || "Unknown") + " />", h = " Did you accidentally export a JSX literal instead of a component?") : O = typeof e, c("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", O, h);
661
609
  }
610
+ var L = It(e, o, s, S, I);
611
+ if (L == null)
612
+ return L;
613
+ if (C) {
614
+ var U = o.children;
615
+ if (U !== void 0)
616
+ if (u)
617
+ if (ve(U)) {
618
+ for (var X = 0; X < U.length; X++)
619
+ Ue(U[X], e);
620
+ Object.freeze && Object.freeze(U);
621
+ } else
622
+ c("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
623
+ else
624
+ Ue(U, e);
625
+ }
626
+ return e === i ? Nt(L) : _t(L), L;
662
627
  }
663
- function It(e, o, a) {
664
- return Ye(e, o, a, !0);
665
- }
666
- function Tt(e, o, a) {
667
- return Ye(e, o, a, !1);
668
- }
669
- var Nt = Tt, Ot = It;
670
- r.jsx = Nt, r.jsxs = Ot;
671
- }();
672
- }(Ee)), Ee;
628
+ }
629
+ function Pt(e, o, s) {
630
+ return Ve(e, o, s, !0);
631
+ }
632
+ function kt(e, o, s) {
633
+ return Ve(e, o, s, !1);
634
+ }
635
+ var Ot = kt, jt = Pt;
636
+ oe.Fragment = i, oe.jsx = Ot, oe.jsxs = jt;
637
+ }()), oe;
673
638
  }
674
- process.env.NODE_ENV === "production" ? Re.exports = on() : Re.exports = an();
675
- var j = Re.exports;
676
- class sn extends Bt {
639
+ process.env.NODE_ENV === "production" ? Ee.exports = ln() : Ee.exports = un();
640
+ var N = Ee.exports;
641
+ class cn extends Gt {
677
642
  constructor(t, i) {
678
643
  super(t);
679
- U(this, "onMessage");
644
+ W(this, "onMessage");
680
645
  this.onMessage = i;
681
646
  }
682
647
  readMessage(t) {
@@ -692,10 +657,10 @@ class sn extends Bt {
692
657
  }
693
658
  }
694
659
  }
695
- class ln extends zt {
660
+ class fn extends Jt {
696
661
  constructor(t, i) {
697
662
  super(t);
698
- U(this, "onSend");
663
+ W(this, "onSend");
699
664
  this.onSend = i;
700
665
  }
701
666
  async write(t) {
@@ -707,7 +672,7 @@ class ln extends zt {
707
672
  }
708
673
  }
709
674
  }
710
- const un = {
675
+ const dn = {
711
676
  base: "vs-dark",
712
677
  inherit: !0,
713
678
  colors: {
@@ -723,61 +688,61 @@ const un = {
723
688
  function V(r) {
724
689
  return `file:///PACKAGE/Project/Sources/${r}`;
725
690
  }
726
- function it(r, n = 0) {
691
+ function rt(r, n = 0) {
727
692
  setTimeout(r, n);
728
693
  }
729
- function cn(r, n) {
730
- const t = new Vt(
694
+ function mn(r, n) {
695
+ const t = new Bt(
731
696
  n.startLineNumber,
732
697
  n.startColumn,
733
698
  n.endLineNumber || n.startLineNumber,
734
699
  n.endColumn || n.startColumn
735
700
  );
736
- it(() => {
701
+ rt(() => {
737
702
  r.setSelection(t), r.revealRangeInCenter(t), r.focus();
738
703
  });
739
704
  }
740
- function fn(r, n, t = 0) {
741
- t > 0 && (n = t + n), it(() => {
705
+ function gn(r, n, t = 0) {
706
+ t > 0 && (n = t + n), rt(() => {
742
707
  r.setPosition({ lineNumber: n, column: 1 }), r.revealLineInCenter(n), r.focus();
743
708
  });
744
709
  }
745
- function Vn(r, n, t) {
710
+ function Bn(r, n, t) {
746
711
  const l = r.getModel();
747
712
  if (l && n) {
748
- const u = l.getLineCount();
749
- for (let f = 1; f <= u; f++) {
750
- const s = l.getLineContent(f);
751
- if (new RegExp(`(?:Function|function) ${t}`).test(s))
752
- return f;
713
+ const p = l.getLineCount();
714
+ for (let m = 1; m <= p; m++) {
715
+ const v = l.getLineContent(m);
716
+ if (new RegExp(`(?:Function|function) ${t}`).test(v))
717
+ return m;
753
718
  }
754
719
  }
755
720
  return 0;
756
721
  }
757
- const dn = {
722
+ const pn = {
758
723
  getServiceOverride: ({ openHandler: r }) => ({
759
- get [qe.toString()]() {
760
- const n = xe.get(qe);
724
+ get [ze.toString()]() {
725
+ const n = Se.get(ze);
761
726
  return r && n.registerCodeEditorOpenHandler(r), n;
762
727
  }
763
728
  })
764
- }, mn = {
729
+ }, vn = {
765
730
  getServiceOverride: () => ({
766
731
  get [Be.toString()]() {
767
- return xe.get(
732
+ return Se.get(
768
733
  Be
769
734
  );
770
735
  }
771
736
  })
772
- }, gn = {
737
+ }, hn = {
773
738
  getServiceOverride: () => ({
774
- get [ze.toString()]() {
775
- const r = xe.get(ze);
739
+ get [Ze.toString()]() {
740
+ const r = Se.get(Ze);
776
741
  return r.createModelReference = (n) => Promise.resolve({ dispose: () => {
777
742
  } }), r;
778
743
  }
779
744
  })
780
- }, pn = {
745
+ }, bn = {
781
746
  comments: {
782
747
  lineComment: "//",
783
748
  blockComment: ["/**", "**/"]
@@ -823,15 +788,15 @@ const dn = {
823
788
  action: { indentAction: 1 }
824
789
  }
825
790
  ]
826
- }, vn = {
791
+ }, Cn = {
827
792
  provideCompletionItems: async (r, n) => {
828
793
  const t = r.getWordUntilPosition(n);
829
794
  return {
830
795
  suggestions: [
831
796
  {
832
797
  label: "var",
833
- kind: c.languages.CompletionItemKind.Snippet,
834
- range: new c.Range(
798
+ kind: a.languages.CompletionItemKind.Snippet,
799
+ range: new a.Range(
835
800
  n.lineNumber,
836
801
  t.startColumn,
837
802
  n.lineNumber,
@@ -839,12 +804,12 @@ const dn = {
839
804
  ),
840
805
  insertText: ["var ${1:var_name} : ${2:var_type}"].join(`
841
806
  `),
842
- insertTextRules: c.languages.CompletionItemInsertTextRule.InsertAsSnippet
807
+ insertTextRules: a.languages.CompletionItemInsertTextRule.InsertAsSnippet
843
808
  },
844
809
  {
845
810
  label: "While",
846
- kind: c.languages.CompletionItemKind.Snippet,
847
- range: new c.Range(
811
+ kind: a.languages.CompletionItemKind.Snippet,
812
+ range: new a.Range(
848
813
  n.lineNumber,
849
814
  t.startColumn,
850
815
  n.lineNumber,
@@ -856,12 +821,12 @@ const dn = {
856
821
  "End while"
857
822
  ].join(`
858
823
  `),
859
- insertTextRules: c.languages.CompletionItemInsertTextRule.InsertAsSnippet
824
+ insertTextRules: a.languages.CompletionItemInsertTextRule.InsertAsSnippet
860
825
  },
861
826
  {
862
827
  label: "Case of",
863
- kind: c.languages.CompletionItemKind.Snippet,
864
- range: new c.Range(
828
+ kind: a.languages.CompletionItemKind.Snippet,
829
+ range: new a.Range(
865
830
  n.lineNumber,
866
831
  t.startColumn,
867
832
  n.lineNumber,
@@ -874,12 +839,12 @@ const dn = {
874
839
  "End case"
875
840
  ].join(`
876
841
  `),
877
- insertTextRules: c.languages.CompletionItemInsertTextRule.InsertAsSnippet
842
+ insertTextRules: a.languages.CompletionItemInsertTextRule.InsertAsSnippet
878
843
  },
879
844
  {
880
845
  label: "Else",
881
- kind: c.languages.CompletionItemKind.Snippet,
882
- range: new c.Range(
846
+ kind: a.languages.CompletionItemKind.Snippet,
847
+ range: new a.Range(
883
848
  n.lineNumber,
884
849
  t.startColumn,
885
850
  n.lineNumber,
@@ -887,12 +852,12 @@ const dn = {
887
852
  ),
888
853
  insertText: ["Else", " "].join(`
889
854
  `),
890
- insertTextRules: c.languages.CompletionItemInsertTextRule.InsertAsSnippet
855
+ insertTextRules: a.languages.CompletionItemInsertTextRule.InsertAsSnippet
891
856
  },
892
857
  {
893
858
  label: "If",
894
- kind: c.languages.CompletionItemKind.Snippet,
895
- range: new c.Range(
859
+ kind: a.languages.CompletionItemKind.Snippet,
860
+ range: new a.Range(
896
861
  n.lineNumber,
897
862
  t.startColumn,
898
863
  n.lineNumber,
@@ -902,12 +867,12 @@ const dn = {
902
867
  `
903
868
  `
904
869
  ),
905
- insertTextRules: c.languages.CompletionItemInsertTextRule.InsertAsSnippet
870
+ insertTextRules: a.languages.CompletionItemInsertTextRule.InsertAsSnippet
906
871
  },
907
872
  {
908
873
  label: "For",
909
- kind: c.languages.CompletionItemKind.Snippet,
910
- range: new c.Range(
874
+ kind: a.languages.CompletionItemKind.Snippet,
875
+ range: new a.Range(
911
876
  n.lineNumber,
912
877
  t.startColumn,
913
878
  n.lineNumber,
@@ -919,12 +884,12 @@ const dn = {
919
884
  "End for"
920
885
  ].join(`
921
886
  `),
922
- insertTextRules: c.languages.CompletionItemInsertTextRule.InsertAsSnippet
887
+ insertTextRules: a.languages.CompletionItemInsertTextRule.InsertAsSnippet
923
888
  },
924
889
  {
925
890
  label: "Function",
926
- kind: c.languages.CompletionItemKind.Snippet,
927
- range: new c.Range(
891
+ kind: a.languages.CompletionItemKind.Snippet,
892
+ range: new a.Range(
928
893
  n.lineNumber,
929
894
  t.startColumn,
930
895
  n.lineNumber,
@@ -935,20 +900,20 @@ const dn = {
935
900
  " ${5:body}"
936
901
  ].join(`
937
902
  `),
938
- insertTextRules: c.languages.CompletionItemInsertTextRule.InsertAsSnippet
903
+ insertTextRules: a.languages.CompletionItemInsertTextRule.InsertAsSnippet
939
904
  }
940
905
  ]
941
906
  };
942
907
  }
943
- }, hn = {
908
+ }, Rn = {
944
909
  provideCompletionItems: async (r, n) => {
945
910
  const t = r.getWordUntilPosition(n);
946
911
  return {
947
912
  suggestions: [
948
913
  {
949
914
  label: "var",
950
- kind: c.languages.CompletionItemKind.Snippet,
951
- range: new c.Range(
915
+ kind: a.languages.CompletionItemKind.Snippet,
916
+ range: new a.Range(
952
917
  n.lineNumber,
953
918
  t.startColumn,
954
919
  n.lineNumber,
@@ -956,12 +921,12 @@ const dn = {
956
921
  ),
957
922
  insertText: ["var ${1:var_name} : ${2:var_type}"].join(`
958
923
  `),
959
- insertTextRules: c.languages.CompletionItemInsertTextRule.InsertAsSnippet
924
+ insertTextRules: a.languages.CompletionItemInsertTextRule.InsertAsSnippet
960
925
  },
961
926
  {
962
927
  label: "while",
963
- kind: c.languages.CompletionItemKind.Snippet,
964
- range: new c.Range(
928
+ kind: a.languages.CompletionItemKind.Snippet,
929
+ range: new a.Range(
965
930
  n.lineNumber,
966
931
  t.startColumn,
967
932
  n.lineNumber,
@@ -971,12 +936,12 @@ const dn = {
971
936
  `
972
937
  `
973
938
  ),
974
- insertTextRules: c.languages.CompletionItemInsertTextRule.InsertAsSnippet
939
+ insertTextRules: a.languages.CompletionItemInsertTextRule.InsertAsSnippet
975
940
  },
976
941
  {
977
942
  label: "switch",
978
- kind: c.languages.CompletionItemKind.Snippet,
979
- range: new c.Range(
943
+ kind: a.languages.CompletionItemKind.Snippet,
944
+ range: new a.Range(
980
945
  n.lineNumber,
981
946
  t.startColumn,
982
947
  n.lineNumber,
@@ -989,12 +954,12 @@ const dn = {
989
954
  "end"
990
955
  ].join(`
991
956
  `),
992
- insertTextRules: c.languages.CompletionItemInsertTextRule.InsertAsSnippet
957
+ insertTextRules: a.languages.CompletionItemInsertTextRule.InsertAsSnippet
993
958
  },
994
959
  {
995
960
  label: "else",
996
- kind: c.languages.CompletionItemKind.Snippet,
997
- range: new c.Range(
961
+ kind: a.languages.CompletionItemKind.Snippet,
962
+ range: new a.Range(
998
963
  n.lineNumber,
999
964
  t.startColumn,
1000
965
  n.lineNumber,
@@ -1002,12 +967,12 @@ const dn = {
1002
967
  ),
1003
968
  insertText: ["else", " "].join(`
1004
969
  `),
1005
- insertTextRules: c.languages.CompletionItemInsertTextRule.InsertAsSnippet
970
+ insertTextRules: a.languages.CompletionItemInsertTextRule.InsertAsSnippet
1006
971
  },
1007
972
  {
1008
973
  label: "if",
1009
- kind: c.languages.CompletionItemKind.Snippet,
1010
- range: new c.Range(
974
+ kind: a.languages.CompletionItemKind.Snippet,
975
+ range: new a.Range(
1011
976
  n.lineNumber,
1012
977
  t.startColumn,
1013
978
  n.lineNumber,
@@ -1017,12 +982,12 @@ const dn = {
1017
982
  `
1018
983
  `
1019
984
  ),
1020
- insertTextRules: c.languages.CompletionItemInsertTextRule.InsertAsSnippet
985
+ insertTextRules: a.languages.CompletionItemInsertTextRule.InsertAsSnippet
1021
986
  },
1022
987
  {
1023
988
  label: "for",
1024
- kind: c.languages.CompletionItemKind.Snippet,
1025
- range: new c.Range(
989
+ kind: a.languages.CompletionItemKind.Snippet,
990
+ range: new a.Range(
1026
991
  n.lineNumber,
1027
992
  t.startColumn,
1028
993
  n.lineNumber,
@@ -1034,12 +999,12 @@ const dn = {
1034
999
  "end"
1035
1000
  ].join(`
1036
1001
  `),
1037
- insertTextRules: c.languages.CompletionItemInsertTextRule.InsertAsSnippet
1002
+ insertTextRules: a.languages.CompletionItemInsertTextRule.InsertAsSnippet
1038
1003
  },
1039
1004
  {
1040
1005
  label: "function",
1041
- kind: c.languages.CompletionItemKind.Snippet,
1042
- range: new c.Range(
1006
+ kind: a.languages.CompletionItemKind.Snippet,
1007
+ range: new a.Range(
1043
1008
  n.lineNumber,
1044
1009
  t.startColumn,
1045
1010
  n.lineNumber,
@@ -1050,12 +1015,12 @@ const dn = {
1050
1015
  " ${5:body}"
1051
1016
  ].join(`
1052
1017
  `),
1053
- insertTextRules: c.languages.CompletionItemInsertTextRule.InsertAsSnippet
1018
+ insertTextRules: a.languages.CompletionItemInsertTextRule.InsertAsSnippet
1054
1019
  }
1055
1020
  ]
1056
1021
  };
1057
1022
  }
1058
- }, bn = [
1023
+ }, En = [
1059
1024
  // zoom in
1060
1025
  {
1061
1026
  keybinding: Q.CtrlCmd | ee.NumpadAdd,
@@ -1083,219 +1048,219 @@ const dn = {
1083
1048
  keybinding: Q.CtrlCmd | ee.Digit0,
1084
1049
  command: "editor.action.fontZoomReset"
1085
1050
  }
1086
- ], Cn = ({ defaultZoom: r }) => (J(() => {
1051
+ ], Sn = ({ defaultZoom: r }) => (J(() => {
1087
1052
  r !== void 0 && nt.EditorZoom.setZoomLevel(r);
1088
1053
  }, []), null);
1089
- ({}).VITE_DISABLE_MONACO_LOADER || At.config({
1090
- monaco: c
1054
+ ({}).VITE_DISABLE_MONACO_LOADER || Ft.config({
1055
+ monaco: a
1091
1056
  // paths: {
1092
1057
  // vs: "https://cdn.jsdelivr.net/npm/monaco-editor@0.41.0/min/vs",
1093
1058
  // },
1094
1059
  });
1095
- const ot = Qe(void 0), qn = ({ children: r, url: n, qodly: t, defaultZoom: i, openHandler: l, language: u = "4d", defaultInited: f = !1 }) => {
1096
- const s = Lt(), [d, h] = oe(f), [b, S] = oe(null), v = Ve(), O = Ve(0);
1060
+ const ot = Qe(void 0), Zn = ({ children: r, url: n, qodly: t, defaultZoom: i, openHandler: l, language: p = "4d", defaultInited: m = !1 }) => {
1061
+ const v = $t(), [g, T] = se(m), [_, w] = se(null), x = qe(), P = qe(0);
1097
1062
  J(() => {
1098
- Wt({
1063
+ Vt({
1099
1064
  configureEditorOrViewsService: {
1100
1065
  enableViewsService: !1
1101
1066
  },
1102
1067
  debugLogging: !1,
1103
1068
  userServices: {
1104
1069
  // @see https://github.com/CodinGame/monaco-vscode-api#monaco-standalone-services
1105
- ...dn.getServiceOverride({ openHandler: l }),
1106
- ...mn.getServiceOverride(),
1107
- ...gn.getServiceOverride()
1070
+ ...pn.getServiceOverride({ openHandler: l }),
1071
+ ...vn.getServiceOverride(),
1072
+ ...hn.getServiceOverride()
1108
1073
  }
1109
1074
  });
1110
1075
  }, []), J(() => {
1111
- n && s && k();
1112
- }, [n, s]);
1113
- const k = async () => {
1114
- if (!s)
1076
+ n && v && j();
1077
+ }, [n, v]);
1078
+ const j = async () => {
1079
+ if (!v)
1115
1080
  return;
1116
- const x = await $t();
1117
- s.editor.defineTheme("fd-dark", x || un), s.languages.register({
1118
- id: u,
1081
+ const E = await Wt();
1082
+ v.editor.defineTheme("fd-dark", E || dn), v.languages.register({
1083
+ id: p,
1119
1084
  extensions: [".4dm", ".4qm", ".4qs"],
1120
1085
  aliases: ["4d", "4D"]
1121
- }), s.languages.setLanguageConfiguration(u, pn), s.languages.registerCompletionItemProvider(
1122
- u,
1123
- t ? hn : vn
1124
- ), nt.addKeybindingRules(bn), P();
1125
- }, P = () => {
1126
- S(null);
1127
- let x;
1086
+ }), v.languages.setLanguageConfiguration(p, bn), v.languages.registerCompletionItemProvider(
1087
+ p,
1088
+ t ? Rn : Cn
1089
+ ), nt.addKeybindingRules(En), k();
1090
+ }, k = () => {
1091
+ w(null);
1092
+ let E;
1128
1093
  try {
1129
- x = new WebSocket(localStorage.LSP_SERVER || n);
1094
+ E = new WebSocket(localStorage.LSP_SERVER || n);
1130
1095
  } catch {
1131
- S(new Event("INVALID_URL"));
1096
+ w(new Event("INVALID_URL"));
1132
1097
  return;
1133
1098
  }
1134
- x.onopen = $, x.onclose = _, x.onerror = R, O.current = 0;
1135
- }, $ = async function() {
1136
- const x = Gt(this), I = new sn(x), w = new ln(x), W = new Kt({
1099
+ E.onopen = A, E.onclose = R, E.onerror = c, P.current = 0;
1100
+ }, A = async function() {
1101
+ const E = Ht(this), y = new cn(E), b = new fn(E), K = new Yt({
1137
1102
  name: "4D Language Client",
1138
1103
  clientOptions: {
1139
1104
  workspaceFolder: {
1140
- uri: qt.parse("file:///PACKAGE")
1105
+ uri: Zt.parse("file:///PACKAGE")
1141
1106
  },
1142
1107
  // use a language id as a document selector
1143
- documentSelector: [{ scheme: "file", language: u }],
1108
+ documentSelector: [{ scheme: "file", language: p }],
1144
1109
  // disable the default error handler
1145
1110
  errorHandler: {
1146
- error: () => ({ action: Yt.Continue }),
1147
- closed: () => ({ action: Ut.DoNotRestart })
1111
+ error: () => ({ action: qt.Continue }),
1112
+ closed: () => ({ action: zt.DoNotRestart })
1148
1113
  }
1149
1114
  },
1150
1115
  // create a language client connection from the JSON RPC connection on demand
1151
1116
  connectionProvider: {
1152
1117
  get: () => Promise.resolve({
1153
- reader: I,
1154
- writer: w
1118
+ reader: y,
1119
+ writer: b
1155
1120
  })
1156
1121
  }
1157
1122
  });
1158
- v.current = W, I.onClose(() => {
1159
- W.stop(), O.current < 3 ? setTimeout(() => {
1160
- O.current++, P();
1161
- }, 1e3) : S(new Event("WEBSOCKET_CLOSED"));
1162
- }), W.needsStart() && await W.start(), h(!0);
1163
- }, _ = () => {
1164
- }, R = (x) => {
1165
- S(x);
1123
+ x.current = K, y.onClose(() => {
1124
+ K.stop(), P.current < 3 ? setTimeout(() => {
1125
+ P.current++, k();
1126
+ }, 1e3) : w(new Event("WEBSOCKET_CLOSED"));
1127
+ }), K.needsStart() && await K.start(), T(!0);
1128
+ }, R = () => {
1129
+ }, c = (E) => {
1130
+ w(E);
1166
1131
  };
1167
1132
  J(() => {
1168
- const x = Ft.subscribe(({ action: I, payload: w }) => {
1169
- switch (I) {
1170
- case G.WILL_SAVE:
1171
- y(w.filePath);
1133
+ const E = Kt.subscribe(({ action: y, payload: b }) => {
1134
+ switch (y) {
1135
+ case Z.WILL_SAVE:
1136
+ Y(b.filePath);
1172
1137
  break;
1173
- case G.DID_SAVE:
1174
- g(w.filePath, w.content);
1138
+ case Z.DID_SAVE:
1139
+ f(b.filePath, b.content);
1175
1140
  break;
1176
- case G.WILL_CREATE:
1177
- p(w.filePath);
1141
+ case Z.WILL_CREATE:
1142
+ d(b.filePath);
1178
1143
  break;
1179
- case G.DID_CREATE:
1180
- A(w.filePath);
1144
+ case Z.DID_CREATE:
1145
+ B(b.filePath);
1181
1146
  break;
1182
- case G.WILL_RENAME:
1183
- M(w.oldPath, w.newPath);
1147
+ case Z.WILL_RENAME:
1148
+ D(b.oldPath, b.newPath);
1184
1149
  break;
1185
- case G.DID_RENAME:
1186
- Y(w.oldPath, w.newPath);
1150
+ case Z.DID_RENAME:
1151
+ F(b.oldPath, b.newPath);
1187
1152
  break;
1188
- case G.WILL_DELETE:
1189
- F(w.filePath);
1153
+ case Z.WILL_DELETE:
1154
+ M(b.filePath);
1190
1155
  break;
1191
- case G.DID_DELETE:
1192
- ce(w.filePath);
1156
+ case Z.DID_DELETE:
1157
+ de(b.filePath);
1193
1158
  break;
1194
1159
  }
1195
1160
  });
1196
- return () => x.unsubscribe();
1161
+ return () => E.unsubscribe();
1197
1162
  }, []);
1198
- const y = (x, I = Jt.Manual) => {
1199
- var w;
1200
- (w = v.current) == null || w.sendNotification(Zt.type, {
1163
+ const Y = (E, y = Qt.Manual) => {
1164
+ var b;
1165
+ (b = x.current) == null || b.sendNotification(Xt.type, {
1201
1166
  textDocument: {
1202
- uri: V(x)
1167
+ uri: V(E)
1203
1168
  },
1204
- reason: I
1169
+ reason: y
1205
1170
  });
1206
- }, g = (x, I) => {
1207
- var w;
1208
- (w = v.current) == null || w.sendNotification(Ht.type, {
1171
+ }, f = (E, y) => {
1172
+ var b;
1173
+ (b = x.current) == null || b.sendNotification(en.type, {
1209
1174
  textDocument: {
1210
- uri: V(x)
1175
+ uri: V(E)
1211
1176
  },
1212
- text: I
1177
+ text: y
1213
1178
  });
1214
- }, p = (x) => {
1215
- var I;
1216
- (I = v.current) == null || I.sendRequest(Xt.type, {
1179
+ }, d = (E) => {
1180
+ var y;
1181
+ (y = x.current) == null || y.sendRequest(tn.type, {
1217
1182
  files: [
1218
1183
  {
1219
- uri: V(x)
1184
+ uri: V(E)
1220
1185
  }
1221
1186
  ]
1222
1187
  });
1223
- }, M = (x, I) => {
1224
- var w;
1225
- (w = v.current) == null || w.sendRequest(Qt.type, {
1188
+ }, D = (E, y) => {
1189
+ var b;
1190
+ (b = x.current) == null || b.sendRequest(nn.type, {
1226
1191
  files: [
1227
1192
  {
1228
- oldUri: V(x),
1229
- newUri: V(I)
1193
+ oldUri: V(E),
1194
+ newUri: V(y)
1230
1195
  }
1231
1196
  ]
1232
1197
  });
1233
- }, F = (x) => {
1234
- var I;
1235
- (I = v.current) == null || I.sendRequest(en.type, {
1198
+ }, M = (E) => {
1199
+ var y;
1200
+ (y = x.current) == null || y.sendRequest(rn.type, {
1236
1201
  files: [
1237
1202
  {
1238
- uri: V(x)
1203
+ uri: V(E)
1239
1204
  }
1240
1205
  ]
1241
1206
  });
1242
- }, A = (x) => {
1243
- var I;
1244
- (I = v.current) == null || I.sendNotification(tn.type, {
1207
+ }, B = (E) => {
1208
+ var y;
1209
+ (y = x.current) == null || y.sendNotification(on.type, {
1245
1210
  files: [
1246
1211
  {
1247
- uri: V(x)
1212
+ uri: V(E)
1248
1213
  }
1249
1214
  ]
1250
1215
  });
1251
- }, Y = (x, I) => {
1252
- var w;
1253
- (w = v.current) == null || w.sendNotification(nn.type, {
1216
+ }, F = (E, y) => {
1217
+ var b;
1218
+ (b = x.current) == null || b.sendNotification(sn.type, {
1254
1219
  files: [
1255
1220
  {
1256
- oldUri: V(x),
1257
- newUri: V(I)
1221
+ oldUri: V(E),
1222
+ newUri: V(y)
1258
1223
  }
1259
1224
  ]
1260
1225
  });
1261
- }, ce = (x) => {
1262
- var I;
1263
- (I = v.current) == null || I.sendNotification(rn.type, {
1226
+ }, de = (E) => {
1227
+ var y;
1228
+ (y = x.current) == null || y.sendNotification(an.type, {
1264
1229
  files: [
1265
1230
  {
1266
- uri: V(x)
1231
+ uri: V(E)
1267
1232
  }
1268
1233
  ]
1269
1234
  });
1270
1235
  };
1271
- return /* @__PURE__ */ j.jsxs(
1236
+ return /* @__PURE__ */ N.jsxs(
1272
1237
  ot.Provider,
1273
1238
  {
1274
1239
  value: {
1275
- inited: d || !!b,
1276
- clientRef: v,
1277
- lastError: b,
1278
- reload: P
1240
+ inited: g || !!_,
1241
+ clientRef: x,
1242
+ lastError: _,
1243
+ reload: k
1279
1244
  },
1280
1245
  children: [
1281
1246
  r,
1282
- /* @__PURE__ */ j.jsx(Cn, { defaultZoom: i })
1247
+ /* @__PURE__ */ N.jsx(Sn, { defaultZoom: i })
1283
1248
  ]
1284
1249
  }
1285
1250
  );
1286
1251
  };
1287
- function Bn() {
1252
+ function Gn() {
1288
1253
  const r = et(ot);
1289
1254
  if (r === void 0)
1290
1255
  throw new Error("useLSP must be used within an LSPContext");
1291
1256
  return r;
1292
1257
  }
1293
- const at = Qe(
1258
+ const it = Qe(
1294
1259
  void 0
1295
- ), zn = kt(({ children: r }) => {
1296
- const [n, t] = oe(null);
1297
- return /* @__PURE__ */ j.jsx(
1298
- at.Provider,
1260
+ ), Jn = Dt(({ children: r }) => {
1261
+ const [n, t] = se(null);
1262
+ return /* @__PURE__ */ N.jsx(
1263
+ it.Provider,
1299
1264
  {
1300
1265
  value: {
1301
1266
  editor: n,
@@ -1305,8 +1270,8 @@ const at = Qe(
1305
1270
  }
1306
1271
  );
1307
1272
  });
1308
- function En() {
1309
- const r = et(at), n = oe(null);
1273
+ function xn() {
1274
+ const r = et(it), n = se(null);
1310
1275
  if (r === void 0) {
1311
1276
  const [t, i] = n;
1312
1277
  return {
@@ -1322,16 +1287,16 @@ var st = {
1322
1287
  className: void 0,
1323
1288
  style: void 0,
1324
1289
  attr: void 0
1325
- }, He = z.createContext && z.createContext(st), Z = globalThis && globalThis.__assign || function() {
1326
- return Z = Object.assign || function(r) {
1290
+ }, He = z.createContext && z.createContext(st), G = globalThis && globalThis.__assign || function() {
1291
+ return G = Object.assign || function(r) {
1327
1292
  for (var n, t = 1, i = arguments.length; t < i; t++) {
1328
1293
  n = arguments[t];
1329
1294
  for (var l in n)
1330
1295
  Object.prototype.hasOwnProperty.call(n, l) && (r[l] = n[l]);
1331
1296
  }
1332
1297
  return r;
1333
- }, Z.apply(this, arguments);
1334
- }, Rn = globalThis && globalThis.__rest || function(r, n) {
1298
+ }, G.apply(this, arguments);
1299
+ }, yn = globalThis && globalThis.__rest || function(r, n) {
1335
1300
  var t = {};
1336
1301
  for (var i in r)
1337
1302
  Object.prototype.hasOwnProperty.call(r, i) && n.indexOf(i) < 0 && (t[i] = r[i]);
@@ -1340,62 +1305,62 @@ var st = {
1340
1305
  n.indexOf(i[l]) < 0 && Object.prototype.propertyIsEnumerable.call(r, i[l]) && (t[i[l]] = r[i[l]]);
1341
1306
  return t;
1342
1307
  };
1343
- function lt(r) {
1308
+ function at(r) {
1344
1309
  return r && r.map(function(n, t) {
1345
- return z.createElement(n.tag, Z({
1310
+ return z.createElement(n.tag, G({
1346
1311
  key: t
1347
- }, n.attr), lt(n.child));
1312
+ }, n.attr), at(n.child));
1348
1313
  });
1349
1314
  }
1350
- function ut(r) {
1315
+ function lt(r) {
1351
1316
  return function(n) {
1352
- return z.createElement(xn, Z({
1353
- attr: Z({}, r.attr)
1354
- }, n), lt(r.child));
1317
+ return z.createElement(In, G({
1318
+ attr: G({}, r.attr)
1319
+ }, n), at(r.child));
1355
1320
  };
1356
1321
  }
1357
- function xn(r) {
1322
+ function In(r) {
1358
1323
  var n = function(t) {
1359
- var i = r.attr, l = r.size, u = r.title, f = Rn(r, ["attr", "size", "title"]), s = l || t.size || "1em", d;
1360
- return t.className && (d = t.className), r.className && (d = (d ? d + " " : "") + r.className), z.createElement("svg", Z({
1324
+ var i = r.attr, l = r.size, p = r.title, m = yn(r, ["attr", "size", "title"]), v = l || t.size || "1em", g;
1325
+ return t.className && (g = t.className), r.className && (g = (g ? g + " " : "") + r.className), z.createElement("svg", G({
1361
1326
  stroke: "currentColor",
1362
1327
  fill: "currentColor",
1363
1328
  strokeWidth: "0"
1364
- }, t.attr, i, f, {
1365
- className: d,
1366
- style: Z(Z({
1329
+ }, t.attr, i, m, {
1330
+ className: g,
1331
+ style: G(G({
1367
1332
  color: r.color || t.color
1368
1333
  }, t.style), r.style),
1369
- height: s,
1370
- width: s,
1334
+ height: v,
1335
+ width: v,
1371
1336
  xmlns: "http://www.w3.org/2000/svg"
1372
- }), u && z.createElement("title", null, u), r.children);
1337
+ }), p && z.createElement("title", null, p), r.children);
1373
1338
  };
1374
1339
  return He !== void 0 ? z.createElement(He.Consumer, null, function(t) {
1375
1340
  return n(t);
1376
1341
  }) : n(st);
1377
1342
  }
1378
- function Sn(r) {
1379
- return ut({ tag: "svg", attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { d: "M12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22ZM12 10.5858L9.17157 7.75736L7.75736 9.17157L10.5858 12L7.75736 14.8284L9.17157 16.2426L12 13.4142L14.8284 16.2426L16.2426 14.8284L13.4142 12L16.2426 9.17157L14.8284 7.75736L12 10.5858Z" } }] })(r);
1343
+ function wn(r) {
1344
+ return lt({ tag: "svg", attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { d: "M12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22ZM12 10.5858L9.17157 7.75736L7.75736 9.17157L10.5858 12L7.75736 14.8284L9.17157 16.2426L12 13.4142L14.8284 16.2426L16.2426 14.8284L13.4142 12L16.2426 9.17157L14.8284 7.75736L12 10.5858Z" } }] })(r);
1380
1345
  }
1381
- function yn(r) {
1382
- return ut({ tag: "svg", attr: { viewBox: "0 0 512 512" }, child: [{ tag: "path", attr: { d: "M449.07 399.08L278.64 82.58c-12.08-22.44-44.26-22.44-56.35 0L51.87 399.08A32 32 0 0080 446.25h340.89a32 32 0 0028.18-47.17zm-198.6-1.83a20 20 0 1120-20 20 20 0 01-20 20zm21.72-201.15l-5.74 122a16 16 0 01-32 0l-5.74-121.95a21.73 21.73 0 0121.5-22.69h.21a21.74 21.74 0 0121.73 22.7z" } }] })(r);
1346
+ function Tn(r) {
1347
+ return lt({ tag: "svg", attr: { viewBox: "0 0 512 512" }, child: [{ tag: "path", attr: { d: "M449.07 399.08L278.64 82.58c-12.08-22.44-44.26-22.44-56.35 0L51.87 399.08A32 32 0 0080 446.25h340.89a32 32 0 0028.18-47.17zm-198.6-1.83a20 20 0 1120-20 20 20 0 01-20 20zm21.72-201.15l-5.74 122a16 16 0 01-32 0l-5.74-121.95a21.73 21.73 0 0121.5-22.69h.21a21.74 21.74 0 0121.73 22.7z" } }] })(r);
1383
1348
  }
1384
- const wn = ({ lspProps: { lastError: r, reload: n } }) => {
1385
- const [t, i] = oe(!1), l = () => {
1349
+ const _n = ({ lspProps: { lastError: r, reload: n } }) => {
1350
+ const [t, i] = se(!1), l = () => {
1386
1351
  n();
1387
- }, u = () => {
1352
+ }, p = () => {
1388
1353
  i(!1);
1389
1354
  };
1390
1355
  return J(() => {
1391
1356
  i(!!r);
1392
- }, [r]), t ? /* @__PURE__ */ j.jsxs("div", { className: "flex items-center border-b border-fd-gray-darker bg-grey-800 px-2 py-1.5 text-xs text-grey-50", children: [
1393
- /* @__PURE__ */ j.jsxs("span", { className: "flex flex-1 justify-center gap-1", children: [
1394
- /* @__PURE__ */ j.jsx(yn, { className: "h-4 w-4 text-yellow-600" }),
1395
- /* @__PURE__ */ j.jsxs("span", { children: [
1357
+ }, [r]), t ? /* @__PURE__ */ N.jsxs("div", { className: "flex items-center border-b border-fd-gray-darker bg-grey-800 px-2 py-1.5 text-xs text-grey-50", children: [
1358
+ /* @__PURE__ */ N.jsxs("span", { className: "flex flex-1 justify-center gap-1", children: [
1359
+ /* @__PURE__ */ N.jsx(Tn, { className: "h-4 w-4 text-yellow-600" }),
1360
+ /* @__PURE__ */ N.jsxs("span", { children: [
1396
1361
  "LSP not loaded.",
1397
1362
  " ",
1398
- /* @__PURE__ */ j.jsx(
1363
+ /* @__PURE__ */ N.jsx(
1399
1364
  "button",
1400
1365
  {
1401
1366
  className: "text-primary-dark underline",
@@ -1405,24 +1370,24 @@ const wn = ({ lspProps: { lastError: r, reload: n } }) => {
1405
1370
  )
1406
1371
  ] })
1407
1372
  ] }),
1408
- /* @__PURE__ */ j.jsx("button", { className: "focus:outline-none", children: /* @__PURE__ */ j.jsx(
1409
- Sn,
1373
+ /* @__PURE__ */ N.jsx("button", { className: "focus:outline-none", children: /* @__PURE__ */ N.jsx(
1374
+ wn,
1410
1375
  {
1411
1376
  className: "h-4 w-4 text-white",
1412
- onClick: u
1377
+ onClick: p
1413
1378
  }
1414
1379
  ) })
1415
1380
  ] }) : null;
1416
- }, _n = {
1381
+ }, Nn = {
1417
1382
  provideCompletionItems: (r, n) => {
1418
1383
  const t = r.getWordUntilPosition(n);
1419
1384
  return {
1420
1385
  suggestions: [
1421
1386
  {
1422
1387
  label: "device:xs",
1423
- kind: c.languages.CompletionItemKind.Snippet,
1388
+ kind: a.languages.CompletionItemKind.Snippet,
1424
1389
  documentation: "Media query for phone device",
1425
- range: new c.Range(
1390
+ range: new a.Range(
1426
1391
  n.lineNumber,
1427
1392
  t.startColumn,
1428
1393
  n.lineNumber,
@@ -1436,116 +1401,116 @@ const wn = ({ lspProps: { lastError: r, reload: n } }) => {
1436
1401
  "}"
1437
1402
  ].join(`
1438
1403
  `),
1439
- insertTextRules: c.languages.CompletionItemInsertTextRule.InsertAsSnippet
1404
+ insertTextRules: a.languages.CompletionItemInsertTextRule.InsertAsSnippet
1440
1405
  }
1441
1406
  ]
1442
1407
  };
1443
1408
  }
1444
1409
  };
1445
- function In(r, n) {
1410
+ function Pn(r, n) {
1446
1411
  const t = document.createElement("style");
1447
1412
  t.dataset.id = n, t.textContent = r, document.head.append(t);
1448
1413
  }
1449
- function Tn(r) {
1414
+ function kn(r) {
1450
1415
  return Array.from(document.styleSheets).find(
1451
1416
  (n) => n.ownerNode.getAttribute("data-id") === r
1452
1417
  );
1453
1418
  }
1454
- function Nn(r, n) {
1419
+ function On(r, n) {
1455
1420
  const t = [];
1456
1421
  let i = [];
1457
- const l = [], u = (g, p, M, F) => {
1422
+ const l = [], p = (f, d, D, M) => {
1458
1423
  t.push({
1459
- startLineNumber: g,
1460
- endLineNumber: M,
1461
- startColumn: p,
1462
- endColumn: F
1463
- }), h(), d();
1464
- }, f = (g) => {
1465
- l.indexOf(g) < 0 && l.push(g);
1466
- }, s = (g) => {
1467
- const p = l.indexOf(g);
1468
- p < 0 || l.splice(p, 1);
1469
- }, d = () => {
1470
- for (const g of l)
1424
+ startLineNumber: f,
1425
+ endLineNumber: D,
1426
+ startColumn: d,
1427
+ endColumn: M
1428
+ }), T(), g();
1429
+ }, m = (f) => {
1430
+ l.indexOf(f) < 0 && l.push(f);
1431
+ }, v = (f) => {
1432
+ const d = l.indexOf(f);
1433
+ d < 0 || l.splice(d, 1);
1434
+ }, g = () => {
1435
+ for (const f of l)
1471
1436
  try {
1472
- g(i);
1473
- } catch (p) {
1474
- console.error(p);
1437
+ f(i);
1438
+ } catch (d) {
1439
+ console.error(d);
1475
1440
  }
1476
- }, h = () => {
1477
- const g = r.getModel();
1478
- g && (i = Pn(
1479
- t.map((p) => [
1480
- g.getOffsetAt({
1481
- lineNumber: p.startLineNumber,
1482
- column: p.startColumn
1441
+ }, T = () => {
1442
+ const f = r.getModel();
1443
+ f && (i = Ln(
1444
+ t.map((d) => [
1445
+ f.getOffsetAt({
1446
+ lineNumber: d.startLineNumber,
1447
+ column: d.startColumn
1483
1448
  }),
1484
- g.getOffsetAt({
1485
- lineNumber: p.endLineNumber,
1486
- column: p.endColumn
1449
+ f.getOffsetAt({
1450
+ lineNumber: d.endLineNumber,
1451
+ column: d.endColumn
1487
1452
  })
1488
1453
  ]),
1489
1454
  /*mergeJoins*/
1490
1455
  !0
1491
- ), i.length > 0 && (i[0][0] <= 0 && (i[0][0] = Number.NEGATIVE_INFINITY), i[i.length - 1][1] >= g.getValueLength() && (i[i.length - 1][1] = Number.POSITIVE_INFINITY)));
1492
- }, b = (g) => {
1493
- const p = {
1456
+ ), i.length > 0 && (i[0][0] <= 0 && (i[0][0] = Number.NEGATIVE_INFINITY), i[i.length - 1][1] >= f.getValueLength() && (i[i.length - 1][1] = Number.POSITIVE_INFINITY)));
1457
+ }, _ = (f) => {
1458
+ const d = {
1494
1459
  isDeletion: !1,
1495
1460
  isAddition: !1,
1496
1461
  isReplacement: !1
1497
1462
  };
1498
- return g.text === "" ? p.isDeletion = !0 : g.range.startLineNumber === g.range.endLineNumber && g.range.startColumn === g.range.endColumn ? p.isAddition = !0 : p.isReplacement = !0, p;
1499
- }, S = r.onDidChangeModel((g) => {
1500
- h(), R();
1501
- }), v = r.onDidChangeModelContent((g) => {
1502
- if (!g.isUndoing)
1503
- for (const p of g.changes) {
1504
- const M = b(p);
1505
- if (M.isReplacement || M.isDeletion || M.isAddition) {
1506
- const F = t.some(
1507
- (Y) => p.range.startLineNumber >= Y.startLineNumber && p.range.endLineNumber <= Y.endLineNumber && p.range.startColumn >= Y.startColumn && p.range.endColumn <= Y.endColumn
1508
- ), A = !F && n && p.range.startLineNumber === 1 && p.range.startColumn === 1 && !tt(p.text);
1509
- if (F || A) {
1510
- const Y = r.getModel();
1511
- if (Y) {
1512
- Y.undo();
1463
+ return f.text === "" ? d.isDeletion = !0 : f.range.startLineNumber === f.range.endLineNumber && f.range.startColumn === f.range.endColumn ? d.isAddition = !0 : d.isReplacement = !0, d;
1464
+ }, w = r.onDidChangeModel((f) => {
1465
+ T(), c();
1466
+ }), x = r.onDidChangeModelContent((f) => {
1467
+ if (!f.isUndoing)
1468
+ for (const d of f.changes) {
1469
+ const D = _(d);
1470
+ if (D.isReplacement || D.isDeletion || D.isAddition) {
1471
+ const M = t.some(
1472
+ (F) => d.range.startLineNumber >= F.startLineNumber && d.range.endLineNumber <= F.endLineNumber && d.range.startColumn >= F.startColumn && d.range.endColumn <= F.endColumn
1473
+ ), B = !M && n && d.range.startLineNumber === 1 && d.range.startColumn === 1 && !tt(d.text);
1474
+ if (M || B) {
1475
+ const F = r.getModel();
1476
+ if (F) {
1477
+ F.undo();
1513
1478
  return;
1514
1479
  }
1515
1480
  }
1516
1481
  }
1517
1482
  }
1518
- }), O = () => {
1519
- S.dispose(), v.dispose();
1483
+ }), P = () => {
1484
+ w.dispose(), x.dispose();
1520
1485
  };
1521
- let k = [], P = `
1486
+ let j = [], k = `
1522
1487
  .idoc-readonly-mark {
1523
1488
  cursor: not-allowed;
1524
1489
  z-index: 1;
1525
1490
  }
1526
1491
  `;
1527
- if (P) {
1528
- const g = "monaco-read-only";
1529
- Tn(g) || In(P, g), P = null;
1492
+ if (k) {
1493
+ const f = "monaco-read-only";
1494
+ kn(f) || Pn(k, f), k = null;
1530
1495
  }
1531
- const $ = () => {
1532
- f(R), R();
1533
- }, _ = () => {
1534
- s(R), k = r.deltaDecorations(k, []);
1496
+ const A = () => {
1497
+ m(c), c();
1535
1498
  }, R = () => {
1536
- const g = r.getModel();
1537
- g && (k = r.deltaDecorations(
1538
- k,
1539
- i.map(y(g))
1499
+ v(c), j = r.deltaDecorations(j, []);
1500
+ }, c = () => {
1501
+ const f = r.getModel();
1502
+ f && (j = r.deltaDecorations(
1503
+ j,
1504
+ i.map(Y(f))
1540
1505
  ));
1541
- }, y = (g) => (p) => {
1542
- const M = g.getPositionAt(p[0]), F = g.getPositionAt(p[1]);
1506
+ }, Y = (f) => (d) => {
1507
+ const D = f.getPositionAt(d[0]), M = f.getPositionAt(d[1]);
1543
1508
  return {
1544
- range: new c.Range(
1509
+ range: new a.Range(
1510
+ D.lineNumber,
1511
+ D.column,
1545
1512
  M.lineNumber,
1546
- M.column,
1547
- F.lineNumber,
1548
- F.column
1513
+ M.column
1549
1514
  ),
1550
1515
  options: {
1551
1516
  className: "idoc-readonly-mark"
@@ -1556,70 +1521,70 @@ function Nn(r, n) {
1556
1521
  get buffer() {
1557
1522
  return i;
1558
1523
  },
1559
- exclude: u,
1560
- attach: f,
1561
- detach: s,
1562
- dispose: O,
1563
- show: $,
1564
- hide: _
1524
+ exclude: p,
1525
+ attach: m,
1526
+ detach: v,
1527
+ dispose: P,
1528
+ show: A,
1529
+ hide: R
1565
1530
  };
1566
1531
  }
1567
- function On(r, n, t) {
1532
+ function jn(r, n, t) {
1568
1533
  let i = !1;
1569
- const l = (_) => _[1] < _[0] ? (i = !0, [[_[1], _[0]]]) : [[..._]], u = (_) => i ? _.map((R) => R[1] > R[0] ? s(R) : R).reverse() : _;
1570
- let f;
1571
- const s = (_) => (f = _[1], _[1] = _[0], _[0] = f, _), d = l(r);
1572
- let h, b, S, v, O, k, P, $;
1573
- S = d[0];
1574
- for (b of n)
1575
- for (P = b[0], $ = b[1], v = 0; v < d.length; v++) {
1576
- if (S = d[v], O = S[0], k = S[1], O < P)
1577
- k < P ? h = [S] : k <= $ ? h = [[O, P - 1]] : h = [
1578
- [O, P - 1],
1579
- [$ + 1, k]
1534
+ const l = (R) => R[1] < R[0] ? (i = !0, [[R[1], R[0]]]) : [[...R]], p = (R) => i ? R.map((c) => c[1] > c[0] ? v(c) : c).reverse() : R;
1535
+ let m;
1536
+ const v = (R) => (m = R[1], R[1] = R[0], R[0] = m, R), g = l(r);
1537
+ let T, _, w, x, P, j, k, A;
1538
+ w = g[0];
1539
+ for (_ of n)
1540
+ for (k = _[0], A = _[1], x = 0; x < g.length; x++) {
1541
+ if (w = g[x], P = w[0], j = w[1], P < k)
1542
+ j < k ? T = [w] : j <= A ? T = [[P, k - 1]] : T = [
1543
+ [P, k - 1],
1544
+ [A + 1, j]
1580
1545
  ];
1581
- else if (O <= $)
1582
- if (P === Number.NEGATIVE_INFINITY) {
1583
- const _ = $ + 1;
1584
- h = t === 0 ? [] : [[_, k > _ ? k : _]];
1546
+ else if (P <= A)
1547
+ if (k === Number.NEGATIVE_INFINITY) {
1548
+ const R = A + 1;
1549
+ T = t === 0 ? [] : [[R, j > R ? j : R]];
1585
1550
  } else
1586
- $ === Number.POSITIVE_INFINITY ? h = t === 0 ? [] : [[P - 1, P - 1]] : k <= $ ? h = t < 0 ? [[P - 1, P - 1]] : t > 0 ? [[$ + 1, $ + 1]] : [] : h = [[$ + 1, k]];
1551
+ A === Number.POSITIVE_INFINITY ? T = t === 0 ? [] : [[k - 1, k - 1]] : j <= A ? T = t < 0 ? [[k - 1, k - 1]] : t > 0 ? [[A + 1, A + 1]] : [] : T = [[A + 1, j]];
1587
1552
  else
1588
- h = [S];
1589
- if (d.splice(v, 1, ...h), d.length === 1 && d[0][1] < P)
1590
- return u(d);
1553
+ T = [w];
1554
+ if (g.splice(x, 1, ...T), g.length === 1 && g[0][1] < k)
1555
+ return p(g);
1591
1556
  }
1592
- return u(d);
1557
+ return p(g);
1593
1558
  }
1594
- function Pn(r, n) {
1559
+ function Ln(r, n) {
1595
1560
  if (r.length < 2)
1596
1561
  return r;
1597
1562
  const t = [];
1598
- let i = null, l, u;
1563
+ let i = null, l, p;
1599
1564
  r = r.map(
1600
- (f) => (f[1] < f[0] && (l = f[1], f[1] = f[0], f[1] = l), f)
1601
- ).sort((f, s) => f[0] - s[0]), t.push(r[0]);
1602
- for (let f = 1; f < r.length; f++)
1603
- i = t[t.length - 1], u = r[f], i[1] === u[0] && !n ? t.push(u) : i[1] === u[0] - 1 && n ? (i[1] = u[1], t.splice(t.length - 1, 1, i)) : i[1] < u[0] ? t.push(u) : i[1] < u[1] && (i[1] = u[1], t.splice(t.length - 1, 1, i));
1565
+ (m) => (m[1] < m[0] && (l = m[1], m[1] = m[0], m[1] = l), m)
1566
+ ).sort((m, v) => m[0] - v[0]), t.push(r[0]);
1567
+ for (let m = 1; m < r.length; m++)
1568
+ i = t[t.length - 1], p = r[m], i[1] === p[0] && !n ? t.push(p) : i[1] === p[0] - 1 && n ? (i[1] = p[1], t.splice(t.length - 1, 1, i)) : i[1] < p[0] ? t.push(p) : i[1] < p[1] && (i[1] = p[1], t.splice(t.length - 1, 1, i));
1604
1569
  return t;
1605
1570
  }
1606
1571
  function ie(r, n) {
1607
1572
  return n.bind(r);
1608
1573
  }
1609
- class jn {
1574
+ class An {
1610
1575
  constructor(n, t) {
1611
- U(this, "editor");
1612
- U(this, "intervals");
1613
- U(this, "disposables", []);
1576
+ W(this, "editor");
1577
+ W(this, "intervals");
1578
+ W(this, "disposables", []);
1614
1579
  /**
1615
1580
  * Flag for `excludeIntervals`
1616
1581
  */
1617
- U(this, "prefer", 1);
1618
- U(this, "lastPrefer", 1);
1582
+ W(this, "prefer", 1);
1583
+ W(this, "lastPrefer", 1);
1619
1584
  /**
1620
1585
  * Linked to ICodeEditor.onDidChangeCursorPosition event.
1621
1586
  */
1622
- U(this, "onCursor", ie(
1587
+ W(this, "onCursor", ie(
1623
1588
  this,
1624
1589
  function(n) {
1625
1590
  if (n.source === "api")
@@ -1628,17 +1593,17 @@ class jn {
1628
1593
  t.length !== 0 && this.editor.setSelections(t);
1629
1594
  }
1630
1595
  ));
1631
- U(this, "onRectangleSelectionStart", ie(this, function({ event: n }) {
1596
+ W(this, "onRectangleSelectionStart", ie(this, function({ event: n }) {
1632
1597
  n.middleButton && (this.lastPrefer = this.prefer, this.prefer = 0, window.addEventListener("pointerup", this.onRectangleSelectionStop));
1633
1598
  }));
1634
- U(this, "onRectangleSelectionStop", ie(this, function() {
1599
+ W(this, "onRectangleSelectionStop", ie(this, function() {
1635
1600
  this.prefer = this.lastPrefer, window.removeEventListener("pointerup", this.onRectangleSelectionStop);
1636
1601
  }));
1637
1602
  /**
1638
1603
  * Linked to ICodeEditor.onKeyDown event.
1639
1604
  */
1640
- U(this, "onKey", ie(this, function(n) {
1641
- const t = n.keyCode, i = c.KeyCode;
1605
+ W(this, "onKey", ie(this, function(n) {
1606
+ const t = n.keyCode, i = a.KeyCode;
1642
1607
  if (n.altKey || i.F1 <= t && t <= i.F19 || n.ctrlKey && t !== i.Backspace)
1643
1608
  return;
1644
1609
  if (t === i.UpArrow || t === i.LeftArrow || t === i.Home || t === i.PageUp) {
@@ -1649,24 +1614,24 @@ class jn {
1649
1614
  this.prefer = 1;
1650
1615
  return;
1651
1616
  }
1652
- const l = this.getSelections(), u = this.intervals.buffer;
1653
- let f;
1617
+ const l = this.getSelections(), p = this.intervals.buffer;
1618
+ let m;
1654
1619
  if (t === i.Delete)
1655
- f = (s) => s[0] === s[1] && u.find((d) => s[1] + 1 === d[0]) != null;
1620
+ m = (v) => v[0] === v[1] && p.find((g) => v[1] + 1 === g[0]) != null;
1656
1621
  else if (t === i.Backspace)
1657
- f = (s) => s[0] === s[1] && u.find((d) => d[1] + 1 === s[0]) != null;
1622
+ m = (v) => v[0] === v[1] && p.find((g) => g[1] + 1 === v[0]) != null;
1658
1623
  else
1659
1624
  return;
1660
- l.findIndex(f) !== -1 && (n.stopPropagation(), n.preventDefault());
1625
+ l.findIndex(m) !== -1 && (n.stopPropagation(), n.preventDefault());
1661
1626
  }));
1662
- U(this, "getOffsetAt", ie(this, function(n) {
1627
+ W(this, "getOffsetAt", ie(this, function(n) {
1663
1628
  let t;
1664
1629
  for (let i = 0; i < this.intervals.buffer.length; i++)
1665
1630
  if (t = this.intervals.buffer[i], n <= t[1])
1666
1631
  return t[0] - n < n - t[1] ? t[0] : t[1];
1667
1632
  }));
1668
1633
  var i;
1669
- this.editor = n, this.intervals = Nn(n, t), (i = this.editor.getModel()) == null || i.setEOL(c.editor.EndOfLineSequence.LF);
1634
+ this.editor = n, this.intervals = On(n, t), (i = this.editor.getModel()) == null || i.setEOL(a.editor.EndOfLineSequence.LF);
1670
1635
  }
1671
1636
  enable() {
1672
1637
  this.disposables.push(
@@ -1686,18 +1651,18 @@ class jn {
1686
1651
  getApprovedSelections() {
1687
1652
  const n = this.editor.getModel();
1688
1653
  return this.getSelections().map(
1689
- (i) => On(
1654
+ (i) => jn(
1690
1655
  i,
1691
1656
  this.intervals.buffer,
1692
1657
  this.prefer
1693
1658
  )
1694
1659
  ).flat().map((i) => {
1695
- const l = n.getPositionAt(i[0]), u = n.getPositionAt(i[1]);
1696
- return new c.Selection(
1660
+ const l = n.getPositionAt(i[0]), p = n.getPositionAt(i[1]);
1661
+ return new a.Selection(
1697
1662
  l.lineNumber,
1698
1663
  l.column,
1699
- u.lineNumber,
1700
- u.column
1664
+ p.lineNumber,
1665
+ p.column
1701
1666
  );
1702
1667
  });
1703
1668
  }
@@ -1715,102 +1680,102 @@ class jn {
1715
1680
  ]);
1716
1681
  }
1717
1682
  }
1718
- const kn = new RegExp("^[ s]+(exposed|Function)", "i"), Xe = () => /* @__PURE__ */ j.jsx("div", { className: "absolute inset-0 animate-pulse", children: /* @__PURE__ */ j.jsx("div", { className: "w-full space-y-4 px-4 py-1", children: /* @__PURE__ */ j.jsxs("div", { className: "space-y-2", children: [
1719
- /* @__PURE__ */ j.jsx("div", { className: "h-3 w-3/4 rounded bg-grey-200" }),
1720
- /* @__PURE__ */ j.jsx("div", { className: "h-3 rounded bg-grey-200" }),
1721
- /* @__PURE__ */ j.jsx("div", { className: "h-3 w-5/6 rounded bg-grey-200" }),
1722
- /* @__PURE__ */ j.jsx("div", { className: "h-3 rounded bg-grey-200" }),
1723
- /* @__PURE__ */ j.jsx("div", { className: "h-3 rounded bg-grey-200" })
1724
- ] }) }) }), Gn = ({
1683
+ const Dn = new RegExp("^[ s]+(exposed|Function)", "i"), Xe = () => /* @__PURE__ */ N.jsx("div", { className: "absolute inset-0 animate-pulse", children: /* @__PURE__ */ N.jsx("div", { className: "w-full space-y-4 px-4 py-1", children: /* @__PURE__ */ N.jsxs("div", { className: "space-y-2", children: [
1684
+ /* @__PURE__ */ N.jsx("div", { className: "h-3 w-3/4 rounded bg-grey-200" }),
1685
+ /* @__PURE__ */ N.jsx("div", { className: "h-3 rounded bg-grey-200" }),
1686
+ /* @__PURE__ */ N.jsx("div", { className: "h-3 w-5/6 rounded bg-grey-200" }),
1687
+ /* @__PURE__ */ N.jsx("div", { className: "h-3 rounded bg-grey-200" }),
1688
+ /* @__PURE__ */ N.jsx("div", { className: "h-3 rounded bg-grey-200" })
1689
+ ] }) }) }), Hn = ({
1725
1690
  path: r,
1726
1691
  initialValue: n,
1727
1692
  theme: t = "fd-dark",
1728
1693
  type: i,
1729
1694
  language: l,
1730
- onChange: u,
1731
- options: f = {},
1732
- extra: s = {},
1733
- showAlerts: d = !1,
1734
- lspProps: h,
1735
- ...b
1695
+ onChange: p,
1696
+ options: m = {},
1697
+ extra: v = {},
1698
+ showAlerts: g = !1,
1699
+ lspProps: T,
1700
+ ..._
1736
1701
  }) => {
1737
- const { initialLineInfo: S, initialSelectionInfo: v } = s, { editor: O, setEditor: k } = En(), { inited: P } = h;
1738
- function $(R) {
1739
- l === "css" && R.languages.registerCompletionItemProvider("css", _n);
1702
+ const { initialLineInfo: w, initialSelectionInfo: x } = v, { editor: P, setEditor: j } = xn(), { inited: k } = T;
1703
+ function A(c) {
1704
+ l === "css" && c.languages.registerCompletionItemProvider("css", Nn);
1740
1705
  }
1741
- function _(R, y) {
1742
- k(R);
1743
- const g = R.getModel();
1744
- if (g && (g.updateOptions({ insertSpaces: !1 }), R.onKeyUp(() => {
1745
- var M;
1746
- const p = (M = R.getPosition()) == null ? void 0 : M.lineNumber;
1747
- if (p) {
1748
- const F = g.getLineFirstNonWhitespaceColumn(p), A = g.getLineLength(p), Y = g.getLineContent(p);
1749
- kn.test(Y) && R.executeEdits("edit-handler", [
1706
+ function R(c, Y) {
1707
+ j(c);
1708
+ const f = c.getModel();
1709
+ if (f && (f.updateOptions({ insertSpaces: !1 }), c.onKeyUp(() => {
1710
+ var D;
1711
+ const d = (D = c.getPosition()) == null ? void 0 : D.lineNumber;
1712
+ if (d) {
1713
+ const M = f.getLineFirstNonWhitespaceColumn(d), B = f.getLineLength(d), F = f.getLineContent(d);
1714
+ Dn.test(F) && c.executeEdits("edit-handler", [
1750
1715
  {
1751
- range: new y.Range(
1752
- p,
1716
+ range: new Y.Range(
1717
+ d,
1753
1718
  0,
1754
- p,
1755
- A
1719
+ d,
1720
+ B
1756
1721
  ),
1757
- text: Y.substr(
1758
- F - 1,
1759
- A - F
1722
+ text: F.substr(
1723
+ M - 1,
1724
+ B - M
1760
1725
  )
1761
1726
  }
1762
1727
  ]);
1763
1728
  }
1764
- })), i === Mt.METHOD && tt(n)) {
1765
- const p = new jn(R, !0);
1766
- p.exclude(1, 1, 1, Number.POSITIVE_INFINITY), p.enable();
1729
+ })), i === Ut.METHOD && tt(n)) {
1730
+ const d = new An(c, !0);
1731
+ d.exclude(1, 1, 1, Number.POSITIVE_INFINITY), d.enable();
1767
1732
  }
1768
1733
  }
1769
1734
  return J(() => {
1770
- if (!O)
1735
+ if (!P)
1771
1736
  return;
1772
- const { line: R, offset: y } = S || {};
1773
- R && fn(O, R, y);
1774
- }, [S, O]), J(() => {
1775
- if (!O)
1737
+ const { line: c, offset: Y } = w || {};
1738
+ c && gn(P, c, Y);
1739
+ }, [w, P]), J(() => {
1740
+ if (!P)
1776
1741
  return;
1777
- const { selection: R } = v || {};
1778
- R && cn(O, R);
1779
- }, [v, O]), P ? /* @__PURE__ */ j.jsxs(j.Fragment, { children: [
1780
- d ? /* @__PURE__ */ j.jsx(wn, { lspProps: h }) : null,
1781
- /* @__PURE__ */ j.jsx(
1782
- Dt,
1742
+ const { selection: c } = x || {};
1743
+ c && mn(P, c);
1744
+ }, [x, P]), k ? /* @__PURE__ */ N.jsxs(N.Fragment, { children: [
1745
+ g ? /* @__PURE__ */ N.jsx(_n, { lspProps: T }) : null,
1746
+ /* @__PURE__ */ N.jsx(
1747
+ Mt,
1783
1748
  {
1784
1749
  options: {
1785
1750
  readOnly: !0,
1786
1751
  fontSize: 12,
1787
1752
  "semanticHighlighting.enabled": !0,
1788
- ...f
1753
+ ...m
1789
1754
  },
1790
1755
  path: V(r),
1791
1756
  value: n,
1792
1757
  theme: "fd-dark",
1793
- onChange: (R) => u && u(R || ""),
1758
+ onChange: (c) => p && p(c || ""),
1794
1759
  language: l,
1795
- beforeMount: $,
1796
- onMount: _,
1797
- loading: /* @__PURE__ */ j.jsx(Xe, {}),
1798
- ...b
1760
+ beforeMount: A,
1761
+ onMount: R,
1762
+ loading: /* @__PURE__ */ N.jsx(Xe, {}),
1763
+ ..._
1799
1764
  }
1800
1765
  )
1801
- ] }) : /* @__PURE__ */ j.jsx(Xe, {});
1766
+ ] }) : /* @__PURE__ */ N.jsx(Xe, {});
1802
1767
  };
1803
1768
  export {
1804
- wn as Alerts,
1805
- Gn as CodeEditor,
1806
- zn as CodeEditorProvider,
1807
- qn as LSPProvider,
1808
- it as _await,
1769
+ _n as Alerts,
1770
+ Hn as CodeEditor,
1771
+ Jn as CodeEditorProvider,
1772
+ Zn as LSPProvider,
1773
+ rt as _await,
1809
1774
  V as getFileSystemPath,
1810
- Vn as getFunctionOffset,
1811
- fn as jumpToLine,
1812
- cn as jumpToSelection,
1813
- En as useCodeEditor,
1814
- Bn as useLSP
1775
+ Bn as getFunctionOffset,
1776
+ gn as jumpToLine,
1777
+ mn as jumpToSelection,
1778
+ xn as useCodeEditor,
1779
+ Gn as useLSP
1815
1780
  };
1816
1781
  //# sourceMappingURL=index.es.js.map