@aiao/code-editor 0.0.7 → 0.0.9

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 (125) hide show
  1. package/dist/apl-B2DGVGxc.js +76 -0
  2. package/dist/asciiarmor-2LVJmxlE.js +34 -0
  3. package/dist/asn1-jKiBa2Ya.js +95 -0
  4. package/dist/asterisk-DS281yxp.js +271 -0
  5. package/dist/brainfuck-C_p9pTT8.js +34 -0
  6. package/dist/clike-BMALKCNj.js +620 -0
  7. package/dist/clojure-CCKyeQKf.js +800 -0
  8. package/dist/cmake-CuaCgAKt.js +28 -0
  9. package/dist/cobol-BlTKFDRj.js +72 -0
  10. package/dist/coffeescript-BVCvwO8I.js +179 -0
  11. package/dist/commonlisp-D_kxz07b.js +75 -0
  12. package/dist/crystal-D309uH6_.js +217 -0
  13. package/dist/css-BkF-NPzE.js +1553 -0
  14. package/dist/cypher-BMq4Fwjl.js +68 -0
  15. package/dist/d-BZcgY6La.js +127 -0
  16. package/dist/diff-Cg9d_RX2.js +18 -0
  17. package/dist/dockerfile-DFX8bq9N.js +194 -0
  18. package/dist/dtd-CtLokQ-U.js +84 -0
  19. package/dist/dylan-QYeExnWK.js +234 -0
  20. package/dist/ebnf-DUPDuY4r.js +78 -0
  21. package/dist/ecl-CiXN-g_D.js +121 -0
  22. package/dist/eiffel-yQhjl4T1.js +110 -0
  23. package/dist/elm-CNT9vbN0.js +108 -0
  24. package/dist/erlang-CFOYdy9e.js +487 -0
  25. package/dist/factor-Clf6BoVk.js +65 -0
  26. package/dist/fcl-CPC2WYrI.js +103 -0
  27. package/dist/forth-BmxRyE9S.js +60 -0
  28. package/dist/fortran-9bvPyrOW.js +442 -0
  29. package/dist/gas-cpmYfFX2.js +183 -0
  30. package/dist/gherkin-CJuwpceU.js +34 -0
  31. package/dist/groovy-DZeT_VM-.js +146 -0
  32. package/dist/haskell-CxiO_7JL.js +375 -0
  33. package/dist/haxe-70NVW1pR.js +359 -0
  34. package/dist/http-D9LttvKF.js +44 -0
  35. package/dist/idl-B6TRFYjl.js +947 -0
  36. package/dist/index-4oLq9F9B.js +945 -0
  37. package/dist/index-9NH8hlZ-.js +342 -0
  38. package/dist/index-BFXNCCbG.js +253 -0
  39. package/dist/index-BLHYcXXK.js +101 -0
  40. package/dist/index-BQU3Rb2C.js +290 -0
  41. package/dist/index-Bg18ePld.js +157 -0
  42. package/dist/index-Bp5lqnbN.js +555 -0
  43. package/dist/index-Bqzq8A1N.js +59 -0
  44. package/dist/index-Bx-s4g99.js +76 -0
  45. package/dist/index-BxX25QmV.js +248 -0
  46. package/dist/index-CFCzgc33.js +1918 -0
  47. package/dist/index-CL7JTU9M.js +136 -0
  48. package/dist/index-CZGsg2Zk.js +12945 -0
  49. package/dist/index-CipmEceX.js +74 -0
  50. package/dist/index-Cv4vvpa2.js +1305 -0
  51. package/dist/index-D4hhdPbZ.js +6153 -0
  52. package/dist/index-DhNQ8g9I.js +270 -0
  53. package/dist/index-Djp53tAP.js +94 -0
  54. package/dist/index-KlsAFhIj.js +566 -0
  55. package/dist/index-OntZqtu6.js +309 -0
  56. package/dist/index-PGnZjMCR.js +302 -0
  57. package/dist/index-TyYoYgss.js +613 -0
  58. package/dist/index-oMSPmlXA.js +960 -0
  59. package/dist/index-rQC6Gbk0.js +138 -0
  60. package/dist/index.d.ts +1 -0
  61. package/dist/index.d.ts.map +1 -1
  62. package/dist/index.js +19 -1
  63. package/dist/javascript-DOuB9oqA.js +691 -0
  64. package/dist/julia-DpvXAuO6.js +241 -0
  65. package/dist/languages.d.ts +18 -0
  66. package/dist/languages.d.ts.map +1 -0
  67. package/dist/livescript-CanGTf8u.js +272 -0
  68. package/dist/lua-XplVlWi_.js +217 -0
  69. package/dist/mathematica-jaRHnSxC.js +35 -0
  70. package/dist/mbox-BctzC1hL.js +76 -0
  71. package/dist/mirc-CFBPAOaF.js +72 -0
  72. package/dist/mllike-BSnXJBGA.js +272 -0
  73. package/dist/modelica-vUgVs--1.js +93 -0
  74. package/dist/mscgen-Cpl0NYLN.js +104 -0
  75. package/dist/mumps-CQoS1kWX.js +25 -0
  76. package/dist/nginx-zDPm3Z74.js +89 -0
  77. package/dist/nsis-BCLyjY7m.js +62 -0
  78. package/dist/ntriples-CsNjv2QF.js +79 -0
  79. package/dist/octave-C8PmmSRH.js +143 -0
  80. package/dist/oz-Ce8aN8oE.js +151 -0
  81. package/dist/pascal-De0D6mP7.js +77 -0
  82. package/dist/perl-B4bSCe1C.js +915 -0
  83. package/dist/pig-D24Z8EXi.js +54 -0
  84. package/dist/powershell-DkYVfTzP.js +249 -0
  85. package/dist/properties-Dn9wna3M.js +26 -0
  86. package/dist/protobuf-BPIjwpzm.js +49 -0
  87. package/dist/pug-TGXr6c5j.js +248 -0
  88. package/dist/puppet-nyd4dhjf.js +45 -0
  89. package/dist/python-BkR3uSy8.js +313 -0
  90. package/dist/q-DyHZGnqm.js +86 -0
  91. package/dist/r-LKEuhEGI.js +104 -0
  92. package/dist/rpm-IznJm2Xc.js +57 -0
  93. package/dist/ruby-CcYfvIk6.js +228 -0
  94. package/dist/sas-7E8yHoCW.js +105 -0
  95. package/dist/scheme-DjibxsNh.js +124 -0
  96. package/dist/shell-C0C2sNA_.js +182 -0
  97. package/dist/sieve-Bwz7vjP5.js +72 -0
  98. package/dist/simple-mode-mNVtnu0l.js +89 -0
  99. package/dist/smalltalk-Bhddl2pB.js +48 -0
  100. package/dist/solr-BNlsLglM.js +41 -0
  101. package/dist/sparql-FarWu_Gb.js +197 -0
  102. package/dist/spreadsheet-C-cy4P5N.js +49 -0
  103. package/dist/sql-CfG5lQ3l.js +282 -0
  104. package/dist/stex-Du4h4KAU.js +129 -0
  105. package/dist/stylus-CAdqWld3.js +250 -0
  106. package/dist/swift-DSxqR9R6.js +230 -0
  107. package/dist/tcl-xfoLljhY.js +81 -0
  108. package/dist/textile-D1AWE-pc.js +295 -0
  109. package/dist/tiddlywiki-5wqsXtSk.js +155 -0
  110. package/dist/tiki-__Kn3CeS.js +181 -0
  111. package/dist/toml-DWAmxCjl.js +58 -0
  112. package/dist/troff-D2UO-fKf.js +35 -0
  113. package/dist/ttcn-Bsa4sfRm.js +123 -0
  114. package/dist/ttcn-cfg-Bac_acMi.js +88 -0
  115. package/dist/turtle-xwJUxoPV.js +80 -0
  116. package/dist/vb-c2kQGd6-.js +74 -0
  117. package/dist/vbscript-1f_Dhg5H.js +324 -0
  118. package/dist/velocity-DJd0pTTC.js +96 -0
  119. package/dist/verilog-CiS1jyi5.js +262 -0
  120. package/dist/vhdl-T9HkrbI2.js +106 -0
  121. package/dist/webidl-CjfDENEo.js +155 -0
  122. package/dist/xquery-Ct6lEb4B.js +422 -0
  123. package/dist/yacas-C0absKBh.js +73 -0
  124. package/dist/z80-Pki2zAjW.js +61 -0
  125. package/package.json +16 -7
@@ -0,0 +1,309 @@
1
+ import { L as G, E as A, C as N } from "./index-Cv4vvpa2.js";
2
+ import { s as I, t as p, E as Y, a as j, L as U, b as k, e as Z, i as B, f as D, g as M } from "./index-CZGsg2Zk.js";
3
+ const h = 1, F = 2, L = 3, K = 4, H = 5, J = 36, ee = 37, te = 38, Oe = 11, oe = 13;
4
+ function re(e) {
5
+ return e == 45 || e == 46 || e == 58 || e >= 65 && e <= 90 || e == 95 || e >= 97 && e <= 122 || e >= 161;
6
+ }
7
+ function ne(e) {
8
+ return e == 9 || e == 10 || e == 13 || e == 32;
9
+ }
10
+ let Q = null, V = null, X = 0;
11
+ function W(e, t) {
12
+ let o = e.pos + t;
13
+ if (V == e && X == o) return Q;
14
+ for (; ne(e.peek(t)); ) t++;
15
+ let O = "";
16
+ for (; ; ) {
17
+ let r = e.peek(t);
18
+ if (!re(r)) break;
19
+ O += String.fromCharCode(r), t++;
20
+ }
21
+ return V = e, X = o, Q = O || null;
22
+ }
23
+ function _(e, t) {
24
+ this.name = e, this.parent = t;
25
+ }
26
+ const ae = new N({
27
+ start: null,
28
+ shift(e, t, o, O) {
29
+ return t == h ? new _(W(O, 1) || "", e) : e;
30
+ },
31
+ reduce(e, t) {
32
+ return t == Oe && e ? e.parent : e;
33
+ },
34
+ reuse(e, t, o, O) {
35
+ let r = t.type.id;
36
+ return r == h || r == oe ? new _(W(O, 1) || "", e) : e;
37
+ },
38
+ strict: !1
39
+ }), le = new A((e, t) => {
40
+ if (e.next == 60) {
41
+ if (e.advance(), e.next == 47) {
42
+ e.advance();
43
+ let o = W(e, 0);
44
+ if (!o) return e.acceptToken(H);
45
+ if (t.context && o == t.context.name) return e.acceptToken(F);
46
+ for (let O = t.context; O; O = O.parent) if (O.name == o) return e.acceptToken(L, -2);
47
+ e.acceptToken(K);
48
+ } else if (e.next != 33 && e.next != 63)
49
+ return e.acceptToken(h);
50
+ }
51
+ }, { contextual: !0 });
52
+ function y(e, t) {
53
+ return new A((o) => {
54
+ let O = 0, r = t.charCodeAt(0);
55
+ e: for (; !(o.next < 0); o.advance(), O++)
56
+ if (o.next == r) {
57
+ for (let a = 1; a < t.length; a++)
58
+ if (o.peek(a) != t.charCodeAt(a)) continue e;
59
+ break;
60
+ }
61
+ O && o.acceptToken(e);
62
+ });
63
+ }
64
+ const se = y(J, "-->"), ie = y(ee, "?>"), ce = y(te, "]]>"), me = I({
65
+ Text: p.content,
66
+ "StartTag StartCloseTag EndTag SelfCloseEndTag": p.angleBracket,
67
+ TagName: p.tagName,
68
+ "MismatchedCloseTag/TagName": [p.tagName, p.invalid],
69
+ AttributeName: p.attributeName,
70
+ AttributeValue: p.attributeValue,
71
+ Is: p.definitionOperator,
72
+ "EntityReference CharacterReference": p.character,
73
+ Comment: p.blockComment,
74
+ ProcessingInst: p.processingInstruction,
75
+ DoctypeDecl: p.documentMeta,
76
+ Cdata: p.special(p.string)
77
+ }), $e = G.deserialize({
78
+ version: 14,
79
+ states: ",lOQOaOOOrOxO'#CfOzOpO'#CiO!tOaO'#CgOOOP'#Cg'#CgO!{OrO'#CrO#TOtO'#CsO#]OpO'#CtOOOP'#DT'#DTOOOP'#Cv'#CvQQOaOO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OdwOz^O~ORyO~P!SO^{Oz^O~OteO!P}O~OuhO!R!PO~O^!QOz^O~O[!SOz^O~O[!VO`sOd!WOz^O~Oa!YOz^O~Oz^O[mX`mXdmX~O[!VO`sOd!WO~O^!]Oz^O~O[!_Oz^O~O[!aOz^O~O[!cO`sOd!dOz^O~O[!cO`sOd!dO~Oa!eOz^O~Oz^O{!gO}!hO~Oz^O[ma`madma~O[!kOz^O~O[!lOz^O~O[!mO`sOd!nO~OW!qOX!qO{!sO|!qO~OW!tOX!tO}!sO!O!tO~O[!vOz^O~OW!qOX!qO{!yO|!qO~OW!tOX!tO}!yO!O!tO~O",
81
+ goto: "%cxPPPPPPPPPPyyP!PP!VPP!`!jP!pyyyP!v!|#S$[$k$q$w$}%TPPPP%ZXWORYbXRORYb_t`qru!T!U!bQ!i!YS!p!e!fR!w!oQdRRybXSORYbQYORmYQ[PRn[Q_QQkVjp_krz!R!T!X!Z!^!`!f!j!oQr`QzcQ!RlQ!TqQ!XsQ!ZtQ!^{Q!`!QQ!f!YQ!j!]R!o!eQu`S!UqrU![u!U!bR!b!TQ!r!gR!x!rQ!u!hR!z!uQbRRxbQfTR|fQiUR!OiSXOYTaRb",
82
+ nodeNames: "⚠ StartTag StartCloseTag MissingCloseTag StartCloseTag StartCloseTag Document Text EntityReference CharacterReference Cdata Element EndTag OpenTag TagName Attribute AttributeName Is AttributeValue CloseTag SelfCloseEndTag SelfClosingTag Comment ProcessingInst MismatchedCloseTag DoctypeDecl",
83
+ maxTerm: 50,
84
+ context: ae,
85
+ nodeProps: [
86
+ ["closedBy", 1, "SelfCloseEndTag EndTag", 13, "CloseTag MissingCloseTag"],
87
+ ["openedBy", 12, "StartTag StartCloseTag", 19, "OpenTag", 20, "StartTag"],
88
+ ["isolate", -6, 13, 18, 19, 21, 22, 24, ""]
89
+ ],
90
+ propSources: [me],
91
+ skippedNodes: [0],
92
+ repeatNodeCount: 9,
93
+ tokenData: "!)v~R!YOX$qXY)iYZ)iZ]$q]^)i^p$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&kX!RQVP|W!O`Or$qrs%gsv$qwx'^x!^$q!^!_(o!_;'S$q;'S;=`)c<%lO$qk!'aZVP|W!O`Or$qrs%gsv$qwx'^x!^$q!^!_(o!_#P$q#P#Q!(S#Q;'S$q;'S;=`)c<%lO$qk!(]ZVP|W!O`Or$qrs%gsv$qwx'^x!^$q!^!_(o!_!`$q!`!a!)O!a;'S$q;'S;=`)c<%lO$qk!)ZXxQVP|W!O`Or$qrs%gsv$qwx'^x!^$q!^!_(o!_;'S$q;'S;=`)c<%lO$q",
94
+ tokenizers: [le, se, ie, ce, 0, 1, 2, 3, 4],
95
+ topRules: { Document: [0, 6] },
96
+ tokenPrec: 0
97
+ });
98
+ function T(e, t) {
99
+ let o = t && t.getChild("TagName");
100
+ return o ? e.sliceString(o.from, o.to) : "";
101
+ }
102
+ function P(e, t) {
103
+ let o = t && t.firstChild;
104
+ return !o || o.name != "OpenTag" ? "" : T(e, o);
105
+ }
106
+ function Se(e, t, o) {
107
+ let O = t && t.getChildren("Attribute").find((a) => a.from <= o && a.to >= o), r = O && O.getChild("AttributeName");
108
+ return r ? e.sliceString(r.from, r.to) : "";
109
+ }
110
+ function C(e) {
111
+ for (let t = e && e.parent; t; t = t.parent)
112
+ if (t.name == "Element")
113
+ return t;
114
+ return null;
115
+ }
116
+ function ge(e, t) {
117
+ var o;
118
+ let O = k(e).resolveInner(t, -1), r = null;
119
+ for (let a = O; !r && a.parent; a = a.parent)
120
+ (a.name == "OpenTag" || a.name == "CloseTag" || a.name == "SelfClosingTag" || a.name == "MismatchedCloseTag") && (r = a);
121
+ if (r && (r.to > t || r.lastChild.type.isError)) {
122
+ let a = r.parent;
123
+ if (O.name == "TagName")
124
+ return r.name == "CloseTag" || r.name == "MismatchedCloseTag" ? { type: "closeTag", from: O.from, context: a } : { type: "openTag", from: O.from, context: C(a) };
125
+ if (O.name == "AttributeName")
126
+ return { type: "attrName", from: O.from, context: r };
127
+ if (O.name == "AttributeValue")
128
+ return { type: "attrValue", from: O.from, context: r };
129
+ let s = O == r || O.name == "Attribute" ? O.childBefore(t) : O;
130
+ return s?.name == "StartTag" ? { type: "openTag", from: t, context: C(a) } : s?.name == "StartCloseTag" && s.to <= t ? { type: "closeTag", from: t, context: a } : s?.name == "Is" ? { type: "attrValue", from: t, context: r } : s ? { type: "attrName", from: t, context: r } : null;
131
+ } else if (O.name == "StartCloseTag")
132
+ return { type: "closeTag", from: t, context: O.parent };
133
+ for (; O.parent && O.to == t && !(!((o = O.lastChild) === null || o === void 0) && o.type.isError); )
134
+ O = O.parent;
135
+ return O.name == "Element" || O.name == "Text" || O.name == "Document" ? { type: "tag", from: t, context: O.name == "Element" ? O : C(O) } : null;
136
+ }
137
+ class ue {
138
+ constructor(t, o, O) {
139
+ this.attrs = o, this.attrValues = O, this.children = [], this.name = t.name, this.completion = Object.assign(Object.assign({ type: "type" }, t.completion || {}), { label: this.name }), this.openCompletion = Object.assign(Object.assign({}, this.completion), { label: "<" + this.name }), this.closeCompletion = Object.assign(Object.assign({}, this.completion), { label: "</" + this.name + ">", boost: 2 }), this.closeNameCompletion = Object.assign(Object.assign({}, this.completion), { label: this.name + ">" }), this.text = t.textContent ? t.textContent.map((r) => ({ label: r, type: "text" })) : [];
140
+ }
141
+ }
142
+ const b = /^[:\-\.\w\u00b7-\uffff]*$/;
143
+ function E(e) {
144
+ return Object.assign(Object.assign({ type: "property" }, e.completion || {}), { label: e.name });
145
+ }
146
+ function R(e) {
147
+ return typeof e == "string" ? { label: `"${e}"`, type: "constant" } : /^"/.test(e.label) ? e : Object.assign(Object.assign({}, e), { label: `"${e.label}"` });
148
+ }
149
+ function pe(e, t) {
150
+ let o = [], O = [], r = /* @__PURE__ */ Object.create(null);
151
+ for (let n of t) {
152
+ let $ = E(n);
153
+ o.push($), n.global && O.push($), n.values && (r[n.name] = n.values.map(R));
154
+ }
155
+ let a = [], s = [], f = /* @__PURE__ */ Object.create(null);
156
+ for (let n of e) {
157
+ let $ = O, c = r;
158
+ n.attributes && ($ = $.concat(n.attributes.map((l) => typeof l == "string" ? o.find((d) => d.label == l) || { label: l, type: "property" } : (l.values && (c == r && (c = Object.create(c)), c[l.name] = l.values.map(R)), E(l)))));
159
+ let u = new ue(n, $, c);
160
+ f[u.name] = u, a.push(u), n.top && s.push(u);
161
+ }
162
+ s.length || (s = a);
163
+ for (let n = 0; n < a.length; n++) {
164
+ let $ = e[n], c = a[n];
165
+ if ($.children)
166
+ for (let u of $.children)
167
+ f[u] && c.children.push(f[u]);
168
+ else
169
+ c.children = a;
170
+ }
171
+ return (n) => {
172
+ var $;
173
+ let { doc: c } = n.state, u = ge(n.state, n.pos);
174
+ if (!u || u.type == "tag" && !n.explicit)
175
+ return null;
176
+ let { type: l, from: d, context: S } = u;
177
+ if (l == "openTag") {
178
+ let i = s, m = P(c, S);
179
+ if (m) {
180
+ let g = f[m];
181
+ i = g?.children || a;
182
+ }
183
+ return {
184
+ from: d,
185
+ options: i.map((g) => g.completion),
186
+ validFor: b
187
+ };
188
+ } else if (l == "closeTag") {
189
+ let i = P(c, S);
190
+ return i ? {
191
+ from: d,
192
+ to: n.pos + (c.sliceString(n.pos, n.pos + 1) == ">" ? 1 : 0),
193
+ options: [(($ = f[i]) === null || $ === void 0 ? void 0 : $.closeNameCompletion) || { label: i + ">", type: "type" }],
194
+ validFor: b
195
+ } : null;
196
+ } else if (l == "attrName") {
197
+ let i = f[T(c, S)];
198
+ return {
199
+ from: d,
200
+ options: i?.attrs || O,
201
+ validFor: b
202
+ };
203
+ } else if (l == "attrValue") {
204
+ let i = Se(c, S, d);
205
+ if (!i)
206
+ return null;
207
+ let m = f[T(c, S)], g = (m?.attrValues || r)[i];
208
+ return !g || !g.length ? null : {
209
+ from: d,
210
+ to: n.pos + (c.sliceString(n.pos, n.pos + 1) == '"' ? 1 : 0),
211
+ options: g,
212
+ validFor: /^"[^"]*"?$/
213
+ };
214
+ } else if (l == "tag") {
215
+ let i = P(c, S), m = f[i], g = [], q = S && S.lastChild;
216
+ i && (!q || q.name != "CloseTag" || T(c, q) != i) && g.push(m ? m.closeCompletion : { label: "</" + i + ">", type: "type", boost: 2 });
217
+ let v = g.concat((m?.children || (S ? a : s)).map((x) => x.openCompletion));
218
+ if (S && m?.text.length) {
219
+ let x = S.firstChild;
220
+ x.to > n.pos - 20 && !/\S/.test(n.state.sliceDoc(x.to, n.pos)) && (v = v.concat(m.text));
221
+ }
222
+ return {
223
+ from: d,
224
+ options: v,
225
+ validFor: /^<\/?[:\-\.\w\u00b7-\uffff]*$/
226
+ };
227
+ } else
228
+ return null;
229
+ };
230
+ }
231
+ const w = /* @__PURE__ */ j.define({
232
+ name: "xml",
233
+ parser: /* @__PURE__ */ $e.configure({
234
+ props: [
235
+ /* @__PURE__ */ B.add({
236
+ Element(e) {
237
+ let t = /^\s*<\//.test(e.textAfter);
238
+ return e.lineIndent(e.node.from) + (t ? 0 : e.unit);
239
+ },
240
+ "OpenTag CloseTag SelfClosingTag"(e) {
241
+ return e.column(e.node.from) + e.unit;
242
+ }
243
+ }),
244
+ /* @__PURE__ */ D.add({
245
+ Element(e) {
246
+ let t = e.firstChild, o = e.lastChild;
247
+ return !t || t.name != "OpenTag" ? null : { from: t.to, to: o.name == "CloseTag" ? o.from : e.to };
248
+ }
249
+ }),
250
+ /* @__PURE__ */ M.add({
251
+ "OpenTag CloseTag": (e) => e.getChild("TagName")
252
+ })
253
+ ]
254
+ }),
255
+ languageData: {
256
+ commentTokens: { block: { open: "<!--", close: "-->" } },
257
+ indentOnInput: /^\s*<\/$/
258
+ }
259
+ });
260
+ function xe(e = {}) {
261
+ let t = [w.data.of({
262
+ autocomplete: pe(e.elements || [], e.attributes || [])
263
+ })];
264
+ return e.autoCloseTags !== !1 && t.push(fe), new U(w, t);
265
+ }
266
+ function z(e, t, o = e.length) {
267
+ if (!t)
268
+ return "";
269
+ let O = t.firstChild, r = O && O.getChild("TagName");
270
+ return r ? e.sliceString(r.from, Math.min(r.to, o)) : "";
271
+ }
272
+ const fe = /* @__PURE__ */ Y.inputHandler.of((e, t, o, O, r) => {
273
+ if (e.composing || e.state.readOnly || t != o || O != ">" && O != "/" || !w.isActiveAt(e.state, t, -1))
274
+ return !1;
275
+ let a = r(), { state: s } = a, f = s.changeByRange((n) => {
276
+ var $, c, u;
277
+ let { head: l } = n, d = s.doc.sliceString(l - 1, l) == O, S = k(s).resolveInner(l, -1), i;
278
+ if (d && O == ">" && S.name == "EndTag") {
279
+ let m = S.parent;
280
+ if (((c = ($ = m.parent) === null || $ === void 0 ? void 0 : $.lastChild) === null || c === void 0 ? void 0 : c.name) != "CloseTag" && (i = z(s.doc, m.parent, l))) {
281
+ let g = l + (s.doc.sliceString(l, l + 1) === ">" ? 1 : 0), q = `</${i}>`;
282
+ return { range: n, changes: { from: l, to: g, insert: q } };
283
+ }
284
+ } else if (d && O == "/" && S.name == "StartCloseTag") {
285
+ let m = S.parent;
286
+ if (S.from == l - 2 && ((u = m.lastChild) === null || u === void 0 ? void 0 : u.name) != "CloseTag" && (i = z(s.doc, m, l))) {
287
+ let g = l + (s.doc.sliceString(l, l + 1) === ">" ? 1 : 0), q = `${i}>`;
288
+ return {
289
+ range: Z.cursor(l + q.length, -1),
290
+ changes: { from: l, to: g, insert: q }
291
+ };
292
+ }
293
+ }
294
+ return { range: n };
295
+ });
296
+ return f.changes.empty ? !1 : (e.dispatch([
297
+ a,
298
+ s.update(f, {
299
+ userEvent: "input.complete",
300
+ scrollIntoView: !0
301
+ })
302
+ ]), !0);
303
+ });
304
+ export {
305
+ fe as autoCloseTags,
306
+ pe as completeFromSchema,
307
+ xe as xml,
308
+ w as xmlLanguage
309
+ };