@aiao/code-editor-react 0.0.9 → 0.0.11

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 (121) hide show
  1. package/dist/index.js +118 -2
  2. package/package.json +5 -5
  3. package/dist/apl-B2DGVGxc-Dd6D39pP.js +0 -76
  4. package/dist/asciiarmor-2LVJmxlE-CAn4gnoC.js +0 -34
  5. package/dist/asn1-jKiBa2Ya-xsKwdyq9.js +0 -95
  6. package/dist/asterisk-DS281yxp-B5eTWk_B.js +0 -271
  7. package/dist/brainfuck-C_p9pTT8-DKVQ9poL.js +0 -34
  8. package/dist/clike-BMALKCNj-Ck7Gc35_.js +0 -620
  9. package/dist/clojure-CCKyeQKf-N9sg777Z.js +0 -800
  10. package/dist/cmake-CuaCgAKt-BbEgXraO.js +0 -28
  11. package/dist/cobol-BlTKFDRj-CHCoWafp.js +0 -72
  12. package/dist/coffeescript-BVCvwO8I-Z15ai5ac.js +0 -179
  13. package/dist/commonlisp-D_kxz07b-Ce7sn14o.js +0 -75
  14. package/dist/crystal-D309uH6_-DS6LrXoE.js +0 -217
  15. package/dist/css-BkF-NPzE-DiJu9Nkd.js +0 -1553
  16. package/dist/cypher-BMq4Fwjl-Ml-omWgp.js +0 -68
  17. package/dist/d-BZcgY6La-KCW6-bIm.js +0 -127
  18. package/dist/diff-Cg9d_RX2-C01qBVFc.js +0 -18
  19. package/dist/dockerfile-DFX8bq9N-BIbYUQV0.js +0 -194
  20. package/dist/dtd-CtLokQ-U-DCbNdeIA.js +0 -84
  21. package/dist/dylan-QYeExnWK-DIUVpsct.js +0 -234
  22. package/dist/ebnf-DUPDuY4r-7HIXKmWn.js +0 -78
  23. package/dist/ecl-CiXN-g_D-DOI-W0if.js +0 -121
  24. package/dist/eiffel-yQhjl4T1-DIX8Ceq1.js +0 -110
  25. package/dist/elm-CNT9vbN0-BcYlydpO.js +0 -108
  26. package/dist/erlang-CFOYdy9e-DULXsFZl.js +0 -487
  27. package/dist/factor-Clf6BoVk-DBb2EHMF.js +0 -65
  28. package/dist/fcl-CPC2WYrI-CuXG3fcK.js +0 -103
  29. package/dist/forth-BmxRyE9S-BcFwWpeL.js +0 -60
  30. package/dist/fortran-9bvPyrOW-CuLcq-Iu.js +0 -442
  31. package/dist/gas-cpmYfFX2-sZgGhMxB.js +0 -183
  32. package/dist/gherkin-CJuwpceU-BRrr8yjO.js +0 -34
  33. package/dist/groovy-DZeT_VM--CmF8wcSo.js +0 -146
  34. package/dist/haskell-CxiO_7JL-BuULsXvv.js +0 -375
  35. package/dist/haxe-70NVW1pR-CM27SfgM.js +0 -359
  36. package/dist/http-D9LttvKF-j9E8oQ7o.js +0 -44
  37. package/dist/idl-B6TRFYjl-B6TRFYjl.js +0 -947
  38. package/dist/index-4oLq9F9B-CiG9J_wS.js +0 -944
  39. package/dist/index-9NH8hlZ--ZzqmPLCF.js +0 -342
  40. package/dist/index-BFXNCCbG-LloeVRnr.js +0 -253
  41. package/dist/index-BLHYcXXK-BxaAXMNw.js +0 -101
  42. package/dist/index-BQU3Rb2C-DeyQP3x_.js +0 -290
  43. package/dist/index-Bg18ePld-Di0FNEJ4.js +0 -157
  44. package/dist/index-Bp5lqnbN-BM2h2Xfi.js +0 -555
  45. package/dist/index-Bqzq8A1N-Dn1yj5KO.js +0 -59
  46. package/dist/index-Bx-s4g99-QIFA9lMK.js +0 -76
  47. package/dist/index-BxX25QmV-Cnf0cb51.js +0 -248
  48. package/dist/index-CFCzgc33-MPwtm3eY.js +0 -1917
  49. package/dist/index-CL7JTU9M-Bl8j0-fU.js +0 -136
  50. package/dist/index-CgClvcTI.js +0 -35617
  51. package/dist/index-CipmEceX-D1vXXSTd.js +0 -74
  52. package/dist/index-Cv4vvpa2-B8Ojlo_m.js +0 -1305
  53. package/dist/index-D4hhdPbZ-DXEZQFco.js +0 -6152
  54. package/dist/index-DhNQ8g9I-CjBYiskZ.js +0 -270
  55. package/dist/index-Djp53tAP-DnPgUG4S.js +0 -94
  56. package/dist/index-KlsAFhIj-Dzil0Vr8.js +0 -566
  57. package/dist/index-OntZqtu6-DPgaaGGJ.js +0 -305
  58. package/dist/index-PGnZjMCR-BPDty4q0.js +0 -301
  59. package/dist/index-TyYoYgss-BIjAZ6j1.js +0 -613
  60. package/dist/index-oMSPmlXA-CoPtKzNe.js +0 -960
  61. package/dist/index-rQC6Gbk0-BZ6M0IzM.js +0 -138
  62. package/dist/javascript-DOuB9oqA-BxiygWgm.js +0 -691
  63. package/dist/julia-DpvXAuO6-Bk_IfD8X.js +0 -241
  64. package/dist/livescript-CanGTf8u-Cx6PrvS4.js +0 -272
  65. package/dist/lua-XplVlWi_-8f8obHzY.js +0 -217
  66. package/dist/mathematica-jaRHnSxC-B83gQsL2.js +0 -35
  67. package/dist/mbox-BctzC1hL-Hg5U2B4l.js +0 -76
  68. package/dist/mirc-CFBPAOaF-CfzSSk9W.js +0 -72
  69. package/dist/mllike-BSnXJBGA-Ao1NpT2u.js +0 -272
  70. package/dist/modelica-vUgVs--1-BObVpYBg.js +0 -93
  71. package/dist/mscgen-Cpl0NYLN-DqNArLGH.js +0 -104
  72. package/dist/mumps-CQoS1kWX-CkTUOQnt.js +0 -25
  73. package/dist/nginx-zDPm3Z74-DJk4KP7N.js +0 -87
  74. package/dist/nsis-BCLyjY7m-C2MffOQ3.js +0 -62
  75. package/dist/ntriples-CsNjv2QF-C4aZn3EO.js +0 -79
  76. package/dist/octave-C8PmmSRH-DM5vTWlU.js +0 -143
  77. package/dist/oz-Ce8aN8oE-BcJM4SVy.js +0 -151
  78. package/dist/pascal-De0D6mP7-D7DGFFKL.js +0 -77
  79. package/dist/perl-B4bSCe1C-6aIa2glS.js +0 -915
  80. package/dist/pig-D24Z8EXi-BD-qt5FU.js +0 -54
  81. package/dist/powershell-DkYVfTzP-Blt1Rodi.js +0 -249
  82. package/dist/properties-Dn9wna3M-EOOwnCnk.js +0 -26
  83. package/dist/protobuf-BPIjwpzm-DAButU8_.js +0 -49
  84. package/dist/pug-TGXr6c5j-C9HfQ86E.js +0 -248
  85. package/dist/puppet-nyd4dhjf-CGzH5dsa.js +0 -45
  86. package/dist/python-BkR3uSy8-CjDnyp3B.js +0 -313
  87. package/dist/q-DyHZGnqm-DGuqeH_T.js +0 -86
  88. package/dist/r-LKEuhEGI-BFQhJnTP.js +0 -104
  89. package/dist/rpm-IznJm2Xc-CbZqrWCM.js +0 -57
  90. package/dist/ruby-CcYfvIk6-DzPSfSGo.js +0 -228
  91. package/dist/sas-7E8yHoCW-D726Uzkw.js +0 -105
  92. package/dist/scheme-DjibxsNh-Bp5gVFkm.js +0 -124
  93. package/dist/shell-C0C2sNA_-BTeYg6ir.js +0 -182
  94. package/dist/sieve-Bwz7vjP5-Cw8iTBf7.js +0 -72
  95. package/dist/simple-mode-mNVtnu0l-BC8mf7KF.js +0 -89
  96. package/dist/smalltalk-Bhddl2pB-B7URiJSp.js +0 -48
  97. package/dist/solr-BNlsLglM-BM2OpfTI.js +0 -41
  98. package/dist/sparql-FarWu_Gb-FN_uQNd4.js +0 -197
  99. package/dist/spreadsheet-C-cy4P5N-5CSTwVYq.js +0 -49
  100. package/dist/sql-CfG5lQ3l-Bd4dgm_8.js +0 -278
  101. package/dist/stex-Du4h4KAU-QOov_zHj.js +0 -129
  102. package/dist/stylus-CAdqWld3-BcRBbBxD.js +0 -250
  103. package/dist/swift-DSxqR9R6-2Hz4NOoF.js +0 -230
  104. package/dist/tcl-xfoLljhY-DAZBRGQI.js +0 -81
  105. package/dist/textile-D1AWE-pc-DuiIfEnb.js +0 -295
  106. package/dist/tiddlywiki-5wqsXtSk-WuF_8VUv.js +0 -155
  107. package/dist/tiki-__Kn3CeS-CWcR9ib_.js +0 -181
  108. package/dist/toml-DWAmxCjl-CyJoDzs6.js +0 -56
  109. package/dist/troff-D2UO-fKf-DVoIzS-O.js +0 -35
  110. package/dist/ttcn-Bsa4sfRm-hoy08sYQ.js +0 -123
  111. package/dist/ttcn-cfg-Bac_acMi-DaC4kQpd.js +0 -88
  112. package/dist/turtle-xwJUxoPV-fs94wdNM.js +0 -80
  113. package/dist/vb-c2kQGd6--DU726qF0.js +0 -74
  114. package/dist/vbscript-1f_Dhg5H-DriA32xD.js +0 -324
  115. package/dist/velocity-DJd0pTTC-BG368IR6.js +0 -96
  116. package/dist/verilog-CiS1jyi5-giQA8J-e.js +0 -259
  117. package/dist/vhdl-T9HkrbI2-BJ8LEDog.js +0 -106
  118. package/dist/webidl-CjfDENEo-BM8KXKJ5.js +0 -155
  119. package/dist/xquery-Ct6lEb4B-C5KDc61l.js +0 -422
  120. package/dist/yacas-C0absKBh-B82QJ76F.js +0 -73
  121. package/dist/z80-Pki2zAjW-B0IQoIbR.js +0 -61
@@ -1,691 +0,0 @@
1
- function ie(b) {
2
- var ke = b.statementIndent, ue = b.jsonld, ye = b.json || ue, p = b.typescript, L = b.wordCharacters || /[\w$\xa1-\uffff]/, ve = (function() {
3
- function e(g) {
4
- return { type: g, style: "keyword" };
5
- }
6
- var t = e("keyword a"), n = e("keyword b"), i = e("keyword c"), u = e("keyword d"), c = e("operator"), m = { type: "atom", style: "atom" };
7
- return {
8
- if: e("if"),
9
- while: t,
10
- with: t,
11
- else: n,
12
- do: n,
13
- try: n,
14
- finally: n,
15
- return: u,
16
- break: u,
17
- continue: u,
18
- new: e("new"),
19
- delete: i,
20
- void: i,
21
- throw: i,
22
- debugger: e("debugger"),
23
- var: e("var"),
24
- const: e("var"),
25
- let: e("var"),
26
- function: e("function"),
27
- catch: e("catch"),
28
- for: e("for"),
29
- switch: e("switch"),
30
- case: e("case"),
31
- default: e("default"),
32
- in: c,
33
- typeof: c,
34
- instanceof: c,
35
- true: m,
36
- false: m,
37
- null: m,
38
- undefined: m,
39
- NaN: m,
40
- Infinity: m,
41
- this: e("this"),
42
- class: e("class"),
43
- super: e("atom"),
44
- yield: i,
45
- export: e("export"),
46
- import: e("import"),
47
- extends: i,
48
- await: i
49
- };
50
- })(), we = /[+\-*&%=<>!?|~^@]/, Ie = /^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/;
51
- function Se(e) {
52
- for (var t = !1, n, i = !1; (n = e.next()) != null; ) {
53
- if (!t) {
54
- if (n == "/" && !i) return;
55
- n == "[" ? i = !0 : i && n == "]" && (i = !1);
56
- }
57
- t = !t && n == "\\";
58
- }
59
- }
60
- var D, M;
61
- function y(e, t, n) {
62
- return D = e, M = n, t;
63
- }
64
- function O(e, t) {
65
- var n = e.next();
66
- if (n == '"' || n == "'")
67
- return t.tokenize = Ne(n), t.tokenize(e, t);
68
- if (n == "." && e.match(/^\d[\d_]*(?:[eE][+\-]?[\d_]+)?/))
69
- return y("number", "number");
70
- if (n == "." && e.match(".."))
71
- return y("spread", "meta");
72
- if (/[\[\]{}\(\),;\:\.]/.test(n))
73
- return y(n);
74
- if (n == "=" && e.eat(">"))
75
- return y("=>", "operator");
76
- if (n == "0" && e.match(/^(?:x[\dA-Fa-f_]+|o[0-7_]+|b[01_]+)n?/))
77
- return y("number", "number");
78
- if (/\d/.test(n))
79
- return e.match(/^[\d_]*(?:n|(?:\.[\d_]*)?(?:[eE][+\-]?[\d_]+)?)?/), y("number", "number");
80
- if (n == "/")
81
- return e.eat("*") ? (t.tokenize = Q, Q(e, t)) : e.eat("/") ? (e.skipToEnd(), y("comment", "comment")) : ct(e, t, 1) ? (Se(e), e.match(/^\b(([gimyus])(?![gimyus]*\2))+\b/), y("regexp", "string.special")) : (e.eat("="), y("operator", "operator", e.current()));
82
- if (n == "`")
83
- return t.tokenize = F, F(e, t);
84
- if (n == "#" && e.peek() == "!")
85
- return e.skipToEnd(), y("meta", "meta");
86
- if (n == "#" && e.eatWhile(L))
87
- return y("variable", "property");
88
- if (n == "<" && e.match("!--") || n == "-" && e.match("->") && !/\S/.test(e.string.slice(0, e.start)))
89
- return e.skipToEnd(), y("comment", "comment");
90
- if (we.test(n))
91
- return (n != ">" || !t.lexical || t.lexical.type != ">") && (e.eat("=") ? (n == "!" || n == "=") && e.eat("=") : /[<>*+\-|&?]/.test(n) && (e.eat(n), n == ">" && e.eat(n))), n == "?" && e.eat(".") ? y(".") : y("operator", "operator", e.current());
92
- if (L.test(n)) {
93
- e.eatWhile(L);
94
- var i = e.current();
95
- if (t.lastType != ".") {
96
- if (ve.propertyIsEnumerable(i)) {
97
- var u = ve[i];
98
- return y(u.type, u.style, i);
99
- }
100
- if (i == "async" && e.match(/^(\s|\/\*([^*]|\*(?!\/))*?\*\/)*[\[\(\w]/, !1))
101
- return y("async", "keyword", i);
102
- }
103
- return y("variable", "variable", i);
104
- }
105
- }
106
- function Ne(e) {
107
- return function(t, n) {
108
- var i = !1, u;
109
- if (ue && t.peek() == "@" && t.match(Ie))
110
- return n.tokenize = O, y("jsonld-keyword", "meta");
111
- for (; (u = t.next()) != null && !(u == e && !i); )
112
- i = !i && u == "\\";
113
- return i || (n.tokenize = O), y("string", "string");
114
- };
115
- }
116
- function Q(e, t) {
117
- for (var n = !1, i; i = e.next(); ) {
118
- if (i == "/" && n) {
119
- t.tokenize = O;
120
- break;
121
- }
122
- n = i == "*";
123
- }
124
- return y("comment", "comment");
125
- }
126
- function F(e, t) {
127
- for (var n = !1, i; (i = e.next()) != null; ) {
128
- if (!n && (i == "`" || i == "$" && e.eat("{"))) {
129
- t.tokenize = O;
130
- break;
131
- }
132
- n = !n && i == "\\";
133
- }
134
- return y("quasi", "string.special", e.current());
135
- }
136
- var Pe = "([{}])";
137
- function oe(e, t) {
138
- t.fatArrowAt && (t.fatArrowAt = null);
139
- var n = e.string.indexOf("=>", e.start);
140
- if (!(n < 0)) {
141
- if (p) {
142
- var i = /:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(e.string.slice(e.start, n));
143
- i && (n = i.index);
144
- }
145
- for (var u = 0, c = !1, m = n - 1; m >= 0; --m) {
146
- var g = e.string.charAt(m), x = Pe.indexOf(g);
147
- if (x >= 0 && x < 3) {
148
- if (!u) {
149
- ++m;
150
- break;
151
- }
152
- if (--u == 0) {
153
- g == "(" && (c = !0);
154
- break;
155
- }
156
- } else if (x >= 3 && x < 6)
157
- ++u;
158
- else if (L.test(g))
159
- c = !0;
160
- else if (/["'\/`]/.test(g))
161
- for (; ; --m) {
162
- if (m == 0) return;
163
- var K = e.string.charAt(m - 1);
164
- if (K == g && e.string.charAt(m - 2) != "\\") {
165
- m--;
166
- break;
167
- }
168
- }
169
- else if (c && !u) {
170
- ++m;
171
- break;
172
- }
173
- }
174
- c && !u && (t.fatArrowAt = m);
175
- }
176
- }
177
- var Ce = {
178
- atom: !0,
179
- number: !0,
180
- variable: !0,
181
- string: !0,
182
- regexp: !0,
183
- this: !0,
184
- import: !0,
185
- "jsonld-keyword": !0
186
- };
187
- function be(e, t, n, i, u, c) {
188
- this.indented = e, this.column = t, this.type = n, this.prev = u, this.info = c, i != null && (this.align = i);
189
- }
190
- function We(e, t) {
191
- for (var n = e.localVars; n; n = n.next)
192
- if (n.name == t) return !0;
193
- for (var i = e.context; i; i = i.prev)
194
- for (var n = i.vars; n; n = n.next)
195
- if (n.name == t) return !0;
196
- }
197
- function Be(e, t, n, i, u) {
198
- var c = e.cc;
199
- for (a.state = e, a.stream = u, a.marked = null, a.cc = c, a.style = t, e.lexical.hasOwnProperty("align") || (e.lexical.align = !0); ; ) {
200
- var m = c.length ? c.pop() : ye ? k : v;
201
- if (m(n, i)) {
202
- for (; c.length && c[c.length - 1].lex; )
203
- c.pop()();
204
- return a.marked ? a.marked : n == "variable" && We(e, i) ? "variableName.local" : t;
205
- }
206
- }
207
- }
208
- var a = { state: null, marked: null, cc: null };
209
- function f() {
210
- for (var e = arguments.length - 1; e >= 0; e--) a.cc.push(arguments[e]);
211
- }
212
- function r() {
213
- return f.apply(null, arguments), !0;
214
- }
215
- function fe(e, t) {
216
- for (var n = t; n; n = n.next) if (n.name == e) return !0;
217
- return !1;
218
- }
219
- function S(e) {
220
- var t = a.state;
221
- if (a.marked = "def", t.context) {
222
- if (t.lexical.info == "var" && t.context && t.context.block) {
223
- var n = he(e, t.context);
224
- if (n != null) {
225
- t.context = n;
226
- return;
227
- }
228
- } else if (!fe(e, t.localVars)) {
229
- t.localVars = new G(e, t.localVars);
230
- return;
231
- }
232
- }
233
- b.globalVars && !fe(e, t.globalVars) && (t.globalVars = new G(e, t.globalVars));
234
- }
235
- function he(e, t) {
236
- if (t)
237
- if (t.block) {
238
- var n = he(e, t.prev);
239
- return n ? n == t.prev ? t : new U(n, t.vars, !0) : null;
240
- } else return fe(e, t.vars) ? t : new U(t.prev, new G(e, t.vars), !1);
241
- else return null;
242
- }
243
- function R(e) {
244
- return e == "public" || e == "private" || e == "protected" || e == "abstract" || e == "readonly";
245
- }
246
- function U(e, t, n) {
247
- this.prev = e, this.vars = t, this.block = n;
248
- }
249
- function G(e, t) {
250
- this.name = e, this.next = t;
251
- }
252
- var De = new G("this", new G("arguments", null));
253
- function _() {
254
- a.state.context = new U(a.state.context, a.state.localVars, !1), a.state.localVars = De;
255
- }
256
- function X() {
257
- a.state.context = new U(a.state.context, a.state.localVars, !0), a.state.localVars = null;
258
- }
259
- _.lex = X.lex = !0;
260
- function V() {
261
- a.state.localVars = a.state.context.vars, a.state.context = a.state.context.prev;
262
- }
263
- V.lex = !0;
264
- function s(e, t) {
265
- var n = function() {
266
- var i = a.state, u = i.indented;
267
- if (i.lexical.type == "stat") u = i.lexical.indented;
268
- else for (var c = i.lexical; c && c.type == ")" && c.align; c = c.prev)
269
- u = c.indented;
270
- i.lexical = new be(u, a.stream.column(), e, null, i.lexical, t);
271
- };
272
- return n.lex = !0, n;
273
- }
274
- function o() {
275
- var e = a.state;
276
- e.lexical.prev && (e.lexical.type == ")" && (e.indented = e.lexical.indented), e.lexical = e.lexical.prev);
277
- }
278
- o.lex = !0;
279
- function l(e) {
280
- function t(n) {
281
- return n == e ? r() : e == ";" || n == "}" || n == ")" || n == "]" ? f() : r(t);
282
- }
283
- return t;
284
- }
285
- function v(e, t) {
286
- return e == "var" ? r(s("vardef", t), me, l(";"), o) : e == "keyword a" ? r(s("form"), se, v, o) : e == "keyword b" ? r(s("form"), v, o) : e == "keyword d" ? a.stream.match(/^\s*$/, !1) ? r() : r(s("stat"), N, l(";"), o) : e == "debugger" ? r(l(";")) : e == "{" ? r(s("}"), X, ee, o, V) : e == ";" ? r() : e == "if" ? (a.state.lexical.info == "else" && a.state.cc[a.state.cc.length - 1] == o && a.state.cc.pop()(), r(s("form"), se, v, o, Te)) : e == "function" ? r($) : e == "for" ? r(s("form"), X, je, v, V, o) : e == "class" || p && t == "interface" ? (a.marked = "keyword", r(s("form", e == "class" ? e : t), Oe, o)) : e == "variable" ? p && t == "declare" ? (a.marked = "keyword", r(v)) : p && (t == "module" || t == "enum" || t == "type") && a.stream.match(/^\s*\w/, !1) ? (a.marked = "keyword", t == "enum" ? r(Ee) : t == "type" ? r($e, l("operator"), d, l(";")) : r(s("form"), A, l("{"), s("}"), ee, o, o)) : p && t == "namespace" ? (a.marked = "keyword", r(s("form"), k, v, o)) : p && t == "abstract" ? (a.marked = "keyword", r(v)) : r(s("stat"), Ke) : e == "switch" ? r(
287
- s("form"),
288
- se,
289
- l("{"),
290
- s("}", "switch"),
291
- X,
292
- ee,
293
- o,
294
- o,
295
- V
296
- ) : e == "case" ? r(k, l(":")) : e == "default" ? r(l(":")) : e == "catch" ? r(s("form"), _, Fe, v, o, V) : e == "export" ? r(s("stat"), it, o) : e == "import" ? r(s("stat"), ut, o) : e == "async" ? r(v) : t == "@" ? r(k, v) : f(s("stat"), k, l(";"), o);
297
- }
298
- function Fe(e) {
299
- if (e == "(") return r(I, l(")"));
300
- }
301
- function k(e, t) {
302
- return ge(e, t, !1);
303
- }
304
- function h(e, t) {
305
- return ge(e, t, !0);
306
- }
307
- function se(e) {
308
- return e != "(" ? f() : r(s(")"), N, l(")"), o);
309
- }
310
- function ge(e, t, n) {
311
- if (a.state.fatArrowAt == a.stream.start) {
312
- var i = n ? Ve : xe;
313
- if (e == "(") return r(_, s(")"), w(I, ")"), o, l("=>"), i, V);
314
- if (e == "variable") return f(_, A, l("=>"), i, V);
315
- }
316
- var u = n ? P : q;
317
- return Ce.hasOwnProperty(e) ? r(u) : e == "function" ? r($, u) : e == "class" || p && t == "interface" ? (a.marked = "keyword", r(s("form"), at, o)) : e == "keyword c" || e == "async" ? r(n ? h : k) : e == "(" ? r(s(")"), N, l(")"), o, u) : e == "operator" || e == "spread" ? r(n ? h : k) : e == "[" ? r(s("]"), ft, o, u) : e == "{" ? H(Z, "}", null, u) : e == "quasi" ? f(Y, u) : e == "new" ? r(Ge(n)) : r();
318
- }
319
- function N(e) {
320
- return e.match(/[;\}\)\],]/) ? f() : f(k);
321
- }
322
- function q(e, t) {
323
- return e == "," ? r(N) : P(e, t, !1);
324
- }
325
- function P(e, t, n) {
326
- var i = n == !1 ? q : P, u = n == !1 ? k : h;
327
- if (e == "=>") return r(_, n ? Ve : xe, V);
328
- if (e == "operator")
329
- return /\+\+|--/.test(t) || p && t == "!" ? r(i) : p && t == "<" && a.stream.match(/^([^<>]|<[^<>]*>)*>\s*\(/, !1) ? r(s(">"), w(d, ">"), o, i) : t == "?" ? r(k, l(":"), u) : r(u);
330
- if (e == "quasi")
331
- return f(Y, i);
332
- if (e != ";") {
333
- if (e == "(") return H(h, ")", "call", i);
334
- if (e == ".") return r(Le, i);
335
- if (e == "[") return r(s("]"), N, l("]"), o, i);
336
- if (p && t == "as")
337
- return a.marked = "keyword", r(d, i);
338
- if (e == "regexp")
339
- return a.state.lastType = a.marked = "operator", a.stream.backUp(a.stream.pos - a.stream.start - 1), r(u);
340
- }
341
- }
342
- function Y(e, t) {
343
- return e != "quasi" ? f() : t.slice(t.length - 2) != "${" ? r(Y) : r(N, Ue);
344
- }
345
- function Ue(e) {
346
- if (e == "}")
347
- return a.marked = "string.special", a.state.tokenize = F, r(Y);
348
- }
349
- function xe(e) {
350
- return oe(a.stream, a.state), f(e == "{" ? v : k);
351
- }
352
- function Ve(e) {
353
- return oe(a.stream, a.state), f(e == "{" ? v : h);
354
- }
355
- function Ge(e) {
356
- return function(t) {
357
- return t == "." ? r(e ? Je : He) : t == "variable" && p ? r(Ze, e ? P : q) : f(e ? h : k);
358
- };
359
- }
360
- function He(e, t) {
361
- if (t == "target")
362
- return a.marked = "keyword", r(q);
363
- }
364
- function Je(e, t) {
365
- if (t == "target")
366
- return a.marked = "keyword", r(P);
367
- }
368
- function Ke(e) {
369
- return e == ":" ? r(o, v) : f(q, l(";"), o);
370
- }
371
- function Le(e) {
372
- if (e == "variable")
373
- return a.marked = "property", r();
374
- }
375
- function Z(e, t) {
376
- if (e == "async")
377
- return a.marked = "property", r(Z);
378
- if (e == "variable" || a.style == "keyword") {
379
- if (a.marked = "property", t == "get" || t == "set") return r(Me);
380
- var n;
381
- return p && a.state.fatArrowAt == a.stream.start && (n = a.stream.match(/^\s*:\s*/, !1)) && (a.state.fatArrowAt = a.stream.pos + n[0].length), r(E);
382
- } else {
383
- if (e == "number" || e == "string")
384
- return a.marked = ue ? "property" : a.style + " property", r(E);
385
- if (e == "jsonld-keyword")
386
- return r(E);
387
- if (p && R(t))
388
- return a.marked = "keyword", r(Z);
389
- if (e == "[")
390
- return r(k, C, l("]"), E);
391
- if (e == "spread")
392
- return r(h, E);
393
- if (t == "*")
394
- return a.marked = "keyword", r(Z);
395
- if (e == ":")
396
- return f(E);
397
- }
398
- }
399
- function Me(e) {
400
- return e != "variable" ? f(E) : (a.marked = "property", r($));
401
- }
402
- function E(e) {
403
- if (e == ":") return r(h);
404
- if (e == "(") return f($);
405
- }
406
- function w(e, t, n) {
407
- function i(u, c) {
408
- if (n ? n.indexOf(u) > -1 : u == ",") {
409
- var m = a.state.lexical;
410
- return m.info == "call" && (m.pos = (m.pos || 0) + 1), r(function(g, x) {
411
- return g == t || x == t ? f() : f(e);
412
- }, i);
413
- }
414
- return u == t || c == t ? r() : n && n.indexOf(";") > -1 ? f(e) : r(l(t));
415
- }
416
- return function(u, c) {
417
- return u == t || c == t ? r() : f(e, i);
418
- };
419
- }
420
- function H(e, t, n) {
421
- for (var i = 3; i < arguments.length; i++)
422
- a.cc.push(arguments[i]);
423
- return r(s(t, n), w(e, t), o);
424
- }
425
- function ee(e) {
426
- return e == "}" ? r() : f(v, ee);
427
- }
428
- function C(e, t) {
429
- if (p) {
430
- if (e == ":") return r(d);
431
- if (t == "?") return r(C);
432
- }
433
- }
434
- function Qe(e, t) {
435
- if (p && (e == ":" || t == "in")) return r(d);
436
- }
437
- function Ae(e) {
438
- if (p && e == ":")
439
- return a.stream.match(/^\s*\w+\s+is\b/, !1) ? r(k, Re, d) : r(d);
440
- }
441
- function Re(e, t) {
442
- if (t == "is")
443
- return a.marked = "keyword", r();
444
- }
445
- function d(e, t) {
446
- if (t == "keyof" || t == "typeof" || t == "infer" || t == "readonly")
447
- return a.marked = "keyword", r(t == "typeof" ? h : d);
448
- if (e == "variable" || t == "void")
449
- return a.marked = "type", r(z);
450
- if (t == "|" || t == "&") return r(d);
451
- if (e == "string" || e == "number" || e == "atom") return r(z);
452
- if (e == "[") return r(s("]"), w(d, "]", ","), o, z);
453
- if (e == "{") return r(s("}"), le, o, z);
454
- if (e == "(") return r(w(de, ")"), Xe, z);
455
- if (e == "<") return r(w(d, ">"), d);
456
- if (e == "quasi") return f(ce, z);
457
- }
458
- function Xe(e) {
459
- if (e == "=>") return r(d);
460
- }
461
- function le(e) {
462
- return e.match(/[\}\)\]]/) ? r() : e == "," || e == ";" ? r(le) : f(J, le);
463
- }
464
- function J(e, t) {
465
- if (e == "variable" || a.style == "keyword")
466
- return a.marked = "property", r(J);
467
- if (t == "?" || e == "number" || e == "string")
468
- return r(J);
469
- if (e == ":")
470
- return r(d);
471
- if (e == "[")
472
- return r(l("variable"), Qe, l("]"), J);
473
- if (e == "(")
474
- return f(B, J);
475
- if (!e.match(/[;\}\)\],]/))
476
- return r();
477
- }
478
- function ce(e, t) {
479
- return e != "quasi" ? f() : t.slice(t.length - 2) != "${" ? r(ce) : r(d, Ye);
480
- }
481
- function Ye(e) {
482
- if (e == "}")
483
- return a.marked = "string.special", a.state.tokenize = F, r(ce);
484
- }
485
- function de(e, t) {
486
- return e == "variable" && a.stream.match(/^\s*[?:]/, !1) || t == "?" ? r(de) : e == ":" ? r(d) : e == "spread" ? r(de) : f(d);
487
- }
488
- function z(e, t) {
489
- if (t == "<") return r(s(">"), w(d, ">"), o, z);
490
- if (t == "|" || e == "." || t == "&") return r(d);
491
- if (e == "[") return r(d, l("]"), z);
492
- if (t == "extends" || t == "implements")
493
- return a.marked = "keyword", r(d);
494
- if (t == "?") return r(d, l(":"), d);
495
- }
496
- function Ze(e, t) {
497
- if (t == "<") return r(s(">"), w(d, ">"), o, z);
498
- }
499
- function te() {
500
- return f(d, et);
501
- }
502
- function et(e, t) {
503
- if (t == "=") return r(d);
504
- }
505
- function me(e, t) {
506
- return t == "enum" ? (a.marked = "keyword", r(Ee)) : f(A, C, j, rt);
507
- }
508
- function A(e, t) {
509
- if (p && R(t))
510
- return a.marked = "keyword", r(A);
511
- if (e == "variable")
512
- return S(t), r();
513
- if (e == "spread") return r(A);
514
- if (e == "[") return H(tt, "]");
515
- if (e == "{") return H(ze, "}");
516
- }
517
- function ze(e, t) {
518
- return e == "variable" && !a.stream.match(/^\s*:/, !1) ? (S(t), r(j)) : (e == "variable" && (a.marked = "property"), e == "spread" ? r(A) : e == "}" ? f() : e == "[" ? r(k, l("]"), l(":"), ze) : r(l(":"), A, j));
519
- }
520
- function tt() {
521
- return f(A, j);
522
- }
523
- function j(e, t) {
524
- if (t == "=") return r(h);
525
- }
526
- function rt(e) {
527
- if (e == ",") return r(me);
528
- }
529
- function Te(e, t) {
530
- if (e == "keyword b" && t == "else") return r(s("form", "else"), v, o);
531
- }
532
- function je(e, t) {
533
- if (t == "await") return r(je);
534
- if (e == "(") return r(s(")"), nt, o);
535
- }
536
- function nt(e) {
537
- return e == "var" ? r(me, W) : e == "variable" ? r(W) : f(W);
538
- }
539
- function W(e, t) {
540
- return e == ")" ? r() : e == ";" ? r(W) : t == "in" || t == "of" ? (a.marked = "keyword", r(k, W)) : f(k, W);
541
- }
542
- function $(e, t) {
543
- if (t == "*")
544
- return a.marked = "keyword", r($);
545
- if (e == "variable")
546
- return S(t), r($);
547
- if (e == "(") return r(_, s(")"), w(I, ")"), o, Ae, v, V);
548
- if (p && t == "<") return r(s(">"), w(te, ">"), o, $);
549
- }
550
- function B(e, t) {
551
- if (t == "*")
552
- return a.marked = "keyword", r(B);
553
- if (e == "variable")
554
- return S(t), r(B);
555
- if (e == "(") return r(_, s(")"), w(I, ")"), o, Ae, V);
556
- if (p && t == "<") return r(s(">"), w(te, ">"), o, B);
557
- }
558
- function $e(e, t) {
559
- if (e == "keyword" || e == "variable")
560
- return a.marked = "type", r($e);
561
- if (t == "<")
562
- return r(s(">"), w(te, ">"), o);
563
- }
564
- function I(e, t) {
565
- return t == "@" && r(k, I), e == "spread" ? r(I) : p && R(t) ? (a.marked = "keyword", r(I)) : p && e == "this" ? r(C, j) : f(A, C, j);
566
- }
567
- function at(e, t) {
568
- return e == "variable" ? Oe(e, t) : re(e, t);
569
- }
570
- function Oe(e, t) {
571
- if (e == "variable")
572
- return S(t), r(re);
573
- }
574
- function re(e, t) {
575
- if (t == "<") return r(s(">"), w(te, ">"), o, re);
576
- if (t == "extends" || t == "implements" || p && e == ",")
577
- return t == "implements" && (a.marked = "keyword"), r(p ? d : k, re);
578
- if (e == "{") return r(s("}"), T, o);
579
- }
580
- function T(e, t) {
581
- if (e == "async" || e == "variable" && (t == "static" || t == "get" || t == "set" || p && R(t)) && a.stream.match(/^\s+#?[\w$\xa1-\uffff]/, !1))
582
- return a.marked = "keyword", r(T);
583
- if (e == "variable" || a.style == "keyword")
584
- return a.marked = "property", r(ne, T);
585
- if (e == "number" || e == "string") return r(ne, T);
586
- if (e == "[")
587
- return r(k, C, l("]"), ne, T);
588
- if (t == "*")
589
- return a.marked = "keyword", r(T);
590
- if (p && e == "(") return f(B, T);
591
- if (e == ";" || e == ",") return r(T);
592
- if (e == "}") return r();
593
- if (t == "@") return r(k, T);
594
- }
595
- function ne(e, t) {
596
- if (t == "!" || t == "?") return r(ne);
597
- if (e == ":") return r(d, j);
598
- if (t == "=") return r(h);
599
- var n = a.state.lexical.prev, i = n && n.info == "interface";
600
- return f(i ? B : $);
601
- }
602
- function it(e, t) {
603
- return t == "*" ? (a.marked = "keyword", r(pe, l(";"))) : t == "default" ? (a.marked = "keyword", r(k, l(";"))) : e == "{" ? r(w(_e, "}"), pe, l(";")) : f(v);
604
- }
605
- function _e(e, t) {
606
- if (t == "as")
607
- return a.marked = "keyword", r(l("variable"));
608
- if (e == "variable") return f(h, _e);
609
- }
610
- function ut(e) {
611
- return e == "string" ? r() : e == "(" ? f(k) : e == "." ? f(q) : f(ae, qe, pe);
612
- }
613
- function ae(e, t) {
614
- return e == "{" ? H(ae, "}") : (e == "variable" && S(t), t == "*" && (a.marked = "keyword"), r(ot));
615
- }
616
- function qe(e) {
617
- if (e == ",") return r(ae, qe);
618
- }
619
- function ot(e, t) {
620
- if (t == "as")
621
- return a.marked = "keyword", r(ae);
622
- }
623
- function pe(e, t) {
624
- if (t == "from")
625
- return a.marked = "keyword", r(k);
626
- }
627
- function ft(e) {
628
- return e == "]" ? r() : f(w(h, "]"));
629
- }
630
- function Ee() {
631
- return f(s("form"), A, l("{"), s("}"), w(st, "}"), o, o);
632
- }
633
- function st() {
634
- return f(A, j);
635
- }
636
- function lt(e, t) {
637
- return e.lastType == "operator" || e.lastType == "," || we.test(t.charAt(0)) || /[,.]/.test(t.charAt(0));
638
- }
639
- function ct(e, t, n) {
640
- return t.tokenize == O && /^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test(t.lastType) || t.lastType == "quasi" && /\{\s*$/.test(e.string.slice(0, e.pos - n));
641
- }
642
- return {
643
- name: b.name,
644
- startState: function(e) {
645
- var t = {
646
- tokenize: O,
647
- lastType: "sof",
648
- cc: [],
649
- lexical: new be(-e, 0, "block", !1),
650
- localVars: b.localVars,
651
- context: b.localVars && new U(null, null, !1),
652
- indented: 0
653
- };
654
- return b.globalVars && typeof b.globalVars == "object" && (t.globalVars = b.globalVars), t;
655
- },
656
- token: function(e, t) {
657
- if (e.sol() && (t.lexical.hasOwnProperty("align") || (t.lexical.align = !1), t.indented = e.indentation(), oe(e, t)), t.tokenize != Q && e.eatSpace()) return null;
658
- var n = t.tokenize(e, t);
659
- return D == "comment" ? n : (t.lastType = D == "operator" && (M == "++" || M == "--") ? "incdec" : D, Be(t, n, D, M, e));
660
- },
661
- indent: function(e, t, n) {
662
- if (e.tokenize == Q || e.tokenize == F) return null;
663
- if (e.tokenize != O) return 0;
664
- var i = t && t.charAt(0), u = e.lexical, c;
665
- if (!/^\s*else\b/.test(t)) for (var m = e.cc.length - 1; m >= 0; --m) {
666
- var g = e.cc[m];
667
- if (g == o) u = u.prev;
668
- else if (g != Te && g != V) break;
669
- }
670
- for (; (u.type == "stat" || u.type == "form") && (i == "}" || (c = e.cc[e.cc.length - 1]) && (c == q || c == P) && !/^[,\.=+\-*:?[\(]/.test(t)); )
671
- u = u.prev;
672
- ke && u.type == ")" && u.prev.type == "stat" && (u = u.prev);
673
- var x = u.type, K = i == x;
674
- return x == "vardef" ? u.indented + (e.lastType == "operator" || e.lastType == "," ? u.info.length + 1 : 0) : x == "form" && i == "{" ? u.indented : x == "form" ? u.indented + n.unit : x == "stat" ? u.indented + (lt(e, t) ? ke || n.unit : 0) : u.info == "switch" && !K && b.doubleIndentSwitch != !1 ? u.indented + (/^(?:case|default)\b/.test(t) ? n.unit : 2 * n.unit) : u.align ? u.column + (K ? 0 : 1) : u.indented + (K ? 0 : n.unit);
675
- },
676
- languageData: {
677
- indentOnInput: /^\s*(?:case .*?:|default:|\{|\})$/,
678
- commentTokens: ye ? void 0 : { line: "//", block: { open: "/*", close: "*/" } },
679
- closeBrackets: { brackets: ["(", "[", "{", "'", '"', "`"] },
680
- wordChars: "$"
681
- }
682
- };
683
- }
684
- const dt = ie({ name: "javascript" });
685
- ie({ name: "json", json: !0 });
686
- const mt = ie({ name: "json", jsonld: !0 });
687
- ie({ name: "typescript", typescript: !0 });
688
- export {
689
- dt as javascript,
690
- mt as jsonld
691
- };