@tempots/beatui 0.17.0 → 0.19.0

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 (531) hide show
  1. package/README.md +15 -34
  2. package/dist/2019-CfIF9XVA.cjs +1 -0
  3. package/dist/2019-D0n7sHsB.js +164 -0
  4. package/dist/2020-BkXWq9F8.js +192 -0
  5. package/dist/2020-D1ziwonq.cjs +1 -0
  6. package/dist/_commonjsHelpers-C6fGbg64.js +6 -0
  7. package/dist/_commonjsHelpers-DwGv2jUC.cjs +1 -0
  8. package/dist/apl-B2DGVGxc.js +76 -0
  9. package/dist/apl-M-DNMvvR.cjs +1 -0
  10. package/dist/ar-BsUm-TCn.cjs +1 -0
  11. package/dist/{ar-D5jeVM2s.js → ar-CMndb3tf.js} +24 -18
  12. package/dist/ar-DYmDITuw.cjs +1 -0
  13. package/dist/asciiarmor-2LVJmxlE.js +34 -0
  14. package/dist/asciiarmor-BMx3XVjX.cjs +1 -0
  15. package/dist/asn1-OOsVM4yU.cjs +1 -0
  16. package/dist/asn1-jKiBa2Ya.js +95 -0
  17. package/dist/asterisk-B1QUaW1C.cjs +1 -0
  18. package/dist/asterisk-DS281yxp.js +271 -0
  19. package/dist/auth/index.cjs.js +1 -0
  20. package/dist/auth/index.es.js +1331 -0
  21. package/dist/beatui.css +1 -1
  22. package/dist/brainfuck-BjUlYKdF.cjs +1 -0
  23. package/dist/brainfuck-C_p9pTT8.js +34 -0
  24. package/dist/clike-BEMIzMUI.cjs +1 -0
  25. package/dist/clike-DGTaUp48.js +620 -0
  26. package/dist/clojure-Ap_IXD2I.cjs +1 -0
  27. package/dist/clojure-CCKyeQKf.js +800 -0
  28. package/dist/cmake-C4D5_VmS.cjs +1 -0
  29. package/dist/cmake-CuaCgAKt.js +28 -0
  30. package/dist/cobol-BlTKFDRj.js +72 -0
  31. package/dist/cobol-Du-cT2hr.cjs +1 -0
  32. package/dist/coffeescript-BVCvwO8I.js +179 -0
  33. package/dist/coffeescript-DDFAj2ea.cjs +1 -0
  34. package/dist/commonlisp-CXBBRCTx.cjs +1 -0
  35. package/dist/commonlisp-D_kxz07b.js +75 -0
  36. package/dist/crystal-D309uH6_.js +217 -0
  37. package/dist/crystal-DAFWRDbh.cjs +1 -0
  38. package/dist/css-BkF-NPzE.js +1553 -0
  39. package/dist/css-DzFJyRJ8.cjs +1 -0
  40. package/dist/cypher-BMq4Fwjl.js +68 -0
  41. package/dist/cypher-BN0-oCze.cjs +1 -0
  42. package/dist/d-BHsqGcfm.cjs +1 -0
  43. package/dist/d-BZcgY6La.js +127 -0
  44. package/dist/de-BUFLEyKr.cjs +1 -0
  45. package/dist/{de-QCsvvABM.js → de-Cgy7XJBg.js} +25 -19
  46. package/dist/de-ClQgQrXM.cjs +1 -0
  47. package/dist/diff-CemTHKfk.cjs +1 -0
  48. package/dist/diff-Cg9d_RX2.js +18 -0
  49. package/dist/dockerfile-BBTH3voH.cjs +1 -0
  50. package/dist/dockerfile-DIy8NleC.js +194 -0
  51. package/dist/dtd-ChoVQPwv.cjs +1 -0
  52. package/dist/dtd-CtLokQ-U.js +84 -0
  53. package/dist/dylan-QYeExnWK.js +234 -0
  54. package/dist/dylan-apTQIgUA.cjs +1 -0
  55. package/dist/ebnf-DUPDuY4r.js +78 -0
  56. package/dist/ebnf-LYmLy17h.cjs +1 -0
  57. package/dist/ecl-C7WNQq7-.cjs +1 -0
  58. package/dist/ecl-CiXN-g_D.js +121 -0
  59. package/dist/eiffel-BJThA8RG.cjs +1 -0
  60. package/dist/eiffel-yQhjl4T1.js +110 -0
  61. package/dist/elm-CNT9vbN0.js +108 -0
  62. package/dist/elm-CcXP9T36.cjs +1 -0
  63. package/dist/erlang-B6mpcObI.cjs +1 -0
  64. package/dist/erlang-CFOYdy9e.js +487 -0
  65. package/dist/es-BN5Mihv0.cjs +1 -0
  66. package/dist/es-BxBeTRCv.cjs +1 -0
  67. package/dist/{es-QPLFaGbp.js → es-j0qszDAW.js} +23 -17
  68. package/dist/fa-BUQvM0nj.cjs +1 -0
  69. package/dist/{fa-DQmCKW-7.js → fa-COUp2ofv.js} +24 -16
  70. package/dist/fa-DxPseW3g.cjs +1 -0
  71. package/dist/factor-B-tsx9yW.cjs +1 -0
  72. package/dist/factor-DDOC7X6P.js +65 -0
  73. package/dist/fcl-BzAKklXo.cjs +1 -0
  74. package/dist/fcl-CPC2WYrI.js +103 -0
  75. package/dist/forth-BmxRyE9S.js +60 -0
  76. package/dist/forth-CPAzyZ_n.cjs +1 -0
  77. package/dist/fortran-9bvPyrOW.js +442 -0
  78. package/dist/fortran-DHiTlGV1.cjs +1 -0
  79. package/dist/{fr-MvvOUdq6.js → fr-B5Ar6QcE.js} +26 -20
  80. package/dist/fr-Cdyopuz3.cjs +1 -0
  81. package/dist/fr-CwvsJDIZ.cjs +1 -0
  82. package/dist/gas-BiPtGF2E.cjs +1 -0
  83. package/dist/gas-cpmYfFX2.js +183 -0
  84. package/dist/gherkin-CJuwpceU.js +34 -0
  85. package/dist/gherkin-Djo7Y51D.cjs +1 -0
  86. package/dist/groovy-BMVITiCm.cjs +1 -0
  87. package/dist/groovy-DZeT_VM-.js +146 -0
  88. package/dist/haskell-Bvt3Qq1t.js +375 -0
  89. package/dist/haskell-CngODaW-.cjs +1 -0
  90. package/dist/haxe-70NVW1pR.js +359 -0
  91. package/dist/haxe-Dyk-piTh.cjs +1 -0
  92. package/dist/{he-BgUKFv6v.js → he-D5HTHvKh.js} +24 -18
  93. package/dist/he-DarDNPn0.cjs +1 -0
  94. package/dist/he-HZvvmFUB.cjs +1 -0
  95. package/dist/{hi-BJXdbCIZ.js → hi-Bcc7iEXp.js} +24 -18
  96. package/dist/hi-Cnr1RtgA.cjs +1 -0
  97. package/dist/hi-tATwsXJ6.cjs +1 -0
  98. package/dist/http-BkLifcnL.cjs +1 -0
  99. package/dist/http-D9LttvKF.js +44 -0
  100. package/dist/idl-B6TRFYjl.js +947 -0
  101. package/dist/idl-FmHDmsE-.cjs +1 -0
  102. package/dist/index-2DKUYRWr.js +226 -0
  103. package/dist/index-85k3bgcY.cjs +1 -0
  104. package/dist/index-B-d5blto.js +302 -0
  105. package/dist/index-B16dbwxM.cjs +1 -0
  106. package/dist/index-B2079wM-.js +921 -0
  107. package/dist/index-B66rNs5i.cjs +2 -0
  108. package/dist/index-BF4pXHo-.js +270 -0
  109. package/dist/index-BJfVmi_X.js +612 -0
  110. package/dist/index-BUKtbimR.cjs +6 -0
  111. package/dist/index-BYk56bqR.cjs +13 -0
  112. package/dist/index-BZHMnjr6.cjs +1 -0
  113. package/dist/index-Bg1QLlyj.js +552 -0
  114. package/dist/index-BguvTLHu.cjs +1 -0
  115. package/dist/index-BirEb-BA.js +8285 -0
  116. package/dist/index-By8a3eg5.cjs +1 -0
  117. package/dist/index-C4UzgyIA.cjs +1 -0
  118. package/dist/index-C9XAXTDx.cjs +1 -0
  119. package/dist/index-CFo2nnaI.js +342 -0
  120. package/dist/index-CHgx0rFt.js +76 -0
  121. package/dist/index-CIfx_bs7.cjs +7 -0
  122. package/dist/index-CKRuo2DB.js +960 -0
  123. package/dist/index-CRfUh74G.cjs +1 -0
  124. package/dist/index-CUs1c8a9.js +309 -0
  125. package/dist/index-CoBM7UvE.js +157 -0
  126. package/dist/index-Cohec4rB.cjs +1 -0
  127. package/dist/index-D-Rzl363.cjs +1 -0
  128. package/dist/index-D0-d-xdJ.js +953 -0
  129. package/dist/index-DC4nzG_w.js +554 -0
  130. package/dist/index-DD-MOsCa.js +59 -0
  131. package/dist/index-DD8_efWr.cjs +1 -0
  132. package/dist/index-DJ-avKHU.js +138 -0
  133. package/dist/index-DSvEBuy-.cjs +3 -0
  134. package/dist/index-DV7tB1MN.cjs +1 -0
  135. package/dist/index-DXFKCiah.cjs +8 -0
  136. package/dist/index-DYIv5X6N.js +289 -0
  137. package/dist/index-Dben4dbo.js +1874 -0
  138. package/dist/index-DgUJYXoy.cjs +1 -0
  139. package/dist/index-DjNMMz5-.cjs +1 -0
  140. package/dist/index-DxG_avr8.cjs +1 -0
  141. package/dist/index-FEy4Hwnx.cjs +1 -0
  142. package/dist/index-_OaxQJX1.js +74 -0
  143. package/dist/index-dV4F3c70.js +136 -0
  144. package/dist/index-dsitEt8M.cjs +1 -0
  145. package/dist/index-faGepKVA.js +94 -0
  146. package/dist/index-kk6qFeC5.cjs +1 -0
  147. package/dist/index-rWglN8IQ.js +1307 -0
  148. package/dist/index-tuwLQMCb.js +251 -0
  149. package/dist/index-ykojBEwT.js +101 -0
  150. package/dist/index.cjs.js +143 -0
  151. package/dist/index.es.js +4456 -7705
  152. package/dist/index.esm-8xolKogd.cjs +1 -0
  153. package/dist/index.esm-CSotgpVw.js +4959 -0
  154. package/dist/it-B7KeOLBm.cjs +1 -0
  155. package/dist/it-BmFag7j0.cjs +1 -0
  156. package/dist/{it-Bu7Sjs-g.js → it-CTCKFU5g.js} +24 -18
  157. package/dist/ja-0ldomgID.cjs +1 -0
  158. package/dist/{ja-DrXpNYfH.js → ja-BGoETTZv.js} +23 -15
  159. package/dist/ja-Dj-bAKLf.cjs +1 -0
  160. package/dist/javascript-C2yteZeJ.js +691 -0
  161. package/dist/javascript-DngSGg_0.cjs +1 -0
  162. package/dist/jinja2-DnB6dQmV.js +154 -0
  163. package/dist/jinja2-wbVbDTNi.cjs +1 -0
  164. package/dist/json-schema/index.cjs.js +1 -0
  165. package/dist/json-schema/index.es.js +37 -0
  166. package/dist/julia-DA67Qw9E.cjs +1 -0
  167. package/dist/julia-DpvXAuO6.js +241 -0
  168. package/dist/ko-BomUE-yQ.cjs +1 -0
  169. package/dist/ko-C4WEkArz.cjs +1 -0
  170. package/dist/{ko-BmkxLoBO.js → ko-xHeRs9LU.js} +22 -14
  171. package/dist/link-portal-Cr2l9f3k.js +9 -0
  172. package/dist/link-portal-_tiDFZqh.cjs +1 -0
  173. package/dist/livescript-Bg3URadp.cjs +1 -0
  174. package/dist/livescript-CanGTf8u.js +272 -0
  175. package/dist/lua-CIsxjGwi.cjs +1 -0
  176. package/dist/lua-XplVlWi_.js +217 -0
  177. package/dist/markdown/index.cjs.js +2 -0
  178. package/dist/markdown/index.es.js +422 -0
  179. package/dist/markdown.css +39 -0
  180. package/dist/mathematica-BG089QIc.cjs +1 -0
  181. package/dist/mathematica-jaRHnSxC.js +35 -0
  182. package/dist/mbox-BctzC1hL.js +76 -0
  183. package/dist/mbox-CySolFFZ.cjs +1 -0
  184. package/dist/milkdown/index.cjs.js +1 -0
  185. package/dist/milkdown/index.es.js +4 -0
  186. package/dist/milkdown-input-BbbZJGDl.js +62376 -0
  187. package/dist/milkdown-input-C-Muq7PQ.cjs +941 -0
  188. package/dist/milkdown-url-BKbqhNCO.js +4 -0
  189. package/dist/milkdown-url-BLgXPmZR.cjs +1 -0
  190. package/dist/milkdown.css +1903 -0
  191. package/dist/mirc-BfqEffzk.cjs +1 -0
  192. package/dist/mirc-CFBPAOaF.js +72 -0
  193. package/dist/mllike-BSnXJBGA.js +272 -0
  194. package/dist/mllike-QUjwI6zq.cjs +1 -0
  195. package/dist/modal-nbZW44XS.js +614 -0
  196. package/dist/modal-wbG_oGOr.cjs +1 -0
  197. package/dist/modelica-B6Zhcb-M.cjs +1 -0
  198. package/dist/modelica-vUgVs--1.js +93 -0
  199. package/dist/monaco/index.cjs.js +2 -0
  200. package/dist/monaco/index.es.js +269 -0
  201. package/dist/monaco.css +14 -0
  202. package/dist/mscgen-BToym4Bs.cjs +1 -0
  203. package/dist/mscgen-Cpl0NYLN.js +104 -0
  204. package/dist/mumps-CQoS1kWX.js +25 -0
  205. package/dist/mumps-wfyQdxSu.cjs +1 -0
  206. package/dist/nginx-CwqyBUfA.cjs +1 -0
  207. package/dist/nginx-zDPm3Z74.js +89 -0
  208. package/dist/nl-D-y231ZO.cjs +1 -0
  209. package/dist/nl-Dr-l6zUy.cjs +1 -0
  210. package/dist/{nl-DC5KbcZ1.js → nl-ey2Li7DF.js} +24 -18
  211. package/dist/notice-CIPcSfD5.js +2432 -0
  212. package/dist/notice-Cq02YHoN.cjs +1 -0
  213. package/dist/nsis-DPj2fUaP.cjs +1 -0
  214. package/dist/nsis-fePjrhq7.js +62 -0
  215. package/dist/ntriples-CsNjv2QF.js +79 -0
  216. package/dist/ntriples-DgwJmozm.cjs +1 -0
  217. package/dist/octave-1pkKrgAA.cjs +1 -0
  218. package/dist/octave-C8PmmSRH.js +143 -0
  219. package/dist/oz-BXOZCt0U.cjs +1 -0
  220. package/dist/oz-Ce8aN8oE.js +151 -0
  221. package/dist/pascal-De0D6mP7.js +77 -0
  222. package/dist/pascal-DtY2LEkJ.cjs +1 -0
  223. package/dist/perl-B4bSCe1C.js +915 -0
  224. package/dist/perl-CVDWbEju.cjs +1 -0
  225. package/dist/pig-D24Z8EXi.js +54 -0
  226. package/dist/pig-DMByOrnr.cjs +1 -0
  227. package/dist/pl-BK0i_yvq.cjs +1 -0
  228. package/dist/{pl-BJJ-Grej.js → pl-Bf0QaCGx.js} +27 -21
  229. package/dist/pl-G6e4Mybr.cjs +1 -0
  230. package/dist/powershell-BaoYaFvj.cjs +1 -0
  231. package/dist/powershell-DkYVfTzP.js +249 -0
  232. package/dist/preprocess-CvkqwVNt.cjs +3 -0
  233. package/dist/preprocess-D898zxsP.js +2295 -0
  234. package/dist/properties-DXHJZ3WE.cjs +1 -0
  235. package/dist/properties-Dn9wna3M.js +26 -0
  236. package/dist/protobuf-BKhXdfH6.cjs +1 -0
  237. package/dist/protobuf-BPIjwpzm.js +49 -0
  238. package/dist/pt-CD2Eqazl.cjs +1 -0
  239. package/dist/{pt-DH8tH7fr.js → pt-D-_KxA9g.js} +26 -20
  240. package/dist/pt-oBMmVYcu.cjs +1 -0
  241. package/dist/pug-CwAQJzGR.js +248 -0
  242. package/dist/pug-kEfRDOiF.cjs +1 -0
  243. package/dist/puppet-8mAyuMbW.cjs +1 -0
  244. package/dist/puppet-nyd4dhjf.js +45 -0
  245. package/dist/python-BkR3uSy8.js +313 -0
  246. package/dist/python-D-iU6WXz.cjs +1 -0
  247. package/dist/q-BPQ45Nxu.cjs +1 -0
  248. package/dist/q-DXjKs-tC.js +83 -0
  249. package/dist/r-LKEuhEGI.js +104 -0
  250. package/dist/r-r2_EZsON.cjs +1 -0
  251. package/dist/rpm-IznJm2Xc.js +57 -0
  252. package/dist/rpm-YK81m3qU.cjs +1 -0
  253. package/dist/ru-CKh2xgqC.cjs +1 -0
  254. package/dist/ru-CtxMmoa6.cjs +1 -0
  255. package/dist/{ru-DoNk8aVN.js → ru-Dzbl29K2.js} +29 -21
  256. package/dist/ruby-CcYfvIk6.js +228 -0
  257. package/dist/ruby-Cn1sFkZF.cjs +1 -0
  258. package/dist/sas-7E8yHoCW.js +105 -0
  259. package/dist/sas-DAGcJy94.cjs +1 -0
  260. package/dist/scheme-B0ZrbojV.cjs +1 -0
  261. package/dist/scheme-DjibxsNh.js +124 -0
  262. package/dist/shell-BMYo43V6.cjs +1 -0
  263. package/dist/shell-C0C2sNA_.js +182 -0
  264. package/dist/sieve-Bwz7vjP5.js +72 -0
  265. package/dist/sieve-CIYW-b_H.cjs +1 -0
  266. package/dist/simple-mode-B0dvCdAA.js +89 -0
  267. package/dist/simple-mode-BIKNPBes.cjs +1 -0
  268. package/dist/smalltalk-Bhddl2pB.js +48 -0
  269. package/dist/smalltalk-CSslY-3i.cjs +1 -0
  270. package/dist/solr-A1kSnAwJ.cjs +1 -0
  271. package/dist/solr-BNlsLglM.js +41 -0
  272. package/dist/sparql-DnHMBLLY.cjs +1 -0
  273. package/dist/sparql-FarWu_Gb.js +197 -0
  274. package/dist/spreadsheet-B7_BK8hB.cjs +1 -0
  275. package/dist/spreadsheet-C-cy4P5N.js +49 -0
  276. package/dist/sql-9VmIWHrZ.cjs +1 -0
  277. package/dist/sql-CfG5lQ3l.js +282 -0
  278. package/dist/stex-B4wyjEnp.cjs +1 -0
  279. package/dist/stex-Du4h4KAU.js +129 -0
  280. package/dist/styles-url-B-d6aezR.cjs +1 -0
  281. package/dist/styles-url-B4WGMvfi.js +4 -0
  282. package/dist/styles-url-CZUL_YRT.cjs +1 -0
  283. package/dist/styles-url-DpP5gepF.js +4 -0
  284. package/dist/stylus-CAdqWld3.js +250 -0
  285. package/dist/stylus-D6GYOT3Z.cjs +1 -0
  286. package/dist/swift-DGw6Cgu8.cjs +1 -0
  287. package/dist/swift-DSxqR9R6.js +230 -0
  288. package/dist/tcl-ByLXbQFo.cjs +1 -0
  289. package/dist/tcl-xfoLljhY.js +81 -0
  290. package/dist/textile-D1AWE-pc.js +295 -0
  291. package/dist/textile-iryw-lTw.cjs +1 -0
  292. package/dist/theme-CJVt8QIc.js +34 -0
  293. package/dist/theme-YS3sFklH.cjs +1 -0
  294. package/dist/tiddlywiki-5wqsXtSk.js +155 -0
  295. package/dist/tiddlywiki-D8IJz1k7.cjs +1 -0
  296. package/dist/tiki-C5p5KSQK.cjs +1 -0
  297. package/dist/tiki-__Kn3CeS.js +181 -0
  298. package/dist/timer-CcMCjYrq.cjs +1 -0
  299. package/dist/timer-CkgWORR9.js +42 -0
  300. package/dist/toml-3ZsH_4Qa.cjs +1 -0
  301. package/dist/toml-BHiuTcfn.js +49 -0
  302. package/dist/tr-BbpC5gzM.cjs +1 -0
  303. package/dist/tr-CgJ8uhZu.cjs +1 -0
  304. package/dist/{tr-BD5Li2rQ.js → tr-yMHT8n7z.js} +24 -18
  305. package/dist/translations-CXE8Z_Ac.cjs +1 -0
  306. package/dist/translations-DBtfTNnM.js +2005 -0
  307. package/dist/translations-DbN-OSLv.js +47 -0
  308. package/dist/translations-EQ1qPZ0_.cjs +2 -0
  309. package/dist/troff-D-3QCOYN.cjs +1 -0
  310. package/dist/troff-D2UO-fKf.js +35 -0
  311. package/dist/ttcn-Bsa4sfRm.js +123 -0
  312. package/dist/ttcn-C2MXAqcM.cjs +1 -0
  313. package/dist/ttcn-cfg-BYqcMRxC.cjs +1 -0
  314. package/dist/ttcn-cfg-Bac_acMi.js +88 -0
  315. package/dist/turtle-DSJNatSv.cjs +1 -0
  316. package/dist/turtle-xwJUxoPV.js +80 -0
  317. package/dist/types/auth/index.d.ts +1 -0
  318. package/dist/types/beatui-i18n/default.d.ts +8 -1
  319. package/dist/types/beatui-i18n/locales/en.d.ts +8 -1
  320. package/dist/types/beatui-i18n/translations.d.ts +8 -1
  321. package/dist/types/components/auth/auth-divider.d.ts +2 -2
  322. package/dist/types/components/auth/index.d.ts +8 -6
  323. package/dist/types/components/auth/password-strength-indicator.d.ts +4 -4
  324. package/dist/types/components/auth/reset-password-form.d.ts +2 -2
  325. package/dist/types/components/auth/signin-form.d.ts +2 -2
  326. package/dist/types/components/auth/signup-form.d.ts +2 -2
  327. package/dist/types/components/auth/social-login-button.d.ts +27 -27
  328. package/dist/types/components/auth/types.d.ts +11 -13
  329. package/dist/types/components/button/button.d.ts +1 -1
  330. package/dist/types/components/button/close-button.d.ts +15 -0
  331. package/dist/types/components/button/index.d.ts +1 -0
  332. package/dist/types/components/data/tag.d.ts +3 -2
  333. package/dist/types/components/form/control/control-factory.d.ts +24 -0
  334. package/dist/types/components/form/control/date-utils.d.ts +6 -0
  335. package/dist/types/components/form/control/index.d.ts +3 -22
  336. package/dist/types/components/form/control/list-control.d.ts +23 -14
  337. package/dist/types/components/form/controller/controller.d.ts +20 -1
  338. package/dist/types/components/form/controller/index.d.ts +2 -0
  339. package/dist/types/components/form/controller/union-controller.d.ts +53 -0
  340. package/dist/types/components/form/controller/utils.d.ts +4 -0
  341. package/dist/types/components/form/input/appearance-selector.d.ts +2 -1
  342. package/dist/types/components/form/input/base64-input.d.ts +10 -0
  343. package/dist/types/components/form/input/base64s-input.d.ts +12 -0
  344. package/dist/types/components/form/input/bigint-input.d.ts +9 -0
  345. package/dist/types/components/form/input/color-input.d.ts +8 -1
  346. package/dist/types/components/form/input/combobox-input.d.ts +16 -0
  347. package/dist/types/components/form/input/combobox-tags-input.d.ts +16 -0
  348. package/dist/types/components/form/input/dropdown-base.d.ts +19 -0
  349. package/dist/types/components/form/input/dropdown-input.d.ts +14 -0
  350. package/dist/types/components/form/input/duration-input.d.ts +3 -0
  351. package/dist/types/components/form/input/duration-mask.d.ts +12 -0
  352. package/dist/types/components/form/input/editable-text.d.ts +2 -1
  353. package/dist/types/components/form/input/file-input.d.ts +3 -4
  354. package/dist/types/components/form/input/files-input.d.ts +12 -0
  355. package/dist/types/components/form/input/index.d.ts +42 -2
  356. package/dist/types/components/form/input/input-container.d.ts +2 -3
  357. package/dist/types/components/form/input/input-options.d.ts +0 -13
  358. package/dist/types/components/form/input/input-wrapper.d.ts +1 -1
  359. package/dist/types/components/form/input/instant-input.d.ts +3 -0
  360. package/dist/types/components/form/input/lazy-native-select.d.ts +1 -1
  361. package/dist/types/components/form/input/list-input.d.ts +14 -0
  362. package/dist/types/components/form/input/mask-input.d.ts +94 -0
  363. package/dist/types/components/form/input/native-select.d.ts +4 -23
  364. package/dist/types/components/form/input/nullable-base64-input.d.ts +8 -0
  365. package/dist/types/components/form/input/nullable-bigint-input.d.ts +9 -0
  366. package/dist/types/components/form/input/nullable-duration-input.d.ts +3 -0
  367. package/dist/types/components/form/input/nullable-email-input.d.ts +2 -0
  368. package/dist/types/components/form/input/nullable-instant-input.d.ts +3 -0
  369. package/dist/types/components/form/input/nullable-mask-input.d.ts +5 -0
  370. package/dist/types/components/form/input/nullable-number-input.d.ts +9 -0
  371. package/dist/types/components/form/input/nullable-password-input.d.ts +2 -0
  372. package/dist/types/components/form/input/nullable-plain-date-input.d.ts +3 -0
  373. package/dist/types/components/form/input/nullable-plain-date-time-input.d.ts +3 -0
  374. package/dist/types/components/form/input/nullable-plain-month-day-input.d.ts +3 -0
  375. package/dist/types/components/form/input/nullable-plain-time-input.d.ts +3 -0
  376. package/dist/types/components/form/input/nullable-plain-year-month-input.d.ts +3 -0
  377. package/dist/types/components/form/input/nullable-rating-input.d.ts +14 -0
  378. package/dist/types/components/form/input/nullable-url-input.d.ts +2 -0
  379. package/dist/types/components/form/input/nullable-utils.d.ts +2 -0
  380. package/dist/types/components/form/input/nullable-uuid-input.d.ts +2 -0
  381. package/dist/types/components/form/input/nullable-zoned-date-time-input.d.ts +3 -0
  382. package/dist/types/components/form/input/option.d.ts +38 -0
  383. package/dist/types/components/form/input/plain-date-input.d.ts +3 -0
  384. package/dist/types/components/form/input/plain-date-time-input.d.ts +3 -0
  385. package/dist/types/components/form/input/plain-month-day-input.d.ts +3 -0
  386. package/dist/types/components/form/input/plain-time-input.d.ts +3 -0
  387. package/dist/types/components/form/input/plain-year-month-input.d.ts +3 -0
  388. package/dist/types/components/form/input/rating-input.d.ts +15 -0
  389. package/dist/types/components/form/input/segmented-input.d.ts +10 -0
  390. package/dist/types/components/form/input/select-tags-input.d.ts +20 -0
  391. package/dist/types/components/form/input/slider-input.d.ts +15 -0
  392. package/dist/types/components/form/input/tag-utils.d.ts +11 -0
  393. package/dist/types/components/form/input/url-input.d.ts +2 -0
  394. package/dist/types/components/form/input/uuid-input.d.ts +2 -0
  395. package/dist/types/components/form/input/zoned-date-time-input.d.ts +3 -0
  396. package/dist/types/components/form/schema/custom-validation.d.ts +1 -1
  397. package/dist/types/components/form/use-form.d.ts +11 -4
  398. package/dist/types/components/json-schema/ajv-utils.d.ts +121 -0
  399. package/dist/types/components/json-schema/cache-management.d.ts +148 -0
  400. package/dist/types/components/json-schema/containers/container-layouts.d.ts +66 -0
  401. package/dist/types/components/json-schema/controls/any-control.d.ts +10 -0
  402. package/dist/types/components/json-schema/controls/array-control.d.ts +10 -0
  403. package/dist/types/components/json-schema/controls/boolean-control.d.ts +10 -0
  404. package/dist/types/components/json-schema/controls/composition-controls.d.ts +24 -0
  405. package/dist/types/components/json-schema/controls/composition-shared.d.ts +34 -0
  406. package/dist/types/components/json-schema/controls/enum-const-controls.d.ts +17 -0
  407. package/dist/types/components/json-schema/controls/generic-control.d.ts +18 -0
  408. package/dist/types/components/json-schema/controls/null-control.d.ts +10 -0
  409. package/dist/types/components/json-schema/controls/number-controls.d.ts +17 -0
  410. package/dist/types/components/json-schema/controls/object-control.d.ts +12 -0
  411. package/dist/types/components/json-schema/controls/object-helpers.d.ts +31 -0
  412. package/dist/types/components/json-schema/controls/presence-toggle.d.ts +12 -0
  413. package/dist/types/components/json-schema/controls/schema-banners.d.ts +14 -0
  414. package/dist/types/components/json-schema/controls/schema-wrapper.d.ts +7 -0
  415. package/dist/types/components/json-schema/controls/shared-utils.d.ts +16 -0
  416. package/dist/types/components/json-schema/controls/string-control.d.ts +10 -0
  417. package/dist/types/components/json-schema/controls/type-utils.d.ts +27 -0
  418. package/dist/types/components/json-schema/controls/union-control.d.ts +10 -0
  419. package/dist/types/components/json-schema/controls.d.ts +11 -0
  420. package/dist/types/components/json-schema/discriminator/discriminator-utils.d.ts +57 -0
  421. package/dist/types/components/json-schema/index.d.ts +5 -0
  422. package/dist/types/components/json-schema/json-schema-form.d.ts +79 -0
  423. package/dist/types/components/json-schema/oneof-branch-detection.d.ts +35 -0
  424. package/dist/types/components/json-schema/ref-utils.d.ts +18 -0
  425. package/dist/types/components/json-schema/schema-context.d.ts +185 -0
  426. package/dist/types/components/json-schema/validation/async-validation.d.ts +113 -0
  427. package/dist/types/components/json-schema/validation/conditional-validation.d.ts +75 -0
  428. package/dist/types/components/json-schema/validation/cross-field-validation.d.ts +71 -0
  429. package/dist/types/components/json-schema/validation/error-aggregation.d.ts +84 -0
  430. package/dist/types/components/json-schema/validation/performance-optimization.d.ts +120 -0
  431. package/dist/types/components/json-schema/validator.d.ts +10 -0
  432. package/dist/types/components/json-schema/visibility/visibility-evaluation.d.ts +77 -0
  433. package/dist/types/components/json-schema/visibility/visibility-wrapper.d.ts +56 -0
  434. package/dist/types/components/json-schema/widgets/enhanced-widgets.d.ts +70 -0
  435. package/dist/types/components/json-schema/widgets/string-controls.d.ts +8 -0
  436. package/dist/types/components/json-schema/widgets/string-detection.d.ts +3 -0
  437. package/dist/types/components/json-schema/widgets/string-type.d.ts +62 -0
  438. package/dist/types/components/json-schema/widgets/utils.d.ts +45 -0
  439. package/dist/types/components/json-schema/widgets/widget-composition.d.ts +144 -0
  440. package/dist/types/components/json-schema/widgets/widget-customization.d.ts +120 -0
  441. package/dist/types/components/layout/index.d.ts +1 -0
  442. package/dist/types/components/layout/nine-slice-scroll-view.d.ts +21 -0
  443. package/dist/types/components/layout/scrollable-panel.d.ts +1 -1
  444. package/dist/types/components/milkdown/milkdown-input.d.ts +15 -0
  445. package/dist/types/components/milkdown/milkdown-url.d.ts +2 -0
  446. package/dist/types/components/misc/index.d.ts +3 -0
  447. package/dist/types/components/misc/link-portal.d.ts +11 -0
  448. package/dist/types/components/misc/notice.d.ts +15 -0
  449. package/dist/types/components/misc/style-portal.d.ts +10 -0
  450. package/dist/types/components/monaco/monaco-editor-input.d.ts +12 -0
  451. package/dist/types/components/navigation/flyout.d.ts +2 -2
  452. package/dist/types/components/navigation/index.d.ts +1 -0
  453. package/dist/types/components/navigation/menu.d.ts +7 -7
  454. package/dist/types/components/navigation/toolbar/index.d.ts +1 -0
  455. package/dist/types/components/navigation/toolbar/toolbar.d.ts +17 -0
  456. package/dist/types/components/overlay/drawer.d.ts +2 -2
  457. package/dist/types/components/overlay/modal.d.ts +3 -3
  458. package/dist/types/components/overlay/tooltip.d.ts +2 -2
  459. package/dist/types/index.d.ts +1 -1
  460. package/dist/types/json-schema/index.d.ts +1 -0
  461. package/dist/types/markdown/extensions.d.ts +8 -0
  462. package/dist/types/markdown/index.d.ts +17 -0
  463. package/dist/types/markdown/styles-url.d.ts +2 -0
  464. package/dist/types/markdown/styles.d.ts +2 -0
  465. package/dist/types/milkdown/index.d.ts +1 -0
  466. package/dist/types/milkdown/styles.d.ts +2 -0
  467. package/dist/types/monaco/index.d.ts +3 -0
  468. package/dist/types/monaco/lazy-loader.d.ts +5 -0
  469. package/dist/types/monaco/styles-url.d.ts +2 -0
  470. package/dist/types/monaco/styles.d.ts +2 -0
  471. package/dist/types/monaco/types.d.ts +14 -0
  472. package/dist/types/styles/base-url.d.ts +2 -0
  473. package/dist/types/styles/base.d.ts +2 -0
  474. package/dist/types/temporal/index.d.ts +3 -0
  475. package/dist/types/temporal/runtime.d.ts +2 -0
  476. package/dist/types/temporal/types.d.ts +10 -0
  477. package/dist/types/temporal/with-temporal.d.ts +3 -0
  478. package/dist/types/tokens/colors.d.ts +12 -1
  479. package/dist/types/utils/focus-trap.d.ts +4 -4
  480. package/dist/{ur-CUvRCu9R.js → ur-CdQA0epV.js} +24 -18
  481. package/dist/ur-DvqAg9gW.cjs +1 -0
  482. package/dist/ur-kkik6-_r.cjs +1 -0
  483. package/dist/vb-c2kQGd6-.js +74 -0
  484. package/dist/vb-qzHzzvyB.cjs +1 -0
  485. package/dist/vbscript-1f_Dhg5H.js +324 -0
  486. package/dist/vbscript-CWm8v9tE.cjs +1 -0
  487. package/dist/velocity-D3_yAIp3.cjs +1 -0
  488. package/dist/velocity-DJd0pTTC.js +96 -0
  489. package/dist/verilog-BOhLNmQo.cjs +1 -0
  490. package/dist/verilog-CiS1jyi5.js +262 -0
  491. package/dist/vhdl-CMFbi8Im.cjs +1 -0
  492. package/dist/vhdl-T9HkrbI2.js +106 -0
  493. package/dist/vi-1xtFXJc0.cjs +1 -0
  494. package/dist/{vi-BXI6n5F3.js → vi-A8UmZU3L.js} +26 -20
  495. package/dist/vi-D5R3YcU0.cjs +1 -0
  496. package/dist/webidl-CWb_flNk.cjs +1 -0
  497. package/dist/webidl-CjfDENEo.js +155 -0
  498. package/dist/xquery-BUQdORAS.js +422 -0
  499. package/dist/xquery-Cjw5fRnG.cjs +1 -0
  500. package/dist/yacas-C0absKBh.js +73 -0
  501. package/dist/yacas-urx_N5C8.cjs +1 -0
  502. package/dist/z80-CsG3CM6M.cjs +1 -0
  503. package/dist/z80-Pki2zAjW.js +61 -0
  504. package/dist/zh-CCGXcj5r.cjs +1 -0
  505. package/dist/{zh-DyIbx84k.js → zh-D0nnvX8T.js} +23 -15
  506. package/dist/zh-DC_SsXdk.cjs +1 -0
  507. package/package.json +57 -8
  508. package/dist/index.umd.js +0 -100
  509. package/dist/types/components/form/control/combobox-control.d.ts +0 -11
  510. package/dist/types/components/form/control/control-input-wrapper.d.ts +0 -7
  511. package/dist/types/components/form/control/control-options.d.ts +0 -20
  512. package/dist/types/components/form/control/date-control.d.ts +0 -3
  513. package/dist/types/components/form/control/date-time-control.d.ts +0 -3
  514. package/dist/types/components/form/control/email-control.d.ts +0 -3
  515. package/dist/types/components/form/control/file-control.d.ts +0 -13
  516. package/dist/types/components/form/control/lazy-native-select-control.d.ts +0 -16
  517. package/dist/types/components/form/control/native-select-control.d.ts +0 -9
  518. package/dist/types/components/form/control/nullable-date-control.d.ts +0 -3
  519. package/dist/types/components/form/control/nullable-date-time-control.d.ts +0 -3
  520. package/dist/types/components/form/control/nullable-string-date-control.d.ts +0 -3
  521. package/dist/types/components/form/control/nullable-string-date-time-control.d.ts +0 -3
  522. package/dist/types/components/form/control/nullable-text-area-control.d.ts +0 -7
  523. package/dist/types/components/form/control/nullable-text-control.d.ts +0 -3
  524. package/dist/types/components/form/control/number-control.d.ts +0 -9
  525. package/dist/types/components/form/control/password-control.d.ts +0 -3
  526. package/dist/types/components/form/control/segmented-control.d.ts +0 -10
  527. package/dist/types/components/form/control/string-date-control.d.ts +0 -3
  528. package/dist/types/components/form/control/tags-control.d.ts +0 -3
  529. package/dist/types/components/form/control/text-area-control.d.ts +0 -7
  530. package/dist/types/components/form/control/text-control.d.ts +0 -8
  531. package/dist/types/components/form/input/combobox.d.ts +0 -39
@@ -0,0 +1,1307 @@
1
+ import { P as L, N as M, g as $, D as E, h as y, T as S, I as j } from "./milkdown-input-BbbZJGDl.js";
2
+ class v {
3
+ /**
4
+ @internal
5
+ */
6
+ constructor(t, e, s, i, h, r, n, o, a, u = 0, f) {
7
+ this.p = t, this.stack = e, this.state = s, this.reducePos = i, this.pos = h, this.score = r, this.buffer = n, this.bufferBase = o, this.curContext = a, this.lookAhead = u, this.parent = f;
8
+ }
9
+ /**
10
+ @internal
11
+ */
12
+ toString() {
13
+ return `[${this.stack.filter((t, e) => e % 3 == 0).concat(this.state)}]@${this.pos}${this.score ? "!" + this.score : ""}`;
14
+ }
15
+ // Start an empty stack
16
+ /**
17
+ @internal
18
+ */
19
+ static start(t, e, s = 0) {
20
+ let i = t.parser.context;
21
+ return new v(t, [], e, s, s, 0, [], 0, i ? new N(i, i.start) : null, 0, null);
22
+ }
23
+ /**
24
+ The stack's current [context](#lr.ContextTracker) value, if
25
+ any. Its type will depend on the context tracker's type
26
+ parameter, or it will be `null` if there is no context
27
+ tracker.
28
+ */
29
+ get context() {
30
+ return this.curContext ? this.curContext.context : null;
31
+ }
32
+ // Push a state onto the stack, tracking its start position as well
33
+ // as the buffer base at that point.
34
+ /**
35
+ @internal
36
+ */
37
+ pushState(t, e) {
38
+ this.stack.push(this.state, e, this.bufferBase + this.buffer.length), this.state = t;
39
+ }
40
+ // Apply a reduce action
41
+ /**
42
+ @internal
43
+ */
44
+ reduce(t) {
45
+ var e;
46
+ let s = t >> 19, i = t & 65535, { parser: h } = this.p, r = this.reducePos < this.pos - 25;
47
+ r && this.setLookAhead(this.pos);
48
+ let n = h.dynamicPrecedence(i);
49
+ if (n && (this.score += n), s == 0) {
50
+ this.pushState(h.getGoto(this.state, i, !0), this.reducePos), i < h.minRepeatTerm && this.storeNode(i, this.reducePos, this.reducePos, r ? 8 : 4, !0), this.reduceContext(i, this.reducePos);
51
+ return;
52
+ }
53
+ let o = this.stack.length - (s - 1) * 3 - (t & 262144 ? 6 : 0), a = o ? this.stack[o - 2] : this.p.ranges[0].from, u = this.reducePos - a;
54
+ u >= 2e3 && !(!((e = this.p.parser.nodeSet.types[i]) === null || e === void 0) && e.isAnonymous) && (a == this.p.lastBigReductionStart ? (this.p.bigReductionCount++, this.p.lastBigReductionSize = u) : this.p.lastBigReductionSize < u && (this.p.bigReductionCount = 1, this.p.lastBigReductionStart = a, this.p.lastBigReductionSize = u));
55
+ let f = o ? this.stack[o - 1] : 0, p = this.bufferBase + this.buffer.length - f;
56
+ if (i < h.minRepeatTerm || t & 131072) {
57
+ let c = h.stateFlag(
58
+ this.state,
59
+ 1
60
+ /* StateFlag.Skipped */
61
+ ) ? this.pos : this.reducePos;
62
+ this.storeNode(i, a, c, p + 4, !0);
63
+ }
64
+ if (t & 262144)
65
+ this.state = this.stack[o];
66
+ else {
67
+ let c = this.stack[o - 3];
68
+ this.state = h.getGoto(c, i, !0);
69
+ }
70
+ for (; this.stack.length > o; )
71
+ this.stack.pop();
72
+ this.reduceContext(i, a);
73
+ }
74
+ // Shift a value into the buffer
75
+ /**
76
+ @internal
77
+ */
78
+ storeNode(t, e, s, i = 4, h = !1) {
79
+ if (t == 0 && (!this.stack.length || this.stack[this.stack.length - 1] < this.buffer.length + this.bufferBase)) {
80
+ let r = this, n = this.buffer.length;
81
+ if (n == 0 && r.parent && (n = r.bufferBase - r.parent.bufferBase, r = r.parent), n > 0 && r.buffer[n - 4] == 0 && r.buffer[n - 1] > -1) {
82
+ if (e == s)
83
+ return;
84
+ if (r.buffer[n - 2] >= e) {
85
+ r.buffer[n - 2] = s;
86
+ return;
87
+ }
88
+ }
89
+ }
90
+ if (!h || this.pos == s)
91
+ this.buffer.push(t, e, s, i);
92
+ else {
93
+ let r = this.buffer.length;
94
+ if (r > 0 && this.buffer[r - 4] != 0) {
95
+ let n = !1;
96
+ for (let o = r; o > 0 && this.buffer[o - 2] > s; o -= 4)
97
+ if (this.buffer[o - 1] >= 0) {
98
+ n = !0;
99
+ break;
100
+ }
101
+ if (n)
102
+ for (; r > 0 && this.buffer[r - 2] > s; )
103
+ this.buffer[r] = this.buffer[r - 4], this.buffer[r + 1] = this.buffer[r - 3], this.buffer[r + 2] = this.buffer[r - 2], this.buffer[r + 3] = this.buffer[r - 1], r -= 4, i > 4 && (i -= 4);
104
+ }
105
+ this.buffer[r] = t, this.buffer[r + 1] = e, this.buffer[r + 2] = s, this.buffer[r + 3] = i;
106
+ }
107
+ }
108
+ // Apply a shift action
109
+ /**
110
+ @internal
111
+ */
112
+ shift(t, e, s, i) {
113
+ if (t & 131072)
114
+ this.pushState(t & 65535, this.pos);
115
+ else if ((t & 262144) == 0) {
116
+ let h = t, { parser: r } = this.p;
117
+ (i > this.pos || e <= r.maxNode) && (this.pos = i, r.stateFlag(
118
+ h,
119
+ 1
120
+ /* StateFlag.Skipped */
121
+ ) || (this.reducePos = i)), this.pushState(h, s), this.shiftContext(e, s), e <= r.maxNode && this.buffer.push(e, s, i, 4);
122
+ } else
123
+ this.pos = i, this.shiftContext(e, s), e <= this.p.parser.maxNode && this.buffer.push(e, s, i, 4);
124
+ }
125
+ // Apply an action
126
+ /**
127
+ @internal
128
+ */
129
+ apply(t, e, s, i) {
130
+ t & 65536 ? this.reduce(t) : this.shift(t, e, s, i);
131
+ }
132
+ // Add a prebuilt (reused) node into the buffer.
133
+ /**
134
+ @internal
135
+ */
136
+ useNode(t, e) {
137
+ let s = this.p.reused.length - 1;
138
+ (s < 0 || this.p.reused[s] != t) && (this.p.reused.push(t), s++);
139
+ let i = this.pos;
140
+ this.reducePos = this.pos = i + t.length, this.pushState(e, i), this.buffer.push(
141
+ s,
142
+ i,
143
+ this.reducePos,
144
+ -1
145
+ /* size == -1 means this is a reused value */
146
+ ), this.curContext && this.updateContext(this.curContext.tracker.reuse(this.curContext.context, t, this, this.p.stream.reset(this.pos - t.length)));
147
+ }
148
+ // Split the stack. Due to the buffer sharing and the fact
149
+ // that `this.stack` tends to stay quite shallow, this isn't very
150
+ // expensive.
151
+ /**
152
+ @internal
153
+ */
154
+ split() {
155
+ let t = this, e = t.buffer.length;
156
+ for (; e > 0 && t.buffer[e - 2] > t.reducePos; )
157
+ e -= 4;
158
+ let s = t.buffer.slice(e), i = t.bufferBase + e;
159
+ for (; t && i == t.bufferBase; )
160
+ t = t.parent;
161
+ return new v(this.p, this.stack.slice(), this.state, this.reducePos, this.pos, this.score, s, i, this.curContext, this.lookAhead, t);
162
+ }
163
+ // Try to recover from an error by 'deleting' (ignoring) one token.
164
+ /**
165
+ @internal
166
+ */
167
+ recoverByDelete(t, e) {
168
+ let s = t <= this.p.parser.maxNode;
169
+ s && this.storeNode(t, this.pos, e, 4), this.storeNode(0, this.pos, e, s ? 8 : 4), this.pos = this.reducePos = e, this.score -= 190;
170
+ }
171
+ /**
172
+ Check if the given term would be able to be shifted (optionally
173
+ after some reductions) on this stack. This can be useful for
174
+ external tokenizers that want to make sure they only provide a
175
+ given token when it applies.
176
+ */
177
+ canShift(t) {
178
+ for (let e = new G(this); ; ) {
179
+ let s = this.p.parser.stateSlot(
180
+ e.state,
181
+ 4
182
+ /* ParseState.DefaultReduce */
183
+ ) || this.p.parser.hasAction(e.state, t);
184
+ if (s == 0)
185
+ return !1;
186
+ if ((s & 65536) == 0)
187
+ return !0;
188
+ e.reduce(s);
189
+ }
190
+ }
191
+ // Apply up to Recover.MaxNext recovery actions that conceptually
192
+ // inserts some missing token or rule.
193
+ /**
194
+ @internal
195
+ */
196
+ recoverByInsert(t) {
197
+ if (this.stack.length >= 300)
198
+ return [];
199
+ let e = this.p.parser.nextStates(this.state);
200
+ if (e.length > 8 || this.stack.length >= 120) {
201
+ let i = [];
202
+ for (let h = 0, r; h < e.length; h += 2)
203
+ (r = e[h + 1]) != this.state && this.p.parser.hasAction(r, t) && i.push(e[h], r);
204
+ if (this.stack.length < 120)
205
+ for (let h = 0; i.length < 8 && h < e.length; h += 2) {
206
+ let r = e[h + 1];
207
+ i.some((n, o) => o & 1 && n == r) || i.push(e[h], r);
208
+ }
209
+ e = i;
210
+ }
211
+ let s = [];
212
+ for (let i = 0; i < e.length && s.length < 4; i += 2) {
213
+ let h = e[i + 1];
214
+ if (h == this.state)
215
+ continue;
216
+ let r = this.split();
217
+ r.pushState(h, this.pos), r.storeNode(0, r.pos, r.pos, 4, !0), r.shiftContext(e[i], this.pos), r.reducePos = this.pos, r.score -= 200, s.push(r);
218
+ }
219
+ return s;
220
+ }
221
+ // Force a reduce, if possible. Return false if that can't
222
+ // be done.
223
+ /**
224
+ @internal
225
+ */
226
+ forceReduce() {
227
+ let { parser: t } = this.p, e = t.stateSlot(
228
+ this.state,
229
+ 5
230
+ /* ParseState.ForcedReduce */
231
+ );
232
+ if ((e & 65536) == 0)
233
+ return !1;
234
+ if (!t.validAction(this.state, e)) {
235
+ let s = e >> 19, i = e & 65535, h = this.stack.length - s * 3;
236
+ if (h < 0 || t.getGoto(this.stack[h], i, !1) < 0) {
237
+ let r = this.findForcedReduction();
238
+ if (r == null)
239
+ return !1;
240
+ e = r;
241
+ }
242
+ this.storeNode(0, this.pos, this.pos, 4, !0), this.score -= 100;
243
+ }
244
+ return this.reducePos = this.pos, this.reduce(e), !0;
245
+ }
246
+ /**
247
+ Try to scan through the automaton to find some kind of reduction
248
+ that can be applied. Used when the regular ForcedReduce field
249
+ isn't a valid action. @internal
250
+ */
251
+ findForcedReduction() {
252
+ let { parser: t } = this.p, e = [], s = (i, h) => {
253
+ if (!e.includes(i))
254
+ return e.push(i), t.allActions(i, (r) => {
255
+ if (!(r & 393216)) if (r & 65536) {
256
+ let n = (r >> 19) - h;
257
+ if (n > 1) {
258
+ let o = r & 65535, a = this.stack.length - n * 3;
259
+ if (a >= 0 && t.getGoto(this.stack[a], o, !1) >= 0)
260
+ return n << 19 | 65536 | o;
261
+ }
262
+ } else {
263
+ let n = s(r, h + 1);
264
+ if (n != null)
265
+ return n;
266
+ }
267
+ });
268
+ };
269
+ return s(this.state, 0);
270
+ }
271
+ /**
272
+ @internal
273
+ */
274
+ forceAll() {
275
+ for (; !this.p.parser.stateFlag(
276
+ this.state,
277
+ 2
278
+ /* StateFlag.Accepting */
279
+ ); )
280
+ if (!this.forceReduce()) {
281
+ this.storeNode(0, this.pos, this.pos, 4, !0);
282
+ break;
283
+ }
284
+ return this;
285
+ }
286
+ /**
287
+ Check whether this state has no further actions (assumed to be a direct descendant of the
288
+ top state, since any other states must be able to continue
289
+ somehow). @internal
290
+ */
291
+ get deadEnd() {
292
+ if (this.stack.length != 3)
293
+ return !1;
294
+ let { parser: t } = this.p;
295
+ return t.data[t.stateSlot(
296
+ this.state,
297
+ 1
298
+ /* ParseState.Actions */
299
+ )] == 65535 && !t.stateSlot(
300
+ this.state,
301
+ 4
302
+ /* ParseState.DefaultReduce */
303
+ );
304
+ }
305
+ /**
306
+ Restart the stack (put it back in its start state). Only safe
307
+ when this.stack.length == 3 (state is directly below the top
308
+ state). @internal
309
+ */
310
+ restart() {
311
+ this.storeNode(0, this.pos, this.pos, 4, !0), this.state = this.stack[0], this.stack.length = 0;
312
+ }
313
+ /**
314
+ @internal
315
+ */
316
+ sameState(t) {
317
+ if (this.state != t.state || this.stack.length != t.stack.length)
318
+ return !1;
319
+ for (let e = 0; e < this.stack.length; e += 3)
320
+ if (this.stack[e] != t.stack[e])
321
+ return !1;
322
+ return !0;
323
+ }
324
+ /**
325
+ Get the parser used by this stack.
326
+ */
327
+ get parser() {
328
+ return this.p.parser;
329
+ }
330
+ /**
331
+ Test whether a given dialect (by numeric ID, as exported from
332
+ the terms file) is enabled.
333
+ */
334
+ dialectEnabled(t) {
335
+ return this.p.parser.dialect.flags[t];
336
+ }
337
+ shiftContext(t, e) {
338
+ this.curContext && this.updateContext(this.curContext.tracker.shift(this.curContext.context, t, this, this.p.stream.reset(e)));
339
+ }
340
+ reduceContext(t, e) {
341
+ this.curContext && this.updateContext(this.curContext.tracker.reduce(this.curContext.context, t, this, this.p.stream.reset(e)));
342
+ }
343
+ /**
344
+ @internal
345
+ */
346
+ emitContext() {
347
+ let t = this.buffer.length - 1;
348
+ (t < 0 || this.buffer[t] != -3) && this.buffer.push(this.curContext.hash, this.pos, this.pos, -3);
349
+ }
350
+ /**
351
+ @internal
352
+ */
353
+ emitLookAhead() {
354
+ let t = this.buffer.length - 1;
355
+ (t < 0 || this.buffer[t] != -4) && this.buffer.push(this.lookAhead, this.pos, this.pos, -4);
356
+ }
357
+ updateContext(t) {
358
+ if (t != this.curContext.context) {
359
+ let e = new N(this.curContext.tracker, t);
360
+ e.hash != this.curContext.hash && this.emitContext(), this.curContext = e;
361
+ }
362
+ }
363
+ /**
364
+ @internal
365
+ */
366
+ setLookAhead(t) {
367
+ t > this.lookAhead && (this.emitLookAhead(), this.lookAhead = t);
368
+ }
369
+ /**
370
+ @internal
371
+ */
372
+ close() {
373
+ this.curContext && this.curContext.tracker.strict && this.emitContext(), this.lookAhead > 0 && this.emitLookAhead();
374
+ }
375
+ }
376
+ class N {
377
+ constructor(t, e) {
378
+ this.tracker = t, this.context = e, this.hash = t.strict ? t.hash(e) : 0;
379
+ }
380
+ }
381
+ class G {
382
+ constructor(t) {
383
+ this.start = t, this.state = t.state, this.stack = t.stack, this.base = this.stack.length;
384
+ }
385
+ reduce(t) {
386
+ let e = t & 65535, s = t >> 19;
387
+ s == 0 ? (this.stack == this.start.stack && (this.stack = this.stack.slice()), this.stack.push(this.state, 0, 0), this.base += 3) : this.base -= (s - 1) * 3;
388
+ let i = this.start.p.parser.getGoto(this.stack[this.base - 3], e, !0);
389
+ this.state = i;
390
+ }
391
+ }
392
+ class A {
393
+ constructor(t, e, s) {
394
+ this.stack = t, this.pos = e, this.index = s, this.buffer = t.buffer, this.index == 0 && this.maybeNext();
395
+ }
396
+ static create(t, e = t.bufferBase + t.buffer.length) {
397
+ return new A(t, e, e - t.bufferBase);
398
+ }
399
+ maybeNext() {
400
+ let t = this.stack.parent;
401
+ t != null && (this.index = this.stack.bufferBase - t.bufferBase, this.stack = t, this.buffer = t.buffer);
402
+ }
403
+ get id() {
404
+ return this.buffer[this.index - 4];
405
+ }
406
+ get start() {
407
+ return this.buffer[this.index - 3];
408
+ }
409
+ get end() {
410
+ return this.buffer[this.index - 2];
411
+ }
412
+ get size() {
413
+ return this.buffer[this.index - 1];
414
+ }
415
+ next() {
416
+ this.index -= 4, this.pos -= 4, this.index == 0 && this.maybeNext();
417
+ }
418
+ fork() {
419
+ return new A(this.stack, this.pos, this.index);
420
+ }
421
+ }
422
+ function x(l, t = Uint16Array) {
423
+ if (typeof l != "string")
424
+ return l;
425
+ let e = null;
426
+ for (let s = 0, i = 0; s < l.length; ) {
427
+ let h = 0;
428
+ for (; ; ) {
429
+ let r = l.charCodeAt(s++), n = !1;
430
+ if (r == 126) {
431
+ h = 65535;
432
+ break;
433
+ }
434
+ r >= 92 && r--, r >= 34 && r--;
435
+ let o = r - 32;
436
+ if (o >= 46 && (o -= 46, n = !0), h += o, n)
437
+ break;
438
+ h *= 46;
439
+ }
440
+ e ? e[i++] = h : e = new t(h);
441
+ }
442
+ return e;
443
+ }
444
+ class P {
445
+ constructor() {
446
+ this.start = -1, this.value = -1, this.end = -1, this.extended = -1, this.lookAhead = 0, this.mask = 0, this.context = 0;
447
+ }
448
+ }
449
+ const R = new P();
450
+ class U {
451
+ /**
452
+ @internal
453
+ */
454
+ constructor(t, e) {
455
+ this.input = t, this.ranges = e, this.chunk = "", this.chunkOff = 0, this.chunk2 = "", this.chunk2Pos = 0, this.next = -1, this.token = R, this.rangeIndex = 0, this.pos = this.chunkPos = e[0].from, this.range = e[0], this.end = e[e.length - 1].to, this.readNext();
456
+ }
457
+ /**
458
+ @internal
459
+ */
460
+ resolveOffset(t, e) {
461
+ let s = this.range, i = this.rangeIndex, h = this.pos + t;
462
+ for (; h < s.from; ) {
463
+ if (!i)
464
+ return null;
465
+ let r = this.ranges[--i];
466
+ h -= s.from - r.to, s = r;
467
+ }
468
+ for (; e < 0 ? h > s.to : h >= s.to; ) {
469
+ if (i == this.ranges.length - 1)
470
+ return null;
471
+ let r = this.ranges[++i];
472
+ h += r.from - s.to, s = r;
473
+ }
474
+ return h;
475
+ }
476
+ /**
477
+ @internal
478
+ */
479
+ clipPos(t) {
480
+ if (t >= this.range.from && t < this.range.to)
481
+ return t;
482
+ for (let e of this.ranges)
483
+ if (e.to > t)
484
+ return Math.max(t, e.from);
485
+ return this.end;
486
+ }
487
+ /**
488
+ Look at a code unit near the stream position. `.peek(0)` equals
489
+ `.next`, `.peek(-1)` gives you the previous character, and so
490
+ on.
491
+
492
+ Note that looking around during tokenizing creates dependencies
493
+ on potentially far-away content, which may reduce the
494
+ effectiveness incremental parsing—when looking forward—or even
495
+ cause invalid reparses when looking backward more than 25 code
496
+ units, since the library does not track lookbehind.
497
+ */
498
+ peek(t) {
499
+ let e = this.chunkOff + t, s, i;
500
+ if (e >= 0 && e < this.chunk.length)
501
+ s = this.pos + t, i = this.chunk.charCodeAt(e);
502
+ else {
503
+ let h = this.resolveOffset(t, 1);
504
+ if (h == null)
505
+ return -1;
506
+ if (s = h, s >= this.chunk2Pos && s < this.chunk2Pos + this.chunk2.length)
507
+ i = this.chunk2.charCodeAt(s - this.chunk2Pos);
508
+ else {
509
+ let r = this.rangeIndex, n = this.range;
510
+ for (; n.to <= s; )
511
+ n = this.ranges[++r];
512
+ this.chunk2 = this.input.chunk(this.chunk2Pos = s), s + this.chunk2.length > n.to && (this.chunk2 = this.chunk2.slice(0, n.to - s)), i = this.chunk2.charCodeAt(0);
513
+ }
514
+ }
515
+ return s >= this.token.lookAhead && (this.token.lookAhead = s + 1), i;
516
+ }
517
+ /**
518
+ Accept a token. By default, the end of the token is set to the
519
+ current stream position, but you can pass an offset (relative to
520
+ the stream position) to change that.
521
+ */
522
+ acceptToken(t, e = 0) {
523
+ let s = e ? this.resolveOffset(e, -1) : this.pos;
524
+ if (s == null || s < this.token.start)
525
+ throw new RangeError("Token end out of bounds");
526
+ this.token.value = t, this.token.end = s;
527
+ }
528
+ /**
529
+ Accept a token ending at a specific given position.
530
+ */
531
+ acceptTokenTo(t, e) {
532
+ this.token.value = t, this.token.end = e;
533
+ }
534
+ getChunk() {
535
+ if (this.pos >= this.chunk2Pos && this.pos < this.chunk2Pos + this.chunk2.length) {
536
+ let { chunk: t, chunkPos: e } = this;
537
+ this.chunk = this.chunk2, this.chunkPos = this.chunk2Pos, this.chunk2 = t, this.chunk2Pos = e, this.chunkOff = this.pos - this.chunkPos;
538
+ } else {
539
+ this.chunk2 = this.chunk, this.chunk2Pos = this.chunkPos;
540
+ let t = this.input.chunk(this.pos), e = this.pos + t.length;
541
+ this.chunk = e > this.range.to ? t.slice(0, this.range.to - this.pos) : t, this.chunkPos = this.pos, this.chunkOff = 0;
542
+ }
543
+ }
544
+ readNext() {
545
+ return this.chunkOff >= this.chunk.length && (this.getChunk(), this.chunkOff == this.chunk.length) ? this.next = -1 : this.next = this.chunk.charCodeAt(this.chunkOff);
546
+ }
547
+ /**
548
+ Move the stream forward N (defaults to 1) code units. Returns
549
+ the new value of [`next`](#lr.InputStream.next).
550
+ */
551
+ advance(t = 1) {
552
+ for (this.chunkOff += t; this.pos + t >= this.range.to; ) {
553
+ if (this.rangeIndex == this.ranges.length - 1)
554
+ return this.setDone();
555
+ t -= this.range.to - this.pos, this.range = this.ranges[++this.rangeIndex], this.pos = this.range.from;
556
+ }
557
+ return this.pos += t, this.pos >= this.token.lookAhead && (this.token.lookAhead = this.pos + 1), this.readNext();
558
+ }
559
+ setDone() {
560
+ return this.pos = this.chunkPos = this.end, this.range = this.ranges[this.rangeIndex = this.ranges.length - 1], this.chunk = "", this.next = -1;
561
+ }
562
+ /**
563
+ @internal
564
+ */
565
+ reset(t, e) {
566
+ if (e ? (this.token = e, e.start = t, e.lookAhead = t + 1, e.value = e.extended = -1) : this.token = R, this.pos != t) {
567
+ if (this.pos = t, t == this.end)
568
+ return this.setDone(), this;
569
+ for (; t < this.range.from; )
570
+ this.range = this.ranges[--this.rangeIndex];
571
+ for (; t >= this.range.to; )
572
+ this.range = this.ranges[++this.rangeIndex];
573
+ t >= this.chunkPos && t < this.chunkPos + this.chunk.length ? this.chunkOff = t - this.chunkPos : (this.chunk = "", this.chunkOff = 0), this.readNext();
574
+ }
575
+ return this;
576
+ }
577
+ /**
578
+ @internal
579
+ */
580
+ read(t, e) {
581
+ if (t >= this.chunkPos && e <= this.chunkPos + this.chunk.length)
582
+ return this.chunk.slice(t - this.chunkPos, e - this.chunkPos);
583
+ if (t >= this.chunk2Pos && e <= this.chunk2Pos + this.chunk2.length)
584
+ return this.chunk2.slice(t - this.chunk2Pos, e - this.chunk2Pos);
585
+ if (t >= this.range.from && e <= this.range.to)
586
+ return this.input.read(t, e);
587
+ let s = "";
588
+ for (let i of this.ranges) {
589
+ if (i.from >= e)
590
+ break;
591
+ i.to > t && (s += this.input.read(Math.max(i.from, t), Math.min(i.to, e)));
592
+ }
593
+ return s;
594
+ }
595
+ }
596
+ class m {
597
+ constructor(t, e) {
598
+ this.data = t, this.id = e;
599
+ }
600
+ token(t, e) {
601
+ let { parser: s } = e.p;
602
+ F(this.data, t, e, this.id, s.data, s.tokenPrecTable);
603
+ }
604
+ }
605
+ m.prototype.contextual = m.prototype.fallback = m.prototype.extend = !1;
606
+ class H {
607
+ constructor(t, e, s) {
608
+ this.precTable = e, this.elseToken = s, this.data = typeof t == "string" ? x(t) : t;
609
+ }
610
+ token(t, e) {
611
+ let s = t.pos, i = 0;
612
+ for (; ; ) {
613
+ let h = t.next < 0, r = t.resolveOffset(1, 1);
614
+ if (F(this.data, t, e, 0, this.data, this.precTable), t.token.value > -1)
615
+ break;
616
+ if (this.elseToken == null)
617
+ return;
618
+ if (h || i++, r == null)
619
+ break;
620
+ t.reset(r, t.token);
621
+ }
622
+ i && (t.reset(s, t.token), t.acceptToken(this.elseToken, i));
623
+ }
624
+ }
625
+ H.prototype.contextual = m.prototype.fallback = m.prototype.extend = !1;
626
+ class Y {
627
+ /**
628
+ Create a tokenizer. The first argument is the function that,
629
+ given an input stream, scans for the types of tokens it
630
+ recognizes at the stream's position, and calls
631
+ [`acceptToken`](#lr.InputStream.acceptToken) when it finds
632
+ one.
633
+ */
634
+ constructor(t, e = {}) {
635
+ this.token = t, this.contextual = !!e.contextual, this.fallback = !!e.fallback, this.extend = !!e.extend;
636
+ }
637
+ }
638
+ function F(l, t, e, s, i, h) {
639
+ let r = 0, n = 1 << s, { dialect: o } = e.p.parser;
640
+ t: for (; (n & l[r]) != 0; ) {
641
+ let a = l[r + 1];
642
+ for (let c = r + 3; c < a; c += 2)
643
+ if ((l[c + 1] & n) > 0) {
644
+ let d = l[c];
645
+ if (o.allows(d) && (t.token.value == -1 || t.token.value == d || W(d, t.token.value, i, h))) {
646
+ t.acceptToken(d);
647
+ break;
648
+ }
649
+ }
650
+ let u = t.next, f = 0, p = l[r + 2];
651
+ if (t.next < 0 && p > f && l[a + p * 3 - 3] == 65535) {
652
+ r = l[a + p * 3 - 1];
653
+ continue t;
654
+ }
655
+ for (; f < p; ) {
656
+ let c = f + p >> 1, d = a + c + (c << 1), b = l[d], O = l[d + 1] || 65536;
657
+ if (u < b)
658
+ p = c;
659
+ else if (u >= O)
660
+ f = c + 1;
661
+ else {
662
+ r = l[d + 2], t.advance();
663
+ continue t;
664
+ }
665
+ }
666
+ break;
667
+ }
668
+ }
669
+ function z(l, t, e) {
670
+ for (let s = t, i; (i = l[s]) != 65535; s++)
671
+ if (i == e)
672
+ return s - t;
673
+ return -1;
674
+ }
675
+ function W(l, t, e, s) {
676
+ let i = z(e, s, t);
677
+ return i < 0 || z(e, s, l) < i;
678
+ }
679
+ const g = typeof process < "u" && process.env && /\bparse\b/.test(process.env.LOG);
680
+ let T = null;
681
+ function I(l, t, e) {
682
+ let s = l.cursor(j.IncludeAnonymous);
683
+ for (s.moveTo(t); ; )
684
+ if (!(e < 0 ? s.childBefore(t) : s.childAfter(t)))
685
+ for (; ; ) {
686
+ if ((e < 0 ? s.to < t : s.from > t) && !s.type.isError)
687
+ return e < 0 ? Math.max(0, Math.min(
688
+ s.to - 1,
689
+ t - 25
690
+ /* Lookahead.Margin */
691
+ )) : Math.min(l.length, Math.max(
692
+ s.from + 1,
693
+ t + 25
694
+ /* Lookahead.Margin */
695
+ ));
696
+ if (e < 0 ? s.prevSibling() : s.nextSibling())
697
+ break;
698
+ if (!s.parent())
699
+ return e < 0 ? 0 : l.length;
700
+ }
701
+ }
702
+ class q {
703
+ constructor(t, e) {
704
+ this.fragments = t, this.nodeSet = e, this.i = 0, this.fragment = null, this.safeFrom = -1, this.safeTo = -1, this.trees = [], this.start = [], this.index = [], this.nextFragment();
705
+ }
706
+ nextFragment() {
707
+ let t = this.fragment = this.i == this.fragments.length ? null : this.fragments[this.i++];
708
+ if (t) {
709
+ for (this.safeFrom = t.openStart ? I(t.tree, t.from + t.offset, 1) - t.offset : t.from, this.safeTo = t.openEnd ? I(t.tree, t.to + t.offset, -1) - t.offset : t.to; this.trees.length; )
710
+ this.trees.pop(), this.start.pop(), this.index.pop();
711
+ this.trees.push(t.tree), this.start.push(-t.offset), this.index.push(0), this.nextStart = this.safeFrom;
712
+ } else
713
+ this.nextStart = 1e9;
714
+ }
715
+ // `pos` must be >= any previously given `pos` for this cursor
716
+ nodeAt(t) {
717
+ if (t < this.nextStart)
718
+ return null;
719
+ for (; this.fragment && this.safeTo <= t; )
720
+ this.nextFragment();
721
+ if (!this.fragment)
722
+ return null;
723
+ for (; ; ) {
724
+ let e = this.trees.length - 1;
725
+ if (e < 0)
726
+ return this.nextFragment(), null;
727
+ let s = this.trees[e], i = this.index[e];
728
+ if (i == s.children.length) {
729
+ this.trees.pop(), this.start.pop(), this.index.pop();
730
+ continue;
731
+ }
732
+ let h = s.children[i], r = this.start[e] + s.positions[i];
733
+ if (r > t)
734
+ return this.nextStart = r, null;
735
+ if (h instanceof S) {
736
+ if (r == t) {
737
+ if (r < this.safeFrom)
738
+ return null;
739
+ let n = r + h.length;
740
+ if (n <= this.safeTo) {
741
+ let o = h.prop(y.lookAhead);
742
+ if (!o || n + o < this.fragment.to)
743
+ return h;
744
+ }
745
+ }
746
+ this.index[e]++, r + h.length >= Math.max(this.safeFrom, t) && (this.trees.push(h), this.start.push(r), this.index.push(0));
747
+ } else
748
+ this.index[e]++, this.nextStart = r + h.length;
749
+ }
750
+ }
751
+ }
752
+ class J {
753
+ constructor(t, e) {
754
+ this.stream = e, this.tokens = [], this.mainToken = null, this.actions = [], this.tokens = t.tokenizers.map((s) => new P());
755
+ }
756
+ getActions(t) {
757
+ let e = 0, s = null, { parser: i } = t.p, { tokenizers: h } = i, r = i.stateSlot(
758
+ t.state,
759
+ 3
760
+ /* ParseState.TokenizerMask */
761
+ ), n = t.curContext ? t.curContext.hash : 0, o = 0;
762
+ for (let a = 0; a < h.length; a++) {
763
+ if ((1 << a & r) == 0)
764
+ continue;
765
+ let u = h[a], f = this.tokens[a];
766
+ if (!(s && !u.fallback) && ((u.contextual || f.start != t.pos || f.mask != r || f.context != n) && (this.updateCachedToken(f, u, t), f.mask = r, f.context = n), f.lookAhead > f.end + 25 && (o = Math.max(f.lookAhead, o)), f.value != 0)) {
767
+ let p = e;
768
+ if (f.extended > -1 && (e = this.addActions(t, f.extended, f.end, e)), e = this.addActions(t, f.value, f.end, e), !u.extend && (s = f, e > p))
769
+ break;
770
+ }
771
+ }
772
+ for (; this.actions.length > e; )
773
+ this.actions.pop();
774
+ return o && t.setLookAhead(o), !s && t.pos == this.stream.end && (s = new P(), s.value = t.p.parser.eofTerm, s.start = s.end = t.pos, e = this.addActions(t, s.value, s.end, e)), this.mainToken = s, this.actions;
775
+ }
776
+ getMainToken(t) {
777
+ if (this.mainToken)
778
+ return this.mainToken;
779
+ let e = new P(), { pos: s, p: i } = t;
780
+ return e.start = s, e.end = Math.min(s + 1, i.stream.end), e.value = s == i.stream.end ? i.parser.eofTerm : 0, e;
781
+ }
782
+ updateCachedToken(t, e, s) {
783
+ let i = this.stream.clipPos(s.pos);
784
+ if (e.token(this.stream.reset(i, t), s), t.value > -1) {
785
+ let { parser: h } = s.p;
786
+ for (let r = 0; r < h.specialized.length; r++)
787
+ if (h.specialized[r] == t.value) {
788
+ let n = h.specializers[r](this.stream.read(t.start, t.end), s);
789
+ if (n >= 0 && s.p.parser.dialect.allows(n >> 1)) {
790
+ (n & 1) == 0 ? t.value = n >> 1 : t.extended = n >> 1;
791
+ break;
792
+ }
793
+ }
794
+ } else
795
+ t.value = 0, t.end = this.stream.clipPos(i + 1);
796
+ }
797
+ putAction(t, e, s, i) {
798
+ for (let h = 0; h < i; h += 3)
799
+ if (this.actions[h] == t)
800
+ return i;
801
+ return this.actions[i++] = t, this.actions[i++] = e, this.actions[i++] = s, i;
802
+ }
803
+ addActions(t, e, s, i) {
804
+ let { state: h } = t, { parser: r } = t.p, { data: n } = r;
805
+ for (let o = 0; o < 2; o++)
806
+ for (let a = r.stateSlot(
807
+ h,
808
+ o ? 2 : 1
809
+ /* ParseState.Actions */
810
+ ); ; a += 3) {
811
+ if (n[a] == 65535)
812
+ if (n[a + 1] == 1)
813
+ a = k(n, a + 2);
814
+ else {
815
+ i == 0 && n[a + 1] == 2 && (i = this.putAction(k(n, a + 2), e, s, i));
816
+ break;
817
+ }
818
+ n[a] == e && (i = this.putAction(k(n, a + 1), e, s, i));
819
+ }
820
+ return i;
821
+ }
822
+ }
823
+ class K {
824
+ constructor(t, e, s, i) {
825
+ this.parser = t, this.input = e, this.ranges = i, this.recovering = 0, this.nextStackID = 9812, this.minStackPos = 0, this.reused = [], this.stoppedAt = null, this.lastBigReductionStart = -1, this.lastBigReductionSize = 0, this.bigReductionCount = 0, this.stream = new U(e, i), this.tokens = new J(t, this.stream), this.topTerm = t.top[1];
826
+ let { from: h } = i[0];
827
+ this.stacks = [v.start(this, t.top[0], h)], this.fragments = s.length && this.stream.end - h > t.bufferLength * 4 ? new q(s, t.nodeSet) : null;
828
+ }
829
+ get parsedPos() {
830
+ return this.minStackPos;
831
+ }
832
+ // Move the parser forward. This will process all parse stacks at
833
+ // `this.pos` and try to advance them to a further position. If no
834
+ // stack for such a position is found, it'll start error-recovery.
835
+ //
836
+ // When the parse is finished, this will return a syntax tree. When
837
+ // not, it returns `null`.
838
+ advance() {
839
+ let t = this.stacks, e = this.minStackPos, s = this.stacks = [], i, h;
840
+ if (this.bigReductionCount > 300 && t.length == 1) {
841
+ let [r] = t;
842
+ for (; r.forceReduce() && r.stack.length && r.stack[r.stack.length - 2] >= this.lastBigReductionStart; )
843
+ ;
844
+ this.bigReductionCount = this.lastBigReductionSize = 0;
845
+ }
846
+ for (let r = 0; r < t.length; r++) {
847
+ let n = t[r];
848
+ for (; ; ) {
849
+ if (this.tokens.mainToken = null, n.pos > e)
850
+ s.push(n);
851
+ else {
852
+ if (this.advanceStack(n, s, t))
853
+ continue;
854
+ {
855
+ i || (i = [], h = []), i.push(n);
856
+ let o = this.tokens.getMainToken(n);
857
+ h.push(o.value, o.end);
858
+ }
859
+ }
860
+ break;
861
+ }
862
+ }
863
+ if (!s.length) {
864
+ let r = i && V(i);
865
+ if (r)
866
+ return g && console.log("Finish with " + this.stackID(r)), this.stackToTree(r);
867
+ if (this.parser.strict)
868
+ throw g && i && console.log("Stuck with token " + (this.tokens.mainToken ? this.parser.getName(this.tokens.mainToken.value) : "none")), new SyntaxError("No parse at " + e);
869
+ this.recovering || (this.recovering = 5);
870
+ }
871
+ if (this.recovering && i) {
872
+ let r = this.stoppedAt != null && i[0].pos > this.stoppedAt ? i[0] : this.runRecovery(i, h, s);
873
+ if (r)
874
+ return g && console.log("Force-finish " + this.stackID(r)), this.stackToTree(r.forceAll());
875
+ }
876
+ if (this.recovering) {
877
+ let r = this.recovering == 1 ? 1 : this.recovering * 3;
878
+ if (s.length > r)
879
+ for (s.sort((n, o) => o.score - n.score); s.length > r; )
880
+ s.pop();
881
+ s.some((n) => n.reducePos > e) && this.recovering--;
882
+ } else if (s.length > 1) {
883
+ t: for (let r = 0; r < s.length - 1; r++) {
884
+ let n = s[r];
885
+ for (let o = r + 1; o < s.length; o++) {
886
+ let a = s[o];
887
+ if (n.sameState(a) || n.buffer.length > 500 && a.buffer.length > 500)
888
+ if ((n.score - a.score || n.buffer.length - a.buffer.length) > 0)
889
+ s.splice(o--, 1);
890
+ else {
891
+ s.splice(r--, 1);
892
+ continue t;
893
+ }
894
+ }
895
+ }
896
+ s.length > 12 && s.splice(
897
+ 12,
898
+ s.length - 12
899
+ /* Rec.MaxStackCount */
900
+ );
901
+ }
902
+ this.minStackPos = s[0].pos;
903
+ for (let r = 1; r < s.length; r++)
904
+ s[r].pos < this.minStackPos && (this.minStackPos = s[r].pos);
905
+ return null;
906
+ }
907
+ stopAt(t) {
908
+ if (this.stoppedAt != null && this.stoppedAt < t)
909
+ throw new RangeError("Can't move stoppedAt forward");
910
+ this.stoppedAt = t;
911
+ }
912
+ // Returns an updated version of the given stack, or null if the
913
+ // stack can't advance normally. When `split` and `stacks` are
914
+ // given, stacks split off by ambiguous operations will be pushed to
915
+ // `split`, or added to `stacks` if they move `pos` forward.
916
+ advanceStack(t, e, s) {
917
+ let i = t.pos, { parser: h } = this, r = g ? this.stackID(t) + " -> " : "";
918
+ if (this.stoppedAt != null && i > this.stoppedAt)
919
+ return t.forceReduce() ? t : null;
920
+ if (this.fragments) {
921
+ let a = t.curContext && t.curContext.tracker.strict, u = a ? t.curContext.hash : 0;
922
+ for (let f = this.fragments.nodeAt(i); f; ) {
923
+ let p = this.parser.nodeSet.types[f.type.id] == f.type ? h.getGoto(t.state, f.type.id) : -1;
924
+ if (p > -1 && f.length && (!a || (f.prop(y.contextHash) || 0) == u))
925
+ return t.useNode(f, p), g && console.log(r + this.stackID(t) + ` (via reuse of ${h.getName(f.type.id)})`), !0;
926
+ if (!(f instanceof S) || f.children.length == 0 || f.positions[0] > 0)
927
+ break;
928
+ let c = f.children[0];
929
+ if (c instanceof S && f.positions[0] == 0)
930
+ f = c;
931
+ else
932
+ break;
933
+ }
934
+ }
935
+ let n = h.stateSlot(
936
+ t.state,
937
+ 4
938
+ /* ParseState.DefaultReduce */
939
+ );
940
+ if (n > 0)
941
+ return t.reduce(n), g && console.log(r + this.stackID(t) + ` (via always-reduce ${h.getName(
942
+ n & 65535
943
+ /* Action.ValueMask */
944
+ )})`), !0;
945
+ if (t.stack.length >= 8400)
946
+ for (; t.stack.length > 6e3 && t.forceReduce(); )
947
+ ;
948
+ let o = this.tokens.getActions(t);
949
+ for (let a = 0; a < o.length; ) {
950
+ let u = o[a++], f = o[a++], p = o[a++], c = a == o.length || !s, d = c ? t : t.split(), b = this.tokens.mainToken;
951
+ if (d.apply(u, f, b ? b.start : d.pos, p), g && console.log(r + this.stackID(d) + ` (via ${(u & 65536) == 0 ? "shift" : `reduce of ${h.getName(
952
+ u & 65535
953
+ /* Action.ValueMask */
954
+ )}`} for ${h.getName(f)} @ ${i}${d == t ? "" : ", split"})`), c)
955
+ return !0;
956
+ d.pos > i ? e.push(d) : s.push(d);
957
+ }
958
+ return !1;
959
+ }
960
+ // Advance a given stack forward as far as it will go. Returns the
961
+ // (possibly updated) stack if it got stuck, or null if it moved
962
+ // forward and was given to `pushStackDedup`.
963
+ advanceFully(t, e) {
964
+ let s = t.pos;
965
+ for (; ; ) {
966
+ if (!this.advanceStack(t, null, null))
967
+ return !1;
968
+ if (t.pos > s)
969
+ return D(t, e), !0;
970
+ }
971
+ }
972
+ runRecovery(t, e, s) {
973
+ let i = null, h = !1;
974
+ for (let r = 0; r < t.length; r++) {
975
+ let n = t[r], o = e[r << 1], a = e[(r << 1) + 1], u = g ? this.stackID(n) + " -> " : "";
976
+ if (n.deadEnd && (h || (h = !0, n.restart(), g && console.log(u + this.stackID(n) + " (restarted)"), this.advanceFully(n, s))))
977
+ continue;
978
+ let f = n.split(), p = u;
979
+ for (let c = 0; f.forceReduce() && c < 10 && (g && console.log(p + this.stackID(f) + " (via force-reduce)"), !this.advanceFully(f, s)); c++)
980
+ g && (p = this.stackID(f) + " -> ");
981
+ for (let c of n.recoverByInsert(o))
982
+ g && console.log(u + this.stackID(c) + " (via recover-insert)"), this.advanceFully(c, s);
983
+ this.stream.end > n.pos ? (a == n.pos && (a++, o = 0), n.recoverByDelete(o, a), g && console.log(u + this.stackID(n) + ` (via recover-delete ${this.parser.getName(o)})`), D(n, s)) : (!i || i.score < n.score) && (i = n);
984
+ }
985
+ return i;
986
+ }
987
+ // Convert the stack's buffer to a syntax tree.
988
+ stackToTree(t) {
989
+ return t.close(), S.build({
990
+ buffer: A.create(t),
991
+ nodeSet: this.parser.nodeSet,
992
+ topID: this.topTerm,
993
+ maxBufferLength: this.parser.bufferLength,
994
+ reused: this.reused,
995
+ start: this.ranges[0].from,
996
+ length: t.pos - this.ranges[0].from,
997
+ minRepeatType: this.parser.minRepeatTerm
998
+ });
999
+ }
1000
+ stackID(t) {
1001
+ let e = (T || (T = /* @__PURE__ */ new WeakMap())).get(t);
1002
+ return e || T.set(t, e = String.fromCodePoint(this.nextStackID++)), e + t;
1003
+ }
1004
+ }
1005
+ function D(l, t) {
1006
+ for (let e = 0; e < t.length; e++) {
1007
+ let s = t[e];
1008
+ if (s.pos == l.pos && s.sameState(l)) {
1009
+ t[e].score < l.score && (t[e] = l);
1010
+ return;
1011
+ }
1012
+ }
1013
+ t.push(l);
1014
+ }
1015
+ class Q {
1016
+ constructor(t, e, s) {
1017
+ this.source = t, this.flags = e, this.disabled = s;
1018
+ }
1019
+ allows(t) {
1020
+ return !this.disabled || this.disabled[t] == 0;
1021
+ }
1022
+ }
1023
+ const C = (l) => l;
1024
+ class Z {
1025
+ /**
1026
+ Define a context tracker.
1027
+ */
1028
+ constructor(t) {
1029
+ this.start = t.start, this.shift = t.shift || C, this.reduce = t.reduce || C, this.reuse = t.reuse || C, this.hash = t.hash || (() => 0), this.strict = t.strict !== !1;
1030
+ }
1031
+ }
1032
+ class w extends L {
1033
+ /**
1034
+ @internal
1035
+ */
1036
+ constructor(t) {
1037
+ if (super(), this.wrappers = [], t.version != 14)
1038
+ throw new RangeError(`Parser version (${t.version}) doesn't match runtime version (14)`);
1039
+ let e = t.nodeNames.split(" ");
1040
+ this.minRepeatTerm = e.length;
1041
+ for (let n = 0; n < t.repeatNodeCount; n++)
1042
+ e.push("");
1043
+ let s = Object.keys(t.topRules).map((n) => t.topRules[n][1]), i = [];
1044
+ for (let n = 0; n < e.length; n++)
1045
+ i.push([]);
1046
+ function h(n, o, a) {
1047
+ i[n].push([o, o.deserialize(String(a))]);
1048
+ }
1049
+ if (t.nodeProps)
1050
+ for (let n of t.nodeProps) {
1051
+ let o = n[0];
1052
+ typeof o == "string" && (o = y[o]);
1053
+ for (let a = 1; a < n.length; ) {
1054
+ let u = n[a++];
1055
+ if (u >= 0)
1056
+ h(u, o, n[a++]);
1057
+ else {
1058
+ let f = n[a + -u];
1059
+ for (let p = -u; p > 0; p--)
1060
+ h(n[a++], o, f);
1061
+ a++;
1062
+ }
1063
+ }
1064
+ }
1065
+ this.nodeSet = new M(e.map((n, o) => $.define({
1066
+ name: o >= this.minRepeatTerm ? void 0 : n,
1067
+ id: o,
1068
+ props: i[o],
1069
+ top: s.indexOf(o) > -1,
1070
+ error: o == 0,
1071
+ skipped: t.skippedNodes && t.skippedNodes.indexOf(o) > -1
1072
+ }))), t.propSources && (this.nodeSet = this.nodeSet.extend(...t.propSources)), this.strict = !1, this.bufferLength = E;
1073
+ let r = x(t.tokenData);
1074
+ this.context = t.context, this.specializerSpecs = t.specialized || [], this.specialized = new Uint16Array(this.specializerSpecs.length);
1075
+ for (let n = 0; n < this.specializerSpecs.length; n++)
1076
+ this.specialized[n] = this.specializerSpecs[n].term;
1077
+ this.specializers = this.specializerSpecs.map(B), this.states = x(t.states, Uint32Array), this.data = x(t.stateData), this.goto = x(t.goto), this.maxTerm = t.maxTerm, this.tokenizers = t.tokenizers.map((n) => typeof n == "number" ? new m(r, n) : n), this.topRules = t.topRules, this.dialects = t.dialects || {}, this.dynamicPrecedences = t.dynamicPrecedences || null, this.tokenPrecTable = t.tokenPrec, this.termNames = t.termNames || null, this.maxNode = this.nodeSet.types.length - 1, this.dialect = this.parseDialect(), this.top = this.topRules[Object.keys(this.topRules)[0]];
1078
+ }
1079
+ createParse(t, e, s) {
1080
+ let i = new K(this, t, e, s);
1081
+ for (let h of this.wrappers)
1082
+ i = h(i, t, e, s);
1083
+ return i;
1084
+ }
1085
+ /**
1086
+ Get a goto table entry @internal
1087
+ */
1088
+ getGoto(t, e, s = !1) {
1089
+ let i = this.goto;
1090
+ if (e >= i[0])
1091
+ return -1;
1092
+ for (let h = i[e + 1]; ; ) {
1093
+ let r = i[h++], n = r & 1, o = i[h++];
1094
+ if (n && s)
1095
+ return o;
1096
+ for (let a = h + (r >> 1); h < a; h++)
1097
+ if (i[h] == t)
1098
+ return o;
1099
+ if (n)
1100
+ return -1;
1101
+ }
1102
+ }
1103
+ /**
1104
+ Check if this state has an action for a given terminal @internal
1105
+ */
1106
+ hasAction(t, e) {
1107
+ let s = this.data;
1108
+ for (let i = 0; i < 2; i++)
1109
+ for (let h = this.stateSlot(
1110
+ t,
1111
+ i ? 2 : 1
1112
+ /* ParseState.Actions */
1113
+ ), r; ; h += 3) {
1114
+ if ((r = s[h]) == 65535)
1115
+ if (s[h + 1] == 1)
1116
+ r = s[h = k(s, h + 2)];
1117
+ else {
1118
+ if (s[h + 1] == 2)
1119
+ return k(s, h + 2);
1120
+ break;
1121
+ }
1122
+ if (r == e || r == 0)
1123
+ return k(s, h + 1);
1124
+ }
1125
+ return 0;
1126
+ }
1127
+ /**
1128
+ @internal
1129
+ */
1130
+ stateSlot(t, e) {
1131
+ return this.states[t * 6 + e];
1132
+ }
1133
+ /**
1134
+ @internal
1135
+ */
1136
+ stateFlag(t, e) {
1137
+ return (this.stateSlot(
1138
+ t,
1139
+ 0
1140
+ /* ParseState.Flags */
1141
+ ) & e) > 0;
1142
+ }
1143
+ /**
1144
+ @internal
1145
+ */
1146
+ validAction(t, e) {
1147
+ return !!this.allActions(t, (s) => s == e ? !0 : null);
1148
+ }
1149
+ /**
1150
+ @internal
1151
+ */
1152
+ allActions(t, e) {
1153
+ let s = this.stateSlot(
1154
+ t,
1155
+ 4
1156
+ /* ParseState.DefaultReduce */
1157
+ ), i = s ? e(s) : void 0;
1158
+ for (let h = this.stateSlot(
1159
+ t,
1160
+ 1
1161
+ /* ParseState.Actions */
1162
+ ); i == null; h += 3) {
1163
+ if (this.data[h] == 65535)
1164
+ if (this.data[h + 1] == 1)
1165
+ h = k(this.data, h + 2);
1166
+ else
1167
+ break;
1168
+ i = e(k(this.data, h + 1));
1169
+ }
1170
+ return i;
1171
+ }
1172
+ /**
1173
+ Get the states that can follow this one through shift actions or
1174
+ goto jumps. @internal
1175
+ */
1176
+ nextStates(t) {
1177
+ let e = [];
1178
+ for (let s = this.stateSlot(
1179
+ t,
1180
+ 1
1181
+ /* ParseState.Actions */
1182
+ ); ; s += 3) {
1183
+ if (this.data[s] == 65535)
1184
+ if (this.data[s + 1] == 1)
1185
+ s = k(this.data, s + 2);
1186
+ else
1187
+ break;
1188
+ if ((this.data[s + 2] & 1) == 0) {
1189
+ let i = this.data[s + 1];
1190
+ e.some((h, r) => r & 1 && h == i) || e.push(this.data[s], i);
1191
+ }
1192
+ }
1193
+ return e;
1194
+ }
1195
+ /**
1196
+ Configure the parser. Returns a new parser instance that has the
1197
+ given settings modified. Settings not provided in `config` are
1198
+ kept from the original parser.
1199
+ */
1200
+ configure(t) {
1201
+ let e = Object.assign(Object.create(w.prototype), this);
1202
+ if (t.props && (e.nodeSet = this.nodeSet.extend(...t.props)), t.top) {
1203
+ let s = this.topRules[t.top];
1204
+ if (!s)
1205
+ throw new RangeError(`Invalid top rule name ${t.top}`);
1206
+ e.top = s;
1207
+ }
1208
+ return t.tokenizers && (e.tokenizers = this.tokenizers.map((s) => {
1209
+ let i = t.tokenizers.find((h) => h.from == s);
1210
+ return i ? i.to : s;
1211
+ })), t.specializers && (e.specializers = this.specializers.slice(), e.specializerSpecs = this.specializerSpecs.map((s, i) => {
1212
+ let h = t.specializers.find((n) => n.from == s.external);
1213
+ if (!h)
1214
+ return s;
1215
+ let r = Object.assign(Object.assign({}, s), { external: h.to });
1216
+ return e.specializers[i] = B(r), r;
1217
+ })), t.contextTracker && (e.context = t.contextTracker), t.dialect && (e.dialect = this.parseDialect(t.dialect)), t.strict != null && (e.strict = t.strict), t.wrap && (e.wrappers = e.wrappers.concat(t.wrap)), t.bufferLength != null && (e.bufferLength = t.bufferLength), e;
1218
+ }
1219
+ /**
1220
+ Tells you whether any [parse wrappers](#lr.ParserConfig.wrap)
1221
+ are registered for this parser.
1222
+ */
1223
+ hasWrappers() {
1224
+ return this.wrappers.length > 0;
1225
+ }
1226
+ /**
1227
+ Returns the name associated with a given term. This will only
1228
+ work for all terms when the parser was generated with the
1229
+ `--names` option. By default, only the names of tagged terms are
1230
+ stored.
1231
+ */
1232
+ getName(t) {
1233
+ return this.termNames ? this.termNames[t] : String(t <= this.maxNode && this.nodeSet.types[t].name || t);
1234
+ }
1235
+ /**
1236
+ The eof term id is always allocated directly after the node
1237
+ types. @internal
1238
+ */
1239
+ get eofTerm() {
1240
+ return this.maxNode + 1;
1241
+ }
1242
+ /**
1243
+ The type of top node produced by the parser.
1244
+ */
1245
+ get topNode() {
1246
+ return this.nodeSet.types[this.top[1]];
1247
+ }
1248
+ /**
1249
+ @internal
1250
+ */
1251
+ dynamicPrecedence(t) {
1252
+ let e = this.dynamicPrecedences;
1253
+ return e == null ? 0 : e[t] || 0;
1254
+ }
1255
+ /**
1256
+ @internal
1257
+ */
1258
+ parseDialect(t) {
1259
+ let e = Object.keys(this.dialects), s = e.map(() => !1);
1260
+ if (t)
1261
+ for (let h of t.split(" ")) {
1262
+ let r = e.indexOf(h);
1263
+ r >= 0 && (s[r] = !0);
1264
+ }
1265
+ let i = null;
1266
+ for (let h = 0; h < e.length; h++)
1267
+ if (!s[h])
1268
+ for (let r = this.dialects[e[h]], n; (n = this.data[r++]) != 65535; )
1269
+ (i || (i = new Uint8Array(this.maxTerm + 1)))[n] = 1;
1270
+ return new Q(t, s, i);
1271
+ }
1272
+ /**
1273
+ Used by the output of the parser generator. Not available to
1274
+ user code. @hide
1275
+ */
1276
+ static deserialize(t) {
1277
+ return new w(t);
1278
+ }
1279
+ }
1280
+ function k(l, t) {
1281
+ return l[t] | l[t + 1] << 16;
1282
+ }
1283
+ function V(l) {
1284
+ let t = null;
1285
+ for (let e of l) {
1286
+ let s = e.p.stoppedAt;
1287
+ (e.pos == e.p.stream.end || s != null && e.pos > s) && e.p.parser.stateFlag(
1288
+ e.state,
1289
+ 2
1290
+ /* StateFlag.Accepting */
1291
+ ) && (!t || t.score < e.score) && (t = e);
1292
+ }
1293
+ return t;
1294
+ }
1295
+ function B(l) {
1296
+ if (l.external) {
1297
+ let t = l.extend ? 1 : 0;
1298
+ return (e, s) => l.external(e, s) << 1 | t;
1299
+ }
1300
+ return l.get;
1301
+ }
1302
+ export {
1303
+ Z as C,
1304
+ Y as E,
1305
+ w as L,
1306
+ H as a
1307
+ };