@ansible/ansible-ui-framework 2.4.2597 → 2.4.2598

Sign up to get free protection for your applications and to get access to all the features.
Files changed (177) hide show
  1. package/index.js +45612 -148
  2. package/index.umd.cjs +261 -2173
  3. package/package.json +7 -6
  4. package/publish/index.d.ts +337 -148
  5. package/style.css +1 -1
  6. package/abap-BgxiW-yv.js +0 -1404
  7. package/apex-Ci_BavZh.js +0 -332
  8. package/azcli-dfO4wGjy.js +0 -74
  9. package/bat-DD810Xk_.js +0 -106
  10. package/bicep-8OENIIxl.js +0 -108
  11. package/cameligo-NqPxsDwa.js +0 -180
  12. package/clojure-DuHkQIc1.js +0 -767
  13. package/coffee-B3cpF2mL.js +0 -238
  14. package/cpp-BJvlC8pp.js +0 -395
  15. package/csharp-B-mepg9G.js +0 -332
  16. package/csp-CZDIWMVF.js +0 -59
  17. package/css-CLWUu9O1.js +0 -193
  18. package/cssMode-BW_EgCuT.js +0 -1577
  19. package/cypher-DaPSdc0H.js +0 -269
  20. package/dart-Do9iT_o8.js +0 -287
  21. package/dockerfile-CbJBIDss.js +0 -136
  22. package/ecl-BqVPFR32.js +0 -462
  23. package/elixir-D1QTcrNJ.js +0 -575
  24. package/flow9-8noNFj4g.js +0 -148
  25. package/freemarker2-CZroC-2x.js +0 -995
  26. package/fsharp-C8jetu08.js +0 -223
  27. package/go-CwkaVtEf.js +0 -224
  28. package/graphql-CN0L02lB.js +0 -157
  29. package/handlebars-DdZaSSq2.js +0 -425
  30. package/hcl-B8DTUjkt.js +0 -189
  31. package/html-BStYWvMR.js +0 -314
  32. package/htmlMode-BZ30jslh.js +0 -1587
  33. package/index-_bG9dmst.js +0 -157805
  34. package/ini-BAHk9dez.js +0 -77
  35. package/java-BqU7F-WC.js +0 -238
  36. package/javascript-R1fkmvzs.js +0 -76
  37. package/jsonMode-B3D-ZZhn.js +0 -2002
  38. package/julia-7wzAFYJ_.js +0 -517
  39. package/kotlin-Ds6t9yxb.js +0 -259
  40. package/less-BsKXqSGe.js +0 -168
  41. package/lexon-CxjeM0Fy.js +0 -163
  42. package/liquid-COCYG7jZ.js +0 -246
  43. package/lua-CZeocWyu.js +0 -168
  44. package/m3-DrAa334y.js +0 -216
  45. package/markdown-BKScSdMX.js +0 -235
  46. package/mdx-CnriKNQ4.js +0 -171
  47. package/mips-C2kxK_Lk.js +0 -204
  48. package/msdax-CV-iM8Y9.js +0 -381
  49. package/mysql-0UKhlzQO.js +0 -884
  50. package/objective-c-CbKhSCGr.js +0 -189
  51. package/pascal-CP-K8RTj.js +0 -257
  52. package/pascaligo-DNS345Ec.js +0 -170
  53. package/perl-CU_O2Ux7.js +0 -632
  54. package/pgsql-CvE830Au.js +0 -857
  55. package/php-BvwPLbR6.js +0 -506
  56. package/pla-DJ8gwRb5.js +0 -143
  57. package/postiats-CGZof9No.js +0 -913
  58. package/powerquery-C7bI8brw.js +0 -896
  59. package/powershell-CmptSHHa.js +0 -245
  60. package/protobuf-CNFSy7mI.js +0 -426
  61. package/publish/abap-BgxiW-yv.d.ts +0 -63
  62. package/publish/apex-Ci_BavZh.d.ts +0 -65
  63. package/publish/azcli-dfO4wGjy.d.ts +0 -47
  64. package/publish/bat-DD810Xk_.d.ts +0 -57
  65. package/publish/bicep-8OENIIxl.d.ts +0 -146
  66. package/publish/cameligo-NqPxsDwa.d.ts +0 -55
  67. package/publish/clojure-DuHkQIc1.d.ts +0 -50
  68. package/publish/coffee-B3cpF2mL.d.ts +0 -102
  69. package/publish/cpp-BJvlC8pp.d.ts +0 -83
  70. package/publish/csharp-B-mepg9G.d.ts +0 -113
  71. package/publish/csp-CZDIWMVF.d.ts +0 -17
  72. package/publish/css-CLWUu9O1.d.ts +0 -144
  73. package/publish/cssMode-BW_EgCuT.d.ts +0 -130
  74. package/publish/cypher-DaPSdc0H.d.ts +0 -65
  75. package/publish/dart-Do9iT_o8.d.ts +0 -83
  76. package/publish/dockerfile-CbJBIDss.d.ts +0 -73
  77. package/publish/ecl-BqVPFR32.d.ts +0 -60
  78. package/publish/elixir-D1QTcrNJ.d.ts +0 -307
  79. package/publish/flow9-8noNFj4g.d.ts +0 -45
  80. package/publish/freemarker2-CZroC-2x.d.ts +0 -1543
  81. package/publish/fsharp-C8jetu08.d.ts +0 -61
  82. package/publish/go-CwkaVtEf.d.ts +0 -51
  83. package/publish/graphql-CN0L02lB.d.ts +0 -75
  84. package/publish/handlebars-DdZaSSq2.d.ts +0 -176
  85. package/publish/hcl-B8DTUjkt.d.ts +0 -77
  86. package/publish/html-BStYWvMR.d.ts +0 -129
  87. package/publish/htmlMode-BZ30jslh.d.ts +0 -131
  88. package/publish/index-_bG9dmst.d.ts +0 -2914
  89. package/publish/ini-BAHk9dez.d.ts +0 -35
  90. package/publish/java-BqU7F-WC.d.ts +0 -57
  91. package/publish/javascript-R1fkmvzs.d.ts +0 -111
  92. package/publish/jsonMode-B3D-ZZhn.d.ts +0 -131
  93. package/publish/julia-7wzAFYJ_.d.ts +0 -92
  94. package/publish/kotlin-Ds6t9yxb.d.ts +0 -57
  95. package/publish/less-BsKXqSGe.d.ts +0 -88
  96. package/publish/lexon-CxjeM0Fy.d.ts +0 -81
  97. package/publish/liquid-COCYG7jZ.d.ts +0 -73
  98. package/publish/lua-CZeocWyu.d.ts +0 -66
  99. package/publish/m3-DrAa334y.d.ts +0 -63
  100. package/publish/markdown-BKScSdMX.d.ts +0 -129
  101. package/publish/mdx-CnriKNQ4.d.ts +0 -139
  102. package/publish/mips-C2kxK_Lk.d.ts +0 -79
  103. package/publish/msdax-CV-iM8Y9.d.ts +0 -68
  104. package/publish/mysql-0UKhlzQO.d.ts +0 -76
  105. package/publish/objective-c-CbKhSCGr.d.ts +0 -46
  106. package/publish/pascal-CP-K8RTj.d.ts +0 -62
  107. package/publish/pascaligo-DNS345Ec.d.ts +0 -55
  108. package/publish/perl-CU_O2Ux7.d.ts +0 -116
  109. package/publish/pgsql-CvE830Au.d.ts +0 -80
  110. package/publish/php-BvwPLbR6.d.ts +0 -193
  111. package/publish/pla-DJ8gwRb5.d.ts +0 -71
  112. package/publish/postiats-CGZof9No.d.ts +0 -212
  113. package/publish/powerquery-C7bI8brw.d.ts +0 -63
  114. package/publish/powershell-CmptSHHa.d.ts +0 -119
  115. package/publish/protobuf-CNFSy7mI.d.ts +0 -364
  116. package/publish/pug-CzItlbqs.d.ts +0 -170
  117. package/publish/python-8vPuu566.d.ts +0 -65
  118. package/publish/qsharp-C1B8howk.d.ts +0 -75
  119. package/publish/r-BTwZKg_d.d.ts +0 -77
  120. package/publish/razor-CtOmeuwi.d.ts +0 -194
  121. package/publish/redis-BUv7CvJd.d.ts +0 -63
  122. package/publish/redshift-jrBDFghq.d.ts +0 -80
  123. package/publish/restructuredtext-BxbR-VyS.d.ts +0 -69
  124. package/publish/ruby-B0TfnHZH.d.ts +0 -239
  125. package/publish/rust-D_saCUFK.d.ts +0 -94
  126. package/publish/sb-DcgiWk7t.d.ts +0 -54
  127. package/publish/scala-BfLWIEFR.d.ts +0 -135
  128. package/publish/scheme-CZaOrAgo.d.ts +0 -46
  129. package/publish/scss-Du10_18v.d.ts +0 -220
  130. package/publish/shell-D1p7ZuXl.d.ts +0 -53
  131. package/publish/solidity-DzIDOgno.d.ts +0 -50
  132. package/publish/sophia-BU-qT3RS.d.ts +0 -50
  133. package/publish/sparql-DVtIp1VH.d.ts +0 -47
  134. package/publish/sql-1GwNodTS.d.ts +0 -86
  135. package/publish/st-DPXgTepQ.d.ts +0 -87
  136. package/publish/swift-ZhwunzBf.d.ts +0 -80
  137. package/publish/systemverilog-CVvtzxud.d.ts +0 -109
  138. package/publish/tcl-CYCJd6bV.d.ts +0 -87
  139. package/publish/tsMode-BSdN2klD.d.ts +0 -436
  140. package/publish/twig-JIfYOL6u.d.ts +0 -135
  141. package/publish/typescript-DWjYWuYm.d.ts +0 -110
  142. package/publish/typespec-BH4BOGFR.d.ts +0 -146
  143. package/publish/vb-6Rp6KK9h.d.ts +0 -60
  144. package/publish/wgsl-kJTvkQmx.d.ts +0 -72
  145. package/publish/xml-BqVRyB3K.d.ts +0 -72
  146. package/publish/yaml-DEH8xqyy.d.ts +0 -87
  147. package/pug-CzItlbqs.js +0 -408
  148. package/python-8vPuu566.js +0 -307
  149. package/qsharp-C1B8howk.js +0 -307
  150. package/r-BTwZKg_d.js +0 -249
  151. package/razor-CtOmeuwi.js +0 -556
  152. package/redis-BUv7CvJd.js +0 -308
  153. package/redshift-jrBDFghq.js +0 -815
  154. package/restructuredtext-BxbR-VyS.js +0 -180
  155. package/ruby-B0TfnHZH.js +0 -517
  156. package/rust-D_saCUFK.js +0 -349
  157. package/sb-DcgiWk7t.js +0 -121
  158. package/scala-BfLWIEFR.js +0 -376
  159. package/scheme-CZaOrAgo.js +0 -114
  160. package/scss-Du10_18v.js +0 -268
  161. package/shell-D1p7ZuXl.js +0 -227
  162. package/solidity-DzIDOgno.js +0 -1373
  163. package/sophia-BU-qT3RS.js +0 -205
  164. package/sparql-DVtIp1VH.js +0 -207
  165. package/sql-1GwNodTS.js +0 -859
  166. package/st-DPXgTepQ.js +0 -422
  167. package/swift-ZhwunzBf.js +0 -318
  168. package/systemverilog-CVvtzxud.js +0 -582
  169. package/tcl-CYCJd6bV.js +0 -238
  170. package/tsMode-BSdN2klD.js +0 -895
  171. package/twig-JIfYOL6u.js +0 -398
  172. package/typescript-DWjYWuYm.js +0 -349
  173. package/typespec-BH4BOGFR.js +0 -123
  174. package/vb-6Rp6KK9h.js +0 -378
  175. package/wgsl-kJTvkQmx.js +0 -445
  176. package/xml-BqVRyB3K.js +0 -101
  177. package/yaml-DEH8xqyy.js +0 -212
@@ -1,1577 +0,0 @@
1
- import { m as et } from "./index-_bG9dmst.js";
2
- /*!-----------------------------------------------------------------------------
3
- * Copyright (c) Microsoft Corporation. All rights reserved.
4
- * Version: 0.52.0(f6dc0eb8fce67e57f6036f4769d92c1666cdf546)
5
- * Released under the MIT license
6
- * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
7
- *-----------------------------------------------------------------------------*/
8
- var tt = Object.defineProperty, rt = Object.getOwnPropertyDescriptor, nt = Object.getOwnPropertyNames, it = Object.prototype.hasOwnProperty, ot = (e, n, i, r) => {
9
- if (n && typeof n == "object" || typeof n == "function")
10
- for (let t of nt(n))
11
- !it.call(e, t) && t !== i && tt(e, t, { get: () => n[t], enumerable: !(r = rt(n, t)) || r.enumerable });
12
- return e;
13
- }, at = (e, n, i) => (ot(e, n, "default"), i), d = {};
14
- at(d, et);
15
- var st = 2 * 60 * 1e3, ut = class {
16
- constructor(e) {
17
- 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());
18
- }
19
- _stopWorker() {
20
- this._worker && (this._worker.dispose(), this._worker = null), this._client = null;
21
- }
22
- dispose() {
23
- clearInterval(this._idleCheckInterval), this._configChangeListener.dispose(), this._stopWorker();
24
- }
25
- _checkIfIdle() {
26
- if (!this._worker)
27
- return;
28
- Date.now() - this._lastUsedTime > st && this._stopWorker();
29
- }
30
- _getClient() {
31
- return this._lastUsedTime = Date.now(), this._client || (this._worker = d.editor.createWebWorker({
32
- // module that exports the create() method and returns a `CSSWorker` instance
33
- moduleId: "vs/language/css/cssWorker",
34
- label: this._defaults.languageId,
35
- // passed in to the create() method
36
- createData: {
37
- options: this._defaults.options,
38
- languageId: this._defaults.languageId
39
- }
40
- }), this._client = this._worker.getProxy()), this._client;
41
- }
42
- getLanguageServiceWorker(...e) {
43
- let n;
44
- return this._getClient().then((i) => {
45
- n = i;
46
- }).then((i) => {
47
- if (this._worker)
48
- return this._worker.withSyncedResources(e);
49
- }).then((i) => n);
50
- }
51
- }, T;
52
- (function(e) {
53
- function n(i) {
54
- return typeof i == "string";
55
- }
56
- e.is = n;
57
- })(T || (T = {}));
58
- var O;
59
- (function(e) {
60
- function n(i) {
61
- return typeof i == "string";
62
- }
63
- e.is = n;
64
- })(O || (O = {}));
65
- var Y;
66
- (function(e) {
67
- e.MIN_VALUE = -2147483648, e.MAX_VALUE = 2147483647;
68
- function n(i) {
69
- return typeof i == "number" && e.MIN_VALUE <= i && i <= e.MAX_VALUE;
70
- }
71
- e.is = n;
72
- })(Y || (Y = {}));
73
- var M;
74
- (function(e) {
75
- e.MIN_VALUE = 0, e.MAX_VALUE = 2147483647;
76
- function n(i) {
77
- return typeof i == "number" && e.MIN_VALUE <= i && i <= e.MAX_VALUE;
78
- }
79
- e.is = n;
80
- })(M || (M = {}));
81
- var w;
82
- (function(e) {
83
- function n(r, t) {
84
- return r === Number.MAX_VALUE && (r = M.MAX_VALUE), t === Number.MAX_VALUE && (t = M.MAX_VALUE), { line: r, character: t };
85
- }
86
- e.create = n;
87
- function i(r) {
88
- let t = r;
89
- return a.objectLiteral(t) && a.uinteger(t.line) && a.uinteger(t.character);
90
- }
91
- e.is = i;
92
- })(w || (w = {}));
93
- var h;
94
- (function(e) {
95
- function n(r, t, o, s) {
96
- if (a.uinteger(r) && a.uinteger(t) && a.uinteger(o) && a.uinteger(s))
97
- return { start: w.create(r, t), end: w.create(o, s) };
98
- if (w.is(r) && w.is(t))
99
- return { start: r, end: t };
100
- throw new Error(`Range#create called with invalid arguments[${r}, ${t}, ${o}, ${s}]`);
101
- }
102
- e.create = n;
103
- function i(r) {
104
- let t = r;
105
- return a.objectLiteral(t) && w.is(t.start) && w.is(t.end);
106
- }
107
- e.is = i;
108
- })(h || (h = {}));
109
- var C;
110
- (function(e) {
111
- function n(r, t) {
112
- return { uri: r, range: t };
113
- }
114
- e.create = n;
115
- function i(r) {
116
- let t = r;
117
- return a.objectLiteral(t) && h.is(t.range) && (a.string(t.uri) || a.undefined(t.uri));
118
- }
119
- e.is = i;
120
- })(C || (C = {}));
121
- var Z;
122
- (function(e) {
123
- function n(r, t, o, s) {
124
- return { targetUri: r, targetRange: t, targetSelectionRange: o, originSelectionRange: s };
125
- }
126
- e.create = n;
127
- function i(r) {
128
- let t = r;
129
- return a.objectLiteral(t) && h.is(t.targetRange) && a.string(t.targetUri) && h.is(t.targetSelectionRange) && (h.is(t.originSelectionRange) || a.undefined(t.originSelectionRange));
130
- }
131
- e.is = i;
132
- })(Z || (Z = {}));
133
- var S;
134
- (function(e) {
135
- function n(r, t, o, s) {
136
- return {
137
- red: r,
138
- green: t,
139
- blue: o,
140
- alpha: s
141
- };
142
- }
143
- e.create = n;
144
- function i(r) {
145
- const t = r;
146
- return a.objectLiteral(t) && a.numberRange(t.red, 0, 1) && a.numberRange(t.green, 0, 1) && a.numberRange(t.blue, 0, 1) && a.numberRange(t.alpha, 0, 1);
147
- }
148
- e.is = i;
149
- })(S || (S = {}));
150
- var K;
151
- (function(e) {
152
- function n(r, t) {
153
- return {
154
- range: r,
155
- color: t
156
- };
157
- }
158
- e.create = n;
159
- function i(r) {
160
- const t = r;
161
- return a.objectLiteral(t) && h.is(t.range) && S.is(t.color);
162
- }
163
- e.is = i;
164
- })(K || (K = {}));
165
- var ee;
166
- (function(e) {
167
- function n(r, t, o) {
168
- return {
169
- label: r,
170
- textEdit: t,
171
- additionalTextEdits: o
172
- };
173
- }
174
- e.create = n;
175
- function i(r) {
176
- const t = r;
177
- return a.objectLiteral(t) && a.string(t.label) && (a.undefined(t.textEdit) || E.is(t)) && (a.undefined(t.additionalTextEdits) || a.typedArray(t.additionalTextEdits, E.is));
178
- }
179
- e.is = i;
180
- })(ee || (ee = {}));
181
- var A;
182
- (function(e) {
183
- e.Comment = "comment", e.Imports = "imports", e.Region = "region";
184
- })(A || (A = {}));
185
- var te;
186
- (function(e) {
187
- function n(r, t, o, s, u, f) {
188
- const c = {
189
- startLine: r,
190
- endLine: t
191
- };
192
- return a.defined(o) && (c.startCharacter = o), a.defined(s) && (c.endCharacter = s), a.defined(u) && (c.kind = u), a.defined(f) && (c.collapsedText = f), c;
193
- }
194
- e.create = n;
195
- function i(r) {
196
- const t = r;
197
- return a.objectLiteral(t) && a.uinteger(t.startLine) && a.uinteger(t.startLine) && (a.undefined(t.startCharacter) || a.uinteger(t.startCharacter)) && (a.undefined(t.endCharacter) || a.uinteger(t.endCharacter)) && (a.undefined(t.kind) || a.string(t.kind));
198
- }
199
- e.is = i;
200
- })(te || (te = {}));
201
- var U;
202
- (function(e) {
203
- function n(r, t) {
204
- return {
205
- location: r,
206
- message: t
207
- };
208
- }
209
- e.create = n;
210
- function i(r) {
211
- let t = r;
212
- return a.defined(t) && C.is(t.location) && a.string(t.message);
213
- }
214
- e.is = i;
215
- })(U || (U = {}));
216
- var x;
217
- (function(e) {
218
- e.Error = 1, e.Warning = 2, e.Information = 3, e.Hint = 4;
219
- })(x || (x = {}));
220
- var re;
221
- (function(e) {
222
- e.Unnecessary = 1, e.Deprecated = 2;
223
- })(re || (re = {}));
224
- var ne;
225
- (function(e) {
226
- function n(i) {
227
- const r = i;
228
- return a.objectLiteral(r) && a.string(r.href);
229
- }
230
- e.is = n;
231
- })(ne || (ne = {}));
232
- var y;
233
- (function(e) {
234
- function n(r, t, o, s, u, f) {
235
- let c = { range: r, message: t };
236
- return a.defined(o) && (c.severity = o), a.defined(s) && (c.code = s), a.defined(u) && (c.source = u), a.defined(f) && (c.relatedInformation = f), c;
237
- }
238
- e.create = n;
239
- function i(r) {
240
- var t;
241
- let o = r;
242
- return a.defined(o) && h.is(o.range) && a.string(o.message) && (a.number(o.severity) || a.undefined(o.severity)) && (a.integer(o.code) || a.string(o.code) || a.undefined(o.code)) && (a.undefined(o.codeDescription) || a.string((t = o.codeDescription) === null || t === void 0 ? void 0 : t.href)) && (a.string(o.source) || a.undefined(o.source)) && (a.undefined(o.relatedInformation) || a.typedArray(o.relatedInformation, U.is));
243
- }
244
- e.is = i;
245
- })(y || (y = {}));
246
- var I;
247
- (function(e) {
248
- function n(r, t, ...o) {
249
- let s = { title: r, command: t };
250
- return a.defined(o) && o.length > 0 && (s.arguments = o), s;
251
- }
252
- e.create = n;
253
- function i(r) {
254
- let t = r;
255
- return a.defined(t) && a.string(t.title) && a.string(t.command);
256
- }
257
- e.is = i;
258
- })(I || (I = {}));
259
- var E;
260
- (function(e) {
261
- function n(o, s) {
262
- return { range: o, newText: s };
263
- }
264
- e.replace = n;
265
- function i(o, s) {
266
- return { range: { start: o, end: o }, newText: s };
267
- }
268
- e.insert = i;
269
- function r(o) {
270
- return { range: o, newText: "" };
271
- }
272
- e.del = r;
273
- function t(o) {
274
- const s = o;
275
- return a.objectLiteral(s) && a.string(s.newText) && h.is(s.range);
276
- }
277
- e.is = t;
278
- })(E || (E = {}));
279
- var V;
280
- (function(e) {
281
- function n(r, t, o) {
282
- const s = { label: r };
283
- return t !== void 0 && (s.needsConfirmation = t), o !== void 0 && (s.description = o), s;
284
- }
285
- e.create = n;
286
- function i(r) {
287
- const t = r;
288
- return a.objectLiteral(t) && a.string(t.label) && (a.boolean(t.needsConfirmation) || t.needsConfirmation === void 0) && (a.string(t.description) || t.description === void 0);
289
- }
290
- e.is = i;
291
- })(V || (V = {}));
292
- var L;
293
- (function(e) {
294
- function n(i) {
295
- const r = i;
296
- return a.string(r);
297
- }
298
- e.is = n;
299
- })(L || (L = {}));
300
- var ie;
301
- (function(e) {
302
- function n(o, s, u) {
303
- return { range: o, newText: s, annotationId: u };
304
- }
305
- e.replace = n;
306
- function i(o, s, u) {
307
- return { range: { start: o, end: o }, newText: s, annotationId: u };
308
- }
309
- e.insert = i;
310
- function r(o, s) {
311
- return { range: o, newText: "", annotationId: s };
312
- }
313
- e.del = r;
314
- function t(o) {
315
- const s = o;
316
- return E.is(s) && (V.is(s.annotationId) || L.is(s.annotationId));
317
- }
318
- e.is = t;
319
- })(ie || (ie = {}));
320
- var W;
321
- (function(e) {
322
- function n(r, t) {
323
- return { textDocument: r, edits: t };
324
- }
325
- e.create = n;
326
- function i(r) {
327
- let t = r;
328
- return a.defined(t) && B.is(t.textDocument) && Array.isArray(t.edits);
329
- }
330
- e.is = i;
331
- })(W || (W = {}));
332
- var H;
333
- (function(e) {
334
- function n(r, t, o) {
335
- let s = {
336
- kind: "create",
337
- uri: r
338
- };
339
- return t !== void 0 && (t.overwrite !== void 0 || t.ignoreIfExists !== void 0) && (s.options = t), o !== void 0 && (s.annotationId = o), s;
340
- }
341
- e.create = n;
342
- function i(r) {
343
- let t = r;
344
- return t && t.kind === "create" && a.string(t.uri) && (t.options === void 0 || (t.options.overwrite === void 0 || a.boolean(t.options.overwrite)) && (t.options.ignoreIfExists === void 0 || a.boolean(t.options.ignoreIfExists))) && (t.annotationId === void 0 || L.is(t.annotationId));
345
- }
346
- e.is = i;
347
- })(H || (H = {}));
348
- var X;
349
- (function(e) {
350
- function n(r, t, o, s) {
351
- let u = {
352
- kind: "rename",
353
- oldUri: r,
354
- newUri: t
355
- };
356
- return o !== void 0 && (o.overwrite !== void 0 || o.ignoreIfExists !== void 0) && (u.options = o), s !== void 0 && (u.annotationId = s), u;
357
- }
358
- e.create = n;
359
- function i(r) {
360
- let t = r;
361
- return t && t.kind === "rename" && a.string(t.oldUri) && a.string(t.newUri) && (t.options === void 0 || (t.options.overwrite === void 0 || a.boolean(t.options.overwrite)) && (t.options.ignoreIfExists === void 0 || a.boolean(t.options.ignoreIfExists))) && (t.annotationId === void 0 || L.is(t.annotationId));
362
- }
363
- e.is = i;
364
- })(X || (X = {}));
365
- var $;
366
- (function(e) {
367
- function n(r, t, o) {
368
- let s = {
369
- kind: "delete",
370
- uri: r
371
- };
372
- return t !== void 0 && (t.recursive !== void 0 || t.ignoreIfNotExists !== void 0) && (s.options = t), o !== void 0 && (s.annotationId = o), s;
373
- }
374
- e.create = n;
375
- function i(r) {
376
- let t = r;
377
- return t && t.kind === "delete" && a.string(t.uri) && (t.options === void 0 || (t.options.recursive === void 0 || a.boolean(t.options.recursive)) && (t.options.ignoreIfNotExists === void 0 || a.boolean(t.options.ignoreIfNotExists))) && (t.annotationId === void 0 || L.is(t.annotationId));
378
- }
379
- e.is = i;
380
- })($ || ($ = {}));
381
- var z;
382
- (function(e) {
383
- function n(i) {
384
- let r = i;
385
- return r && (r.changes !== void 0 || r.documentChanges !== void 0) && (r.documentChanges === void 0 || r.documentChanges.every((t) => a.string(t.kind) ? H.is(t) || X.is(t) || $.is(t) : W.is(t)));
386
- }
387
- e.is = n;
388
- })(z || (z = {}));
389
- var oe;
390
- (function(e) {
391
- function n(r) {
392
- return { uri: r };
393
- }
394
- e.create = n;
395
- function i(r) {
396
- let t = r;
397
- return a.defined(t) && a.string(t.uri);
398
- }
399
- e.is = i;
400
- })(oe || (oe = {}));
401
- var ae;
402
- (function(e) {
403
- function n(r, t) {
404
- return { uri: r, version: t };
405
- }
406
- e.create = n;
407
- function i(r) {
408
- let t = r;
409
- return a.defined(t) && a.string(t.uri) && a.integer(t.version);
410
- }
411
- e.is = i;
412
- })(ae || (ae = {}));
413
- var B;
414
- (function(e) {
415
- function n(r, t) {
416
- return { uri: r, version: t };
417
- }
418
- e.create = n;
419
- function i(r) {
420
- let t = r;
421
- return a.defined(t) && a.string(t.uri) && (t.version === null || a.integer(t.version));
422
- }
423
- e.is = i;
424
- })(B || (B = {}));
425
- var se;
426
- (function(e) {
427
- function n(r, t, o, s) {
428
- return { uri: r, languageId: t, version: o, text: s };
429
- }
430
- e.create = n;
431
- function i(r) {
432
- let t = r;
433
- return a.defined(t) && a.string(t.uri) && a.string(t.languageId) && a.integer(t.version) && a.string(t.text);
434
- }
435
- e.is = i;
436
- })(se || (se = {}));
437
- var q;
438
- (function(e) {
439
- e.PlainText = "plaintext", e.Markdown = "markdown";
440
- function n(i) {
441
- const r = i;
442
- return r === e.PlainText || r === e.Markdown;
443
- }
444
- e.is = n;
445
- })(q || (q = {}));
446
- var P;
447
- (function(e) {
448
- function n(i) {
449
- const r = i;
450
- return a.objectLiteral(i) && q.is(r.kind) && a.string(r.value);
451
- }
452
- e.is = n;
453
- })(P || (P = {}));
454
- var v;
455
- (function(e) {
456
- 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;
457
- })(v || (v = {}));
458
- var Q;
459
- (function(e) {
460
- e.PlainText = 1, e.Snippet = 2;
461
- })(Q || (Q = {}));
462
- var ue;
463
- (function(e) {
464
- e.Deprecated = 1;
465
- })(ue || (ue = {}));
466
- var ce;
467
- (function(e) {
468
- function n(r, t, o) {
469
- return { newText: r, insert: t, replace: o };
470
- }
471
- e.create = n;
472
- function i(r) {
473
- const t = r;
474
- return t && a.string(t.newText) && h.is(t.insert) && h.is(t.replace);
475
- }
476
- e.is = i;
477
- })(ce || (ce = {}));
478
- var de;
479
- (function(e) {
480
- e.asIs = 1, e.adjustIndentation = 2;
481
- })(de || (de = {}));
482
- var le;
483
- (function(e) {
484
- function n(i) {
485
- const r = i;
486
- return r && (a.string(r.detail) || r.detail === void 0) && (a.string(r.description) || r.description === void 0);
487
- }
488
- e.is = n;
489
- })(le || (le = {}));
490
- var fe;
491
- (function(e) {
492
- function n(i) {
493
- return { label: i };
494
- }
495
- e.create = n;
496
- })(fe || (fe = {}));
497
- var ge;
498
- (function(e) {
499
- function n(i, r) {
500
- return { items: i || [], isIncomplete: !!r };
501
- }
502
- e.create = n;
503
- })(ge || (ge = {}));
504
- var F;
505
- (function(e) {
506
- function n(r) {
507
- return r.replace(/[\\`*_{}[\]()#+\-.!]/g, "\\$&");
508
- }
509
- e.fromPlainText = n;
510
- function i(r) {
511
- const t = r;
512
- return a.string(t) || a.objectLiteral(t) && a.string(t.language) && a.string(t.value);
513
- }
514
- e.is = i;
515
- })(F || (F = {}));
516
- var he;
517
- (function(e) {
518
- function n(i) {
519
- let r = i;
520
- return !!r && a.objectLiteral(r) && (P.is(r.contents) || F.is(r.contents) || a.typedArray(r.contents, F.is)) && (i.range === void 0 || h.is(i.range));
521
- }
522
- e.is = n;
523
- })(he || (he = {}));
524
- var ve;
525
- (function(e) {
526
- function n(i, r) {
527
- return r ? { label: i, documentation: r } : { label: i };
528
- }
529
- e.create = n;
530
- })(ve || (ve = {}));
531
- var pe;
532
- (function(e) {
533
- function n(i, r, ...t) {
534
- let o = { label: i };
535
- return a.defined(r) && (o.documentation = r), a.defined(t) ? o.parameters = t : o.parameters = [], o;
536
- }
537
- e.create = n;
538
- })(pe || (pe = {}));
539
- var R;
540
- (function(e) {
541
- e.Text = 1, e.Read = 2, e.Write = 3;
542
- })(R || (R = {}));
543
- var me;
544
- (function(e) {
545
- function n(i, r) {
546
- let t = { range: i };
547
- return a.number(r) && (t.kind = r), t;
548
- }
549
- e.create = n;
550
- })(me || (me = {}));
551
- var p;
552
- (function(e) {
553
- 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;
554
- })(p || (p = {}));
555
- var _e;
556
- (function(e) {
557
- e.Deprecated = 1;
558
- })(_e || (_e = {}));
559
- var be;
560
- (function(e) {
561
- function n(i, r, t, o, s) {
562
- let u = {
563
- name: i,
564
- kind: r,
565
- location: { uri: o, range: t }
566
- };
567
- return s && (u.containerName = s), u;
568
- }
569
- e.create = n;
570
- })(be || (be = {}));
571
- var we;
572
- (function(e) {
573
- function n(i, r, t, o) {
574
- return o !== void 0 ? { name: i, kind: r, location: { uri: t, range: o } } : { name: i, kind: r, location: { uri: t } };
575
- }
576
- e.create = n;
577
- })(we || (we = {}));
578
- var ke;
579
- (function(e) {
580
- function n(r, t, o, s, u, f) {
581
- let c = {
582
- name: r,
583
- detail: t,
584
- kind: o,
585
- range: s,
586
- selectionRange: u
587
- };
588
- return f !== void 0 && (c.children = f), c;
589
- }
590
- e.create = n;
591
- function i(r) {
592
- let t = r;
593
- return t && a.string(t.name) && a.number(t.kind) && h.is(t.range) && h.is(t.selectionRange) && (t.detail === void 0 || a.string(t.detail)) && (t.deprecated === void 0 || a.boolean(t.deprecated)) && (t.children === void 0 || Array.isArray(t.children)) && (t.tags === void 0 || Array.isArray(t.tags));
594
- }
595
- e.is = i;
596
- })(ke || (ke = {}));
597
- var xe;
598
- (function(e) {
599
- 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";
600
- })(xe || (xe = {}));
601
- var j;
602
- (function(e) {
603
- e.Invoked = 1, e.Automatic = 2;
604
- })(j || (j = {}));
605
- var Ie;
606
- (function(e) {
607
- function n(r, t, o) {
608
- let s = { diagnostics: r };
609
- return t != null && (s.only = t), o != null && (s.triggerKind = o), s;
610
- }
611
- e.create = n;
612
- function i(r) {
613
- let t = r;
614
- return a.defined(t) && a.typedArray(t.diagnostics, y.is) && (t.only === void 0 || a.typedArray(t.only, a.string)) && (t.triggerKind === void 0 || t.triggerKind === j.Invoked || t.triggerKind === j.Automatic);
615
- }
616
- e.is = i;
617
- })(Ie || (Ie = {}));
618
- var Ee;
619
- (function(e) {
620
- function n(r, t, o) {
621
- let s = { title: r }, u = !0;
622
- return typeof t == "string" ? (u = !1, s.kind = t) : I.is(t) ? s.command = t : s.edit = t, u && o !== void 0 && (s.kind = o), s;
623
- }
624
- e.create = n;
625
- function i(r) {
626
- let t = r;
627
- return t && a.string(t.title) && (t.diagnostics === void 0 || a.typedArray(t.diagnostics, y.is)) && (t.kind === void 0 || a.string(t.kind)) && (t.edit !== void 0 || t.command !== void 0) && (t.command === void 0 || I.is(t.command)) && (t.isPreferred === void 0 || a.boolean(t.isPreferred)) && (t.edit === void 0 || z.is(t.edit));
628
- }
629
- e.is = i;
630
- })(Ee || (Ee = {}));
631
- var Le;
632
- (function(e) {
633
- function n(r, t) {
634
- let o = { range: r };
635
- return a.defined(t) && (o.data = t), o;
636
- }
637
- e.create = n;
638
- function i(r) {
639
- let t = r;
640
- return a.defined(t) && h.is(t.range) && (a.undefined(t.command) || I.is(t.command));
641
- }
642
- e.is = i;
643
- })(Le || (Le = {}));
644
- var Ae;
645
- (function(e) {
646
- function n(r, t) {
647
- return { tabSize: r, insertSpaces: t };
648
- }
649
- e.create = n;
650
- function i(r) {
651
- let t = r;
652
- return a.defined(t) && a.uinteger(t.tabSize) && a.boolean(t.insertSpaces);
653
- }
654
- e.is = i;
655
- })(Ae || (Ae = {}));
656
- var Re;
657
- (function(e) {
658
- function n(r, t, o) {
659
- return { range: r, target: t, data: o };
660
- }
661
- e.create = n;
662
- function i(r) {
663
- let t = r;
664
- return a.defined(t) && h.is(t.range) && (a.undefined(t.target) || a.string(t.target));
665
- }
666
- e.is = i;
667
- })(Re || (Re = {}));
668
- var Pe;
669
- (function(e) {
670
- function n(r, t) {
671
- return { range: r, parent: t };
672
- }
673
- e.create = n;
674
- function i(r) {
675
- let t = r;
676
- return a.objectLiteral(t) && h.is(t.range) && (t.parent === void 0 || e.is(t.parent));
677
- }
678
- e.is = i;
679
- })(Pe || (Pe = {}));
680
- var De;
681
- (function(e) {
682
- e.namespace = "namespace", e.type = "type", e.class = "class", e.enum = "enum", e.interface = "interface", e.struct = "struct", e.typeParameter = "typeParameter", e.parameter = "parameter", e.variable = "variable", e.property = "property", e.enumMember = "enumMember", e.event = "event", e.function = "function", e.method = "method", e.macro = "macro", e.keyword = "keyword", e.modifier = "modifier", e.comment = "comment", e.string = "string", e.number = "number", e.regexp = "regexp", e.operator = "operator", e.decorator = "decorator";
683
- })(De || (De = {}));
684
- var Me;
685
- (function(e) {
686
- e.declaration = "declaration", e.definition = "definition", e.readonly = "readonly", e.static = "static", e.deprecated = "deprecated", e.abstract = "abstract", e.async = "async", e.modification = "modification", e.documentation = "documentation", e.defaultLibrary = "defaultLibrary";
687
- })(Me || (Me = {}));
688
- var Ce;
689
- (function(e) {
690
- function n(i) {
691
- const r = i;
692
- return a.objectLiteral(r) && (r.resultId === void 0 || typeof r.resultId == "string") && Array.isArray(r.data) && (r.data.length === 0 || typeof r.data[0] == "number");
693
- }
694
- e.is = n;
695
- })(Ce || (Ce = {}));
696
- var ye;
697
- (function(e) {
698
- function n(r, t) {
699
- return { range: r, text: t };
700
- }
701
- e.create = n;
702
- function i(r) {
703
- const t = r;
704
- return t != null && h.is(t.range) && a.string(t.text);
705
- }
706
- e.is = i;
707
- })(ye || (ye = {}));
708
- var Fe;
709
- (function(e) {
710
- function n(r, t, o) {
711
- return { range: r, variableName: t, caseSensitiveLookup: o };
712
- }
713
- e.create = n;
714
- function i(r) {
715
- const t = r;
716
- return t != null && h.is(t.range) && a.boolean(t.caseSensitiveLookup) && (a.string(t.variableName) || t.variableName === void 0);
717
- }
718
- e.is = i;
719
- })(Fe || (Fe = {}));
720
- var je;
721
- (function(e) {
722
- function n(r, t) {
723
- return { range: r, expression: t };
724
- }
725
- e.create = n;
726
- function i(r) {
727
- const t = r;
728
- return t != null && h.is(t.range) && (a.string(t.expression) || t.expression === void 0);
729
- }
730
- e.is = i;
731
- })(je || (je = {}));
732
- var Ne;
733
- (function(e) {
734
- function n(r, t) {
735
- return { frameId: r, stoppedLocation: t };
736
- }
737
- e.create = n;
738
- function i(r) {
739
- const t = r;
740
- return a.defined(t) && h.is(r.stoppedLocation);
741
- }
742
- e.is = i;
743
- })(Ne || (Ne = {}));
744
- var G;
745
- (function(e) {
746
- e.Type = 1, e.Parameter = 2;
747
- function n(i) {
748
- return i === 1 || i === 2;
749
- }
750
- e.is = n;
751
- })(G || (G = {}));
752
- var J;
753
- (function(e) {
754
- function n(r) {
755
- return { value: r };
756
- }
757
- e.create = n;
758
- function i(r) {
759
- const t = r;
760
- return a.objectLiteral(t) && (t.tooltip === void 0 || a.string(t.tooltip) || P.is(t.tooltip)) && (t.location === void 0 || C.is(t.location)) && (t.command === void 0 || I.is(t.command));
761
- }
762
- e.is = i;
763
- })(J || (J = {}));
764
- var Oe;
765
- (function(e) {
766
- function n(r, t, o) {
767
- const s = { position: r, label: t };
768
- return o !== void 0 && (s.kind = o), s;
769
- }
770
- e.create = n;
771
- function i(r) {
772
- const t = r;
773
- return a.objectLiteral(t) && w.is(t.position) && (a.string(t.label) || a.typedArray(t.label, J.is)) && (t.kind === void 0 || G.is(t.kind)) && t.textEdits === void 0 || a.typedArray(t.textEdits, E.is) && (t.tooltip === void 0 || a.string(t.tooltip) || P.is(t.tooltip)) && (t.paddingLeft === void 0 || a.boolean(t.paddingLeft)) && (t.paddingRight === void 0 || a.boolean(t.paddingRight));
774
- }
775
- e.is = i;
776
- })(Oe || (Oe = {}));
777
- var Se;
778
- (function(e) {
779
- function n(i) {
780
- return { kind: "snippet", value: i };
781
- }
782
- e.createSnippet = n;
783
- })(Se || (Se = {}));
784
- var Ue;
785
- (function(e) {
786
- function n(i, r, t, o) {
787
- return { insertText: i, filterText: r, range: t, command: o };
788
- }
789
- e.create = n;
790
- })(Ue || (Ue = {}));
791
- var Ve;
792
- (function(e) {
793
- function n(i) {
794
- return { items: i };
795
- }
796
- e.create = n;
797
- })(Ve || (Ve = {}));
798
- var We;
799
- (function(e) {
800
- e.Invoked = 0, e.Automatic = 1;
801
- })(We || (We = {}));
802
- var He;
803
- (function(e) {
804
- function n(i, r) {
805
- return { range: i, text: r };
806
- }
807
- e.create = n;
808
- })(He || (He = {}));
809
- var Xe;
810
- (function(e) {
811
- function n(i, r) {
812
- return { triggerKind: i, selectedCompletionInfo: r };
813
- }
814
- e.create = n;
815
- })(Xe || (Xe = {}));
816
- var $e;
817
- (function(e) {
818
- function n(i) {
819
- const r = i;
820
- return a.objectLiteral(r) && O.is(r.uri) && a.string(r.name);
821
- }
822
- e.is = n;
823
- })($e || ($e = {}));
824
- var ze;
825
- (function(e) {
826
- function n(o, s, u, f) {
827
- return new ct(o, s, u, f);
828
- }
829
- e.create = n;
830
- function i(o) {
831
- let s = o;
832
- return !!(a.defined(s) && a.string(s.uri) && (a.undefined(s.languageId) || a.string(s.languageId)) && a.uinteger(s.lineCount) && a.func(s.getText) && a.func(s.positionAt) && a.func(s.offsetAt));
833
- }
834
- e.is = i;
835
- function r(o, s) {
836
- let u = o.getText(), f = t(s, (g, _) => {
837
- let b = g.range.start.line - _.range.start.line;
838
- return b === 0 ? g.range.start.character - _.range.start.character : b;
839
- }), c = u.length;
840
- for (let g = f.length - 1; g >= 0; g--) {
841
- let _ = f[g], b = o.offsetAt(_.range.start), l = o.offsetAt(_.range.end);
842
- if (l <= c)
843
- u = u.substring(0, b) + _.newText + u.substring(l, u.length);
844
- else
845
- throw new Error("Overlapping edit");
846
- c = b;
847
- }
848
- return u;
849
- }
850
- e.applyEdits = r;
851
- function t(o, s) {
852
- if (o.length <= 1)
853
- return o;
854
- const u = o.length / 2 | 0, f = o.slice(0, u), c = o.slice(u);
855
- t(f, s), t(c, s);
856
- let g = 0, _ = 0, b = 0;
857
- for (; g < f.length && _ < c.length; )
858
- s(f[g], c[_]) <= 0 ? o[b++] = f[g++] : o[b++] = c[_++];
859
- for (; g < f.length; )
860
- o[b++] = f[g++];
861
- for (; _ < c.length; )
862
- o[b++] = c[_++];
863
- return o;
864
- }
865
- })(ze || (ze = {}));
866
- var ct = class {
867
- constructor(e, n, i, r) {
868
- this._uri = e, this._languageId = n, this._version = i, this._content = r, this._lineOffsets = void 0;
869
- }
870
- get uri() {
871
- return this._uri;
872
- }
873
- get languageId() {
874
- return this._languageId;
875
- }
876
- get version() {
877
- return this._version;
878
- }
879
- getText(e) {
880
- if (e) {
881
- let n = this.offsetAt(e.start), i = this.offsetAt(e.end);
882
- return this._content.substring(n, i);
883
- }
884
- return this._content;
885
- }
886
- update(e, n) {
887
- this._content = e.text, this._version = n, this._lineOffsets = void 0;
888
- }
889
- getLineOffsets() {
890
- if (this._lineOffsets === void 0) {
891
- let e = [], n = this._content, i = !0;
892
- for (let r = 0; r < n.length; r++) {
893
- i && (e.push(r), i = !1);
894
- let t = n.charAt(r);
895
- i = t === "\r" || t === `
896
- `, t === "\r" && r + 1 < n.length && n.charAt(r + 1) === `
897
- ` && r++;
898
- }
899
- i && n.length > 0 && e.push(n.length), this._lineOffsets = e;
900
- }
901
- return this._lineOffsets;
902
- }
903
- positionAt(e) {
904
- e = Math.max(Math.min(e, this._content.length), 0);
905
- let n = this.getLineOffsets(), i = 0, r = n.length;
906
- if (r === 0)
907
- return w.create(0, e);
908
- for (; i < r; ) {
909
- let o = Math.floor((i + r) / 2);
910
- n[o] > e ? r = o : i = o + 1;
911
- }
912
- let t = i - 1;
913
- return w.create(t, e - n[t]);
914
- }
915
- offsetAt(e) {
916
- let n = this.getLineOffsets();
917
- if (e.line >= n.length)
918
- return this._content.length;
919
- if (e.line < 0)
920
- return 0;
921
- let i = n[e.line], r = e.line + 1 < n.length ? n[e.line + 1] : this._content.length;
922
- return Math.max(Math.min(i + e.character, r), i);
923
- }
924
- get lineCount() {
925
- return this.getLineOffsets().length;
926
- }
927
- }, a;
928
- (function(e) {
929
- const n = Object.prototype.toString;
930
- function i(l) {
931
- return typeof l < "u";
932
- }
933
- e.defined = i;
934
- function r(l) {
935
- return typeof l > "u";
936
- }
937
- e.undefined = r;
938
- function t(l) {
939
- return l === !0 || l === !1;
940
- }
941
- e.boolean = t;
942
- function o(l) {
943
- return n.call(l) === "[object String]";
944
- }
945
- e.string = o;
946
- function s(l) {
947
- return n.call(l) === "[object Number]";
948
- }
949
- e.number = s;
950
- function u(l, N, Ke) {
951
- return n.call(l) === "[object Number]" && N <= l && l <= Ke;
952
- }
953
- e.numberRange = u;
954
- function f(l) {
955
- return n.call(l) === "[object Number]" && -2147483648 <= l && l <= 2147483647;
956
- }
957
- e.integer = f;
958
- function c(l) {
959
- return n.call(l) === "[object Number]" && 0 <= l && l <= 2147483647;
960
- }
961
- e.uinteger = c;
962
- function g(l) {
963
- return n.call(l) === "[object Function]";
964
- }
965
- e.func = g;
966
- function _(l) {
967
- return l !== null && typeof l == "object";
968
- }
969
- e.objectLiteral = _;
970
- function b(l, N) {
971
- return Array.isArray(l) && l.every(N);
972
- }
973
- e.typedArray = b;
974
- })(a || (a = {}));
975
- var dt = class {
976
- constructor(e, n, i) {
977
- this._languageId = e, this._worker = n, this._disposables = [], this._listener = /* @__PURE__ */ Object.create(null);
978
- const r = (o) => {
979
- let s = o.getLanguageId();
980
- if (s !== this._languageId)
981
- return;
982
- let u;
983
- this._listener[o.uri.toString()] = o.onDidChangeContent(() => {
984
- window.clearTimeout(u), u = window.setTimeout(() => this._doValidate(o.uri, s), 500);
985
- }), this._doValidate(o.uri, s);
986
- }, t = (o) => {
987
- d.editor.setModelMarkers(o, this._languageId, []);
988
- let s = o.uri.toString(), u = this._listener[s];
989
- u && (u.dispose(), delete this._listener[s]);
990
- };
991
- this._disposables.push(d.editor.onDidCreateModel(r)), this._disposables.push(d.editor.onWillDisposeModel(t)), this._disposables.push(
992
- d.editor.onDidChangeModelLanguage((o) => {
993
- t(o.model), r(o.model);
994
- })
995
- ), this._disposables.push(
996
- i((o) => {
997
- d.editor.getModels().forEach((s) => {
998
- s.getLanguageId() === this._languageId && (t(s), r(s));
999
- });
1000
- })
1001
- ), this._disposables.push({
1002
- dispose: () => {
1003
- d.editor.getModels().forEach(t);
1004
- for (let o in this._listener)
1005
- this._listener[o].dispose();
1006
- }
1007
- }), d.editor.getModels().forEach(r);
1008
- }
1009
- dispose() {
1010
- this._disposables.forEach((e) => e && e.dispose()), this._disposables.length = 0;
1011
- }
1012
- _doValidate(e, n) {
1013
- this._worker(e).then((i) => i.doValidation(e.toString())).then((i) => {
1014
- const r = i.map((o) => ft(e, o));
1015
- let t = d.editor.getModel(e);
1016
- t && t.getLanguageId() === n && d.editor.setModelMarkers(t, n, r);
1017
- }).then(void 0, (i) => {
1018
- console.error(i);
1019
- });
1020
- }
1021
- };
1022
- function lt(e) {
1023
- switch (e) {
1024
- case x.Error:
1025
- return d.MarkerSeverity.Error;
1026
- case x.Warning:
1027
- return d.MarkerSeverity.Warning;
1028
- case x.Information:
1029
- return d.MarkerSeverity.Info;
1030
- case x.Hint:
1031
- return d.MarkerSeverity.Hint;
1032
- default:
1033
- return d.MarkerSeverity.Info;
1034
- }
1035
- }
1036
- function ft(e, n) {
1037
- let i = typeof n.code == "number" ? String(n.code) : n.code;
1038
- return {
1039
- severity: lt(n.severity),
1040
- startLineNumber: n.range.start.line + 1,
1041
- startColumn: n.range.start.character + 1,
1042
- endLineNumber: n.range.end.line + 1,
1043
- endColumn: n.range.end.character + 1,
1044
- message: n.message,
1045
- code: i,
1046
- source: n.source
1047
- };
1048
- }
1049
- var gt = class {
1050
- constructor(e, n) {
1051
- this._worker = e, this._triggerCharacters = n;
1052
- }
1053
- get triggerCharacters() {
1054
- return this._triggerCharacters;
1055
- }
1056
- provideCompletionItems(e, n, i, r) {
1057
- const t = e.uri;
1058
- return this._worker(t).then((o) => o.doComplete(t.toString(), k(n))).then((o) => {
1059
- if (!o)
1060
- return;
1061
- const s = e.getWordUntilPosition(n), u = new d.Range(
1062
- n.lineNumber,
1063
- s.startColumn,
1064
- n.lineNumber,
1065
- s.endColumn
1066
- ), f = o.items.map((c) => {
1067
- const g = {
1068
- label: c.label,
1069
- insertText: c.insertText || c.label,
1070
- sortText: c.sortText,
1071
- filterText: c.filterText,
1072
- documentation: c.documentation,
1073
- detail: c.detail,
1074
- command: pt(c.command),
1075
- range: u,
1076
- kind: vt(c.kind)
1077
- };
1078
- return c.textEdit && (ht(c.textEdit) ? g.range = {
1079
- insert: m(c.textEdit.insert),
1080
- replace: m(c.textEdit.replace)
1081
- } : g.range = m(c.textEdit.range), g.insertText = c.textEdit.newText), c.additionalTextEdits && (g.additionalTextEdits = c.additionalTextEdits.map(D)), c.insertTextFormat === Q.Snippet && (g.insertTextRules = d.languages.CompletionItemInsertTextRule.InsertAsSnippet), g;
1082
- });
1083
- return {
1084
- isIncomplete: o.isIncomplete,
1085
- suggestions: f
1086
- };
1087
- });
1088
- }
1089
- };
1090
- function k(e) {
1091
- if (e)
1092
- return { character: e.column - 1, line: e.lineNumber - 1 };
1093
- }
1094
- function Qe(e) {
1095
- if (e)
1096
- return {
1097
- start: {
1098
- line: e.startLineNumber - 1,
1099
- character: e.startColumn - 1
1100
- },
1101
- end: { line: e.endLineNumber - 1, character: e.endColumn - 1 }
1102
- };
1103
- }
1104
- function m(e) {
1105
- if (e)
1106
- return new d.Range(
1107
- e.start.line + 1,
1108
- e.start.character + 1,
1109
- e.end.line + 1,
1110
- e.end.character + 1
1111
- );
1112
- }
1113
- function ht(e) {
1114
- return typeof e.insert < "u" && typeof e.replace < "u";
1115
- }
1116
- function vt(e) {
1117
- const n = d.languages.CompletionItemKind;
1118
- switch (e) {
1119
- case v.Text:
1120
- return n.Text;
1121
- case v.Method:
1122
- return n.Method;
1123
- case v.Function:
1124
- return n.Function;
1125
- case v.Constructor:
1126
- return n.Constructor;
1127
- case v.Field:
1128
- return n.Field;
1129
- case v.Variable:
1130
- return n.Variable;
1131
- case v.Class:
1132
- return n.Class;
1133
- case v.Interface:
1134
- return n.Interface;
1135
- case v.Module:
1136
- return n.Module;
1137
- case v.Property:
1138
- return n.Property;
1139
- case v.Unit:
1140
- return n.Unit;
1141
- case v.Value:
1142
- return n.Value;
1143
- case v.Enum:
1144
- return n.Enum;
1145
- case v.Keyword:
1146
- return n.Keyword;
1147
- case v.Snippet:
1148
- return n.Snippet;
1149
- case v.Color:
1150
- return n.Color;
1151
- case v.File:
1152
- return n.File;
1153
- case v.Reference:
1154
- return n.Reference;
1155
- }
1156
- return n.Property;
1157
- }
1158
- function D(e) {
1159
- if (e)
1160
- return {
1161
- range: m(e.range),
1162
- text: e.newText
1163
- };
1164
- }
1165
- function pt(e) {
1166
- return e && e.command === "editor.action.triggerSuggest" ? { id: e.command, title: e.title, arguments: e.arguments } : void 0;
1167
- }
1168
- var mt = class {
1169
- constructor(e) {
1170
- this._worker = e;
1171
- }
1172
- provideHover(e, n, i) {
1173
- let r = e.uri;
1174
- return this._worker(r).then((t) => t.doHover(r.toString(), k(n))).then((t) => {
1175
- if (t)
1176
- return {
1177
- range: m(t.range),
1178
- contents: bt(t.contents)
1179
- };
1180
- });
1181
- }
1182
- };
1183
- function _t(e) {
1184
- return e && typeof e == "object" && typeof e.kind == "string";
1185
- }
1186
- function Be(e) {
1187
- return typeof e == "string" ? {
1188
- value: e
1189
- } : _t(e) ? e.kind === "plaintext" ? {
1190
- value: e.value.replace(/[\\`*_{}[\]()#+\-.!]/g, "\\$&")
1191
- } : {
1192
- value: e.value
1193
- } : { value: "```" + e.language + `
1194
- ` + e.value + "\n```\n" };
1195
- }
1196
- function bt(e) {
1197
- if (e)
1198
- return Array.isArray(e) ? e.map(Be) : [Be(e)];
1199
- }
1200
- var wt = class {
1201
- constructor(e) {
1202
- this._worker = e;
1203
- }
1204
- provideDocumentHighlights(e, n, i) {
1205
- const r = e.uri;
1206
- return this._worker(r).then((t) => t.findDocumentHighlights(r.toString(), k(n))).then((t) => {
1207
- if (t)
1208
- return t.map((o) => ({
1209
- range: m(o.range),
1210
- kind: kt(o.kind)
1211
- }));
1212
- });
1213
- }
1214
- };
1215
- function kt(e) {
1216
- switch (e) {
1217
- case R.Read:
1218
- return d.languages.DocumentHighlightKind.Read;
1219
- case R.Write:
1220
- return d.languages.DocumentHighlightKind.Write;
1221
- case R.Text:
1222
- return d.languages.DocumentHighlightKind.Text;
1223
- }
1224
- return d.languages.DocumentHighlightKind.Text;
1225
- }
1226
- var xt = class {
1227
- constructor(e) {
1228
- this._worker = e;
1229
- }
1230
- provideDefinition(e, n, i) {
1231
- const r = e.uri;
1232
- return this._worker(r).then((t) => t.findDefinition(r.toString(), k(n))).then((t) => {
1233
- if (t)
1234
- return [Ge(t)];
1235
- });
1236
- }
1237
- };
1238
- function Ge(e) {
1239
- return {
1240
- uri: d.Uri.parse(e.uri),
1241
- range: m(e.range)
1242
- };
1243
- }
1244
- var It = class {
1245
- constructor(e) {
1246
- this._worker = e;
1247
- }
1248
- provideReferences(e, n, i, r) {
1249
- const t = e.uri;
1250
- return this._worker(t).then((o) => o.findReferences(t.toString(), k(n))).then((o) => {
1251
- if (o)
1252
- return o.map(Ge);
1253
- });
1254
- }
1255
- }, Et = class {
1256
- constructor(e) {
1257
- this._worker = e;
1258
- }
1259
- provideRenameEdits(e, n, i, r) {
1260
- const t = e.uri;
1261
- return this._worker(t).then((o) => o.doRename(t.toString(), k(n), i)).then((o) => Lt(o));
1262
- }
1263
- };
1264
- function Lt(e) {
1265
- if (!e || !e.changes)
1266
- return;
1267
- let n = [];
1268
- for (let i in e.changes) {
1269
- const r = d.Uri.parse(i);
1270
- for (let t of e.changes[i])
1271
- n.push({
1272
- resource: r,
1273
- versionId: void 0,
1274
- textEdit: {
1275
- range: m(t.range),
1276
- text: t.newText
1277
- }
1278
- });
1279
- }
1280
- return {
1281
- edits: n
1282
- };
1283
- }
1284
- var At = class {
1285
- constructor(e) {
1286
- this._worker = e;
1287
- }
1288
- provideDocumentSymbols(e, n) {
1289
- const i = e.uri;
1290
- return this._worker(i).then((r) => r.findDocumentSymbols(i.toString())).then((r) => {
1291
- if (r)
1292
- return r.map((t) => Rt(t) ? Je(t) : {
1293
- name: t.name,
1294
- detail: "",
1295
- containerName: t.containerName,
1296
- kind: Te(t.kind),
1297
- range: m(t.location.range),
1298
- selectionRange: m(t.location.range),
1299
- tags: []
1300
- });
1301
- });
1302
- }
1303
- };
1304
- function Rt(e) {
1305
- return "children" in e;
1306
- }
1307
- function Je(e) {
1308
- return {
1309
- name: e.name,
1310
- detail: e.detail ?? "",
1311
- kind: Te(e.kind),
1312
- range: m(e.range),
1313
- selectionRange: m(e.selectionRange),
1314
- tags: e.tags ?? [],
1315
- children: (e.children ?? []).map((n) => Je(n))
1316
- };
1317
- }
1318
- function Te(e) {
1319
- let n = d.languages.SymbolKind;
1320
- switch (e) {
1321
- case p.File:
1322
- return n.File;
1323
- case p.Module:
1324
- return n.Module;
1325
- case p.Namespace:
1326
- return n.Namespace;
1327
- case p.Package:
1328
- return n.Package;
1329
- case p.Class:
1330
- return n.Class;
1331
- case p.Method:
1332
- return n.Method;
1333
- case p.Property:
1334
- return n.Property;
1335
- case p.Field:
1336
- return n.Field;
1337
- case p.Constructor:
1338
- return n.Constructor;
1339
- case p.Enum:
1340
- return n.Enum;
1341
- case p.Interface:
1342
- return n.Interface;
1343
- case p.Function:
1344
- return n.Function;
1345
- case p.Variable:
1346
- return n.Variable;
1347
- case p.Constant:
1348
- return n.Constant;
1349
- case p.String:
1350
- return n.String;
1351
- case p.Number:
1352
- return n.Number;
1353
- case p.Boolean:
1354
- return n.Boolean;
1355
- case p.Array:
1356
- return n.Array;
1357
- }
1358
- return n.Function;
1359
- }
1360
- var Nt = class {
1361
- constructor(e) {
1362
- this._worker = e;
1363
- }
1364
- provideLinks(e, n) {
1365
- const i = e.uri;
1366
- return this._worker(i).then((r) => r.findDocumentLinks(i.toString())).then((r) => {
1367
- if (r)
1368
- return {
1369
- links: r.map((t) => ({
1370
- range: m(t.range),
1371
- url: t.target
1372
- }))
1373
- };
1374
- });
1375
- }
1376
- }, Pt = class {
1377
- constructor(e) {
1378
- this._worker = e;
1379
- }
1380
- provideDocumentFormattingEdits(e, n, i) {
1381
- const r = e.uri;
1382
- return this._worker(r).then((t) => t.format(r.toString(), null, Ye(n)).then((o) => {
1383
- if (!(!o || o.length === 0))
1384
- return o.map(D);
1385
- }));
1386
- }
1387
- }, Dt = class {
1388
- constructor(e) {
1389
- this._worker = e, this.canFormatMultipleRanges = !1;
1390
- }
1391
- provideDocumentRangeFormattingEdits(e, n, i, r) {
1392
- const t = e.uri;
1393
- return this._worker(t).then((o) => o.format(t.toString(), Qe(n), Ye(i)).then((s) => {
1394
- if (!(!s || s.length === 0))
1395
- return s.map(D);
1396
- }));
1397
- }
1398
- };
1399
- function Ye(e) {
1400
- return {
1401
- tabSize: e.tabSize,
1402
- insertSpaces: e.insertSpaces
1403
- };
1404
- }
1405
- var Mt = class {
1406
- constructor(e) {
1407
- this._worker = e;
1408
- }
1409
- provideDocumentColors(e, n) {
1410
- const i = e.uri;
1411
- return this._worker(i).then((r) => r.findDocumentColors(i.toString())).then((r) => {
1412
- if (r)
1413
- return r.map((t) => ({
1414
- color: t.color,
1415
- range: m(t.range)
1416
- }));
1417
- });
1418
- }
1419
- provideColorPresentations(e, n, i) {
1420
- const r = e.uri;
1421
- return this._worker(r).then(
1422
- (t) => t.getColorPresentations(r.toString(), n.color, Qe(n.range))
1423
- ).then((t) => {
1424
- if (t)
1425
- return t.map((o) => {
1426
- let s = {
1427
- label: o.label
1428
- };
1429
- return o.textEdit && (s.textEdit = D(o.textEdit)), o.additionalTextEdits && (s.additionalTextEdits = o.additionalTextEdits.map(D)), s;
1430
- });
1431
- });
1432
- }
1433
- }, Ct = class {
1434
- constructor(e) {
1435
- this._worker = e;
1436
- }
1437
- provideFoldingRanges(e, n, i) {
1438
- const r = e.uri;
1439
- return this._worker(r).then((t) => t.getFoldingRanges(r.toString(), n)).then((t) => {
1440
- if (t)
1441
- return t.map((o) => {
1442
- const s = {
1443
- start: o.startLine + 1,
1444
- end: o.endLine + 1
1445
- };
1446
- return typeof o.kind < "u" && (s.kind = yt(o.kind)), s;
1447
- });
1448
- });
1449
- }
1450
- };
1451
- function yt(e) {
1452
- switch (e) {
1453
- case A.Comment:
1454
- return d.languages.FoldingRangeKind.Comment;
1455
- case A.Imports:
1456
- return d.languages.FoldingRangeKind.Imports;
1457
- case A.Region:
1458
- return d.languages.FoldingRangeKind.Region;
1459
- }
1460
- }
1461
- var Ft = class {
1462
- constructor(e) {
1463
- this._worker = e;
1464
- }
1465
- provideSelectionRanges(e, n, i) {
1466
- const r = e.uri;
1467
- return this._worker(r).then(
1468
- (t) => t.getSelectionRanges(
1469
- r.toString(),
1470
- n.map(k)
1471
- )
1472
- ).then((t) => {
1473
- if (t)
1474
- return t.map((o) => {
1475
- const s = [];
1476
- for (; o; )
1477
- s.push({ range: m(o.range) }), o = o.parent;
1478
- return s;
1479
- });
1480
- });
1481
- }
1482
- };
1483
- function Ot(e) {
1484
- const n = [], i = [], r = new ut(e);
1485
- n.push(r);
1486
- const t = (...s) => r.getLanguageServiceWorker(...s);
1487
- function o() {
1488
- const { languageId: s, modeConfiguration: u } = e;
1489
- Ze(i), u.completionItems && i.push(
1490
- d.languages.registerCompletionItemProvider(
1491
- s,
1492
- new gt(t, ["/", "-", ":"])
1493
- )
1494
- ), u.hovers && i.push(
1495
- d.languages.registerHoverProvider(s, new mt(t))
1496
- ), u.documentHighlights && i.push(
1497
- d.languages.registerDocumentHighlightProvider(
1498
- s,
1499
- new wt(t)
1500
- )
1501
- ), u.definitions && i.push(
1502
- d.languages.registerDefinitionProvider(
1503
- s,
1504
- new xt(t)
1505
- )
1506
- ), u.references && i.push(
1507
- d.languages.registerReferenceProvider(
1508
- s,
1509
- new It(t)
1510
- )
1511
- ), u.documentSymbols && i.push(
1512
- d.languages.registerDocumentSymbolProvider(
1513
- s,
1514
- new At(t)
1515
- )
1516
- ), u.rename && i.push(
1517
- d.languages.registerRenameProvider(s, new Et(t))
1518
- ), u.colors && i.push(
1519
- d.languages.registerColorProvider(
1520
- s,
1521
- new Mt(t)
1522
- )
1523
- ), u.foldingRanges && i.push(
1524
- d.languages.registerFoldingRangeProvider(
1525
- s,
1526
- new Ct(t)
1527
- )
1528
- ), u.diagnostics && i.push(
1529
- new dt(s, t, e.onDidChange)
1530
- ), u.selectionRanges && i.push(
1531
- d.languages.registerSelectionRangeProvider(
1532
- s,
1533
- new Ft(t)
1534
- )
1535
- ), u.documentFormattingEdits && i.push(
1536
- d.languages.registerDocumentFormattingEditProvider(
1537
- s,
1538
- new Pt(t)
1539
- )
1540
- ), u.documentRangeFormattingEdits && i.push(
1541
- d.languages.registerDocumentRangeFormattingEditProvider(
1542
- s,
1543
- new Dt(t)
1544
- )
1545
- );
1546
- }
1547
- return o(), n.push(qe(i)), qe(n);
1548
- }
1549
- function qe(e) {
1550
- return { dispose: () => Ze(e) };
1551
- }
1552
- function Ze(e) {
1553
- for (; e.length; )
1554
- e.pop().dispose();
1555
- }
1556
- export {
1557
- gt as CompletionAdapter,
1558
- xt as DefinitionAdapter,
1559
- dt as DiagnosticsAdapter,
1560
- Mt as DocumentColorAdapter,
1561
- Pt as DocumentFormattingEditProvider,
1562
- wt as DocumentHighlightAdapter,
1563
- Nt as DocumentLinkAdapter,
1564
- Dt as DocumentRangeFormattingEditProvider,
1565
- At as DocumentSymbolAdapter,
1566
- Ct as FoldingRangeAdapter,
1567
- mt as HoverAdapter,
1568
- It as ReferenceAdapter,
1569
- Et as RenameAdapter,
1570
- Ft as SelectionRangeAdapter,
1571
- ut as WorkerManager,
1572
- k as fromPosition,
1573
- Qe as fromRange,
1574
- Ot as setupMode,
1575
- m as toRange,
1576
- D as toTextEdit
1577
- };