@ws-ui/code-editor 0.1.30 → 0.1.31
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/demo/LSPDemo.d.ts +1 -0
- package/dist/demo/common.d.ts +3 -5
- package/dist/demo/index.d.ts +1 -0
- package/dist/editor/Alerts.d.ts +1 -0
- package/dist/editor/extensions/4d-language-extension/index.d.ts +2 -0
- package/dist/editor/extensions/theme-defaults-extension/index.d.ts +2 -0
- package/dist/editor/extensions/theme-defaults-extension/types.d.ts +6 -0
- package/dist/editor/extensions/types.d.ts +12 -0
- package/dist/editor/index.d.ts +2 -1
- package/dist/editor/keybindings.d.ts +1 -0
- package/dist/editor/languages/index.d.ts +1 -0
- package/dist/editor/languages/utils.d.ts +3 -0
- package/dist/editor/loader/index.d.ts +1 -0
- package/dist/editor/loader/monaco-workers.d.ts +1 -0
- package/dist/editor/plugins/readonly/index.d.ts +1 -1
- package/dist/editor/plugins/readonly/intervals.d.ts +1 -1
- package/dist/editor/providers/CodeEditorProvider.d.ts +1 -0
- package/dist/editor/providers/LSPProvider/WebSocketMessageReader.d.ts +1 -0
- package/dist/editor/providers/LSPProvider/WebSocketMessageWriter.d.ts +1 -0
- package/dist/editor/providers/LSPProvider/ZoomInit.d.ts +1 -0
- package/dist/editor/providers/LSPProvider/index.d.ts +3 -1
- package/dist/editor/services/configuration-service-override.d.ts +2 -0
- package/dist/editor/services/editor-service-override.d.ts +2 -0
- package/dist/editor/services/index.d.ts +12 -0
- package/dist/editor/services/model-service-override.d.ts +2 -0
- package/dist/editor/services/theme-service-override.d.ts +2 -0
- package/dist/editor/utils.d.ts +1 -0
- package/dist/index.cjs.js +103 -46
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.es.js +794 -1359
- package/dist/index.es.js.map +1 -1
- package/dist/main.d.ts +1 -0
- package/dist/studio/assets/css.worker.bundle.js +49784 -0
- package/dist/studio/assets/editor.worker.bundle.js +12601 -0
- package/dist/studio/assets/html.worker.bundle.js +28780 -0
- package/dist/studio/assets/json.worker.bundle.js +20013 -0
- package/dist/studio/assets/textmate.worker.bundle.js +18090 -0
- package/dist/studio/assets/ts.worker.bundle.js +220366 -0
- package/dist/style.css +1 -1
- package/package.json +38 -19
- package/dist/editor/configurations/4d.d.ts +0 -3
- package/dist/editor/services/CodeEditorService.d.ts +0 -11
- package/dist/editor/services/LanguageFeaturesService.d.ts +0 -7
- package/dist/editor/services/TextModelService.d.ts +0 -7
- package/dist/editor/themes/4d-dark.d.ts +0 -2
- package/dist/editor/themes/index.d.ts +0 -1
package/dist/index.es.js
CHANGED
|
@@ -1,854 +1,248 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
1
|
+
var ae = Object.defineProperty;
|
|
2
|
+
var ge = (t, e, n) => e in t ? ae(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
|
|
3
|
+
var x = (t, e, n) => (ge(t, typeof e != "symbol" ? e + "" : e, n), n);
|
|
4
|
+
import { jsxs as J, jsx as S, Fragment as ce } from "react/jsx-runtime";
|
|
5
|
+
import K, { useEffect as O, createContext as z, useState as D, useRef as P, useContext as U, memo as Ie } from "react";
|
|
6
|
+
import { loader as de, useMonaco as ue, Editor as Ce } from "@monaco-editor/react";
|
|
7
|
+
import { lspSubject as me, LspActions as Z, hasAttributesString as _, FileFolderType as fe } from "@ws-ui/shared";
|
|
8
|
+
import { MonacoLanguageClient as Ae } from "monaco-languageclient";
|
|
9
|
+
import { mergeServices as pe, initServices as be } from "monaco-languageclient/vscode/services";
|
|
10
|
+
import he, { initUserConfiguration as ve } from "@codingame/monaco-vscode-configuration-service-override";
|
|
11
|
+
import Se from "@codingame/monaco-vscode-theme-service-override";
|
|
12
|
+
import ye from "@codingame/monaco-vscode-textmate-service-override";
|
|
13
|
+
import Ne from "@codingame/monaco-vscode-languages-service-override";
|
|
14
|
+
import "@codingame/monaco-vscode-theme-defaults-default-extension";
|
|
15
|
+
import * as o from "monaco-editor";
|
|
16
|
+
import { Selection as we, KeyMod as B, KeyCode as G, editor as q, Uri as xe } from "monaco-editor";
|
|
17
|
+
import { Logger as Re } from "monaco-languageclient/tools";
|
|
18
|
+
import { ErrorAction as We, CloseAction as Le } from "vscode-languageclient";
|
|
19
|
+
import { WebSocketMessageReader as Fe, WebSocketMessageWriter as Ze, toSocket as je } from "vscode-ws-jsonrpc";
|
|
20
|
+
import { WillSaveTextDocumentNotification as Xe, TextDocumentSaveReason as Ke, DidSaveTextDocumentNotification as ke, WillCreateFilesRequest as Ee, WillRenameFilesRequest as Be, WillDeleteFilesRequest as Ge, DidCreateFilesNotification as Je, DidRenameFilesNotification as Oe, DidDeleteFilesNotification as Te } from "vscode-languageserver-protocol";
|
|
21
|
+
import { StandaloneServices as De, ICodeEditorService as Ve } from "vscode/services";
|
|
22
|
+
import "@codingame/monaco-vscode-standalone-languages";
|
|
23
|
+
import "@codingame/monaco-vscode-standalone-html-language-features";
|
|
24
|
+
import "@codingame/monaco-vscode-standalone-css-language-features";
|
|
25
|
+
import "@codingame/monaco-vscode-standalone-json-language-features";
|
|
26
|
+
import "@codingame/monaco-vscode-standalone-typescript-language-features";
|
|
27
|
+
import "@codingame/monaco-vscode-css-default-extension";
|
|
28
|
+
import "@codingame/monaco-vscode-json-default-extension";
|
|
29
|
+
import "@codingame/monaco-vscode-html-default-extension";
|
|
30
|
+
import "@codingame/monaco-vscode-javascript-default-extension";
|
|
31
|
+
import { registerExtension as Ye } from "vscode/extensions";
|
|
32
|
+
const Me = () => he(), Pe = () => {
|
|
33
|
+
const t = Se(), e = t.themeService.ctor.prototype;
|
|
34
|
+
return e.defineTheme = () => {
|
|
35
|
+
}, t;
|
|
36
|
+
}, He = `{
|
|
37
|
+
"workbench.colorTheme": "Default Dark+",
|
|
38
|
+
"workbench.iconTheme": "vs-seti",
|
|
39
|
+
"editor.autoClosingBrackets": "languageDefined",
|
|
40
|
+
"editor.autoClosingQuotes": "languageDefined",
|
|
41
|
+
"editor.scrollBeyondLastLine": true,
|
|
42
|
+
"editor.mouseWheelZoom": true,
|
|
43
|
+
"editor.wordBasedSuggestions": false,
|
|
44
|
+
"editor.acceptSuggestionOnEnter": "on",
|
|
45
|
+
"editor.foldingHighlight": false,
|
|
46
|
+
"editor.bracketPairColorization.enabled": false,
|
|
47
|
+
"editor.fontSize": 12,
|
|
48
|
+
"files.autoSave": "off",
|
|
49
|
+
"editor.experimental.asyncTokenization": true,
|
|
50
|
+
"editor.semanticHighlighting.enabled": true,
|
|
51
|
+
"workbench.colorCustomizations": {
|
|
52
|
+
"editor.background": "#313131"
|
|
53
|
+
},
|
|
54
|
+
"editor.semanticTokenColorCustomizations": {
|
|
55
|
+
"[Default Light+]": {
|
|
56
|
+
"enabled": true,
|
|
57
|
+
"rules": {
|
|
58
|
+
"*:4d": {
|
|
59
|
+
"foreground": "#000000",
|
|
60
|
+
"bold": false,
|
|
61
|
+
"italic": false,
|
|
62
|
+
"underline": false,
|
|
63
|
+
"strikethrough": false
|
|
64
|
+
},
|
|
65
|
+
"method:4d": { "foreground": "#000088", "bold": true, "italic": true },
|
|
66
|
+
"method.defaultLibrary:4d": {
|
|
67
|
+
"foreground": "#068c00",
|
|
68
|
+
"italic": false
|
|
69
|
+
},
|
|
70
|
+
"method.plugin:4d": { "foreground": "#000000" },
|
|
71
|
+
"property:4d": { "foreground": "#a0806b" },
|
|
72
|
+
"function:4d": { "foreground": "#5f8e5e", "italic": true },
|
|
73
|
+
"parameter:4d": { "foreground": "#000b76", "bold": true },
|
|
74
|
+
"variable.interprocess:4d": { "foreground": "#ff0088" },
|
|
75
|
+
"variable.process:4d": { "foreground": "#0000ff" },
|
|
76
|
+
"variable.local:4d": { "foreground": "#0031ff" },
|
|
77
|
+
"keyword:4d": { "foreground": "#034d00", "bold": true },
|
|
78
|
+
"table:4d": { "foreground": "#532300" },
|
|
79
|
+
"field:4d": { "foreground": "#323232" },
|
|
80
|
+
"comment:4d": { "foreground": "#535353" },
|
|
81
|
+
"type:4d": { "foreground": "#068c00", "bold": true },
|
|
82
|
+
"constant:4d": { "foreground": "#4d004d", "underline": true },
|
|
83
|
+
"string:4d": { "foreground": "#000000" },
|
|
84
|
+
"error:4d": { "foreground": "#ff0000", "bold": true, "italic": true }
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
"[Default Dark+]": {
|
|
88
|
+
"enabled": true,
|
|
89
|
+
"rules": {
|
|
90
|
+
"*:4d": {
|
|
91
|
+
"foreground": "#FFFFFF",
|
|
92
|
+
"bold": false,
|
|
93
|
+
"italic": false,
|
|
94
|
+
"underline": false,
|
|
95
|
+
"strikethrough": false
|
|
96
|
+
},
|
|
97
|
+
"method:4d": { "foreground": "#1B79F3", "bold": true, "italic": true },
|
|
98
|
+
"method.defaultLibrary:4d": {
|
|
99
|
+
"foreground": "#59BB00",
|
|
100
|
+
"italic": false
|
|
101
|
+
},
|
|
102
|
+
"method.plugin:4d": { "foreground": "#BFBFBF" },
|
|
103
|
+
"property:4d": { "foreground": "#A0806B" },
|
|
104
|
+
"function:4d": { "foreground": "#4EC36E", "italic": true },
|
|
105
|
+
"parameter:4d": { "foreground": "#0C70FF", "bold": true },
|
|
106
|
+
"variable.interprocess:4d": { "foreground": "#FF0088" },
|
|
107
|
+
"variable.process:4d": { "foreground": "#53B0EB" },
|
|
108
|
+
"variable.local:4d": { "foreground": "#18B3F1" },
|
|
109
|
+
"keyword:4d": { "foreground": "#D0D0D0", "bold": true },
|
|
110
|
+
"table:4d": { "foreground": "#CF5600" },
|
|
111
|
+
"field:4d": { "foreground": "#9C6765" },
|
|
112
|
+
"comment:4d": { "foreground": "#8F8F8F" },
|
|
113
|
+
"type:4d": { "foreground": "#068C00", "bold": true },
|
|
114
|
+
"constant:4d": { "foreground": "#FA647F", "underline": true },
|
|
115
|
+
"string:4d": { "foreground": "#FFFFFF" },
|
|
116
|
+
"error:4d": { "foreground": "#ff0000", "bold": true, "italic": true }
|
|
62
117
|
}
|
|
63
118
|
}
|
|
64
|
-
return f;
|
|
65
|
-
}, Ee;
|
|
66
|
-
}
|
|
67
|
-
/** @license React v17.0.2
|
|
68
|
-
* react-jsx-runtime.production.min.js
|
|
69
|
-
*
|
|
70
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
71
|
-
*
|
|
72
|
-
* This source code is licensed under the MIT license found in the
|
|
73
|
-
* LICENSE file in the root directory of this source tree.
|
|
74
|
-
*/
|
|
75
|
-
var Ze;
|
|
76
|
-
function on() {
|
|
77
|
-
if (Ze)
|
|
78
|
-
return re;
|
|
79
|
-
Ze = 1, rt();
|
|
80
|
-
var r = z, n = 60103;
|
|
81
|
-
if (re.Fragment = 60107, typeof Symbol == "function" && Symbol.for) {
|
|
82
|
-
var t = Symbol.for;
|
|
83
|
-
n = t("react.element"), re.Fragment = t("react.fragment");
|
|
84
|
-
}
|
|
85
|
-
var i = r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, s = Object.prototype.hasOwnProperty, u = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
86
|
-
function d(l, f, h) {
|
|
87
|
-
var b, y = {}, v = null, N = null;
|
|
88
|
-
h !== void 0 && (v = "" + h), f.key !== void 0 && (v = "" + f.key), f.ref !== void 0 && (N = f.ref);
|
|
89
|
-
for (b in f)
|
|
90
|
-
s.call(f, b) && !u.hasOwnProperty(b) && (y[b] = f[b]);
|
|
91
|
-
if (l && l.defaultProps)
|
|
92
|
-
for (b in f = l.defaultProps, f)
|
|
93
|
-
y[b] === void 0 && (y[b] = f[b]);
|
|
94
|
-
return { $$typeof: n, type: l, key: v, ref: N, props: y, _owner: i.current };
|
|
95
119
|
}
|
|
96
|
-
return re.jsx = d, re.jsxs = d, re;
|
|
97
120
|
}
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
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
|
-
K("error", e, a);
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
function K(e, o, a) {
|
|
134
|
-
{
|
|
135
|
-
var m = F.ReactDebugCurrentFrame, T = m.getStackAddendum();
|
|
136
|
-
T !== "" && (o += "%s", a = a.concat([T]));
|
|
137
|
-
var O = a.map(function(x) {
|
|
138
|
-
return "" + x;
|
|
139
|
-
});
|
|
140
|
-
O.unshift("Warning: " + o), Function.prototype.apply.call(console[e], console, O);
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
var me = !1;
|
|
144
|
-
function E(e) {
|
|
145
|
-
return !!(typeof e == "string" || typeof e == "function" || e === r.Fragment || e === d || e === w || e === u || e === b || e === y || e === R || me || typeof e == "object" && e !== null && (e.$$typeof === N || e.$$typeof === v || e.$$typeof === l || e.$$typeof === f || 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);
|
|
150
|
-
}
|
|
151
|
-
function _(e) {
|
|
152
|
-
return e.displayName || "Context";
|
|
153
|
-
}
|
|
154
|
-
function M(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 s:
|
|
165
|
-
return "Portal";
|
|
166
|
-
case d:
|
|
167
|
-
return "Profiler";
|
|
168
|
-
case u:
|
|
169
|
-
return "StrictMode";
|
|
170
|
-
case b:
|
|
171
|
-
return "Suspense";
|
|
172
|
-
case y:
|
|
173
|
-
return "SuspenseList";
|
|
174
|
-
}
|
|
175
|
-
if (typeof e == "object")
|
|
176
|
-
switch (e.$$typeof) {
|
|
177
|
-
case f:
|
|
178
|
-
var o = e;
|
|
179
|
-
return _(o) + ".Consumer";
|
|
180
|
-
case l:
|
|
181
|
-
var a = e;
|
|
182
|
-
return _(a._context) + ".Provider";
|
|
183
|
-
case h:
|
|
184
|
-
return I(e, e.render, "ForwardRef");
|
|
185
|
-
case v:
|
|
186
|
-
return M(e.type);
|
|
187
|
-
case k:
|
|
188
|
-
return M(e._render);
|
|
189
|
-
case N: {
|
|
190
|
-
var m = e, T = m._payload, O = m._init;
|
|
191
|
-
try {
|
|
192
|
-
return M(O(T));
|
|
193
|
-
} catch {
|
|
194
|
-
return null;
|
|
195
|
-
}
|
|
196
|
-
}
|
|
197
|
-
}
|
|
198
|
-
return null;
|
|
199
|
-
}
|
|
200
|
-
var J = 0, X, ie, le, we, Ie, Te, Oe;
|
|
201
|
-
function Ne() {
|
|
202
|
-
}
|
|
203
|
-
Ne.__reactDisabledLog = !0;
|
|
204
|
-
function ct() {
|
|
205
|
-
{
|
|
206
|
-
if (J === 0) {
|
|
207
|
-
X = console.log, ie = console.info, le = console.warn, we = console.error, Ie = console.group, Te = console.groupCollapsed, Oe = console.groupEnd;
|
|
208
|
-
var e = {
|
|
209
|
-
configurable: !0,
|
|
210
|
-
enumerable: !0,
|
|
211
|
-
value: Ne,
|
|
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
|
-
});
|
|
223
|
-
}
|
|
224
|
-
J++;
|
|
225
|
-
}
|
|
226
|
-
}
|
|
227
|
-
function dt() {
|
|
228
|
-
{
|
|
229
|
-
if (J--, J === 0) {
|
|
230
|
-
var e = {
|
|
231
|
-
configurable: !0,
|
|
232
|
-
enumerable: !0,
|
|
233
|
-
writable: !0
|
|
234
|
-
};
|
|
235
|
-
Object.defineProperties(console, {
|
|
236
|
-
log: t({}, e, {
|
|
237
|
-
value: X
|
|
238
|
-
}),
|
|
239
|
-
info: t({}, e, {
|
|
240
|
-
value: ie
|
|
241
|
-
}),
|
|
242
|
-
warn: t({}, e, {
|
|
243
|
-
value: le
|
|
244
|
-
}),
|
|
245
|
-
error: t({}, e, {
|
|
246
|
-
value: we
|
|
247
|
-
}),
|
|
248
|
-
group: t({}, e, {
|
|
249
|
-
value: Ie
|
|
250
|
-
}),
|
|
251
|
-
groupCollapsed: t({}, e, {
|
|
252
|
-
value: Te
|
|
253
|
-
}),
|
|
254
|
-
groupEnd: t({}, e, {
|
|
255
|
-
value: Oe
|
|
256
|
-
})
|
|
257
|
-
});
|
|
258
|
-
}
|
|
259
|
-
J < 0 && A("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
260
|
-
}
|
|
261
|
-
}
|
|
262
|
-
var ge = F.ReactCurrentDispatcher, pe;
|
|
263
|
-
function ue(e, o, a) {
|
|
264
|
-
{
|
|
265
|
-
if (pe === void 0)
|
|
266
|
-
try {
|
|
267
|
-
throw Error();
|
|
268
|
-
} catch (T) {
|
|
269
|
-
var m = T.stack.trim().match(/\n( *(at )?)/);
|
|
270
|
-
pe = m && m[1] || "";
|
|
271
|
-
}
|
|
272
|
-
return `
|
|
273
|
-
` + pe + e;
|
|
274
|
-
}
|
|
275
|
-
}
|
|
276
|
-
var ve = !1, ce;
|
|
277
|
-
{
|
|
278
|
-
var ft = typeof WeakMap == "function" ? WeakMap : Map;
|
|
279
|
-
ce = new ft();
|
|
280
|
-
}
|
|
281
|
-
function Pe(e, o) {
|
|
282
|
-
if (!e || ve)
|
|
283
|
-
return "";
|
|
284
|
-
{
|
|
285
|
-
var a = ce.get(e);
|
|
286
|
-
if (a !== void 0)
|
|
287
|
-
return a;
|
|
288
|
-
}
|
|
289
|
-
var m;
|
|
290
|
-
ve = !0;
|
|
291
|
-
var T = Error.prepareStackTrace;
|
|
292
|
-
Error.prepareStackTrace = void 0;
|
|
293
|
-
var O;
|
|
294
|
-
O = ge.current, ge.current = null, ct();
|
|
295
|
-
try {
|
|
296
|
-
if (o) {
|
|
297
|
-
var x = function() {
|
|
298
|
-
throw Error();
|
|
299
|
-
};
|
|
300
|
-
if (Object.defineProperty(x.prototype, "props", {
|
|
301
|
-
set: function() {
|
|
302
|
-
throw Error();
|
|
303
|
-
}
|
|
304
|
-
}), typeof Reflect == "object" && Reflect.construct) {
|
|
305
|
-
try {
|
|
306
|
-
Reflect.construct(x, []);
|
|
307
|
-
} catch (B) {
|
|
308
|
-
m = B;
|
|
309
|
-
}
|
|
310
|
-
Reflect.construct(e, [], x);
|
|
311
|
-
} else {
|
|
312
|
-
try {
|
|
313
|
-
x.call();
|
|
314
|
-
} catch (B) {
|
|
315
|
-
m = B;
|
|
316
|
-
}
|
|
317
|
-
e.call(x.prototype);
|
|
318
|
-
}
|
|
319
|
-
} else {
|
|
320
|
-
try {
|
|
321
|
-
throw Error();
|
|
322
|
-
} catch (B) {
|
|
323
|
-
m = B;
|
|
324
|
-
}
|
|
325
|
-
e();
|
|
326
|
-
}
|
|
327
|
-
} catch (B) {
|
|
328
|
-
if (B && m && typeof B.stack == "string") {
|
|
329
|
-
for (var C = B.stack.split(`
|
|
330
|
-
`), q = m.stack.split(`
|
|
331
|
-
`), D = C.length - 1, L = q.length - 1; D >= 1 && L >= 0 && C[D] !== q[L]; )
|
|
332
|
-
L--;
|
|
333
|
-
for (; D >= 1 && L >= 0; D--, L--)
|
|
334
|
-
if (C[D] !== q[L]) {
|
|
335
|
-
if (D !== 1 || L !== 1)
|
|
336
|
-
do
|
|
337
|
-
if (D--, L--, L < 0 || C[D] !== q[L]) {
|
|
338
|
-
var V = `
|
|
339
|
-
` + C[D].replace(" at new ", " at ");
|
|
340
|
-
return typeof e == "function" && ce.set(e, V), V;
|
|
341
|
-
}
|
|
342
|
-
while (D >= 1 && L >= 0);
|
|
343
|
-
break;
|
|
344
|
-
}
|
|
345
|
-
}
|
|
346
|
-
} finally {
|
|
347
|
-
ve = !1, ge.current = O, dt(), Error.prepareStackTrace = T;
|
|
348
|
-
}
|
|
349
|
-
var ee = e ? e.displayName || e.name : "", Ye = ee ? ue(ee) : "";
|
|
350
|
-
return typeof e == "function" && ce.set(e, Ye), Ye;
|
|
351
|
-
}
|
|
352
|
-
function je(e, o, a) {
|
|
353
|
-
return Pe(e, !1);
|
|
354
|
-
}
|
|
355
|
-
function mt(e) {
|
|
356
|
-
var o = e.prototype;
|
|
357
|
-
return !!(o && o.isReactComponent);
|
|
358
|
-
}
|
|
359
|
-
function de(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 ue(e);
|
|
366
|
-
switch (e) {
|
|
367
|
-
case b:
|
|
368
|
-
return ue("Suspense");
|
|
369
|
-
case y:
|
|
370
|
-
return ue("SuspenseList");
|
|
371
|
-
}
|
|
372
|
-
if (typeof e == "object")
|
|
373
|
-
switch (e.$$typeof) {
|
|
374
|
-
case h:
|
|
375
|
-
return je(e.render);
|
|
376
|
-
case v:
|
|
377
|
-
return de(e.type, o, a);
|
|
378
|
-
case k:
|
|
379
|
-
return je(e._render);
|
|
380
|
-
case N: {
|
|
381
|
-
var m = e, T = m._payload, O = m._init;
|
|
382
|
-
try {
|
|
383
|
-
return de(O(T), o, a);
|
|
384
|
-
} catch {
|
|
385
|
-
}
|
|
386
|
-
}
|
|
387
|
-
}
|
|
388
|
-
return "";
|
|
389
|
-
}
|
|
390
|
-
var ke = {}, Ae = F.ReactDebugCurrentFrame;
|
|
391
|
-
function fe(e) {
|
|
392
|
-
if (e) {
|
|
393
|
-
var o = e._owner, a = de(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 O = Function.call.bind(Object.prototype.hasOwnProperty);
|
|
401
|
-
for (var x in e)
|
|
402
|
-
if (O(e, x)) {
|
|
403
|
-
var C = void 0;
|
|
404
|
-
try {
|
|
405
|
-
if (typeof e[x] != "function") {
|
|
406
|
-
var q = Error((m || "React class") + ": " + a + " type `" + x + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[x] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
|
|
407
|
-
throw q.name = "Invariant Violation", q;
|
|
408
|
-
}
|
|
409
|
-
C = e[x](o, x, m, a, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
410
|
-
} catch (D) {
|
|
411
|
-
C = D;
|
|
412
|
-
}
|
|
413
|
-
C && !(C instanceof Error) && (fe(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, x, typeof C), fe(null)), C instanceof Error && !(C.message in ke) && (ke[C.message] = !0, fe(T), A("Failed %s type: %s", a, C.message), fe(null));
|
|
414
|
-
}
|
|
415
|
-
}
|
|
416
|
-
}
|
|
417
|
-
var oe = F.ReactCurrentOwner, he = Object.prototype.hasOwnProperty, pt = {
|
|
418
|
-
key: !0,
|
|
419
|
-
ref: !0,
|
|
420
|
-
__self: !0,
|
|
421
|
-
__source: !0
|
|
422
|
-
}, De, Le, be;
|
|
423
|
-
be = {};
|
|
424
|
-
function vt(e) {
|
|
425
|
-
if (he.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;
|
|
431
|
-
}
|
|
432
|
-
function ht(e) {
|
|
433
|
-
if (he.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;
|
|
439
|
-
}
|
|
440
|
-
function bt(e, o) {
|
|
441
|
-
if (typeof e.ref == "string" && oe.current && o && oe.current.stateNode !== o) {
|
|
442
|
-
var a = M(oe.current.type);
|
|
443
|
-
be[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', M(oe.current.type), e.ref), be[a] = !0);
|
|
444
|
-
}
|
|
445
|
-
}
|
|
446
|
-
function Ct(e, o) {
|
|
447
|
-
{
|
|
448
|
-
var a = function() {
|
|
449
|
-
De || (De = !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
|
-
}
|
|
456
|
-
}
|
|
457
|
-
function Rt(e, o) {
|
|
458
|
-
{
|
|
459
|
-
var a = function() {
|
|
460
|
-
Le || (Le = !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
|
-
}
|
|
467
|
-
}
|
|
468
|
-
var xt = function(e, o, a, m, T, O, x) {
|
|
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: x,
|
|
477
|
-
// Record the component responsible for creating this element.
|
|
478
|
-
_owner: O
|
|
479
|
-
};
|
|
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;
|
|
496
|
-
};
|
|
497
|
-
function Et(e, o, a, m, T) {
|
|
498
|
-
{
|
|
499
|
-
var O, x = {}, C = null, q = null;
|
|
500
|
-
a !== void 0 && (C = "" + a), ht(o) && (C = "" + o.key), vt(o) && (q = o.ref, bt(o, T));
|
|
501
|
-
for (O in o)
|
|
502
|
-
he.call(o, O) && !pt.hasOwnProperty(O) && (x[O] = o[O]);
|
|
503
|
-
if (e && e.defaultProps) {
|
|
504
|
-
var D = e.defaultProps;
|
|
505
|
-
for (O in D)
|
|
506
|
-
x[O] === void 0 && (x[O] = D[O]);
|
|
507
|
-
}
|
|
508
|
-
if (C || q) {
|
|
509
|
-
var L = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
|
|
510
|
-
C && Ct(x, L), q && Rt(x, L);
|
|
511
|
-
}
|
|
512
|
-
return xt(e, C, q, T, m, oe.current, x);
|
|
513
|
-
}
|
|
514
|
-
}
|
|
515
|
-
var Ce = F.ReactCurrentOwner, $e = F.ReactDebugCurrentFrame;
|
|
516
|
-
function Q(e) {
|
|
517
|
-
if (e) {
|
|
518
|
-
var o = e._owner, a = de(e.type, e._source, o ? o.type : null);
|
|
519
|
-
$e.setExtraStackFrame(a);
|
|
520
|
-
} else
|
|
521
|
-
$e.setExtraStackFrame(null);
|
|
522
|
-
}
|
|
523
|
-
var Re;
|
|
524
|
-
Re = !1;
|
|
525
|
-
function xe(e) {
|
|
526
|
-
return typeof e == "object" && e !== null && e.$$typeof === i;
|
|
527
|
-
}
|
|
528
|
-
function Fe() {
|
|
529
|
-
{
|
|
530
|
-
if (Ce.current) {
|
|
531
|
-
var e = M(Ce.current.type);
|
|
532
|
-
if (e)
|
|
533
|
-
return `
|
|
534
|
-
|
|
535
|
-
Check the render method of \`` + e + "`.";
|
|
536
|
-
}
|
|
537
|
-
return "";
|
|
538
|
-
}
|
|
539
|
-
}
|
|
540
|
-
function yt(e) {
|
|
541
|
-
{
|
|
542
|
-
if (e !== void 0) {
|
|
543
|
-
var o = e.fileName.replace(/^.*[\\\/]/, ""), a = e.lineNumber;
|
|
544
|
-
return `
|
|
545
|
-
|
|
546
|
-
Check your code at ` + o + ":" + a + ".";
|
|
547
|
-
}
|
|
548
|
-
return "";
|
|
549
|
-
}
|
|
550
|
-
}
|
|
551
|
-
var Me = {};
|
|
552
|
-
function St(e) {
|
|
553
|
-
{
|
|
554
|
-
var o = Fe();
|
|
555
|
-
if (!o) {
|
|
556
|
-
var a = typeof e == "string" ? e : e.displayName || e.name;
|
|
557
|
-
a && (o = `
|
|
558
|
-
|
|
559
|
-
Check the top-level render call using <` + a + ">.");
|
|
560
|
-
}
|
|
561
|
-
return o;
|
|
562
|
-
}
|
|
563
|
-
}
|
|
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 = St(o);
|
|
570
|
-
if (Me[a])
|
|
571
|
-
return;
|
|
572
|
-
Me[a] = !0;
|
|
573
|
-
var m = "";
|
|
574
|
-
e && e._owner && e._owner !== Ce.current && (m = " It was passed a child from " + M(e._owner.type) + "."), Q(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), Q(null);
|
|
575
|
-
}
|
|
576
|
-
}
|
|
577
|
-
function qe(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
|
-
xe(m) && We(m, o);
|
|
585
|
-
}
|
|
586
|
-
else if (xe(e))
|
|
587
|
-
e._store && (e._store.validated = !0);
|
|
588
|
-
else if (e) {
|
|
589
|
-
var T = W(e);
|
|
590
|
-
if (typeof T == "function" && T !== e.entries)
|
|
591
|
-
for (var O = T.call(e), x; !(x = O.next()).done; )
|
|
592
|
-
xe(x.value) && We(x.value, o);
|
|
593
|
-
}
|
|
594
|
-
}
|
|
595
|
-
}
|
|
596
|
-
function _t(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 = M(o);
|
|
612
|
-
gt(a, e.props, "prop", m, e);
|
|
613
|
-
} else if (o.PropTypes !== void 0 && !Re) {
|
|
614
|
-
Re = !0;
|
|
615
|
-
var T = M(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.");
|
|
619
|
-
}
|
|
620
|
-
}
|
|
621
|
-
function wt(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
|
-
Q(e), A("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", m), Q(null);
|
|
627
|
-
break;
|
|
628
|
-
}
|
|
629
|
-
}
|
|
630
|
-
e.ref !== null && (Q(e), A("Invalid attribute `ref` supplied to `React.Fragment`."), Q(null));
|
|
631
|
-
}
|
|
632
|
-
}
|
|
633
|
-
function Ke(e, o, a, m, T, O) {
|
|
634
|
-
{
|
|
635
|
-
var x = E(e);
|
|
636
|
-
if (!x) {
|
|
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 q = yt(T);
|
|
640
|
-
q ? C += q : C += Fe();
|
|
641
|
-
var D;
|
|
642
|
-
e === null ? D = "null" : Array.isArray(e) ? D = "array" : e !== void 0 && e.$$typeof === i ? (D = "<" + (M(e.type) || "Unknown") + " />", C = " Did you accidentally export a JSX literal instead of a component?") : D = 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", D, C);
|
|
643
|
-
}
|
|
644
|
-
var L = Et(e, o, a, T, O);
|
|
645
|
-
if (L == null)
|
|
646
|
-
return L;
|
|
647
|
-
if (x) {
|
|
648
|
-
var V = o.children;
|
|
649
|
-
if (V !== void 0)
|
|
650
|
-
if (m)
|
|
651
|
-
if (Array.isArray(V)) {
|
|
652
|
-
for (var ee = 0; ee < V.length; ee++)
|
|
653
|
-
qe(V[ee], e);
|
|
654
|
-
Object.freeze && Object.freeze(V);
|
|
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
|
-
qe(V, e);
|
|
659
|
-
}
|
|
660
|
-
return e === r.Fragment ? wt(L) : _t(L), L;
|
|
661
|
-
}
|
|
662
|
-
}
|
|
663
|
-
function It(e, o, a) {
|
|
664
|
-
return Ke(e, o, a, !0);
|
|
665
|
-
}
|
|
666
|
-
function Tt(e, o, a) {
|
|
667
|
-
return Ke(e, o, a, !1);
|
|
121
|
+
`, $e = () => ve(He), ze = async (t) => {
|
|
122
|
+
var r;
|
|
123
|
+
const e = t.serviceConfig ?? {};
|
|
124
|
+
e.debugLogging = ((r = t.logger) == null ? void 0 : r.isEnabled()) === !0 && (e.debugLogging === !0 || t.logger.isDebugEnabled() === !0), await $e(), e.userServices = e.userServices ?? {};
|
|
125
|
+
const n = e.userServices.configurationService ?? void 0, i = e.workspaceConfig ?? void 0;
|
|
126
|
+
if (n === void 0) {
|
|
127
|
+
if (i)
|
|
128
|
+
throw new Error(
|
|
129
|
+
"You provided a workspaceConfig without using the configurationServiceOverride"
|
|
130
|
+
);
|
|
131
|
+
const a = {
|
|
132
|
+
// @see https://github.com/CodinGame/monaco-vscode-api#monaco-standalone-services
|
|
133
|
+
...Me(),
|
|
134
|
+
...Pe(),
|
|
135
|
+
...ye(),
|
|
136
|
+
...Ne()
|
|
137
|
+
};
|
|
138
|
+
pe(a, e.userServices);
|
|
139
|
+
}
|
|
140
|
+
return i || (e.workspaceConfig = {
|
|
141
|
+
workspaceProvider: {
|
|
142
|
+
trusted: !0,
|
|
143
|
+
workspace: {
|
|
144
|
+
workspaceUri: o.Uri.file("/workspace")
|
|
145
|
+
},
|
|
146
|
+
async open() {
|
|
147
|
+
return !1;
|
|
668
148
|
}
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
class sn extends Bt {
|
|
677
|
-
constructor(t, i) {
|
|
678
|
-
super(t);
|
|
679
|
-
Y(this, "onMessage");
|
|
149
|
+
}
|
|
150
|
+
}), e;
|
|
151
|
+
};
|
|
152
|
+
class Ue extends Fe {
|
|
153
|
+
constructor(n, i) {
|
|
154
|
+
super(n);
|
|
155
|
+
x(this, "onMessage");
|
|
680
156
|
this.onMessage = i;
|
|
681
157
|
}
|
|
682
|
-
readMessage(
|
|
158
|
+
readMessage(n) {
|
|
683
159
|
this.onMessage && this.onMessage();
|
|
684
|
-
const [, i] =
|
|
160
|
+
const [, i] = n.split(`\r
|
|
685
161
|
\r
|
|
686
162
|
`);
|
|
687
163
|
if (this.state === "initial")
|
|
688
164
|
this.events.splice(0, 0, { message: i });
|
|
689
165
|
else if (this.state === "listening") {
|
|
690
|
-
const
|
|
691
|
-
this.callback(
|
|
166
|
+
const r = JSON.parse(i);
|
|
167
|
+
this.callback(r);
|
|
692
168
|
}
|
|
693
169
|
}
|
|
694
170
|
}
|
|
695
|
-
class
|
|
696
|
-
constructor(
|
|
697
|
-
super(
|
|
698
|
-
|
|
171
|
+
class _e extends Ze {
|
|
172
|
+
constructor(n, i) {
|
|
173
|
+
super(n);
|
|
174
|
+
x(this, "onSend");
|
|
699
175
|
this.onSend = i;
|
|
700
176
|
}
|
|
701
|
-
async write(
|
|
177
|
+
async write(n) {
|
|
702
178
|
try {
|
|
703
|
-
const i = JSON.stringify(
|
|
179
|
+
const i = JSON.stringify(n);
|
|
704
180
|
this.socket.send(i), this.onSend && this.onSend();
|
|
705
181
|
} catch (i) {
|
|
706
|
-
this.errorCount++, this.fireError(i,
|
|
182
|
+
this.errorCount++, this.fireError(i, n, this.errorCount);
|
|
707
183
|
}
|
|
708
184
|
}
|
|
709
185
|
}
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
inherit: !0,
|
|
713
|
-
colors: {
|
|
714
|
-
"editor.background": "#313131"
|
|
715
|
-
},
|
|
716
|
-
rules: [
|
|
717
|
-
{
|
|
718
|
-
token: "",
|
|
719
|
-
background: "#313131"
|
|
720
|
-
}
|
|
721
|
-
]
|
|
722
|
-
};
|
|
723
|
-
function U(r) {
|
|
724
|
-
return `file:///PACKAGE/Project/Sources/${r}`;
|
|
186
|
+
function L(t) {
|
|
187
|
+
return `file:///PACKAGE/Project/Sources/${t}`;
|
|
725
188
|
}
|
|
726
|
-
function
|
|
727
|
-
setTimeout(
|
|
189
|
+
function Q(t, e = 0) {
|
|
190
|
+
setTimeout(t, e);
|
|
728
191
|
}
|
|
729
|
-
function
|
|
730
|
-
const
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
192
|
+
function qe(t, e) {
|
|
193
|
+
const n = new we(
|
|
194
|
+
e.startLineNumber,
|
|
195
|
+
e.startColumn,
|
|
196
|
+
e.endLineNumber || e.startLineNumber,
|
|
197
|
+
e.endColumn || e.startColumn
|
|
735
198
|
);
|
|
736
|
-
|
|
737
|
-
|
|
199
|
+
Q(() => {
|
|
200
|
+
t.setSelection(n), t.revealRangeInCenter(n), t.focus();
|
|
738
201
|
});
|
|
739
202
|
}
|
|
740
|
-
function
|
|
741
|
-
|
|
742
|
-
|
|
203
|
+
function Qe(t, e, n = 0) {
|
|
204
|
+
n > 0 && (e = n + e), Q(() => {
|
|
205
|
+
t.setPosition({ lineNumber: e, column: 1 }), t.revealLineInCenter(e), t.focus();
|
|
743
206
|
});
|
|
744
207
|
}
|
|
745
|
-
function
|
|
746
|
-
const
|
|
747
|
-
if (
|
|
748
|
-
const
|
|
749
|
-
for (let
|
|
750
|
-
const
|
|
751
|
-
if (new RegExp(`(?:Function|function) ${
|
|
752
|
-
return
|
|
208
|
+
function _n(t, e, n) {
|
|
209
|
+
const r = t.getModel();
|
|
210
|
+
if (r && e) {
|
|
211
|
+
const a = r.getLineCount();
|
|
212
|
+
for (let g = 1; g <= a; g++) {
|
|
213
|
+
const u = r.getLineContent(g);
|
|
214
|
+
if (new RegExp(`(?:Function|function) ${n}`).test(u))
|
|
215
|
+
return g;
|
|
753
216
|
}
|
|
754
217
|
}
|
|
755
218
|
return 0;
|
|
756
219
|
}
|
|
757
|
-
const
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
const n = _e.get(Ve);
|
|
761
|
-
return r && n.registerCodeEditorOpenHandler(r), n;
|
|
762
|
-
}
|
|
763
|
-
})
|
|
764
|
-
}, mn = {
|
|
765
|
-
getServiceOverride: () => ({
|
|
766
|
-
get [Be.toString()]() {
|
|
767
|
-
return _e.get(
|
|
768
|
-
Be
|
|
769
|
-
);
|
|
770
|
-
}
|
|
771
|
-
})
|
|
772
|
-
}, gn = {
|
|
773
|
-
getServiceOverride: () => ({
|
|
774
|
-
get [ze.toString()]() {
|
|
775
|
-
const r = _e.get(ze);
|
|
776
|
-
return r.createModelReference = (n) => Promise.resolve({ dispose: () => {
|
|
777
|
-
} }), r;
|
|
778
|
-
}
|
|
779
|
-
})
|
|
780
|
-
}, pn = {
|
|
781
|
-
comments: {
|
|
782
|
-
lineComment: "//",
|
|
783
|
-
blockComment: ["/**", "**/"]
|
|
784
|
-
},
|
|
785
|
-
brackets: [
|
|
786
|
-
["{", "}"],
|
|
787
|
-
["(", ")"],
|
|
788
|
-
["[", "]"]
|
|
789
|
-
],
|
|
790
|
-
surroundingPairs: [
|
|
791
|
-
{ open: "{", close: "}" },
|
|
792
|
-
{ open: "[", close: "]" },
|
|
793
|
-
{ open: "(", close: ")" },
|
|
794
|
-
{ open: '"', close: '"' },
|
|
795
|
-
{ open: "'", close: "'" }
|
|
796
|
-
],
|
|
797
|
-
autoClosingPairs: [
|
|
798
|
-
{ open: "(", close: ")" },
|
|
799
|
-
{ open: "{", close: "}" },
|
|
800
|
-
{ open: "[", close: "]" },
|
|
801
|
-
{ open: "'", close: "'", notIn: ["string", "comment"] },
|
|
802
|
-
{ open: '"', close: '"', notIn: ["string"] },
|
|
803
|
-
{ open: "`", close: "`", notIn: ["string", "comment"] },
|
|
804
|
-
{ open: "/**", close: " **/", notIn: ["string"] }
|
|
805
|
-
],
|
|
806
|
-
autoCloseBefore: ";:.,=}])>` \n ",
|
|
807
|
-
wordPattern: new RegExp(
|
|
808
|
-
"(-?\\d*\\.\\d\\w*)|([^\\`\\~\\!\\@\\#\\%\\^\\&\\*\\(\\)\\-\\=\\+\\[\\{\\]\\}\\\\\\|\\;\\:\\'\\\"\\,\\.\\<\\>\\/\\?\\r\\n\\t\\f\\v ]+)|(?<=[a-zA-Z]) ?(?=[a-zA-Z])"
|
|
809
|
-
),
|
|
810
|
-
indentationRules: {
|
|
811
|
-
increaseIndentPattern: new RegExp(
|
|
812
|
-
"(^(?![^\\s])*\\s*(class constructor))|(^(?![^\\s])*\\s*(exposed|local|\\s*){1}\\s*function{1}\\s*\\w)|(^(?![^\\s])*\\s*(If|Else|For|For each|While|Begin SQL|Case of|Use|Repeat|: *\\(.*)).*$",
|
|
813
|
-
"i"
|
|
814
|
-
),
|
|
815
|
-
decreaseIndentPattern: new RegExp(
|
|
816
|
-
"(^(?![^\\s])*\\s*(exposed|local|\\s*){1}\\s*function{1}\\s*\\w)|(End If|End For|Else|End for each|End While|End SQL|End case|End use|Until|: *\\(.*).*$",
|
|
817
|
-
"i"
|
|
818
|
-
)
|
|
819
|
-
},
|
|
820
|
-
onEnterRules: [
|
|
821
|
-
{
|
|
822
|
-
beforeText: new RegExp("^exposed", "i"),
|
|
823
|
-
action: { indentAction: 1 }
|
|
824
|
-
}
|
|
825
|
-
]
|
|
826
|
-
}, vn = {
|
|
827
|
-
provideCompletionItems: async (r, n) => {
|
|
828
|
-
const t = r.getWordUntilPosition(n);
|
|
220
|
+
const en = {
|
|
221
|
+
provideCompletionItems: async (t, e) => {
|
|
222
|
+
const n = t.getWordUntilPosition(e);
|
|
829
223
|
return {
|
|
830
224
|
suggestions: [
|
|
831
225
|
{
|
|
832
226
|
label: "var",
|
|
833
|
-
kind:
|
|
834
|
-
range: new
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
227
|
+
kind: o.languages.CompletionItemKind.Snippet,
|
|
228
|
+
range: new o.Range(
|
|
229
|
+
e.lineNumber,
|
|
230
|
+
n.startColumn,
|
|
231
|
+
e.lineNumber,
|
|
232
|
+
n.endColumn
|
|
839
233
|
),
|
|
840
234
|
insertText: ["var ${1:var_name} : ${2:var_type}"].join(`
|
|
841
235
|
`),
|
|
842
|
-
insertTextRules:
|
|
236
|
+
insertTextRules: o.languages.CompletionItemInsertTextRule.InsertAsSnippet
|
|
843
237
|
},
|
|
844
238
|
{
|
|
845
239
|
label: "While",
|
|
846
|
-
kind:
|
|
847
|
-
range: new
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
240
|
+
kind: o.languages.CompletionItemKind.Snippet,
|
|
241
|
+
range: new o.Range(
|
|
242
|
+
e.lineNumber,
|
|
243
|
+
n.startColumn,
|
|
244
|
+
e.lineNumber,
|
|
245
|
+
n.endColumn
|
|
852
246
|
),
|
|
853
247
|
insertText: [
|
|
854
248
|
"While(${1:expression})",
|
|
@@ -856,16 +250,16 @@ const fn = {
|
|
|
856
250
|
"End while"
|
|
857
251
|
].join(`
|
|
858
252
|
`),
|
|
859
|
-
insertTextRules:
|
|
253
|
+
insertTextRules: o.languages.CompletionItemInsertTextRule.InsertAsSnippet
|
|
860
254
|
},
|
|
861
255
|
{
|
|
862
256
|
label: "Case of",
|
|
863
|
-
kind:
|
|
864
|
-
range: new
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
257
|
+
kind: o.languages.CompletionItemKind.Snippet,
|
|
258
|
+
range: new o.Range(
|
|
259
|
+
e.lineNumber,
|
|
260
|
+
n.startColumn,
|
|
261
|
+
e.lineNumber,
|
|
262
|
+
n.endColumn
|
|
869
263
|
),
|
|
870
264
|
insertText: [
|
|
871
265
|
"Case of",
|
|
@@ -874,44 +268,44 @@ const fn = {
|
|
|
874
268
|
"End case"
|
|
875
269
|
].join(`
|
|
876
270
|
`),
|
|
877
|
-
insertTextRules:
|
|
271
|
+
insertTextRules: o.languages.CompletionItemInsertTextRule.InsertAsSnippet
|
|
878
272
|
},
|
|
879
273
|
{
|
|
880
274
|
label: "Else",
|
|
881
|
-
kind:
|
|
882
|
-
range: new
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
275
|
+
kind: o.languages.CompletionItemKind.Snippet,
|
|
276
|
+
range: new o.Range(
|
|
277
|
+
e.lineNumber,
|
|
278
|
+
n.startColumn,
|
|
279
|
+
e.lineNumber,
|
|
280
|
+
n.endColumn
|
|
887
281
|
),
|
|
888
282
|
insertText: ["Else", " "].join(`
|
|
889
283
|
`),
|
|
890
|
-
insertTextRules:
|
|
284
|
+
insertTextRules: o.languages.CompletionItemInsertTextRule.InsertAsSnippet
|
|
891
285
|
},
|
|
892
286
|
{
|
|
893
287
|
label: "If",
|
|
894
|
-
kind:
|
|
895
|
-
range: new
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
288
|
+
kind: o.languages.CompletionItemKind.Snippet,
|
|
289
|
+
range: new o.Range(
|
|
290
|
+
e.lineNumber,
|
|
291
|
+
n.startColumn,
|
|
292
|
+
e.lineNumber,
|
|
293
|
+
n.endColumn
|
|
900
294
|
),
|
|
901
295
|
insertText: ["If (${1:expression})", " ${5:body}", "End if"].join(
|
|
902
296
|
`
|
|
903
297
|
`
|
|
904
298
|
),
|
|
905
|
-
insertTextRules:
|
|
299
|
+
insertTextRules: o.languages.CompletionItemInsertTextRule.InsertAsSnippet
|
|
906
300
|
},
|
|
907
301
|
{
|
|
908
302
|
label: "For",
|
|
909
|
-
kind:
|
|
910
|
-
range: new
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
303
|
+
kind: o.languages.CompletionItemKind.Snippet,
|
|
304
|
+
range: new o.Range(
|
|
305
|
+
e.lineNumber,
|
|
306
|
+
n.startColumn,
|
|
307
|
+
e.lineNumber,
|
|
308
|
+
n.endColumn
|
|
915
309
|
),
|
|
916
310
|
insertText: [
|
|
917
311
|
"For(${1:counter};${2:start};${3:end}${4:;increment})",
|
|
@@ -919,68 +313,68 @@ const fn = {
|
|
|
919
313
|
"End for"
|
|
920
314
|
].join(`
|
|
921
315
|
`),
|
|
922
|
-
insertTextRules:
|
|
316
|
+
insertTextRules: o.languages.CompletionItemInsertTextRule.InsertAsSnippet
|
|
923
317
|
},
|
|
924
318
|
{
|
|
925
319
|
label: "Function",
|
|
926
|
-
kind:
|
|
927
|
-
range: new
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
320
|
+
kind: o.languages.CompletionItemKind.Snippet,
|
|
321
|
+
range: new o.Range(
|
|
322
|
+
e.lineNumber,
|
|
323
|
+
n.startColumn,
|
|
324
|
+
e.lineNumber,
|
|
325
|
+
n.endColumn
|
|
932
326
|
),
|
|
933
327
|
insertText: [
|
|
934
328
|
"Function ${1:function_name}(${2:params}) -> ${3:var_name} : ${4:var_type}",
|
|
935
329
|
" ${5:body}"
|
|
936
330
|
].join(`
|
|
937
331
|
`),
|
|
938
|
-
insertTextRules:
|
|
332
|
+
insertTextRules: o.languages.CompletionItemInsertTextRule.InsertAsSnippet
|
|
939
333
|
}
|
|
940
334
|
]
|
|
941
335
|
};
|
|
942
336
|
}
|
|
943
|
-
},
|
|
944
|
-
provideCompletionItems: async (
|
|
945
|
-
const
|
|
337
|
+
}, nn = {
|
|
338
|
+
provideCompletionItems: async (t, e) => {
|
|
339
|
+
const n = t.getWordUntilPosition(e);
|
|
946
340
|
return {
|
|
947
341
|
suggestions: [
|
|
948
342
|
{
|
|
949
343
|
label: "var",
|
|
950
|
-
kind:
|
|
951
|
-
range: new
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
344
|
+
kind: o.languages.CompletionItemKind.Snippet,
|
|
345
|
+
range: new o.Range(
|
|
346
|
+
e.lineNumber,
|
|
347
|
+
n.startColumn,
|
|
348
|
+
e.lineNumber,
|
|
349
|
+
n.endColumn
|
|
956
350
|
),
|
|
957
351
|
insertText: ["var ${1:var_name} : ${2:var_type}"].join(`
|
|
958
352
|
`),
|
|
959
|
-
insertTextRules:
|
|
353
|
+
insertTextRules: o.languages.CompletionItemInsertTextRule.InsertAsSnippet
|
|
960
354
|
},
|
|
961
355
|
{
|
|
962
356
|
label: "while",
|
|
963
|
-
kind:
|
|
964
|
-
range: new
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
357
|
+
kind: o.languages.CompletionItemKind.Snippet,
|
|
358
|
+
range: new o.Range(
|
|
359
|
+
e.lineNumber,
|
|
360
|
+
n.startColumn,
|
|
361
|
+
e.lineNumber,
|
|
362
|
+
n.endColumn
|
|
969
363
|
),
|
|
970
364
|
insertText: ["while(${1:expression})", " ${2:body}", "end"].join(
|
|
971
365
|
`
|
|
972
366
|
`
|
|
973
367
|
),
|
|
974
|
-
insertTextRules:
|
|
368
|
+
insertTextRules: o.languages.CompletionItemInsertTextRule.InsertAsSnippet
|
|
975
369
|
},
|
|
976
370
|
{
|
|
977
371
|
label: "switch",
|
|
978
|
-
kind:
|
|
979
|
-
range: new
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
372
|
+
kind: o.languages.CompletionItemKind.Snippet,
|
|
373
|
+
range: new o.Range(
|
|
374
|
+
e.lineNumber,
|
|
375
|
+
n.startColumn,
|
|
376
|
+
e.lineNumber,
|
|
377
|
+
n.endColumn
|
|
984
378
|
),
|
|
985
379
|
insertText: [
|
|
986
380
|
"switch",
|
|
@@ -989,44 +383,44 @@ const fn = {
|
|
|
989
383
|
"end"
|
|
990
384
|
].join(`
|
|
991
385
|
`),
|
|
992
|
-
insertTextRules:
|
|
386
|
+
insertTextRules: o.languages.CompletionItemInsertTextRule.InsertAsSnippet
|
|
993
387
|
},
|
|
994
388
|
{
|
|
995
389
|
label: "else",
|
|
996
|
-
kind:
|
|
997
|
-
range: new
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
390
|
+
kind: o.languages.CompletionItemKind.Snippet,
|
|
391
|
+
range: new o.Range(
|
|
392
|
+
e.lineNumber,
|
|
393
|
+
n.startColumn,
|
|
394
|
+
e.lineNumber,
|
|
395
|
+
n.endColumn
|
|
1002
396
|
),
|
|
1003
397
|
insertText: ["else", " "].join(`
|
|
1004
398
|
`),
|
|
1005
|
-
insertTextRules:
|
|
399
|
+
insertTextRules: o.languages.CompletionItemInsertTextRule.InsertAsSnippet
|
|
1006
400
|
},
|
|
1007
401
|
{
|
|
1008
402
|
label: "if",
|
|
1009
|
-
kind:
|
|
1010
|
-
range: new
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
403
|
+
kind: o.languages.CompletionItemKind.Snippet,
|
|
404
|
+
range: new o.Range(
|
|
405
|
+
e.lineNumber,
|
|
406
|
+
n.startColumn,
|
|
407
|
+
e.lineNumber,
|
|
408
|
+
n.endColumn
|
|
1015
409
|
),
|
|
1016
410
|
insertText: ["if (${1:expression})", " ${5:body}", "end"].join(
|
|
1017
411
|
`
|
|
1018
412
|
`
|
|
1019
413
|
),
|
|
1020
|
-
insertTextRules:
|
|
414
|
+
insertTextRules: o.languages.CompletionItemInsertTextRule.InsertAsSnippet
|
|
1021
415
|
},
|
|
1022
416
|
{
|
|
1023
417
|
label: "for",
|
|
1024
|
-
kind:
|
|
1025
|
-
range: new
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
418
|
+
kind: o.languages.CompletionItemKind.Snippet,
|
|
419
|
+
range: new o.Range(
|
|
420
|
+
e.lineNumber,
|
|
421
|
+
n.startColumn,
|
|
422
|
+
e.lineNumber,
|
|
423
|
+
n.endColumn
|
|
1030
424
|
),
|
|
1031
425
|
insertText: [
|
|
1032
426
|
"for(${1:counter},${2:start},${3:end}${4:,increment})",
|
|
@@ -1034,413 +428,405 @@ const fn = {
|
|
|
1034
428
|
"end"
|
|
1035
429
|
].join(`
|
|
1036
430
|
`),
|
|
1037
|
-
insertTextRules:
|
|
431
|
+
insertTextRules: o.languages.CompletionItemInsertTextRule.InsertAsSnippet
|
|
1038
432
|
},
|
|
1039
433
|
{
|
|
1040
434
|
label: "function",
|
|
1041
|
-
kind:
|
|
1042
|
-
range: new
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
435
|
+
kind: o.languages.CompletionItemKind.Snippet,
|
|
436
|
+
range: new o.Range(
|
|
437
|
+
e.lineNumber,
|
|
438
|
+
n.startColumn,
|
|
439
|
+
e.lineNumber,
|
|
440
|
+
n.endColumn
|
|
1047
441
|
),
|
|
1048
442
|
insertText: [
|
|
1049
443
|
"function ${1:function_name}(${2:params}) -> ${3:var_name} : ${4:var_type}",
|
|
1050
444
|
" ${5:body}"
|
|
1051
445
|
].join(`
|
|
1052
446
|
`),
|
|
1053
|
-
insertTextRules:
|
|
447
|
+
insertTextRules: o.languages.CompletionItemInsertTextRule.InsertAsSnippet
|
|
1054
448
|
}
|
|
1055
449
|
]
|
|
1056
450
|
};
|
|
1057
451
|
}
|
|
1058
|
-
},
|
|
452
|
+
}, tn = [
|
|
1059
453
|
// zoom in
|
|
1060
454
|
{
|
|
1061
|
-
keybinding:
|
|
455
|
+
keybinding: B.CtrlCmd | G.NumpadAdd,
|
|
1062
456
|
command: "editor.action.fontZoomIn"
|
|
1063
457
|
},
|
|
1064
458
|
{
|
|
1065
|
-
keybinding:
|
|
459
|
+
keybinding: B.CtrlCmd | G.Equal,
|
|
1066
460
|
command: "editor.action.fontZoomIn"
|
|
1067
461
|
},
|
|
1068
462
|
// zoom out
|
|
1069
463
|
{
|
|
1070
|
-
keybinding:
|
|
464
|
+
keybinding: B.CtrlCmd | G.NumpadSubtract,
|
|
1071
465
|
command: "editor.action.fontZoomOut"
|
|
1072
466
|
},
|
|
1073
467
|
{
|
|
1074
|
-
keybinding:
|
|
468
|
+
keybinding: B.CtrlCmd | G.Minus,
|
|
1075
469
|
command: "editor.action.fontZoomOut"
|
|
1076
470
|
},
|
|
1077
471
|
// zoom reset
|
|
1078
472
|
{
|
|
1079
|
-
keybinding:
|
|
473
|
+
keybinding: B.CtrlCmd | G.Numpad0,
|
|
1080
474
|
command: "editor.action.fontZoomReset"
|
|
1081
475
|
},
|
|
1082
476
|
{
|
|
1083
|
-
keybinding:
|
|
477
|
+
keybinding: B.CtrlCmd | G.Digit0,
|
|
1084
478
|
command: "editor.action.fontZoomReset"
|
|
1085
479
|
}
|
|
1086
|
-
],
|
|
1087
|
-
|
|
480
|
+
], on = ({ defaultZoom: t }) => (O(() => {
|
|
481
|
+
t !== void 0 && q.EditorZoom.setZoomLevel(t);
|
|
1088
482
|
}, []), null);
|
|
1089
|
-
({}).VITE_DISABLE_MONACO_LOADER ||
|
|
1090
|
-
monaco:
|
|
483
|
+
({}).VITE_DISABLE_MONACO_LOADER || de.config({
|
|
484
|
+
monaco: o
|
|
1091
485
|
// paths: {
|
|
1092
486
|
// vs: "https://cdn.jsdelivr.net/npm/monaco-editor@0.41.0/min/vs",
|
|
1093
487
|
// },
|
|
1094
488
|
});
|
|
1095
|
-
const
|
|
1096
|
-
children:
|
|
1097
|
-
url:
|
|
1098
|
-
qodly:
|
|
489
|
+
const ee = z(void 0), qn = ({
|
|
490
|
+
children: t,
|
|
491
|
+
url: e,
|
|
492
|
+
qodly: n,
|
|
1099
493
|
defaultZoom: i,
|
|
1100
|
-
openHandler:
|
|
1101
|
-
language:
|
|
1102
|
-
defaultInited:
|
|
494
|
+
openHandler: r,
|
|
495
|
+
language: a = "4d",
|
|
496
|
+
defaultInited: g = !1
|
|
1103
497
|
}) => {
|
|
1104
|
-
const
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
debugLogging: !1,
|
|
1111
|
-
userServices: {
|
|
1112
|
-
// @see https://github.com/CodinGame/monaco-vscode-api#monaco-standalone-services
|
|
1113
|
-
...fn.getServiceOverride({ openHandler: s }),
|
|
1114
|
-
...mn.getServiceOverride(),
|
|
1115
|
-
...gn.getServiceOverride()
|
|
1116
|
-
}
|
|
1117
|
-
});
|
|
1118
|
-
}, []), H(() => {
|
|
1119
|
-
n && l && k();
|
|
1120
|
-
}, [n, l]);
|
|
1121
|
-
const k = async () => {
|
|
1122
|
-
if (!l)
|
|
498
|
+
const u = ue(), [m, h] = D(g), [F, y] = D(null), A = P(), b = P(0);
|
|
499
|
+
O(() => {
|
|
500
|
+
e && u && v();
|
|
501
|
+
}, [e, u]);
|
|
502
|
+
const v = async () => {
|
|
503
|
+
if (!u)
|
|
1123
504
|
return;
|
|
1124
|
-
const
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
})
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
505
|
+
const I = new Re({
|
|
506
|
+
enabled: process.env.NODE_ENV === "development",
|
|
507
|
+
debugEnabled: process.env.NODE_ENV === "development"
|
|
508
|
+
}), d = await ze({
|
|
509
|
+
logger: I
|
|
510
|
+
});
|
|
511
|
+
await be({
|
|
512
|
+
caller: "Qodly Code Editor",
|
|
513
|
+
logger: I,
|
|
514
|
+
serviceConfig: d
|
|
515
|
+
}), r && De.get(Ve).registerCodeEditorOpenHandler(r), u.languages.registerCompletionItemProvider(
|
|
516
|
+
a,
|
|
517
|
+
n ? nn : en
|
|
518
|
+
), q.addKeybindingRules(tn), p();
|
|
519
|
+
}, p = () => {
|
|
1134
520
|
y(null);
|
|
1135
|
-
let
|
|
521
|
+
let I;
|
|
1136
522
|
try {
|
|
1137
|
-
|
|
523
|
+
I = new WebSocket(localStorage.LSP_SERVER || e);
|
|
1138
524
|
} catch {
|
|
1139
525
|
y(new Event("INVALID_URL"));
|
|
1140
526
|
return;
|
|
1141
527
|
}
|
|
1142
|
-
|
|
1143
|
-
},
|
|
1144
|
-
const
|
|
528
|
+
I.onopen = N, I.onclose = f, I.onerror = c, b.current = 0;
|
|
529
|
+
}, N = async function() {
|
|
530
|
+
const I = je(this), d = new Ue(I), C = new _e(I), E = new Ae({
|
|
1145
531
|
name: "4D Language Client",
|
|
1146
532
|
clientOptions: {
|
|
1147
533
|
workspaceFolder: {
|
|
1148
|
-
uri:
|
|
534
|
+
uri: xe.parse("file:///PACKAGE")
|
|
1149
535
|
},
|
|
1150
536
|
// use a language id as a document selector
|
|
1151
|
-
documentSelector: [{ scheme: "file", language:
|
|
537
|
+
documentSelector: [{ scheme: "file", language: a }],
|
|
1152
538
|
// disable the default error handler
|
|
1153
539
|
errorHandler: {
|
|
1154
|
-
error: () => ({ action:
|
|
1155
|
-
closed: () => ({ action:
|
|
540
|
+
error: () => ({ action: We.Continue }),
|
|
541
|
+
closed: () => ({ action: Le.DoNotRestart })
|
|
1156
542
|
}
|
|
1157
543
|
},
|
|
1158
544
|
// create a language client connection from the JSON RPC connection on demand
|
|
1159
545
|
connectionProvider: {
|
|
1160
546
|
get: () => Promise.resolve({
|
|
1161
|
-
reader:
|
|
1162
|
-
writer:
|
|
547
|
+
reader: d,
|
|
548
|
+
writer: C
|
|
1163
549
|
})
|
|
1164
550
|
}
|
|
1165
551
|
});
|
|
1166
|
-
|
|
1167
|
-
const
|
|
1168
|
-
|
|
1169
|
-
return typeof
|
|
1170
|
-
|
|
1171
|
-
) ? Promise.resolve() :
|
|
1172
|
-
},
|
|
1173
|
-
|
|
1174
|
-
|
|
552
|
+
A.current = E;
|
|
553
|
+
const se = E.sendRequest.bind(E);
|
|
554
|
+
A.current.sendRequest = function(Y, M, le) {
|
|
555
|
+
return typeof Y == "object" && Y.method === "textDocument/diagnostic" && /file:\/\/\/PACKAGE\/Project\/Sources\/Methods\/__Debugger_.*/.test(
|
|
556
|
+
M.textDocument.uri
|
|
557
|
+
) ? Promise.resolve() : se(Y, M, le);
|
|
558
|
+
}, d.onClose(() => {
|
|
559
|
+
E.stop(), b.current < 3 ? setTimeout(() => {
|
|
560
|
+
b.current++, p();
|
|
1175
561
|
}, 1e3) : y(new Event("WEBSOCKET_CLOSED"));
|
|
1176
|
-
}),
|
|
1177
|
-
},
|
|
1178
|
-
},
|
|
1179
|
-
y(
|
|
562
|
+
}), E.needsStart() && await E.start(), h(!0);
|
|
563
|
+
}, f = () => {
|
|
564
|
+
}, c = (I) => {
|
|
565
|
+
y(I);
|
|
1180
566
|
};
|
|
1181
|
-
|
|
1182
|
-
const
|
|
1183
|
-
switch (
|
|
1184
|
-
case
|
|
1185
|
-
|
|
567
|
+
O(() => {
|
|
568
|
+
const I = me.subscribe(({ action: d, payload: C }) => {
|
|
569
|
+
switch (d) {
|
|
570
|
+
case Z.WILL_SAVE:
|
|
571
|
+
X(C.filePath);
|
|
1186
572
|
break;
|
|
1187
|
-
case
|
|
1188
|
-
|
|
573
|
+
case Z.DID_SAVE:
|
|
574
|
+
s(C.filePath, C.content);
|
|
1189
575
|
break;
|
|
1190
|
-
case
|
|
1191
|
-
|
|
576
|
+
case Z.WILL_CREATE:
|
|
577
|
+
l(C.filePath);
|
|
1192
578
|
break;
|
|
1193
|
-
case
|
|
1194
|
-
|
|
579
|
+
case Z.DID_CREATE:
|
|
580
|
+
k(C.filePath);
|
|
1195
581
|
break;
|
|
1196
|
-
case
|
|
1197
|
-
|
|
582
|
+
case Z.WILL_RENAME:
|
|
583
|
+
w(C.oldPath, C.newPath);
|
|
1198
584
|
break;
|
|
1199
|
-
case
|
|
1200
|
-
|
|
585
|
+
case Z.DID_RENAME:
|
|
586
|
+
W(C.oldPath, C.newPath);
|
|
1201
587
|
break;
|
|
1202
|
-
case
|
|
1203
|
-
|
|
588
|
+
case Z.WILL_DELETE:
|
|
589
|
+
R(C.filePath);
|
|
1204
590
|
break;
|
|
1205
|
-
case
|
|
1206
|
-
|
|
591
|
+
case Z.DID_DELETE:
|
|
592
|
+
re(C.filePath);
|
|
1207
593
|
break;
|
|
1208
594
|
}
|
|
1209
595
|
});
|
|
1210
|
-
return () =>
|
|
596
|
+
return () => I.unsubscribe();
|
|
1211
597
|
}, []);
|
|
1212
|
-
const
|
|
1213
|
-
var
|
|
1214
|
-
(
|
|
598
|
+
const X = (I, d = Ke.Manual) => {
|
|
599
|
+
var C;
|
|
600
|
+
(C = A.current) == null || C.sendNotification(Xe.type, {
|
|
1215
601
|
textDocument: {
|
|
1216
|
-
uri:
|
|
602
|
+
uri: L(I)
|
|
1217
603
|
},
|
|
1218
|
-
reason:
|
|
604
|
+
reason: d
|
|
1219
605
|
});
|
|
1220
|
-
},
|
|
1221
|
-
var
|
|
1222
|
-
(
|
|
606
|
+
}, s = (I, d) => {
|
|
607
|
+
var C;
|
|
608
|
+
(C = A.current) == null || C.sendNotification(ke.type, {
|
|
1223
609
|
textDocument: {
|
|
1224
|
-
uri:
|
|
610
|
+
uri: L(I)
|
|
1225
611
|
},
|
|
1226
|
-
text:
|
|
612
|
+
text: d
|
|
1227
613
|
});
|
|
1228
|
-
},
|
|
1229
|
-
var
|
|
1230
|
-
(
|
|
614
|
+
}, l = (I) => {
|
|
615
|
+
var d;
|
|
616
|
+
(d = A.current) == null || d.sendRequest(Ee.type, {
|
|
1231
617
|
files: [
|
|
1232
618
|
{
|
|
1233
|
-
uri:
|
|
619
|
+
uri: L(I)
|
|
1234
620
|
}
|
|
1235
621
|
]
|
|
1236
622
|
});
|
|
1237
|
-
},
|
|
1238
|
-
var
|
|
1239
|
-
(
|
|
623
|
+
}, w = (I, d) => {
|
|
624
|
+
var C;
|
|
625
|
+
(C = A.current) == null || C.sendRequest(Be.type, {
|
|
1240
626
|
files: [
|
|
1241
627
|
{
|
|
1242
|
-
oldUri:
|
|
1243
|
-
newUri:
|
|
628
|
+
oldUri: L(I),
|
|
629
|
+
newUri: L(d)
|
|
1244
630
|
}
|
|
1245
631
|
]
|
|
1246
632
|
});
|
|
1247
|
-
},
|
|
1248
|
-
var
|
|
1249
|
-
(
|
|
633
|
+
}, R = (I) => {
|
|
634
|
+
var d;
|
|
635
|
+
(d = A.current) == null || d.sendRequest(Ge.type, {
|
|
1250
636
|
files: [
|
|
1251
637
|
{
|
|
1252
|
-
uri:
|
|
638
|
+
uri: L(I)
|
|
1253
639
|
}
|
|
1254
640
|
]
|
|
1255
641
|
});
|
|
1256
|
-
},
|
|
1257
|
-
var
|
|
1258
|
-
(
|
|
642
|
+
}, k = (I) => {
|
|
643
|
+
var d;
|
|
644
|
+
(d = A.current) == null || d.sendNotification(Je.type, {
|
|
1259
645
|
files: [
|
|
1260
646
|
{
|
|
1261
|
-
uri:
|
|
647
|
+
uri: L(I)
|
|
1262
648
|
}
|
|
1263
649
|
]
|
|
1264
650
|
});
|
|
1265
|
-
},
|
|
1266
|
-
var
|
|
1267
|
-
(
|
|
651
|
+
}, W = (I, d) => {
|
|
652
|
+
var C;
|
|
653
|
+
(C = A.current) == null || C.sendNotification(Oe.type, {
|
|
1268
654
|
files: [
|
|
1269
655
|
{
|
|
1270
|
-
oldUri:
|
|
1271
|
-
newUri:
|
|
656
|
+
oldUri: L(I),
|
|
657
|
+
newUri: L(d)
|
|
1272
658
|
}
|
|
1273
659
|
]
|
|
1274
660
|
});
|
|
1275
|
-
},
|
|
1276
|
-
var
|
|
1277
|
-
(
|
|
661
|
+
}, re = (I) => {
|
|
662
|
+
var d;
|
|
663
|
+
(d = A.current) == null || d.sendNotification(Te.type, {
|
|
1278
664
|
files: [
|
|
1279
665
|
{
|
|
1280
|
-
uri:
|
|
666
|
+
uri: L(I)
|
|
1281
667
|
}
|
|
1282
668
|
]
|
|
1283
669
|
});
|
|
1284
670
|
};
|
|
1285
|
-
return /* @__PURE__ */
|
|
1286
|
-
|
|
671
|
+
return /* @__PURE__ */ J(
|
|
672
|
+
ee.Provider,
|
|
1287
673
|
{
|
|
1288
674
|
value: {
|
|
1289
|
-
inited:
|
|
1290
|
-
clientRef:
|
|
1291
|
-
lastError:
|
|
1292
|
-
reload:
|
|
675
|
+
inited: m || !!F,
|
|
676
|
+
clientRef: A,
|
|
677
|
+
lastError: F,
|
|
678
|
+
reload: p
|
|
1293
679
|
},
|
|
1294
680
|
children: [
|
|
1295
|
-
|
|
1296
|
-
/* @__PURE__ */
|
|
681
|
+
t,
|
|
682
|
+
/* @__PURE__ */ S(on, { defaultZoom: i })
|
|
1297
683
|
]
|
|
1298
684
|
}
|
|
1299
685
|
);
|
|
1300
686
|
};
|
|
1301
|
-
function
|
|
1302
|
-
const
|
|
1303
|
-
if (
|
|
687
|
+
function Qn() {
|
|
688
|
+
const t = U(ee);
|
|
689
|
+
if (t === void 0)
|
|
1304
690
|
throw new Error("useLSP must be used within an LSPContext");
|
|
1305
|
-
return
|
|
691
|
+
return t;
|
|
1306
692
|
}
|
|
1307
|
-
const
|
|
693
|
+
const ne = z(
|
|
1308
694
|
void 0
|
|
1309
|
-
),
|
|
1310
|
-
const [
|
|
1311
|
-
return /* @__PURE__ */
|
|
1312
|
-
|
|
695
|
+
), et = Ie(({ children: t }) => {
|
|
696
|
+
const [e, n] = D(null);
|
|
697
|
+
return /* @__PURE__ */ S(
|
|
698
|
+
ne.Provider,
|
|
1313
699
|
{
|
|
1314
700
|
value: {
|
|
1315
|
-
editor:
|
|
1316
|
-
setEditor:
|
|
701
|
+
editor: e,
|
|
702
|
+
setEditor: n
|
|
1317
703
|
},
|
|
1318
|
-
children:
|
|
704
|
+
children: t
|
|
1319
705
|
}
|
|
1320
706
|
);
|
|
1321
707
|
});
|
|
1322
|
-
function
|
|
1323
|
-
const
|
|
1324
|
-
if (
|
|
1325
|
-
const [
|
|
708
|
+
function rn() {
|
|
709
|
+
const t = U(ne), e = D(null);
|
|
710
|
+
if (t === void 0) {
|
|
711
|
+
const [n, i] = e;
|
|
1326
712
|
return {
|
|
1327
|
-
editor:
|
|
713
|
+
editor: n,
|
|
1328
714
|
setEditor: i
|
|
1329
715
|
};
|
|
1330
716
|
}
|
|
1331
|
-
return
|
|
717
|
+
return t;
|
|
1332
718
|
}
|
|
1333
|
-
var
|
|
719
|
+
var te = {
|
|
1334
720
|
color: void 0,
|
|
1335
721
|
size: void 0,
|
|
1336
722
|
className: void 0,
|
|
1337
723
|
style: void 0,
|
|
1338
724
|
attr: void 0
|
|
1339
|
-
},
|
|
1340
|
-
return
|
|
1341
|
-
for (var
|
|
1342
|
-
|
|
1343
|
-
for (var
|
|
1344
|
-
Object.prototype.hasOwnProperty.call(
|
|
725
|
+
}, H = K.createContext && K.createContext(te), j = globalThis && globalThis.__assign || function() {
|
|
726
|
+
return j = Object.assign || function(t) {
|
|
727
|
+
for (var e, n = 1, i = arguments.length; n < i; n++) {
|
|
728
|
+
e = arguments[n];
|
|
729
|
+
for (var r in e)
|
|
730
|
+
Object.prototype.hasOwnProperty.call(e, r) && (t[r] = e[r]);
|
|
1345
731
|
}
|
|
1346
|
-
return
|
|
1347
|
-
},
|
|
1348
|
-
},
|
|
1349
|
-
var
|
|
1350
|
-
for (var i in
|
|
1351
|
-
Object.prototype.hasOwnProperty.call(
|
|
1352
|
-
if (
|
|
1353
|
-
for (var
|
|
1354
|
-
|
|
1355
|
-
return
|
|
732
|
+
return t;
|
|
733
|
+
}, j.apply(this, arguments);
|
|
734
|
+
}, sn = globalThis && globalThis.__rest || function(t, e) {
|
|
735
|
+
var n = {};
|
|
736
|
+
for (var i in t)
|
|
737
|
+
Object.prototype.hasOwnProperty.call(t, i) && e.indexOf(i) < 0 && (n[i] = t[i]);
|
|
738
|
+
if (t != null && typeof Object.getOwnPropertySymbols == "function")
|
|
739
|
+
for (var r = 0, i = Object.getOwnPropertySymbols(t); r < i.length; r++)
|
|
740
|
+
e.indexOf(i[r]) < 0 && Object.prototype.propertyIsEnumerable.call(t, i[r]) && (n[i[r]] = t[i[r]]);
|
|
741
|
+
return n;
|
|
1356
742
|
};
|
|
1357
|
-
function
|
|
1358
|
-
return
|
|
1359
|
-
return
|
|
1360
|
-
key:
|
|
1361
|
-
},
|
|
743
|
+
function ie(t) {
|
|
744
|
+
return t && t.map(function(e, n) {
|
|
745
|
+
return K.createElement(e.tag, j({
|
|
746
|
+
key: n
|
|
747
|
+
}, e.attr), ie(e.child));
|
|
1362
748
|
});
|
|
1363
749
|
}
|
|
1364
|
-
function
|
|
1365
|
-
return function(
|
|
1366
|
-
return
|
|
1367
|
-
attr:
|
|
1368
|
-
},
|
|
750
|
+
function oe(t) {
|
|
751
|
+
return function(e) {
|
|
752
|
+
return K.createElement(ln, j({
|
|
753
|
+
attr: j({}, t.attr)
|
|
754
|
+
}, e), ie(t.child));
|
|
1369
755
|
};
|
|
1370
756
|
}
|
|
1371
|
-
function
|
|
1372
|
-
var
|
|
1373
|
-
var i =
|
|
1374
|
-
return
|
|
757
|
+
function ln(t) {
|
|
758
|
+
var e = function(n) {
|
|
759
|
+
var i = t.attr, r = t.size, a = t.title, g = sn(t, ["attr", "size", "title"]), u = r || n.size || "1em", m;
|
|
760
|
+
return n.className && (m = n.className), t.className && (m = (m ? m + " " : "") + t.className), K.createElement("svg", j({
|
|
1375
761
|
stroke: "currentColor",
|
|
1376
762
|
fill: "currentColor",
|
|
1377
763
|
strokeWidth: "0"
|
|
1378
|
-
},
|
|
1379
|
-
className:
|
|
1380
|
-
style:
|
|
1381
|
-
color:
|
|
1382
|
-
},
|
|
1383
|
-
height:
|
|
1384
|
-
width:
|
|
764
|
+
}, n.attr, i, g, {
|
|
765
|
+
className: m,
|
|
766
|
+
style: j(j({
|
|
767
|
+
color: t.color || n.color
|
|
768
|
+
}, n.style), t.style),
|
|
769
|
+
height: u,
|
|
770
|
+
width: u,
|
|
1385
771
|
xmlns: "http://www.w3.org/2000/svg"
|
|
1386
|
-
}),
|
|
772
|
+
}), a && K.createElement("title", null, a), t.children);
|
|
1387
773
|
};
|
|
1388
|
-
return
|
|
1389
|
-
return n
|
|
1390
|
-
}) :
|
|
774
|
+
return H !== void 0 ? K.createElement(H.Consumer, null, function(n) {
|
|
775
|
+
return e(n);
|
|
776
|
+
}) : e(te);
|
|
1391
777
|
}
|
|
1392
|
-
function
|
|
1393
|
-
return
|
|
778
|
+
function an(t) {
|
|
779
|
+
return oe({ 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" } }] })(t);
|
|
1394
780
|
}
|
|
1395
|
-
function
|
|
1396
|
-
return
|
|
781
|
+
function gn(t) {
|
|
782
|
+
return oe({ 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" } }] })(t);
|
|
1397
783
|
}
|
|
1398
|
-
const
|
|
1399
|
-
const [
|
|
1400
|
-
|
|
1401
|
-
},
|
|
784
|
+
const cn = ({ lspProps: { lastError: t, reload: e } }) => {
|
|
785
|
+
const [n, i] = D(!1), r = () => {
|
|
786
|
+
e();
|
|
787
|
+
}, a = () => {
|
|
1402
788
|
i(!1);
|
|
1403
789
|
};
|
|
1404
|
-
return
|
|
1405
|
-
i(!!
|
|
1406
|
-
}, [
|
|
1407
|
-
/* @__PURE__ */
|
|
1408
|
-
/* @__PURE__ */
|
|
1409
|
-
/* @__PURE__ */
|
|
790
|
+
return O(() => {
|
|
791
|
+
i(!!t);
|
|
792
|
+
}, [t]), n ? /* @__PURE__ */ J("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: [
|
|
793
|
+
/* @__PURE__ */ J("span", { className: "flex flex-1 justify-center gap-1", children: [
|
|
794
|
+
/* @__PURE__ */ S(gn, { className: "h-4 w-4 text-yellow-600" }),
|
|
795
|
+
/* @__PURE__ */ J("span", { children: [
|
|
1410
796
|
"LSP not loaded.",
|
|
1411
797
|
" ",
|
|
1412
|
-
/* @__PURE__ */
|
|
798
|
+
/* @__PURE__ */ S(
|
|
1413
799
|
"button",
|
|
1414
800
|
{
|
|
1415
801
|
className: "text-primary-dark underline",
|
|
1416
|
-
onClick:
|
|
802
|
+
onClick: r,
|
|
1417
803
|
children: "Reload?"
|
|
1418
804
|
}
|
|
1419
805
|
)
|
|
1420
806
|
] })
|
|
1421
807
|
] }),
|
|
1422
|
-
/* @__PURE__ */
|
|
1423
|
-
|
|
808
|
+
/* @__PURE__ */ S("button", { className: "focus:outline-none", children: /* @__PURE__ */ S(
|
|
809
|
+
an,
|
|
1424
810
|
{
|
|
1425
811
|
className: "h-4 w-4 text-white",
|
|
1426
|
-
onClick:
|
|
812
|
+
onClick: a
|
|
1427
813
|
}
|
|
1428
814
|
) })
|
|
1429
815
|
] }) : null;
|
|
1430
|
-
},
|
|
1431
|
-
provideCompletionItems: (
|
|
1432
|
-
const
|
|
816
|
+
}, In = {
|
|
817
|
+
provideCompletionItems: (t, e) => {
|
|
818
|
+
const n = t.getWordUntilPosition(e);
|
|
1433
819
|
return {
|
|
1434
820
|
suggestions: [
|
|
1435
821
|
{
|
|
1436
822
|
label: "device:xs",
|
|
1437
|
-
kind:
|
|
823
|
+
kind: o.languages.CompletionItemKind.Snippet,
|
|
1438
824
|
documentation: "Media query for phone device",
|
|
1439
|
-
range: new
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
825
|
+
range: new o.Range(
|
|
826
|
+
e.lineNumber,
|
|
827
|
+
n.startColumn,
|
|
828
|
+
e.lineNumber,
|
|
829
|
+
n.endColumn
|
|
1444
830
|
),
|
|
1445
831
|
insertText: [
|
|
1446
832
|
"@media screen and (max-width: ${1:365px}) {",
|
|
@@ -1450,12 +836,12 @@ const _n = ({ lspProps: { lastError: r, reload: n } }) => {
|
|
|
1450
836
|
"}"
|
|
1451
837
|
].join(`
|
|
1452
838
|
`),
|
|
1453
|
-
insertTextRules:
|
|
839
|
+
insertTextRules: o.languages.CompletionItemInsertTextRule.InsertAsSnippet
|
|
1454
840
|
}
|
|
1455
841
|
]
|
|
1456
842
|
};
|
|
1457
843
|
}
|
|
1458
|
-
},
|
|
844
|
+
}, dn = "#/definitions/Condition", un = {
|
|
1459
845
|
Base: {
|
|
1460
846
|
type: "object",
|
|
1461
847
|
properties: {
|
|
@@ -1723,114 +1109,114 @@ const _n = ({ lspProps: { lastError: r, reload: n } }) => {
|
|
|
1723
1109
|
"ref"
|
|
1724
1110
|
]
|
|
1725
1111
|
}
|
|
1726
|
-
},
|
|
1727
|
-
$ref:
|
|
1728
|
-
definitions:
|
|
1112
|
+
}, Cn = {
|
|
1113
|
+
$ref: dn,
|
|
1114
|
+
definitions: un
|
|
1729
1115
|
};
|
|
1730
|
-
function
|
|
1731
|
-
const
|
|
1732
|
-
|
|
1116
|
+
function mn(t, e) {
|
|
1117
|
+
const n = document.createElement("style");
|
|
1118
|
+
n.dataset.id = e, n.textContent = t, document.head.append(n);
|
|
1733
1119
|
}
|
|
1734
|
-
function
|
|
1120
|
+
function fn(t) {
|
|
1735
1121
|
return Array.from(document.styleSheets).find(
|
|
1736
|
-
(
|
|
1122
|
+
(e) => e.ownerNode.getAttribute("data-id") === t
|
|
1737
1123
|
);
|
|
1738
1124
|
}
|
|
1739
|
-
function
|
|
1740
|
-
const
|
|
1125
|
+
function An(t, e) {
|
|
1126
|
+
const n = [];
|
|
1741
1127
|
let i = [];
|
|
1742
|
-
const
|
|
1743
|
-
|
|
1744
|
-
startLineNumber:
|
|
1745
|
-
endLineNumber:
|
|
1746
|
-
startColumn:
|
|
1747
|
-
endColumn:
|
|
1748
|
-
}), h(),
|
|
1749
|
-
},
|
|
1750
|
-
|
|
1751
|
-
},
|
|
1752
|
-
const
|
|
1753
|
-
|
|
1754
|
-
},
|
|
1755
|
-
for (const
|
|
1128
|
+
const r = [], a = (s, l, w, R) => {
|
|
1129
|
+
n.push({
|
|
1130
|
+
startLineNumber: s,
|
|
1131
|
+
endLineNumber: w,
|
|
1132
|
+
startColumn: l,
|
|
1133
|
+
endColumn: R
|
|
1134
|
+
}), h(), m();
|
|
1135
|
+
}, g = (s) => {
|
|
1136
|
+
r.indexOf(s) < 0 && r.push(s);
|
|
1137
|
+
}, u = (s) => {
|
|
1138
|
+
const l = r.indexOf(s);
|
|
1139
|
+
l < 0 || r.splice(l, 1);
|
|
1140
|
+
}, m = () => {
|
|
1141
|
+
for (const s of r)
|
|
1756
1142
|
try {
|
|
1757
|
-
|
|
1758
|
-
} catch (
|
|
1759
|
-
console.error(
|
|
1143
|
+
s(i);
|
|
1144
|
+
} catch (l) {
|
|
1145
|
+
console.error(l);
|
|
1760
1146
|
}
|
|
1761
1147
|
}, h = () => {
|
|
1762
|
-
const
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
|
|
1766
|
-
lineNumber:
|
|
1767
|
-
column:
|
|
1148
|
+
const s = t.getModel();
|
|
1149
|
+
s && (i = bn(
|
|
1150
|
+
n.map((l) => [
|
|
1151
|
+
s.getOffsetAt({
|
|
1152
|
+
lineNumber: l.startLineNumber,
|
|
1153
|
+
column: l.startColumn
|
|
1768
1154
|
}),
|
|
1769
|
-
|
|
1770
|
-
lineNumber:
|
|
1771
|
-
column:
|
|
1155
|
+
s.getOffsetAt({
|
|
1156
|
+
lineNumber: l.endLineNumber,
|
|
1157
|
+
column: l.endColumn
|
|
1772
1158
|
})
|
|
1773
1159
|
]),
|
|
1774
1160
|
/*mergeJoins*/
|
|
1775
1161
|
!0
|
|
1776
|
-
), i.length > 0 && (i[0][0] <= 0 && (i[0][0] = Number.NEGATIVE_INFINITY), i[i.length - 1][1] >=
|
|
1777
|
-
},
|
|
1778
|
-
const
|
|
1162
|
+
), i.length > 0 && (i[0][0] <= 0 && (i[0][0] = Number.NEGATIVE_INFINITY), i[i.length - 1][1] >= s.getValueLength() && (i[i.length - 1][1] = Number.POSITIVE_INFINITY)));
|
|
1163
|
+
}, F = (s) => {
|
|
1164
|
+
const l = {
|
|
1779
1165
|
isDeletion: !1,
|
|
1780
1166
|
isAddition: !1,
|
|
1781
1167
|
isReplacement: !1
|
|
1782
1168
|
};
|
|
1783
|
-
return
|
|
1784
|
-
}, y =
|
|
1785
|
-
h(),
|
|
1786
|
-
}),
|
|
1787
|
-
if (!
|
|
1788
|
-
for (const
|
|
1789
|
-
const
|
|
1790
|
-
if (
|
|
1791
|
-
const
|
|
1792
|
-
(
|
|
1793
|
-
),
|
|
1794
|
-
if (
|
|
1795
|
-
const
|
|
1796
|
-
if (
|
|
1797
|
-
|
|
1169
|
+
return s.text === "" ? l.isDeletion = !0 : s.range.startLineNumber === s.range.endLineNumber && s.range.startColumn === s.range.endColumn ? l.isAddition = !0 : l.isReplacement = !0, l;
|
|
1170
|
+
}, y = t.onDidChangeModel((s) => {
|
|
1171
|
+
h(), c();
|
|
1172
|
+
}), A = t.onDidChangeModelContent((s) => {
|
|
1173
|
+
if (!s.isUndoing)
|
|
1174
|
+
for (const l of s.changes) {
|
|
1175
|
+
const w = F(l);
|
|
1176
|
+
if (w.isReplacement || w.isDeletion || w.isAddition) {
|
|
1177
|
+
const R = n.some(
|
|
1178
|
+
(W) => l.range.startLineNumber >= W.startLineNumber && l.range.endLineNumber <= W.endLineNumber && l.range.startColumn >= W.startColumn && l.range.endColumn <= W.endColumn
|
|
1179
|
+
), k = !R && e && l.range.startLineNumber === 1 && l.range.startColumn === 1 && !_(l.text);
|
|
1180
|
+
if (R || k) {
|
|
1181
|
+
const W = t.getModel();
|
|
1182
|
+
if (W) {
|
|
1183
|
+
W.undo();
|
|
1798
1184
|
return;
|
|
1799
1185
|
}
|
|
1800
1186
|
}
|
|
1801
1187
|
}
|
|
1802
1188
|
}
|
|
1803
|
-
}),
|
|
1804
|
-
y.dispose(),
|
|
1189
|
+
}), b = () => {
|
|
1190
|
+
y.dispose(), A.dispose();
|
|
1805
1191
|
};
|
|
1806
|
-
let
|
|
1192
|
+
let v = [], p = `
|
|
1807
1193
|
.idoc-readonly-mark {
|
|
1808
1194
|
cursor: not-allowed;
|
|
1809
1195
|
z-index: 1;
|
|
1810
1196
|
}
|
|
1811
1197
|
`;
|
|
1812
|
-
if (
|
|
1813
|
-
const
|
|
1814
|
-
|
|
1198
|
+
if (p) {
|
|
1199
|
+
const s = "monaco-read-only";
|
|
1200
|
+
fn(s) || mn(p, s), p = null;
|
|
1815
1201
|
}
|
|
1816
|
-
const
|
|
1817
|
-
|
|
1818
|
-
},
|
|
1819
|
-
|
|
1820
|
-
},
|
|
1821
|
-
const
|
|
1822
|
-
|
|
1823
|
-
|
|
1824
|
-
i.map(
|
|
1202
|
+
const N = () => {
|
|
1203
|
+
g(c), c();
|
|
1204
|
+
}, f = () => {
|
|
1205
|
+
u(c), v = t.deltaDecorations(v, []);
|
|
1206
|
+
}, c = () => {
|
|
1207
|
+
const s = t.getModel();
|
|
1208
|
+
s && (v = t.deltaDecorations(
|
|
1209
|
+
v,
|
|
1210
|
+
i.map(X(s))
|
|
1825
1211
|
));
|
|
1826
|
-
},
|
|
1827
|
-
const
|
|
1212
|
+
}, X = (s) => (l) => {
|
|
1213
|
+
const w = s.getPositionAt(l[0]), R = s.getPositionAt(l[1]);
|
|
1828
1214
|
return {
|
|
1829
|
-
range: new
|
|
1830
|
-
|
|
1831
|
-
|
|
1832
|
-
|
|
1833
|
-
|
|
1215
|
+
range: new o.Range(
|
|
1216
|
+
w.lineNumber,
|
|
1217
|
+
w.column,
|
|
1218
|
+
R.lineNumber,
|
|
1219
|
+
R.column
|
|
1834
1220
|
),
|
|
1835
1221
|
options: {
|
|
1836
1222
|
className: "idoc-readonly-mark"
|
|
@@ -1841,117 +1227,117 @@ function jn(r, n) {
|
|
|
1841
1227
|
get buffer() {
|
|
1842
1228
|
return i;
|
|
1843
1229
|
},
|
|
1844
|
-
exclude:
|
|
1845
|
-
attach:
|
|
1846
|
-
detach:
|
|
1847
|
-
dispose:
|
|
1848
|
-
show:
|
|
1849
|
-
hide:
|
|
1230
|
+
exclude: a,
|
|
1231
|
+
attach: g,
|
|
1232
|
+
detach: u,
|
|
1233
|
+
dispose: b,
|
|
1234
|
+
show: N,
|
|
1235
|
+
hide: f
|
|
1850
1236
|
};
|
|
1851
1237
|
}
|
|
1852
|
-
function
|
|
1238
|
+
function pn(t, e, n) {
|
|
1853
1239
|
let i = !1;
|
|
1854
|
-
const
|
|
1855
|
-
let
|
|
1856
|
-
const
|
|
1857
|
-
let h,
|
|
1858
|
-
y =
|
|
1859
|
-
for (
|
|
1860
|
-
for (
|
|
1861
|
-
if (y =
|
|
1862
|
-
|
|
1863
|
-
[
|
|
1864
|
-
[
|
|
1240
|
+
const r = (f) => f[1] < f[0] ? (i = !0, [[f[1], f[0]]]) : [[...f]], a = (f) => i ? f.map((c) => c[1] > c[0] ? u(c) : c).reverse() : f;
|
|
1241
|
+
let g;
|
|
1242
|
+
const u = (f) => (g = f[1], f[1] = f[0], f[0] = g, f), m = r(t);
|
|
1243
|
+
let h, F, y, A, b, v, p, N;
|
|
1244
|
+
y = m[0];
|
|
1245
|
+
for (F of e)
|
|
1246
|
+
for (p = F[0], N = F[1], A = 0; A < m.length; A++) {
|
|
1247
|
+
if (y = m[A], b = y[0], v = y[1], b < p)
|
|
1248
|
+
v < p ? h = [y] : v <= N ? h = [[b, p - 1]] : h = [
|
|
1249
|
+
[b, p - 1],
|
|
1250
|
+
[N + 1, v]
|
|
1865
1251
|
];
|
|
1866
|
-
else if (
|
|
1867
|
-
if (
|
|
1868
|
-
const
|
|
1869
|
-
h =
|
|
1252
|
+
else if (b <= N)
|
|
1253
|
+
if (p === Number.NEGATIVE_INFINITY) {
|
|
1254
|
+
const f = N + 1;
|
|
1255
|
+
h = n === 0 ? [] : [[f, v > f ? v : f]];
|
|
1870
1256
|
} else
|
|
1871
|
-
|
|
1257
|
+
N === Number.POSITIVE_INFINITY ? h = n === 0 ? [] : [[p - 1, p - 1]] : v <= N ? h = n < 0 ? [[p - 1, p - 1]] : n > 0 ? [[N + 1, N + 1]] : [] : h = [[N + 1, v]];
|
|
1872
1258
|
else
|
|
1873
1259
|
h = [y];
|
|
1874
|
-
if (
|
|
1875
|
-
return
|
|
1260
|
+
if (m.splice(A, 1, ...h), m.length === 1 && m[0][1] < p)
|
|
1261
|
+
return a(m);
|
|
1876
1262
|
}
|
|
1877
|
-
return
|
|
1263
|
+
return a(m);
|
|
1878
1264
|
}
|
|
1879
|
-
function
|
|
1880
|
-
if (
|
|
1881
|
-
return
|
|
1882
|
-
const
|
|
1883
|
-
let i = null,
|
|
1884
|
-
|
|
1885
|
-
(
|
|
1886
|
-
).sort((
|
|
1887
|
-
for (let
|
|
1888
|
-
i =
|
|
1889
|
-
return
|
|
1265
|
+
function bn(t, e) {
|
|
1266
|
+
if (t.length < 2)
|
|
1267
|
+
return t;
|
|
1268
|
+
const n = [];
|
|
1269
|
+
let i = null, r, a;
|
|
1270
|
+
t = t.map(
|
|
1271
|
+
(g) => (g[1] < g[0] && (r = g[1], g[1] = g[0], g[1] = r), g)
|
|
1272
|
+
).sort((g, u) => g[0] - u[0]), n.push(t[0]);
|
|
1273
|
+
for (let g = 1; g < t.length; g++)
|
|
1274
|
+
i = n[n.length - 1], a = t[g], i[1] === a[0] && !e ? n.push(a) : i[1] === a[0] - 1 && e ? (i[1] = a[1], n.splice(n.length - 1, 1, i)) : i[1] < a[0] ? n.push(a) : i[1] < a[1] && (i[1] = a[1], n.splice(n.length - 1, 1, i));
|
|
1275
|
+
return n;
|
|
1890
1276
|
}
|
|
1891
|
-
function
|
|
1892
|
-
return
|
|
1277
|
+
function T(t, e) {
|
|
1278
|
+
return e.bind(t);
|
|
1893
1279
|
}
|
|
1894
|
-
class
|
|
1895
|
-
constructor(
|
|
1896
|
-
|
|
1897
|
-
|
|
1898
|
-
|
|
1280
|
+
class hn {
|
|
1281
|
+
constructor(e, n) {
|
|
1282
|
+
x(this, "editor");
|
|
1283
|
+
x(this, "intervals");
|
|
1284
|
+
x(this, "disposables", []);
|
|
1899
1285
|
/**
|
|
1900
1286
|
* Flag for `excludeIntervals`
|
|
1901
1287
|
*/
|
|
1902
|
-
|
|
1903
|
-
|
|
1288
|
+
x(this, "prefer", 1);
|
|
1289
|
+
x(this, "lastPrefer", 1);
|
|
1904
1290
|
/**
|
|
1905
1291
|
* Linked to ICodeEditor.onDidChangeCursorPosition event.
|
|
1906
1292
|
*/
|
|
1907
|
-
|
|
1293
|
+
x(this, "onCursor", T(
|
|
1908
1294
|
this,
|
|
1909
|
-
function(
|
|
1910
|
-
if (
|
|
1295
|
+
function(e) {
|
|
1296
|
+
if (e.source === "api")
|
|
1911
1297
|
return;
|
|
1912
|
-
const
|
|
1913
|
-
|
|
1298
|
+
const n = this.getApprovedSelections();
|
|
1299
|
+
n.length !== 0 && this.editor.setSelections(n);
|
|
1914
1300
|
}
|
|
1915
1301
|
));
|
|
1916
|
-
|
|
1917
|
-
|
|
1302
|
+
x(this, "onRectangleSelectionStart", T(this, function({ event: e }) {
|
|
1303
|
+
e.middleButton && (this.lastPrefer = this.prefer, this.prefer = 0, window.addEventListener("pointerup", this.onRectangleSelectionStop));
|
|
1918
1304
|
}));
|
|
1919
|
-
|
|
1305
|
+
x(this, "onRectangleSelectionStop", T(this, function() {
|
|
1920
1306
|
this.prefer = this.lastPrefer, window.removeEventListener("pointerup", this.onRectangleSelectionStop);
|
|
1921
1307
|
}));
|
|
1922
1308
|
/**
|
|
1923
1309
|
* Linked to ICodeEditor.onKeyDown event.
|
|
1924
1310
|
*/
|
|
1925
|
-
|
|
1926
|
-
const
|
|
1927
|
-
if (
|
|
1311
|
+
x(this, "onKey", T(this, function(e) {
|
|
1312
|
+
const n = e.keyCode, i = o.KeyCode;
|
|
1313
|
+
if (e.altKey || i.F1 <= n && n <= i.F19 || e.ctrlKey && n !== i.Backspace)
|
|
1928
1314
|
return;
|
|
1929
|
-
if (
|
|
1315
|
+
if (n === i.UpArrow || n === i.LeftArrow || n === i.Home || n === i.PageUp) {
|
|
1930
1316
|
this.prefer = -1;
|
|
1931
1317
|
return;
|
|
1932
1318
|
}
|
|
1933
|
-
if (
|
|
1319
|
+
if (n === i.DownArrow || n === i.RightArrow || n === i.End || n === i.PageDown) {
|
|
1934
1320
|
this.prefer = 1;
|
|
1935
1321
|
return;
|
|
1936
1322
|
}
|
|
1937
|
-
const
|
|
1938
|
-
let
|
|
1939
|
-
if (
|
|
1940
|
-
|
|
1941
|
-
else if (
|
|
1942
|
-
|
|
1323
|
+
const r = this.getSelections(), a = this.intervals.buffer;
|
|
1324
|
+
let g;
|
|
1325
|
+
if (n === i.Delete)
|
|
1326
|
+
g = (u) => u[0] === u[1] && a.find((m) => u[1] + 1 === m[0]) != null;
|
|
1327
|
+
else if (n === i.Backspace)
|
|
1328
|
+
g = (u) => u[0] === u[1] && a.find((m) => m[1] + 1 === u[0]) != null;
|
|
1943
1329
|
else
|
|
1944
1330
|
return;
|
|
1945
|
-
|
|
1331
|
+
r.findIndex(g) !== -1 && (e.stopPropagation(), e.preventDefault());
|
|
1946
1332
|
}));
|
|
1947
|
-
|
|
1948
|
-
let
|
|
1333
|
+
x(this, "getOffsetAt", T(this, function(e) {
|
|
1334
|
+
let n;
|
|
1949
1335
|
for (let i = 0; i < this.intervals.buffer.length; i++)
|
|
1950
|
-
if (
|
|
1951
|
-
return
|
|
1336
|
+
if (n = this.intervals.buffer[i], e <= n[1])
|
|
1337
|
+
return n[0] - e < e - n[1] ? n[0] : n[1];
|
|
1952
1338
|
}));
|
|
1953
1339
|
var i;
|
|
1954
|
-
this.editor =
|
|
1340
|
+
this.editor = e, this.intervals = An(e, n), (i = this.editor.getModel()) == null || i.setEOL(o.editor.EndOfLineSequence.LF);
|
|
1955
1341
|
}
|
|
1956
1342
|
enable() {
|
|
1957
1343
|
this.disposables.push(
|
|
@@ -1961,151 +1347,200 @@ class Dn {
|
|
|
1961
1347
|
), this.intervals.show();
|
|
1962
1348
|
}
|
|
1963
1349
|
dispose() {
|
|
1964
|
-
for (const
|
|
1965
|
-
|
|
1350
|
+
for (const e of this.disposables)
|
|
1351
|
+
e.dispose();
|
|
1966
1352
|
this.disposables.splice(0);
|
|
1967
1353
|
}
|
|
1968
|
-
exclude(
|
|
1969
|
-
arguments.length === 1 ? this.intervals.exclude(
|
|
1354
|
+
exclude(e, n, i, r) {
|
|
1355
|
+
arguments.length === 1 ? this.intervals.exclude(e, 0, e, Number.MAX_SAFE_INTEGER) : this.intervals.exclude(e, n, i, r);
|
|
1970
1356
|
}
|
|
1971
1357
|
getApprovedSelections() {
|
|
1972
|
-
const
|
|
1358
|
+
const e = this.editor.getModel();
|
|
1973
1359
|
return this.getSelections().map(
|
|
1974
|
-
(i) =>
|
|
1360
|
+
(i) => pn(
|
|
1975
1361
|
i,
|
|
1976
1362
|
this.intervals.buffer,
|
|
1977
1363
|
this.prefer
|
|
1978
1364
|
)
|
|
1979
1365
|
).flat().map((i) => {
|
|
1980
|
-
const
|
|
1981
|
-
return new
|
|
1982
|
-
|
|
1983
|
-
|
|
1984
|
-
|
|
1985
|
-
|
|
1366
|
+
const r = e.getPositionAt(i[0]), a = e.getPositionAt(i[1]);
|
|
1367
|
+
return new o.Selection(
|
|
1368
|
+
r.lineNumber,
|
|
1369
|
+
r.column,
|
|
1370
|
+
a.lineNumber,
|
|
1371
|
+
a.column
|
|
1986
1372
|
);
|
|
1987
1373
|
});
|
|
1988
1374
|
}
|
|
1989
1375
|
getSelections() {
|
|
1990
|
-
const
|
|
1991
|
-
return (this.editor.getSelections() || []).map((
|
|
1992
|
-
|
|
1993
|
-
lineNumber:
|
|
1994
|
-
column:
|
|
1376
|
+
const e = this.editor.getModel();
|
|
1377
|
+
return (this.editor.getSelections() || []).map((n) => [
|
|
1378
|
+
e.getOffsetAt({
|
|
1379
|
+
lineNumber: n.selectionStartLineNumber,
|
|
1380
|
+
column: n.selectionStartColumn
|
|
1995
1381
|
}),
|
|
1996
|
-
|
|
1997
|
-
lineNumber:
|
|
1998
|
-
column:
|
|
1382
|
+
e.getOffsetAt({
|
|
1383
|
+
lineNumber: n.positionLineNumber,
|
|
1384
|
+
column: n.positionColumn
|
|
1999
1385
|
})
|
|
2000
1386
|
]);
|
|
2001
1387
|
}
|
|
2002
1388
|
}
|
|
2003
|
-
const
|
|
2004
|
-
/* @__PURE__ */
|
|
2005
|
-
/* @__PURE__ */
|
|
2006
|
-
/* @__PURE__ */
|
|
2007
|
-
/* @__PURE__ */
|
|
2008
|
-
/* @__PURE__ */
|
|
2009
|
-
] }) }) }),
|
|
2010
|
-
path:
|
|
2011
|
-
initialValue:
|
|
2012
|
-
theme:
|
|
1389
|
+
const vn = new RegExp("^[ s]+(exposed|Function)", "i"), $ = () => /* @__PURE__ */ S("div", { className: "absolute inset-0 animate-pulse", children: /* @__PURE__ */ S("div", { className: "w-full space-y-4 px-4 py-1", children: /* @__PURE__ */ J("div", { className: "space-y-2", children: [
|
|
1390
|
+
/* @__PURE__ */ S("div", { className: "h-3 w-3/4 rounded bg-grey-200" }),
|
|
1391
|
+
/* @__PURE__ */ S("div", { className: "h-3 rounded bg-grey-200" }),
|
|
1392
|
+
/* @__PURE__ */ S("div", { className: "h-3 w-5/6 rounded bg-grey-200" }),
|
|
1393
|
+
/* @__PURE__ */ S("div", { className: "h-3 rounded bg-grey-200" }),
|
|
1394
|
+
/* @__PURE__ */ S("div", { className: "h-3 rounded bg-grey-200" })
|
|
1395
|
+
] }) }) }), nt = ({
|
|
1396
|
+
path: t,
|
|
1397
|
+
initialValue: e,
|
|
1398
|
+
theme: n = "fd-dark",
|
|
2013
1399
|
type: i,
|
|
2014
|
-
language:
|
|
2015
|
-
onChange:
|
|
2016
|
-
options:
|
|
2017
|
-
extra:
|
|
2018
|
-
showAlerts:
|
|
1400
|
+
language: r,
|
|
1401
|
+
onChange: a,
|
|
1402
|
+
options: g = {},
|
|
1403
|
+
extra: u = {},
|
|
1404
|
+
showAlerts: m = !1,
|
|
2019
1405
|
lspProps: h,
|
|
2020
|
-
...
|
|
1406
|
+
...F
|
|
2021
1407
|
}) => {
|
|
2022
|
-
const { initialLineInfo: y, initialSelectionInfo:
|
|
2023
|
-
function
|
|
2024
|
-
|
|
1408
|
+
const { initialLineInfo: y, initialSelectionInfo: A } = u, { editor: b, setEditor: v } = rn(), { inited: p } = h;
|
|
1409
|
+
function N(c) {
|
|
1410
|
+
r === "css" && c.languages.registerCompletionItemProvider("css", In), r === "json" && c.languages.json && c.languages.json.jsonDefaults.setDiagnosticsOptions({
|
|
2025
1411
|
validate: !0,
|
|
2026
1412
|
schemas: [
|
|
2027
1413
|
{
|
|
2028
1414
|
uri: "condition-schema.json",
|
|
2029
1415
|
fileMatch: ["*.condition.json"],
|
|
2030
|
-
schema:
|
|
1416
|
+
schema: Cn
|
|
2031
1417
|
}
|
|
2032
1418
|
]
|
|
2033
1419
|
});
|
|
2034
1420
|
}
|
|
2035
|
-
function
|
|
2036
|
-
|
|
2037
|
-
const
|
|
2038
|
-
if (
|
|
2039
|
-
var
|
|
2040
|
-
const
|
|
2041
|
-
if (
|
|
2042
|
-
const
|
|
2043
|
-
|
|
1421
|
+
function f(c, X) {
|
|
1422
|
+
v(c);
|
|
1423
|
+
const s = c.getModel();
|
|
1424
|
+
if (s && (s.updateOptions({ insertSpaces: !1 }), c.onKeyUp(() => {
|
|
1425
|
+
var w;
|
|
1426
|
+
const l = (w = c.getPosition()) == null ? void 0 : w.lineNumber;
|
|
1427
|
+
if (l) {
|
|
1428
|
+
const R = s.getLineFirstNonWhitespaceColumn(l), k = s.getLineLength(l), W = s.getLineContent(l);
|
|
1429
|
+
vn.test(W) && c.executeEdits("edit-handler", [
|
|
2044
1430
|
{
|
|
2045
|
-
range: new
|
|
2046
|
-
|
|
1431
|
+
range: new X.Range(
|
|
1432
|
+
l,
|
|
2047
1433
|
0,
|
|
2048
|
-
|
|
2049
|
-
|
|
1434
|
+
l,
|
|
1435
|
+
k
|
|
2050
1436
|
),
|
|
2051
|
-
text:
|
|
2052
|
-
|
|
2053
|
-
|
|
1437
|
+
text: W.substr(
|
|
1438
|
+
R - 1,
|
|
1439
|
+
k - R
|
|
2054
1440
|
)
|
|
2055
1441
|
}
|
|
2056
1442
|
]);
|
|
2057
1443
|
}
|
|
2058
|
-
})), i ===
|
|
2059
|
-
const
|
|
2060
|
-
|
|
1444
|
+
})), i === fe.METHOD && _(e)) {
|
|
1445
|
+
const l = new hn(c, !0);
|
|
1446
|
+
l.exclude(1, 1, 1, Number.POSITIVE_INFINITY), l.enable();
|
|
2061
1447
|
}
|
|
2062
1448
|
}
|
|
2063
|
-
return
|
|
2064
|
-
if (!
|
|
1449
|
+
return O(() => {
|
|
1450
|
+
if (!b)
|
|
2065
1451
|
return;
|
|
2066
|
-
const { line:
|
|
2067
|
-
|
|
2068
|
-
}, [y,
|
|
2069
|
-
if (!
|
|
1452
|
+
const { line: c, offset: X } = y || {};
|
|
1453
|
+
c && Qe(b, c, X);
|
|
1454
|
+
}, [y, b]), O(() => {
|
|
1455
|
+
if (!b)
|
|
2070
1456
|
return;
|
|
2071
|
-
const { selection:
|
|
2072
|
-
|
|
2073
|
-
}, [
|
|
2074
|
-
|
|
2075
|
-
/* @__PURE__ */
|
|
2076
|
-
|
|
1457
|
+
const { selection: c } = A || {};
|
|
1458
|
+
c && qe(b, c);
|
|
1459
|
+
}, [A, b]), p ? /* @__PURE__ */ J(ce, { children: [
|
|
1460
|
+
m ? /* @__PURE__ */ S(cn, { lspProps: h }) : null,
|
|
1461
|
+
/* @__PURE__ */ S(
|
|
1462
|
+
Ce,
|
|
2077
1463
|
{
|
|
2078
1464
|
options: {
|
|
2079
1465
|
readOnly: !0,
|
|
2080
1466
|
fontSize: 12,
|
|
2081
1467
|
"semanticHighlighting.enabled": !0,
|
|
2082
1468
|
padding: { top: 10 },
|
|
2083
|
-
...
|
|
1469
|
+
...g
|
|
2084
1470
|
},
|
|
2085
|
-
path:
|
|
2086
|
-
value:
|
|
1471
|
+
path: L(t),
|
|
1472
|
+
value: e,
|
|
2087
1473
|
theme: "fd-dark",
|
|
2088
|
-
onChange: (
|
|
2089
|
-
language:
|
|
2090
|
-
beforeMount:
|
|
2091
|
-
onMount:
|
|
2092
|
-
loading: /* @__PURE__ */
|
|
2093
|
-
...
|
|
1474
|
+
onChange: (c) => a && a(c || ""),
|
|
1475
|
+
language: r,
|
|
1476
|
+
beforeMount: N,
|
|
1477
|
+
onMount: f,
|
|
1478
|
+
loading: /* @__PURE__ */ S($, {}),
|
|
1479
|
+
...F
|
|
2094
1480
|
}
|
|
2095
1481
|
)
|
|
2096
|
-
] }) : /* @__PURE__ */
|
|
2097
|
-
}
|
|
1482
|
+
] }) : /* @__PURE__ */ S($, {});
|
|
1483
|
+
}, Sn = {
|
|
1484
|
+
name: "4d",
|
|
1485
|
+
displayName: "%displayName%",
|
|
1486
|
+
description: "%description%",
|
|
1487
|
+
version: "1.0.0",
|
|
1488
|
+
publisher: "vscode",
|
|
1489
|
+
engines: { vscode: "0.10.x" },
|
|
1490
|
+
categories: ["Programming Languages"],
|
|
1491
|
+
contributes: {
|
|
1492
|
+
languages: [
|
|
1493
|
+
{
|
|
1494
|
+
id: "4d",
|
|
1495
|
+
aliases: ["4D", "4d"],
|
|
1496
|
+
extensions: [".4dm", ".4qs"],
|
|
1497
|
+
configuration: "./language-configuration.json"
|
|
1498
|
+
}
|
|
1499
|
+
],
|
|
1500
|
+
grammars: [
|
|
1501
|
+
{
|
|
1502
|
+
language: "4d",
|
|
1503
|
+
scopeName: "source.4dm",
|
|
1504
|
+
path: "./syntaxes/4d.tmLanguage.json"
|
|
1505
|
+
}
|
|
1506
|
+
]
|
|
1507
|
+
}
|
|
1508
|
+
}, { registerFileUrl: V, whenReady: tt } = Ye(Sn, void 0, {
|
|
1509
|
+
system: !0
|
|
1510
|
+
});
|
|
1511
|
+
V(
|
|
1512
|
+
"./syntaxes/4d.tmLanguage.json",
|
|
1513
|
+
new URL("data:application/json;base64,ewogICJuYW1lIjogIjREIiwKICAic2NvcGVOYW1lIjogInNvdXJjZS40ZG0iLAogICJwYXR0ZXJucyI6IFsKICAgIHsKICAgICAgImluY2x1ZGUiOiAiI3N0YXRlbWVudHMiCiAgICB9CiAgXSwKICAicmVwb3NpdG9yeSI6IHsKICAgICJzdGF0ZW1lbnRzIjogewogICAgICAicGF0dGVybnMiOiBbCiAgICAgICAgewogICAgICAgICAgImluY2x1ZGUiOiAiI2NvbW1lbnQiCiAgICAgICAgfQogICAgICBdCiAgICB9LAogICAgImNvbW1lbnQiOiB7CiAgICAgICJwYXR0ZXJucyI6IFsKICAgICAgICB7CiAgICAgICAgICAibmFtZSI6ICJjb21tZW50LmJsb2NrLjRkIiwKICAgICAgICAgICJiZWdpbiI6ICIoL1xcKikoPzpcXHMqKChAKWludGVybmFsKSg/PVxcc3woXFwqLykpKT8iLAogICAgICAgICAgImJlZ2luQ2FwdHVyZXMiOiB7CiAgICAgICAgICAgICIxIjogewogICAgICAgICAgICAgICJuYW1lIjogInB1bmN0dWF0aW9uLmRlZmluaXRpb24uY29tbWVudC40ZCIKICAgICAgICAgICAgfSwKICAgICAgICAgICAgIjIiOiB7CiAgICAgICAgICAgICAgIm5hbWUiOiAic3RvcmFnZS50eXBlLmludGVybmFsZGVjbGFyYXRpb24uNGQiCiAgICAgICAgICAgIH0sCiAgICAgICAgICAgICIzIjogewogICAgICAgICAgICAgICJuYW1lIjogInB1bmN0dWF0aW9uLmRlY29yYXRvci5pbnRlcm5hbGRlY2xhcmF0aW9uLjRkIgogICAgICAgICAgICB9CiAgICAgICAgICB9LAogICAgICAgICAgImVuZCI6ICJcXCovIiwKICAgICAgICAgICJlbmRDYXB0dXJlcyI6IHsKICAgICAgICAgICAgIjAiOiB7CiAgICAgICAgICAgICAgIm5hbWUiOiAicHVuY3R1YXRpb24uZGVmaW5pdGlvbi5jb21tZW50LjRkIgogICAgICAgICAgICB9CiAgICAgICAgICB9CiAgICAgICAgfSwKICAgICAgICB7CiAgICAgICAgICAiYmVnaW4iOiAiKF5bIFxcdF0rKT8oKC8vKSg/OlxccyooKEApaW50ZXJuYWwpKD89XFxzfCQpKT8pIiwKICAgICAgICAgICJiZWdpbkNhcHR1cmVzIjogewogICAgICAgICAgICAiMSI6IHsKICAgICAgICAgICAgICAibmFtZSI6ICJwdW5jdHVhdGlvbi53aGl0ZXNwYWNlLmNvbW1lbnQubGVhZGluZy40ZCIKICAgICAgICAgICAgfSwKICAgICAgICAgICAgIjIiOiB7CiAgICAgICAgICAgICAgIm5hbWUiOiAiY29tbWVudC5saW5lLmRvdWJsZS1zbGFzaC40ZCIKICAgICAgICAgICAgfSwKICAgICAgICAgICAgIjMiOiB7CiAgICAgICAgICAgICAgIm5hbWUiOiAicHVuY3R1YXRpb24uZGVmaW5pdGlvbi5jb21tZW50LjRkIgogICAgICAgICAgICB9LAogICAgICAgICAgICAiNCI6IHsKICAgICAgICAgICAgICAibmFtZSI6ICJzdG9yYWdlLnR5cGUuaW50ZXJuYWxkZWNsYXJhdGlvbi40ZCIKICAgICAgICAgICAgfSwKICAgICAgICAgICAgIjUiOiB7CiAgICAgICAgICAgICAgIm5hbWUiOiAicHVuY3R1YXRpb24uZGVjb3JhdG9yLmludGVybmFsZGVjbGFyYXRpb24uNGQiCiAgICAgICAgICAgIH0KICAgICAgICAgIH0sCiAgICAgICAgICAiZW5kIjogIig/PSQpIiwKICAgICAgICAgICJjb250ZW50TmFtZSI6ICJjb21tZW50LmxpbmUuZG91YmxlLXNsYXNoLjRkIgogICAgICAgIH0KICAgICAgXQogICAgfQogIH0KfQo=", self.location).toString(),
|
|
1514
|
+
{ mimeType: "application/json", size: 1592 }
|
|
1515
|
+
);
|
|
1516
|
+
V(
|
|
1517
|
+
"./language-configuration.json",
|
|
1518
|
+
new URL("data:application/json;base64,ewogICJjb21tZW50cyI6IHsKICAgICJsaW5lQ29tbWVudCI6ICIvLyIsCiAgICAiYmxvY2tDb21tZW50IjogWyIvKioiLCAiKiovIl0KICB9LAogIC8vIHN5bWJvbHMgdXNlZCBhcyBicmFja2V0cwogICJicmFja2V0cyI6IFsKICAgIFsieyIsICJ9Il0sCiAgICBbIigiLCAiKSJdLAogICAgWyJbIiwgIl0iXQogIF0sCiAgLy8gc3ltYm9scyB0aGF0IGFyZSBhdXRvIGNsb3NlZCB3aGVuIHR5cGluZwogIC8vIHN5bWJvbHMgdGhhdCB0aGF0IGNhbiBiZSB1c2VkIHRvIHN1cnJvdW5kIGEgc2VsZWN0aW9uCiAgInN1cnJvdW5kaW5nUGFpcnMiOiBbCiAgICBbInsiLCAifSJdLAogICAgWyJbIiwgIl0iXSwKICAgIFsiKCIsICIpIl0sCiAgICBbIlwiIiwgIlwiIl0sCiAgICBbIiciLCAiJyJdCiAgXSwKICAiYXV0b0Nsb3NpbmdQYWlycyI6IFsKICAgIHsKICAgICAgIm9wZW4iOiAiKCIsCiAgICAgICJjbG9zZSI6ICIpIgogICAgfSwKICAgIHsgIm9wZW4iOiAieyIsICJjbG9zZSI6ICJ9IiB9LAogICAgeyAib3BlbiI6ICJbIiwgImNsb3NlIjogIl0iIH0sCiAgICB7ICJvcGVuIjogIiciLCAiY2xvc2UiOiAiJyIsICJub3RJbiI6IFsic3RyaW5nIiwgImNvbW1lbnQiXSB9LAogICAgeyAib3BlbiI6ICJcIiIsICJjbG9zZSI6ICJcIiIsICJub3RJbiI6IFsic3RyaW5nIl0gfSwKICAgIHsgIm9wZW4iOiAiYCIsICJjbG9zZSI6ICJgIiwgIm5vdEluIjogWyJzdHJpbmciLCAiY29tbWVudCJdIH0sCiAgICB7ICJvcGVuIjogIi8qKiIsICJjbG9zZSI6ICIgKiovIiwgIm5vdEluIjogWyJzdHJpbmciXSB9CiAgXSwKICAiYXV0b0Nsb3NlQmVmb3JlIjogIjs6Liw9fV0pPmAgXG5cdCIsCiAgIndvcmRQYXR0ZXJuIjogIigtP1xcZCpcXC5cXGRcXHcqKXwoW15cXGBcXH5cXCFcXEBcXCNcXCVcXF5cXCZcXCpcXChcXClcXC1cXD1cXCtcXFtcXHtcXF1cXH1cXFxcXFx8XFw7XFw6XFwnXFxcIlxcLFxcLlxcPFxcPlxcL1xcP1xcclxcblxcdFxcZlxcdiBdKyl8KD88PVthLXpBLVpdKSA/KD89W2EtekEtWl0pIiwKICAiaW5kZW50YXRpb25SdWxlcyI6IHsKICAgICJpbmNyZWFzZUluZGVudFBhdHRlcm4iOiB7CiAgICAgICJwYXR0ZXJuIjogIiheKD8hW15cXHNdKSpcXHMqKGNsYXNzIGNvbnN0cnVjdG9yKSl8KF4oPyFbXlxcc10pKlxccyooZXhwb3NlZHxsb2NhbHxcXHMqKXsxfVxccypmdW5jdGlvbnsxfVxccypcXHcpfCheKD8hW15cXHNdKSpcXHMqKElmfEVsc2V8Rm9yfEZvciBlYWNofFdoaWxlfEJlZ2luIFNRTHxDYXNlIG9mfFVzZXxSZXBlYXR8OiAqXFwoLiopKS4qJCIsCiAgICAgICJmbGFncyI6ICJpIgogICAgfSwKICAgICJkZWNyZWFzZUluZGVudFBhdHRlcm4iOiB7CiAgICAgICJwYXR0ZXJuIjogIiheKD8hW15cXHNdKSpcXHMqKGV4cG9zZWR8bG9jYWx8XFxzKil7MX1cXHMqZnVuY3Rpb257MX1cXHMqXFx3KXwoRW5kIElmfEVuZCBGb3J8RWxzZXxFbmQgZm9yIGVhY2h8RW5kIFdoaWxlfEVuZCBTUUx8RW5kIGNhc2V8RW5kIHVzZXxVbnRpbHw6ICpcXCguKikuKiQiLAogICAgICAiZmxhZ3MiOiAiaSIKICAgIH0KICB9LAogICJvbkVudGVyUnVsZXMiOiBbCiAgICB7CiAgICAgICJiZWZvcmVUZXh0IjogewogICAgICAgICJwYXR0ZXJuIjogIl5leHBvc2VkIiwKICAgICAgICAiZmxhZ3MiOiAiaSIKICAgICAgfSwKICAgICAgImFjdGlvbiI6IHsgImluZGVudCI6ICJpbmRlbnQiLCAiaW5kZW50QWN0aW9uIjogMSB9CiAgICB9CiAgXQp9Cg==", self.location).toString(),
|
|
1519
|
+
{ mimeType: "application/json", size: 1723 }
|
|
1520
|
+
);
|
|
1521
|
+
V(
|
|
1522
|
+
"package.json",
|
|
1523
|
+
new URL("data:application/json;base64,ewogICAgIm5hbWUiOiAiNGQiLAogICAgImRpc3BsYXlOYW1lIjogIiVkaXNwbGF5TmFtZSUiLAogICAgImRlc2NyaXB0aW9uIjogIiVkZXNjcmlwdGlvbiUiLAogICAgInZlcnNpb24iOiAiMS4wLjAiLAogICAgInB1Ymxpc2hlciI6ICJ2c2NvZGUiLAogICAgImxpY2Vuc2UiOiAiTUlUIiwKICAgICJlbmdpbmVzIjogewogICAgICAgICJ2c2NvZGUiOiAiMC4xMC54IgogICAgfSwKICAgICJzY3JpcHRzIjogewogICAgICAgICJ1cGRhdGUtZ3JhbW1hciI6ICJub2RlIC4uL25vZGVfbW9kdWxlcy92c2NvZGUtZ3JhbW1hci11cGRhdGVyL2JpbiBtaWNyb3NvZnQvdnNjb2RlLTRkIGdyYW1tYXJzLzRkLmNzb24gLi9zeW50YXhlcy80ZC50bUxhbmd1YWdlLmpzb24iCiAgICB9LAogICAgImNhdGVnb3JpZXMiOiBbCiAgICAgICAgIlByb2dyYW1taW5nIExhbmd1YWdlcyIKICAgIF0sCiAgICAiY29udHJpYnV0ZXMiOiB7CiAgICAgICAgImxhbmd1YWdlcyI6IFsKICAgICAgICAgICAgewogICAgICAgICAgICAgICJpZCI6ICI0ZCIsCiAgICAgICAgICAgICAgImFsaWFzZXMiOiBbIjREIiwgIjRkIl0sCiAgICAgICAgICAgICAgImV4dGVuc2lvbnMiOiBbIi40ZG0iLCAiLjRxcyJdLAogICAgICAgICAgICAgICJjb25maWd1cmF0aW9uIjogIi4vbGFuZ3VhZ2UtY29uZmlndXJhdGlvbi5qc29uIgogICAgICAgICAgICB9CiAgICAgICAgICBdLAogICAgICAgICAgImdyYW1tYXJzIjogWwogICAgICAgICAgICB7CiAgICAgICAgICAgICAgImxhbmd1YWdlIjogIjRkIiwKICAgICAgICAgICAgICAic2NvcGVOYW1lIjogInNvdXJjZS40ZG0iLAogICAgICAgICAgICAgICJwYXRoIjogIi4vc3ludGF4ZXMvNGQudG1MYW5ndWFnZS5qc29uIgogICAgICAgICAgICB9CiAgICAgICAgICBdCiAgICB9LAogICAgInJlcG9zaXRvcnkiOiB7CiAgICAgICAgInR5cGUiOiAiZ2l0IiwKICAgICAgICAidXJsIjogImh0dHBzOi8vZ2l0aHViLmNvbS9taWNyb3NvZnQvdnNjb2RlLmdpdCIKICAgIH0KfQ==", self.location).toString(),
|
|
1524
|
+
{ mimeType: "application/json", size: 1006 }
|
|
1525
|
+
);
|
|
1526
|
+
V(
|
|
1527
|
+
"package.nls.json",
|
|
1528
|
+
new URL("data:application/json;base64,ewogICJkaXNwbGF5TmFtZSI6ICI0RCBMYW5ndWFnZSBCYXNpY3MiLAogICJkZXNjcmlwdGlvbiI6ICJQcm92aWRlcyBzeW50YXggaGlnaGxpZ2h0aW5nIGFuZCBicmFja2V0IG1hdGNoaW5nIGZvciA0RE0gYW5kIDRRUyBmaWxlcy4iCn0K", self.location).toString(),
|
|
1529
|
+
{ mimeType: "application/json", size: 135 }
|
|
1530
|
+
);
|
|
2098
1531
|
export {
|
|
2099
|
-
|
|
2100
|
-
|
|
2101
|
-
|
|
2102
|
-
|
|
2103
|
-
|
|
2104
|
-
|
|
2105
|
-
|
|
2106
|
-
|
|
2107
|
-
|
|
2108
|
-
|
|
2109
|
-
|
|
1532
|
+
cn as Alerts,
|
|
1533
|
+
nt as CodeEditor,
|
|
1534
|
+
et as CodeEditorProvider,
|
|
1535
|
+
qn as LSPProvider,
|
|
1536
|
+
Q as _await,
|
|
1537
|
+
ze as configureServices,
|
|
1538
|
+
L as getFileSystemPath,
|
|
1539
|
+
_n as getFunctionOffset,
|
|
1540
|
+
$e as initMonacoUserConfiguration,
|
|
1541
|
+
Qe as jumpToLine,
|
|
1542
|
+
qe as jumpToSelection,
|
|
1543
|
+
rn as useCodeEditor,
|
|
1544
|
+
Qn as useLSP
|
|
2110
1545
|
};
|
|
2111
1546
|
//# sourceMappingURL=index.es.js.map
|