act-plus 1.1.18 → 1.1.19

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.
Files changed (107) hide show
  1. package/act-plus.js +5 -3
  2. package/act-plus.umd.cjs +1729 -16
  3. package/assets/editor.worker-df55e1ff.js +8 -0
  4. package/assets/ts.worker-e151483b.js +33972 -0
  5. package/lib/abap-1354785f.js +1314 -0
  6. package/lib/apex-279d4f27.js +315 -0
  7. package/lib/azcli-ba812c55.js +74 -0
  8. package/lib/bat-4d77495d.js +95 -0
  9. package/lib/bicep-7b240724.js +108 -0
  10. package/lib/cameligo-5d2daeb8.js +168 -0
  11. package/lib/clojure-b7ea12a3.js +754 -0
  12. package/lib/coffee-1a8cfbf4.js +228 -0
  13. package/lib/{configBtns-58f43801.js → configBtns-3772e689.js} +2 -2
  14. package/lib/{configFileds-b537fd99.js → configFileds-d0911c87.js} +3 -3
  15. package/lib/{configForm-b9e9ca98.js → configForm-ae4b725e.js} +1 -1
  16. package/lib/{configTable-bdb56a9e.js → configTable-879063d4.js} +31 -24
  17. package/lib/cpp-642b10c4.js +387 -0
  18. package/lib/csharp-d987ddad.js +320 -0
  19. package/lib/csp-96407af0.js +57 -0
  20. package/lib/css-5dd354ac.js +186 -0
  21. package/lib/cssMode-6d02ab39.js +1448 -0
  22. package/lib/cypher-11e5a4b6.js +262 -0
  23. package/lib/dart-5d209f63.js +270 -0
  24. package/lib/{dialogAddField-b60d14ab.js → dialogAddField-d6b18048.js} +69 -69
  25. package/lib/{dialogConfigBtn-f5f8703d.js → dialogConfigBtn-75e37dc9.js} +74 -78
  26. package/lib/dockerfile-8739cff7.js +132 -0
  27. package/lib/ecl-a20c5155.js +454 -0
  28. package/lib/elixir-8b028584.js +467 -0
  29. package/lib/{enum-99519ce0.js → enum-cc58b8fe.js} +25 -22
  30. package/lib/flow9-0dea2e73.js +141 -0
  31. package/lib/freemarker2-205877bf.js +646 -0
  32. package/lib/fsharp-49a70fad.js +210 -0
  33. package/lib/go-46e3b371.js +208 -0
  34. package/lib/graphql-51a577e5.js +141 -0
  35. package/lib/handlebars-2d920faa.js +394 -0
  36. package/lib/hcl-56b85754.js +177 -0
  37. package/lib/html-6b99359b.js +284 -0
  38. package/lib/htmlMode-498c17d9.js +1458 -0
  39. package/lib/index-68063c4c.js +96 -0
  40. package/lib/index-7c264775.js +192 -0
  41. package/lib/index-a36b2284.js +304 -0
  42. package/lib/index-aff95ab9.js +63 -0
  43. package/lib/index-da0a0bfe.js +162173 -0
  44. package/lib/index-e2f2023d.js +35 -0
  45. package/lib/{index-9e3ed108.js → index-fb2754ee.js} +1 -1
  46. package/lib/ini-1d58d82f.js +68 -0
  47. package/lib/java-cd017f60.js +221 -0
  48. package/lib/javascript-5e40fe11.js +78 -0
  49. package/lib/jsonMode-2a821e9e.js +1869 -0
  50. package/lib/julia-a0caf483.js +496 -0
  51. package/lib/kotlin-c6e52a56.js +245 -0
  52. package/lib/less-718543b4.js +168 -0
  53. package/lib/lexon-5e6e7a44.js +151 -0
  54. package/lib/liquid-dc78aaf7.js +241 -0
  55. package/lib/lua-f159160b.js +157 -0
  56. package/lib/m3-aadaf771.js +210 -0
  57. package/lib/markdown-9b448c46.js +202 -0
  58. package/lib/mips-161e49ce.js +194 -0
  59. package/lib/msdax-f65cb1e6.js +377 -0
  60. package/lib/mysql-24549dd1.js +875 -0
  61. package/lib/objective-c-e129a5ca.js +188 -0
  62. package/lib/pascal-4ccdf5ce.js +245 -0
  63. package/lib/pascaligo-a9603dcd.js +158 -0
  64. package/lib/perl-ba1fb97a.js +599 -0
  65. package/lib/pgsql-89978310.js +843 -0
  66. package/lib/php-987b9d87.js +471 -0
  67. package/lib/pla-96c2695d.js +131 -0
  68. package/lib/postiats-7b52ebac.js +544 -0
  69. package/lib/powerquery-8954ec26.js +890 -0
  70. package/lib/powershell-f00d0274.js +233 -0
  71. package/lib/protobuf-3eb85f80.js +422 -0
  72. package/lib/pug-6fab415a.js +393 -0
  73. package/lib/python-e55144b2.js +262 -0
  74. package/lib/qsharp-4792f872.js +282 -0
  75. package/lib/r-630f5d6b.js +245 -0
  76. package/lib/razor-1fb88f53.js +515 -0
  77. package/lib/redis-276b8288.js +298 -0
  78. package/lib/redshift-520a7359.js +806 -0
  79. package/lib/restructuredtext-4676a3fc.js +162 -0
  80. package/lib/ruby-764137cd.js +444 -0
  81. package/lib/rust-97f8f6e1.js +337 -0
  82. package/lib/sb-8c22f14c.js +110 -0
  83. package/lib/scala-c68c650c.js +353 -0
  84. package/lib/scheme-e6a52cb0.js +114 -0
  85. package/lib/scss-45104c77.js +244 -0
  86. package/lib/shell-09452d42.js +224 -0
  87. package/lib/solidity-d4979008.js +1351 -0
  88. package/lib/sophia-21995caf.js +190 -0
  89. package/lib/sparql-5088743c.js +193 -0
  90. package/lib/sql-63ec8e76.js +818 -0
  91. package/lib/st-fa9ab362.js +414 -0
  92. package/lib/swift-abdf1835.js +315 -0
  93. package/lib/systemverilog-a4f858ed.js +556 -0
  94. package/lib/tcl-8adf937f.js +232 -0
  95. package/lib/tsMode-8d12d976.js +792 -0
  96. package/lib/twig-404eb73e.js +323 -0
  97. package/lib/typescript-97ed77ae.js +330 -0
  98. package/lib/vb-e21e8153.js +364 -0
  99. package/lib/xml-e843c667.js +98 -0
  100. package/lib/yaml-62bcf3fa.js +187 -0
  101. package/package.json +1 -1
  102. package/style.css +1 -1
  103. package/lib/index-14f7a543.js +0 -165
  104. package/lib/index-1f8ed34b.js +0 -11178
  105. package/lib/index-56217e0e.js +0 -96
  106. package/lib/index-8cb975d8.js +0 -297
  107. package/lib/index-9a1abd6b.js +0 -139
@@ -0,0 +1,1448 @@
1
+ var Le = Object.defineProperty;
2
+ var je = (e, n, i) => n in e ? Le(e, n, { enumerable: !0, configurable: !0, writable: !0, value: i }) : e[n] = i;
3
+ var E = (e, n, i) => (je(e, typeof n != "symbol" ? n + "" : n, i), i);
4
+ import { m as Ne } from "./index-da0a0bfe.js";
5
+ import "vue";
6
+ import "vue-router";
7
+ import "element-plus";
8
+ /*!-----------------------------------------------------------------------------
9
+ * Copyright (c) Microsoft Corporation. All rights reserved.
10
+ * Version: 0.34.1(547870b6881302c5b4ff32173c16d06009e3588f)
11
+ * Released under the MIT license
12
+ * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
13
+ *-----------------------------------------------------------------------------*/
14
+ var We = Object.defineProperty, Ue = Object.getOwnPropertyDescriptor, Oe = Object.getOwnPropertyNames, Ve = Object.prototype.hasOwnProperty, Y = (e, n, i, r) => {
15
+ if (n && typeof n == "object" || typeof n == "function")
16
+ for (let t of Oe(n))
17
+ !Ve.call(e, t) && t !== i && We(e, t, { get: () => n[t], enumerable: !(r = Ue(n, t)) || r.enumerable });
18
+ return e;
19
+ }, He = (e, n, i) => (Y(e, n, "default"), i && Y(i, n, "default")), c = {};
20
+ He(c, Ne);
21
+ var ze = 2 * 60 * 1e3, Xe = class {
22
+ constructor(e) {
23
+ E(this, "_defaults");
24
+ E(this, "_idleCheckInterval");
25
+ E(this, "_lastUsedTime");
26
+ E(this, "_configChangeListener");
27
+ E(this, "_worker");
28
+ E(this, "_client");
29
+ this._defaults = e, this._worker = null, this._client = null, this._idleCheckInterval = window.setInterval(() => this._checkIfIdle(), 30 * 1e3), this._lastUsedTime = 0, this._configChangeListener = this._defaults.onDidChange(() => this._stopWorker());
30
+ }
31
+ _stopWorker() {
32
+ this._worker && (this._worker.dispose(), this._worker = null), this._client = null;
33
+ }
34
+ dispose() {
35
+ clearInterval(this._idleCheckInterval), this._configChangeListener.dispose(), this._stopWorker();
36
+ }
37
+ _checkIfIdle() {
38
+ if (!this._worker)
39
+ return;
40
+ Date.now() - this._lastUsedTime > ze && this._stopWorker();
41
+ }
42
+ _getClient() {
43
+ return this._lastUsedTime = Date.now(), this._client || (this._worker = c.editor.createWebWorker({
44
+ moduleId: "vs/language/css/cssWorker",
45
+ label: this._defaults.languageId,
46
+ createData: {
47
+ options: this._defaults.options,
48
+ languageId: this._defaults.languageId
49
+ }
50
+ }), this._client = this._worker.getProxy()), this._client;
51
+ }
52
+ getLanguageServiceWorker(...e) {
53
+ let n;
54
+ return this._getClient().then((i) => {
55
+ n = i;
56
+ }).then((i) => {
57
+ if (this._worker)
58
+ return this._worker.withSyncedResources(e);
59
+ }).then((i) => n);
60
+ }
61
+ }, Z;
62
+ (function(e) {
63
+ e.MIN_VALUE = -2147483648, e.MAX_VALUE = 2147483647;
64
+ })(Z || (Z = {}));
65
+ var U;
66
+ (function(e) {
67
+ e.MIN_VALUE = 0, e.MAX_VALUE = 2147483647;
68
+ })(U || (U = {}));
69
+ var k;
70
+ (function(e) {
71
+ function n(r, t) {
72
+ return r === Number.MAX_VALUE && (r = U.MAX_VALUE), t === Number.MAX_VALUE && (t = U.MAX_VALUE), { line: r, character: t };
73
+ }
74
+ e.create = n;
75
+ function i(r) {
76
+ var t = r;
77
+ return s.objectLiteral(t) && s.uinteger(t.line) && s.uinteger(t.character);
78
+ }
79
+ e.is = i;
80
+ })(k || (k = {}));
81
+ var p;
82
+ (function(e) {
83
+ function n(r, t, a, o) {
84
+ if (s.uinteger(r) && s.uinteger(t) && s.uinteger(a) && s.uinteger(o))
85
+ return { start: k.create(r, t), end: k.create(a, o) };
86
+ if (k.is(r) && k.is(t))
87
+ return { start: r, end: t };
88
+ throw new Error("Range#create called with invalid arguments[" + r + ", " + t + ", " + a + ", " + o + "]");
89
+ }
90
+ e.create = n;
91
+ function i(r) {
92
+ var t = r;
93
+ return s.objectLiteral(t) && k.is(t.start) && k.is(t.end);
94
+ }
95
+ e.is = i;
96
+ })(p || (p = {}));
97
+ var X;
98
+ (function(e) {
99
+ function n(r, t) {
100
+ return { uri: r, range: t };
101
+ }
102
+ e.create = n;
103
+ function i(r) {
104
+ var t = r;
105
+ return s.defined(t) && p.is(t.range) && (s.string(t.uri) || s.undefined(t.uri));
106
+ }
107
+ e.is = i;
108
+ })(X || (X = {}));
109
+ var K;
110
+ (function(e) {
111
+ function n(r, t, a, o) {
112
+ return { targetUri: r, targetRange: t, targetSelectionRange: a, originSelectionRange: o };
113
+ }
114
+ e.create = n;
115
+ function i(r) {
116
+ var t = r;
117
+ return s.defined(t) && p.is(t.targetRange) && s.string(t.targetUri) && (p.is(t.targetSelectionRange) || s.undefined(t.targetSelectionRange)) && (p.is(t.originSelectionRange) || s.undefined(t.originSelectionRange));
118
+ }
119
+ e.is = i;
120
+ })(K || (K = {}));
121
+ var B;
122
+ (function(e) {
123
+ function n(r, t, a, o) {
124
+ return {
125
+ red: r,
126
+ green: t,
127
+ blue: a,
128
+ alpha: o
129
+ };
130
+ }
131
+ e.create = n;
132
+ function i(r) {
133
+ var t = r;
134
+ return s.numberRange(t.red, 0, 1) && s.numberRange(t.green, 0, 1) && s.numberRange(t.blue, 0, 1) && s.numberRange(t.alpha, 0, 1);
135
+ }
136
+ e.is = i;
137
+ })(B || (B = {}));
138
+ var ee;
139
+ (function(e) {
140
+ function n(r, t) {
141
+ return {
142
+ range: r,
143
+ color: t
144
+ };
145
+ }
146
+ e.create = n;
147
+ function i(r) {
148
+ var t = r;
149
+ return p.is(t.range) && B.is(t.color);
150
+ }
151
+ e.is = i;
152
+ })(ee || (ee = {}));
153
+ var te;
154
+ (function(e) {
155
+ function n(r, t, a) {
156
+ return {
157
+ label: r,
158
+ textEdit: t,
159
+ additionalTextEdits: a
160
+ };
161
+ }
162
+ e.create = n;
163
+ function i(r) {
164
+ var t = r;
165
+ return s.string(t.label) && (s.undefined(t.textEdit) || C.is(t)) && (s.undefined(t.additionalTextEdits) || s.typedArray(t.additionalTextEdits, C.is));
166
+ }
167
+ e.is = i;
168
+ })(te || (te = {}));
169
+ var P;
170
+ (function(e) {
171
+ e.Comment = "comment", e.Imports = "imports", e.Region = "region";
172
+ })(P || (P = {}));
173
+ var re;
174
+ (function(e) {
175
+ function n(r, t, a, o, u) {
176
+ var g = {
177
+ startLine: r,
178
+ endLine: t
179
+ };
180
+ return s.defined(a) && (g.startCharacter = a), s.defined(o) && (g.endCharacter = o), s.defined(u) && (g.kind = u), g;
181
+ }
182
+ e.create = n;
183
+ function i(r) {
184
+ var t = r;
185
+ return s.uinteger(t.startLine) && s.uinteger(t.startLine) && (s.undefined(t.startCharacter) || s.uinteger(t.startCharacter)) && (s.undefined(t.endCharacter) || s.uinteger(t.endCharacter)) && (s.undefined(t.kind) || s.string(t.kind));
186
+ }
187
+ e.is = i;
188
+ })(re || (re = {}));
189
+ var $;
190
+ (function(e) {
191
+ function n(r, t) {
192
+ return {
193
+ location: r,
194
+ message: t
195
+ };
196
+ }
197
+ e.create = n;
198
+ function i(r) {
199
+ var t = r;
200
+ return s.defined(t) && X.is(t.location) && s.string(t.message);
201
+ }
202
+ e.is = i;
203
+ })($ || ($ = {}));
204
+ var I;
205
+ (function(e) {
206
+ e.Error = 1, e.Warning = 2, e.Information = 3, e.Hint = 4;
207
+ })(I || (I = {}));
208
+ var ne;
209
+ (function(e) {
210
+ e.Unnecessary = 1, e.Deprecated = 2;
211
+ })(ne || (ne = {}));
212
+ var ie;
213
+ (function(e) {
214
+ function n(i) {
215
+ var r = i;
216
+ return r != null && s.string(r.href);
217
+ }
218
+ e.is = n;
219
+ })(ie || (ie = {}));
220
+ var O;
221
+ (function(e) {
222
+ function n(r, t, a, o, u, g) {
223
+ var d = { range: r, message: t };
224
+ return s.defined(a) && (d.severity = a), s.defined(o) && (d.code = o), s.defined(u) && (d.source = u), s.defined(g) && (d.relatedInformation = g), d;
225
+ }
226
+ e.create = n;
227
+ function i(r) {
228
+ var t, a = r;
229
+ return s.defined(a) && p.is(a.range) && s.string(a.message) && (s.number(a.severity) || s.undefined(a.severity)) && (s.integer(a.code) || s.string(a.code) || s.undefined(a.code)) && (s.undefined(a.codeDescription) || s.string((t = a.codeDescription) === null || t === void 0 ? void 0 : t.href)) && (s.string(a.source) || s.undefined(a.source)) && (s.undefined(a.relatedInformation) || s.typedArray(a.relatedInformation, $.is));
230
+ }
231
+ e.is = i;
232
+ })(O || (O = {}));
233
+ var M;
234
+ (function(e) {
235
+ function n(r, t) {
236
+ for (var a = [], o = 2; o < arguments.length; o++)
237
+ a[o - 2] = arguments[o];
238
+ var u = { title: r, command: t };
239
+ return s.defined(a) && a.length > 0 && (u.arguments = a), u;
240
+ }
241
+ e.create = n;
242
+ function i(r) {
243
+ var t = r;
244
+ return s.defined(t) && s.string(t.title) && s.string(t.command);
245
+ }
246
+ e.is = i;
247
+ })(M || (M = {}));
248
+ var C;
249
+ (function(e) {
250
+ function n(a, o) {
251
+ return { range: a, newText: o };
252
+ }
253
+ e.replace = n;
254
+ function i(a, o) {
255
+ return { range: { start: a, end: a }, newText: o };
256
+ }
257
+ e.insert = i;
258
+ function r(a) {
259
+ return { range: a, newText: "" };
260
+ }
261
+ e.del = r;
262
+ function t(a) {
263
+ var o = a;
264
+ return s.objectLiteral(o) && s.string(o.newText) && p.is(o.range);
265
+ }
266
+ e.is = t;
267
+ })(C || (C = {}));
268
+ var R;
269
+ (function(e) {
270
+ function n(r, t, a) {
271
+ var o = { label: r };
272
+ return t !== void 0 && (o.needsConfirmation = t), a !== void 0 && (o.description = a), o;
273
+ }
274
+ e.create = n;
275
+ function i(r) {
276
+ var t = r;
277
+ return t !== void 0 && s.objectLiteral(t) && s.string(t.label) && (s.boolean(t.needsConfirmation) || t.needsConfirmation === void 0) && (s.string(t.description) || t.description === void 0);
278
+ }
279
+ e.is = i;
280
+ })(R || (R = {}));
281
+ var m;
282
+ (function(e) {
283
+ function n(i) {
284
+ var r = i;
285
+ return typeof r == "string";
286
+ }
287
+ e.is = n;
288
+ })(m || (m = {}));
289
+ var x;
290
+ (function(e) {
291
+ function n(a, o, u) {
292
+ return { range: a, newText: o, annotationId: u };
293
+ }
294
+ e.replace = n;
295
+ function i(a, o, u) {
296
+ return { range: { start: a, end: a }, newText: o, annotationId: u };
297
+ }
298
+ e.insert = i;
299
+ function r(a, o) {
300
+ return { range: a, newText: "", annotationId: o };
301
+ }
302
+ e.del = r;
303
+ function t(a) {
304
+ var o = a;
305
+ return C.is(o) && (R.is(o.annotationId) || m.is(o.annotationId));
306
+ }
307
+ e.is = t;
308
+ })(x || (x = {}));
309
+ var V;
310
+ (function(e) {
311
+ function n(r, t) {
312
+ return { textDocument: r, edits: t };
313
+ }
314
+ e.create = n;
315
+ function i(r) {
316
+ var t = r;
317
+ return s.defined(t) && H.is(t.textDocument) && Array.isArray(t.edits);
318
+ }
319
+ e.is = i;
320
+ })(V || (V = {}));
321
+ var T;
322
+ (function(e) {
323
+ function n(r, t, a) {
324
+ var o = {
325
+ kind: "create",
326
+ uri: r
327
+ };
328
+ return t !== void 0 && (t.overwrite !== void 0 || t.ignoreIfExists !== void 0) && (o.options = t), a !== void 0 && (o.annotationId = a), o;
329
+ }
330
+ e.create = n;
331
+ function i(r) {
332
+ var t = r;
333
+ return t && t.kind === "create" && s.string(t.uri) && (t.options === void 0 || (t.options.overwrite === void 0 || s.boolean(t.options.overwrite)) && (t.options.ignoreIfExists === void 0 || s.boolean(t.options.ignoreIfExists))) && (t.annotationId === void 0 || m.is(t.annotationId));
334
+ }
335
+ e.is = i;
336
+ })(T || (T = {}));
337
+ var S;
338
+ (function(e) {
339
+ function n(r, t, a, o) {
340
+ var u = {
341
+ kind: "rename",
342
+ oldUri: r,
343
+ newUri: t
344
+ };
345
+ return a !== void 0 && (a.overwrite !== void 0 || a.ignoreIfExists !== void 0) && (u.options = a), o !== void 0 && (u.annotationId = o), u;
346
+ }
347
+ e.create = n;
348
+ function i(r) {
349
+ var t = r;
350
+ return t && t.kind === "rename" && s.string(t.oldUri) && s.string(t.newUri) && (t.options === void 0 || (t.options.overwrite === void 0 || s.boolean(t.options.overwrite)) && (t.options.ignoreIfExists === void 0 || s.boolean(t.options.ignoreIfExists))) && (t.annotationId === void 0 || m.is(t.annotationId));
351
+ }
352
+ e.is = i;
353
+ })(S || (S = {}));
354
+ var F;
355
+ (function(e) {
356
+ function n(r, t, a) {
357
+ var o = {
358
+ kind: "delete",
359
+ uri: r
360
+ };
361
+ return t !== void 0 && (t.recursive !== void 0 || t.ignoreIfNotExists !== void 0) && (o.options = t), a !== void 0 && (o.annotationId = a), o;
362
+ }
363
+ e.create = n;
364
+ function i(r) {
365
+ var t = r;
366
+ return t && t.kind === "delete" && s.string(t.uri) && (t.options === void 0 || (t.options.recursive === void 0 || s.boolean(t.options.recursive)) && (t.options.ignoreIfNotExists === void 0 || s.boolean(t.options.ignoreIfNotExists))) && (t.annotationId === void 0 || m.is(t.annotationId));
367
+ }
368
+ e.is = i;
369
+ })(F || (F = {}));
370
+ var q;
371
+ (function(e) {
372
+ function n(i) {
373
+ var r = i;
374
+ return r && (r.changes !== void 0 || r.documentChanges !== void 0) && (r.documentChanges === void 0 || r.documentChanges.every(function(t) {
375
+ return s.string(t.kind) ? T.is(t) || S.is(t) || F.is(t) : V.is(t);
376
+ }));
377
+ }
378
+ e.is = n;
379
+ })(q || (q = {}));
380
+ var W = function() {
381
+ function e(n, i) {
382
+ this.edits = n, this.changeAnnotations = i;
383
+ }
384
+ return e.prototype.insert = function(n, i, r) {
385
+ var t, a;
386
+ if (r === void 0 ? t = C.insert(n, i) : m.is(r) ? (a = r, t = x.insert(n, i, r)) : (this.assertChangeAnnotations(this.changeAnnotations), a = this.changeAnnotations.manage(r), t = x.insert(n, i, a)), this.edits.push(t), a !== void 0)
387
+ return a;
388
+ }, e.prototype.replace = function(n, i, r) {
389
+ var t, a;
390
+ if (r === void 0 ? t = C.replace(n, i) : m.is(r) ? (a = r, t = x.replace(n, i, r)) : (this.assertChangeAnnotations(this.changeAnnotations), a = this.changeAnnotations.manage(r), t = x.replace(n, i, a)), this.edits.push(t), a !== void 0)
391
+ return a;
392
+ }, e.prototype.delete = function(n, i) {
393
+ var r, t;
394
+ if (i === void 0 ? r = C.del(n) : m.is(i) ? (t = i, r = x.del(n, i)) : (this.assertChangeAnnotations(this.changeAnnotations), t = this.changeAnnotations.manage(i), r = x.del(n, t)), this.edits.push(r), t !== void 0)
395
+ return t;
396
+ }, e.prototype.add = function(n) {
397
+ this.edits.push(n);
398
+ }, e.prototype.all = function() {
399
+ return this.edits;
400
+ }, e.prototype.clear = function() {
401
+ this.edits.splice(0, this.edits.length);
402
+ }, e.prototype.assertChangeAnnotations = function(n) {
403
+ if (n === void 0)
404
+ throw new Error("Text edit change is not configured to manage change annotations.");
405
+ }, e;
406
+ }(), ae = function() {
407
+ function e(n) {
408
+ this._annotations = n === void 0 ? /* @__PURE__ */ Object.create(null) : n, this._counter = 0, this._size = 0;
409
+ }
410
+ return e.prototype.all = function() {
411
+ return this._annotations;
412
+ }, Object.defineProperty(e.prototype, "size", {
413
+ get: function() {
414
+ return this._size;
415
+ },
416
+ enumerable: !1,
417
+ configurable: !0
418
+ }), e.prototype.manage = function(n, i) {
419
+ var r;
420
+ if (m.is(n) ? r = n : (r = this.nextId(), i = n), this._annotations[r] !== void 0)
421
+ throw new Error("Id " + r + " is already in use.");
422
+ if (i === void 0)
423
+ throw new Error("No annotation provided for id " + r);
424
+ return this._annotations[r] = i, this._size++, r;
425
+ }, e.prototype.nextId = function() {
426
+ return this._counter++, this._counter.toString();
427
+ }, e;
428
+ }();
429
+ (function() {
430
+ function e(n) {
431
+ var i = this;
432
+ this._textEditChanges = /* @__PURE__ */ Object.create(null), n !== void 0 ? (this._workspaceEdit = n, n.documentChanges ? (this._changeAnnotations = new ae(n.changeAnnotations), n.changeAnnotations = this._changeAnnotations.all(), n.documentChanges.forEach(function(r) {
433
+ if (V.is(r)) {
434
+ var t = new W(r.edits, i._changeAnnotations);
435
+ i._textEditChanges[r.textDocument.uri] = t;
436
+ }
437
+ })) : n.changes && Object.keys(n.changes).forEach(function(r) {
438
+ var t = new W(n.changes[r]);
439
+ i._textEditChanges[r] = t;
440
+ })) : this._workspaceEdit = {};
441
+ }
442
+ return Object.defineProperty(e.prototype, "edit", {
443
+ get: function() {
444
+ return this.initDocumentChanges(), this._changeAnnotations !== void 0 && (this._changeAnnotations.size === 0 ? this._workspaceEdit.changeAnnotations = void 0 : this._workspaceEdit.changeAnnotations = this._changeAnnotations.all()), this._workspaceEdit;
445
+ },
446
+ enumerable: !1,
447
+ configurable: !0
448
+ }), e.prototype.getTextEditChange = function(n) {
449
+ if (H.is(n)) {
450
+ if (this.initDocumentChanges(), this._workspaceEdit.documentChanges === void 0)
451
+ throw new Error("Workspace edit is not configured for document changes.");
452
+ var i = { uri: n.uri, version: n.version }, r = this._textEditChanges[i.uri];
453
+ if (!r) {
454
+ var t = [], a = {
455
+ textDocument: i,
456
+ edits: t
457
+ };
458
+ this._workspaceEdit.documentChanges.push(a), r = new W(t, this._changeAnnotations), this._textEditChanges[i.uri] = r;
459
+ }
460
+ return r;
461
+ } else {
462
+ if (this.initChanges(), this._workspaceEdit.changes === void 0)
463
+ throw new Error("Workspace edit is not configured for normal text edit changes.");
464
+ var r = this._textEditChanges[n];
465
+ if (!r) {
466
+ var t = [];
467
+ this._workspaceEdit.changes[n] = t, r = new W(t), this._textEditChanges[n] = r;
468
+ }
469
+ return r;
470
+ }
471
+ }, e.prototype.initDocumentChanges = function() {
472
+ this._workspaceEdit.documentChanges === void 0 && this._workspaceEdit.changes === void 0 && (this._changeAnnotations = new ae(), this._workspaceEdit.documentChanges = [], this._workspaceEdit.changeAnnotations = this._changeAnnotations.all());
473
+ }, e.prototype.initChanges = function() {
474
+ this._workspaceEdit.documentChanges === void 0 && this._workspaceEdit.changes === void 0 && (this._workspaceEdit.changes = /* @__PURE__ */ Object.create(null));
475
+ }, e.prototype.createFile = function(n, i, r) {
476
+ if (this.initDocumentChanges(), this._workspaceEdit.documentChanges === void 0)
477
+ throw new Error("Workspace edit is not configured for document changes.");
478
+ var t;
479
+ R.is(i) || m.is(i) ? t = i : r = i;
480
+ var a, o;
481
+ if (t === void 0 ? a = T.create(n, r) : (o = m.is(t) ? t : this._changeAnnotations.manage(t), a = T.create(n, r, o)), this._workspaceEdit.documentChanges.push(a), o !== void 0)
482
+ return o;
483
+ }, e.prototype.renameFile = function(n, i, r, t) {
484
+ if (this.initDocumentChanges(), this._workspaceEdit.documentChanges === void 0)
485
+ throw new Error("Workspace edit is not configured for document changes.");
486
+ var a;
487
+ R.is(r) || m.is(r) ? a = r : t = r;
488
+ var o, u;
489
+ if (a === void 0 ? o = S.create(n, i, t) : (u = m.is(a) ? a : this._changeAnnotations.manage(a), o = S.create(n, i, t, u)), this._workspaceEdit.documentChanges.push(o), u !== void 0)
490
+ return u;
491
+ }, e.prototype.deleteFile = function(n, i, r) {
492
+ if (this.initDocumentChanges(), this._workspaceEdit.documentChanges === void 0)
493
+ throw new Error("Workspace edit is not configured for document changes.");
494
+ var t;
495
+ R.is(i) || m.is(i) ? t = i : r = i;
496
+ var a, o;
497
+ if (t === void 0 ? a = F.create(n, r) : (o = m.is(t) ? t : this._changeAnnotations.manage(t), a = F.create(n, r, o)), this._workspaceEdit.documentChanges.push(a), o !== void 0)
498
+ return o;
499
+ }, e;
500
+ })();
501
+ var oe;
502
+ (function(e) {
503
+ function n(r) {
504
+ return { uri: r };
505
+ }
506
+ e.create = n;
507
+ function i(r) {
508
+ var t = r;
509
+ return s.defined(t) && s.string(t.uri);
510
+ }
511
+ e.is = i;
512
+ })(oe || (oe = {}));
513
+ var se;
514
+ (function(e) {
515
+ function n(r, t) {
516
+ return { uri: r, version: t };
517
+ }
518
+ e.create = n;
519
+ function i(r) {
520
+ var t = r;
521
+ return s.defined(t) && s.string(t.uri) && s.integer(t.version);
522
+ }
523
+ e.is = i;
524
+ })(se || (se = {}));
525
+ var H;
526
+ (function(e) {
527
+ function n(r, t) {
528
+ return { uri: r, version: t };
529
+ }
530
+ e.create = n;
531
+ function i(r) {
532
+ var t = r;
533
+ return s.defined(t) && s.string(t.uri) && (t.version === null || s.integer(t.version));
534
+ }
535
+ e.is = i;
536
+ })(H || (H = {}));
537
+ var ue;
538
+ (function(e) {
539
+ function n(r, t, a, o) {
540
+ return { uri: r, languageId: t, version: a, text: o };
541
+ }
542
+ e.create = n;
543
+ function i(r) {
544
+ var t = r;
545
+ return s.defined(t) && s.string(t.uri) && s.string(t.languageId) && s.integer(t.version) && s.string(t.text);
546
+ }
547
+ e.is = i;
548
+ })(ue || (ue = {}));
549
+ var L;
550
+ (function(e) {
551
+ e.PlainText = "plaintext", e.Markdown = "markdown";
552
+ })(L || (L = {}));
553
+ (function(e) {
554
+ function n(i) {
555
+ var r = i;
556
+ return r === e.PlainText || r === e.Markdown;
557
+ }
558
+ e.is = n;
559
+ })(L || (L = {}));
560
+ var Q;
561
+ (function(e) {
562
+ function n(i) {
563
+ var r = i;
564
+ return s.objectLiteral(i) && L.is(r.kind) && s.string(r.value);
565
+ }
566
+ e.is = n;
567
+ })(Q || (Q = {}));
568
+ var l;
569
+ (function(e) {
570
+ e.Text = 1, e.Method = 2, e.Function = 3, e.Constructor = 4, e.Field = 5, e.Variable = 6, e.Class = 7, e.Interface = 8, e.Module = 9, e.Property = 10, e.Unit = 11, e.Value = 12, e.Enum = 13, e.Keyword = 14, e.Snippet = 15, e.Color = 16, e.File = 17, e.Reference = 18, e.Folder = 19, e.EnumMember = 20, e.Constant = 21, e.Struct = 22, e.Event = 23, e.Operator = 24, e.TypeParameter = 25;
571
+ })(l || (l = {}));
572
+ var G;
573
+ (function(e) {
574
+ e.PlainText = 1, e.Snippet = 2;
575
+ })(G || (G = {}));
576
+ var ce;
577
+ (function(e) {
578
+ e.Deprecated = 1;
579
+ })(ce || (ce = {}));
580
+ var de;
581
+ (function(e) {
582
+ function n(r, t, a) {
583
+ return { newText: r, insert: t, replace: a };
584
+ }
585
+ e.create = n;
586
+ function i(r) {
587
+ var t = r;
588
+ return t && s.string(t.newText) && p.is(t.insert) && p.is(t.replace);
589
+ }
590
+ e.is = i;
591
+ })(de || (de = {}));
592
+ var fe;
593
+ (function(e) {
594
+ e.asIs = 1, e.adjustIndentation = 2;
595
+ })(fe || (fe = {}));
596
+ var ge;
597
+ (function(e) {
598
+ function n(i) {
599
+ return { label: i };
600
+ }
601
+ e.create = n;
602
+ })(ge || (ge = {}));
603
+ var le;
604
+ (function(e) {
605
+ function n(i, r) {
606
+ return { items: i || [], isIncomplete: !!r };
607
+ }
608
+ e.create = n;
609
+ })(le || (le = {}));
610
+ var z;
611
+ (function(e) {
612
+ function n(r) {
613
+ return r.replace(/[\\`*_{}[\]()#+\-.!]/g, "\\$&");
614
+ }
615
+ e.fromPlainText = n;
616
+ function i(r) {
617
+ var t = r;
618
+ return s.string(t) || s.objectLiteral(t) && s.string(t.language) && s.string(t.value);
619
+ }
620
+ e.is = i;
621
+ })(z || (z = {}));
622
+ var he;
623
+ (function(e) {
624
+ function n(i) {
625
+ var r = i;
626
+ return !!r && s.objectLiteral(r) && (Q.is(r.contents) || z.is(r.contents) || s.typedArray(r.contents, z.is)) && (i.range === void 0 || p.is(i.range));
627
+ }
628
+ e.is = n;
629
+ })(he || (he = {}));
630
+ var ve;
631
+ (function(e) {
632
+ function n(i, r) {
633
+ return r ? { label: i, documentation: r } : { label: i };
634
+ }
635
+ e.create = n;
636
+ })(ve || (ve = {}));
637
+ var pe;
638
+ (function(e) {
639
+ function n(i, r) {
640
+ for (var t = [], a = 2; a < arguments.length; a++)
641
+ t[a - 2] = arguments[a];
642
+ var o = { label: i };
643
+ return s.defined(r) && (o.documentation = r), s.defined(t) ? o.parameters = t : o.parameters = [], o;
644
+ }
645
+ e.create = n;
646
+ })(pe || (pe = {}));
647
+ var D;
648
+ (function(e) {
649
+ e.Text = 1, e.Read = 2, e.Write = 3;
650
+ })(D || (D = {}));
651
+ var me;
652
+ (function(e) {
653
+ function n(i, r) {
654
+ var t = { range: i };
655
+ return s.number(r) && (t.kind = r), t;
656
+ }
657
+ e.create = n;
658
+ })(me || (me = {}));
659
+ var h;
660
+ (function(e) {
661
+ e.File = 1, e.Module = 2, e.Namespace = 3, e.Package = 4, e.Class = 5, e.Method = 6, e.Property = 7, e.Field = 8, e.Constructor = 9, e.Enum = 10, e.Interface = 11, e.Function = 12, e.Variable = 13, e.Constant = 14, e.String = 15, e.Number = 16, e.Boolean = 17, e.Array = 18, e.Object = 19, e.Key = 20, e.Null = 21, e.EnumMember = 22, e.Struct = 23, e.Event = 24, e.Operator = 25, e.TypeParameter = 26;
662
+ })(h || (h = {}));
663
+ var _e;
664
+ (function(e) {
665
+ e.Deprecated = 1;
666
+ })(_e || (_e = {}));
667
+ var we;
668
+ (function(e) {
669
+ function n(i, r, t, a, o) {
670
+ var u = {
671
+ name: i,
672
+ kind: r,
673
+ location: { uri: a, range: t }
674
+ };
675
+ return o && (u.containerName = o), u;
676
+ }
677
+ e.create = n;
678
+ })(we || (we = {}));
679
+ var ke;
680
+ (function(e) {
681
+ function n(r, t, a, o, u, g) {
682
+ var d = {
683
+ name: r,
684
+ detail: t,
685
+ kind: a,
686
+ range: o,
687
+ selectionRange: u
688
+ };
689
+ return g !== void 0 && (d.children = g), d;
690
+ }
691
+ e.create = n;
692
+ function i(r) {
693
+ var t = r;
694
+ return t && s.string(t.name) && s.number(t.kind) && p.is(t.range) && p.is(t.selectionRange) && (t.detail === void 0 || s.string(t.detail)) && (t.deprecated === void 0 || s.boolean(t.deprecated)) && (t.children === void 0 || Array.isArray(t.children)) && (t.tags === void 0 || Array.isArray(t.tags));
695
+ }
696
+ e.is = i;
697
+ })(ke || (ke = {}));
698
+ var be;
699
+ (function(e) {
700
+ e.Empty = "", e.QuickFix = "quickfix", e.Refactor = "refactor", e.RefactorExtract = "refactor.extract", e.RefactorInline = "refactor.inline", e.RefactorRewrite = "refactor.rewrite", e.Source = "source", e.SourceOrganizeImports = "source.organizeImports", e.SourceFixAll = "source.fixAll";
701
+ })(be || (be = {}));
702
+ var Ee;
703
+ (function(e) {
704
+ function n(r, t) {
705
+ var a = { diagnostics: r };
706
+ return t != null && (a.only = t), a;
707
+ }
708
+ e.create = n;
709
+ function i(r) {
710
+ var t = r;
711
+ return s.defined(t) && s.typedArray(t.diagnostics, O.is) && (t.only === void 0 || s.typedArray(t.only, s.string));
712
+ }
713
+ e.is = i;
714
+ })(Ee || (Ee = {}));
715
+ var xe;
716
+ (function(e) {
717
+ function n(r, t, a) {
718
+ var o = { title: r }, u = !0;
719
+ return typeof t == "string" ? (u = !1, o.kind = t) : M.is(t) ? o.command = t : o.edit = t, u && a !== void 0 && (o.kind = a), o;
720
+ }
721
+ e.create = n;
722
+ function i(r) {
723
+ var t = r;
724
+ return t && s.string(t.title) && (t.diagnostics === void 0 || s.typedArray(t.diagnostics, O.is)) && (t.kind === void 0 || s.string(t.kind)) && (t.edit !== void 0 || t.command !== void 0) && (t.command === void 0 || M.is(t.command)) && (t.isPreferred === void 0 || s.boolean(t.isPreferred)) && (t.edit === void 0 || q.is(t.edit));
725
+ }
726
+ e.is = i;
727
+ })(xe || (xe = {}));
728
+ var Ce;
729
+ (function(e) {
730
+ function n(r, t) {
731
+ var a = { range: r };
732
+ return s.defined(t) && (a.data = t), a;
733
+ }
734
+ e.create = n;
735
+ function i(r) {
736
+ var t = r;
737
+ return s.defined(t) && p.is(t.range) && (s.undefined(t.command) || M.is(t.command));
738
+ }
739
+ e.is = i;
740
+ })(Ce || (Ce = {}));
741
+ var Ae;
742
+ (function(e) {
743
+ function n(r, t) {
744
+ return { tabSize: r, insertSpaces: t };
745
+ }
746
+ e.create = n;
747
+ function i(r) {
748
+ var t = r;
749
+ return s.defined(t) && s.uinteger(t.tabSize) && s.boolean(t.insertSpaces);
750
+ }
751
+ e.is = i;
752
+ })(Ae || (Ae = {}));
753
+ var ye;
754
+ (function(e) {
755
+ function n(r, t, a) {
756
+ return { range: r, target: t, data: a };
757
+ }
758
+ e.create = n;
759
+ function i(r) {
760
+ var t = r;
761
+ return s.defined(t) && p.is(t.range) && (s.undefined(t.target) || s.string(t.target));
762
+ }
763
+ e.is = i;
764
+ })(ye || (ye = {}));
765
+ var Ie;
766
+ (function(e) {
767
+ function n(r, t) {
768
+ return { range: r, parent: t };
769
+ }
770
+ e.create = n;
771
+ function i(r) {
772
+ var t = r;
773
+ return t !== void 0 && p.is(t.range) && (t.parent === void 0 || e.is(t.parent));
774
+ }
775
+ e.is = i;
776
+ })(Ie || (Ie = {}));
777
+ var Re;
778
+ (function(e) {
779
+ function n(a, o, u, g) {
780
+ return new Be(a, o, u, g);
781
+ }
782
+ e.create = n;
783
+ function i(a) {
784
+ var o = a;
785
+ return !!(s.defined(o) && s.string(o.uri) && (s.undefined(o.languageId) || s.string(o.languageId)) && s.uinteger(o.lineCount) && s.func(o.getText) && s.func(o.positionAt) && s.func(o.offsetAt));
786
+ }
787
+ e.is = i;
788
+ function r(a, o) {
789
+ for (var u = a.getText(), g = t(o, function(y, N) {
790
+ var J = y.range.start.line - N.range.start.line;
791
+ return J === 0 ? y.range.start.character - N.range.start.character : J;
792
+ }), d = u.length, v = g.length - 1; v >= 0; v--) {
793
+ var w = g[v], b = a.offsetAt(w.range.start), f = a.offsetAt(w.range.end);
794
+ if (f <= d)
795
+ u = u.substring(0, b) + w.newText + u.substring(f, u.length);
796
+ else
797
+ throw new Error("Overlapping edit");
798
+ d = b;
799
+ }
800
+ return u;
801
+ }
802
+ e.applyEdits = r;
803
+ function t(a, o) {
804
+ if (a.length <= 1)
805
+ return a;
806
+ var u = a.length / 2 | 0, g = a.slice(0, u), d = a.slice(u);
807
+ t(g, o), t(d, o);
808
+ for (var v = 0, w = 0, b = 0; v < g.length && w < d.length; ) {
809
+ var f = o(g[v], d[w]);
810
+ f <= 0 ? a[b++] = g[v++] : a[b++] = d[w++];
811
+ }
812
+ for (; v < g.length; )
813
+ a[b++] = g[v++];
814
+ for (; w < d.length; )
815
+ a[b++] = d[w++];
816
+ return a;
817
+ }
818
+ })(Re || (Re = {}));
819
+ var Be = function() {
820
+ function e(n, i, r, t) {
821
+ this._uri = n, this._languageId = i, this._version = r, this._content = t, this._lineOffsets = void 0;
822
+ }
823
+ return Object.defineProperty(e.prototype, "uri", {
824
+ get: function() {
825
+ return this._uri;
826
+ },
827
+ enumerable: !1,
828
+ configurable: !0
829
+ }), Object.defineProperty(e.prototype, "languageId", {
830
+ get: function() {
831
+ return this._languageId;
832
+ },
833
+ enumerable: !1,
834
+ configurable: !0
835
+ }), Object.defineProperty(e.prototype, "version", {
836
+ get: function() {
837
+ return this._version;
838
+ },
839
+ enumerable: !1,
840
+ configurable: !0
841
+ }), e.prototype.getText = function(n) {
842
+ if (n) {
843
+ var i = this.offsetAt(n.start), r = this.offsetAt(n.end);
844
+ return this._content.substring(i, r);
845
+ }
846
+ return this._content;
847
+ }, e.prototype.update = function(n, i) {
848
+ this._content = n.text, this._version = i, this._lineOffsets = void 0;
849
+ }, e.prototype.getLineOffsets = function() {
850
+ if (this._lineOffsets === void 0) {
851
+ for (var n = [], i = this._content, r = !0, t = 0; t < i.length; t++) {
852
+ r && (n.push(t), r = !1);
853
+ var a = i.charAt(t);
854
+ r = a === "\r" || a === `
855
+ `, a === "\r" && t + 1 < i.length && i.charAt(t + 1) === `
856
+ ` && t++;
857
+ }
858
+ r && i.length > 0 && n.push(i.length), this._lineOffsets = n;
859
+ }
860
+ return this._lineOffsets;
861
+ }, e.prototype.positionAt = function(n) {
862
+ n = Math.max(Math.min(n, this._content.length), 0);
863
+ var i = this.getLineOffsets(), r = 0, t = i.length;
864
+ if (t === 0)
865
+ return k.create(0, n);
866
+ for (; r < t; ) {
867
+ var a = Math.floor((r + t) / 2);
868
+ i[a] > n ? t = a : r = a + 1;
869
+ }
870
+ var o = r - 1;
871
+ return k.create(o, n - i[o]);
872
+ }, e.prototype.offsetAt = function(n) {
873
+ var i = this.getLineOffsets();
874
+ if (n.line >= i.length)
875
+ return this._content.length;
876
+ if (n.line < 0)
877
+ return 0;
878
+ var r = i[n.line], t = n.line + 1 < i.length ? i[n.line + 1] : this._content.length;
879
+ return Math.max(Math.min(r + n.character, t), r);
880
+ }, Object.defineProperty(e.prototype, "lineCount", {
881
+ get: function() {
882
+ return this.getLineOffsets().length;
883
+ },
884
+ enumerable: !1,
885
+ configurable: !0
886
+ }), e;
887
+ }(), s;
888
+ (function(e) {
889
+ var n = Object.prototype.toString;
890
+ function i(f) {
891
+ return typeof f < "u";
892
+ }
893
+ e.defined = i;
894
+ function r(f) {
895
+ return typeof f > "u";
896
+ }
897
+ e.undefined = r;
898
+ function t(f) {
899
+ return f === !0 || f === !1;
900
+ }
901
+ e.boolean = t;
902
+ function a(f) {
903
+ return n.call(f) === "[object String]";
904
+ }
905
+ e.string = a;
906
+ function o(f) {
907
+ return n.call(f) === "[object Number]";
908
+ }
909
+ e.number = o;
910
+ function u(f, y, N) {
911
+ return n.call(f) === "[object Number]" && y <= f && f <= N;
912
+ }
913
+ e.numberRange = u;
914
+ function g(f) {
915
+ return n.call(f) === "[object Number]" && -2147483648 <= f && f <= 2147483647;
916
+ }
917
+ e.integer = g;
918
+ function d(f) {
919
+ return n.call(f) === "[object Number]" && 0 <= f && f <= 2147483647;
920
+ }
921
+ e.uinteger = d;
922
+ function v(f) {
923
+ return n.call(f) === "[object Function]";
924
+ }
925
+ e.func = v;
926
+ function w(f) {
927
+ return f !== null && typeof f == "object";
928
+ }
929
+ e.objectLiteral = w;
930
+ function b(f, y) {
931
+ return Array.isArray(f) && f.every(y);
932
+ }
933
+ e.typedArray = b;
934
+ })(s || (s = {}));
935
+ var $e = class {
936
+ constructor(e, n, i) {
937
+ E(this, "_disposables", []);
938
+ E(this, "_listener", /* @__PURE__ */ Object.create(null));
939
+ this._languageId = e, this._worker = n;
940
+ const r = (a) => {
941
+ let o = a.getLanguageId();
942
+ if (o !== this._languageId)
943
+ return;
944
+ let u;
945
+ this._listener[a.uri.toString()] = a.onDidChangeContent(() => {
946
+ window.clearTimeout(u), u = window.setTimeout(() => this._doValidate(a.uri, o), 500);
947
+ }), this._doValidate(a.uri, o);
948
+ }, t = (a) => {
949
+ c.editor.setModelMarkers(a, this._languageId, []);
950
+ let o = a.uri.toString(), u = this._listener[o];
951
+ u && (u.dispose(), delete this._listener[o]);
952
+ };
953
+ this._disposables.push(c.editor.onDidCreateModel(r)), this._disposables.push(c.editor.onWillDisposeModel(t)), this._disposables.push(c.editor.onDidChangeModelLanguage((a) => {
954
+ t(a.model), r(a.model);
955
+ })), this._disposables.push(i((a) => {
956
+ c.editor.getModels().forEach((o) => {
957
+ o.getLanguageId() === this._languageId && (t(o), r(o));
958
+ });
959
+ })), this._disposables.push({
960
+ dispose: () => {
961
+ c.editor.getModels().forEach(t);
962
+ for (let a in this._listener)
963
+ this._listener[a].dispose();
964
+ }
965
+ }), c.editor.getModels().forEach(r);
966
+ }
967
+ dispose() {
968
+ this._disposables.forEach((e) => e && e.dispose()), this._disposables.length = 0;
969
+ }
970
+ _doValidate(e, n) {
971
+ this._worker(e).then((i) => i.doValidation(e.toString())).then((i) => {
972
+ const r = i.map((a) => Qe(e, a));
973
+ let t = c.editor.getModel(e);
974
+ t && t.getLanguageId() === n && c.editor.setModelMarkers(t, n, r);
975
+ }).then(void 0, (i) => {
976
+ console.error(i);
977
+ });
978
+ }
979
+ };
980
+ function qe(e) {
981
+ switch (e) {
982
+ case I.Error:
983
+ return c.MarkerSeverity.Error;
984
+ case I.Warning:
985
+ return c.MarkerSeverity.Warning;
986
+ case I.Information:
987
+ return c.MarkerSeverity.Info;
988
+ case I.Hint:
989
+ return c.MarkerSeverity.Hint;
990
+ default:
991
+ return c.MarkerSeverity.Info;
992
+ }
993
+ }
994
+ function Qe(e, n) {
995
+ let i = typeof n.code == "number" ? String(n.code) : n.code;
996
+ return {
997
+ severity: qe(n.severity),
998
+ startLineNumber: n.range.start.line + 1,
999
+ startColumn: n.range.start.character + 1,
1000
+ endLineNumber: n.range.end.line + 1,
1001
+ endColumn: n.range.end.character + 1,
1002
+ message: n.message,
1003
+ code: i,
1004
+ source: n.source
1005
+ };
1006
+ }
1007
+ var Ge = class {
1008
+ constructor(e, n) {
1009
+ this._worker = e, this._triggerCharacters = n;
1010
+ }
1011
+ get triggerCharacters() {
1012
+ return this._triggerCharacters;
1013
+ }
1014
+ provideCompletionItems(e, n, i, r) {
1015
+ const t = e.uri;
1016
+ return this._worker(t).then((a) => a.doComplete(t.toString(), A(n))).then((a) => {
1017
+ if (!a)
1018
+ return;
1019
+ const o = e.getWordUntilPosition(n), u = new c.Range(n.lineNumber, o.startColumn, n.lineNumber, o.endColumn), g = a.items.map((d) => {
1020
+ const v = {
1021
+ label: d.label,
1022
+ insertText: d.insertText || d.label,
1023
+ sortText: d.sortText,
1024
+ filterText: d.filterText,
1025
+ documentation: d.documentation,
1026
+ detail: d.detail,
1027
+ command: Ze(d.command),
1028
+ range: u,
1029
+ kind: Ye(d.kind)
1030
+ };
1031
+ return d.textEdit && (Je(d.textEdit) ? v.range = {
1032
+ insert: _(d.textEdit.insert),
1033
+ replace: _(d.textEdit.replace)
1034
+ } : v.range = _(d.textEdit.range), v.insertText = d.textEdit.newText), d.additionalTextEdits && (v.additionalTextEdits = d.additionalTextEdits.map(j)), d.insertTextFormat === G.Snippet && (v.insertTextRules = c.languages.CompletionItemInsertTextRule.InsertAsSnippet), v;
1035
+ });
1036
+ return {
1037
+ isIncomplete: a.isIncomplete,
1038
+ suggestions: g
1039
+ };
1040
+ });
1041
+ }
1042
+ };
1043
+ function A(e) {
1044
+ if (e)
1045
+ return { character: e.column - 1, line: e.lineNumber - 1 };
1046
+ }
1047
+ function Me(e) {
1048
+ if (e)
1049
+ return {
1050
+ start: {
1051
+ line: e.startLineNumber - 1,
1052
+ character: e.startColumn - 1
1053
+ },
1054
+ end: { line: e.endLineNumber - 1, character: e.endColumn - 1 }
1055
+ };
1056
+ }
1057
+ function _(e) {
1058
+ if (e)
1059
+ return new c.Range(e.start.line + 1, e.start.character + 1, e.end.line + 1, e.end.character + 1);
1060
+ }
1061
+ function Je(e) {
1062
+ return typeof e.insert < "u" && typeof e.replace < "u";
1063
+ }
1064
+ function Ye(e) {
1065
+ const n = c.languages.CompletionItemKind;
1066
+ switch (e) {
1067
+ case l.Text:
1068
+ return n.Text;
1069
+ case l.Method:
1070
+ return n.Method;
1071
+ case l.Function:
1072
+ return n.Function;
1073
+ case l.Constructor:
1074
+ return n.Constructor;
1075
+ case l.Field:
1076
+ return n.Field;
1077
+ case l.Variable:
1078
+ return n.Variable;
1079
+ case l.Class:
1080
+ return n.Class;
1081
+ case l.Interface:
1082
+ return n.Interface;
1083
+ case l.Module:
1084
+ return n.Module;
1085
+ case l.Property:
1086
+ return n.Property;
1087
+ case l.Unit:
1088
+ return n.Unit;
1089
+ case l.Value:
1090
+ return n.Value;
1091
+ case l.Enum:
1092
+ return n.Enum;
1093
+ case l.Keyword:
1094
+ return n.Keyword;
1095
+ case l.Snippet:
1096
+ return n.Snippet;
1097
+ case l.Color:
1098
+ return n.Color;
1099
+ case l.File:
1100
+ return n.File;
1101
+ case l.Reference:
1102
+ return n.Reference;
1103
+ }
1104
+ return n.Property;
1105
+ }
1106
+ function j(e) {
1107
+ if (e)
1108
+ return {
1109
+ range: _(e.range),
1110
+ text: e.newText
1111
+ };
1112
+ }
1113
+ function Ze(e) {
1114
+ return e && e.command === "editor.action.triggerSuggest" ? { id: e.command, title: e.title, arguments: e.arguments } : void 0;
1115
+ }
1116
+ var Ke = class {
1117
+ constructor(e) {
1118
+ this._worker = e;
1119
+ }
1120
+ provideHover(e, n, i) {
1121
+ let r = e.uri;
1122
+ return this._worker(r).then((t) => t.doHover(r.toString(), A(n))).then((t) => {
1123
+ if (t)
1124
+ return {
1125
+ range: _(t.range),
1126
+ contents: tt(t.contents)
1127
+ };
1128
+ });
1129
+ }
1130
+ };
1131
+ function et(e) {
1132
+ return e && typeof e == "object" && typeof e.kind == "string";
1133
+ }
1134
+ function Pe(e) {
1135
+ return typeof e == "string" ? {
1136
+ value: e
1137
+ } : et(e) ? e.kind === "plaintext" ? {
1138
+ value: e.value.replace(/[\\`*_{}[\]()#+\-.!]/g, "\\$&")
1139
+ } : {
1140
+ value: e.value
1141
+ } : { value: "```" + e.language + `
1142
+ ` + e.value + "\n```\n" };
1143
+ }
1144
+ function tt(e) {
1145
+ if (e)
1146
+ return Array.isArray(e) ? e.map(Pe) : [Pe(e)];
1147
+ }
1148
+ var rt = class {
1149
+ constructor(e) {
1150
+ this._worker = e;
1151
+ }
1152
+ provideDocumentHighlights(e, n, i) {
1153
+ const r = e.uri;
1154
+ return this._worker(r).then((t) => t.findDocumentHighlights(r.toString(), A(n))).then((t) => {
1155
+ if (t)
1156
+ return t.map((a) => ({
1157
+ range: _(a.range),
1158
+ kind: nt(a.kind)
1159
+ }));
1160
+ });
1161
+ }
1162
+ };
1163
+ function nt(e) {
1164
+ switch (e) {
1165
+ case D.Read:
1166
+ return c.languages.DocumentHighlightKind.Read;
1167
+ case D.Write:
1168
+ return c.languages.DocumentHighlightKind.Write;
1169
+ case D.Text:
1170
+ return c.languages.DocumentHighlightKind.Text;
1171
+ }
1172
+ return c.languages.DocumentHighlightKind.Text;
1173
+ }
1174
+ var it = class {
1175
+ constructor(e) {
1176
+ this._worker = e;
1177
+ }
1178
+ provideDefinition(e, n, i) {
1179
+ const r = e.uri;
1180
+ return this._worker(r).then((t) => t.findDefinition(r.toString(), A(n))).then((t) => {
1181
+ if (t)
1182
+ return [Te(t)];
1183
+ });
1184
+ }
1185
+ };
1186
+ function Te(e) {
1187
+ return {
1188
+ uri: c.Uri.parse(e.uri),
1189
+ range: _(e.range)
1190
+ };
1191
+ }
1192
+ var at = class {
1193
+ constructor(e) {
1194
+ this._worker = e;
1195
+ }
1196
+ provideReferences(e, n, i, r) {
1197
+ const t = e.uri;
1198
+ return this._worker(t).then((a) => a.findReferences(t.toString(), A(n))).then((a) => {
1199
+ if (a)
1200
+ return a.map(Te);
1201
+ });
1202
+ }
1203
+ }, ot = class {
1204
+ constructor(e) {
1205
+ this._worker = e;
1206
+ }
1207
+ provideRenameEdits(e, n, i, r) {
1208
+ const t = e.uri;
1209
+ return this._worker(t).then((a) => a.doRename(t.toString(), A(n), i)).then((a) => st(a));
1210
+ }
1211
+ };
1212
+ function st(e) {
1213
+ if (!e || !e.changes)
1214
+ return;
1215
+ let n = [];
1216
+ for (let i in e.changes) {
1217
+ const r = c.Uri.parse(i);
1218
+ for (let t of e.changes[i])
1219
+ n.push({
1220
+ resource: r,
1221
+ versionId: void 0,
1222
+ textEdit: {
1223
+ range: _(t.range),
1224
+ text: t.newText
1225
+ }
1226
+ });
1227
+ }
1228
+ return {
1229
+ edits: n
1230
+ };
1231
+ }
1232
+ var ut = class {
1233
+ constructor(e) {
1234
+ this._worker = e;
1235
+ }
1236
+ provideDocumentSymbols(e, n) {
1237
+ const i = e.uri;
1238
+ return this._worker(i).then((r) => r.findDocumentSymbols(i.toString())).then((r) => {
1239
+ if (r)
1240
+ return r.map((t) => ({
1241
+ name: t.name,
1242
+ detail: "",
1243
+ containerName: t.containerName,
1244
+ kind: ct(t.kind),
1245
+ range: _(t.location.range),
1246
+ selectionRange: _(t.location.range),
1247
+ tags: []
1248
+ }));
1249
+ });
1250
+ }
1251
+ };
1252
+ function ct(e) {
1253
+ let n = c.languages.SymbolKind;
1254
+ switch (e) {
1255
+ case h.File:
1256
+ return n.Array;
1257
+ case h.Module:
1258
+ return n.Module;
1259
+ case h.Namespace:
1260
+ return n.Namespace;
1261
+ case h.Package:
1262
+ return n.Package;
1263
+ case h.Class:
1264
+ return n.Class;
1265
+ case h.Method:
1266
+ return n.Method;
1267
+ case h.Property:
1268
+ return n.Property;
1269
+ case h.Field:
1270
+ return n.Field;
1271
+ case h.Constructor:
1272
+ return n.Constructor;
1273
+ case h.Enum:
1274
+ return n.Enum;
1275
+ case h.Interface:
1276
+ return n.Interface;
1277
+ case h.Function:
1278
+ return n.Function;
1279
+ case h.Variable:
1280
+ return n.Variable;
1281
+ case h.Constant:
1282
+ return n.Constant;
1283
+ case h.String:
1284
+ return n.String;
1285
+ case h.Number:
1286
+ return n.Number;
1287
+ case h.Boolean:
1288
+ return n.Boolean;
1289
+ case h.Array:
1290
+ return n.Array;
1291
+ }
1292
+ return n.Function;
1293
+ }
1294
+ var bt = class {
1295
+ constructor(e) {
1296
+ this._worker = e;
1297
+ }
1298
+ provideLinks(e, n) {
1299
+ const i = e.uri;
1300
+ return this._worker(i).then((r) => r.findDocumentLinks(i.toString())).then((r) => {
1301
+ if (r)
1302
+ return {
1303
+ links: r.map((t) => ({
1304
+ range: _(t.range),
1305
+ url: t.target
1306
+ }))
1307
+ };
1308
+ });
1309
+ }
1310
+ }, dt = class {
1311
+ constructor(e) {
1312
+ this._worker = e;
1313
+ }
1314
+ provideDocumentFormattingEdits(e, n, i) {
1315
+ const r = e.uri;
1316
+ return this._worker(r).then((t) => t.format(r.toString(), null, Se(n)).then((a) => {
1317
+ if (!(!a || a.length === 0))
1318
+ return a.map(j);
1319
+ }));
1320
+ }
1321
+ }, ft = class {
1322
+ constructor(e) {
1323
+ this._worker = e;
1324
+ }
1325
+ provideDocumentRangeFormattingEdits(e, n, i, r) {
1326
+ const t = e.uri;
1327
+ return this._worker(t).then((a) => a.format(t.toString(), Me(n), Se(i)).then((o) => {
1328
+ if (!(!o || o.length === 0))
1329
+ return o.map(j);
1330
+ }));
1331
+ }
1332
+ };
1333
+ function Se(e) {
1334
+ return {
1335
+ tabSize: e.tabSize,
1336
+ insertSpaces: e.insertSpaces
1337
+ };
1338
+ }
1339
+ var gt = class {
1340
+ constructor(e) {
1341
+ this._worker = e;
1342
+ }
1343
+ provideDocumentColors(e, n) {
1344
+ const i = e.uri;
1345
+ return this._worker(i).then((r) => r.findDocumentColors(i.toString())).then((r) => {
1346
+ if (r)
1347
+ return r.map((t) => ({
1348
+ color: t.color,
1349
+ range: _(t.range)
1350
+ }));
1351
+ });
1352
+ }
1353
+ provideColorPresentations(e, n, i) {
1354
+ const r = e.uri;
1355
+ return this._worker(r).then((t) => t.getColorPresentations(r.toString(), n.color, Me(n.range))).then((t) => {
1356
+ if (t)
1357
+ return t.map((a) => {
1358
+ let o = {
1359
+ label: a.label
1360
+ };
1361
+ return a.textEdit && (o.textEdit = j(a.textEdit)), a.additionalTextEdits && (o.additionalTextEdits = a.additionalTextEdits.map(j)), o;
1362
+ });
1363
+ });
1364
+ }
1365
+ }, lt = class {
1366
+ constructor(e) {
1367
+ this._worker = e;
1368
+ }
1369
+ provideFoldingRanges(e, n, i) {
1370
+ const r = e.uri;
1371
+ return this._worker(r).then((t) => t.getFoldingRanges(r.toString(), n)).then((t) => {
1372
+ if (t)
1373
+ return t.map((a) => {
1374
+ const o = {
1375
+ start: a.startLine + 1,
1376
+ end: a.endLine + 1
1377
+ };
1378
+ return typeof a.kind < "u" && (o.kind = ht(a.kind)), o;
1379
+ });
1380
+ });
1381
+ }
1382
+ };
1383
+ function ht(e) {
1384
+ switch (e) {
1385
+ case P.Comment:
1386
+ return c.languages.FoldingRangeKind.Comment;
1387
+ case P.Imports:
1388
+ return c.languages.FoldingRangeKind.Imports;
1389
+ case P.Region:
1390
+ return c.languages.FoldingRangeKind.Region;
1391
+ }
1392
+ }
1393
+ var vt = class {
1394
+ constructor(e) {
1395
+ this._worker = e;
1396
+ }
1397
+ provideSelectionRanges(e, n, i) {
1398
+ const r = e.uri;
1399
+ return this._worker(r).then((t) => t.getSelectionRanges(r.toString(), n.map(A))).then((t) => {
1400
+ if (t)
1401
+ return t.map((a) => {
1402
+ const o = [];
1403
+ for (; a; )
1404
+ o.push({ range: _(a.range) }), a = a.parent;
1405
+ return o;
1406
+ });
1407
+ });
1408
+ }
1409
+ };
1410
+ function Et(e) {
1411
+ const n = [], i = [], r = new Xe(e);
1412
+ n.push(r);
1413
+ const t = (...o) => r.getLanguageServiceWorker(...o);
1414
+ function a() {
1415
+ const { languageId: o, modeConfiguration: u } = e;
1416
+ Fe(i), u.completionItems && i.push(c.languages.registerCompletionItemProvider(o, new Ge(t, ["/", "-", ":"]))), u.hovers && i.push(c.languages.registerHoverProvider(o, new Ke(t))), u.documentHighlights && i.push(c.languages.registerDocumentHighlightProvider(o, new rt(t))), u.definitions && i.push(c.languages.registerDefinitionProvider(o, new it(t))), u.references && i.push(c.languages.registerReferenceProvider(o, new at(t))), u.documentSymbols && i.push(c.languages.registerDocumentSymbolProvider(o, new ut(t))), u.rename && i.push(c.languages.registerRenameProvider(o, new ot(t))), u.colors && i.push(c.languages.registerColorProvider(o, new gt(t))), u.foldingRanges && i.push(c.languages.registerFoldingRangeProvider(o, new lt(t))), u.diagnostics && i.push(new $e(o, t, e.onDidChange)), u.selectionRanges && i.push(c.languages.registerSelectionRangeProvider(o, new vt(t))), u.documentFormattingEdits && i.push(c.languages.registerDocumentFormattingEditProvider(o, new dt(t))), u.documentRangeFormattingEdits && i.push(c.languages.registerDocumentRangeFormattingEditProvider(o, new ft(t)));
1417
+ }
1418
+ return a(), n.push(De(i)), De(n);
1419
+ }
1420
+ function De(e) {
1421
+ return { dispose: () => Fe(e) };
1422
+ }
1423
+ function Fe(e) {
1424
+ for (; e.length; )
1425
+ e.pop().dispose();
1426
+ }
1427
+ export {
1428
+ Ge as CompletionAdapter,
1429
+ it as DefinitionAdapter,
1430
+ $e as DiagnosticsAdapter,
1431
+ gt as DocumentColorAdapter,
1432
+ dt as DocumentFormattingEditProvider,
1433
+ rt as DocumentHighlightAdapter,
1434
+ bt as DocumentLinkAdapter,
1435
+ ft as DocumentRangeFormattingEditProvider,
1436
+ ut as DocumentSymbolAdapter,
1437
+ lt as FoldingRangeAdapter,
1438
+ Ke as HoverAdapter,
1439
+ at as ReferenceAdapter,
1440
+ ot as RenameAdapter,
1441
+ vt as SelectionRangeAdapter,
1442
+ Xe as WorkerManager,
1443
+ A as fromPosition,
1444
+ Me as fromRange,
1445
+ Et as setupMode,
1446
+ _ as toRange,
1447
+ j as toTextEdit
1448
+ };