@milkdown/crepe 7.3.3

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 (241) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +11 -0
  3. package/lib/apl-p0IPP13W.js +76 -0
  4. package/lib/asciiarmor-lJsBxlJJ.js +34 -0
  5. package/lib/asn1-Q9v1zIy5.js +102 -0
  6. package/lib/asterisk-foNkeTjy.js +273 -0
  7. package/lib/brainfuck-0XqyXpNS.js +35 -0
  8. package/lib/clike-ak6Z6Yhe.js +639 -0
  9. package/lib/clojure-iYO8U8Sg.js +810 -0
  10. package/lib/clsx-7d8NmkQq.js +21 -0
  11. package/lib/cmake-SVzjkxV_.js +28 -0
  12. package/lib/cobol-APHEnAOX.js +74 -0
  13. package/lib/coffeescript-KqQa0SYG.js +182 -0
  14. package/lib/commonlisp-bwqNqR5V.js +79 -0
  15. package/lib/core/crepe.d.ts +21 -0
  16. package/lib/core/crepe.d.ts.map +1 -0
  17. package/lib/core/index.d.ts +3 -0
  18. package/lib/core/index.d.ts.map +1 -0
  19. package/lib/core/slice.d.ts +12 -0
  20. package/lib/core/slice.d.ts.map +1 -0
  21. package/lib/crystal-BViWuDpA.js +217 -0
  22. package/lib/css-KHXHXfXg.js +1572 -0
  23. package/lib/cypher-XpTt4zQ3.js +69 -0
  24. package/lib/d-fLig6yqY.js +139 -0
  25. package/lib/diff-WoKGLpy6.js +18 -0
  26. package/lib/dockerfile-u6f6Vw2s.js +194 -0
  27. package/lib/dtd-SIJRUW6K.js +91 -0
  28. package/lib/dylan-4HCLhpWP.js +238 -0
  29. package/lib/ebnf-h_0lged5.js +77 -0
  30. package/lib/ecl-Lf4FF0lf.js +133 -0
  31. package/lib/eiffel-qlw8KUyf.js +112 -0
  32. package/lib/elm-QRnB3zXs.js +108 -0
  33. package/lib/erlang-fyVKb7eK.js +488 -0
  34. package/lib/factor-BEeN4upY.js +65 -0
  35. package/lib/fcl-lRek3hEb.js +106 -0
  36. package/lib/feature/block-edit/handle/component.d.ts +9 -0
  37. package/lib/feature/block-edit/handle/component.d.ts.map +1 -0
  38. package/lib/feature/block-edit/handle/index.d.ts +12 -0
  39. package/lib/feature/block-edit/handle/index.d.ts.map +1 -0
  40. package/lib/feature/block-edit/index.d.ts +3 -0
  41. package/lib/feature/block-edit/index.d.ts.map +1 -0
  42. package/lib/feature/block-edit/menu/component.d.ts +14 -0
  43. package/lib/feature/block-edit/menu/component.d.ts.map +1 -0
  44. package/lib/feature/block-edit/menu/config.d.ts +21 -0
  45. package/lib/feature/block-edit/menu/config.d.ts.map +1 -0
  46. package/lib/feature/block-edit/menu/icons.d.ts +14 -0
  47. package/lib/feature/block-edit/menu/icons.d.ts.map +1 -0
  48. package/lib/feature/block-edit/menu/index.d.ts +9 -0
  49. package/lib/feature/block-edit/menu/index.d.ts.map +1 -0
  50. package/lib/feature/code-mirror/index.d.ts +3 -0
  51. package/lib/feature/code-mirror/index.d.ts.map +1 -0
  52. package/lib/feature/gap-cursor/index.d.ts +3 -0
  53. package/lib/feature/gap-cursor/index.d.ts.map +1 -0
  54. package/lib/feature/image-block/index.d.ts +3 -0
  55. package/lib/feature/image-block/index.d.ts.map +1 -0
  56. package/lib/feature/index.d.ts +18 -0
  57. package/lib/feature/index.d.ts.map +1 -0
  58. package/lib/feature/link-tooltip/consts.d.ts +5 -0
  59. package/lib/feature/link-tooltip/consts.d.ts.map +1 -0
  60. package/lib/feature/link-tooltip/index.d.ts +3 -0
  61. package/lib/feature/link-tooltip/index.d.ts.map +1 -0
  62. package/lib/feature/list-item/consts.d.ts +2 -0
  63. package/lib/feature/list-item/consts.d.ts.map +1 -0
  64. package/lib/feature/list-item/index.d.ts +3 -0
  65. package/lib/feature/list-item/index.d.ts.map +1 -0
  66. package/lib/feature/placeholder/index.d.ts +10 -0
  67. package/lib/feature/placeholder/index.d.ts.map +1 -0
  68. package/lib/feature/shared.d.ts +3 -0
  69. package/lib/feature/shared.d.ts.map +1 -0
  70. package/lib/feature/toolbar/component.d.ts +13 -0
  71. package/lib/feature/toolbar/component.d.ts.map +1 -0
  72. package/lib/feature/toolbar/consts.d.ts +5 -0
  73. package/lib/feature/toolbar/consts.d.ts.map +1 -0
  74. package/lib/feature/toolbar/index.d.ts +3 -0
  75. package/lib/feature/toolbar/index.d.ts.map +1 -0
  76. package/lib/forth-ua2bRd8T.js +60 -0
  77. package/lib/fortran-WnF7znuN.js +443 -0
  78. package/lib/gas-wowve1o7.js +183 -0
  79. package/lib/gherkin-m7GIChu3.js +34 -0
  80. package/lib/go-th443Dhb.js +158 -0
  81. package/lib/groovy-tR4RiZnc.js +161 -0
  82. package/lib/haskell-jxVBofv5.js +375 -0
  83. package/lib/haxe-kWPI2tq3.js +390 -0
  84. package/lib/hooks-82sqkbtE.js +21 -0
  85. package/lib/http-3GIFWUlG.js +45 -0
  86. package/lib/icons-HYkfuR-O.js +50 -0
  87. package/lib/idl-PvpMZg-l.js +947 -0
  88. package/lib/index-0RbcZMbq.js +8 -0
  89. package/lib/index-4afXjFMY.js +517 -0
  90. package/lib/index-7MeyepDG.js +78 -0
  91. package/lib/index-7QgQq3x3.js +551 -0
  92. package/lib/index-7pgP6qYs.js +107 -0
  93. package/lib/index-8DvtgRVa.js +19511 -0
  94. package/lib/index-8Gg-jEP4.js +288 -0
  95. package/lib/index-8S8qcncB.js +507 -0
  96. package/lib/index-9A_GmGh4.js +1039 -0
  97. package/lib/index-EJJfYLzA.js +928 -0
  98. package/lib/index-Eg39w5kL.js +984 -0
  99. package/lib/index-FIk_7oPb.js +168 -0
  100. package/lib/index-LlbrXb_n.js +368 -0
  101. package/lib/index-MovKtgMG.js +121 -0
  102. package/lib/index-N9GtIS4X.js +64 -0
  103. package/lib/index-Pwn25-kf.js +8 -0
  104. package/lib/index-SdFSDosa.js +1295 -0
  105. package/lib/index-W5Th22-Z.js +1744 -0
  106. package/lib/index-XiXSFLmI.js +20975 -0
  107. package/lib/index-bknOViGv.js +47 -0
  108. package/lib/index-bkuIUPFS.js +275 -0
  109. package/lib/index-jPA8J9Eo.js +8 -0
  110. package/lib/index-lsG76a9s.js +552 -0
  111. package/lib/index-oTRzPo3B.js +146 -0
  112. package/lib/index-rrf6_6DC.js +317 -0
  113. package/lib/index-vJbZIHYF.js +81 -0
  114. package/lib/index-vPRh55CO.js +137 -0
  115. package/lib/index-vxy63hib.js +323 -0
  116. package/lib/index-wn1_LgCS.js +99 -0
  117. package/lib/index-xHADmDT3.js +12 -0
  118. package/lib/index-yt2EpMtv.js +141 -0
  119. package/lib/index.d.ts +4 -0
  120. package/lib/index.d.ts.map +1 -0
  121. package/lib/index.es.js +7 -0
  122. package/lib/javascript-8ZHqHagw.js +758 -0
  123. package/lib/jinja2-vsOFe0qD.js +154 -0
  124. package/lib/julia-dlp_pbN1.js +241 -0
  125. package/lib/livescript-Gf5R-LT6.js +273 -0
  126. package/lib/lua-c5Y_JsBp.js +221 -0
  127. package/lib/mathematica-iiGTGmUs.js +35 -0
  128. package/lib/mbox-ZJh86H8B.js +78 -0
  129. package/lib/meta-tAGyVRPE.js +511 -0
  130. package/lib/mirc-i0qkCa0y.js +73 -0
  131. package/lib/mllike-Dy551fZW.js +275 -0
  132. package/lib/modelica-n6tGqUT9.js +94 -0
  133. package/lib/mscgen-aKSbB7D9.js +104 -0
  134. package/lib/mumps-lNiKA6sp.js +25 -0
  135. package/lib/nginx--YmuCfDj.js +93 -0
  136. package/lib/nsis-zhS8iA09.js +62 -0
  137. package/lib/ntriples-E3jQl3MC.js +79 -0
  138. package/lib/octave-EQvkGIeG.js +144 -0
  139. package/lib/oz-W2cpqFf6.js +152 -0
  140. package/lib/pascal-lCh6ouNZ.js +79 -0
  141. package/lib/perl-PxEQBX0B.js +915 -0
  142. package/lib/pig-Y_bNcrzS.js +56 -0
  143. package/lib/powershell-GaQP-TZr.js +249 -0
  144. package/lib/properties-mbRyn54L.js +26 -0
  145. package/lib/prosemirror-noTDkx-k.js +4 -0
  146. package/lib/protobuf-8CJideyJ.js +49 -0
  147. package/lib/puppet-ABBaChNZ.js +45 -0
  148. package/lib/python-sKdHg3Ka.js +321 -0
  149. package/lib/q-_1yG40Nm.js +89 -0
  150. package/lib/r-Ziz56bHT.js +108 -0
  151. package/lib/rpm-ORjGOHaQ.js +57 -0
  152. package/lib/ruby-jlbYq0dT.js +233 -0
  153. package/lib/sas-2n7xeUuO.js +107 -0
  154. package/lib/schema-tKk3m1fu.js +62 -0
  155. package/lib/scheme-XCs-NPeU.js +126 -0
  156. package/lib/shell-0_1Um7Dq.js +184 -0
  157. package/lib/sieve-7uyJD1x1.js +73 -0
  158. package/lib/simple-mode--HIzBxba.js +95 -0
  159. package/lib/smalltalk-PEFzrlQ-.js +48 -0
  160. package/lib/solr-BLBaHahN.js +41 -0
  161. package/lib/sparql-4F9ZWf1b.js +204 -0
  162. package/lib/spreadsheet-SGSo6blj.js +49 -0
  163. package/lib/sql-tebLBzN0.js +291 -0
  164. package/lib/stex-SFJcFGOO.js +130 -0
  165. package/lib/stylus-rwwWYWFm.js +256 -0
  166. package/lib/swift-eorJ0tCv.js +238 -0
  167. package/lib/tcl-IwXMB8U4.js +82 -0
  168. package/lib/textile-ok2VyjwC.js +299 -0
  169. package/lib/theme/classic/index.d.ts +3 -0
  170. package/lib/theme/classic/index.d.ts.map +1 -0
  171. package/lib/theme/classic-dark/index.d.ts +3 -0
  172. package/lib/theme/classic-dark/index.d.ts.map +1 -0
  173. package/lib/theme/headless/index.d.ts +3 -0
  174. package/lib/theme/headless/index.d.ts.map +1 -0
  175. package/lib/theme/index.d.ts +8 -0
  176. package/lib/theme/index.d.ts.map +1 -0
  177. package/lib/theme/shared.d.ts +3 -0
  178. package/lib/theme/shared.d.ts.map +1 -0
  179. package/lib/tiddlywiki-DLhz8_pc.js +156 -0
  180. package/lib/tiki-DFAqFElY.js +183 -0
  181. package/lib/tippy.esm-MZ2vxByW.js +1813 -0
  182. package/lib/toml-ryxpTZEV.js +49 -0
  183. package/lib/tooltip-plugin-gcwyQdiT.js +119 -0
  184. package/lib/troff-ZzZyvNct.js +36 -0
  185. package/lib/ttcn-6gvkqqpW.js +136 -0
  186. package/lib/ttcn-cfg-oSu-Dq5C.js +98 -0
  187. package/lib/turtle-10ofr5au.js +87 -0
  188. package/lib/use-css-light-dom-EKWZDmbJ.js +82 -0
  189. package/lib/utils/index.d.ts +4 -0
  190. package/lib/utils/index.d.ts.map +1 -0
  191. package/lib/vb-a6n6fzrD.js +74 -0
  192. package/lib/vbscript-dgvo8jPt.js +324 -0
  193. package/lib/velocity-CBncCrwO.js +97 -0
  194. package/lib/verilog-KlcACt6C.js +271 -0
  195. package/lib/vhdl-NMd7Gf35.js +117 -0
  196. package/lib/webidl-z1UE5DN_.js +160 -0
  197. package/lib/xquery-hDt5jWTp.js +431 -0
  198. package/lib/yacas-ftgh_qwr.js +74 -0
  199. package/lib/yaml-DnNTfjXK.js +53 -0
  200. package/lib/z80-dA1PqWe1.js +62 -0
  201. package/package.json +87 -0
  202. package/src/core/crepe.ts +98 -0
  203. package/src/core/index.ts +4 -0
  204. package/src/core/slice.ts +44 -0
  205. package/src/feature/block-edit/handle/component.ts +68 -0
  206. package/src/feature/block-edit/handle/index.ts +81 -0
  207. package/src/feature/block-edit/index.ts +17 -0
  208. package/src/feature/block-edit/menu/component.ts +210 -0
  209. package/src/feature/block-edit/menu/config.ts +335 -0
  210. package/src/feature/block-edit/menu/icons.ts +171 -0
  211. package/src/feature/block-edit/menu/index.ts +113 -0
  212. package/src/feature/block-edit/style.css +126 -0
  213. package/src/feature/code-mirror/index.ts +60 -0
  214. package/src/feature/code-mirror/style.css +159 -0
  215. package/src/feature/gap-cursor/index.ts +31 -0
  216. package/src/feature/image-block/index.ts +59 -0
  217. package/src/feature/image-block/style.css +215 -0
  218. package/src/feature/index.ts +66 -0
  219. package/src/feature/link-tooltip/consts.ts +47 -0
  220. package/src/feature/link-tooltip/index.ts +22 -0
  221. package/src/feature/link-tooltip/style.css +107 -0
  222. package/src/feature/list-item/consts.ts +15 -0
  223. package/src/feature/list-item/index.ts +30 -0
  224. package/src/feature/list-item/style.css +23 -0
  225. package/src/feature/placeholder/index.ts +87 -0
  226. package/src/feature/placeholder/style.css +9 -0
  227. package/src/feature/shared.ts +4 -0
  228. package/src/feature/toolbar/component.ts +101 -0
  229. package/src/feature/toolbar/consts.ts +26 -0
  230. package/src/feature/toolbar/index.ts +92 -0
  231. package/src/feature/toolbar/style.css +37 -0
  232. package/src/index.ts +5 -0
  233. package/src/theme/classic/index.ts +12 -0
  234. package/src/theme/classic/style.css +192 -0
  235. package/src/theme/classic-dark/index.ts +12 -0
  236. package/src/theme/classic-dark/style.css +197 -0
  237. package/src/theme/headless/index.ts +9 -0
  238. package/src/theme/index.ts +26 -0
  239. package/src/theme/shared.ts +4 -0
  240. package/src/utils/index.ts +12 -0
  241. package/src/vite-env.d.ts +2 -0
@@ -0,0 +1,984 @@
1
+ import { C as be, E as k, L as Pe } from "./index-SdFSDosa.js";
2
+ import { s as xe, t as h, p as Te, L as Ve, b as we, f as ye, F as ve, a as Xe, H as ke, e as K, E as $e } from "./index-8DvtgRVa.js";
3
+ import { cssLanguage as J, css as _e } from "./index-EJJfYLzA.js";
4
+ import { typescriptLanguage as qe, jsxLanguage as Ce, tsxLanguage as Ae, javascriptLanguage as M, javascript as Qe } from "./index-lsG76a9s.js";
5
+ import "./meta-tAGyVRPE.js";
6
+ import "./icons-HYkfuR-O.js";
7
+ import "./index-XiXSFLmI.js";
8
+ import "./hooks-82sqkbtE.js";
9
+ import "./use-css-light-dom-EKWZDmbJ.js";
10
+ import "./clsx-7d8NmkQq.js";
11
+ const Ye = 54, Me = 1, Re = 55, Ee = 2, Ze = 56, Be = 3, W = 4, We = 5, v = 6, ee = 7, te = 8, ae = 9, le = 10, ze = 11, De = 12, Ne = 13, $ = 57, Ge = 14, z = 58, re = 20, je = 22, ne = 23, Ie = 24, Q = 26, se = 27, Ue = 28, Le = 31, Fe = 34, He = 36, Ke = 37, Je = 0, et = 1, tt = {
12
+ area: !0,
13
+ base: !0,
14
+ br: !0,
15
+ col: !0,
16
+ command: !0,
17
+ embed: !0,
18
+ frame: !0,
19
+ hr: !0,
20
+ img: !0,
21
+ input: !0,
22
+ keygen: !0,
23
+ link: !0,
24
+ meta: !0,
25
+ param: !0,
26
+ source: !0,
27
+ track: !0,
28
+ wbr: !0,
29
+ menuitem: !0
30
+ }, at = {
31
+ dd: !0,
32
+ li: !0,
33
+ optgroup: !0,
34
+ option: !0,
35
+ p: !0,
36
+ rp: !0,
37
+ rt: !0,
38
+ tbody: !0,
39
+ td: !0,
40
+ tfoot: !0,
41
+ th: !0,
42
+ tr: !0
43
+ }, D = {
44
+ dd: { dd: !0, dt: !0 },
45
+ dt: { dd: !0, dt: !0 },
46
+ li: { li: !0 },
47
+ option: { option: !0, optgroup: !0 },
48
+ optgroup: { optgroup: !0 },
49
+ p: {
50
+ address: !0,
51
+ article: !0,
52
+ aside: !0,
53
+ blockquote: !0,
54
+ dir: !0,
55
+ div: !0,
56
+ dl: !0,
57
+ fieldset: !0,
58
+ footer: !0,
59
+ form: !0,
60
+ h1: !0,
61
+ h2: !0,
62
+ h3: !0,
63
+ h4: !0,
64
+ h5: !0,
65
+ h6: !0,
66
+ header: !0,
67
+ hgroup: !0,
68
+ hr: !0,
69
+ menu: !0,
70
+ nav: !0,
71
+ ol: !0,
72
+ p: !0,
73
+ pre: !0,
74
+ section: !0,
75
+ table: !0,
76
+ ul: !0
77
+ },
78
+ rp: { rp: !0, rt: !0 },
79
+ rt: { rp: !0, rt: !0 },
80
+ tbody: { tbody: !0, tfoot: !0 },
81
+ td: { td: !0, th: !0 },
82
+ tfoot: { tbody: !0 },
83
+ th: { td: !0, th: !0 },
84
+ thead: { tbody: !0, tfoot: !0 },
85
+ tr: { tr: !0 }
86
+ };
87
+ function lt(e) {
88
+ return e == 45 || e == 46 || e == 58 || e >= 65 && e <= 90 || e == 95 || e >= 97 && e <= 122 || e >= 161;
89
+ }
90
+ function oe(e) {
91
+ return e == 9 || e == 10 || e == 13 || e == 32;
92
+ }
93
+ let N = null, G = null, j = 0;
94
+ function Y(e, a) {
95
+ let r = e.pos + a;
96
+ if (j == r && G == e)
97
+ return N;
98
+ let l = e.peek(a);
99
+ for (; oe(l); )
100
+ l = e.peek(++a);
101
+ let t = "";
102
+ for (; lt(l); )
103
+ t += String.fromCharCode(l), l = e.peek(++a);
104
+ return G = e, j = r, N = t ? t.toLowerCase() : l == rt || l == nt ? void 0 : null;
105
+ }
106
+ const ue = 60, X = 62, R = 47, rt = 63, nt = 33, st = 45;
107
+ function I(e, a) {
108
+ this.name = e, this.parent = a, this.hash = a ? a.hash : 0;
109
+ for (let r = 0; r < e.length; r++)
110
+ this.hash += (this.hash << 4) + e.charCodeAt(r) + (e.charCodeAt(r) << 8);
111
+ }
112
+ const ot = [v, le, ee, te, ae], ut = new be({
113
+ start: null,
114
+ shift(e, a, r, l) {
115
+ return ot.indexOf(a) > -1 ? new I(Y(l, 1) || "", e) : e;
116
+ },
117
+ reduce(e, a) {
118
+ return a == re && e ? e.parent : e;
119
+ },
120
+ reuse(e, a, r, l) {
121
+ let t = a.type.id;
122
+ return t == v || t == He ? new I(Y(l, 1) || "", e) : e;
123
+ },
124
+ hash(e) {
125
+ return e ? e.hash : 0;
126
+ },
127
+ strict: !1
128
+ }), it = new k((e, a) => {
129
+ if (e.next != ue) {
130
+ e.next < 0 && a.context && e.acceptToken($);
131
+ return;
132
+ }
133
+ e.advance();
134
+ let r = e.next == R;
135
+ r && e.advance();
136
+ let l = Y(e, 0);
137
+ if (l === void 0)
138
+ return;
139
+ if (!l)
140
+ return e.acceptToken(r ? Ge : v);
141
+ let t = a.context ? a.context.name : null;
142
+ if (r) {
143
+ if (l == t)
144
+ return e.acceptToken(ze);
145
+ if (t && at[t])
146
+ return e.acceptToken($, -2);
147
+ if (a.dialectEnabled(Je))
148
+ return e.acceptToken(De);
149
+ for (let s = a.context; s; s = s.parent)
150
+ if (s.name == l)
151
+ return;
152
+ e.acceptToken(Ne);
153
+ } else {
154
+ if (l == "script")
155
+ return e.acceptToken(ee);
156
+ if (l == "style")
157
+ return e.acceptToken(te);
158
+ if (l == "textarea")
159
+ return e.acceptToken(ae);
160
+ if (tt.hasOwnProperty(l))
161
+ return e.acceptToken(le);
162
+ t && D[t] && D[t][l] ? e.acceptToken($, -1) : e.acceptToken(v);
163
+ }
164
+ }, { contextual: !0 }), Ot = new k((e) => {
165
+ for (let a = 0, r = 0; ; r++) {
166
+ if (e.next < 0) {
167
+ r && e.acceptToken(z);
168
+ break;
169
+ }
170
+ if (e.next == st)
171
+ a++;
172
+ else if (e.next == X && a >= 2) {
173
+ r >= 3 && e.acceptToken(z, -2);
174
+ break;
175
+ } else
176
+ a = 0;
177
+ e.advance();
178
+ }
179
+ });
180
+ function ct(e) {
181
+ for (; e; e = e.parent)
182
+ if (e.name == "svg" || e.name == "math")
183
+ return !0;
184
+ return !1;
185
+ }
186
+ const dt = new k((e, a) => {
187
+ if (e.next == R && e.peek(1) == X) {
188
+ let r = a.dialectEnabled(et) || ct(a.context);
189
+ e.acceptToken(r ? We : W, 2);
190
+ } else
191
+ e.next == X && e.acceptToken(W, 1);
192
+ });
193
+ function E(e, a, r) {
194
+ let l = 2 + e.length;
195
+ return new k((t) => {
196
+ for (let s = 0, o = 0, u = 0; ; u++) {
197
+ if (t.next < 0) {
198
+ u && t.acceptToken(a);
199
+ break;
200
+ }
201
+ if (s == 0 && t.next == ue || s == 1 && t.next == R || s >= 2 && s < l && t.next == e.charCodeAt(s - 2))
202
+ s++, o++;
203
+ else if ((s == 2 || s == l) && oe(t.next))
204
+ o++;
205
+ else if (s == l && t.next == X) {
206
+ u > o ? t.acceptToken(a, -o) : t.acceptToken(r, -(o - 2));
207
+ break;
208
+ } else if ((t.next == 10 || t.next == 13) && u) {
209
+ t.acceptToken(a, 1);
210
+ break;
211
+ } else
212
+ s = o = 0;
213
+ t.advance();
214
+ }
215
+ });
216
+ }
217
+ const pt = E("script", Ye, Me), mt = E("style", Re, Ee), ft = E("textarea", Ze, Be), St = xe({
218
+ "Text RawText": h.content,
219
+ "StartTag StartCloseTag SelfClosingEndTag EndTag": h.angleBracket,
220
+ TagName: h.tagName,
221
+ "MismatchedCloseTag/TagName": [h.tagName, h.invalid],
222
+ AttributeName: h.attributeName,
223
+ "AttributeValue UnquotedAttributeValue": h.attributeValue,
224
+ Is: h.definitionOperator,
225
+ "EntityReference CharacterReference": h.character,
226
+ Comment: h.blockComment,
227
+ ProcessingInst: h.processingInstruction,
228
+ DoctypeDecl: h.documentMeta
229
+ }), gt = Pe.deserialize({
230
+ version: 14,
231
+ states: ",xOVO!rOOO!WQ#tO'#CqO!]Q#tO'#CzO!bQ#tO'#C}O!gQ#tO'#DQO!lQ#tO'#DSO!qOaO'#CpO!|ObO'#CpO#XOdO'#CpO$eO!rO'#CpOOO`'#Cp'#CpO$lO$fO'#DTO$tQ#tO'#DVO$yQ#tO'#DWOOO`'#Dk'#DkOOO`'#DY'#DYQVO!rOOO%OQ&rO,59]O%WQ&rO,59fO%`Q&rO,59iO%hQ&rO,59lO%sQ&rO,59nOOOa'#D^'#D^O%{OaO'#CxO&WOaO,59[OOOb'#D_'#D_O&`ObO'#C{O&kObO,59[OOOd'#D`'#D`O&sOdO'#DOO'OOdO,59[OOO`'#Da'#DaO'WO!rO,59[O'_Q#tO'#DROOO`,59[,59[OOOp'#Db'#DbO'dO$fO,59oOOO`,59o,59oO'lQ#|O,59qO'qQ#|O,59rOOO`-E7W-E7WO'vQ&rO'#CsOOQW'#DZ'#DZO(UQ&rO1G.wOOOa1G.w1G.wO(^Q&rO1G/QOOOb1G/Q1G/QO(fQ&rO1G/TOOOd1G/T1G/TO(nQ&rO1G/WOOO`1G/W1G/WOOO`1G/Y1G/YO(yQ&rO1G/YOOOa-E7[-E7[O)RQ#tO'#CyOOO`1G.v1G.vOOOb-E7]-E7]O)WQ#tO'#C|OOOd-E7^-E7^O)]Q#tO'#DPOOO`-E7_-E7_O)bQ#|O,59mOOOp-E7`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$O$U$l$r$x%O%U%[%bPPPPPPPP%hX^OX`pXUOX`pezabcde{}!P!R!UR!q!dRhUR!XhXVOX`pRkVR!XkXWOX`pRnWR!XnXXOX`pQrXR!XpXYOX`pQ`ORx`Q{aQ}bQ!PcQ!RdQ!UeZ!e{}!P!R!UQ!v!oR!z!vQ!y!pR!|!yQgUR!VgQjVR!YjQmWR![mQpXR!^pQtZR!`tS_O`ToXp",
234
+ nodeNames: "⚠ StartCloseTag StartCloseTag StartCloseTag EndTag SelfClosingEndTag StartTag StartTag StartTag StartTag StartTag StartCloseTag StartCloseTag StartCloseTag IncompleteCloseTag Document Text EntityReference CharacterReference InvalidEntity Element OpenTag TagName Attribute AttributeName Is AttributeValue UnquotedAttributeValue ScriptText CloseTag OpenTag StyleText CloseTag OpenTag TextareaText CloseTag OpenTag CloseTag SelfClosingTag Comment ProcessingInst MismatchedCloseTag CloseTag DoctypeDecl",
235
+ maxTerm: 67,
236
+ context: ut,
237
+ nodeProps: [
238
+ ["closedBy", -10, 1, 2, 3, 7, 8, 9, 10, 11, 12, 13, "EndTag", 6, "EndTag SelfClosingEndTag", -4, 21, 30, 33, 36, "CloseTag"],
239
+ ["openedBy", 4, "StartTag StartCloseTag", 5, "StartTag", -4, 29, 32, 35, 37, "OpenTag"],
240
+ ["group", -9, 14, 17, 18, 19, 20, 39, 40, 41, 42, "Entity", 16, "Entity TextContent", -3, 28, 31, 34, "TextContent Entity"]
241
+ ],
242
+ propSources: [St],
243
+ skippedNodes: [0],
244
+ repeatNodeCount: 9,
245
+ tokenData: "!<p!aR!YOX$qXY,QYZ,QZ[$q[]&X]^,Q^p$qpq,Qqr-_rs3_sv-_vw3}wxHYx}-_}!OH{!O!P-_!P!Q$q!Q![-_![!]Mz!]!^-_!^!_!$S!_!`!;x!`!a&X!a!c-_!c!}Mz!}#R-_#R#SMz#S#T1k#T#oMz#o#s-_#s$f$q$f%W-_%W%oMz%o%p-_%p&aMz&a&b-_&b1pMz1p4U-_4U4dMz4d4e-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vrs(Vsv*Vwx)ex;'S*V;'S;=`*s<%lO*V!R!;uP;=`<%l!4t!V!<TXiS`P!a`!cpOr&Xrs&}sv&Xwx(tx!^&X!^!_*V!_;'S&X;'S;=`*y<%lO&X",
246
+ tokenizers: [pt, mt, ft, dt, it, Ot, 0, 1, 2, 3, 4, 5],
247
+ topRules: { Document: [0, 15] },
248
+ dialects: { noMatch: 0, selfClosing: 485 },
249
+ tokenPrec: 487
250
+ });
251
+ function ie(e, a) {
252
+ let r = /* @__PURE__ */ Object.create(null);
253
+ for (let l of e.getChildren(ne)) {
254
+ let t = l.getChild(Ie), s = l.getChild(Q) || l.getChild(se);
255
+ t && (r[a.read(t.from, t.to)] = s ? s.type.id == Q ? a.read(s.from + 1, s.to - 1) : a.read(s.from, s.to) : "");
256
+ }
257
+ return r;
258
+ }
259
+ function U(e, a) {
260
+ let r = e.getChild(je);
261
+ return r ? a.read(r.from, r.to) : " ";
262
+ }
263
+ function _(e, a, r) {
264
+ let l;
265
+ for (let t of r)
266
+ if (!t.attrs || t.attrs(l || (l = ie(e.node.parent.firstChild, a))))
267
+ return { parser: t.parser };
268
+ return null;
269
+ }
270
+ function Oe(e = [], a = []) {
271
+ let r = [], l = [], t = [], s = [];
272
+ for (let u of e)
273
+ (u.tag == "script" ? r : u.tag == "style" ? l : u.tag == "textarea" ? t : s).push(u);
274
+ let o = a.length ? /* @__PURE__ */ Object.create(null) : null;
275
+ for (let u of a)
276
+ (o[u.name] || (o[u.name] = [])).push(u);
277
+ return Te((u, i) => {
278
+ let f = u.type.id;
279
+ if (f == Ue)
280
+ return _(u, i, r);
281
+ if (f == Le)
282
+ return _(u, i, l);
283
+ if (f == Fe)
284
+ return _(u, i, t);
285
+ if (f == re && s.length) {
286
+ let p = u.node, d = p.firstChild, m = d && U(d, i), c;
287
+ if (m) {
288
+ for (let O of s)
289
+ if (O.tag == m && (!O.attrs || O.attrs(c || (c = ie(p, i))))) {
290
+ let g = p.lastChild, b = g.type.id == Ke ? g.from : p.to;
291
+ if (b > d.to)
292
+ return { parser: O.parser, overlay: [{ from: d.to, to: b }] };
293
+ }
294
+ }
295
+ }
296
+ if (o && f == ne) {
297
+ let p = u.node, d;
298
+ if (d = p.firstChild) {
299
+ let m = o[i.read(d.from, d.to)];
300
+ if (m)
301
+ for (let c of m) {
302
+ if (c.tagName && c.tagName != U(p.parent, i))
303
+ continue;
304
+ let O = p.lastChild;
305
+ if (O.type.id == Q) {
306
+ let g = O.from + 1, b = O.lastChild, P = O.to - (b && b.isError ? 0 : 1);
307
+ if (P > g)
308
+ return { parser: c.parser, overlay: [{ from: g, to: P }] };
309
+ } else if (O.type.id == se)
310
+ return { parser: c.parser, overlay: [{ from: O.from, to: O.to }] };
311
+ }
312
+ }
313
+ }
314
+ return null;
315
+ });
316
+ }
317
+ const V = ["_blank", "_self", "_top", "_parent"], q = ["ascii", "utf-8", "utf-16", "latin1", "latin1"], C = ["get", "post", "put", "delete"], A = ["application/x-www-form-urlencoded", "multipart/form-data", "text/plain"], S = ["true", "false"], n = {}, ht = {
318
+ a: {
319
+ attrs: {
320
+ href: null,
321
+ ping: null,
322
+ type: null,
323
+ media: null,
324
+ target: V,
325
+ hreflang: null
326
+ }
327
+ },
328
+ abbr: n,
329
+ address: n,
330
+ area: {
331
+ attrs: {
332
+ alt: null,
333
+ coords: null,
334
+ href: null,
335
+ target: null,
336
+ ping: null,
337
+ media: null,
338
+ hreflang: null,
339
+ type: null,
340
+ shape: ["default", "rect", "circle", "poly"]
341
+ }
342
+ },
343
+ article: n,
344
+ aside: n,
345
+ audio: {
346
+ attrs: {
347
+ src: null,
348
+ mediagroup: null,
349
+ crossorigin: ["anonymous", "use-credentials"],
350
+ preload: ["none", "metadata", "auto"],
351
+ autoplay: ["autoplay"],
352
+ loop: ["loop"],
353
+ controls: ["controls"]
354
+ }
355
+ },
356
+ b: n,
357
+ base: { attrs: { href: null, target: V } },
358
+ bdi: n,
359
+ bdo: n,
360
+ blockquote: { attrs: { cite: null } },
361
+ body: n,
362
+ br: n,
363
+ button: {
364
+ attrs: {
365
+ form: null,
366
+ formaction: null,
367
+ name: null,
368
+ value: null,
369
+ autofocus: ["autofocus"],
370
+ disabled: ["autofocus"],
371
+ formenctype: A,
372
+ formmethod: C,
373
+ formnovalidate: ["novalidate"],
374
+ formtarget: V,
375
+ type: ["submit", "reset", "button"]
376
+ }
377
+ },
378
+ canvas: { attrs: { width: null, height: null } },
379
+ caption: n,
380
+ center: n,
381
+ cite: n,
382
+ code: n,
383
+ col: { attrs: { span: null } },
384
+ colgroup: { attrs: { span: null } },
385
+ command: {
386
+ attrs: {
387
+ type: ["command", "checkbox", "radio"],
388
+ label: null,
389
+ icon: null,
390
+ radiogroup: null,
391
+ command: null,
392
+ title: null,
393
+ disabled: ["disabled"],
394
+ checked: ["checked"]
395
+ }
396
+ },
397
+ data: { attrs: { value: null } },
398
+ datagrid: { attrs: { disabled: ["disabled"], multiple: ["multiple"] } },
399
+ datalist: { attrs: { data: null } },
400
+ dd: n,
401
+ del: { attrs: { cite: null, datetime: null } },
402
+ details: { attrs: { open: ["open"] } },
403
+ dfn: n,
404
+ div: n,
405
+ dl: n,
406
+ dt: n,
407
+ em: n,
408
+ embed: { attrs: { src: null, type: null, width: null, height: null } },
409
+ eventsource: { attrs: { src: null } },
410
+ fieldset: { attrs: { disabled: ["disabled"], form: null, name: null } },
411
+ figcaption: n,
412
+ figure: n,
413
+ footer: n,
414
+ form: {
415
+ attrs: {
416
+ action: null,
417
+ name: null,
418
+ "accept-charset": q,
419
+ autocomplete: ["on", "off"],
420
+ enctype: A,
421
+ method: C,
422
+ novalidate: ["novalidate"],
423
+ target: V
424
+ }
425
+ },
426
+ h1: n,
427
+ h2: n,
428
+ h3: n,
429
+ h4: n,
430
+ h5: n,
431
+ h6: n,
432
+ head: {
433
+ children: ["title", "base", "link", "style", "meta", "script", "noscript", "command"]
434
+ },
435
+ header: n,
436
+ hgroup: n,
437
+ hr: n,
438
+ html: {
439
+ attrs: { manifest: null }
440
+ },
441
+ i: n,
442
+ iframe: {
443
+ attrs: {
444
+ src: null,
445
+ srcdoc: null,
446
+ name: null,
447
+ width: null,
448
+ height: null,
449
+ sandbox: ["allow-top-navigation", "allow-same-origin", "allow-forms", "allow-scripts"],
450
+ seamless: ["seamless"]
451
+ }
452
+ },
453
+ img: {
454
+ attrs: {
455
+ alt: null,
456
+ src: null,
457
+ ismap: null,
458
+ usemap: null,
459
+ width: null,
460
+ height: null,
461
+ crossorigin: ["anonymous", "use-credentials"]
462
+ }
463
+ },
464
+ input: {
465
+ attrs: {
466
+ alt: null,
467
+ dirname: null,
468
+ form: null,
469
+ formaction: null,
470
+ height: null,
471
+ list: null,
472
+ max: null,
473
+ maxlength: null,
474
+ min: null,
475
+ name: null,
476
+ pattern: null,
477
+ placeholder: null,
478
+ size: null,
479
+ src: null,
480
+ step: null,
481
+ value: null,
482
+ width: null,
483
+ accept: ["audio/*", "video/*", "image/*"],
484
+ autocomplete: ["on", "off"],
485
+ autofocus: ["autofocus"],
486
+ checked: ["checked"],
487
+ disabled: ["disabled"],
488
+ formenctype: A,
489
+ formmethod: C,
490
+ formnovalidate: ["novalidate"],
491
+ formtarget: V,
492
+ multiple: ["multiple"],
493
+ readonly: ["readonly"],
494
+ required: ["required"],
495
+ type: [
496
+ "hidden",
497
+ "text",
498
+ "search",
499
+ "tel",
500
+ "url",
501
+ "email",
502
+ "password",
503
+ "datetime",
504
+ "date",
505
+ "month",
506
+ "week",
507
+ "time",
508
+ "datetime-local",
509
+ "number",
510
+ "range",
511
+ "color",
512
+ "checkbox",
513
+ "radio",
514
+ "file",
515
+ "submit",
516
+ "image",
517
+ "reset",
518
+ "button"
519
+ ]
520
+ }
521
+ },
522
+ ins: { attrs: { cite: null, datetime: null } },
523
+ kbd: n,
524
+ keygen: {
525
+ attrs: {
526
+ challenge: null,
527
+ form: null,
528
+ name: null,
529
+ autofocus: ["autofocus"],
530
+ disabled: ["disabled"],
531
+ keytype: ["RSA"]
532
+ }
533
+ },
534
+ label: { attrs: { for: null, form: null } },
535
+ legend: n,
536
+ li: { attrs: { value: null } },
537
+ link: {
538
+ attrs: {
539
+ href: null,
540
+ type: null,
541
+ hreflang: null,
542
+ media: null,
543
+ sizes: ["all", "16x16", "16x16 32x32", "16x16 32x32 64x64"]
544
+ }
545
+ },
546
+ map: { attrs: { name: null } },
547
+ mark: n,
548
+ menu: { attrs: { label: null, type: ["list", "context", "toolbar"] } },
549
+ meta: {
550
+ attrs: {
551
+ content: null,
552
+ charset: q,
553
+ name: ["viewport", "application-name", "author", "description", "generator", "keywords"],
554
+ "http-equiv": ["content-language", "content-type", "default-style", "refresh"]
555
+ }
556
+ },
557
+ meter: { attrs: { value: null, min: null, low: null, high: null, max: null, optimum: null } },
558
+ nav: n,
559
+ noscript: n,
560
+ object: {
561
+ attrs: {
562
+ data: null,
563
+ type: null,
564
+ name: null,
565
+ usemap: null,
566
+ form: null,
567
+ width: null,
568
+ height: null,
569
+ typemustmatch: ["typemustmatch"]
570
+ }
571
+ },
572
+ ol: {
573
+ attrs: { reversed: ["reversed"], start: null, type: ["1", "a", "A", "i", "I"] },
574
+ children: ["li", "script", "template", "ul", "ol"]
575
+ },
576
+ optgroup: { attrs: { disabled: ["disabled"], label: null } },
577
+ option: { attrs: { disabled: ["disabled"], label: null, selected: ["selected"], value: null } },
578
+ output: { attrs: { for: null, form: null, name: null } },
579
+ p: n,
580
+ param: { attrs: { name: null, value: null } },
581
+ pre: n,
582
+ progress: { attrs: { value: null, max: null } },
583
+ q: { attrs: { cite: null } },
584
+ rp: n,
585
+ rt: n,
586
+ ruby: n,
587
+ samp: n,
588
+ script: {
589
+ attrs: {
590
+ type: ["text/javascript"],
591
+ src: null,
592
+ async: ["async"],
593
+ defer: ["defer"],
594
+ charset: q
595
+ }
596
+ },
597
+ section: n,
598
+ select: {
599
+ attrs: {
600
+ form: null,
601
+ name: null,
602
+ size: null,
603
+ autofocus: ["autofocus"],
604
+ disabled: ["disabled"],
605
+ multiple: ["multiple"]
606
+ }
607
+ },
608
+ slot: { attrs: { name: null } },
609
+ small: n,
610
+ source: { attrs: { src: null, type: null, media: null } },
611
+ span: n,
612
+ strong: n,
613
+ style: {
614
+ attrs: {
615
+ type: ["text/css"],
616
+ media: null,
617
+ scoped: null
618
+ }
619
+ },
620
+ sub: n,
621
+ summary: n,
622
+ sup: n,
623
+ table: n,
624
+ tbody: n,
625
+ td: { attrs: { colspan: null, rowspan: null, headers: null } },
626
+ template: n,
627
+ textarea: {
628
+ attrs: {
629
+ dirname: null,
630
+ form: null,
631
+ maxlength: null,
632
+ name: null,
633
+ placeholder: null,
634
+ rows: null,
635
+ cols: null,
636
+ autofocus: ["autofocus"],
637
+ disabled: ["disabled"],
638
+ readonly: ["readonly"],
639
+ required: ["required"],
640
+ wrap: ["soft", "hard"]
641
+ }
642
+ },
643
+ tfoot: n,
644
+ th: { attrs: { colspan: null, rowspan: null, headers: null, scope: ["row", "col", "rowgroup", "colgroup"] } },
645
+ thead: n,
646
+ time: { attrs: { datetime: null } },
647
+ title: n,
648
+ tr: n,
649
+ track: {
650
+ attrs: {
651
+ src: null,
652
+ label: null,
653
+ default: null,
654
+ kind: ["subtitles", "captions", "descriptions", "chapters", "metadata"],
655
+ srclang: null
656
+ }
657
+ },
658
+ ul: { children: ["li", "script", "template", "ul", "ol"] },
659
+ var: n,
660
+ video: {
661
+ attrs: {
662
+ src: null,
663
+ poster: null,
664
+ width: null,
665
+ height: null,
666
+ crossorigin: ["anonymous", "use-credentials"],
667
+ preload: ["auto", "metadata", "none"],
668
+ autoplay: ["autoplay"],
669
+ mediagroup: ["movie"],
670
+ muted: ["muted"],
671
+ controls: ["controls"]
672
+ }
673
+ },
674
+ wbr: n
675
+ }, ce = {
676
+ accesskey: null,
677
+ class: null,
678
+ contenteditable: S,
679
+ contextmenu: null,
680
+ dir: ["ltr", "rtl", "auto"],
681
+ draggable: ["true", "false", "auto"],
682
+ dropzone: ["copy", "move", "link", "string:", "file:"],
683
+ hidden: ["hidden"],
684
+ id: null,
685
+ inert: ["inert"],
686
+ itemid: null,
687
+ itemprop: null,
688
+ itemref: null,
689
+ itemscope: ["itemscope"],
690
+ itemtype: null,
691
+ lang: ["ar", "bn", "de", "en-GB", "en-US", "es", "fr", "hi", "id", "ja", "pa", "pt", "ru", "tr", "zh"],
692
+ spellcheck: S,
693
+ autocorrect: S,
694
+ autocapitalize: S,
695
+ style: null,
696
+ tabindex: null,
697
+ title: null,
698
+ translate: ["yes", "no"],
699
+ rel: ["stylesheet", "alternate", "author", "bookmark", "help", "license", "next", "nofollow", "noreferrer", "prefetch", "prev", "search", "tag"],
700
+ role: /* @__PURE__ */ "alert application article banner button cell checkbox complementary contentinfo dialog document feed figure form grid gridcell heading img list listbox listitem main navigation region row rowgroup search switch tab table tabpanel textbox timer".split(" "),
701
+ "aria-activedescendant": null,
702
+ "aria-atomic": S,
703
+ "aria-autocomplete": ["inline", "list", "both", "none"],
704
+ "aria-busy": S,
705
+ "aria-checked": ["true", "false", "mixed", "undefined"],
706
+ "aria-controls": null,
707
+ "aria-describedby": null,
708
+ "aria-disabled": S,
709
+ "aria-dropeffect": null,
710
+ "aria-expanded": ["true", "false", "undefined"],
711
+ "aria-flowto": null,
712
+ "aria-grabbed": ["true", "false", "undefined"],
713
+ "aria-haspopup": S,
714
+ "aria-hidden": S,
715
+ "aria-invalid": ["true", "false", "grammar", "spelling"],
716
+ "aria-label": null,
717
+ "aria-labelledby": null,
718
+ "aria-level": null,
719
+ "aria-live": ["off", "polite", "assertive"],
720
+ "aria-multiline": S,
721
+ "aria-multiselectable": S,
722
+ "aria-owns": null,
723
+ "aria-posinset": null,
724
+ "aria-pressed": ["true", "false", "mixed", "undefined"],
725
+ "aria-readonly": S,
726
+ "aria-relevant": null,
727
+ "aria-required": S,
728
+ "aria-selected": ["true", "false", "undefined"],
729
+ "aria-setsize": null,
730
+ "aria-sort": ["ascending", "descending", "none", "other"],
731
+ "aria-valuemax": null,
732
+ "aria-valuemin": null,
733
+ "aria-valuenow": null,
734
+ "aria-valuetext": null
735
+ }, de = /* @__PURE__ */ "beforeunload copy cut dragstart dragover dragleave dragenter dragend drag paste focus blur change click load mousedown mouseenter mouseleave mouseup keydown keyup resize scroll unload".split(" ").map((e) => "on" + e);
736
+ for (let e of de)
737
+ ce[e] = null;
738
+ class w {
739
+ constructor(a, r) {
740
+ this.tags = Object.assign(Object.assign({}, ht), a), this.globalAttrs = Object.assign(Object.assign({}, ce), r), this.allTags = Object.keys(this.tags), this.globalAttrNames = Object.keys(this.globalAttrs);
741
+ }
742
+ }
743
+ w.default = /* @__PURE__ */ new w();
744
+ function x(e, a, r = e.length) {
745
+ if (!a)
746
+ return "";
747
+ let l = a.firstChild, t = l && l.getChild("TagName");
748
+ return t ? e.sliceString(t.from, Math.min(t.to, r)) : "";
749
+ }
750
+ function T(e, a = !1) {
751
+ for (; e; e = e.parent)
752
+ if (e.name == "Element")
753
+ if (a)
754
+ a = !1;
755
+ else
756
+ return e;
757
+ return null;
758
+ }
759
+ function pe(e, a, r) {
760
+ let l = r.tags[x(e, T(a))];
761
+ return (l == null ? void 0 : l.children) || r.allTags;
762
+ }
763
+ function Z(e, a) {
764
+ let r = [];
765
+ for (let l = T(a); l && !l.type.isTop; l = T(l.parent)) {
766
+ let t = x(e, l);
767
+ if (t && l.lastChild.name == "CloseTag")
768
+ break;
769
+ t && r.indexOf(t) < 0 && (a.name == "EndTag" || a.from >= l.firstChild.to) && r.push(t);
770
+ }
771
+ return r;
772
+ }
773
+ const me = /^[:\-\.\w\u00b7-\uffff]*$/;
774
+ function L(e, a, r, l, t) {
775
+ let s = /\s*>/.test(e.sliceDoc(t, t + 5)) ? "" : ">", o = T(r, !0);
776
+ return {
777
+ from: l,
778
+ to: t,
779
+ options: pe(e.doc, o, a).map((u) => ({ label: u, type: "type" })).concat(Z(e.doc, r).map((u, i) => ({
780
+ label: "/" + u,
781
+ apply: "/" + u + s,
782
+ type: "type",
783
+ boost: 99 - i
784
+ }))),
785
+ validFor: /^\/?[:\-\.\w\u00b7-\uffff]*$/
786
+ };
787
+ }
788
+ function F(e, a, r, l) {
789
+ let t = /\s*>/.test(e.sliceDoc(l, l + 5)) ? "" : ">";
790
+ return {
791
+ from: r,
792
+ to: l,
793
+ options: Z(e.doc, a).map((s, o) => ({ label: s, apply: s + t, type: "type", boost: 99 - o })),
794
+ validFor: me
795
+ };
796
+ }
797
+ function bt(e, a, r, l) {
798
+ let t = [], s = 0;
799
+ for (let o of pe(e.doc, r, a))
800
+ t.push({ label: "<" + o, type: "type" });
801
+ for (let o of Z(e.doc, r))
802
+ t.push({ label: "</" + o + ">", type: "type", boost: 99 - s++ });
803
+ return { from: l, to: l, options: t, validFor: /^<\/?[:\-\.\w\u00b7-\uffff]*$/ };
804
+ }
805
+ function Pt(e, a, r, l, t) {
806
+ let s = T(r), o = s ? a.tags[x(e.doc, s)] : null, u = o && o.attrs ? Object.keys(o.attrs) : [], i = o && o.globalAttrs === !1 ? u : u.length ? u.concat(a.globalAttrNames) : a.globalAttrNames;
807
+ return {
808
+ from: l,
809
+ to: t,
810
+ options: i.map((f) => ({ label: f, type: "property" })),
811
+ validFor: me
812
+ };
813
+ }
814
+ function xt(e, a, r, l, t) {
815
+ var s;
816
+ let o = (s = r.parent) === null || s === void 0 ? void 0 : s.getChild("AttributeName"), u = [], i;
817
+ if (o) {
818
+ let f = e.sliceDoc(o.from, o.to), p = a.globalAttrs[f];
819
+ if (!p) {
820
+ let d = T(r), m = d ? a.tags[x(e.doc, d)] : null;
821
+ p = (m == null ? void 0 : m.attrs) && m.attrs[f];
822
+ }
823
+ if (p) {
824
+ let d = e.sliceDoc(l, t).toLowerCase(), m = '"', c = '"';
825
+ /^['"]/.test(d) ? (i = d[0] == '"' ? /^[^"]*$/ : /^[^']*$/, m = "", c = e.sliceDoc(t, t + 1) == d[0] ? "" : d[0], d = d.slice(1), l++) : i = /^[^\s<>='"]*$/;
826
+ for (let O of p)
827
+ u.push({ label: O, apply: m + O + c, type: "constant" });
828
+ }
829
+ }
830
+ return { from: l, to: t, options: u, validFor: i };
831
+ }
832
+ function fe(e, a) {
833
+ let { state: r, pos: l } = a, t = K(r).resolveInner(l, -1), s = t.resolve(l);
834
+ for (let o = l, u; s == t && (u = t.childBefore(o)); ) {
835
+ let i = u.lastChild;
836
+ if (!i || !i.type.isError || i.from < i.to)
837
+ break;
838
+ s = t = u, o = i.from;
839
+ }
840
+ return t.name == "TagName" ? t.parent && /CloseTag$/.test(t.parent.name) ? F(r, t, t.from, l) : L(r, e, t, t.from, l) : t.name == "StartTag" ? L(r, e, t, l, l) : t.name == "StartCloseTag" || t.name == "IncompleteCloseTag" ? F(r, t, l, l) : a.explicit && (t.name == "OpenTag" || t.name == "SelfClosingTag") || t.name == "AttributeName" ? Pt(r, e, t, t.name == "AttributeName" ? t.from : l, l) : t.name == "Is" || t.name == "AttributeValue" || t.name == "UnquotedAttributeValue" ? xt(r, e, t, t.name == "Is" ? l : t.from, l) : a.explicit && (s.name == "Element" || s.name == "Text" || s.name == "Document") ? bt(r, e, t, l) : null;
841
+ }
842
+ function Yt(e) {
843
+ return fe(w.default, e);
844
+ }
845
+ function Tt(e) {
846
+ let { extraTags: a, extraGlobalAttributes: r } = e, l = r || a ? new w(a, r) : w.default;
847
+ return (t) => fe(l, t);
848
+ }
849
+ const Vt = /* @__PURE__ */ M.parser.configure({ top: "SingleExpression" }), Se = [
850
+ {
851
+ tag: "script",
852
+ attrs: (e) => e.type == "text/typescript" || e.lang == "ts",
853
+ parser: qe.parser
854
+ },
855
+ {
856
+ tag: "script",
857
+ attrs: (e) => e.type == "text/babel" || e.type == "text/jsx",
858
+ parser: Ce.parser
859
+ },
860
+ {
861
+ tag: "script",
862
+ attrs: (e) => e.type == "text/typescript-jsx",
863
+ parser: Ae.parser
864
+ },
865
+ {
866
+ tag: "script",
867
+ attrs(e) {
868
+ return /^(importmap|speculationrules|application\/(.+\+)?json)$/i.test(e.type);
869
+ },
870
+ parser: Vt
871
+ },
872
+ {
873
+ tag: "script",
874
+ attrs(e) {
875
+ return !e.type || /^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i.test(e.type);
876
+ },
877
+ parser: M.parser
878
+ },
879
+ {
880
+ tag: "style",
881
+ attrs(e) {
882
+ return (!e.lang || e.lang == "css") && (!e.type || /^(text\/)?(x-)?(stylesheet|css)$/i.test(e.type));
883
+ },
884
+ parser: J.parser
885
+ }
886
+ ], ge = /* @__PURE__ */ [
887
+ {
888
+ name: "style",
889
+ parser: /* @__PURE__ */ J.parser.configure({ top: "Styles" })
890
+ }
891
+ ].concat(/* @__PURE__ */ de.map((e) => ({ name: e, parser: M.parser }))), he = /* @__PURE__ */ Ve.define({
892
+ name: "html",
893
+ parser: /* @__PURE__ */ gt.configure({
894
+ props: [
895
+ /* @__PURE__ */ we.add({
896
+ Element(e) {
897
+ let a = /^(\s*)(<\/)?/.exec(e.textAfter);
898
+ return e.node.to <= e.pos + a[0].length ? e.continue() : e.lineIndent(e.node.from) + (a[2] ? 0 : e.unit);
899
+ },
900
+ "OpenTag CloseTag SelfClosingTag"(e) {
901
+ return e.column(e.node.from) + e.unit;
902
+ },
903
+ Document(e) {
904
+ if (e.pos + /\s*/.exec(e.textAfter)[0].length < e.node.to)
905
+ return e.continue();
906
+ let a = null, r;
907
+ for (let l = e.node; ; ) {
908
+ let t = l.lastChild;
909
+ if (!t || t.name != "Element" || t.to != l.to)
910
+ break;
911
+ a = l = t;
912
+ }
913
+ return a && !((r = a.lastChild) && (r.name == "CloseTag" || r.name == "SelfClosingTag")) ? e.lineIndent(a.from) + e.unit : null;
914
+ }
915
+ }),
916
+ /* @__PURE__ */ ye.add({
917
+ Element(e) {
918
+ let a = e.firstChild, r = e.lastChild;
919
+ return !a || a.name != "OpenTag" ? null : { from: a.to, to: r.name == "CloseTag" ? r.from : e.to };
920
+ }
921
+ }),
922
+ /* @__PURE__ */ ve.add({
923
+ "OpenTag CloseTag": (e) => e.getChild("TagName")
924
+ })
925
+ ]
926
+ }),
927
+ languageData: {
928
+ commentTokens: { block: { open: "<!--", close: "-->" } },
929
+ indentOnInput: /^\s*<\/\w+\W$/,
930
+ wordChars: "-._"
931
+ }
932
+ }), y = /* @__PURE__ */ he.configure({
933
+ wrap: /* @__PURE__ */ Oe(Se, ge)
934
+ });
935
+ function Mt(e = {}) {
936
+ let a = "", r;
937
+ e.matchClosingTags === !1 && (a = "noMatch"), e.selfClosingTags === !0 && (a = (a ? a + " " : "") + "selfClosing"), (e.nestedLanguages && e.nestedLanguages.length || e.nestedAttributes && e.nestedAttributes.length) && (r = Oe((e.nestedLanguages || []).concat(Se), (e.nestedAttributes || []).concat(ge)));
938
+ let l = r ? he.configure({ wrap: r, dialect: a }) : a ? y.configure({ dialect: a }) : y;
939
+ return new Xe(l, [
940
+ y.data.of({ autocomplete: Tt(e) }),
941
+ e.autoCloseTags !== !1 ? wt : [],
942
+ Qe().support,
943
+ _e().support
944
+ ]);
945
+ }
946
+ const H = /* @__PURE__ */ new Set(/* @__PURE__ */ "area base br col command embed frame hr img input keygen link meta param source track wbr menuitem".split(" ")), wt = /* @__PURE__ */ ke.inputHandler.of((e, a, r, l, t) => {
947
+ if (e.composing || e.state.readOnly || a != r || l != ">" && l != "/" || !y.isActiveAt(e.state, a, -1))
948
+ return !1;
949
+ let s = t(), { state: o } = s, u = o.changeByRange((i) => {
950
+ var f, p, d;
951
+ let m = o.doc.sliceString(i.from - 1, i.to) == l, { head: c } = i, O = K(o).resolveInner(c - 1, -1), g;
952
+ if ((O.name == "TagName" || O.name == "StartTag") && (O = O.parent), m && l == ">" && O.name == "OpenTag") {
953
+ if (((p = (f = O.parent) === null || f === void 0 ? void 0 : f.lastChild) === null || p === void 0 ? void 0 : p.name) != "CloseTag" && (g = x(o.doc, O.parent, c)) && !H.has(g)) {
954
+ let b = c + (o.doc.sliceString(c, c + 1) === ">" ? 1 : 0), P = `</${g}>`;
955
+ return { range: i, changes: { from: c, to: b, insert: P } };
956
+ }
957
+ } else if (m && l == "/" && O.name == "IncompleteCloseTag") {
958
+ let b = O.parent;
959
+ if (O.from == c - 2 && ((d = b.lastChild) === null || d === void 0 ? void 0 : d.name) != "CloseTag" && (g = x(o.doc, b, c)) && !H.has(g)) {
960
+ let P = c + (o.doc.sliceString(c, c + 1) === ">" ? 1 : 0), B = `${g}>`;
961
+ return {
962
+ range: $e.cursor(c + B.length, -1),
963
+ changes: { from: c, to: P, insert: B }
964
+ };
965
+ }
966
+ }
967
+ return { range: i };
968
+ });
969
+ return u.changes.empty ? !1 : (e.dispatch([
970
+ s,
971
+ o.update(u, {
972
+ userEvent: "input.complete",
973
+ scrollIntoView: !0
974
+ })
975
+ ]), !0);
976
+ });
977
+ export {
978
+ wt as autoCloseTags,
979
+ Mt as html,
980
+ Yt as htmlCompletionSource,
981
+ Tt as htmlCompletionSourceWith,
982
+ y as htmlLanguage,
983
+ he as htmlPlain
984
+ };