@spteck/react-controls-v2 2.3.91 → 2.4.1

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 (319) hide show
  1. package/dist/LocalizationProvider-BbfcY9z3.cjs +2 -0
  2. package/dist/{LocalizationProvider-te5iu_6z.js → LocalizationProvider-CvSHuk0e.js} +46 -46
  3. package/dist/{ar-Blifx2MN.js → ar-BPzd6WER.js} +1 -1
  4. package/dist/ar-CBSdRr5Q.cjs +2 -0
  5. package/dist/az-DoZjCfF0.cjs +2 -0
  6. package/dist/{az-CMhDjtnj.js → az-MWX-WDgc.js} +1 -1
  7. package/dist/{bg-C96WirSv.js → bg-CvRGS4sF.js} +1 -1
  8. package/dist/bg-DI8UD_HF.cjs +2 -0
  9. package/dist/bs-DQhZlEEo.cjs +2 -0
  10. package/dist/{bs-_St1wBE_.js → bs-aXQgChJT.js} +1 -1
  11. package/dist/{ca-QlLcV4wf.js → ca-BCXCXzgh.js} +1 -1
  12. package/dist/ca-DSC32tOX.cjs +2 -0
  13. package/dist/components/dropDownField/IOption.d.ts +2 -0
  14. package/dist/components/iconButton/IconButtonProps.d.ts +2 -0
  15. package/dist/cs-B0C33FJt.cjs +2 -0
  16. package/dist/{cs-MrS2bH7F.js → cs-VHWnqXwJ.js} +1 -1
  17. package/dist/cy-BNabORao.cjs +2 -0
  18. package/dist/{cy-BX97Tgwk.js → cy-qF-aNCW-.js} +1 -1
  19. package/dist/da-BmgXTEXm.cjs +2 -0
  20. package/dist/{da-BnewPPrh.js → da-rR5TnSBw.js} +1 -1
  21. package/dist/de-B4w38-0d.cjs +2 -0
  22. package/dist/{de-BSZuzGTL.js → de-DbeDjRNp.js} +1 -1
  23. package/dist/el-Cgk6VsxL.cjs +2 -0
  24. package/dist/{el-DrOk3N7-.js → el-DDeD6FiX.js} +1 -1
  25. package/dist/es-3ugMIZuA.cjs +2 -0
  26. package/dist/{es-CGqzubZ2.js → es-dvKffn6Q.js} +1 -1
  27. package/dist/et-CIIzxbat.cjs +2 -0
  28. package/dist/{et-DGqkocuq.js → et-DgZFBtK7.js} +1 -1
  29. package/dist/eu-BUNUOJ7E.cjs +2 -0
  30. package/dist/{eu-DEo7fdTW.js → eu-C6r1_PRy.js} +1 -1
  31. package/dist/{fi-DxErwnd5.js → fi-CzOKgmjK.js} +1 -1
  32. package/dist/fi-q6BFPHtt.cjs +2 -0
  33. package/dist/fr-BEnCZ733.cjs +2 -0
  34. package/dist/{fr-zrtSZX0o.js → fr-D0cDkdbn.js} +1 -1
  35. package/dist/{ga-CbHxGc9_.js → ga-0A7ndSzw.js} +1 -1
  36. package/dist/ga-BXyKTnJr.cjs +2 -0
  37. package/dist/{gl--w0P3RY4.js → gl-BNwj4XAu.js} +1 -1
  38. package/dist/gl-DR1C-hSi.cjs +2 -0
  39. package/dist/{he-DY19lzWp.js → he-BPiZ6D5h.js} +1 -1
  40. package/dist/he-OD1Ex2Fw.cjs +2 -0
  41. package/dist/{hi-CFSsoO_8.js → hi-CSgtp9Yg.js} +1 -1
  42. package/dist/hi-Dt9FvBmh.cjs +2 -0
  43. package/dist/{hr-DIRJ1Z8e.js → hr-CDSSj52Q.js} +1 -1
  44. package/dist/hr-DMzwNhar.cjs +2 -0
  45. package/dist/hu-Bc-rChfV.cjs +2 -0
  46. package/dist/{hu-DqYPRWZh.js → hu-TDJYiDOB.js} +1 -1
  47. package/dist/{id-Dgj7SUCi.js → id-B3IF5pnh.js} +1 -1
  48. package/dist/id-CwndN9HH.cjs +2 -0
  49. package/dist/index.cjs +105 -114
  50. package/dist/index.js +6162 -18503
  51. package/dist/{it-QdChHqVN.js → it-BLET318M.js} +1 -1
  52. package/dist/it-DaYS5Vil.cjs +2 -0
  53. package/dist/ja-BYA2LXHy.cjs +2 -0
  54. package/dist/{ja-BNS0BbY-.js → ja-NxwXLaKV.js} +1 -1
  55. package/dist/{kk-Dhkax68h.js → kk-CceJcjtl.js} +1 -1
  56. package/dist/kk-Ctrvuqlz.cjs +2 -0
  57. package/dist/{ko-heRMHZWp.js → ko-cS_OE967.js} +1 -1
  58. package/dist/ko-evIcpTG8.cjs +2 -0
  59. package/dist/lt-CYTLGgh6.cjs +2 -0
  60. package/dist/{lt-Decqbo8S.js → lt-CZ-kk_5b.js} +1 -1
  61. package/dist/{lv-wZASv0Lw.js → lv-BTvPpEjc.js} +1 -1
  62. package/dist/lv-COjitD3w.cjs +2 -0
  63. package/dist/mk-B-LF5gVL.cjs +2 -0
  64. package/dist/{mk-BTsLGTJT.js → mk-CSSyI3El.js} +1 -1
  65. package/dist/ms-CzEvkib0.cjs +2 -0
  66. package/dist/{ms-C0cVNwky.js → ms-Dz5JnKJ1.js} +1 -1
  67. package/dist/nb-B1KWSX94.cjs +2 -0
  68. package/dist/{nb-DGX4q4tS.js → nb-DkgTg1et.js} +1 -1
  69. package/dist/{nl-CnXZa8tZ.js → nl-CQ5eoxw2.js} +1 -1
  70. package/dist/nl-knWqo2aX.cjs +2 -0
  71. package/dist/{pl-DbIdTNpg.js → pl-BQJfOizT.js} +1 -1
  72. package/dist/pl-Ce6dq53t.cjs +2 -0
  73. package/dist/providers.cjs +1 -1
  74. package/dist/providers.js +1 -1
  75. package/dist/pt-BVqTnGkF.cjs +2 -0
  76. package/dist/{pt-CcKYweQk.js → pt-b0p7DoD0.js} +1 -1
  77. package/dist/ro-DqJMfhmX.cjs +2 -0
  78. package/dist/{ro-C-8tiqgA.js → ro-sbBtUVJV.js} +1 -1
  79. package/dist/ru-Dm2NAQyK.cjs +2 -0
  80. package/dist/{ru-Dhnz96q2.js → ru-ofzbka6D.js} +1 -1
  81. package/dist/sk-BNe6CHG-.cjs +2 -0
  82. package/dist/{sk-BU-Z5EsC.js → sk-BtpdNCPC.js} +1 -1
  83. package/dist/{sl-CcfjJFxo.js → sl-B4GsKLu6.js} +1 -1
  84. package/dist/sl-BKmEUGyu.cjs +2 -0
  85. package/dist/{sr-S53unrLA.js → sr-C76YVpkQ.js} +1 -1
  86. package/dist/sr-Dwya5lwF.cjs +2 -0
  87. package/dist/sv-BGL2G9Vm.cjs +2 -0
  88. package/dist/{sv-BiJrVfZr.js → sv-PesX57cX.js} +1 -1
  89. package/dist/{th-vQ7LQ7nD.js → th-CbCNOBnR.js} +1 -1
  90. package/dist/th-DEv6shFI.cjs +2 -0
  91. package/dist/{tr-C5RrNGLz.js → tr-B0TPxXKS.js} +1 -1
  92. package/dist/tr-BB-QonGE.cjs +2 -0
  93. package/dist/uk-B-3fLKpR.cjs +2 -0
  94. package/dist/{uk-WGCFH0fY.js → uk-_9cNoBNe.js} +1 -1
  95. package/dist/{vi-Waa7HkXq.js → vi-B8SfqLW6.js} +1 -1
  96. package/dist/vi-Dx6pJ0ir.cjs +2 -0
  97. package/dist/zh-DD0ml2HG.cjs +2 -0
  98. package/dist/{zh-BmUS7Wn_.js → zh-DqHnbp6B.js} +1 -1
  99. package/package.json +6 -3
  100. package/dist/LocalizationProvider-B6NxHbu2.cjs +0 -2
  101. package/dist/_arrayEach-BuSFKyFt.js +0 -54
  102. package/dist/_arrayEach-ChR-TejB.cjs +0 -2
  103. package/dist/_getTag-BRuLtYrv.js +0 -28
  104. package/dist/_getTag-D6VVyrEu.cjs +0 -2
  105. package/dist/ar-ip3bGOX3.cjs +0 -2
  106. package/dist/arc-4yb49ncY.js +0 -82
  107. package/dist/arc-djsA8IT0.cjs +0 -2
  108. package/dist/architecture-PBZL5I3N-CvTfVLFi.js +0 -3
  109. package/dist/architecture-PBZL5I3N-wZIE3ggH.cjs +0 -1
  110. package/dist/architectureDiagram-2XIMDMQ5-DFEvJNx1.cjs +0 -37
  111. package/dist/architectureDiagram-2XIMDMQ5-g-HotzpG.js +0 -4047
  112. package/dist/array-BNB_vRFv.cjs +0 -2
  113. package/dist/array-DP0duYiO.js +0 -8
  114. package/dist/az-CyVLdUDz.cjs +0 -2
  115. package/dist/bg-Bexoz3hL.cjs +0 -2
  116. package/dist/blockDiagram-WCTKOSBZ-DWgb5Ghz.js +0 -3165
  117. package/dist/blockDiagram-WCTKOSBZ-Dl04FBAy.cjs +0 -133
  118. package/dist/bs-MMcvhwLv.cjs +0 -2
  119. package/dist/c4Diagram-IC4MRINW-ClZvialQ.js +0 -2966
  120. package/dist/c4Diagram-IC4MRINW-ZFE2cGZP.cjs +0 -11
  121. package/dist/ca-BspMSeHN.cjs +0 -2
  122. package/dist/channel-2Bqnb1FY.js +0 -7
  123. package/dist/channel-5_aP1EVB.cjs +0 -2
  124. package/dist/chunk-4BX2VUAB-B5Va_oZz.js +0 -10
  125. package/dist/chunk-4BX2VUAB-BWDW-gYk.cjs +0 -2
  126. package/dist/chunk-55IACEB6-4ind_ByS.cjs +0 -2
  127. package/dist/chunk-55IACEB6-Pcyz_aR_.js +0 -10
  128. package/dist/chunk-7E7YKBS2-Sw9_w4gt.cjs +0 -2
  129. package/dist/chunk-7E7YKBS2-VHdgsed6.js +0 -25
  130. package/dist/chunk-7R4GIKGN-BKoqTTU_.cjs +0 -81
  131. package/dist/chunk-7R4GIKGN-CaQJ0QBF.js +0 -2598
  132. package/dist/chunk-C72U2L5F-CCvi6jiy.cjs +0 -2
  133. package/dist/chunk-C72U2L5F-MjJQTOMh.js +0 -25
  134. package/dist/chunk-D-IZpNpi.cjs +0 -1
  135. package/dist/chunk-EGIJ26TM-Bffl84Wq.cjs +0 -2
  136. package/dist/chunk-EGIJ26TM-DLMAfvpZ.js +0 -25
  137. package/dist/chunk-FMBD7UC4-BvqqU04Z.cjs +0 -16
  138. package/dist/chunk-FMBD7UC4-xjRtkFXe.js +0 -7
  139. package/dist/chunk-GEFDOKGD-BNgT40Ex.js +0 -1302
  140. package/dist/chunk-GEFDOKGD-BOwd6Jqp.cjs +0 -3
  141. package/dist/chunk-GLR3WWYH-DdNAJNRC.cjs +0 -2
  142. package/dist/chunk-GLR3WWYH-kyo6BUtq.js +0 -43
  143. package/dist/chunk-HHEYEP7N-DO1AYIZw.js +0 -11
  144. package/dist/chunk-HHEYEP7N-pdmgQZzP.cjs +0 -2
  145. package/dist/chunk-JSJVCQXG-Ci0seBb4.cjs +0 -2
  146. package/dist/chunk-JSJVCQXG-DowfYWcD.js +0 -62
  147. package/dist/chunk-KX2RTZJC-BJeOHReu.cjs +0 -2
  148. package/dist/chunk-KX2RTZJC-D-bUTSNy.js +0 -27
  149. package/dist/chunk-KYZI473N-DEPuSXaW.js +0 -3436
  150. package/dist/chunk-KYZI473N-DzBMFOER.cjs +0 -54
  151. package/dist/chunk-L3YUKLVL-BDGCTzmy.js +0 -25
  152. package/dist/chunk-L3YUKLVL-BZ17sqh5.cjs +0 -2
  153. package/dist/chunk-MX3YWQON-CAsnAj2e.js +0 -82
  154. package/dist/chunk-MX3YWQON-DulrBJdn.cjs +0 -2
  155. package/dist/chunk-NBPlniwU.js +0 -23
  156. package/dist/chunk-NQ4KR5QH-BJBAT2kM.cjs +0 -221
  157. package/dist/chunk-NQ4KR5QH-DFem-ORD.js +0 -2004
  158. package/dist/chunk-O4XLMI2P-BQF7MAo7.cjs +0 -8
  159. package/dist/chunk-O4XLMI2P-DA4TPzPG.js +0 -513
  160. package/dist/chunk-OZEHJAEY-CAiiXJUP.cjs +0 -2
  161. package/dist/chunk-OZEHJAEY-D7SX2SbR.js +0 -66
  162. package/dist/chunk-PQ6SQG4A-BZnW4-Sd.cjs +0 -2
  163. package/dist/chunk-PQ6SQG4A-ObFGkauo.js +0 -69
  164. package/dist/chunk-PU5JKC2W-BM5NPS-q.js +0 -1887
  165. package/dist/chunk-PU5JKC2W-eRU8wnTH.cjs +0 -71
  166. package/dist/chunk-QZHKN3VN-Dhli_tM0.cjs +0 -2
  167. package/dist/chunk-QZHKN3VN-x258g6EH.js +0 -17
  168. package/dist/chunk-R5LLSJPH-CNTEucEd.cjs +0 -2
  169. package/dist/chunk-R5LLSJPH-Gt27ml2m.js +0 -37
  170. package/dist/chunk-WL4C6EOR-CQXw6d0l.cjs +0 -190
  171. package/dist/chunk-WL4C6EOR-DuM6QmqM.js +0 -3196
  172. package/dist/chunk-XIRO2GV7-CswC9CO8.cjs +0 -2
  173. package/dist/chunk-XIRO2GV7-DXlO8X82.js +0 -32
  174. package/dist/chunk-XPW4576I-Bpsr4SZJ.js +0 -1148
  175. package/dist/chunk-XPW4576I-C68T-WIW.cjs +0 -33
  176. package/dist/chunk-XZSTWKYB-DJv9rEVU.cjs +0 -95
  177. package/dist/chunk-XZSTWKYB-jD9M1izK.js +0 -16132
  178. package/dist/chunk-YBOYWFTD-B6CeuteH.js +0 -34
  179. package/dist/chunk-YBOYWFTD-CiLW6HW_.cjs +0 -2
  180. package/dist/classDiagram-VBA2DB6C-Us0kuDfz.cjs +0 -2
  181. package/dist/classDiagram-VBA2DB6C-VOsE3gN0.js +0 -31
  182. package/dist/classDiagram-v2-RAHNMMFH-BWsm3ea6.cjs +0 -2
  183. package/dist/classDiagram-v2-RAHNMMFH-DPqMNfOz.js +0 -31
  184. package/dist/cose-bilkent-S5V4N54A-CKhwzobJ.js +0 -2252
  185. package/dist/cose-bilkent-S5V4N54A-DmyaRQ6l.cjs +0 -2
  186. package/dist/cs-FZSeHYld.cjs +0 -2
  187. package/dist/cy-CzQmM2lQ.cjs +0 -2
  188. package/dist/cytoscape.esm-CcJAI0wG.cjs +0 -322
  189. package/dist/cytoscape.esm-D9EjU25_.js +0 -18102
  190. package/dist/da-CexFt-Oj.cjs +0 -2
  191. package/dist/dagre-CpEPaL3r.cjs +0 -2
  192. package/dist/dagre-Dd8wCGc6.js +0 -1305
  193. package/dist/dagre-KLK3FWXG-BpxkjvB3.js +0 -294
  194. package/dist/dagre-KLK3FWXG-DIznPQl_.cjs +0 -5
  195. package/dist/de-B68HwuYu.cjs +0 -2
  196. package/dist/defaultLocale-CYOzCjwh.js +0 -203
  197. package/dist/defaultLocale-DSgylVA1.cjs +0 -2
  198. package/dist/diagram-E7M64L7V-dXqTi77U.cjs +0 -25
  199. package/dist/diagram-E7M64L7V-oX07GVAD.js +0 -529
  200. package/dist/diagram-IFDJBPK2-CriVAAmI.cjs +0 -44
  201. package/dist/diagram-IFDJBPK2-lCNF06_S.js +0 -215
  202. package/dist/diagram-P4PSJMXO-TfwVJh4S.js +0 -135
  203. package/dist/diagram-P4PSJMXO-k7F0lH6Q.cjs +0 -25
  204. package/dist/dist-CV9Ez7cn.js +0 -52
  205. package/dist/dist-DVthN7lF.cjs +0 -2
  206. package/dist/el-DQc4jSMd.cjs +0 -2
  207. package/dist/erDiagram-INFDFZHY-CDt3mOSU.cjs +0 -71
  208. package/dist/erDiagram-INFDFZHY-Ds_R2Ds4.js +0 -1668
  209. package/dist/es-DI8Y4Bv1.cjs +0 -2
  210. package/dist/et-DfaryKvp.cjs +0 -2
  211. package/dist/eu-BVOSXciF.cjs +0 -2
  212. package/dist/fi-C5L-OzaI.cjs +0 -2
  213. package/dist/flowDiagram-PKNHOUZH-7XJG07fo.cjs +0 -163
  214. package/dist/flowDiagram-PKNHOUZH-CkeYebJ5.js +0 -4163
  215. package/dist/fr-yFvjqx8B.cjs +0 -2
  216. package/dist/ga-6mVQhlWi.cjs +0 -2
  217. package/dist/ganttDiagram-A5KZAMGK-Bbck1pyM.cjs +0 -293
  218. package/dist/ganttDiagram-A5KZAMGK-CFT3Xn_r.js +0 -3074
  219. package/dist/gitGraph-HDMCJU4V-BKE04oIl.js +0 -3
  220. package/dist/gitGraph-HDMCJU4V-C9GYfOYb.cjs +0 -1
  221. package/dist/gitGraphDiagram-K3NZZRJ6-CXz9SHBX.js +0 -627
  222. package/dist/gitGraphDiagram-K3NZZRJ6-Dt4D-ig1.cjs +0 -66
  223. package/dist/gl-BJzJe1sq.cjs +0 -2
  224. package/dist/graphlib-CPo7oIsu.js +0 -223
  225. package/dist/graphlib-CmUS4Qin.cjs +0 -2
  226. package/dist/he-B3Bw3qr0.cjs +0 -2
  227. package/dist/hi-kofL-mD8.cjs +0 -2
  228. package/dist/hr-CDxqA9Jm.cjs +0 -2
  229. package/dist/hu-Defen_75.cjs +0 -2
  230. package/dist/id-DcwMRgmX.cjs +0 -2
  231. package/dist/identity-6JlhFhuM.cjs +0 -2
  232. package/dist/identity-C1jKsMoW.js +0 -395
  233. package/dist/info-3K5VOQVL-DfN_3mKd.js +0 -3
  234. package/dist/info-3K5VOQVL-d6J9FY0_.cjs +0 -1
  235. package/dist/infoDiagram-LFFYTUFH-Bp9btqnA.cjs +0 -3
  236. package/dist/infoDiagram-LFFYTUFH-DnvgRFnx.js +0 -21
  237. package/dist/init-BAFZAp9S.cjs +0 -2
  238. package/dist/init-m0TwgR4W.js +0 -17
  239. package/dist/isEmpty-BTp1uKIj.cjs +0 -2
  240. package/dist/isEmpty-uXVYZZYe.js +0 -17
  241. package/dist/ishikawaDiagram-PHBUUO56-DLaOkz38.js +0 -719
  242. package/dist/ishikawaDiagram-PHBUUO56-DmqObwMZ.cjs +0 -71
  243. package/dist/it-D5nM6KCi.cjs +0 -2
  244. package/dist/ja-BtuHirv7.cjs +0 -2
  245. package/dist/journeyDiagram-4ABVD52K-Cv0DbLMi.cjs +0 -140
  246. package/dist/journeyDiagram-4ABVD52K-DYmmcNK4.js +0 -885
  247. package/dist/kanban-definition-K7BYSVSG-BdQLAMeB.cjs +0 -90
  248. package/dist/kanban-definition-K7BYSVSG-CLEYqSz5.js +0 -973
  249. package/dist/katex-B-Nju2J8.js +0 -22002
  250. package/dist/katex-WY67Rp7A.cjs +0 -266
  251. package/dist/kk-BSl8IqgQ.cjs +0 -2
  252. package/dist/ko-eplb1GD0.cjs +0 -2
  253. package/dist/line-CbEBKCYr.js +0 -36
  254. package/dist/line-DqSdvtRR.cjs +0 -2
  255. package/dist/linear-DvLDpS6A.cjs +0 -2
  256. package/dist/linear-Eb79THx6.js +0 -291
  257. package/dist/lt-DsYAWFbF.cjs +0 -2
  258. package/dist/lv-DHmTjCb8.cjs +0 -2
  259. package/dist/maplibre-gl-qSrG75fp.js +0 -33003
  260. package/dist/maplibre-gl-tm_pVdmb.cjs +0 -757
  261. package/dist/math-DR9t6ixc.cjs +0 -2
  262. package/dist/math-DyURnvXC.js +0 -12
  263. package/dist/mermaid-parser.core-BdTB9qx-.js +0 -61
  264. package/dist/mermaid-parser.core-BlzF5RRD.cjs +0 -4
  265. package/dist/mindmap-definition-YRQLILUH-CzcVgr-U.js +0 -966
  266. package/dist/mindmap-definition-YRQLILUH-zWN_YXC3.cjs +0 -69
  267. package/dist/mk-CCV_308U.cjs +0 -2
  268. package/dist/ms-CH83xVYN.cjs +0 -2
  269. package/dist/nb-DZ-DlwcL.cjs +0 -2
  270. package/dist/nl-Xdf-A19i.cjs +0 -2
  271. package/dist/ordinal-BAWGEQkf.js +0 -67
  272. package/dist/ordinal-CL2X4e2C.cjs +0 -2
  273. package/dist/packet-RMMSAZCW-Bek1stRX.cjs +0 -1
  274. package/dist/packet-RMMSAZCW-DUN6t9lN.js +0 -3
  275. package/dist/path-Bt6guLtL.cjs +0 -2
  276. package/dist/path-DSzKK8fH.js +0 -87
  277. package/dist/pie-UPGHQEXC-DjqNO54R.js +0 -3
  278. package/dist/pie-UPGHQEXC-pJq6_YgE.cjs +0 -1
  279. package/dist/pieDiagram-SKSYHLDU-Ba-c0fRA.cjs +0 -31
  280. package/dist/pieDiagram-SKSYHLDU-ya07MTY-.js +0 -167
  281. package/dist/pl-BStql1S-.cjs +0 -2
  282. package/dist/pt-Dk4jELuZ.cjs +0 -2
  283. package/dist/quadrantDiagram-337W2JSQ-CQQEVC49.cjs +0 -8
  284. package/dist/quadrantDiagram-337W2JSQ-Dp_QyIEO.js +0 -1976
  285. package/dist/radar-KQ55EAFF-Bid2hXXI.cjs +0 -1
  286. package/dist/radar-KQ55EAFF-C6zhEkCz.js +0 -3
  287. package/dist/requirementDiagram-Z7DCOOCP-CRl2914V.js +0 -2203
  288. package/dist/requirementDiagram-Z7DCOOCP-CeMYhXEm.cjs +0 -74
  289. package/dist/ro-BvhMyTKh.cjs +0 -2
  290. package/dist/rough.esm-BjJ_weyP.cjs +0 -2
  291. package/dist/rough.esm-DBHP55VQ.js +0 -1354
  292. package/dist/ru-BQosng8l.cjs +0 -2
  293. package/dist/sankeyDiagram-WA2Y5GQK-BFrF47Iv.js +0 -922
  294. package/dist/sankeyDiagram-WA2Y5GQK-DDfjtQ4G.cjs +0 -11
  295. package/dist/sequenceDiagram-2WXFIKYE-B-zWyr9f.cjs +0 -146
  296. package/dist/sequenceDiagram-2WXFIKYE-BAd8OVlz.js +0 -4111
  297. package/dist/sk-BhA7UeAk.cjs +0 -2
  298. package/dist/sl-6Mczv4jG.cjs +0 -2
  299. package/dist/sr-CxObZdu0.cjs +0 -2
  300. package/dist/src-DFxq-N5I.cjs +0 -2
  301. package/dist/src-Dm6r9c7l.js +0 -2148
  302. package/dist/stateDiagram-RAJIS63D-C-tfqeC-.js +0 -219
  303. package/dist/stateDiagram-RAJIS63D-C1Aj8vJQ.cjs +0 -2
  304. package/dist/stateDiagram-v2-FVOUBMTO-C-w53gXL.js +0 -29
  305. package/dist/stateDiagram-v2-FVOUBMTO-VoIE_KVn.cjs +0 -2
  306. package/dist/sv-BfiunVuX.cjs +0 -2
  307. package/dist/th-BqLGltZi.cjs +0 -2
  308. package/dist/timeline-definition-YZTLITO2-CE1y2S_r.js +0 -832
  309. package/dist/timeline-definition-YZTLITO2-D8aFfnYE.cjs +0 -62
  310. package/dist/tr-Brwl4o_Z.cjs +0 -2
  311. package/dist/treemap-KZPCXAKY-D2v0uStP.cjs +0 -1
  312. package/dist/treemap-KZPCXAKY-DLE_f1Bk.js +0 -3
  313. package/dist/uk-CV49TRvS.cjs +0 -2
  314. package/dist/vennDiagram-LZ73GAT5-BSpVMORX.js +0 -1860
  315. package/dist/vennDiagram-LZ73GAT5-DvnB0e7u.cjs +0 -35
  316. package/dist/vi-JzM7bjn_.cjs +0 -2
  317. package/dist/xychartDiagram-JWTSCODW-0qbVGrDs.cjs +0 -8
  318. package/dist/xychartDiagram-JWTSCODW-DpIry-th.js +0 -2043
  319. package/dist/zh-DEm0SGzZ.cjs +0 -2
@@ -1,95 +0,0 @@
1
- const e=require(`./chunk-D-IZpNpi.cjs`),t=require(`./identity-6JlhFhuM.cjs`),n=require(`./_getTag-D6VVyrEu.cjs`),r=require(`./isEmpty-BTp1uKIj.cjs`),i=require(`./_arrayEach-ChR-TejB.cjs`);let a=require(`lodash-es`);function o(e){return typeof e==`object`&&!!e&&typeof e.$type==`string`}function s(e){return typeof e==`object`&&!!e&&typeof e.$refText==`string`&&`ref`in e}function c(e){return typeof e==`object`&&!!e&&typeof e.$refText==`string`&&`items`in e}function l(e){return typeof e==`object`&&!!e&&typeof e.name==`string`&&typeof e.type==`string`&&typeof e.path==`string`}function u(e){return typeof e==`object`&&!!e&&typeof e.info==`object`&&typeof e.message==`string`}var d=class{constructor(){this.subtypes={},this.allSubtypes={}}getAllTypes(){return Object.keys(this.types)}getReferenceType(e){let t=this.types[e.container.$type];if(!t)throw Error(`Type ${e.container.$type||`undefined`} not found.`);let n=t.properties[e.property]?.referenceType;if(!n)throw Error(`Property ${e.property||`undefined`} of type ${e.container.$type} is not a reference.`);return n}getTypeMetaData(e){return this.types[e]||{name:e,properties:{},superTypes:[]}}isInstance(e,t){return o(e)&&this.isSubtype(e.$type,t)}isSubtype(e,t){if(e===t)return!0;let n=this.subtypes[e];n||=this.subtypes[e]={};let r=n[t];if(r!==void 0)return r;{let r=this.types[e],i=r?r.superTypes.some(e=>this.isSubtype(e,t)):!1;return n[t]=i,i}}getAllSubTypes(e){let t=this.allSubtypes[e];if(t)return t;{let t=this.getAllTypes(),n=[];for(let r of t)this.isSubtype(r,e)&&n.push(r);return this.allSubtypes[e]=n,n}}};function f(e){return typeof e==`object`&&!!e&&Array.isArray(e.content)}function p(e){return typeof e==`object`&&!!e&&typeof e.tokenType==`object`}function m(e){return f(e)&&typeof e.fullText==`string`}var h=class e{constructor(e,t){this.startFn=e,this.nextFn=t}iterator(){let e={state:this.startFn(),next:()=>this.nextFn(e.state),[Symbol.iterator]:()=>e};return e}[Symbol.iterator](){return this.iterator()}isEmpty(){return!!this.iterator().next().done}count(){let e=this.iterator(),t=0,n=e.next();for(;!n.done;)t++,n=e.next();return t}toArray(){let e=[],t=this.iterator(),n;do n=t.next(),n.value!==void 0&&e.push(n.value);while(!n.done);return e}toSet(){return new Set(this)}toMap(e,t){let n=this.map(n=>[e?e(n):n,t?t(n):n]);return new Map(n)}toString(){return this.join()}concat(t){return new e(()=>({first:this.startFn(),firstDone:!1,iterator:t[Symbol.iterator]()}),e=>{let t;if(!e.firstDone){do if(t=this.nextFn(e.first),!t.done)return t;while(!t.done);e.firstDone=!0}do if(t=e.iterator.next(),!t.done)return t;while(!t.done);return y})}join(e=`,`){let t=this.iterator(),n=``,r,i=!1;do r=t.next(),r.done||(i&&(n+=e),n+=g(r.value)),i=!0;while(!r.done);return n}indexOf(e,t=0){let n=this.iterator(),r=0,i=n.next();for(;!i.done;){if(r>=t&&i.value===e)return r;i=n.next(),r++}return-1}every(e){let t=this.iterator(),n=t.next();for(;!n.done;){if(!e(n.value))return!1;n=t.next()}return!0}some(e){let t=this.iterator(),n=t.next();for(;!n.done;){if(e(n.value))return!0;n=t.next()}return!1}forEach(e){let t=this.iterator(),n=0,r=t.next();for(;!r.done;)e(r.value,n),r=t.next(),n++}map(t){return new e(this.startFn,e=>{let{done:n,value:r}=this.nextFn(e);return n?y:{done:!1,value:t(r)}})}filter(t){return new e(this.startFn,e=>{let n;do if(n=this.nextFn(e),!n.done&&t(n.value))return n;while(!n.done);return y})}nonNullable(){return this.filter(e=>e!=null)}reduce(e,t){let n=this.iterator(),r=t,i=n.next();for(;!i.done;)r=r===void 0?i.value:e(r,i.value),i=n.next();return r}reduceRight(e,t){return this.recursiveReduce(this.iterator(),e,t)}recursiveReduce(e,t,n){let r=e.next();if(r.done)return n;let i=this.recursiveReduce(e,t,n);return i===void 0?r.value:t(i,r.value)}find(e){let t=this.iterator(),n=t.next();for(;!n.done;){if(e(n.value))return n.value;n=t.next()}}findIndex(e){let t=this.iterator(),n=0,r=t.next();for(;!r.done;){if(e(r.value))return n;r=t.next(),n++}return-1}includes(e){let t=this.iterator(),n=t.next();for(;!n.done;){if(n.value===e)return!0;n=t.next()}return!1}flatMap(t){return new e(()=>({this:this.startFn()}),e=>{do{if(e.iterator){let t=e.iterator.next();if(t.done)e.iterator=void 0;else return t}let{done:n,value:r}=this.nextFn(e.this);if(!n){let n=t(r);if(_(n))e.iterator=n[Symbol.iterator]();else return{done:!1,value:n}}}while(e.iterator);return y})}flat(t){if(t===void 0&&(t=1),t<=0)return this;let n=t>1?this.flat(t-1):this;return new e(()=>({this:n.startFn()}),e=>{do{if(e.iterator){let t=e.iterator.next();if(t.done)e.iterator=void 0;else return t}let{done:t,value:r}=n.nextFn(e.this);if(!t)if(_(r))e.iterator=r[Symbol.iterator]();else return{done:!1,value:r}}while(e.iterator);return y})}head(){let e=this.iterator().next();if(!e.done)return e.value}tail(t=1){return new e(()=>{let e=this.startFn();for(let n=0;n<t;n++)if(this.nextFn(e).done)return e;return e},this.nextFn)}limit(t){return new e(()=>({size:0,state:this.startFn()}),e=>(e.size++,e.size>t?y:this.nextFn(e.state)))}distinct(t){return new e(()=>({set:new Set,internalState:this.startFn()}),e=>{let n;do if(n=this.nextFn(e.internalState),!n.done){let r=t?t(n.value):n.value;if(!e.set.has(r))return e.set.add(r),n}while(!n.done);return y})}exclude(e,t){let n=new Set;for(let r of e){let e=t?t(r):r;n.add(e)}return this.filter(e=>{let r=t?t(e):e;return!n.has(r)})}};function g(e){return typeof e==`string`?e:e===void 0?`undefined`:typeof e.toString==`function`?e.toString():Object.prototype.toString.call(e)}function _(e){return!!e&&typeof e[Symbol.iterator]==`function`}var v=new h(()=>void 0,()=>y),y=Object.freeze({done:!0,value:void 0});function b(...e){if(e.length===1){let t=e[0];if(t instanceof h)return t;if(_(t))return new h(()=>t[Symbol.iterator](),e=>e.next());if(typeof t.length==`number`)return new h(()=>({index:0}),e=>e.index<t.length?{done:!1,value:t[e.index++]}:y)}return e.length>1?new h(()=>({collIndex:0,arrIndex:0}),t=>{do{if(t.iterator){let e=t.iterator.next();if(!e.done)return e;t.iterator=void 0}if(t.array){if(t.arrIndex<t.array.length)return{done:!1,value:t.array[t.arrIndex++]};t.array=void 0,t.arrIndex=0}if(t.collIndex<e.length){let n=e[t.collIndex++];_(n)?t.iterator=n[Symbol.iterator]():n&&typeof n.length==`number`&&(t.array=n)}}while(t.iterator||t.array||t.collIndex<e.length);return y}):v}var x=class extends h{constructor(e,t,n){super(()=>({iterators:n?.includeRoot?[[e][Symbol.iterator]()]:[t(e)[Symbol.iterator]()],pruned:!1}),e=>{for(e.pruned&&=(e.iterators.pop(),!1);e.iterators.length>0;){let n=e.iterators[e.iterators.length-1].next();if(n.done)e.iterators.pop();else return e.iterators.push(t(n.value)[Symbol.iterator]()),n}return y})}iterator(){let e={state:this.startFn(),next:()=>this.nextFn(e.state),prune:()=>{e.state.pruned=!0},[Symbol.iterator]:()=>e};return e}},S;(function(e){function t(e){return e.reduce((e,t)=>e+t,0)}e.sum=t;function n(e){return e.reduce((e,t)=>e*t,0)}e.product=n;function r(e){return e.reduce((e,t)=>Math.min(e,t))}e.min=r;function i(e){return e.reduce((e,t)=>Math.max(e,t))}e.max=i})(S||={});function C(e,t={}){for(let[n,r]of Object.entries(e))n.startsWith(`$`)||(Array.isArray(r)?r.forEach((r,i)=>{o(r)&&(r.$container=e,r.$containerProperty=n,r.$containerIndex=i,t.deep&&C(r,t))}):o(r)&&(r.$container=e,r.$containerProperty=n,t.deep&&C(r,t)))}function w(e,t){let n=e;for(;n;){if(t(n))return n;n=n.$container}}function T(e){let t=E(e).$document;if(!t)throw Error(`AST node has no document.`);return t}function E(e){for(;e.$container;)e=e.$container;return e}function ee(e){return s(e)?e.ref?[e.ref]:[]:c(e)?e.items.map(e=>e.ref):[]}function te(e,t){if(!e)throw Error(`Node must be an AstNode.`);let n=t?.range;return new h(()=>({keys:Object.keys(e),keyIndex:0,arrayIndex:0}),t=>{for(;t.keyIndex<t.keys.length;){let r=t.keys[t.keyIndex];if(!r.startsWith(`$`)){let i=e[r];if(o(i)){if(t.keyIndex++,k(i,n))return{done:!1,value:i}}else if(Array.isArray(i)){for(;t.arrayIndex<i.length;){let e=i[t.arrayIndex++];if(o(e)&&k(e,n))return{done:!1,value:e}}t.arrayIndex=0}}t.keyIndex++}return y})}function D(e,t){if(!e)throw Error(`Root node must be an AstNode.`);return new x(e,e=>te(e,t))}function O(e,t){if(!e)throw Error(`Root node must be an AstNode.`);return t?.range&&!k(e,t.range)?new x(e,()=>[]):new x(e,e=>te(e,t),{includeRoot:!0})}function k(e,t){if(!t)return!0;let n=e.$cstNode?.range;return n?Pt(n,t):!1}function ne(e){return new h(()=>({keys:Object.keys(e),keyIndex:0,arrayIndex:0}),t=>{for(;t.keyIndex<t.keys.length;){let n=t.keys[t.keyIndex];if(!n.startsWith(`$`)){let r=e[n];if(s(r)||c(r))return t.keyIndex++,{done:!1,value:{reference:r,container:e,property:n}};if(Array.isArray(r)){for(;t.arrayIndex<r.length;){let i=t.arrayIndex++,a=r[i];if(s(a)||c(r))return{done:!1,value:{reference:a,container:e,property:n,index:i}}}t.arrayIndex=0}}t.keyIndex++}return y})}function re(e,t){let n=e.getTypeMetaData(t.$type),r=t;for(let e of Object.values(n.properties))e.defaultValue!==void 0&&r[e.name]===void 0&&(r[e.name]=ie(e.defaultValue))}function ie(e){return Array.isArray(e)?[...e.map(ie)]:e}var A={$type:`AbstractElement`,cardinality:`cardinality`};function ae(e){return L.isInstance(e,A.$type)}var oe={$type:`AbstractParserRule`};function j(e){return L.isInstance(e,oe.$type)}var M={$type:`AbstractRule`},N={$type:`AbstractType`},P={$type:`Action`,cardinality:`cardinality`,feature:`feature`,inferredType:`inferredType`,operator:`operator`,type:`type`};function se(e){return L.isInstance(e,P.$type)}var ce={$type:`Alternatives`,cardinality:`cardinality`,elements:`elements`};function le(e){return L.isInstance(e,ce.$type)}var ue={$type:`ArrayLiteral`,elements:`elements`},de={$type:`ArrayType`,elementType:`elementType`},fe={$type:`Assignment`,cardinality:`cardinality`,feature:`feature`,operator:`operator`,predicate:`predicate`,terminal:`terminal`};function F(e){return L.isInstance(e,fe.$type)}var pe={$type:`BooleanLiteral`,true:`true`};function me(e){return L.isInstance(e,pe.$type)}var he={$type:`CharacterRange`,cardinality:`cardinality`,left:`left`,lookahead:`lookahead`,parenthesized:`parenthesized`,right:`right`};function ge(e){return L.isInstance(e,he.$type)}var _e={$type:`Condition`},ve={$type:`Conjunction`,left:`left`,right:`right`};function ye(e){return L.isInstance(e,ve.$type)}var be={$type:`CrossReference`,cardinality:`cardinality`,deprecatedSyntax:`deprecatedSyntax`,isMulti:`isMulti`,terminal:`terminal`,type:`type`};function xe(e){return L.isInstance(e,be.$type)}var Se={$type:`Disjunction`,left:`left`,right:`right`};function Ce(e){return L.isInstance(e,Se.$type)}var we={$type:`EndOfFile`,cardinality:`cardinality`};function Te(e){return L.isInstance(e,we.$type)}var Ee={$type:`Grammar`,imports:`imports`,interfaces:`interfaces`,isDeclared:`isDeclared`,name:`name`,rules:`rules`,types:`types`},De={$type:`GrammarImport`,path:`path`},Oe={$type:`Group`,cardinality:`cardinality`,elements:`elements`,guardCondition:`guardCondition`,predicate:`predicate`};function ke(e){return L.isInstance(e,Oe.$type)}var Ae={$type:`InferredType`,name:`name`};function je(e){return L.isInstance(e,Ae.$type)}var I={$type:`InfixRule`,call:`call`,dataType:`dataType`,inferredType:`inferredType`,name:`name`,operators:`operators`,parameters:`parameters`,returnType:`returnType`};function Me(e){return L.isInstance(e,I.$type)}var Ne={$type:`InfixRuleOperatorList`,associativity:`associativity`,operators:`operators`},Pe={$type:`InfixRuleOperators`,precedences:`precedences`},Fe={$type:`Interface`,attributes:`attributes`,name:`name`,superTypes:`superTypes`};function Ie(e){return L.isInstance(e,Fe.$type)}var Le={$type:`Keyword`,cardinality:`cardinality`,predicate:`predicate`,value:`value`};function Re(e){return L.isInstance(e,Le.$type)}var ze={$type:`NamedArgument`,calledByName:`calledByName`,parameter:`parameter`,value:`value`},Be={$type:`NegatedToken`,cardinality:`cardinality`,lookahead:`lookahead`,parenthesized:`parenthesized`,terminal:`terminal`};function Ve(e){return L.isInstance(e,Be.$type)}var He={$type:`Negation`,value:`value`};function Ue(e){return L.isInstance(e,He.$type)}var We={$type:`NumberLiteral`,value:`value`},Ge={$type:`Parameter`,name:`name`},Ke={$type:`ParameterReference`,parameter:`parameter`};function qe(e){return L.isInstance(e,Ke.$type)}var Je={$type:`ParserRule`,dataType:`dataType`,definition:`definition`,entry:`entry`,fragment:`fragment`,inferredType:`inferredType`,name:`name`,parameters:`parameters`,returnType:`returnType`};function Ye(e){return L.isInstance(e,Je.$type)}var Xe={$type:`ReferenceType`,isMulti:`isMulti`,referenceType:`referenceType`},Ze={$type:`RegexToken`,cardinality:`cardinality`,lookahead:`lookahead`,parenthesized:`parenthesized`,regex:`regex`};function Qe(e){return L.isInstance(e,Ze.$type)}var $e={$type:`ReturnType`,name:`name`};function et(e){return L.isInstance(e,$e.$type)}var tt={$type:`RuleCall`,arguments:`arguments`,cardinality:`cardinality`,predicate:`predicate`,rule:`rule`};function nt(e){return L.isInstance(e,tt.$type)}var rt={$type:`SimpleType`,primitiveType:`primitiveType`,stringType:`stringType`,typeRef:`typeRef`};function it(e){return L.isInstance(e,rt.$type)}var at={$type:`StringLiteral`,value:`value`},ot={$type:`TerminalAlternatives`,cardinality:`cardinality`,elements:`elements`,lookahead:`lookahead`,parenthesized:`parenthesized`};function st(e){return L.isInstance(e,ot.$type)}var ct={$type:`TerminalElement`,cardinality:`cardinality`,lookahead:`lookahead`,parenthesized:`parenthesized`},lt={$type:`TerminalGroup`,cardinality:`cardinality`,elements:`elements`,lookahead:`lookahead`,parenthesized:`parenthesized`};function ut(e){return L.isInstance(e,lt.$type)}var dt={$type:`TerminalRule`,definition:`definition`,fragment:`fragment`,hidden:`hidden`,name:`name`,type:`type`};function ft(e){return L.isInstance(e,dt.$type)}var pt={$type:`TerminalRuleCall`,cardinality:`cardinality`,lookahead:`lookahead`,parenthesized:`parenthesized`,rule:`rule`};function mt(e){return L.isInstance(e,pt.$type)}var ht={$type:`Type`,name:`name`,type:`type`};function gt(e){return L.isInstance(e,ht.$type)}var _t={$type:`TypeAttribute`,defaultValue:`defaultValue`,isOptional:`isOptional`,name:`name`,type:`type`},vt={$type:`TypeDefinition`},yt={$type:`UnionType`,types:`types`},bt={$type:`UnorderedGroup`,cardinality:`cardinality`,elements:`elements`};function xt(e){return L.isInstance(e,bt.$type)}var St={$type:`UntilToken`,cardinality:`cardinality`,lookahead:`lookahead`,parenthesized:`parenthesized`,terminal:`terminal`};function Ct(e){return L.isInstance(e,St.$type)}var wt={$type:`ValueLiteral`},Tt={$type:`Wildcard`,cardinality:`cardinality`,lookahead:`lookahead`,parenthesized:`parenthesized`};function Et(e){return L.isInstance(e,Tt.$type)}var Dt=class extends d{constructor(){super(...arguments),this.types={AbstractElement:{name:A.$type,properties:{cardinality:{name:A.cardinality}},superTypes:[]},AbstractParserRule:{name:oe.$type,properties:{},superTypes:[M.$type,N.$type]},AbstractRule:{name:M.$type,properties:{},superTypes:[]},AbstractType:{name:N.$type,properties:{},superTypes:[]},Action:{name:P.$type,properties:{cardinality:{name:P.cardinality},feature:{name:P.feature},inferredType:{name:P.inferredType},operator:{name:P.operator},type:{name:P.type,referenceType:N.$type}},superTypes:[A.$type]},Alternatives:{name:ce.$type,properties:{cardinality:{name:ce.cardinality},elements:{name:ce.elements,defaultValue:[]}},superTypes:[A.$type]},ArrayLiteral:{name:ue.$type,properties:{elements:{name:ue.elements,defaultValue:[]}},superTypes:[wt.$type]},ArrayType:{name:de.$type,properties:{elementType:{name:de.elementType}},superTypes:[vt.$type]},Assignment:{name:fe.$type,properties:{cardinality:{name:fe.cardinality},feature:{name:fe.feature},operator:{name:fe.operator},predicate:{name:fe.predicate},terminal:{name:fe.terminal}},superTypes:[A.$type]},BooleanLiteral:{name:pe.$type,properties:{true:{name:pe.true,defaultValue:!1}},superTypes:[_e.$type,wt.$type]},CharacterRange:{name:he.$type,properties:{cardinality:{name:he.cardinality},left:{name:he.left},lookahead:{name:he.lookahead},parenthesized:{name:he.parenthesized,defaultValue:!1},right:{name:he.right}},superTypes:[ct.$type]},Condition:{name:_e.$type,properties:{},superTypes:[]},Conjunction:{name:ve.$type,properties:{left:{name:ve.left},right:{name:ve.right}},superTypes:[_e.$type]},CrossReference:{name:be.$type,properties:{cardinality:{name:be.cardinality},deprecatedSyntax:{name:be.deprecatedSyntax,defaultValue:!1},isMulti:{name:be.isMulti,defaultValue:!1},terminal:{name:be.terminal},type:{name:be.type,referenceType:N.$type}},superTypes:[A.$type]},Disjunction:{name:Se.$type,properties:{left:{name:Se.left},right:{name:Se.right}},superTypes:[_e.$type]},EndOfFile:{name:we.$type,properties:{cardinality:{name:we.cardinality}},superTypes:[A.$type]},Grammar:{name:Ee.$type,properties:{imports:{name:Ee.imports,defaultValue:[]},interfaces:{name:Ee.interfaces,defaultValue:[]},isDeclared:{name:Ee.isDeclared,defaultValue:!1},name:{name:Ee.name},rules:{name:Ee.rules,defaultValue:[]},types:{name:Ee.types,defaultValue:[]}},superTypes:[]},GrammarImport:{name:De.$type,properties:{path:{name:De.path}},superTypes:[]},Group:{name:Oe.$type,properties:{cardinality:{name:Oe.cardinality},elements:{name:Oe.elements,defaultValue:[]},guardCondition:{name:Oe.guardCondition},predicate:{name:Oe.predicate}},superTypes:[A.$type]},InferredType:{name:Ae.$type,properties:{name:{name:Ae.name}},superTypes:[N.$type]},InfixRule:{name:I.$type,properties:{call:{name:I.call},dataType:{name:I.dataType},inferredType:{name:I.inferredType},name:{name:I.name},operators:{name:I.operators},parameters:{name:I.parameters,defaultValue:[]},returnType:{name:I.returnType,referenceType:N.$type}},superTypes:[oe.$type]},InfixRuleOperatorList:{name:Ne.$type,properties:{associativity:{name:Ne.associativity},operators:{name:Ne.operators,defaultValue:[]}},superTypes:[]},InfixRuleOperators:{name:Pe.$type,properties:{precedences:{name:Pe.precedences,defaultValue:[]}},superTypes:[]},Interface:{name:Fe.$type,properties:{attributes:{name:Fe.attributes,defaultValue:[]},name:{name:Fe.name},superTypes:{name:Fe.superTypes,defaultValue:[],referenceType:N.$type}},superTypes:[N.$type]},Keyword:{name:Le.$type,properties:{cardinality:{name:Le.cardinality},predicate:{name:Le.predicate},value:{name:Le.value}},superTypes:[A.$type]},NamedArgument:{name:ze.$type,properties:{calledByName:{name:ze.calledByName,defaultValue:!1},parameter:{name:ze.parameter,referenceType:Ge.$type},value:{name:ze.value}},superTypes:[]},NegatedToken:{name:Be.$type,properties:{cardinality:{name:Be.cardinality},lookahead:{name:Be.lookahead},parenthesized:{name:Be.parenthesized,defaultValue:!1},terminal:{name:Be.terminal}},superTypes:[ct.$type]},Negation:{name:He.$type,properties:{value:{name:He.value}},superTypes:[_e.$type]},NumberLiteral:{name:We.$type,properties:{value:{name:We.value}},superTypes:[wt.$type]},Parameter:{name:Ge.$type,properties:{name:{name:Ge.name}},superTypes:[]},ParameterReference:{name:Ke.$type,properties:{parameter:{name:Ke.parameter,referenceType:Ge.$type}},superTypes:[_e.$type]},ParserRule:{name:Je.$type,properties:{dataType:{name:Je.dataType},definition:{name:Je.definition},entry:{name:Je.entry,defaultValue:!1},fragment:{name:Je.fragment,defaultValue:!1},inferredType:{name:Je.inferredType},name:{name:Je.name},parameters:{name:Je.parameters,defaultValue:[]},returnType:{name:Je.returnType,referenceType:N.$type}},superTypes:[oe.$type]},ReferenceType:{name:Xe.$type,properties:{isMulti:{name:Xe.isMulti,defaultValue:!1},referenceType:{name:Xe.referenceType}},superTypes:[vt.$type]},RegexToken:{name:Ze.$type,properties:{cardinality:{name:Ze.cardinality},lookahead:{name:Ze.lookahead},parenthesized:{name:Ze.parenthesized,defaultValue:!1},regex:{name:Ze.regex}},superTypes:[ct.$type]},ReturnType:{name:$e.$type,properties:{name:{name:$e.name}},superTypes:[]},RuleCall:{name:tt.$type,properties:{arguments:{name:tt.arguments,defaultValue:[]},cardinality:{name:tt.cardinality},predicate:{name:tt.predicate},rule:{name:tt.rule,referenceType:M.$type}},superTypes:[A.$type]},SimpleType:{name:rt.$type,properties:{primitiveType:{name:rt.primitiveType},stringType:{name:rt.stringType},typeRef:{name:rt.typeRef,referenceType:N.$type}},superTypes:[vt.$type]},StringLiteral:{name:at.$type,properties:{value:{name:at.value}},superTypes:[wt.$type]},TerminalAlternatives:{name:ot.$type,properties:{cardinality:{name:ot.cardinality},elements:{name:ot.elements,defaultValue:[]},lookahead:{name:ot.lookahead},parenthesized:{name:ot.parenthesized,defaultValue:!1}},superTypes:[ct.$type]},TerminalElement:{name:ct.$type,properties:{cardinality:{name:ct.cardinality},lookahead:{name:ct.lookahead},parenthesized:{name:ct.parenthesized,defaultValue:!1}},superTypes:[A.$type]},TerminalGroup:{name:lt.$type,properties:{cardinality:{name:lt.cardinality},elements:{name:lt.elements,defaultValue:[]},lookahead:{name:lt.lookahead},parenthesized:{name:lt.parenthesized,defaultValue:!1}},superTypes:[ct.$type]},TerminalRule:{name:dt.$type,properties:{definition:{name:dt.definition},fragment:{name:dt.fragment,defaultValue:!1},hidden:{name:dt.hidden,defaultValue:!1},name:{name:dt.name},type:{name:dt.type}},superTypes:[M.$type]},TerminalRuleCall:{name:pt.$type,properties:{cardinality:{name:pt.cardinality},lookahead:{name:pt.lookahead},parenthesized:{name:pt.parenthesized,defaultValue:!1},rule:{name:pt.rule,referenceType:dt.$type}},superTypes:[ct.$type]},Type:{name:ht.$type,properties:{name:{name:ht.name},type:{name:ht.type}},superTypes:[N.$type]},TypeAttribute:{name:_t.$type,properties:{defaultValue:{name:_t.defaultValue},isOptional:{name:_t.isOptional,defaultValue:!1},name:{name:_t.name},type:{name:_t.type}},superTypes:[]},TypeDefinition:{name:vt.$type,properties:{},superTypes:[]},UnionType:{name:yt.$type,properties:{types:{name:yt.types,defaultValue:[]}},superTypes:[vt.$type]},UnorderedGroup:{name:bt.$type,properties:{cardinality:{name:bt.cardinality},elements:{name:bt.elements,defaultValue:[]}},superTypes:[A.$type]},UntilToken:{name:St.$type,properties:{cardinality:{name:St.cardinality},lookahead:{name:St.lookahead},parenthesized:{name:St.parenthesized,defaultValue:!1},terminal:{name:St.terminal}},superTypes:[ct.$type]},ValueLiteral:{name:wt.$type,properties:{},superTypes:[]},Wildcard:{name:Tt.$type,properties:{cardinality:{name:Tt.cardinality},lookahead:{name:Tt.lookahead},parenthesized:{name:Tt.parenthesized,defaultValue:!1}},superTypes:[ct.$type]}}}},L=new Dt;function Ot(e){return new x(e,e=>f(e)?e.content:[],{includeRoot:!0})}function kt(e,t){for(;e.container;)if(e=e.container,e===t)return!0;return!1}function At(e){return{start:{character:e.startColumn-1,line:e.startLine-1},end:{character:e.endColumn,line:e.endLine-1}}}function jt(e){if(!e)return;let{offset:t,end:n,range:r}=e;return{range:r,offset:t,end:n,length:n-t}}var Mt;(function(e){e[e.Before=0]=`Before`,e[e.After=1]=`After`,e[e.OverlapFront=2]=`OverlapFront`,e[e.OverlapBack=3]=`OverlapBack`,e[e.Inside=4]=`Inside`,e[e.Outside=5]=`Outside`})(Mt||={});function Nt(e,t){if(e.end.line<t.start.line||e.end.line===t.start.line&&e.end.character<=t.start.character)return Mt.Before;if(e.start.line>t.end.line||e.start.line===t.end.line&&e.start.character>=t.end.character)return Mt.After;let n=e.start.line>t.start.line||e.start.line===t.start.line&&e.start.character>=t.start.character,r=e.end.line<t.end.line||e.end.line===t.end.line&&e.end.character<=t.end.character;return n&&r?Mt.Inside:n?Mt.OverlapBack:r?Mt.OverlapFront:Mt.Outside}function Pt(e,t){return Nt(e,t)>Mt.After}var Ft=/^[\w\p{L}]$/u;function It(e,t){if(e){let n=Rt(e,!0);if(n&&Lt(n,t))return n;if(m(e)){let n=e.content.findIndex(e=>!e.hidden);for(let r=n-1;r>=0;r--){let n=e.content[r];if(Lt(n,t))return n}}}}function Lt(e,t){return p(e)&&t.includes(e.tokenType.name)}function Rt(e,t=!0){for(;e.container;){let n=e.container,r=n.content.indexOf(e);for(;r>0;){r--;let e=n.content[r];if(t||!e.hidden)return e}e=n}}var zt=class extends Error{constructor(e,t){super(e?`${t} at ${e.range.start.line}:${e.range.start.character}`:t)}};function Bt(e,t=`Error: Got unexpected value.`){throw Error(t)}function R(e){return e.charCodeAt(0)}function Vt(e,t){Array.isArray(e)?e.forEach(function(e){t.push(e)}):t.push(e)}function Ht(e,t){if(e[t]===!0)throw`duplicate flag `+t;e[t],e[t]=!0}function Ut(e){if(e===void 0)throw Error(`Internal Error - Should never get here!`);return!0}function Wt(){throw Error(`Internal Error - Should never get here!`)}function Gt(e){return e.type===`Character`}var Kt=[];for(let e=R(`0`);e<=R(`9`);e++)Kt.push(e);var qt=[R(`_`)].concat(Kt);for(let e=R(`a`);e<=R(`z`);e++)qt.push(e);for(let e=R(`A`);e<=R(`Z`);e++)qt.push(e);var Jt=[R(` `),R(`\f`),R(`
2
- `),R(`\r`),R(` `),R(`\v`),R(` `),R(`\xA0`),R(` `),R(` `),R(` `),R(` `),R(` `),R(` `),R(` `),R(` `),R(` `),R(` `),R(` `),R(` `),R(`\u2028`),R(`\u2029`),R(` `),R(` `),R(` `),R(``)],Yt=/[0-9a-fA-F]/,Xt=/[0-9]/,Zt=/[1-9]/,Qt=class{constructor(){this.idx=0,this.input=``,this.groupIdx=0}saveState(){return{idx:this.idx,input:this.input,groupIdx:this.groupIdx}}restoreState(e){this.idx=e.idx,this.input=e.input,this.groupIdx=e.groupIdx}pattern(e){this.idx=0,this.input=e,this.groupIdx=0,this.consumeChar(`/`);let t=this.disjunction();this.consumeChar(`/`);let n={type:`Flags`,loc:{begin:this.idx,end:e.length},global:!1,ignoreCase:!1,multiLine:!1,unicode:!1,sticky:!1};for(;this.isRegExpFlag();)switch(this.popChar()){case`g`:Ht(n,`global`);break;case`i`:Ht(n,`ignoreCase`);break;case`m`:Ht(n,`multiLine`);break;case`u`:Ht(n,`unicode`);break;case`y`:Ht(n,`sticky`);break}if(this.idx!==this.input.length)throw Error(`Redundant input: `+this.input.substring(this.idx));return{type:`Pattern`,flags:n,value:t,loc:this.loc(0)}}disjunction(){let e=[],t=this.idx;for(e.push(this.alternative());this.peekChar()===`|`;)this.consumeChar(`|`),e.push(this.alternative());return{type:`Disjunction`,value:e,loc:this.loc(t)}}alternative(){let e=[],t=this.idx;for(;this.isTerm();)e.push(this.term());return{type:`Alternative`,value:e,loc:this.loc(t)}}term(){return this.isAssertion()?this.assertion():this.atom()}assertion(){let e=this.idx;switch(this.popChar()){case`^`:return{type:`StartAnchor`,loc:this.loc(e)};case`$`:return{type:`EndAnchor`,loc:this.loc(e)};case`\\`:switch(this.popChar()){case`b`:return{type:`WordBoundary`,loc:this.loc(e)};case`B`:return{type:`NonWordBoundary`,loc:this.loc(e)}}throw Error(`Invalid Assertion Escape`);case`(`:this.consumeChar(`?`);let t;switch(this.popChar()){case`=`:t=`Lookahead`;break;case`!`:t=`NegativeLookahead`;break;case`<`:switch(this.popChar()){case`=`:t=`Lookbehind`;break;case`!`:t=`NegativeLookbehind`}break}Ut(t);let n=this.disjunction();return this.consumeChar(`)`),{type:t,value:n,loc:this.loc(e)}}return Wt()}quantifier(e=!1){let t,n=this.idx;switch(this.popChar()){case`*`:t={atLeast:0,atMost:1/0};break;case`+`:t={atLeast:1,atMost:1/0};break;case`?`:t={atLeast:0,atMost:1};break;case`{`:let n=this.integerIncludingZero();switch(this.popChar()){case`}`:t={atLeast:n,atMost:n};break;case`,`:let e;this.isDigit()?(e=this.integerIncludingZero(),t={atLeast:n,atMost:e}):t={atLeast:n,atMost:1/0},this.consumeChar(`}`);break}if(e===!0&&t===void 0)return;Ut(t);break}if(!(e===!0&&t===void 0)&&Ut(t))return this.peekChar(0)===`?`?(this.consumeChar(`?`),t.greedy=!1):t.greedy=!0,t.type=`Quantifier`,t.loc=this.loc(n),t}atom(){let e,t=this.idx;switch(this.peekChar()){case`.`:e=this.dotAll();break;case`\\`:e=this.atomEscape();break;case`[`:e=this.characterClass();break;case`(`:e=this.group();break}return e===void 0&&this.isPatternCharacter()&&(e=this.patternCharacter()),Ut(e)?(e.loc=this.loc(t),this.isQuantifier()&&(e.quantifier=this.quantifier()),e):Wt()}dotAll(){return this.consumeChar(`.`),{type:`Set`,complement:!0,value:[R(`
3
- `),R(`\r`),R(`\u2028`),R(`\u2029`)]}}atomEscape(){switch(this.consumeChar(`\\`),this.peekChar()){case`1`:case`2`:case`3`:case`4`:case`5`:case`6`:case`7`:case`8`:case`9`:return this.decimalEscapeAtom();case`d`:case`D`:case`s`:case`S`:case`w`:case`W`:return this.characterClassEscape();case`f`:case`n`:case`r`:case`t`:case`v`:return this.controlEscapeAtom();case`c`:return this.controlLetterEscapeAtom();case`0`:return this.nulCharacterAtom();case`x`:return this.hexEscapeSequenceAtom();case`u`:return this.regExpUnicodeEscapeSequenceAtom();default:return this.identityEscapeAtom()}}decimalEscapeAtom(){return{type:`GroupBackReference`,value:this.positiveInteger()}}characterClassEscape(){let e,t=!1;switch(this.popChar()){case`d`:e=Kt;break;case`D`:e=Kt,t=!0;break;case`s`:e=Jt;break;case`S`:e=Jt,t=!0;break;case`w`:e=qt;break;case`W`:e=qt,t=!0;break}return Ut(e)?{type:`Set`,value:e,complement:t}:Wt()}controlEscapeAtom(){let e;switch(this.popChar()){case`f`:e=R(`\f`);break;case`n`:e=R(`
4
- `);break;case`r`:e=R(`\r`);break;case`t`:e=R(` `);break;case`v`:e=R(`\v`);break}return Ut(e)?{type:`Character`,value:e}:Wt()}controlLetterEscapeAtom(){this.consumeChar(`c`);let e=this.popChar();if(/[a-zA-Z]/.test(e)===!1)throw Error(`Invalid `);return{type:`Character`,value:e.toUpperCase().charCodeAt(0)-64}}nulCharacterAtom(){return this.consumeChar(`0`),{type:`Character`,value:R(`\0`)}}hexEscapeSequenceAtom(){return this.consumeChar(`x`),this.parseHexDigits(2)}regExpUnicodeEscapeSequenceAtom(){return this.consumeChar(`u`),this.parseHexDigits(4)}identityEscapeAtom(){return{type:`Character`,value:R(this.popChar())}}classPatternCharacterAtom(){switch(this.peekChar()){case`
5
- `:case`\r`:case`\u2028`:case`\u2029`:case`\\`:case`]`:throw Error(`TBD`);default:return{type:`Character`,value:R(this.popChar())}}}characterClass(){let e=[],t=!1;for(this.consumeChar(`[`),this.peekChar(0)===`^`&&(this.consumeChar(`^`),t=!0);this.isClassAtom();){let t=this.classAtom();if(t.type,Gt(t)&&this.isRangeDash()){this.consumeChar(`-`);let n=this.classAtom();if(n.type,Gt(n)){if(n.value<t.value)throw Error(`Range out of order in character class`);e.push({from:t.value,to:n.value})}else Vt(t.value,e),e.push(R(`-`)),Vt(n.value,e)}else Vt(t.value,e)}return this.consumeChar(`]`),{type:`Set`,complement:t,value:e}}classAtom(){switch(this.peekChar()){case`]`:case`
6
- `:case`\r`:case`\u2028`:case`\u2029`:throw Error(`TBD`);case`\\`:return this.classEscape();default:return this.classPatternCharacterAtom()}}classEscape(){switch(this.consumeChar(`\\`),this.peekChar()){case`b`:return this.consumeChar(`b`),{type:`Character`,value:R(`\b`)};case`d`:case`D`:case`s`:case`S`:case`w`:case`W`:return this.characterClassEscape();case`f`:case`n`:case`r`:case`t`:case`v`:return this.controlEscapeAtom();case`c`:return this.controlLetterEscapeAtom();case`0`:return this.nulCharacterAtom();case`x`:return this.hexEscapeSequenceAtom();case`u`:return this.regExpUnicodeEscapeSequenceAtom();default:return this.identityEscapeAtom()}}group(){let e=!0;switch(this.consumeChar(`(`),this.peekChar(0)){case`?`:this.consumeChar(`?`),this.consumeChar(`:`),e=!1;break;default:this.groupIdx++;break}let t=this.disjunction();this.consumeChar(`)`);let n={type:`Group`,capturing:e,value:t};return e&&(n.idx=this.groupIdx),n}positiveInteger(){let e=this.popChar();if(Zt.test(e)===!1)throw Error(`Expecting a positive integer`);for(;Xt.test(this.peekChar(0));)e+=this.popChar();return parseInt(e,10)}integerIncludingZero(){let e=this.popChar();if(Xt.test(e)===!1)throw Error(`Expecting an integer`);for(;Xt.test(this.peekChar(0));)e+=this.popChar();return parseInt(e,10)}patternCharacter(){let e=this.popChar();switch(e){case`
7
- `:case`\r`:case`\u2028`:case`\u2029`:case`^`:case`$`:case`\\`:case`.`:case`*`:case`+`:case`?`:case`(`:case`)`:case`[`:case`|`:throw Error(`TBD`);default:return{type:`Character`,value:R(e)}}}isRegExpFlag(){switch(this.peekChar(0)){case`g`:case`i`:case`m`:case`u`:case`y`:return!0;default:return!1}}isRangeDash(){return this.peekChar()===`-`&&this.isClassAtom(1)}isDigit(){return Xt.test(this.peekChar(0))}isClassAtom(e=0){switch(this.peekChar(e)){case`]`:case`
8
- `:case`\r`:case`\u2028`:case`\u2029`:return!1;default:return!0}}isTerm(){return this.isAtom()||this.isAssertion()}isAtom(){if(this.isPatternCharacter())return!0;switch(this.peekChar(0)){case`.`:case`\\`:case`[`:case`(`:return!0;default:return!1}}isAssertion(){switch(this.peekChar(0)){case`^`:case`$`:return!0;case`\\`:switch(this.peekChar(1)){case`b`:case`B`:return!0;default:return!1}case`(`:return this.peekChar(1)===`?`&&(this.peekChar(2)===`=`||this.peekChar(2)===`!`||this.peekChar(2)===`<`&&(this.peekChar(3)===`=`||this.peekChar(3)===`!`));default:return!1}}isQuantifier(){let e=this.saveState();try{return this.quantifier(!0)!==void 0}catch{return!1}finally{this.restoreState(e)}}isPatternCharacter(){switch(this.peekChar()){case`^`:case`$`:case`\\`:case`.`:case`*`:case`+`:case`?`:case`(`:case`)`:case`[`:case`|`:case`/`:case`
9
- `:case`\r`:case`\u2028`:case`\u2029`:return!1;default:return!0}}parseHexDigits(e){let t=``;for(let n=0;n<e;n++){let e=this.popChar();if(Yt.test(e)===!1)throw Error(`Expecting a HexDecimal digits`);t+=e}return{type:`Character`,value:parseInt(t,16)}}peekChar(e=0){return this.input[this.idx+e]}popChar(){let e=this.peekChar(0);return this.consumeChar(void 0),e}consumeChar(e){if(e!==void 0&&this.input[this.idx]!==e)throw Error(`Expected: '`+e+`' but found: '`+this.input[this.idx]+`' at offset: `+this.idx);if(this.idx>=this.input.length)throw Error(`Unexpected end of input`);this.idx++}loc(e){return{begin:e,end:this.idx}}},$t=class{visitChildren(e){for(let t in e){let n=e[t];e.hasOwnProperty(t)&&(n.type===void 0?Array.isArray(n)&&n.forEach(e=>{this.visit(e)},this):this.visit(n))}}visit(e){switch(e.type){case`Pattern`:this.visitPattern(e);break;case`Flags`:this.visitFlags(e);break;case`Disjunction`:this.visitDisjunction(e);break;case`Alternative`:this.visitAlternative(e);break;case`StartAnchor`:this.visitStartAnchor(e);break;case`EndAnchor`:this.visitEndAnchor(e);break;case`WordBoundary`:this.visitWordBoundary(e);break;case`NonWordBoundary`:this.visitNonWordBoundary(e);break;case`Lookahead`:this.visitLookahead(e);break;case`NegativeLookahead`:this.visitNegativeLookahead(e);break;case`Lookbehind`:this.visitLookbehind(e);break;case`NegativeLookbehind`:this.visitNegativeLookbehind(e);break;case`Character`:this.visitCharacter(e);break;case`Set`:this.visitSet(e);break;case`Group`:this.visitGroup(e);break;case`GroupBackReference`:this.visitGroupBackReference(e);break;case`Quantifier`:this.visitQuantifier(e);break}this.visitChildren(e)}visitPattern(e){}visitFlags(e){}visitDisjunction(e){}visitAlternative(e){}visitStartAnchor(e){}visitEndAnchor(e){}visitWordBoundary(e){}visitNonWordBoundary(e){}visitLookahead(e){}visitNegativeLookahead(e){}visitLookbehind(e){}visitNegativeLookbehind(e){}visitCharacter(e){}visitSet(e){}visitGroup(e){}visitGroupBackReference(e){}visitQuantifier(e){}},en=/\r?\n/gm,tn=new Qt,nn=new class extends $t{constructor(){super(...arguments),this.isStarting=!0,this.endRegexpStack=[],this.multiline=!1}get endRegex(){return this.endRegexpStack.join(``)}reset(e){this.multiline=!1,this.regex=e,this.startRegexp=``,this.isStarting=!0,this.endRegexpStack=[]}visitGroup(e){e.quantifier&&(this.isStarting=!1,this.endRegexpStack=[])}visitCharacter(e){let t=String.fromCharCode(e.value);if(!this.multiline&&t===`
10
- `&&(this.multiline=!0),e.quantifier)this.isStarting=!1,this.endRegexpStack=[];else{let e=sn(t);this.endRegexpStack.push(e),this.isStarting&&(this.startRegexp+=e)}}visitSet(e){if(!this.multiline){let t=this.regex.substring(e.loc.begin,e.loc.end),n=new RegExp(t);this.multiline=!!`
11
- `.match(n)}if(e.quantifier)this.isStarting=!1,this.endRegexpStack=[];else{let t=this.regex.substring(e.loc.begin,e.loc.end);this.endRegexpStack.push(t),this.isStarting&&(this.startRegexp+=t)}}visitChildren(e){e.type===`Group`&&e.quantifier||super.visitChildren(e)}};function rn(e){try{return typeof e==`string`&&(e=new RegExp(e)),e=e.toString(),nn.reset(e),nn.visit(tn.pattern(e)),nn.multiline}catch{return!1}}var an=`\f
12
- \r \v \xA0            \u2028\u2029   `.split(``);function on(e){let t=typeof e==`string`?new RegExp(e):e;return an.some(e=>t.test(e))}function sn(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function cn(e,t){let n=ln(e),r=t.match(n);return!!r&&r[0].length>0}function ln(e){typeof e==`string`&&(e=new RegExp(e));let t=e,n=e.source,r=0;function i(){let e=``,a;function o(t){e+=n.substr(r,t),r+=t}function s(t){e+=`(?:`+n.substr(r,t)+`|$)`,r+=t}for(;r<n.length;)switch(n[r]){case`\\`:switch(n[r+1]){case`c`:s(3);break;case`x`:s(4);break;case`u`:t.unicode?n[r+2]===`{`?s(n.indexOf(`}`,r)-r+1):s(6):s(2);break;case`p`:case`P`:t.unicode?s(n.indexOf(`}`,r)-r+1):s(2);break;case`k`:s(n.indexOf(`>`,r)-r+1);break;default:s(2);break}break;case`[`:a=/\[(?:\\.|.)*?\]/g,a.lastIndex=r,a=a.exec(n)||[],s(a[0].length);break;case`|`:case`^`:case`$`:case`*`:case`+`:case`?`:o(1);break;case`{`:a=/\{\d+,?\d*\}/g,a.lastIndex=r,a=a.exec(n),a?o(a[0].length):s(1);break;case`(`:if(n[r+1]===`?`)switch(n[r+2]){case`:`:e+=`(?:`,r+=3,e+=i()+`|$)`;break;case`=`:e+=`(?=`,r+=3,e+=i()+`)`;break;case`!`:a=r,r+=3,i(),e+=n.substr(a,r-a);break;case`<`:switch(n[r+3]){case`=`:case`!`:a=r,r+=4,i(),e+=n.substr(a,r-a);break;default:o(n.indexOf(`>`,r)-r+1),e+=i()+`|$)`;break}break}else o(1),e+=i()+`|$)`;break;case`)`:return++r,e;default:s(1);break}return e}return new RegExp(i(),e.flags)}function un(e){return e.rules.find(e=>Ye(e)&&e.entry)}function dn(e){return e.rules.filter(e=>ft(e)&&e.hidden)}function fn(e,t){let n=new Set,r=un(e);if(!r)return new Set(e.rules);let i=[r].concat(dn(e));for(let e of i)pn(e,n,t);let a=new Set;for(let t of e.rules)(n.has(t.name)||ft(t)&&t.hidden)&&a.add(t);return a}function pn(e,t,n){t.add(e.name),D(e).forEach(e=>{if(nt(e)||n&&mt(e)){let r=e.rule.ref;r&&!t.has(r.name)&&pn(r,t,n)}})}function mn(e){if(e.terminal)return e.terminal;if(e.type.ref)return Sn(e.type.ref)?.terminal}function hn(e){return e.hidden&&!on(An(e))}function gn(e,t){return!e||!t?[]:vn(e,t,e.astNode,!0)}function _n(e,t,n){if(!e||!t)return;let r=vn(e,t,e.astNode,!0);if(r.length!==0)return n=n===void 0?0:Math.max(0,Math.min(n,r.length-1)),r[n]}function vn(e,t,n,r){if(!r){let n=w(e.grammarSource,F);if(n&&n.feature===t)return[e]}return f(e)&&e.astNode===n?e.content.flatMap(e=>vn(e,t,n,!1)):[]}function yn(e,t,n){if(!e)return;let r=bn(e,t,e?.astNode);if(r.length!==0)return n=n===void 0?0:Math.max(0,Math.min(n,r.length-1)),r[n]}function bn(e,t,n){if(e.astNode!==n)return[];if(Re(e.grammarSource)&&e.grammarSource.value===t)return[e];let r=Ot(e).iterator(),i,a=[];do if(i=r.next(),!i.done){let e=i.value;e.astNode===n?Re(e.grammarSource)&&e.grammarSource.value===t&&a.push(e):r.prune()}while(!i.done);return a}function xn(e){let t=e.astNode;for(;t===e.container?.astNode;){let t=w(e.grammarSource,F);if(t)return t;e=e.container}}function Sn(e){let t=e;return je(t)&&(se(t.$container)?t=t.$container.$container:j(t.$container)?t=t.$container:Bt(t.$container)),Cn(e,t,new Map)}function Cn(e,t,n){function r(t,r){let i;return w(t,F)||(i=Cn(r,r,n)),n.set(e,i),i}if(n.has(e))return n.get(e);n.set(e,void 0);for(let i of D(t))if(F(i)&&i.feature.toLowerCase()===`name`)return n.set(e,i),i;else if(nt(i)&&Ye(i.rule.ref))return r(i,i.rule.ref);else if(it(i)&&i.typeRef?.ref)return r(i,i.typeRef.ref)}function wn(e){return Tn(e,new Set)}function Tn(e,t){if(t.has(e))return!0;t.add(e);for(let n of D(e))if(nt(n)){if(!n.rule.ref||Ye(n.rule.ref)&&!Tn(n.rule.ref,t)||Me(n.rule.ref))return!1}else if(F(n))return!1;else if(se(n))return!1;return!!e.definition}function En(e){if(!ft(e)){if(e.inferredType)return e.inferredType.name;if(e.dataType)return e.dataType;if(e.returnType){let t=e.returnType.ref;if(t)return t.name}}}function Dn(e){if(j(e))return Ye(e)&&wn(e)?e.name:En(e)??e.name;if(Ie(e)||gt(e)||et(e))return e.name;if(se(e)){let t=On(e);if(t)return t}else if(je(e))return e.name;throw Error(`Cannot get name of Unknown Type`)}function On(e){if(e.inferredType)return e.inferredType.name;if(e.type?.ref)return Dn(e.type.ref)}function kn(e){return ft(e)?e.type?.name??`string`:En(e)??e.name}function An(e){let t={s:!1,i:!1,u:!1},n=Mn(e.definition,t),r=Object.entries(t).filter(([,e])=>e).map(([e])=>e).join(``);return new RegExp(n,r)}var jn=`[\\s\\S]`;function Mn(e,t){if(st(e))return Nn(e);if(ut(e))return Pn(e);if(ge(e))return Ln(e);if(mt(e)){let t=e.rule.ref;if(!t)throw Error(`Missing rule reference.`);return zn(Mn(t.definition),{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized})}else if(Ve(e))return In(e);else if(Ct(e))return Fn(e);else if(Qe(e)){let n=e.regex.lastIndexOf(`/`),r=e.regex.substring(1,n),i=e.regex.substring(n+1);return t&&(t.i=i.includes(`i`),t.s=i.includes(`s`),t.u=i.includes(`u`)),zn(r,{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized,wrap:!1})}else if(Et(e))return zn(jn,{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized});else throw Error(`Invalid terminal element: ${e?.$type}, ${e?.$cstNode?.text}`)}function Nn(e){return zn(e.elements.map(e=>Mn(e)).join(`|`),{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized,wrap:!1})}function Pn(e){return zn(e.elements.map(e=>Mn(e)).join(``),{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized,wrap:!1})}function Fn(e){return zn(`${jn}*?${Mn(e.terminal)}`,{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized})}function In(e){return zn(`(?!${Mn(e.terminal)})${jn}*?`,{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized})}function Ln(e){return e.right?zn(`[${Rn(e.left)}-${Rn(e.right)}]`,{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized,wrap:!1}):zn(Rn(e.left),{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized,wrap:!1})}function Rn(e){return sn(e.value)}function zn(e,t){return(t.parenthesized||t.lookahead||t.wrap!==!1)&&(e=`(${t.lookahead??(t.parenthesized?``:`?:`)}${e})`),t.cardinality?`${e}${t.cardinality}`:e}function Bn(e){let t=[],n=e.Grammar;for(let e of n.rules)ft(e)&&hn(e)&&rn(An(e))&&t.push(e.name);return{multilineCommentRules:t,nameRegexp:Ft}}function Vn(e){console&&console.error&&console.error(`Error: ${e}`)}function Hn(e){console&&console.warn&&console.warn(`Warning: ${e}`)}function Un(e){let t=new Date().getTime(),n=e();return{time:new Date().getTime()-t,value:n}}function Wn(e){function t(){}t.prototype=e;let n=new t;function r(){return typeof n.bar}return r(),r(),e}function Gn(e){return Kn(e)?e.LABEL:e.name}function Kn(e){return(0,a.isString)(e.LABEL)&&e.LABEL!==``}var qn=class{get definition(){return this._definition}set definition(e){this._definition=e}constructor(e){this._definition=e}accept(e){e.visit(this),(0,a.forEach)(this.definition,t=>{t.accept(e)})}},Jn=class extends qn{constructor(e){super([]),this.idx=1,(0,a.assign)(this,(0,a.pickBy)(e,e=>e!==void 0))}set definition(e){}get definition(){return this.referencedRule===void 0?[]:this.referencedRule.definition}accept(e){e.visit(this)}},Yn=class extends qn{constructor(e){super(e.definition),this.orgText=``,(0,a.assign)(this,(0,a.pickBy)(e,e=>e!==void 0))}},Xn=class extends qn{constructor(e){super(e.definition),this.ignoreAmbiguities=!1,(0,a.assign)(this,(0,a.pickBy)(e,e=>e!==void 0))}},z=class extends qn{constructor(e){super(e.definition),this.idx=1,(0,a.assign)(this,(0,a.pickBy)(e,e=>e!==void 0))}},Zn=class extends qn{constructor(e){super(e.definition),this.idx=1,(0,a.assign)(this,(0,a.pickBy)(e,e=>e!==void 0))}},Qn=class extends qn{constructor(e){super(e.definition),this.idx=1,(0,a.assign)(this,(0,a.pickBy)(e,e=>e!==void 0))}},B=class extends qn{constructor(e){super(e.definition),this.idx=1,(0,a.assign)(this,(0,a.pickBy)(e,e=>e!==void 0))}},$n=class extends qn{constructor(e){super(e.definition),this.idx=1,(0,a.assign)(this,(0,a.pickBy)(e,e=>e!==void 0))}},er=class extends qn{get definition(){return this._definition}set definition(e){this._definition=e}constructor(e){super(e.definition),this.idx=1,this.ignoreAmbiguities=!1,this.hasPredicates=!1,(0,a.assign)(this,(0,a.pickBy)(e,e=>e!==void 0))}},V=class{constructor(e){this.idx=1,(0,a.assign)(this,(0,a.pickBy)(e,e=>e!==void 0))}accept(e){e.visit(this)}};function tr(e){return(0,a.map)(e,nr)}function nr(e){function t(e){return(0,a.map)(e,nr)}if(e instanceof Jn){let t={type:`NonTerminal`,name:e.nonTerminalName,idx:e.idx};return(0,a.isString)(e.label)&&(t.label=e.label),t}else if(e instanceof Xn)return{type:`Alternative`,definition:t(e.definition)};else if(e instanceof z)return{type:`Option`,idx:e.idx,definition:t(e.definition)};else if(e instanceof Zn)return{type:`RepetitionMandatory`,idx:e.idx,definition:t(e.definition)};else if(e instanceof Qn)return{type:`RepetitionMandatoryWithSeparator`,idx:e.idx,separator:nr(new V({terminalType:e.separator})),definition:t(e.definition)};else if(e instanceof $n)return{type:`RepetitionWithSeparator`,idx:e.idx,separator:nr(new V({terminalType:e.separator})),definition:t(e.definition)};else if(e instanceof B)return{type:`Repetition`,idx:e.idx,definition:t(e.definition)};else if(e instanceof er)return{type:`Alternation`,idx:e.idx,definition:t(e.definition)};else if(e instanceof V){let t={type:`Terminal`,name:e.terminalType.name,label:Gn(e.terminalType),idx:e.idx};(0,a.isString)(e.label)&&(t.terminalLabel=e.label);let n=e.terminalType.PATTERN;return e.terminalType.PATTERN&&(t.pattern=(0,a.isRegExp)(n)?n.source:n),t}else if(e instanceof Yn)return{type:`Rule`,name:e.name,orgText:e.orgText,definition:t(e.definition)};else throw Error(`non exhaustive match`)}var rr=class{visit(e){let t=e;switch(t.constructor){case Jn:return this.visitNonTerminal(t);case Xn:return this.visitAlternative(t);case z:return this.visitOption(t);case Zn:return this.visitRepetitionMandatory(t);case Qn:return this.visitRepetitionMandatoryWithSeparator(t);case $n:return this.visitRepetitionWithSeparator(t);case B:return this.visitRepetition(t);case er:return this.visitAlternation(t);case V:return this.visitTerminal(t);case Yn:return this.visitRule(t);default:throw Error(`non exhaustive match`)}}visitNonTerminal(e){}visitAlternative(e){}visitOption(e){}visitRepetition(e){}visitRepetitionMandatory(e){}visitRepetitionMandatoryWithSeparator(e){}visitRepetitionWithSeparator(e){}visitAlternation(e){}visitTerminal(e){}visitRule(e){}};function ir(e){return e instanceof Xn||e instanceof z||e instanceof B||e instanceof Zn||e instanceof Qn||e instanceof $n||e instanceof V||e instanceof Yn}function ar(e,t=[]){return e instanceof z||e instanceof B||e instanceof $n?!0:e instanceof er?(0,a.some)(e.definition,e=>ar(e,t)):e instanceof Jn&&(0,a.includes)(t,e)?!1:e instanceof qn?(e instanceof Jn&&t.push(e),(0,a.every)(e.definition,e=>ar(e,t))):!1}function or(e){return e instanceof er}function sr(e){if(e instanceof Jn)return`SUBRULE`;if(e instanceof z)return`OPTION`;if(e instanceof er)return`OR`;if(e instanceof Zn)return`AT_LEAST_ONE`;if(e instanceof Qn)return`AT_LEAST_ONE_SEP`;if(e instanceof $n)return`MANY_SEP`;if(e instanceof B)return`MANY`;if(e instanceof V)return`CONSUME`;throw Error(`non exhaustive match`)}var cr=class{walk(e,t=[]){(0,a.forEach)(e.definition,(n,r)=>{let i=(0,a.drop)(e.definition,r+1);if(n instanceof Jn)this.walkProdRef(n,i,t);else if(n instanceof V)this.walkTerminal(n,i,t);else if(n instanceof Xn)this.walkFlat(n,i,t);else if(n instanceof z)this.walkOption(n,i,t);else if(n instanceof Zn)this.walkAtLeastOne(n,i,t);else if(n instanceof Qn)this.walkAtLeastOneSep(n,i,t);else if(n instanceof $n)this.walkManySep(n,i,t);else if(n instanceof B)this.walkMany(n,i,t);else if(n instanceof er)this.walkOr(n,i,t);else throw Error(`non exhaustive match`)})}walkTerminal(e,t,n){}walkProdRef(e,t,n){}walkFlat(e,t,n){let r=t.concat(n);this.walk(e,r)}walkOption(e,t,n){let r=t.concat(n);this.walk(e,r)}walkAtLeastOne(e,t,n){let r=[new z({definition:e.definition})].concat(t,n);this.walk(e,r)}walkAtLeastOneSep(e,t,n){let r=lr(e,t,n);this.walk(e,r)}walkMany(e,t,n){let r=[new z({definition:e.definition})].concat(t,n);this.walk(e,r)}walkManySep(e,t,n){let r=lr(e,t,n);this.walk(e,r)}walkOr(e,t,n){let r=t.concat(n);(0,a.forEach)(e.definition,e=>{let t=new Xn({definition:[e]});this.walk(t,r)})}};function lr(e,t,n){return[new z({definition:[new V({terminalType:e.separator})].concat(e.definition)})].concat(t,n)}function ur(e){if(e instanceof Jn)return ur(e.referencedRule);if(e instanceof V)return pr(e);if(ir(e))return dr(e);if(or(e))return fr(e);throw Error(`non exhaustive match`)}function dr(e){let t=[],n=e.definition,r=0,i=n.length>r,o,s=!0;for(;i&&s;)o=n[r],s=ar(o),t=t.concat(ur(o)),r+=1,i=n.length>r;return(0,a.uniq)(t)}function fr(e){return(0,a.uniq)((0,a.flatten)((0,a.map)(e.definition,e=>ur(e))))}function pr(e){return[e.terminalType]}var mr=`_~IN~_`,hr=class extends cr{constructor(e){super(),this.topProd=e,this.follows={}}startWalking(){return this.walk(this.topProd),this.follows}walkTerminal(e,t,n){}walkProdRef(e,t,n){let r=_r(e.referencedRule,e.idx)+this.topProd.name,i=ur(new Xn({definition:t.concat(n)}));this.follows[r]=i}};function gr(e){let t={};return(0,a.forEach)(e,e=>{(0,a.assign)(t,new hr(e).startWalking())}),t}function _r(e,t){return e.name+t+mr}var vr={},yr=new Qt;function br(e){let t=e.toString();if(vr.hasOwnProperty(t))return vr[t];{let e=yr.pattern(t);return vr[t]=e,e}}function xr(){vr={}}var Sr=`Complement Sets are not supported for first char optimization`,Cr=`Unable to use "first char" lexer optimizations:
13
- `;function wr(e,t=!1){try{let t=br(e);return Tr(t.value,{},t.flags.ignoreCase)}catch(n){if(n.message===Sr)t&&Hn(`${Cr}\tUnable to optimize: < ${e.toString()} >\n Complement Sets cannot be automatically optimized.
14
- This will disable the lexer's first char optimizations.
15
- See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#COMPLEMENT for details.`);else{let n=``;t&&(n=`
16
- This will disable the lexer's first char optimizations.
17
- See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#REGEXP_PARSING for details.`),Vn(`${Cr}\n\tFailed parsing: < ${e.toString()} >\n\tUsing the @chevrotain/regexp-to-ast library\n Please open an issue at: https://github.com/chevrotain/chevrotain/issues`+n)}}return[]}function Tr(e,t,n){switch(e.type){case`Disjunction`:for(let r=0;r<e.value.length;r++)Tr(e.value[r],t,n);break;case`Alternative`:let r=e.value;for(let e=0;e<r.length;e++){let i=r[e];switch(i.type){case`EndAnchor`:case`GroupBackReference`:case`Lookahead`:case`NegativeLookahead`:case`Lookbehind`:case`NegativeLookbehind`:case`StartAnchor`:case`WordBoundary`:case`NonWordBoundary`:continue}let o=i;switch(o.type){case`Character`:Er(o.value,t,n);break;case`Set`:if(o.complement===!0)throw Error(Sr);(0,a.forEach)(o.value,e=>{if(typeof e==`number`)Er(e,t,n);else{let r=e;if(n===!0)for(let e=r.from;e<=r.to;e++)Er(e,t,n);else{for(let e=r.from;e<=r.to&&e<256;e++)Er(e,t,n);if(r.to>=256){let e=r.from>=256?r.from:256,n=r.to,i=di(e),a=di(n);for(let e=i;e<=a;e++)t[e]=e}}}});break;case`Group`:Tr(o.value,t,n);break;default:throw Error(`Non Exhaustive Match`)}let s=o.quantifier!==void 0&&o.quantifier.atLeast===0;if(o.type===`Group`&&kr(o)===!1||o.type!==`Group`&&s===!1)break}break;default:throw Error(`non exhaustive match!`)}return(0,a.values)(t)}function Er(e,t,n){let r=di(e);t[r]=r,n===!0&&Dr(e,t)}function Dr(e,t){let n=String.fromCharCode(e),r=n.toUpperCase();if(r!==n){let e=di(r.charCodeAt(0));t[e]=e}else{let e=n.toLowerCase();if(e!==n){let n=di(e.charCodeAt(0));t[n]=n}}}function Or(e,t){return(0,a.find)(e.value,e=>{if(typeof e==`number`)return(0,a.includes)(t,e);{let n=e;return(0,a.find)(t,e=>n.from<=e&&e<=n.to)!==void 0}})}function kr(e){let t=e.quantifier;return t&&t.atLeast===0?!0:e.value?(0,a.isArray)(e.value)?(0,a.every)(e.value,kr):kr(e.value):!1}var Ar=class extends $t{constructor(e){super(),this.targetCharCodes=e,this.found=!1}visitChildren(e){if(this.found!==!0){switch(e.type){case`Lookahead`:this.visitLookahead(e);return;case`NegativeLookahead`:this.visitNegativeLookahead(e);return;case`Lookbehind`:this.visitLookbehind(e);return;case`NegativeLookbehind`:this.visitNegativeLookbehind(e);return}super.visitChildren(e)}}visitCharacter(e){(0,a.includes)(this.targetCharCodes,e.value)&&(this.found=!0)}visitSet(e){e.complement?Or(e,this.targetCharCodes)===void 0&&(this.found=!0):Or(e,this.targetCharCodes)!==void 0&&(this.found=!0)}};function jr(e,t){if(t instanceof RegExp){let n=br(t),r=new Ar(e);return r.visit(n),r.found}else return(0,a.find)(t,t=>(0,a.includes)(e,t.charCodeAt(0)))!==void 0}var Mr=`PATTERN`,Nr=`defaultMode`,Pr=`modes`;function Fr(e,t){t=(0,a.defaults)(t,{debug:!1,safeMode:!1,positionTracking:`full`,lineTerminatorCharacters:[`\r`,`
18
- `],tracer:(e,t)=>t()});let n=t.tracer;n(`initCharCodeToOptimizedIndexMap`,()=>{fi()});let r;n(`Reject Lexer.NA`,()=>{r=(0,a.reject)(e,e=>e[Mr]===Ai.NA)});let i=!1,o;n(`Transform Patterns`,()=>{i=!1,o=(0,a.map)(r,e=>{let t=e[Mr];if((0,a.isRegExp)(t)){let e=t.source;return e.length===1&&e!==`^`&&e!==`$`&&e!==`.`&&!t.ignoreCase?e:e.length===2&&e[0]===`\\`&&!(0,a.includes)([`d`,`D`,`s`,`S`,`t`,`r`,`n`,`t`,`0`,`c`,`b`,`B`,`f`,`v`,`w`,`W`],e[1])?e[1]:$r(t)}else if((0,a.isFunction)(t))return i=!0,{exec:t};else if(typeof t==`object`)return i=!0,t;else if(typeof t==`string`){if(t.length===1)return t;{let e=t.replace(/[\\^$.*+?()[\]{}|]/g,`\\$&`);return $r(new RegExp(e))}}else throw Error(`non exhaustive match`)})});let s,c,l,u,d;n(`misc mapping`,()=>{s=(0,a.map)(r,e=>e.tokenTypeIdx),c=(0,a.map)(r,e=>{let t=e.GROUP;if(t!==Ai.SKIPPED){if((0,a.isString)(t))return t;if((0,a.isUndefined)(t))return!1;throw Error(`non exhaustive match`)}}),l=(0,a.map)(r,e=>{let t=e.LONGER_ALT;if(t)return(0,a.isArray)(t)?(0,a.map)(t,e=>(0,a.indexOf)(r,e)):[(0,a.indexOf)(r,t)]}),u=(0,a.map)(r,e=>e.PUSH_MODE),d=(0,a.map)(r,e=>(0,a.has)(e,`POP_MODE`))});let f;n(`Line Terminator Handling`,()=>{let e=ci(t.lineTerminatorCharacters);f=(0,a.map)(r,e=>!1),t.positionTracking!==`onlyOffset`&&(f=(0,a.map)(r,t=>(0,a.has)(t,`LINE_BREAKS`)?!!t.LINE_BREAKS:oi(t,e)===!1&&jr(e,t.PATTERN)))});let p,m,h,g;n(`Misc Mapping #2`,()=>{p=(0,a.map)(r,ri),m=(0,a.map)(o,ii),h=(0,a.reduce)(r,(e,t)=>{let n=t.GROUP;return(0,a.isString)(n)&&n!==Ai.SKIPPED&&(e[n]=[]),e},{}),g=(0,a.map)(o,(e,t)=>({pattern:o[t],longerAlt:l[t],canLineTerminator:f[t],isCustom:p[t],short:m[t],group:c[t],push:u[t],pop:d[t],tokenTypeIdx:s[t],tokenType:r[t]}))});let _=!0,v=[];return t.safeMode||n(`First Char Optimization`,()=>{v=(0,a.reduce)(r,(e,n,r)=>{if(typeof n.PATTERN==`string`)li(e,di(n.PATTERN.charCodeAt(0)),g[r]);else if((0,a.isArray)(n.START_CHARS_HINT)){let t;(0,a.forEach)(n.START_CHARS_HINT,n=>{let i=di(typeof n==`string`?n.charCodeAt(0):n);t!==i&&(t=i,li(e,i,g[r]))})}else if((0,a.isRegExp)(n.PATTERN))if(n.PATTERN.unicode)_=!1,t.ensureOptimizations&&Vn(`${Cr}\tUnable to analyze < ${n.PATTERN.toString()} > pattern.\n The regexp unicode flag is not currently supported by the regexp-to-ast library.
19
- This will disable the lexer's first char optimizations.
20
- For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNICODE_OPTIMIZE`);else{let i=wr(n.PATTERN,t.ensureOptimizations);(0,a.isEmpty)(i)&&(_=!1),(0,a.forEach)(i,t=>{li(e,t,g[r])})}else t.ensureOptimizations&&Vn(`${Cr}\tTokenType: <${n.name}> is using a custom token pattern without providing <start_chars_hint> parameter.\n This will disable the lexer's first char optimizations.
21
- For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_OPTIMIZE`),_=!1;return e},[])}),{emptyGroups:h,patternIdxToConfig:g,charCodeToPatternIdxToConfig:v,hasCustom:i,canBeOptimized:_}}function Ir(e,t){let n=[],r=Rr(e);n=n.concat(r.errors);let i=zr(r.valid),a=i.valid;return n=n.concat(i.errors),n=n.concat(Lr(a)),n=n.concat(qr(a)),n=n.concat(Jr(a,t)),n=n.concat(Yr(a)),n}function Lr(e){let t=[],n=(0,a.filter)(e,e=>(0,a.isRegExp)(e[Mr]));return t=t.concat(Vr(n)),t=t.concat(Wr(n)),t=t.concat(Gr(n)),t=t.concat(Kr(n)),t=t.concat(Hr(n)),t}function Rr(e){let t=(0,a.filter)(e,e=>!(0,a.has)(e,Mr));return{errors:(0,a.map)(t,e=>({message:`Token Type: ->`+e.name+`<- missing static 'PATTERN' property`,type:H.MISSING_PATTERN,tokenTypes:[e]})),valid:(0,a.difference)(e,t)}}function zr(e){let t=(0,a.filter)(e,e=>{let t=e[Mr];return!(0,a.isRegExp)(t)&&!(0,a.isFunction)(t)&&!(0,a.has)(t,`exec`)&&!(0,a.isString)(t)});return{errors:(0,a.map)(t,e=>({message:`Token Type: ->`+e.name+`<- static 'PATTERN' can only be a RegExp, a Function matching the {CustomPatternMatcherFunc} type or an Object matching the {ICustomPattern} interface.`,type:H.INVALID_PATTERN,tokenTypes:[e]})),valid:(0,a.difference)(e,t)}}var Br=/[^\\][$]/;function Vr(e){class t extends $t{constructor(){super(...arguments),this.found=!1}visitEndAnchor(e){this.found=!0}}return(0,a.map)((0,a.filter)(e,e=>{let n=e.PATTERN;try{let e=br(n),r=new t;return r.visit(e),r.found}catch{return Br.test(n.source)}}),e=>({message:`Unexpected RegExp Anchor Error:
22
- Token Type: ->`+e.name+`<- static 'PATTERN' cannot contain end of input anchor '$'
23
- See chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS for details.`,type:H.EOI_ANCHOR_FOUND,tokenTypes:[e]}))}function Hr(e){return(0,a.map)((0,a.filter)(e,e=>e.PATTERN.test(``)),e=>({message:`Token Type: ->`+e.name+`<- static 'PATTERN' must not match an empty string`,type:H.EMPTY_MATCH_PATTERN,tokenTypes:[e]}))}var Ur=/[^\\[][\^]|^\^/;function Wr(e){class t extends $t{constructor(){super(...arguments),this.found=!1}visitStartAnchor(e){this.found=!0}}return(0,a.map)((0,a.filter)(e,e=>{let n=e.PATTERN;try{let e=br(n),r=new t;return r.visit(e),r.found}catch{return Ur.test(n.source)}}),e=>({message:`Unexpected RegExp Anchor Error:
24
- Token Type: ->`+e.name+`<- static 'PATTERN' cannot contain start of input anchor '^'
25
- See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS for details.`,type:H.SOI_ANCHOR_FOUND,tokenTypes:[e]}))}function Gr(e){return(0,a.map)((0,a.filter)(e,e=>{let t=e[Mr];return t instanceof RegExp&&(t.multiline||t.global)}),e=>({message:`Token Type: ->`+e.name+`<- static 'PATTERN' may NOT contain global('g') or multiline('m')`,type:H.UNSUPPORTED_FLAGS_FOUND,tokenTypes:[e]}))}function Kr(e){let t=[],n=(0,a.map)(e,n=>(0,a.reduce)(e,(e,r)=>n.PATTERN.source===r.PATTERN.source&&!(0,a.includes)(t,r)&&r.PATTERN!==Ai.NA?(t.push(r),e.push(r),e):e,[]));return n=(0,a.compact)(n),(0,a.map)((0,a.filter)(n,e=>e.length>1),e=>{let t=(0,a.map)(e,e=>e.name);return{message:`The same RegExp pattern ->${(0,a.first)(e).PATTERN}<-has been used in all of the following Token Types: ${t.join(`, `)} <-`,type:H.DUPLICATE_PATTERNS_FOUND,tokenTypes:e}})}function qr(e){return(0,a.map)((0,a.filter)(e,e=>{if(!(0,a.has)(e,`GROUP`))return!1;let t=e.GROUP;return t!==Ai.SKIPPED&&t!==Ai.NA&&!(0,a.isString)(t)}),e=>({message:`Token Type: ->`+e.name+`<- static 'GROUP' can only be Lexer.SKIPPED/Lexer.NA/A String`,type:H.INVALID_GROUP_TYPE_FOUND,tokenTypes:[e]}))}function Jr(e,t){return(0,a.map)((0,a.filter)(e,e=>e.PUSH_MODE!==void 0&&!(0,a.includes)(t,e.PUSH_MODE)),e=>({message:`Token Type: ->${e.name}<- static 'PUSH_MODE' value cannot refer to a Lexer Mode ->${e.PUSH_MODE}<-which does not exist`,type:H.PUSH_MODE_DOES_NOT_EXIST,tokenTypes:[e]}))}function Yr(e){let t=[],n=(0,a.reduce)(e,(e,t,n)=>{let r=t.PATTERN;return r===Ai.NA||((0,a.isString)(r)?e.push({str:r,idx:n,tokenType:t}):(0,a.isRegExp)(r)&&Zr(r)&&e.push({str:r.source,idx:n,tokenType:t})),e},[]);return(0,a.forEach)(e,(e,r)=>{(0,a.forEach)(n,({str:n,idx:i,tokenType:a})=>{if(r<i&&Xr(n,e.PATTERN)){let n=`Token: ->${a.name}<- can never be matched.\nBecause it appears AFTER the Token Type ->${e.name}<-in the lexer's definition.\nSee https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNREACHABLE`;t.push({message:n,type:H.UNREACHABLE_PATTERN,tokenTypes:[e,a]})}})}),t}function Xr(e,t){if((0,a.isRegExp)(t)){if(Qr(t))return!1;let n=t.exec(e);return n!==null&&n.index===0}else if((0,a.isFunction)(t))return t(e,0,[],{});else if((0,a.has)(t,`exec`))return t.exec(e,0,[],{});else if(typeof t==`string`)return t===e;else throw Error(`non exhaustive match`)}function Zr(e){return(0,a.find)([`.`,`\\`,`[`,`]`,`|`,`^`,`$`,`(`,`)`,`?`,`*`,`+`,`{`],t=>e.source.indexOf(t)!==-1)===void 0}function Qr(e){return/(\(\?=)|(\(\?!)|(\(\?<=)|(\(\?<!)/.test(e.source)}function $r(e){let t=e.ignoreCase?`iy`:`y`;return RegExp(`${e.source}`,t)}function ei(e,t,n){let r=[];return(0,a.has)(e,`defaultMode`)||r.push({message:`A MultiMode Lexer cannot be initialized without a <`+Nr+`> property in its definition
26
- `,type:H.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE}),(0,a.has)(e,`modes`)||r.push({message:`A MultiMode Lexer cannot be initialized without a <`+Pr+`> property in its definition
27
- `,type:H.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY}),(0,a.has)(e,`modes`)&&(0,a.has)(e,`defaultMode`)&&!(0,a.has)(e.modes,e.defaultMode)&&r.push({message:`A MultiMode Lexer cannot be initialized with a ${Nr}: <${e.defaultMode}>which does not exist\n`,type:H.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST}),(0,a.has)(e,`modes`)&&(0,a.forEach)(e.modes,(e,t)=>{(0,a.forEach)(e,(n,i)=>{(0,a.isUndefined)(n)?r.push({message:`A Lexer cannot be initialized using an undefined Token Type. Mode:<${t}> at index: <${i}>\n`,type:H.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED}):(0,a.has)(n,`LONGER_ALT`)&&(0,a.forEach)((0,a.isArray)(n.LONGER_ALT)?n.LONGER_ALT:[n.LONGER_ALT],i=>{!(0,a.isUndefined)(i)&&!(0,a.includes)(e,i)&&r.push({message:`A MultiMode Lexer cannot be initialized with a longer_alt <${i.name}> on token <${n.name}> outside of mode <${t}>\n`,type:H.MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE})})})}),r}function ti(e,t,n){let r=[],i=!1,o=(0,a.reject)((0,a.compact)((0,a.flatten)((0,a.values)(e.modes))),e=>e[Mr]===Ai.NA),s=ci(n);return t&&(0,a.forEach)(o,e=>{let t=oi(e,s);if(t!==!1){let n={message:si(e,t),type:t.issue,tokenType:e};r.push(n)}else (0,a.has)(e,`LINE_BREAKS`)?e.LINE_BREAKS===!0&&(i=!0):jr(s,e.PATTERN)&&(i=!0)}),t&&!i&&r.push({message:`Warning: No LINE_BREAKS Found.
28
- This Lexer has been defined to track line and column information,
29
- But none of the Token Types can be identified as matching a line terminator.
30
- See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#LINE_BREAKS
31
- for details.`,type:H.NO_LINE_BREAKS_FLAGS}),r}function ni(e){let t={};return(0,a.forEach)((0,a.keys)(e),n=>{let r=e[n];if((0,a.isArray)(r))t[n]=[];else throw Error(`non exhaustive match`)}),t}function ri(e){let t=e.PATTERN;if((0,a.isRegExp)(t))return!1;if((0,a.isFunction)(t)||(0,a.has)(t,`exec`))return!0;if((0,a.isString)(t))return!1;throw Error(`non exhaustive match`)}function ii(e){return(0,a.isString)(e)&&e.length===1?e.charCodeAt(0):!1}var ai={test:function(e){let t=e.length;for(let n=this.lastIndex;n<t;n++){let t=e.charCodeAt(n);if(t===10)return this.lastIndex=n+1,!0;if(t===13)return e.charCodeAt(n+1)===10?this.lastIndex=n+2:this.lastIndex=n+1,!0}return!1},lastIndex:0};function oi(e,t){if((0,a.has)(e,`LINE_BREAKS`))return!1;if((0,a.isRegExp)(e.PATTERN)){try{jr(t,e.PATTERN)}catch(e){return{issue:H.IDENTIFY_TERMINATOR,errMsg:e.message}}return!1}else if((0,a.isString)(e.PATTERN))return!1;else if(ri(e))return{issue:H.CUSTOM_LINE_BREAK};else throw Error(`non exhaustive match`)}function si(e,t){if(t.issue===H.IDENTIFY_TERMINATOR)return`Warning: unable to identify line terminator usage in pattern.
32
- \tThe problem is in the <${e.name}> Token Type\n\t Root cause: ${t.errMsg}.\n For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#IDENTIFY_TERMINATOR`;if(t.issue===H.CUSTOM_LINE_BREAK)return`Warning: A Custom Token Pattern should specify the <line_breaks> option.
33
- \tThe problem is in the <${e.name}> Token Type\n For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_LINE_BREAK`;throw Error(`non exhaustive match`)}function ci(e){return(0,a.map)(e,e=>(0,a.isString)(e)?e.charCodeAt(0):e)}function li(e,t,n){e[t]===void 0?e[t]=[n]:e[t].push(n)}var ui=[];function di(e){return e<256?e:ui[e]}function fi(){if((0,a.isEmpty)(ui)){ui=Array(65536);for(let e=0;e<65536;e++)ui[e]=e>255?255+~~(e/255):e}}function pi(e,t){let n=e.tokenTypeIdx;return n===t.tokenTypeIdx?!0:t.isParent===!0&&t.categoryMatchesMap[n]===!0}function mi(e,t){return e.tokenTypeIdx===t.tokenTypeIdx}var hi=1,gi={};function _i(e){let t=vi(e);yi(t),xi(t),bi(t),(0,a.forEach)(t,e=>{e.isParent=e.categoryMatches.length>0})}function vi(e){let t=(0,a.clone)(e),n=e,r=!0;for(;r;){n=(0,a.compact)((0,a.flatten)((0,a.map)(n,e=>e.CATEGORIES)));let e=(0,a.difference)(n,t);t=t.concat(e),(0,a.isEmpty)(e)?r=!1:n=e}return t}function yi(e){(0,a.forEach)(e,e=>{Ci(e)||(gi[hi]=e,e.tokenTypeIdx=hi++),wi(e)&&!(0,a.isArray)(e.CATEGORIES)&&(e.CATEGORIES=[e.CATEGORIES]),wi(e)||(e.CATEGORIES=[]),Ti(e)||(e.categoryMatches=[]),Ei(e)||(e.categoryMatchesMap={})})}function bi(e){(0,a.forEach)(e,e=>{e.categoryMatches=[],(0,a.forEach)(e.categoryMatchesMap,(t,n)=>{e.categoryMatches.push(gi[n].tokenTypeIdx)})})}function xi(e){(0,a.forEach)(e,e=>{Si([],e)})}function Si(e,t){(0,a.forEach)(e,e=>{t.categoryMatchesMap[e.tokenTypeIdx]=!0}),(0,a.forEach)(t.CATEGORIES,n=>{let r=e.concat(t);(0,a.includes)(r,n)||Si(r,n)})}function Ci(e){return(0,a.has)(e,`tokenTypeIdx`)}function wi(e){return(0,a.has)(e,`CATEGORIES`)}function Ti(e){return(0,a.has)(e,`categoryMatches`)}function Ei(e){return(0,a.has)(e,`categoryMatchesMap`)}function Di(e){return(0,a.has)(e,`tokenTypeIdx`)}var Oi={buildUnableToPopLexerModeMessage(e){return`Unable to pop Lexer Mode after encountering Token ->${e.image}<- The Mode Stack is empty`},buildUnexpectedCharactersMessage(e,t,n,r,i,a){return`unexpected character: ->${e.charAt(t)}<- at offset: ${t}, skipped ${n} characters.`}},H;(function(e){e[e.MISSING_PATTERN=0]=`MISSING_PATTERN`,e[e.INVALID_PATTERN=1]=`INVALID_PATTERN`,e[e.EOI_ANCHOR_FOUND=2]=`EOI_ANCHOR_FOUND`,e[e.UNSUPPORTED_FLAGS_FOUND=3]=`UNSUPPORTED_FLAGS_FOUND`,e[e.DUPLICATE_PATTERNS_FOUND=4]=`DUPLICATE_PATTERNS_FOUND`,e[e.INVALID_GROUP_TYPE_FOUND=5]=`INVALID_GROUP_TYPE_FOUND`,e[e.PUSH_MODE_DOES_NOT_EXIST=6]=`PUSH_MODE_DOES_NOT_EXIST`,e[e.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE=7]=`MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE`,e[e.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY=8]=`MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY`,e[e.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST=9]=`MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST`,e[e.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED=10]=`LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED`,e[e.SOI_ANCHOR_FOUND=11]=`SOI_ANCHOR_FOUND`,e[e.EMPTY_MATCH_PATTERN=12]=`EMPTY_MATCH_PATTERN`,e[e.NO_LINE_BREAKS_FLAGS=13]=`NO_LINE_BREAKS_FLAGS`,e[e.UNREACHABLE_PATTERN=14]=`UNREACHABLE_PATTERN`,e[e.IDENTIFY_TERMINATOR=15]=`IDENTIFY_TERMINATOR`,e[e.CUSTOM_LINE_BREAK=16]=`CUSTOM_LINE_BREAK`,e[e.MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE=17]=`MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE`})(H||={});var ki={deferDefinitionErrorsHandling:!1,positionTracking:`full`,lineTerminatorsPattern:/\n|\r\n?/g,lineTerminatorCharacters:[`
34
- `,`\r`],ensureOptimizations:!1,safeMode:!1,errorMessageProvider:Oi,traceInitPerf:!1,skipValidations:!1,recoveryEnabled:!0};Object.freeze(ki);var Ai=class{constructor(e,t=ki){if(this.lexerDefinition=e,this.lexerDefinitionErrors=[],this.lexerDefinitionWarning=[],this.patternIdxToConfig={},this.charCodeToPatternIdxToConfig={},this.modes=[],this.emptyGroups={},this.trackStartLines=!0,this.trackEndLines=!0,this.hasCustom=!1,this.canModeBeOptimized={},this.TRACE_INIT=(e,t)=>{if(this.traceInitPerf===!0){this.traceInitIndent++;let n=Array(this.traceInitIndent+1).join(` `);this.traceInitIndent<this.traceInitMaxIdent&&console.log(`${n}--> <${e}>`);let{time:r,value:i}=Un(t),a=r>10?console.warn:console.log;return this.traceInitIndent<this.traceInitMaxIdent&&a(`${n}<-- <${e}> time: ${r}ms`),this.traceInitIndent--,i}else return t()},typeof t==`boolean`)throw Error(`The second argument to the Lexer constructor is now an ILexerConfig Object.
35
- a boolean 2nd argument is no longer supported`);this.config=(0,a.assign)({},ki,t);let n=this.config.traceInitPerf;n===!0?(this.traceInitMaxIdent=1/0,this.traceInitPerf=!0):typeof n==`number`&&(this.traceInitMaxIdent=n,this.traceInitPerf=!0),this.traceInitIndent=-1,this.TRACE_INIT(`Lexer Constructor`,()=>{let n,r=!0;this.TRACE_INIT(`Lexer Config handling`,()=>{if(this.config.lineTerminatorsPattern===ki.lineTerminatorsPattern)this.config.lineTerminatorsPattern=ai;else if(this.config.lineTerminatorCharacters===ki.lineTerminatorCharacters)throw Error(`Error: Missing <lineTerminatorCharacters> property on the Lexer config.
36
- For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#MISSING_LINE_TERM_CHARS`);if(t.safeMode&&t.ensureOptimizations)throw Error(`"safeMode" and "ensureOptimizations" flags are mutually exclusive.`);this.trackStartLines=/full|onlyStart/i.test(this.config.positionTracking),this.trackEndLines=/full/i.test(this.config.positionTracking),(0,a.isArray)(e)?n={modes:{defaultMode:(0,a.clone)(e)},defaultMode:Nr}:(r=!1,n=(0,a.clone)(e))}),this.config.skipValidations===!1&&(this.TRACE_INIT(`performRuntimeChecks`,()=>{this.lexerDefinitionErrors=this.lexerDefinitionErrors.concat(ei(n,this.trackStartLines,this.config.lineTerminatorCharacters))}),this.TRACE_INIT(`performWarningRuntimeChecks`,()=>{this.lexerDefinitionWarning=this.lexerDefinitionWarning.concat(ti(n,this.trackStartLines,this.config.lineTerminatorCharacters))})),n.modes=n.modes?n.modes:{},(0,a.forEach)(n.modes,(e,t)=>{n.modes[t]=(0,a.reject)(e,e=>(0,a.isUndefined)(e))});let i=(0,a.keys)(n.modes);if((0,a.forEach)(n.modes,(e,n)=>{this.TRACE_INIT(`Mode: <${n}> processing`,()=>{if(this.modes.push(n),this.config.skipValidations===!1&&this.TRACE_INIT(`validatePatterns`,()=>{this.lexerDefinitionErrors=this.lexerDefinitionErrors.concat(Ir(e,i))}),(0,a.isEmpty)(this.lexerDefinitionErrors)){_i(e);let r;this.TRACE_INIT(`analyzeTokenTypes`,()=>{r=Fr(e,{lineTerminatorCharacters:this.config.lineTerminatorCharacters,positionTracking:t.positionTracking,ensureOptimizations:t.ensureOptimizations,safeMode:t.safeMode,tracer:this.TRACE_INIT})}),this.patternIdxToConfig[n]=r.patternIdxToConfig,this.charCodeToPatternIdxToConfig[n]=r.charCodeToPatternIdxToConfig,this.emptyGroups=(0,a.assign)({},this.emptyGroups,r.emptyGroups),this.hasCustom=r.hasCustom||this.hasCustom,this.canModeBeOptimized[n]=r.canBeOptimized}})}),this.defaultMode=n.defaultMode,!(0,a.isEmpty)(this.lexerDefinitionErrors)&&!this.config.deferDefinitionErrorsHandling){let e=(0,a.map)(this.lexerDefinitionErrors,e=>e.message).join(`-----------------------
37
- `);throw Error(`Errors detected in definition of Lexer:
38
- `+e)}(0,a.forEach)(this.lexerDefinitionWarning,e=>{Hn(e.message)}),this.TRACE_INIT(`Choosing sub-methods implementations`,()=>{if(r&&(this.handleModes=a.noop),this.trackStartLines===!1&&(this.computeNewColumn=a.identity),this.trackEndLines===!1&&(this.updateTokenEndLineColumnLocation=a.noop),/full/i.test(this.config.positionTracking))this.createTokenInstance=this.createFullToken;else if(/onlyStart/i.test(this.config.positionTracking))this.createTokenInstance=this.createStartOnlyToken;else if(/onlyOffset/i.test(this.config.positionTracking))this.createTokenInstance=this.createOffsetOnlyToken;else throw Error(`Invalid <positionTracking> config option: "${this.config.positionTracking}"`);this.hasCustom?(this.addToken=this.addTokenUsingPush,this.handlePayload=this.handlePayloadWithCustom):(this.addToken=this.addTokenUsingMemberAccess,this.handlePayload=this.handlePayloadNoCustom)}),this.TRACE_INIT(`Failed Optimization Warnings`,()=>{let e=(0,a.reduce)(this.canModeBeOptimized,(e,t,n)=>(t===!1&&e.push(n),e),[]);if(t.ensureOptimizations&&!(0,a.isEmpty)(e))throw Error(`Lexer Modes: < ${e.join(`, `)} > cannot be optimized.\n Disable the "ensureOptimizations" lexer config flag to silently ignore this and run the lexer in an un-optimized mode.
39
- Or inspect the console log for details on how to resolve these issues.`)}),this.TRACE_INIT(`clearRegExpParserCache`,()=>{xr()}),this.TRACE_INIT(`toFastProperties`,()=>{Wn(this)})})}tokenize(e,t=this.defaultMode){if(!(0,a.isEmpty)(this.lexerDefinitionErrors)){let e=(0,a.map)(this.lexerDefinitionErrors,e=>e.message).join(`-----------------------
40
- `);throw Error(`Unable to Tokenize because Errors detected in definition of Lexer:
41
- `+e)}return this.tokenizeInternal(e,t)}tokenizeInternal(e,t){let n,r,i,o,s,c,l,u,d,f,p,m,h,g,_,v=e,y=v.length,b=0,x=0,S=this.hasCustom?0:Math.floor(e.length/10),C=Array(S),w=[],T=this.trackStartLines?1:void 0,E=this.trackStartLines?1:void 0,ee=ni(this.emptyGroups),te=this.trackStartLines,D=this.config.lineTerminatorsPattern,O=0,k=[],ne=[],re=[],ie=[];Object.freeze(ie);let A=!1,ae=e=>{if(re.length===1&&e.tokenType.PUSH_MODE===void 0){let t=this.config.errorMessageProvider.buildUnableToPopLexerModeMessage(e);w.push({offset:e.startOffset,line:e.startLine,column:e.startColumn,length:e.image.length,message:t})}else{re.pop();let e=(0,a.last)(re);k=this.patternIdxToConfig[e],ne=this.charCodeToPatternIdxToConfig[e],O=k.length;let t=this.canModeBeOptimized[e]&&this.config.safeMode===!1;A=!!(ne&&t)}};function oe(e){re.push(e),ne=this.charCodeToPatternIdxToConfig[e],k=this.patternIdxToConfig[e],O=k.length,O=k.length;let t=this.canModeBeOptimized[e]&&this.config.safeMode===!1;A=!!(ne&&t)}oe.call(this,t);let j,M=this.config.recoveryEnabled;for(;b<y;){c=null,d=-1;let t=v.charCodeAt(b),S;if(A){let e=di(t),n=ne[e];S=n===void 0?ie:n}else S=k;let N=S.length;for(n=0;n<N;n++){j=S[n];let r=j.pattern;l=null;let a=j.short;if(a===!1?j.isCustom===!0?(_=r.exec(v,b,C,ee),_===null?c=null:(c=_[0],d=c.length,_.payload!==void 0&&(l=_.payload))):(r.lastIndex=b,d=this.matchLength(r,e,b)):t===a&&(d=1,c=r),d!==-1){if(s=j.longerAlt,s!==void 0){c=e.substring(b,b+d);let t=s.length;for(i=0;i<t;i++){let t=k[s[i]],n=t.pattern;if(u=null,t.isCustom===!0?(_=n.exec(v,b,C,ee),_===null?o=null:(o=_[0],_.payload!==void 0&&(u=_.payload))):(n.lastIndex=b,o=this.match(n,e,b)),o&&o.length>c.length){c=o,d=o.length,l=u,j=t;break}}}break}}if(d!==-1){if(f=j.group,f!==void 0&&(c=c===null?e.substring(b,b+d):c,p=j.tokenTypeIdx,m=this.createTokenInstance(c,b,p,j.tokenType,T,E,d),this.handlePayload(m,l),f===!1?x=this.addToken(C,x,m):ee[f].push(m)),te===!0&&j.canLineTerminator===!0){let t=0,n,r;D.lastIndex=0;do c=c===null?e.substring(b,b+d):c,n=D.test(c),n===!0&&(r=D.lastIndex-1,t++);while(n===!0);t===0?E=this.computeNewColumn(E,d):(T+=t,E=d-r,this.updateTokenEndLineColumnLocation(m,f,r,t,T,E,d))}else E=this.computeNewColumn(E,d);b+=d,this.handleModes(j,ae,oe,m)}else{let t=b,n=T,i=E,o=M===!1;for(;o===!1&&b<y;)for(b++,r=0;r<O;r++){let t=k[r],n=t.pattern,i=t.short;if(i===!1?t.isCustom===!0?o=n.exec(v,b,C,ee)!==null:(n.lastIndex=b,o=n.exec(e)!==null):v.charCodeAt(b)===i&&(o=!0),o===!0)break}if(h=b-t,E=this.computeNewColumn(E,h),g=this.config.errorMessageProvider.buildUnexpectedCharactersMessage(v,t,h,n,i,(0,a.last)(re)),w.push({offset:t,line:n,column:i,length:h,message:g}),M===!1)break}}return this.hasCustom||(C.length=x),{tokens:C,groups:ee,errors:w}}handleModes(e,t,n,r){if(e.pop===!0){let i=e.push;t(r),i!==void 0&&n.call(this,i)}else e.push!==void 0&&n.call(this,e.push)}updateTokenEndLineColumnLocation(e,t,n,r,i,a,o){let s,c;t!==void 0&&(s=n===o-1,c=s?-1:0,r===1&&s===!0||(e.endLine=i+c,e.endColumn=a-1+-c))}computeNewColumn(e,t){return e+t}createOffsetOnlyToken(e,t,n,r){return{image:e,startOffset:t,tokenTypeIdx:n,tokenType:r}}createStartOnlyToken(e,t,n,r,i,a){return{image:e,startOffset:t,startLine:i,startColumn:a,tokenTypeIdx:n,tokenType:r}}createFullToken(e,t,n,r,i,a,o){return{image:e,startOffset:t,endOffset:t+o-1,startLine:i,endLine:i,startColumn:a,endColumn:a+o-1,tokenTypeIdx:n,tokenType:r}}addTokenUsingPush(e,t,n){return e.push(n),t}addTokenUsingMemberAccess(e,t,n){return e[t]=n,t++,t}handlePayloadNoCustom(e,t){}handlePayloadWithCustom(e,t){t!==null&&(e.payload=t)}match(e,t,n){return e.test(t)===!0?t.substring(n,e.lastIndex):null}matchLength(e,t,n){return e.test(t)===!0?e.lastIndex-n:-1}};Ai.SKIPPED=`This marks a skipped Token pattern, this means each token identified by it will be consumed and then thrown into oblivion, this can be used to for example to completely ignore whitespace.`,Ai.NA=/NOT_APPLICABLE/;function ji(e){return Mi(e)?e.LABEL:e.name}function Mi(e){return(0,a.isString)(e.LABEL)&&e.LABEL!==``}var Ni=`parent`,Pi=`categories`,Fi=`label`,Ii=`group`,Li=`push_mode`,Ri=`pop_mode`,zi=`longer_alt`,Bi=`line_breaks`,Vi=`start_chars_hint`;function Hi(e){return Ui(e)}function Ui(e){let t=e.pattern,n={};if(n.name=e.name,(0,a.isUndefined)(t)||(n.PATTERN=t),(0,a.has)(e,Ni))throw`The parent property is no longer supported.
42
- See: https://github.com/chevrotain/chevrotain/issues/564#issuecomment-349062346 for details.`;return(0,a.has)(e,Pi)&&(n.CATEGORIES=e[Pi]),_i([n]),(0,a.has)(e,Fi)&&(n.LABEL=e[Fi]),(0,a.has)(e,Ii)&&(n.GROUP=e[Ii]),(0,a.has)(e,Ri)&&(n.POP_MODE=e[Ri]),(0,a.has)(e,Li)&&(n.PUSH_MODE=e[Li]),(0,a.has)(e,zi)&&(n.LONGER_ALT=e[zi]),(0,a.has)(e,Bi)&&(n.LINE_BREAKS=e[Bi]),(0,a.has)(e,Vi)&&(n.START_CHARS_HINT=e[Vi]),n}var Wi=Hi({name:`EOF`,pattern:Ai.NA});_i([Wi]);function Gi(e,t,n,r,i,a,o,s){return{image:t,startOffset:n,endOffset:r,startLine:i,endLine:a,startColumn:o,endColumn:s,tokenTypeIdx:e.tokenTypeIdx,tokenType:e}}function Ki(e,t){return pi(e,t)}var qi={buildMismatchTokenMessage({expected:e,actual:t,previous:n,ruleName:r}){return`Expecting ${Mi(e)?`--> ${ji(e)} <--`:`token of type --> ${e.name} <--`} but found --> '${t.image}' <--`},buildNotAllInputParsedMessage({firstRedundant:e,ruleName:t}){return`Redundant input, expecting EOF but found: `+e.image},buildNoViableAltMessage({expectedPathsPerAlt:e,actual:t,previous:n,customUserDescription:r,ruleName:i}){let o=`
43
- but found: '`+(0,a.first)(t).image+`'`;return r?`Expecting: `+r+o:`Expecting: one of these possible Token sequences:\n${(0,a.map)((0,a.map)((0,a.reduce)(e,(e,t)=>e.concat(t),[]),e=>`[${(0,a.map)(e,e=>ji(e)).join(`, `)}]`),(e,t)=>` ${t+1}. ${e}`).join(`
44
- `)}`+o},buildEarlyExitMessage({expectedIterationPaths:e,actual:t,customUserDescription:n,ruleName:r}){let i=`
45
- but found: '`+(0,a.first)(t).image+`'`;return n?`Expecting: `+n+i:`Expecting: expecting at least one iteration which starts with one of these possible Token sequences::\n <${(0,a.map)(e,e=>`[${(0,a.map)(e,e=>ji(e)).join(`,`)}]`).join(` ,`)}>`+i}};Object.freeze(qi);var Ji={buildRuleNotFoundError(e,t){return`Invalid grammar, reference to a rule which is not defined: ->`+t.nonTerminalName+`<-
46
- inside top level rule: ->`+e.name+`<-`}},Yi={buildDuplicateFoundError(e,t){function n(e){return e instanceof V?e.terminalType.name:e instanceof Jn?e.nonTerminalName:``}let r=e.name,i=(0,a.first)(t),o=i.idx,s=sr(i),c=n(i),l=`->${s}${o>0?o:``}<- ${c?`with argument: ->${c}<-`:``}
47
- appears more than once (${t.length} times) in the top level rule: ->${r}<-.
48
- For further details see: https://chevrotain.io/docs/FAQ.html#NUMERICAL_SUFFIXES
49
- `;return l=l.replace(/[ \t]+/g,` `),l=l.replace(/\s\s+/g,`
50
- `),l},buildNamespaceConflictError(e){return`Namespace conflict found in grammar.\nThe grammar has both a Terminal(Token) and a Non-Terminal(Rule) named: <${e.name}>.\nTo resolve this make sure each Terminal and Non-Terminal names are unique\nThis is easy to accomplish by using the convention that Terminal names start with an uppercase letter\nand Non-Terminal names start with a lower case letter.`},buildAlternationPrefixAmbiguityError(e){let t=(0,a.map)(e.prefixPath,e=>ji(e)).join(`, `),n=e.alternation.idx===0?``:e.alternation.idx;return`Ambiguous alternatives: <${e.ambiguityIndices.join(` ,`)}> due to common lookahead prefix\nin <OR${n}> inside <${e.topLevelRule.name}> Rule,\n<${t}> may appears as a prefix path in all these alternatives.\nSee: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#COMMON_PREFIX\nFor Further details.`},buildAlternationAmbiguityError(e){let t=e.alternation.idx===0?``:e.alternation.idx,n=e.prefixPath.length===0,r=`Ambiguous Alternatives Detected: <${e.ambiguityIndices.join(` ,`)}> in <OR${t}> inside <${e.topLevelRule.name}> Rule,\n`;if(n)r+=`These alternatives are all empty (match no tokens), making them indistinguishable.
51
- Only the last alternative may be empty.
52
- `;else{let t=(0,a.map)(e.prefixPath,e=>ji(e)).join(`, `);r+=`<${t}> may appears as a prefix path in all these alternatives.\n`}return r+=`See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#AMBIGUOUS_ALTERNATIVES
53
- For Further details.`,r},buildEmptyRepetitionError(e){let t=sr(e.repetition);return e.repetition.idx!==0&&(t+=e.repetition.idx),`The repetition <${t}> within Rule <${e.topLevelRule.name}> can never consume any tokens.\nThis could lead to an infinite loop.`},buildTokenNameError(e){return`deprecated`},buildEmptyAlternationError(e){return`Ambiguous empty alternative: <${e.emptyChoiceIdx+1}> in <OR${e.alternation.idx}> inside <${e.topLevelRule.name}> Rule.\nOnly the last alternative may be an empty alternative.`},buildTooManyAlternativesError(e){return`An Alternation cannot have more than 256 alternatives:\n<OR${e.alternation.idx}> inside <${e.topLevelRule.name}> Rule.\n has ${e.alternation.definition.length+1} alternatives.`},buildLeftRecursionError(e){let t=e.topLevelRule.name;return`Left Recursion found in grammar.\nrule: <${t}> can be invoked from itself (directly or indirectly)\nwithout consuming any Tokens. The grammar path that causes this is: \n ${`${t} --> ${(0,a.map)(e.leftRecursionPath,e=>e.name).concat([t]).join(` --> `)}`}\n To fix this refactor your grammar to remove the left recursion.\nsee: https://en.wikipedia.org/wiki/LL_parser#Left_factoring.`},buildInvalidRuleNameError(e){return`deprecated`},buildDuplicateRuleNameError(e){let t;return t=e.topLevelRule instanceof Yn?e.topLevelRule.name:e.topLevelRule,`Duplicate definition, rule: ->${t}<- is already defined in the grammar: ->${e.grammarName}<-`}};function Xi(e,t){let n=new Zi(e,t);return n.resolveRefs(),n.errors}var Zi=class extends rr{constructor(e,t){super(),this.nameToTopRule=e,this.errMsgProvider=t,this.errors=[]}resolveRefs(){(0,a.forEach)((0,a.values)(this.nameToTopRule),e=>{this.currTopLevel=e,e.accept(this)})}visitNonTerminal(e){let t=this.nameToTopRule[e.nonTerminalName];if(t)e.referencedRule=t;else{let t=this.errMsgProvider.buildRuleNotFoundError(this.currTopLevel,e);this.errors.push({message:t,type:Zo.UNRESOLVED_SUBRULE_REF,ruleName:this.currTopLevel.name,unresolvedRefName:e.nonTerminalName})}}},Qi=class extends cr{constructor(e,t){super(),this.topProd=e,this.path=t,this.possibleTokTypes=[],this.nextProductionName=``,this.nextProductionOccurrence=0,this.found=!1,this.isAtEndOfPath=!1}startWalking(){if(this.found=!1,this.path.ruleStack[0]!==this.topProd.name)throw Error(`The path does not start with the walker's top Rule!`);return this.ruleStack=(0,a.clone)(this.path.ruleStack).reverse(),this.occurrenceStack=(0,a.clone)(this.path.occurrenceStack).reverse(),this.ruleStack.pop(),this.occurrenceStack.pop(),this.updateExpectedNext(),this.walk(this.topProd),this.possibleTokTypes}walk(e,t=[]){this.found||super.walk(e,t)}walkProdRef(e,t,n){if(e.referencedRule.name===this.nextProductionName&&e.idx===this.nextProductionOccurrence){let r=t.concat(n);this.updateExpectedNext(),this.walk(e.referencedRule,r)}}updateExpectedNext(){(0,a.isEmpty)(this.ruleStack)?(this.nextProductionName=``,this.nextProductionOccurrence=0,this.isAtEndOfPath=!0):(this.nextProductionName=this.ruleStack.pop(),this.nextProductionOccurrence=this.occurrenceStack.pop())}},$i=class extends Qi{constructor(e,t){super(e,t),this.path=t,this.nextTerminalName=``,this.nextTerminalOccurrence=0,this.nextTerminalName=this.path.lastTok.name,this.nextTerminalOccurrence=this.path.lastTokOccurrence}walkTerminal(e,t,n){this.isAtEndOfPath&&e.terminalType.name===this.nextTerminalName&&e.idx===this.nextTerminalOccurrence&&!this.found&&(this.possibleTokTypes=ur(new Xn({definition:t.concat(n)})),this.found=!0)}},ea=class extends cr{constructor(e,t){super(),this.topRule=e,this.occurrence=t,this.result={token:void 0,occurrence:void 0,isEndOfRule:void 0}}startWalking(){return this.walk(this.topRule),this.result}},ta=class extends ea{walkMany(e,t,n){if(e.idx===this.occurrence){let e=(0,a.first)(t.concat(n));this.result.isEndOfRule=e===void 0,e instanceof V&&(this.result.token=e.terminalType,this.result.occurrence=e.idx)}else super.walkMany(e,t,n)}},na=class extends ea{walkManySep(e,t,n){if(e.idx===this.occurrence){let e=(0,a.first)(t.concat(n));this.result.isEndOfRule=e===void 0,e instanceof V&&(this.result.token=e.terminalType,this.result.occurrence=e.idx)}else super.walkManySep(e,t,n)}},ra=class extends ea{walkAtLeastOne(e,t,n){if(e.idx===this.occurrence){let e=(0,a.first)(t.concat(n));this.result.isEndOfRule=e===void 0,e instanceof V&&(this.result.token=e.terminalType,this.result.occurrence=e.idx)}else super.walkAtLeastOne(e,t,n)}},ia=class extends ea{walkAtLeastOneSep(e,t,n){if(e.idx===this.occurrence){let e=(0,a.first)(t.concat(n));this.result.isEndOfRule=e===void 0,e instanceof V&&(this.result.token=e.terminalType,this.result.occurrence=e.idx)}else super.walkAtLeastOneSep(e,t,n)}};function aa(e,t,n=[]){n=(0,a.clone)(n);let r=[],i=0;function o(t){return t.concat((0,a.drop)(e,i+1))}function s(e){let i=aa(o(e),t,n);return r.concat(i)}for(;n.length<t&&i<e.length;){let t=e[i];if(t instanceof Xn||t instanceof Jn)return s(t.definition);if(t instanceof z)r=s(t.definition);else if(t instanceof Zn)return s(t.definition.concat([new B({definition:t.definition})]));else if(t instanceof Qn)return s([new Xn({definition:t.definition}),new B({definition:[new V({terminalType:t.separator})].concat(t.definition)})]);else if(t instanceof $n)r=s(t.definition.concat([new B({definition:[new V({terminalType:t.separator})].concat(t.definition)})]));else if(t instanceof B)r=s(t.definition.concat([new B({definition:t.definition})]));else if(t instanceof er)return(0,a.forEach)(t.definition,e=>{(0,a.isEmpty)(e.definition)===!1&&(r=s(e.definition))}),r;else if(t instanceof V)n.push(t.terminalType);else throw Error(`non exhaustive match`);i++}return r.push({partialPath:n,suffixDef:(0,a.drop)(e,i)}),r}function oa(e,t,n,r){let i=`EXIT_NONE_TERMINAL`,o=[i],s=`EXIT_ALTERNATIVE`,c=!1,l=t.length,u=l-r-1,d=[],f=[];for(f.push({idx:-1,def:e,ruleStack:[],occurrenceStack:[]});!(0,a.isEmpty)(f);){let e=f.pop();if(e===s){c&&(0,a.last)(f).idx<=u&&f.pop();continue}let r=e.def,p=e.idx,m=e.ruleStack,h=e.occurrenceStack;if((0,a.isEmpty)(r))continue;let g=r[0];if(g===i){let e={idx:p,def:(0,a.drop)(r),ruleStack:(0,a.dropRight)(m),occurrenceStack:(0,a.dropRight)(h)};f.push(e)}else if(g instanceof V)if(p<l-1){let e=p+1,i=t[e];if(n(i,g.terminalType)){let t={idx:e,def:(0,a.drop)(r),ruleStack:m,occurrenceStack:h};f.push(t)}}else if(p===l-1)d.push({nextTokenType:g.terminalType,nextTokenOccurrence:g.idx,ruleStack:m,occurrenceStack:h}),c=!0;else throw Error(`non exhaustive match`);else if(g instanceof Jn){let e=(0,a.clone)(m);e.push(g.nonTerminalName);let t=(0,a.clone)(h);t.push(g.idx);let n={idx:p,def:g.definition.concat(o,(0,a.drop)(r)),ruleStack:e,occurrenceStack:t};f.push(n)}else if(g instanceof z){let e={idx:p,def:(0,a.drop)(r),ruleStack:m,occurrenceStack:h};f.push(e),f.push(s);let t={idx:p,def:g.definition.concat((0,a.drop)(r)),ruleStack:m,occurrenceStack:h};f.push(t)}else if(g instanceof Zn){let e=new B({definition:g.definition,idx:g.idx}),t={idx:p,def:g.definition.concat([e],(0,a.drop)(r)),ruleStack:m,occurrenceStack:h};f.push(t)}else if(g instanceof Qn){let e=new B({definition:[new V({terminalType:g.separator})].concat(g.definition),idx:g.idx}),t={idx:p,def:g.definition.concat([e],(0,a.drop)(r)),ruleStack:m,occurrenceStack:h};f.push(t)}else if(g instanceof $n){let e={idx:p,def:(0,a.drop)(r),ruleStack:m,occurrenceStack:h};f.push(e),f.push(s);let t=new B({definition:[new V({terminalType:g.separator})].concat(g.definition),idx:g.idx}),n={idx:p,def:g.definition.concat([t],(0,a.drop)(r)),ruleStack:m,occurrenceStack:h};f.push(n)}else if(g instanceof B){let e={idx:p,def:(0,a.drop)(r),ruleStack:m,occurrenceStack:h};f.push(e),f.push(s);let t=new B({definition:g.definition,idx:g.idx}),n={idx:p,def:g.definition.concat([t],(0,a.drop)(r)),ruleStack:m,occurrenceStack:h};f.push(n)}else if(g instanceof er)for(let e=g.definition.length-1;e>=0;e--){let t={idx:p,def:g.definition[e].definition.concat((0,a.drop)(r)),ruleStack:m,occurrenceStack:h};f.push(t),f.push(s)}else if(g instanceof Xn)f.push({idx:p,def:g.definition.concat((0,a.drop)(r)),ruleStack:m,occurrenceStack:h});else if(g instanceof Yn)f.push(sa(g,p,m,h));else throw Error(`non exhaustive match`)}return d}function sa(e,t,n,r){let i=(0,a.clone)(n);i.push(e.name);let o=(0,a.clone)(r);return o.push(1),{idx:t,def:e.definition,ruleStack:i,occurrenceStack:o}}var U;(function(e){e[e.OPTION=0]=`OPTION`,e[e.REPETITION=1]=`REPETITION`,e[e.REPETITION_MANDATORY=2]=`REPETITION_MANDATORY`,e[e.REPETITION_MANDATORY_WITH_SEPARATOR=3]=`REPETITION_MANDATORY_WITH_SEPARATOR`,e[e.REPETITION_WITH_SEPARATOR=4]=`REPETITION_WITH_SEPARATOR`,e[e.ALTERNATION=5]=`ALTERNATION`})(U||={});function ca(e){if(e instanceof z||e===`Option`)return U.OPTION;if(e instanceof B||e===`Repetition`)return U.REPETITION;if(e instanceof Zn||e===`RepetitionMandatory`)return U.REPETITION_MANDATORY;if(e instanceof Qn||e===`RepetitionMandatoryWithSeparator`)return U.REPETITION_MANDATORY_WITH_SEPARATOR;if(e instanceof $n||e===`RepetitionWithSeparator`)return U.REPETITION_WITH_SEPARATOR;if(e instanceof er||e===`Alternation`)return U.ALTERNATION;throw Error(`non exhaustive match`)}function la(e){let{occurrence:t,rule:n,prodType:r,maxLookahead:i}=e,a=ca(r);return a===U.ALTERNATION?ba(t,n,i):xa(t,n,a,i)}function ua(e,t,n,r,i,a){let o=ba(e,t,n);return a(o,r,wa(o)?mi:pi,i)}function da(e,t,n,r,i,a){let o=xa(e,t,i,n),s=wa(o)?mi:pi;return a(o[0],s,r)}function fa(e,t,n,r){let i=e.length,o=(0,a.every)(e,e=>(0,a.every)(e,e=>e.length===1));if(t)return function(t){let r=(0,a.map)(t,e=>e.GATE);for(let t=0;t<i;t++){let i=e[t],a=i.length,o=r[t];if(!(o!==void 0&&o.call(this)===!1))nextPath:for(let e=0;e<a;e++){let r=i[e],a=r.length;for(let e=0;e<a;e++)if(n(this.LA(e+1),r[e])===!1)continue nextPath;return t}}};if(o&&!r){let t=(0,a.reduce)((0,a.map)(e,e=>(0,a.flatten)(e)),(e,t,n)=>((0,a.forEach)(t,t=>{(0,a.has)(e,t.tokenTypeIdx)||(e[t.tokenTypeIdx]=n),(0,a.forEach)(t.categoryMatches,t=>{(0,a.has)(e,t)||(e[t]=n)})}),e),{});return function(){return t[this.LA(1).tokenTypeIdx]}}else return function(){for(let t=0;t<i;t++){let r=e[t],i=r.length;nextPath:for(let e=0;e<i;e++){let i=r[e],a=i.length;for(let e=0;e<a;e++)if(n(this.LA(e+1),i[e])===!1)continue nextPath;return t}}}}function pa(e,t,n){let r=(0,a.every)(e,e=>e.length===1),i=e.length;if(r&&!n){let t=(0,a.flatten)(e);if(t.length===1&&(0,a.isEmpty)(t[0].categoryMatches)){let e=t[0].tokenTypeIdx;return function(){return this.LA(1).tokenTypeIdx===e}}else{let e=(0,a.reduce)(t,(e,t,n)=>(e[t.tokenTypeIdx]=!0,(0,a.forEach)(t.categoryMatches,t=>{e[t]=!0}),e),[]);return function(){return e[this.LA(1).tokenTypeIdx]===!0}}}else return function(){nextPath:for(let n=0;n<i;n++){let r=e[n],i=r.length;for(let e=0;e<i;e++)if(t(this.LA(e+1),r[e])===!1)continue nextPath;return!0}return!1}}var ma=class extends cr{constructor(e,t,n){super(),this.topProd=e,this.targetOccurrence=t,this.targetProdType=n}startWalking(){return this.walk(this.topProd),this.restDef}checkIsTarget(e,t,n,r){return e.idx===this.targetOccurrence&&this.targetProdType===t?(this.restDef=n.concat(r),!0):!1}walkOption(e,t,n){this.checkIsTarget(e,U.OPTION,t,n)||super.walkOption(e,t,n)}walkAtLeastOne(e,t,n){this.checkIsTarget(e,U.REPETITION_MANDATORY,t,n)||super.walkOption(e,t,n)}walkAtLeastOneSep(e,t,n){this.checkIsTarget(e,U.REPETITION_MANDATORY_WITH_SEPARATOR,t,n)||super.walkOption(e,t,n)}walkMany(e,t,n){this.checkIsTarget(e,U.REPETITION,t,n)||super.walkOption(e,t,n)}walkManySep(e,t,n){this.checkIsTarget(e,U.REPETITION_WITH_SEPARATOR,t,n)||super.walkOption(e,t,n)}},ha=class extends rr{constructor(e,t,n){super(),this.targetOccurrence=e,this.targetProdType=t,this.targetRef=n,this.result=[]}checkIsTarget(e,t){e.idx===this.targetOccurrence&&this.targetProdType===t&&(this.targetRef===void 0||e===this.targetRef)&&(this.result=e.definition)}visitOption(e){this.checkIsTarget(e,U.OPTION)}visitRepetition(e){this.checkIsTarget(e,U.REPETITION)}visitRepetitionMandatory(e){this.checkIsTarget(e,U.REPETITION_MANDATORY)}visitRepetitionMandatoryWithSeparator(e){this.checkIsTarget(e,U.REPETITION_MANDATORY_WITH_SEPARATOR)}visitRepetitionWithSeparator(e){this.checkIsTarget(e,U.REPETITION_WITH_SEPARATOR)}visitAlternation(e){this.checkIsTarget(e,U.ALTERNATION)}};function ga(e){let t=Array(e);for(let n=0;n<e;n++)t[n]=[];return t}function _a(e){let t=[``];for(let n=0;n<e.length;n++){let r=e[n],i=[];for(let e=0;e<t.length;e++){let n=t[e];i.push(n+`_`+r.tokenTypeIdx);for(let e=0;e<r.categoryMatches.length;e++){let t=`_`+r.categoryMatches[e];i.push(n+t)}}t=i}return t}function va(e,t,n){for(let r=0;r<e.length;r++){if(r===n)continue;let i=e[r];for(let e=0;e<t.length;e++)if(i[t[e]]===!0)return!1}return!0}function ya(e,t){let n=(0,a.map)(e,e=>aa([e],1)),r=ga(n.length),i=(0,a.map)(n,e=>{let t={};return(0,a.forEach)(e,e=>{(0,a.forEach)(_a(e.partialPath),e=>{t[e]=!0})}),t}),o=n;for(let e=1;e<=t;e++){let n=o;o=ga(n.length);for(let s=0;s<n.length;s++){let c=n[s];for(let n=0;n<c.length;n++){let l=c[n].partialPath,u=c[n].suffixDef,d=_a(l);if(va(i,d,s)||(0,a.isEmpty)(u)||l.length===t){let e=r[s];if(Sa(e,l)===!1){e.push(l);for(let e=0;e<d.length;e++){let t=d[e];i[s][t]=!0}}}else{let t=aa(u,e+1,l);o[s]=o[s].concat(t),(0,a.forEach)(t,e=>{(0,a.forEach)(_a(e.partialPath),e=>{i[s][e]=!0})})}}}}return r}function ba(e,t,n,r){let i=new ha(e,U.ALTERNATION,r);return t.accept(i),ya(i.result,n)}function xa(e,t,n,r){let i=new ha(e,n);t.accept(i);let a=i.result,o=new ma(t,e,n).startWalking();return ya([new Xn({definition:a}),new Xn({definition:o})],r)}function Sa(e,t){compareOtherPath:for(let n=0;n<e.length;n++){let r=e[n];if(r.length===t.length){for(let e=0;e<r.length;e++){let n=t[e],i=r[e];if(!(n===i||i.categoryMatchesMap[n.tokenTypeIdx]!==void 0))continue compareOtherPath}return!0}}return!1}function Ca(e,t){return e.length<t.length&&(0,a.every)(e,(e,n)=>{let r=t[n];return e===r||r.categoryMatchesMap[e.tokenTypeIdx]})}function wa(e){return(0,a.every)(e,e=>(0,a.every)(e,e=>(0,a.every)(e,e=>(0,a.isEmpty)(e.categoryMatches))))}function Ta(e){return(0,a.map)(e.lookaheadStrategy.validate({rules:e.rules,tokenTypes:e.tokenTypes,grammarName:e.grammarName}),e=>Object.assign({type:Zo.CUSTOM_LOOKAHEAD_VALIDATION},e))}function Ea(e,t,n,r){let i=(0,a.flatMap)(e,e=>Da(e,n)),o=Ua(e,t,n),s=(0,a.flatMap)(e,e=>za(e,n)),c=(0,a.flatMap)(e,t=>ja(t,e,r,n));return i.concat(o,s,c)}function Da(e,t){let n=new Aa;e.accept(n);let r=n.allProductions;return(0,a.map)((0,a.values)((0,a.pickBy)((0,a.groupBy)(r,Oa),e=>e.length>1)),n=>{let r=(0,a.first)(n),i=t.buildDuplicateFoundError(e,n),o=sr(r),s={message:i,type:Zo.DUPLICATE_PRODUCTIONS,ruleName:e.name,dslName:o,occurrence:r.idx},c=ka(r);return c&&(s.parameter=c),s})}function Oa(e){return`${sr(e)}_#_${e.idx}_#_${ka(e)}`}function ka(e){return e instanceof V?e.terminalType.name:e instanceof Jn?e.nonTerminalName:``}var Aa=class extends rr{constructor(){super(...arguments),this.allProductions=[]}visitNonTerminal(e){this.allProductions.push(e)}visitOption(e){this.allProductions.push(e)}visitRepetitionWithSeparator(e){this.allProductions.push(e)}visitRepetitionMandatory(e){this.allProductions.push(e)}visitRepetitionMandatoryWithSeparator(e){this.allProductions.push(e)}visitRepetition(e){this.allProductions.push(e)}visitAlternation(e){this.allProductions.push(e)}visitTerminal(e){this.allProductions.push(e)}};function ja(e,t,n,r){let i=[];if((0,a.reduce)(t,(t,n)=>n.name===e.name?t+1:t,0)>1){let t=r.buildDuplicateRuleNameError({topLevelRule:e,grammarName:n});i.push({message:t,type:Zo.DUPLICATE_RULE_NAME,ruleName:e.name})}return i}function Ma(e,t,n){let r=[],i;return(0,a.includes)(t,e)||(i=`Invalid rule override, rule: ->${e}<- cannot be overridden in the grammar: ->${n}<-as it is not defined in any of the super grammars `,r.push({message:i,type:Zo.INVALID_RULE_OVERRIDE,ruleName:e})),r}function Na(e,t,n,r=[]){let i=[],o=Pa(t.definition);if((0,a.isEmpty)(o))return[];{let t=e.name;(0,a.includes)(o,e)&&i.push({message:n.buildLeftRecursionError({topLevelRule:e,leftRecursionPath:r}),type:Zo.LEFT_RECURSION,ruleName:t});let s=(0,a.flatMap)((0,a.difference)(o,r.concat([e])),t=>{let i=(0,a.clone)(r);return i.push(t),Na(e,t,n,i)});return i.concat(s)}}function Pa(e){let t=[];if((0,a.isEmpty)(e))return t;let n=(0,a.first)(e);if(n instanceof Jn)t.push(n.referencedRule);else if(n instanceof Xn||n instanceof z||n instanceof Zn||n instanceof Qn||n instanceof $n||n instanceof B)t=t.concat(Pa(n.definition));else if(n instanceof er)t=(0,a.flatten)((0,a.map)(n.definition,e=>Pa(e.definition)));else if(!(n instanceof V))throw Error(`non exhaustive match`);let r=ar(n),i=e.length>1;if(r&&i){let n=(0,a.drop)(e);return t.concat(Pa(n))}else return t}var Fa=class extends rr{constructor(){super(...arguments),this.alternations=[]}visitAlternation(e){this.alternations.push(e)}};function Ia(e,t){let n=new Fa;e.accept(n);let r=n.alternations;return(0,a.flatMap)(r,n=>(0,a.flatMap)((0,a.dropRight)(n.definition),(r,i)=>(0,a.isEmpty)(oa([r],[],pi,1))?[{message:t.buildEmptyAlternationError({topLevelRule:e,alternation:n,emptyChoiceIdx:i}),type:Zo.NONE_LAST_EMPTY_ALT,ruleName:e.name,occurrence:n.idx,alternative:i+1}]:[]))}function La(e,t,n){let r=new Fa;e.accept(r);let i=r.alternations;return i=(0,a.reject)(i,e=>e.ignoreAmbiguities===!0),(0,a.flatMap)(i,r=>{let i=r.idx,a=ba(i,e,r.maxLookahead||t,r),o=Va(a,r,e,n),s=Ha(a,r,e,n);return o.concat(s)})}var Ra=class extends rr{constructor(){super(...arguments),this.allProductions=[]}visitRepetitionWithSeparator(e){this.allProductions.push(e)}visitRepetitionMandatory(e){this.allProductions.push(e)}visitRepetitionMandatoryWithSeparator(e){this.allProductions.push(e)}visitRepetition(e){this.allProductions.push(e)}};function za(e,t){let n=new Fa;e.accept(n);let r=n.alternations;return(0,a.flatMap)(r,n=>n.definition.length>255?[{message:t.buildTooManyAlternativesError({topLevelRule:e,alternation:n}),type:Zo.TOO_MANY_ALTS,ruleName:e.name,occurrence:n.idx}]:[])}function Ba(e,t,n){let r=[];return(0,a.forEach)(e,e=>{let i=new Ra;e.accept(i);let o=i.allProductions;(0,a.forEach)(o,i=>{let o=ca(i),s=i.maxLookahead||t,c=i.idx,l=xa(c,e,o,s)[0];if((0,a.isEmpty)((0,a.flatten)(l))){let t=n.buildEmptyRepetitionError({topLevelRule:e,repetition:i});r.push({message:t,type:Zo.NO_NON_EMPTY_LOOKAHEAD,ruleName:e.name})}})}),r}function Va(e,t,n,r){let i=[];return(0,a.map)((0,a.reduce)(e,(n,r,o)=>(t.definition[o].ignoreAmbiguities===!0||(0,a.forEach)(r,r=>{let s=[o];(0,a.forEach)(e,(e,n)=>{o!==n&&Sa(e,r)&&t.definition[n].ignoreAmbiguities!==!0&&s.push(n)}),s.length>1&&!Sa(i,r)&&(i.push(r),n.push({alts:s,path:r}))}),n),[]),e=>{let i=(0,a.map)(e.alts,e=>e+1);return{message:r.buildAlternationAmbiguityError({topLevelRule:n,alternation:t,ambiguityIndices:i,prefixPath:e.path}),type:Zo.AMBIGUOUS_ALTS,ruleName:n.name,occurrence:t.idx,alternatives:e.alts}})}function Ha(e,t,n,r){let i=(0,a.reduce)(e,(e,t,n)=>{let r=(0,a.map)(t,e=>({idx:n,path:e}));return e.concat(r)},[]);return(0,a.compact)((0,a.flatMap)(i,e=>{if(t.definition[e.idx].ignoreAmbiguities===!0)return[];let o=e.idx,s=e.path;return(0,a.map)((0,a.filter)(i,e=>t.definition[e.idx].ignoreAmbiguities!==!0&&e.idx<o&&Ca(e.path,s)),e=>{let i=[e.idx+1,o+1],a=t.idx===0?``:t.idx;return{message:r.buildAlternationPrefixAmbiguityError({topLevelRule:n,alternation:t,ambiguityIndices:i,prefixPath:e.path}),type:Zo.AMBIGUOUS_PREFIX_ALTS,ruleName:n.name,occurrence:a,alternatives:i}})}))}function Ua(e,t,n){let r=[],i=(0,a.map)(t,e=>e.name);return(0,a.forEach)(e,e=>{let t=e.name;if((0,a.includes)(i,t)){let i=n.buildNamespaceConflictError(e);r.push({message:i,type:Zo.CONFLICT_TOKENS_RULES_NAMESPACE,ruleName:t})}}),r}function Wa(e){let t=(0,a.defaults)(e,{errMsgProvider:Ji}),n={};return(0,a.forEach)(e.rules,e=>{n[e.name]=e}),Xi(n,t.errMsgProvider)}function Ga(e){return e=(0,a.defaults)(e,{errMsgProvider:Yi}),Ea(e.rules,e.tokenTypes,e.errMsgProvider,e.grammarName)}var Ka=`MismatchedTokenException`,qa=`NoViableAltException`,Ja=`EarlyExitException`,Ya=`NotAllInputParsedException`,Xa=[Ka,qa,Ja,Ya];Object.freeze(Xa);function Za(e){return(0,a.includes)(Xa,e.name)}var Qa=class extends Error{constructor(e,t){super(e),this.token=t,this.resyncedTokens=[],Object.setPrototypeOf(this,new.target.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}},$a=class extends Qa{constructor(e,t,n){super(e,t),this.previousToken=n,this.name=Ka}},eo=class extends Qa{constructor(e,t,n){super(e,t),this.previousToken=n,this.name=qa}},to=class extends Qa{constructor(e,t){super(e,t),this.name=Ya}},no=class extends Qa{constructor(e,t,n){super(e,t),this.previousToken=n,this.name=Ja}},ro={},io=`InRuleRecoveryException`,ao=class extends Error{constructor(e){super(e),this.name=io}},oo=class{initRecoverable(e){this.firstAfterRepMap={},this.resyncFollows={},this.recoveryEnabled=(0,a.has)(e,`recoveryEnabled`)?e.recoveryEnabled:Yo.recoveryEnabled,this.recoveryEnabled&&(this.attemptInRepetitionRecovery=so)}getTokenToInsert(e){let t=Gi(e,``,NaN,NaN,NaN,NaN,NaN,NaN);return t.isInsertedInRecovery=!0,t}canTokenTypeBeInsertedInRecovery(e){return!0}canTokenTypeBeDeletedInRecovery(e){return!0}tryInRepetitionRecovery(e,t,n,r){let i=this.findReSyncTokenType(),o=this.exportLexerState(),s=[],c=!1,l=this.LA(1),u=this.LA(1),d=()=>{let e=this.LA(0),t=new $a(this.errorMessageProvider.buildMismatchTokenMessage({expected:r,actual:l,previous:e,ruleName:this.getCurrRuleFullName()}),l,this.LA(0));t.resyncedTokens=(0,a.dropRight)(s),this.SAVE_ERROR(t)};for(;!c;)if(this.tokenMatcher(u,r)){d();return}else if(n.call(this)){d(),e.apply(this,t);return}else this.tokenMatcher(u,i)?c=!0:(u=this.SKIP_TOKEN(),this.addToResyncTokens(u,s));this.importLexerState(o)}shouldInRepetitionRecoveryBeTried(e,t,n){return!(n===!1||this.tokenMatcher(this.LA(1),e)||this.isBackTracking()||this.canPerformInRuleRecovery(e,this.getFollowsForInRuleRecovery(e,t)))}getFollowsForInRuleRecovery(e,t){let n=this.getCurrentGrammarPath(e,t);return this.getNextPossibleTokenTypes(n)}tryInRuleRecovery(e,t){if(this.canRecoverWithSingleTokenInsertion(e,t))return this.getTokenToInsert(e);if(this.canRecoverWithSingleTokenDeletion(e)){let e=this.SKIP_TOKEN();return this.consumeToken(),e}throw new ao(`sad sad panda`)}canPerformInRuleRecovery(e,t){return this.canRecoverWithSingleTokenInsertion(e,t)||this.canRecoverWithSingleTokenDeletion(e)}canRecoverWithSingleTokenInsertion(e,t){if(!this.canTokenTypeBeInsertedInRecovery(e)||(0,a.isEmpty)(t))return!1;let n=this.LA(1);return(0,a.find)(t,e=>this.tokenMatcher(n,e))!==void 0}canRecoverWithSingleTokenDeletion(e){return this.canTokenTypeBeDeletedInRecovery(e)?this.tokenMatcher(this.LA(2),e):!1}isInCurrentRuleReSyncSet(e){let t=this.getCurrFollowKey();return(0,a.includes)(this.getFollowSetFromFollowKey(t),e)}findReSyncTokenType(){let e=this.flattenFollowSet(),t=this.LA(1),n=2;for(;;){let r=(0,a.find)(e,e=>Ki(t,e));if(r!==void 0)return r;t=this.LA(n),n++}}getCurrFollowKey(){if(this.RULE_STACK.length===1)return ro;let e=this.getLastExplicitRuleShortName(),t=this.getLastExplicitRuleOccurrenceIndex(),n=this.getPreviousExplicitRuleShortName();return{ruleName:this.shortRuleNameToFullName(e),idxInCallingRule:t,inRule:this.shortRuleNameToFullName(n)}}buildFullFollowKeyStack(){let e=this.RULE_STACK,t=this.RULE_OCCURRENCE_STACK;return(0,a.map)(e,(n,r)=>r===0?ro:{ruleName:this.shortRuleNameToFullName(n),idxInCallingRule:t[r],inRule:this.shortRuleNameToFullName(e[r-1])})}flattenFollowSet(){return(0,a.flatten)((0,a.map)(this.buildFullFollowKeyStack(),e=>this.getFollowSetFromFollowKey(e)))}getFollowSetFromFollowKey(e){if(e===ro)return[Wi];let t=e.ruleName+e.idxInCallingRule+mr+e.inRule;return this.resyncFollows[t]}addToResyncTokens(e,t){return this.tokenMatcher(e,Wi)||t.push(e),t}reSyncTo(e){let t=[],n=this.LA(1);for(;this.tokenMatcher(n,e)===!1;)n=this.SKIP_TOKEN(),this.addToResyncTokens(n,t);return(0,a.dropRight)(t)}attemptInRepetitionRecovery(e,t,n,r,i,a,o){}getCurrentGrammarPath(e,t){return{ruleStack:this.getHumanReadableRuleStack(),occurrenceStack:(0,a.clone)(this.RULE_OCCURRENCE_STACK),lastTok:e,lastTokOccurrence:t}}getHumanReadableRuleStack(){return(0,a.map)(this.RULE_STACK,e=>this.shortRuleNameToFullName(e))}};function so(e,t,n,r,i,a,o){let s=this.getKeyForAutomaticLookahead(r,i),c=this.firstAfterRepMap[s];if(c===void 0){let e=this.getCurrRuleFullName(),t=this.getGAstProductions()[e];c=new a(t,i).startWalking(),this.firstAfterRepMap[s]=c}let l=c.token,u=c.occurrence,d=c.isEndOfRule;this.RULE_STACK.length===1&&d&&l===void 0&&(l=Wi,u=1),!(l===void 0||u===void 0)&&this.shouldInRepetitionRecoveryBeTried(l,u,o)&&this.tryInRepetitionRecovery(e,t,n,l)}var co=1024,lo=1280,uo=1536;function fo(e,t,n){return n|t|e}var po=class{constructor(e){this.maxLookahead=e?.maxLookahead??Yo.maxLookahead}validate(e){let t=this.validateNoLeftRecursion(e.rules);if((0,a.isEmpty)(t)){let n=this.validateEmptyOrAlternatives(e.rules),r=this.validateAmbiguousAlternationAlternatives(e.rules,this.maxLookahead),i=this.validateSomeNonEmptyLookaheadPath(e.rules,this.maxLookahead);return[...t,...n,...r,...i]}return t}validateNoLeftRecursion(e){return(0,a.flatMap)(e,e=>Na(e,e,Yi))}validateEmptyOrAlternatives(e){return(0,a.flatMap)(e,e=>Ia(e,Yi))}validateAmbiguousAlternationAlternatives(e,t){return(0,a.flatMap)(e,e=>La(e,t,Yi))}validateSomeNonEmptyLookaheadPath(e,t){return Ba(e,t,Yi)}buildLookaheadForAlternation(e){return ua(e.prodOccurrence,e.rule,e.maxLookahead,e.hasPredicates,e.dynamicTokensEnabled,fa)}buildLookaheadForOptional(e){return da(e.prodOccurrence,e.rule,e.maxLookahead,e.dynamicTokensEnabled,ca(e.prodType),pa)}},mo=class{initLooksAhead(e){this.dynamicTokensEnabled=(0,a.has)(e,`dynamicTokensEnabled`)?e.dynamicTokensEnabled:Yo.dynamicTokensEnabled,this.maxLookahead=(0,a.has)(e,`maxLookahead`)?e.maxLookahead:Yo.maxLookahead,this.lookaheadStrategy=(0,a.has)(e,`lookaheadStrategy`)?e.lookaheadStrategy:new po({maxLookahead:this.maxLookahead}),this.lookAheadFuncsCache=new Map}preComputeLookaheadFunctions(e){(0,a.forEach)(e,e=>{this.TRACE_INIT(`${e.name} Rule Lookahead`,()=>{let{alternation:t,repetition:n,option:r,repetitionMandatory:i,repetitionMandatoryWithSeparator:o,repetitionWithSeparator:s}=go(e);(0,a.forEach)(t,t=>{let n=t.idx===0?``:t.idx;this.TRACE_INIT(`${sr(t)}${n}`,()=>{let n=this.lookaheadStrategy.buildLookaheadForAlternation({prodOccurrence:t.idx,rule:e,maxLookahead:t.maxLookahead||this.maxLookahead,hasPredicates:t.hasPredicates,dynamicTokensEnabled:this.dynamicTokensEnabled}),r=fo(this.fullRuleNameToShort[e.name],256,t.idx);this.setLaFuncCache(r,n)})}),(0,a.forEach)(n,t=>{this.computeLookaheadFunc(e,t.idx,768,`Repetition`,t.maxLookahead,sr(t))}),(0,a.forEach)(r,t=>{this.computeLookaheadFunc(e,t.idx,512,`Option`,t.maxLookahead,sr(t))}),(0,a.forEach)(i,t=>{this.computeLookaheadFunc(e,t.idx,co,`RepetitionMandatory`,t.maxLookahead,sr(t))}),(0,a.forEach)(o,t=>{this.computeLookaheadFunc(e,t.idx,uo,`RepetitionMandatoryWithSeparator`,t.maxLookahead,sr(t))}),(0,a.forEach)(s,t=>{this.computeLookaheadFunc(e,t.idx,lo,`RepetitionWithSeparator`,t.maxLookahead,sr(t))})})})}computeLookaheadFunc(e,t,n,r,i,a){this.TRACE_INIT(`${a}${t===0?``:t}`,()=>{let a=this.lookaheadStrategy.buildLookaheadForOptional({prodOccurrence:t,rule:e,maxLookahead:i||this.maxLookahead,dynamicTokensEnabled:this.dynamicTokensEnabled,prodType:r}),o=fo(this.fullRuleNameToShort[e.name],n,t);this.setLaFuncCache(o,a)})}getKeyForAutomaticLookahead(e,t){return fo(this.getLastExplicitRuleShortName(),e,t)}getLaFuncFromCache(e){return this.lookAheadFuncsCache.get(e)}setLaFuncCache(e,t){this.lookAheadFuncsCache.set(e,t)}},ho=new class extends rr{constructor(){super(...arguments),this.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]}}reset(){this.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]}}visitOption(e){this.dslMethods.option.push(e)}visitRepetitionWithSeparator(e){this.dslMethods.repetitionWithSeparator.push(e)}visitRepetitionMandatory(e){this.dslMethods.repetitionMandatory.push(e)}visitRepetitionMandatoryWithSeparator(e){this.dslMethods.repetitionMandatoryWithSeparator.push(e)}visitRepetition(e){this.dslMethods.repetition.push(e)}visitAlternation(e){this.dslMethods.alternation.push(e)}};function go(e){ho.reset(),e.accept(ho);let t=ho.dslMethods;return ho.reset(),t}function _o(e,t){isNaN(e.startOffset)===!0?(e.startOffset=t.startOffset,e.endOffset=t.endOffset):e.endOffset<t.endOffset&&(e.endOffset=t.endOffset)}function vo(e,t){isNaN(e.startOffset)===!0?(e.startOffset=t.startOffset,e.startColumn=t.startColumn,e.startLine=t.startLine,e.endOffset=t.endOffset,e.endColumn=t.endColumn,e.endLine=t.endLine):e.endOffset<t.endOffset&&(e.endOffset=t.endOffset,e.endColumn=t.endColumn,e.endLine=t.endLine)}function yo(e,t,n){e.children[n]===void 0?e.children[n]=[t]:e.children[n].push(t)}function bo(e,t,n){e.children[t]===void 0?e.children[t]=[n]:e.children[t].push(n)}var xo=`name`;function So(e,t){Object.defineProperty(e,xo,{enumerable:!1,configurable:!0,writable:!1,value:t})}function Co(e,t){let n=(0,a.keys)(e),r=n.length;for(let i=0;i<r;i++){let r=e[n[i]],a=r.length;for(let e=0;e<a;e++){let n=r[e];n.tokenTypeIdx===void 0&&this[n.name](n.children,t)}}}function wo(e,t){let n=function(){};return So(n,e+`BaseSemantics`),n.prototype={visit:function(e,t){if((0,a.isArray)(e)&&(e=e[0]),!(0,a.isUndefined)(e))return this[e.name](e.children,t)},validateVisitor:function(){let e=Do(this,t);if(!(0,a.isEmpty)(e)){let t=(0,a.map)(e,e=>e.msg);throw Error(`Errors Detected in CST Visitor <${this.constructor.name}>:\n\t${t.join(`
54
-
55
- `).replace(/\n/g,`
56
- `)}`)}}},n.prototype.constructor=n,n._RULE_NAMES=t,n}function To(e,t,n){let r=function(){};So(r,e+`BaseSemanticsWithDefaults`);let i=Object.create(n.prototype);return(0,a.forEach)(t,e=>{i[e]=Co}),r.prototype=i,r.prototype.constructor=r,r}var Eo;(function(e){e[e.REDUNDANT_METHOD=0]=`REDUNDANT_METHOD`,e[e.MISSING_METHOD=1]=`MISSING_METHOD`})(Eo||={});function Do(e,t){return Oo(e,t)}function Oo(e,t){return(0,a.compact)((0,a.map)((0,a.filter)(t,t=>(0,a.isFunction)(e[t])===!1),t=>({msg:`Missing visitor method: <${t}> on ${e.constructor.name} CST Visitor.`,type:Eo.MISSING_METHOD,methodName:t})))}var ko=class{initTreeBuilder(e){if(this.CST_STACK=[],this.outputCst=e.outputCst,this.nodeLocationTracking=(0,a.has)(e,`nodeLocationTracking`)?e.nodeLocationTracking:Yo.nodeLocationTracking,!this.outputCst)this.cstInvocationStateUpdate=a.noop,this.cstFinallyStateUpdate=a.noop,this.cstPostTerminal=a.noop,this.cstPostNonTerminal=a.noop,this.cstPostRule=a.noop;else if(/full/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=vo,this.setNodeLocationFromNode=vo,this.cstPostRule=a.noop,this.setInitialNodeLocation=this.setInitialNodeLocationFullRecovery):(this.setNodeLocationFromToken=a.noop,this.setNodeLocationFromNode=a.noop,this.cstPostRule=this.cstPostRuleFull,this.setInitialNodeLocation=this.setInitialNodeLocationFullRegular);else if(/onlyOffset/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=_o,this.setNodeLocationFromNode=_o,this.cstPostRule=a.noop,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRecovery):(this.setNodeLocationFromToken=a.noop,this.setNodeLocationFromNode=a.noop,this.cstPostRule=this.cstPostRuleOnlyOffset,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRegular);else if(/none/i.test(this.nodeLocationTracking))this.setNodeLocationFromToken=a.noop,this.setNodeLocationFromNode=a.noop,this.cstPostRule=a.noop,this.setInitialNodeLocation=a.noop;else throw Error(`Invalid <nodeLocationTracking> config option: "${e.nodeLocationTracking}"`)}setInitialNodeLocationOnlyOffsetRecovery(e){e.location={startOffset:NaN,endOffset:NaN}}setInitialNodeLocationOnlyOffsetRegular(e){e.location={startOffset:this.LA(1).startOffset,endOffset:NaN}}setInitialNodeLocationFullRecovery(e){e.location={startOffset:NaN,startLine:NaN,startColumn:NaN,endOffset:NaN,endLine:NaN,endColumn:NaN}}setInitialNodeLocationFullRegular(e){let t=this.LA(1);e.location={startOffset:t.startOffset,startLine:t.startLine,startColumn:t.startColumn,endOffset:NaN,endLine:NaN,endColumn:NaN}}cstInvocationStateUpdate(e){let t={name:e,children:Object.create(null)};this.setInitialNodeLocation(t),this.CST_STACK.push(t)}cstFinallyStateUpdate(){this.CST_STACK.pop()}cstPostRuleFull(e){let t=this.LA(0),n=e.location;n.startOffset<=t.startOffset?(n.endOffset=t.endOffset,n.endLine=t.endLine,n.endColumn=t.endColumn):(n.startOffset=NaN,n.startLine=NaN,n.startColumn=NaN)}cstPostRuleOnlyOffset(e){let t=this.LA(0),n=e.location;n.startOffset<=t.startOffset?n.endOffset=t.endOffset:n.startOffset=NaN}cstPostTerminal(e,t){let n=this.CST_STACK[this.CST_STACK.length-1];yo(n,t,e),this.setNodeLocationFromToken(n.location,t)}cstPostNonTerminal(e,t){let n=this.CST_STACK[this.CST_STACK.length-1];bo(n,t,e),this.setNodeLocationFromNode(n.location,e.location)}getBaseCstVisitorConstructor(){if((0,a.isUndefined)(this.baseCstVisitorConstructor)){let e=wo(this.className,(0,a.keys)(this.gastProductionsCache));return this.baseCstVisitorConstructor=e,e}return this.baseCstVisitorConstructor}getBaseCstVisitorConstructorWithDefaults(){if((0,a.isUndefined)(this.baseCstVisitorWithDefaultsConstructor)){let e=To(this.className,(0,a.keys)(this.gastProductionsCache),this.getBaseCstVisitorConstructor());return this.baseCstVisitorWithDefaultsConstructor=e,e}return this.baseCstVisitorWithDefaultsConstructor}getLastExplicitRuleShortName(){let e=this.RULE_STACK;return e[e.length-1]}getPreviousExplicitRuleShortName(){let e=this.RULE_STACK;return e[e.length-2]}getLastExplicitRuleOccurrenceIndex(){let e=this.RULE_OCCURRENCE_STACK;return e[e.length-1]}},Ao=class{initLexerAdapter(){this.tokVector=[],this.tokVectorLength=0,this.currIdx=-1}set input(e){if(this.selfAnalysisDone!==!0)throw Error(`Missing <performSelfAnalysis> invocation at the end of the Parser's constructor.`);this.reset(),this.tokVector=e,this.tokVectorLength=e.length}get input(){return this.tokVector}SKIP_TOKEN(){return this.currIdx<=this.tokVector.length-2?(this.consumeToken(),this.LA(1)):Jo}LA(e){let t=this.currIdx+e;return t<0||this.tokVectorLength<=t?Jo:this.tokVector[t]}consumeToken(){this.currIdx++}exportLexerState(){return this.currIdx}importLexerState(e){this.currIdx=e}resetLexerState(){this.currIdx=-1}moveToTerminatedState(){this.currIdx=this.tokVector.length-1}getLexerPosition(){return this.exportLexerState()}},jo=class{ACTION(e){return e.call(this)}consume(e,t,n){return this.consumeInternal(t,e,n)}subrule(e,t,n){return this.subruleInternal(t,e,n)}option(e,t){return this.optionInternal(t,e)}or(e,t){return this.orInternal(t,e)}many(e,t){return this.manyInternal(e,t)}atLeastOne(e,t){return this.atLeastOneInternal(e,t)}CONSUME(e,t){return this.consumeInternal(e,0,t)}CONSUME1(e,t){return this.consumeInternal(e,1,t)}CONSUME2(e,t){return this.consumeInternal(e,2,t)}CONSUME3(e,t){return this.consumeInternal(e,3,t)}CONSUME4(e,t){return this.consumeInternal(e,4,t)}CONSUME5(e,t){return this.consumeInternal(e,5,t)}CONSUME6(e,t){return this.consumeInternal(e,6,t)}CONSUME7(e,t){return this.consumeInternal(e,7,t)}CONSUME8(e,t){return this.consumeInternal(e,8,t)}CONSUME9(e,t){return this.consumeInternal(e,9,t)}SUBRULE(e,t){return this.subruleInternal(e,0,t)}SUBRULE1(e,t){return this.subruleInternal(e,1,t)}SUBRULE2(e,t){return this.subruleInternal(e,2,t)}SUBRULE3(e,t){return this.subruleInternal(e,3,t)}SUBRULE4(e,t){return this.subruleInternal(e,4,t)}SUBRULE5(e,t){return this.subruleInternal(e,5,t)}SUBRULE6(e,t){return this.subruleInternal(e,6,t)}SUBRULE7(e,t){return this.subruleInternal(e,7,t)}SUBRULE8(e,t){return this.subruleInternal(e,8,t)}SUBRULE9(e,t){return this.subruleInternal(e,9,t)}OPTION(e){return this.optionInternal(e,0)}OPTION1(e){return this.optionInternal(e,1)}OPTION2(e){return this.optionInternal(e,2)}OPTION3(e){return this.optionInternal(e,3)}OPTION4(e){return this.optionInternal(e,4)}OPTION5(e){return this.optionInternal(e,5)}OPTION6(e){return this.optionInternal(e,6)}OPTION7(e){return this.optionInternal(e,7)}OPTION8(e){return this.optionInternal(e,8)}OPTION9(e){return this.optionInternal(e,9)}OR(e){return this.orInternal(e,0)}OR1(e){return this.orInternal(e,1)}OR2(e){return this.orInternal(e,2)}OR3(e){return this.orInternal(e,3)}OR4(e){return this.orInternal(e,4)}OR5(e){return this.orInternal(e,5)}OR6(e){return this.orInternal(e,6)}OR7(e){return this.orInternal(e,7)}OR8(e){return this.orInternal(e,8)}OR9(e){return this.orInternal(e,9)}MANY(e){this.manyInternal(0,e)}MANY1(e){this.manyInternal(1,e)}MANY2(e){this.manyInternal(2,e)}MANY3(e){this.manyInternal(3,e)}MANY4(e){this.manyInternal(4,e)}MANY5(e){this.manyInternal(5,e)}MANY6(e){this.manyInternal(6,e)}MANY7(e){this.manyInternal(7,e)}MANY8(e){this.manyInternal(8,e)}MANY9(e){this.manyInternal(9,e)}MANY_SEP(e){this.manySepFirstInternal(0,e)}MANY_SEP1(e){this.manySepFirstInternal(1,e)}MANY_SEP2(e){this.manySepFirstInternal(2,e)}MANY_SEP3(e){this.manySepFirstInternal(3,e)}MANY_SEP4(e){this.manySepFirstInternal(4,e)}MANY_SEP5(e){this.manySepFirstInternal(5,e)}MANY_SEP6(e){this.manySepFirstInternal(6,e)}MANY_SEP7(e){this.manySepFirstInternal(7,e)}MANY_SEP8(e){this.manySepFirstInternal(8,e)}MANY_SEP9(e){this.manySepFirstInternal(9,e)}AT_LEAST_ONE(e){this.atLeastOneInternal(0,e)}AT_LEAST_ONE1(e){return this.atLeastOneInternal(1,e)}AT_LEAST_ONE2(e){this.atLeastOneInternal(2,e)}AT_LEAST_ONE3(e){this.atLeastOneInternal(3,e)}AT_LEAST_ONE4(e){this.atLeastOneInternal(4,e)}AT_LEAST_ONE5(e){this.atLeastOneInternal(5,e)}AT_LEAST_ONE6(e){this.atLeastOneInternal(6,e)}AT_LEAST_ONE7(e){this.atLeastOneInternal(7,e)}AT_LEAST_ONE8(e){this.atLeastOneInternal(8,e)}AT_LEAST_ONE9(e){this.atLeastOneInternal(9,e)}AT_LEAST_ONE_SEP(e){this.atLeastOneSepFirstInternal(0,e)}AT_LEAST_ONE_SEP1(e){this.atLeastOneSepFirstInternal(1,e)}AT_LEAST_ONE_SEP2(e){this.atLeastOneSepFirstInternal(2,e)}AT_LEAST_ONE_SEP3(e){this.atLeastOneSepFirstInternal(3,e)}AT_LEAST_ONE_SEP4(e){this.atLeastOneSepFirstInternal(4,e)}AT_LEAST_ONE_SEP5(e){this.atLeastOneSepFirstInternal(5,e)}AT_LEAST_ONE_SEP6(e){this.atLeastOneSepFirstInternal(6,e)}AT_LEAST_ONE_SEP7(e){this.atLeastOneSepFirstInternal(7,e)}AT_LEAST_ONE_SEP8(e){this.atLeastOneSepFirstInternal(8,e)}AT_LEAST_ONE_SEP9(e){this.atLeastOneSepFirstInternal(9,e)}RULE(e,t,n=Xo){if((0,a.includes)(this.definedRulesNames,e)){let t={message:Yi.buildDuplicateRuleNameError({topLevelRule:e,grammarName:this.className}),type:Zo.DUPLICATE_RULE_NAME,ruleName:e};this.definitionErrors.push(t)}this.definedRulesNames.push(e);let r=this.defineRule(e,t,n);return this[e]=r,r}OVERRIDE_RULE(e,t,n=Xo){let r=Ma(e,this.definedRulesNames,this.className);this.definitionErrors=this.definitionErrors.concat(r);let i=this.defineRule(e,t,n);return this[e]=i,i}BACKTRACK(e,t){return function(){this.isBackTrackingStack.push(1);let n=this.saveRecogState();try{return e.apply(this,t),!0}catch(e){if(Za(e))return!1;throw e}finally{this.reloadRecogState(n),this.isBackTrackingStack.pop()}}}getGAstProductions(){return this.gastProductionsCache}getSerializedGastProductions(){return tr((0,a.values)(this.gastProductionsCache))}},Mo=class{initRecognizerEngine(e,t){if(this.className=this.constructor.name,this.shortRuleNameToFull={},this.fullRuleNameToShort={},this.ruleShortNameIdx=256,this.tokenMatcher=mi,this.subruleIdx=0,this.definedRulesNames=[],this.tokensMap={},this.isBackTrackingStack=[],this.RULE_STACK=[],this.RULE_OCCURRENCE_STACK=[],this.gastProductionsCache={},(0,a.has)(t,`serializedGrammar`))throw Error(`The Parser's configuration can no longer contain a <serializedGrammar> property.
57
- See: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_6-0-0
58
- For Further details.`);if((0,a.isArray)(e)){if((0,a.isEmpty)(e))throw Error(`A Token Vocabulary cannot be empty.
59
- Note that the first argument for the parser constructor
60
- is no longer a Token vector (since v4.0).`);if(typeof e[0].startOffset==`number`)throw Error(`The Parser constructor no longer accepts a token vector as the first argument.
61
- See: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_4-0-0
62
- For Further details.`)}if((0,a.isArray)(e))this.tokensMap=(0,a.reduce)(e,(e,t)=>(e[t.name]=t,e),{});else if((0,a.has)(e,`modes`)&&(0,a.every)((0,a.flatten)((0,a.values)(e.modes)),Di))this.tokensMap=(0,a.reduce)((0,a.uniq)((0,a.flatten)((0,a.values)(e.modes))),(e,t)=>(e[t.name]=t,e),{});else if((0,a.isObject)(e))this.tokensMap=(0,a.clone)(e);else throw Error(`<tokensDictionary> argument must be An Array of Token constructors, A dictionary of Token constructors or an IMultiModeLexerDefinition`);this.tokensMap.EOF=Wi,this.tokenMatcher=(0,a.every)((0,a.has)(e,`modes`)?(0,a.flatten)((0,a.values)(e.modes)):(0,a.values)(e),e=>(0,a.isEmpty)(e.categoryMatches))?mi:pi,_i((0,a.values)(this.tokensMap))}defineRule(e,t,n){if(this.selfAnalysisDone)throw Error(`Grammar rule <${e}> may not be defined after the 'performSelfAnalysis' method has been called'\nMake sure that all grammar rule definitions are done before 'performSelfAnalysis' is called.`);let r=(0,a.has)(n,`resyncEnabled`)?n.resyncEnabled:Xo.resyncEnabled,i=(0,a.has)(n,`recoveryValueFunc`)?n.recoveryValueFunc:Xo.recoveryValueFunc,o=this.ruleShortNameIdx<<12;this.ruleShortNameIdx++,this.shortRuleNameToFull[o]=e,this.fullRuleNameToShort[e]=o;let s;return s=this.outputCst===!0?function(...n){try{this.ruleInvocationStateUpdate(o,e,this.subruleIdx),t.apply(this,n);let r=this.CST_STACK[this.CST_STACK.length-1];return this.cstPostRule(r),r}catch(e){return this.invokeRuleCatch(e,r,i)}finally{this.ruleFinallyStateUpdate()}}:function(...n){try{return this.ruleInvocationStateUpdate(o,e,this.subruleIdx),t.apply(this,n)}catch(e){return this.invokeRuleCatch(e,r,i)}finally{this.ruleFinallyStateUpdate()}},Object.assign(s,{ruleName:e,originalGrammarAction:t})}invokeRuleCatch(e,t,n){let r=this.RULE_STACK.length===1,i=t&&!this.isBackTracking()&&this.recoveryEnabled;if(Za(e)){let t=e;if(i){let r=this.findReSyncTokenType();if(this.isInCurrentRuleReSyncSet(r))if(t.resyncedTokens=this.reSyncTo(r),this.outputCst){let e=this.CST_STACK[this.CST_STACK.length-1];return e.recoveredNode=!0,e}else return n(e);else{if(this.outputCst){let e=this.CST_STACK[this.CST_STACK.length-1];e.recoveredNode=!0,t.partialCstResult=e}throw t}}else if(r)return this.moveToTerminatedState(),n(e);else throw t}else throw e}optionInternal(e,t){let n=this.getKeyForAutomaticLookahead(512,t);return this.optionInternalLogic(e,t,n)}optionInternalLogic(e,t,n){let r=this.getLaFuncFromCache(n),i;if(typeof e!=`function`){i=e.DEF;let t=e.GATE;if(t!==void 0){let e=r;r=()=>t.call(this)&&e.call(this)}}else i=e;if(r.call(this)===!0)return i.call(this)}atLeastOneInternal(e,t){let n=this.getKeyForAutomaticLookahead(co,e);return this.atLeastOneInternalLogic(e,t,n)}atLeastOneInternalLogic(e,t,n){let r=this.getLaFuncFromCache(n),i;if(typeof t!=`function`){i=t.DEF;let e=t.GATE;if(e!==void 0){let t=r;r=()=>e.call(this)&&t.call(this)}}else i=t;if(r.call(this)===!0){let e=this.doSingleRepetition(i);for(;r.call(this)===!0&&e===!0;)e=this.doSingleRepetition(i)}else throw this.raiseEarlyExitException(e,U.REPETITION_MANDATORY,t.ERR_MSG);this.attemptInRepetitionRecovery(this.atLeastOneInternal,[e,t],r,co,e,ra)}atLeastOneSepFirstInternal(e,t){let n=this.getKeyForAutomaticLookahead(uo,e);this.atLeastOneSepFirstInternalLogic(e,t,n)}atLeastOneSepFirstInternalLogic(e,t,n){let r=t.DEF,i=t.SEP;if(this.getLaFuncFromCache(n).call(this)===!0){r.call(this);let t=()=>this.tokenMatcher(this.LA(1),i);for(;this.tokenMatcher(this.LA(1),i)===!0;)this.CONSUME(i),r.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,i,t,r,ia],t,uo,e,ia)}else throw this.raiseEarlyExitException(e,U.REPETITION_MANDATORY_WITH_SEPARATOR,t.ERR_MSG)}manyInternal(e,t){let n=this.getKeyForAutomaticLookahead(768,e);return this.manyInternalLogic(e,t,n)}manyInternalLogic(e,t,n){let r=this.getLaFuncFromCache(n),i;if(typeof t!=`function`){i=t.DEF;let e=t.GATE;if(e!==void 0){let t=r;r=()=>e.call(this)&&t.call(this)}}else i=t;let a=!0;for(;r.call(this)===!0&&a===!0;)a=this.doSingleRepetition(i);this.attemptInRepetitionRecovery(this.manyInternal,[e,t],r,768,e,ta,a)}manySepFirstInternal(e,t){let n=this.getKeyForAutomaticLookahead(lo,e);this.manySepFirstInternalLogic(e,t,n)}manySepFirstInternalLogic(e,t,n){let r=t.DEF,i=t.SEP;if(this.getLaFuncFromCache(n).call(this)===!0){r.call(this);let t=()=>this.tokenMatcher(this.LA(1),i);for(;this.tokenMatcher(this.LA(1),i)===!0;)this.CONSUME(i),r.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,i,t,r,na],t,lo,e,na)}}repetitionSepSecondInternal(e,t,n,r,i){for(;n();)this.CONSUME(t),r.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,t,n,r,i],n,uo,e,i)}doSingleRepetition(e){let t=this.getLexerPosition();return e.call(this),this.getLexerPosition()>t}orInternal(e,t){let n=this.getKeyForAutomaticLookahead(256,t),r=(0,a.isArray)(e)?e:e.DEF,i=this.getLaFuncFromCache(n).call(this,r);if(i!==void 0)return r[i].ALT.call(this);this.raiseNoAltException(t,e.ERR_MSG)}ruleFinallyStateUpdate(){if(this.RULE_STACK.pop(),this.RULE_OCCURRENCE_STACK.pop(),this.cstFinallyStateUpdate(),this.RULE_STACK.length===0&&this.isAtEndOfInput()===!1){let e=this.LA(1),t=this.errorMessageProvider.buildNotAllInputParsedMessage({firstRedundant:e,ruleName:this.getCurrRuleFullName()});this.SAVE_ERROR(new to(t,e))}}subruleInternal(e,t,n){let r;try{let i=n===void 0?void 0:n.ARGS;return this.subruleIdx=t,r=e.apply(this,i),this.cstPostNonTerminal(r,n!==void 0&&n.LABEL!==void 0?n.LABEL:e.ruleName),r}catch(t){throw this.subruleInternalError(t,n,e.ruleName)}}subruleInternalError(e,t,n){throw Za(e)&&e.partialCstResult!==void 0&&(this.cstPostNonTerminal(e.partialCstResult,t!==void 0&&t.LABEL!==void 0?t.LABEL:n),delete e.partialCstResult),e}consumeInternal(e,t,n){let r;try{let t=this.LA(1);this.tokenMatcher(t,e)===!0?(this.consumeToken(),r=t):this.consumeInternalError(e,t,n)}catch(n){r=this.consumeInternalRecovery(e,t,n)}return this.cstPostTerminal(n!==void 0&&n.LABEL!==void 0?n.LABEL:e.name,r),r}consumeInternalError(e,t,n){let r,i=this.LA(0);throw r=n!==void 0&&n.ERR_MSG?n.ERR_MSG:this.errorMessageProvider.buildMismatchTokenMessage({expected:e,actual:t,previous:i,ruleName:this.getCurrRuleFullName()}),this.SAVE_ERROR(new $a(r,t,i))}consumeInternalRecovery(e,t,n){if(this.recoveryEnabled&&n.name===`MismatchedTokenException`&&!this.isBackTracking()){let r=this.getFollowsForInRuleRecovery(e,t);try{return this.tryInRuleRecovery(e,r)}catch(e){throw e.name===`InRuleRecoveryException`?n:e}}else throw n}saveRecogState(){let e=this.errors,t=(0,a.clone)(this.RULE_STACK);return{errors:e,lexerState:this.exportLexerState(),RULE_STACK:t,CST_STACK:this.CST_STACK}}reloadRecogState(e){this.errors=e.errors,this.importLexerState(e.lexerState),this.RULE_STACK=e.RULE_STACK}ruleInvocationStateUpdate(e,t,n){this.RULE_OCCURRENCE_STACK.push(n),this.RULE_STACK.push(e),this.cstInvocationStateUpdate(t)}isBackTracking(){return this.isBackTrackingStack.length!==0}getCurrRuleFullName(){let e=this.getLastExplicitRuleShortName();return this.shortRuleNameToFull[e]}shortRuleNameToFullName(e){return this.shortRuleNameToFull[e]}isAtEndOfInput(){return this.tokenMatcher(this.LA(1),Wi)}reset(){this.resetLexerState(),this.subruleIdx=0,this.isBackTrackingStack=[],this.errors=[],this.RULE_STACK=[],this.CST_STACK=[],this.RULE_OCCURRENCE_STACK=[]}},No=class{initErrorHandler(e){this._errors=[],this.errorMessageProvider=(0,a.has)(e,`errorMessageProvider`)?e.errorMessageProvider:Yo.errorMessageProvider}SAVE_ERROR(e){if(Za(e))return e.context={ruleStack:this.getHumanReadableRuleStack(),ruleOccurrenceStack:(0,a.clone)(this.RULE_OCCURRENCE_STACK)},this._errors.push(e),e;throw Error(`Trying to save an Error which is not a RecognitionException`)}get errors(){return(0,a.clone)(this._errors)}set errors(e){this._errors=e}raiseEarlyExitException(e,t,n){let r=this.getCurrRuleFullName(),i=this.getGAstProductions()[r],a=xa(e,i,t,this.maxLookahead)[0],o=[];for(let e=1;e<=this.maxLookahead;e++)o.push(this.LA(e));let s=this.errorMessageProvider.buildEarlyExitMessage({expectedIterationPaths:a,actual:o,previous:this.LA(0),customUserDescription:n,ruleName:r});throw this.SAVE_ERROR(new no(s,this.LA(1),this.LA(0)))}raiseNoAltException(e,t){let n=this.getCurrRuleFullName(),r=this.getGAstProductions()[n],i=ba(e,r,this.maxLookahead),a=[];for(let e=1;e<=this.maxLookahead;e++)a.push(this.LA(e));let o=this.LA(0),s=this.errorMessageProvider.buildNoViableAltMessage({expectedPathsPerAlt:i,actual:a,previous:o,customUserDescription:t,ruleName:this.getCurrRuleFullName()});throw this.SAVE_ERROR(new eo(s,this.LA(1),o))}},Po=class{initContentAssist(){}computeContentAssist(e,t){let n=this.gastProductionsCache[e];if((0,a.isUndefined)(n))throw Error(`Rule ->${e}<- does not exist in this grammar.`);return oa([n],t,this.tokenMatcher,this.maxLookahead)}getNextPossibleTokenTypes(e){let t=(0,a.first)(e.ruleStack),n=this.getGAstProductions()[t];return new $i(n,e).startWalking()}},Fo={description:`This Object indicates the Parser is during Recording Phase`};Object.freeze(Fo);var Io=!0,Lo=2**8-1,Ro=Hi({name:`RECORDING_PHASE_TOKEN`,pattern:Ai.NA});_i([Ro]);var zo=Gi(Ro,`This IToken indicates the Parser is in Recording Phase
63
- See: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details`,-1,-1,-1,-1,-1,-1);Object.freeze(zo);var Bo={name:`This CSTNode indicates the Parser is in Recording Phase
64
- See: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details`,children:{}},Vo=class{initGastRecorder(e){this.recordingProdStack=[],this.RECORDING_PHASE=!1}enableRecording(){this.RECORDING_PHASE=!0,this.TRACE_INIT(`Enable Recording`,()=>{for(let e=0;e<10;e++){let t=e>0?e:``;this[`CONSUME${t}`]=function(t,n){return this.consumeInternalRecord(t,e,n)},this[`SUBRULE${t}`]=function(t,n){return this.subruleInternalRecord(t,e,n)},this[`OPTION${t}`]=function(t){return this.optionInternalRecord(t,e)},this[`OR${t}`]=function(t){return this.orInternalRecord(t,e)},this[`MANY${t}`]=function(t){this.manyInternalRecord(e,t)},this[`MANY_SEP${t}`]=function(t){this.manySepFirstInternalRecord(e,t)},this[`AT_LEAST_ONE${t}`]=function(t){this.atLeastOneInternalRecord(e,t)},this[`AT_LEAST_ONE_SEP${t}`]=function(t){this.atLeastOneSepFirstInternalRecord(e,t)}}this.consume=function(e,t,n){return this.consumeInternalRecord(t,e,n)},this.subrule=function(e,t,n){return this.subruleInternalRecord(t,e,n)},this.option=function(e,t){return this.optionInternalRecord(t,e)},this.or=function(e,t){return this.orInternalRecord(t,e)},this.many=function(e,t){this.manyInternalRecord(e,t)},this.atLeastOne=function(e,t){this.atLeastOneInternalRecord(e,t)},this.ACTION=this.ACTION_RECORD,this.BACKTRACK=this.BACKTRACK_RECORD,this.LA=this.LA_RECORD})}disableRecording(){this.RECORDING_PHASE=!1,this.TRACE_INIT(`Deleting Recording methods`,()=>{let e=this;for(let t=0;t<10;t++){let n=t>0?t:``;delete e[`CONSUME${n}`],delete e[`SUBRULE${n}`],delete e[`OPTION${n}`],delete e[`OR${n}`],delete e[`MANY${n}`],delete e[`MANY_SEP${n}`],delete e[`AT_LEAST_ONE${n}`],delete e[`AT_LEAST_ONE_SEP${n}`]}delete e.consume,delete e.subrule,delete e.option,delete e.or,delete e.many,delete e.atLeastOne,delete e.ACTION,delete e.BACKTRACK,delete e.LA})}ACTION_RECORD(e){}BACKTRACK_RECORD(e,t){return()=>!0}LA_RECORD(e){return Jo}topLevelRuleRecord(e,t){try{let n=new Yn({definition:[],name:e});return n.name=e,this.recordingProdStack.push(n),t.call(this),this.recordingProdStack.pop(),n}catch(e){if(e.KNOWN_RECORDER_ERROR!==!0)try{e.message+=`
65
- This error was thrown during the "grammar recording phase" For more info see:
66
- https://chevrotain.io/docs/guide/internals.html#grammar-recording`}catch{throw e}throw e}}optionInternalRecord(e,t){return Ho.call(this,z,e,t)}atLeastOneInternalRecord(e,t){Ho.call(this,Zn,t,e)}atLeastOneSepFirstInternalRecord(e,t){Ho.call(this,Qn,t,e,Io)}manyInternalRecord(e,t){Ho.call(this,B,t,e)}manySepFirstInternalRecord(e,t){Ho.call(this,$n,t,e,Io)}orInternalRecord(e,t){return Uo.call(this,e,t)}subruleInternalRecord(e,t,n){if(Go(t),!e||(0,a.has)(e,`ruleName`)===!1){let n=Error(`<SUBRULE${Wo(t)}> argument is invalid expecting a Parser method reference but got: <${JSON.stringify(e)}>\n inside top level rule: <${this.recordingProdStack[0].name}>`);throw n.KNOWN_RECORDER_ERROR=!0,n}let r=(0,a.last)(this.recordingProdStack),i=e.ruleName,o=new Jn({idx:t,nonTerminalName:i,label:n?.LABEL,referencedRule:void 0});return r.definition.push(o),this.outputCst?Bo:Fo}consumeInternalRecord(e,t,n){if(Go(t),!Ci(e)){let n=Error(`<CONSUME${Wo(t)}> argument is invalid expecting a TokenType reference but got: <${JSON.stringify(e)}>\n inside top level rule: <${this.recordingProdStack[0].name}>`);throw n.KNOWN_RECORDER_ERROR=!0,n}let r=(0,a.last)(this.recordingProdStack),i=new V({idx:t,terminalType:e,label:n?.LABEL});return r.definition.push(i),zo}};function Ho(e,t,n,r=!1){Go(n);let i=(0,a.last)(this.recordingProdStack),o=(0,a.isFunction)(t)?t:t.DEF,s=new e({definition:[],idx:n});return r&&(s.separator=t.SEP),(0,a.has)(t,`MAX_LOOKAHEAD`)&&(s.maxLookahead=t.MAX_LOOKAHEAD),this.recordingProdStack.push(s),o.call(this),i.definition.push(s),this.recordingProdStack.pop(),Fo}function Uo(e,t){Go(t);let n=(0,a.last)(this.recordingProdStack),r=(0,a.isArray)(e)===!1,i=r===!1?e:e.DEF,o=new er({definition:[],idx:t,ignoreAmbiguities:r&&e.IGNORE_AMBIGUITIES===!0});return(0,a.has)(e,`MAX_LOOKAHEAD`)&&(o.maxLookahead=e.MAX_LOOKAHEAD),o.hasPredicates=(0,a.some)(i,e=>(0,a.isFunction)(e.GATE)),n.definition.push(o),(0,a.forEach)(i,e=>{let t=new Xn({definition:[]});o.definition.push(t),(0,a.has)(e,`IGNORE_AMBIGUITIES`)?t.ignoreAmbiguities=e.IGNORE_AMBIGUITIES:(0,a.has)(e,`GATE`)&&(t.ignoreAmbiguities=!0),this.recordingProdStack.push(t),e.ALT.call(this),this.recordingProdStack.pop()}),Fo}function Wo(e){return e===0?``:`${e}`}function Go(e){if(e<0||e>Lo){let t=Error(`Invalid DSL Method idx value: <${e}>\n\tIdx value must be a none negative value smaller than ${Lo+1}`);throw t.KNOWN_RECORDER_ERROR=!0,t}}var Ko=class{initPerformanceTracer(e){if((0,a.has)(e,`traceInitPerf`)){let t=e.traceInitPerf,n=typeof t==`number`;this.traceInitMaxIdent=n?t:1/0,this.traceInitPerf=n?t>0:t}else this.traceInitMaxIdent=0,this.traceInitPerf=Yo.traceInitPerf;this.traceInitIndent=-1}TRACE_INIT(e,t){if(this.traceInitPerf===!0){this.traceInitIndent++;let n=Array(this.traceInitIndent+1).join(` `);this.traceInitIndent<this.traceInitMaxIdent&&console.log(`${n}--> <${e}>`);let{time:r,value:i}=Un(t),a=r>10?console.warn:console.log;return this.traceInitIndent<this.traceInitMaxIdent&&a(`${n}<-- <${e}> time: ${r}ms`),this.traceInitIndent--,i}else return t()}};function qo(e,t){t.forEach(t=>{let n=t.prototype;Object.getOwnPropertyNames(n).forEach(r=>{if(r===`constructor`)return;let i=Object.getOwnPropertyDescriptor(n,r);i&&(i.get||i.set)?Object.defineProperty(e.prototype,r,i):e.prototype[r]=t.prototype[r]})})}var Jo=Gi(Wi,``,NaN,NaN,NaN,NaN,NaN,NaN);Object.freeze(Jo);var Yo=Object.freeze({recoveryEnabled:!1,maxLookahead:3,dynamicTokensEnabled:!1,outputCst:!0,errorMessageProvider:qi,nodeLocationTracking:`none`,traceInitPerf:!1,skipValidations:!1}),Xo=Object.freeze({recoveryValueFunc:()=>void 0,resyncEnabled:!0}),Zo;(function(e){e[e.INVALID_RULE_NAME=0]=`INVALID_RULE_NAME`,e[e.DUPLICATE_RULE_NAME=1]=`DUPLICATE_RULE_NAME`,e[e.INVALID_RULE_OVERRIDE=2]=`INVALID_RULE_OVERRIDE`,e[e.DUPLICATE_PRODUCTIONS=3]=`DUPLICATE_PRODUCTIONS`,e[e.UNRESOLVED_SUBRULE_REF=4]=`UNRESOLVED_SUBRULE_REF`,e[e.LEFT_RECURSION=5]=`LEFT_RECURSION`,e[e.NONE_LAST_EMPTY_ALT=6]=`NONE_LAST_EMPTY_ALT`,e[e.AMBIGUOUS_ALTS=7]=`AMBIGUOUS_ALTS`,e[e.CONFLICT_TOKENS_RULES_NAMESPACE=8]=`CONFLICT_TOKENS_RULES_NAMESPACE`,e[e.INVALID_TOKEN_NAME=9]=`INVALID_TOKEN_NAME`,e[e.NO_NON_EMPTY_LOOKAHEAD=10]=`NO_NON_EMPTY_LOOKAHEAD`,e[e.AMBIGUOUS_PREFIX_ALTS=11]=`AMBIGUOUS_PREFIX_ALTS`,e[e.TOO_MANY_ALTS=12]=`TOO_MANY_ALTS`,e[e.CUSTOM_LOOKAHEAD_VALIDATION=13]=`CUSTOM_LOOKAHEAD_VALIDATION`})(Zo||={});function Qo(e=void 0){return function(){return e}}var $o=class e{static performSelfAnalysis(e){throw Error("The **static** `performSelfAnalysis` method has been deprecated. \nUse the **instance** method with the same name instead.")}performSelfAnalysis(){this.TRACE_INIT(`performSelfAnalysis`,()=>{let t;this.selfAnalysisDone=!0;let n=this.className;this.TRACE_INIT(`toFastProps`,()=>{Wn(this)}),this.TRACE_INIT(`Grammar Recording`,()=>{try{this.enableRecording(),(0,a.forEach)(this.definedRulesNames,e=>{let t=this[e].originalGrammarAction,n;this.TRACE_INIT(`${e} Rule`,()=>{n=this.topLevelRuleRecord(e,t)}),this.gastProductionsCache[e]=n})}finally{this.disableRecording()}});let r=[];if(this.TRACE_INIT(`Grammar Resolving`,()=>{r=Wa({rules:(0,a.values)(this.gastProductionsCache)}),this.definitionErrors=this.definitionErrors.concat(r)}),this.TRACE_INIT(`Grammar Validations`,()=>{if((0,a.isEmpty)(r)&&this.skipValidations===!1){let e=Ga({rules:(0,a.values)(this.gastProductionsCache),tokenTypes:(0,a.values)(this.tokensMap),errMsgProvider:Yi,grammarName:n}),t=Ta({lookaheadStrategy:this.lookaheadStrategy,rules:(0,a.values)(this.gastProductionsCache),tokenTypes:(0,a.values)(this.tokensMap),grammarName:n});this.definitionErrors=this.definitionErrors.concat(e,t)}}),(0,a.isEmpty)(this.definitionErrors)&&(this.recoveryEnabled&&this.TRACE_INIT(`computeAllProdsFollows`,()=>{this.resyncFollows=gr((0,a.values)(this.gastProductionsCache))}),this.TRACE_INIT(`ComputeLookaheadFunctions`,()=>{var e,t;(t=(e=this.lookaheadStrategy).initialize)==null||t.call(e,{rules:(0,a.values)(this.gastProductionsCache)}),this.preComputeLookaheadFunctions((0,a.values)(this.gastProductionsCache))})),!e.DEFER_DEFINITION_ERRORS_HANDLING&&!(0,a.isEmpty)(this.definitionErrors))throw t=(0,a.map)(this.definitionErrors,e=>e.message),Error(`Parser Definition Errors detected:\n ${t.join(`
67
- -------------------------------
68
- `)}`)})}constructor(e,t){this.definitionErrors=[],this.selfAnalysisDone=!1;let n=this;if(n.initErrorHandler(t),n.initLexerAdapter(),n.initLooksAhead(t),n.initRecognizerEngine(e,t),n.initRecoverable(t),n.initTreeBuilder(t),n.initContentAssist(),n.initGastRecorder(t),n.initPerformanceTracer(t),(0,a.has)(t,`ignoredIssues`))throw Error(`The <ignoredIssues> IParserConfig property has been deprecated.
69
- Please use the <IGNORE_AMBIGUITIES> flag on the relevant DSL method instead.
70
- See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#IGNORING_AMBIGUITIES
71
- For further details.`);this.skipValidations=(0,a.has)(t,`skipValidations`)?t.skipValidations:Yo.skipValidations}};$o.DEFER_DEFINITION_ERRORS_HANDLING=!1,qo($o,[oo,mo,ko,Ao,Mo,jo,No,Po,Vo,Ko]);var es=class extends $o{constructor(e,t=Yo){let n=(0,a.clone)(t);n.outputCst=!1,super(e,n)}};function ts(e,t){for(var n=-1,r=e==null?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}var ns=`__lodash_hash_undefined__`;function rs(e){return this.__data__.set(e,ns),this}function is(e){return this.__data__.has(e)}function as(e){var n=-1,r=e==null?0:e.length;for(this.__data__=new t.y;++n<r;)this.add(e[n])}as.prototype.add=as.prototype.push=rs,as.prototype.has=is;function os(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}function ss(e,t){return e.has(t)}var cs=1,ls=2;function us(e,t,n,r,i,a){var o=n&cs,s=e.length,c=t.length;if(s!=c&&!(o&&c>s))return!1;var l=a.get(e),u=a.get(t);if(l&&u)return l==t&&u==e;var d=-1,f=!0,p=n&ls?new as:void 0;for(a.set(e,t),a.set(t,e);++d<s;){var m=e[d],h=t[d];if(r)var g=o?r(h,m,d,t,e,a):r(m,h,d,e,t,a);if(g!==void 0){if(g)continue;f=!1;break}if(p){if(!os(t,function(e,t){if(!ss(p,t)&&(m===e||i(m,e,n,r,a)))return p.push(t)})){f=!1;break}}else if(!(m===h||i(m,h,n,r,a))){f=!1;break}}return a.delete(e),a.delete(t),f}function ds(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}function fs(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}var ps=1,ms=2,hs=`[object Boolean]`,gs=`[object Date]`,_s=`[object Error]`,vs=`[object Map]`,ys=`[object Number]`,bs=`[object RegExp]`,xs=`[object Set]`,Ss=`[object String]`,Cs=`[object Symbol]`,ws=`[object ArrayBuffer]`,Ts=`[object DataView]`,Es=t.D?t.D.prototype:void 0,Ds=Es?Es.valueOf:void 0;function Os(e,n,r,i,a,o,s){switch(r){case Ts:if(e.byteLength!=n.byteLength||e.byteOffset!=n.byteOffset)return!1;e=e.buffer,n=n.buffer;case ws:return!(e.byteLength!=n.byteLength||!o(new t.h(e),new t.h(n)));case hs:case gs:case ys:return t.x(+e,+n);case _s:return e.name==n.name&&e.message==n.message;case bs:case Ss:return e==n+``;case vs:var c=ds;case xs:var l=i&ps;if(c||=fs,e.size!=n.size&&!l)return!1;var u=s.get(e);if(u)return u==n;i|=ms,s.set(e,n);var d=us(c(e),c(n),i,a,o,s);return s.delete(e),d;case Cs:if(Ds)return Ds.call(e)==Ds.call(n)}return!1}var ks=1,As=Object.prototype.hasOwnProperty;function js(e,t,n,r,a,o){var s=n&ks,c=i.n(e),l=c.length;if(l!=i.n(t).length&&!s)return!1;for(var u=l;u--;){var d=c[u];if(!(s?d in t:As.call(t,d)))return!1}var f=o.get(e),p=o.get(t);if(f&&p)return f==t&&p==e;var m=!0;o.set(e,t),o.set(t,e);for(var h=s;++u<l;){d=c[u];var g=e[d],_=t[d];if(r)var v=s?r(_,g,d,t,e,o):r(g,_,d,e,t,o);if(!(v===void 0?g===_||a(g,_,n,r,o):v)){m=!1;break}h||=d==`constructor`}if(m&&!h){var y=e.constructor,b=t.constructor;y!=b&&`constructor`in e&&`constructor`in t&&!(typeof y==`function`&&y instanceof y&&typeof b==`function`&&b instanceof b)&&(m=!1)}return o.delete(e),o.delete(t),m}var Ms=1,Ns=`[object Arguments]`,Ps=`[object Array]`,Fs=`[object Object]`,Is=Object.prototype.hasOwnProperty;function Ls(e,r,i,a,o,s){var c=t.u(e),l=t.u(r),u=c?Ps:n.t(e),d=l?Ps:n.t(r);u=u==Ns?Fs:u,d=d==Ns?Fs:d;var f=u==Fs,p=d==Fs,m=u==d;if(m&&t.s(e)){if(!t.s(r))return!1;c=!0,f=!1}if(m&&!f)return s||=new t._,c||t.i(e)?us(e,r,i,a,o,s):Os(e,r,u,i,a,o,s);if(!(i&Ms)){var h=f&&Is.call(e,`__wrapped__`),g=p&&Is.call(r,`__wrapped__`);if(h||g){var _=h?e.value():e,v=g?r.value():r;return s||=new t._,o(_,v,i,a,s)}}return m?(s||=new t._,js(e,r,i,a,o,s)):!1}function Rs(e,n,r,i,a){return e===n?!0:e==null||n==null||!t.f(e)&&!t.f(n)?e!==e&&n!==n:Ls(e,n,r,i,Rs,a)}var zs=1,Bs=2;function Vs(e,n,r,i){var a=r.length,o=a,s=!i;if(e==null)return!o;for(e=Object(e);a--;){var c=r[a];if(s&&c[2]?c[1]!==e[c[0]]:!(c[0]in e))return!1}for(;++a<o;){c=r[a];var l=c[0],u=e[l],d=c[1];if(s&&c[2]){if(u===void 0&&!(l in e))return!1}else{var f=new t._;if(i)var p=i(u,d,l,e,n,f);if(!(p===void 0?Rs(d,u,zs|Bs,i,f):p))return!1}}return!0}function Hs(e){return e===e&&!t.T(e)}function Us(e){for(var t=i.r(e),n=t.length;n--;){var r=t[n],a=e[r];t[n]=[r,a,Hs(a)]}return t}function Ws(e,t){return function(n){return n==null?!1:n[e]===t&&(t!==void 0||e in Object(n))}}function Gs(e){var t=Us(e);return t.length==1&&t[0][2]?Ws(t[0][0],t[0][1]):function(n){return n===e||Vs(n,e,t)}}var Ks=`[object Symbol]`;function qs(e){return typeof e==`symbol`||t.f(e)&&t.E(e)==Ks}var Js=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Ys=/^\w*$/;function Xs(e,n){if(t.u(e))return!1;var r=typeof e;return r==`number`||r==`symbol`||r==`boolean`||e==null||qs(e)?!0:Ys.test(e)||!Js.test(e)||n!=null&&e in Object(n)}var Zs=500;function Qs(e){var n=t.v(e,function(e){return r.size===Zs&&r.clear(),e}),r=n.cache;return n}var $s=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ec=/\\(\\)?/g,tc=Qs(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(``),e.replace($s,function(e,n,r,i){t.push(r?i.replace(ec,`$1`):n||e)}),t}),nc=1/0,rc=t.D?t.D.prototype:void 0,ic=rc?rc.toString:void 0;function ac(e){if(typeof e==`string`)return e;if(t.u(e))return ts(e,ac)+``;if(qs(e))return ic?ic.call(e):``;var n=e+``;return n==`0`&&1/e==-nc?`-0`:n}function oc(e){return e==null?``:ac(e)}function sc(e,n){return t.u(e)?e:Xs(e,n)?[e]:tc(oc(e))}var cc=1/0;function lc(e){if(typeof e==`string`||qs(e))return e;var t=e+``;return t==`0`&&1/e==-cc?`-0`:t}function uc(e,t){t=sc(t,e);for(var n=0,r=t.length;e!=null&&n<r;)e=e[lc(t[n++])];return n&&n==r?e:void 0}function dc(e,t,n){var r=e==null?void 0:uc(e,t);return r===void 0?n:r}function fc(e,t){return e!=null&&t in Object(e)}function pc(e,n,r){n=sc(n,e);for(var i=-1,a=n.length,o=!1;++i<a;){var s=lc(n[i]);if(!(o=e!=null&&r(e,s)))break;e=e[s]}return o||++i!=a?o:(a=e==null?0:e.length,!!a&&t.l(a)&&t.r(s,a)&&(t.u(e)||t.d(e)))}function mc(e,t){return e!=null&&pc(e,t,fc)}var hc=1,gc=2;function _c(e,t){return Xs(e)&&Hs(t)?Ws(lc(e),t):function(n){var r=dc(n,e);return r===void 0&&r===t?mc(n,e):Rs(t,r,hc|gc)}}function vc(e){return function(t){return t?.[e]}}function yc(e){return function(t){return uc(t,e)}}function bc(e){return Xs(e)?vc(lc(e)):yc(e)}function xc(e){return typeof e==`function`?e:e==null?t.t:typeof e==`object`?t.u(e)?_c(e[0],e[1]):Gs(e):bc(e)}function Sc(e,n){return e&&t.g(e,n,i.r)}function Cc(e,n){return function(r,i){if(r==null)return r;if(!t.c(r))return e(r,i);for(var a=r.length,o=n?a:-1,s=Object(r);(n?o--:++o<a)&&i(s[o],o,s)!==!1;);return r}}var wc=Cc(Sc);function Tc(e,n){var r=-1,i=t.c(e)?Array(e.length):[];return wc(e,function(e,t,a){i[++r]=n(e,t,a)}),i}function Ec(e,n){return(t.u(e)?ts:Tc)(e,xc(n,3))}function Dc(e,t){var n=[];return wc(e,function(e,r,i){t(e,r,i)&&n.push(e)}),n}function Oc(e,n){return(t.u(e)?i.o:Dc)(e,xc(n,3))}function kc(e,t,n){return`${e.name}_${t}_${n}`}var Ac=class{constructor(e){this.target=e}isEpsilon(){return!1}},jc=class extends Ac{constructor(e,t){super(e),this.tokenType=t}},Mc=class extends Ac{constructor(e){super(e)}isEpsilon(){return!0}},Nc=class extends Ac{constructor(e,t,n){super(e),this.rule=t,this.followState=n}isEpsilon(){return!0}};function Pc(e){let t={decisionMap:{},decisionStates:[],ruleToStartState:new Map,ruleToStopState:new Map,states:[]};Fc(t,e);let n=e.length;for(let r=0;r<n;r++){let n=e[r],i=Uc(t,n,n);i!==void 0&&$c(t,n,i)}return t}function Fc(e,t){let n=t.length;for(let r=0;r<n;r++){let n=t[r],i=G(e,n,void 0,{type:2}),a=G(e,n,void 0,{type:7});i.stop=a,e.ruleToStartState.set(n,i),e.ruleToStopState.set(n,a)}}function Ic(e,t,n){return n instanceof V?Zc(e,t,n.terminalType,n):n instanceof Jn?Qc(e,t,n):n instanceof er?Vc(e,t,n):n instanceof z?Hc(e,t,n):n instanceof B?Lc(e,t,n):n instanceof $n?Rc(e,t,n):n instanceof Zn?zc(e,t,n):n instanceof Qn?Bc(e,t,n):Uc(e,t,n)}function Lc(e,t,n){let r=G(e,t,n,{type:5});return qc(e,r),Gc(e,t,n,Jc(e,t,r,n,Uc(e,t,n)))}function Rc(e,t,n){let r=G(e,t,n,{type:5});return qc(e,r),Gc(e,t,n,Jc(e,t,r,n,Uc(e,t,n)),Zc(e,t,n.separator,n))}function zc(e,t,n){let r=G(e,t,n,{type:4});return qc(e,r),Wc(e,t,n,Jc(e,t,r,n,Uc(e,t,n)))}function Bc(e,t,n){let r=G(e,t,n,{type:4});return qc(e,r),Wc(e,t,n,Jc(e,t,r,n,Uc(e,t,n)),Zc(e,t,n.separator,n))}function Vc(e,t,n){let r=G(e,t,n,{type:1});return qc(e,r),Jc(e,t,r,n,...Ec(n.definition,n=>Ic(e,t,n)))}function Hc(e,t,n){let r=G(e,t,n,{type:1});return qc(e,r),Kc(e,t,n,Jc(e,t,r,n,Uc(e,t,n)))}function Uc(e,t,n){let r=Oc(Ec(n.definition,n=>Ic(e,t,n)),e=>e!==void 0);return r.length===1?r[0]:r.length===0?void 0:Xc(e,r)}function Wc(e,t,n,r,i){let a=r.left,o=r.right,s=G(e,t,n,{type:11});qc(e,s);let c=G(e,t,n,{type:12});return a.loopback=s,c.loopback=s,e.decisionMap[kc(t,i?`RepetitionMandatoryWithSeparator`:`RepetitionMandatory`,n.idx)]=s,W(o,s),i===void 0?(W(s,a),W(s,c)):(W(s,c),W(s,i.left),W(i.right,a)),{left:a,right:c}}function Gc(e,t,n,r,i){let a=r.left,o=r.right,s=G(e,t,n,{type:10});qc(e,s);let c=G(e,t,n,{type:12}),l=G(e,t,n,{type:9});return s.loopback=l,c.loopback=l,W(s,a),W(s,c),W(o,l),i===void 0?W(l,s):(W(l,c),W(l,i.left),W(i.right,a)),e.decisionMap[kc(t,i?`RepetitionWithSeparator`:`Repetition`,n.idx)]=s,{left:s,right:c}}function Kc(e,t,n,r){let i=r.left,a=r.right;return W(i,a),e.decisionMap[kc(t,`Option`,n.idx)]=i,r}function qc(e,t){return e.decisionStates.push(t),t.decision=e.decisionStates.length-1,t.decision}function Jc(e,t,n,r,...i){let a=G(e,t,r,{type:8,start:n});n.end=a;for(let e of i)e===void 0?W(n,a):(W(n,e.left),W(e.right,a));let o={left:n,right:a};return e.decisionMap[kc(t,Yc(r),r.idx)]=n,o}function Yc(e){if(e instanceof er)return`Alternation`;if(e instanceof z)return`Option`;if(e instanceof B)return`Repetition`;if(e instanceof $n)return`RepetitionWithSeparator`;if(e instanceof Zn)return`RepetitionMandatory`;if(e instanceof Qn)return`RepetitionMandatoryWithSeparator`;throw Error(`Invalid production type encountered`)}function Xc(e,t){let n=t.length;for(let r=0;r<n-1;r++){let n=t[r],i;n.left.transitions.length===1&&(i=n.left.transitions[0]);let a=i instanceof Nc,o=i,s=t[r+1].left;n.left.type===1&&n.right.type===1&&i!==void 0&&(a&&o.followState===n.right||i.target===n.right)?(a?o.followState=s:i.target=s,tl(e,n.right)):W(n.right,s)}let r=t[0],i=t[n-1];return{left:r.left,right:i.right}}function Zc(e,t,n,r){let i=G(e,t,r,{type:1}),a=G(e,t,r,{type:1});return el(i,new jc(a,n)),{left:i,right:a}}function Qc(e,t,n){let r=n.referencedRule,i=e.ruleToStartState.get(r),a=G(e,t,n,{type:1}),o=G(e,t,n,{type:1});return el(a,new Nc(i,r,o)),{left:a,right:o}}function $c(e,t,n){let r=e.ruleToStartState.get(t);W(r,n.left);let i=e.ruleToStopState.get(t);return W(n.right,i),{left:r,right:i}}function W(e,t){el(e,new Mc(t))}function G(e,t,n,r){let i=Object.assign({atn:e,production:n,epsilonOnlyTransitions:!1,rule:t,transitions:[],nextTokenWithinRule:[],stateNumber:e.states.length},r);return e.states.push(i),i}function el(e,t){e.transitions.length===0&&(e.epsilonOnlyTransitions=t.isEpsilon()),e.transitions.push(t)}function tl(e,t){e.states.splice(e.states.indexOf(t),1)}var nl={},rl=class{constructor(){this.map={},this.configs=[]}get size(){return this.configs.length}finalize(){this.map={}}add(e){let t=il(e);t in this.map||(this.map[t]=this.configs.length,this.configs.push(e))}get elements(){return this.configs}get alts(){return Ec(this.configs,e=>e.alt)}get key(){let e=``;for(let t in this.map)e+=t+`:`;return e}};function il(e,t=!0){return`${t?`a${e.alt}`:``}s${e.state.stateNumber}:${e.stack.map(e=>e.stateNumber.toString()).join(`_`)}`}function al(e,t,n){for(var r=-1,i=e.length;++r<i;){var a=e[r],o=t(a);if(o!=null&&(s===void 0?o===o&&!qs(o):n(o,s)))var s=o,c=a}return c}function ol(e,t){return e<t}function sl(e){return e&&e.length?al(e,t.t,ol):void 0}var cl=t.D?t.D.isConcatSpreadable:void 0;function ll(e){return t.u(e)||t.d(e)||!!(cl&&e&&e[cl])}function ul(e,t,n,r,a){var o=-1,s=e.length;for(n||=ll,a||=[];++o<s;){var c=e[o];t>0&&n(c)?t>1?ul(c,t-1,n,r,a):i.c(a,c):r||(a[a.length]=c)}return a}function dl(e,t){return ul(Ec(e,t),1)}function fl(e,t,n,r){for(var i=e.length,a=n+(r?1:-1);r?a--:++a<i;)if(t(e[a],a,e))return a;return-1}function pl(e){return e!==e}function ml(e,t,n){for(var r=n-1,i=e.length;++r<i;)if(e[r]===t)return r;return-1}function hl(e,t,n){return t===t?ml(e,t,n):fl(e,pl,n)}function gl(e,t){return!!(e!=null&&e.length)&&hl(e,t,0)>-1}function _l(e,t,n){for(var r=-1,i=e==null?0:e.length;++r<i;)if(n(t,e[r]))return!0;return!1}function vl(){}var yl=n.n&&1/fs(new n.n([,-0]))[1]==1/0?function(e){return new n.n(e)}:vl,bl=200;function xl(e,t,n){var r=-1,i=gl,a=e.length,o=!0,s=[],c=s;if(n)o=!1,i=_l;else if(a>=bl){var l=t?null:yl(e);if(l)return fs(l);o=!1,i=ss,c=new as}else c=t?[]:s;outer:for(;++r<a;){var u=e[r],d=t?t(u):u;if(u=n||u!==0?u:0,o&&d===d){for(var f=c.length;f--;)if(c[f]===d)continue outer;t&&c.push(d),s.push(u)}else i(c,d,n)||(c!==s&&c.push(d),s.push(u))}return s}function Sl(e,t){return e&&e.length?xl(e,xc(t,2)):[]}function Cl(e){return e!=null&&e.length?ul(e,1):[]}function wl(e){return typeof e==`function`?e:t.t}function Tl(e,n){return(t.u(e)?i.t:wc)(e,wl(n))}function El(e,t,n,r){var i=-1,a=e==null?0:e.length;for(r&&a&&(n=e[++i]);++i<a;)n=t(n,e[i],i,e);return n}function Dl(e,t,n,r,i){return i(e,function(e,i,a){n=r?(r=!1,e):t(n,e,i,a)}),n}function Ol(e,n,r){var i=t.u(e)?El:Dl,a=arguments.length<3;return i(e,xc(n,4),r,a,wc)}function kl(e,t){let n={};return r=>{let i=r.toString(),a=n[i];return a===void 0?(a={atnStartState:e,decision:t,states:{}},n[i]=a,a):a}}var Al=class{constructor(){this.predicates=[]}is(e){return e>=this.predicates.length||this.predicates[e]}set(e,t){this.predicates[e]=t}toString(){let e=``,t=this.predicates.length;for(let n=0;n<t;n++)e+=this.predicates[n]===!0?`1`:`0`;return e}},jl=new Al,Ml=class extends po{constructor(e){super(),this.logging=e?.logging??(e=>console.log(e))}initialize(e){this.atn=Pc(e.rules),this.dfas=Pl(this.atn)}validateAmbiguousAlternationAlternatives(){return[]}validateEmptyOrAlternatives(){return[]}buildLookaheadForAlternation(e){let{prodOccurrence:t,rule:n,hasPredicates:r,dynamicTokensEnabled:i}=e,a=this.dfas,o=this.logging,s=kc(n,`Alternation`,t),c=this.atn.decisionMap[s].decision,l=Ec(la({maxLookahead:1,occurrence:t,prodType:`Alternation`,rule:n}),e=>Ec(e,e=>e[0]));if(Nl(l,!1)&&!i){let e=Ol(l,(e,t,n)=>(Tl(t,t=>{t&&(e[t.tokenTypeIdx]=n,Tl(t.categoryMatches,t=>{e[t]=n}))}),e),{});return r?function(t){let n=e[this.LA(1).tokenTypeIdx];if(t!==void 0&&n!==void 0){let e=t[n]?.GATE;if(e!==void 0&&e.call(this)===!1)return}return n}:function(){return e[this.LA(1).tokenTypeIdx]}}else if(r)return function(e){let t=new Al,n=e===void 0?0:e.length;for(let r=0;r<n;r++){let n=e?.[r].GATE;t.set(r,n===void 0||n.call(this))}let r=Fl.call(this,a,c,t,o);return typeof r==`number`?r:void 0};else return function(){let e=Fl.call(this,a,c,jl,o);return typeof e==`number`?e:void 0}}buildLookaheadForOptional(e){let{prodOccurrence:t,rule:n,prodType:i,dynamicTokensEnabled:a}=e,o=this.dfas,s=this.logging,c=kc(n,i,t),l=this.atn.decisionMap[c].decision,u=Ec(la({maxLookahead:1,occurrence:t,prodType:i,rule:n}),e=>Ec(e,e=>e[0]));if(Nl(u)&&u[0][0]&&!a){let e=u[0],t=Cl(e);if(t.length===1&&r.t(t[0].categoryMatches)){let e=t[0].tokenTypeIdx;return function(){return this.LA(1).tokenTypeIdx===e}}else{let e=Ol(t,(e,t)=>(t!==void 0&&(e[t.tokenTypeIdx]=!0,Tl(t.categoryMatches,t=>{e[t]=!0})),e),{});return function(){return e[this.LA(1).tokenTypeIdx]===!0}}}return function(){let e=Fl.call(this,o,l,jl,s);return typeof e==`object`?!1:e===0}}};function Nl(e,t=!0){let n=new Set;for(let r of e){let e=new Set;for(let i of r){if(i===void 0){if(t)break;return!1}let r=[i.tokenTypeIdx].concat(i.categoryMatches);for(let t of r)if(n.has(t)){if(!e.has(t))return!1}else n.add(t),e.add(t)}}return!0}function Pl(e){let t=e.decisionStates.length,n=Array(t);for(let r=0;r<t;r++)n[r]=kl(e.decisionStates[r],r);return n}function Fl(e,t,n,r){let i=e[t](n),a=i.start;return a===void 0&&(a=Jl(i,Kl(Yl(i.atnStartState))),i.start=a),Il.apply(this,[i,a,n,r])}function Il(e,t,n,r){let i=t,a=1,o=[],s=this.LA(a++);for(;;){let t=Hl(i,s);if(t===void 0&&(t=Ll.apply(this,[e,i,s,a,n,r])),t===nl)return Vl(o,i,s);if(t.isAcceptState===!0)return t.prediction;i=t,o.push(s),s=this.LA(a++)}}function Ll(e,t,n,r,i,a){let o=Ul(t.configs,n,i);if(o.size===0)return ql(e,t,n,nl),nl;let s=Kl(o),c=Gl(o,i);if(c!==void 0)s.isAcceptState=!0,s.prediction=c,s.configs.uniqueAlt=c;else if(eu(o)){let t=sl(o.alts);s.isAcceptState=!0,s.prediction=t,s.configs.uniqueAlt=t,Rl.apply(this,[e,r,o.alts,a])}return s=ql(e,t,n,s),s}function Rl(e,t,n,r){let i=[];for(let e=1;e<=t;e++)i.push(this.LA(e).tokenType);let a=e.atnStartState,o=a.rule,s=a.production;r(zl({topLevelRule:o,ambiguityIndices:n,production:s,prefixPath:i}))}function zl(e){let t=Ec(e.prefixPath,e=>ji(e)).join(`, `),n=e.production.idx===0?``:e.production.idx,r=`Ambiguous Alternatives Detected: <${e.ambiguityIndices.join(`, `)}> in <${Bl(e.production)}${n}> inside <${e.topLevelRule.name}> Rule,\n<${t}> may appears as a prefix path in all these alternatives.\n`;return r+=`See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#AMBIGUOUS_ALTERNATIVES
72
- For Further details.`,r}function Bl(e){if(e instanceof Jn)return`SUBRULE`;if(e instanceof z)return`OPTION`;if(e instanceof er)return`OR`;if(e instanceof Zn)return`AT_LEAST_ONE`;if(e instanceof Qn)return`AT_LEAST_ONE_SEP`;if(e instanceof $n)return`MANY_SEP`;if(e instanceof B)return`MANY`;if(e instanceof V)return`CONSUME`;throw Error(`non exhaustive match`)}function Vl(e,t,n){return{actualToken:n,possibleTokenTypes:Sl(dl(t.configs.elements,e=>e.state.transitions).filter(e=>e instanceof jc).map(e=>e.tokenType),e=>e.tokenTypeIdx),tokenPath:e}}function Hl(e,t){return e.edges[t.tokenTypeIdx]}function Ul(e,t,n){let r=new rl,i=[];for(let a of e.elements){if(n.is(a.alt)===!1)continue;if(a.state.type===7){i.push(a);continue}let e=a.state.transitions.length;for(let n=0;n<e;n++){let e=a.state.transitions[n],i=Wl(e,t);i!==void 0&&r.add({state:i,alt:a.alt,stack:a.stack})}}let a;if(i.length===0&&r.size===1&&(a=r),a===void 0){a=new rl;for(let e of r.elements)Xl(e,a)}if(i.length>0&&!Ql(a))for(let e of i)a.add(e);return a}function Wl(e,t){if(e instanceof jc&&Ki(t,e.tokenType))return e.target}function Gl(e,t){let n;for(let r of e.elements)if(t.is(r.alt)===!0){if(n===void 0)n=r.alt;else if(n!==r.alt)return}return n}function Kl(e){return{configs:e,edges:{},isAcceptState:!1,prediction:-1}}function ql(e,t,n,r){return r=Jl(e,r),t.edges[n.tokenTypeIdx]=r,r}function Jl(e,t){if(t===nl)return t;let n=t.configs.key,r=e.states[n];return r===void 0?(t.configs.finalize(),e.states[n]=t,t):r}function Yl(e){let t=new rl,n=e.transitions.length;for(let r=0;r<n;r++)Xl({state:e.transitions[r].target,alt:r,stack:[]},t);return t}function Xl(e,t){let n=e.state;if(n.type===7){if(e.stack.length>0){let n=[...e.stack];Xl({state:n.pop(),alt:e.alt,stack:n},t)}else t.add(e);return}n.epsilonOnlyTransitions||t.add(e);let r=n.transitions.length;for(let i=0;i<r;i++){let r=n.transitions[i],a=Zl(e,r);a!==void 0&&Xl(a,t)}}function Zl(e,t){if(t instanceof Mc)return{state:t.target,alt:e.alt,stack:e.stack};if(t instanceof Nc){let n=[...e.stack,t.followState];return{state:t.target,alt:e.alt,stack:n}}}function Ql(e){for(let t of e.elements)if(t.state.type===7)return!0;return!1}function $l(e){for(let t of e.elements)if(t.state.type!==7)return!1;return!0}function eu(e){if($l(e))return!0;let t=tu(e.elements);return nu(t)&&!ru(t)}function tu(e){let t=new Map;for(let n of e){let e=il(n,!1),r=t.get(e);r===void 0&&(r={},t.set(e,r)),r[n.alt]=!0}return t}function nu(e){for(let t of Array.from(e.values()))if(Object.keys(t).length>1)return!0;return!1}function ru(e){for(let t of Array.from(e.values()))if(Object.keys(t).length===1)return!0;return!1}var iu=e.r({AnnotatedTextEdit:()=>wu,ChangeAnnotation:()=>Cu,ChangeAnnotationIdentifier:()=>J,CodeAction:()=>sd,CodeActionContext:()=>od,CodeActionKind:()=>id,CodeActionTriggerKind:()=>ad,CodeDescription:()=>yu,CodeLens:()=>cd,Color:()=>du,ColorInformation:()=>fu,ColorPresentation:()=>pu,Command:()=>xu,CompletionItem:()=>Gu,CompletionItemKind:()=>zu,CompletionItemLabelDetails:()=>Wu,CompletionItemTag:()=>Vu,CompletionList:()=>Ku,CreateFile:()=>Eu,DeleteFile:()=>Ou,Diagnostic:()=>bu,DiagnosticRelatedInformation:()=>gu,DiagnosticSeverity:()=>_u,DiagnosticTag:()=>vu,DocumentHighlight:()=>Qu,DocumentHighlightKind:()=>Zu,DocumentLink:()=>ud,DocumentSymbol:()=>rd,DocumentUri:()=>au,EOL:()=>kd,FoldingRange:()=>hu,FoldingRangeKind:()=>mu,FormattingOptions:()=>ld,Hover:()=>Ju,InlayHint:()=>xd,InlayHintKind:()=>yd,InlayHintLabelPart:()=>bd,InlineCompletionContext:()=>Dd,InlineCompletionItem:()=>Cd,InlineCompletionList:()=>wd,InlineCompletionTriggerKind:()=>Td,InlineValueContext:()=>vd,InlineValueEvaluatableExpression:()=>_d,InlineValueText:()=>hd,InlineValueVariableLookup:()=>gd,InsertReplaceEdit:()=>Hu,InsertTextFormat:()=>Bu,InsertTextMode:()=>Uu,Location:()=>lu,LocationLink:()=>uu,MarkedString:()=>qu,MarkupContent:()=>Ru,MarkupKind:()=>Lu,OptionalVersionedTextDocumentIdentifier:()=>Fu,ParameterInformation:()=>Yu,Position:()=>K,Range:()=>q,RenameFile:()=>Du,SelectedCompletionInfo:()=>Ed,SelectionRange:()=>dd,SemanticTokenModifiers:()=>pd,SemanticTokenTypes:()=>fd,SemanticTokens:()=>md,SignatureInformation:()=>Xu,StringValue:()=>Sd,SymbolInformation:()=>td,SymbolKind:()=>$u,SymbolTag:()=>ed,TextDocument:()=>Ad,TextDocumentEdit:()=>Tu,TextDocumentIdentifier:()=>Nu,TextDocumentItem:()=>Iu,TextEdit:()=>Su,URI:()=>ou,VersionedTextDocumentIdentifier:()=>Pu,WorkspaceChange:()=>Mu,WorkspaceEdit:()=>ku,WorkspaceFolder:()=>Od,WorkspaceSymbol:()=>nd,integer:()=>su,uinteger:()=>cu}),au,ou,su,cu,K,q,lu,uu,du,fu,pu,mu,hu,gu,_u,vu,yu,bu,xu,Su,Cu,J,wu,Tu,Eu,Du,Ou,ku,Au,ju,Mu,Nu,Pu,Fu,Iu,Lu,Ru,zu,Bu,Vu,Hu,Uu,Wu,Gu,Ku,qu,Ju,Yu,Xu,Zu,Qu,$u,ed,td,nd,rd,id,ad,od,sd,cd,ld,ud,dd,fd,pd,md,hd,gd,_d,vd,yd,bd,xd,Sd,Cd,wd,Td,Ed,Dd,Od,kd,Ad,jd,Y,Md=e.n((()=>{(function(e){function t(e){return typeof e==`string`}e.is=t})(au||={}),(function(e){function t(e){return typeof e==`string`}e.is=t})(ou||={}),(function(e){e.MIN_VALUE=-2147483648,e.MAX_VALUE=2147483647;function t(t){return typeof t==`number`&&e.MIN_VALUE<=t&&t<=e.MAX_VALUE}e.is=t})(su||={}),(function(e){e.MIN_VALUE=0,e.MAX_VALUE=2147483647;function t(t){return typeof t==`number`&&e.MIN_VALUE<=t&&t<=e.MAX_VALUE}e.is=t})(cu||={}),(function(e){function t(e,t){return e===Number.MAX_VALUE&&(e=cu.MAX_VALUE),t===Number.MAX_VALUE&&(t=cu.MAX_VALUE),{line:e,character:t}}e.create=t;function n(e){let t=e;return Y.objectLiteral(t)&&Y.uinteger(t.line)&&Y.uinteger(t.character)}e.is=n})(K||={}),(function(e){function t(e,t,n,r){if(Y.uinteger(e)&&Y.uinteger(t)&&Y.uinteger(n)&&Y.uinteger(r))return{start:K.create(e,t),end:K.create(n,r)};if(K.is(e)&&K.is(t))return{start:e,end:t};throw Error(`Range#create called with invalid arguments[${e}, ${t}, ${n}, ${r}]`)}e.create=t;function n(e){let t=e;return Y.objectLiteral(t)&&K.is(t.start)&&K.is(t.end)}e.is=n})(q||={}),(function(e){function t(e,t){return{uri:e,range:t}}e.create=t;function n(e){let t=e;return Y.objectLiteral(t)&&q.is(t.range)&&(Y.string(t.uri)||Y.undefined(t.uri))}e.is=n})(lu||={}),(function(e){function t(e,t,n,r){return{targetUri:e,targetRange:t,targetSelectionRange:n,originSelectionRange:r}}e.create=t;function n(e){let t=e;return Y.objectLiteral(t)&&q.is(t.targetRange)&&Y.string(t.targetUri)&&q.is(t.targetSelectionRange)&&(q.is(t.originSelectionRange)||Y.undefined(t.originSelectionRange))}e.is=n})(uu||={}),(function(e){function t(e,t,n,r){return{red:e,green:t,blue:n,alpha:r}}e.create=t;function n(e){let t=e;return Y.objectLiteral(t)&&Y.numberRange(t.red,0,1)&&Y.numberRange(t.green,0,1)&&Y.numberRange(t.blue,0,1)&&Y.numberRange(t.alpha,0,1)}e.is=n})(du||={}),(function(e){function t(e,t){return{range:e,color:t}}e.create=t;function n(e){let t=e;return Y.objectLiteral(t)&&q.is(t.range)&&du.is(t.color)}e.is=n})(fu||={}),(function(e){function t(e,t,n){return{label:e,textEdit:t,additionalTextEdits:n}}e.create=t;function n(e){let t=e;return Y.objectLiteral(t)&&Y.string(t.label)&&(Y.undefined(t.textEdit)||Su.is(t))&&(Y.undefined(t.additionalTextEdits)||Y.typedArray(t.additionalTextEdits,Su.is))}e.is=n})(pu||={}),(function(e){e.Comment=`comment`,e.Imports=`imports`,e.Region=`region`})(mu||={}),(function(e){function t(e,t,n,r,i,a){let o={startLine:e,endLine:t};return Y.defined(n)&&(o.startCharacter=n),Y.defined(r)&&(o.endCharacter=r),Y.defined(i)&&(o.kind=i),Y.defined(a)&&(o.collapsedText=a),o}e.create=t;function n(e){let t=e;return Y.objectLiteral(t)&&Y.uinteger(t.startLine)&&Y.uinteger(t.startLine)&&(Y.undefined(t.startCharacter)||Y.uinteger(t.startCharacter))&&(Y.undefined(t.endCharacter)||Y.uinteger(t.endCharacter))&&(Y.undefined(t.kind)||Y.string(t.kind))}e.is=n})(hu||={}),(function(e){function t(e,t){return{location:e,message:t}}e.create=t;function n(e){let t=e;return Y.defined(t)&&lu.is(t.location)&&Y.string(t.message)}e.is=n})(gu||={}),(function(e){e.Error=1,e.Warning=2,e.Information=3,e.Hint=4})(_u||={}),(function(e){e.Unnecessary=1,e.Deprecated=2})(vu||={}),(function(e){function t(e){let t=e;return Y.objectLiteral(t)&&Y.string(t.href)}e.is=t})(yu||={}),(function(e){function t(e,t,n,r,i,a){let o={range:e,message:t};return Y.defined(n)&&(o.severity=n),Y.defined(r)&&(o.code=r),Y.defined(i)&&(o.source=i),Y.defined(a)&&(o.relatedInformation=a),o}e.create=t;function n(e){let t=e;return Y.defined(t)&&q.is(t.range)&&Y.string(t.message)&&(Y.number(t.severity)||Y.undefined(t.severity))&&(Y.integer(t.code)||Y.string(t.code)||Y.undefined(t.code))&&(Y.undefined(t.codeDescription)||Y.string(t.codeDescription?.href))&&(Y.string(t.source)||Y.undefined(t.source))&&(Y.undefined(t.relatedInformation)||Y.typedArray(t.relatedInformation,gu.is))}e.is=n})(bu||={}),(function(e){function t(e,t,...n){let r={title:e,command:t};return Y.defined(n)&&n.length>0&&(r.arguments=n),r}e.create=t;function n(e){let t=e;return Y.defined(t)&&Y.string(t.title)&&Y.string(t.command)}e.is=n})(xu||={}),(function(e){function t(e,t){return{range:e,newText:t}}e.replace=t;function n(e,t){return{range:{start:e,end:e},newText:t}}e.insert=n;function r(e){return{range:e,newText:``}}e.del=r;function i(e){let t=e;return Y.objectLiteral(t)&&Y.string(t.newText)&&q.is(t.range)}e.is=i})(Su||={}),(function(e){function t(e,t,n){let r={label:e};return t!==void 0&&(r.needsConfirmation=t),n!==void 0&&(r.description=n),r}e.create=t;function n(e){let t=e;return Y.objectLiteral(t)&&Y.string(t.label)&&(Y.boolean(t.needsConfirmation)||t.needsConfirmation===void 0)&&(Y.string(t.description)||t.description===void 0)}e.is=n})(Cu||={}),(function(e){function t(e){let t=e;return Y.string(t)}e.is=t})(J||={}),(function(e){function t(e,t,n){return{range:e,newText:t,annotationId:n}}e.replace=t;function n(e,t,n){return{range:{start:e,end:e},newText:t,annotationId:n}}e.insert=n;function r(e,t){return{range:e,newText:``,annotationId:t}}e.del=r;function i(e){let t=e;return Su.is(t)&&(Cu.is(t.annotationId)||J.is(t.annotationId))}e.is=i})(wu||={}),(function(e){function t(e,t){return{textDocument:e,edits:t}}e.create=t;function n(e){let t=e;return Y.defined(t)&&Fu.is(t.textDocument)&&Array.isArray(t.edits)}e.is=n})(Tu||={}),(function(e){function t(e,t,n){let r={kind:`create`,uri:e};return t!==void 0&&(t.overwrite!==void 0||t.ignoreIfExists!==void 0)&&(r.options=t),n!==void 0&&(r.annotationId=n),r}e.create=t;function n(e){let t=e;return t&&t.kind===`create`&&Y.string(t.uri)&&(t.options===void 0||(t.options.overwrite===void 0||Y.boolean(t.options.overwrite))&&(t.options.ignoreIfExists===void 0||Y.boolean(t.options.ignoreIfExists)))&&(t.annotationId===void 0||J.is(t.annotationId))}e.is=n})(Eu||={}),(function(e){function t(e,t,n,r){let i={kind:`rename`,oldUri:e,newUri:t};return n!==void 0&&(n.overwrite!==void 0||n.ignoreIfExists!==void 0)&&(i.options=n),r!==void 0&&(i.annotationId=r),i}e.create=t;function n(e){let t=e;return t&&t.kind===`rename`&&Y.string(t.oldUri)&&Y.string(t.newUri)&&(t.options===void 0||(t.options.overwrite===void 0||Y.boolean(t.options.overwrite))&&(t.options.ignoreIfExists===void 0||Y.boolean(t.options.ignoreIfExists)))&&(t.annotationId===void 0||J.is(t.annotationId))}e.is=n})(Du||={}),(function(e){function t(e,t,n){let r={kind:`delete`,uri:e};return t!==void 0&&(t.recursive!==void 0||t.ignoreIfNotExists!==void 0)&&(r.options=t),n!==void 0&&(r.annotationId=n),r}e.create=t;function n(e){let t=e;return t&&t.kind===`delete`&&Y.string(t.uri)&&(t.options===void 0||(t.options.recursive===void 0||Y.boolean(t.options.recursive))&&(t.options.ignoreIfNotExists===void 0||Y.boolean(t.options.ignoreIfNotExists)))&&(t.annotationId===void 0||J.is(t.annotationId))}e.is=n})(Ou||={}),(function(e){function t(e){let t=e;return t&&(t.changes!==void 0||t.documentChanges!==void 0)&&(t.documentChanges===void 0||t.documentChanges.every(e=>Y.string(e.kind)?Eu.is(e)||Du.is(e)||Ou.is(e):Tu.is(e)))}e.is=t})(ku||={}),Au=class{constructor(e,t){this.edits=e,this.changeAnnotations=t}insert(e,t,n){let r,i;if(n===void 0?r=Su.insert(e,t):J.is(n)?(i=n,r=wu.insert(e,t,n)):(this.assertChangeAnnotations(this.changeAnnotations),i=this.changeAnnotations.manage(n),r=wu.insert(e,t,i)),this.edits.push(r),i!==void 0)return i}replace(e,t,n){let r,i;if(n===void 0?r=Su.replace(e,t):J.is(n)?(i=n,r=wu.replace(e,t,n)):(this.assertChangeAnnotations(this.changeAnnotations),i=this.changeAnnotations.manage(n),r=wu.replace(e,t,i)),this.edits.push(r),i!==void 0)return i}delete(e,t){let n,r;if(t===void 0?n=Su.del(e):J.is(t)?(r=t,n=wu.del(e,t)):(this.assertChangeAnnotations(this.changeAnnotations),r=this.changeAnnotations.manage(t),n=wu.del(e,r)),this.edits.push(n),r!==void 0)return r}add(e){this.edits.push(e)}all(){return this.edits}clear(){this.edits.splice(0,this.edits.length)}assertChangeAnnotations(e){if(e===void 0)throw Error(`Text edit change is not configured to manage change annotations.`)}},ju=class{constructor(e){this._annotations=e===void 0?Object.create(null):e,this._counter=0,this._size=0}all(){return this._annotations}get size(){return this._size}manage(e,t){let n;if(J.is(e)?n=e:(n=this.nextId(),t=e),this._annotations[n]!==void 0)throw Error(`Id ${n} is already in use.`);if(t===void 0)throw Error(`No annotation provided for id ${n}`);return this._annotations[n]=t,this._size++,n}nextId(){return this._counter++,this._counter.toString()}},Mu=class{constructor(e){this._textEditChanges=Object.create(null),e===void 0?this._workspaceEdit={}:(this._workspaceEdit=e,e.documentChanges?(this._changeAnnotations=new ju(e.changeAnnotations),e.changeAnnotations=this._changeAnnotations.all(),e.documentChanges.forEach(e=>{if(Tu.is(e)){let t=new Au(e.edits,this._changeAnnotations);this._textEditChanges[e.textDocument.uri]=t}})):e.changes&&Object.keys(e.changes).forEach(t=>{let n=new Au(e.changes[t]);this._textEditChanges[t]=n}))}get edit(){return this.initDocumentChanges(),this._changeAnnotations!==void 0&&(this._changeAnnotations.size===0?this._workspaceEdit.changeAnnotations=void 0:this._workspaceEdit.changeAnnotations=this._changeAnnotations.all()),this._workspaceEdit}getTextEditChange(e){if(Fu.is(e)){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw Error(`Workspace edit is not configured for document changes.`);let t={uri:e.uri,version:e.version},n=this._textEditChanges[t.uri];if(!n){let e=[],r={textDocument:t,edits:e};this._workspaceEdit.documentChanges.push(r),n=new Au(e,this._changeAnnotations),this._textEditChanges[t.uri]=n}return n}else{if(this.initChanges(),this._workspaceEdit.changes===void 0)throw Error(`Workspace edit is not configured for normal text edit changes.`);let t=this._textEditChanges[e];if(!t){let n=[];this._workspaceEdit.changes[e]=n,t=new Au(n),this._textEditChanges[e]=t}return t}}initDocumentChanges(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._changeAnnotations=new ju,this._workspaceEdit.documentChanges=[],this._workspaceEdit.changeAnnotations=this._changeAnnotations.all())}initChanges(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._workspaceEdit.changes=Object.create(null))}createFile(e,t,n){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw Error(`Workspace edit is not configured for document changes.`);let r;Cu.is(t)||J.is(t)?r=t:n=t;let i,a;if(r===void 0?i=Eu.create(e,n):(a=J.is(r)?r:this._changeAnnotations.manage(r),i=Eu.create(e,n,a)),this._workspaceEdit.documentChanges.push(i),a!==void 0)return a}renameFile(e,t,n,r){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw Error(`Workspace edit is not configured for document changes.`);let i;Cu.is(n)||J.is(n)?i=n:r=n;let a,o;if(i===void 0?a=Du.create(e,t,r):(o=J.is(i)?i:this._changeAnnotations.manage(i),a=Du.create(e,t,r,o)),this._workspaceEdit.documentChanges.push(a),o!==void 0)return o}deleteFile(e,t,n){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw Error(`Workspace edit is not configured for document changes.`);let r;Cu.is(t)||J.is(t)?r=t:n=t;let i,a;if(r===void 0?i=Ou.create(e,n):(a=J.is(r)?r:this._changeAnnotations.manage(r),i=Ou.create(e,n,a)),this._workspaceEdit.documentChanges.push(i),a!==void 0)return a}},(function(e){function t(e){return{uri:e}}e.create=t;function n(e){let t=e;return Y.defined(t)&&Y.string(t.uri)}e.is=n})(Nu||={}),(function(e){function t(e,t){return{uri:e,version:t}}e.create=t;function n(e){let t=e;return Y.defined(t)&&Y.string(t.uri)&&Y.integer(t.version)}e.is=n})(Pu||={}),(function(e){function t(e,t){return{uri:e,version:t}}e.create=t;function n(e){let t=e;return Y.defined(t)&&Y.string(t.uri)&&(t.version===null||Y.integer(t.version))}e.is=n})(Fu||={}),(function(e){function t(e,t,n,r){return{uri:e,languageId:t,version:n,text:r}}e.create=t;function n(e){let t=e;return Y.defined(t)&&Y.string(t.uri)&&Y.string(t.languageId)&&Y.integer(t.version)&&Y.string(t.text)}e.is=n})(Iu||={}),(function(e){e.PlainText=`plaintext`,e.Markdown=`markdown`;function t(t){let n=t;return n===e.PlainText||n===e.Markdown}e.is=t})(Lu||={}),(function(e){function t(e){let t=e;return Y.objectLiteral(e)&&Lu.is(t.kind)&&Y.string(t.value)}e.is=t})(Ru||={}),(function(e){e.Text=1,e.Method=2,e.Function=3,e.Constructor=4,e.Field=5,e.Variable=6,e.Class=7,e.Interface=8,e.Module=9,e.Property=10,e.Unit=11,e.Value=12,e.Enum=13,e.Keyword=14,e.Snippet=15,e.Color=16,e.File=17,e.Reference=18,e.Folder=19,e.EnumMember=20,e.Constant=21,e.Struct=22,e.Event=23,e.Operator=24,e.TypeParameter=25})(zu||={}),(function(e){e.PlainText=1,e.Snippet=2})(Bu||={}),(function(e){e.Deprecated=1})(Vu||={}),(function(e){function t(e,t,n){return{newText:e,insert:t,replace:n}}e.create=t;function n(e){let t=e;return t&&Y.string(t.newText)&&q.is(t.insert)&&q.is(t.replace)}e.is=n})(Hu||={}),(function(e){e.asIs=1,e.adjustIndentation=2})(Uu||={}),(function(e){function t(e){let t=e;return t&&(Y.string(t.detail)||t.detail===void 0)&&(Y.string(t.description)||t.description===void 0)}e.is=t})(Wu||={}),(function(e){function t(e){return{label:e}}e.create=t})(Gu||={}),(function(e){function t(e,t){return{items:e||[],isIncomplete:!!t}}e.create=t})(Ku||={}),(function(e){function t(e){return e.replace(/[\\`*_{}[\]()#+\-.!]/g,`\\$&`)}e.fromPlainText=t;function n(e){let t=e;return Y.string(t)||Y.objectLiteral(t)&&Y.string(t.language)&&Y.string(t.value)}e.is=n})(qu||={}),(function(e){function t(e){let t=e;return!!t&&Y.objectLiteral(t)&&(Ru.is(t.contents)||qu.is(t.contents)||Y.typedArray(t.contents,qu.is))&&(e.range===void 0||q.is(e.range))}e.is=t})(Ju||={}),(function(e){function t(e,t){return t?{label:e,documentation:t}:{label:e}}e.create=t})(Yu||={}),(function(e){function t(e,t,...n){let r={label:e};return Y.defined(t)&&(r.documentation=t),Y.defined(n)?r.parameters=n:r.parameters=[],r}e.create=t})(Xu||={}),(function(e){e.Text=1,e.Read=2,e.Write=3})(Zu||={}),(function(e){function t(e,t){let n={range:e};return Y.number(t)&&(n.kind=t),n}e.create=t})(Qu||={}),(function(e){e.File=1,e.Module=2,e.Namespace=3,e.Package=4,e.Class=5,e.Method=6,e.Property=7,e.Field=8,e.Constructor=9,e.Enum=10,e.Interface=11,e.Function=12,e.Variable=13,e.Constant=14,e.String=15,e.Number=16,e.Boolean=17,e.Array=18,e.Object=19,e.Key=20,e.Null=21,e.EnumMember=22,e.Struct=23,e.Event=24,e.Operator=25,e.TypeParameter=26})($u||={}),(function(e){e.Deprecated=1})(ed||={}),(function(e){function t(e,t,n,r,i){let a={name:e,kind:t,location:{uri:r,range:n}};return i&&(a.containerName=i),a}e.create=t})(td||={}),(function(e){function t(e,t,n,r){return r===void 0?{name:e,kind:t,location:{uri:n}}:{name:e,kind:t,location:{uri:n,range:r}}}e.create=t})(nd||={}),(function(e){function t(e,t,n,r,i,a){let o={name:e,detail:t,kind:n,range:r,selectionRange:i};return a!==void 0&&(o.children=a),o}e.create=t;function n(e){let t=e;return t&&Y.string(t.name)&&Y.number(t.kind)&&q.is(t.range)&&q.is(t.selectionRange)&&(t.detail===void 0||Y.string(t.detail))&&(t.deprecated===void 0||Y.boolean(t.deprecated))&&(t.children===void 0||Array.isArray(t.children))&&(t.tags===void 0||Array.isArray(t.tags))}e.is=n})(rd||={}),(function(e){e.Empty=``,e.QuickFix=`quickfix`,e.Refactor=`refactor`,e.RefactorExtract=`refactor.extract`,e.RefactorInline=`refactor.inline`,e.RefactorRewrite=`refactor.rewrite`,e.Source=`source`,e.SourceOrganizeImports=`source.organizeImports`,e.SourceFixAll=`source.fixAll`})(id||={}),(function(e){e.Invoked=1,e.Automatic=2})(ad||={}),(function(e){function t(e,t,n){let r={diagnostics:e};return t!=null&&(r.only=t),n!=null&&(r.triggerKind=n),r}e.create=t;function n(e){let t=e;return Y.defined(t)&&Y.typedArray(t.diagnostics,bu.is)&&(t.only===void 0||Y.typedArray(t.only,Y.string))&&(t.triggerKind===void 0||t.triggerKind===ad.Invoked||t.triggerKind===ad.Automatic)}e.is=n})(od||={}),(function(e){function t(e,t,n){let r={title:e},i=!0;return typeof t==`string`?(i=!1,r.kind=t):xu.is(t)?r.command=t:r.edit=t,i&&n!==void 0&&(r.kind=n),r}e.create=t;function n(e){let t=e;return t&&Y.string(t.title)&&(t.diagnostics===void 0||Y.typedArray(t.diagnostics,bu.is))&&(t.kind===void 0||Y.string(t.kind))&&(t.edit!==void 0||t.command!==void 0)&&(t.command===void 0||xu.is(t.command))&&(t.isPreferred===void 0||Y.boolean(t.isPreferred))&&(t.edit===void 0||ku.is(t.edit))}e.is=n})(sd||={}),(function(e){function t(e,t){let n={range:e};return Y.defined(t)&&(n.data=t),n}e.create=t;function n(e){let t=e;return Y.defined(t)&&q.is(t.range)&&(Y.undefined(t.command)||xu.is(t.command))}e.is=n})(cd||={}),(function(e){function t(e,t){return{tabSize:e,insertSpaces:t}}e.create=t;function n(e){let t=e;return Y.defined(t)&&Y.uinteger(t.tabSize)&&Y.boolean(t.insertSpaces)}e.is=n})(ld||={}),(function(e){function t(e,t,n){return{range:e,target:t,data:n}}e.create=t;function n(e){let t=e;return Y.defined(t)&&q.is(t.range)&&(Y.undefined(t.target)||Y.string(t.target))}e.is=n})(ud||={}),(function(e){function t(e,t){return{range:e,parent:t}}e.create=t;function n(t){let n=t;return Y.objectLiteral(n)&&q.is(n.range)&&(n.parent===void 0||e.is(n.parent))}e.is=n})(dd||={}),(function(e){e.namespace=`namespace`,e.type=`type`,e.class=`class`,e.enum=`enum`,e.interface=`interface`,e.struct=`struct`,e.typeParameter=`typeParameter`,e.parameter=`parameter`,e.variable=`variable`,e.property=`property`,e.enumMember=`enumMember`,e.event=`event`,e.function=`function`,e.method=`method`,e.macro=`macro`,e.keyword=`keyword`,e.modifier=`modifier`,e.comment=`comment`,e.string=`string`,e.number=`number`,e.regexp=`regexp`,e.operator=`operator`,e.decorator=`decorator`})(fd||={}),(function(e){e.declaration=`declaration`,e.definition=`definition`,e.readonly=`readonly`,e.static=`static`,e.deprecated=`deprecated`,e.abstract=`abstract`,e.async=`async`,e.modification=`modification`,e.documentation=`documentation`,e.defaultLibrary=`defaultLibrary`})(pd||={}),(function(e){function t(e){let t=e;return Y.objectLiteral(t)&&(t.resultId===void 0||typeof t.resultId==`string`)&&Array.isArray(t.data)&&(t.data.length===0||typeof t.data[0]==`number`)}e.is=t})(md||={}),(function(e){function t(e,t){return{range:e,text:t}}e.create=t;function n(e){let t=e;return t!=null&&q.is(t.range)&&Y.string(t.text)}e.is=n})(hd||={}),(function(e){function t(e,t,n){return{range:e,variableName:t,caseSensitiveLookup:n}}e.create=t;function n(e){let t=e;return t!=null&&q.is(t.range)&&Y.boolean(t.caseSensitiveLookup)&&(Y.string(t.variableName)||t.variableName===void 0)}e.is=n})(gd||={}),(function(e){function t(e,t){return{range:e,expression:t}}e.create=t;function n(e){let t=e;return t!=null&&q.is(t.range)&&(Y.string(t.expression)||t.expression===void 0)}e.is=n})(_d||={}),(function(e){function t(e,t){return{frameId:e,stoppedLocation:t}}e.create=t;function n(e){let t=e;return Y.defined(t)&&q.is(e.stoppedLocation)}e.is=n})(vd||={}),(function(e){e.Type=1,e.Parameter=2;function t(e){return e===1||e===2}e.is=t})(yd||={}),(function(e){function t(e){return{value:e}}e.create=t;function n(e){let t=e;return Y.objectLiteral(t)&&(t.tooltip===void 0||Y.string(t.tooltip)||Ru.is(t.tooltip))&&(t.location===void 0||lu.is(t.location))&&(t.command===void 0||xu.is(t.command))}e.is=n})(bd||={}),(function(e){function t(e,t,n){let r={position:e,label:t};return n!==void 0&&(r.kind=n),r}e.create=t;function n(e){let t=e;return Y.objectLiteral(t)&&K.is(t.position)&&(Y.string(t.label)||Y.typedArray(t.label,bd.is))&&(t.kind===void 0||yd.is(t.kind))&&t.textEdits===void 0||Y.typedArray(t.textEdits,Su.is)&&(t.tooltip===void 0||Y.string(t.tooltip)||Ru.is(t.tooltip))&&(t.paddingLeft===void 0||Y.boolean(t.paddingLeft))&&(t.paddingRight===void 0||Y.boolean(t.paddingRight))}e.is=n})(xd||={}),(function(e){function t(e){return{kind:`snippet`,value:e}}e.createSnippet=t})(Sd||={}),(function(e){function t(e,t,n,r){return{insertText:e,filterText:t,range:n,command:r}}e.create=t})(Cd||={}),(function(e){function t(e){return{items:e}}e.create=t})(wd||={}),(function(e){e.Invoked=0,e.Automatic=1})(Td||={}),(function(e){function t(e,t){return{range:e,text:t}}e.create=t})(Ed||={}),(function(e){function t(e,t){return{triggerKind:e,selectedCompletionInfo:t}}e.create=t})(Dd||={}),(function(e){function t(e){let t=e;return Y.objectLiteral(t)&&ou.is(t.uri)&&Y.string(t.name)}e.is=t})(Od||={}),kd=[`
73
- `,`\r
74
- `,`\r`],(function(e){function t(e,t,n,r){return new jd(e,t,n,r)}e.create=t;function n(e){let t=e;return!!(Y.defined(t)&&Y.string(t.uri)&&(Y.undefined(t.languageId)||Y.string(t.languageId))&&Y.uinteger(t.lineCount)&&Y.func(t.getText)&&Y.func(t.positionAt)&&Y.func(t.offsetAt))}e.is=n;function r(e,t){let n=e.getText(),r=i(t,(e,t)=>{let n=e.range.start.line-t.range.start.line;return n===0?e.range.start.character-t.range.start.character:n}),a=n.length;for(let t=r.length-1;t>=0;t--){let i=r[t],o=e.offsetAt(i.range.start),s=e.offsetAt(i.range.end);if(s<=a)n=n.substring(0,o)+i.newText+n.substring(s,n.length);else throw Error(`Overlapping edit`);a=o}return n}e.applyEdits=r;function i(e,t){if(e.length<=1)return e;let n=e.length/2|0,r=e.slice(0,n),a=e.slice(n);i(r,t),i(a,t);let o=0,s=0,c=0;for(;o<r.length&&s<a.length;)t(r[o],a[s])<=0?e[c++]=r[o++]:e[c++]=a[s++];for(;o<r.length;)e[c++]=r[o++];for(;s<a.length;)e[c++]=a[s++];return e}})(Ad||={}),jd=class{constructor(e,t,n,r){this._uri=e,this._languageId=t,this._version=n,this._content=r,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(e){if(e){let t=this.offsetAt(e.start),n=this.offsetAt(e.end);return this._content.substring(t,n)}return this._content}update(e,t){this._content=e.text,this._version=t,this._lineOffsets=void 0}getLineOffsets(){if(this._lineOffsets===void 0){let e=[],t=this._content,n=!0;for(let r=0;r<t.length;r++){n&&=(e.push(r),!1);let i=t.charAt(r);n=i===`\r`||i===`
75
- `,i===`\r`&&r+1<t.length&&t.charAt(r+1)===`
76
- `&&r++}n&&t.length>0&&e.push(t.length),this._lineOffsets=e}return this._lineOffsets}positionAt(e){e=Math.max(Math.min(e,this._content.length),0);let t=this.getLineOffsets(),n=0,r=t.length;if(r===0)return K.create(0,e);for(;n<r;){let i=Math.floor((n+r)/2);t[i]>e?r=i:n=i+1}let i=n-1;return K.create(i,e-t[i])}offsetAt(e){let t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;let n=t[e.line],r=e.line+1<t.length?t[e.line+1]:this._content.length;return Math.max(Math.min(n+e.character,r),n)}get lineCount(){return this.getLineOffsets().length}},(function(e){let t=Object.prototype.toString;function n(e){return e!==void 0}e.defined=n;function r(e){return e===void 0}e.undefined=r;function i(e){return e===!0||e===!1}e.boolean=i;function a(e){return t.call(e)===`[object String]`}e.string=a;function o(e){return t.call(e)===`[object Number]`}e.number=o;function s(e,n,r){return t.call(e)===`[object Number]`&&n<=e&&e<=r}e.numberRange=s;function c(e){return t.call(e)===`[object Number]`&&-2147483648<=e&&e<=2147483647}e.integer=c;function l(e){return t.call(e)===`[object Number]`&&0<=e&&e<=2147483647}e.uinteger=l;function u(e){return t.call(e)===`[object Function]`}e.func=u;function d(e){return typeof e==`object`&&!!e}e.objectLiteral=d;function f(e,t){return Array.isArray(e)&&e.every(t)}e.typedArray=f})(Y||={})}));Md();var Nd=class{constructor(){this.nodeStack=[]}get current(){return this.nodeStack[this.nodeStack.length-1]??this.rootNode}buildRootNode(e){return this.rootNode=new Rd(e),this.rootNode.root=this.rootNode,this.nodeStack=[this.rootNode],this.rootNode}buildCompositeNode(e){let t=new Id;return t.grammarSource=e,t.root=this.rootNode,this.current.content.push(t),this.nodeStack.push(t),t}buildLeafNode(e,t){let n=new Fd(e.startOffset,e.image.length,At(e),e.tokenType,!t);return n.grammarSource=t,n.root=this.rootNode,this.current.content.push(n),n}removeNode(e){let t=e.container;if(t){let n=t.content.indexOf(e);n>=0&&t.content.splice(n,1)}}addHiddenNodes(e){let t=[];for(let n of e){let e=new Fd(n.startOffset,n.image.length,At(n),n.tokenType,!0);e.root=this.rootNode,t.push(e)}let n=this.current,r=!1;if(n.content.length>0){n.content.push(...t);return}for(;n.container;){let e=n.container.content.indexOf(n);if(e>0){n.container.content.splice(e,0,...t),r=!0;break}n=n.container}r||this.rootNode.content.unshift(...t)}construct(e){let t=this.current;typeof e.$type==`string`&&!e.$infixName&&(this.current.astNode=e),e.$cstNode=t;let n=this.nodeStack.pop();n?.content.length===0&&this.removeNode(n)}},Pd=class{get hidden(){return!1}get astNode(){let e=typeof this._astNode?.$type==`string`?this._astNode:this.container?.astNode;if(!e)throw Error(`This node has no associated AST element`);return e}set astNode(e){this._astNode=e}get text(){return this.root.fullText.substring(this.offset,this.end)}},Fd=class extends Pd{get offset(){return this._offset}get length(){return this._length}get end(){return this._offset+this._length}get hidden(){return this._hidden}get tokenType(){return this._tokenType}get range(){return this._range}constructor(e,t,n,r,i=!1){super(),this._hidden=i,this._offset=e,this._tokenType=r,this._length=t,this._range=n}},Id=class extends Pd{constructor(){super(...arguments),this.content=new Ld(this)}get offset(){return this.firstNonHiddenNode?.offset??0}get length(){return this.end-this.offset}get end(){return this.lastNonHiddenNode?.end??0}get range(){let e=this.firstNonHiddenNode,t=this.lastNonHiddenNode;if(e&&t){if(this._rangeCache===void 0){let{range:n}=e,{range:r}=t;this._rangeCache={start:n.start,end:r.end.line<n.start.line?n.start:r.end}}return this._rangeCache}else return{start:K.create(0,0),end:K.create(0,0)}}get firstNonHiddenNode(){for(let e of this.content)if(!e.hidden)return e;return this.content[0]}get lastNonHiddenNode(){for(let e=this.content.length-1;e>=0;e--){let t=this.content[e];if(!t.hidden)return t}return this.content[this.content.length-1]}},Ld=class e extends Array{constructor(t){super(),this.parent=t,Object.setPrototypeOf(this,e.prototype)}push(...e){return this.addParents(e),super.push(...e)}unshift(...e){return this.addParents(e),super.unshift(...e)}splice(e,t,...n){return this.addParents(n),super.splice(e,t,...n)}addParents(e){for(let t of e)t.container=this.parent}},Rd=class extends Id{get text(){return this._text.substring(this.offset,this.end)}get fullText(){return this._text}constructor(e){super(),this._text=``,this._text=e??``}},zd=Symbol(`Datatype`);function Bd(e){return e.$type===zd}var Vd=`​`,Hd=e=>e.endsWith(Vd)?e:e+Vd,Ud=class{constructor(e){this._unorderedGroups=new Map,this.allRules=new Map,this.lexer=e.parser.Lexer;let t=this.lexer.definition,n=e.LanguageMetaData.mode===`production`;e.shared.profilers.LangiumProfiler?.isActive(`parsing`)?this.wrapper=new Xd(t,{...e.parser.ParserConfig,skipValidations:n,errorMessageProvider:e.parser.ParserErrorMessageProvider},e.shared.profilers.LangiumProfiler.createTask(`parsing`,e.LanguageMetaData.languageId)):this.wrapper=new Yd(t,{...e.parser.ParserConfig,skipValidations:n,errorMessageProvider:e.parser.ParserErrorMessageProvider})}alternatives(e,t){this.wrapper.wrapOr(e,t)}optional(e,t){this.wrapper.wrapOption(e,t)}many(e,t){this.wrapper.wrapMany(e,t)}atLeastOne(e,t){this.wrapper.wrapAtLeastOne(e,t)}getRule(e){return this.allRules.get(e)}isRecording(){return this.wrapper.IS_RECORDING}get unorderedGroups(){return this._unorderedGroups}getRuleStack(){return this.wrapper.RULE_STACK}finalize(){this.wrapper.wrapSelfAnalysis()}},Wd=class extends Ud{get current(){return this.stack[this.stack.length-1]}constructor(e){super(e),this.nodeBuilder=new Nd,this.stack=[],this.assignmentMap=new Map,this.operatorPrecedence=new Map,this.linker=e.references.Linker,this.converter=e.parser.ValueConverter,this.astReflection=e.shared.AstReflection}rule(e,t){let n=this.computeRuleType(e),r;Me(e)&&(r=e.name,this.registerPrecedenceMap(e));let i=this.wrapper.DEFINE_RULE(Hd(e.name),this.startImplementation(n,r,t).bind(this));return this.allRules.set(e.name,i),Ye(e)&&e.entry&&(this.mainRule=i),i}registerPrecedenceMap(e){let t=e.name,n=new Map;for(let t=0;t<e.operators.precedences.length;t++){let r=e.operators.precedences[t];for(let e of r.operators)n.set(e.value,{precedence:t,rightAssoc:r.associativity===`right`})}this.operatorPrecedence.set(t,n)}computeRuleType(e){return Me(e)?Dn(e):e.fragment?void 0:wn(e)?zd:Dn(e)}parse(e,t={}){this.nodeBuilder.buildRootNode(e);let n=this.lexerResult=this.lexer.tokenize(e);this.wrapper.input=n.tokens;let r=t.rule?this.allRules.get(t.rule):this.mainRule;if(!r)throw Error(t.rule?`No rule found with name '${t.rule}'`:`No main rule available.`);let i=this.doParse(r);return this.nodeBuilder.addHiddenNodes(n.hidden),this.unorderedGroups.clear(),this.lexerResult=void 0,C(i,{deep:!0}),{value:i,lexerErrors:n.errors,lexerReport:n.report,parserErrors:this.wrapper.errors}}doParse(e){let t=this.wrapper.rule(e);if(this.stack.length>0&&(t=this.construct()),t===void 0)throw Error(`No result from parser`);if(this.stack.length>0)throw Error(`Parser stack is not empty after parsing`);return t}startImplementation(e,t,n){return r=>{let i=!this.isRecording()&&e!==void 0;if(i){let n={$type:e};this.stack.push(n),e===zd?n.value=``:t!==void 0&&(n.$infixName=t)}return n(r),i?this.construct():void 0}}extractHiddenTokens(e){let t=this.lexerResult.hidden;if(!t.length)return[];let n=e.startOffset;for(let e=0;e<t.length;e++)if(t[e].startOffset>n)return t.splice(0,e);return t.splice(0,t.length)}consume(e,t,n){let r=this.wrapper.wrapConsume(e,t);if(!this.isRecording()&&this.isValidToken(r)){let e=this.extractHiddenTokens(r);this.nodeBuilder.addHiddenNodes(e);let t=this.nodeBuilder.buildLeafNode(r,n),{assignment:i,crossRef:a}=this.getAssignment(n),o=this.current;if(i){let e=Re(n)?r.image:this.converter.convert(r.image,t);this.assign(i.operator,i.feature,e,t,a)}else if(Bd(o)){let e=r.image;Re(n)||(e=this.converter.convert(e,t).toString()),o.value+=e}}}isValidToken(e){return!e.isInsertedInRecovery&&!isNaN(e.startOffset)&&typeof e.endOffset==`number`&&!isNaN(e.endOffset)}subrule(e,t,n,r,i){let a;!this.isRecording()&&!n&&(a=this.nodeBuilder.buildCompositeNode(r));let o;try{o=this.wrapper.wrapSubrule(e,t,i)}finally{this.isRecording()||(o===void 0&&!n&&(o=this.construct()),o!==void 0&&a&&a.length>0&&this.performSubruleAssignment(o,r,a))}}performSubruleAssignment(e,t,n){let{assignment:r,crossRef:i}=this.getAssignment(t);if(r)this.assign(r.operator,r.feature,e,n,i);else if(!r){let t=this.current;if(Bd(t))t.value+=e.toString();else if(typeof e==`object`&&e){let n=this.assignWithoutOverride(e,t);this.stack.pop(),this.stack.push(n)}}}action(e,t){if(!this.isRecording()){let n=this.current;if(t.feature&&t.operator){n=this.construct(),this.nodeBuilder.removeNode(n.$cstNode),this.nodeBuilder.buildCompositeNode(t).content.push(n.$cstNode);let r={$type:e};this.stack.push(r),this.assign(t.operator,t.feature,n,n.$cstNode)}else n.$type=e}}construct(){if(this.isRecording())return;let e=this.stack.pop();return this.nodeBuilder.construct(e),`$infixName`in e?this.constructInfix(e,this.operatorPrecedence.get(e.$infixName)):Bd(e)?this.converter.convert(e.value,e.$cstNode):(re(this.astReflection,e),e)}constructInfix(e,t){let n=e.parts;if(!Array.isArray(n)||n.length===0)return;let r=e.operators;if(!Array.isArray(r)||n.length<2)return n[0];let i=0,a=-1;for(let e=0;e<r.length;e++){let n=r[e],o=t.get(n)??{precedence:1/0,rightAssoc:!1};o.precedence>a?(a=o.precedence,i=e):o.precedence===a&&(o.rightAssoc||(i=e))}let o=r.slice(0,i),s=r.slice(i+1),c=n.slice(0,i+1),l=n.slice(i+1),u={$infixName:e.$infixName,$type:e.$type,$cstNode:e.$cstNode,parts:c,operators:o},d={$infixName:e.$infixName,$type:e.$type,$cstNode:e.$cstNode,parts:l,operators:s},f=this.constructInfix(u,t),p=this.constructInfix(d,t);return{$type:e.$type,$cstNode:e.$cstNode,left:f,operator:r[i],right:p}}getAssignment(e){if(!this.assignmentMap.has(e)){let t=w(e,F);this.assignmentMap.set(e,{assignment:t,crossRef:t&&xe(t.terminal)?t.terminal.isMulti?`multi`:`single`:void 0})}return this.assignmentMap.get(e)}assign(e,t,n,r,i){let a=this.current,o;switch(o=i===`single`&&typeof n==`string`?this.linker.buildReference(a,t,r,n):i===`multi`&&typeof n==`string`?this.linker.buildMultiReference(a,t,r,n):n,e){case`=`:a[t]=o;break;case`?=`:a[t]=!0;break;case`+=`:Array.isArray(a[t])||(a[t]=[]),a[t].push(o)}}assignWithoutOverride(e,t){for(let[n,r]of Object.entries(t)){let t=e[n];t===void 0?e[n]=r:Array.isArray(t)&&Array.isArray(r)&&(r.push(...t),e[n]=r)}let n=e.$cstNode;return n&&(n.astNode=void 0,e.$cstNode=void 0),e}get definitionErrors(){return this.wrapper.definitionErrors}},Gd=class{buildMismatchTokenMessage(e){return qi.buildMismatchTokenMessage(e)}buildNotAllInputParsedMessage(e){return qi.buildNotAllInputParsedMessage(e)}buildNoViableAltMessage(e){return qi.buildNoViableAltMessage(e)}buildEarlyExitMessage(e){return qi.buildEarlyExitMessage(e)}},Kd=class extends Gd{buildMismatchTokenMessage({expected:e,actual:t}){return`Expecting ${e.LABEL?"`"+e.LABEL+"`":e.name.endsWith(`:KW`)?`keyword '${e.name.substring(0,e.name.length-3)}'`:`token of type '${e.name}'`} but found \`${t.image}\`.`}buildNotAllInputParsedMessage({firstRedundant:e}){return`Expecting end of file but found \`${e.image}\`.`}},qd=class extends Ud{constructor(){super(...arguments),this.tokens=[],this.elementStack=[],this.lastElementStack=[],this.nextTokenIndex=0,this.stackSize=0}action(){}construct(){}parse(e){return this.resetState(),this.tokens=this.lexer.tokenize(e,{mode:`partial`}).tokens,this.wrapper.input=[...this.tokens],this.mainRule.call(this.wrapper,{}),this.unorderedGroups.clear(),{tokens:this.tokens,elementStack:[...this.lastElementStack],tokenIndex:this.nextTokenIndex}}rule(e,t){let n=this.wrapper.DEFINE_RULE(Hd(e.name),this.startImplementation(t).bind(this));return this.allRules.set(e.name,n),e.entry&&(this.mainRule=n),n}resetState(){this.elementStack=[],this.lastElementStack=[],this.nextTokenIndex=0,this.stackSize=0}startImplementation(e){return t=>{let n=this.keepStackSize();try{e(t)}finally{this.resetStackSize(n)}}}removeUnexpectedElements(){this.elementStack.splice(this.stackSize)}keepStackSize(){let e=this.elementStack.length;return this.stackSize=e,e}resetStackSize(e){this.removeUnexpectedElements(),this.stackSize=e}consume(e,t,n){this.wrapper.wrapConsume(e,t),this.isRecording()||(this.lastElementStack=[...this.elementStack,n],this.nextTokenIndex=this.currIdx+1)}subrule(e,t,n,r,i){this.before(r),this.wrapper.wrapSubrule(e,t,i),this.after(r)}before(e){this.isRecording()||this.elementStack.push(e)}after(e){if(!this.isRecording()){let t=this.elementStack.lastIndexOf(e);t>=0&&this.elementStack.splice(t)}}get currIdx(){return this.wrapper.currIdx}},Jd={recoveryEnabled:!0,nodeLocationTracking:`full`,skipValidations:!0,errorMessageProvider:new Kd},Yd=class extends es{constructor(e,t){let n=t&&`maxLookahead`in t;super(e,{...Jd,lookaheadStrategy:n?new po({maxLookahead:t.maxLookahead}):new Ml({logging:t.skipValidations?()=>{}:void 0}),...t})}get IS_RECORDING(){return this.RECORDING_PHASE}DEFINE_RULE(e,t,n){return this.RULE(e,t,n)}wrapSelfAnalysis(){this.performSelfAnalysis()}wrapConsume(e,t){return this.consume(e,t,void 0)}wrapSubrule(e,t,n){return this.subrule(e,t,{ARGS:[n]})}wrapOr(e,t){this.or(e,t)}wrapOption(e,t){this.option(e,t)}wrapMany(e,t){this.many(e,t)}wrapAtLeastOne(e,t){this.atLeastOne(e,t)}rule(e){return e.call(this,{})}},Xd=class extends Yd{constructor(e,t,n){super(e,t),this.task=n}rule(e){this.task.start(),this.task.startSubTask(this.ruleName(e));try{return super.rule(e)}finally{this.task.stopSubTask(this.ruleName(e)),this.task.stop()}}ruleName(e){return e.ruleName}subrule(e,t,n){this.task.startSubTask(this.ruleName(t));try{return super.subrule(e,t,n)}finally{this.task.stopSubTask(this.ruleName(t))}}};function Zd(e,t,n){return Qd({parser:t,tokens:n,ruleNames:new Map},e),t}function Qd(e,t){let n=fn(t,!1),r=b(t.rules).filter(Ye).filter(e=>n.has(e));for(let t of r){let n={...e,consume:1,optional:1,subrule:1,many:1,or:1};e.parser.rule(t,ef(n,t.definition))}let i=b(t.rules).filter(Me).filter(e=>n.has(e));for(let t of i)e.parser.rule(t,$d(e,t))}function $d(e,t){let n=t.call.rule.ref;if(!n)throw Error(`Could not resolve reference to infix operator rule: `+t.call.rule.$refText);if(ft(n))throw Error(`Cannot use terminal rule in infix expression`);let r=t.operators.precedences.flatMap(e=>e.operators),i={$type:`Group`,elements:[]},a={$container:i,$type:`Assignment`,feature:`parts`,operator:`+=`,terminal:t.call},o={$container:i,$type:`Group`,elements:[],cardinality:`*`};i.elements.push(a,o);let s={$container:o,$type:`Assignment`,feature:`operators`,operator:`+=`,terminal:{$type:`Alternatives`,elements:r}},c={...a,$container:o};o.elements.push(s,c);let l=r.map(t=>e.tokens[t.value]).map((t,n)=>({ALT:()=>e.parser.consume(n,t,s)})),u;return t=>{u??=pf(e,n),e.parser.subrule(0,u,!1,a,t),e.parser.many(0,{DEF:()=>{e.parser.alternatives(0,l),e.parser.subrule(1,u,!1,c,t)}})}}function ef(e,t,n=!1){let r;if(Re(t))r=df(e,t);else if(se(t))r=tf(e,t);else if(F(t))r=ef(e,t.terminal);else if(xe(t))r=uf(e,t);else if(nt(t))r=nf(e,t);else if(le(t))r=of(e,t);else if(xt(t))r=sf(e,t);else if(ke(t))r=cf(e,t);else if(Te(t)){let n=e.consume++;r=()=>e.parser.consume(n,Wi,t)}else throw new zt(t.$cstNode,`Unexpected element type: ${t.$type}`);return ff(e,n?void 0:lf(t),r,t.cardinality)}function tf(e,t){let n=Dn(t);return()=>e.parser.action(n,t)}function nf(e,t){let n=t.rule.ref;if(j(n)){let r=e.subrule++,i=Ye(n)&&n.fragment,a=t.arguments.length>0?rf(n,t.arguments):()=>({}),o;return s=>{o??=pf(e,n),e.parser.subrule(r,o,i,t,a(s))}}else if(ft(n)){let r=e.consume++,i=hf(e,n.name);return()=>e.parser.consume(r,i,t)}else if(n)Bt(n);else throw new zt(t.$cstNode,`Undefined rule: ${t.rule.$refText}`)}function rf(e,t){if(t.some(e=>e.calledByName)){let e=t.map(e=>({parameterName:e.parameter?.ref?.name,predicate:af(e.value)}));return t=>{let n={};for(let{parameterName:r,predicate:i}of e)r&&(n[r]=i(t));return n}}else{let n=t.map(e=>af(e.value));return t=>{let r={};for(let i=0;i<n.length;i++)if(i<e.parameters.length){let a=e.parameters[i].name,o=n[i];r[a]=o(t)}return r}}}function af(e){if(Ce(e)){let t=af(e.left),n=af(e.right);return e=>t(e)||n(e)}else if(ye(e)){let t=af(e.left),n=af(e.right);return e=>t(e)&&n(e)}else if(Ue(e)){let t=af(e.value);return e=>!t(e)}else if(qe(e)){let t=e.parameter.ref.name;return e=>e!==void 0&&e[t]===!0}else if(me(e)){let t=!!e.true;return()=>t}Bt(e)}function of(e,t){if(t.elements.length===1)return ef(e,t.elements[0]);{let n=[];for(let r of t.elements){let t={ALT:ef(e,r,!0)},i=lf(r);i&&(t.GATE=af(i)),n.push(t)}let r=e.or++;return t=>e.parser.alternatives(r,n.map(e=>{let n={ALT:()=>e.ALT(t)},r=e.GATE;return r&&(n.GATE=()=>r(t)),n}))}}function sf(e,t){if(t.elements.length===1)return ef(e,t.elements[0]);let n=[];for(let r of t.elements){let t={ALT:ef(e,r,!0)},i=lf(r);i&&(t.GATE=af(i)),n.push(t)}let r=e.or++,i=(e,t)=>`uGroup_${e}_${t.getRuleStack().join(`-`)}`,a=ff(e,lf(t),t=>e.parser.alternatives(r,n.map((n,a)=>{let o={ALT:()=>!0},s=e.parser;o.ALT=()=>{if(n.ALT(t),!s.isRecording()){let e=i(r,s);s.unorderedGroups.get(e)||s.unorderedGroups.set(e,[]);let t=s.unorderedGroups.get(e);t?.[a]===void 0&&(t[a]=!0)}};let c=n.GATE;return c?o.GATE=()=>c(t):o.GATE=()=>!s.unorderedGroups.get(i(r,s))?.[a],o})),`*`);return t=>{a(t),e.parser.isRecording()||e.parser.unorderedGroups.delete(i(r,e.parser))}}function cf(e,t){let n=t.elements.map(t=>ef(e,t));return e=>n.forEach(t=>t(e))}function lf(e){if(ke(e))return e.guardCondition}function uf(e,t,n=t.terminal){if(!n){if(!t.type.ref)throw Error(`Could not resolve reference to type: `+t.type.$refText);let n=Sn(t.type.ref)?.terminal;if(!n)throw Error(`Could not find name assignment for type: `+Dn(t.type.ref));return uf(e,t,n)}else if(nt(n)&&Ye(n.rule.ref)){let r=n.rule.ref,i=e.subrule++,a;return n=>{a??=pf(e,r),e.parser.subrule(i,a,!1,t,n)}}else if(nt(n)&&ft(n.rule.ref)){let r=e.consume++,i=hf(e,n.rule.ref.name);return()=>e.parser.consume(r,i,t)}else if(Re(n)){let r=e.consume++,i=hf(e,n.value);return()=>e.parser.consume(r,i,t)}else throw Error(`Could not build cross reference parser`)}function df(e,t){let n=e.consume++,r=e.tokens[t.value];if(!r)throw Error(`Could not find token for keyword: `+t.value);return()=>e.parser.consume(n,r,t)}function ff(e,t,n,r){let i=t&&af(t);if(!r)if(i){let t=e.or++;return r=>e.parser.alternatives(t,[{ALT:()=>n(r),GATE:()=>i(r)},{ALT:Qo(),GATE:()=>!i(r)}])}else return n;if(r===`*`){let t=e.many++;return r=>e.parser.many(t,{DEF:()=>n(r),GATE:i?()=>i(r):void 0})}else if(r===`+`){let t=e.many++;if(i){let r=e.or++;return a=>e.parser.alternatives(r,[{ALT:()=>e.parser.atLeastOne(t,{DEF:()=>n(a)}),GATE:()=>i(a)},{ALT:Qo(),GATE:()=>!i(a)}])}else return r=>e.parser.atLeastOne(t,{DEF:()=>n(r)})}else if(r===`?`){let t=e.optional++;return r=>e.parser.optional(t,{DEF:()=>n(r),GATE:i?()=>i(r):void 0})}else Bt(r)}function pf(e,t){let n=mf(e,t),r=e.parser.getRule(n);if(!r)throw Error(`Rule "${n}" not found."`);return r}function mf(e,t){if(j(t))return t.name;if(e.ruleNames.has(t))return e.ruleNames.get(t);{let n=t,r=n.$container,i=t.$type;for(;!Ye(r);)(ke(r)||le(r)||xt(r))&&(i=r.elements.indexOf(n).toString()+`:`+i),n=r,r=r.$container;return i=r.name+`:`+i,e.ruleNames.set(t,i),i}}function hf(e,t){let n=e.tokens[t];if(!n)throw Error(`Token "${t}" not found."`);return n}function gf(e){let t=e.Grammar,n=e.parser.Lexer,r=new qd(e);return Zd(t,r,n.definition),r.finalize(),r}function _f(e){let t=vf(e);return t.finalize(),t}function vf(e){let t=e.Grammar,n=e.parser.Lexer;return Zd(t,new Wd(e),n.definition)}var yf=class{constructor(){this.diagnostics=[]}buildTokens(e,t){let n=b(fn(e,!1)),r=this.buildTerminalTokens(n),i=this.buildKeywordTokens(n,r,t);return i.push(...r),i}flushLexingReport(e){return{diagnostics:this.popDiagnostics()}}popDiagnostics(){let e=[...this.diagnostics];return this.diagnostics=[],e}buildTerminalTokens(e){return e.filter(ft).filter(e=>!e.fragment).map(e=>this.buildTerminalToken(e)).toArray()}buildTerminalToken(e){let t=An(e),n=this.requiresCustomPattern(t)?this.regexPatternFunction(t):t,r={name:e.name,PATTERN:n};return typeof n==`function`&&(r.LINE_BREAKS=!0),e.hidden&&(r.GROUP=on(t)?Ai.SKIPPED:`hidden`),r}requiresCustomPattern(e){return!!(e.flags.includes(`u`)||e.flags.includes(`s`))}regexPatternFunction(e){let t=new RegExp(e,e.flags+`y`);return(e,n)=>(t.lastIndex=n,t.exec(e))}buildKeywordTokens(e,t,n){return e.filter(j).flatMap(e=>D(e).filter(Re)).distinct(e=>e.value).toArray().sort((e,t)=>t.value.length-e.value.length).map(e=>this.buildKeywordToken(e,t,!!n?.caseInsensitive))}buildKeywordToken(e,t,n){let r=this.buildKeywordPattern(e,n),i={name:e.value,PATTERN:r,LONGER_ALT:this.findLongerAlt(e,t)};return typeof r==`function`&&(i.LINE_BREAKS=!0),i}buildKeywordPattern(e,t){return t?new RegExp(sn(e.value),`i`):e.value}findLongerAlt(e,t){return t.reduce((t,n)=>{let r=n?.PATTERN;return r?.source&&cn(`^`+r.source+`$`,e.value)&&t.push(n),t},[])}},bf=class{convert(e,t){let n=t.grammarSource;if(xe(n)&&(n=mn(n)),nt(n)){let r=n.rule.ref;if(!r)throw Error(`This cst node was not parsed by a rule.`);return this.runConverter(r,e,t)}return e}runConverter(e,t,n){switch(e.name.toUpperCase()){case`INT`:return xf.convertInt(t);case`STRING`:return xf.convertString(t);case`ID`:return xf.convertID(t)}switch(kn(e)?.toLowerCase()){case`number`:return xf.convertNumber(t);case`boolean`:return xf.convertBoolean(t);case`bigint`:return xf.convertBigint(t);case`date`:return xf.convertDate(t);default:return t}}},xf;(function(e){function t(e){let t=``;for(let r=1;r<e.length-1;r++){let i=e.charAt(r);if(i===`\\`){let i=e.charAt(++r);t+=n(i)}else t+=i}return t}e.convertString=t;function n(e){switch(e){case`b`:return`\b`;case`f`:return`\f`;case`n`:return`
77
- `;case`r`:return`\r`;case`t`:return` `;case`v`:return`\v`;case`0`:return`\0`;default:return e}}function r(e){return e.charAt(0)===`^`?e.substring(1):e}e.convertID=r;function i(e){return parseInt(e)}e.convertInt=i;function a(e){return BigInt(e)}e.convertBigint=a;function o(e){return new Date(e)}e.convertDate=o;function s(e){return Number(e)}e.convertNumber=s;function c(e){return e.toLowerCase()===`true`}e.convertBoolean=c})(xf||={});var Sf=e.t((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t;function n(){if(t===void 0)throw Error(`No runtime abstraction layer installed`);return t}(function(e){function n(e){if(e===void 0)throw Error(`No runtime abstraction layer provided`);t=e}e.install=n})(n||={}),e.default=n})),Cf=e.t((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.stringArray=e.array=e.func=e.error=e.number=e.string=e.boolean=void 0;function t(e){return e===!0||e===!1}e.boolean=t;function n(e){return typeof e==`string`||e instanceof String}e.string=n;function r(e){return typeof e==`number`||e instanceof Number}e.number=r;function i(e){return e instanceof Error}e.error=i;function a(e){return typeof e==`function`}e.func=a;function o(e){return Array.isArray(e)}e.array=o;function s(e){return o(e)&&e.every(e=>n(e))}e.stringArray=s})),wf=e.t((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.Emitter=e.Event=void 0;var t=Sf(),n;(function(e){let t={dispose(){}};e.None=function(){return t}})(n||(e.Event=n={}));var r=class{add(e,t=null,n){this._callbacks||(this._callbacks=[],this._contexts=[]),this._callbacks.push(e),this._contexts.push(t),Array.isArray(n)&&n.push({dispose:()=>this.remove(e,t)})}remove(e,t=null){if(!this._callbacks)return;let n=!1;for(let r=0,i=this._callbacks.length;r<i;r++)if(this._callbacks[r]===e)if(this._contexts[r]===t){this._callbacks.splice(r,1),this._contexts.splice(r,1);return}else n=!0;if(n)throw Error(`When adding a listener with a context, you should remove it with the same context`)}invoke(...e){if(!this._callbacks)return[];let n=[],r=this._callbacks.slice(0),i=this._contexts.slice(0);for(let a=0,o=r.length;a<o;a++)try{n.push(r[a].apply(i[a],e))}catch(e){(0,t.default)().console.error(e)}return n}isEmpty(){return!this._callbacks||this._callbacks.length===0}dispose(){this._callbacks=void 0,this._contexts=void 0}},i=class e{constructor(e){this._options=e}get event(){return this._event||=(t,n,i)=>{this._callbacks||=new r,this._options&&this._options.onFirstListenerAdd&&this._callbacks.isEmpty()&&this._options.onFirstListenerAdd(this),this._callbacks.add(t,n);let a={dispose:()=>{this._callbacks&&(this._callbacks.remove(t,n),a.dispose=e._noop,this._options&&this._options.onLastListenerRemove&&this._callbacks.isEmpty()&&this._options.onLastListenerRemove(this))}};return Array.isArray(i)&&i.push(a),a},this._event}fire(e){this._callbacks&&this._callbacks.invoke.call(this._callbacks,e)}dispose(){this._callbacks&&=(this._callbacks.dispose(),void 0)}};e.Emitter=i,i._noop=function(){}})),Tf=e.t((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.CancellationTokenSource=e.CancellationToken=void 0;var t=Sf(),n=Cf(),r=wf(),i;(function(e){e.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:r.Event.None}),e.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:r.Event.None});function t(t){let r=t;return r&&(r===e.None||r===e.Cancelled||n.boolean(r.isCancellationRequested)&&!!r.onCancellationRequested)}e.is=t})(i||(e.CancellationToken=i={}));var a=Object.freeze(function(e,n){let r=(0,t.default)().timer.setTimeout(e.bind(n),0);return{dispose(){r.dispose()}}}),o=class{constructor(){this._isCancelled=!1}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?a:(this._emitter||=new r.Emitter,this._emitter.event)}dispose(){this._emitter&&=(this._emitter.dispose(),void 0)}};e.CancellationTokenSource=class{get token(){return this._token||=new o,this._token}cancel(){this._token?this._token.cancel():this._token=i.Cancelled}dispose(){this._token?this._token instanceof o&&this._token.dispose():this._token=i.None}}})),X=e.r({});e.i(X,e.o(Tf(),1));function Ef(){return new Promise(e=>{typeof setImmediate>`u`?setTimeout(e,0):setImmediate(e)})}var Df=0,Of=10;function kf(){return Df=performance.now(),new X.CancellationTokenSource}var Af=Symbol(`OperationCancelled`);function jf(e){return e===Af}async function Mf(e){if(e===X.CancellationToken.None)return;let t=performance.now();if(t-Df>=Of&&(Df=t,await Ef(),Df=performance.now()),e.isCancellationRequested)throw Af}var Nf=class{constructor(){this.promise=new Promise((e,t)=>{this.resolve=t=>(e(t),this),this.reject=e=>(t(e),this)})}},Pf=class e{constructor(e,t,n,r){this._uri=e,this._languageId=t,this._version=n,this._content=r,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(e){if(e){let t=this.offsetAt(e.start),n=this.offsetAt(e.end);return this._content.substring(t,n)}return this._content}update(t,n){for(let n of t)if(e.isIncremental(n)){let e=zf(n.range),t=this.offsetAt(e.start),r=this.offsetAt(e.end);this._content=this._content.substring(0,t)+n.text+this._content.substring(r,this._content.length);let i=Math.max(e.start.line,0),a=Math.max(e.end.line,0),o=this._lineOffsets,s=Lf(n.text,!1,t);if(a-i===s.length)for(let e=0,t=s.length;e<t;e++)o[e+i+1]=s[e];else s.length<1e4?o.splice(i+1,a-i,...s):this._lineOffsets=o=o.slice(0,i+1).concat(s,o.slice(a+1));let c=n.text.length-(r-t);if(c!==0)for(let e=i+1+s.length,t=o.length;e<t;e++)o[e]=o[e]+c}else if(e.isFull(n))this._content=n.text,this._lineOffsets=void 0;else throw Error(`Unknown change event received`);this._version=n}getLineOffsets(){return this._lineOffsets===void 0&&(this._lineOffsets=Lf(this._content,!0)),this._lineOffsets}positionAt(e){e=Math.max(Math.min(e,this._content.length),0);let t=this.getLineOffsets(),n=0,r=t.length;if(r===0)return{line:0,character:e};for(;n<r;){let i=Math.floor((n+r)/2);t[i]>e?r=i:n=i+1}let i=n-1;return e=this.ensureBeforeEOL(e,t[i]),{line:i,character:e-t[i]}}offsetAt(e){let t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;let n=t[e.line];if(e.character<=0)return n;let r=e.line+1<t.length?t[e.line+1]:this._content.length,i=Math.min(n+e.character,r);return this.ensureBeforeEOL(i,n)}ensureBeforeEOL(e,t){for(;e>t&&Rf(this._content.charCodeAt(e-1));)e--;return e}get lineCount(){return this.getLineOffsets().length}static isIncremental(e){let t=e;return t!=null&&typeof t.text==`string`&&t.range!==void 0&&(t.rangeLength===void 0||typeof t.rangeLength==`number`)}static isFull(e){let t=e;return t!=null&&typeof t.text==`string`&&t.range===void 0&&t.rangeLength===void 0}},Ff;(function(e){function t(e,t,n,r){return new Pf(e,t,n,r)}e.create=t;function n(e,t,n){if(e instanceof Pf)return e.update(t,n),e;throw Error(`TextDocument.update: document must be created by TextDocument.create`)}e.update=n;function r(e,t){let n=e.getText(),r=If(t.map(Bf),(e,t)=>{let n=e.range.start.line-t.range.start.line;return n===0?e.range.start.character-t.range.start.character:n}),i=0,a=[];for(let t of r){let r=e.offsetAt(t.range.start);if(r<i)throw Error(`Overlapping edit`);r>i&&a.push(n.substring(i,r)),t.newText.length&&a.push(t.newText),i=e.offsetAt(t.range.end)}return a.push(n.substr(i)),a.join(``)}e.applyEdits=r})(Ff||={});function If(e,t){if(e.length<=1)return e;let n=e.length/2|0,r=e.slice(0,n),i=e.slice(n);If(r,t),If(i,t);let a=0,o=0,s=0;for(;a<r.length&&o<i.length;)t(r[a],i[o])<=0?e[s++]=r[a++]:e[s++]=i[o++];for(;a<r.length;)e[s++]=r[a++];for(;o<i.length;)e[s++]=i[o++];return e}function Lf(e,t,n=0){let r=t?[n]:[];for(let t=0;t<e.length;t++){let i=e.charCodeAt(t);Rf(i)&&(i===13&&t+1<e.length&&e.charCodeAt(t+1)===10&&t++,r.push(n+t+1))}return r}function Rf(e){return e===13||e===10}function zf(e){let t=e.start,n=e.end;return t.line>n.line||t.line===n.line&&t.character>n.character?{start:n,end:t}:e}function Bf(e){let t=zf(e.range);return t===e.range?e:{newText:e.newText,range:t}}var Vf;(()=>{"use strict";var e={975:e=>{function t(e){if(typeof e!=`string`)throw TypeError(`Path must be a string. Received `+JSON.stringify(e))}function n(e,t){for(var n,r=``,i=0,a=-1,o=0,s=0;s<=e.length;++s){if(s<e.length)n=e.charCodeAt(s);else{if(n===47)break;n=47}if(n===47){if(!(a===s-1||o===1))if(a!==s-1&&o===2){if(r.length<2||i!==2||r.charCodeAt(r.length-1)!==46||r.charCodeAt(r.length-2)!==46){if(r.length>2){var c=r.lastIndexOf(`/`);if(c!==r.length-1){c===-1?(r=``,i=0):i=(r=r.slice(0,c)).length-1-r.lastIndexOf(`/`),a=s,o=0;continue}}else if(r.length===2||r.length===1){r=``,i=0,a=s,o=0;continue}}t&&(r.length>0?r+=`/..`:r=`..`,i=2)}else r.length>0?r+=`/`+e.slice(a+1,s):r=e.slice(a+1,s),i=s-a-1;a=s,o=0}else n===46&&o!==-1?++o:o=-1}return r}var r={resolve:function(){for(var e,r=``,i=!1,a=arguments.length-1;a>=-1&&!i;a--){var o;a>=0?o=arguments[a]:(e===void 0&&(e=process.cwd()),o=e),t(o),o.length!==0&&(r=o+`/`+r,i=o.charCodeAt(0)===47)}return r=n(r,!i),i?r.length>0?`/`+r:`/`:r.length>0?r:`.`},normalize:function(e){if(t(e),e.length===0)return`.`;var r=e.charCodeAt(0)===47,i=e.charCodeAt(e.length-1)===47;return(e=n(e,!r)).length!==0||r||(e=`.`),e.length>0&&i&&(e+=`/`),r?`/`+e:e},isAbsolute:function(e){return t(e),e.length>0&&e.charCodeAt(0)===47},join:function(){if(arguments.length===0)return`.`;for(var e,n=0;n<arguments.length;++n){var i=arguments[n];t(i),i.length>0&&(e===void 0?e=i:e+=`/`+i)}return e===void 0?`.`:r.normalize(e)},relative:function(e,n){if(t(e),t(n),e===n||(e=r.resolve(e))===(n=r.resolve(n)))return``;for(var i=1;i<e.length&&e.charCodeAt(i)===47;++i);for(var a=e.length,o=a-i,s=1;s<n.length&&n.charCodeAt(s)===47;++s);for(var c=n.length-s,l=o<c?o:c,u=-1,d=0;d<=l;++d){if(d===l){if(c>l){if(n.charCodeAt(s+d)===47)return n.slice(s+d+1);if(d===0)return n.slice(s+d)}else o>l&&(e.charCodeAt(i+d)===47?u=d:d===0&&(u=0));break}var f=e.charCodeAt(i+d);if(f!==n.charCodeAt(s+d))break;f===47&&(u=d)}var p=``;for(d=i+u+1;d<=a;++d)d!==a&&e.charCodeAt(d)!==47||(p.length===0?p+=`..`:p+=`/..`);return p.length>0?p+n.slice(s+u):(s+=u,n.charCodeAt(s)===47&&++s,n.slice(s))},_makeLong:function(e){return e},dirname:function(e){if(t(e),e.length===0)return`.`;for(var n=e.charCodeAt(0),r=n===47,i=-1,a=!0,o=e.length-1;o>=1;--o)if((n=e.charCodeAt(o))===47){if(!a){i=o;break}}else a=!1;return i===-1?r?`/`:`.`:r&&i===1?`//`:e.slice(0,i)},basename:function(e,n){if(n!==void 0&&typeof n!=`string`)throw TypeError(`"ext" argument must be a string`);t(e);var r,i=0,a=-1,o=!0;if(n!==void 0&&n.length>0&&n.length<=e.length){if(n.length===e.length&&n===e)return``;var s=n.length-1,c=-1;for(r=e.length-1;r>=0;--r){var l=e.charCodeAt(r);if(l===47){if(!o){i=r+1;break}}else c===-1&&(o=!1,c=r+1),s>=0&&(l===n.charCodeAt(s)?--s==-1&&(a=r):(s=-1,a=c))}return i===a?a=c:a===-1&&(a=e.length),e.slice(i,a)}for(r=e.length-1;r>=0;--r)if(e.charCodeAt(r)===47){if(!o){i=r+1;break}}else a===-1&&(o=!1,a=r+1);return a===-1?``:e.slice(i,a)},extname:function(e){t(e);for(var n=-1,r=0,i=-1,a=!0,o=0,s=e.length-1;s>=0;--s){var c=e.charCodeAt(s);if(c!==47)i===-1&&(a=!1,i=s+1),c===46?n===-1?n=s:o!==1&&(o=1):n!==-1&&(o=-1);else if(!a){r=s+1;break}}return n===-1||i===-1||o===0||o===1&&n===i-1&&n===r+1?``:e.slice(n,i)},format:function(e){if(typeof e!=`object`||!e)throw TypeError(`The "pathObject" argument must be of type Object. Received type `+typeof e);return function(e,t){var n=t.dir||t.root,r=t.base||(t.name||``)+(t.ext||``);return n?n===t.root?n+r:n+`/`+r:r}(0,e)},parse:function(e){t(e);var n={root:``,dir:``,base:``,ext:``,name:``};if(e.length===0)return n;var r,i=e.charCodeAt(0),a=i===47;a?(n.root=`/`,r=1):r=0;for(var o=-1,s=0,c=-1,l=!0,u=e.length-1,d=0;u>=r;--u)if((i=e.charCodeAt(u))!==47)c===-1&&(l=!1,c=u+1),i===46?o===-1?o=u:d!==1&&(d=1):o!==-1&&(d=-1);else if(!l){s=u+1;break}return o===-1||c===-1||d===0||d===1&&o===c-1&&o===s+1?c!==-1&&(n.base=n.name=s===0&&a?e.slice(1,c):e.slice(s,c)):(s===0&&a?(n.name=e.slice(1,o),n.base=e.slice(1,c)):(n.name=e.slice(s,o),n.base=e.slice(s,c)),n.ext=e.slice(o,c)),s>0?n.dir=e.slice(0,s-1):a&&(n.dir=`/`),n},sep:`/`,delimiter:`:`,win32:null,posix:null};r.posix=r,e.exports=r}},t={};function n(r){var i=t[r];if(i!==void 0)return i.exports;var a=t[r]={exports:{}};return e[r](a,a.exports,n),a.exports}n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{typeof Symbol<`u`&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:`Module`}),Object.defineProperty(e,`__esModule`,{value:!0})};var r={};let i;n.r(r),n.d(r,{URI:()=>u,Utils:()=>C}),typeof process==`object`?i=process.platform===`win32`:typeof navigator==`object`&&(i=navigator.userAgent.indexOf(`Windows`)>=0);let a=/^\w[\w\d+.-]*$/,o=/^\//,s=/^\/\//;function c(e,t){if(!e.scheme&&t)throw Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${e.authority}", path: "${e.path}", query: "${e.query}", fragment: "${e.fragment}"}`);if(e.scheme&&!a.test(e.scheme))throw Error(`[UriError]: Scheme contains illegal characters.`);if(e.path){if(e.authority){if(!o.test(e.path))throw Error(`[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character`)}else if(s.test(e.path))throw Error(`[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")`)}}let l=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class u{static isUri(e){return e instanceof u||!!e&&typeof e.authority==`string`&&typeof e.fragment==`string`&&typeof e.path==`string`&&typeof e.query==`string`&&typeof e.scheme==`string`&&typeof e.fsPath==`string`&&typeof e.with==`function`&&typeof e.toString==`function`}scheme;authority;path;query;fragment;constructor(e,t,n,r,i,a=!1){typeof e==`object`?(this.scheme=e.scheme||``,this.authority=e.authority||``,this.path=e.path||``,this.query=e.query||``,this.fragment=e.fragment||``):(this.scheme=function(e,t){return e||t?e:`file`}(e,a),this.authority=t||``,this.path=function(e,t){switch(e){case`https`:case`http`:case`file`:t?t[0]!==`/`&&(t=`/`+t):t=`/`}return t}(this.scheme,n||``),this.query=r||``,this.fragment=i||``,c(this,a))}get fsPath(){return g(this,!1)}with(e){if(!e)return this;let{scheme:t,authority:n,path:r,query:i,fragment:a}=e;return t===void 0?t=this.scheme:t===null&&(t=``),n===void 0?n=this.authority:n===null&&(n=``),r===void 0?r=this.path:r===null&&(r=``),i===void 0?i=this.query:i===null&&(i=``),a===void 0?a=this.fragment:a===null&&(a=``),t===this.scheme&&n===this.authority&&r===this.path&&i===this.query&&a===this.fragment?this:new f(t,n,r,i,a)}static parse(e,t=!1){let n=l.exec(e);return n?new f(n[2]||``,b(n[4]||``),b(n[5]||``),b(n[7]||``),b(n[9]||``),t):new f(``,``,``,``,``)}static file(e){let t=``;if(i&&(e=e.replace(/\\/g,`/`)),e[0]===`/`&&e[1]===`/`){let n=e.indexOf(`/`,2);n===-1?(t=e.substring(2),e=`/`):(t=e.substring(2,n),e=e.substring(n)||`/`)}return new f(`file`,t,e,``,``)}static from(e){let t=new f(e.scheme,e.authority,e.path,e.query,e.fragment);return c(t,!0),t}toString(e=!1){return _(this,e)}toJSON(){return this}static revive(e){if(e){if(e instanceof u)return e;{let t=new f(e);return t._formatted=e.external,t._fsPath=e._sep===d?e.fsPath:null,t}}return e}}let d=i?1:void 0;class f extends u{_formatted=null;_fsPath=null;get fsPath(){return this._fsPath||=g(this,!1),this._fsPath}toString(e=!1){return e?_(this,!0):(this._formatted||=_(this,!1),this._formatted)}toJSON(){let e={$mid:1};return this._fsPath&&(e.fsPath=this._fsPath,e._sep=d),this._formatted&&(e.external=this._formatted),this.path&&(e.path=this.path),this.scheme&&(e.scheme=this.scheme),this.authority&&(e.authority=this.authority),this.query&&(e.query=this.query),this.fragment&&(e.fragment=this.fragment),e}}let p={58:`%3A`,47:`%2F`,63:`%3F`,35:`%23`,91:`%5B`,93:`%5D`,64:`%40`,33:`%21`,36:`%24`,38:`%26`,39:`%27`,40:`%28`,41:`%29`,42:`%2A`,43:`%2B`,44:`%2C`,59:`%3B`,61:`%3D`,32:`%20`};function m(e,t,n){let r,i=-1;for(let a=0;a<e.length;a++){let o=e.charCodeAt(a);if(o>=97&&o<=122||o>=65&&o<=90||o>=48&&o<=57||o===45||o===46||o===95||o===126||t&&o===47||n&&o===91||n&&o===93||n&&o===58)i!==-1&&(r+=encodeURIComponent(e.substring(i,a)),i=-1),r!==void 0&&(r+=e.charAt(a));else{r===void 0&&(r=e.substr(0,a));let t=p[o];t===void 0?i===-1&&(i=a):(i!==-1&&(r+=encodeURIComponent(e.substring(i,a)),i=-1),r+=t)}}return i!==-1&&(r+=encodeURIComponent(e.substring(i))),r===void 0?e:r}function h(e){let t;for(let n=0;n<e.length;n++){let r=e.charCodeAt(n);r===35||r===63?(t===void 0&&(t=e.substr(0,n)),t+=p[r]):t!==void 0&&(t+=e[n])}return t===void 0?e:t}function g(e,t){let n;return n=e.authority&&e.path.length>1&&e.scheme===`file`?`//${e.authority}${e.path}`:e.path.charCodeAt(0)===47&&(e.path.charCodeAt(1)>=65&&e.path.charCodeAt(1)<=90||e.path.charCodeAt(1)>=97&&e.path.charCodeAt(1)<=122)&&e.path.charCodeAt(2)===58?t?e.path.substr(1):e.path[1].toLowerCase()+e.path.substr(2):e.path,i&&(n=n.replace(/\//g,`\\`)),n}function _(e,t){let n=t?h:m,r=``,{scheme:i,authority:a,path:o,query:s,fragment:c}=e;if(i&&(r+=i,r+=`:`),(a||i===`file`)&&(r+=`/`,r+=`/`),a){let e=a.indexOf(`@`);if(e!==-1){let t=a.substr(0,e);a=a.substr(e+1),e=t.lastIndexOf(`:`),e===-1?r+=n(t,!1,!1):(r+=n(t.substr(0,e),!1,!1),r+=`:`,r+=n(t.substr(e+1),!1,!0)),r+=`@`}a=a.toLowerCase(),e=a.lastIndexOf(`:`),e===-1?r+=n(a,!1,!0):(r+=n(a.substr(0,e),!1,!0),r+=a.substr(e))}if(o){if(o.length>=3&&o.charCodeAt(0)===47&&o.charCodeAt(2)===58){let e=o.charCodeAt(1);e>=65&&e<=90&&(o=`/${String.fromCharCode(e+32)}:${o.substr(3)}`)}else if(o.length>=2&&o.charCodeAt(1)===58){let e=o.charCodeAt(0);e>=65&&e<=90&&(o=`${String.fromCharCode(e+32)}:${o.substr(2)}`)}r+=n(o,!0,!1)}return s&&(r+=`?`,r+=n(s,!1,!1)),c&&(r+=`#`,r+=t?c:m(c,!1,!1)),r}function v(e){try{return decodeURIComponent(e)}catch{return e.length>3?e.substr(0,3)+v(e.substr(3)):e}}let y=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function b(e){return e.match(y)?e.replace(y,(e=>v(e))):e}var x=n(975);let S=x.posix||x;var C;(function(e){e.joinPath=function(e,...t){return e.with({path:S.join(e.path,...t)})},e.resolvePath=function(e,...t){let n=e.path,r=!1;n[0]!==`/`&&(n=`/`+n,r=!0);let i=S.resolve(n,...t);return r&&i[0]===`/`&&!e.authority&&(i=i.substring(1)),e.with({path:i})},e.dirname=function(e){if(e.path.length===0||e.path===`/`)return e;let t=S.dirname(e.path);return t.length===1&&t.charCodeAt(0)===46&&(t=``),e.with({path:t})},e.basename=function(e){return S.basename(e.path)},e.extname=function(e){return S.extname(e.path)}})(C||={}),Vf=r})();var{URI:Hf,Utils:Uf}=Vf,Wf;(function(e){e.basename=Uf.basename,e.dirname=Uf.dirname,e.extname=Uf.extname,e.joinPath=Uf.joinPath,e.resolvePath=Uf.resolvePath;let t=typeof process==`object`&&process?.platform===`win32`;function n(e,t){return e?.toString()===t?.toString()}e.equals=n;function r(e,n){let r=typeof e==`string`?Hf.parse(e).path:e.path,i=typeof n==`string`?Hf.parse(n).path:n.path,a=r.split(`/`).filter(e=>e.length>0),o=i.split(`/`).filter(e=>e.length>0);if(t){let e=/^[A-Z]:$/;if(a[0]&&e.test(a[0])&&(a[0]=a[0].toLowerCase()),o[0]&&e.test(o[0])&&(o[0]=o[0].toLowerCase()),a[0]!==o[0])return i.substring(1)}let s=0;for(;s<a.length&&a[s]===o[s];s++);return`../`.repeat(a.length-s)+o.slice(s).join(`/`)}e.relative=r;function i(e){return Hf.parse(e.toString()).toString()}e.normalize=i;function a(e,t){let n=typeof e==`string`?e:e.path,r=typeof t==`string`?t:t.path;return r.charAt(r.length-1)===`/`&&(r=r.slice(0,-1)),n.charAt(n.length-1)===`/`&&(n=n.slice(0,-1)),r===n?!0:r.length<n.length||r.charAt(n.length)!==`/`?!1:r.startsWith(n)}e.contains=a})(Wf||={});var Gf=class{constructor(){this.root={name:``,children:new Map}}normalizeUri(e){return Wf.normalize(e)}clear(){this.root.children.clear()}insert(e,t){let n=this.getNode(this.normalizeUri(e),!0);n.element=t}delete(e){let t=this.getNode(this.normalizeUri(e),!1);t?.parent&&t.parent.children.delete(t.name)}has(e){return this.getNode(this.normalizeUri(e),!1)?.element!==void 0}hasNode(e){return this.getNode(this.normalizeUri(e),!1)!==void 0}find(e){return this.getNode(this.normalizeUri(e),!1)?.element}findNode(e){let t=this.normalizeUri(e),n=this.getNode(t,!1);if(n)return{name:n.name,uri:Wf.joinPath(Hf.parse(t),n.name).toString(),element:n.element}}findChildren(e){let t=this.normalizeUri(e),n=this.getNode(t,!1);return n?Array.from(n.children.values()).map(e=>({name:e.name,uri:Wf.joinPath(Hf.parse(t),e.name).toString(),element:e.element})):[]}all(){return this.collectValues(this.root)}findAll(e){let t=this.getNode(Wf.normalize(e),!1);return t?this.collectValues(t):[]}getNode(e,t){let n=e.split(`/`);e.charAt(e.length-1)===`/`&&n.pop();let r=this.root;for(let e of n){let n=r.children.get(e);if(!n)if(t)n={name:e,children:new Map,parent:r},r.children.set(e,n);else return;r=n}return r}collectValues(e){let t=[];e.element&&t.push(e.element);for(let n of e.children.values())t.push(...this.collectValues(n));return t}},Z;(function(e){e[e.Changed=0]=`Changed`,e[e.Parsed=1]=`Parsed`,e[e.IndexedContent=2]=`IndexedContent`,e[e.ComputedScopes=3]=`ComputedScopes`,e[e.Linked=4]=`Linked`,e[e.IndexedReferences=5]=`IndexedReferences`,e[e.Validated=6]=`Validated`})(Z||={});var Kf=class{constructor(e){this.serviceRegistry=e.ServiceRegistry,this.textDocuments=e.workspace.TextDocuments,this.fileSystemProvider=e.workspace.FileSystemProvider}async fromUri(e,t=X.CancellationToken.None){let n=await this.fileSystemProvider.readFile(e);return this.createAsync(e,n,t)}fromTextDocument(e,t,n){return t??=Hf.parse(e.uri),X.CancellationToken.is(n)?this.createAsync(t,e,n):this.create(t,e,n)}fromString(e,t,n){return X.CancellationToken.is(n)?this.createAsync(t,e,n):this.create(t,e,n)}fromModel(e,t){return this.create(t,{$model:e})}create(e,t,n){if(typeof t==`string`){let r=this.parse(e,t,n);return this.createLangiumDocument(r,e,void 0,t)}else if(`$model`in t){let n={value:t.$model,parserErrors:[],lexerErrors:[]};return this.createLangiumDocument(n,e)}else{let r=this.parse(e,t.getText(),n);return this.createLangiumDocument(r,e,t)}}async createAsync(e,t,n){if(typeof t==`string`){let r=await this.parseAsync(e,t,n);return this.createLangiumDocument(r,e,void 0,t)}else{let r=await this.parseAsync(e,t.getText(),n);return this.createLangiumDocument(r,e,t)}}createLangiumDocument(e,t,n,r){let i;if(n)i={parseResult:e,uri:t,state:Z.Parsed,references:[],textDocument:n};else{let n=this.createTextDocumentGetter(t,r);i={parseResult:e,uri:t,state:Z.Parsed,references:[],get textDocument(){return n()}}}return e.value.$document=i,i}async update(e,t){let n=e.parseResult.value.$cstNode?.root.fullText,r=this.textDocuments?.get(e.uri.toString()),i=r?r.getText():await this.fileSystemProvider.readFile(e.uri);if(r)Object.defineProperty(e,`textDocument`,{value:r});else{let t=this.createTextDocumentGetter(e.uri,i);Object.defineProperty(e,`textDocument`,{get:t})}return n!==i&&(e.parseResult=await this.parseAsync(e.uri,i,t),e.parseResult.value.$document=e),e.state=Z.Parsed,e}parse(e,t,n){return this.serviceRegistry.getServices(e).parser.LangiumParser.parse(t,n)}parseAsync(e,t,n){return this.serviceRegistry.getServices(e).parser.AsyncParser.parse(t,n)}createTextDocumentGetter(e,t){let n=this.serviceRegistry,r;return()=>r??=Ff.create(e.toString(),n.getServices(e).LanguageMetaData.languageId,0,t??``)}},qf=class{constructor(e){this.documentTrie=new Gf,this.services=e,this.langiumDocumentFactory=e.workspace.LangiumDocumentFactory,this.documentBuilder=()=>e.workspace.DocumentBuilder}get all(){return b(this.documentTrie.all())}addDocument(e){let t=e.uri.toString();if(this.documentTrie.has(t))throw Error(`A document with the URI '${t}' is already present.`);this.documentTrie.insert(t,e)}getDocument(e){let t=e.toString();return this.documentTrie.find(t)}getDocuments(e){let t=e.toString();return this.documentTrie.findAll(t)}async getOrCreateDocument(e,t){let n=this.getDocument(e);return n||(n=await this.langiumDocumentFactory.fromUri(e,t),this.addDocument(n),n)}createDocument(e,t,n){if(n)return this.langiumDocumentFactory.fromString(t,e,n).then(e=>(this.addDocument(e),e));{let n=this.langiumDocumentFactory.fromString(t,e);return this.addDocument(n),n}}hasDocument(e){return this.documentTrie.has(e.toString())}invalidateDocument(e){let t=e.toString(),n=this.documentTrie.find(t);return n&&this.documentBuilder().resetToState(n,Z.Changed),n}deleteDocument(e){let t=e.toString(),n=this.documentTrie.find(t);return n&&(n.state=Z.Changed,this.documentTrie.delete(t)),n}deleteDocuments(e){let t=e.toString(),n=this.documentTrie.findAll(t);for(let e of n)e.state=Z.Changed;return this.documentTrie.delete(t),n}},Jf=Symbol(`RefResolving`),Yf=class{constructor(e){this.reflection=e.shared.AstReflection,this.langiumDocuments=()=>e.shared.workspace.LangiumDocuments,this.scopeProvider=e.references.ScopeProvider,this.astNodeLocator=e.workspace.AstNodeLocator,this.profiler=e.shared.profilers.LangiumProfiler,this.languageId=e.LanguageMetaData.languageId}async link(e,t=X.CancellationToken.None){if(this.profiler?.isActive(`linking`)){let n=this.profiler.createTask(`linking`,this.languageId);n.start();try{for(let r of O(e.parseResult.value))await Mf(t),ne(r).forEach(t=>{let i=`${r.$type}:${t.property}`;n.startSubTask(i);try{this.doLink(t,e)}finally{n.stopSubTask(i)}})}finally{n.stop()}}else for(let n of O(e.parseResult.value))await Mf(t),ne(n).forEach(t=>this.doLink(t,e))}doLink(e,t){let n=e.reference;if(`_ref`in n&&n._ref===void 0){n._ref=Jf;try{let t=this.getCandidate(e);u(t)?n._ref=t:(n._nodeDescription=t,n._ref=this.loadAstNode(t)??this.createLinkingError(e,t))}catch(t){console.error(`An error occurred while resolving reference to '${n.$refText}':`,t);let r=t.message??String(t);n._ref={info:e,message:`An error occurred while resolving reference to '${n.$refText}': ${r}`}}t.references.push(n)}else if(`_items`in n&&n._items===void 0){n._items=Jf;try{let t=this.getCandidates(e),r=[];if(u(t))n._linkingError=t;else for(let e of t){let t=this.loadAstNode(e);t&&r.push({ref:t,$nodeDescription:e})}n._items=r}catch(t){n._linkingError={info:e,message:`An error occurred while resolving reference to '${n.$refText}': ${t}`},n._items=[]}t.references.push(n)}}unlink(e){for(let t of e.references)`_ref`in t?(t._ref=void 0,delete t._nodeDescription):`_items`in t&&(t._items=void 0,delete t._linkingError);e.references=[]}getCandidate(e){return this.scopeProvider.getScope(e).getElement(e.reference.$refText)??this.createLinkingError(e)}getCandidates(e){let t=this.scopeProvider.getScope(e).getElements(e.reference.$refText).distinct(e=>`${e.documentUri}#${e.path}`).toArray();return t.length>0?t:this.createLinkingError(e)}buildReference(e,t,n,r){let i=this,a={$refNode:n,$refText:r,_ref:void 0,get ref(){if(o(this._ref))return this._ref;if(l(this._nodeDescription))this._ref=i.loadAstNode(this._nodeDescription)??i.createLinkingError({reference:a,container:e,property:t},this._nodeDescription);else if(this._ref===void 0){this._ref=Jf;let n=E(e).$document,r=i.getLinkedNode({reference:a,container:e,property:t});if(r.error&&n&&n.state<Z.ComputedScopes){this._ref=void 0;return}this._ref=r.node??r.error,this._nodeDescription=r.descr,n?.references.push(this)}else this._ref===Jf&&i.throwCyclicReferenceError(e,t,r);return o(this._ref)?this._ref:void 0},get $nodeDescription(){return this._nodeDescription},get error(){return u(this._ref)?this._ref:void 0}};return a}buildMultiReference(e,t,n,r){let i=this,a={$refNode:n,$refText:r,_items:void 0,get items(){if(Array.isArray(this._items))return this._items;if(this._items===void 0){this._items=Jf;let n=E(e).$document,r=i.getCandidates({reference:a,container:e,property:t}),o=[];if(u(r))this._linkingError=r;else for(let e of r){let t=i.loadAstNode(e);t&&o.push({ref:t,$nodeDescription:e})}this._items=o,n?.references.push(this)}else this._items===Jf&&i.throwCyclicReferenceError(e,t,r);return Array.isArray(this._items)?this._items:[]},get error(){if(this._linkingError)return this._linkingError;if(!(this.items.length>0))return this._linkingError=i.createLinkingError({reference:a,container:e,property:t})}};return a}throwCyclicReferenceError(e,t,n){throw Error(`Cyclic reference resolution detected: ${this.astNodeLocator.getAstNodePath(e)}/${t} (symbol '${n}')`)}getLinkedNode(e){try{let t=this.getCandidate(e);if(u(t))return{error:t};let n=this.loadAstNode(t);return n?{node:n,descr:t}:{descr:t,error:this.createLinkingError(e,t)}}catch(t){console.error(`An error occurred while resolving reference to '${e.reference.$refText}':`,t);let n=t.message??String(t);return{error:{info:e,message:`An error occurred while resolving reference to '${e.reference.$refText}': ${n}`}}}}loadAstNode(e){if(e.node)return e.node;let t=this.langiumDocuments().getDocument(e.documentUri);if(t)return this.astNodeLocator.getAstNode(t.parseResult.value,e.path)}createLinkingError(e,t){let n=E(e.container).$document;return n&&n.state<Z.ComputedScopes&&console.warn(`Attempted reference resolution before document reached ComputedScopes state (${n.uri}).`),{info:e,message:`Could not resolve reference to ${this.reflection.getReferenceType(e)} named '${e.reference.$refText}'.`,targetDescription:t}}};function Xf(e){return typeof e.name==`string`}var Zf=class{getName(e){if(Xf(e))return e.name}getNameNode(e){return _n(e.$cstNode,`name`)}},Qf=class{constructor(e){this.nameProvider=e.references.NameProvider,this.index=e.shared.workspace.IndexManager,this.nodeLocator=e.workspace.AstNodeLocator,this.documents=e.shared.workspace.LangiumDocuments,this.hasMultiReference=O(e.Grammar).some(e=>xe(e)&&e.isMulti)}findDeclarations(e){if(e){let t=xn(e),n=e.astNode;if(t&&n){let r=n[t.feature];if(s(r)||c(r))return ee(r);if(Array.isArray(r)){for(let t of r)if((s(t)||c(t))&&t.$refNode&&t.$refNode.offset<=e.offset&&t.$refNode.end>=e.end)return ee(t)}}if(n){let t=this.nameProvider.getNameNode(n);if(t&&(t===e||kt(e,t)))return this.getSelfNodes(n)}}return[]}getSelfNodes(e){if(this.hasMultiReference){let t=this.index.findAllReferences(e,this.nodeLocator.getAstNodePath(e)),n=this.getNodeFromReferenceDescription(t.head());if(n){for(let t of ne(n))if(c(t.reference)&&t.reference.items.some(t=>t.ref===e))return t.reference.items.map(e=>e.ref)}return[e]}else return[e]}getNodeFromReferenceDescription(e){if(!e)return;let t=this.documents.getDocument(e.sourceUri);if(t)return this.nodeLocator.getAstNode(t.parseResult.value,e.sourcePath)}findDeclarationNodes(e){let t=this.findDeclarations(e),n=[];for(let e of t){let t=this.nameProvider.getNameNode(e)??e.$cstNode;t&&n.push(t)}return n}findReferences(e,t){let n=[];t.includeDeclaration&&n.push(...this.getSelfReferences(e));let r=this.index.findAllReferences(e,this.nodeLocator.getAstNodePath(e));return t.documentUri&&(r=r.filter(e=>Wf.equals(e.sourceUri,t.documentUri))),n.push(...r),b(n)}getSelfReferences(e){let t=this.getSelfNodes(e),n=[];for(let e of t){let t=this.nameProvider.getNameNode(e);if(t){let r=T(e),i=this.nodeLocator.getAstNodePath(e);n.push({sourceUri:r.uri,sourcePath:i,targetUri:r.uri,targetPath:i,segment:jt(t),local:!0})}}return n}},$f=class{constructor(e){if(this.map=new Map,e)for(let[t,n]of e)this.add(t,n)}get size(){return S.sum(b(this.map.values()).map(e=>e.length))}clear(){this.map.clear()}delete(e,t){if(t===void 0)return this.map.delete(e);{let n=this.map.get(e);if(n){let r=n.indexOf(t);if(r>=0)return n.length===1?this.map.delete(e):n.splice(r,1),!0}return!1}}get(e){return this.map.get(e)??[]}getStream(e){let t=this.map.get(e);return t?b(t):v}has(e,t){if(t===void 0)return this.map.has(e);{let n=this.map.get(e);return n?n.indexOf(t)>=0:!1}}add(e,t){return this.map.has(e)?this.map.get(e).push(t):this.map.set(e,[t]),this}addAll(e,t){return this.map.has(e)?this.map.get(e).push(...t):this.map.set(e,Array.from(t)),this}forEach(e){this.map.forEach((t,n)=>t.forEach(t=>e(t,n,this)))}[Symbol.iterator](){return this.entries().iterator()}entries(){return b(this.map.entries()).flatMap(([e,t])=>t.map(t=>[e,t]))}keys(){return b(this.map.keys())}values(){return b(this.map.values()).flat()}entriesGroupedByKey(){return b(this.map.entries())}},ep=class{get size(){return this.map.size}constructor(e){if(this.map=new Map,this.inverse=new Map,e)for(let[t,n]of e)this.set(t,n)}clear(){this.map.clear(),this.inverse.clear()}set(e,t){return this.map.set(e,t),this.inverse.set(t,e),this}get(e){return this.map.get(e)}getKey(e){return this.inverse.get(e)}delete(e){let t=this.map.get(e);return t===void 0?!1:(this.map.delete(e),this.inverse.delete(t),!0)}},tp=class{constructor(e){this.nameProvider=e.references.NameProvider,this.descriptions=e.workspace.AstNodeDescriptionProvider}async collectExportedSymbols(e,t=X.CancellationToken.None){return this.collectExportedSymbolsForNode(e.parseResult.value,e,void 0,t)}async collectExportedSymbolsForNode(e,t,n=te,r=X.CancellationToken.None){let i=[];this.addExportedSymbol(e,i,t);for(let a of n(e))await Mf(r),this.addExportedSymbol(a,i,t);return i}addExportedSymbol(e,t,n){let r=this.nameProvider.getName(e);r&&t.push(this.descriptions.createDescription(e,r,n))}async collectLocalSymbols(e,t=X.CancellationToken.None){let n=e.parseResult.value,r=new $f;for(let i of D(n))await Mf(t),this.addLocalSymbol(i,e,r);return r}addLocalSymbol(e,t,n){let r=e.$container;if(r){let i=this.nameProvider.getName(e);i&&n.add(r,this.descriptions.createDescription(e,i,t))}}},np=class{constructor(e,t,n){this.elements=e,this.outerScope=t,this.caseInsensitive=n?.caseInsensitive??!1,this.concatOuterScope=n?.concatOuterScope??!0}getAllElements(){return this.outerScope?this.elements.concat(this.outerScope.getAllElements()):this.elements}getElement(e){let t=this.caseInsensitive?e.toLowerCase():e,n=this.caseInsensitive?this.elements.find(e=>e.name.toLowerCase()===t):this.elements.find(t=>t.name===e);if(n)return n;if(this.outerScope)return this.outerScope.getElement(e)}getElements(e){let t=this.caseInsensitive?e.toLowerCase():e,n=this.caseInsensitive?this.elements.filter(e=>e.name.toLowerCase()===t):this.elements.filter(t=>t.name===e);return(this.concatOuterScope||n.isEmpty())&&this.outerScope?n.concat(this.outerScope.getElements(e)):n}},rp=class{constructor(e,t,n){this.elements=new $f,this.caseInsensitive=n?.caseInsensitive??!1,this.concatOuterScope=n?.concatOuterScope??!0;for(let t of e){let e=this.caseInsensitive?t.name.toLowerCase():t.name;this.elements.add(e,t)}this.outerScope=t}getElement(e){let t=this.caseInsensitive?e.toLowerCase():e,n=this.elements.get(t)[0];if(n)return n;if(this.outerScope)return this.outerScope.getElement(e)}getElements(e){let t=this.caseInsensitive?e.toLowerCase():e,n=this.elements.get(t);return(this.concatOuterScope||n.length===0)&&this.outerScope?b(n).concat(this.outerScope.getElements(e)):b(n)}getAllElements(){let e=b(this.elements.values());return this.outerScope&&(e=e.concat(this.outerScope.getAllElements())),e}},ip=class{constructor(){this.toDispose=[],this.isDisposed=!1}onDispose(e){this.toDispose.push(e)}dispose(){this.throwIfDisposed(),this.clear(),this.isDisposed=!0,this.toDispose.forEach(e=>e.dispose())}throwIfDisposed(){if(this.isDisposed)throw Error(`This cache has already been disposed`)}},ap=class extends ip{constructor(){super(...arguments),this.cache=new Map}has(e){return this.throwIfDisposed(),this.cache.has(e)}set(e,t){this.throwIfDisposed(),this.cache.set(e,t)}get(e,t){if(this.throwIfDisposed(),this.cache.has(e))return this.cache.get(e);if(t){let n=t();return this.cache.set(e,n),n}else return}delete(e){return this.throwIfDisposed(),this.cache.delete(e)}clear(){this.throwIfDisposed(),this.cache.clear()}},op=class extends ip{constructor(e){super(),this.cache=new Map,this.converter=e??(e=>e)}has(e,t){return this.throwIfDisposed(),this.cacheForContext(e).has(t)}set(e,t,n){this.throwIfDisposed(),this.cacheForContext(e).set(t,n)}get(e,t,n){this.throwIfDisposed();let r=this.cacheForContext(e);if(r.has(t))return r.get(t);if(n){let e=n();return r.set(t,e),e}else return}delete(e,t){return this.throwIfDisposed(),this.cacheForContext(e).delete(t)}clear(e){if(this.throwIfDisposed(),e){let t=this.converter(e);this.cache.delete(t)}else this.cache.clear()}cacheForContext(e){let t=this.converter(e),n=this.cache.get(t);return n||(n=new Map,this.cache.set(t,n)),n}},sp=class extends ap{constructor(e,t){super(),t?(this.toDispose.push(e.workspace.DocumentBuilder.onBuildPhase(t,()=>{this.clear()})),this.toDispose.push(e.workspace.DocumentBuilder.onUpdate((e,t)=>{t.length>0&&this.clear()}))):this.toDispose.push(e.workspace.DocumentBuilder.onUpdate(()=>{this.clear()}))}},cp=class{constructor(e){this.reflection=e.shared.AstReflection,this.nameProvider=e.references.NameProvider,this.descriptions=e.workspace.AstNodeDescriptionProvider,this.indexManager=e.shared.workspace.IndexManager,this.globalScopeCache=new sp(e.shared)}getScope(e){let t=[],n=this.reflection.getReferenceType(e),r=T(e.container).localSymbols;if(r){let i=e.container;do r.has(i)&&t.push(r.getStream(i).filter(e=>this.reflection.isSubtype(e.type,n))),i=i.$container;while(i)}let i=this.getGlobalScope(n,e);for(let e=t.length-1;e>=0;e--)i=this.createScope(t[e],i);return i}createScope(e,t,n){return new np(b(e),t,n)}createScopeForNodes(e,t,n){return new np(b(e).map(e=>{let t=this.nameProvider.getName(e);if(t)return this.descriptions.createDescription(e,t)}).nonNullable(),t,n)}getGlobalScope(e,t){return this.globalScopeCache.get(e,()=>new rp(this.indexManager.allElements(e)))}};function lp(e){return typeof e.$comment==`string`}function up(e){return typeof e==`object`&&!!e&&(`$ref`in e||`$error`in e)}var dp=class{constructor(e){this.ignoreProperties=new Set([`$container`,`$containerProperty`,`$containerIndex`,`$document`,`$cstNode`]),this.langiumDocuments=e.shared.workspace.LangiumDocuments,this.astNodeLocator=e.workspace.AstNodeLocator,this.nameProvider=e.references.NameProvider,this.commentProvider=e.documentation.CommentProvider}serialize(e,t){let n=t??{},r=t?.replacer,i=(e,t)=>this.replacer(e,t,n),a=r?(e,t)=>r(e,t,i):i;try{return this.currentDocument=T(e),JSON.stringify(e,a,t?.space)}finally{this.currentDocument=void 0}}deserialize(e,t){let n=t??{},r=JSON.parse(e);return this.linkNode(r,r,n),r}replacer(e,t,{refText:n,sourceText:r,textRegions:i,comments:a,uriConverter:l}){if(!this.ignoreProperties.has(e))if(s(t)){let e=t.ref,r=n?t.$refText:void 0;if(e){let t=T(e),n=``;this.currentDocument&&this.currentDocument!==t&&(n=l?l(t.uri,e):t.uri.toString());let i=this.astNodeLocator.getAstNodePath(e);return{$ref:`${n}#${i}`,$refText:r}}else return{$error:t.error?.message??`Could not resolve reference`,$refText:r}}else if(c(t)){let e=n?t.$refText:void 0,r=[];for(let e of t.items){let t=e.ref,n=T(e.ref),i=``;this.currentDocument&&this.currentDocument!==n&&(i=l?l(n.uri,t):n.uri.toString());let a=this.astNodeLocator.getAstNodePath(t);r.push(`${i}#${a}`)}return{$refs:r,$refText:e}}else if(o(t)){let n;if(i&&(n=this.addAstNodeRegionWithAssignmentsTo({...t}),(!e||t.$document)&&n?.$textRegion&&(n.$textRegion.documentURI=this.currentDocument?.uri.toString())),r&&!e&&(n??={...t},n.$sourceText=t.$cstNode?.text),a){n??={...t};let e=this.commentProvider.getComment(t);e&&(n.$comment=e.replace(/\r/g,``))}return n??t}else return t}addAstNodeRegionWithAssignmentsTo(e){let t=e=>({offset:e.offset,end:e.end,length:e.length,range:e.range});if(e.$cstNode){let n=e.$textRegion=t(e.$cstNode),r=n.assignments={};return Object.keys(e).filter(e=>!e.startsWith(`$`)).forEach(n=>{let i=gn(e.$cstNode,n).map(t);i.length!==0&&(r[n]=i)}),e}}linkNode(e,t,n,r,i,a){for(let[r,i]of Object.entries(e))if(Array.isArray(i))for(let a=0;a<i.length;a++){let s=i[a];up(s)?i[a]=this.reviveReference(e,r,t,s,n):o(s)&&this.linkNode(s,t,n,e,r,a)}else up(i)?e[r]=this.reviveReference(e,r,t,i,n):o(i)&&this.linkNode(i,t,n,e,r);let s=e;s.$container=r,s.$containerProperty=i,s.$containerIndex=a}reviveReference(e,t,n,r,i){let a=r.$refText,s=r.$error,c;if(r.$ref){let e=this.getRefNode(n,r.$ref,i.uriConverter);if(o(e))return a||=this.nameProvider.getName(e),{$refText:a??``,ref:e};s=e}else if(r.$refs){let e=[];for(let t of r.$refs){let r=this.getRefNode(n,t,i.uriConverter);o(r)&&e.push({ref:r})}if(e.length===0)c={$refText:a??``,items:e},s??=`Could not resolve multi-reference`;else return{$refText:a??``,items:e}}if(s)return c??={$refText:a??``,ref:void 0},c.error={info:{container:e,property:t,reference:c},message:s},c}getRefNode(e,t,n){try{let r=t.indexOf(`#`);if(r===0)return this.astNodeLocator.getAstNode(e,t.substring(1))||`Could not resolve path: `+t;if(r<0){let e=n?n(t):Hf.parse(t),r=this.langiumDocuments.getDocument(e);return r?r.parseResult.value:`Could not find document for URI: `+t}let i=n?n(t.substring(0,r)):Hf.parse(t.substring(0,r)),a=this.langiumDocuments.getDocument(i);return a?r===t.length-1?a.parseResult.value:this.astNodeLocator.getAstNode(a.parseResult.value,t.substring(r+1))||`Could not resolve URI: `+t:`Could not find document for URI: `+t}catch(e){return String(e)}}},fp=class{get map(){return this.fileExtensionMap}constructor(e){this.languageIdMap=new Map,this.fileExtensionMap=new Map,this.fileNameMap=new Map,this.textDocuments=e?.workspace.TextDocuments}register(e){let t=e.LanguageMetaData;for(let n of t.fileExtensions)this.fileExtensionMap.has(n)&&console.warn(`The file extension ${n} is used by multiple languages. It is now assigned to '${t.languageId}'.`),this.fileExtensionMap.set(n,e);if(t.fileNames)for(let n of t.fileNames)this.fileNameMap.has(n)&&console.warn(`The file name ${n} is used by multiple languages. It is now assigned to '${t.languageId}'.`),this.fileNameMap.set(n,e);this.languageIdMap.set(t.languageId,e)}getServices(e){if(this.languageIdMap.size===0)throw Error("The service registry is empty. Use `register` to register the services of a language.");let t=this.textDocuments?.get(e)?.languageId;if(t!==void 0){let e=this.languageIdMap.get(t);if(e)return e}let n=Wf.extname(e),r=Wf.basename(e),i=this.fileNameMap.get(r)??this.fileExtensionMap.get(n);if(!i)throw Error(t?`The service registry contains no services for the extension '${n}' for language '${t}'.`:`The service registry contains no services for the extension '${n}'.`);return i}hasServices(e){try{return this.getServices(e),!0}catch{return!1}}get all(){return Array.from(this.languageIdMap.values())}};function pp(e){return{code:e}}var mp;(function(e){e.defaults=[`fast`,`slow`,`built-in`],e.all=e.defaults})(mp||={});var hp=class{constructor(e){this.entries=new $f,this.knownCategories=new Set(mp.defaults),this.entriesBefore=[],this.entriesAfter=[],this.reflection=e.shared.AstReflection}register(e,t=this,n=`fast`){if(n===`built-in`)throw Error(`The 'built-in' category is reserved for lexer, parser, and linker errors.`);this.knownCategories.add(n);for(let[r,i]of Object.entries(e)){let e=i;if(Array.isArray(e))for(let i of e){let e={check:this.wrapValidationException(i,t),category:n};this.addEntry(r,e)}else if(typeof e==`function`){let i={check:this.wrapValidationException(e,t),category:n};this.addEntry(r,i)}else Bt(e)}}wrapValidationException(e,t){return async(n,r,i)=>{await this.handleException(()=>e.call(t,n,r,i),`An error occurred during validation`,r,n)}}async handleException(e,t,n,r){try{await e()}catch(e){if(jf(e))throw e;console.error(`${t}:`,e),e instanceof Error&&e.stack&&console.error(e.stack),n(`error`,`${t}: ${e instanceof Error?e.message:String(e)}`,{node:r})}}addEntry(e,t){if(e===`AstNode`){this.entries.add(`AstNode`,t);return}for(let n of this.reflection.getAllSubTypes(e))this.entries.add(n,t)}getChecks(e,t){let n=b(this.entries.get(e)).concat(this.entries.get(`AstNode`));return t&&(n=n.filter(e=>t.includes(e.category))),n.map(e=>e.check)}registerBeforeDocument(e,t=this){this.entriesBefore.push(this.wrapPreparationException(e,`An error occurred during set-up of the validation`,t))}registerAfterDocument(e,t=this){this.entriesAfter.push(this.wrapPreparationException(e,`An error occurred during tear-down of the validation`,t))}wrapPreparationException(e,t,n){return async(r,i,a,o)=>{await this.handleException(()=>e.call(n,r,i,a,o),t,i,r)}}get checksBefore(){return this.entriesBefore}get checksAfter(){return this.entriesAfter}getAllValidationCategories(e){return this.knownCategories}},gp=Object.freeze({validateNode:!0,validateChildren:!0}),_p=class{constructor(e){this.validationRegistry=e.validation.ValidationRegistry,this.metadata=e.LanguageMetaData,this.profiler=e.shared.profilers.LangiumProfiler,this.languageId=e.LanguageMetaData.languageId}async validateDocument(e,t={},n=X.CancellationToken.None){let r=e.parseResult,i=[];if(await Mf(n),(!t.categories||t.categories.includes(`built-in`))&&(this.processLexingErrors(r,i,t),t.stopAfterLexingErrors&&i.some(e=>e.data?.code===xp.LexingError)||(this.processParsingErrors(r,i,t),t.stopAfterParsingErrors&&i.some(e=>e.data?.code===xp.ParsingError))||(this.processLinkingErrors(e,i,t),t.stopAfterLinkingErrors&&i.some(e=>e.data?.code===xp.LinkingError))))return i;try{i.push(...await this.validateAst(r.value,t,n))}catch(e){if(jf(e))throw e;console.error(`An error occurred during validation:`,e)}return await Mf(n),i}processLexingErrors(e,t,n){let r=[...e.lexerErrors,...e.lexerReport?.diagnostics??[]];for(let e of r){let n=e.severity??`error`,r={severity:yp(n),range:{start:{line:e.line-1,character:e.column-1},end:{line:e.line-1,character:e.column+e.length-1}},message:e.message,data:bp(n),source:this.getSource()};t.push(r)}}processParsingErrors(e,t,n){for(let n of e.parserErrors){let e;if(isNaN(n.token.startOffset)){if(`previousToken`in n){let t=n.previousToken;if(isNaN(t.startOffset)){let t={line:0,character:0};e={start:t,end:t}}else{let n={line:t.endLine-1,character:t.endColumn};e={start:n,end:n}}}}else e=At(n.token);if(e){let r={severity:yp(`error`),range:e,message:n.message,data:pp(xp.ParsingError),source:this.getSource()};t.push(r)}}}processLinkingErrors(e,t,n){for(let n of e.references){let e=n.error;if(e){let r={node:e.info.container,range:n.$refNode?.range,property:e.info.property,index:e.info.index,data:{code:xp.LinkingError,containerType:e.info.container.$type,property:e.info.property,refText:e.info.reference.$refText}};t.push(this.toDiagnostic(`error`,e.message,r))}}}async validateAst(e,t,n=X.CancellationToken.None){let r=[],i=(e,t,n)=>{r.push(this.toDiagnostic(e,t,n))};return await this.validateAstBefore(e,t,i,n),await this.validateAstNodes(e,t,i,n),await this.validateAstAfter(e,t,i,n),r}async validateAstBefore(e,t,n,r=X.CancellationToken.None){let i=this.validationRegistry.checksBefore;for(let a of i)await Mf(r),await a(e,n,t.categories??[],r)}async validateAstNodes(e,t,n,r=X.CancellationToken.None){if(this.profiler?.isActive(`validating`)){let i=this.profiler.createTask(`validating`,this.languageId);i.start();try{let a=O(e).iterator();for(let e of a){i.startSubTask(e.$type);let o=this.validateSingleNodeOptions(e,t);if(o.validateNode)try{let i=this.validationRegistry.getChecks(e.$type,t.categories);for(let t of i)await t(e,n,r)}finally{i.stopSubTask(e.$type)}o.validateChildren||a.prune()}}finally{i.stop()}}else{let i=O(e).iterator();for(let e of i){await Mf(r);let a=this.validateSingleNodeOptions(e,t);if(a.validateNode){let i=this.validationRegistry.getChecks(e.$type,t.categories);for(let t of i)await t(e,n,r)}a.validateChildren||i.prune()}}}validateSingleNodeOptions(e,t){return gp}async validateAstAfter(e,t,n,r=X.CancellationToken.None){let i=this.validationRegistry.checksAfter;for(let a of i)await Mf(r),await a(e,n,t.categories??[],r)}toDiagnostic(e,t,n){return{message:t,range:vp(n),severity:yp(e),code:n.code,codeDescription:n.codeDescription,tags:n.tags,relatedInformation:n.relatedInformation,data:n.data,source:this.getSource()}}getSource(){return this.metadata.languageId}};function vp(e){if(e.range)return e.range;let t;return typeof e.property==`string`?t=_n(e.node.$cstNode,e.property,e.index):typeof e.keyword==`string`&&(t=yn(e.node.$cstNode,e.keyword,e.index)),t??=e.node.$cstNode,t?t.range:{start:{line:0,character:0},end:{line:0,character:0}}}function yp(e){switch(e){case`error`:return 1;case`warning`:return 2;case`info`:return 3;case`hint`:return 4;default:throw Error(`Invalid diagnostic severity: `+e)}}function bp(e){switch(e){case`error`:return pp(xp.LexingError);case`warning`:return pp(xp.LexingWarning);case`info`:return pp(xp.LexingInfo);case`hint`:return pp(xp.LexingHint);default:throw Error(`Invalid diagnostic severity: `+e)}}var xp;(function(e){e.LexingError=`lexing-error`,e.LexingWarning=`lexing-warning`,e.LexingInfo=`lexing-info`,e.LexingHint=`lexing-hint`,e.ParsingError=`parsing-error`,e.LinkingError=`linking-error`})(xp||={});var Sp=class{constructor(e){this.astNodeLocator=e.workspace.AstNodeLocator,this.nameProvider=e.references.NameProvider}createDescription(e,t,n){let r=n??T(e);t??=this.nameProvider.getName(e);let i=this.astNodeLocator.getAstNodePath(e);if(!t)throw Error(`Node at path ${i} has no name.`);let a,o=()=>a??=jt(this.nameProvider.getNameNode(e)??e.$cstNode);return{node:e,name:t,get nameSegment(){return o()},selectionSegment:jt(e.$cstNode),type:e.$type,documentUri:r.uri,path:i}}},Cp=class{constructor(e){this.nodeLocator=e.workspace.AstNodeLocator}async createDescriptions(e,t=X.CancellationToken.None){let n=[],r=e.parseResult.value;for(let e of O(r))await Mf(t),ne(e).forEach(e=>{e.reference.error||n.push(...this.createInfoDescriptions(e))});return n}createInfoDescriptions(e){let t=e.reference;if(t.error||!t.$refNode)return[];let n=[];s(t)&&t.$nodeDescription?n=[t.$nodeDescription]:c(t)&&(n=t.items.map(e=>e.$nodeDescription).filter(e=>e!==void 0));let r=T(e.container).uri,i=this.nodeLocator.getAstNodePath(e.container),a=[],o=jt(t.$refNode);for(let e of n)a.push({sourceUri:r,sourcePath:i,targetUri:e.documentUri,targetPath:e.path,segment:o,local:Wf.equals(e.documentUri,r)});return a}},wp=class{constructor(){this.segmentSeparator=`/`,this.indexSeparator=`@`}getAstNodePath(e){if(e.$container){let t=this.getAstNodePath(e.$container),n=this.getPathSegment(e);return t+this.segmentSeparator+n}return``}getPathSegment({$containerProperty:e,$containerIndex:t}){if(!e)throw Error(`Missing '$containerProperty' in AST node.`);return t===void 0?e:e+this.indexSeparator+t}getAstNode(e,t){return t.split(this.segmentSeparator).reduce((e,t)=>{if(!e||t.length===0)return e;let n=t.indexOf(this.indexSeparator);if(n>0){let r=t.substring(0,n),i=parseInt(t.substring(n+1));return e[r]?.[i]}return e[t]},e)}},Tp=e.r({});e.i(Tp,e.o(wf(),1));var Ep=class{constructor(e){this._ready=new Nf,this.onConfigurationSectionUpdateEmitter=new Tp.Emitter,this.settings={},this.workspaceConfig=!1,this.serviceRegistry=e.ServiceRegistry}get ready(){return this._ready.promise}initialize(e){this.workspaceConfig=e.capabilities.workspace?.configuration??!1}async initialized(e){if(this.workspaceConfig){if(e.register){let t=this.serviceRegistry.all;e.register({section:t.map(e=>this.toSectionName(e.LanguageMetaData.languageId))})}if(e.fetchConfiguration){let t=this.serviceRegistry.all.map(e=>({section:this.toSectionName(e.LanguageMetaData.languageId)})),n=await e.fetchConfiguration(t);t.forEach((e,t)=>{this.updateSectionConfiguration(e.section,n[t])})}}this._ready.resolve()}updateConfiguration(e){typeof e.settings!=`object`||e.settings===null||Object.entries(e.settings).forEach(([e,t])=>{this.updateSectionConfiguration(e,t),this.onConfigurationSectionUpdateEmitter.fire({section:e,configuration:t})})}updateSectionConfiguration(e,t){this.settings[e]=t}async getConfiguration(e,t){await this.ready;let n=this.toSectionName(e);if(this.settings[n])return this.settings[n][t]}toSectionName(e){return`${e}`}get onConfigurationSectionUpdate(){return this.onConfigurationSectionUpdateEmitter.event}},Dp=e.t((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.Message=e.NotificationType9=e.NotificationType8=e.NotificationType7=e.NotificationType6=e.NotificationType5=e.NotificationType4=e.NotificationType3=e.NotificationType2=e.NotificationType1=e.NotificationType0=e.NotificationType=e.RequestType9=e.RequestType8=e.RequestType7=e.RequestType6=e.RequestType5=e.RequestType4=e.RequestType3=e.RequestType2=e.RequestType1=e.RequestType=e.RequestType0=e.AbstractMessageSignature=e.ParameterStructures=e.ResponseError=e.ErrorCodes=void 0;var t=Cf(),n;(function(e){e.ParseError=-32700,e.InvalidRequest=-32600,e.MethodNotFound=-32601,e.InvalidParams=-32602,e.InternalError=-32603,e.jsonrpcReservedErrorRangeStart=-32099,e.serverErrorStart=-32099,e.MessageWriteError=-32099,e.MessageReadError=-32098,e.PendingResponseRejected=-32097,e.ConnectionInactive=-32096,e.ServerNotInitialized=-32002,e.UnknownErrorCode=-32001,e.jsonrpcReservedErrorRangeEnd=-32e3,e.serverErrorEnd=-32e3})(n||(e.ErrorCodes=n={})),e.ResponseError=class e extends Error{constructor(r,i,a){super(i),this.code=t.number(r)?r:n.UnknownErrorCode,this.data=a,Object.setPrototypeOf(this,e.prototype)}toJson(){let e={code:this.code,message:this.message};return this.data!==void 0&&(e.data=this.data),e}};var r=class e{constructor(e){this.kind=e}static is(t){return t===e.auto||t===e.byName||t===e.byPosition}toString(){return this.kind}};e.ParameterStructures=r,r.auto=new r(`auto`),r.byPosition=new r(`byPosition`),r.byName=new r(`byName`);var i=class{constructor(e,t){this.method=e,this.numberOfParams=t}get parameterStructures(){return r.auto}};e.AbstractMessageSignature=i,e.RequestType0=class extends i{constructor(e){super(e,0)}},e.RequestType=class extends i{constructor(e,t=r.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}},e.RequestType1=class extends i{constructor(e,t=r.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}},e.RequestType2=class extends i{constructor(e){super(e,2)}},e.RequestType3=class extends i{constructor(e){super(e,3)}},e.RequestType4=class extends i{constructor(e){super(e,4)}},e.RequestType5=class extends i{constructor(e){super(e,5)}},e.RequestType6=class extends i{constructor(e){super(e,6)}},e.RequestType7=class extends i{constructor(e){super(e,7)}},e.RequestType8=class extends i{constructor(e){super(e,8)}},e.RequestType9=class extends i{constructor(e){super(e,9)}},e.NotificationType=class extends i{constructor(e,t=r.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}},e.NotificationType0=class extends i{constructor(e){super(e,0)}},e.NotificationType1=class extends i{constructor(e,t=r.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}},e.NotificationType2=class extends i{constructor(e){super(e,2)}},e.NotificationType3=class extends i{constructor(e){super(e,3)}},e.NotificationType4=class extends i{constructor(e){super(e,4)}},e.NotificationType5=class extends i{constructor(e){super(e,5)}},e.NotificationType6=class extends i{constructor(e){super(e,6)}},e.NotificationType7=class extends i{constructor(e){super(e,7)}},e.NotificationType8=class extends i{constructor(e){super(e,8)}},e.NotificationType9=class extends i{constructor(e){super(e,9)}};var a;(function(e){function n(e){let n=e;return n&&t.string(n.method)&&(t.string(n.id)||t.number(n.id))}e.isRequest=n;function r(e){let n=e;return n&&t.string(n.method)&&e.id===void 0}e.isNotification=r;function i(e){let n=e;return n&&(n.result!==void 0||!!n.error)&&(t.string(n.id)||t.number(n.id)||n.id===null)}e.isResponse=i})(a||(e.Message=a={}))})),Op=e.t((e=>{var t;Object.defineProperty(e,`__esModule`,{value:!0}),e.LRUCache=e.LinkedMap=e.Touch=void 0;var n;(function(e){e.None=0,e.First=1,e.AsOld=e.First,e.Last=2,e.AsNew=e.Last})(n||(e.Touch=n={}));var r=class{constructor(){this[t]=`LinkedMap`,this._map=new Map,this._head=void 0,this._tail=void 0,this._size=0,this._state=0}clear(){this._map.clear(),this._head=void 0,this._tail=void 0,this._size=0,this._state++}isEmpty(){return!this._head&&!this._tail}get size(){return this._size}get first(){return this._head?.value}get last(){return this._tail?.value}has(e){return this._map.has(e)}get(e,t=n.None){let r=this._map.get(e);if(r)return t!==n.None&&this.touch(r,t),r.value}set(e,t,r=n.None){let i=this._map.get(e);if(i)i.value=t,r!==n.None&&this.touch(i,r);else{switch(i={key:e,value:t,next:void 0,previous:void 0},r){case n.None:this.addItemLast(i);break;case n.First:this.addItemFirst(i);break;case n.Last:this.addItemLast(i);break;default:this.addItemLast(i);break}this._map.set(e,i),this._size++}return this}delete(e){return!!this.remove(e)}remove(e){let t=this._map.get(e);if(t)return this._map.delete(e),this.removeItem(t),this._size--,t.value}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw Error(`Invalid list`);let e=this._head;return this._map.delete(e.key),this.removeItem(e),this._size--,e.value}forEach(e,t){let n=this._state,r=this._head;for(;r;){if(t?e.bind(t)(r.value,r.key,this):e(r.value,r.key,this),this._state!==n)throw Error(`LinkedMap got modified during iteration.`);r=r.next}}keys(){let e=this._state,t=this._head,n={[Symbol.iterator]:()=>n,next:()=>{if(this._state!==e)throw Error(`LinkedMap got modified during iteration.`);if(t){let e={value:t.key,done:!1};return t=t.next,e}else return{value:void 0,done:!0}}};return n}values(){let e=this._state,t=this._head,n={[Symbol.iterator]:()=>n,next:()=>{if(this._state!==e)throw Error(`LinkedMap got modified during iteration.`);if(t){let e={value:t.value,done:!1};return t=t.next,e}else return{value:void 0,done:!0}}};return n}entries(){let e=this._state,t=this._head,n={[Symbol.iterator]:()=>n,next:()=>{if(this._state!==e)throw Error(`LinkedMap got modified during iteration.`);if(t){let e={value:[t.key,t.value],done:!1};return t=t.next,e}else return{value:void 0,done:!0}}};return n}[(t=Symbol.toStringTag,Symbol.iterator)](){return this.entries()}trimOld(e){if(e>=this.size)return;if(e===0){this.clear();return}let t=this._head,n=this.size;for(;t&&n>e;)this._map.delete(t.key),t=t.next,n--;this._head=t,this._size=n,t&&(t.previous=void 0),this._state++}addItemFirst(e){if(!this._head&&!this._tail)this._tail=e;else if(this._head)e.next=this._head,this._head.previous=e;else throw Error(`Invalid list`);this._head=e,this._state++}addItemLast(e){if(!this._head&&!this._tail)this._head=e;else if(this._tail)e.previous=this._tail,this._tail.next=e;else throw Error(`Invalid list`);this._tail=e,this._state++}removeItem(e){if(e===this._head&&e===this._tail)this._head=void 0,this._tail=void 0;else if(e===this._head){if(!e.next)throw Error(`Invalid list`);e.next.previous=void 0,this._head=e.next}else if(e===this._tail){if(!e.previous)throw Error(`Invalid list`);e.previous.next=void 0,this._tail=e.previous}else{let t=e.next,n=e.previous;if(!t||!n)throw Error(`Invalid list`);t.previous=n,n.next=t}e.next=void 0,e.previous=void 0,this._state++}touch(e,t){if(!this._head||!this._tail)throw Error(`Invalid list`);if(!(t!==n.First&&t!==n.Last)){if(t===n.First){if(e===this._head)return;let t=e.next,n=e.previous;e===this._tail?(n.next=void 0,this._tail=n):(t.previous=n,n.next=t),e.previous=void 0,e.next=this._head,this._head.previous=e,this._head=e,this._state++}else if(t===n.Last){if(e===this._tail)return;let t=e.next,n=e.previous;e===this._head?(t.previous=void 0,this._head=t):(t.previous=n,n.next=t),e.next=void 0,e.previous=this._tail,this._tail.next=e,this._tail=e,this._state++}}}toJSON(){let e=[];return this.forEach((t,n)=>{e.push([n,t])}),e}fromJSON(e){this.clear();for(let[t,n]of e)this.set(t,n)}};e.LinkedMap=r,e.LRUCache=class extends r{constructor(e,t=1){super(),this._limit=e,this._ratio=Math.min(Math.max(0,t),1)}get limit(){return this._limit}set limit(e){this._limit=e,this.checkTrim()}get ratio(){return this._ratio}set ratio(e){this._ratio=Math.min(Math.max(0,e),1),this.checkTrim()}get(e,t=n.AsNew){return super.get(e,t)}peek(e){return super.get(e,n.None)}set(e,t){return super.set(e,t,n.Last),this.checkTrim(),this}checkTrim(){this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))}}})),kp=e.t((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.Disposable=void 0;var t;(function(e){function t(e){return{dispose:e}}e.create=t})(t||(e.Disposable=t={}))})),Ap=e.t((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.SharedArrayReceiverStrategy=e.SharedArraySenderStrategy=void 0;var t=Tf(),n;(function(e){e.Continue=0,e.Cancelled=1})(n||={}),e.SharedArraySenderStrategy=class{constructor(){this.buffers=new Map}enableCancellation(e){if(e.id===null)return;let t=new SharedArrayBuffer(4),r=new Int32Array(t,0,1);r[0]=n.Continue,this.buffers.set(e.id,t),e.$cancellationData=t}async sendCancellation(e,t){let r=this.buffers.get(t);if(r===void 0)return;let i=new Int32Array(r,0,1);Atomics.store(i,0,n.Cancelled)}cleanup(e){this.buffers.delete(e)}dispose(){this.buffers.clear()}};var r=class{constructor(e){this.data=new Int32Array(e,0,1)}get isCancellationRequested(){return Atomics.load(this.data,0)===n.Cancelled}get onCancellationRequested(){throw Error(`Cancellation over SharedArrayBuffer doesn't support cancellation events`)}},i=class{constructor(e){this.token=new r(e)}cancel(){}dispose(){}};e.SharedArrayReceiverStrategy=class{constructor(){this.kind=`request`}createCancellationTokenSource(e){let n=e.$cancellationData;return n===void 0?new t.CancellationTokenSource:new i(n)}}})),jp=e.t((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.Semaphore=void 0;var t=Sf();e.Semaphore=class{constructor(e=1){if(e<=0)throw Error(`Capacity must be greater than 0`);this._capacity=e,this._active=0,this._waiting=[]}lock(e){return new Promise((t,n)=>{this._waiting.push({thunk:e,resolve:t,reject:n}),this.runNext()})}get active(){return this._active}runNext(){this._waiting.length===0||this._active===this._capacity||(0,t.default)().timer.setImmediate(()=>this.doRunNext())}doRunNext(){if(this._waiting.length===0||this._active===this._capacity)return;let e=this._waiting.shift();if(this._active++,this._active>this._capacity)throw Error(`To many thunks active`);try{let t=e.thunk();t instanceof Promise?t.then(t=>{this._active--,e.resolve(t),this.runNext()},t=>{this._active--,e.reject(t),this.runNext()}):(this._active--,e.resolve(t),this.runNext())}catch(t){this._active--,e.reject(t),this.runNext()}}}})),Mp=e.t((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.ReadableStreamMessageReader=e.AbstractMessageReader=e.MessageReader=void 0;var t=Sf(),n=Cf(),r=wf(),i=jp(),a;(function(e){function t(e){let t=e;return t&&n.func(t.listen)&&n.func(t.dispose)&&n.func(t.onError)&&n.func(t.onClose)&&n.func(t.onPartialMessage)}e.is=t})(a||(e.MessageReader=a={}));var o=class{constructor(){this.errorEmitter=new r.Emitter,this.closeEmitter=new r.Emitter,this.partialMessageEmitter=new r.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose()}get onError(){return this.errorEmitter.event}fireError(e){this.errorEmitter.fire(this.asError(e))}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(void 0)}get onPartialMessage(){return this.partialMessageEmitter.event}firePartialMessage(e){this.partialMessageEmitter.fire(e)}asError(e){return e instanceof Error?e:Error(`Reader received error. Reason: ${n.string(e.message)?e.message:`unknown`}`)}};e.AbstractMessageReader=o;var s;(function(e){function n(e){let n,r,i=new Map,a,o=new Map;if(e===void 0||typeof e==`string`)n=e??`utf-8`;else{if(n=e.charset??`utf-8`,e.contentDecoder!==void 0&&(r=e.contentDecoder,i.set(r.name,r)),e.contentDecoders!==void 0)for(let t of e.contentDecoders)i.set(t.name,t);if(e.contentTypeDecoder!==void 0&&(a=e.contentTypeDecoder,o.set(a.name,a)),e.contentTypeDecoders!==void 0)for(let t of e.contentTypeDecoders)o.set(t.name,t)}return a===void 0&&(a=(0,t.default)().applicationJson.decoder,o.set(a.name,a)),{charset:n,contentDecoder:r,contentDecoders:i,contentTypeDecoder:a,contentTypeDecoders:o}}e.fromOptions=n})(s||={}),e.ReadableStreamMessageReader=class extends o{constructor(e,n){super(),this.readable=e,this.options=s.fromOptions(n),this.buffer=(0,t.default)().messageBuffer.create(this.options.charset),this._partialMessageTimeout=1e4,this.nextMessageLength=-1,this.messageToken=0,this.readSemaphore=new i.Semaphore(1)}set partialMessageTimeout(e){this._partialMessageTimeout=e}get partialMessageTimeout(){return this._partialMessageTimeout}listen(e){this.nextMessageLength=-1,this.messageToken=0,this.partialMessageTimer=void 0,this.callback=e;let t=this.readable.onData(e=>{this.onData(e)});return this.readable.onError(e=>this.fireError(e)),this.readable.onClose(()=>this.fireClose()),t}onData(e){try{for(this.buffer.append(e);;){if(this.nextMessageLength===-1){let e=this.buffer.tryReadHeaders(!0);if(!e)return;let t=e.get(`content-length`);if(!t){this.fireError(Error(`Header must provide a Content-Length property.\n${JSON.stringify(Object.fromEntries(e))}`));return}let n=parseInt(t);if(isNaN(n)){this.fireError(Error(`Content-Length value must be a number. Got ${t}`));return}this.nextMessageLength=n}let e=this.buffer.tryReadBody(this.nextMessageLength);if(e===void 0){this.setPartialMessageTimer();return}this.clearPartialMessageTimer(),this.nextMessageLength=-1,this.readSemaphore.lock(async()=>{let t=this.options.contentDecoder===void 0?e:await this.options.contentDecoder.decode(e),n=await this.options.contentTypeDecoder.decode(t,this.options);this.callback(n)}).catch(e=>{this.fireError(e)})}}catch(e){this.fireError(e)}}clearPartialMessageTimer(){this.partialMessageTimer&&=(this.partialMessageTimer.dispose(),void 0)}setPartialMessageTimer(){this.clearPartialMessageTimer(),!(this._partialMessageTimeout<=0)&&(this.partialMessageTimer=(0,t.default)().timer.setTimeout((e,t)=>{this.partialMessageTimer=void 0,e===this.messageToken&&(this.firePartialMessage({messageToken:e,waitingTime:t}),this.setPartialMessageTimer())},this._partialMessageTimeout,this.messageToken,this._partialMessageTimeout))}}})),Np=e.t((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.WriteableStreamMessageWriter=e.AbstractMessageWriter=e.MessageWriter=void 0;var t=Sf(),n=Cf(),r=jp(),i=wf(),a=`Content-Length: `,o=`\r
78
- `,s;(function(e){function t(e){let t=e;return t&&n.func(t.dispose)&&n.func(t.onClose)&&n.func(t.onError)&&n.func(t.write)}e.is=t})(s||(e.MessageWriter=s={}));var c=class{constructor(){this.errorEmitter=new i.Emitter,this.closeEmitter=new i.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose()}get onError(){return this.errorEmitter.event}fireError(e,t,n){this.errorEmitter.fire([this.asError(e),t,n])}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(void 0)}asError(e){return e instanceof Error?e:Error(`Writer received error. Reason: ${n.string(e.message)?e.message:`unknown`}`)}};e.AbstractMessageWriter=c;var l;(function(e){function n(e){return e===void 0||typeof e==`string`?{charset:e??`utf-8`,contentTypeEncoder:(0,t.default)().applicationJson.encoder}:{charset:e.charset??`utf-8`,contentEncoder:e.contentEncoder,contentTypeEncoder:e.contentTypeEncoder??(0,t.default)().applicationJson.encoder}}e.fromOptions=n})(l||={}),e.WriteableStreamMessageWriter=class extends c{constructor(e,t){super(),this.writable=e,this.options=l.fromOptions(t),this.errorCount=0,this.writeSemaphore=new r.Semaphore(1),this.writable.onError(e=>this.fireError(e)),this.writable.onClose(()=>this.fireClose())}async write(e){return this.writeSemaphore.lock(async()=>this.options.contentTypeEncoder.encode(e,this.options).then(e=>this.options.contentEncoder===void 0?e:this.options.contentEncoder.encode(e)).then(t=>{let n=[];return n.push(a,t.byteLength.toString(),o),n.push(o),this.doWrite(e,n,t)},e=>{throw this.fireError(e),e}))}async doWrite(e,t,n){try{return await this.writable.write(t.join(``),`ascii`),this.writable.write(n)}catch(t){return this.handleError(t,e),Promise.reject(t)}}handleError(e,t){this.errorCount++,this.fireError(e,t,this.errorCount)}end(){this.writable.end()}}})),Pp=e.t((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.AbstractMessageBuffer=void 0;var t=13,n=10,r=`\r
79
- `;e.AbstractMessageBuffer=class{constructor(e=`utf-8`){this._encoding=e,this._chunks=[],this._totalLength=0}get encoding(){return this._encoding}append(e){let t=typeof e==`string`?this.fromString(e,this._encoding):e;this._chunks.push(t),this._totalLength+=t.byteLength}tryReadHeaders(e=!1){if(this._chunks.length===0)return;let i=0,a=0,o=0,s=0;row:for(;a<this._chunks.length;){let e=this._chunks[a];o=0;column:for(;o<e.length;){switch(e[o]){case t:switch(i){case 0:i=1;break;case 2:i=3;break;default:i=0}break;case n:switch(i){case 1:i=2;break;case 3:i=4,o++;break row;default:i=0}break;default:i=0}o++}s+=e.byteLength,a++}if(i!==4)return;let c=this._read(s+o),l=new Map,u=this.toString(c,`ascii`).split(r);if(u.length<2)return l;for(let t=0;t<u.length-2;t++){let n=u[t],r=n.indexOf(`:`);if(r===-1)throw Error(`Message header must separate key and value using ':'\n${n}`);let i=n.substr(0,r),a=n.substr(r+1).trim();l.set(e?i.toLowerCase():i,a)}return l}tryReadBody(e){if(!(this._totalLength<e))return this._read(e)}get numberOfBytes(){return this._totalLength}_read(e){if(e===0)return this.emptyBuffer();if(e>this._totalLength)throw Error(`Cannot read so many bytes!`);if(this._chunks[0].byteLength===e){let t=this._chunks[0];return this._chunks.shift(),this._totalLength-=e,this.asNative(t)}if(this._chunks[0].byteLength>e){let t=this._chunks[0],n=this.asNative(t,e);return this._chunks[0]=t.slice(e),this._totalLength-=e,n}let t=this.allocNative(e),n=0;for(;e>0;){let r=this._chunks[0];if(r.byteLength>e){let i=r.slice(0,e);t.set(i,n),n+=e,this._chunks[0]=r.slice(e),this._totalLength-=e,e-=e}else t.set(r,n),n+=r.byteLength,this._chunks.shift(),this._totalLength-=r.byteLength,e-=r.byteLength}return t}}})),Fp=e.t((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.createMessageConnection=e.ConnectionOptions=e.MessageStrategy=e.CancellationStrategy=e.CancellationSenderStrategy=e.CancellationReceiverStrategy=e.RequestCancellationReceiverStrategy=e.IdCancellationReceiverStrategy=e.ConnectionStrategy=e.ConnectionError=e.ConnectionErrors=e.LogTraceNotification=e.SetTraceNotification=e.TraceFormat=e.TraceValues=e.Trace=e.NullLogger=e.ProgressType=e.ProgressToken=void 0;var t=Sf(),n=Cf(),r=Dp(),i=Op(),a=wf(),o=Tf(),s;(function(e){e.type=new r.NotificationType(`$/cancelRequest`)})(s||={});var c;(function(e){function t(e){return typeof e==`string`||typeof e==`number`}e.is=t})(c||(e.ProgressToken=c={}));var l;(function(e){e.type=new r.NotificationType(`$/progress`)})(l||={}),e.ProgressType=class{constructor(){}};var u;(function(e){function t(e){return n.func(e)}e.is=t})(u||={}),e.NullLogger=Object.freeze({error:()=>{},warn:()=>{},info:()=>{},log:()=>{}});var d;(function(e){e[e.Off=0]=`Off`,e[e.Messages=1]=`Messages`,e[e.Compact=2]=`Compact`,e[e.Verbose=3]=`Verbose`})(d||(e.Trace=d={}));var f;(function(e){e.Off=`off`,e.Messages=`messages`,e.Compact=`compact`,e.Verbose=`verbose`})(f||(e.TraceValues=f={})),(function(e){function t(t){if(!n.string(t))return e.Off;switch(t=t.toLowerCase(),t){case`off`:return e.Off;case`messages`:return e.Messages;case`compact`:return e.Compact;case`verbose`:return e.Verbose;default:return e.Off}}e.fromString=t;function r(t){switch(t){case e.Off:return`off`;case e.Messages:return`messages`;case e.Compact:return`compact`;case e.Verbose:return`verbose`;default:return`off`}}e.toString=r})(d||(e.Trace=d={}));var p;(function(e){e.Text=`text`,e.JSON=`json`})(p||(e.TraceFormat=p={})),(function(e){function t(t){return n.string(t)?(t=t.toLowerCase(),t===`json`?e.JSON:e.Text):e.Text}e.fromString=t})(p||(e.TraceFormat=p={}));var m;(function(e){e.type=new r.NotificationType(`$/setTrace`)})(m||(e.SetTraceNotification=m={}));var h;(function(e){e.type=new r.NotificationType(`$/logTrace`)})(h||(e.LogTraceNotification=h={}));var g;(function(e){e[e.Closed=1]=`Closed`,e[e.Disposed=2]=`Disposed`,e[e.AlreadyListening=3]=`AlreadyListening`})(g||(e.ConnectionErrors=g={}));var _=class e extends Error{constructor(t,n){super(n),this.code=t,Object.setPrototypeOf(this,e.prototype)}};e.ConnectionError=_;var v;(function(e){function t(e){let t=e;return t&&n.func(t.cancelUndispatched)}e.is=t})(v||(e.ConnectionStrategy=v={}));var y;(function(e){function t(e){let t=e;return t&&(t.kind===void 0||t.kind===`id`)&&n.func(t.createCancellationTokenSource)&&(t.dispose===void 0||n.func(t.dispose))}e.is=t})(y||(e.IdCancellationReceiverStrategy=y={}));var b;(function(e){function t(e){let t=e;return t&&t.kind===`request`&&n.func(t.createCancellationTokenSource)&&(t.dispose===void 0||n.func(t.dispose))}e.is=t})(b||(e.RequestCancellationReceiverStrategy=b={}));var x;(function(e){e.Message=Object.freeze({createCancellationTokenSource(e){return new o.CancellationTokenSource}});function t(e){return y.is(e)||b.is(e)}e.is=t})(x||(e.CancellationReceiverStrategy=x={}));var S;(function(e){e.Message=Object.freeze({sendCancellation(e,t){return e.sendNotification(s.type,{id:t})},cleanup(e){}});function t(e){let t=e;return t&&n.func(t.sendCancellation)&&n.func(t.cleanup)}e.is=t})(S||(e.CancellationSenderStrategy=S={}));var C;(function(e){e.Message=Object.freeze({receiver:x.Message,sender:S.Message});function t(e){let t=e;return t&&x.is(t.receiver)&&S.is(t.sender)}e.is=t})(C||(e.CancellationStrategy=C={}));var w;(function(e){function t(e){let t=e;return t&&n.func(t.handleMessage)}e.is=t})(w||(e.MessageStrategy=w={}));var T;(function(e){function t(e){let t=e;return t&&(C.is(t.cancellationStrategy)||v.is(t.connectionStrategy)||w.is(t.messageStrategy))}e.is=t})(T||(e.ConnectionOptions=T={}));var E;(function(e){e[e.New=1]=`New`,e[e.Listening=2]=`Listening`,e[e.Closed=3]=`Closed`,e[e.Disposed=4]=`Disposed`})(E||={});function ee(f,v,b,x){let S=b===void 0?e.NullLogger:b,T=0,ee=0,te=0,D,O=new Map,k,ne=new Map,re=new Map,ie,A=new i.LinkedMap,ae=new Map,oe=new Set,j=new Map,M=d.Off,N=p.Text,P,se=E.New,ce=new a.Emitter,le=new a.Emitter,ue=new a.Emitter,de=new a.Emitter,fe=new a.Emitter,F=x&&x.cancellationStrategy?x.cancellationStrategy:C.Message;function pe(e){if(e===null)throw Error(`Can't send requests with id null since the response can't be correlated.`);return`req-`+e.toString()}function me(e){return e===null?`res-unknown-`+(++te).toString():`res-`+e.toString()}function he(){return`not-`+(++ee).toString()}function ge(e,t){r.Message.isRequest(t)?e.set(pe(t.id),t):r.Message.isResponse(t)?e.set(me(t.id),t):e.set(he(),t)}function _e(e){}function ve(){return se===E.Listening}function ye(){return se===E.Closed}function be(){return se===E.Disposed}function xe(){(se===E.New||se===E.Listening)&&(se=E.Closed,le.fire(void 0))}function Se(e){ce.fire([e,void 0,void 0])}function Ce(e){ce.fire(e)}f.onClose(xe),f.onError(Se),v.onClose(xe),v.onError(Ce);function we(){ie||A.size===0||(ie=(0,t.default)().timer.setImmediate(()=>{ie=void 0,Ee()}))}function Te(e){r.Message.isRequest(e)?Oe(e):r.Message.isNotification(e)?Ae(e):r.Message.isResponse(e)?ke(e):je(e)}function Ee(){if(A.size===0)return;let e=A.shift();try{let t=x?.messageStrategy;w.is(t)?t.handleMessage(e,Te):Te(e)}finally{we()}}let De=e=>{try{if(r.Message.isNotification(e)&&e.method===s.type.method){let t=e.params.id,n=pe(t),i=A.get(n);if(r.Message.isRequest(i)){let r=x?.connectionStrategy,a=r&&r.cancelUndispatched?r.cancelUndispatched(i,_e):void 0;if(a&&(a.error!==void 0||a.result!==void 0)){A.delete(n),j.delete(t),a.id=i.id,Pe(a,e.method,Date.now()),v.write(a).catch(()=>S.error(`Sending response for canceled message failed.`));return}}let a=j.get(t);if(a!==void 0){a.cancel(),Ie(e);return}else oe.add(t)}ge(A,e)}finally{we()}};function Oe(e){if(be())return;function t(t,n,i){let a={jsonrpc:`2.0`,id:e.id};t instanceof r.ResponseError?a.error=t.toJson():a.result=t===void 0?null:t,Pe(a,n,i),v.write(a).catch(()=>S.error(`Sending response failed.`))}function i(t,n,r){let i={jsonrpc:`2.0`,id:e.id,error:t.toJson()};Pe(i,n,r),v.write(i).catch(()=>S.error(`Sending response failed.`))}function a(t,n,r){t===void 0&&(t=null);let i={jsonrpc:`2.0`,id:e.id,result:t};Pe(i,n,r),v.write(i).catch(()=>S.error(`Sending response failed.`))}Fe(e);let o=O.get(e.method),s,c;o&&(s=o.type,c=o.handler);let l=Date.now();if(c||D){let o=e.id??String(Date.now()),u=y.is(F.receiver)?F.receiver.createCancellationTokenSource(o):F.receiver.createCancellationTokenSource(e);e.id!==null&&oe.has(e.id)&&u.cancel(),e.id!==null&&j.set(o,u);try{let d;if(c)if(e.params===void 0){if(s!==void 0&&s.numberOfParams!==0){i(new r.ResponseError(r.ErrorCodes.InvalidParams,`Request ${e.method} defines ${s.numberOfParams} params but received none.`),e.method,l);return}d=c(u.token)}else if(Array.isArray(e.params)){if(s!==void 0&&s.parameterStructures===r.ParameterStructures.byName){i(new r.ResponseError(r.ErrorCodes.InvalidParams,`Request ${e.method} defines parameters by name but received parameters by position`),e.method,l);return}d=c(...e.params,u.token)}else{if(s!==void 0&&s.parameterStructures===r.ParameterStructures.byPosition){i(new r.ResponseError(r.ErrorCodes.InvalidParams,`Request ${e.method} defines parameters by position but received parameters by name`),e.method,l);return}d=c(e.params,u.token)}else D&&(d=D(e.method,e.params,u.token));let f=d;d?f.then?f.then(n=>{j.delete(o),t(n,e.method,l)},t=>{j.delete(o),t instanceof r.ResponseError?i(t,e.method,l):t&&n.string(t.message)?i(new r.ResponseError(r.ErrorCodes.InternalError,`Request ${e.method} failed with message: ${t.message}`),e.method,l):i(new r.ResponseError(r.ErrorCodes.InternalError,`Request ${e.method} failed unexpectedly without providing any details.`),e.method,l)}):(j.delete(o),t(d,e.method,l)):(j.delete(o),a(d,e.method,l))}catch(a){j.delete(o),a instanceof r.ResponseError?t(a,e.method,l):a&&n.string(a.message)?i(new r.ResponseError(r.ErrorCodes.InternalError,`Request ${e.method} failed with message: ${a.message}`),e.method,l):i(new r.ResponseError(r.ErrorCodes.InternalError,`Request ${e.method} failed unexpectedly without providing any details.`),e.method,l)}}else i(new r.ResponseError(r.ErrorCodes.MethodNotFound,`Unhandled method ${e.method}`),e.method,l)}function ke(e){if(!be())if(e.id===null)e.error?S.error(`Received response message without id: Error is: \n${JSON.stringify(e.error,void 0,4)}`):S.error(`Received response message without id. No further error information provided.`);else{let t=e.id,n=ae.get(t);if(Le(e,n),n!==void 0){ae.delete(t);try{if(e.error){let t=e.error;n.reject(new r.ResponseError(t.code,t.message,t.data))}else if(e.result!==void 0)n.resolve(e.result);else throw Error(`Should never happen.`)}catch(e){e.message?S.error(`Response handler '${n.method}' failed with message: ${e.message}`):S.error(`Response handler '${n.method}' failed unexpectedly.`)}}}}function Ae(e){if(be())return;let t,n;if(e.method===s.type.method){let t=e.params.id;oe.delete(t),Ie(e);return}else{let r=ne.get(e.method);r&&(n=r.handler,t=r.type)}if(n||k)try{if(Ie(e),n)if(e.params===void 0)t!==void 0&&t.numberOfParams!==0&&t.parameterStructures!==r.ParameterStructures.byName&&S.error(`Notification ${e.method} defines ${t.numberOfParams} params but received none.`),n();else if(Array.isArray(e.params)){let i=e.params;e.method===l.type.method&&i.length===2&&c.is(i[0])?n({token:i[0],value:i[1]}):(t!==void 0&&(t.parameterStructures===r.ParameterStructures.byName&&S.error(`Notification ${e.method} defines parameters by name but received parameters by position`),t.numberOfParams!==e.params.length&&S.error(`Notification ${e.method} defines ${t.numberOfParams} params but received ${i.length} arguments`)),n(...i))}else t!==void 0&&t.parameterStructures===r.ParameterStructures.byPosition&&S.error(`Notification ${e.method} defines parameters by position but received parameters by name`),n(e.params);else k&&k(e.method,e.params)}catch(t){t.message?S.error(`Notification handler '${e.method}' failed with message: ${t.message}`):S.error(`Notification handler '${e.method}' failed unexpectedly.`)}else ue.fire(e)}function je(e){if(!e){S.error(`Received empty message.`);return}S.error(`Received message which is neither a response nor a notification message:\n${JSON.stringify(e,null,4)}`);let t=e;if(n.string(t.id)||n.number(t.id)){let e=t.id,n=ae.get(e);n&&n.reject(Error(`The received response has neither a result nor an error property.`))}}function I(e){if(e!=null)switch(M){case d.Verbose:return JSON.stringify(e,null,4);case d.Compact:return JSON.stringify(e);default:return}}function Me(e){if(!(M===d.Off||!P))if(N===p.Text){let t;(M===d.Verbose||M===d.Compact)&&e.params&&(t=`Params: ${I(e.params)}\n\n`),P.log(`Sending request '${e.method} - (${e.id})'.`,t)}else Re(`send-request`,e)}function Ne(e){if(!(M===d.Off||!P))if(N===p.Text){let t;(M===d.Verbose||M===d.Compact)&&(t=e.params?`Params: ${I(e.params)}\n\n`:`No parameters provided.
80
-
81
- `),P.log(`Sending notification '${e.method}'.`,t)}else Re(`send-notification`,e)}function Pe(e,t,n){if(!(M===d.Off||!P))if(N===p.Text){let r;(M===d.Verbose||M===d.Compact)&&(e.error&&e.error.data?r=`Error data: ${I(e.error.data)}\n\n`:e.result?r=`Result: ${I(e.result)}\n\n`:e.error===void 0&&(r=`No result returned.
82
-
83
- `)),P.log(`Sending response '${t} - (${e.id})'. Processing request took ${Date.now()-n}ms`,r)}else Re(`send-response`,e)}function Fe(e){if(!(M===d.Off||!P))if(N===p.Text){let t;(M===d.Verbose||M===d.Compact)&&e.params&&(t=`Params: ${I(e.params)}\n\n`),P.log(`Received request '${e.method} - (${e.id})'.`,t)}else Re(`receive-request`,e)}function Ie(e){if(!(M===d.Off||!P||e.method===h.type.method))if(N===p.Text){let t;(M===d.Verbose||M===d.Compact)&&(t=e.params?`Params: ${I(e.params)}\n\n`:`No parameters provided.
84
-
85
- `),P.log(`Received notification '${e.method}'.`,t)}else Re(`receive-notification`,e)}function Le(e,t){if(!(M===d.Off||!P))if(N===p.Text){let n;if((M===d.Verbose||M===d.Compact)&&(e.error&&e.error.data?n=`Error data: ${I(e.error.data)}\n\n`:e.result?n=`Result: ${I(e.result)}\n\n`:e.error===void 0&&(n=`No result returned.
86
-
87
- `)),t){let r=e.error?` Request failed: ${e.error.message} (${e.error.code}).`:``;P.log(`Received response '${t.method} - (${e.id})' in ${Date.now()-t.timerStart}ms.${r}`,n)}else P.log(`Received response ${e.id} without active response promise.`,n)}else Re(`receive-response`,e)}function Re(e,t){if(!P||M===d.Off)return;let n={isLSPMessage:!0,type:e,message:t,timestamp:Date.now()};P.log(n)}function ze(){if(ye())throw new _(g.Closed,`Connection is closed.`);if(be())throw new _(g.Disposed,`Connection is disposed.`)}function Be(){if(ve())throw new _(g.AlreadyListening,`Connection is already listening`)}function Ve(){if(!ve())throw Error(`Call listen() first.`)}function He(e){return e===void 0?null:e}function Ue(e){if(e!==null)return e}function We(e){return e!=null&&!Array.isArray(e)&&typeof e==`object`}function Ge(e,t){switch(e){case r.ParameterStructures.auto:return We(t)?Ue(t):[He(t)];case r.ParameterStructures.byName:if(!We(t))throw Error(`Received parameters by name but param is not an object literal.`);return Ue(t);case r.ParameterStructures.byPosition:return[He(t)];default:throw Error(`Unknown parameter structure ${e.toString()}`)}}function Ke(e,t){let n,r=e.numberOfParams;switch(r){case 0:n=void 0;break;case 1:n=Ge(e.parameterStructures,t[0]);break;default:n=[];for(let e=0;e<t.length&&e<r;e++)n.push(He(t[e]));if(t.length<r)for(let e=t.length;e<r;e++)n.push(null);break}return n}let qe={sendNotification:(e,...t)=>{ze();let i,a;if(n.string(e)){i=e;let n=t[0],o=0,s=r.ParameterStructures.auto;r.ParameterStructures.is(n)&&(o=1,s=n);let c=t.length,l=c-o;switch(l){case 0:a=void 0;break;case 1:a=Ge(s,t[o]);break;default:if(s===r.ParameterStructures.byName)throw Error(`Received ${l} parameters for 'by Name' notification parameter structure.`);a=t.slice(o,c).map(e=>He(e));break}}else{let n=t;i=e.method,a=Ke(e,n)}let o={jsonrpc:`2.0`,method:i,params:a};return Ne(o),v.write(o).catch(e=>{throw S.error(`Sending notification failed.`),e})},onNotification:(e,t)=>{ze();let r;return n.func(e)?k=e:t&&(n.string(e)?(r=e,ne.set(e,{type:void 0,handler:t})):(r=e.method,ne.set(e.method,{type:e,handler:t}))),{dispose:()=>{r===void 0?k=void 0:ne.delete(r)}}},onProgress:(e,t,n)=>{if(re.has(t))throw Error(`Progress handler for token ${t} already registered`);return re.set(t,n),{dispose:()=>{re.delete(t)}}},sendProgress:(e,t,n)=>qe.sendNotification(l.type,{token:t,value:n}),onUnhandledProgress:de.event,sendRequest:(e,...t)=>{ze(),Ve();let i,a,s;if(n.string(e)){i=e;let n=t[0],c=t[t.length-1],l=0,u=r.ParameterStructures.auto;r.ParameterStructures.is(n)&&(l=1,u=n);let d=t.length;o.CancellationToken.is(c)&&(--d,s=c);let f=d-l;switch(f){case 0:a=void 0;break;case 1:a=Ge(u,t[l]);break;default:if(u===r.ParameterStructures.byName)throw Error(`Received ${f} parameters for 'by Name' request parameter structure.`);a=t.slice(l,d).map(e=>He(e));break}}else{let n=t;i=e.method,a=Ke(e,n);let r=e.numberOfParams;s=o.CancellationToken.is(n[r])?n[r]:void 0}let c=T++,l;s&&(l=s.onCancellationRequested(()=>{let e=F.sender.sendCancellation(qe,c);return e===void 0?(S.log(`Received no promise from cancellation strategy when cancelling id ${c}`),Promise.resolve()):e.catch(()=>{S.log(`Sending cancellation messages for id ${c} failed`)})}));let u={jsonrpc:`2.0`,id:c,method:i,params:a};return Me(u),typeof F.sender.enableCancellation==`function`&&F.sender.enableCancellation(u),new Promise(async(e,t)=>{let n={method:i,timerStart:Date.now(),resolve:t=>{e(t),F.sender.cleanup(c),l?.dispose()},reject:e=>{t(e),F.sender.cleanup(c),l?.dispose()}};try{await v.write(u),ae.set(c,n)}catch(e){throw S.error(`Sending request failed.`),n.reject(new r.ResponseError(r.ErrorCodes.MessageWriteError,e.message?e.message:`Unknown reason`)),e}})},onRequest:(e,t)=>{ze();let r=null;return u.is(e)?(r=void 0,D=e):n.string(e)?(r=null,t!==void 0&&(r=e,O.set(e,{handler:t,type:void 0}))):t!==void 0&&(r=e.method,O.set(e.method,{type:e,handler:t})),{dispose:()=>{r!==null&&(r===void 0?D=void 0:O.delete(r))}}},hasPendingResponse:()=>ae.size>0,trace:async(e,t,r)=>{let i=!1,a=p.Text;r!==void 0&&(n.boolean(r)?i=r:(i=r.sendNotification||!1,a=r.traceFormat||p.Text)),M=e,N=a,P=M===d.Off?void 0:t,i&&!ye()&&!be()&&await qe.sendNotification(m.type,{value:d.toString(e)})},onError:ce.event,onClose:le.event,onUnhandledNotification:ue.event,onDispose:fe.event,end:()=>{v.end()},dispose:()=>{if(be())return;se=E.Disposed,fe.fire(void 0);let e=new r.ResponseError(r.ErrorCodes.PendingResponseRejected,`Pending response rejected since connection got disposed`);for(let t of ae.values())t.reject(e);ae=new Map,j=new Map,oe=new Set,A=new i.LinkedMap,n.func(v.dispose)&&v.dispose(),n.func(f.dispose)&&f.dispose()},listen:()=>{ze(),Be(),se=E.Listening,f.listen(De)},inspect:()=>{(0,t.default)().console.log(`inspect`)}};return qe.onNotification(h.type,e=>{if(M===d.Off||!P)return;let t=M===d.Verbose||M===d.Compact;P.log(e.message,t?e.verbose:void 0)}),qe.onNotification(l.type,e=>{let t=re.get(e.token);t?t(e.value):de.fire(e)}),qe}e.createMessageConnection=ee})),Ip=e.t((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.ProgressType=e.ProgressToken=e.createMessageConnection=e.NullLogger=e.ConnectionOptions=e.ConnectionStrategy=e.AbstractMessageBuffer=e.WriteableStreamMessageWriter=e.AbstractMessageWriter=e.MessageWriter=e.ReadableStreamMessageReader=e.AbstractMessageReader=e.MessageReader=e.SharedArrayReceiverStrategy=e.SharedArraySenderStrategy=e.CancellationToken=e.CancellationTokenSource=e.Emitter=e.Event=e.Disposable=e.LRUCache=e.Touch=e.LinkedMap=e.ParameterStructures=e.NotificationType9=e.NotificationType8=e.NotificationType7=e.NotificationType6=e.NotificationType5=e.NotificationType4=e.NotificationType3=e.NotificationType2=e.NotificationType1=e.NotificationType0=e.NotificationType=e.ErrorCodes=e.ResponseError=e.RequestType9=e.RequestType8=e.RequestType7=e.RequestType6=e.RequestType5=e.RequestType4=e.RequestType3=e.RequestType2=e.RequestType1=e.RequestType0=e.RequestType=e.Message=e.RAL=void 0,e.MessageStrategy=e.CancellationStrategy=e.CancellationSenderStrategy=e.CancellationReceiverStrategy=e.ConnectionError=e.ConnectionErrors=e.LogTraceNotification=e.SetTraceNotification=e.TraceFormat=e.TraceValues=e.Trace=void 0;var t=Dp();Object.defineProperty(e,`Message`,{enumerable:!0,get:function(){return t.Message}}),Object.defineProperty(e,`RequestType`,{enumerable:!0,get:function(){return t.RequestType}}),Object.defineProperty(e,`RequestType0`,{enumerable:!0,get:function(){return t.RequestType0}}),Object.defineProperty(e,`RequestType1`,{enumerable:!0,get:function(){return t.RequestType1}}),Object.defineProperty(e,`RequestType2`,{enumerable:!0,get:function(){return t.RequestType2}}),Object.defineProperty(e,`RequestType3`,{enumerable:!0,get:function(){return t.RequestType3}}),Object.defineProperty(e,`RequestType4`,{enumerable:!0,get:function(){return t.RequestType4}}),Object.defineProperty(e,`RequestType5`,{enumerable:!0,get:function(){return t.RequestType5}}),Object.defineProperty(e,`RequestType6`,{enumerable:!0,get:function(){return t.RequestType6}}),Object.defineProperty(e,`RequestType7`,{enumerable:!0,get:function(){return t.RequestType7}}),Object.defineProperty(e,`RequestType8`,{enumerable:!0,get:function(){return t.RequestType8}}),Object.defineProperty(e,`RequestType9`,{enumerable:!0,get:function(){return t.RequestType9}}),Object.defineProperty(e,`ResponseError`,{enumerable:!0,get:function(){return t.ResponseError}}),Object.defineProperty(e,`ErrorCodes`,{enumerable:!0,get:function(){return t.ErrorCodes}}),Object.defineProperty(e,`NotificationType`,{enumerable:!0,get:function(){return t.NotificationType}}),Object.defineProperty(e,`NotificationType0`,{enumerable:!0,get:function(){return t.NotificationType0}}),Object.defineProperty(e,`NotificationType1`,{enumerable:!0,get:function(){return t.NotificationType1}}),Object.defineProperty(e,`NotificationType2`,{enumerable:!0,get:function(){return t.NotificationType2}}),Object.defineProperty(e,`NotificationType3`,{enumerable:!0,get:function(){return t.NotificationType3}}),Object.defineProperty(e,`NotificationType4`,{enumerable:!0,get:function(){return t.NotificationType4}}),Object.defineProperty(e,`NotificationType5`,{enumerable:!0,get:function(){return t.NotificationType5}}),Object.defineProperty(e,`NotificationType6`,{enumerable:!0,get:function(){return t.NotificationType6}}),Object.defineProperty(e,`NotificationType7`,{enumerable:!0,get:function(){return t.NotificationType7}}),Object.defineProperty(e,`NotificationType8`,{enumerable:!0,get:function(){return t.NotificationType8}}),Object.defineProperty(e,`NotificationType9`,{enumerable:!0,get:function(){return t.NotificationType9}}),Object.defineProperty(e,`ParameterStructures`,{enumerable:!0,get:function(){return t.ParameterStructures}});var n=Op();Object.defineProperty(e,`LinkedMap`,{enumerable:!0,get:function(){return n.LinkedMap}}),Object.defineProperty(e,`LRUCache`,{enumerable:!0,get:function(){return n.LRUCache}}),Object.defineProperty(e,`Touch`,{enumerable:!0,get:function(){return n.Touch}});var r=kp();Object.defineProperty(e,`Disposable`,{enumerable:!0,get:function(){return r.Disposable}});var i=wf();Object.defineProperty(e,`Event`,{enumerable:!0,get:function(){return i.Event}}),Object.defineProperty(e,`Emitter`,{enumerable:!0,get:function(){return i.Emitter}});var a=Tf();Object.defineProperty(e,`CancellationTokenSource`,{enumerable:!0,get:function(){return a.CancellationTokenSource}}),Object.defineProperty(e,`CancellationToken`,{enumerable:!0,get:function(){return a.CancellationToken}});var o=Ap();Object.defineProperty(e,`SharedArraySenderStrategy`,{enumerable:!0,get:function(){return o.SharedArraySenderStrategy}}),Object.defineProperty(e,`SharedArrayReceiverStrategy`,{enumerable:!0,get:function(){return o.SharedArrayReceiverStrategy}});var s=Mp();Object.defineProperty(e,`MessageReader`,{enumerable:!0,get:function(){return s.MessageReader}}),Object.defineProperty(e,`AbstractMessageReader`,{enumerable:!0,get:function(){return s.AbstractMessageReader}}),Object.defineProperty(e,`ReadableStreamMessageReader`,{enumerable:!0,get:function(){return s.ReadableStreamMessageReader}});var c=Np();Object.defineProperty(e,`MessageWriter`,{enumerable:!0,get:function(){return c.MessageWriter}}),Object.defineProperty(e,`AbstractMessageWriter`,{enumerable:!0,get:function(){return c.AbstractMessageWriter}}),Object.defineProperty(e,`WriteableStreamMessageWriter`,{enumerable:!0,get:function(){return c.WriteableStreamMessageWriter}});var l=Pp();Object.defineProperty(e,`AbstractMessageBuffer`,{enumerable:!0,get:function(){return l.AbstractMessageBuffer}});var u=Fp();Object.defineProperty(e,`ConnectionStrategy`,{enumerable:!0,get:function(){return u.ConnectionStrategy}}),Object.defineProperty(e,`ConnectionOptions`,{enumerable:!0,get:function(){return u.ConnectionOptions}}),Object.defineProperty(e,`NullLogger`,{enumerable:!0,get:function(){return u.NullLogger}}),Object.defineProperty(e,`createMessageConnection`,{enumerable:!0,get:function(){return u.createMessageConnection}}),Object.defineProperty(e,`ProgressToken`,{enumerable:!0,get:function(){return u.ProgressToken}}),Object.defineProperty(e,`ProgressType`,{enumerable:!0,get:function(){return u.ProgressType}}),Object.defineProperty(e,`Trace`,{enumerable:!0,get:function(){return u.Trace}}),Object.defineProperty(e,`TraceValues`,{enumerable:!0,get:function(){return u.TraceValues}}),Object.defineProperty(e,`TraceFormat`,{enumerable:!0,get:function(){return u.TraceFormat}}),Object.defineProperty(e,`SetTraceNotification`,{enumerable:!0,get:function(){return u.SetTraceNotification}}),Object.defineProperty(e,`LogTraceNotification`,{enumerable:!0,get:function(){return u.LogTraceNotification}}),Object.defineProperty(e,`ConnectionErrors`,{enumerable:!0,get:function(){return u.ConnectionErrors}}),Object.defineProperty(e,`ConnectionError`,{enumerable:!0,get:function(){return u.ConnectionError}}),Object.defineProperty(e,`CancellationReceiverStrategy`,{enumerable:!0,get:function(){return u.CancellationReceiverStrategy}}),Object.defineProperty(e,`CancellationSenderStrategy`,{enumerable:!0,get:function(){return u.CancellationSenderStrategy}}),Object.defineProperty(e,`CancellationStrategy`,{enumerable:!0,get:function(){return u.CancellationStrategy}}),Object.defineProperty(e,`MessageStrategy`,{enumerable:!0,get:function(){return u.MessageStrategy}}),e.RAL=Sf().default})),Lp=e.t((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=Ip(),n=class e extends t.AbstractMessageBuffer{constructor(e=`utf-8`){super(e),this.asciiDecoder=new TextDecoder(`ascii`)}emptyBuffer(){return e.emptyBuffer}fromString(e,t){return new TextEncoder().encode(e)}toString(e,t){return t===`ascii`?this.asciiDecoder.decode(e):new TextDecoder(t).decode(e)}asNative(e,t){return t===void 0?e:e.slice(0,t)}allocNative(e){return new Uint8Array(e)}};n.emptyBuffer=new Uint8Array;var r=class{constructor(e){this.socket=e,this._onData=new t.Emitter,this._messageListener=e=>{e.data.arrayBuffer().then(e=>{this._onData.fire(new Uint8Array(e))},()=>{(0,t.RAL)().console.error(`Converting blob to array buffer failed.`)})},this.socket.addEventListener(`message`,this._messageListener)}onClose(e){return this.socket.addEventListener(`close`,e),t.Disposable.create(()=>this.socket.removeEventListener(`close`,e))}onError(e){return this.socket.addEventListener(`error`,e),t.Disposable.create(()=>this.socket.removeEventListener(`error`,e))}onEnd(e){return this.socket.addEventListener(`end`,e),t.Disposable.create(()=>this.socket.removeEventListener(`end`,e))}onData(e){return this._onData.event(e)}},i=class{constructor(e){this.socket=e}onClose(e){return this.socket.addEventListener(`close`,e),t.Disposable.create(()=>this.socket.removeEventListener(`close`,e))}onError(e){return this.socket.addEventListener(`error`,e),t.Disposable.create(()=>this.socket.removeEventListener(`error`,e))}onEnd(e){return this.socket.addEventListener(`end`,e),t.Disposable.create(()=>this.socket.removeEventListener(`end`,e))}write(e,t){if(typeof e==`string`){if(t!==void 0&&t!==`utf-8`)throw Error(`In a Browser environments only utf-8 text encoding is supported. But got encoding: ${t}`);this.socket.send(e)}else this.socket.send(e);return Promise.resolve()}end(){this.socket.close()}},a=new TextEncoder,o=Object.freeze({messageBuffer:Object.freeze({create:e=>new n(e)}),applicationJson:Object.freeze({encoder:Object.freeze({name:`application/json`,encode:(e,t)=>{if(t.charset!==`utf-8`)throw Error(`In a Browser environments only utf-8 text encoding is supported. But got encoding: ${t.charset}`);return Promise.resolve(a.encode(JSON.stringify(e,void 0,0)))}}),decoder:Object.freeze({name:`application/json`,decode:(e,t)=>{if(!(e instanceof Uint8Array))throw Error(`In a Browser environments only Uint8Arrays are supported.`);return Promise.resolve(JSON.parse(new TextDecoder(t.charset).decode(e)))}})}),stream:Object.freeze({asReadableStream:e=>new r(e),asWritableStream:e=>new i(e)}),console,timer:Object.freeze({setTimeout(e,t,...n){let r=setTimeout(e,t,...n);return{dispose:()=>clearTimeout(r)}},setImmediate(e,...t){let n=setTimeout(e,0,...t);return{dispose:()=>clearTimeout(n)}},setInterval(e,t,...n){let r=setInterval(e,t,...n);return{dispose:()=>clearInterval(r)}}})});function s(){return o}(function(e){function n(){t.RAL.install(o)}e.install=n})(s||={}),e.default=s})),Rp=e.t((e=>{var t=e&&e.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||(`get`in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),n=e&&e.__exportStar||function(e,n){for(var r in e)r!==`default`&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,`__esModule`,{value:!0}),e.createMessageConnection=e.BrowserMessageWriter=e.BrowserMessageReader=void 0,Lp().default.install();var r=Ip();n(Ip(),e),e.BrowserMessageReader=class extends r.AbstractMessageReader{constructor(e){super(),this._onData=new r.Emitter,this._messageListener=e=>{this._onData.fire(e.data)},e.addEventListener(`error`,e=>this.fireError(e)),e.onmessage=this._messageListener}listen(e){return this._onData.event(e)}},e.BrowserMessageWriter=class extends r.AbstractMessageWriter{constructor(e){super(),this.port=e,this.errorCount=0,e.addEventListener(`error`,e=>this.fireError(e))}write(e){try{return this.port.postMessage(e),Promise.resolve()}catch(t){return this.handleError(t,e),Promise.reject(t)}}handleError(e,t){this.errorCount++,this.fireError(e,t,this.errorCount)}end(){}};function i(e,t,n,i){return n===void 0&&(n=r.NullLogger),r.ConnectionStrategy.is(i)&&(i={connectionStrategy:i}),(0,r.createMessageConnection)(e,t,n,i)}e.createMessageConnection=i})),zp=e.t(((e,t)=>{t.exports=Rp()})),Q=e.t((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.ProtocolNotificationType=e.ProtocolNotificationType0=e.ProtocolRequestType=e.ProtocolRequestType0=e.RegistrationType=e.MessageDirection=void 0;var t=Rp(),n;(function(e){e.clientToServer=`clientToServer`,e.serverToClient=`serverToClient`,e.both=`both`})(n||(e.MessageDirection=n={})),e.RegistrationType=class{constructor(e){this.method=e}},e.ProtocolRequestType0=class extends t.RequestType0{constructor(e){super(e)}},e.ProtocolRequestType=class extends t.RequestType{constructor(e){super(e,t.ParameterStructures.byName)}},e.ProtocolNotificationType0=class extends t.NotificationType0{constructor(e){super(e)}},e.ProtocolNotificationType=class extends t.NotificationType{constructor(e){super(e,t.ParameterStructures.byName)}}})),Bp=e.t((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.objectLiteral=e.typedArray=e.stringArray=e.array=e.func=e.error=e.number=e.string=e.boolean=void 0;function t(e){return e===!0||e===!1}e.boolean=t;function n(e){return typeof e==`string`||e instanceof String}e.string=n;function r(e){return typeof e==`number`||e instanceof Number}e.number=r;function i(e){return e instanceof Error}e.error=i;function a(e){return typeof e==`function`}e.func=a;function o(e){return Array.isArray(e)}e.array=o;function s(e){return o(e)&&e.every(e=>n(e))}e.stringArray=s;function c(e,t){return Array.isArray(e)&&e.every(t)}e.typedArray=c;function l(e){return typeof e==`object`&&!!e}e.objectLiteral=l})),Vp=e.t((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.ImplementationRequest=void 0;var t=Q(),n;(function(e){e.method=`textDocument/implementation`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(n||(e.ImplementationRequest=n={}))})),Hp=e.t((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.TypeDefinitionRequest=void 0;var t=Q(),n;(function(e){e.method=`textDocument/typeDefinition`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(n||(e.TypeDefinitionRequest=n={}))})),Up=e.t((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.DidChangeWorkspaceFoldersNotification=e.WorkspaceFoldersRequest=void 0;var t=Q(),n;(function(e){e.method=`workspace/workspaceFolders`,e.messageDirection=t.MessageDirection.serverToClient,e.type=new t.ProtocolRequestType0(e.method)})(n||(e.WorkspaceFoldersRequest=n={}));var r;(function(e){e.method=`workspace/didChangeWorkspaceFolders`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolNotificationType(e.method)})(r||(e.DidChangeWorkspaceFoldersNotification=r={}))})),Wp=e.t((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.ConfigurationRequest=void 0;var t=Q(),n;(function(e){e.method=`workspace/configuration`,e.messageDirection=t.MessageDirection.serverToClient,e.type=new t.ProtocolRequestType(e.method)})(n||(e.ConfigurationRequest=n={}))})),Gp=e.t((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.ColorPresentationRequest=e.DocumentColorRequest=void 0;var t=Q(),n;(function(e){e.method=`textDocument/documentColor`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(n||(e.DocumentColorRequest=n={}));var r;(function(e){e.method=`textDocument/colorPresentation`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(r||(e.ColorPresentationRequest=r={}))})),Kp=e.t((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.FoldingRangeRefreshRequest=e.FoldingRangeRequest=void 0;var t=Q(),n;(function(e){e.method=`textDocument/foldingRange`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(n||(e.FoldingRangeRequest=n={}));var r;(function(e){e.method=`workspace/foldingRange/refresh`,e.messageDirection=t.MessageDirection.serverToClient,e.type=new t.ProtocolRequestType0(e.method)})(r||(e.FoldingRangeRefreshRequest=r={}))})),qp=e.t((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.DeclarationRequest=void 0;var t=Q(),n;(function(e){e.method=`textDocument/declaration`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(n||(e.DeclarationRequest=n={}))})),Jp=e.t((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.SelectionRangeRequest=void 0;var t=Q(),n;(function(e){e.method=`textDocument/selectionRange`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(n||(e.SelectionRangeRequest=n={}))})),Yp=e.t((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.WorkDoneProgressCancelNotification=e.WorkDoneProgressCreateRequest=e.WorkDoneProgress=void 0;var t=Rp(),n=Q(),r;(function(e){e.type=new t.ProgressType;function n(t){return t===e.type}e.is=n})(r||(e.WorkDoneProgress=r={}));var i;(function(e){e.method=`window/workDoneProgress/create`,e.messageDirection=n.MessageDirection.serverToClient,e.type=new n.ProtocolRequestType(e.method)})(i||(e.WorkDoneProgressCreateRequest=i={}));var a;(function(e){e.method=`window/workDoneProgress/cancel`,e.messageDirection=n.MessageDirection.clientToServer,e.type=new n.ProtocolNotificationType(e.method)})(a||(e.WorkDoneProgressCancelNotification=a={}))})),Xp=e.t((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.CallHierarchyOutgoingCallsRequest=e.CallHierarchyIncomingCallsRequest=e.CallHierarchyPrepareRequest=void 0;var t=Q(),n;(function(e){e.method=`textDocument/prepareCallHierarchy`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(n||(e.CallHierarchyPrepareRequest=n={}));var r;(function(e){e.method=`callHierarchy/incomingCalls`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(r||(e.CallHierarchyIncomingCallsRequest=r={}));var i;(function(e){e.method=`callHierarchy/outgoingCalls`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(i||(e.CallHierarchyOutgoingCallsRequest=i={}))})),Zp=e.t((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.SemanticTokensRefreshRequest=e.SemanticTokensRangeRequest=e.SemanticTokensDeltaRequest=e.SemanticTokensRequest=e.SemanticTokensRegistrationType=e.TokenFormat=void 0;var t=Q(),n;(function(e){e.Relative=`relative`})(n||(e.TokenFormat=n={}));var r;(function(e){e.method=`textDocument/semanticTokens`,e.type=new t.RegistrationType(e.method)})(r||(e.SemanticTokensRegistrationType=r={}));var i;(function(e){e.method=`textDocument/semanticTokens/full`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method),e.registrationMethod=r.method})(i||(e.SemanticTokensRequest=i={}));var a;(function(e){e.method=`textDocument/semanticTokens/full/delta`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method),e.registrationMethod=r.method})(a||(e.SemanticTokensDeltaRequest=a={}));var o;(function(e){e.method=`textDocument/semanticTokens/range`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method),e.registrationMethod=r.method})(o||(e.SemanticTokensRangeRequest=o={}));var s;(function(e){e.method=`workspace/semanticTokens/refresh`,e.messageDirection=t.MessageDirection.serverToClient,e.type=new t.ProtocolRequestType0(e.method)})(s||(e.SemanticTokensRefreshRequest=s={}))})),Qp=e.t((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.ShowDocumentRequest=void 0;var t=Q(),n;(function(e){e.method=`window/showDocument`,e.messageDirection=t.MessageDirection.serverToClient,e.type=new t.ProtocolRequestType(e.method)})(n||(e.ShowDocumentRequest=n={}))})),$p=e.t((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.LinkedEditingRangeRequest=void 0;var t=Q(),n;(function(e){e.method=`textDocument/linkedEditingRange`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(n||(e.LinkedEditingRangeRequest=n={}))})),em=e.t((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.WillDeleteFilesRequest=e.DidDeleteFilesNotification=e.DidRenameFilesNotification=e.WillRenameFilesRequest=e.DidCreateFilesNotification=e.WillCreateFilesRequest=e.FileOperationPatternKind=void 0;var t=Q(),n;(function(e){e.file=`file`,e.folder=`folder`})(n||(e.FileOperationPatternKind=n={}));var r;(function(e){e.method=`workspace/willCreateFiles`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(r||(e.WillCreateFilesRequest=r={}));var i;(function(e){e.method=`workspace/didCreateFiles`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolNotificationType(e.method)})(i||(e.DidCreateFilesNotification=i={}));var a;(function(e){e.method=`workspace/willRenameFiles`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(a||(e.WillRenameFilesRequest=a={}));var o;(function(e){e.method=`workspace/didRenameFiles`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolNotificationType(e.method)})(o||(e.DidRenameFilesNotification=o={}));var s;(function(e){e.method=`workspace/didDeleteFiles`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolNotificationType(e.method)})(s||(e.DidDeleteFilesNotification=s={}));var c;(function(e){e.method=`workspace/willDeleteFiles`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(c||(e.WillDeleteFilesRequest=c={}))})),tm=e.t((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.MonikerRequest=e.MonikerKind=e.UniquenessLevel=void 0;var t=Q(),n;(function(e){e.document=`document`,e.project=`project`,e.group=`group`,e.scheme=`scheme`,e.global=`global`})(n||(e.UniquenessLevel=n={}));var r;(function(e){e.$import=`import`,e.$export=`export`,e.local=`local`})(r||(e.MonikerKind=r={}));var i;(function(e){e.method=`textDocument/moniker`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(i||(e.MonikerRequest=i={}))})),nm=e.t((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.TypeHierarchySubtypesRequest=e.TypeHierarchySupertypesRequest=e.TypeHierarchyPrepareRequest=void 0;var t=Q(),n;(function(e){e.method=`textDocument/prepareTypeHierarchy`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(n||(e.TypeHierarchyPrepareRequest=n={}));var r;(function(e){e.method=`typeHierarchy/supertypes`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(r||(e.TypeHierarchySupertypesRequest=r={}));var i;(function(e){e.method=`typeHierarchy/subtypes`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(i||(e.TypeHierarchySubtypesRequest=i={}))})),rm=e.t((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.InlineValueRefreshRequest=e.InlineValueRequest=void 0;var t=Q(),n;(function(e){e.method=`textDocument/inlineValue`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(n||(e.InlineValueRequest=n={}));var r;(function(e){e.method=`workspace/inlineValue/refresh`,e.messageDirection=t.MessageDirection.serverToClient,e.type=new t.ProtocolRequestType0(e.method)})(r||(e.InlineValueRefreshRequest=r={}))})),im=e.t((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.InlayHintRefreshRequest=e.InlayHintResolveRequest=e.InlayHintRequest=void 0;var t=Q(),n;(function(e){e.method=`textDocument/inlayHint`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(n||(e.InlayHintRequest=n={}));var r;(function(e){e.method=`inlayHint/resolve`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(r||(e.InlayHintResolveRequest=r={}));var i;(function(e){e.method=`workspace/inlayHint/refresh`,e.messageDirection=t.MessageDirection.serverToClient,e.type=new t.ProtocolRequestType0(e.method)})(i||(e.InlayHintRefreshRequest=i={}))})),am=e.t((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.DiagnosticRefreshRequest=e.WorkspaceDiagnosticRequest=e.DocumentDiagnosticRequest=e.DocumentDiagnosticReportKind=e.DiagnosticServerCancellationData=void 0;var t=Rp(),n=Bp(),r=Q(),i;(function(e){function t(e){let t=e;return t&&n.boolean(t.retriggerRequest)}e.is=t})(i||(e.DiagnosticServerCancellationData=i={}));var a;(function(e){e.Full=`full`,e.Unchanged=`unchanged`})(a||(e.DocumentDiagnosticReportKind=a={}));var o;(function(e){e.method=`textDocument/diagnostic`,e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method),e.partialResult=new t.ProgressType})(o||(e.DocumentDiagnosticRequest=o={}));var s;(function(e){e.method=`workspace/diagnostic`,e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method),e.partialResult=new t.ProgressType})(s||(e.WorkspaceDiagnosticRequest=s={}));var c;(function(e){e.method=`workspace/diagnostic/refresh`,e.messageDirection=r.MessageDirection.serverToClient,e.type=new r.ProtocolRequestType0(e.method)})(c||(e.DiagnosticRefreshRequest=c={}))})),om=e.t((t=>{Object.defineProperty(t,`__esModule`,{value:!0}),t.DidCloseNotebookDocumentNotification=t.DidSaveNotebookDocumentNotification=t.DidChangeNotebookDocumentNotification=t.NotebookCellArrayChange=t.DidOpenNotebookDocumentNotification=t.NotebookDocumentSyncRegistrationType=t.NotebookDocument=t.NotebookCell=t.ExecutionSummary=t.NotebookCellKind=void 0;var n=(Md(),e.a(iu)),r=Bp(),i=Q(),a;(function(e){e.Markup=1,e.Code=2;function t(e){return e===1||e===2}e.is=t})(a||(t.NotebookCellKind=a={}));var o;(function(e){function t(e,t){let n={executionOrder:e};return(t===!0||t===!1)&&(n.success=t),n}e.create=t;function i(e){let t=e;return r.objectLiteral(t)&&n.uinteger.is(t.executionOrder)&&(t.success===void 0||r.boolean(t.success))}e.is=i;function a(e,t){return e===t?!0:e==null||t==null?!1:e.executionOrder===t.executionOrder&&e.success===t.success}e.equals=a})(o||(t.ExecutionSummary=o={}));var s;(function(e){function t(e,t){return{kind:e,document:t}}e.create=t;function i(e){let t=e;return r.objectLiteral(t)&&a.is(t.kind)&&n.DocumentUri.is(t.document)&&(t.metadata===void 0||r.objectLiteral(t.metadata))}e.is=i;function s(e,t){let n=new Set;return e.document!==t.document&&n.add(`document`),e.kind!==t.kind&&n.add(`kind`),e.executionSummary!==t.executionSummary&&n.add(`executionSummary`),(e.metadata!==void 0||t.metadata!==void 0)&&!c(e.metadata,t.metadata)&&n.add(`metadata`),(e.executionSummary!==void 0||t.executionSummary!==void 0)&&!o.equals(e.executionSummary,t.executionSummary)&&n.add(`executionSummary`),n}e.diff=s;function c(e,t){if(e===t)return!0;if(e==null||t==null||typeof e!=typeof t||typeof e!=`object`)return!1;let n=Array.isArray(e),i=Array.isArray(t);if(n!==i)return!1;if(n&&i){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(!c(e[n],t[n]))return!1}if(r.objectLiteral(e)&&r.objectLiteral(t)){let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length||(n.sort(),r.sort(),!c(n,r)))return!1;for(let r=0;r<n.length;r++){let i=n[r];if(!c(e[i],t[i]))return!1}}return!0}})(s||(t.NotebookCell=s={}));var c;(function(e){function t(e,t,n,r){return{uri:e,notebookType:t,version:n,cells:r}}e.create=t;function i(e){let t=e;return r.objectLiteral(t)&&r.string(t.uri)&&n.integer.is(t.version)&&r.typedArray(t.cells,s.is)}e.is=i})(c||(t.NotebookDocument=c={}));var l;(function(e){e.method=`notebookDocument/sync`,e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.RegistrationType(e.method)})(l||(t.NotebookDocumentSyncRegistrationType=l={}));var u;(function(e){e.method=`notebookDocument/didOpen`,e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolNotificationType(e.method),e.registrationMethod=l.method})(u||(t.DidOpenNotebookDocumentNotification=u={}));var d;(function(e){function t(e){let t=e;return r.objectLiteral(t)&&n.uinteger.is(t.start)&&n.uinteger.is(t.deleteCount)&&(t.cells===void 0||r.typedArray(t.cells,s.is))}e.is=t;function i(e,t,n){let r={start:e,deleteCount:t};return n!==void 0&&(r.cells=n),r}e.create=i})(d||(t.NotebookCellArrayChange=d={}));var f;(function(e){e.method=`notebookDocument/didChange`,e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolNotificationType(e.method),e.registrationMethod=l.method})(f||(t.DidChangeNotebookDocumentNotification=f={}));var p;(function(e){e.method=`notebookDocument/didSave`,e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolNotificationType(e.method),e.registrationMethod=l.method})(p||(t.DidSaveNotebookDocumentNotification=p={}));var m;(function(e){e.method=`notebookDocument/didClose`,e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolNotificationType(e.method),e.registrationMethod=l.method})(m||(t.DidCloseNotebookDocumentNotification=m={}))})),sm=e.t((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.InlineCompletionRequest=void 0;var t=Q(),n;(function(e){e.method=`textDocument/inlineCompletion`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(n||(e.InlineCompletionRequest=n={}))})),cm=e.t((t=>{Object.defineProperty(t,`__esModule`,{value:!0}),t.WorkspaceSymbolRequest=t.CodeActionResolveRequest=t.CodeActionRequest=t.DocumentSymbolRequest=t.DocumentHighlightRequest=t.ReferencesRequest=t.DefinitionRequest=t.SignatureHelpRequest=t.SignatureHelpTriggerKind=t.HoverRequest=t.CompletionResolveRequest=t.CompletionRequest=t.CompletionTriggerKind=t.PublishDiagnosticsNotification=t.WatchKind=t.RelativePattern=t.FileChangeType=t.DidChangeWatchedFilesNotification=t.WillSaveTextDocumentWaitUntilRequest=t.WillSaveTextDocumentNotification=t.TextDocumentSaveReason=t.DidSaveTextDocumentNotification=t.DidCloseTextDocumentNotification=t.DidChangeTextDocumentNotification=t.TextDocumentContentChangeEvent=t.DidOpenTextDocumentNotification=t.TextDocumentSyncKind=t.TelemetryEventNotification=t.LogMessageNotification=t.ShowMessageRequest=t.ShowMessageNotification=t.MessageType=t.DidChangeConfigurationNotification=t.ExitNotification=t.ShutdownRequest=t.InitializedNotification=t.InitializeErrorCodes=t.InitializeRequest=t.WorkDoneProgressOptions=t.TextDocumentRegistrationOptions=t.StaticRegistrationOptions=t.PositionEncodingKind=t.FailureHandlingKind=t.ResourceOperationKind=t.UnregistrationRequest=t.RegistrationRequest=t.DocumentSelector=t.NotebookCellTextDocumentFilter=t.NotebookDocumentFilter=t.TextDocumentFilter=void 0,t.MonikerRequest=t.MonikerKind=t.UniquenessLevel=t.WillDeleteFilesRequest=t.DidDeleteFilesNotification=t.WillRenameFilesRequest=t.DidRenameFilesNotification=t.WillCreateFilesRequest=t.DidCreateFilesNotification=t.FileOperationPatternKind=t.LinkedEditingRangeRequest=t.ShowDocumentRequest=t.SemanticTokensRegistrationType=t.SemanticTokensRefreshRequest=t.SemanticTokensRangeRequest=t.SemanticTokensDeltaRequest=t.SemanticTokensRequest=t.TokenFormat=t.CallHierarchyPrepareRequest=t.CallHierarchyOutgoingCallsRequest=t.CallHierarchyIncomingCallsRequest=t.WorkDoneProgressCancelNotification=t.WorkDoneProgressCreateRequest=t.WorkDoneProgress=t.SelectionRangeRequest=t.DeclarationRequest=t.FoldingRangeRefreshRequest=t.FoldingRangeRequest=t.ColorPresentationRequest=t.DocumentColorRequest=t.ConfigurationRequest=t.DidChangeWorkspaceFoldersNotification=t.WorkspaceFoldersRequest=t.TypeDefinitionRequest=t.ImplementationRequest=t.ApplyWorkspaceEditRequest=t.ExecuteCommandRequest=t.PrepareRenameRequest=t.RenameRequest=t.PrepareSupportDefaultBehavior=t.DocumentOnTypeFormattingRequest=t.DocumentRangesFormattingRequest=t.DocumentRangeFormattingRequest=t.DocumentFormattingRequest=t.DocumentLinkResolveRequest=t.DocumentLinkRequest=t.CodeLensRefreshRequest=t.CodeLensResolveRequest=t.CodeLensRequest=t.WorkspaceSymbolResolveRequest=void 0,t.InlineCompletionRequest=t.DidCloseNotebookDocumentNotification=t.DidSaveNotebookDocumentNotification=t.DidChangeNotebookDocumentNotification=t.NotebookCellArrayChange=t.DidOpenNotebookDocumentNotification=t.NotebookDocumentSyncRegistrationType=t.NotebookDocument=t.NotebookCell=t.ExecutionSummary=t.NotebookCellKind=t.DiagnosticRefreshRequest=t.WorkspaceDiagnosticRequest=t.DocumentDiagnosticRequest=t.DocumentDiagnosticReportKind=t.DiagnosticServerCancellationData=t.InlayHintRefreshRequest=t.InlayHintResolveRequest=t.InlayHintRequest=t.InlineValueRefreshRequest=t.InlineValueRequest=t.TypeHierarchySupertypesRequest=t.TypeHierarchySubtypesRequest=t.TypeHierarchyPrepareRequest=void 0;var n=Q(),r=(Md(),e.a(iu)),i=Bp(),a=Vp();Object.defineProperty(t,`ImplementationRequest`,{enumerable:!0,get:function(){return a.ImplementationRequest}});var o=Hp();Object.defineProperty(t,`TypeDefinitionRequest`,{enumerable:!0,get:function(){return o.TypeDefinitionRequest}});var s=Up();Object.defineProperty(t,`WorkspaceFoldersRequest`,{enumerable:!0,get:function(){return s.WorkspaceFoldersRequest}}),Object.defineProperty(t,`DidChangeWorkspaceFoldersNotification`,{enumerable:!0,get:function(){return s.DidChangeWorkspaceFoldersNotification}});var c=Wp();Object.defineProperty(t,`ConfigurationRequest`,{enumerable:!0,get:function(){return c.ConfigurationRequest}});var l=Gp();Object.defineProperty(t,`DocumentColorRequest`,{enumerable:!0,get:function(){return l.DocumentColorRequest}}),Object.defineProperty(t,`ColorPresentationRequest`,{enumerable:!0,get:function(){return l.ColorPresentationRequest}});var u=Kp();Object.defineProperty(t,`FoldingRangeRequest`,{enumerable:!0,get:function(){return u.FoldingRangeRequest}}),Object.defineProperty(t,`FoldingRangeRefreshRequest`,{enumerable:!0,get:function(){return u.FoldingRangeRefreshRequest}});var d=qp();Object.defineProperty(t,`DeclarationRequest`,{enumerable:!0,get:function(){return d.DeclarationRequest}});var f=Jp();Object.defineProperty(t,`SelectionRangeRequest`,{enumerable:!0,get:function(){return f.SelectionRangeRequest}});var p=Yp();Object.defineProperty(t,`WorkDoneProgress`,{enumerable:!0,get:function(){return p.WorkDoneProgress}}),Object.defineProperty(t,`WorkDoneProgressCreateRequest`,{enumerable:!0,get:function(){return p.WorkDoneProgressCreateRequest}}),Object.defineProperty(t,`WorkDoneProgressCancelNotification`,{enumerable:!0,get:function(){return p.WorkDoneProgressCancelNotification}});var m=Xp();Object.defineProperty(t,`CallHierarchyIncomingCallsRequest`,{enumerable:!0,get:function(){return m.CallHierarchyIncomingCallsRequest}}),Object.defineProperty(t,`CallHierarchyOutgoingCallsRequest`,{enumerable:!0,get:function(){return m.CallHierarchyOutgoingCallsRequest}}),Object.defineProperty(t,`CallHierarchyPrepareRequest`,{enumerable:!0,get:function(){return m.CallHierarchyPrepareRequest}});var h=Zp();Object.defineProperty(t,`TokenFormat`,{enumerable:!0,get:function(){return h.TokenFormat}}),Object.defineProperty(t,`SemanticTokensRequest`,{enumerable:!0,get:function(){return h.SemanticTokensRequest}}),Object.defineProperty(t,`SemanticTokensDeltaRequest`,{enumerable:!0,get:function(){return h.SemanticTokensDeltaRequest}}),Object.defineProperty(t,`SemanticTokensRangeRequest`,{enumerable:!0,get:function(){return h.SemanticTokensRangeRequest}}),Object.defineProperty(t,`SemanticTokensRefreshRequest`,{enumerable:!0,get:function(){return h.SemanticTokensRefreshRequest}}),Object.defineProperty(t,`SemanticTokensRegistrationType`,{enumerable:!0,get:function(){return h.SemanticTokensRegistrationType}});var g=Qp();Object.defineProperty(t,`ShowDocumentRequest`,{enumerable:!0,get:function(){return g.ShowDocumentRequest}});var _=$p();Object.defineProperty(t,`LinkedEditingRangeRequest`,{enumerable:!0,get:function(){return _.LinkedEditingRangeRequest}});var v=em();Object.defineProperty(t,`FileOperationPatternKind`,{enumerable:!0,get:function(){return v.FileOperationPatternKind}}),Object.defineProperty(t,`DidCreateFilesNotification`,{enumerable:!0,get:function(){return v.DidCreateFilesNotification}}),Object.defineProperty(t,`WillCreateFilesRequest`,{enumerable:!0,get:function(){return v.WillCreateFilesRequest}}),Object.defineProperty(t,`DidRenameFilesNotification`,{enumerable:!0,get:function(){return v.DidRenameFilesNotification}}),Object.defineProperty(t,`WillRenameFilesRequest`,{enumerable:!0,get:function(){return v.WillRenameFilesRequest}}),Object.defineProperty(t,`DidDeleteFilesNotification`,{enumerable:!0,get:function(){return v.DidDeleteFilesNotification}}),Object.defineProperty(t,`WillDeleteFilesRequest`,{enumerable:!0,get:function(){return v.WillDeleteFilesRequest}});var y=tm();Object.defineProperty(t,`UniquenessLevel`,{enumerable:!0,get:function(){return y.UniquenessLevel}}),Object.defineProperty(t,`MonikerKind`,{enumerable:!0,get:function(){return y.MonikerKind}}),Object.defineProperty(t,`MonikerRequest`,{enumerable:!0,get:function(){return y.MonikerRequest}});var b=nm();Object.defineProperty(t,`TypeHierarchyPrepareRequest`,{enumerable:!0,get:function(){return b.TypeHierarchyPrepareRequest}}),Object.defineProperty(t,`TypeHierarchySubtypesRequest`,{enumerable:!0,get:function(){return b.TypeHierarchySubtypesRequest}}),Object.defineProperty(t,`TypeHierarchySupertypesRequest`,{enumerable:!0,get:function(){return b.TypeHierarchySupertypesRequest}});var x=rm();Object.defineProperty(t,`InlineValueRequest`,{enumerable:!0,get:function(){return x.InlineValueRequest}}),Object.defineProperty(t,`InlineValueRefreshRequest`,{enumerable:!0,get:function(){return x.InlineValueRefreshRequest}});var S=im();Object.defineProperty(t,`InlayHintRequest`,{enumerable:!0,get:function(){return S.InlayHintRequest}}),Object.defineProperty(t,`InlayHintResolveRequest`,{enumerable:!0,get:function(){return S.InlayHintResolveRequest}}),Object.defineProperty(t,`InlayHintRefreshRequest`,{enumerable:!0,get:function(){return S.InlayHintRefreshRequest}});var C=am();Object.defineProperty(t,`DiagnosticServerCancellationData`,{enumerable:!0,get:function(){return C.DiagnosticServerCancellationData}}),Object.defineProperty(t,`DocumentDiagnosticReportKind`,{enumerable:!0,get:function(){return C.DocumentDiagnosticReportKind}}),Object.defineProperty(t,`DocumentDiagnosticRequest`,{enumerable:!0,get:function(){return C.DocumentDiagnosticRequest}}),Object.defineProperty(t,`WorkspaceDiagnosticRequest`,{enumerable:!0,get:function(){return C.WorkspaceDiagnosticRequest}}),Object.defineProperty(t,`DiagnosticRefreshRequest`,{enumerable:!0,get:function(){return C.DiagnosticRefreshRequest}});var w=om();Object.defineProperty(t,`NotebookCellKind`,{enumerable:!0,get:function(){return w.NotebookCellKind}}),Object.defineProperty(t,`ExecutionSummary`,{enumerable:!0,get:function(){return w.ExecutionSummary}}),Object.defineProperty(t,`NotebookCell`,{enumerable:!0,get:function(){return w.NotebookCell}}),Object.defineProperty(t,`NotebookDocument`,{enumerable:!0,get:function(){return w.NotebookDocument}}),Object.defineProperty(t,`NotebookDocumentSyncRegistrationType`,{enumerable:!0,get:function(){return w.NotebookDocumentSyncRegistrationType}}),Object.defineProperty(t,`DidOpenNotebookDocumentNotification`,{enumerable:!0,get:function(){return w.DidOpenNotebookDocumentNotification}}),Object.defineProperty(t,`NotebookCellArrayChange`,{enumerable:!0,get:function(){return w.NotebookCellArrayChange}}),Object.defineProperty(t,`DidChangeNotebookDocumentNotification`,{enumerable:!0,get:function(){return w.DidChangeNotebookDocumentNotification}}),Object.defineProperty(t,`DidSaveNotebookDocumentNotification`,{enumerable:!0,get:function(){return w.DidSaveNotebookDocumentNotification}}),Object.defineProperty(t,`DidCloseNotebookDocumentNotification`,{enumerable:!0,get:function(){return w.DidCloseNotebookDocumentNotification}});var T=sm();Object.defineProperty(t,`InlineCompletionRequest`,{enumerable:!0,get:function(){return T.InlineCompletionRequest}});var E;(function(e){function t(e){let t=e;return i.string(t)||i.string(t.language)||i.string(t.scheme)||i.string(t.pattern)}e.is=t})(E||(t.TextDocumentFilter=E={}));var ee;(function(e){function t(e){let t=e;return i.objectLiteral(t)&&(i.string(t.notebookType)||i.string(t.scheme)||i.string(t.pattern))}e.is=t})(ee||(t.NotebookDocumentFilter=ee={}));var te;(function(e){function t(e){let t=e;return i.objectLiteral(t)&&(i.string(t.notebook)||ee.is(t.notebook))&&(t.language===void 0||i.string(t.language))}e.is=t})(te||(t.NotebookCellTextDocumentFilter=te={}));var D;(function(e){function t(e){if(!Array.isArray(e))return!1;for(let t of e)if(!i.string(t)&&!E.is(t)&&!te.is(t))return!1;return!0}e.is=t})(D||(t.DocumentSelector=D={}));var O;(function(e){e.method=`client/registerCapability`,e.messageDirection=n.MessageDirection.serverToClient,e.type=new n.ProtocolRequestType(e.method)})(O||(t.RegistrationRequest=O={}));var k;(function(e){e.method=`client/unregisterCapability`,e.messageDirection=n.MessageDirection.serverToClient,e.type=new n.ProtocolRequestType(e.method)})(k||(t.UnregistrationRequest=k={}));var ne;(function(e){e.Create=`create`,e.Rename=`rename`,e.Delete=`delete`})(ne||(t.ResourceOperationKind=ne={}));var re;(function(e){e.Abort=`abort`,e.Transactional=`transactional`,e.TextOnlyTransactional=`textOnlyTransactional`,e.Undo=`undo`})(re||(t.FailureHandlingKind=re={}));var ie;(function(e){e.UTF8=`utf-8`,e.UTF16=`utf-16`,e.UTF32=`utf-32`})(ie||(t.PositionEncodingKind=ie={}));var A;(function(e){function t(e){let t=e;return t&&i.string(t.id)&&t.id.length>0}e.hasId=t})(A||(t.StaticRegistrationOptions=A={}));var ae;(function(e){function t(e){let t=e;return t&&(t.documentSelector===null||D.is(t.documentSelector))}e.is=t})(ae||(t.TextDocumentRegistrationOptions=ae={}));var oe;(function(e){function t(e){let t=e;return i.objectLiteral(t)&&(t.workDoneProgress===void 0||i.boolean(t.workDoneProgress))}e.is=t;function n(e){let t=e;return t&&i.boolean(t.workDoneProgress)}e.hasWorkDoneProgress=n})(oe||(t.WorkDoneProgressOptions=oe={}));var j;(function(e){e.method=`initialize`,e.messageDirection=n.MessageDirection.clientToServer,e.type=new n.ProtocolRequestType(e.method)})(j||(t.InitializeRequest=j={}));var M;(function(e){e.unknownProtocolVersion=1})(M||(t.InitializeErrorCodes=M={}));var N;(function(e){e.method=`initialized`,e.messageDirection=n.MessageDirection.clientToServer,e.type=new n.ProtocolNotificationType(e.method)})(N||(t.InitializedNotification=N={}));var P;(function(e){e.method=`shutdown`,e.messageDirection=n.MessageDirection.clientToServer,e.type=new n.ProtocolRequestType0(e.method)})(P||(t.ShutdownRequest=P={}));var se;(function(e){e.method=`exit`,e.messageDirection=n.MessageDirection.clientToServer,e.type=new n.ProtocolNotificationType0(e.method)})(se||(t.ExitNotification=se={}));var ce;(function(e){e.method=`workspace/didChangeConfiguration`,e.messageDirection=n.MessageDirection.clientToServer,e.type=new n.ProtocolNotificationType(e.method)})(ce||(t.DidChangeConfigurationNotification=ce={}));var le;(function(e){e.Error=1,e.Warning=2,e.Info=3,e.Log=4,e.Debug=5})(le||(t.MessageType=le={}));var ue;(function(e){e.method=`window/showMessage`,e.messageDirection=n.MessageDirection.serverToClient,e.type=new n.ProtocolNotificationType(e.method)})(ue||(t.ShowMessageNotification=ue={}));var de;(function(e){e.method=`window/showMessageRequest`,e.messageDirection=n.MessageDirection.serverToClient,e.type=new n.ProtocolRequestType(e.method)})(de||(t.ShowMessageRequest=de={}));var fe;(function(e){e.method=`window/logMessage`,e.messageDirection=n.MessageDirection.serverToClient,e.type=new n.ProtocolNotificationType(e.method)})(fe||(t.LogMessageNotification=fe={}));var F;(function(e){e.method=`telemetry/event`,e.messageDirection=n.MessageDirection.serverToClient,e.type=new n.ProtocolNotificationType(e.method)})(F||(t.TelemetryEventNotification=F={}));var pe;(function(e){e.None=0,e.Full=1,e.Incremental=2})(pe||(t.TextDocumentSyncKind=pe={}));var me;(function(e){e.method=`textDocument/didOpen`,e.messageDirection=n.MessageDirection.clientToServer,e.type=new n.ProtocolNotificationType(e.method)})(me||(t.DidOpenTextDocumentNotification=me={}));var he;(function(e){function t(e){let t=e;return t!=null&&typeof t.text==`string`&&t.range!==void 0&&(t.rangeLength===void 0||typeof t.rangeLength==`number`)}e.isIncremental=t;function n(e){let t=e;return t!=null&&typeof t.text==`string`&&t.range===void 0&&t.rangeLength===void 0}e.isFull=n})(he||(t.TextDocumentContentChangeEvent=he={}));var ge;(function(e){e.method=`textDocument/didChange`,e.messageDirection=n.MessageDirection.clientToServer,e.type=new n.ProtocolNotificationType(e.method)})(ge||(t.DidChangeTextDocumentNotification=ge={}));var _e;(function(e){e.method=`textDocument/didClose`,e.messageDirection=n.MessageDirection.clientToServer,e.type=new n.ProtocolNotificationType(e.method)})(_e||(t.DidCloseTextDocumentNotification=_e={}));var ve;(function(e){e.method=`textDocument/didSave`,e.messageDirection=n.MessageDirection.clientToServer,e.type=new n.ProtocolNotificationType(e.method)})(ve||(t.DidSaveTextDocumentNotification=ve={}));var ye;(function(e){e.Manual=1,e.AfterDelay=2,e.FocusOut=3})(ye||(t.TextDocumentSaveReason=ye={}));var be;(function(e){e.method=`textDocument/willSave`,e.messageDirection=n.MessageDirection.clientToServer,e.type=new n.ProtocolNotificationType(e.method)})(be||(t.WillSaveTextDocumentNotification=be={}));var xe;(function(e){e.method=`textDocument/willSaveWaitUntil`,e.messageDirection=n.MessageDirection.clientToServer,e.type=new n.ProtocolRequestType(e.method)})(xe||(t.WillSaveTextDocumentWaitUntilRequest=xe={}));var Se;(function(e){e.method=`workspace/didChangeWatchedFiles`,e.messageDirection=n.MessageDirection.clientToServer,e.type=new n.ProtocolNotificationType(e.method)})(Se||(t.DidChangeWatchedFilesNotification=Se={}));var Ce;(function(e){e.Created=1,e.Changed=2,e.Deleted=3})(Ce||(t.FileChangeType=Ce={}));var we;(function(e){function t(e){let t=e;return i.objectLiteral(t)&&(r.URI.is(t.baseUri)||r.WorkspaceFolder.is(t.baseUri))&&i.string(t.pattern)}e.is=t})(we||(t.RelativePattern=we={}));var Te;(function(e){e.Create=1,e.Change=2,e.Delete=4})(Te||(t.WatchKind=Te={}));var Ee;(function(e){e.method=`textDocument/publishDiagnostics`,e.messageDirection=n.MessageDirection.serverToClient,e.type=new n.ProtocolNotificationType(e.method)})(Ee||(t.PublishDiagnosticsNotification=Ee={}));var De;(function(e){e.Invoked=1,e.TriggerCharacter=2,e.TriggerForIncompleteCompletions=3})(De||(t.CompletionTriggerKind=De={}));var Oe;(function(e){e.method=`textDocument/completion`,e.messageDirection=n.MessageDirection.clientToServer,e.type=new n.ProtocolRequestType(e.method)})(Oe||(t.CompletionRequest=Oe={}));var ke;(function(e){e.method=`completionItem/resolve`,e.messageDirection=n.MessageDirection.clientToServer,e.type=new n.ProtocolRequestType(e.method)})(ke||(t.CompletionResolveRequest=ke={}));var Ae;(function(e){e.method=`textDocument/hover`,e.messageDirection=n.MessageDirection.clientToServer,e.type=new n.ProtocolRequestType(e.method)})(Ae||(t.HoverRequest=Ae={}));var je;(function(e){e.Invoked=1,e.TriggerCharacter=2,e.ContentChange=3})(je||(t.SignatureHelpTriggerKind=je={}));var I;(function(e){e.method=`textDocument/signatureHelp`,e.messageDirection=n.MessageDirection.clientToServer,e.type=new n.ProtocolRequestType(e.method)})(I||(t.SignatureHelpRequest=I={}));var Me;(function(e){e.method=`textDocument/definition`,e.messageDirection=n.MessageDirection.clientToServer,e.type=new n.ProtocolRequestType(e.method)})(Me||(t.DefinitionRequest=Me={}));var Ne;(function(e){e.method=`textDocument/references`,e.messageDirection=n.MessageDirection.clientToServer,e.type=new n.ProtocolRequestType(e.method)})(Ne||(t.ReferencesRequest=Ne={}));var Pe;(function(e){e.method=`textDocument/documentHighlight`,e.messageDirection=n.MessageDirection.clientToServer,e.type=new n.ProtocolRequestType(e.method)})(Pe||(t.DocumentHighlightRequest=Pe={}));var Fe;(function(e){e.method=`textDocument/documentSymbol`,e.messageDirection=n.MessageDirection.clientToServer,e.type=new n.ProtocolRequestType(e.method)})(Fe||(t.DocumentSymbolRequest=Fe={}));var Ie;(function(e){e.method=`textDocument/codeAction`,e.messageDirection=n.MessageDirection.clientToServer,e.type=new n.ProtocolRequestType(e.method)})(Ie||(t.CodeActionRequest=Ie={}));var Le;(function(e){e.method=`codeAction/resolve`,e.messageDirection=n.MessageDirection.clientToServer,e.type=new n.ProtocolRequestType(e.method)})(Le||(t.CodeActionResolveRequest=Le={}));var Re;(function(e){e.method=`workspace/symbol`,e.messageDirection=n.MessageDirection.clientToServer,e.type=new n.ProtocolRequestType(e.method)})(Re||(t.WorkspaceSymbolRequest=Re={}));var ze;(function(e){e.method=`workspaceSymbol/resolve`,e.messageDirection=n.MessageDirection.clientToServer,e.type=new n.ProtocolRequestType(e.method)})(ze||(t.WorkspaceSymbolResolveRequest=ze={}));var Be;(function(e){e.method=`textDocument/codeLens`,e.messageDirection=n.MessageDirection.clientToServer,e.type=new n.ProtocolRequestType(e.method)})(Be||(t.CodeLensRequest=Be={}));var Ve;(function(e){e.method=`codeLens/resolve`,e.messageDirection=n.MessageDirection.clientToServer,e.type=new n.ProtocolRequestType(e.method)})(Ve||(t.CodeLensResolveRequest=Ve={}));var He;(function(e){e.method=`workspace/codeLens/refresh`,e.messageDirection=n.MessageDirection.serverToClient,e.type=new n.ProtocolRequestType0(e.method)})(He||(t.CodeLensRefreshRequest=He={}));var Ue;(function(e){e.method=`textDocument/documentLink`,e.messageDirection=n.MessageDirection.clientToServer,e.type=new n.ProtocolRequestType(e.method)})(Ue||(t.DocumentLinkRequest=Ue={}));var We;(function(e){e.method=`documentLink/resolve`,e.messageDirection=n.MessageDirection.clientToServer,e.type=new n.ProtocolRequestType(e.method)})(We||(t.DocumentLinkResolveRequest=We={}));var Ge;(function(e){e.method=`textDocument/formatting`,e.messageDirection=n.MessageDirection.clientToServer,e.type=new n.ProtocolRequestType(e.method)})(Ge||(t.DocumentFormattingRequest=Ge={}));var Ke;(function(e){e.method=`textDocument/rangeFormatting`,e.messageDirection=n.MessageDirection.clientToServer,e.type=new n.ProtocolRequestType(e.method)})(Ke||(t.DocumentRangeFormattingRequest=Ke={}));var qe;(function(e){e.method=`textDocument/rangesFormatting`,e.messageDirection=n.MessageDirection.clientToServer,e.type=new n.ProtocolRequestType(e.method)})(qe||(t.DocumentRangesFormattingRequest=qe={}));var Je;(function(e){e.method=`textDocument/onTypeFormatting`,e.messageDirection=n.MessageDirection.clientToServer,e.type=new n.ProtocolRequestType(e.method)})(Je||(t.DocumentOnTypeFormattingRequest=Je={}));var Ye;(function(e){e.Identifier=1})(Ye||(t.PrepareSupportDefaultBehavior=Ye={}));var Xe;(function(e){e.method=`textDocument/rename`,e.messageDirection=n.MessageDirection.clientToServer,e.type=new n.ProtocolRequestType(e.method)})(Xe||(t.RenameRequest=Xe={}));var Ze;(function(e){e.method=`textDocument/prepareRename`,e.messageDirection=n.MessageDirection.clientToServer,e.type=new n.ProtocolRequestType(e.method)})(Ze||(t.PrepareRenameRequest=Ze={}));var Qe;(function(e){e.method=`workspace/executeCommand`,e.messageDirection=n.MessageDirection.clientToServer,e.type=new n.ProtocolRequestType(e.method)})(Qe||(t.ExecuteCommandRequest=Qe={}));var $e;(function(e){e.method=`workspace/applyEdit`,e.messageDirection=n.MessageDirection.serverToClient,e.type=new n.ProtocolRequestType(`workspace/applyEdit`)})($e||(t.ApplyWorkspaceEditRequest=$e={}))})),lm=e.t((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.createProtocolConnection=void 0;var t=Rp();function n(e,n,r,i){return t.ConnectionStrategy.is(i)&&(i={connectionStrategy:i}),(0,t.createMessageConnection)(e,n,r,i)}e.createProtocolConnection=n})),um=e.t((t=>{var n=t&&t.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||(`get`in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),r=t&&t.__exportStar||function(e,t){for(var r in e)r!==`default`&&!Object.prototype.hasOwnProperty.call(t,r)&&n(t,e,r)};Object.defineProperty(t,`__esModule`,{value:!0}),t.LSPErrorCodes=t.createProtocolConnection=void 0,r(Rp(),t),r((Md(),e.a(iu)),t),r(Q(),t),r(cm(),t);var i=lm();Object.defineProperty(t,`createProtocolConnection`,{enumerable:!0,get:function(){return i.createProtocolConnection}});var a;(function(e){e.lspReservedErrorRangeStart=-32899,e.RequestFailed=-32803,e.ServerCancelled=-32802,e.ContentModified=-32801,e.RequestCancelled=-32800,e.lspReservedErrorRangeEnd=-32800})(a||(t.LSPErrorCodes=a={}))})),dm=e.t((e=>{var t=e&&e.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||(`get`in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),n=e&&e.__exportStar||function(e,n){for(var r in e)r!==`default`&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,`__esModule`,{value:!0}),e.createProtocolConnection=void 0;var r=zp();n(zp(),e),n(um(),e);function i(e,t,n,i){return(0,r.createMessageConnection)(e,t,n,i)}e.createProtocolConnection=i})),fm;(function(e){function t(e){return{dispose:async()=>await e()}}e.create=t})(fm||={});var pm=dm(),mm=class{constructor(e){this.updateBuildOptions={validation:{categories:[`built-in`,`fast`]}},this.updateListeners=[],this.buildPhaseListeners=new $f,this.documentPhaseListeners=new $f,this.buildState=new Map,this.documentBuildWaiters=new Map,this.currentState=Z.Changed,this.langiumDocuments=e.workspace.LangiumDocuments,this.langiumDocumentFactory=e.workspace.LangiumDocumentFactory,this.textDocuments=e.workspace.TextDocuments,this.indexManager=e.workspace.IndexManager,this.fileSystemProvider=e.workspace.FileSystemProvider,this.workspaceManager=()=>e.workspace.WorkspaceManager,this.serviceRegistry=e.ServiceRegistry}async build(e,t={},n=X.CancellationToken.None){for(let n of e){let e=n.uri.toString();if(n.state===Z.Validated){if(typeof t.validation==`boolean`&&t.validation)this.resetToState(n,Z.IndexedReferences);else if(typeof t.validation==`object`){let r=this.findMissingValidationCategories(n,t);r.length>0&&(this.buildState.set(e,{completed:!1,options:{validation:{categories:r}},result:this.buildState.get(e)?.result}),n.state=Z.IndexedReferences)}}else this.buildState.delete(e)}this.currentState=Z.Changed,await this.emitUpdate(e.map(e=>e.uri),[]),await this.buildDocuments(e,t,n)}async update(e,t,n=X.CancellationToken.None){this.currentState=Z.Changed;let r=[];for(let e of t){let t=this.langiumDocuments.deleteDocuments(e);for(let e of t)r.push(e.uri),this.cleanUpDeleted(e)}let i=(await Promise.all(e.map(e=>this.findChangedUris(e)))).flat();for(let e of i){let t=this.langiumDocuments.getDocument(e);t===void 0&&(t=this.langiumDocumentFactory.fromModel({$type:`INVALID`},e),t.state=Z.Changed,this.langiumDocuments.addDocument(t)),this.resetToState(t,Z.Changed)}let a=b(i).concat(r).map(e=>e.toString()).toSet();this.langiumDocuments.all.filter(e=>!a.has(e.uri.toString())&&this.shouldRelink(e,a)).forEach(e=>this.resetToState(e,Z.ComputedScopes)),await this.emitUpdate(i,r),await Mf(n);let o=this.sortDocuments(this.langiumDocuments.all.filter(e=>e.state<Z.Validated||!this.buildState.get(e.uri.toString())?.completed||this.resultsAreIncomplete(e,this.updateBuildOptions)).toArray());await this.buildDocuments(o,this.updateBuildOptions,n)}resultsAreIncomplete(e,t){return this.findMissingValidationCategories(e,t).length>=1}findMissingValidationCategories(e,t){let n=this.buildState.get(e.uri.toString()),r=this.serviceRegistry.getServices(e.uri).validation.ValidationRegistry.getAllValidationCategories(e),i=n?.result?.validationChecks?new Set(n?.result?.validationChecks):n?.completed?r:new Set;return b(t===void 0||t.validation===!0?r:typeof t.validation==`object`?t.validation.categories??r:[]).filter(e=>!i.has(e)).toArray()}async findChangedUris(e){if(this.langiumDocuments.getDocument(e)??this.textDocuments?.get(e))return[e];try{let t=await this.fileSystemProvider.stat(e);if(t.isDirectory)return await this.workspaceManager().searchFolder(e);if(this.workspaceManager().shouldIncludeEntry(t))return[e]}catch{}return[]}async emitUpdate(e,t){await Promise.all(this.updateListeners.map(n=>n(e,t)))}sortDocuments(e){let t=0,n=e.length-1;for(;t<n;){for(;t<e.length&&this.hasTextDocument(e[t]);)t++;for(;n>=0&&!this.hasTextDocument(e[n]);)n--;t<n&&([e[t],e[n]]=[e[n],e[t]])}return e}hasTextDocument(e){return!!this.textDocuments?.get(e.uri)}shouldRelink(e,t){return e.references.some(e=>e.error!==void 0)?!0:this.indexManager.isAffected(e,t)}onUpdate(e){return this.updateListeners.push(e),fm.create(()=>{let t=this.updateListeners.indexOf(e);t>=0&&this.updateListeners.splice(t,1)})}resetToState(e,t){switch(t){case Z.Changed:case Z.Parsed:this.indexManager.removeContent(e.uri);case Z.IndexedContent:e.localSymbols=void 0;case Z.ComputedScopes:this.serviceRegistry.getServices(e.uri).references.Linker.unlink(e);case Z.Linked:this.indexManager.removeReferences(e.uri);case Z.IndexedReferences:e.diagnostics=void 0,this.buildState.delete(e.uri.toString());case Z.Validated:}e.state>t&&(e.state=t)}cleanUpDeleted(e){this.buildState.delete(e.uri.toString()),this.indexManager.remove(e.uri),e.state=Z.Changed}async buildDocuments(e,t,n){this.prepareBuild(e,t),await this.runCancelable(e,Z.Parsed,n,e=>this.langiumDocumentFactory.update(e,n)),await this.runCancelable(e,Z.IndexedContent,n,e=>this.indexManager.updateContent(e,n)),await this.runCancelable(e,Z.ComputedScopes,n,async e=>{e.localSymbols=await this.serviceRegistry.getServices(e.uri).references.ScopeComputation.collectLocalSymbols(e,n)});let r=e.filter(e=>this.shouldLink(e));await this.runCancelable(r,Z.Linked,n,e=>this.serviceRegistry.getServices(e.uri).references.Linker.link(e,n)),await this.runCancelable(r,Z.IndexedReferences,n,e=>this.indexManager.updateReferences(e,n));let i=e.filter(e=>this.shouldValidate(e)?!0:(this.markAsCompleted(e),!1));await this.runCancelable(i,Z.Validated,n,async e=>{await this.validate(e,n),this.markAsCompleted(e)})}markAsCompleted(e){let t=this.buildState.get(e.uri.toString());t&&(t.completed=!0)}prepareBuild(e,t){for(let n of e){let e=n.uri.toString(),r=this.buildState.get(e);(!r||r.completed)&&this.buildState.set(e,{completed:!1,options:t,result:r?.result})}}async runCancelable(e,t,n,r){for(let i of e)i.state<t&&(await Mf(n),await r(i),i.state=t,await this.notifyDocumentPhase(i,t,n));let i=e.filter(e=>e.state===t);await this.notifyBuildPhase(i,t,n),this.currentState=t}onBuildPhase(e,t){return this.buildPhaseListeners.add(e,t),fm.create(()=>{this.buildPhaseListeners.delete(e,t)})}onDocumentPhase(e,t){return this.documentPhaseListeners.add(e,t),fm.create(()=>{this.documentPhaseListeners.delete(e,t)})}waitUntil(e,t,n){let r;return t&&`path`in t?r=t:n=t,n??=X.CancellationToken.None,r?this.awaitDocumentState(e,r,n):this.awaitBuilderState(e,n)}awaitDocumentState(e,t,n){let r=this.langiumDocuments.getDocument(t);return r?r.state>=e?Promise.resolve(t):n.isCancellationRequested?Promise.reject(Af):this.currentState>=e&&e>r.state?Promise.reject(new pm.ResponseError(pm.LSPErrorCodes.RequestFailed,`Document state of ${t.toString()} is ${Z[r.state]}, requiring ${Z[e]}, but workspace state is already ${Z[this.currentState]}. Returning undefined.`)):new Promise((r,i)=>{let a=this.onDocumentPhase(e,e=>{Wf.equals(e.uri,t)&&(a.dispose(),o.dispose(),r(e.uri))}),o=n.onCancellationRequested(()=>{a.dispose(),o.dispose(),i(Af)})}):Promise.reject(new pm.ResponseError(pm.LSPErrorCodes.ServerCancelled,`No document found for URI: ${t.toString()}`))}awaitBuilderState(e,t){return this.currentState>=e?Promise.resolve():t.isCancellationRequested?Promise.reject(Af):new Promise((n,r)=>{let i=this.onBuildPhase(e,()=>{i.dispose(),a.dispose(),n()}),a=t.onCancellationRequested(()=>{i.dispose(),a.dispose(),r(Af)})})}async notifyDocumentPhase(e,t,n){let r=this.documentPhaseListeners.get(t).slice();for(let t of r)try{await Mf(n),await t(e,n)}catch(e){if(!jf(e))throw e}}async notifyBuildPhase(e,t,n){if(e.length===0)return;let r=this.buildPhaseListeners.get(t).slice();for(let t of r)await Mf(n),await t(e,n)}shouldLink(e){return this.getBuildOptions(e).eagerLinking??!0}shouldValidate(e){return!!this.getBuildOptions(e).validation}async validate(e,t){let n=this.serviceRegistry.getServices(e.uri).validation.DocumentValidator,r=this.getBuildOptions(e),i=typeof r.validation==`object`?{...r.validation}:{};i.categories=this.findMissingValidationCategories(e,r);let a=await n.validateDocument(e,i,t);e.diagnostics?e.diagnostics.push(...a):e.diagnostics=a;let o=this.buildState.get(e.uri.toString());o&&(o.result??={},o.result.validationChecks?o.result.validationChecks=b(o.result.validationChecks).concat(i.categories).distinct().toArray():o.result.validationChecks=[...i.categories])}getBuildOptions(e){return this.buildState.get(e.uri.toString())?.options??{}}},hm=class{constructor(e){this.symbolIndex=new Map,this.symbolByTypeIndex=new op,this.referenceIndex=new Map,this.documents=e.workspace.LangiumDocuments,this.serviceRegistry=e.ServiceRegistry,this.astReflection=e.AstReflection}findAllReferences(e,t){let n=T(e).uri,r=[];return this.referenceIndex.forEach(e=>{e.forEach(e=>{Wf.equals(e.targetUri,n)&&e.targetPath===t&&r.push(e)})}),b(r)}allElements(e,t){let n=b(this.symbolIndex.keys());return t&&(n=n.filter(e=>!t||t.has(e))),n.map(t=>this.getFileDescriptions(t,e)).flat()}getFileDescriptions(e,t){return t?this.symbolByTypeIndex.get(e,t,()=>(this.symbolIndex.get(e)??[]).filter(e=>this.astReflection.isSubtype(e.type,t))):this.symbolIndex.get(e)??[]}remove(e){this.removeContent(e),this.removeReferences(e)}removeContent(e){let t=e.toString();this.symbolIndex.delete(t),this.symbolByTypeIndex.clear(t)}removeReferences(e){let t=e.toString();this.referenceIndex.delete(t)}async updateContent(e,t=X.CancellationToken.None){let n=await this.serviceRegistry.getServices(e.uri).references.ScopeComputation.collectExportedSymbols(e,t),r=e.uri.toString();this.symbolIndex.set(r,n),this.symbolByTypeIndex.clear(r)}async updateReferences(e,t=X.CancellationToken.None){let n=await this.serviceRegistry.getServices(e.uri).workspace.ReferenceDescriptionProvider.createDescriptions(e,t);this.referenceIndex.set(e.uri.toString(),n)}isAffected(e,t){let n=this.referenceIndex.get(e.uri.toString());return n?n.some(e=>!e.local&&t.has(e.targetUri.toString())):!1}},gm=class{constructor(e){this.initialBuildOptions={},this._ready=new Nf,this.serviceRegistry=e.ServiceRegistry,this.langiumDocuments=e.workspace.LangiumDocuments,this.documentBuilder=e.workspace.DocumentBuilder,this.fileSystemProvider=e.workspace.FileSystemProvider,this.mutex=e.workspace.WorkspaceLock}get ready(){return this._ready.promise}get workspaceFolders(){return this.folders}initialize(e){this.folders=e.workspaceFolders??void 0}initialized(e){return this.mutex.write(e=>this.initializeWorkspace(this.folders??[],e))}async initializeWorkspace(e,t=X.CancellationToken.None){let n=await this.performStartup(e);await Mf(t),await this.documentBuilder.build(n,this.initialBuildOptions,t)}async performStartup(e){let t=[],n=e=>{t.push(e),this.langiumDocuments.hasDocument(e.uri)||this.langiumDocuments.addDocument(e)};await this.loadAdditionalDocuments(e,n);let r=[];await Promise.all(e.map(e=>this.getRootFolder(e)).map(async e=>this.traverseFolder(e,r)));let i=b(r).distinct(e=>e.toString()).filter(e=>!this.langiumDocuments.hasDocument(e));return await this.loadWorkspaceDocuments(i,n),this._ready.resolve(),t}async loadWorkspaceDocuments(e,t){await Promise.all(e.map(async e=>{t(await this.langiumDocuments.getOrCreateDocument(e))}))}loadAdditionalDocuments(e,t){return Promise.resolve()}getRootFolder(e){return Hf.parse(e.uri)}async traverseFolder(e,t){try{let n=await this.fileSystemProvider.readDirectory(e);await Promise.all(n.map(async e=>{this.shouldIncludeEntry(e)&&(e.isDirectory?await this.traverseFolder(e.uri,t):e.isFile&&t.push(e.uri))}))}catch(t){console.error(`Failure to read directory content of `+e.toString(!0),t)}}async searchFolder(e){let t=[];return await this.traverseFolder(e,t),t}shouldIncludeEntry(e){let t=Wf.basename(e.uri);return t.startsWith(`.`)?!1:e.isDirectory?t!==`node_modules`&&t!==`out`:e.isFile?this.serviceRegistry.hasServices(e.uri):!1}},_m=class{buildUnexpectedCharactersMessage(e,t,n,r,i){return Oi.buildUnexpectedCharactersMessage(e,t,n,r,i)}buildUnableToPopLexerModeMessage(e){return Oi.buildUnableToPopLexerModeMessage(e)}},vm={mode:`full`},ym=class{constructor(e){this.errorMessageProvider=e.parser.LexerErrorMessageProvider,this.tokenBuilder=e.parser.TokenBuilder;let t=this.tokenBuilder.buildTokens(e.Grammar,{caseInsensitive:e.LanguageMetaData.caseInsensitive});this.tokenTypes=this.toTokenTypeDictionary(t),this.chevrotainLexer=new Ai(Sm(t)?Object.values(t):t,{positionTracking:`full`,skipValidations:e.LanguageMetaData.mode===`production`,errorMessageProvider:this.errorMessageProvider})}get definition(){return this.tokenTypes}tokenize(e,t=vm){let n=this.chevrotainLexer.tokenize(e);return{tokens:n.tokens,errors:n.errors,hidden:n.groups.hidden??[],report:this.tokenBuilder.flushLexingReport?.(e)}}toTokenTypeDictionary(e){if(Sm(e))return e;let t=xm(e)?Object.values(e.modes).flat():e,n={};return t.forEach(e=>n[e.name]=e),n}};function bm(e){return Array.isArray(e)&&(e.length===0||`name`in e[0])}function xm(e){return e&&`modes`in e&&`defaultMode`in e}function Sm(e){return!bm(e)&&!xm(e)}Md();function Cm(e,t,n){let r,i;typeof e==`string`?(i=t,r=n):(i=e.range.start,r=t),i||=K.create(0,0);let a=Tm(e),o=Vm(r);return Pm({index:0,tokens:Om({lines:a,position:i,options:o}),position:i})}function wm(e,t){let n=Vm(t),r=Tm(e);if(r.length===0)return!1;let i=r[0],a=r[r.length-1],o=n.start,s=n.end;return!!o?.exec(i)&&!!s?.exec(a)}function Tm(e){let t=``;return t=typeof e==`string`?e:e.text,t.split(en)}var Em=/\s*(@([\p{L}][\p{L}\p{N}]*)?)/uy,Dm=/\{(@[\p{L}][\p{L}\p{N}]*)(\s*)([^\r\n}]+)?\}/gu;function Om(e){let t=[],n=e.position.line,r=e.position.character;for(let i=0;i<e.lines.length;i++){let a=i===0,o=i===e.lines.length-1,s=e.lines[i],c=0;if(a&&e.options.start){let t=e.options.start?.exec(s);t&&(c=t.index+t[0].length)}else{let t=e.options.line?.exec(s);t&&(c=t.index+t[0].length)}if(o){let t=e.options.end?.exec(s);t&&(s=s.substring(0,t.index))}if(s=s.substring(0,Nm(s)),Mm(s,c)>=s.length){if(t.length>0){let e=K.create(n,r);t.push({type:`break`,content:``,range:q.create(e,e)})}}else{Em.lastIndex=c;let e=Em.exec(s);if(e){let i=e[0],a=e[1],o=K.create(n,r+c),l=K.create(n,r+c+i.length);t.push({type:`tag`,content:a,range:q.create(o,l)}),c+=i.length,c=Mm(s,c)}if(c<s.length){let e=s.substring(c),i=Array.from(e.matchAll(Dm));t.push(...km(i,e,n,r+c))}}n++,r=0}return t.length>0&&t[t.length-1].type===`break`?t.slice(0,-1):t}function km(e,t,n,r){let i=[];if(e.length===0){let e=K.create(n,r),a=K.create(n,r+t.length);i.push({type:`text`,content:t,range:q.create(e,a)})}else{let a=0;for(let o of e){let e=o.index,s=t.substring(a,e);s.length>0&&i.push({type:`text`,content:t.substring(a,e),range:q.create(K.create(n,a+r),K.create(n,e+r))});let c=s.length+1,l=o[1];if(i.push({type:`inline-tag`,content:l,range:q.create(K.create(n,a+c+r),K.create(n,a+c+l.length+r))}),c+=l.length,o.length===4){c+=o[2].length;let e=o[3];i.push({type:`text`,content:e,range:q.create(K.create(n,a+c+r),K.create(n,a+c+e.length+r))})}else i.push({type:`text`,content:``,range:q.create(K.create(n,a+c+r),K.create(n,a+c+r))});a=e+o[0].length}let o=t.substring(a);o.length>0&&i.push({type:`text`,content:o,range:q.create(K.create(n,a+r),K.create(n,a+r+o.length))})}return i}var Am=/\S/,jm=/\s*$/;function Mm(e,t){let n=e.substring(t).match(Am);return n?t+n.index:e.length}function Nm(e){let t=e.match(jm);if(t&&typeof t.index==`number`)return t.index}function Pm(e){let t=K.create(e.position.line,e.position.character);if(e.tokens.length===0)return new Um([],q.create(t,t));let n=[];for(;e.index<e.tokens.length;){let t=Fm(e,n[n.length-1]);t&&n.push(t)}let r=n[0]?.range.start??t,i=n[n.length-1]?.range.end??t;return new Um(n,q.create(r,i))}function Fm(e,t){let n=e.tokens[e.index];if(n.type===`tag`)return zm(e,!1);if(n.type===`text`||n.type===`inline-tag`)return Lm(e);Im(n,t),e.index++}function Im(e,t){if(t){let n=new Jm(``,e.range);`inlines`in t?t.inlines.push(n):t.content.inlines.push(n)}}function Lm(e){let t=e.tokens[e.index],n=t,r=t,i=[];for(;t&&t.type!==`break`&&t.type!==`tag`;)i.push(Rm(e)),r=t,t=e.tokens[e.index];return new qm(i,q.create(n.range.start,r.range.end))}function Rm(e){return e.tokens[e.index].type===`inline-tag`?zm(e,!0):Bm(e)}function zm(e,t){let n=e.tokens[e.index++],r=n.content.substring(1);if(e.tokens[e.index]?.type===`text`)if(t){let i=Bm(e);return new Wm(r,new qm([i],i.range),t,q.create(n.range.start,i.range.end))}else{let i=Lm(e);return new Wm(r,i,t,q.create(n.range.start,i.range.end))}else{let e=n.range;return new Wm(r,new qm([],e),t,e)}}function Bm(e){let t=e.tokens[e.index++];return new Jm(t.content,t.range)}function Vm(e){if(!e)return Vm({start:`/**`,end:`*/`,line:`*`});let{start:t,end:n,line:r}=e;return{start:Hm(t,!0),end:Hm(n,!1),line:Hm(r,!0)}}function Hm(e,t){if(typeof e==`string`||typeof e==`object`){let n=typeof e==`string`?sn(e):e.source;return RegExp(t?`^\\s*${n}`:`\\s*${n}\\s*$`)}else return e}var Um=class{constructor(e,t){this.elements=e,this.range=t}getTag(e){return this.getAllTags().find(t=>t.name===e)}getTags(e){return this.getAllTags().filter(t=>t.name===e)}getAllTags(){return this.elements.filter(e=>`name`in e)}toString(){let e=``;for(let t of this.elements)if(e.length===0)e=t.toString();else{let n=t.toString();e+=Ym(e)+n}return e.trim()}toMarkdown(e){let t=``;for(let n of this.elements)if(t.length===0)t=n.toMarkdown(e);else{let r=n.toMarkdown(e);t+=Ym(t)+r}return t.trim()}},Wm=class{constructor(e,t,n,r){this.name=e,this.content=t,this.inline=n,this.range=r}toString(){let e=`@${this.name}`,t=this.content.toString();return this.content.inlines.length===1?e=`${e} ${t}`:this.content.inlines.length>1&&(e=`${e}\n${t}`),this.inline?`{${e}}`:e}toMarkdown(e){return e?.renderTag?.(this)??this.toMarkdownDefault(e)}toMarkdownDefault(e){let t=this.content.toMarkdown(e);if(this.inline){let n=Gm(this.name,t,e??{});if(typeof n==`string`)return n}let n=``;e?.tag===`italic`||e?.tag===void 0?n=`*`:e?.tag===`bold`?n=`**`:e?.tag===`bold-italic`&&(n=`***`);let r=`${n}@${this.name}${n}`;return this.content.inlines.length===1?r=`${r} — ${t}`:this.content.inlines.length>1&&(r=`${r}\n${t}`),this.inline?`{${r}}`:r}};function Gm(e,t,n){if(e===`linkplain`||e===`linkcode`||e===`link`){let r=t.indexOf(` `),i=t;if(r>0){let e=Mm(t,r);i=t.substring(e),t=t.substring(0,r)}return(e===`linkcode`||e===`link`&&n.link===`code`)&&(i=`\`${i}\``),n.renderLink?.(t,i)??Km(t,i)}}function Km(e,t){try{return Hf.parse(e,!0),`[${t}](${e})`}catch{return e}}var qm=class{constructor(e,t){this.inlines=e,this.range=t}toString(){let e=``;for(let t=0;t<this.inlines.length;t++){let n=this.inlines[t],r=this.inlines[t+1];e+=n.toString(),r&&r.range.start.line>n.range.start.line&&(e+=`
88
- `)}return e}toMarkdown(e){let t=``;for(let n=0;n<this.inlines.length;n++){let r=this.inlines[n],i=this.inlines[n+1];t+=r.toMarkdown(e),i&&i.range.start.line>r.range.start.line&&(t+=`
89
- `)}return t}},Jm=class{constructor(e,t){this.text=e,this.range=t}toString(){return this.text}toMarkdown(){return this.text}};function Ym(e){return e.endsWith(`
90
- `)?`
91
- `:`
92
-
93
- `}var Xm=class{constructor(e){this.indexManager=e.shared.workspace.IndexManager,this.commentProvider=e.documentation.CommentProvider}getDocumentation(e){let t=this.commentProvider.getComment(e);if(t&&wm(t))return Cm(t).toMarkdown({renderLink:(t,n)=>this.documentationLinkRenderer(e,t,n),renderTag:t=>this.documentationTagRenderer(e,t)})}documentationLinkRenderer(e,t,n){let r=this.findNameInLocalSymbols(e,t)??this.findNameInGlobalScope(e,t);if(r&&r.nameSegment){let e=r.nameSegment.range.start.line+1,t=r.nameSegment.range.start.character+1;return`[${n}](${r.documentUri.with({fragment:`L${e},${t}`}).toString()})`}else return}documentationTagRenderer(e,t){}findNameInLocalSymbols(e,t){let n=T(e).localSymbols;if(!n)return;let r=e;do{let e=n.getStream(r).find(e=>e.name===t);if(e)return e;r=r.$container}while(r)}findNameInGlobalScope(e,t){return this.indexManager.allElements().find(e=>e.name===t)}},Zm=class{constructor(e){this.grammarConfig=()=>e.parser.GrammarConfig}getComment(e){return lp(e)?e.$comment:It(e.$cstNode,this.grammarConfig().multilineCommentRules)?.text}},Qm=class{constructor(e){this.syncParser=e.parser.LangiumParser}parse(e,t){return Promise.resolve(this.syncParser.parse(e))}},$m=class{constructor(){this.previousTokenSource=new X.CancellationTokenSource,this.writeQueue=[],this.readQueue=[],this.done=!0}write(e){this.cancelWrite();let t=kf();return this.previousTokenSource=t,this.enqueue(this.writeQueue,e,t.token)}read(e){return this.enqueue(this.readQueue,e)}enqueue(e,t,n=X.CancellationToken.None){let r=new Nf,i={action:t,deferred:r,cancellationToken:n};return e.push(i),this.performNextOperation(),r.promise}async performNextOperation(){if(!this.done)return;let e=[];if(this.writeQueue.length>0)e.push(this.writeQueue.shift());else if(this.readQueue.length>0)e.push(...this.readQueue.splice(0,this.readQueue.length));else return;this.done=!1,await Promise.all(e.map(async({action:e,deferred:t,cancellationToken:n})=>{try{let r=await Promise.resolve().then(()=>e(n));t.resolve(r)}catch(e){jf(e)?t.resolve(void 0):t.reject(e)}})),this.done=!0,this.performNextOperation()}cancelWrite(){this.previousTokenSource.cancel()}},eh=class{constructor(e){this.grammarElementIdMap=new ep,this.tokenTypeIdMap=new ep,this.grammar=e.Grammar,this.lexer=e.parser.Lexer,this.linker=e.references.Linker}dehydrate(e){return{lexerErrors:e.lexerErrors,lexerReport:e.lexerReport?this.dehydrateLexerReport(e.lexerReport):void 0,parserErrors:e.parserErrors.map(e=>({...e,message:e.message})),value:this.dehydrateAstNode(e.value,this.createDehyrationContext(e.value))}}dehydrateLexerReport(e){return e}createDehyrationContext(e){let t=new Map,n=new Map;for(let n of O(e))t.set(n,{});if(e.$cstNode)for(let t of Ot(e.$cstNode))n.set(t,{});return{astNodes:t,cstNodes:n}}dehydrateAstNode(e,t){let n=t.astNodes.get(e);n.$type=e.$type,n.$containerIndex=e.$containerIndex,n.$containerProperty=e.$containerProperty,e.$cstNode!==void 0&&(n.$cstNode=this.dehydrateCstNode(e.$cstNode,t));for(let[r,i]of Object.entries(e))if(!r.startsWith(`$`))if(Array.isArray(i)){let e=[];n[r]=e;for(let n of i)o(n)?e.push(this.dehydrateAstNode(n,t)):s(n)?e.push(this.dehydrateReference(n,t)):e.push(n)}else o(i)?n[r]=this.dehydrateAstNode(i,t):s(i)?n[r]=this.dehydrateReference(i,t):i!==void 0&&(n[r]=i);return n}dehydrateReference(e,t){let n={};return n.$refText=e.$refText,e.$refNode&&(n.$refNode=t.cstNodes.get(e.$refNode)),n}dehydrateCstNode(e,t){let n=t.cstNodes.get(e);return m(e)?n.fullText=e.fullText:n.grammarSource=this.getGrammarElementId(e.grammarSource),n.hidden=e.hidden,n.astNode=t.astNodes.get(e.astNode),f(e)?n.content=e.content.map(e=>this.dehydrateCstNode(e,t)):p(e)&&(n.tokenType=e.tokenType.name,n.offset=e.offset,n.length=e.length,n.startLine=e.range.start.line,n.startColumn=e.range.start.character,n.endLine=e.range.end.line,n.endColumn=e.range.end.character),n}hydrate(e){let t=e.value,n=this.createHydrationContext(t);return`$cstNode`in t&&this.hydrateCstNode(t.$cstNode,n),{lexerErrors:e.lexerErrors,lexerReport:e.lexerReport,parserErrors:e.parserErrors,value:this.hydrateAstNode(t,n)}}createHydrationContext(e){let t=new Map,n=new Map;for(let n of O(e))t.set(n,{});let r;if(e.$cstNode)for(let t of Ot(e.$cstNode)){let e;`fullText`in t?(e=new Rd(t.fullText),r=e):`content`in t?e=new Id:`tokenType`in t&&(e=this.hydrateCstLeafNode(t)),e&&(n.set(t,e),e.root=r)}return{astNodes:t,cstNodes:n}}hydrateAstNode(e,t){let n=t.astNodes.get(e);n.$type=e.$type,n.$containerIndex=e.$containerIndex,n.$containerProperty=e.$containerProperty,e.$cstNode&&(n.$cstNode=t.cstNodes.get(e.$cstNode));for(let[r,i]of Object.entries(e))if(!r.startsWith(`$`))if(Array.isArray(i)){let e=[];n[r]=e;for(let a of i)o(a)?e.push(this.setParent(this.hydrateAstNode(a,t),n)):s(a)?e.push(this.hydrateReference(a,n,r,t)):e.push(a)}else o(i)?n[r]=this.setParent(this.hydrateAstNode(i,t),n):s(i)?n[r]=this.hydrateReference(i,n,r,t):i!==void 0&&(n[r]=i);return n}setParent(e,t){return e.$container=t,e}hydrateReference(e,t,n,r){return this.linker.buildReference(t,n,r.cstNodes.get(e.$refNode),e.$refText)}hydrateCstNode(e,t,n=0){let r=t.cstNodes.get(e);if(typeof e.grammarSource==`number`&&(r.grammarSource=this.getGrammarElement(e.grammarSource)),r.astNode=t.astNodes.get(e.astNode),f(r))for(let i of e.content){let e=this.hydrateCstNode(i,t,n++);r.content.push(e)}return r}hydrateCstLeafNode(e){let t=this.getTokenType(e.tokenType),n=e.offset,r=e.length,i=e.startLine,a=e.startColumn,o=e.endLine,s=e.endColumn,c=e.hidden;return new Fd(n,r,{start:{line:i,character:a},end:{line:o,character:s}},t,c)}getTokenType(e){return this.lexer.definition[e]}getGrammarElementId(e){if(e)return this.grammarElementIdMap.size===0&&this.createGrammarElementIdMap(),this.grammarElementIdMap.get(e)}getGrammarElement(e){return this.grammarElementIdMap.size===0&&this.createGrammarElementIdMap(),this.grammarElementIdMap.getKey(e)}createGrammarElementIdMap(){let e=0;for(let t of O(this.grammar))ae(t)&&this.grammarElementIdMap.set(t,e++)}};function th(e){return{documentation:{CommentProvider:e=>new Zm(e),DocumentationProvider:e=>new Xm(e)},parser:{AsyncParser:e=>new Qm(e),GrammarConfig:e=>Bn(e),LangiumParser:e=>_f(e),CompletionParser:e=>gf(e),ValueConverter:()=>new bf,TokenBuilder:()=>new yf,Lexer:e=>new ym(e),ParserErrorMessageProvider:()=>new Kd,LexerErrorMessageProvider:()=>new _m},workspace:{AstNodeLocator:()=>new wp,AstNodeDescriptionProvider:e=>new Sp(e),ReferenceDescriptionProvider:e=>new Cp(e)},references:{Linker:e=>new Yf(e),NameProvider:()=>new Zf,ScopeProvider:e=>new cp(e),ScopeComputation:e=>new tp(e),References:e=>new Qf(e)},serializer:{Hydrator:e=>new eh(e),JsonSerializer:e=>new dp(e)},validation:{DocumentValidator:e=>new _p(e),ValidationRegistry:e=>new hp(e)},shared:()=>e.shared}}function nh(e){return{ServiceRegistry:e=>new fp(e),workspace:{LangiumDocuments:e=>new qf(e),LangiumDocumentFactory:e=>new Kf(e),DocumentBuilder:e=>new mm(e),IndexManager:e=>new hm(e),WorkspaceManager:e=>new gm(e),FileSystemProvider:t=>e.fileSystemProvider(t),WorkspaceLock:()=>new $m,ConfigurationProvider:e=>new Ep(e)},profilers:{}}}var rh;(function(e){e.merge=(e,t)=>lh(lh({},e),t)})(rh||={});function ih(e,t,n,r,i,a,o,s,c){return oh([e,t,n,r,i,a,o,s,c].reduce(lh,{}))}var ah=Symbol(`isProxy`);function oh(e,t){let n=new Proxy({},{deleteProperty:()=>!1,set:()=>{throw Error(`Cannot set property on injected service container`)},get:(r,i)=>i===ah?!0:ch(r,i,e,t||n),getOwnPropertyDescriptor:(r,i)=>(ch(r,i,e,t||n),Object.getOwnPropertyDescriptor(r,i)),has:(t,n)=>n in e,ownKeys:()=>[...Object.getOwnPropertyNames(e)]});return n}var sh=Symbol();function ch(e,t,n,r){if(t in e){if(e[t]instanceof Error)throw Error(`Construction failure. Please make sure that your dependencies are constructable. Cause: `+e[t]);if(e[t]===sh)throw Error(`Cycle detected. Please make "`+String(t)+`" lazy. Visit https://langium.org/docs/reference/configuration-services/#resolving-cyclic-dependencies`);return e[t]}else if(t in n){let i=n[t];e[t]=sh;try{e[t]=typeof i==`function`?i(r):oh(i,r)}catch(n){throw e[t]=n instanceof Error?n:void 0,n}return e[t]}else return}function lh(e,t){if(t){for(let[n,r]of Object.entries(t))if(r!=null)if(typeof r==`object`){let t=e[n];typeof t==`object`&&t?e[n]=lh(t,r):e[n]=lh({},r)}else e[n]=r}return e}var uh=class{stat(e){throw Error(`No file system is available.`)}statSync(e){throw Error(`No file system is available.`)}async exists(){return!1}existsSync(){return!1}readBinary(){throw Error(`No file system is available.`)}readBinarySync(){throw Error(`No file system is available.`)}readFile(){throw Error(`No file system is available.`)}readFileSync(){throw Error(`No file system is available.`)}async readDirectory(){return[]}readDirectorySync(){return[]}},dh={fileSystemProvider:()=>new uh},fh={Grammar:()=>void 0,LanguageMetaData:()=>({caseInsensitive:!1,fileExtensions:[`.langium`],languageId:`langium`})},ph={AstReflection:()=>new Dt};function mh(){let e=ih(nh(dh),ph),t=ih(th({shared:e}),fh);return e.ServiceRegistry.register(t),t}function hh(e){let t=mh(),n=t.serializer.JsonSerializer.deserialize(e);return t.shared.workspace.LangiumDocumentFactory.fromModel(n,Hf.parse(`memory:/${n.name??`grammar`}.langium`)),n}var gh=Object.defineProperty,$=(e,t)=>gh(e,`name`,{value:t,configurable:!0}),_h;(e=>{e.Terminals={ARROW_DIRECTION:/L|R|T|B/,ARROW_GROUP:/\{group\}/,ARROW_INTO:/<|>/,ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,ID:/[\w]([-\w]*\w)?/,NEWLINE:/\r?\n/,WHITESPACE:/[\t ]+/,YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/,ARCH_ICON:/\([\w-:]+\)/,ARCH_TITLE:/\[(?:"([^"\\]|\\.)*"|'([^'\\]|\\.)*'|[\w ]+)\]/}})(_h||={});var vh;(e=>{e.Terminals={ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,INT:/0|[1-9][0-9]*(?!\.)/,STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,NEWLINE:/\r?\n/,WHITESPACE:/[\t ]+/,YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/,REFERENCE:/\w([-\./\w]*[-\w])?/}})(vh||={});var yh;(e=>{e.Terminals={ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,NEWLINE:/\r?\n/,WHITESPACE:/[\t ]+/,YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/}})(yh||={});var bh;(e=>{e.Terminals={ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,INT:/0|[1-9][0-9]*(?!\.)/,STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,NEWLINE:/\r?\n/,WHITESPACE:/[\t ]+/,YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/}})(bh||={});var xh;(e=>{e.Terminals={NUMBER_PIE:/(?:-?[0-9]+\.[0-9]+(?!\.))|(?:-?(0|[1-9][0-9]*)(?!\.))/,ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,NEWLINE:/\r?\n/,WHITESPACE:/[\t ]+/,YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/}})(xh||={});var Sh;(e=>{e.Terminals={GRATICULE:/circle|polygon/,BOOLEAN:/true|false/,ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,NUMBER:/(?:[0-9]+\.[0-9]+(?!\.))|(?:0|[1-9][0-9]*(?!\.))/,STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,ID:/[\w]([-\w]*\w)?/,NEWLINE:/\r?\n/,WHITESPACE:/[\t ]+/,YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/}})(Sh||={});var Ch;(e=>{e.Terminals={ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,TREEMAP_KEYWORD:/treemap-beta|treemap/,CLASS_DEF:/classDef\s+([a-zA-Z_][a-zA-Z0-9_]+)(?:\s+([^;\r\n]*))?(?:;)?/,STYLE_SEPARATOR:/:::/,SEPARATOR:/:/,COMMA:/,/,INDENTATION:/[ \t]{1,}/,WS:/[ \t]+/,ML_COMMENT:/\%\%[^\n]*/,NL:/\r?\n/,ID2:/[a-zA-Z_][a-zA-Z0-9_]*/,NUMBER2:/[0-9_\.\,]+/,STRING2:/"[^"]*"|'[^']*'/}})(Ch||={}),{..._h.Terminals,...vh.Terminals,...yh.Terminals,...bh.Terminals,...xh.Terminals,...Sh.Terminals,...Ch.Terminals};var wh={$type:`Architecture`,accDescr:`accDescr`,accTitle:`accTitle`,edges:`edges`,groups:`groups`,junctions:`junctions`,services:`services`,title:`title`};function Th(e){return dg.isInstance(e,wh.$type)}$(Th,`isArchitecture`);var Eh={$type:`Axis`,label:`label`,name:`name`},Dh={$type:`Branch`,name:`name`,order:`order`};function Oh(e){return dg.isInstance(e,Dh.$type)}$(Oh,`isBranch`);var kh={$type:`Checkout`,branch:`branch`},Ah={$type:`CherryPicking`,id:`id`,parent:`parent`,tags:`tags`},jh={$type:`ClassDefStatement`,className:`className`,styleText:`styleText`},Mh={$type:`Commit`,id:`id`,message:`message`,tags:`tags`,type:`type`};function Nh(e){return dg.isInstance(e,Mh.$type)}$(Nh,`isCommit`);var Ph={$type:`Curve`,entries:`entries`,label:`label`,name:`name`},Fh={$type:`Direction`,accDescr:`accDescr`,accTitle:`accTitle`,dir:`dir`,statements:`statements`,title:`title`},Ih={$type:`Edge`,lhsDir:`lhsDir`,lhsGroup:`lhsGroup`,lhsId:`lhsId`,lhsInto:`lhsInto`,rhsDir:`rhsDir`,rhsGroup:`rhsGroup`,rhsId:`rhsId`,rhsInto:`rhsInto`,title:`title`},Lh={$type:`Entry`,axis:`axis`,value:`value`},Rh={$type:`GitGraph`,accDescr:`accDescr`,accTitle:`accTitle`,statements:`statements`,title:`title`};function zh(e){return dg.isInstance(e,Rh.$type)}$(zh,`isGitGraph`);var Bh={$type:`Group`,icon:`icon`,id:`id`,in:`in`,title:`title`},Vh={$type:`Info`,accDescr:`accDescr`,accTitle:`accTitle`,title:`title`};function Hh(e){return dg.isInstance(e,Vh.$type)}$(Hh,`isInfo`);var Uh={$type:`Item`,classSelector:`classSelector`,name:`name`},Wh={$type:`Junction`,id:`id`,in:`in`},Gh={$type:`Leaf`,classSelector:`classSelector`,name:`name`,value:`value`},Kh={$type:`Merge`,branch:`branch`,id:`id`,tags:`tags`,type:`type`};function qh(e){return dg.isInstance(e,Kh.$type)}$(qh,`isMerge`);var Jh={$type:`Option`,name:`name`,value:`value`},Yh={$type:`Packet`,accDescr:`accDescr`,accTitle:`accTitle`,blocks:`blocks`,title:`title`};function Xh(e){return dg.isInstance(e,Yh.$type)}$(Xh,`isPacket`);var Zh={$type:`PacketBlock`,bits:`bits`,end:`end`,label:`label`,start:`start`};function Qh(e){return dg.isInstance(e,Zh.$type)}$(Qh,`isPacketBlock`);var $h={$type:`Pie`,accDescr:`accDescr`,accTitle:`accTitle`,sections:`sections`,showData:`showData`,title:`title`};function eg(e){return dg.isInstance(e,$h.$type)}$(eg,`isPie`);var tg={$type:`PieSection`,label:`label`,value:`value`};function ng(e){return dg.isInstance(e,tg.$type)}$(ng,`isPieSection`);var rg={$type:`Radar`,accDescr:`accDescr`,accTitle:`accTitle`,axes:`axes`,curves:`curves`,options:`options`,title:`title`},ig={$type:`Section`,classSelector:`classSelector`,name:`name`},ag={$type:`Service`,icon:`icon`,iconText:`iconText`,id:`id`,in:`in`,title:`title`},og={$type:`Statement`},sg={$type:`Treemap`,accDescr:`accDescr`,accTitle:`accTitle`,title:`title`,TreemapRows:`TreemapRows`};function cg(e){return dg.isInstance(e,sg.$type)}$(cg,`isTreemap`);var lg={$type:`TreemapRow`,indent:`indent`,item:`item`},ug=class extends d{constructor(){super(...arguments),this.types={Architecture:{name:wh.$type,properties:{accDescr:{name:wh.accDescr},accTitle:{name:wh.accTitle},edges:{name:wh.edges,defaultValue:[]},groups:{name:wh.groups,defaultValue:[]},junctions:{name:wh.junctions,defaultValue:[]},services:{name:wh.services,defaultValue:[]},title:{name:wh.title}},superTypes:[]},Axis:{name:Eh.$type,properties:{label:{name:Eh.label},name:{name:Eh.name}},superTypes:[]},Branch:{name:Dh.$type,properties:{name:{name:Dh.name},order:{name:Dh.order}},superTypes:[og.$type]},Checkout:{name:kh.$type,properties:{branch:{name:kh.branch}},superTypes:[og.$type]},CherryPicking:{name:Ah.$type,properties:{id:{name:Ah.id},parent:{name:Ah.parent},tags:{name:Ah.tags,defaultValue:[]}},superTypes:[og.$type]},ClassDefStatement:{name:jh.$type,properties:{className:{name:jh.className},styleText:{name:jh.styleText}},superTypes:[]},Commit:{name:Mh.$type,properties:{id:{name:Mh.id},message:{name:Mh.message},tags:{name:Mh.tags,defaultValue:[]},type:{name:Mh.type}},superTypes:[og.$type]},Curve:{name:Ph.$type,properties:{entries:{name:Ph.entries,defaultValue:[]},label:{name:Ph.label},name:{name:Ph.name}},superTypes:[]},Direction:{name:Fh.$type,properties:{accDescr:{name:Fh.accDescr},accTitle:{name:Fh.accTitle},dir:{name:Fh.dir},statements:{name:Fh.statements,defaultValue:[]},title:{name:Fh.title}},superTypes:[Rh.$type]},Edge:{name:Ih.$type,properties:{lhsDir:{name:Ih.lhsDir},lhsGroup:{name:Ih.lhsGroup,defaultValue:!1},lhsId:{name:Ih.lhsId},lhsInto:{name:Ih.lhsInto,defaultValue:!1},rhsDir:{name:Ih.rhsDir},rhsGroup:{name:Ih.rhsGroup,defaultValue:!1},rhsId:{name:Ih.rhsId},rhsInto:{name:Ih.rhsInto,defaultValue:!1},title:{name:Ih.title}},superTypes:[]},Entry:{name:Lh.$type,properties:{axis:{name:Lh.axis,referenceType:Eh.$type},value:{name:Lh.value}},superTypes:[]},GitGraph:{name:Rh.$type,properties:{accDescr:{name:Rh.accDescr},accTitle:{name:Rh.accTitle},statements:{name:Rh.statements,defaultValue:[]},title:{name:Rh.title}},superTypes:[]},Group:{name:Bh.$type,properties:{icon:{name:Bh.icon},id:{name:Bh.id},in:{name:Bh.in},title:{name:Bh.title}},superTypes:[]},Info:{name:Vh.$type,properties:{accDescr:{name:Vh.accDescr},accTitle:{name:Vh.accTitle},title:{name:Vh.title}},superTypes:[]},Item:{name:Uh.$type,properties:{classSelector:{name:Uh.classSelector},name:{name:Uh.name}},superTypes:[]},Junction:{name:Wh.$type,properties:{id:{name:Wh.id},in:{name:Wh.in}},superTypes:[]},Leaf:{name:Gh.$type,properties:{classSelector:{name:Gh.classSelector},name:{name:Gh.name},value:{name:Gh.value}},superTypes:[Uh.$type]},Merge:{name:Kh.$type,properties:{branch:{name:Kh.branch},id:{name:Kh.id},tags:{name:Kh.tags,defaultValue:[]},type:{name:Kh.type}},superTypes:[og.$type]},Option:{name:Jh.$type,properties:{name:{name:Jh.name},value:{name:Jh.value,defaultValue:!1}},superTypes:[]},Packet:{name:Yh.$type,properties:{accDescr:{name:Yh.accDescr},accTitle:{name:Yh.accTitle},blocks:{name:Yh.blocks,defaultValue:[]},title:{name:Yh.title}},superTypes:[]},PacketBlock:{name:Zh.$type,properties:{bits:{name:Zh.bits},end:{name:Zh.end},label:{name:Zh.label},start:{name:Zh.start}},superTypes:[]},Pie:{name:$h.$type,properties:{accDescr:{name:$h.accDescr},accTitle:{name:$h.accTitle},sections:{name:$h.sections,defaultValue:[]},showData:{name:$h.showData,defaultValue:!1},title:{name:$h.title}},superTypes:[]},PieSection:{name:tg.$type,properties:{label:{name:tg.label},value:{name:tg.value}},superTypes:[]},Radar:{name:rg.$type,properties:{accDescr:{name:rg.accDescr},accTitle:{name:rg.accTitle},axes:{name:rg.axes,defaultValue:[]},curves:{name:rg.curves,defaultValue:[]},options:{name:rg.options,defaultValue:[]},title:{name:rg.title}},superTypes:[]},Section:{name:ig.$type,properties:{classSelector:{name:ig.classSelector},name:{name:ig.name}},superTypes:[Uh.$type]},Service:{name:ag.$type,properties:{icon:{name:ag.icon},iconText:{name:ag.iconText},id:{name:ag.id},in:{name:ag.in},title:{name:ag.title}},superTypes:[]},Statement:{name:og.$type,properties:{},superTypes:[]},Treemap:{name:sg.$type,properties:{accDescr:{name:sg.accDescr},accTitle:{name:sg.accTitle},title:{name:sg.title},TreemapRows:{name:sg.TreemapRows,defaultValue:[]}},superTypes:[]},TreemapRow:{name:lg.$type,properties:{indent:{name:lg.indent},item:{name:lg.item}},superTypes:[]}}}static{$(this,`MermaidAstReflection`)}},dg=new ug,fg,pg=$(()=>fg??=hh(`{"$type":"Grammar","isDeclared":true,"name":"ArchitectureGrammar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Architecture","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[],"cardinality":"*"},{"$type":"Keyword","value":"architecture-beta"},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"Statement","definition":{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"groups","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Assignment","feature":"services","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}},{"$type":"Assignment","feature":"junctions","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}},{"$type":"Assignment","feature":"edges","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}}]},"entry":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"LeftPort","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":":"},{"$type":"Assignment","feature":"lhsDir","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}}]},"entry":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"RightPort","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"rhsDir","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}},{"$type":"Keyword","value":":"}]},"entry":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"Arrow","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]},{"$type":"Assignment","feature":"lhsInto","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]},"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"--"},{"$type":"Group","elements":[{"$type":"Keyword","value":"-"},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@29"},"arguments":[]}},{"$type":"Keyword","value":"-"}]}]},{"$type":"Assignment","feature":"rhsInto","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}]},"entry":false,"parameters":[]},{"$type":"ParserRule","name":"Group","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"group"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}},{"$type":"Assignment","feature":"icon","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@28"},"arguments":[]},"cardinality":"?"},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@29"},"arguments":[]},"cardinality":"?"},{"$type":"Group","elements":[{"$type":"Keyword","value":"in"},{"$type":"Assignment","feature":"in","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Service","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"service"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"iconText","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@21"},"arguments":[]}},{"$type":"Assignment","feature":"icon","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@28"},"arguments":[]}}],"cardinality":"?"},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@29"},"arguments":[]},"cardinality":"?"},{"$type":"Group","elements":[{"$type":"Keyword","value":"in"},{"$type":"Assignment","feature":"in","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Junction","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"junction"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"in"},{"$type":"Assignment","feature":"in","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Edge","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"lhsId","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}},{"$type":"Assignment","feature":"lhsGroup","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]},{"$type":"Assignment","feature":"rhsId","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}},{"$type":"Assignment","feature":"rhsGroup","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"ARROW_DIRECTION","definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"L"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"R"},"parenthesized":false}],"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"T"},"parenthesized":false}],"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"B"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARROW_GROUP","definition":{"$type":"RegexToken","regex":"/\\\\{group\\\\}/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARROW_INTO","definition":{"$type":"RegexToken","regex":"/<|>/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"ParserRule","name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@18"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@19"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","name":"ARCH_ICON","definition":{"$type":"RegexToken","regex":"/\\\\([\\\\w-:]+\\\\)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARCH_TITLE","definition":{"$type":"RegexToken","regex":"/\\\\[(?:\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'|[\\\\w ]+)\\\\]/","parenthesized":false},"fragment":false,"hidden":false}],"interfaces":[],"types":[]}`),`ArchitectureGrammarGrammar`),mg,hg=$(()=>mg??=hh(`{"$type":"Grammar","isDeclared":true,"name":"GitGraphGrammar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"GitGraph","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[],"cardinality":"*"},{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"gitGraph"},{"$type":"Group","elements":[{"$type":"Keyword","value":"gitGraph"},{"$type":"Keyword","value":":"}]},{"$type":"Keyword","value":"gitGraph:"},{"$type":"Group","elements":[{"$type":"Keyword","value":"gitGraph"},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]},{"$type":"Keyword","value":":"}]}]},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]},{"$type":"Assignment","feature":"statements","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Statement","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Direction","definition":{"$type":"Assignment","feature":"dir","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"LR"},{"$type":"Keyword","value":"TB"},{"$type":"Keyword","value":"BT"}]}},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Commit","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"commit"},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Keyword","value":"id:"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"msg:","cardinality":"?"},{"$type":"Assignment","feature":"message","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"tag:"},{"$type":"Assignment","feature":"tags","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"type:"},{"$type":"Assignment","feature":"type","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"NORMAL"},{"$type":"Keyword","value":"REVERSE"},{"$type":"Keyword","value":"HIGHLIGHT"}]}}]}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Branch","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"branch"},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@24"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"order:"},{"$type":"Assignment","feature":"order","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Merge","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"merge"},{"$type":"Assignment","feature":"branch","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@24"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}]}},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Keyword","value":"id:"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"tag:"},{"$type":"Assignment","feature":"tags","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"type:"},{"$type":"Assignment","feature":"type","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"NORMAL"},{"$type":"Keyword","value":"REVERSE"},{"$type":"Keyword","value":"HIGHLIGHT"}]}}]}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Checkout","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"checkout"},{"$type":"Keyword","value":"switch"}]},{"$type":"Assignment","feature":"branch","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@24"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"CherryPicking","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"cherry-pick"},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Keyword","value":"id:"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"tag:"},{"$type":"Assignment","feature":"tags","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"parent:"},{"$type":"Assignment","feature":"parent","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@14"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@15"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","name":"REFERENCE","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\\\w([-\\\\./\\\\w]*[-\\\\w])?/","parenthesized":false},"fragment":false,"hidden":false}],"interfaces":[],"types":[]}`),`GitGraphGrammarGrammar`),gg,_g=$(()=>gg??=hh(`{"$type":"Grammar","isDeclared":true,"name":"InfoGrammar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Info","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[],"cardinality":"*"},{"$type":"Keyword","value":"info"},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[],"cardinality":"*"},{"$type":"Group","elements":[{"$type":"Keyword","value":"showInfo"},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[],"cardinality":"*"}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[],"cardinality":"?"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@7"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@8"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false}],"interfaces":[],"types":[]}`),`InfoGrammarGrammar`),vg,yg=$(()=>vg??=hh(`{"$type":"Grammar","isDeclared":true,"name":"PacketGrammar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Packet","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[],"cardinality":"*"},{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"packet"},{"$type":"Keyword","value":"packet-beta"}]},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]},{"$type":"Assignment","feature":"blocks","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"PacketBlock","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Assignment","feature":"start","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"-"},{"$type":"Assignment","feature":"end","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}}],"cardinality":"?"}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"+"},{"$type":"Assignment","feature":"bits","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}}]}]},{"$type":"Keyword","value":":"},{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@8"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@9"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false}],"interfaces":[],"types":[]}`),`PacketGrammarGrammar`),bg,xg=$(()=>bg??=hh(`{"$type":"Grammar","isDeclared":true,"name":"PieGrammar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Pie","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[],"cardinality":"*"},{"$type":"Keyword","value":"pie"},{"$type":"Assignment","feature":"showData","operator":"?=","terminal":{"$type":"Keyword","value":"showData"},"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]},{"$type":"Assignment","feature":"sections","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"PieSection","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]}},{"$type":"Keyword","value":":"},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"FLOAT_PIE","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/-?[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT_PIE","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/-?(0|[1-9][0-9]*)(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER_PIE","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@2"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@3"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"ParserRule","name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@11"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@12"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false}],"interfaces":[],"types":[]}`),`PieGrammarGrammar`),Sg,Cg=$(()=>Sg??=hh(`{"$type":"Grammar","isDeclared":true,"name":"RadarGrammar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Radar","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"},{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"radar-beta"},{"$type":"Keyword","value":"radar-beta:"},{"$type":"Group","elements":[{"$type":"Keyword","value":"radar-beta"},{"$type":"Keyword","value":":"}]}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]},{"$type":"Group","elements":[{"$type":"Keyword","value":"axis"},{"$type":"Assignment","feature":"axes","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"axes","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}}],"cardinality":"*"}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"curve"},{"$type":"Assignment","feature":"curves","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"curves","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}}],"cardinality":"*"}]},{"$type":"Group","elements":[{"$type":"Assignment","feature":"options","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"options","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}}],"cardinality":"*"}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"Label","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]}},{"$type":"Keyword","value":"]"}]},"entry":false,"parameters":[]},{"$type":"ParserRule","name":"Axis","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[],"cardinality":"?"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Curve","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[],"cardinality":"?"},{"$type":"Keyword","value":"{"},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]},{"$type":"Keyword","value":"}"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"Entries","definition":{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"},{"$type":"Assignment","feature":"entries","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"},{"$type":"Assignment","feature":"entries","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"}]},{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"},{"$type":"Assignment","feature":"entries","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"},{"$type":"Assignment","feature":"entries","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"}]}]},"entry":false,"parameters":[]},{"$type":"ParserRule","name":"DetailedEntry","returnType":{"$ref":"#/interfaces@0"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"axis","operator":"=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@2"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},"deprecatedSyntax":false,"isMulti":false}},{"$type":"Keyword","value":":","cardinality":"?"},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"NumberEntry","returnType":{"$ref":"#/interfaces@0"},"definition":{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Option","definition":{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Keyword","value":"showLegend"}},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Keyword","value":"ticks"}},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Keyword","value":"max"}},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Keyword","value":"min"}},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Keyword","value":"graticule"}},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}}]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"GRATICULE","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"circle"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"polygon"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"ParserRule","name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@15"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@16"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false}],"interfaces":[{"$type":"Interface","name":"Entry","attributes":[{"$type":"TypeAttribute","name":"axis","isOptional":true,"type":{"$type":"ReferenceType","referenceType":{"$type":"SimpleType","typeRef":{"$ref":"#/rules@2"}},"isMulti":false}},{"$type":"TypeAttribute","name":"value","type":{"$type":"SimpleType","primitiveType":"number"},"isOptional":false}],"superTypes":[]}],"types":[]}`),`RadarGrammarGrammar`),wg,Tg=$(()=>wg??=hh(`{"$type":"Grammar","isDeclared":true,"name":"TreemapGrammar","rules":[{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"ParserRule","entry":true,"name":"Treemap","returnType":{"$ref":"#/interfaces@4"},"definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@0"},"arguments":[]},{"$type":"Assignment","feature":"TreemapRows","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"TREEMAP_KEYWORD","definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"treemap-beta"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"treemap"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"CLASS_DEF","definition":{"$type":"RegexToken","regex":"/classDef\\\\s+([a-zA-Z_][a-zA-Z0-9_]+)(?:\\\\s+([^;\\\\r\\\\n]*))?(?:;)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STYLE_SEPARATOR","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":":::"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"SEPARATOR","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":":"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"COMMA","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":","},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INDENTATION","definition":{"$type":"RegexToken","regex":"/[ \\\\t]{1,}/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WS","definition":{"$type":"RegexToken","regex":"/[ \\\\t]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"ML_COMMENT","definition":{"$type":"RegexToken","regex":"/\\\\%\\\\%[^\\\\n]*/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"NL","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false},{"$type":"ParserRule","name":"TreemapRow","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"indent","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]},"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"item","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"ClassDef","dataType":"string","definition":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Item","returnType":{"$ref":"#/interfaces@0"},"definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Section","returnType":{"$ref":"#/interfaces@1"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]},{"$type":"Assignment","feature":"classSelector","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}],"cardinality":"?"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Leaf","returnType":{"$ref":"#/interfaces@2"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[],"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[],"cardinality":"?"},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]},{"$type":"Assignment","feature":"classSelector","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}],"cardinality":"?"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"ID2","definition":{"$type":"RegexToken","regex":"/[a-zA-Z_][a-zA-Z0-9_]*/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER2","definition":{"$type":"RegexToken","regex":"/[0-9_\\\\.\\\\,]+/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"ParserRule","name":"MyNumber","dataType":"number","definition":{"$type":"RuleCall","rule":{"$ref":"#/rules@21"},"arguments":[]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"STRING2","definition":{"$type":"RegexToken","regex":"/\\"[^\\"]*\\"|'[^']*'/","parenthesized":false},"fragment":false,"hidden":false}],"interfaces":[{"$type":"Interface","name":"Item","attributes":[{"$type":"TypeAttribute","name":"name","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false},{"$type":"TypeAttribute","name":"classSelector","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]},{"$type":"Interface","name":"Section","superTypes":[{"$ref":"#/interfaces@0"}],"attributes":[]},{"$type":"Interface","name":"Leaf","superTypes":[{"$ref":"#/interfaces@0"}],"attributes":[{"$type":"TypeAttribute","name":"value","type":{"$type":"SimpleType","primitiveType":"number"},"isOptional":false}]},{"$type":"Interface","name":"ClassDefStatement","attributes":[{"$type":"TypeAttribute","name":"className","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false},{"$type":"TypeAttribute","name":"styleText","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"Treemap","attributes":[{"$type":"TypeAttribute","name":"TreemapRows","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/rules@15"}}},"isOptional":false},{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]}],"imports":[],"types":[],"$comment":"/**\\n * Treemap grammar for Langium\\n * Converted from mindmap grammar\\n *\\n * The ML_COMMENT and NL hidden terminals handle whitespace, comments, and newlines\\n * before the treemap keyword, allowing for empty lines and comments before the\\n * treemap declaration.\\n */"}`),`TreemapGrammarGrammar`),Eg={languageId:`architecture`,fileExtensions:[`.mmd`,`.mermaid`],caseInsensitive:!1,mode:`production`},Dg={languageId:`gitGraph`,fileExtensions:[`.mmd`,`.mermaid`],caseInsensitive:!1,mode:`production`},Og={languageId:`info`,fileExtensions:[`.mmd`,`.mermaid`],caseInsensitive:!1,mode:`production`},kg={languageId:`packet`,fileExtensions:[`.mmd`,`.mermaid`],caseInsensitive:!1,mode:`production`},Ag={languageId:`pie`,fileExtensions:[`.mmd`,`.mermaid`],caseInsensitive:!1,mode:`production`},jg={languageId:`radar`,fileExtensions:[`.mmd`,`.mermaid`],caseInsensitive:!1,mode:`production`},Mg={languageId:`treemap`,fileExtensions:[`.mmd`,`.mermaid`],caseInsensitive:!1,mode:`production`},Ng={AstReflection:$(()=>new ug,`AstReflection`)},Pg={Grammar:$(()=>pg(),`Grammar`),LanguageMetaData:$(()=>Eg,`LanguageMetaData`),parser:{}},Fg={Grammar:$(()=>hg(),`Grammar`),LanguageMetaData:$(()=>Dg,`LanguageMetaData`),parser:{}},Ig={Grammar:$(()=>_g(),`Grammar`),LanguageMetaData:$(()=>Og,`LanguageMetaData`),parser:{}},Lg={Grammar:$(()=>yg(),`Grammar`),LanguageMetaData:$(()=>kg,`LanguageMetaData`),parser:{}},Rg={Grammar:$(()=>xg(),`Grammar`),LanguageMetaData:$(()=>Ag,`LanguageMetaData`),parser:{}},zg={Grammar:$(()=>Cg(),`Grammar`),LanguageMetaData:$(()=>jg,`LanguageMetaData`),parser:{}},Bg={Grammar:$(()=>Tg(),`Grammar`),LanguageMetaData:$(()=>Mg,`LanguageMetaData`),parser:{}},Vg={ACC_DESCR:/accDescr(?:[\t ]*:([^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/accTitle[\t ]*:([^\n\r]*)/,TITLE:/title([\t ][^\n\r]*|)/},Hg=class extends bf{static{$(this,`AbstractMermaidValueConverter`)}runConverter(e,t,n){let r=this.runCommonConverter(e,t,n);return r===void 0&&(r=this.runCustomConverter(e,t,n)),r===void 0?super.runConverter(e,t,n):r}runCommonConverter(e,t,n){let r=Vg[e.name];if(r===void 0)return;let i=r.exec(t);if(i!==null){if(i[1]!==void 0)return i[1].trim().replace(/[\t ]{2,}/gm,` `);if(i[2]!==void 0)return i[2].replace(/^\s*/gm,``).replace(/\s+$/gm,``).replace(/[\t ]{2,}/gm,` `).replace(/[\n\r]{2,}/gm,`
94
- `)}}},Ug=class extends Hg{static{$(this,`CommonValueConverter`)}runCustomConverter(e,t,n){}},Wg=class extends yf{static{$(this,`AbstractMermaidTokenBuilder`)}constructor(e){super(),this.keywords=new Set(e)}buildKeywordTokens(e,t,n){let r=super.buildKeywordTokens(e,t,n);return r.forEach(e=>{this.keywords.has(e.name)&&e.PATTERN!==void 0&&(e.PATTERN=RegExp(e.PATTERN.toString()+`(?:(?=%%)|(?!\\S))`))}),r}};(class extends Wg{static{$(this,`CommonTokenBuilder`)}}),Object.defineProperty(exports,`a`,{enumerable:!0,get:function(){return Fg}}),Object.defineProperty(exports,`c`,{enumerable:!0,get:function(){return Lg}}),Object.defineProperty(exports,`d`,{enumerable:!0,get:function(){return Bg}}),Object.defineProperty(exports,`f`,{enumerable:!0,get:function(){return $}}),Object.defineProperty(exports,`g`,{enumerable:!0,get:function(){return nh}}),Object.defineProperty(exports,`h`,{enumerable:!0,get:function(){return th}}),Object.defineProperty(exports,`i`,{enumerable:!0,get:function(){return Ug}}),Object.defineProperty(exports,`l`,{enumerable:!0,get:function(){return Rg}}),Object.defineProperty(exports,`m`,{enumerable:!0,get:function(){return ih}}),Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return Hg}}),Object.defineProperty(exports,`o`,{enumerable:!0,get:function(){return Ig}}),Object.defineProperty(exports,`p`,{enumerable:!0,get:function(){return dh}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return Pg}}),Object.defineProperty(exports,`s`,{enumerable:!0,get:function(){return Ng}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return Wg}}),Object.defineProperty(exports,`u`,{enumerable:!0,get:function(){return zg}});
95
- //# sourceMappingURL=chunk-XZSTWKYB-DJv9rEVU.cjs.map