turtlecode 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (693) hide show
  1. package/README.md +48 -0
  2. package/assets/_headers +17 -0
  3. package/assets/apple-touch-icon-v3.png +0 -0
  4. package/assets/apple-touch-icon.png +0 -0
  5. package/assets/assets/BerkleyMono-CyIs-Bwl.otf +0 -0
  6. package/assets/assets/KaTeX_AMS-Regular-BQhdFMY1.woff2 +0 -0
  7. package/assets/assets/KaTeX_AMS-Regular-DMm9YOAa.woff +0 -0
  8. package/assets/assets/KaTeX_AMS-Regular-DRggAlZN.ttf +0 -0
  9. package/assets/assets/KaTeX_Caligraphic-Bold-ATXxdsX0.ttf +0 -0
  10. package/assets/assets/KaTeX_Caligraphic-Bold-BEiXGLvX.woff +0 -0
  11. package/assets/assets/KaTeX_Caligraphic-Bold-Dq_IR9rO.woff2 +0 -0
  12. package/assets/assets/KaTeX_Caligraphic-Regular-CTRA-rTL.woff +0 -0
  13. package/assets/assets/KaTeX_Caligraphic-Regular-Di6jR-x-.woff2 +0 -0
  14. package/assets/assets/KaTeX_Caligraphic-Regular-wX97UBjC.ttf +0 -0
  15. package/assets/assets/KaTeX_Fraktur-Bold-BdnERNNW.ttf +0 -0
  16. package/assets/assets/KaTeX_Fraktur-Bold-BsDP51OF.woff +0 -0
  17. package/assets/assets/KaTeX_Fraktur-Bold-CL6g_b3V.woff2 +0 -0
  18. package/assets/assets/KaTeX_Fraktur-Regular-CB_wures.ttf +0 -0
  19. package/assets/assets/KaTeX_Fraktur-Regular-CTYiF6lA.woff2 +0 -0
  20. package/assets/assets/KaTeX_Fraktur-Regular-Dxdc4cR9.woff +0 -0
  21. package/assets/assets/KaTeX_Main-Bold-Cx986IdX.woff2 +0 -0
  22. package/assets/assets/KaTeX_Main-Bold-Jm3AIy58.woff +0 -0
  23. package/assets/assets/KaTeX_Main-Bold-waoOVXN0.ttf +0 -0
  24. package/assets/assets/KaTeX_Main-BoldItalic-DxDJ3AOS.woff2 +0 -0
  25. package/assets/assets/KaTeX_Main-BoldItalic-DzxPMmG6.ttf +0 -0
  26. package/assets/assets/KaTeX_Main-BoldItalic-SpSLRI95.woff +0 -0
  27. package/assets/assets/KaTeX_Main-Italic-3WenGoN9.ttf +0 -0
  28. package/assets/assets/KaTeX_Main-Italic-BMLOBm91.woff +0 -0
  29. package/assets/assets/KaTeX_Main-Italic-NWA7e6Wa.woff2 +0 -0
  30. package/assets/assets/KaTeX_Main-Regular-B22Nviop.woff2 +0 -0
  31. package/assets/assets/KaTeX_Main-Regular-Dr94JaBh.woff +0 -0
  32. package/assets/assets/KaTeX_Main-Regular-ypZvNtVU.ttf +0 -0
  33. package/assets/assets/KaTeX_Math-BoldItalic-B3XSjfu4.ttf +0 -0
  34. package/assets/assets/KaTeX_Math-BoldItalic-CZnvNsCZ.woff2 +0 -0
  35. package/assets/assets/KaTeX_Math-BoldItalic-iY-2wyZ7.woff +0 -0
  36. package/assets/assets/KaTeX_Math-Italic-DA0__PXp.woff +0 -0
  37. package/assets/assets/KaTeX_Math-Italic-flOr_0UB.ttf +0 -0
  38. package/assets/assets/KaTeX_Math-Italic-t53AETM-.woff2 +0 -0
  39. package/assets/assets/KaTeX_SansSerif-Bold-CFMepnvq.ttf +0 -0
  40. package/assets/assets/KaTeX_SansSerif-Bold-D1sUS0GD.woff2 +0 -0
  41. package/assets/assets/KaTeX_SansSerif-Bold-DbIhKOiC.woff +0 -0
  42. package/assets/assets/KaTeX_SansSerif-Italic-C3H0VqGB.woff2 +0 -0
  43. package/assets/assets/KaTeX_SansSerif-Italic-DN2j7dab.woff +0 -0
  44. package/assets/assets/KaTeX_SansSerif-Italic-YYjJ1zSn.ttf +0 -0
  45. package/assets/assets/KaTeX_SansSerif-Regular-BNo7hRIc.ttf +0 -0
  46. package/assets/assets/KaTeX_SansSerif-Regular-CS6fqUqJ.woff +0 -0
  47. package/assets/assets/KaTeX_SansSerif-Regular-DDBCnlJ7.woff2 +0 -0
  48. package/assets/assets/KaTeX_Script-Regular-C5JkGWo-.ttf +0 -0
  49. package/assets/assets/KaTeX_Script-Regular-D3wIWfF6.woff2 +0 -0
  50. package/assets/assets/KaTeX_Script-Regular-D5yQViql.woff +0 -0
  51. package/assets/assets/KaTeX_Size1-Regular-C195tn64.woff +0 -0
  52. package/assets/assets/KaTeX_Size1-Regular-Dbsnue_I.ttf +0 -0
  53. package/assets/assets/KaTeX_Size1-Regular-mCD8mA8B.woff2 +0 -0
  54. package/assets/assets/KaTeX_Size2-Regular-B7gKUWhC.ttf +0 -0
  55. package/assets/assets/KaTeX_Size2-Regular-Dy4dx90m.woff2 +0 -0
  56. package/assets/assets/KaTeX_Size2-Regular-oD1tc_U0.woff +0 -0
  57. package/assets/assets/KaTeX_Size3-Regular-CTq5MqoE.woff +0 -0
  58. package/assets/assets/KaTeX_Size3-Regular-DgpXs0kz.ttf +0 -0
  59. package/assets/assets/KaTeX_Size4-Regular-BF-4gkZK.woff +0 -0
  60. package/assets/assets/KaTeX_Size4-Regular-DWFBv043.ttf +0 -0
  61. package/assets/assets/KaTeX_Size4-Regular-Dl5lxZxV.woff2 +0 -0
  62. package/assets/assets/KaTeX_Typewriter-Regular-C0xS9mPB.woff +0 -0
  63. package/assets/assets/KaTeX_Typewriter-Regular-CO6r4hn1.woff2 +0 -0
  64. package/assets/assets/KaTeX_Typewriter-Regular-D3Ib7_Hf.ttf +0 -0
  65. package/assets/assets/__vite-browser-external-2447137e-BIHI7g3E.js +1 -0
  66. package/assets/assets/_basePickBy-B_7ShcHh.js +1 -0
  67. package/assets/assets/_baseUniq-BsW7XEuT.js +1 -0
  68. package/assets/assets/abap-BdImnpbu.js +1 -0
  69. package/assets/assets/abap-BrgZPUOV.js +6 -0
  70. package/assets/assets/actionscript-3-CfeIJUat.js +1 -0
  71. package/assets/assets/ada-bCR0ucgS.js +1 -0
  72. package/assets/assets/alert-01-BJxg7Br3.js +1 -0
  73. package/assets/assets/alert-01-BuOD_o_q.aac +0 -0
  74. package/assets/assets/alert-02-B_yYorxz.js +1 -0
  75. package/assets/assets/alert-02-CS75AsoP.aac +0 -0
  76. package/assets/assets/alert-03-DrFH92rH.js +1 -0
  77. package/assets/assets/alert-04-BvTiGxWY.js +1 -0
  78. package/assets/assets/alert-04-CaGsIGFP.aac +0 -0
  79. package/assets/assets/alert-05-CFi_H2fs.js +1 -0
  80. package/assets/assets/alert-05-D2gbGoRH.aac +0 -0
  81. package/assets/assets/alert-06-GK5Tqy6u.aac +0 -0
  82. package/assets/assets/alert-06-IqbtOTTn.js +1 -0
  83. package/assets/assets/alert-07-0r0kiLGz.aac +0 -0
  84. package/assets/assets/alert-07-B2AcuX88.js +1 -0
  85. package/assets/assets/alert-08-CZowNquU.aac +0 -0
  86. package/assets/assets/alert-08-pIF0yjmQ.js +1 -0
  87. package/assets/assets/alert-09-CidmJWaA.js +1 -0
  88. package/assets/assets/alert-10-84PPn2Zu.js +1 -0
  89. package/assets/assets/alert-10-Ck5hR7zH.aac +0 -0
  90. package/assets/assets/amoled-XzrX3rqH.js +1 -0
  91. package/assets/assets/android-studio-t3zZ7G0e.svg +369 -0
  92. package/assets/assets/andromeeda-C-Jbm3Hp.js +1 -0
  93. package/assets/assets/angular-html-CU67Zn6k.js +1 -0
  94. package/assets/assets/angular-ts-BwZT4LLn.js +1 -0
  95. package/assets/assets/antigravity-m-mWKI7R.svg +97 -0
  96. package/assets/assets/apache-Pmp26Uib.js +1 -0
  97. package/assets/assets/apex-DDbsPZ6N.js +1 -0
  98. package/assets/assets/apex-DyP6w7ZV.js +6 -0
  99. package/assets/assets/apl-dKokRX4l.js +1 -0
  100. package/assets/assets/applescript-Co6uUVPk.js +1 -0
  101. package/assets/assets/ar-BBkUbD-U.js +1 -0
  102. package/assets/assets/ar-DNixbgcA.js +3 -0
  103. package/assets/assets/ara-BRHolxvo.js +1 -0
  104. package/assets/assets/arc-BbW57NUb.js +1 -0
  105. package/assets/assets/architectureDiagram-2XIMDMQ5-DVePwAIo.js +36 -0
  106. package/assets/assets/asciidoc-Dv7Oe6Be.js +1 -0
  107. package/assets/assets/asm-D_Q5rh1f.js +1 -0
  108. package/assets/assets/astro-CbQHKStN.js +1 -0
  109. package/assets/assets/aura-WWK1QSNq.js +1 -0
  110. package/assets/assets/aurora-x-D-2ljcwZ.js +1 -0
  111. package/assets/assets/auth-callback-C2n64Qcj.js +1 -0
  112. package/assets/assets/awk-DMzUqQB5.js +1 -0
  113. package/assets/assets/ayu-DOIePaTS.js +1 -0
  114. package/assets/assets/ayu-dark-Cv9koXgw.js +1 -0
  115. package/assets/assets/azcli-BaLxmfj-.js +6 -0
  116. package/assets/assets/ballerina-BFfxhgS-.js +1 -0
  117. package/assets/assets/bat-BkioyH1T.js +1 -0
  118. package/assets/assets/bat-CFOPXBzS.js +6 -0
  119. package/assets/assets/beancount-k_qm7-4y.js +1 -0
  120. package/assets/assets/berry-uYugtg8r.js +1 -0
  121. package/assets/assets/bibtex-CHM0blh-.js +1 -0
  122. package/assets/assets/bicep-BfEKNvv3.js +7 -0
  123. package/assets/assets/bicep-Bmn6On1c.js +1 -0
  124. package/assets/assets/bip-bop-01-SdbMMaiV.js +1 -0
  125. package/assets/assets/bip-bop-02-CujvGF7f.js +1 -0
  126. package/assets/assets/bip-bop-03-BPb7xYJT.js +1 -0
  127. package/assets/assets/bip-bop-03-DXp7Zb0f.aac +0 -0
  128. package/assets/assets/bip-bop-04-CfVtpI7z.aac +0 -0
  129. package/assets/assets/bip-bop-04-dSUw_8vI.js +1 -0
  130. package/assets/assets/bip-bop-05-BNanGIjD.js +1 -0
  131. package/assets/assets/bip-bop-06-BuvNosjK.aac +0 -0
  132. package/assets/assets/bip-bop-06-DiKbyBF9.js +1 -0
  133. package/assets/assets/bip-bop-07-BoG3Fd8O.js +1 -0
  134. package/assets/assets/bip-bop-08-C6sK41fd.js +1 -0
  135. package/assets/assets/bip-bop-08-DBf7Bwjz.aac +0 -0
  136. package/assets/assets/bip-bop-09-AXzGc7YL.js +1 -0
  137. package/assets/assets/bip-bop-09-CxEgoAHQ.aac +0 -0
  138. package/assets/assets/bip-bop-10-E37zfY9y.js +1 -0
  139. package/assets/assets/blade-DVc8C-J4.js +1 -0
  140. package/assets/assets/blockDiagram-WCTKOSBZ-C1Ni5oSK.js +132 -0
  141. package/assets/assets/br-BylU6CIZ.js +3 -0
  142. package/assets/assets/br-CZ3IHiCZ.js +1 -0
  143. package/assets/assets/bs-Beusmqm9.js +3 -0
  144. package/assets/assets/bs-C7sqWY8X.js +1 -0
  145. package/assets/assets/bsl-BO_Y6i37.js +1 -0
  146. package/assets/assets/c-BIGW1oBm.js +1 -0
  147. package/assets/assets/c4Diagram-IC4MRINW-g8EmnUUA.js +10 -0
  148. package/assets/assets/cadence-Bv_4Rxtq.js +1 -0
  149. package/assets/assets/cairo-KRGpt6FW.js +1 -0
  150. package/assets/assets/cameligo-BFG1Mk7z.js +6 -0
  151. package/assets/assets/carbonfox-DDZsuZPB.js +1 -0
  152. package/assets/assets/catppuccin-DZcIPKtX.js +1 -0
  153. package/assets/assets/catppuccin-frappe-BbhwKQAy.js +1 -0
  154. package/assets/assets/catppuccin-frappe-DFWUc33u.js +1 -0
  155. package/assets/assets/catppuccin-latte-C9dUb6Cb.js +1 -0
  156. package/assets/assets/catppuccin-macchiato-Cusx3TK6.js +1 -0
  157. package/assets/assets/catppuccin-macchiato-DQyhUUbL.js +1 -0
  158. package/assets/assets/catppuccin-mocha-D87Tk5Gz.js +1 -0
  159. package/assets/assets/channel-CPcPUiyc.js +1 -0
  160. package/assets/assets/chunk-4BX2VUAB-CGR6NDgJ.js +1 -0
  161. package/assets/assets/chunk-55IACEB6-CuagpIkW.js +1 -0
  162. package/assets/assets/chunk-FMBD7UC4-CBSUaebz.js +15 -0
  163. package/assets/assets/chunk-JSJVCQXG-DK5RSVJJ.js +1 -0
  164. package/assets/assets/chunk-KX2RTZJC-D_r6FHlr.js +1 -0
  165. package/assets/assets/chunk-NQ4KR5QH-_-NyPl-E.js +220 -0
  166. package/assets/assets/chunk-QZHKN3VN-CMDZeFvi.js +1 -0
  167. package/assets/assets/chunk-VVM5DH6Z-COaOSPgd.js +1 -0
  168. package/assets/assets/chunk-WL4C6EOR-p1mj0O6S.js +189 -0
  169. package/assets/assets/clarity-D53aC0YG.js +1 -0
  170. package/assets/assets/classDiagram-VBA2DB6C-BAnp4Zaa.js +1 -0
  171. package/assets/assets/classDiagram-v2-RAHNMMFH-BAnp4Zaa.js +1 -0
  172. package/assets/assets/clojure-DTECt2xU.js +6 -0
  173. package/assets/assets/clojure-P80f7IUj.js +1 -0
  174. package/assets/assets/clone-Cf5BTVxd.js +1 -0
  175. package/assets/assets/cmake-D1j8_8rp.js +1 -0
  176. package/assets/assets/cobalt2-DAVdkIoy.js +1 -0
  177. package/assets/assets/cobol-nwyudZeR.js +1 -0
  178. package/assets/assets/codeowners-Bp6g37R7.js +1 -0
  179. package/assets/assets/codeql-DsOJ9woJ.js +1 -0
  180. package/assets/assets/codicon-DCmgc-ay.ttf +0 -0
  181. package/assets/assets/coffee-CDGzqUPQ.js +6 -0
  182. package/assets/assets/coffee-Ch7k5sss.js +1 -0
  183. package/assets/assets/common-lisp-Cg-RD9OK.js +1 -0
  184. package/assets/assets/connection-popover-Sip4k8lc.js +1 -0
  185. package/assets/assets/context-popover-jX8NoD9w.js +1 -0
  186. package/assets/assets/coq-DkFqJrB1.js +1 -0
  187. package/assets/assets/cose-bilkent-S5V4N54A-C5LXU9pd.js +1 -0
  188. package/assets/assets/cpp-CLLBncYj.js +6 -0
  189. package/assets/assets/cpp-CofmeUqb.js +1 -0
  190. package/assets/assets/crystal-tKQVLTB8.js +1 -0
  191. package/assets/assets/csharp-K5feNrxe.js +1 -0
  192. package/assets/assets/csharp-dUCx_-0o.js +6 -0
  193. package/assets/assets/csp-5Rap-vPy.js +6 -0
  194. package/assets/assets/css-D3h14YRZ.js +8 -0
  195. package/assets/assets/css-DPfMkruS.js +1 -0
  196. package/assets/assets/css.worker-CWXDKZjk.js +84 -0
  197. package/assets/assets/cssMode-xHiM5mcb.js +9 -0
  198. package/assets/assets/csv-fuZLfV_i.js +1 -0
  199. package/assets/assets/cue-D82EKSYY.js +1 -0
  200. package/assets/assets/cursor-CX4xD2IP.js +1 -0
  201. package/assets/assets/cypher-COkxafJQ.js +1 -0
  202. package/assets/assets/cypher-DrQuvNYM.js +6 -0
  203. package/assets/assets/cytoscape.esm-DtBltrT8.js +331 -0
  204. package/assets/assets/d-85-TOEBH.js +1 -0
  205. package/assets/assets/da--imEne2-.js +3 -0
  206. package/assets/assets/da-DKIMy0WC.js +1 -0
  207. package/assets/assets/dagre-KLK3FWXG-m-9cmD-w.js +4 -0
  208. package/assets/assets/dark-plus-C3mMm8J8.js +1 -0
  209. package/assets/assets/dart-CF10PKvl.js +1 -0
  210. package/assets/assets/dart-CFKIUWau.js +6 -0
  211. package/assets/assets/dax-CEL-wOlO.js +1 -0
  212. package/assets/assets/de-BXo_WxK1.js +3 -0
  213. package/assets/assets/de-W5dPqUFm.js +1 -0
  214. package/assets/assets/defaultLocale-DX6XiGOO.js +1 -0
  215. package/assets/assets/desktop-BmXAJ9_W.js +1 -0
  216. package/assets/assets/diagram-E7M64L7V-Cn-5LVpt.js +24 -0
  217. package/assets/assets/diagram-IFDJBPK2-CD8BK0Gp.js +43 -0
  218. package/assets/assets/diagram-P4PSJMXO-JVUlmg7w.js +24 -0
  219. package/assets/assets/dialog-clone-project-BgrtjUcd.js +1 -0
  220. package/assets/assets/dialog-connect-provider-BEqcXIot.js +2 -0
  221. package/assets/assets/dialog-create-project-TcSOut-3.js +1 -0
  222. package/assets/assets/dialog-edit-project-BfeaBlLZ.js +1 -0
  223. package/assets/assets/dialog-fork-D0oj4IQ5.js +1 -0
  224. package/assets/assets/dialog-manage-models-mDJUOPob.js +1 -0
  225. package/assets/assets/dialog-select-directory-BocFiQ9d.js +6 -0
  226. package/assets/assets/dialog-select-file-CifFpv3x.js +1 -0
  227. package/assets/assets/dialog-select-mcp-Bz0DoDof.js +1 -0
  228. package/assets/assets/dialog-select-model-unpaid-Da_CQzO4.js +2 -0
  229. package/assets/assets/dialog-select-provider-2iOfyWxy.js +1 -0
  230. package/assets/assets/dialog-select-server-DBhmJ2f8.js +1 -0
  231. package/assets/assets/dialog-settings-gGxknIbS.js +1 -0
  232. package/assets/assets/diff-D97Zzqfu.js +1 -0
  233. package/assets/assets/docker-BcOcwvcX.js +1 -0
  234. package/assets/assets/dockerfile-Zznr-cwX.js +6 -0
  235. package/assets/assets/dotenv-Da5cRb03.js +1 -0
  236. package/assets/assets/dracula-Bwy36Hqr.js +1 -0
  237. package/assets/assets/dracula-BzJJZx-M.js +1 -0
  238. package/assets/assets/dracula-soft-BXkSAIEj.js +1 -0
  239. package/assets/assets/dream-maker-BtqSS_iP.js +1 -0
  240. package/assets/assets/ecl-Ce3n6wWz.js +6 -0
  241. package/assets/assets/edge-BkV0erSs.js +1 -0
  242. package/assets/assets/editor.worker-DERb3WoQ.js +12 -0
  243. package/assets/assets/elixir-CDX3lj18.js +1 -0
  244. package/assets/assets/elixir-deUWdS0T.js +6 -0
  245. package/assets/assets/elm-DbKCFpqz.js +1 -0
  246. package/assets/assets/emacs-lisp-C9XAeP06.js +1 -0
  247. package/assets/assets/erDiagram-INFDFZHY-7L6v8ikj.js +70 -0
  248. package/assets/assets/erb-BOJIQeun.js +1 -0
  249. package/assets/assets/erlang-DsQrWhSR.js +1 -0
  250. package/assets/assets/es-BKl1__G4.js +1 -0
  251. package/assets/assets/es-DAHGSdnh.js +3 -0
  252. package/assets/assets/everforest-CeaUU-qR.js +1 -0
  253. package/assets/assets/everforest-dark-BgDCqdQA.js +1 -0
  254. package/assets/assets/everforest-light-C8M2exoo.js +1 -0
  255. package/assets/assets/fennel-BYunw83y.js +1 -0
  256. package/assets/assets/file-icon-CgbvTpIc.js +1 -0
  257. package/assets/assets/fish-BvzEVeQv.js +1 -0
  258. package/assets/assets/flexoki-Cuz5xwiW.js +1 -0
  259. package/assets/assets/flow9-i9-g7ZhI.js +6 -0
  260. package/assets/assets/flowDiagram-PKNHOUZH-aJT2T3cx.js +162 -0
  261. package/assets/assets/fluent-C4IJs8-o.js +1 -0
  262. package/assets/assets/fortran-fixed-form-BZjJHVRy.js +1 -0
  263. package/assets/assets/fortran-free-form-D22FLkUw.js +1 -0
  264. package/assets/assets/fr-BGWW507w.js +1 -0
  265. package/assets/assets/fr-P_mrJW12.js +3 -0
  266. package/assets/assets/freemarker2-BgcPHQt-.js +8 -0
  267. package/assets/assets/fsharp-CXgrBDvD.js +1 -0
  268. package/assets/assets/fsharp-CzKuDChf.js +6 -0
  269. package/assets/assets/ganttDiagram-A5KZAMGK-C5vwClxA.js +292 -0
  270. package/assets/assets/gdresource-B7Tvp0Sc.js +1 -0
  271. package/assets/assets/gdscript-DTMYz4Jt.js +1 -0
  272. package/assets/assets/gdshader-DkwncUOv.js +1 -0
  273. package/assets/assets/genie-D0YGMca9.js +1 -0
  274. package/assets/assets/gherkin-DyxjwDmM.js +1 -0
  275. package/assets/assets/ghostty-web-CyXMoQwm.js +13 -0
  276. package/assets/assets/git-commit-F4YmCXRG.js +1 -0
  277. package/assets/assets/git-rebase-r7XF79zn.js +1 -0
  278. package/assets/assets/gitGraphDiagram-K3NZZRJ6-CI0SeLE3.js +65 -0
  279. package/assets/assets/github-Bnlt5SaI.js +1 -0
  280. package/assets/assets/github-dark-DHJKELXO.js +1 -0
  281. package/assets/assets/github-dark-default-Cuk6v7N8.js +1 -0
  282. package/assets/assets/github-dark-dimmed-DH5Ifo-i.js +1 -0
  283. package/assets/assets/github-dark-high-contrast-E3gJ1_iC.js +1 -0
  284. package/assets/assets/github-light-DAi9KRSo.js +1 -0
  285. package/assets/assets/github-light-default-D7oLnXFd.js +1 -0
  286. package/assets/assets/github-light-high-contrast-BfjtVDDH.js +1 -0
  287. package/assets/assets/gleam-BspZqrRM.js +1 -0
  288. package/assets/assets/glimmer-js-Rg0-pVw9.js +1 -0
  289. package/assets/assets/glimmer-ts-U6CK756n.js +1 -0
  290. package/assets/assets/glsl-DplSGwfg.js +1 -0
  291. package/assets/assets/gnuplot-DdkO51Og.js +1 -0
  292. package/assets/assets/go-Cphgjts3.js +6 -0
  293. package/assets/assets/go-Dn2_MT6a.js +1 -0
  294. package/assets/assets/graph-CFcaDaoV.js +1 -0
  295. package/assets/assets/graphql-Cg7bfA9N.js +6 -0
  296. package/assets/assets/graphql-ChdNCCLP.js +1 -0
  297. package/assets/assets/groovy-gcz8RCvz.js +1 -0
  298. package/assets/assets/gruvbox-CpxwLcJ7.js +1 -0
  299. package/assets/assets/gruvbox-dark-hard-CFHQjOhq.js +1 -0
  300. package/assets/assets/gruvbox-dark-medium-GsRaNv29.js +1 -0
  301. package/assets/assets/gruvbox-dark-soft-CVdnzihN.js +1 -0
  302. package/assets/assets/gruvbox-light-hard-CH1njM8p.js +1 -0
  303. package/assets/assets/gruvbox-light-medium-DRw_LuNl.js +1 -0
  304. package/assets/assets/gruvbox-light-soft-hJgmCMqR.js +1 -0
  305. package/assets/assets/hack-CaT9iCJl.js +1 -0
  306. package/assets/assets/haml-B8DHNrY2.js +1 -0
  307. package/assets/assets/handlebars-BL8al0AC.js +1 -0
  308. package/assets/assets/handlebars-DSpGDIPh.js +6 -0
  309. package/assets/assets/haskell-Df6bDoY_.js +1 -0
  310. package/assets/assets/haxe-CzTSHFRz.js +1 -0
  311. package/assets/assets/hcl-0cvrggvQ.js +6 -0
  312. package/assets/assets/hcl-BWvSN4gD.js +1 -0
  313. package/assets/assets/hjson-D5-asLiD.js +1 -0
  314. package/assets/assets/hlsl-D3lLCCz7.js +1 -0
  315. package/assets/assets/home-6Va-8zmR.js +1 -0
  316. package/assets/assets/houston-DnULxvSX.js +1 -0
  317. package/assets/assets/html-CNWh6Ln_.js +6 -0
  318. package/assets/assets/html-GMplVEZG.js +1 -0
  319. package/assets/assets/html-derivative-BFtXZ54Q.js +1 -0
  320. package/assets/assets/html.worker-C8-N0mNh.js +461 -0
  321. package/assets/assets/htmlMode-LcU-TZaJ.js +9 -0
  322. package/assets/assets/http-jrhK8wxY.js +1 -0
  323. package/assets/assets/hurl-irOxFIW8.js +1 -0
  324. package/assets/assets/hxml-Bvhsp5Yf.js +1 -0
  325. package/assets/assets/hy-DFXneXwc.js +1 -0
  326. package/assets/assets/imba-DGztddWO.js +1 -0
  327. package/assets/assets/index-DpJDxStT.css +1 -0
  328. package/assets/assets/index-bSvs-Qh3.js +2544 -0
  329. package/assets/assets/infoDiagram-LFFYTUFH-H6835-cD.js +2 -0
  330. package/assets/assets/ini-BEwlwnbL.js +1 -0
  331. package/assets/assets/ini-Drc7WvVn.js +6 -0
  332. package/assets/assets/init-Gi6I4Gst.js +1 -0
  333. package/assets/assets/ishikawaDiagram-PHBUUO56-y62OJXdI.js +70 -0
  334. package/assets/assets/ja-8gbzy_Uq.js +3 -0
  335. package/assets/assets/ja-nNUG5Jbd.js +1 -0
  336. package/assets/assets/java-B_fMsGYe.js +6 -0
  337. package/assets/assets/java-CylS5w8V.js +1 -0
  338. package/assets/assets/javascript-CTmFPESg.js +6 -0
  339. package/assets/assets/javascript-wDzz0qaB.js +1 -0
  340. package/assets/assets/jinja-4LBKfQ-Z.js +1 -0
  341. package/assets/assets/jison-wvAkD_A8.js +1 -0
  342. package/assets/assets/jobs-popover-DRbIcR2O.js +1 -0
  343. package/assets/assets/journeyDiagram-4ABVD52K-Bi9XcKs5.js +139 -0
  344. package/assets/assets/json-Cp-IABpG.js +1 -0
  345. package/assets/assets/json.worker-B4wBgYVH.js +49 -0
  346. package/assets/assets/json5-C9tS-k6U.js +1 -0
  347. package/assets/assets/jsonMode-CW1XLtuQ.js +15 -0
  348. package/assets/assets/jsonc-Des-eS-w.js +1 -0
  349. package/assets/assets/jsonl-DcaNXYhu.js +1 -0
  350. package/assets/assets/jsonnet-DFQXde-d.js +1 -0
  351. package/assets/assets/jssm-C2t-YnRu.js +1 -0
  352. package/assets/assets/jsx-g9-lgVsj.js +1 -0
  353. package/assets/assets/julia-Bqgm2twL.js +6 -0
  354. package/assets/assets/julia-C8NyazO9.js +1 -0
  355. package/assets/assets/kanagawa-C2GZrYFD.js +1 -0
  356. package/assets/assets/kanagawa-dragon-CkXjmgJE.js +1 -0
  357. package/assets/assets/kanagawa-lotus-CfQXZHmo.js +1 -0
  358. package/assets/assets/kanagawa-wave-DWedfzmr.js +1 -0
  359. package/assets/assets/kanban-definition-K7BYSVSG-DE01LQ5I.js +89 -0
  360. package/assets/assets/kdl-DV7GczEv.js +1 -0
  361. package/assets/assets/ko-Cz45-37g.js +1 -0
  362. package/assets/assets/ko-D9Z7tTxK.js +3 -0
  363. package/assets/assets/kotlin-BSkB5QuD.js +6 -0
  364. package/assets/assets/kotlin-BdnUsdx6.js +1 -0
  365. package/assets/assets/kusto-BvAqAH-y.js +1 -0
  366. package/assets/assets/laserwave-DUszq2jm.js +1 -0
  367. package/assets/assets/latex-BdAV_C_H.js +1 -0
  368. package/assets/assets/layout-C6rurAvx.js +1 -0
  369. package/assets/assets/lean-Bc6EcWN3.js +1 -0
  370. package/assets/assets/less-B1dDrJ26.js +1 -0
  371. package/assets/assets/less-BsTHnhdd.js +7 -0
  372. package/assets/assets/lexon-YWi4-JPR.js +6 -0
  373. package/assets/assets/light-plus-B7mTdjB0.js +1 -0
  374. package/assets/assets/linear-ilW0Y4uJ.js +1 -0
  375. package/assets/assets/liquid-DB5uFXiY.js +6 -0
  376. package/assets/assets/liquid-DYVedYrR.js +1 -0
  377. package/assets/assets/list-BPk4NMWt.js +1 -0
  378. package/assets/assets/llvm-BtvRca6l.js +1 -0
  379. package/assets/assets/log-2UxHyX5q.js +1 -0
  380. package/assets/assets/logo-BtOb2qkB.js +1 -0
  381. package/assets/assets/lua-BbnMAYS6.js +1 -0
  382. package/assets/assets/lua-nf6ki56Z.js +6 -0
  383. package/assets/assets/luau-CXu1NL6O.js +1 -0
  384. package/assets/assets/lucent-orng-BLBLS6VI.js +1 -0
  385. package/assets/assets/m3-Cpb6xl2v.js +6 -0
  386. package/assets/assets/make-CHLpvVh8.js +1 -0
  387. package/assets/assets/markdown-Cvjx9yec.js +1 -0
  388. package/assets/assets/markdown-DSZPf7rp.js +6 -0
  389. package/assets/assets/marko-CPi9NSCl.js +1 -0
  390. package/assets/assets/material-CDQyWXdQ.js +1 -0
  391. package/assets/assets/material-theme-D5KoaKCx.js +1 -0
  392. package/assets/assets/material-theme-darker-BfHTSMKl.js +1 -0
  393. package/assets/assets/material-theme-lighter-B0m2ddpp.js +1 -0
  394. package/assets/assets/material-theme-ocean-CyktbL80.js +1 -0
  395. package/assets/assets/material-theme-palenight-Csfq5Kiy.js +1 -0
  396. package/assets/assets/matlab-D7o27uSR.js +1 -0
  397. package/assets/assets/matrix-wjRIPmmp.js +1 -0
  398. package/assets/assets/mdc-DUICxH0z.js +1 -0
  399. package/assets/assets/mdx-Cmh6b_Ma.js +1 -0
  400. package/assets/assets/mdx-Q7_EfF7H.js +6 -0
  401. package/assets/assets/mercury-CL9KPSEM.js +1 -0
  402. package/assets/assets/mermaid-DKYwYmdq.js +1 -0
  403. package/assets/assets/mermaid.core-DdXWHS-1.js +254 -0
  404. package/assets/assets/min-dark-CafNBF8u.js +1 -0
  405. package/assets/assets/min-light-CTRr51gU.js +1 -0
  406. package/assets/assets/mindmap-definition-YRQLILUH-BajbwusW.js +68 -0
  407. package/assets/assets/mips-B_c3zf-v.js +6 -0
  408. package/assets/assets/mipsasm-CKIfxQSi.js +1 -0
  409. package/assets/assets/mojo-1DNp92w6.js +1 -0
  410. package/assets/assets/monokai-BmT5Sw19.js +1 -0
  411. package/assets/assets/monokai-D4h5O-jR.js +1 -0
  412. package/assets/assets/move-Bu9oaDYs.js +1 -0
  413. package/assets/assets/msdax-rUNN04Wq.js +6 -0
  414. package/assets/assets/mysql-DDwshQtU.js +6 -0
  415. package/assets/assets/narrat-DRg8JJMk.js +1 -0
  416. package/assets/assets/nextflow-BrzmwbiE.js +1 -0
  417. package/assets/assets/nginx-DknmC5AR.js +1 -0
  418. package/assets/assets/night-owl-C39BiMTA.js +1 -0
  419. package/assets/assets/nightowl-Pa1W3oWG.js +1 -0
  420. package/assets/assets/nim-CVrawwO9.js +1 -0
  421. package/assets/assets/nix-c8nO5XWb.js +1 -0
  422. package/assets/assets/no-BGj8YYYB.js +3 -0
  423. package/assets/assets/no-DQ9niEg2.js +1 -0
  424. package/assets/assets/nope-01-HWHtipgi.js +1 -0
  425. package/assets/assets/nope-02-CzaO3Yrz.js +1 -0
  426. package/assets/assets/nope-02-EygnDbCM.aac +0 -0
  427. package/assets/assets/nope-03-D3_ztwN2.js +1 -0
  428. package/assets/assets/nope-04-CmCNjd7G.js +1 -0
  429. package/assets/assets/nope-05-DY6LpiuN.js +1 -0
  430. package/assets/assets/nope-05-DZsXzrQW.aac +0 -0
  431. package/assets/assets/nope-06-CfV385SL.js +1 -0
  432. package/assets/assets/nope-07-nvIV4VRE.js +1 -0
  433. package/assets/assets/nope-08-COPo0uNf.aac +0 -0
  434. package/assets/assets/nope-08-HcI83CoX.js +1 -0
  435. package/assets/assets/nope-09-8gNK4nDO.js +1 -0
  436. package/assets/assets/nope-10-C1PuPJJ6.js +1 -0
  437. package/assets/assets/nope-11-BjKpOuL0.js +1 -0
  438. package/assets/assets/nope-11-CVdXg8G-.aac +0 -0
  439. package/assets/assets/nope-12-BJR1Ka3c.aac +0 -0
  440. package/assets/assets/nope-12-XTIkittV.js +1 -0
  441. package/assets/assets/nord-Ddv68eIx.js +1 -0
  442. package/assets/assets/nord-NfRmCUpk.js +1 -0
  443. package/assets/assets/nushell-C-sUppwS.js +1 -0
  444. package/assets/assets/objective-c-B5zXfXm9.js +6 -0
  445. package/assets/assets/objective-c-DXmwc3jG.js +1 -0
  446. package/assets/assets/objective-cpp-CLxacb5B.js +1 -0
  447. package/assets/assets/ocaml-C0hk2d4L.js +1 -0
  448. package/assets/assets/one-dark-Bjk1FzZz.js +1 -0
  449. package/assets/assets/one-dark-pro-DVMEJ2y_.js +1 -0
  450. package/assets/assets/one-light-PoHY5YXO.js +1 -0
  451. package/assets/assets/onedarkpro-BqVu_Wgg.js +1 -0
  452. package/assets/assets/opencode-D7rBuNi7.js +1 -0
  453. package/assets/assets/openscad-C4EeE6gA.js +1 -0
  454. package/assets/assets/ordinal-Cboi1Yqb.js +1 -0
  455. package/assets/assets/orng-BM7q_Z0y.js +1 -0
  456. package/assets/assets/osaka-jade-LSg9CtTT.js +1 -0
  457. package/assets/assets/palenight-Djgtir2l.js +1 -0
  458. package/assets/assets/pascal-CXOwvkN_.js +6 -0
  459. package/assets/assets/pascal-D93ZcfNL.js +1 -0
  460. package/assets/assets/pascaligo-Bc-ZgV77.js +6 -0
  461. package/assets/assets/perl-C0TMdlhV.js +1 -0
  462. package/assets/assets/perl-CwNk8-XU.js +6 -0
  463. package/assets/assets/pgsql-tGk8EFnU.js +6 -0
  464. package/assets/assets/php-CDn_0X-4.js +1 -0
  465. package/assets/assets/php-CpIb_Oan.js +6 -0
  466. package/assets/assets/pieDiagram-SKSYHLDU-DxK57epR.js +30 -0
  467. package/assets/assets/pierre-dark-ClCaJvdG.js +1 -0
  468. package/assets/assets/pierre-light-zjGsWSiE.js +1 -0
  469. package/assets/assets/pkl-u5AG7uiY.js +1 -0
  470. package/assets/assets/pl-B1PbnQJF.js +1 -0
  471. package/assets/assets/pl-D8a1LVH2.js +3 -0
  472. package/assets/assets/pla-B03wrqEc.js +6 -0
  473. package/assets/assets/plastic-3e1v2bzS.js +1 -0
  474. package/assets/assets/plsql-ChMvpjG-.js +1 -0
  475. package/assets/assets/po-BTJTHyun.js +1 -0
  476. package/assets/assets/poimandres-CS3Unz2-.js +1 -0
  477. package/assets/assets/polar-C0HS_06l.js +1 -0
  478. package/assets/assets/postcss-CXtECtnM.js +1 -0
  479. package/assets/assets/postiats-BKlk5iyT.js +6 -0
  480. package/assets/assets/powerquery-Bhzvs7bI.js +6 -0
  481. package/assets/assets/powerquery-CEu0bR-o.js +1 -0
  482. package/assets/assets/powershell-Dd3NCNK9.js +6 -0
  483. package/assets/assets/powershell-Dpen1YoG.js +1 -0
  484. package/assets/assets/prisma-Dd19v3D-.js +1 -0
  485. package/assets/assets/prolog-CbFg5uaA.js +1 -0
  486. package/assets/assets/proto-DyJlTyXw.js +1 -0
  487. package/assets/assets/protobuf-COyEY5Pt.js +7 -0
  488. package/assets/assets/pug-BaJupSGV.js +6 -0
  489. package/assets/assets/pug-CGlum2m_.js +1 -0
  490. package/assets/assets/puppet-BMWR74SV.js +1 -0
  491. package/assets/assets/purescript-CklMAg4u.js +1 -0
  492. package/assets/assets/purify.es-A66Cw1IH.js +2 -0
  493. package/assets/assets/python-B3qjyNJj.js +6 -0
  494. package/assets/assets/python-B6aJPvgy.js +1 -0
  495. package/assets/assets/qml-3beO22l8.js +1 -0
  496. package/assets/assets/qmldir-C8lEn-DE.js +1 -0
  497. package/assets/assets/qsharp-DXyYeYxl.js +6 -0
  498. package/assets/assets/qss-IeuSbFQv.js +1 -0
  499. package/assets/assets/quadrantDiagram-337W2JSQ-CZMB9UKV.js +7 -0
  500. package/assets/assets/r-CdQndTaG.js +6 -0
  501. package/assets/assets/r-DiinP2Uv.js +1 -0
  502. package/assets/assets/racket-BqYA7rlc.js +1 -0
  503. package/assets/assets/raku-DXvB9xmW.js +1 -0
  504. package/assets/assets/razor-CE9lU5zL.js +1 -0
  505. package/assets/assets/razor-CJkx1qh1.js +6 -0
  506. package/assets/assets/red-bN70gL4F.js +1 -0
  507. package/assets/assets/redis-CVwtpugi.js +6 -0
  508. package/assets/assets/redshift-25W9uPmb.js +6 -0
  509. package/assets/assets/reg-C-SQnVFl.js +1 -0
  510. package/assets/assets/regexp-CDVJQ6XC.js +1 -0
  511. package/assets/assets/rel-C3B-1QV4.js +1 -0
  512. package/assets/assets/requirementDiagram-Z7DCOOCP-BlyteLn_.js +73 -0
  513. package/assets/assets/restructuredtext-DfzH4Xui.js +6 -0
  514. package/assets/assets/riscv-BM1_JUlF.js +1 -0
  515. package/assets/assets/rose-pine-dawn-DHQR4-dF.js +1 -0
  516. package/assets/assets/rose-pine-moon-D4_iv3hh.js +1 -0
  517. package/assets/assets/rose-pine-qdsjHGoJ.js +1 -0
  518. package/assets/assets/rosepine-DFf5RIYd.js +1 -0
  519. package/assets/assets/rosmsg-BJDFO7_C.js +1 -0
  520. package/assets/assets/rst-B0xPkSld.js +1 -0
  521. package/assets/assets/ru-BwS-kFcs.js +3 -0
  522. package/assets/assets/ru-Cz7sqdk-.js +1 -0
  523. package/assets/assets/ruby-BvKwtOVI.js +1 -0
  524. package/assets/assets/ruby-Cp1zYvxS.js +6 -0
  525. package/assets/assets/rust-B1yitclQ.js +1 -0
  526. package/assets/assets/rust-D5C2fndG.js +6 -0
  527. package/assets/assets/sankeyDiagram-WA2Y5GQK-DrdtRBZz.js +10 -0
  528. package/assets/assets/sas-cz2c8ADy.js +1 -0
  529. package/assets/assets/sass-Cj5Yp3dK.js +1 -0
  530. package/assets/assets/sb-CDntyWJ8.js +6 -0
  531. package/assets/assets/scala-BoFRg7Ot.js +6 -0
  532. package/assets/assets/scala-C151Ov-r.js +1 -0
  533. package/assets/assets/scheme-Bio4gycK.js +6 -0
  534. package/assets/assets/scheme-C98Dy4si.js +1 -0
  535. package/assets/assets/scss-4Ik7cdeQ.js +8 -0
  536. package/assets/assets/scss-OYdSNvt2.js +1 -0
  537. package/assets/assets/sdbl-DVxCFoDh.js +1 -0
  538. package/assets/assets/select-CEKfrTm2.js +1 -0
  539. package/assets/assets/sequenceDiagram-2WXFIKYE-B2cOVhRx.js +145 -0
  540. package/assets/assets/server-row-BhbnbNJy.js +1 -0
  541. package/assets/assets/session-CdcUAq9-.js +60 -0
  542. package/assets/assets/shaderlab-Dg9Lc6iA.js +1 -0
  543. package/assets/assets/shadesofpurple-BtwY-YRg.js +1 -0
  544. package/assets/assets/shell-CX-rkNHf.js +6 -0
  545. package/assets/assets/shellscript-Yzrsuije.js +1 -0
  546. package/assets/assets/shellsession-BADoaaVG.js +1 -0
  547. package/assets/assets/slack-dark-BthQWCQV.js +1 -0
  548. package/assets/assets/slack-ochin-DqwNpetd.js +1 -0
  549. package/assets/assets/smalltalk-BERRCDM3.js +1 -0
  550. package/assets/assets/snazzy-light-Bw305WKR.js +1 -0
  551. package/assets/assets/solarized-B2lq4jlr.js +1 -0
  552. package/assets/assets/solarized-dark-DXbdFlpD.js +1 -0
  553. package/assets/assets/solarized-light-L9t79GZl.js +1 -0
  554. package/assets/assets/solidity-Tw7wswEv.js +6 -0
  555. package/assets/assets/solidity-rGO070M0.js +1 -0
  556. package/assets/assets/sophia-C5WLch3f.js +6 -0
  557. package/assets/assets/soy-Brmx7dQM.js +1 -0
  558. package/assets/assets/sparql-DHaeiCBh.js +6 -0
  559. package/assets/assets/sparql-rVzFXLq3.js +1 -0
  560. package/assets/assets/splunk-BtCnVYZw.js +1 -0
  561. package/assets/assets/sprite-B0ryth1W.svg +1121 -0
  562. package/assets/assets/sprite-Fb-TFjRY.svg +11707 -0
  563. package/assets/assets/sql-BLtJtn59.js +1 -0
  564. package/assets/assets/sql-CCSDG5nI.js +6 -0
  565. package/assets/assets/ssh-config-_ykCGR6B.js +1 -0
  566. package/assets/assets/st-pnP8ivHi.js +6 -0
  567. package/assets/assets/staplebops-01-gmydkbKo.js +1 -0
  568. package/assets/assets/staplebops-02-dGmDElbO.js +1 -0
  569. package/assets/assets/staplebops-03-Aug82oH0.aac +0 -0
  570. package/assets/assets/staplebops-03-DK1yH6J2.js +1 -0
  571. package/assets/assets/staplebops-04-Bi3-8HzN.js +1 -0
  572. package/assets/assets/staplebops-04-olyHi8qQ.aac +0 -0
  573. package/assets/assets/staplebops-05-BVmKob0k.js +1 -0
  574. package/assets/assets/staplebops-06-BAYmihXf.js +1 -0
  575. package/assets/assets/staplebops-06-Cj_2vOI4.aac +0 -0
  576. package/assets/assets/staplebops-07-_-IkdLL4.js +1 -0
  577. package/assets/assets/staplebops-07-cqQEvbIf.aac +0 -0
  578. package/assets/assets/stata-BH5u7GGu.js +1 -0
  579. package/assets/assets/stateDiagram-RAJIS63D-C4udRYnl.js +1 -0
  580. package/assets/assets/stateDiagram-v2-FVOUBMTO-CECUON5A.js +1 -0
  581. package/assets/assets/status-popover-body-DkLpfJ2k.js +2 -0
  582. package/assets/assets/stylus-BEDo0Tqx.js +1 -0
  583. package/assets/assets/svelte-3Dk4HxPD.js +1 -0
  584. package/assets/assets/swift-Dg5xB15N.js +1 -0
  585. package/assets/assets/swift-DwJ7jVG9.js +8 -0
  586. package/assets/assets/switch-DPq0vsit.js +1 -0
  587. package/assets/assets/synthwave-84-CbfX1IO0.js +1 -0
  588. package/assets/assets/synthwave84-mo9EICVe.js +1 -0
  589. package/assets/assets/system-verilog-CnnmHF94.js +1 -0
  590. package/assets/assets/systemd-4A_iFExJ.js +1 -0
  591. package/assets/assets/systemverilog-B9Xyijhd.js +6 -0
  592. package/assets/assets/tabs-dF68ik4J.js +1 -0
  593. package/assets/assets/tag--BCZ5q7_.js +1 -0
  594. package/assets/assets/talonscript-CkByrt1z.js +1 -0
  595. package/assets/assets/tasl-QIJgUcNo.js +1 -0
  596. package/assets/assets/tcl-DnHyzjbg.js +6 -0
  597. package/assets/assets/tcl-dwOrl1Do.js +1 -0
  598. package/assets/assets/templ-W15q3VgB.js +1 -0
  599. package/assets/assets/terraform-BETggiCN.js +1 -0
  600. package/assets/assets/tex-CxkMU7Pf.js +1 -0
  601. package/assets/assets/th-GkB0dxVv.js +1 -0
  602. package/assets/assets/th-sZWfOGpx.js +3 -0
  603. package/assets/assets/timeline-definition-YZTLITO2-C18tfizI.js +61 -0
  604. package/assets/assets/tokyo-night-hegEt444.js +1 -0
  605. package/assets/assets/tokyonight-CbcoahaJ.js +1 -0
  606. package/assets/assets/toml-vGWfd6FD.js +1 -0
  607. package/assets/assets/tr-BKF3NFWB.js +3 -0
  608. package/assets/assets/tr-EOOdZMuM.js +1 -0
  609. package/assets/assets/treemap-KZPCXAKY-C7fWdgj-.js +162 -0
  610. package/assets/assets/trellis-6YKi26t8.js +891 -0
  611. package/assets/assets/trellis-CZsWDIog.css +6 -0
  612. package/assets/assets/trellis-badge-demo-BDa3ILpo.js +1 -0
  613. package/assets/assets/trellis-op-icon-5x1lMwNH.js +1 -0
  614. package/assets/assets/ts-tags-zn1MmPIZ.js +1 -0
  615. package/assets/assets/ts.worker-DUVIPRKP.js +51334 -0
  616. package/assets/assets/tsMode-Bg19hQiu.js +16 -0
  617. package/assets/assets/tsv-B_m7g4N7.js +1 -0
  618. package/assets/assets/tsx-COt5Ahok.js +1 -0
  619. package/assets/assets/turtle-BsS91CYL.js +1 -0
  620. package/assets/assets/twig-CO9l9SDP.js +1 -0
  621. package/assets/assets/twig-CPajHgWi.js +6 -0
  622. package/assets/assets/typescript-8CtqEj8t.js +6 -0
  623. package/assets/assets/typescript-BPQ3VLAy.js +1 -0
  624. package/assets/assets/typespec-BGHnOYBU.js +1 -0
  625. package/assets/assets/typespec-D-MeaMDU.js +6 -0
  626. package/assets/assets/typst-DHCkPAjA.js +1 -0
  627. package/assets/assets/v-BcVCzyr7.js +1 -0
  628. package/assets/assets/vala-CsfeWuGM.js +1 -0
  629. package/assets/assets/vb-D17OF-Vu.js +1 -0
  630. package/assets/assets/vb-DgyLZaXg.js +6 -0
  631. package/assets/assets/vennDiagram-LZ73GAT5-DWmAgqdE.js +34 -0
  632. package/assets/assets/vercel-BEJw6zHg.js +1 -0
  633. package/assets/assets/verilog-BQ8w6xss.js +1 -0
  634. package/assets/assets/vesper-67WFNJYM.js +1 -0
  635. package/assets/assets/vesper-DU1UobuO.js +1 -0
  636. package/assets/assets/vhdl-CeAyd5Ju.js +1 -0
  637. package/assets/assets/viml-CJc9bBzg.js +1 -0
  638. package/assets/assets/vitesse-black-Bkuqu6BP.js +1 -0
  639. package/assets/assets/vitesse-dark-D0r3Knsf.js +1 -0
  640. package/assets/assets/vitesse-light-CVO1_9PV.js +1 -0
  641. package/assets/assets/vscode-C5BXgFjm.svg +39 -0
  642. package/assets/assets/vue-DnHKYNfI.js +1 -0
  643. package/assets/assets/vue-html-CChd_i61.js +1 -0
  644. package/assets/assets/vue-vine-8moa0y9V.js +1 -0
  645. package/assets/assets/vyper-CDx5xZoG.js +1 -0
  646. package/assets/assets/wasm-CG6Dc4jp.js +1 -0
  647. package/assets/assets/wasm-MzD3tlZU.js +1 -0
  648. package/assets/assets/wenyan-BV7otONQ.js +1 -0
  649. package/assets/assets/wgsl-DYQUnd45.js +303 -0
  650. package/assets/assets/wgsl-Dx-B1_4e.js +1 -0
  651. package/assets/assets/wikitext-BhOHFoWU.js +1 -0
  652. package/assets/assets/wit-5i3qLPDT.js +1 -0
  653. package/assets/assets/wolfram-lXgVvXCa.js +1 -0
  654. package/assets/assets/worker-BDowWIry.js +155 -0
  655. package/assets/assets/xml-BKjz9euG.js +6 -0
  656. package/assets/assets/xml-sdJ4AIDG.js +1 -0
  657. package/assets/assets/xsl-CtQFsRM5.js +1 -0
  658. package/assets/assets/xychartDiagram-JWTSCODW-Ckcyhr_q.js +7 -0
  659. package/assets/assets/yaml-Buea-lGh.js +1 -0
  660. package/assets/assets/yaml-jJWTWPtR.js +6 -0
  661. package/assets/assets/yup-01-BtRq6dLN.aac +0 -0
  662. package/assets/assets/yup-01-Cv8FIGVN.js +1 -0
  663. package/assets/assets/yup-02-BIvWfOQf.js +1 -0
  664. package/assets/assets/yup-03-BHLEoqSS.aac +0 -0
  665. package/assets/assets/yup-03-DlJPYLhC.js +1 -0
  666. package/assets/assets/yup-04-C7yadpJT.aac +0 -0
  667. package/assets/assets/yup-04-CrvHiQIe.js +1 -0
  668. package/assets/assets/yup-05-CrtAHyVr.js +1 -0
  669. package/assets/assets/yup-05-CuuaeyjC.aac +0 -0
  670. package/assets/assets/yup-06-W4HuBYhb.js +1 -0
  671. package/assets/assets/zenburn-3iKGnI7X.js +1 -0
  672. package/assets/assets/zenscript-DVFEvuxE.js +1 -0
  673. package/assets/assets/zh-CibzNL3Z.js +3 -0
  674. package/assets/assets/zh-DqNk452I.js +1 -0
  675. package/assets/assets/zht-CfMMeSr0.js +1 -0
  676. package/assets/assets/zht-DsVmxmyh.js +3 -0
  677. package/assets/assets/zig-VOosw3JB.js +1 -0
  678. package/assets/favicon-96x96-v3.png +0 -0
  679. package/assets/favicon-96x96.png +0 -0
  680. package/assets/favicon-v3.ico +0 -0
  681. package/assets/favicon-v3.svg +7 -0
  682. package/assets/favicon.ico +0 -0
  683. package/assets/favicon.svg +7 -0
  684. package/assets/index.html +56 -0
  685. package/assets/logo.svg +9 -0
  686. package/assets/oc-theme-preload.js +35 -0
  687. package/assets/site.webmanifest +21 -0
  688. package/assets/social-share-zen.png +0 -0
  689. package/assets/social-share.png +0 -0
  690. package/assets/web-app-manifest-192x192.png +0 -0
  691. package/assets/web-app-manifest-512x512.png +0 -0
  692. package/bin/cli.mjs +111 -0
  693. package/package.json +35 -0
@@ -0,0 +1,162 @@
1
+ import{dg as _h,_ as An}from"./index-bSvs-Qh3.js";import{bp as Nh,bq as wh,aQ as Rd,b9 as Ih,aU as Ph,aR as ze,ar as $h,as as ml,a$ as Lh,b2 as vd,b3 as Ed,b0 as Oh,be as gl,au as Qn,av as ae,aS as xh,aM as Dh}from"./mermaid.core-DdXWHS-1.js";import{k as _r,j as qc,g as Or,S as Mh,w as Fh,x as Gh,c as Ad,v as $e,y as Sd,l as Uh,z as qh,A as jh,B as zh,C as Bh,a as kd,d as q,i as nn,r as Qe,f as pt,D as Ge}from"./_baseUniq-BsW7XEuT.js";import{j as jc,m as M,d as Wh,f as Tt,g as Nr,h as z,i as zc,l as Wn,e as Vh}from"./_basePickBy-B_7ShcHh.js";import{c as We}from"./clone-Cf5BTVxd.js";var Kh=Object.prototype,Hh=Kh.hasOwnProperty,ht=Nh(function(t,e){if(wh(e)||Rd(e)){Ih(e,_r(e),t);return}for(var n in e)Hh.call(e,n)&&Ph(t,n,e[n])});function Cd(t,e,n){var r=-1,i=t.length;e<0&&(e=-e>i?0:i+e),n=n>i?i:n,n<0&&(n+=i),i=e>n?0:n-e>>>0,e>>>=0;for(var s=Array(i);++r<i;)s[r]=t[r+e];return s}function qi(t){for(var e=-1,n=t==null?0:t.length,r=0,i=[];++e<n;){var s=t[e];s&&(i[r++]=s)}return i}function Yh(t,e,n,r){for(var i=-1,s=t==null?0:t.length;++i<s;){var a=t[i];e(r,a,n(a),t)}return r}function Xh(t,e,n,r){return qc(t,function(i,s,a){e(r,i,n(i),a)}),r}function Jh(t,e){return function(n,r){var i=ze(n)?Yh:Xh,s=e?e():{};return i(n,t,Or(r),s)}}var Qh=200;function Zh(t,e,n,r){var i=-1,s=Fh,a=!0,o=t.length,c=[],l=e.length;if(!o)return c;e.length>=Qh&&(s=Gh,a=!1,e=new Mh(e));e:for(;++i<o;){var u=t[i],f=u;if(u=u!==0?u:0,a&&f===f){for(var m=l;m--;)if(e[m]===f)continue e;c.push(u)}else s(e,f,r)||c.push(u)}return c}var ga=$h(function(t,e){return ml(t)?Zh(t,Ad(e,1,ml,!0)):[]});function Ue(t,e,n){var r=t==null?0:t.length;return r?(e=e===void 0?1:jc(e),Cd(t,e<0?0:e,r)):[]}function Ni(t,e,n){var r=t==null?0:t.length;return r?(e=e===void 0?1:jc(e),e=r-e,Cd(t,0,e<0?0:e)):[]}function ep(t,e){for(var n=-1,r=t==null?0:t.length;++n<r;)if(!e(t[n],n,t))return!1;return!0}function tp(t,e){var n=!0;return qc(t,function(r,i,s){return n=!!e(r,i,s),n}),n}function Ct(t,e,n){var r=ze(t)?ep:tp;return r(t,Or(e))}function _t(t){return t&&t.length?t[0]:void 0}function ft(t,e){return Ad(M(t,e))}var np=Object.prototype,rp=np.hasOwnProperty,ip=Jh(function(t,e,n){rp.call(t,n)?t[n].push(e):Lh(t,n,[e])}),sp="[object String]";function rt(t){return typeof t=="string"||!ze(t)&&vd(t)&&Ed(t)==sp}var ap=Math.max;function tt(t,e,n,r){t=Rd(t)?t:$e(t),n=n?jc(n):0;var i=t.length;return n<0&&(n=ap(i+n,0)),rt(t)?n<=i&&t.indexOf(e,n)>-1:!!i&&Sd(t,e,n)>-1}function yl(t,e,n){var r=t==null?0:t.length;if(!r)return-1;var i=0;return Sd(t,e,i)}var op="[object RegExp]";function cp(t){return vd(t)&&Ed(t)==op}var Tl=gl&&gl.isRegExp,rn=Tl?Oh(Tl):cp,lp="Expected a function";function up(t){if(typeof t!="function")throw new TypeError(lp);return function(){var e=arguments;switch(e.length){case 0:return!t.call(this);case 1:return!t.call(this,e[0]);case 2:return!t.call(this,e[0],e[1]);case 3:return!t.call(this,e[0],e[1],e[2])}return!t.apply(this,e)}}function Nt(t,e){if(t==null)return{};var n=Uh(qh(t),function(r){return[r]});return e=Or(e),Wh(t,n,function(r,i){return e(r,i[0])})}function ya(t,e){var n=ze(t)?jh:zh;return n(t,up(Or(e)))}function dp(t,e){var n;return qc(t,function(r,i,s){return n=e(r,i,s),!n}),!!n}function bd(t,e,n){var r=ze(t)?Bh:dp;return r(t,Or(e))}function Bc(t){return t&&t.length?kd(t):[]}function fp(t,e){return t&&t.length?kd(t,Or(e)):[]}function Ve(t){return typeof t=="object"&&t!==null&&typeof t.$type=="string"}function kt(t){return typeof t=="object"&&t!==null&&typeof t.$refText=="string"&&"ref"in t}function dn(t){return typeof t=="object"&&t!==null&&typeof t.$refText=="string"&&"items"in t}function hp(t){return typeof t=="object"&&t!==null&&typeof t.name=="string"&&typeof t.type=="string"&&typeof t.path=="string"}function Jr(t){return typeof t=="object"&&t!==null&&typeof t.info=="object"&&typeof t.message=="string"}class _d{constructor(){this.subtypes={},this.allSubtypes={}}getAllTypes(){return Object.keys(this.types)}getReferenceType(e){const n=this.types[e.container.$type];if(!n)throw new Error(`Type ${e.container.$type||"undefined"} not found.`);const r=n.properties[e.property]?.referenceType;if(!r)throw new Error(`Property ${e.property||"undefined"} of type ${e.container.$type} is not a reference.`);return r}getTypeMetaData(e){const n=this.types[e];return n||{name:e,properties:{},superTypes:[]}}isInstance(e,n){return Ve(e)&&this.isSubtype(e.$type,n)}isSubtype(e,n){if(e===n)return!0;let r=this.subtypes[e];r||(r=this.subtypes[e]={});const i=r[n];if(i!==void 0)return i;{const s=this.types[e],a=s?s.superTypes.some(o=>this.isSubtype(o,n)):!1;return r[n]=a,a}}getAllSubTypes(e){const n=this.allSubtypes[e];if(n)return n;{const r=this.getAllTypes(),i=[];for(const s of r)this.isSubtype(s,e)&&i.push(s);return this.allSubtypes[e]=i,i}}}function wi(t){return typeof t=="object"&&t!==null&&Array.isArray(t.content)}function Nd(t){return typeof t=="object"&&t!==null&&typeof t.tokenType=="object"}function wd(t){return wi(t)&&typeof t.fullText=="string"}class qe{constructor(e,n){this.startFn=e,this.nextFn=n}iterator(){const 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(){const e=this.iterator();let n=0,r=e.next();for(;!r.done;)n++,r=e.next();return n}toArray(){const e=[],n=this.iterator();let r;do r=n.next(),r.value!==void 0&&e.push(r.value);while(!r.done);return e}toSet(){return new Set(this)}toMap(e,n){const r=this.map(i=>[e?e(i):i,n?n(i):i]);return new Map(r)}toString(){return this.join()}concat(e){return new qe(()=>({first:this.startFn(),firstDone:!1,iterator:e[Symbol.iterator]()}),n=>{let r;if(!n.firstDone){do if(r=this.nextFn(n.first),!r.done)return r;while(!r.done);n.firstDone=!0}do if(r=n.iterator.next(),!r.done)return r;while(!r.done);return ut})}join(e=","){const n=this.iterator();let r="",i,s=!1;do i=n.next(),i.done||(s&&(r+=e),r+=pp(i.value)),s=!0;while(!i.done);return r}indexOf(e,n=0){const r=this.iterator();let i=0,s=r.next();for(;!s.done;){if(i>=n&&s.value===e)return i;s=r.next(),i++}return-1}every(e){const n=this.iterator();let r=n.next();for(;!r.done;){if(!e(r.value))return!1;r=n.next()}return!0}some(e){const n=this.iterator();let r=n.next();for(;!r.done;){if(e(r.value))return!0;r=n.next()}return!1}forEach(e){const n=this.iterator();let r=0,i=n.next();for(;!i.done;)e(i.value,r),i=n.next(),r++}map(e){return new qe(this.startFn,n=>{const{done:r,value:i}=this.nextFn(n);return r?ut:{done:!1,value:e(i)}})}filter(e){return new qe(this.startFn,n=>{let r;do if(r=this.nextFn(n),!r.done&&e(r.value))return r;while(!r.done);return ut})}nonNullable(){return this.filter(e=>e!=null)}reduce(e,n){const r=this.iterator();let i=n,s=r.next();for(;!s.done;)i===void 0?i=s.value:i=e(i,s.value),s=r.next();return i}reduceRight(e,n){return this.recursiveReduce(this.iterator(),e,n)}recursiveReduce(e,n,r){const i=e.next();if(i.done)return r;const s=this.recursiveReduce(e,n,r);return s===void 0?i.value:n(s,i.value)}find(e){const n=this.iterator();let r=n.next();for(;!r.done;){if(e(r.value))return r.value;r=n.next()}}findIndex(e){const n=this.iterator();let r=0,i=n.next();for(;!i.done;){if(e(i.value))return r;i=n.next(),r++}return-1}includes(e){const n=this.iterator();let r=n.next();for(;!r.done;){if(r.value===e)return!0;r=n.next()}return!1}flatMap(e){return new qe(()=>({this:this.startFn()}),n=>{do{if(n.iterator){const s=n.iterator.next();if(s.done)n.iterator=void 0;else return s}const{done:r,value:i}=this.nextFn(n.this);if(!r){const s=e(i);if(Ks(s))n.iterator=s[Symbol.iterator]();else return{done:!1,value:s}}}while(n.iterator);return ut})}flat(e){if(e===void 0&&(e=1),e<=0)return this;const n=e>1?this.flat(e-1):this;return new qe(()=>({this:n.startFn()}),r=>{do{if(r.iterator){const a=r.iterator.next();if(a.done)r.iterator=void 0;else return a}const{done:i,value:s}=n.nextFn(r.this);if(!i)if(Ks(s))r.iterator=s[Symbol.iterator]();else return{done:!1,value:s}}while(r.iterator);return ut})}head(){const n=this.iterator().next();if(!n.done)return n.value}tail(e=1){return new qe(()=>{const n=this.startFn();for(let r=0;r<e;r++)if(this.nextFn(n).done)return n;return n},this.nextFn)}limit(e){return new qe(()=>({size:0,state:this.startFn()}),n=>(n.size++,n.size>e?ut:this.nextFn(n.state)))}distinct(e){return new qe(()=>({set:new Set,internalState:this.startFn()}),n=>{let r;do if(r=this.nextFn(n.internalState),!r.done){const i=e?e(r.value):r.value;if(!n.set.has(i))return n.set.add(i),r}while(!r.done);return ut})}exclude(e,n){const r=new Set;for(const i of e){const s=n?n(i):i;r.add(s)}return this.filter(i=>{const s=n?n(i):i;return!r.has(s)})}}function pp(t){return typeof t=="string"?t:typeof t>"u"?"undefined":typeof t.toString=="function"?t.toString():Object.prototype.toString.call(t)}function Ks(t){return!!t&&typeof t[Symbol.iterator]=="function"}const Id=new qe(()=>{},()=>ut),ut=Object.freeze({done:!0,value:void 0});function me(...t){if(t.length===1){const e=t[0];if(e instanceof qe)return e;if(Ks(e))return new qe(()=>e[Symbol.iterator](),n=>n.next());if(typeof e.length=="number")return new qe(()=>({index:0}),n=>n.index<e.length?{done:!1,value:e[n.index++]}:ut)}return t.length>1?new qe(()=>({collIndex:0,arrIndex:0}),e=>{do{if(e.iterator){const n=e.iterator.next();if(!n.done)return n;e.iterator=void 0}if(e.array){if(e.arrIndex<e.array.length)return{done:!1,value:e.array[e.arrIndex++]};e.array=void 0,e.arrIndex=0}if(e.collIndex<t.length){const n=t[e.collIndex++];Ks(n)?e.iterator=n[Symbol.iterator]():n&&typeof n.length=="number"&&(e.array=n)}}while(e.iterator||e.array||e.collIndex<t.length);return ut}):Id}class Wc extends qe{constructor(e,n,r){super(()=>({iterators:r?.includeRoot?[[e][Symbol.iterator]()]:[n(e)[Symbol.iterator]()],pruned:!1}),i=>{for(i.pruned&&(i.iterators.pop(),i.pruned=!1);i.iterators.length>0;){const a=i.iterators[i.iterators.length-1].next();if(a.done)i.iterators.pop();else return i.iterators.push(n(a.value)[Symbol.iterator]()),a}return ut})}iterator(){const e={state:this.startFn(),next:()=>this.nextFn(e.state),prune:()=>{e.state.pruned=!0},[Symbol.iterator]:()=>e};return e}}var ro;(function(t){function e(s){return s.reduce((a,o)=>a+o,0)}t.sum=e;function n(s){return s.reduce((a,o)=>a*o,0)}t.product=n;function r(s){return s.reduce((a,o)=>Math.min(a,o))}t.min=r;function i(s){return s.reduce((a,o)=>Math.max(a,o))}t.max=i})(ro||(ro={}));function io(t,e={}){for(const[n,r]of Object.entries(t))n.startsWith("$")||(Array.isArray(r)?r.forEach((i,s)=>{Ve(i)&&(i.$container=t,i.$containerProperty=n,i.$containerIndex=s,e.deep&&io(i,e))}):Ve(r)&&(r.$container=t,r.$containerProperty=n,e.deep&&io(r,e)))}function Ta(t,e){let n=t;for(;n;){if(e(n))return n;n=n.$container}}function Zt(t){const n=$s(t).$document;if(!n)throw new Error("AST node has no document.");return n}function $s(t){for(;t.$container;)t=t.$container;return t}function Rl(t){return kt(t)?t.ref?[t.ref]:[]:dn(t)?t.items.map(e=>e.ref):[]}function Vc(t,e){if(!t)throw new Error("Node must be an AstNode.");const n=e?.range;return new qe(()=>({keys:Object.keys(t),keyIndex:0,arrayIndex:0}),r=>{for(;r.keyIndex<r.keys.length;){const i=r.keys[r.keyIndex];if(!i.startsWith("$")){const s=t[i];if(Ve(s)){if(r.keyIndex++,vl(s,n))return{done:!1,value:s}}else if(Array.isArray(s)){for(;r.arrayIndex<s.length;){const a=r.arrayIndex++,o=s[a];if(Ve(o)&&vl(o,n))return{done:!1,value:o}}r.arrayIndex=0}}r.keyIndex++}return ut})}function ji(t,e){if(!t)throw new Error("Root node must be an AstNode.");return new Wc(t,n=>Vc(n,e))}function en(t,e){if(!t)throw new Error("Root node must be an AstNode.");return new Wc(t,n=>Vc(n,e),{includeRoot:!0})}function vl(t,e){if(!e)return!0;const n=t.$cstNode?.range;return n?Mp(n,e):!1}function Hs(t){return new qe(()=>({keys:Object.keys(t),keyIndex:0,arrayIndex:0}),e=>{for(;e.keyIndex<e.keys.length;){const n=e.keys[e.keyIndex];if(!n.startsWith("$")){const r=t[n];if(kt(r)||dn(r))return e.keyIndex++,{done:!1,value:{reference:r,container:t,property:n}};if(Array.isArray(r)){for(;e.arrayIndex<r.length;){const i=e.arrayIndex++,s=r[i];if(kt(s)||dn(r))return{done:!1,value:{reference:s,container:t,property:n,index:i}}}e.arrayIndex=0}}e.keyIndex++}return ut})}function mp(t,e){const n=t.getTypeMetaData(e.$type),r=e;for(const i of Object.values(n.properties))i.defaultValue!==void 0&&r[i.name]===void 0&&(r[i.name]=Pd(i.defaultValue))}function Pd(t){return Array.isArray(t)?[...t.map(Pd)]:t}const lt={$type:"AbstractElement",cardinality:"cardinality"};function gp(t){return ee.isInstance(t,lt.$type)}const Ls={$type:"AbstractParserRule"};function zi(t){return ee.isInstance(t,Ls.$type)}const gs={$type:"AbstractRule"},At={$type:"AbstractType"},Mn={$type:"Action",cardinality:"cardinality",feature:"feature",inferredType:"inferredType",operator:"operator",type:"type"};function Ra(t){return ee.isInstance(t,Mn.$type)}const Os={$type:"Alternatives",cardinality:"cardinality",elements:"elements"};function $d(t){return ee.isInstance(t,Os.$type)}const El={$type:"ArrayLiteral",elements:"elements"},Al={$type:"ArrayType",elementType:"elementType"},Fn={$type:"Assignment",cardinality:"cardinality",feature:"feature",operator:"operator",predicate:"predicate",terminal:"terminal"};function Vn(t){return ee.isInstance(t,Fn.$type)}const so={$type:"BooleanLiteral",true:"true"};function yp(t){return ee.isInstance(t,so.$type)}const Gn={$type:"CharacterRange",cardinality:"cardinality",left:"left",lookahead:"lookahead",parenthesized:"parenthesized",right:"right"};function Tp(t){return ee.isInstance(t,Gn.$type)}const sr={$type:"Condition"},xs={$type:"Conjunction",left:"left",right:"right"};function Rp(t){return ee.isInstance(t,xs.$type)}const Un={$type:"CrossReference",cardinality:"cardinality",deprecatedSyntax:"deprecatedSyntax",isMulti:"isMulti",terminal:"terminal",type:"type"};function va(t){return ee.isInstance(t,Un.$type)}const Ds={$type:"Disjunction",left:"left",right:"right"};function vp(t){return ee.isInstance(t,Ds.$type)}const ao={$type:"EndOfFile",cardinality:"cardinality"};function Ep(t){return ee.isInstance(t,ao.$type)}const Sn={$type:"Grammar",imports:"imports",interfaces:"interfaces",isDeclared:"isDeclared",name:"name",rules:"rules",types:"types"},Sl={$type:"GrammarImport",path:"path"},dr={$type:"Group",cardinality:"cardinality",elements:"elements",guardCondition:"guardCondition",predicate:"predicate"};function Kc(t){return ee.isInstance(t,dr.$type)}const oo={$type:"InferredType",name:"name"};function Ld(t){return ee.isInstance(t,oo.$type)}const Kt={$type:"InfixRule",call:"call",dataType:"dataType",inferredType:"inferredType",name:"name",operators:"operators",parameters:"parameters",returnType:"returnType"};function Ys(t){return ee.isInstance(t,Kt.$type)}const La={$type:"InfixRuleOperatorList",associativity:"associativity",operators:"operators"},kl={$type:"InfixRuleOperators",precedences:"precedences"},Ti={$type:"Interface",attributes:"attributes",name:"name",superTypes:"superTypes"};function Ap(t){return ee.isInstance(t,Ti.$type)}const Ri={$type:"Keyword",cardinality:"cardinality",predicate:"predicate",value:"value"};function Kn(t){return ee.isInstance(t,Ri.$type)}const ys={$type:"NamedArgument",calledByName:"calledByName",parameter:"parameter",value:"value"},fr={$type:"NegatedToken",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",terminal:"terminal"};function Sp(t){return ee.isInstance(t,fr.$type)}const co={$type:"Negation",value:"value"};function kp(t){return ee.isInstance(t,co.$type)}const Cl={$type:"NumberLiteral",value:"value"},Ts={$type:"Parameter",name:"name"},lo={$type:"ParameterReference",parameter:"parameter"};function Cp(t){return ee.isInstance(t,lo.$type)}const $t={$type:"ParserRule",dataType:"dataType",definition:"definition",entry:"entry",fragment:"fragment",inferredType:"inferredType",name:"name",parameters:"parameters",returnType:"returnType"};function an(t){return ee.isInstance(t,$t.$type)}const Oa={$type:"ReferenceType",isMulti:"isMulti",referenceType:"referenceType"},hr={$type:"RegexToken",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",regex:"regex"};function bp(t){return ee.isInstance(t,hr.$type)}const uo={$type:"ReturnType",name:"name"};function _p(t){return ee.isInstance(t,uo.$type)}const pr={$type:"RuleCall",arguments:"arguments",cardinality:"cardinality",predicate:"predicate",rule:"rule"};function Hn(t){return ee.isInstance(t,pr.$type)}const vi={$type:"SimpleType",primitiveType:"primitiveType",stringType:"stringType",typeRef:"typeRef"};function Np(t){return ee.isInstance(t,vi.$type)}const bl={$type:"StringLiteral",value:"value"},mr={$type:"TerminalAlternatives",cardinality:"cardinality",elements:"elements",lookahead:"lookahead",parenthesized:"parenthesized"};function wp(t){return ee.isInstance(t,mr.$type)}const yt={$type:"TerminalElement",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized"},gr={$type:"TerminalGroup",cardinality:"cardinality",elements:"elements",lookahead:"lookahead",parenthesized:"parenthesized"};function Ip(t){return ee.isInstance(t,gr.$type)}const un={$type:"TerminalRule",definition:"definition",fragment:"fragment",hidden:"hidden",name:"name",type:"type"};function on(t){return ee.isInstance(t,un.$type)}const yr={$type:"TerminalRuleCall",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",rule:"rule"};function Pp(t){return ee.isInstance(t,yr.$type)}const Ms={$type:"Type",name:"name",type:"type"};function $p(t){return ee.isInstance(t,Ms.$type)}const Qr={$type:"TypeAttribute",defaultValue:"defaultValue",isOptional:"isOptional",name:"name",type:"type"},Zr={$type:"TypeDefinition"},_l={$type:"UnionType",types:"types"},Fs={$type:"UnorderedGroup",cardinality:"cardinality",elements:"elements"};function Od(t){return ee.isInstance(t,Fs.$type)}const Tr={$type:"UntilToken",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",terminal:"terminal"};function Lp(t){return ee.isInstance(t,Tr.$type)}const ei={$type:"ValueLiteral"},Ei={$type:"Wildcard",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized"};function Op(t){return ee.isInstance(t,Ei.$type)}class xd extends _d{constructor(){super(...arguments),this.types={AbstractElement:{name:lt.$type,properties:{cardinality:{name:lt.cardinality}},superTypes:[]},AbstractParserRule:{name:Ls.$type,properties:{},superTypes:[gs.$type,At.$type]},AbstractRule:{name:gs.$type,properties:{},superTypes:[]},AbstractType:{name:At.$type,properties:{},superTypes:[]},Action:{name:Mn.$type,properties:{cardinality:{name:Mn.cardinality},feature:{name:Mn.feature},inferredType:{name:Mn.inferredType},operator:{name:Mn.operator},type:{name:Mn.type,referenceType:At.$type}},superTypes:[lt.$type]},Alternatives:{name:Os.$type,properties:{cardinality:{name:Os.cardinality},elements:{name:Os.elements,defaultValue:[]}},superTypes:[lt.$type]},ArrayLiteral:{name:El.$type,properties:{elements:{name:El.elements,defaultValue:[]}},superTypes:[ei.$type]},ArrayType:{name:Al.$type,properties:{elementType:{name:Al.elementType}},superTypes:[Zr.$type]},Assignment:{name:Fn.$type,properties:{cardinality:{name:Fn.cardinality},feature:{name:Fn.feature},operator:{name:Fn.operator},predicate:{name:Fn.predicate},terminal:{name:Fn.terminal}},superTypes:[lt.$type]},BooleanLiteral:{name:so.$type,properties:{true:{name:so.true,defaultValue:!1}},superTypes:[sr.$type,ei.$type]},CharacterRange:{name:Gn.$type,properties:{cardinality:{name:Gn.cardinality},left:{name:Gn.left},lookahead:{name:Gn.lookahead},parenthesized:{name:Gn.parenthesized,defaultValue:!1},right:{name:Gn.right}},superTypes:[yt.$type]},Condition:{name:sr.$type,properties:{},superTypes:[]},Conjunction:{name:xs.$type,properties:{left:{name:xs.left},right:{name:xs.right}},superTypes:[sr.$type]},CrossReference:{name:Un.$type,properties:{cardinality:{name:Un.cardinality},deprecatedSyntax:{name:Un.deprecatedSyntax,defaultValue:!1},isMulti:{name:Un.isMulti,defaultValue:!1},terminal:{name:Un.terminal},type:{name:Un.type,referenceType:At.$type}},superTypes:[lt.$type]},Disjunction:{name:Ds.$type,properties:{left:{name:Ds.left},right:{name:Ds.right}},superTypes:[sr.$type]},EndOfFile:{name:ao.$type,properties:{cardinality:{name:ao.cardinality}},superTypes:[lt.$type]},Grammar:{name:Sn.$type,properties:{imports:{name:Sn.imports,defaultValue:[]},interfaces:{name:Sn.interfaces,defaultValue:[]},isDeclared:{name:Sn.isDeclared,defaultValue:!1},name:{name:Sn.name},rules:{name:Sn.rules,defaultValue:[]},types:{name:Sn.types,defaultValue:[]}},superTypes:[]},GrammarImport:{name:Sl.$type,properties:{path:{name:Sl.path}},superTypes:[]},Group:{name:dr.$type,properties:{cardinality:{name:dr.cardinality},elements:{name:dr.elements,defaultValue:[]},guardCondition:{name:dr.guardCondition},predicate:{name:dr.predicate}},superTypes:[lt.$type]},InferredType:{name:oo.$type,properties:{name:{name:oo.name}},superTypes:[At.$type]},InfixRule:{name:Kt.$type,properties:{call:{name:Kt.call},dataType:{name:Kt.dataType},inferredType:{name:Kt.inferredType},name:{name:Kt.name},operators:{name:Kt.operators},parameters:{name:Kt.parameters,defaultValue:[]},returnType:{name:Kt.returnType,referenceType:At.$type}},superTypes:[Ls.$type]},InfixRuleOperatorList:{name:La.$type,properties:{associativity:{name:La.associativity},operators:{name:La.operators,defaultValue:[]}},superTypes:[]},InfixRuleOperators:{name:kl.$type,properties:{precedences:{name:kl.precedences,defaultValue:[]}},superTypes:[]},Interface:{name:Ti.$type,properties:{attributes:{name:Ti.attributes,defaultValue:[]},name:{name:Ti.name},superTypes:{name:Ti.superTypes,defaultValue:[],referenceType:At.$type}},superTypes:[At.$type]},Keyword:{name:Ri.$type,properties:{cardinality:{name:Ri.cardinality},predicate:{name:Ri.predicate},value:{name:Ri.value}},superTypes:[lt.$type]},NamedArgument:{name:ys.$type,properties:{calledByName:{name:ys.calledByName,defaultValue:!1},parameter:{name:ys.parameter,referenceType:Ts.$type},value:{name:ys.value}},superTypes:[]},NegatedToken:{name:fr.$type,properties:{cardinality:{name:fr.cardinality},lookahead:{name:fr.lookahead},parenthesized:{name:fr.parenthesized,defaultValue:!1},terminal:{name:fr.terminal}},superTypes:[yt.$type]},Negation:{name:co.$type,properties:{value:{name:co.value}},superTypes:[sr.$type]},NumberLiteral:{name:Cl.$type,properties:{value:{name:Cl.value}},superTypes:[ei.$type]},Parameter:{name:Ts.$type,properties:{name:{name:Ts.name}},superTypes:[]},ParameterReference:{name:lo.$type,properties:{parameter:{name:lo.parameter,referenceType:Ts.$type}},superTypes:[sr.$type]},ParserRule:{name:$t.$type,properties:{dataType:{name:$t.dataType},definition:{name:$t.definition},entry:{name:$t.entry,defaultValue:!1},fragment:{name:$t.fragment,defaultValue:!1},inferredType:{name:$t.inferredType},name:{name:$t.name},parameters:{name:$t.parameters,defaultValue:[]},returnType:{name:$t.returnType,referenceType:At.$type}},superTypes:[Ls.$type]},ReferenceType:{name:Oa.$type,properties:{isMulti:{name:Oa.isMulti,defaultValue:!1},referenceType:{name:Oa.referenceType}},superTypes:[Zr.$type]},RegexToken:{name:hr.$type,properties:{cardinality:{name:hr.cardinality},lookahead:{name:hr.lookahead},parenthesized:{name:hr.parenthesized,defaultValue:!1},regex:{name:hr.regex}},superTypes:[yt.$type]},ReturnType:{name:uo.$type,properties:{name:{name:uo.name}},superTypes:[]},RuleCall:{name:pr.$type,properties:{arguments:{name:pr.arguments,defaultValue:[]},cardinality:{name:pr.cardinality},predicate:{name:pr.predicate},rule:{name:pr.rule,referenceType:gs.$type}},superTypes:[lt.$type]},SimpleType:{name:vi.$type,properties:{primitiveType:{name:vi.primitiveType},stringType:{name:vi.stringType},typeRef:{name:vi.typeRef,referenceType:At.$type}},superTypes:[Zr.$type]},StringLiteral:{name:bl.$type,properties:{value:{name:bl.value}},superTypes:[ei.$type]},TerminalAlternatives:{name:mr.$type,properties:{cardinality:{name:mr.cardinality},elements:{name:mr.elements,defaultValue:[]},lookahead:{name:mr.lookahead},parenthesized:{name:mr.parenthesized,defaultValue:!1}},superTypes:[yt.$type]},TerminalElement:{name:yt.$type,properties:{cardinality:{name:yt.cardinality},lookahead:{name:yt.lookahead},parenthesized:{name:yt.parenthesized,defaultValue:!1}},superTypes:[lt.$type]},TerminalGroup:{name:gr.$type,properties:{cardinality:{name:gr.cardinality},elements:{name:gr.elements,defaultValue:[]},lookahead:{name:gr.lookahead},parenthesized:{name:gr.parenthesized,defaultValue:!1}},superTypes:[yt.$type]},TerminalRule:{name:un.$type,properties:{definition:{name:un.definition},fragment:{name:un.fragment,defaultValue:!1},hidden:{name:un.hidden,defaultValue:!1},name:{name:un.name},type:{name:un.type}},superTypes:[gs.$type]},TerminalRuleCall:{name:yr.$type,properties:{cardinality:{name:yr.cardinality},lookahead:{name:yr.lookahead},parenthesized:{name:yr.parenthesized,defaultValue:!1},rule:{name:yr.rule,referenceType:un.$type}},superTypes:[yt.$type]},Type:{name:Ms.$type,properties:{name:{name:Ms.name},type:{name:Ms.type}},superTypes:[At.$type]},TypeAttribute:{name:Qr.$type,properties:{defaultValue:{name:Qr.defaultValue},isOptional:{name:Qr.isOptional,defaultValue:!1},name:{name:Qr.name},type:{name:Qr.type}},superTypes:[]},TypeDefinition:{name:Zr.$type,properties:{},superTypes:[]},UnionType:{name:_l.$type,properties:{types:{name:_l.types,defaultValue:[]}},superTypes:[Zr.$type]},UnorderedGroup:{name:Fs.$type,properties:{cardinality:{name:Fs.cardinality},elements:{name:Fs.elements,defaultValue:[]}},superTypes:[lt.$type]},UntilToken:{name:Tr.$type,properties:{cardinality:{name:Tr.cardinality},lookahead:{name:Tr.lookahead},parenthesized:{name:Tr.parenthesized,defaultValue:!1},terminal:{name:Tr.terminal}},superTypes:[yt.$type]},ValueLiteral:{name:ei.$type,properties:{},superTypes:[]},Wildcard:{name:Ei.$type,properties:{cardinality:{name:Ei.cardinality},lookahead:{name:Ei.lookahead},parenthesized:{name:Ei.parenthesized,defaultValue:!1}},superTypes:[yt.$type]}}}}const ee=new xd;function fo(t){return new Wc(t,e=>wi(e)?e.content:[],{includeRoot:!0})}function xp(t,e){for(;t.container;)if(t=t.container,t===e)return!0;return!1}function ho(t){return{start:{character:t.startColumn-1,line:t.startLine-1},end:{character:t.endColumn,line:t.endLine-1}}}function Xs(t){if(!t)return;const{offset:e,end:n,range:r}=t;return{range:r,offset:e,end:n,length:n-e}}var Jt;(function(t){t[t.Before=0]="Before",t[t.After=1]="After",t[t.OverlapFront=2]="OverlapFront",t[t.OverlapBack=3]="OverlapBack",t[t.Inside=4]="Inside",t[t.Outside=5]="Outside"})(Jt||(Jt={}));function Dp(t,e){if(t.end.line<e.start.line||t.end.line===e.start.line&&t.end.character<=e.start.character)return Jt.Before;if(t.start.line>e.end.line||t.start.line===e.end.line&&t.start.character>=e.end.character)return Jt.After;const n=t.start.line>e.start.line||t.start.line===e.start.line&&t.start.character>=e.start.character,r=t.end.line<e.end.line||t.end.line===e.end.line&&t.end.character<=e.end.character;return n&&r?Jt.Inside:n?Jt.OverlapBack:r?Jt.OverlapFront:Jt.Outside}function Mp(t,e){return Dp(t,e)>Jt.After}const Fp=/^[\w\p{L}]$/u;function Gp(t,e){if(t){const n=Up(t,!0);if(n&&Nl(n,e))return n;if(wd(t)){const r=t.content.findIndex(i=>!i.hidden);for(let i=r-1;i>=0;i--){const s=t.content[i];if(Nl(s,e))return s}}}}function Nl(t,e){return Nd(t)&&e.includes(t.tokenType.name)}function Up(t,e=!0){for(;t.container;){const n=t.container;let r=n.content.indexOf(t);for(;r>0;){r--;const i=n.content[r];if(e||!i.hidden)return i}t=n}}class Dd extends Error{constructor(e,n){super(e?`${n} at ${e.range.start.line}:${e.range.start.character}`:n)}}function Bi(t,e="Error: Got unexpected value."){throw new Error(e)}function W(t){return t.charCodeAt(0)}function xa(t,e){Array.isArray(t)?t.forEach(function(n){e.push(n)}):e.push(t)}function ti(t,e){if(t[e]===!0)throw"duplicate flag "+e;t[e],t[e]=!0}function ar(t){if(t===void 0)throw Error("Internal Error - Should never get here!");return!0}function qp(){throw Error("Internal Error - Should never get here!")}function wl(t){return t.type==="Character"}const Js=[];for(let t=W("0");t<=W("9");t++)Js.push(t);const Qs=[W("_")].concat(Js);for(let t=W("a");t<=W("z");t++)Qs.push(t);for(let t=W("A");t<=W("Z");t++)Qs.push(t);const Il=[W(" "),W("\f"),W(`
2
+ `),W("\r"),W(" "),W("\v"),W(" "),W(" "),W(" "),W(" "),W(" "),W(" "),W(" "),W(" "),W(" "),W(" "),W(" "),W(" "),W(" "),W(" "),W("\u2028"),W("\u2029"),W(" "),W(" "),W(" "),W("\uFEFF")],jp=/[0-9a-fA-F]/,Rs=/[0-9]/,zp=/[1-9]/;class Md{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("/");const n=this.disjunction();this.consumeChar("/");const r={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":ti(r,"global");break;case"i":ti(r,"ignoreCase");break;case"m":ti(r,"multiLine");break;case"u":ti(r,"unicode");break;case"y":ti(r,"sticky");break}if(this.idx!==this.input.length)throw Error("Redundant input: "+this.input.substring(this.idx));return{type:"Pattern",flags:r,value:n,loc:this.loc(0)}}disjunction(){const e=[],n=this.idx;for(e.push(this.alternative());this.peekChar()==="|";)this.consumeChar("|"),e.push(this.alternative());return{type:"Disjunction",value:e,loc:this.loc(n)}}alternative(){const e=[],n=this.idx;for(;this.isTerm();)e.push(this.term());return{type:"Alternative",value:e,loc:this.loc(n)}}term(){return this.isAssertion()?this.assertion():this.atom()}assertion(){const 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 n;switch(this.popChar()){case"=":n="Lookahead";break;case"!":n="NegativeLookahead";break;case"<":{switch(this.popChar()){case"=":n="Lookbehind";break;case"!":n="NegativeLookbehind"}break}}ar(n);const r=this.disjunction();return this.consumeChar(")"),{type:n,value:r,loc:this.loc(e)}}return qp()}quantifier(e=!1){let n;const r=this.idx;switch(this.popChar()){case"*":n={atLeast:0,atMost:1/0};break;case"+":n={atLeast:1,atMost:1/0};break;case"?":n={atLeast:0,atMost:1};break;case"{":const i=this.integerIncludingZero();switch(this.popChar()){case"}":n={atLeast:i,atMost:i};break;case",":let s;this.isDigit()?(s=this.integerIncludingZero(),n={atLeast:i,atMost:s}):n={atLeast:i,atMost:1/0},this.consumeChar("}");break}if(e===!0&&n===void 0)return;ar(n);break}if(!(e===!0&&n===void 0)&&ar(n))return this.peekChar(0)==="?"?(this.consumeChar("?"),n.greedy=!1):n.greedy=!0,n.type="Quantifier",n.loc=this.loc(r),n}atom(){let e;const n=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}if(e===void 0&&this.isPatternCharacter()&&(e=this.patternCharacter()),ar(e))return e.loc=this.loc(n),this.isQuantifier()&&(e.quantifier=this.quantifier()),e}dotAll(){return this.consumeChar("."),{type:"Set",complement:!0,value:[W(`
3
+ `),W("\r"),W("\u2028"),W("\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,n=!1;switch(this.popChar()){case"d":e=Js;break;case"D":e=Js,n=!0;break;case"s":e=Il;break;case"S":e=Il,n=!0;break;case"w":e=Qs;break;case"W":e=Qs,n=!0;break}if(ar(e))return{type:"Set",value:e,complement:n}}controlEscapeAtom(){let e;switch(this.popChar()){case"f":e=W("\f");break;case"n":e=W(`
4
+ `);break;case"r":e=W("\r");break;case"t":e=W(" ");break;case"v":e=W("\v");break}if(ar(e))return{type:"Character",value:e}}controlLetterEscapeAtom(){this.consumeChar("c");const 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:W("\0")}}hexEscapeSequenceAtom(){return this.consumeChar("x"),this.parseHexDigits(2)}regExpUnicodeEscapeSequenceAtom(){return this.consumeChar("u"),this.parseHexDigits(4)}identityEscapeAtom(){const e=this.popChar();return{type:"Character",value:W(e)}}classPatternCharacterAtom(){switch(this.peekChar()){case`
5
+ `:case"\r":case"\u2028":case"\u2029":case"\\":case"]":throw Error("TBD");default:const e=this.popChar();return{type:"Character",value:W(e)}}}characterClass(){const e=[];let n=!1;for(this.consumeChar("["),this.peekChar(0)==="^"&&(this.consumeChar("^"),n=!0);this.isClassAtom();){const r=this.classAtom();if(r.type,wl(r)&&this.isRangeDash()){this.consumeChar("-");const i=this.classAtom();if(i.type,wl(i)){if(i.value<r.value)throw Error("Range out of order in character class");e.push({from:r.value,to:i.value})}else xa(r.value,e),e.push(W("-")),xa(i.value,e)}else xa(r.value,e)}return this.consumeChar("]"),{type:"Set",complement:n,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:W("\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}const n=this.disjunction();this.consumeChar(")");const r={type:"Group",capturing:e,value:n};return e&&(r.idx=this.groupIdx),r}positiveInteger(){let e=this.popChar();if(zp.test(e)===!1)throw Error("Expecting a positive integer");for(;Rs.test(this.peekChar(0));)e+=this.popChar();return parseInt(e,10)}integerIncludingZero(){let e=this.popChar();if(Rs.test(e)===!1)throw Error("Expecting an integer");for(;Rs.test(this.peekChar(0));)e+=this.popChar();return parseInt(e,10)}patternCharacter(){const 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:W(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 Rs.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(){const 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 n="";for(let i=0;i<e;i++){const s=this.popChar();if(jp.test(s)===!1)throw Error("Expecting a HexDecimal digits");n+=s}return{type:"Character",value:parseInt(n,16)}}peekChar(e=0){return this.input[this.idx+e]}popChar(){const 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}}}class Ea{visitChildren(e){for(const n in e){const r=e[n];e.hasOwnProperty(n)&&(r.type!==void 0?this.visit(r):Array.isArray(r)&&r.forEach(i=>{this.visit(i)},this))}}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){}}const Bp=/\r?\n/gm,Wp=new Md;class Vp extends Ea{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){const n=String.fromCharCode(e.value);if(!this.multiline&&n===`
10
+ `&&(this.multiline=!0),e.quantifier)this.isStarting=!1,this.endRegexpStack=[];else{const r=Aa(n);this.endRegexpStack.push(r),this.isStarting&&(this.startRegexp+=r)}}visitSet(e){if(!this.multiline){const n=this.regex.substring(e.loc.begin,e.loc.end),r=new RegExp(n);this.multiline=!!`
11
+ `.match(r)}if(e.quantifier)this.isStarting=!1,this.endRegexpStack=[];else{const n=this.regex.substring(e.loc.begin,e.loc.end);this.endRegexpStack.push(n),this.isStarting&&(this.startRegexp+=n)}}visitChildren(e){e.type==="Group"&&e.quantifier||super.visitChildren(e)}}const Da=new Vp;function Kp(t){try{return typeof t=="string"&&(t=new RegExp(t)),t=t.toString(),Da.reset(t),Da.visit(Wp.pattern(t)),Da.multiline}catch{return!1}}const Hp=`\f
12
+ \r \v              \u2028\u2029   \uFEFF`.split("");function Fd(t){const e=typeof t=="string"?new RegExp(t):t;return Hp.some(n=>e.test(n))}function Aa(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Yp(t,e){const n=Xp(t),r=e.match(n);return!!r&&r[0].length>0}function Xp(t){typeof t=="string"&&(t=new RegExp(t));const e=t,n=t.source;let r=0;function i(){let s="",a;function o(l){s+=n.substr(r,l),r+=l}function c(l){s+="(?:"+n.substr(r,l)+"|$)",r+=l}for(;r<n.length;)switch(n[r]){case"\\":switch(n[r+1]){case"c":c(3);break;case"x":c(4);break;case"u":e.unicode?n[r+2]==="{"?c(n.indexOf("}",r)-r+1):c(6):c(2);break;case"p":case"P":e.unicode?c(n.indexOf("}",r)-r+1):c(2);break;case"k":c(n.indexOf(">",r)-r+1);break;default:c(2);break}break;case"[":a=/\[(?:\\.|.)*?\]/g,a.lastIndex=r,a=a.exec(n)||[],c(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):c(1);break;case"(":if(n[r+1]==="?")switch(n[r+2]){case":":s+="(?:",r+=3,s+=i()+"|$)";break;case"=":s+="(?=",r+=3,s+=i()+")";break;case"!":a=r,r+=3,i(),s+=n.substr(a,r-a);break;case"<":switch(n[r+3]){case"=":case"!":a=r,r+=4,i(),s+=n.substr(a,r-a);break;default:o(n.indexOf(">",r)-r+1),s+=i()+"|$)";break}break}else o(1),s+=i()+"|$)";break;case")":return++r,s;default:c(1);break}return s}return new RegExp(i(),t.flags)}function Jp(t){return t.rules.find(e=>an(e)&&e.entry)}function Qp(t){return t.rules.filter(e=>on(e)&&e.hidden)}function Gd(t,e){const n=new Set,r=Jp(t);if(!r)return new Set(t.rules);const i=[r].concat(Qp(t));for(const a of i)Ud(a,n,e);const s=new Set;for(const a of t.rules)(n.has(a.name)||on(a)&&a.hidden)&&s.add(a);return s}function Ud(t,e,n){e.add(t.name),ji(t).forEach(r=>{if(Hn(r)||n){const i=r.rule.ref;i&&!e.has(i.name)&&Ud(i,e,n)}})}function Zp(t){if(t.terminal)return t.terminal;if(t.type.ref)return jd(t.type.ref)?.terminal}function em(t){return t.hidden&&!Fd(Yc(t))}function tm(t,e){return!t||!e?[]:Hc(t,e,t.astNode,!0)}function qd(t,e,n){if(!t||!e)return;const r=Hc(t,e,t.astNode,!0);if(r.length!==0)return n!==void 0?n=Math.max(0,Math.min(n,r.length-1)):n=0,r[n]}function Hc(t,e,n,r){if(!r){const i=Ta(t.grammarSource,Vn);if(i&&i.feature===e)return[t]}return wi(t)&&t.astNode===n?t.content.flatMap(i=>Hc(i,e,n,!1)):[]}function nm(t,e,n){if(!t)return;const r=rm(t,e,t?.astNode);if(r.length!==0)return n!==void 0?n=Math.max(0,Math.min(n,r.length-1)):n=0,r[n]}function rm(t,e,n){if(t.astNode!==n)return[];if(Kn(t.grammarSource)&&t.grammarSource.value===e)return[t];const r=fo(t).iterator();let i;const s=[];do if(i=r.next(),!i.done){const a=i.value;a.astNode===n?Kn(a.grammarSource)&&a.grammarSource.value===e&&s.push(a):r.prune()}while(!i.done);return s}function im(t){const e=t.astNode;for(;e===t.container?.astNode;){const n=Ta(t.grammarSource,Vn);if(n)return n;t=t.container}}function jd(t){let e=t;return Ld(e)&&(Ra(e.$container)?e=e.$container.$container:zi(e.$container)?e=e.$container:Bi(e.$container)),zd(t,e,new Map)}function zd(t,e,n){function r(i,s){let a;return Ta(i,Vn)||(a=zd(s,s,n)),n.set(t,a),a}if(n.has(t))return n.get(t);n.set(t,void 0);for(const i of ji(e)){if(Vn(i)&&i.feature.toLowerCase()==="name")return n.set(t,i),i;if(Hn(i)&&an(i.rule.ref))return r(i,i.rule.ref);if(Np(i)&&i.typeRef?.ref)return r(i,i.typeRef.ref)}}function Bd(t){return Wd(t,new Set)}function Wd(t,e){if(e.has(t))return!0;e.add(t);for(const n of ji(t))if(Hn(n)){if(!n.rule.ref||an(n.rule.ref)&&!Wd(n.rule.ref,e)||Ys(n.rule.ref))return!1}else{if(Vn(n))return!1;if(Ra(n))return!1}return!!t.definition}function Vd(t){if(!on(t)){if(t.inferredType)return t.inferredType.name;if(t.dataType)return t.dataType;if(t.returnType){const e=t.returnType.ref;if(e)return e.name}}}function Ii(t){if(zi(t))return an(t)&&Bd(t)?t.name:Vd(t)??t.name;if(Ap(t)||$p(t)||_p(t))return t.name;if(Ra(t)){const e=sm(t);if(e)return e}else if(Ld(t))return t.name;throw new Error("Cannot get name of Unknown Type")}function sm(t){if(t.inferredType)return t.inferredType.name;if(t.type?.ref)return Ii(t.type.ref)}function am(t){return on(t)?t.type?.name??"string":Vd(t)??t.name}function Yc(t){const e={s:!1,i:!1,u:!1},n=xr(t.definition,e),r=Object.entries(e).filter(([,i])=>i).map(([i])=>i).join("");return new RegExp(n,r)}const Xc=/[\s\S]/.source;function xr(t,e){if(wp(t))return om(t);if(Ip(t))return cm(t);if(Tp(t))return dm(t);if(Pp(t)){const n=t.rule.ref;if(!n)throw new Error("Missing rule reference.");return tn(xr(n.definition),{cardinality:t.cardinality,lookahead:t.lookahead,parenthesized:t.parenthesized})}else{if(Sp(t))return um(t);if(Lp(t))return lm(t);if(bp(t)){const n=t.regex.lastIndexOf("/"),r=t.regex.substring(1,n),i=t.regex.substring(n+1);return e&&(e.i=i.includes("i"),e.s=i.includes("s"),e.u=i.includes("u")),tn(r,{cardinality:t.cardinality,lookahead:t.lookahead,parenthesized:t.parenthesized,wrap:!1})}else{if(Op(t))return tn(Xc,{cardinality:t.cardinality,lookahead:t.lookahead,parenthesized:t.parenthesized});throw new Error(`Invalid terminal element: ${t?.$type}, ${t?.$cstNode?.text}`)}}}function om(t){return tn(t.elements.map(e=>xr(e)).join("|"),{cardinality:t.cardinality,lookahead:t.lookahead,parenthesized:t.parenthesized,wrap:!1})}function cm(t){return tn(t.elements.map(e=>xr(e)).join(""),{cardinality:t.cardinality,lookahead:t.lookahead,parenthesized:t.parenthesized,wrap:!1})}function lm(t){return tn(`${Xc}*?${xr(t.terminal)}`,{cardinality:t.cardinality,lookahead:t.lookahead,parenthesized:t.parenthesized})}function um(t){return tn(`(?!${xr(t.terminal)})${Xc}*?`,{cardinality:t.cardinality,lookahead:t.lookahead,parenthesized:t.parenthesized})}function dm(t){return t.right?tn(`[${Ma(t.left)}-${Ma(t.right)}]`,{cardinality:t.cardinality,lookahead:t.lookahead,parenthesized:t.parenthesized,wrap:!1}):tn(Ma(t.left),{cardinality:t.cardinality,lookahead:t.lookahead,parenthesized:t.parenthesized,wrap:!1})}function Ma(t){return Aa(t.value)}function tn(t,e){return(e.parenthesized||e.lookahead||e.wrap!==!1)&&(t=`(${e.lookahead??(e.parenthesized?"":"?:")}${t})`),e.cardinality?`${t}${e.cardinality}`:t}function fm(t){const e=[],n=t.Grammar;for(const r of n.rules)on(r)&&em(r)&&Kp(Yc(r))&&e.push(r.name);return{multilineCommentRules:e,nameRegexp:Fp}}function po(t){console&&console.error&&console.error(`Error: ${t}`)}function Kd(t){console&&console.warn&&console.warn(`Warning: ${t}`)}function Hd(t){const e=new Date().getTime(),n=t();return{time:new Date().getTime()-e,value:n}}function Yd(t){function e(){}e.prototype=t;const n=new e;function r(){return typeof n.bar}return r(),r(),t}function hm(t){return pm(t)?t.LABEL:t.name}function pm(t){return rt(t.LABEL)&&t.LABEL!==""}class Dt{get definition(){return this._definition}set definition(e){this._definition=e}constructor(e){this._definition=e}accept(e){e.visit(this),q(this.definition,n=>{n.accept(e)})}}class Ze extends Dt{constructor(e){super([]),this.idx=1,ht(this,Nt(e,n=>n!==void 0))}set definition(e){}get definition(){return this.referencedRule!==void 0?this.referencedRule.definition:[]}accept(e){e.visit(this)}}class Dr extends Dt{constructor(e){super(e.definition),this.orgText="",ht(this,Nt(e,n=>n!==void 0))}}class it extends Dt{constructor(e){super(e.definition),this.ignoreAmbiguities=!1,ht(this,Nt(e,n=>n!==void 0))}}let Be=class extends Dt{constructor(e){super(e.definition),this.idx=1,ht(this,Nt(e,n=>n!==void 0))}};class mt extends Dt{constructor(e){super(e.definition),this.idx=1,ht(this,Nt(e,n=>n!==void 0))}}class gt extends Dt{constructor(e){super(e.definition),this.idx=1,ht(this,Nt(e,n=>n!==void 0))}}class Ae extends Dt{constructor(e){super(e.definition),this.idx=1,ht(this,Nt(e,n=>n!==void 0))}}class st extends Dt{constructor(e){super(e.definition),this.idx=1,ht(this,Nt(e,n=>n!==void 0))}}class at extends Dt{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,ht(this,Nt(e,n=>n!==void 0))}}class le{constructor(e){this.idx=1,ht(this,Nt(e,n=>n!==void 0))}accept(e){e.visit(this)}}function mm(t){return M(t,Gs)}function Gs(t){function e(n){return M(n,Gs)}if(t instanceof Ze){const n={type:"NonTerminal",name:t.nonTerminalName,idx:t.idx};return rt(t.label)&&(n.label=t.label),n}else{if(t instanceof it)return{type:"Alternative",definition:e(t.definition)};if(t instanceof Be)return{type:"Option",idx:t.idx,definition:e(t.definition)};if(t instanceof mt)return{type:"RepetitionMandatory",idx:t.idx,definition:e(t.definition)};if(t instanceof gt)return{type:"RepetitionMandatoryWithSeparator",idx:t.idx,separator:Gs(new le({terminalType:t.separator})),definition:e(t.definition)};if(t instanceof st)return{type:"RepetitionWithSeparator",idx:t.idx,separator:Gs(new le({terminalType:t.separator})),definition:e(t.definition)};if(t instanceof Ae)return{type:"Repetition",idx:t.idx,definition:e(t.definition)};if(t instanceof at)return{type:"Alternation",idx:t.idx,definition:e(t.definition)};if(t instanceof le){const n={type:"Terminal",name:t.terminalType.name,label:hm(t.terminalType),idx:t.idx};rt(t.label)&&(n.terminalLabel=t.label);const r=t.terminalType.PATTERN;return t.terminalType.PATTERN&&(n.pattern=rn(r)?r.source:r),n}else{if(t instanceof Dr)return{type:"Rule",name:t.name,orgText:t.orgText,definition:e(t.definition)};throw Error("non exhaustive match")}}}class Mr{visit(e){const n=e;switch(n.constructor){case Ze:return this.visitNonTerminal(n);case it:return this.visitAlternative(n);case Be:return this.visitOption(n);case mt:return this.visitRepetitionMandatory(n);case gt:return this.visitRepetitionMandatoryWithSeparator(n);case st:return this.visitRepetitionWithSeparator(n);case Ae:return this.visitRepetition(n);case at:return this.visitAlternation(n);case le:return this.visitTerminal(n);case Dr:return this.visitRule(n);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 gm(t){return t instanceof it||t instanceof Be||t instanceof Ae||t instanceof mt||t instanceof gt||t instanceof st||t instanceof le||t instanceof Dr}function Zs(t,e=[]){return t instanceof Be||t instanceof Ae||t instanceof st?!0:t instanceof at?bd(t.definition,r=>Zs(r,e)):t instanceof Ze&&tt(e,t)?!1:t instanceof Dt?(t instanceof Ze&&e.push(t),Ct(t.definition,r=>Zs(r,e))):!1}function ym(t){return t instanceof at}function Lt(t){if(t instanceof Ze)return"SUBRULE";if(t instanceof Be)return"OPTION";if(t instanceof at)return"OR";if(t instanceof mt)return"AT_LEAST_ONE";if(t instanceof gt)return"AT_LEAST_ONE_SEP";if(t instanceof st)return"MANY_SEP";if(t instanceof Ae)return"MANY";if(t instanceof le)return"CONSUME";throw Error("non exhaustive match")}class Sa{walk(e,n=[]){q(e.definition,(r,i)=>{const s=Ue(e.definition,i+1);if(r instanceof Ze)this.walkProdRef(r,s,n);else if(r instanceof le)this.walkTerminal(r,s,n);else if(r instanceof it)this.walkFlat(r,s,n);else if(r instanceof Be)this.walkOption(r,s,n);else if(r instanceof mt)this.walkAtLeastOne(r,s,n);else if(r instanceof gt)this.walkAtLeastOneSep(r,s,n);else if(r instanceof st)this.walkManySep(r,s,n);else if(r instanceof Ae)this.walkMany(r,s,n);else if(r instanceof at)this.walkOr(r,s,n);else throw Error("non exhaustive match")})}walkTerminal(e,n,r){}walkProdRef(e,n,r){}walkFlat(e,n,r){const i=n.concat(r);this.walk(e,i)}walkOption(e,n,r){const i=n.concat(r);this.walk(e,i)}walkAtLeastOne(e,n,r){const i=[new Be({definition:e.definition})].concat(n,r);this.walk(e,i)}walkAtLeastOneSep(e,n,r){const i=Pl(e,n,r);this.walk(e,i)}walkMany(e,n,r){const i=[new Be({definition:e.definition})].concat(n,r);this.walk(e,i)}walkManySep(e,n,r){const i=Pl(e,n,r);this.walk(e,i)}walkOr(e,n,r){const i=n.concat(r);q(e.definition,s=>{const a=new it({definition:[s]});this.walk(a,i)})}}function Pl(t,e,n){return[new Be({definition:[new le({terminalType:t.separator})].concat(t.definition)})].concat(e,n)}function Wi(t){if(t instanceof Ze)return Wi(t.referencedRule);if(t instanceof le)return vm(t);if(gm(t))return Tm(t);if(ym(t))return Rm(t);throw Error("non exhaustive match")}function Tm(t){let e=[];const n=t.definition;let r=0,i=n.length>r,s,a=!0;for(;i&&a;)s=n[r],a=Zs(s),e=e.concat(Wi(s)),r=r+1,i=n.length>r;return Bc(e)}function Rm(t){const e=M(t.definition,n=>Wi(n));return Bc(Tt(e))}function vm(t){return[t.terminalType]}const Xd="_~IN~_";class Em extends Sa{constructor(e){super(),this.topProd=e,this.follows={}}startWalking(){return this.walk(this.topProd),this.follows}walkTerminal(e,n,r){}walkProdRef(e,n,r){const i=Sm(e.referencedRule,e.idx)+this.topProd.name,s=n.concat(r),a=new it({definition:s}),o=Wi(a);this.follows[i]=o}}function Am(t){const e={};return q(t,n=>{const r=new Em(n).startWalking();ht(e,r)}),e}function Sm(t,e){return t.name+e+Xd}let Us={};const km=new Md;function ka(t){const e=t.toString();if(Us.hasOwnProperty(e))return Us[e];{const n=km.pattern(e);return Us[e]=n,n}}function Cm(){Us={}}const Jd="Complement Sets are not supported for first char optimization",ea=`Unable to use "first char" lexer optimizations:
13
+ `;function bm(t,e=!1){try{const n=ka(t);return mo(n.value,{},n.flags.ignoreCase)}catch(n){if(n.message===Jd)e&&Kd(`${ea} Unable to optimize: < ${t.toString()} >
14
+ Complement Sets cannot be automatically optimized.
15
+ This will disable the lexer's first char optimizations.
16
+ See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#COMPLEMENT for details.`);else{let r="";e&&(r=`
17
+ This will disable the lexer's first char optimizations.
18
+ See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#REGEXP_PARSING for details.`),po(`${ea}
19
+ Failed parsing: < ${t.toString()} >
20
+ Using the @chevrotain/regexp-to-ast library
21
+ Please open an issue at: https://github.com/chevrotain/chevrotain/issues`+r)}}return[]}function mo(t,e,n){switch(t.type){case"Disjunction":for(let i=0;i<t.value.length;i++)mo(t.value[i],e,n);break;case"Alternative":const r=t.value;for(let i=0;i<r.length;i++){const s=r[i];switch(s.type){case"EndAnchor":case"GroupBackReference":case"Lookahead":case"NegativeLookahead":case"Lookbehind":case"NegativeLookbehind":case"StartAnchor":case"WordBoundary":case"NonWordBoundary":continue}const a=s;switch(a.type){case"Character":vs(a.value,e,n);break;case"Set":if(a.complement===!0)throw Error(Jd);q(a.value,c=>{if(typeof c=="number")vs(c,e,n);else{const l=c;if(n===!0)for(let u=l.from;u<=l.to;u++)vs(u,e,n);else{for(let u=l.from;u<=l.to&&u<Si;u++)vs(u,e,n);if(l.to>=Si){const u=l.from>=Si?l.from:Si,f=l.to,m=fn(u),p=fn(f);for(let A=m;A<=p;A++)e[A]=A}}}});break;case"Group":mo(a.value,e,n);break;default:throw Error("Non Exhaustive Match")}const o=a.quantifier!==void 0&&a.quantifier.atLeast===0;if(a.type==="Group"&&go(a)===!1||a.type!=="Group"&&o===!1)break}break;default:throw Error("non exhaustive match!")}return $e(e)}function vs(t,e,n){const r=fn(t);e[r]=r,n===!0&&_m(t,e)}function _m(t,e){const n=String.fromCharCode(t),r=n.toUpperCase();if(r!==n){const i=fn(r.charCodeAt(0));e[i]=i}else{const i=n.toLowerCase();if(i!==n){const s=fn(i.charCodeAt(0));e[s]=s}}}function $l(t,e){return Nr(t.value,n=>{if(typeof n=="number")return tt(e,n);{const r=n;return Nr(e,i=>r.from<=i&&i<=r.to)!==void 0}})}function go(t){const e=t.quantifier;return e&&e.atLeast===0?!0:t.value?ze(t.value)?Ct(t.value,go):go(t.value):!1}class Nm extends Ea{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){tt(this.targetCharCodes,e.value)&&(this.found=!0)}visitSet(e){e.complement?$l(e,this.targetCharCodes)===void 0&&(this.found=!0):$l(e,this.targetCharCodes)!==void 0&&(this.found=!0)}}function Jc(t,e){if(e instanceof RegExp){const n=ka(e),r=new Nm(t);return r.visit(n),r.found}else return Nr(e,n=>tt(t,n.charCodeAt(0)))!==void 0}const Yn="PATTERN",Ai="defaultMode",Es="modes";function wm(t,e){e=zc(e,{debug:!1,safeMode:!1,positionTracking:"full",lineTerminatorCharacters:["\r",`
22
+ `],tracer:(b,k)=>k()});const n=e.tracer;n("initCharCodeToOptimizedIndexMap",()=>{Zm()});let r;n("Reject Lexer.NA",()=>{r=ya(t,b=>b[Yn]===nt.NA)});let i=!1,s;n("Transform Patterns",()=>{i=!1,s=M(r,b=>{const k=b[Yn];if(rn(k)){const P=k.source;return P.length===1&&P!=="^"&&P!=="$"&&P!=="."&&!k.ignoreCase?P:P.length===2&&P[0]==="\\"&&!tt(["d","D","s","S","t","r","n","t","0","c","b","B","f","v","w","W"],P[1])?P[1]:Ll(k)}else{if(Qn(k))return i=!0,{exec:k};if(typeof k=="object")return i=!0,k;if(typeof k=="string"){if(k.length===1)return k;{const P=k.replace(/[\\^$.*+?()[\]{}|]/g,"\\$&"),H=new RegExp(P);return Ll(H)}}else throw Error("non exhaustive match")}})});let a,o,c,l,u;n("misc mapping",()=>{a=M(r,b=>b.tokenTypeIdx),o=M(r,b=>{const k=b.GROUP;if(k!==nt.SKIPPED){if(rt(k))return k;if(nn(k))return!1;throw Error("non exhaustive match")}}),c=M(r,b=>{const k=b.LONGER_ALT;if(k)return ze(k)?M(k,H=>yl(r,H)):[yl(r,k)]}),l=M(r,b=>b.PUSH_MODE),u=M(r,b=>z(b,"POP_MODE"))});let f;n("Line Terminator Handling",()=>{const b=ef(e.lineTerminatorCharacters);f=M(r,k=>!1),e.positionTracking!=="onlyOffset"&&(f=M(r,k=>z(k,"LINE_BREAKS")?!!k.LINE_BREAKS:Zd(k,b)===!1&&Jc(b,k.PATTERN)))});let m,p,A,N;n("Misc Mapping #2",()=>{m=M(r,Qd),p=M(s,Xm),A=Qe(r,(b,k)=>{const P=k.GROUP;return rt(P)&&P!==nt.SKIPPED&&(b[P]=[]),b},{}),N=M(s,(b,k)=>({pattern:s[k],longerAlt:c[k],canLineTerminator:f[k],isCustom:m[k],short:p[k],group:o[k],push:l[k],pop:u[k],tokenTypeIdx:a[k],tokenType:r[k]}))});let I=!0,C=[];return e.safeMode||n("First Char Optimization",()=>{C=Qe(r,(b,k,P)=>{if(typeof k.PATTERN=="string"){const H=k.PATTERN.charCodeAt(0),K=fn(H);Fa(b,K,N[P])}else if(ze(k.START_CHARS_HINT)){let H;q(k.START_CHARS_HINT,K=>{const J=typeof K=="string"?K.charCodeAt(0):K,oe=fn(J);H!==oe&&(H=oe,Fa(b,oe,N[P]))})}else if(rn(k.PATTERN))if(k.PATTERN.unicode)I=!1,e.ensureOptimizations&&po(`${ea} Unable to analyze < ${k.PATTERN.toString()} > pattern.
23
+ The regexp unicode flag is not currently supported by the regexp-to-ast library.
24
+ This will disable the lexer's first char optimizations.
25
+ For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNICODE_OPTIMIZE`);else{const H=bm(k.PATTERN,e.ensureOptimizations);ae(H)&&(I=!1),q(H,K=>{Fa(b,K,N[P])})}else e.ensureOptimizations&&po(`${ea} TokenType: <${k.name}> is using a custom token pattern without providing <start_chars_hint> parameter.
26
+ This will disable the lexer's first char optimizations.
27
+ For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_OPTIMIZE`),I=!1;return b},[])}),{emptyGroups:A,patternIdxToConfig:N,charCodeToPatternIdxToConfig:C,hasCustom:i,canBeOptimized:I}}function Im(t,e){let n=[];const r=$m(t);n=n.concat(r.errors);const i=Lm(r.valid),s=i.valid;return n=n.concat(i.errors),n=n.concat(Pm(s)),n=n.concat(qm(s)),n=n.concat(jm(s,e)),n=n.concat(zm(s)),n}function Pm(t){let e=[];const n=pt(t,r=>rn(r[Yn]));return e=e.concat(xm(n)),e=e.concat(Fm(n)),e=e.concat(Gm(n)),e=e.concat(Um(n)),e=e.concat(Dm(n)),e}function $m(t){const e=pt(t,i=>!z(i,Yn)),n=M(e,i=>({message:"Token Type: ->"+i.name+"<- missing static 'PATTERN' property",type:Se.MISSING_PATTERN,tokenTypes:[i]})),r=ga(t,e);return{errors:n,valid:r}}function Lm(t){const e=pt(t,i=>{const s=i[Yn];return!rn(s)&&!Qn(s)&&!z(s,"exec")&&!rt(s)}),n=M(e,i=>({message:"Token Type: ->"+i.name+"<- static 'PATTERN' can only be a RegExp, a Function matching the {CustomPatternMatcherFunc} type or an Object matching the {ICustomPattern} interface.",type:Se.INVALID_PATTERN,tokenTypes:[i]})),r=ga(t,e);return{errors:n,valid:r}}const Om=/[^\\][$]/;function xm(t){class e extends Ea{constructor(){super(...arguments),this.found=!1}visitEndAnchor(s){this.found=!0}}const n=pt(t,i=>{const s=i.PATTERN;try{const a=ka(s),o=new e;return o.visit(a),o.found}catch{return Om.test(s.source)}});return M(n,i=>({message:`Unexpected RegExp Anchor Error:
28
+ Token Type: ->`+i.name+`<- static 'PATTERN' cannot contain end of input anchor '$'
29
+ See chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS for details.`,type:Se.EOI_ANCHOR_FOUND,tokenTypes:[i]}))}function Dm(t){const e=pt(t,r=>r.PATTERN.test(""));return M(e,r=>({message:"Token Type: ->"+r.name+"<- static 'PATTERN' must not match an empty string",type:Se.EMPTY_MATCH_PATTERN,tokenTypes:[r]}))}const Mm=/[^\\[][\^]|^\^/;function Fm(t){class e extends Ea{constructor(){super(...arguments),this.found=!1}visitStartAnchor(s){this.found=!0}}const n=pt(t,i=>{const s=i.PATTERN;try{const a=ka(s),o=new e;return o.visit(a),o.found}catch{return Mm.test(s.source)}});return M(n,i=>({message:`Unexpected RegExp Anchor Error:
30
+ Token Type: ->`+i.name+`<- static 'PATTERN' cannot contain start of input anchor '^'
31
+ See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS for details.`,type:Se.SOI_ANCHOR_FOUND,tokenTypes:[i]}))}function Gm(t){const e=pt(t,r=>{const i=r[Yn];return i instanceof RegExp&&(i.multiline||i.global)});return M(e,r=>({message:"Token Type: ->"+r.name+"<- static 'PATTERN' may NOT contain global('g') or multiline('m')",type:Se.UNSUPPORTED_FLAGS_FOUND,tokenTypes:[r]}))}function Um(t){const e=[];let n=M(t,s=>Qe(t,(a,o)=>(s.PATTERN.source===o.PATTERN.source&&!tt(e,o)&&o.PATTERN!==nt.NA&&(e.push(o),a.push(o)),a),[]));n=qi(n);const r=pt(n,s=>s.length>1);return M(r,s=>{const a=M(s,c=>c.name);return{message:`The same RegExp pattern ->${_t(s).PATTERN}<-has been used in all of the following Token Types: ${a.join(", ")} <-`,type:Se.DUPLICATE_PATTERNS_FOUND,tokenTypes:s}})}function qm(t){const e=pt(t,r=>{if(!z(r,"GROUP"))return!1;const i=r.GROUP;return i!==nt.SKIPPED&&i!==nt.NA&&!rt(i)});return M(e,r=>({message:"Token Type: ->"+r.name+"<- static 'GROUP' can only be Lexer.SKIPPED/Lexer.NA/A String",type:Se.INVALID_GROUP_TYPE_FOUND,tokenTypes:[r]}))}function jm(t,e){const n=pt(t,i=>i.PUSH_MODE!==void 0&&!tt(e,i.PUSH_MODE));return M(n,i=>({message:`Token Type: ->${i.name}<- static 'PUSH_MODE' value cannot refer to a Lexer Mode ->${i.PUSH_MODE}<-which does not exist`,type:Se.PUSH_MODE_DOES_NOT_EXIST,tokenTypes:[i]}))}function zm(t){const e=[],n=Qe(t,(r,i,s)=>{const a=i.PATTERN;return a===nt.NA||(rt(a)?r.push({str:a,idx:s,tokenType:i}):rn(a)&&Wm(a)&&r.push({str:a.source,idx:s,tokenType:i})),r},[]);return q(t,(r,i)=>{q(n,({str:s,idx:a,tokenType:o})=>{if(i<a&&Bm(s,r.PATTERN)){const c=`Token: ->${o.name}<- can never be matched.
32
+ Because it appears AFTER the Token Type ->${r.name}<-in the lexer's definition.
33
+ See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNREACHABLE`;e.push({message:c,type:Se.UNREACHABLE_PATTERN,tokenTypes:[r,o]})}})}),e}function Bm(t,e){if(rn(e)){if(Vm(e))return!1;const n=e.exec(t);return n!==null&&n.index===0}else{if(Qn(e))return e(t,0,[],{});if(z(e,"exec"))return e.exec(t,0,[],{});if(typeof e=="string")return e===t;throw Error("non exhaustive match")}}function Wm(t){return Nr([".","\\","[","]","|","^","$","(",")","?","*","+","{"],n=>t.source.indexOf(n)!==-1)===void 0}function Vm(t){return/(\(\?=)|(\(\?!)|(\(\?<=)|(\(\?<!)/.test(t.source)}function Ll(t){const e=t.ignoreCase?"iy":"y";return new RegExp(`${t.source}`,e)}function Km(t,e,n){const r=[];return z(t,Ai)||r.push({message:"A MultiMode Lexer cannot be initialized without a <"+Ai+`> property in its definition
34
+ `,type:Se.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE}),z(t,Es)||r.push({message:"A MultiMode Lexer cannot be initialized without a <"+Es+`> property in its definition
35
+ `,type:Se.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY}),z(t,Es)&&z(t,Ai)&&!z(t.modes,t.defaultMode)&&r.push({message:`A MultiMode Lexer cannot be initialized with a ${Ai}: <${t.defaultMode}>which does not exist
36
+ `,type:Se.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST}),z(t,Es)&&q(t.modes,(i,s)=>{q(i,(a,o)=>{if(nn(a))r.push({message:`A Lexer cannot be initialized using an undefined Token Type. Mode:<${s}> at index: <${o}>
37
+ `,type:Se.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED});else if(z(a,"LONGER_ALT")){const c=ze(a.LONGER_ALT)?a.LONGER_ALT:[a.LONGER_ALT];q(c,l=>{!nn(l)&&!tt(i,l)&&r.push({message:`A MultiMode Lexer cannot be initialized with a longer_alt <${l.name}> on token <${a.name}> outside of mode <${s}>
38
+ `,type:Se.MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE})})}})}),r}function Hm(t,e,n){const r=[];let i=!1;const s=qi(Tt($e(t.modes))),a=ya(s,c=>c[Yn]===nt.NA),o=ef(n);return e&&q(a,c=>{const l=Zd(c,o);if(l!==!1){const f={message:Qm(c,l),type:l.issue,tokenType:c};r.push(f)}else z(c,"LINE_BREAKS")?c.LINE_BREAKS===!0&&(i=!0):Jc(o,c.PATTERN)&&(i=!0)}),e&&!i&&r.push({message:`Warning: No LINE_BREAKS Found.
39
+ This Lexer has been defined to track line and column information,
40
+ But none of the Token Types can be identified as matching a line terminator.
41
+ See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#LINE_BREAKS
42
+ for details.`,type:Se.NO_LINE_BREAKS_FLAGS}),r}function Ym(t){const e={},n=_r(t);return q(n,r=>{const i=t[r];if(ze(i))e[r]=[];else throw Error("non exhaustive match")}),e}function Qd(t){const e=t.PATTERN;if(rn(e))return!1;if(Qn(e))return!0;if(z(e,"exec"))return!0;if(rt(e))return!1;throw Error("non exhaustive match")}function Xm(t){return rt(t)&&t.length===1?t.charCodeAt(0):!1}const Jm={test:function(t){const e=t.length;for(let n=this.lastIndex;n<e;n++){const r=t.charCodeAt(n);if(r===10)return this.lastIndex=n+1,!0;if(r===13)return t.charCodeAt(n+1)===10?this.lastIndex=n+2:this.lastIndex=n+1,!0}return!1},lastIndex:0};function Zd(t,e){if(z(t,"LINE_BREAKS"))return!1;if(rn(t.PATTERN)){try{Jc(e,t.PATTERN)}catch(n){return{issue:Se.IDENTIFY_TERMINATOR,errMsg:n.message}}return!1}else{if(rt(t.PATTERN))return!1;if(Qd(t))return{issue:Se.CUSTOM_LINE_BREAK};throw Error("non exhaustive match")}}function Qm(t,e){if(e.issue===Se.IDENTIFY_TERMINATOR)return`Warning: unable to identify line terminator usage in pattern.
43
+ The problem is in the <${t.name}> Token Type
44
+ Root cause: ${e.errMsg}.
45
+ For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#IDENTIFY_TERMINATOR`;if(e.issue===Se.CUSTOM_LINE_BREAK)return`Warning: A Custom Token Pattern should specify the <line_breaks> option.
46
+ The problem is in the <${t.name}> Token Type
47
+ For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_LINE_BREAK`;throw Error("non exhaustive match")}function ef(t){return M(t,n=>rt(n)?n.charCodeAt(0):n)}function Fa(t,e,n){t[e]===void 0?t[e]=[n]:t[e].push(n)}const Si=256;let qs=[];function fn(t){return t<Si?t:qs[t]}function Zm(){if(ae(qs)){qs=new Array(65536);for(let t=0;t<65536;t++)qs[t]=t>255?255+~~(t/255):t}}function Vi(t,e){const n=t.tokenTypeIdx;return n===e.tokenTypeIdx?!0:e.isParent===!0&&e.categoryMatchesMap[n]===!0}function ta(t,e){return t.tokenTypeIdx===e.tokenTypeIdx}let Ol=1;const tf={};function Ki(t){const e=eg(t);tg(e),rg(e),ng(e),q(e,n=>{n.isParent=n.categoryMatches.length>0})}function eg(t){let e=We(t),n=t,r=!0;for(;r;){n=qi(Tt(M(n,s=>s.CATEGORIES)));const i=ga(n,e);e=e.concat(i),ae(i)?r=!1:n=i}return e}function tg(t){q(t,e=>{rf(e)||(tf[Ol]=e,e.tokenTypeIdx=Ol++),xl(e)&&!ze(e.CATEGORIES)&&(e.CATEGORIES=[e.CATEGORIES]),xl(e)||(e.CATEGORIES=[]),ig(e)||(e.categoryMatches=[]),sg(e)||(e.categoryMatchesMap={})})}function ng(t){q(t,e=>{e.categoryMatches=[],q(e.categoryMatchesMap,(n,r)=>{e.categoryMatches.push(tf[r].tokenTypeIdx)})})}function rg(t){q(t,e=>{nf([],e)})}function nf(t,e){q(t,n=>{e.categoryMatchesMap[n.tokenTypeIdx]=!0}),q(e.CATEGORIES,n=>{const r=t.concat(e);tt(r,n)||nf(r,n)})}function rf(t){return z(t,"tokenTypeIdx")}function xl(t){return z(t,"CATEGORIES")}function ig(t){return z(t,"categoryMatches")}function sg(t){return z(t,"categoryMatchesMap")}function ag(t){return z(t,"tokenTypeIdx")}const yo={buildUnableToPopLexerModeMessage(t){return`Unable to pop Lexer Mode after encountering Token ->${t.image}<- The Mode Stack is empty`},buildUnexpectedCharactersMessage(t,e,n,r,i,s){return`unexpected character: ->${t.charAt(e)}<- at offset: ${e}, skipped ${n} characters.`}};var Se;(function(t){t[t.MISSING_PATTERN=0]="MISSING_PATTERN",t[t.INVALID_PATTERN=1]="INVALID_PATTERN",t[t.EOI_ANCHOR_FOUND=2]="EOI_ANCHOR_FOUND",t[t.UNSUPPORTED_FLAGS_FOUND=3]="UNSUPPORTED_FLAGS_FOUND",t[t.DUPLICATE_PATTERNS_FOUND=4]="DUPLICATE_PATTERNS_FOUND",t[t.INVALID_GROUP_TYPE_FOUND=5]="INVALID_GROUP_TYPE_FOUND",t[t.PUSH_MODE_DOES_NOT_EXIST=6]="PUSH_MODE_DOES_NOT_EXIST",t[t.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE=7]="MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE",t[t.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY=8]="MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY",t[t.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST=9]="MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST",t[t.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED=10]="LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED",t[t.SOI_ANCHOR_FOUND=11]="SOI_ANCHOR_FOUND",t[t.EMPTY_MATCH_PATTERN=12]="EMPTY_MATCH_PATTERN",t[t.NO_LINE_BREAKS_FLAGS=13]="NO_LINE_BREAKS_FLAGS",t[t.UNREACHABLE_PATTERN=14]="UNREACHABLE_PATTERN",t[t.IDENTIFY_TERMINATOR=15]="IDENTIFY_TERMINATOR",t[t.CUSTOM_LINE_BREAK=16]="CUSTOM_LINE_BREAK",t[t.MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE=17]="MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE"})(Se||(Se={}));const ki={deferDefinitionErrorsHandling:!1,positionTracking:"full",lineTerminatorsPattern:/\n|\r\n?/g,lineTerminatorCharacters:[`
48
+ `,"\r"],ensureOptimizations:!1,safeMode:!1,errorMessageProvider:yo,traceInitPerf:!1,skipValidations:!1,recoveryEnabled:!0};Object.freeze(ki);class nt{constructor(e,n=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=(i,s)=>{if(this.traceInitPerf===!0){this.traceInitIndent++;const a=new Array(this.traceInitIndent+1).join(" ");this.traceInitIndent<this.traceInitMaxIdent&&console.log(`${a}--> <${i}>`);const{time:o,value:c}=Hd(s),l=o>10?console.warn:console.log;return this.traceInitIndent<this.traceInitMaxIdent&&l(`${a}<-- <${i}> time: ${o}ms`),this.traceInitIndent--,c}else return s()},typeof n=="boolean")throw Error(`The second argument to the Lexer constructor is now an ILexerConfig Object.
49
+ a boolean 2nd argument is no longer supported`);this.config=ht({},ki,n);const r=this.config.traceInitPerf;r===!0?(this.traceInitMaxIdent=1/0,this.traceInitPerf=!0):typeof r=="number"&&(this.traceInitMaxIdent=r,this.traceInitPerf=!0),this.traceInitIndent=-1,this.TRACE_INIT("Lexer Constructor",()=>{let i,s=!0;this.TRACE_INIT("Lexer Config handling",()=>{if(this.config.lineTerminatorsPattern===ki.lineTerminatorsPattern)this.config.lineTerminatorsPattern=Jm;else if(this.config.lineTerminatorCharacters===ki.lineTerminatorCharacters)throw Error(`Error: Missing <lineTerminatorCharacters> property on the Lexer config.
50
+ For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#MISSING_LINE_TERM_CHARS`);if(n.safeMode&&n.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),ze(e)?i={modes:{defaultMode:We(e)},defaultMode:Ai}:(s=!1,i=We(e))}),this.config.skipValidations===!1&&(this.TRACE_INIT("performRuntimeChecks",()=>{this.lexerDefinitionErrors=this.lexerDefinitionErrors.concat(Km(i,this.trackStartLines,this.config.lineTerminatorCharacters))}),this.TRACE_INIT("performWarningRuntimeChecks",()=>{this.lexerDefinitionWarning=this.lexerDefinitionWarning.concat(Hm(i,this.trackStartLines,this.config.lineTerminatorCharacters))})),i.modes=i.modes?i.modes:{},q(i.modes,(o,c)=>{i.modes[c]=ya(o,l=>nn(l))});const a=_r(i.modes);if(q(i.modes,(o,c)=>{this.TRACE_INIT(`Mode: <${c}> processing`,()=>{if(this.modes.push(c),this.config.skipValidations===!1&&this.TRACE_INIT("validatePatterns",()=>{this.lexerDefinitionErrors=this.lexerDefinitionErrors.concat(Im(o,a))}),ae(this.lexerDefinitionErrors)){Ki(o);let l;this.TRACE_INIT("analyzeTokenTypes",()=>{l=wm(o,{lineTerminatorCharacters:this.config.lineTerminatorCharacters,positionTracking:n.positionTracking,ensureOptimizations:n.ensureOptimizations,safeMode:n.safeMode,tracer:this.TRACE_INIT})}),this.patternIdxToConfig[c]=l.patternIdxToConfig,this.charCodeToPatternIdxToConfig[c]=l.charCodeToPatternIdxToConfig,this.emptyGroups=ht({},this.emptyGroups,l.emptyGroups),this.hasCustom=l.hasCustom||this.hasCustom,this.canModeBeOptimized[c]=l.canBeOptimized}})}),this.defaultMode=i.defaultMode,!ae(this.lexerDefinitionErrors)&&!this.config.deferDefinitionErrorsHandling){const c=M(this.lexerDefinitionErrors,l=>l.message).join(`-----------------------
51
+ `);throw new Error(`Errors detected in definition of Lexer:
52
+ `+c)}q(this.lexerDefinitionWarning,o=>{Kd(o.message)}),this.TRACE_INIT("Choosing sub-methods implementations",()=>{if(s&&(this.handleModes=Ge),this.trackStartLines===!1&&(this.computeNewColumn=xh),this.trackEndLines===!1&&(this.updateTokenEndLineColumnLocation=Ge),/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",()=>{const o=Qe(this.canModeBeOptimized,(c,l,u)=>(l===!1&&c.push(u),c),[]);if(n.ensureOptimizations&&!ae(o))throw Error(`Lexer Modes: < ${o.join(", ")} > cannot be optimized.
53
+ Disable the "ensureOptimizations" lexer config flag to silently ignore this and run the lexer in an un-optimized mode.
54
+ Or inspect the console log for details on how to resolve these issues.`)}),this.TRACE_INIT("clearRegExpParserCache",()=>{Cm()}),this.TRACE_INIT("toFastProperties",()=>{Yd(this)})})}tokenize(e,n=this.defaultMode){if(!ae(this.lexerDefinitionErrors)){const i=M(this.lexerDefinitionErrors,s=>s.message).join(`-----------------------
55
+ `);throw new Error(`Unable to Tokenize because Errors detected in definition of Lexer:
56
+ `+i)}return this.tokenizeInternal(e,n)}tokenizeInternal(e,n){let r,i,s,a,o,c,l,u,f,m,p,A,N,I,C;const b=e,k=b.length;let P=0,H=0;const K=this.hasCustom?0:Math.floor(e.length/10),J=new Array(K),oe=[];let ue=this.trackStartLines?1:void 0,de=this.trackStartLines?1:void 0;const w=Ym(this.emptyGroups),T=this.trackStartLines,g=this.config.lineTerminatorsPattern;let S=0,y=[],R=[];const E=[],O=[];Object.freeze(O);let D=!1;const x=B=>{if(E.length===1&&B.tokenType.PUSH_MODE===void 0){const ne=this.config.errorMessageProvider.buildUnableToPopLexerModeMessage(B);oe.push({offset:B.startOffset,line:B.startLine,column:B.startColumn,length:B.image.length,message:ne})}else{E.pop();const ne=Wn(E);y=this.patternIdxToConfig[ne],R=this.charCodeToPatternIdxToConfig[ne],S=y.length;const Oe=this.canModeBeOptimized[ne]&&this.config.safeMode===!1;R&&Oe?D=!0:D=!1}};function j(B){E.push(B),R=this.charCodeToPatternIdxToConfig[B],y=this.patternIdxToConfig[B],S=y.length,S=y.length;const ne=this.canModeBeOptimized[B]&&this.config.safeMode===!1;R&&ne?D=!0:D=!1}j.call(this,n);let G;const ie=this.config.recoveryEnabled;for(;P<k;){c=null,f=-1;const B=b.charCodeAt(P);let ne;if(D){const Re=fn(B),fe=R[Re];ne=fe!==void 0?fe:O}else ne=y;const Oe=ne.length;for(r=0;r<Oe;r++){G=ne[r];const Re=G.pattern;l=null;const fe=G.short;if(fe!==!1?B===fe&&(f=1,c=Re):G.isCustom===!0?(C=Re.exec(b,P,J,w),C!==null?(c=C[0],f=c.length,C.payload!==void 0&&(l=C.payload)):c=null):(Re.lastIndex=P,f=this.matchLength(Re,e,P)),f!==-1){if(o=G.longerAlt,o!==void 0){c=e.substring(P,P+f);const Ie=o.length;for(s=0;s<Ie;s++){const xe=y[o[s]],Ne=xe.pattern;if(u=null,xe.isCustom===!0?(C=Ne.exec(b,P,J,w),C!==null?(a=C[0],C.payload!==void 0&&(u=C.payload)):a=null):(Ne.lastIndex=P,a=this.match(Ne,e,P)),a&&a.length>c.length){c=a,f=a.length,l=u,G=xe;break}}}break}}if(f!==-1){if(m=G.group,m!==void 0&&(c=c!==null?c:e.substring(P,P+f),p=G.tokenTypeIdx,A=this.createTokenInstance(c,P,p,G.tokenType,ue,de,f),this.handlePayload(A,l),m===!1?H=this.addToken(J,H,A):w[m].push(A)),T===!0&&G.canLineTerminator===!0){let Re=0,fe,Ie;g.lastIndex=0;do c=c!==null?c:e.substring(P,P+f),fe=g.test(c),fe===!0&&(Ie=g.lastIndex-1,Re++);while(fe===!0);Re!==0?(ue=ue+Re,de=f-Ie,this.updateTokenEndLineColumnLocation(A,m,Ie,Re,ue,de,f)):de=this.computeNewColumn(de,f)}else de=this.computeNewColumn(de,f);P=P+f,this.handleModes(G,x,j,A)}else{const Re=P,fe=ue,Ie=de;let xe=ie===!1;for(;xe===!1&&P<k;)for(P++,i=0;i<S;i++){const Ne=y[i],Z=Ne.pattern,ot=Ne.short;if(ot!==!1?b.charCodeAt(P)===ot&&(xe=!0):Ne.isCustom===!0?xe=Z.exec(b,P,J,w)!==null:(Z.lastIndex=P,xe=Z.exec(e)!==null),xe===!0)break}if(N=P-Re,de=this.computeNewColumn(de,N),I=this.config.errorMessageProvider.buildUnexpectedCharactersMessage(b,Re,N,fe,Ie,Wn(E)),oe.push({offset:Re,line:fe,column:Ie,length:N,message:I}),ie===!1)break}}return this.hasCustom||(J.length=H),{tokens:J,groups:w,errors:oe}}handleModes(e,n,r,i){if(e.pop===!0){const s=e.push;n(i),s!==void 0&&r.call(this,s)}else e.push!==void 0&&r.call(this,e.push)}updateTokenEndLineColumnLocation(e,n,r,i,s,a,o){let c,l;n!==void 0&&(c=r===o-1,l=c?-1:0,i===1&&c===!0||(e.endLine=s+l,e.endColumn=a-1+-l))}computeNewColumn(e,n){return e+n}createOffsetOnlyToken(e,n,r,i){return{image:e,startOffset:n,tokenTypeIdx:r,tokenType:i}}createStartOnlyToken(e,n,r,i,s,a){return{image:e,startOffset:n,startLine:s,startColumn:a,tokenTypeIdx:r,tokenType:i}}createFullToken(e,n,r,i,s,a,o){return{image:e,startOffset:n,endOffset:n+o-1,startLine:s,endLine:s,startColumn:a,endColumn:a+o-1,tokenTypeIdx:r,tokenType:i}}addTokenUsingPush(e,n,r){return e.push(r),n}addTokenUsingMemberAccess(e,n,r){return e[n]=r,n++,n}handlePayloadNoCustom(e,n){}handlePayloadWithCustom(e,n){n!==null&&(e.payload=n)}match(e,n,r){return e.test(n)===!0?n.substring(r,e.lastIndex):null}matchLength(e,n,r){return e.test(n)===!0?e.lastIndex-r:-1}}nt.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.";nt.NA=/NOT_APPLICABLE/;function br(t){return sf(t)?t.LABEL:t.name}function sf(t){return rt(t.LABEL)&&t.LABEL!==""}const og="parent",Dl="categories",Ml="label",Fl="group",Gl="push_mode",Ul="pop_mode",ql="longer_alt",jl="line_breaks",zl="start_chars_hint";function af(t){return cg(t)}function cg(t){const e=t.pattern,n={};if(n.name=t.name,nn(e)||(n.PATTERN=e),z(t,og))throw`The parent property is no longer supported.
57
+ See: https://github.com/chevrotain/chevrotain/issues/564#issuecomment-349062346 for details.`;return z(t,Dl)&&(n.CATEGORIES=t[Dl]),Ki([n]),z(t,Ml)&&(n.LABEL=t[Ml]),z(t,Fl)&&(n.GROUP=t[Fl]),z(t,Ul)&&(n.POP_MODE=t[Ul]),z(t,Gl)&&(n.PUSH_MODE=t[Gl]),z(t,ql)&&(n.LONGER_ALT=t[ql]),z(t,jl)&&(n.LINE_BREAKS=t[jl]),z(t,zl)&&(n.START_CHARS_HINT=t[zl]),n}const hn=af({name:"EOF",pattern:nt.NA});Ki([hn]);function Qc(t,e,n,r,i,s,a,o){return{image:e,startOffset:n,endOffset:r,startLine:i,endLine:s,startColumn:a,endColumn:o,tokenTypeIdx:t.tokenTypeIdx,tokenType:t}}function of(t,e){return Vi(t,e)}const kr={buildMismatchTokenMessage({expected:t,actual:e,previous:n,ruleName:r}){return`Expecting ${sf(t)?`--> ${br(t)} <--`:`token of type --> ${t.name} <--`} but found --> '${e.image}' <--`},buildNotAllInputParsedMessage({firstRedundant:t,ruleName:e}){return"Redundant input, expecting EOF but found: "+t.image},buildNoViableAltMessage({expectedPathsPerAlt:t,actual:e,previous:n,customUserDescription:r,ruleName:i}){const s="Expecting: ",o=`
58
+ but found: '`+_t(e).image+"'";if(r)return s+r+o;{const c=Qe(t,(m,p)=>m.concat(p),[]),l=M(c,m=>`[${M(m,p=>br(p)).join(", ")}]`),f=`one of these possible Token sequences:
59
+ ${M(l,(m,p)=>` ${p+1}. ${m}`).join(`
60
+ `)}`;return s+f+o}},buildEarlyExitMessage({expectedIterationPaths:t,actual:e,customUserDescription:n,ruleName:r}){const i="Expecting: ",a=`
61
+ but found: '`+_t(e).image+"'";if(n)return i+n+a;{const c=`expecting at least one iteration which starts with one of these possible Token sequences::
62
+ <${M(t,l=>`[${M(l,u=>br(u)).join(",")}]`).join(" ,")}>`;return i+c+a}}};Object.freeze(kr);const lg={buildRuleNotFoundError(t,e){return"Invalid grammar, reference to a rule which is not defined: ->"+e.nonTerminalName+`<-
63
+ inside top level rule: ->`+t.name+"<-"}},zn={buildDuplicateFoundError(t,e){function n(u){return u instanceof le?u.terminalType.name:u instanceof Ze?u.nonTerminalName:""}const r=t.name,i=_t(e),s=i.idx,a=Lt(i),o=n(i),c=s>0;let l=`->${a}${c?s:""}<- ${o?`with argument: ->${o}<-`:""}
64
+ appears more than once (${e.length} times) in the top level rule: ->${r}<-.
65
+ For further details see: https://chevrotain.io/docs/FAQ.html#NUMERICAL_SUFFIXES
66
+ `;return l=l.replace(/[ \t]+/g," "),l=l.replace(/\s\s+/g,`
67
+ `),l},buildNamespaceConflictError(t){return`Namespace conflict found in grammar.
68
+ The grammar has both a Terminal(Token) and a Non-Terminal(Rule) named: <${t.name}>.
69
+ To resolve this make sure each Terminal and Non-Terminal names are unique
70
+ This is easy to accomplish by using the convention that Terminal names start with an uppercase letter
71
+ and Non-Terminal names start with a lower case letter.`},buildAlternationPrefixAmbiguityError(t){const e=M(t.prefixPath,i=>br(i)).join(", "),n=t.alternation.idx===0?"":t.alternation.idx;return`Ambiguous alternatives: <${t.ambiguityIndices.join(" ,")}> due to common lookahead prefix
72
+ in <OR${n}> inside <${t.topLevelRule.name}> Rule,
73
+ <${e}> may appears as a prefix path in all these alternatives.
74
+ See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#COMMON_PREFIX
75
+ For Further details.`},buildAlternationAmbiguityError(t){const e=t.alternation.idx===0?"":t.alternation.idx,n=t.prefixPath.length===0;let r=`Ambiguous Alternatives Detected: <${t.ambiguityIndices.join(" ,")}> in <OR${e}> inside <${t.topLevelRule.name}> Rule,
76
+ `;if(n)r+=`These alternatives are all empty (match no tokens), making them indistinguishable.
77
+ Only the last alternative may be empty.
78
+ `;else{const i=M(t.prefixPath,s=>br(s)).join(", ");r+=`<${i}> may appears as a prefix path in all these alternatives.
79
+ `}return r+=`See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#AMBIGUOUS_ALTERNATIVES
80
+ For Further details.`,r},buildEmptyRepetitionError(t){let e=Lt(t.repetition);return t.repetition.idx!==0&&(e+=t.repetition.idx),`The repetition <${e}> within Rule <${t.topLevelRule.name}> can never consume any tokens.
81
+ This could lead to an infinite loop.`},buildTokenNameError(t){return"deprecated"},buildEmptyAlternationError(t){return`Ambiguous empty alternative: <${t.emptyChoiceIdx+1}> in <OR${t.alternation.idx}> inside <${t.topLevelRule.name}> Rule.
82
+ Only the last alternative may be an empty alternative.`},buildTooManyAlternativesError(t){return`An Alternation cannot have more than 256 alternatives:
83
+ <OR${t.alternation.idx}> inside <${t.topLevelRule.name}> Rule.
84
+ has ${t.alternation.definition.length+1} alternatives.`},buildLeftRecursionError(t){const e=t.topLevelRule.name,n=M(t.leftRecursionPath,s=>s.name),r=`${e} --> ${n.concat([e]).join(" --> ")}`;return`Left Recursion found in grammar.
85
+ rule: <${e}> can be invoked from itself (directly or indirectly)
86
+ without consuming any Tokens. The grammar path that causes this is:
87
+ ${r}
88
+ To fix this refactor your grammar to remove the left recursion.
89
+ see: https://en.wikipedia.org/wiki/LL_parser#Left_factoring.`},buildInvalidRuleNameError(t){return"deprecated"},buildDuplicateRuleNameError(t){let e;return t.topLevelRule instanceof Dr?e=t.topLevelRule.name:e=t.topLevelRule,`Duplicate definition, rule: ->${e}<- is already defined in the grammar: ->${t.grammarName}<-`}};function ug(t,e){const n=new dg(t,e);return n.resolveRefs(),n.errors}class dg extends Mr{constructor(e,n){super(),this.nameToTopRule=e,this.errMsgProvider=n,this.errors=[]}resolveRefs(){q($e(this.nameToTopRule),e=>{this.currTopLevel=e,e.accept(this)})}visitNonTerminal(e){const n=this.nameToTopRule[e.nonTerminalName];if(n)e.referencedRule=n;else{const r=this.errMsgProvider.buildRuleNotFoundError(this.currTopLevel,e);this.errors.push({message:r,type:et.UNRESOLVED_SUBRULE_REF,ruleName:this.currTopLevel.name,unresolvedRefName:e.nonTerminalName})}}}class fg extends Sa{constructor(e,n){super(),this.topProd=e,this.path=n,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=We(this.path.ruleStack).reverse(),this.occurrenceStack=We(this.path.occurrenceStack).reverse(),this.ruleStack.pop(),this.occurrenceStack.pop(),this.updateExpectedNext(),this.walk(this.topProd),this.possibleTokTypes}walk(e,n=[]){this.found||super.walk(e,n)}walkProdRef(e,n,r){if(e.referencedRule.name===this.nextProductionName&&e.idx===this.nextProductionOccurrence){const i=n.concat(r);this.updateExpectedNext(),this.walk(e.referencedRule,i)}}updateExpectedNext(){ae(this.ruleStack)?(this.nextProductionName="",this.nextProductionOccurrence=0,this.isAtEndOfPath=!0):(this.nextProductionName=this.ruleStack.pop(),this.nextProductionOccurrence=this.occurrenceStack.pop())}}class hg extends fg{constructor(e,n){super(e,n),this.path=n,this.nextTerminalName="",this.nextTerminalOccurrence=0,this.nextTerminalName=this.path.lastTok.name,this.nextTerminalOccurrence=this.path.lastTokOccurrence}walkTerminal(e,n,r){if(this.isAtEndOfPath&&e.terminalType.name===this.nextTerminalName&&e.idx===this.nextTerminalOccurrence&&!this.found){const i=n.concat(r),s=new it({definition:i});this.possibleTokTypes=Wi(s),this.found=!0}}}class Ca extends Sa{constructor(e,n){super(),this.topRule=e,this.occurrence=n,this.result={token:void 0,occurrence:void 0,isEndOfRule:void 0}}startWalking(){return this.walk(this.topRule),this.result}}class pg extends Ca{walkMany(e,n,r){if(e.idx===this.occurrence){const i=_t(n.concat(r));this.result.isEndOfRule=i===void 0,i instanceof le&&(this.result.token=i.terminalType,this.result.occurrence=i.idx)}else super.walkMany(e,n,r)}}class Bl extends Ca{walkManySep(e,n,r){if(e.idx===this.occurrence){const i=_t(n.concat(r));this.result.isEndOfRule=i===void 0,i instanceof le&&(this.result.token=i.terminalType,this.result.occurrence=i.idx)}else super.walkManySep(e,n,r)}}class mg extends Ca{walkAtLeastOne(e,n,r){if(e.idx===this.occurrence){const i=_t(n.concat(r));this.result.isEndOfRule=i===void 0,i instanceof le&&(this.result.token=i.terminalType,this.result.occurrence=i.idx)}else super.walkAtLeastOne(e,n,r)}}class Wl extends Ca{walkAtLeastOneSep(e,n,r){if(e.idx===this.occurrence){const i=_t(n.concat(r));this.result.isEndOfRule=i===void 0,i instanceof le&&(this.result.token=i.terminalType,this.result.occurrence=i.idx)}else super.walkAtLeastOneSep(e,n,r)}}function To(t,e,n=[]){n=We(n);let r=[],i=0;function s(o){return o.concat(Ue(t,i+1))}function a(o){const c=To(s(o),e,n);return r.concat(c)}for(;n.length<e&&i<t.length;){const o=t[i];if(o instanceof it)return a(o.definition);if(o instanceof Ze)return a(o.definition);if(o instanceof Be)r=a(o.definition);else if(o instanceof mt){const c=o.definition.concat([new Ae({definition:o.definition})]);return a(c)}else if(o instanceof gt){const c=[new it({definition:o.definition}),new Ae({definition:[new le({terminalType:o.separator})].concat(o.definition)})];return a(c)}else if(o instanceof st){const c=o.definition.concat([new Ae({definition:[new le({terminalType:o.separator})].concat(o.definition)})]);r=a(c)}else if(o instanceof Ae){const c=o.definition.concat([new Ae({definition:o.definition})]);r=a(c)}else{if(o instanceof at)return q(o.definition,c=>{ae(c.definition)===!1&&(r=a(c.definition))}),r;if(o instanceof le)n.push(o.terminalType);else throw Error("non exhaustive match")}i++}return r.push({partialPath:n,suffixDef:Ue(t,i)}),r}function cf(t,e,n,r){const i="EXIT_NONE_TERMINAL",s=[i],a="EXIT_ALTERNATIVE";let o=!1;const c=e.length,l=c-r-1,u=[],f=[];for(f.push({idx:-1,def:t,ruleStack:[],occurrenceStack:[]});!ae(f);){const m=f.pop();if(m===a){o&&Wn(f).idx<=l&&f.pop();continue}const p=m.def,A=m.idx,N=m.ruleStack,I=m.occurrenceStack;if(ae(p))continue;const C=p[0];if(C===i){const b={idx:A,def:Ue(p),ruleStack:Ni(N),occurrenceStack:Ni(I)};f.push(b)}else if(C instanceof le)if(A<c-1){const b=A+1,k=e[b];if(n(k,C.terminalType)){const P={idx:b,def:Ue(p),ruleStack:N,occurrenceStack:I};f.push(P)}}else if(A===c-1)u.push({nextTokenType:C.terminalType,nextTokenOccurrence:C.idx,ruleStack:N,occurrenceStack:I}),o=!0;else throw Error("non exhaustive match");else if(C instanceof Ze){const b=We(N);b.push(C.nonTerminalName);const k=We(I);k.push(C.idx);const P={idx:A,def:C.definition.concat(s,Ue(p)),ruleStack:b,occurrenceStack:k};f.push(P)}else if(C instanceof Be){const b={idx:A,def:Ue(p),ruleStack:N,occurrenceStack:I};f.push(b),f.push(a);const k={idx:A,def:C.definition.concat(Ue(p)),ruleStack:N,occurrenceStack:I};f.push(k)}else if(C instanceof mt){const b=new Ae({definition:C.definition,idx:C.idx}),k=C.definition.concat([b],Ue(p)),P={idx:A,def:k,ruleStack:N,occurrenceStack:I};f.push(P)}else if(C instanceof gt){const b=new le({terminalType:C.separator}),k=new Ae({definition:[b].concat(C.definition),idx:C.idx}),P=C.definition.concat([k],Ue(p)),H={idx:A,def:P,ruleStack:N,occurrenceStack:I};f.push(H)}else if(C instanceof st){const b={idx:A,def:Ue(p),ruleStack:N,occurrenceStack:I};f.push(b),f.push(a);const k=new le({terminalType:C.separator}),P=new Ae({definition:[k].concat(C.definition),idx:C.idx}),H=C.definition.concat([P],Ue(p)),K={idx:A,def:H,ruleStack:N,occurrenceStack:I};f.push(K)}else if(C instanceof Ae){const b={idx:A,def:Ue(p),ruleStack:N,occurrenceStack:I};f.push(b),f.push(a);const k=new Ae({definition:C.definition,idx:C.idx}),P=C.definition.concat([k],Ue(p)),H={idx:A,def:P,ruleStack:N,occurrenceStack:I};f.push(H)}else if(C instanceof at)for(let b=C.definition.length-1;b>=0;b--){const k=C.definition[b],P={idx:A,def:k.definition.concat(Ue(p)),ruleStack:N,occurrenceStack:I};f.push(P),f.push(a)}else if(C instanceof it)f.push({idx:A,def:C.definition.concat(Ue(p)),ruleStack:N,occurrenceStack:I});else if(C instanceof Dr)f.push(gg(C,A,N,I));else throw Error("non exhaustive match")}return u}function gg(t,e,n,r){const i=We(n);i.push(t.name);const s=We(r);return s.push(1),{idx:e,def:t.definition,ruleStack:i,occurrenceStack:s}}var ge;(function(t){t[t.OPTION=0]="OPTION",t[t.REPETITION=1]="REPETITION",t[t.REPETITION_MANDATORY=2]="REPETITION_MANDATORY",t[t.REPETITION_MANDATORY_WITH_SEPARATOR=3]="REPETITION_MANDATORY_WITH_SEPARATOR",t[t.REPETITION_WITH_SEPARATOR=4]="REPETITION_WITH_SEPARATOR",t[t.ALTERNATION=5]="ALTERNATION"})(ge||(ge={}));function Zc(t){if(t instanceof Be||t==="Option")return ge.OPTION;if(t instanceof Ae||t==="Repetition")return ge.REPETITION;if(t instanceof mt||t==="RepetitionMandatory")return ge.REPETITION_MANDATORY;if(t instanceof gt||t==="RepetitionMandatoryWithSeparator")return ge.REPETITION_MANDATORY_WITH_SEPARATOR;if(t instanceof st||t==="RepetitionWithSeparator")return ge.REPETITION_WITH_SEPARATOR;if(t instanceof at||t==="Alternation")return ge.ALTERNATION;throw Error("non exhaustive match")}function Vl(t){const{occurrence:e,rule:n,prodType:r,maxLookahead:i}=t,s=Zc(r);return s===ge.ALTERNATION?ba(e,n,i):_a(e,n,s,i)}function yg(t,e,n,r,i,s){const a=ba(t,e,n),o=df(a)?ta:Vi;return s(a,r,o,i)}function Tg(t,e,n,r,i,s){const a=_a(t,e,i,n),o=df(a)?ta:Vi;return s(a[0],o,r)}function Rg(t,e,n,r){const i=t.length,s=Ct(t,a=>Ct(a,o=>o.length===1));if(e)return function(a){const o=M(a,c=>c.GATE);for(let c=0;c<i;c++){const l=t[c],u=l.length,f=o[c];if(!(f!==void 0&&f.call(this)===!1))e:for(let m=0;m<u;m++){const p=l[m],A=p.length;for(let N=0;N<A;N++){const I=this.LA(N+1);if(n(I,p[N])===!1)continue e}return c}}};if(s&&!r){const a=M(t,c=>Tt(c)),o=Qe(a,(c,l,u)=>(q(l,f=>{z(c,f.tokenTypeIdx)||(c[f.tokenTypeIdx]=u),q(f.categoryMatches,m=>{z(c,m)||(c[m]=u)})}),c),{});return function(){const c=this.LA(1);return o[c.tokenTypeIdx]}}else return function(){for(let a=0;a<i;a++){const o=t[a],c=o.length;e:for(let l=0;l<c;l++){const u=o[l],f=u.length;for(let m=0;m<f;m++){const p=this.LA(m+1);if(n(p,u[m])===!1)continue e}return a}}}}function vg(t,e,n){const r=Ct(t,s=>s.length===1),i=t.length;if(r&&!n){const s=Tt(t);if(s.length===1&&ae(s[0].categoryMatches)){const o=s[0].tokenTypeIdx;return function(){return this.LA(1).tokenTypeIdx===o}}else{const a=Qe(s,(o,c,l)=>(o[c.tokenTypeIdx]=!0,q(c.categoryMatches,u=>{o[u]=!0}),o),[]);return function(){const o=this.LA(1);return a[o.tokenTypeIdx]===!0}}}else return function(){e:for(let s=0;s<i;s++){const a=t[s],o=a.length;for(let c=0;c<o;c++){const l=this.LA(c+1);if(e(l,a[c])===!1)continue e}return!0}return!1}}class Eg extends Sa{constructor(e,n,r){super(),this.topProd=e,this.targetOccurrence=n,this.targetProdType=r}startWalking(){return this.walk(this.topProd),this.restDef}checkIsTarget(e,n,r,i){return e.idx===this.targetOccurrence&&this.targetProdType===n?(this.restDef=r.concat(i),!0):!1}walkOption(e,n,r){this.checkIsTarget(e,ge.OPTION,n,r)||super.walkOption(e,n,r)}walkAtLeastOne(e,n,r){this.checkIsTarget(e,ge.REPETITION_MANDATORY,n,r)||super.walkOption(e,n,r)}walkAtLeastOneSep(e,n,r){this.checkIsTarget(e,ge.REPETITION_MANDATORY_WITH_SEPARATOR,n,r)||super.walkOption(e,n,r)}walkMany(e,n,r){this.checkIsTarget(e,ge.REPETITION,n,r)||super.walkOption(e,n,r)}walkManySep(e,n,r){this.checkIsTarget(e,ge.REPETITION_WITH_SEPARATOR,n,r)||super.walkOption(e,n,r)}}class lf extends Mr{constructor(e,n,r){super(),this.targetOccurrence=e,this.targetProdType=n,this.targetRef=r,this.result=[]}checkIsTarget(e,n){e.idx===this.targetOccurrence&&this.targetProdType===n&&(this.targetRef===void 0||e===this.targetRef)&&(this.result=e.definition)}visitOption(e){this.checkIsTarget(e,ge.OPTION)}visitRepetition(e){this.checkIsTarget(e,ge.REPETITION)}visitRepetitionMandatory(e){this.checkIsTarget(e,ge.REPETITION_MANDATORY)}visitRepetitionMandatoryWithSeparator(e){this.checkIsTarget(e,ge.REPETITION_MANDATORY_WITH_SEPARATOR)}visitRepetitionWithSeparator(e){this.checkIsTarget(e,ge.REPETITION_WITH_SEPARATOR)}visitAlternation(e){this.checkIsTarget(e,ge.ALTERNATION)}}function Kl(t){const e=new Array(t);for(let n=0;n<t;n++)e[n]=[];return e}function Ga(t){let e=[""];for(let n=0;n<t.length;n++){const r=t[n],i=[];for(let s=0;s<e.length;s++){const a=e[s];i.push(a+"_"+r.tokenTypeIdx);for(let o=0;o<r.categoryMatches.length;o++){const c="_"+r.categoryMatches[o];i.push(a+c)}}e=i}return e}function Ag(t,e,n){for(let r=0;r<t.length;r++){if(r===n)continue;const i=t[r];for(let s=0;s<e.length;s++){const a=e[s];if(i[a]===!0)return!1}}return!0}function uf(t,e){const n=M(t,a=>To([a],1)),r=Kl(n.length),i=M(n,a=>{const o={};return q(a,c=>{const l=Ga(c.partialPath);q(l,u=>{o[u]=!0})}),o});let s=n;for(let a=1;a<=e;a++){const o=s;s=Kl(o.length);for(let c=0;c<o.length;c++){const l=o[c];for(let u=0;u<l.length;u++){const f=l[u].partialPath,m=l[u].suffixDef,p=Ga(f);if(Ag(i,p,c)||ae(m)||f.length===e){const N=r[c];if(Ro(N,f)===!1){N.push(f);for(let I=0;I<p.length;I++){const C=p[I];i[c][C]=!0}}}else{const N=To(m,a+1,f);s[c]=s[c].concat(N),q(N,I=>{const C=Ga(I.partialPath);q(C,b=>{i[c][b]=!0})})}}}}return r}function ba(t,e,n,r){const i=new lf(t,ge.ALTERNATION,r);return e.accept(i),uf(i.result,n)}function _a(t,e,n,r){const i=new lf(t,n);e.accept(i);const s=i.result,o=new Eg(e,t,n).startWalking(),c=new it({definition:s}),l=new it({definition:o});return uf([c,l],r)}function Ro(t,e){e:for(let n=0;n<t.length;n++){const r=t[n];if(r.length===e.length){for(let i=0;i<r.length;i++){const s=e[i],a=r[i];if((s===a||a.categoryMatchesMap[s.tokenTypeIdx]!==void 0)===!1)continue e}return!0}}return!1}function Sg(t,e){return t.length<e.length&&Ct(t,(n,r)=>{const i=e[r];return n===i||i.categoryMatchesMap[n.tokenTypeIdx]})}function df(t){return Ct(t,e=>Ct(e,n=>Ct(n,r=>ae(r.categoryMatches))))}function kg(t){const e=t.lookaheadStrategy.validate({rules:t.rules,tokenTypes:t.tokenTypes,grammarName:t.grammarName});return M(e,n=>Object.assign({type:et.CUSTOM_LOOKAHEAD_VALIDATION},n))}function Cg(t,e,n,r){const i=ft(t,c=>bg(c,n)),s=Fg(t,e,n),a=ft(t,c=>Og(c,n)),o=ft(t,c=>wg(c,t,r,n));return i.concat(s,a,o)}function bg(t,e){const n=new Ng;t.accept(n);const r=n.allProductions,i=ip(r,_g),s=Nt(i,o=>o.length>1);return M($e(s),o=>{const c=_t(o),l=e.buildDuplicateFoundError(t,o),u=Lt(c),f={message:l,type:et.DUPLICATE_PRODUCTIONS,ruleName:t.name,dslName:u,occurrence:c.idx},m=ff(c);return m&&(f.parameter=m),f})}function _g(t){return`${Lt(t)}_#_${t.idx}_#_${ff(t)}`}function ff(t){return t instanceof le?t.terminalType.name:t instanceof Ze?t.nonTerminalName:""}class Ng extends Mr{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 wg(t,e,n,r){const i=[];if(Qe(e,(a,o)=>o.name===t.name?a+1:a,0)>1){const a=r.buildDuplicateRuleNameError({topLevelRule:t,grammarName:n});i.push({message:a,type:et.DUPLICATE_RULE_NAME,ruleName:t.name})}return i}function Ig(t,e,n){const r=[];let i;return tt(e,t)||(i=`Invalid rule override, rule: ->${t}<- cannot be overridden in the grammar: ->${n}<-as it is not defined in any of the super grammars `,r.push({message:i,type:et.INVALID_RULE_OVERRIDE,ruleName:t})),r}function hf(t,e,n,r=[]){const i=[],s=js(e.definition);if(ae(s))return[];{const a=t.name;tt(s,t)&&i.push({message:n.buildLeftRecursionError({topLevelRule:t,leftRecursionPath:r}),type:et.LEFT_RECURSION,ruleName:a});const c=ga(s,r.concat([t])),l=ft(c,u=>{const f=We(r);return f.push(u),hf(t,u,n,f)});return i.concat(l)}}function js(t){let e=[];if(ae(t))return e;const n=_t(t);if(n instanceof Ze)e.push(n.referencedRule);else if(n instanceof it||n instanceof Be||n instanceof mt||n instanceof gt||n instanceof st||n instanceof Ae)e=e.concat(js(n.definition));else if(n instanceof at)e=Tt(M(n.definition,s=>js(s.definition)));else if(!(n instanceof le))throw Error("non exhaustive match");const r=Zs(n),i=t.length>1;if(r&&i){const s=Ue(t);return e.concat(js(s))}else return e}class el extends Mr{constructor(){super(...arguments),this.alternations=[]}visitAlternation(e){this.alternations.push(e)}}function Pg(t,e){const n=new el;t.accept(n);const r=n.alternations;return ft(r,s=>{const a=Ni(s.definition);return ft(a,(o,c)=>{const l=cf([o],[],Vi,1);return ae(l)?[{message:e.buildEmptyAlternationError({topLevelRule:t,alternation:s,emptyChoiceIdx:c}),type:et.NONE_LAST_EMPTY_ALT,ruleName:t.name,occurrence:s.idx,alternative:c+1}]:[]})})}function $g(t,e,n){const r=new el;t.accept(r);let i=r.alternations;return i=ya(i,a=>a.ignoreAmbiguities===!0),ft(i,a=>{const o=a.idx,c=a.maxLookahead||e,l=ba(o,t,c,a),u=Dg(l,a,t,n),f=Mg(l,a,t,n);return u.concat(f)})}class Lg extends Mr{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 Og(t,e){const n=new el;t.accept(n);const r=n.alternations;return ft(r,s=>s.definition.length>255?[{message:e.buildTooManyAlternativesError({topLevelRule:t,alternation:s}),type:et.TOO_MANY_ALTS,ruleName:t.name,occurrence:s.idx}]:[])}function xg(t,e,n){const r=[];return q(t,i=>{const s=new Lg;i.accept(s);const a=s.allProductions;q(a,o=>{const c=Zc(o),l=o.maxLookahead||e,u=o.idx,m=_a(u,i,c,l)[0];if(ae(Tt(m))){const p=n.buildEmptyRepetitionError({topLevelRule:i,repetition:o});r.push({message:p,type:et.NO_NON_EMPTY_LOOKAHEAD,ruleName:i.name})}})}),r}function Dg(t,e,n,r){const i=[],s=Qe(t,(o,c,l)=>(e.definition[l].ignoreAmbiguities===!0||q(c,u=>{const f=[l];q(t,(m,p)=>{l!==p&&Ro(m,u)&&e.definition[p].ignoreAmbiguities!==!0&&f.push(p)}),f.length>1&&!Ro(i,u)&&(i.push(u),o.push({alts:f,path:u}))}),o),[]);return M(s,o=>{const c=M(o.alts,u=>u+1);return{message:r.buildAlternationAmbiguityError({topLevelRule:n,alternation:e,ambiguityIndices:c,prefixPath:o.path}),type:et.AMBIGUOUS_ALTS,ruleName:n.name,occurrence:e.idx,alternatives:o.alts}})}function Mg(t,e,n,r){const i=Qe(t,(a,o,c)=>{const l=M(o,u=>({idx:c,path:u}));return a.concat(l)},[]);return qi(ft(i,a=>{if(e.definition[a.idx].ignoreAmbiguities===!0)return[];const c=a.idx,l=a.path,u=pt(i,m=>e.definition[m.idx].ignoreAmbiguities!==!0&&m.idx<c&&Sg(m.path,l));return M(u,m=>{const p=[m.idx+1,c+1],A=e.idx===0?"":e.idx;return{message:r.buildAlternationPrefixAmbiguityError({topLevelRule:n,alternation:e,ambiguityIndices:p,prefixPath:m.path}),type:et.AMBIGUOUS_PREFIX_ALTS,ruleName:n.name,occurrence:A,alternatives:p}})}))}function Fg(t,e,n){const r=[],i=M(e,s=>s.name);return q(t,s=>{const a=s.name;if(tt(i,a)){const o=n.buildNamespaceConflictError(s);r.push({message:o,type:et.CONFLICT_TOKENS_RULES_NAMESPACE,ruleName:a})}}),r}function Gg(t){const e=zc(t,{errMsgProvider:lg}),n={};return q(t.rules,r=>{n[r.name]=r}),ug(n,e.errMsgProvider)}function Ug(t){return t=zc(t,{errMsgProvider:zn}),Cg(t.rules,t.tokenTypes,t.errMsgProvider,t.grammarName)}const pf="MismatchedTokenException",mf="NoViableAltException",gf="EarlyExitException",yf="NotAllInputParsedException",Tf=[pf,mf,gf,yf];Object.freeze(Tf);function na(t){return tt(Tf,t.name)}class Na extends Error{constructor(e,n){super(e),this.token=n,this.resyncedTokens=[],Object.setPrototypeOf(this,new.target.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}}class Rf extends Na{constructor(e,n,r){super(e,n),this.previousToken=r,this.name=pf}}class qg extends Na{constructor(e,n,r){super(e,n),this.previousToken=r,this.name=mf}}class jg extends Na{constructor(e,n){super(e,n),this.name=yf}}class zg extends Na{constructor(e,n,r){super(e,n),this.previousToken=r,this.name=gf}}const Ua={},vf="InRuleRecoveryException";class Bg extends Error{constructor(e){super(e),this.name=vf}}class Wg{initRecoverable(e){this.firstAfterRepMap={},this.resyncFollows={},this.recoveryEnabled=z(e,"recoveryEnabled")?e.recoveryEnabled:sn.recoveryEnabled,this.recoveryEnabled&&(this.attemptInRepetitionRecovery=Vg)}getTokenToInsert(e){const n=Qc(e,"",NaN,NaN,NaN,NaN,NaN,NaN);return n.isInsertedInRecovery=!0,n}canTokenTypeBeInsertedInRecovery(e){return!0}canTokenTypeBeDeletedInRecovery(e){return!0}tryInRepetitionRecovery(e,n,r,i){const s=this.findReSyncTokenType(),a=this.exportLexerState(),o=[];let c=!1;const l=this.LA(1);let u=this.LA(1);const f=()=>{const m=this.LA(0),p=this.errorMessageProvider.buildMismatchTokenMessage({expected:i,actual:l,previous:m,ruleName:this.getCurrRuleFullName()}),A=new Rf(p,l,this.LA(0));A.resyncedTokens=Ni(o),this.SAVE_ERROR(A)};for(;!c;)if(this.tokenMatcher(u,i)){f();return}else if(r.call(this)){f(),e.apply(this,n);return}else this.tokenMatcher(u,s)?c=!0:(u=this.SKIP_TOKEN(),this.addToResyncTokens(u,o));this.importLexerState(a)}shouldInRepetitionRecoveryBeTried(e,n,r){return!(r===!1||this.tokenMatcher(this.LA(1),e)||this.isBackTracking()||this.canPerformInRuleRecovery(e,this.getFollowsForInRuleRecovery(e,n)))}getFollowsForInRuleRecovery(e,n){const r=this.getCurrentGrammarPath(e,n);return this.getNextPossibleTokenTypes(r)}tryInRuleRecovery(e,n){if(this.canRecoverWithSingleTokenInsertion(e,n))return this.getTokenToInsert(e);if(this.canRecoverWithSingleTokenDeletion(e)){const r=this.SKIP_TOKEN();return this.consumeToken(),r}throw new Bg("sad sad panda")}canPerformInRuleRecovery(e,n){return this.canRecoverWithSingleTokenInsertion(e,n)||this.canRecoverWithSingleTokenDeletion(e)}canRecoverWithSingleTokenInsertion(e,n){if(!this.canTokenTypeBeInsertedInRecovery(e)||ae(n))return!1;const r=this.LA(1);return Nr(n,s=>this.tokenMatcher(r,s))!==void 0}canRecoverWithSingleTokenDeletion(e){return this.canTokenTypeBeDeletedInRecovery(e)?this.tokenMatcher(this.LA(2),e):!1}isInCurrentRuleReSyncSet(e){const n=this.getCurrFollowKey(),r=this.getFollowSetFromFollowKey(n);return tt(r,e)}findReSyncTokenType(){const e=this.flattenFollowSet();let n=this.LA(1),r=2;for(;;){const i=Nr(e,s=>of(n,s));if(i!==void 0)return i;n=this.LA(r),r++}}getCurrFollowKey(){if(this.RULE_STACK.length===1)return Ua;const e=this.getLastExplicitRuleShortName(),n=this.getLastExplicitRuleOccurrenceIndex(),r=this.getPreviousExplicitRuleShortName();return{ruleName:this.shortRuleNameToFullName(e),idxInCallingRule:n,inRule:this.shortRuleNameToFullName(r)}}buildFullFollowKeyStack(){const e=this.RULE_STACK,n=this.RULE_OCCURRENCE_STACK;return M(e,(r,i)=>i===0?Ua:{ruleName:this.shortRuleNameToFullName(r),idxInCallingRule:n[i],inRule:this.shortRuleNameToFullName(e[i-1])})}flattenFollowSet(){const e=M(this.buildFullFollowKeyStack(),n=>this.getFollowSetFromFollowKey(n));return Tt(e)}getFollowSetFromFollowKey(e){if(e===Ua)return[hn];const n=e.ruleName+e.idxInCallingRule+Xd+e.inRule;return this.resyncFollows[n]}addToResyncTokens(e,n){return this.tokenMatcher(e,hn)||n.push(e),n}reSyncTo(e){const n=[];let r=this.LA(1);for(;this.tokenMatcher(r,e)===!1;)r=this.SKIP_TOKEN(),this.addToResyncTokens(r,n);return Ni(n)}attemptInRepetitionRecovery(e,n,r,i,s,a,o){}getCurrentGrammarPath(e,n){const r=this.getHumanReadableRuleStack(),i=We(this.RULE_OCCURRENCE_STACK);return{ruleStack:r,occurrenceStack:i,lastTok:e,lastTokOccurrence:n}}getHumanReadableRuleStack(){return M(this.RULE_STACK,e=>this.shortRuleNameToFullName(e))}}function Vg(t,e,n,r,i,s,a){const o=this.getKeyForAutomaticLookahead(r,i);let c=this.firstAfterRepMap[o];if(c===void 0){const m=this.getCurrRuleFullName(),p=this.getGAstProductions()[m];c=new s(p,i).startWalking(),this.firstAfterRepMap[o]=c}let l=c.token,u=c.occurrence;const f=c.isEndOfRule;this.RULE_STACK.length===1&&f&&l===void 0&&(l=hn,u=1),!(l===void 0||u===void 0)&&this.shouldInRepetitionRecoveryBeTried(l,u,a)&&this.tryInRepetitionRecovery(t,e,n,l)}const Kg=4,mn=8,Ef=1<<mn,Af=2<<mn,vo=3<<mn,Eo=4<<mn,Ao=5<<mn,zs=6<<mn;function qa(t,e,n){return n|e|t}class tl{constructor(e){var n;this.maxLookahead=(n=e?.maxLookahead)!==null&&n!==void 0?n:sn.maxLookahead}validate(e){const n=this.validateNoLeftRecursion(e.rules);if(ae(n)){const r=this.validateEmptyOrAlternatives(e.rules),i=this.validateAmbiguousAlternationAlternatives(e.rules,this.maxLookahead),s=this.validateSomeNonEmptyLookaheadPath(e.rules,this.maxLookahead);return[...n,...r,...i,...s]}return n}validateNoLeftRecursion(e){return ft(e,n=>hf(n,n,zn))}validateEmptyOrAlternatives(e){return ft(e,n=>Pg(n,zn))}validateAmbiguousAlternationAlternatives(e,n){return ft(e,r=>$g(r,n,zn))}validateSomeNonEmptyLookaheadPath(e,n){return xg(e,n,zn)}buildLookaheadForAlternation(e){return yg(e.prodOccurrence,e.rule,e.maxLookahead,e.hasPredicates,e.dynamicTokensEnabled,Rg)}buildLookaheadForOptional(e){return Tg(e.prodOccurrence,e.rule,e.maxLookahead,e.dynamicTokensEnabled,Zc(e.prodType),vg)}}class Hg{initLooksAhead(e){this.dynamicTokensEnabled=z(e,"dynamicTokensEnabled")?e.dynamicTokensEnabled:sn.dynamicTokensEnabled,this.maxLookahead=z(e,"maxLookahead")?e.maxLookahead:sn.maxLookahead,this.lookaheadStrategy=z(e,"lookaheadStrategy")?e.lookaheadStrategy:new tl({maxLookahead:this.maxLookahead}),this.lookAheadFuncsCache=new Map}preComputeLookaheadFunctions(e){q(e,n=>{this.TRACE_INIT(`${n.name} Rule Lookahead`,()=>{const{alternation:r,repetition:i,option:s,repetitionMandatory:a,repetitionMandatoryWithSeparator:o,repetitionWithSeparator:c}=Xg(n);q(r,l=>{const u=l.idx===0?"":l.idx;this.TRACE_INIT(`${Lt(l)}${u}`,()=>{const f=this.lookaheadStrategy.buildLookaheadForAlternation({prodOccurrence:l.idx,rule:n,maxLookahead:l.maxLookahead||this.maxLookahead,hasPredicates:l.hasPredicates,dynamicTokensEnabled:this.dynamicTokensEnabled}),m=qa(this.fullRuleNameToShort[n.name],Ef,l.idx);this.setLaFuncCache(m,f)})}),q(i,l=>{this.computeLookaheadFunc(n,l.idx,vo,"Repetition",l.maxLookahead,Lt(l))}),q(s,l=>{this.computeLookaheadFunc(n,l.idx,Af,"Option",l.maxLookahead,Lt(l))}),q(a,l=>{this.computeLookaheadFunc(n,l.idx,Eo,"RepetitionMandatory",l.maxLookahead,Lt(l))}),q(o,l=>{this.computeLookaheadFunc(n,l.idx,zs,"RepetitionMandatoryWithSeparator",l.maxLookahead,Lt(l))}),q(c,l=>{this.computeLookaheadFunc(n,l.idx,Ao,"RepetitionWithSeparator",l.maxLookahead,Lt(l))})})})}computeLookaheadFunc(e,n,r,i,s,a){this.TRACE_INIT(`${a}${n===0?"":n}`,()=>{const o=this.lookaheadStrategy.buildLookaheadForOptional({prodOccurrence:n,rule:e,maxLookahead:s||this.maxLookahead,dynamicTokensEnabled:this.dynamicTokensEnabled,prodType:i}),c=qa(this.fullRuleNameToShort[e.name],r,n);this.setLaFuncCache(c,o)})}getKeyForAutomaticLookahead(e,n){const r=this.getLastExplicitRuleShortName();return qa(r,e,n)}getLaFuncFromCache(e){return this.lookAheadFuncsCache.get(e)}setLaFuncCache(e,n){this.lookAheadFuncsCache.set(e,n)}}class Yg extends Mr{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)}}const As=new Yg;function Xg(t){As.reset(),t.accept(As);const e=As.dslMethods;return As.reset(),e}function Hl(t,e){isNaN(t.startOffset)===!0?(t.startOffset=e.startOffset,t.endOffset=e.endOffset):t.endOffset<e.endOffset&&(t.endOffset=e.endOffset)}function Yl(t,e){isNaN(t.startOffset)===!0?(t.startOffset=e.startOffset,t.startColumn=e.startColumn,t.startLine=e.startLine,t.endOffset=e.endOffset,t.endColumn=e.endColumn,t.endLine=e.endLine):t.endOffset<e.endOffset&&(t.endOffset=e.endOffset,t.endColumn=e.endColumn,t.endLine=e.endLine)}function Jg(t,e,n){t.children[n]===void 0?t.children[n]=[e]:t.children[n].push(e)}function Qg(t,e,n){t.children[e]===void 0?t.children[e]=[n]:t.children[e].push(n)}const Zg="name";function Sf(t,e){Object.defineProperty(t,Zg,{enumerable:!1,configurable:!0,writable:!1,value:e})}function ey(t,e){const n=_r(t),r=n.length;for(let i=0;i<r;i++){const s=n[i],a=t[s],o=a.length;for(let c=0;c<o;c++){const l=a[c];l.tokenTypeIdx===void 0&&this[l.name](l.children,e)}}}function ty(t,e){const n=function(){};Sf(n,t+"BaseSemantics");const r={visit:function(i,s){if(ze(i)&&(i=i[0]),!nn(i))return this[i.name](i.children,s)},validateVisitor:function(){const i=ry(this,e);if(!ae(i)){const s=M(i,a=>a.msg);throw Error(`Errors Detected in CST Visitor <${this.constructor.name}>:
90
+ ${s.join(`
91
+
92
+ `).replace(/\n/g,`
93
+ `)}`)}}};return n.prototype=r,n.prototype.constructor=n,n._RULE_NAMES=e,n}function ny(t,e,n){const r=function(){};Sf(r,t+"BaseSemanticsWithDefaults");const i=Object.create(n.prototype);return q(e,s=>{i[s]=ey}),r.prototype=i,r.prototype.constructor=r,r}var So;(function(t){t[t.REDUNDANT_METHOD=0]="REDUNDANT_METHOD",t[t.MISSING_METHOD=1]="MISSING_METHOD"})(So||(So={}));function ry(t,e){return iy(t,e)}function iy(t,e){const n=pt(e,i=>Qn(t[i])===!1),r=M(n,i=>({msg:`Missing visitor method: <${i}> on ${t.constructor.name} CST Visitor.`,type:So.MISSING_METHOD,methodName:i}));return qi(r)}class sy{initTreeBuilder(e){if(this.CST_STACK=[],this.outputCst=e.outputCst,this.nodeLocationTracking=z(e,"nodeLocationTracking")?e.nodeLocationTracking:sn.nodeLocationTracking,!this.outputCst)this.cstInvocationStateUpdate=Ge,this.cstFinallyStateUpdate=Ge,this.cstPostTerminal=Ge,this.cstPostNonTerminal=Ge,this.cstPostRule=Ge;else if(/full/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=Yl,this.setNodeLocationFromNode=Yl,this.cstPostRule=Ge,this.setInitialNodeLocation=this.setInitialNodeLocationFullRecovery):(this.setNodeLocationFromToken=Ge,this.setNodeLocationFromNode=Ge,this.cstPostRule=this.cstPostRuleFull,this.setInitialNodeLocation=this.setInitialNodeLocationFullRegular);else if(/onlyOffset/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=Hl,this.setNodeLocationFromNode=Hl,this.cstPostRule=Ge,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRecovery):(this.setNodeLocationFromToken=Ge,this.setNodeLocationFromNode=Ge,this.cstPostRule=this.cstPostRuleOnlyOffset,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRegular);else if(/none/i.test(this.nodeLocationTracking))this.setNodeLocationFromToken=Ge,this.setNodeLocationFromNode=Ge,this.cstPostRule=Ge,this.setInitialNodeLocation=Ge;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){const n=this.LA(1);e.location={startOffset:n.startOffset,startLine:n.startLine,startColumn:n.startColumn,endOffset:NaN,endLine:NaN,endColumn:NaN}}cstInvocationStateUpdate(e){const n={name:e,children:Object.create(null)};this.setInitialNodeLocation(n),this.CST_STACK.push(n)}cstFinallyStateUpdate(){this.CST_STACK.pop()}cstPostRuleFull(e){const n=this.LA(0),r=e.location;r.startOffset<=n.startOffset?(r.endOffset=n.endOffset,r.endLine=n.endLine,r.endColumn=n.endColumn):(r.startOffset=NaN,r.startLine=NaN,r.startColumn=NaN)}cstPostRuleOnlyOffset(e){const n=this.LA(0),r=e.location;r.startOffset<=n.startOffset?r.endOffset=n.endOffset:r.startOffset=NaN}cstPostTerminal(e,n){const r=this.CST_STACK[this.CST_STACK.length-1];Jg(r,n,e),this.setNodeLocationFromToken(r.location,n)}cstPostNonTerminal(e,n){const r=this.CST_STACK[this.CST_STACK.length-1];Qg(r,n,e),this.setNodeLocationFromNode(r.location,e.location)}getBaseCstVisitorConstructor(){if(nn(this.baseCstVisitorConstructor)){const e=ty(this.className,_r(this.gastProductionsCache));return this.baseCstVisitorConstructor=e,e}return this.baseCstVisitorConstructor}getBaseCstVisitorConstructorWithDefaults(){if(nn(this.baseCstVisitorWithDefaultsConstructor)){const e=ny(this.className,_r(this.gastProductionsCache),this.getBaseCstVisitorConstructor());return this.baseCstVisitorWithDefaultsConstructor=e,e}return this.baseCstVisitorWithDefaultsConstructor}getLastExplicitRuleShortName(){const e=this.RULE_STACK;return e[e.length-1]}getPreviousExplicitRuleShortName(){const e=this.RULE_STACK;return e[e.length-2]}getLastExplicitRuleOccurrenceIndex(){const e=this.RULE_OCCURRENCE_STACK;return e[e.length-1]}}class ay{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)):ia}LA(e){const n=this.currIdx+e;return n<0||this.tokVectorLength<=n?ia:this.tokVector[n]}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()}}class oy{ACTION(e){return e.call(this)}consume(e,n,r){return this.consumeInternal(n,e,r)}subrule(e,n,r){return this.subruleInternal(n,e,r)}option(e,n){return this.optionInternal(n,e)}or(e,n){return this.orInternal(n,e)}many(e,n){return this.manyInternal(e,n)}atLeastOne(e,n){return this.atLeastOneInternal(e,n)}CONSUME(e,n){return this.consumeInternal(e,0,n)}CONSUME1(e,n){return this.consumeInternal(e,1,n)}CONSUME2(e,n){return this.consumeInternal(e,2,n)}CONSUME3(e,n){return this.consumeInternal(e,3,n)}CONSUME4(e,n){return this.consumeInternal(e,4,n)}CONSUME5(e,n){return this.consumeInternal(e,5,n)}CONSUME6(e,n){return this.consumeInternal(e,6,n)}CONSUME7(e,n){return this.consumeInternal(e,7,n)}CONSUME8(e,n){return this.consumeInternal(e,8,n)}CONSUME9(e,n){return this.consumeInternal(e,9,n)}SUBRULE(e,n){return this.subruleInternal(e,0,n)}SUBRULE1(e,n){return this.subruleInternal(e,1,n)}SUBRULE2(e,n){return this.subruleInternal(e,2,n)}SUBRULE3(e,n){return this.subruleInternal(e,3,n)}SUBRULE4(e,n){return this.subruleInternal(e,4,n)}SUBRULE5(e,n){return this.subruleInternal(e,5,n)}SUBRULE6(e,n){return this.subruleInternal(e,6,n)}SUBRULE7(e,n){return this.subruleInternal(e,7,n)}SUBRULE8(e,n){return this.subruleInternal(e,8,n)}SUBRULE9(e,n){return this.subruleInternal(e,9,n)}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,n,r=sa){if(tt(this.definedRulesNames,e)){const a={message:zn.buildDuplicateRuleNameError({topLevelRule:e,grammarName:this.className}),type:et.DUPLICATE_RULE_NAME,ruleName:e};this.definitionErrors.push(a)}this.definedRulesNames.push(e);const i=this.defineRule(e,n,r);return this[e]=i,i}OVERRIDE_RULE(e,n,r=sa){const i=Ig(e,this.definedRulesNames,this.className);this.definitionErrors=this.definitionErrors.concat(i);const s=this.defineRule(e,n,r);return this[e]=s,s}BACKTRACK(e,n){return function(){this.isBackTrackingStack.push(1);const r=this.saveRecogState();try{return e.apply(this,n),!0}catch(i){if(na(i))return!1;throw i}finally{this.reloadRecogState(r),this.isBackTrackingStack.pop()}}}getGAstProductions(){return this.gastProductionsCache}getSerializedGastProductions(){return mm($e(this.gastProductionsCache))}}class cy{initRecognizerEngine(e,n){if(this.className=this.constructor.name,this.shortRuleNameToFull={},this.fullRuleNameToShort={},this.ruleShortNameIdx=256,this.tokenMatcher=ta,this.subruleIdx=0,this.definedRulesNames=[],this.tokensMap={},this.isBackTrackingStack=[],this.RULE_STACK=[],this.RULE_OCCURRENCE_STACK=[],this.gastProductionsCache={},z(n,"serializedGrammar"))throw Error(`The Parser's configuration can no longer contain a <serializedGrammar> property.
94
+ See: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_6-0-0
95
+ For Further details.`);if(ze(e)){if(ae(e))throw Error(`A Token Vocabulary cannot be empty.
96
+ Note that the first argument for the parser constructor
97
+ 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.
98
+ See: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_4-0-0
99
+ For Further details.`)}if(ze(e))this.tokensMap=Qe(e,(s,a)=>(s[a.name]=a,s),{});else if(z(e,"modes")&&Ct(Tt($e(e.modes)),ag)){const s=Tt($e(e.modes)),a=Bc(s);this.tokensMap=Qe(a,(o,c)=>(o[c.name]=c,o),{})}else if(Dh(e))this.tokensMap=We(e);else throw new Error("<tokensDictionary> argument must be An Array of Token constructors, A dictionary of Token constructors or an IMultiModeLexerDefinition");this.tokensMap.EOF=hn;const r=z(e,"modes")?Tt($e(e.modes)):$e(e),i=Ct(r,s=>ae(s.categoryMatches));this.tokenMatcher=i?ta:Vi,Ki($e(this.tokensMap))}defineRule(e,n,r){if(this.selfAnalysisDone)throw Error(`Grammar rule <${e}> may not be defined after the 'performSelfAnalysis' method has been called'
100
+ Make sure that all grammar rule definitions are done before 'performSelfAnalysis' is called.`);const i=z(r,"resyncEnabled")?r.resyncEnabled:sa.resyncEnabled,s=z(r,"recoveryValueFunc")?r.recoveryValueFunc:sa.recoveryValueFunc,a=this.ruleShortNameIdx<<Kg+mn;this.ruleShortNameIdx++,this.shortRuleNameToFull[a]=e,this.fullRuleNameToShort[e]=a;let o;return this.outputCst===!0?o=function(...u){try{this.ruleInvocationStateUpdate(a,e,this.subruleIdx),n.apply(this,u);const f=this.CST_STACK[this.CST_STACK.length-1];return this.cstPostRule(f),f}catch(f){return this.invokeRuleCatch(f,i,s)}finally{this.ruleFinallyStateUpdate()}}:o=function(...u){try{return this.ruleInvocationStateUpdate(a,e,this.subruleIdx),n.apply(this,u)}catch(f){return this.invokeRuleCatch(f,i,s)}finally{this.ruleFinallyStateUpdate()}},Object.assign(o,{ruleName:e,originalGrammarAction:n})}invokeRuleCatch(e,n,r){const i=this.RULE_STACK.length===1,s=n&&!this.isBackTracking()&&this.recoveryEnabled;if(na(e)){const a=e;if(s){const o=this.findReSyncTokenType();if(this.isInCurrentRuleReSyncSet(o))if(a.resyncedTokens=this.reSyncTo(o),this.outputCst){const c=this.CST_STACK[this.CST_STACK.length-1];return c.recoveredNode=!0,c}else return r(e);else{if(this.outputCst){const c=this.CST_STACK[this.CST_STACK.length-1];c.recoveredNode=!0,a.partialCstResult=c}throw a}}else{if(i)return this.moveToTerminatedState(),r(e);throw a}}else throw e}optionInternal(e,n){const r=this.getKeyForAutomaticLookahead(Af,n);return this.optionInternalLogic(e,n,r)}optionInternalLogic(e,n,r){let i=this.getLaFuncFromCache(r),s;if(typeof e!="function"){s=e.DEF;const a=e.GATE;if(a!==void 0){const o=i;i=()=>a.call(this)&&o.call(this)}}else s=e;if(i.call(this)===!0)return s.call(this)}atLeastOneInternal(e,n){const r=this.getKeyForAutomaticLookahead(Eo,e);return this.atLeastOneInternalLogic(e,n,r)}atLeastOneInternalLogic(e,n,r){let i=this.getLaFuncFromCache(r),s;if(typeof n!="function"){s=n.DEF;const a=n.GATE;if(a!==void 0){const o=i;i=()=>a.call(this)&&o.call(this)}}else s=n;if(i.call(this)===!0){let a=this.doSingleRepetition(s);for(;i.call(this)===!0&&a===!0;)a=this.doSingleRepetition(s)}else throw this.raiseEarlyExitException(e,ge.REPETITION_MANDATORY,n.ERR_MSG);this.attemptInRepetitionRecovery(this.atLeastOneInternal,[e,n],i,Eo,e,mg)}atLeastOneSepFirstInternal(e,n){const r=this.getKeyForAutomaticLookahead(zs,e);this.atLeastOneSepFirstInternalLogic(e,n,r)}atLeastOneSepFirstInternalLogic(e,n,r){const i=n.DEF,s=n.SEP;if(this.getLaFuncFromCache(r).call(this)===!0){i.call(this);const o=()=>this.tokenMatcher(this.LA(1),s);for(;this.tokenMatcher(this.LA(1),s)===!0;)this.CONSUME(s),i.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,s,o,i,Wl],o,zs,e,Wl)}else throw this.raiseEarlyExitException(e,ge.REPETITION_MANDATORY_WITH_SEPARATOR,n.ERR_MSG)}manyInternal(e,n){const r=this.getKeyForAutomaticLookahead(vo,e);return this.manyInternalLogic(e,n,r)}manyInternalLogic(e,n,r){let i=this.getLaFuncFromCache(r),s;if(typeof n!="function"){s=n.DEF;const o=n.GATE;if(o!==void 0){const c=i;i=()=>o.call(this)&&c.call(this)}}else s=n;let a=!0;for(;i.call(this)===!0&&a===!0;)a=this.doSingleRepetition(s);this.attemptInRepetitionRecovery(this.manyInternal,[e,n],i,vo,e,pg,a)}manySepFirstInternal(e,n){const r=this.getKeyForAutomaticLookahead(Ao,e);this.manySepFirstInternalLogic(e,n,r)}manySepFirstInternalLogic(e,n,r){const i=n.DEF,s=n.SEP;if(this.getLaFuncFromCache(r).call(this)===!0){i.call(this);const o=()=>this.tokenMatcher(this.LA(1),s);for(;this.tokenMatcher(this.LA(1),s)===!0;)this.CONSUME(s),i.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,s,o,i,Bl],o,Ao,e,Bl)}}repetitionSepSecondInternal(e,n,r,i,s){for(;r();)this.CONSUME(n),i.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,n,r,i,s],r,zs,e,s)}doSingleRepetition(e){const n=this.getLexerPosition();return e.call(this),this.getLexerPosition()>n}orInternal(e,n){const r=this.getKeyForAutomaticLookahead(Ef,n),i=ze(e)?e:e.DEF,a=this.getLaFuncFromCache(r).call(this,i);if(a!==void 0)return i[a].ALT.call(this);this.raiseNoAltException(n,e.ERR_MSG)}ruleFinallyStateUpdate(){if(this.RULE_STACK.pop(),this.RULE_OCCURRENCE_STACK.pop(),this.cstFinallyStateUpdate(),this.RULE_STACK.length===0&&this.isAtEndOfInput()===!1){const e=this.LA(1),n=this.errorMessageProvider.buildNotAllInputParsedMessage({firstRedundant:e,ruleName:this.getCurrRuleFullName()});this.SAVE_ERROR(new jg(n,e))}}subruleInternal(e,n,r){let i;try{const s=r!==void 0?r.ARGS:void 0;return this.subruleIdx=n,i=e.apply(this,s),this.cstPostNonTerminal(i,r!==void 0&&r.LABEL!==void 0?r.LABEL:e.ruleName),i}catch(s){throw this.subruleInternalError(s,r,e.ruleName)}}subruleInternalError(e,n,r){throw na(e)&&e.partialCstResult!==void 0&&(this.cstPostNonTerminal(e.partialCstResult,n!==void 0&&n.LABEL!==void 0?n.LABEL:r),delete e.partialCstResult),e}consumeInternal(e,n,r){let i;try{const s=this.LA(1);this.tokenMatcher(s,e)===!0?(this.consumeToken(),i=s):this.consumeInternalError(e,s,r)}catch(s){i=this.consumeInternalRecovery(e,n,s)}return this.cstPostTerminal(r!==void 0&&r.LABEL!==void 0?r.LABEL:e.name,i),i}consumeInternalError(e,n,r){let i;const s=this.LA(0);throw r!==void 0&&r.ERR_MSG?i=r.ERR_MSG:i=this.errorMessageProvider.buildMismatchTokenMessage({expected:e,actual:n,previous:s,ruleName:this.getCurrRuleFullName()}),this.SAVE_ERROR(new Rf(i,n,s))}consumeInternalRecovery(e,n,r){if(this.recoveryEnabled&&r.name==="MismatchedTokenException"&&!this.isBackTracking()){const i=this.getFollowsForInRuleRecovery(e,n);try{return this.tryInRuleRecovery(e,i)}catch(s){throw s.name===vf?r:s}}else throw r}saveRecogState(){const e=this.errors,n=We(this.RULE_STACK);return{errors:e,lexerState:this.exportLexerState(),RULE_STACK:n,CST_STACK:this.CST_STACK}}reloadRecogState(e){this.errors=e.errors,this.importLexerState(e.lexerState),this.RULE_STACK=e.RULE_STACK}ruleInvocationStateUpdate(e,n,r){this.RULE_OCCURRENCE_STACK.push(r),this.RULE_STACK.push(e),this.cstInvocationStateUpdate(n)}isBackTracking(){return this.isBackTrackingStack.length!==0}getCurrRuleFullName(){const e=this.getLastExplicitRuleShortName();return this.shortRuleNameToFull[e]}shortRuleNameToFullName(e){return this.shortRuleNameToFull[e]}isAtEndOfInput(){return this.tokenMatcher(this.LA(1),hn)}reset(){this.resetLexerState(),this.subruleIdx=0,this.isBackTrackingStack=[],this.errors=[],this.RULE_STACK=[],this.CST_STACK=[],this.RULE_OCCURRENCE_STACK=[]}}class ly{initErrorHandler(e){this._errors=[],this.errorMessageProvider=z(e,"errorMessageProvider")?e.errorMessageProvider:sn.errorMessageProvider}SAVE_ERROR(e){if(na(e))return e.context={ruleStack:this.getHumanReadableRuleStack(),ruleOccurrenceStack:We(this.RULE_OCCURRENCE_STACK)},this._errors.push(e),e;throw Error("Trying to save an Error which is not a RecognitionException")}get errors(){return We(this._errors)}set errors(e){this._errors=e}raiseEarlyExitException(e,n,r){const i=this.getCurrRuleFullName(),s=this.getGAstProductions()[i],o=_a(e,s,n,this.maxLookahead)[0],c=[];for(let u=1;u<=this.maxLookahead;u++)c.push(this.LA(u));const l=this.errorMessageProvider.buildEarlyExitMessage({expectedIterationPaths:o,actual:c,previous:this.LA(0),customUserDescription:r,ruleName:i});throw this.SAVE_ERROR(new zg(l,this.LA(1),this.LA(0)))}raiseNoAltException(e,n){const r=this.getCurrRuleFullName(),i=this.getGAstProductions()[r],s=ba(e,i,this.maxLookahead),a=[];for(let l=1;l<=this.maxLookahead;l++)a.push(this.LA(l));const o=this.LA(0),c=this.errorMessageProvider.buildNoViableAltMessage({expectedPathsPerAlt:s,actual:a,previous:o,customUserDescription:n,ruleName:this.getCurrRuleFullName()});throw this.SAVE_ERROR(new qg(c,this.LA(1),o))}}class uy{initContentAssist(){}computeContentAssist(e,n){const r=this.gastProductionsCache[e];if(nn(r))throw Error(`Rule ->${e}<- does not exist in this grammar.`);return cf([r],n,this.tokenMatcher,this.maxLookahead)}getNextPossibleTokenTypes(e){const n=_t(e.ruleStack),i=this.getGAstProductions()[n];return new hg(i,e).startWalking()}}const wa={description:"This Object indicates the Parser is during Recording Phase"};Object.freeze(wa);const Xl=!0,Jl=Math.pow(2,mn)-1,kf=af({name:"RECORDING_PHASE_TOKEN",pattern:nt.NA});Ki([kf]);const Cf=Qc(kf,`This IToken indicates the Parser is in Recording Phase
101
+ See: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details`,-1,-1,-1,-1,-1,-1);Object.freeze(Cf);const dy={name:`This CSTNode indicates the Parser is in Recording Phase
102
+ See: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details`,children:{}};class fy{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++){const n=e>0?e:"";this[`CONSUME${n}`]=function(r,i){return this.consumeInternalRecord(r,e,i)},this[`SUBRULE${n}`]=function(r,i){return this.subruleInternalRecord(r,e,i)},this[`OPTION${n}`]=function(r){return this.optionInternalRecord(r,e)},this[`OR${n}`]=function(r){return this.orInternalRecord(r,e)},this[`MANY${n}`]=function(r){this.manyInternalRecord(e,r)},this[`MANY_SEP${n}`]=function(r){this.manySepFirstInternalRecord(e,r)},this[`AT_LEAST_ONE${n}`]=function(r){this.atLeastOneInternalRecord(e,r)},this[`AT_LEAST_ONE_SEP${n}`]=function(r){this.atLeastOneSepFirstInternalRecord(e,r)}}this.consume=function(e,n,r){return this.consumeInternalRecord(n,e,r)},this.subrule=function(e,n,r){return this.subruleInternalRecord(n,e,r)},this.option=function(e,n){return this.optionInternalRecord(n,e)},this.or=function(e,n){return this.orInternalRecord(n,e)},this.many=function(e,n){this.manyInternalRecord(e,n)},this.atLeastOne=function(e,n){this.atLeastOneInternalRecord(e,n)},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",()=>{const e=this;for(let n=0;n<10;n++){const r=n>0?n:"";delete e[`CONSUME${r}`],delete e[`SUBRULE${r}`],delete e[`OPTION${r}`],delete e[`OR${r}`],delete e[`MANY${r}`],delete e[`MANY_SEP${r}`],delete e[`AT_LEAST_ONE${r}`],delete e[`AT_LEAST_ONE_SEP${r}`]}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,n){return()=>!0}LA_RECORD(e){return ia}topLevelRuleRecord(e,n){try{const r=new Dr({definition:[],name:e});return r.name=e,this.recordingProdStack.push(r),n.call(this),this.recordingProdStack.pop(),r}catch(r){if(r.KNOWN_RECORDER_ERROR!==!0)try{r.message=r.message+`
103
+ This error was thrown during the "grammar recording phase" For more info see:
104
+ https://chevrotain.io/docs/guide/internals.html#grammar-recording`}catch{throw r}throw r}}optionInternalRecord(e,n){return ni.call(this,Be,e,n)}atLeastOneInternalRecord(e,n){ni.call(this,mt,n,e)}atLeastOneSepFirstInternalRecord(e,n){ni.call(this,gt,n,e,Xl)}manyInternalRecord(e,n){ni.call(this,Ae,n,e)}manySepFirstInternalRecord(e,n){ni.call(this,st,n,e,Xl)}orInternalRecord(e,n){return hy.call(this,e,n)}subruleInternalRecord(e,n,r){if(ra(n),!e||z(e,"ruleName")===!1){const o=new Error(`<SUBRULE${Ql(n)}> argument is invalid expecting a Parser method reference but got: <${JSON.stringify(e)}>
105
+ inside top level rule: <${this.recordingProdStack[0].name}>`);throw o.KNOWN_RECORDER_ERROR=!0,o}const i=Wn(this.recordingProdStack),s=e.ruleName,a=new Ze({idx:n,nonTerminalName:s,label:r?.LABEL,referencedRule:void 0});return i.definition.push(a),this.outputCst?dy:wa}consumeInternalRecord(e,n,r){if(ra(n),!rf(e)){const a=new Error(`<CONSUME${Ql(n)}> argument is invalid expecting a TokenType reference but got: <${JSON.stringify(e)}>
106
+ inside top level rule: <${this.recordingProdStack[0].name}>`);throw a.KNOWN_RECORDER_ERROR=!0,a}const i=Wn(this.recordingProdStack),s=new le({idx:n,terminalType:e,label:r?.LABEL});return i.definition.push(s),Cf}}function ni(t,e,n,r=!1){ra(n);const i=Wn(this.recordingProdStack),s=Qn(e)?e:e.DEF,a=new t({definition:[],idx:n});return r&&(a.separator=e.SEP),z(e,"MAX_LOOKAHEAD")&&(a.maxLookahead=e.MAX_LOOKAHEAD),this.recordingProdStack.push(a),s.call(this),i.definition.push(a),this.recordingProdStack.pop(),wa}function hy(t,e){ra(e);const n=Wn(this.recordingProdStack),r=ze(t)===!1,i=r===!1?t:t.DEF,s=new at({definition:[],idx:e,ignoreAmbiguities:r&&t.IGNORE_AMBIGUITIES===!0});z(t,"MAX_LOOKAHEAD")&&(s.maxLookahead=t.MAX_LOOKAHEAD);const a=bd(i,o=>Qn(o.GATE));return s.hasPredicates=a,n.definition.push(s),q(i,o=>{const c=new it({definition:[]});s.definition.push(c),z(o,"IGNORE_AMBIGUITIES")?c.ignoreAmbiguities=o.IGNORE_AMBIGUITIES:z(o,"GATE")&&(c.ignoreAmbiguities=!0),this.recordingProdStack.push(c),o.ALT.call(this),this.recordingProdStack.pop()}),wa}function Ql(t){return t===0?"":`${t}`}function ra(t){if(t<0||t>Jl){const e=new Error(`Invalid DSL Method idx value: <${t}>
107
+ Idx value must be a none negative value smaller than ${Jl+1}`);throw e.KNOWN_RECORDER_ERROR=!0,e}}class py{initPerformanceTracer(e){if(z(e,"traceInitPerf")){const n=e.traceInitPerf,r=typeof n=="number";this.traceInitMaxIdent=r?n:1/0,this.traceInitPerf=r?n>0:n}else this.traceInitMaxIdent=0,this.traceInitPerf=sn.traceInitPerf;this.traceInitIndent=-1}TRACE_INIT(e,n){if(this.traceInitPerf===!0){this.traceInitIndent++;const r=new Array(this.traceInitIndent+1).join(" ");this.traceInitIndent<this.traceInitMaxIdent&&console.log(`${r}--> <${e}>`);const{time:i,value:s}=Hd(n),a=i>10?console.warn:console.log;return this.traceInitIndent<this.traceInitMaxIdent&&a(`${r}<-- <${e}> time: ${i}ms`),this.traceInitIndent--,s}else return n()}}function my(t,e){e.forEach(n=>{const r=n.prototype;Object.getOwnPropertyNames(r).forEach(i=>{if(i==="constructor")return;const s=Object.getOwnPropertyDescriptor(r,i);s&&(s.get||s.set)?Object.defineProperty(t.prototype,i,s):t.prototype[i]=n.prototype[i]})})}const ia=Qc(hn,"",NaN,NaN,NaN,NaN,NaN,NaN);Object.freeze(ia);const sn=Object.freeze({recoveryEnabled:!1,maxLookahead:3,dynamicTokensEnabled:!1,outputCst:!0,errorMessageProvider:kr,nodeLocationTracking:"none",traceInitPerf:!1,skipValidations:!1}),sa=Object.freeze({recoveryValueFunc:()=>{},resyncEnabled:!0});var et;(function(t){t[t.INVALID_RULE_NAME=0]="INVALID_RULE_NAME",t[t.DUPLICATE_RULE_NAME=1]="DUPLICATE_RULE_NAME",t[t.INVALID_RULE_OVERRIDE=2]="INVALID_RULE_OVERRIDE",t[t.DUPLICATE_PRODUCTIONS=3]="DUPLICATE_PRODUCTIONS",t[t.UNRESOLVED_SUBRULE_REF=4]="UNRESOLVED_SUBRULE_REF",t[t.LEFT_RECURSION=5]="LEFT_RECURSION",t[t.NONE_LAST_EMPTY_ALT=6]="NONE_LAST_EMPTY_ALT",t[t.AMBIGUOUS_ALTS=7]="AMBIGUOUS_ALTS",t[t.CONFLICT_TOKENS_RULES_NAMESPACE=8]="CONFLICT_TOKENS_RULES_NAMESPACE",t[t.INVALID_TOKEN_NAME=9]="INVALID_TOKEN_NAME",t[t.NO_NON_EMPTY_LOOKAHEAD=10]="NO_NON_EMPTY_LOOKAHEAD",t[t.AMBIGUOUS_PREFIX_ALTS=11]="AMBIGUOUS_PREFIX_ALTS",t[t.TOO_MANY_ALTS=12]="TOO_MANY_ALTS",t[t.CUSTOM_LOOKAHEAD_VALIDATION=13]="CUSTOM_LOOKAHEAD_VALIDATION"})(et||(et={}));function Zl(t=void 0){return function(){return t}}class Hi{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 e;this.selfAnalysisDone=!0;const n=this.className;this.TRACE_INIT("toFastProps",()=>{Yd(this)}),this.TRACE_INIT("Grammar Recording",()=>{try{this.enableRecording(),q(this.definedRulesNames,i=>{const a=this[i].originalGrammarAction;let o;this.TRACE_INIT(`${i} Rule`,()=>{o=this.topLevelRuleRecord(i,a)}),this.gastProductionsCache[i]=o})}finally{this.disableRecording()}});let r=[];if(this.TRACE_INIT("Grammar Resolving",()=>{r=Gg({rules:$e(this.gastProductionsCache)}),this.definitionErrors=this.definitionErrors.concat(r)}),this.TRACE_INIT("Grammar Validations",()=>{if(ae(r)&&this.skipValidations===!1){const i=Ug({rules:$e(this.gastProductionsCache),tokenTypes:$e(this.tokensMap),errMsgProvider:zn,grammarName:n}),s=kg({lookaheadStrategy:this.lookaheadStrategy,rules:$e(this.gastProductionsCache),tokenTypes:$e(this.tokensMap),grammarName:n});this.definitionErrors=this.definitionErrors.concat(i,s)}}),ae(this.definitionErrors)&&(this.recoveryEnabled&&this.TRACE_INIT("computeAllProdsFollows",()=>{const i=Am($e(this.gastProductionsCache));this.resyncFollows=i}),this.TRACE_INIT("ComputeLookaheadFunctions",()=>{var i,s;(s=(i=this.lookaheadStrategy).initialize)===null||s===void 0||s.call(i,{rules:$e(this.gastProductionsCache)}),this.preComputeLookaheadFunctions($e(this.gastProductionsCache))})),!Hi.DEFER_DEFINITION_ERRORS_HANDLING&&!ae(this.definitionErrors))throw e=M(this.definitionErrors,i=>i.message),new Error(`Parser Definition Errors detected:
108
+ ${e.join(`
109
+ -------------------------------
110
+ `)}`)})}constructor(e,n){this.definitionErrors=[],this.selfAnalysisDone=!1;const r=this;if(r.initErrorHandler(n),r.initLexerAdapter(),r.initLooksAhead(n),r.initRecognizerEngine(e,n),r.initRecoverable(n),r.initTreeBuilder(n),r.initContentAssist(),r.initGastRecorder(n),r.initPerformanceTracer(n),z(n,"ignoredIssues"))throw new Error(`The <ignoredIssues> IParserConfig property has been deprecated.
111
+ Please use the <IGNORE_AMBIGUITIES> flag on the relevant DSL method instead.
112
+ See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#IGNORING_AMBIGUITIES
113
+ For further details.`);this.skipValidations=z(n,"skipValidations")?n.skipValidations:sn.skipValidations}}Hi.DEFER_DEFINITION_ERRORS_HANDLING=!1;my(Hi,[Wg,Hg,sy,ay,cy,oy,ly,uy,fy,py]);class gy extends Hi{constructor(e,n=sn){const r=We(n);r.outputCst=!1,super(e,r)}}function wr(t,e,n){return`${t.name}_${e}_${n}`}const pn=1,yy=2,bf=4,_f=5,Yi=7,Ty=8,Ry=9,vy=10,Ey=11,Nf=12;class nl{constructor(e){this.target=e}isEpsilon(){return!1}}class rl extends nl{constructor(e,n){super(e),this.tokenType=n}}class wf extends nl{constructor(e){super(e)}isEpsilon(){return!0}}class il extends nl{constructor(e,n,r){super(e),this.rule=n,this.followState=r}isEpsilon(){return!0}}function Ay(t){const e={decisionMap:{},decisionStates:[],ruleToStartState:new Map,ruleToStopState:new Map,states:[]};Sy(e,t);const n=t.length;for(let r=0;r<n;r++){const i=t[r],s=Zn(e,i,i);s!==void 0&&Oy(e,i,s)}return e}function Sy(t,e){const n=e.length;for(let r=0;r<n;r++){const i=e[r],s=Le(t,i,void 0,{type:yy}),a=Le(t,i,void 0,{type:Yi});s.stop=a,t.ruleToStartState.set(i,s),t.ruleToStopState.set(i,a)}}function If(t,e,n){return n instanceof le?sl(t,e,n.terminalType,n):n instanceof Ze?Ly(t,e,n):n instanceof at?Ny(t,e,n):n instanceof Be?wy(t,e,n):n instanceof Ae?ky(t,e,n):n instanceof st?Cy(t,e,n):n instanceof mt?by(t,e,n):n instanceof gt?_y(t,e,n):Zn(t,e,n)}function ky(t,e,n){const r=Le(t,e,n,{type:_f});gn(t,r);const i=Fr(t,e,r,n,Zn(t,e,n));return $f(t,e,n,i)}function Cy(t,e,n){const r=Le(t,e,n,{type:_f});gn(t,r);const i=Fr(t,e,r,n,Zn(t,e,n)),s=sl(t,e,n.separator,n);return $f(t,e,n,i,s)}function by(t,e,n){const r=Le(t,e,n,{type:bf});gn(t,r);const i=Fr(t,e,r,n,Zn(t,e,n));return Pf(t,e,n,i)}function _y(t,e,n){const r=Le(t,e,n,{type:bf});gn(t,r);const i=Fr(t,e,r,n,Zn(t,e,n)),s=sl(t,e,n.separator,n);return Pf(t,e,n,i,s)}function Ny(t,e,n){const r=Le(t,e,n,{type:pn});gn(t,r);const i=M(n.definition,a=>If(t,e,a));return Fr(t,e,r,n,...i)}function wy(t,e,n){const r=Le(t,e,n,{type:pn});gn(t,r);const i=Fr(t,e,r,n,Zn(t,e,n));return Iy(t,e,n,i)}function Zn(t,e,n){const r=pt(M(n.definition,i=>If(t,e,i)),i=>i!==void 0);return r.length===1?r[0]:r.length===0?void 0:$y(t,r)}function Pf(t,e,n,r,i){const s=r.left,a=r.right,o=Le(t,e,n,{type:Ey});gn(t,o);const c=Le(t,e,n,{type:Nf});return s.loopback=o,c.loopback=o,t.decisionMap[wr(e,i?"RepetitionMandatoryWithSeparator":"RepetitionMandatory",n.idx)]=o,we(a,o),i===void 0?(we(o,s),we(o,c)):(we(o,c),we(o,i.left),we(i.right,s)),{left:s,right:c}}function $f(t,e,n,r,i){const s=r.left,a=r.right,o=Le(t,e,n,{type:vy});gn(t,o);const c=Le(t,e,n,{type:Nf}),l=Le(t,e,n,{type:Ry});return o.loopback=l,c.loopback=l,we(o,s),we(o,c),we(a,l),i!==void 0?(we(l,c),we(l,i.left),we(i.right,s)):we(l,o),t.decisionMap[wr(e,i?"RepetitionWithSeparator":"Repetition",n.idx)]=o,{left:o,right:c}}function Iy(t,e,n,r){const i=r.left,s=r.right;return we(i,s),t.decisionMap[wr(e,"Option",n.idx)]=i,r}function gn(t,e){return t.decisionStates.push(e),e.decision=t.decisionStates.length-1,e.decision}function Fr(t,e,n,r,...i){const s=Le(t,e,r,{type:Ty,start:n});n.end=s;for(const o of i)o!==void 0?(we(n,o.left),we(o.right,s)):we(n,s);const a={left:n,right:s};return t.decisionMap[wr(e,Py(r),r.idx)]=n,a}function Py(t){if(t instanceof at)return"Alternation";if(t instanceof Be)return"Option";if(t instanceof Ae)return"Repetition";if(t instanceof st)return"RepetitionWithSeparator";if(t instanceof mt)return"RepetitionMandatory";if(t instanceof gt)return"RepetitionMandatoryWithSeparator";throw new Error("Invalid production type encountered")}function $y(t,e){const n=e.length;for(let s=0;s<n-1;s++){const a=e[s];let o;a.left.transitions.length===1&&(o=a.left.transitions[0]);const c=o instanceof il,l=o,u=e[s+1].left;a.left.type===pn&&a.right.type===pn&&o!==void 0&&(c&&l.followState===a.right||o.target===a.right)?(c?l.followState=u:o.target=u,xy(t,a.right)):we(a.right,u)}const r=e[0],i=e[n-1];return{left:r.left,right:i.right}}function sl(t,e,n,r){const i=Le(t,e,r,{type:pn}),s=Le(t,e,r,{type:pn});return al(i,new rl(s,n)),{left:i,right:s}}function Ly(t,e,n){const r=n.referencedRule,i=t.ruleToStartState.get(r),s=Le(t,e,n,{type:pn}),a=Le(t,e,n,{type:pn}),o=new il(i,r,a);return al(s,o),{left:s,right:a}}function Oy(t,e,n){const r=t.ruleToStartState.get(e);we(r,n.left);const i=t.ruleToStopState.get(e);return we(n.right,i),{left:r,right:i}}function we(t,e){const n=new wf(e);al(t,n)}function Le(t,e,n,r){const i=Object.assign({atn:t,production:n,epsilonOnlyTransitions:!1,rule:e,transitions:[],nextTokenWithinRule:[],stateNumber:t.states.length},r);return t.states.push(i),i}function al(t,e){t.transitions.length===0&&(t.epsilonOnlyTransitions=e.isEpsilon()),t.transitions.push(e)}function xy(t,e){t.states.splice(t.states.indexOf(e),1)}const aa={};class ko{constructor(){this.map={},this.configs=[]}get size(){return this.configs.length}finalize(){this.map={}}add(e){const n=Lf(e);n in this.map||(this.map[n]=this.configs.length,this.configs.push(e))}get elements(){return this.configs}get alts(){return M(this.configs,e=>e.alt)}get key(){let e="";for(const n in this.map)e+=n+":";return e}}function Lf(t,e=!0){return`${e?`a${t.alt}`:""}s${t.state.stateNumber}:${t.stack.map(n=>n.stateNumber.toString()).join("_")}`}function Dy(t,e){const n={};return r=>{const i=r.toString();let s=n[i];return s!==void 0||(s={atnStartState:t,decision:e,states:{}},n[i]=s),s}}class Of{constructor(){this.predicates=[]}is(e){return e>=this.predicates.length||this.predicates[e]}set(e,n){this.predicates[e]=n}toString(){let e="";const n=this.predicates.length;for(let r=0;r<n;r++)e+=this.predicates[r]===!0?"1":"0";return e}}const eu=new Of;class My extends tl{constructor(e){var n;super(),this.logging=(n=e?.logging)!==null&&n!==void 0?n:(r=>console.log(r))}initialize(e){this.atn=Ay(e.rules),this.dfas=Fy(this.atn)}validateAmbiguousAlternationAlternatives(){return[]}validateEmptyOrAlternatives(){return[]}buildLookaheadForAlternation(e){const{prodOccurrence:n,rule:r,hasPredicates:i,dynamicTokensEnabled:s}=e,a=this.dfas,o=this.logging,c=wr(r,"Alternation",n),u=this.atn.decisionMap[c].decision,f=M(Vl({maxLookahead:1,occurrence:n,prodType:"Alternation",rule:r}),m=>M(m,p=>p[0]));if(tu(f,!1)&&!s){const m=Qe(f,(p,A,N)=>(q(A,I=>{I&&(p[I.tokenTypeIdx]=N,q(I.categoryMatches,C=>{p[C]=N}))}),p),{});return i?function(p){var A;const N=this.LA(1),I=m[N.tokenTypeIdx];if(p!==void 0&&I!==void 0){const C=(A=p[I])===null||A===void 0?void 0:A.GATE;if(C!==void 0&&C.call(this)===!1)return}return I}:function(){const p=this.LA(1);return m[p.tokenTypeIdx]}}else return i?function(m){const p=new Of,A=m===void 0?0:m.length;for(let I=0;I<A;I++){const C=m?.[I].GATE;p.set(I,C===void 0||C.call(this))}const N=ja.call(this,a,u,p,o);return typeof N=="number"?N:void 0}:function(){const m=ja.call(this,a,u,eu,o);return typeof m=="number"?m:void 0}}buildLookaheadForOptional(e){const{prodOccurrence:n,rule:r,prodType:i,dynamicTokensEnabled:s}=e,a=this.dfas,o=this.logging,c=wr(r,i,n),u=this.atn.decisionMap[c].decision,f=M(Vl({maxLookahead:1,occurrence:n,prodType:i,rule:r}),m=>M(m,p=>p[0]));if(tu(f)&&f[0][0]&&!s){const m=f[0],p=Tt(m);if(p.length===1&&ae(p[0].categoryMatches)){const N=p[0].tokenTypeIdx;return function(){return this.LA(1).tokenTypeIdx===N}}else{const A=Qe(p,(N,I)=>(I!==void 0&&(N[I.tokenTypeIdx]=!0,q(I.categoryMatches,C=>{N[C]=!0})),N),{});return function(){const N=this.LA(1);return A[N.tokenTypeIdx]===!0}}}return function(){const m=ja.call(this,a,u,eu,o);return typeof m=="object"?!1:m===0}}}function tu(t,e=!0){const n=new Set;for(const r of t){const i=new Set;for(const s of r){if(s===void 0){if(e)break;return!1}const a=[s.tokenTypeIdx].concat(s.categoryMatches);for(const o of a)if(n.has(o)){if(!i.has(o))return!1}else n.add(o),i.add(o)}}return!0}function Fy(t){const e=t.decisionStates.length,n=Array(e);for(let r=0;r<e;r++)n[r]=Dy(t.decisionStates[r],r);return n}function ja(t,e,n,r){const i=t[e](n);let s=i.start;if(s===void 0){const o=Yy(i.atnStartState);s=Df(i,xf(o)),i.start=s}return Gy.apply(this,[i,s,n,r])}function Gy(t,e,n,r){let i=e,s=1;const a=[];let o=this.LA(s++);for(;;){let c=Wy(i,o);if(c===void 0&&(c=Uy.apply(this,[t,i,o,s,n,r])),c===aa)return By(a,i,o);if(c.isAcceptState===!0)return c.prediction;i=c,a.push(o),o=this.LA(s++)}}function Uy(t,e,n,r,i,s){const a=Vy(e.configs,n,i);if(a.size===0)return nu(t,e,n,aa),aa;let o=xf(a);const c=Hy(a,i);if(c!==void 0)o.isAcceptState=!0,o.prediction=c,o.configs.uniqueAlt=c;else if(Zy(a)){const l=Vh(a.alts);o.isAcceptState=!0,o.prediction=l,o.configs.uniqueAlt=l,qy.apply(this,[t,r,a.alts,s])}return o=nu(t,e,n,o),o}function qy(t,e,n,r){const i=[];for(let l=1;l<=e;l++)i.push(this.LA(l).tokenType);const s=t.atnStartState,a=s.rule,o=s.production,c=jy({topLevelRule:a,ambiguityIndices:n,production:o,prefixPath:i});r(c)}function jy(t){const e=M(t.prefixPath,i=>br(i)).join(", "),n=t.production.idx===0?"":t.production.idx;let r=`Ambiguous Alternatives Detected: <${t.ambiguityIndices.join(", ")}> in <${zy(t.production)}${n}> inside <${t.topLevelRule.name}> Rule,
114
+ <${e}> may appears as a prefix path in all these alternatives.
115
+ `;return r=r+`See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#AMBIGUOUS_ALTERNATIVES
116
+ For Further details.`,r}function zy(t){if(t instanceof Ze)return"SUBRULE";if(t instanceof Be)return"OPTION";if(t instanceof at)return"OR";if(t instanceof mt)return"AT_LEAST_ONE";if(t instanceof gt)return"AT_LEAST_ONE_SEP";if(t instanceof st)return"MANY_SEP";if(t instanceof Ae)return"MANY";if(t instanceof le)return"CONSUME";throw Error("non exhaustive match")}function By(t,e,n){const r=ft(e.configs.elements,s=>s.state.transitions),i=fp(r.filter(s=>s instanceof rl).map(s=>s.tokenType),s=>s.tokenTypeIdx);return{actualToken:n,possibleTokenTypes:i,tokenPath:t}}function Wy(t,e){return t.edges[e.tokenTypeIdx]}function Vy(t,e,n){const r=new ko,i=[];for(const a of t.elements){if(n.is(a.alt)===!1)continue;if(a.state.type===Yi){i.push(a);continue}const o=a.state.transitions.length;for(let c=0;c<o;c++){const l=a.state.transitions[c],u=Ky(l,e);u!==void 0&&r.add({state:u,alt:a.alt,stack:a.stack})}}let s;if(i.length===0&&r.size===1&&(s=r),s===void 0){s=new ko;for(const a of r.elements)oa(a,s)}if(i.length>0&&!Jy(s))for(const a of i)s.add(a);return s}function Ky(t,e){if(t instanceof rl&&of(e,t.tokenType))return t.target}function Hy(t,e){let n;for(const r of t.elements)if(e.is(r.alt)===!0){if(n===void 0)n=r.alt;else if(n!==r.alt)return}return n}function xf(t){return{configs:t,edges:{},isAcceptState:!1,prediction:-1}}function nu(t,e,n,r){return r=Df(t,r),e.edges[n.tokenTypeIdx]=r,r}function Df(t,e){if(e===aa)return e;const n=e.configs.key,r=t.states[n];return r!==void 0?r:(e.configs.finalize(),t.states[n]=e,e)}function Yy(t){const e=new ko,n=t.transitions.length;for(let r=0;r<n;r++){const s={state:t.transitions[r].target,alt:r,stack:[]};oa(s,e)}return e}function oa(t,e){const n=t.state;if(n.type===Yi){if(t.stack.length>0){const i=[...t.stack],a={state:i.pop(),alt:t.alt,stack:i};oa(a,e)}else e.add(t);return}n.epsilonOnlyTransitions||e.add(t);const r=n.transitions.length;for(let i=0;i<r;i++){const s=n.transitions[i],a=Xy(t,s);a!==void 0&&oa(a,e)}}function Xy(t,e){if(e instanceof wf)return{state:e.target,alt:t.alt,stack:t.stack};if(e instanceof il){const n=[...t.stack,e.followState];return{state:e.target,alt:t.alt,stack:n}}}function Jy(t){for(const e of t.elements)if(e.state.type===Yi)return!0;return!1}function Qy(t){for(const e of t.elements)if(e.state.type!==Yi)return!1;return!0}function Zy(t){if(Qy(t))return!0;const e=eT(t.elements);return tT(e)&&!nT(e)}function eT(t){const e=new Map;for(const n of t){const r=Lf(n,!1);let i=e.get(r);i===void 0&&(i={},e.set(r,i)),i[n.alt]=!0}return e}function tT(t){for(const e of Array.from(t.values()))if(Object.keys(e).length>1)return!0;return!1}function nT(t){for(const e of Array.from(t.values()))if(Object.keys(e).length===1)return!0;return!1}var Co;(function(t){function e(n){return typeof n=="string"}t.is=e})(Co||(Co={}));var ca;(function(t){function e(n){return typeof n=="string"}t.is=e})(ca||(ca={}));var bo;(function(t){t.MIN_VALUE=-2147483648,t.MAX_VALUE=2147483647;function e(n){return typeof n=="number"&&t.MIN_VALUE<=n&&n<=t.MAX_VALUE}t.is=e})(bo||(bo={}));var Pi;(function(t){t.MIN_VALUE=0,t.MAX_VALUE=2147483647;function e(n){return typeof n=="number"&&t.MIN_VALUE<=n&&n<=t.MAX_VALUE}t.is=e})(Pi||(Pi={}));var te;(function(t){function e(r,i){return r===Number.MAX_VALUE&&(r=Pi.MAX_VALUE),i===Number.MAX_VALUE&&(i=Pi.MAX_VALUE),{line:r,character:i}}t.create=e;function n(r){let i=r;return v.objectLiteral(i)&&v.uinteger(i.line)&&v.uinteger(i.character)}t.is=n})(te||(te={}));var X;(function(t){function e(r,i,s,a){if(v.uinteger(r)&&v.uinteger(i)&&v.uinteger(s)&&v.uinteger(a))return{start:te.create(r,i),end:te.create(s,a)};if(te.is(r)&&te.is(i))return{start:r,end:i};throw new Error(`Range#create called with invalid arguments[${r}, ${i}, ${s}, ${a}]`)}t.create=e;function n(r){let i=r;return v.objectLiteral(i)&&te.is(i.start)&&te.is(i.end)}t.is=n})(X||(X={}));var $i;(function(t){function e(r,i){return{uri:r,range:i}}t.create=e;function n(r){let i=r;return v.objectLiteral(i)&&X.is(i.range)&&(v.string(i.uri)||v.undefined(i.uri))}t.is=n})($i||($i={}));var _o;(function(t){function e(r,i,s,a){return{targetUri:r,targetRange:i,targetSelectionRange:s,originSelectionRange:a}}t.create=e;function n(r){let i=r;return v.objectLiteral(i)&&X.is(i.targetRange)&&v.string(i.targetUri)&&X.is(i.targetSelectionRange)&&(X.is(i.originSelectionRange)||v.undefined(i.originSelectionRange))}t.is=n})(_o||(_o={}));var la;(function(t){function e(r,i,s,a){return{red:r,green:i,blue:s,alpha:a}}t.create=e;function n(r){const i=r;return v.objectLiteral(i)&&v.numberRange(i.red,0,1)&&v.numberRange(i.green,0,1)&&v.numberRange(i.blue,0,1)&&v.numberRange(i.alpha,0,1)}t.is=n})(la||(la={}));var No;(function(t){function e(r,i){return{range:r,color:i}}t.create=e;function n(r){const i=r;return v.objectLiteral(i)&&X.is(i.range)&&la.is(i.color)}t.is=n})(No||(No={}));var wo;(function(t){function e(r,i,s){return{label:r,textEdit:i,additionalTextEdits:s}}t.create=e;function n(r){const i=r;return v.objectLiteral(i)&&v.string(i.label)&&(v.undefined(i.textEdit)||xt.is(i))&&(v.undefined(i.additionalTextEdits)||v.typedArray(i.additionalTextEdits,xt.is))}t.is=n})(wo||(wo={}));var Io;(function(t){t.Comment="comment",t.Imports="imports",t.Region="region"})(Io||(Io={}));var Po;(function(t){function e(r,i,s,a,o,c){const l={startLine:r,endLine:i};return v.defined(s)&&(l.startCharacter=s),v.defined(a)&&(l.endCharacter=a),v.defined(o)&&(l.kind=o),v.defined(c)&&(l.collapsedText=c),l}t.create=e;function n(r){const i=r;return v.objectLiteral(i)&&v.uinteger(i.startLine)&&v.uinteger(i.startLine)&&(v.undefined(i.startCharacter)||v.uinteger(i.startCharacter))&&(v.undefined(i.endCharacter)||v.uinteger(i.endCharacter))&&(v.undefined(i.kind)||v.string(i.kind))}t.is=n})(Po||(Po={}));var ua;(function(t){function e(r,i){return{location:r,message:i}}t.create=e;function n(r){let i=r;return v.defined(i)&&$i.is(i.location)&&v.string(i.message)}t.is=n})(ua||(ua={}));var $o;(function(t){t.Error=1,t.Warning=2,t.Information=3,t.Hint=4})($o||($o={}));var Lo;(function(t){t.Unnecessary=1,t.Deprecated=2})(Lo||(Lo={}));var Oo;(function(t){function e(n){const r=n;return v.objectLiteral(r)&&v.string(r.href)}t.is=e})(Oo||(Oo={}));var Li;(function(t){function e(r,i,s,a,o,c){let l={range:r,message:i};return v.defined(s)&&(l.severity=s),v.defined(a)&&(l.code=a),v.defined(o)&&(l.source=o),v.defined(c)&&(l.relatedInformation=c),l}t.create=e;function n(r){var i;let s=r;return v.defined(s)&&X.is(s.range)&&v.string(s.message)&&(v.number(s.severity)||v.undefined(s.severity))&&(v.integer(s.code)||v.string(s.code)||v.undefined(s.code))&&(v.undefined(s.codeDescription)||v.string((i=s.codeDescription)===null||i===void 0?void 0:i.href))&&(v.string(s.source)||v.undefined(s.source))&&(v.undefined(s.relatedInformation)||v.typedArray(s.relatedInformation,ua.is))}t.is=n})(Li||(Li={}));var Xn;(function(t){function e(r,i,...s){let a={title:r,command:i};return v.defined(s)&&s.length>0&&(a.arguments=s),a}t.create=e;function n(r){let i=r;return v.defined(i)&&v.string(i.title)&&v.string(i.command)}t.is=n})(Xn||(Xn={}));var xt;(function(t){function e(s,a){return{range:s,newText:a}}t.replace=e;function n(s,a){return{range:{start:s,end:s},newText:a}}t.insert=n;function r(s){return{range:s,newText:""}}t.del=r;function i(s){const a=s;return v.objectLiteral(a)&&v.string(a.newText)&&X.is(a.range)}t.is=i})(xt||(xt={}));var Bn;(function(t){function e(r,i,s){const a={label:r};return i!==void 0&&(a.needsConfirmation=i),s!==void 0&&(a.description=s),a}t.create=e;function n(r){const i=r;return v.objectLiteral(i)&&v.string(i.label)&&(v.boolean(i.needsConfirmation)||i.needsConfirmation===void 0)&&(v.string(i.description)||i.description===void 0)}t.is=n})(Bn||(Bn={}));var je;(function(t){function e(n){const r=n;return v.string(r)}t.is=e})(je||(je={}));var Qt;(function(t){function e(s,a,o){return{range:s,newText:a,annotationId:o}}t.replace=e;function n(s,a,o){return{range:{start:s,end:s},newText:a,annotationId:o}}t.insert=n;function r(s,a){return{range:s,newText:"",annotationId:a}}t.del=r;function i(s){const a=s;return xt.is(a)&&(Bn.is(a.annotationId)||je.is(a.annotationId))}t.is=i})(Qt||(Qt={}));var Oi;(function(t){function e(r,i){return{textDocument:r,edits:i}}t.create=e;function n(r){let i=r;return v.defined(i)&&xi.is(i.textDocument)&&Array.isArray(i.edits)}t.is=n})(Oi||(Oi={}));var Ir;(function(t){function e(r,i,s){let a={kind:"create",uri:r};return i!==void 0&&(i.overwrite!==void 0||i.ignoreIfExists!==void 0)&&(a.options=i),s!==void 0&&(a.annotationId=s),a}t.create=e;function n(r){let i=r;return i&&i.kind==="create"&&v.string(i.uri)&&(i.options===void 0||(i.options.overwrite===void 0||v.boolean(i.options.overwrite))&&(i.options.ignoreIfExists===void 0||v.boolean(i.options.ignoreIfExists)))&&(i.annotationId===void 0||je.is(i.annotationId))}t.is=n})(Ir||(Ir={}));var Pr;(function(t){function e(r,i,s,a){let o={kind:"rename",oldUri:r,newUri:i};return s!==void 0&&(s.overwrite!==void 0||s.ignoreIfExists!==void 0)&&(o.options=s),a!==void 0&&(o.annotationId=a),o}t.create=e;function n(r){let i=r;return i&&i.kind==="rename"&&v.string(i.oldUri)&&v.string(i.newUri)&&(i.options===void 0||(i.options.overwrite===void 0||v.boolean(i.options.overwrite))&&(i.options.ignoreIfExists===void 0||v.boolean(i.options.ignoreIfExists)))&&(i.annotationId===void 0||je.is(i.annotationId))}t.is=n})(Pr||(Pr={}));var $r;(function(t){function e(r,i,s){let a={kind:"delete",uri:r};return i!==void 0&&(i.recursive!==void 0||i.ignoreIfNotExists!==void 0)&&(a.options=i),s!==void 0&&(a.annotationId=s),a}t.create=e;function n(r){let i=r;return i&&i.kind==="delete"&&v.string(i.uri)&&(i.options===void 0||(i.options.recursive===void 0||v.boolean(i.options.recursive))&&(i.options.ignoreIfNotExists===void 0||v.boolean(i.options.ignoreIfNotExists)))&&(i.annotationId===void 0||je.is(i.annotationId))}t.is=n})($r||($r={}));var da;(function(t){function e(n){let r=n;return r&&(r.changes!==void 0||r.documentChanges!==void 0)&&(r.documentChanges===void 0||r.documentChanges.every(i=>v.string(i.kind)?Ir.is(i)||Pr.is(i)||$r.is(i):Oi.is(i)))}t.is=e})(da||(da={}));class Ss{constructor(e,n){this.edits=e,this.changeAnnotations=n}insert(e,n,r){let i,s;if(r===void 0?i=xt.insert(e,n):je.is(r)?(s=r,i=Qt.insert(e,n,r)):(this.assertChangeAnnotations(this.changeAnnotations),s=this.changeAnnotations.manage(r),i=Qt.insert(e,n,s)),this.edits.push(i),s!==void 0)return s}replace(e,n,r){let i,s;if(r===void 0?i=xt.replace(e,n):je.is(r)?(s=r,i=Qt.replace(e,n,r)):(this.assertChangeAnnotations(this.changeAnnotations),s=this.changeAnnotations.manage(r),i=Qt.replace(e,n,s)),this.edits.push(i),s!==void 0)return s}delete(e,n){let r,i;if(n===void 0?r=xt.del(e):je.is(n)?(i=n,r=Qt.del(e,n)):(this.assertChangeAnnotations(this.changeAnnotations),i=this.changeAnnotations.manage(n),r=Qt.del(e,i)),this.edits.push(r),i!==void 0)return i}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 new Error("Text edit change is not configured to manage change annotations.")}}class ru{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,n){let r;if(je.is(e)?r=e:(r=this.nextId(),n=e),this._annotations[r]!==void 0)throw new Error(`Id ${r} is already in use.`);if(n===void 0)throw new Error(`No annotation provided for id ${r}`);return this._annotations[r]=n,this._size++,r}nextId(){return this._counter++,this._counter.toString()}}class rT{constructor(e){this._textEditChanges=Object.create(null),e!==void 0?(this._workspaceEdit=e,e.documentChanges?(this._changeAnnotations=new ru(e.changeAnnotations),e.changeAnnotations=this._changeAnnotations.all(),e.documentChanges.forEach(n=>{if(Oi.is(n)){const r=new Ss(n.edits,this._changeAnnotations);this._textEditChanges[n.textDocument.uri]=r}})):e.changes&&Object.keys(e.changes).forEach(n=>{const r=new Ss(e.changes[n]);this._textEditChanges[n]=r})):this._workspaceEdit={}}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(xi.is(e)){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");const n={uri:e.uri,version:e.version};let r=this._textEditChanges[n.uri];if(!r){const i=[],s={textDocument:n,edits:i};this._workspaceEdit.documentChanges.push(s),r=new Ss(i,this._changeAnnotations),this._textEditChanges[n.uri]=r}return r}else{if(this.initChanges(),this._workspaceEdit.changes===void 0)throw new Error("Workspace edit is not configured for normal text edit changes.");let n=this._textEditChanges[e];if(!n){let r=[];this._workspaceEdit.changes[e]=r,n=new Ss(r),this._textEditChanges[e]=n}return n}}initDocumentChanges(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._changeAnnotations=new ru,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,n,r){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let i;Bn.is(n)||je.is(n)?i=n:r=n;let s,a;if(i===void 0?s=Ir.create(e,r):(a=je.is(i)?i:this._changeAnnotations.manage(i),s=Ir.create(e,r,a)),this._workspaceEdit.documentChanges.push(s),a!==void 0)return a}renameFile(e,n,r,i){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let s;Bn.is(r)||je.is(r)?s=r:i=r;let a,o;if(s===void 0?a=Pr.create(e,n,i):(o=je.is(s)?s:this._changeAnnotations.manage(s),a=Pr.create(e,n,i,o)),this._workspaceEdit.documentChanges.push(a),o!==void 0)return o}deleteFile(e,n,r){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let i;Bn.is(n)||je.is(n)?i=n:r=n;let s,a;if(i===void 0?s=$r.create(e,r):(a=je.is(i)?i:this._changeAnnotations.manage(i),s=$r.create(e,r,a)),this._workspaceEdit.documentChanges.push(s),a!==void 0)return a}}var xo;(function(t){function e(r){return{uri:r}}t.create=e;function n(r){let i=r;return v.defined(i)&&v.string(i.uri)}t.is=n})(xo||(xo={}));var Do;(function(t){function e(r,i){return{uri:r,version:i}}t.create=e;function n(r){let i=r;return v.defined(i)&&v.string(i.uri)&&v.integer(i.version)}t.is=n})(Do||(Do={}));var xi;(function(t){function e(r,i){return{uri:r,version:i}}t.create=e;function n(r){let i=r;return v.defined(i)&&v.string(i.uri)&&(i.version===null||v.integer(i.version))}t.is=n})(xi||(xi={}));var Mo;(function(t){function e(r,i,s,a){return{uri:r,languageId:i,version:s,text:a}}t.create=e;function n(r){let i=r;return v.defined(i)&&v.string(i.uri)&&v.string(i.languageId)&&v.integer(i.version)&&v.string(i.text)}t.is=n})(Mo||(Mo={}));var fa;(function(t){t.PlainText="plaintext",t.Markdown="markdown";function e(n){const r=n;return r===t.PlainText||r===t.Markdown}t.is=e})(fa||(fa={}));var Lr;(function(t){function e(n){const r=n;return v.objectLiteral(n)&&fa.is(r.kind)&&v.string(r.value)}t.is=e})(Lr||(Lr={}));var Fo;(function(t){t.Text=1,t.Method=2,t.Function=3,t.Constructor=4,t.Field=5,t.Variable=6,t.Class=7,t.Interface=8,t.Module=9,t.Property=10,t.Unit=11,t.Value=12,t.Enum=13,t.Keyword=14,t.Snippet=15,t.Color=16,t.File=17,t.Reference=18,t.Folder=19,t.EnumMember=20,t.Constant=21,t.Struct=22,t.Event=23,t.Operator=24,t.TypeParameter=25})(Fo||(Fo={}));var Go;(function(t){t.PlainText=1,t.Snippet=2})(Go||(Go={}));var Uo;(function(t){t.Deprecated=1})(Uo||(Uo={}));var qo;(function(t){function e(r,i,s){return{newText:r,insert:i,replace:s}}t.create=e;function n(r){const i=r;return i&&v.string(i.newText)&&X.is(i.insert)&&X.is(i.replace)}t.is=n})(qo||(qo={}));var jo;(function(t){t.asIs=1,t.adjustIndentation=2})(jo||(jo={}));var zo;(function(t){function e(n){const r=n;return r&&(v.string(r.detail)||r.detail===void 0)&&(v.string(r.description)||r.description===void 0)}t.is=e})(zo||(zo={}));var Bo;(function(t){function e(n){return{label:n}}t.create=e})(Bo||(Bo={}));var Wo;(function(t){function e(n,r){return{items:n||[],isIncomplete:!!r}}t.create=e})(Wo||(Wo={}));var Di;(function(t){function e(r){return r.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}t.fromPlainText=e;function n(r){const i=r;return v.string(i)||v.objectLiteral(i)&&v.string(i.language)&&v.string(i.value)}t.is=n})(Di||(Di={}));var Vo;(function(t){function e(n){let r=n;return!!r&&v.objectLiteral(r)&&(Lr.is(r.contents)||Di.is(r.contents)||v.typedArray(r.contents,Di.is))&&(n.range===void 0||X.is(n.range))}t.is=e})(Vo||(Vo={}));var Ko;(function(t){function e(n,r){return r?{label:n,documentation:r}:{label:n}}t.create=e})(Ko||(Ko={}));var Ho;(function(t){function e(n,r,...i){let s={label:n};return v.defined(r)&&(s.documentation=r),v.defined(i)?s.parameters=i:s.parameters=[],s}t.create=e})(Ho||(Ho={}));var Yo;(function(t){t.Text=1,t.Read=2,t.Write=3})(Yo||(Yo={}));var Xo;(function(t){function e(n,r){let i={range:n};return v.number(r)&&(i.kind=r),i}t.create=e})(Xo||(Xo={}));var Jo;(function(t){t.File=1,t.Module=2,t.Namespace=3,t.Package=4,t.Class=5,t.Method=6,t.Property=7,t.Field=8,t.Constructor=9,t.Enum=10,t.Interface=11,t.Function=12,t.Variable=13,t.Constant=14,t.String=15,t.Number=16,t.Boolean=17,t.Array=18,t.Object=19,t.Key=20,t.Null=21,t.EnumMember=22,t.Struct=23,t.Event=24,t.Operator=25,t.TypeParameter=26})(Jo||(Jo={}));var Qo;(function(t){t.Deprecated=1})(Qo||(Qo={}));var Zo;(function(t){function e(n,r,i,s,a){let o={name:n,kind:r,location:{uri:s,range:i}};return a&&(o.containerName=a),o}t.create=e})(Zo||(Zo={}));var ec;(function(t){function e(n,r,i,s){return s!==void 0?{name:n,kind:r,location:{uri:i,range:s}}:{name:n,kind:r,location:{uri:i}}}t.create=e})(ec||(ec={}));var tc;(function(t){function e(r,i,s,a,o,c){let l={name:r,detail:i,kind:s,range:a,selectionRange:o};return c!==void 0&&(l.children=c),l}t.create=e;function n(r){let i=r;return i&&v.string(i.name)&&v.number(i.kind)&&X.is(i.range)&&X.is(i.selectionRange)&&(i.detail===void 0||v.string(i.detail))&&(i.deprecated===void 0||v.boolean(i.deprecated))&&(i.children===void 0||Array.isArray(i.children))&&(i.tags===void 0||Array.isArray(i.tags))}t.is=n})(tc||(tc={}));var nc;(function(t){t.Empty="",t.QuickFix="quickfix",t.Refactor="refactor",t.RefactorExtract="refactor.extract",t.RefactorInline="refactor.inline",t.RefactorRewrite="refactor.rewrite",t.Source="source",t.SourceOrganizeImports="source.organizeImports",t.SourceFixAll="source.fixAll"})(nc||(nc={}));var Mi;(function(t){t.Invoked=1,t.Automatic=2})(Mi||(Mi={}));var rc;(function(t){function e(r,i,s){let a={diagnostics:r};return i!=null&&(a.only=i),s!=null&&(a.triggerKind=s),a}t.create=e;function n(r){let i=r;return v.defined(i)&&v.typedArray(i.diagnostics,Li.is)&&(i.only===void 0||v.typedArray(i.only,v.string))&&(i.triggerKind===void 0||i.triggerKind===Mi.Invoked||i.triggerKind===Mi.Automatic)}t.is=n})(rc||(rc={}));var ic;(function(t){function e(r,i,s){let a={title:r},o=!0;return typeof i=="string"?(o=!1,a.kind=i):Xn.is(i)?a.command=i:a.edit=i,o&&s!==void 0&&(a.kind=s),a}t.create=e;function n(r){let i=r;return i&&v.string(i.title)&&(i.diagnostics===void 0||v.typedArray(i.diagnostics,Li.is))&&(i.kind===void 0||v.string(i.kind))&&(i.edit!==void 0||i.command!==void 0)&&(i.command===void 0||Xn.is(i.command))&&(i.isPreferred===void 0||v.boolean(i.isPreferred))&&(i.edit===void 0||da.is(i.edit))}t.is=n})(ic||(ic={}));var sc;(function(t){function e(r,i){let s={range:r};return v.defined(i)&&(s.data=i),s}t.create=e;function n(r){let i=r;return v.defined(i)&&X.is(i.range)&&(v.undefined(i.command)||Xn.is(i.command))}t.is=n})(sc||(sc={}));var ac;(function(t){function e(r,i){return{tabSize:r,insertSpaces:i}}t.create=e;function n(r){let i=r;return v.defined(i)&&v.uinteger(i.tabSize)&&v.boolean(i.insertSpaces)}t.is=n})(ac||(ac={}));var oc;(function(t){function e(r,i,s){return{range:r,target:i,data:s}}t.create=e;function n(r){let i=r;return v.defined(i)&&X.is(i.range)&&(v.undefined(i.target)||v.string(i.target))}t.is=n})(oc||(oc={}));var cc;(function(t){function e(r,i){return{range:r,parent:i}}t.create=e;function n(r){let i=r;return v.objectLiteral(i)&&X.is(i.range)&&(i.parent===void 0||t.is(i.parent))}t.is=n})(cc||(cc={}));var lc;(function(t){t.namespace="namespace",t.type="type",t.class="class",t.enum="enum",t.interface="interface",t.struct="struct",t.typeParameter="typeParameter",t.parameter="parameter",t.variable="variable",t.property="property",t.enumMember="enumMember",t.event="event",t.function="function",t.method="method",t.macro="macro",t.keyword="keyword",t.modifier="modifier",t.comment="comment",t.string="string",t.number="number",t.regexp="regexp",t.operator="operator",t.decorator="decorator"})(lc||(lc={}));var uc;(function(t){t.declaration="declaration",t.definition="definition",t.readonly="readonly",t.static="static",t.deprecated="deprecated",t.abstract="abstract",t.async="async",t.modification="modification",t.documentation="documentation",t.defaultLibrary="defaultLibrary"})(uc||(uc={}));var dc;(function(t){function e(n){const r=n;return v.objectLiteral(r)&&(r.resultId===void 0||typeof r.resultId=="string")&&Array.isArray(r.data)&&(r.data.length===0||typeof r.data[0]=="number")}t.is=e})(dc||(dc={}));var fc;(function(t){function e(r,i){return{range:r,text:i}}t.create=e;function n(r){const i=r;return i!=null&&X.is(i.range)&&v.string(i.text)}t.is=n})(fc||(fc={}));var hc;(function(t){function e(r,i,s){return{range:r,variableName:i,caseSensitiveLookup:s}}t.create=e;function n(r){const i=r;return i!=null&&X.is(i.range)&&v.boolean(i.caseSensitiveLookup)&&(v.string(i.variableName)||i.variableName===void 0)}t.is=n})(hc||(hc={}));var pc;(function(t){function e(r,i){return{range:r,expression:i}}t.create=e;function n(r){const i=r;return i!=null&&X.is(i.range)&&(v.string(i.expression)||i.expression===void 0)}t.is=n})(pc||(pc={}));var mc;(function(t){function e(r,i){return{frameId:r,stoppedLocation:i}}t.create=e;function n(r){const i=r;return v.defined(i)&&X.is(r.stoppedLocation)}t.is=n})(mc||(mc={}));var ha;(function(t){t.Type=1,t.Parameter=2;function e(n){return n===1||n===2}t.is=e})(ha||(ha={}));var pa;(function(t){function e(r){return{value:r}}t.create=e;function n(r){const i=r;return v.objectLiteral(i)&&(i.tooltip===void 0||v.string(i.tooltip)||Lr.is(i.tooltip))&&(i.location===void 0||$i.is(i.location))&&(i.command===void 0||Xn.is(i.command))}t.is=n})(pa||(pa={}));var gc;(function(t){function e(r,i,s){const a={position:r,label:i};return s!==void 0&&(a.kind=s),a}t.create=e;function n(r){const i=r;return v.objectLiteral(i)&&te.is(i.position)&&(v.string(i.label)||v.typedArray(i.label,pa.is))&&(i.kind===void 0||ha.is(i.kind))&&i.textEdits===void 0||v.typedArray(i.textEdits,xt.is)&&(i.tooltip===void 0||v.string(i.tooltip)||Lr.is(i.tooltip))&&(i.paddingLeft===void 0||v.boolean(i.paddingLeft))&&(i.paddingRight===void 0||v.boolean(i.paddingRight))}t.is=n})(gc||(gc={}));var yc;(function(t){function e(n){return{kind:"snippet",value:n}}t.createSnippet=e})(yc||(yc={}));var Tc;(function(t){function e(n,r,i,s){return{insertText:n,filterText:r,range:i,command:s}}t.create=e})(Tc||(Tc={}));var Rc;(function(t){function e(n){return{items:n}}t.create=e})(Rc||(Rc={}));var vc;(function(t){t.Invoked=0,t.Automatic=1})(vc||(vc={}));var Ec;(function(t){function e(n,r){return{range:n,text:r}}t.create=e})(Ec||(Ec={}));var Ac;(function(t){function e(n,r){return{triggerKind:n,selectedCompletionInfo:r}}t.create=e})(Ac||(Ac={}));var Sc;(function(t){function e(n){const r=n;return v.objectLiteral(r)&&ca.is(r.uri)&&v.string(r.name)}t.is=e})(Sc||(Sc={}));const iT=[`
117
+ `,`\r
118
+ `,"\r"];var kc;(function(t){function e(s,a,o,c){return new sT(s,a,o,c)}t.create=e;function n(s){let a=s;return!!(v.defined(a)&&v.string(a.uri)&&(v.undefined(a.languageId)||v.string(a.languageId))&&v.uinteger(a.lineCount)&&v.func(a.getText)&&v.func(a.positionAt)&&v.func(a.offsetAt))}t.is=n;function r(s,a){let o=s.getText(),c=i(a,(u,f)=>{let m=u.range.start.line-f.range.start.line;return m===0?u.range.start.character-f.range.start.character:m}),l=o.length;for(let u=c.length-1;u>=0;u--){let f=c[u],m=s.offsetAt(f.range.start),p=s.offsetAt(f.range.end);if(p<=l)o=o.substring(0,m)+f.newText+o.substring(p,o.length);else throw new Error("Overlapping edit");l=m}return o}t.applyEdits=r;function i(s,a){if(s.length<=1)return s;const o=s.length/2|0,c=s.slice(0,o),l=s.slice(o);i(c,a),i(l,a);let u=0,f=0,m=0;for(;u<c.length&&f<l.length;)a(c[u],l[f])<=0?s[m++]=c[u++]:s[m++]=l[f++];for(;u<c.length;)s[m++]=c[u++];for(;f<l.length;)s[m++]=l[f++];return s}})(kc||(kc={}));let sT=class{constructor(e,n,r,i){this._uri=e,this._languageId=n,this._version=r,this._content=i,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(e){if(e){let n=this.offsetAt(e.start),r=this.offsetAt(e.end);return this._content.substring(n,r)}return this._content}update(e,n){this._content=e.text,this._version=n,this._lineOffsets=void 0}getLineOffsets(){if(this._lineOffsets===void 0){let e=[],n=this._content,r=!0;for(let i=0;i<n.length;i++){r&&(e.push(i),r=!1);let s=n.charAt(i);r=s==="\r"||s===`
119
+ `,s==="\r"&&i+1<n.length&&n.charAt(i+1)===`
120
+ `&&i++}r&&n.length>0&&e.push(n.length),this._lineOffsets=e}return this._lineOffsets}positionAt(e){e=Math.max(Math.min(e,this._content.length),0);let n=this.getLineOffsets(),r=0,i=n.length;if(i===0)return te.create(0,e);for(;r<i;){let a=Math.floor((r+i)/2);n[a]>e?i=a:r=a+1}let s=r-1;return te.create(s,e-n[s])}offsetAt(e){let n=this.getLineOffsets();if(e.line>=n.length)return this._content.length;if(e.line<0)return 0;let r=n[e.line],i=e.line+1<n.length?n[e.line+1]:this._content.length;return Math.max(Math.min(r+e.character,i),r)}get lineCount(){return this.getLineOffsets().length}};var v;(function(t){const e=Object.prototype.toString;function n(p){return typeof p<"u"}t.defined=n;function r(p){return typeof p>"u"}t.undefined=r;function i(p){return p===!0||p===!1}t.boolean=i;function s(p){return e.call(p)==="[object String]"}t.string=s;function a(p){return e.call(p)==="[object Number]"}t.number=a;function o(p,A,N){return e.call(p)==="[object Number]"&&A<=p&&p<=N}t.numberRange=o;function c(p){return e.call(p)==="[object Number]"&&-2147483648<=p&&p<=2147483647}t.integer=c;function l(p){return e.call(p)==="[object Number]"&&0<=p&&p<=2147483647}t.uinteger=l;function u(p){return e.call(p)==="[object Function]"}t.func=u;function f(p){return p!==null&&typeof p=="object"}t.objectLiteral=f;function m(p,A){return Array.isArray(p)&&p.every(A)}t.typedArray=m})(v||(v={}));const aT=Object.freeze(Object.defineProperty({__proto__:null,get AnnotatedTextEdit(){return Qt},get ChangeAnnotation(){return Bn},get ChangeAnnotationIdentifier(){return je},get CodeAction(){return ic},get CodeActionContext(){return rc},get CodeActionKind(){return nc},get CodeActionTriggerKind(){return Mi},get CodeDescription(){return Oo},get CodeLens(){return sc},get Color(){return la},get ColorInformation(){return No},get ColorPresentation(){return wo},get Command(){return Xn},get CompletionItem(){return Bo},get CompletionItemKind(){return Fo},get CompletionItemLabelDetails(){return zo},get CompletionItemTag(){return Uo},get CompletionList(){return Wo},get CreateFile(){return Ir},get DeleteFile(){return $r},get Diagnostic(){return Li},get DiagnosticRelatedInformation(){return ua},get DiagnosticSeverity(){return $o},get DiagnosticTag(){return Lo},get DocumentHighlight(){return Xo},get DocumentHighlightKind(){return Yo},get DocumentLink(){return oc},get DocumentSymbol(){return tc},get DocumentUri(){return Co},EOL:iT,get FoldingRange(){return Po},get FoldingRangeKind(){return Io},get FormattingOptions(){return ac},get Hover(){return Vo},get InlayHint(){return gc},get InlayHintKind(){return ha},get InlayHintLabelPart(){return pa},get InlineCompletionContext(){return Ac},get InlineCompletionItem(){return Tc},get InlineCompletionList(){return Rc},get InlineCompletionTriggerKind(){return vc},get InlineValueContext(){return mc},get InlineValueEvaluatableExpression(){return pc},get InlineValueText(){return fc},get InlineValueVariableLookup(){return hc},get InsertReplaceEdit(){return qo},get InsertTextFormat(){return Go},get InsertTextMode(){return jo},get Location(){return $i},get LocationLink(){return _o},get MarkedString(){return Di},get MarkupContent(){return Lr},get MarkupKind(){return fa},get OptionalVersionedTextDocumentIdentifier(){return xi},get ParameterInformation(){return Ko},get Position(){return te},get Range(){return X},get RenameFile(){return Pr},get SelectedCompletionInfo(){return Ec},get SelectionRange(){return cc},get SemanticTokenModifiers(){return uc},get SemanticTokenTypes(){return lc},get SemanticTokens(){return dc},get SignatureInformation(){return Ho},get StringValue(){return yc},get SymbolInformation(){return Zo},get SymbolKind(){return Jo},get SymbolTag(){return Qo},get TextDocument(){return kc},get TextDocumentEdit(){return Oi},get TextDocumentIdentifier(){return xo},get TextDocumentItem(){return Mo},get TextEdit(){return xt},get URI(){return ca},get VersionedTextDocumentIdentifier(){return Do},WorkspaceChange:rT,get WorkspaceEdit(){return da},get WorkspaceFolder(){return Sc},get WorkspaceSymbol(){return ec},get integer(){return bo},get uinteger(){return Pi}},Symbol.toStringTag,{value:"Module"}));class oT{constructor(){this.nodeStack=[]}get current(){return this.nodeStack[this.nodeStack.length-1]??this.rootNode}buildRootNode(e){return this.rootNode=new Ff(e),this.rootNode.root=this.rootNode,this.nodeStack=[this.rootNode],this.rootNode}buildCompositeNode(e){const n=new ol;return n.grammarSource=e,n.root=this.rootNode,this.current.content.push(n),this.nodeStack.push(n),n}buildLeafNode(e,n){const r=new Cc(e.startOffset,e.image.length,ho(e),e.tokenType,!n);return r.grammarSource=n,r.root=this.rootNode,this.current.content.push(r),r}removeNode(e){const n=e.container;if(n){const r=n.content.indexOf(e);r>=0&&n.content.splice(r,1)}}addHiddenNodes(e){const n=[];for(const s of e){const a=new Cc(s.startOffset,s.image.length,ho(s),s.tokenType,!0);a.root=this.rootNode,n.push(a)}let r=this.current,i=!1;if(r.content.length>0){r.content.push(...n);return}for(;r.container;){const s=r.container.content.indexOf(r);if(s>0){r.container.content.splice(s,0,...n),i=!0;break}r=r.container}i||this.rootNode.content.unshift(...n)}construct(e){const n=this.current;typeof e.$type=="string"&&!e.$infixName&&(this.current.astNode=e),e.$cstNode=n;const r=this.nodeStack.pop();r?.content.length===0&&this.removeNode(r)}}class Mf{get hidden(){return!1}get astNode(){const e=typeof this._astNode?.$type=="string"?this._astNode:this.container?.astNode;if(!e)throw new 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)}}class Cc extends Mf{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,n,r,i,s=!1){super(),this._hidden=s,this._offset=e,this._tokenType=i,this._length=n,this._range=r}}class ol extends Mf{constructor(){super(...arguments),this.content=new cl(this)}get offset(){return this.firstNonHiddenNode?.offset??0}get length(){return this.end-this.offset}get end(){return this.lastNonHiddenNode?.end??0}get range(){const e=this.firstNonHiddenNode,n=this.lastNonHiddenNode;if(e&&n){if(this._rangeCache===void 0){const{range:r}=e,{range:i}=n;this._rangeCache={start:r.start,end:i.end.line<r.start.line?r.start:i.end}}return this._rangeCache}else return{start:te.create(0,0),end:te.create(0,0)}}get firstNonHiddenNode(){for(const 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--){const n=this.content[e];if(!n.hidden)return n}return this.content[this.content.length-1]}}class cl extends Array{constructor(e){super(),this.parent=e,Object.setPrototypeOf(this,cl.prototype)}push(...e){return this.addParents(e),super.push(...e)}unshift(...e){return this.addParents(e),super.unshift(...e)}splice(e,n,...r){return this.addParents(r),super.splice(e,n,...r)}addParents(e){for(const n of e)n.container=this.parent}}class Ff extends ol{get text(){return this._text.substring(this.offset,this.end)}get fullText(){return this._text}constructor(e){super(),this._text="",this._text=e??""}}const bc=Symbol("Datatype");function za(t){return t.$type===bc}const iu="​",Gf=t=>t.endsWith(iu)?t:t+iu;class Uf{constructor(e){this._unorderedGroups=new Map,this.allRules=new Map,this.lexer=e.parser.Lexer;const n=this.lexer.definition,r=e.LanguageMetaData.mode==="production";e.shared.profilers.LangiumProfiler?.isActive("parsing")?this.wrapper=new fT(n,{...e.parser.ParserConfig,skipValidations:r,errorMessageProvider:e.parser.ParserErrorMessageProvider},e.shared.profilers.LangiumProfiler.createTask("parsing",e.LanguageMetaData.languageId)):this.wrapper=new jf(n,{...e.parser.ParserConfig,skipValidations:r,errorMessageProvider:e.parser.ParserErrorMessageProvider})}alternatives(e,n){this.wrapper.wrapOr(e,n)}optional(e,n){this.wrapper.wrapOption(e,n)}many(e,n){this.wrapper.wrapMany(e,n)}atLeastOne(e,n){this.wrapper.wrapAtLeastOne(e,n)}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()}}class cT extends Uf{get current(){return this.stack[this.stack.length-1]}constructor(e){super(e),this.nodeBuilder=new oT,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,n){const r=this.computeRuleType(e);let i;Ys(e)&&(i=e.name,this.registerPrecedenceMap(e));const s=this.wrapper.DEFINE_RULE(Gf(e.name),this.startImplementation(r,i,n).bind(this));return this.allRules.set(e.name,s),an(e)&&e.entry&&(this.mainRule=s),s}registerPrecedenceMap(e){const n=e.name,r=new Map;for(let i=0;i<e.operators.precedences.length;i++){const s=e.operators.precedences[i];for(const a of s.operators)r.set(a.value,{precedence:i,rightAssoc:s.associativity==="right"})}this.operatorPrecedence.set(n,r)}computeRuleType(e){return Ys(e)?Ii(e):e.fragment?void 0:Bd(e)?bc:Ii(e)}parse(e,n={}){this.nodeBuilder.buildRootNode(e);const r=this.lexerResult=this.lexer.tokenize(e);this.wrapper.input=r.tokens;const i=n.rule?this.allRules.get(n.rule):this.mainRule;if(!i)throw new Error(n.rule?`No rule found with name '${n.rule}'`:"No main rule available.");const s=this.doParse(i);return this.nodeBuilder.addHiddenNodes(r.hidden),this.unorderedGroups.clear(),this.lexerResult=void 0,io(s,{deep:!0}),{value:s,lexerErrors:r.errors,lexerReport:r.report,parserErrors:this.wrapper.errors}}doParse(e){let n=this.wrapper.rule(e);if(this.stack.length>0&&(n=this.construct()),n===void 0)throw new Error("No result from parser");if(this.stack.length>0)throw new Error("Parser stack is not empty after parsing");return n}startImplementation(e,n,r){return i=>{const s=!this.isRecording()&&e!==void 0;if(s){const a={$type:e};this.stack.push(a),e===bc?a.value="":n!==void 0&&(a.$infixName=n)}return r(i),s?this.construct():void 0}}extractHiddenTokens(e){const n=this.lexerResult.hidden;if(!n.length)return[];const r=e.startOffset;for(let i=0;i<n.length;i++)if(n[i].startOffset>r)return n.splice(0,i);return n.splice(0,n.length)}consume(e,n,r){const i=this.wrapper.wrapConsume(e,n);if(!this.isRecording()&&this.isValidToken(i)){const s=this.extractHiddenTokens(i);this.nodeBuilder.addHiddenNodes(s);const a=this.nodeBuilder.buildLeafNode(i,r),{assignment:o,crossRef:c}=this.getAssignment(r),l=this.current;if(o){const u=Kn(r)?i.image:this.converter.convert(i.image,a);this.assign(o.operator,o.feature,u,a,c)}else if(za(l)){let u=i.image;Kn(r)||(u=this.converter.convert(u,a).toString()),l.value+=u}}}isValidToken(e){return!e.isInsertedInRecovery&&!isNaN(e.startOffset)&&typeof e.endOffset=="number"&&!isNaN(e.endOffset)}subrule(e,n,r,i,s){let a;!this.isRecording()&&!r&&(a=this.nodeBuilder.buildCompositeNode(i));let o;try{o=this.wrapper.wrapSubrule(e,n,s)}finally{this.isRecording()||(o===void 0&&!r&&(o=this.construct()),o!==void 0&&a&&a.length>0&&this.performSubruleAssignment(o,i,a))}}performSubruleAssignment(e,n,r){const{assignment:i,crossRef:s}=this.getAssignment(n);if(i)this.assign(i.operator,i.feature,e,r,s);else if(!i){const a=this.current;if(za(a))a.value+=e.toString();else if(typeof e=="object"&&e){const c=this.assignWithoutOverride(e,a);this.stack.pop(),this.stack.push(c)}}}action(e,n){if(!this.isRecording()){let r=this.current;if(n.feature&&n.operator){r=this.construct(),this.nodeBuilder.removeNode(r.$cstNode),this.nodeBuilder.buildCompositeNode(n).content.push(r.$cstNode);const s={$type:e};this.stack.push(s),this.assign(n.operator,n.feature,r,r.$cstNode)}else r.$type=e}}construct(){if(this.isRecording())return;const e=this.stack.pop();return this.nodeBuilder.construct(e),"$infixName"in e?this.constructInfix(e,this.operatorPrecedence.get(e.$infixName)):za(e)?this.converter.convert(e.value,e.$cstNode):(mp(this.astReflection,e),e)}constructInfix(e,n){const r=e.parts;if(!Array.isArray(r)||r.length===0)return;const i=e.operators;if(!Array.isArray(i)||r.length<2)return r[0];let s=0,a=-1;for(let N=0;N<i.length;N++){const I=i[N],C=n.get(I)??{precedence:1/0,rightAssoc:!1};C.precedence>a?(a=C.precedence,s=N):C.precedence===a&&(C.rightAssoc||(s=N))}const o=i.slice(0,s),c=i.slice(s+1),l=r.slice(0,s+1),u=r.slice(s+1),f={$infixName:e.$infixName,$type:e.$type,$cstNode:e.$cstNode,parts:l,operators:o},m={$infixName:e.$infixName,$type:e.$type,$cstNode:e.$cstNode,parts:u,operators:c},p=this.constructInfix(f,n),A=this.constructInfix(m,n);return{$type:e.$type,$cstNode:e.$cstNode,left:p,operator:i[s],right:A}}getAssignment(e){if(!this.assignmentMap.has(e)){const n=Ta(e,Vn);this.assignmentMap.set(e,{assignment:n,crossRef:n&&va(n.terminal)?n.terminal.isMulti?"multi":"single":void 0})}return this.assignmentMap.get(e)}assign(e,n,r,i,s){const a=this.current;let o;switch(s==="single"&&typeof r=="string"?o=this.linker.buildReference(a,n,i,r):s==="multi"&&typeof r=="string"?o=this.linker.buildMultiReference(a,n,i,r):o=r,e){case"=":{a[n]=o;break}case"?=":{a[n]=!0;break}case"+=":Array.isArray(a[n])||(a[n]=[]),a[n].push(o)}}assignWithoutOverride(e,n){for(const[i,s]of Object.entries(n)){const a=e[i];a===void 0?e[i]=s:Array.isArray(a)&&Array.isArray(s)&&(s.push(...a),e[i]=s)}const r=e.$cstNode;return r&&(r.astNode=void 0,e.$cstNode=void 0),e}get definitionErrors(){return this.wrapper.definitionErrors}}class lT{buildMismatchTokenMessage(e){return kr.buildMismatchTokenMessage(e)}buildNotAllInputParsedMessage(e){return kr.buildNotAllInputParsedMessage(e)}buildNoViableAltMessage(e){return kr.buildNoViableAltMessage(e)}buildEarlyExitMessage(e){return kr.buildEarlyExitMessage(e)}}class qf extends lT{buildMismatchTokenMessage({expected:e,actual:n}){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 \`${n.image}\`.`}buildNotAllInputParsedMessage({firstRedundant:e}){return`Expecting end of file but found \`${e.image}\`.`}}class uT extends Uf{constructor(){super(...arguments),this.tokens=[],this.elementStack=[],this.lastElementStack=[],this.nextTokenIndex=0,this.stackSize=0}action(){}construct(){}parse(e){this.resetState();const n=this.lexer.tokenize(e,{mode:"partial"});return this.tokens=n.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,n){const r=this.wrapper.DEFINE_RULE(Gf(e.name),this.startImplementation(n).bind(this));return this.allRules.set(e.name,r),e.entry&&(this.mainRule=r),r}resetState(){this.elementStack=[],this.lastElementStack=[],this.nextTokenIndex=0,this.stackSize=0}startImplementation(e){return n=>{const r=this.keepStackSize();try{e(n)}finally{this.resetStackSize(r)}}}removeUnexpectedElements(){this.elementStack.splice(this.stackSize)}keepStackSize(){const e=this.elementStack.length;return this.stackSize=e,e}resetStackSize(e){this.removeUnexpectedElements(),this.stackSize=e}consume(e,n,r){this.wrapper.wrapConsume(e,n),this.isRecording()||(this.lastElementStack=[...this.elementStack,r],this.nextTokenIndex=this.currIdx+1)}subrule(e,n,r,i,s){this.before(i),this.wrapper.wrapSubrule(e,n,s),this.after(i)}before(e){this.isRecording()||this.elementStack.push(e)}after(e){if(!this.isRecording()){const n=this.elementStack.lastIndexOf(e);n>=0&&this.elementStack.splice(n)}}get currIdx(){return this.wrapper.currIdx}}const dT={recoveryEnabled:!0,nodeLocationTracking:"full",skipValidations:!0,errorMessageProvider:new qf};class jf extends gy{constructor(e,n){const r=n&&"maxLookahead"in n;super(e,{...dT,lookaheadStrategy:r?new tl({maxLookahead:n.maxLookahead}):new My({logging:n.skipValidations?()=>{}:void 0}),...n})}get IS_RECORDING(){return this.RECORDING_PHASE}DEFINE_RULE(e,n,r){return this.RULE(e,n,r)}wrapSelfAnalysis(){this.performSelfAnalysis()}wrapConsume(e,n){return this.consume(e,n,void 0)}wrapSubrule(e,n,r){return this.subrule(e,n,{ARGS:[r]})}wrapOr(e,n){this.or(e,n)}wrapOption(e,n){this.option(e,n)}wrapMany(e,n){this.many(e,n)}wrapAtLeastOne(e,n){this.atLeastOne(e,n)}rule(e){return e.call(this,{})}}class fT extends jf{constructor(e,n,r){super(e,n),this.task=r}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,n,r){this.task.startSubTask(this.ruleName(n));try{return super.subrule(e,n,r)}finally{this.task.stopSubTask(this.ruleName(n))}}}function zf(t,e,n){return hT({parser:e,tokens:n,ruleNames:new Map},t),e}function hT(t,e){const n=Gd(e,!1),r=me(e.rules).filter(an).filter(s=>n.has(s));for(const s of r){const a={...t,consume:1,optional:1,subrule:1,many:1,or:1};t.parser.rule(s,Jn(a,s.definition))}const i=me(e.rules).filter(Ys).filter(s=>n.has(s));for(const s of i)t.parser.rule(s,pT(t,s))}function pT(t,e){const n=e.call.rule.ref;if(!n)throw new Error("Could not resolve reference to infix operator rule: "+e.call.rule.$refText);if(on(n))throw new Error("Cannot use terminal rule in infix expression");const r=e.operators.precedences.flatMap(p=>p.operators),i={$type:"Group",elements:[]},s={$container:i,$type:"Assignment",feature:"parts",operator:"+=",terminal:e.call},a={$container:i,$type:"Group",elements:[],cardinality:"*"};i.elements.push(s,a);const c={$container:a,$type:"Assignment",feature:"operators",operator:"+=",terminal:{$type:"Alternatives",elements:r}},l={...s,$container:a};a.elements.push(c,l);const f=r.map(p=>t.tokens[p.value]).map((p,A)=>({ALT:()=>t.parser.consume(A,p,c)}));let m;return p=>{m??(m=ll(t,n)),t.parser.subrule(0,m,!1,s,p),t.parser.many(0,{DEF:()=>{t.parser.alternatives(0,f),t.parser.subrule(1,m,!1,l,p)}})}}function Jn(t,e,n=!1){let r;if(Kn(e))r=ET(t,e);else if(Ra(e))r=mT(t,e);else if(Vn(e))r=Jn(t,e.terminal);else if(va(e))r=Bf(t,e);else if(Hn(e))r=gT(t,e);else if($d(e))r=TT(t,e);else if(Od(e))r=RT(t,e);else if(Kc(e))r=vT(t,e);else if(Ep(e)){const i=t.consume++;r=()=>t.parser.consume(i,hn,e)}else throw new Dd(e.$cstNode,`Unexpected element type: ${e.$type}`);return Wf(t,n?void 0:ma(e),r,e.cardinality)}function mT(t,e){const n=Ii(e);return()=>t.parser.action(n,e)}function gT(t,e){const n=e.rule.ref;if(zi(n)){const r=t.subrule++,i=an(n)&&n.fragment,s=e.arguments.length>0?yT(n,e.arguments):()=>({});let a;return o=>{a??(a=ll(t,n)),t.parser.subrule(r,a,i,e,s(o))}}else if(on(n)){const r=t.consume++,i=_c(t,n.name);return()=>t.parser.consume(r,i,e)}else if(n)Bi();else throw new Dd(e.$cstNode,`Undefined rule: ${e.rule.$refText}`)}function yT(t,e){if(e.some(r=>r.calledByName)){const r=e.map(i=>({parameterName:i.parameter?.ref?.name,predicate:Ot(i.value)}));return i=>{const s={};for(const{parameterName:a,predicate:o}of r)a&&(s[a]=o(i));return s}}else{const r=e.map(i=>Ot(i.value));return i=>{const s={};for(let a=0;a<r.length;a++)if(a<t.parameters.length){const o=t.parameters[a].name,c=r[a];s[o]=c(i)}return s}}}function Ot(t){if(vp(t)){const e=Ot(t.left),n=Ot(t.right);return r=>e(r)||n(r)}else if(Rp(t)){const e=Ot(t.left),n=Ot(t.right);return r=>e(r)&&n(r)}else if(kp(t)){const e=Ot(t.value);return n=>!e(n)}else if(Cp(t)){const e=t.parameter.ref.name;return n=>n!==void 0&&n[e]===!0}else if(yp(t)){const e=!!t.true;return()=>e}Bi()}function TT(t,e){if(e.elements.length===1)return Jn(t,e.elements[0]);{const n=[];for(const i of e.elements){const s={ALT:Jn(t,i,!0)},a=ma(i);a&&(s.GATE=Ot(a)),n.push(s)}const r=t.or++;return i=>t.parser.alternatives(r,n.map(s=>{const a={ALT:()=>s.ALT(i)},o=s.GATE;return o&&(a.GATE=()=>o(i)),a}))}}function RT(t,e){if(e.elements.length===1)return Jn(t,e.elements[0]);const n=[];for(const o of e.elements){const c={ALT:Jn(t,o,!0)},l=ma(o);l&&(c.GATE=Ot(l)),n.push(c)}const r=t.or++,i=(o,c)=>{const l=c.getRuleStack().join("-");return`uGroup_${o}_${l}`},s=o=>t.parser.alternatives(r,n.map((c,l)=>{const u={ALT:()=>!0},f=t.parser;u.ALT=()=>{if(c.ALT(o),!f.isRecording()){const p=i(r,f);f.unorderedGroups.get(p)||f.unorderedGroups.set(p,[]);const A=f.unorderedGroups.get(p);typeof A?.[l]>"u"&&(A[l]=!0)}};const m=c.GATE;return m?u.GATE=()=>m(o):u.GATE=()=>!f.unorderedGroups.get(i(r,f))?.[l],u})),a=Wf(t,ma(e),s,"*");return o=>{a(o),t.parser.isRecording()||t.parser.unorderedGroups.delete(i(r,t.parser))}}function vT(t,e){const n=e.elements.map(r=>Jn(t,r));return r=>n.forEach(i=>i(r))}function ma(t){if(Kc(t))return t.guardCondition}function Bf(t,e,n=e.terminal){if(n)if(Hn(n)&&an(n.rule.ref)){const r=n.rule.ref,i=t.subrule++;let s;return a=>{s??(s=ll(t,r)),t.parser.subrule(i,s,!1,e,a)}}else if(Hn(n)&&on(n.rule.ref)){const r=t.consume++,i=_c(t,n.rule.ref.name);return()=>t.parser.consume(r,i,e)}else if(Kn(n)){const r=t.consume++,i=_c(t,n.value);return()=>t.parser.consume(r,i,e)}else throw new Error("Could not build cross reference parser");else{if(!e.type.ref)throw new Error("Could not resolve reference to type: "+e.type.$refText);const i=jd(e.type.ref)?.terminal;if(!i)throw new Error("Could not find name assignment for type: "+Ii(e.type.ref));return Bf(t,e,i)}}function ET(t,e){const n=t.consume++,r=t.tokens[e.value];if(!r)throw new Error("Could not find token for keyword: "+e.value);return()=>t.parser.consume(n,r,e)}function Wf(t,e,n,r){const i=e&&Ot(e);if(!r)if(i){const s=t.or++;return a=>t.parser.alternatives(s,[{ALT:()=>n(a),GATE:()=>i(a)},{ALT:Zl(),GATE:()=>!i(a)}])}else return n;if(r==="*"){const s=t.many++;return a=>t.parser.many(s,{DEF:()=>n(a),GATE:i?()=>i(a):void 0})}else if(r==="+"){const s=t.many++;if(i){const a=t.or++;return o=>t.parser.alternatives(a,[{ALT:()=>t.parser.atLeastOne(s,{DEF:()=>n(o)}),GATE:()=>i(o)},{ALT:Zl(),GATE:()=>!i(o)}])}else return a=>t.parser.atLeastOne(s,{DEF:()=>n(a)})}else if(r==="?"){const s=t.optional++;return a=>t.parser.optional(s,{DEF:()=>n(a),GATE:i?()=>i(a):void 0})}else Bi()}function ll(t,e){const n=AT(t,e),r=t.parser.getRule(n);if(!r)throw new Error(`Rule "${n}" not found."`);return r}function AT(t,e){if(zi(e))return e.name;if(t.ruleNames.has(e))return t.ruleNames.get(e);{let n=e,r=n.$container,i=e.$type;for(;!an(r);)(Kc(r)||$d(r)||Od(r))&&(i=r.elements.indexOf(n).toString()+":"+i),n=r,r=r.$container;return i=r.name+":"+i,t.ruleNames.set(e,i),i}}function _c(t,e){const n=t.tokens[e];if(!n)throw new Error(`Token "${e}" not found."`);return n}function ST(t){const e=t.Grammar,n=t.parser.Lexer,r=new uT(t);return zf(e,r,n.definition),r.finalize(),r}function kT(t){const e=CT(t);return e.finalize(),e}function CT(t){const e=t.Grammar,n=t.parser.Lexer,r=new cT(t);return zf(e,r,n.definition)}class Vf{constructor(){this.diagnostics=[]}buildTokens(e,n){const r=me(Gd(e,!1)),i=this.buildTerminalTokens(r),s=this.buildKeywordTokens(r,i,n);return s.push(...i),s}flushLexingReport(e){return{diagnostics:this.popDiagnostics()}}popDiagnostics(){const e=[...this.diagnostics];return this.diagnostics=[],e}buildTerminalTokens(e){return e.filter(on).filter(n=>!n.fragment).map(n=>this.buildTerminalToken(n)).toArray()}buildTerminalToken(e){const n=Yc(e),r=this.requiresCustomPattern(n)?this.regexPatternFunction(n):n,i={name:e.name,PATTERN:r};return typeof r=="function"&&(i.LINE_BREAKS=!0),e.hidden&&(i.GROUP=Fd(n)?nt.SKIPPED:"hidden"),i}requiresCustomPattern(e){return!!(e.flags.includes("u")||e.flags.includes("s"))}regexPatternFunction(e){const n=new RegExp(e,e.flags+"y");return(r,i)=>(n.lastIndex=i,n.exec(r))}buildKeywordTokens(e,n,r){return e.filter(zi).flatMap(i=>ji(i).filter(Kn)).distinct(i=>i.value).toArray().sort((i,s)=>s.value.length-i.value.length).map(i=>this.buildKeywordToken(i,n,!!r?.caseInsensitive))}buildKeywordToken(e,n,r){const i=this.buildKeywordPattern(e,r),s={name:e.value,PATTERN:i,LONGER_ALT:this.findLongerAlt(e,n)};return typeof i=="function"&&(s.LINE_BREAKS=!0),s}buildKeywordPattern(e,n){return n?new RegExp(Aa(e.value),"i"):e.value}findLongerAlt(e,n){return n.reduce((r,i)=>{const s=i?.PATTERN;return s?.source&&Yp("^"+s.source+"$",e.value)&&r.push(i),r},[])}}class Kf{convert(e,n){let r=n.grammarSource;if(va(r)&&(r=Zp(r)),Hn(r)){const i=r.rule.ref;if(!i)throw new Error("This cst node was not parsed by a rule.");return this.runConverter(i,e,n)}return e}runConverter(e,n,r){switch(e.name.toUpperCase()){case"INT":return Yt.convertInt(n);case"STRING":return Yt.convertString(n);case"ID":return Yt.convertID(n)}switch(am(e)?.toLowerCase()){case"number":return Yt.convertNumber(n);case"boolean":return Yt.convertBoolean(n);case"bigint":return Yt.convertBigint(n);case"date":return Yt.convertDate(n);default:return n}}}var Yt;(function(t){function e(l){let u="";for(let f=1;f<l.length-1;f++){const m=l.charAt(f);if(m==="\\"){const p=l.charAt(++f);u+=n(p)}else u+=m}return u}t.convertString=e;function n(l){switch(l){case"b":return"\b";case"f":return"\f";case"n":return`
121
+ `;case"r":return"\r";case"t":return" ";case"v":return"\v";case"0":return"\0";default:return l}}function r(l){return l.charAt(0)==="^"?l.substring(1):l}t.convertID=r;function i(l){return parseInt(l)}t.convertInt=i;function s(l){return BigInt(l)}t.convertBigint=s;function a(l){return new Date(l)}t.convertDate=a;function o(l){return Number(l)}t.convertNumber=o;function c(l){return l.toLowerCase()==="true"}t.convertBoolean=c})(Yt||(Yt={}));var kn={},ks={},su;function Hf(){if(su)return ks;su=1,Object.defineProperty(ks,"__esModule",{value:!0});let t;function e(){if(t===void 0)throw new Error("No runtime abstraction layer installed");return t}return(function(n){function r(i){if(i===void 0)throw new Error("No runtime abstraction layer provided");t=i}n.install=r})(e||(e={})),ks.default=e,ks}var De={},au;function bT(){if(au)return De;au=1,Object.defineProperty(De,"__esModule",{value:!0}),De.stringArray=De.array=De.func=De.error=De.number=De.string=De.boolean=void 0;function t(o){return o===!0||o===!1}De.boolean=t;function e(o){return typeof o=="string"||o instanceof String}De.string=e;function n(o){return typeof o=="number"||o instanceof Number}De.number=n;function r(o){return o instanceof Error}De.error=r;function i(o){return typeof o=="function"}De.func=i;function s(o){return Array.isArray(o)}De.array=s;function a(o){return s(o)&&o.every(c=>e(c))}return De.stringArray=a,De}var Cn={},ou;function Yf(){if(ou)return Cn;ou=1,Object.defineProperty(Cn,"__esModule",{value:!0}),Cn.Emitter=Cn.Event=void 0;const t=Hf();var e;(function(i){const s={dispose(){}};i.None=function(){return s}})(e||(Cn.Event=e={}));class n{add(s,a=null,o){this._callbacks||(this._callbacks=[],this._contexts=[]),this._callbacks.push(s),this._contexts.push(a),Array.isArray(o)&&o.push({dispose:()=>this.remove(s,a)})}remove(s,a=null){if(!this._callbacks)return;let o=!1;for(let c=0,l=this._callbacks.length;c<l;c++)if(this._callbacks[c]===s)if(this._contexts[c]===a){this._callbacks.splice(c,1),this._contexts.splice(c,1);return}else o=!0;if(o)throw new Error("When adding a listener with a context, you should remove it with the same context")}invoke(...s){if(!this._callbacks)return[];const a=[],o=this._callbacks.slice(0),c=this._contexts.slice(0);for(let l=0,u=o.length;l<u;l++)try{a.push(o[l].apply(c[l],s))}catch(f){(0,t.default)().console.error(f)}return a}isEmpty(){return!this._callbacks||this._callbacks.length===0}dispose(){this._callbacks=void 0,this._contexts=void 0}}class r{constructor(s){this._options=s}get event(){return this._event||(this._event=(s,a,o)=>{this._callbacks||(this._callbacks=new n),this._options&&this._options.onFirstListenerAdd&&this._callbacks.isEmpty()&&this._options.onFirstListenerAdd(this),this._callbacks.add(s,a);const c={dispose:()=>{this._callbacks&&(this._callbacks.remove(s,a),c.dispose=r._noop,this._options&&this._options.onLastListenerRemove&&this._callbacks.isEmpty()&&this._options.onLastListenerRemove(this))}};return Array.isArray(o)&&o.push(c),c}),this._event}fire(s){this._callbacks&&this._callbacks.invoke.call(this._callbacks,s)}dispose(){this._callbacks&&(this._callbacks.dispose(),this._callbacks=void 0)}}return Cn.Emitter=r,r._noop=function(){},Cn}var cu;function _T(){if(cu)return kn;cu=1,Object.defineProperty(kn,"__esModule",{value:!0}),kn.CancellationTokenSource=kn.CancellationToken=void 0;const t=Hf(),e=bT(),n=Yf();var r;(function(o){o.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:n.Event.None}),o.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:n.Event.None});function c(l){const u=l;return u&&(u===o.None||u===o.Cancelled||e.boolean(u.isCancellationRequested)&&!!u.onCancellationRequested)}o.is=c})(r||(kn.CancellationToken=r={}));const i=Object.freeze(function(o,c){const l=(0,t.default)().timer.setTimeout(o.bind(c),0);return{dispose(){l.dispose()}}});class s{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?i:(this._emitter||(this._emitter=new n.Emitter),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=void 0)}}class a{get token(){return this._token||(this._token=new s),this._token}cancel(){this._token?this._token.cancel():this._token=r.Cancelled}dispose(){this._token?this._token instanceof s&&this._token.dispose():this._token=r.None}}return kn.CancellationTokenSource=a,kn}var ye=_T();function NT(){return new Promise(t=>{typeof setImmediate>"u"?setTimeout(t,0):setImmediate(t)})}let Bs=0,wT=10;function IT(){return Bs=performance.now(),new ye.CancellationTokenSource}const Cr=Symbol("OperationCancelled");function Ia(t){return t===Cr}async function Je(t){if(t===ye.CancellationToken.None)return;const e=performance.now();if(e-Bs>=wT&&(Bs=e,await NT(),Bs=performance.now()),t.isCancellationRequested)throw Cr}class ul{constructor(){this.promise=new Promise((e,n)=>{this.resolve=r=>(e(r),this),this.reject=r=>(n(r),this)})}}class Fi{constructor(e,n,r,i){this._uri=e,this._languageId=n,this._version=r,this._content=i,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(e){if(e){const n=this.offsetAt(e.start),r=this.offsetAt(e.end);return this._content.substring(n,r)}return this._content}update(e,n){for(const r of e)if(Fi.isIncremental(r)){const i=Jf(r.range),s=this.offsetAt(i.start),a=this.offsetAt(i.end);this._content=this._content.substring(0,s)+r.text+this._content.substring(a,this._content.length);const o=Math.max(i.start.line,0),c=Math.max(i.end.line,0);let l=this._lineOffsets;const u=lu(r.text,!1,s);if(c-o===u.length)for(let m=0,p=u.length;m<p;m++)l[m+o+1]=u[m];else u.length<1e4?l.splice(o+1,c-o,...u):this._lineOffsets=l=l.slice(0,o+1).concat(u,l.slice(c+1));const f=r.text.length-(a-s);if(f!==0)for(let m=o+1+u.length,p=l.length;m<p;m++)l[m]=l[m]+f}else if(Fi.isFull(r))this._content=r.text,this._lineOffsets=void 0;else throw new Error("Unknown change event received");this._version=n}getLineOffsets(){return this._lineOffsets===void 0&&(this._lineOffsets=lu(this._content,!0)),this._lineOffsets}positionAt(e){e=Math.max(Math.min(e,this._content.length),0);const n=this.getLineOffsets();let r=0,i=n.length;if(i===0)return{line:0,character:e};for(;r<i;){const a=Math.floor((r+i)/2);n[a]>e?i=a:r=a+1}const s=r-1;return e=this.ensureBeforeEOL(e,n[s]),{line:s,character:e-n[s]}}offsetAt(e){const n=this.getLineOffsets();if(e.line>=n.length)return this._content.length;if(e.line<0)return 0;const r=n[e.line];if(e.character<=0)return r;const i=e.line+1<n.length?n[e.line+1]:this._content.length,s=Math.min(r+e.character,i);return this.ensureBeforeEOL(s,r)}ensureBeforeEOL(e,n){for(;e>n&&Xf(this._content.charCodeAt(e-1));)e--;return e}get lineCount(){return this.getLineOffsets().length}static isIncremental(e){const n=e;return n!=null&&typeof n.text=="string"&&n.range!==void 0&&(n.rangeLength===void 0||typeof n.rangeLength=="number")}static isFull(e){const n=e;return n!=null&&typeof n.text=="string"&&n.range===void 0&&n.rangeLength===void 0}}var Nc;(function(t){function e(i,s,a,o){return new Fi(i,s,a,o)}t.create=e;function n(i,s,a){if(i instanceof Fi)return i.update(s,a),i;throw new Error("TextDocument.update: document must be created by TextDocument.create")}t.update=n;function r(i,s){const a=i.getText(),o=wc(s.map(PT),(u,f)=>{const m=u.range.start.line-f.range.start.line;return m===0?u.range.start.character-f.range.start.character:m});let c=0;const l=[];for(const u of o){const f=i.offsetAt(u.range.start);if(f<c)throw new Error("Overlapping edit");f>c&&l.push(a.substring(c,f)),u.newText.length&&l.push(u.newText),c=i.offsetAt(u.range.end)}return l.push(a.substr(c)),l.join("")}t.applyEdits=r})(Nc||(Nc={}));function wc(t,e){if(t.length<=1)return t;const n=t.length/2|0,r=t.slice(0,n),i=t.slice(n);wc(r,e),wc(i,e);let s=0,a=0,o=0;for(;s<r.length&&a<i.length;)e(r[s],i[a])<=0?t[o++]=r[s++]:t[o++]=i[a++];for(;s<r.length;)t[o++]=r[s++];for(;a<i.length;)t[o++]=i[a++];return t}function lu(t,e,n=0){const r=e?[n]:[];for(let i=0;i<t.length;i++){const s=t.charCodeAt(i);Xf(s)&&(s===13&&i+1<t.length&&t.charCodeAt(i+1)===10&&i++,r.push(n+i+1))}return r}function Xf(t){return t===13||t===10}function Jf(t){const e=t.start,n=t.end;return e.line>n.line||e.line===n.line&&e.character>n.character?{start:n,end:e}:t}function PT(t){const e=Jf(t.range);return e!==t.range?{newText:t.newText,range:e}:t}var Qf;(()=>{var t={975:w=>{function T(y){if(typeof y!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(y))}function g(y,R){for(var E,O="",D=0,x=-1,j=0,G=0;G<=y.length;++G){if(G<y.length)E=y.charCodeAt(G);else{if(E===47)break;E=47}if(E===47){if(!(x===G-1||j===1))if(x!==G-1&&j===2){if(O.length<2||D!==2||O.charCodeAt(O.length-1)!==46||O.charCodeAt(O.length-2)!==46){if(O.length>2){var ie=O.lastIndexOf("/");if(ie!==O.length-1){ie===-1?(O="",D=0):D=(O=O.slice(0,ie)).length-1-O.lastIndexOf("/"),x=G,j=0;continue}}else if(O.length===2||O.length===1){O="",D=0,x=G,j=0;continue}}R&&(O.length>0?O+="/..":O="..",D=2)}else O.length>0?O+="/"+y.slice(x+1,G):O=y.slice(x+1,G),D=G-x-1;x=G,j=0}else E===46&&j!==-1?++j:j=-1}return O}var S={resolve:function(){for(var y,R="",E=!1,O=arguments.length-1;O>=-1&&!E;O--){var D;O>=0?D=arguments[O]:(y===void 0&&(y=process.cwd()),D=y),T(D),D.length!==0&&(R=D+"/"+R,E=D.charCodeAt(0)===47)}return R=g(R,!E),E?R.length>0?"/"+R:"/":R.length>0?R:"."},normalize:function(y){if(T(y),y.length===0)return".";var R=y.charCodeAt(0)===47,E=y.charCodeAt(y.length-1)===47;return(y=g(y,!R)).length!==0||R||(y="."),y.length>0&&E&&(y+="/"),R?"/"+y:y},isAbsolute:function(y){return T(y),y.length>0&&y.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var y,R=0;R<arguments.length;++R){var E=arguments[R];T(E),E.length>0&&(y===void 0?y=E:y+="/"+E)}return y===void 0?".":S.normalize(y)},relative:function(y,R){if(T(y),T(R),y===R||(y=S.resolve(y))===(R=S.resolve(R)))return"";for(var E=1;E<y.length&&y.charCodeAt(E)===47;++E);for(var O=y.length,D=O-E,x=1;x<R.length&&R.charCodeAt(x)===47;++x);for(var j=R.length-x,G=D<j?D:j,ie=-1,B=0;B<=G;++B){if(B===G){if(j>G){if(R.charCodeAt(x+B)===47)return R.slice(x+B+1);if(B===0)return R.slice(x+B)}else D>G&&(y.charCodeAt(E+B)===47?ie=B:B===0&&(ie=0));break}var ne=y.charCodeAt(E+B);if(ne!==R.charCodeAt(x+B))break;ne===47&&(ie=B)}var Oe="";for(B=E+ie+1;B<=O;++B)B!==O&&y.charCodeAt(B)!==47||(Oe.length===0?Oe+="..":Oe+="/..");return Oe.length>0?Oe+R.slice(x+ie):(x+=ie,R.charCodeAt(x)===47&&++x,R.slice(x))},_makeLong:function(y){return y},dirname:function(y){if(T(y),y.length===0)return".";for(var R=y.charCodeAt(0),E=R===47,O=-1,D=!0,x=y.length-1;x>=1;--x)if((R=y.charCodeAt(x))===47){if(!D){O=x;break}}else D=!1;return O===-1?E?"/":".":E&&O===1?"//":y.slice(0,O)},basename:function(y,R){if(R!==void 0&&typeof R!="string")throw new TypeError('"ext" argument must be a string');T(y);var E,O=0,D=-1,x=!0;if(R!==void 0&&R.length>0&&R.length<=y.length){if(R.length===y.length&&R===y)return"";var j=R.length-1,G=-1;for(E=y.length-1;E>=0;--E){var ie=y.charCodeAt(E);if(ie===47){if(!x){O=E+1;break}}else G===-1&&(x=!1,G=E+1),j>=0&&(ie===R.charCodeAt(j)?--j==-1&&(D=E):(j=-1,D=G))}return O===D?D=G:D===-1&&(D=y.length),y.slice(O,D)}for(E=y.length-1;E>=0;--E)if(y.charCodeAt(E)===47){if(!x){O=E+1;break}}else D===-1&&(x=!1,D=E+1);return D===-1?"":y.slice(O,D)},extname:function(y){T(y);for(var R=-1,E=0,O=-1,D=!0,x=0,j=y.length-1;j>=0;--j){var G=y.charCodeAt(j);if(G!==47)O===-1&&(D=!1,O=j+1),G===46?R===-1?R=j:x!==1&&(x=1):R!==-1&&(x=-1);else if(!D){E=j+1;break}}return R===-1||O===-1||x===0||x===1&&R===O-1&&R===E+1?"":y.slice(R,O)},format:function(y){if(y===null||typeof y!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof y);return(function(R,E){var O=E.dir||E.root,D=E.base||(E.name||"")+(E.ext||"");return O?O===E.root?O+D:O+"/"+D:D})(0,y)},parse:function(y){T(y);var R={root:"",dir:"",base:"",ext:"",name:""};if(y.length===0)return R;var E,O=y.charCodeAt(0),D=O===47;D?(R.root="/",E=1):E=0;for(var x=-1,j=0,G=-1,ie=!0,B=y.length-1,ne=0;B>=E;--B)if((O=y.charCodeAt(B))!==47)G===-1&&(ie=!1,G=B+1),O===46?x===-1?x=B:ne!==1&&(ne=1):x!==-1&&(ne=-1);else if(!ie){j=B+1;break}return x===-1||G===-1||ne===0||ne===1&&x===G-1&&x===j+1?G!==-1&&(R.base=R.name=j===0&&D?y.slice(1,G):y.slice(j,G)):(j===0&&D?(R.name=y.slice(1,x),R.base=y.slice(1,G)):(R.name=y.slice(j,x),R.base=y.slice(j,G)),R.ext=y.slice(x,G)),j>0?R.dir=y.slice(0,j-1):D&&(R.dir="/"),R},sep:"/",delimiter:":",win32:null,posix:null};S.posix=S,w.exports=S}},e={};function n(w){var T=e[w];if(T!==void 0)return T.exports;var g=e[w]={exports:{}};return t[w](g,g.exports,n),g.exports}n.d=(w,T)=>{for(var g in T)n.o(T,g)&&!n.o(w,g)&&Object.defineProperty(w,g,{enumerable:!0,get:T[g]})},n.o=(w,T)=>Object.prototype.hasOwnProperty.call(w,T),n.r=w=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(w,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(w,"__esModule",{value:!0})};var r={};let i;n.r(r),n.d(r,{URI:()=>m,Utils:()=>de}),typeof process=="object"?i=process.platform==="win32":typeof navigator=="object"&&(i=navigator.userAgent.indexOf("Windows")>=0);const s=/^\w[\w\d+.-]*$/,a=/^\//,o=/^\/\//;function c(w,T){if(!w.scheme&&T)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${w.authority}", path: "${w.path}", query: "${w.query}", fragment: "${w.fragment}"}`);if(w.scheme&&!s.test(w.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(w.path){if(w.authority){if(!a.test(w.path))throw new 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(o.test(w.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}}const l="",u="/",f=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class m{static isUri(T){return T instanceof m||!!T&&typeof T.authority=="string"&&typeof T.fragment=="string"&&typeof T.path=="string"&&typeof T.query=="string"&&typeof T.scheme=="string"&&typeof T.fsPath=="string"&&typeof T.with=="function"&&typeof T.toString=="function"}scheme;authority;path;query;fragment;constructor(T,g,S,y,R,E=!1){typeof T=="object"?(this.scheme=T.scheme||l,this.authority=T.authority||l,this.path=T.path||l,this.query=T.query||l,this.fragment=T.fragment||l):(this.scheme=(function(O,D){return O||D?O:"file"})(T,E),this.authority=g||l,this.path=(function(O,D){switch(O){case"https":case"http":case"file":D?D[0]!==u&&(D=u+D):D=u}return D})(this.scheme,S||l),this.query=y||l,this.fragment=R||l,c(this,E))}get fsPath(){return b(this)}with(T){if(!T)return this;let{scheme:g,authority:S,path:y,query:R,fragment:E}=T;return g===void 0?g=this.scheme:g===null&&(g=l),S===void 0?S=this.authority:S===null&&(S=l),y===void 0?y=this.path:y===null&&(y=l),R===void 0?R=this.query:R===null&&(R=l),E===void 0?E=this.fragment:E===null&&(E=l),g===this.scheme&&S===this.authority&&y===this.path&&R===this.query&&E===this.fragment?this:new A(g,S,y,R,E)}static parse(T,g=!1){const S=f.exec(T);return S?new A(S[2]||l,K(S[4]||l),K(S[5]||l),K(S[7]||l),K(S[9]||l),g):new A(l,l,l,l,l)}static file(T){let g=l;if(i&&(T=T.replace(/\\/g,u)),T[0]===u&&T[1]===u){const S=T.indexOf(u,2);S===-1?(g=T.substring(2),T=u):(g=T.substring(2,S),T=T.substring(S)||u)}return new A("file",g,T,l,l)}static from(T){const g=new A(T.scheme,T.authority,T.path,T.query,T.fragment);return c(g,!0),g}toString(T=!1){return k(this,T)}toJSON(){return this}static revive(T){if(T){if(T instanceof m)return T;{const g=new A(T);return g._formatted=T.external,g._fsPath=T._sep===p?T.fsPath:null,g}}return T}}const p=i?1:void 0;class A extends m{_formatted=null;_fsPath=null;get fsPath(){return this._fsPath||(this._fsPath=b(this)),this._fsPath}toString(T=!1){return T?k(this,!0):(this._formatted||(this._formatted=k(this,!1)),this._formatted)}toJSON(){const T={$mid:1};return this._fsPath&&(T.fsPath=this._fsPath,T._sep=p),this._formatted&&(T.external=this._formatted),this.path&&(T.path=this.path),this.scheme&&(T.scheme=this.scheme),this.authority&&(T.authority=this.authority),this.query&&(T.query=this.query),this.fragment&&(T.fragment=this.fragment),T}}const N={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 I(w,T,g){let S,y=-1;for(let R=0;R<w.length;R++){const E=w.charCodeAt(R);if(E>=97&&E<=122||E>=65&&E<=90||E>=48&&E<=57||E===45||E===46||E===95||E===126||T&&E===47||g&&E===91||g&&E===93||g&&E===58)y!==-1&&(S+=encodeURIComponent(w.substring(y,R)),y=-1),S!==void 0&&(S+=w.charAt(R));else{S===void 0&&(S=w.substr(0,R));const O=N[E];O!==void 0?(y!==-1&&(S+=encodeURIComponent(w.substring(y,R)),y=-1),S+=O):y===-1&&(y=R)}}return y!==-1&&(S+=encodeURIComponent(w.substring(y))),S!==void 0?S:w}function C(w){let T;for(let g=0;g<w.length;g++){const S=w.charCodeAt(g);S===35||S===63?(T===void 0&&(T=w.substr(0,g)),T+=N[S]):T!==void 0&&(T+=w[g])}return T!==void 0?T:w}function b(w,T){let g;return g=w.authority&&w.path.length>1&&w.scheme==="file"?`//${w.authority}${w.path}`:w.path.charCodeAt(0)===47&&(w.path.charCodeAt(1)>=65&&w.path.charCodeAt(1)<=90||w.path.charCodeAt(1)>=97&&w.path.charCodeAt(1)<=122)&&w.path.charCodeAt(2)===58?w.path[1].toLowerCase()+w.path.substr(2):w.path,i&&(g=g.replace(/\//g,"\\")),g}function k(w,T){const g=T?C:I;let S="",{scheme:y,authority:R,path:E,query:O,fragment:D}=w;if(y&&(S+=y,S+=":"),(R||y==="file")&&(S+=u,S+=u),R){let x=R.indexOf("@");if(x!==-1){const j=R.substr(0,x);R=R.substr(x+1),x=j.lastIndexOf(":"),x===-1?S+=g(j,!1,!1):(S+=g(j.substr(0,x),!1,!1),S+=":",S+=g(j.substr(x+1),!1,!0)),S+="@"}R=R.toLowerCase(),x=R.lastIndexOf(":"),x===-1?S+=g(R,!1,!0):(S+=g(R.substr(0,x),!1,!0),S+=R.substr(x))}if(E){if(E.length>=3&&E.charCodeAt(0)===47&&E.charCodeAt(2)===58){const x=E.charCodeAt(1);x>=65&&x<=90&&(E=`/${String.fromCharCode(x+32)}:${E.substr(3)}`)}else if(E.length>=2&&E.charCodeAt(1)===58){const x=E.charCodeAt(0);x>=65&&x<=90&&(E=`${String.fromCharCode(x+32)}:${E.substr(2)}`)}S+=g(E,!0,!1)}return O&&(S+="?",S+=g(O,!1,!1)),D&&(S+="#",S+=T?D:I(D,!1,!1)),S}function P(w){try{return decodeURIComponent(w)}catch{return w.length>3?w.substr(0,3)+P(w.substr(3)):w}}const H=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function K(w){return w.match(H)?w.replace(H,(T=>P(T))):w}var J=n(975);const oe=J.posix||J,ue="/";var de;(function(w){w.joinPath=function(T,...g){return T.with({path:oe.join(T.path,...g)})},w.resolvePath=function(T,...g){let S=T.path,y=!1;S[0]!==ue&&(S=ue+S,y=!0);let R=oe.resolve(S,...g);return y&&R[0]===ue&&!T.authority&&(R=R.substring(1)),T.with({path:R})},w.dirname=function(T){if(T.path.length===0||T.path===ue)return T;let g=oe.dirname(T.path);return g.length===1&&g.charCodeAt(0)===46&&(g=""),T.with({path:g})},w.basename=function(T){return oe.basename(T.path)},w.extname=function(T){return oe.extname(T.path)}})(de||(de={})),Qf=r})();const{URI:bt,Utils:ri}=Qf;var dt;(function(t){t.basename=ri.basename,t.dirname=ri.dirname,t.extname=ri.extname,t.joinPath=ri.joinPath,t.resolvePath=ri.resolvePath;const e=typeof process=="object"&&process?.platform==="win32";function n(a,o){return a?.toString()===o?.toString()}t.equals=n;function r(a,o){const c=typeof a=="string"?bt.parse(a).path:a.path,l=typeof o=="string"?bt.parse(o).path:o.path,u=c.split("/").filter(N=>N.length>0),f=l.split("/").filter(N=>N.length>0);if(e){const N=/^[A-Z]:$/;if(u[0]&&N.test(u[0])&&(u[0]=u[0].toLowerCase()),f[0]&&N.test(f[0])&&(f[0]=f[0].toLowerCase()),u[0]!==f[0])return l.substring(1)}let m=0;for(;m<u.length&&u[m]===f[m];m++);const p="../".repeat(u.length-m),A=f.slice(m).join("/");return p+A}t.relative=r;function i(a){return bt.parse(a.toString()).toString()}t.normalize=i;function s(a,o){let c=typeof a=="string"?a:a.path,l=typeof o=="string"?o:o.path;return l.charAt(l.length-1)==="/"&&(l=l.slice(0,-1)),c.charAt(c.length-1)==="/"&&(c=c.slice(0,-1)),l===c?!0:l.length<c.length||l.charAt(c.length)!=="/"?!1:l.startsWith(c)}t.contains=s})(dt||(dt={}));class $T{constructor(){this.root={name:"",children:new Map}}normalizeUri(e){return dt.normalize(e)}clear(){this.root.children.clear()}insert(e,n){const r=this.getNode(this.normalizeUri(e),!0);r.element=n}delete(e){const n=this.getNode(this.normalizeUri(e),!1);n?.parent&&n.parent.children.delete(n.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){const n=this.normalizeUri(e),r=this.getNode(n,!1);if(r)return{name:r.name,uri:dt.joinPath(bt.parse(n),r.name).toString(),element:r.element}}findChildren(e){const n=this.normalizeUri(e),r=this.getNode(n,!1);return r?Array.from(r.children.values()).map(i=>({name:i.name,uri:dt.joinPath(bt.parse(n),i.name).toString(),element:i.element})):[]}all(){return this.collectValues(this.root)}findAll(e){const n=this.getNode(dt.normalize(e),!1);return n?this.collectValues(n):[]}getNode(e,n){const r=e.split("/");e.charAt(e.length-1)==="/"&&r.pop();let i=this.root;for(const s of r){let a=i.children.get(s);if(!a)if(n)a={name:s,children:new Map,parent:i},i.children.set(s,a);else return;i=a}return i}collectValues(e){const n=[];e.element&&n.push(e.element);for(const r of e.children.values())n.push(...this.collectValues(r));return n}}var Y;(function(t){t[t.Changed=0]="Changed",t[t.Parsed=1]="Parsed",t[t.IndexedContent=2]="IndexedContent",t[t.ComputedScopes=3]="ComputedScopes",t[t.Linked=4]="Linked",t[t.IndexedReferences=5]="IndexedReferences",t[t.Validated=6]="Validated"})(Y||(Y={}));class LT{constructor(e){this.serviceRegistry=e.ServiceRegistry,this.textDocuments=e.workspace.TextDocuments,this.fileSystemProvider=e.workspace.FileSystemProvider}async fromUri(e,n=ye.CancellationToken.None){const r=await this.fileSystemProvider.readFile(e);return this.createAsync(e,r,n)}fromTextDocument(e,n,r){return n=n??bt.parse(e.uri),ye.CancellationToken.is(r)?this.createAsync(n,e,r):this.create(n,e,r)}fromString(e,n,r){return ye.CancellationToken.is(r)?this.createAsync(n,e,r):this.create(n,e,r)}fromModel(e,n){return this.create(n,{$model:e})}create(e,n,r){if(typeof n=="string"){const i=this.parse(e,n,r);return this.createLangiumDocument(i,e,void 0,n)}else if("$model"in n){const i={value:n.$model,parserErrors:[],lexerErrors:[]};return this.createLangiumDocument(i,e)}else{const i=this.parse(e,n.getText(),r);return this.createLangiumDocument(i,e,n)}}async createAsync(e,n,r){if(typeof n=="string"){const i=await this.parseAsync(e,n,r);return this.createLangiumDocument(i,e,void 0,n)}else{const i=await this.parseAsync(e,n.getText(),r);return this.createLangiumDocument(i,e,n)}}createLangiumDocument(e,n,r,i){let s;if(r)s={parseResult:e,uri:n,state:Y.Parsed,references:[],textDocument:r};else{const a=this.createTextDocumentGetter(n,i);s={parseResult:e,uri:n,state:Y.Parsed,references:[],get textDocument(){return a()}}}return e.value.$document=s,s}async update(e,n){const r=e.parseResult.value.$cstNode?.root.fullText,i=this.textDocuments?.get(e.uri.toString()),s=i?i.getText():await this.fileSystemProvider.readFile(e.uri);if(i)Object.defineProperty(e,"textDocument",{value:i});else{const a=this.createTextDocumentGetter(e.uri,s);Object.defineProperty(e,"textDocument",{get:a})}return r!==s&&(e.parseResult=await this.parseAsync(e.uri,s,n),e.parseResult.value.$document=e),e.state=Y.Parsed,e}parse(e,n,r){return this.serviceRegistry.getServices(e).parser.LangiumParser.parse(n,r)}parseAsync(e,n,r){return this.serviceRegistry.getServices(e).parser.AsyncParser.parse(n,r)}createTextDocumentGetter(e,n){const r=this.serviceRegistry;let i;return()=>i??(i=Nc.create(e.toString(),r.getServices(e).LanguageMetaData.languageId,0,n??""))}}class OT{constructor(e){this.documentTrie=new $T,this.services=e,this.langiumDocumentFactory=e.workspace.LangiumDocumentFactory,this.documentBuilder=()=>e.workspace.DocumentBuilder}get all(){return me(this.documentTrie.all())}addDocument(e){const n=e.uri.toString();if(this.documentTrie.has(n))throw new Error(`A document with the URI '${n}' is already present.`);this.documentTrie.insert(n,e)}getDocument(e){const n=e.toString();return this.documentTrie.find(n)}getDocuments(e){const n=e.toString();return this.documentTrie.findAll(n)}async getOrCreateDocument(e,n){let r=this.getDocument(e);return r||(r=await this.langiumDocumentFactory.fromUri(e,n),this.addDocument(r),r)}createDocument(e,n,r){if(r)return this.langiumDocumentFactory.fromString(n,e,r).then(i=>(this.addDocument(i),i));{const i=this.langiumDocumentFactory.fromString(n,e);return this.addDocument(i),i}}hasDocument(e){return this.documentTrie.has(e.toString())}invalidateDocument(e){const n=e.toString(),r=this.documentTrie.find(n);return r&&this.documentBuilder().resetToState(r,Y.Changed),r}deleteDocument(e){const n=e.toString(),r=this.documentTrie.find(n);return r&&(r.state=Y.Changed,this.documentTrie.delete(n)),r}deleteDocuments(e){const n=e.toString(),r=this.documentTrie.findAll(n);for(const i of r)i.state=Y.Changed;return this.documentTrie.delete(n),r}}const or=Symbol("RefResolving");class xT{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,n=ye.CancellationToken.None){if(this.profiler?.isActive("linking")){const r=this.profiler.createTask("linking",this.languageId);r.start();try{for(const i of en(e.parseResult.value))await Je(n),Hs(i).forEach(s=>{const a=`${i.$type}:${s.property}`;r.startSubTask(a);try{this.doLink(s,e)}finally{r.stopSubTask(a)}})}finally{r.stop()}}else for(const r of en(e.parseResult.value))await Je(n),Hs(r).forEach(i=>this.doLink(i,e))}doLink(e,n){const r=e.reference;if("_ref"in r&&r._ref===void 0){r._ref=or;try{const i=this.getCandidate(e);if(Jr(i))r._ref=i;else{r._nodeDescription=i;const s=this.loadAstNode(i);r._ref=s??this.createLinkingError(e,i)}}catch(i){console.error(`An error occurred while resolving reference to '${r.$refText}':`,i);const s=i.message??String(i);r._ref={info:e,message:`An error occurred while resolving reference to '${r.$refText}': ${s}`}}n.references.push(r)}else if("_items"in r&&r._items===void 0){r._items=or;try{const i=this.getCandidates(e),s=[];if(Jr(i))r._linkingError=i;else for(const a of i){const o=this.loadAstNode(a);o&&s.push({ref:o,$nodeDescription:a})}r._items=s}catch(i){r._linkingError={info:e,message:`An error occurred while resolving reference to '${r.$refText}': ${i}`},r._items=[]}n.references.push(r)}}unlink(e){for(const n of e.references)"_ref"in n?(n._ref=void 0,delete n._nodeDescription):"_items"in n&&(n._items=void 0,delete n._linkingError);e.references=[]}getCandidate(e){return this.scopeProvider.getScope(e).getElement(e.reference.$refText)??this.createLinkingError(e)}getCandidates(e){const r=this.scopeProvider.getScope(e).getElements(e.reference.$refText).distinct(i=>`${i.documentUri}#${i.path}`).toArray();return r.length>0?r:this.createLinkingError(e)}buildReference(e,n,r,i){const s=this,a={$refNode:r,$refText:i,_ref:void 0,get ref(){if(Ve(this._ref))return this._ref;if(hp(this._nodeDescription)){const o=s.loadAstNode(this._nodeDescription);this._ref=o??s.createLinkingError({reference:a,container:e,property:n},this._nodeDescription)}else if(this._ref===void 0){this._ref=or;const o=$s(e).$document,c=s.getLinkedNode({reference:a,container:e,property:n});if(c.error&&o&&o.state<Y.ComputedScopes)return this._ref=void 0;this._ref=c.node??c.error,this._nodeDescription=c.descr,o?.references.push(this)}else this._ref===or&&s.throwCyclicReferenceError(e,n,i);return Ve(this._ref)?this._ref:void 0},get $nodeDescription(){return this._nodeDescription},get error(){return Jr(this._ref)?this._ref:void 0}};return a}buildMultiReference(e,n,r,i){const s=this,a={$refNode:r,$refText:i,_items:void 0,get items(){if(Array.isArray(this._items))return this._items;if(this._items===void 0){this._items=or;const o=$s(e).$document,c=s.getCandidates({reference:a,container:e,property:n}),l=[];if(Jr(c))this._linkingError=c;else for(const u of c){const f=s.loadAstNode(u);f&&l.push({ref:f,$nodeDescription:u})}this._items=l,o?.references.push(this)}else this._items===or&&s.throwCyclicReferenceError(e,n,i);return Array.isArray(this._items)?this._items:[]},get error(){if(this._linkingError)return this._linkingError;if(!(this.items.length>0))return this._linkingError=s.createLinkingError({reference:a,container:e,property:n})}};return a}throwCyclicReferenceError(e,n,r){throw new Error(`Cyclic reference resolution detected: ${this.astNodeLocator.getAstNodePath(e)}/${n} (symbol '${r}')`)}getLinkedNode(e){try{const n=this.getCandidate(e);if(Jr(n))return{error:n};const r=this.loadAstNode(n);return r?{node:r,descr:n}:{descr:n,error:this.createLinkingError(e,n)}}catch(n){console.error(`An error occurred while resolving reference to '${e.reference.$refText}':`,n);const r=n.message??String(n);return{error:{info:e,message:`An error occurred while resolving reference to '${e.reference.$refText}': ${r}`}}}}loadAstNode(e){if(e.node)return e.node;const n=this.langiumDocuments().getDocument(e.documentUri);if(n)return this.astNodeLocator.getAstNode(n.parseResult.value,e.path)}createLinkingError(e,n){const r=$s(e.container).$document;r&&r.state<Y.ComputedScopes&&console.warn(`Attempted reference resolution before document reached ComputedScopes state (${r.uri}).`);const i=this.reflection.getReferenceType(e);return{info:e,message:`Could not resolve reference to ${i} named '${e.reference.$refText}'.`,targetDescription:n}}}function DT(t){return typeof t.name=="string"}class MT{getName(e){if(DT(e))return e.name}getNameNode(e){return qd(e.$cstNode,"name")}}class FT{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=en(e.Grammar).some(n=>va(n)&&n.isMulti)}findDeclarations(e){if(e){const n=im(e),r=e.astNode;if(n&&r){const i=r[n.feature];if(kt(i)||dn(i))return Rl(i);if(Array.isArray(i)){for(const s of i)if((kt(s)||dn(s))&&s.$refNode&&s.$refNode.offset<=e.offset&&s.$refNode.end>=e.end)return Rl(s)}}if(r){const i=this.nameProvider.getNameNode(r);if(i&&(i===e||xp(e,i)))return this.getSelfNodes(r)}}return[]}getSelfNodes(e){if(this.hasMultiReference){const n=this.index.findAllReferences(e,this.nodeLocator.getAstNodePath(e)),r=this.getNodeFromReferenceDescription(n.head());if(r){for(const i of Hs(r))if(dn(i.reference)&&i.reference.items.some(s=>s.ref===e))return i.reference.items.map(s=>s.ref)}return[e]}else return[e]}getNodeFromReferenceDescription(e){if(!e)return;const n=this.documents.getDocument(e.sourceUri);if(n)return this.nodeLocator.getAstNode(n.parseResult.value,e.sourcePath)}findDeclarationNodes(e){const n=this.findDeclarations(e),r=[];for(const i of n){const s=this.nameProvider.getNameNode(i)??i.$cstNode;s&&r.push(s)}return r}findReferences(e,n){const r=[];n.includeDeclaration&&r.push(...this.getSelfReferences(e));let i=this.index.findAllReferences(e,this.nodeLocator.getAstNodePath(e));return n.documentUri&&(i=i.filter(s=>dt.equals(s.sourceUri,n.documentUri))),r.push(...i),me(r)}getSelfReferences(e){const n=this.getSelfNodes(e),r=[];for(const i of n){const s=this.nameProvider.getNameNode(i);if(s){const a=Zt(i),o=this.nodeLocator.getAstNodePath(i);r.push({sourceUri:a.uri,sourcePath:o,targetUri:a.uri,targetPath:o,segment:Xs(s),local:!0})}}return r}}class Gi{constructor(e){if(this.map=new Map,e)for(const[n,r]of e)this.add(n,r)}get size(){return ro.sum(me(this.map.values()).map(e=>e.length))}clear(){this.map.clear()}delete(e,n){if(n===void 0)return this.map.delete(e);{const r=this.map.get(e);if(r){const i=r.indexOf(n);if(i>=0)return r.length===1?this.map.delete(e):r.splice(i,1),!0}return!1}}get(e){return this.map.get(e)??[]}getStream(e){const n=this.map.get(e);return n?me(n):Id}has(e,n){if(n===void 0)return this.map.has(e);{const r=this.map.get(e);return r?r.indexOf(n)>=0:!1}}add(e,n){return this.map.has(e)?this.map.get(e).push(n):this.map.set(e,[n]),this}addAll(e,n){return this.map.has(e)?this.map.get(e).push(...n):this.map.set(e,Array.from(n)),this}forEach(e){this.map.forEach((n,r)=>n.forEach(i=>e(i,r,this)))}[Symbol.iterator](){return this.entries().iterator()}entries(){return me(this.map.entries()).flatMap(([e,n])=>n.map(r=>[e,r]))}keys(){return me(this.map.keys())}values(){return me(this.map.values()).flat()}entriesGroupedByKey(){return me(this.map.entries())}}class uu{get size(){return this.map.size}constructor(e){if(this.map=new Map,this.inverse=new Map,e)for(const[n,r]of e)this.set(n,r)}clear(){this.map.clear(),this.inverse.clear()}set(e,n){return this.map.set(e,n),this.inverse.set(n,e),this}get(e){return this.map.get(e)}getKey(e){return this.inverse.get(e)}delete(e){const n=this.map.get(e);return n!==void 0?(this.map.delete(e),this.inverse.delete(n),!0):!1}}class GT{constructor(e){this.nameProvider=e.references.NameProvider,this.descriptions=e.workspace.AstNodeDescriptionProvider}async collectExportedSymbols(e,n=ye.CancellationToken.None){return this.collectExportedSymbolsForNode(e.parseResult.value,e,void 0,n)}async collectExportedSymbolsForNode(e,n,r=Vc,i=ye.CancellationToken.None){const s=[];this.addExportedSymbol(e,s,n);for(const a of r(e))await Je(i),this.addExportedSymbol(a,s,n);return s}addExportedSymbol(e,n,r){const i=this.nameProvider.getName(e);i&&n.push(this.descriptions.createDescription(e,i,r))}async collectLocalSymbols(e,n=ye.CancellationToken.None){const r=e.parseResult.value,i=new Gi;for(const s of ji(r))await Je(n),this.addLocalSymbol(s,e,i);return i}addLocalSymbol(e,n,r){const i=e.$container;if(i){const s=this.nameProvider.getName(e);s&&r.add(i,this.descriptions.createDescription(e,s,n))}}}class du{constructor(e,n,r){this.elements=e,this.outerScope=n,this.caseInsensitive=r?.caseInsensitive??!1,this.concatOuterScope=r?.concatOuterScope??!0}getAllElements(){return this.outerScope?this.elements.concat(this.outerScope.getAllElements()):this.elements}getElement(e){const n=this.caseInsensitive?e.toLowerCase():e,r=this.caseInsensitive?this.elements.find(i=>i.name.toLowerCase()===n):this.elements.find(i=>i.name===e);if(r)return r;if(this.outerScope)return this.outerScope.getElement(e)}getElements(e){const n=this.caseInsensitive?e.toLowerCase():e,r=this.caseInsensitive?this.elements.filter(i=>i.name.toLowerCase()===n):this.elements.filter(i=>i.name===e);return(this.concatOuterScope||r.isEmpty())&&this.outerScope?r.concat(this.outerScope.getElements(e)):r}}class UT{constructor(e,n,r){this.elements=new Gi,this.caseInsensitive=r?.caseInsensitive??!1,this.concatOuterScope=r?.concatOuterScope??!0;for(const i of e){const s=this.caseInsensitive?i.name.toLowerCase():i.name;this.elements.add(s,i)}this.outerScope=n}getElement(e){const n=this.caseInsensitive?e.toLowerCase():e,r=this.elements.get(n)[0];if(r)return r;if(this.outerScope)return this.outerScope.getElement(e)}getElements(e){const n=this.caseInsensitive?e.toLowerCase():e,r=this.elements.get(n);return(this.concatOuterScope||r.length===0)&&this.outerScope?me(r).concat(this.outerScope.getElements(e)):me(r)}getAllElements(){let e=me(this.elements.values());return this.outerScope&&(e=e.concat(this.outerScope.getAllElements())),e}}class Zf{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 new Error("This cache has already been disposed")}}class qT extends Zf{constructor(){super(...arguments),this.cache=new Map}has(e){return this.throwIfDisposed(),this.cache.has(e)}set(e,n){this.throwIfDisposed(),this.cache.set(e,n)}get(e,n){if(this.throwIfDisposed(),this.cache.has(e))return this.cache.get(e);if(n){const r=n();return this.cache.set(e,r),r}else return}delete(e){return this.throwIfDisposed(),this.cache.delete(e)}clear(){this.throwIfDisposed(),this.cache.clear()}}class jT extends Zf{constructor(e){super(),this.cache=new Map,this.converter=e??(n=>n)}has(e,n){return this.throwIfDisposed(),this.cacheForContext(e).has(n)}set(e,n,r){this.throwIfDisposed(),this.cacheForContext(e).set(n,r)}get(e,n,r){this.throwIfDisposed();const i=this.cacheForContext(e);if(i.has(n))return i.get(n);if(r){const s=r();return i.set(n,s),s}else return}delete(e,n){return this.throwIfDisposed(),this.cacheForContext(e).delete(n)}clear(e){if(this.throwIfDisposed(),e){const n=this.converter(e);this.cache.delete(n)}else this.cache.clear()}cacheForContext(e){const n=this.converter(e);let r=this.cache.get(n);return r||(r=new Map,this.cache.set(n,r)),r}}class zT extends qT{constructor(e,n){super(),n?(this.toDispose.push(e.workspace.DocumentBuilder.onBuildPhase(n,()=>{this.clear()})),this.toDispose.push(e.workspace.DocumentBuilder.onUpdate((r,i)=>{i.length>0&&this.clear()}))):this.toDispose.push(e.workspace.DocumentBuilder.onUpdate(()=>{this.clear()}))}}class BT{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 zT(e.shared)}getScope(e){const n=[],r=this.reflection.getReferenceType(e),i=Zt(e.container).localSymbols;if(i){let a=e.container;do i.has(a)&&n.push(i.getStream(a).filter(o=>this.reflection.isSubtype(o.type,r))),a=a.$container;while(a)}let s=this.getGlobalScope(r,e);for(let a=n.length-1;a>=0;a--)s=this.createScope(n[a],s);return s}createScope(e,n,r){return new du(me(e),n,r)}createScopeForNodes(e,n,r){const i=me(e).map(s=>{const a=this.nameProvider.getName(s);if(a)return this.descriptions.createDescription(s,a)}).nonNullable();return new du(i,n,r)}getGlobalScope(e,n){return this.globalScopeCache.get(e,()=>new UT(this.indexManager.allElements(e)))}}function WT(t){return typeof t.$comment=="string"}function fu(t){return typeof t=="object"&&!!t&&("$ref"in t||"$error"in t)}class VT{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,n){const r=n??{},i=n?.replacer,s=(o,c)=>this.replacer(o,c,r),a=i?(o,c)=>i(o,c,s):s;try{return this.currentDocument=Zt(e),JSON.stringify(e,a,n?.space)}finally{this.currentDocument=void 0}}deserialize(e,n){const r=n??{},i=JSON.parse(e);return this.linkNode(i,i,r),i}replacer(e,n,{refText:r,sourceText:i,textRegions:s,comments:a,uriConverter:o}){if(!this.ignoreProperties.has(e))if(kt(n)){const c=n.ref,l=r?n.$refText:void 0;if(c){const u=Zt(c);let f="";this.currentDocument&&this.currentDocument!==u&&(o?f=o(u.uri,c):f=u.uri.toString());const m=this.astNodeLocator.getAstNodePath(c);return{$ref:`${f}#${m}`,$refText:l}}else return{$error:n.error?.message??"Could not resolve reference",$refText:l}}else if(dn(n)){const c=r?n.$refText:void 0,l=[];for(const u of n.items){const f=u.ref,m=Zt(u.ref);let p="";this.currentDocument&&this.currentDocument!==m&&(o?p=o(m.uri,f):p=m.uri.toString());const A=this.astNodeLocator.getAstNodePath(f);l.push(`${p}#${A}`)}return{$refs:l,$refText:c}}else if(Ve(n)){let c;if(s&&(c=this.addAstNodeRegionWithAssignmentsTo({...n}),(!e||n.$document)&&c?.$textRegion&&(c.$textRegion.documentURI=this.currentDocument?.uri.toString())),i&&!e&&(c??(c={...n}),c.$sourceText=n.$cstNode?.text),a){c??(c={...n});const l=this.commentProvider.getComment(n);l&&(c.$comment=l.replace(/\r/g,""))}return c??n}else return n}addAstNodeRegionWithAssignmentsTo(e){const n=r=>({offset:r.offset,end:r.end,length:r.length,range:r.range});if(e.$cstNode){const r=e.$textRegion=n(e.$cstNode),i=r.assignments={};return Object.keys(e).filter(s=>!s.startsWith("$")).forEach(s=>{const a=tm(e.$cstNode,s).map(n);a.length!==0&&(i[s]=a)}),e}}linkNode(e,n,r,i,s,a){for(const[c,l]of Object.entries(e))if(Array.isArray(l))for(let u=0;u<l.length;u++){const f=l[u];fu(f)?l[u]=this.reviveReference(e,c,n,f,r):Ve(f)&&this.linkNode(f,n,r,e,c,u)}else fu(l)?e[c]=this.reviveReference(e,c,n,l,r):Ve(l)&&this.linkNode(l,n,r,e,c);const o=e;o.$container=i,o.$containerProperty=s,o.$containerIndex=a}reviveReference(e,n,r,i,s){let a=i.$refText,o=i.$error,c;if(i.$ref){const l=this.getRefNode(r,i.$ref,s.uriConverter);if(Ve(l))return a||(a=this.nameProvider.getName(l)),{$refText:a??"",ref:l};o=l}else if(i.$refs){const l=[];for(const u of i.$refs){const f=this.getRefNode(r,u,s.uriConverter);Ve(f)&&l.push({ref:f})}if(l.length===0)c={$refText:a??"",items:l},o??(o="Could not resolve multi-reference");else return{$refText:a??"",items:l}}if(o)return c??(c={$refText:a??"",ref:void 0}),c.error={info:{container:e,property:n,reference:c},message:o},c}getRefNode(e,n,r){try{const i=n.indexOf("#");if(i===0){const c=this.astNodeLocator.getAstNode(e,n.substring(1));return c||"Could not resolve path: "+n}if(i<0){const c=r?r(n):bt.parse(n),l=this.langiumDocuments.getDocument(c);return l?l.parseResult.value:"Could not find document for URI: "+n}const s=r?r(n.substring(0,i)):bt.parse(n.substring(0,i)),a=this.langiumDocuments.getDocument(s);if(!a)return"Could not find document for URI: "+n;if(i===n.length-1)return a.parseResult.value;const o=this.astNodeLocator.getAstNode(a.parseResult.value,n.substring(i+1));return o||"Could not resolve URI: "+n}catch(i){return String(i)}}}class KT{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){const n=e.LanguageMetaData;for(const r of n.fileExtensions)this.fileExtensionMap.has(r)&&console.warn(`The file extension ${r} is used by multiple languages. It is now assigned to '${n.languageId}'.`),this.fileExtensionMap.set(r,e);if(n.fileNames)for(const r of n.fileNames)this.fileNameMap.has(r)&&console.warn(`The file name ${r} is used by multiple languages. It is now assigned to '${n.languageId}'.`),this.fileNameMap.set(r,e);this.languageIdMap.set(n.languageId,e)}getServices(e){if(this.languageIdMap.size===0)throw new Error("The service registry is empty. Use `register` to register the services of a language.");const n=this.textDocuments?.get(e)?.languageId;if(n!==void 0){const a=this.languageIdMap.get(n);if(a)return a}const r=dt.extname(e),i=dt.basename(e),s=this.fileNameMap.get(i)??this.fileExtensionMap.get(r);if(!s)throw n?new Error(`The service registry contains no services for the extension '${r}' for language '${n}'.`):new Error(`The service registry contains no services for the extension '${r}'.`);return s}hasServices(e){try{return this.getServices(e),!0}catch{return!1}}get all(){return Array.from(this.languageIdMap.values())}}function Ci(t){return{code:t}}var Ic;(function(t){t.defaults=["fast","slow","built-in"],t.all=t.defaults})(Ic||(Ic={}));class HT{constructor(e){this.entries=new Gi,this.knownCategories=new Set(Ic.defaults),this.entriesBefore=[],this.entriesAfter=[],this.reflection=e.shared.AstReflection}register(e,n=this,r="fast"){if(r==="built-in")throw new Error("The 'built-in' category is reserved for lexer, parser, and linker errors.");this.knownCategories.add(r);for(const[i,s]of Object.entries(e)){const a=s;if(Array.isArray(a))for(const o of a){const c={check:this.wrapValidationException(o,n),category:r};this.addEntry(i,c)}else if(typeof a=="function"){const o={check:this.wrapValidationException(a,n),category:r};this.addEntry(i,o)}else Bi()}}wrapValidationException(e,n){return async(r,i,s)=>{await this.handleException(()=>e.call(n,r,i,s),"An error occurred during validation",i,r)}}async handleException(e,n,r,i){try{await e()}catch(s){if(Ia(s))throw s;console.error(`${n}:`,s),s instanceof Error&&s.stack&&console.error(s.stack);const a=s instanceof Error?s.message:String(s);r("error",`${n}: ${a}`,{node:i})}}addEntry(e,n){if(e==="AstNode"){this.entries.add("AstNode",n);return}for(const r of this.reflection.getAllSubTypes(e))this.entries.add(r,n)}getChecks(e,n){let r=me(this.entries.get(e)).concat(this.entries.get("AstNode"));return n&&(r=r.filter(i=>n.includes(i.category))),r.map(i=>i.check)}registerBeforeDocument(e,n=this){this.entriesBefore.push(this.wrapPreparationException(e,"An error occurred during set-up of the validation",n))}registerAfterDocument(e,n=this){this.entriesAfter.push(this.wrapPreparationException(e,"An error occurred during tear-down of the validation",n))}wrapPreparationException(e,n,r){return async(i,s,a,o)=>{await this.handleException(()=>e.call(r,i,s,a,o),n,s,i)}}get checksBefore(){return this.entriesBefore}get checksAfter(){return this.entriesAfter}getAllValidationCategories(e){return this.knownCategories}}const YT=Object.freeze({validateNode:!0,validateChildren:!0});class XT{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,n={},r=ye.CancellationToken.None){const i=e.parseResult,s=[];if(await Je(r),(!n.categories||n.categories.includes("built-in"))&&(this.processLexingErrors(i,s,n),n.stopAfterLexingErrors&&s.some(a=>a.data?.code===St.LexingError)||(this.processParsingErrors(i,s,n),n.stopAfterParsingErrors&&s.some(a=>a.data?.code===St.ParsingError))||(this.processLinkingErrors(e,s,n),n.stopAfterLinkingErrors&&s.some(a=>a.data?.code===St.LinkingError))))return s;try{s.push(...await this.validateAst(i.value,n,r))}catch(a){if(Ia(a))throw a;console.error("An error occurred during validation:",a)}return await Je(r),s}processLexingErrors(e,n,r){const i=[...e.lexerErrors,...e.lexerReport?.diagnostics??[]];for(const s of i){const a=s.severity??"error",o={severity:Ba(a),range:{start:{line:s.line-1,character:s.column-1},end:{line:s.line-1,character:s.column+s.length-1}},message:s.message,data:QT(a),source:this.getSource()};n.push(o)}}processParsingErrors(e,n,r){for(const i of e.parserErrors){let s;if(isNaN(i.token.startOffset)){if("previousToken"in i){const a=i.previousToken;if(isNaN(a.startOffset)){const o={line:0,character:0};s={start:o,end:o}}else{const o={line:a.endLine-1,character:a.endColumn};s={start:o,end:o}}}}else s=ho(i.token);if(s){const a={severity:Ba("error"),range:s,message:i.message,data:Ci(St.ParsingError),source:this.getSource()};n.push(a)}}}processLinkingErrors(e,n,r){for(const i of e.references){const s=i.error;if(s){const a={node:s.info.container,range:i.$refNode?.range,property:s.info.property,index:s.info.index,data:{code:St.LinkingError,containerType:s.info.container.$type,property:s.info.property,refText:s.info.reference.$refText}};n.push(this.toDiagnostic("error",s.message,a))}}}async validateAst(e,n,r=ye.CancellationToken.None){const i=[],s=(a,o,c)=>{i.push(this.toDiagnostic(a,o,c))};return await this.validateAstBefore(e,n,s,r),await this.validateAstNodes(e,n,s,r),await this.validateAstAfter(e,n,s,r),i}async validateAstBefore(e,n,r,i=ye.CancellationToken.None){const s=this.validationRegistry.checksBefore;for(const a of s)await Je(i),await a(e,r,n.categories??[],i)}async validateAstNodes(e,n,r,i=ye.CancellationToken.None){if(this.profiler?.isActive("validating")){const s=this.profiler.createTask("validating",this.languageId);s.start();try{const a=en(e).iterator();for(const o of a){s.startSubTask(o.$type);const c=this.validateSingleNodeOptions(o,n);if(c.validateNode)try{const l=this.validationRegistry.getChecks(o.$type,n.categories);for(const u of l)await u(o,r,i)}finally{s.stopSubTask(o.$type)}c.validateChildren||a.prune()}}finally{s.stop()}}else{const s=en(e).iterator();for(const a of s){await Je(i);const o=this.validateSingleNodeOptions(a,n);if(o.validateNode){const c=this.validationRegistry.getChecks(a.$type,n.categories);for(const l of c)await l(a,r,i)}o.validateChildren||s.prune()}}}validateSingleNodeOptions(e,n){return YT}async validateAstAfter(e,n,r,i=ye.CancellationToken.None){const s=this.validationRegistry.checksAfter;for(const a of s)await Je(i),await a(e,r,n.categories??[],i)}toDiagnostic(e,n,r){return{message:n,range:JT(r),severity:Ba(e),code:r.code,codeDescription:r.codeDescription,tags:r.tags,relatedInformation:r.relatedInformation,data:r.data,source:this.getSource()}}getSource(){return this.metadata.languageId}}function JT(t){if(t.range)return t.range;let e;return typeof t.property=="string"?e=qd(t.node.$cstNode,t.property,t.index):typeof t.keyword=="string"&&(e=nm(t.node.$cstNode,t.keyword,t.index)),e??(e=t.node.$cstNode),e?e.range:{start:{line:0,character:0},end:{line:0,character:0}}}function Ba(t){switch(t){case"error":return 1;case"warning":return 2;case"info":return 3;case"hint":return 4;default:throw new Error("Invalid diagnostic severity: "+t)}}function QT(t){switch(t){case"error":return Ci(St.LexingError);case"warning":return Ci(St.LexingWarning);case"info":return Ci(St.LexingInfo);case"hint":return Ci(St.LexingHint);default:throw new Error("Invalid diagnostic severity: "+t)}}var St;(function(t){t.LexingError="lexing-error",t.LexingWarning="lexing-warning",t.LexingInfo="lexing-info",t.LexingHint="lexing-hint",t.ParsingError="parsing-error",t.LinkingError="linking-error"})(St||(St={}));class ZT{constructor(e){this.astNodeLocator=e.workspace.AstNodeLocator,this.nameProvider=e.references.NameProvider}createDescription(e,n,r){const i=r??Zt(e);n??(n=this.nameProvider.getName(e));const s=this.astNodeLocator.getAstNodePath(e);if(!n)throw new Error(`Node at path ${s} has no name.`);let a;const o=()=>a??(a=Xs(this.nameProvider.getNameNode(e)??e.$cstNode));return{node:e,name:n,get nameSegment(){return o()},selectionSegment:Xs(e.$cstNode),type:e.$type,documentUri:i.uri,path:s}}}class eR{constructor(e){this.nodeLocator=e.workspace.AstNodeLocator}async createDescriptions(e,n=ye.CancellationToken.None){const r=[],i=e.parseResult.value;for(const s of en(i))await Je(n),Hs(s).forEach(a=>{a.reference.error||r.push(...this.createInfoDescriptions(a))});return r}createInfoDescriptions(e){const n=e.reference;if(n.error||!n.$refNode)return[];let r=[];kt(n)&&n.$nodeDescription?r=[n.$nodeDescription]:dn(n)&&(r=n.items.map(c=>c.$nodeDescription).filter(c=>c!==void 0));const i=Zt(e.container).uri,s=this.nodeLocator.getAstNodePath(e.container),a=[],o=Xs(n.$refNode);for(const c of r)a.push({sourceUri:i,sourcePath:s,targetUri:c.documentUri,targetPath:c.path,segment:o,local:dt.equals(c.documentUri,i)});return a}}class tR{constructor(){this.segmentSeparator="/",this.indexSeparator="@"}getAstNodePath(e){if(e.$container){const n=this.getAstNodePath(e.$container),r=this.getPathSegment(e);return n+this.segmentSeparator+r}return""}getPathSegment({$containerProperty:e,$containerIndex:n}){if(!e)throw new Error("Missing '$containerProperty' in AST node.");return n!==void 0?e+this.indexSeparator+n:e}getAstNode(e,n){return n.split(this.segmentSeparator).reduce((i,s)=>{if(!i||s.length===0)return i;const a=s.indexOf(this.indexSeparator);if(a>0){const o=s.substring(0,a),c=parseInt(s.substring(a+1));return i[o]?.[c]}return i[s]},e)}}var nR=Yf();class rR{constructor(e){this._ready=new ul,this.onConfigurationSectionUpdateEmitter=new nR.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){const n=this.serviceRegistry.all;e.register({section:n.map(r=>this.toSectionName(r.LanguageMetaData.languageId))})}if(e.fetchConfiguration){const n=this.serviceRegistry.all.map(i=>({section:this.toSectionName(i.LanguageMetaData.languageId)})),r=await e.fetchConfiguration(n);n.forEach((i,s)=>{this.updateSectionConfiguration(i.section,r[s])})}}this._ready.resolve()}updateConfiguration(e){typeof e.settings!="object"||e.settings===null||Object.entries(e.settings).forEach(([n,r])=>{this.updateSectionConfiguration(n,r),this.onConfigurationSectionUpdateEmitter.fire({section:n,configuration:r})})}updateSectionConfiguration(e,n){this.settings[e]=n}async getConfiguration(e,n){await this.ready;const r=this.toSectionName(e);if(this.settings[r])return this.settings[r][n]}toSectionName(e){return`${e}`}get onConfigurationSectionUpdate(){return this.onConfigurationSectionUpdateEmitter.event}}var bn={},_n={},Cs={},Wa={},U={},Me={},hu;function Xi(){if(hu)return Me;hu=1,Object.defineProperty(Me,"__esModule",{value:!0}),Me.stringArray=Me.array=Me.func=Me.error=Me.number=Me.string=Me.boolean=void 0;function t(o){return o===!0||o===!1}Me.boolean=t;function e(o){return typeof o=="string"||o instanceof String}Me.string=e;function n(o){return typeof o=="number"||o instanceof Number}Me.number=n;function r(o){return o instanceof Error}Me.error=r;function i(o){return typeof o=="function"}Me.func=i;function s(o){return Array.isArray(o)}Me.array=s;function a(o){return s(o)&&o.every(c=>e(c))}return Me.stringArray=a,Me}var pu;function eh(){if(pu)return U;pu=1,Object.defineProperty(U,"__esModule",{value:!0}),U.Message=U.NotificationType9=U.NotificationType8=U.NotificationType7=U.NotificationType6=U.NotificationType5=U.NotificationType4=U.NotificationType3=U.NotificationType2=U.NotificationType1=U.NotificationType0=U.NotificationType=U.RequestType9=U.RequestType8=U.RequestType7=U.RequestType6=U.RequestType5=U.RequestType4=U.RequestType3=U.RequestType2=U.RequestType1=U.RequestType=U.RequestType0=U.AbstractMessageSignature=U.ParameterStructures=U.ResponseError=U.ErrorCodes=void 0;const t=Xi();var e;(function(T){T.ParseError=-32700,T.InvalidRequest=-32600,T.MethodNotFound=-32601,T.InvalidParams=-32602,T.InternalError=-32603,T.jsonrpcReservedErrorRangeStart=-32099,T.serverErrorStart=-32099,T.MessageWriteError=-32099,T.MessageReadError=-32098,T.PendingResponseRejected=-32097,T.ConnectionInactive=-32096,T.ServerNotInitialized=-32002,T.UnknownErrorCode=-32001,T.jsonrpcReservedErrorRangeEnd=-32e3,T.serverErrorEnd=-32e3})(e||(U.ErrorCodes=e={}));class n extends Error{constructor(g,S,y){super(S),this.code=t.number(g)?g:e.UnknownErrorCode,this.data=y,Object.setPrototypeOf(this,n.prototype)}toJson(){const g={code:this.code,message:this.message};return this.data!==void 0&&(g.data=this.data),g}}U.ResponseError=n;class r{constructor(g){this.kind=g}static is(g){return g===r.auto||g===r.byName||g===r.byPosition}toString(){return this.kind}}U.ParameterStructures=r,r.auto=new r("auto"),r.byPosition=new r("byPosition"),r.byName=new r("byName");class i{constructor(g,S){this.method=g,this.numberOfParams=S}get parameterStructures(){return r.auto}}U.AbstractMessageSignature=i;class s extends i{constructor(g){super(g,0)}}U.RequestType0=s;class a extends i{constructor(g,S=r.auto){super(g,1),this._parameterStructures=S}get parameterStructures(){return this._parameterStructures}}U.RequestType=a;class o extends i{constructor(g,S=r.auto){super(g,1),this._parameterStructures=S}get parameterStructures(){return this._parameterStructures}}U.RequestType1=o;class c extends i{constructor(g){super(g,2)}}U.RequestType2=c;class l extends i{constructor(g){super(g,3)}}U.RequestType3=l;class u extends i{constructor(g){super(g,4)}}U.RequestType4=u;class f extends i{constructor(g){super(g,5)}}U.RequestType5=f;class m extends i{constructor(g){super(g,6)}}U.RequestType6=m;class p extends i{constructor(g){super(g,7)}}U.RequestType7=p;class A extends i{constructor(g){super(g,8)}}U.RequestType8=A;class N extends i{constructor(g){super(g,9)}}U.RequestType9=N;class I extends i{constructor(g,S=r.auto){super(g,1),this._parameterStructures=S}get parameterStructures(){return this._parameterStructures}}U.NotificationType=I;class C extends i{constructor(g){super(g,0)}}U.NotificationType0=C;class b extends i{constructor(g,S=r.auto){super(g,1),this._parameterStructures=S}get parameterStructures(){return this._parameterStructures}}U.NotificationType1=b;class k extends i{constructor(g){super(g,2)}}U.NotificationType2=k;class P extends i{constructor(g){super(g,3)}}U.NotificationType3=P;class H extends i{constructor(g){super(g,4)}}U.NotificationType4=H;class K extends i{constructor(g){super(g,5)}}U.NotificationType5=K;class J extends i{constructor(g){super(g,6)}}U.NotificationType6=J;class oe extends i{constructor(g){super(g,7)}}U.NotificationType7=oe;class ue extends i{constructor(g){super(g,8)}}U.NotificationType8=ue;class de extends i{constructor(g){super(g,9)}}U.NotificationType9=de;var w;return(function(T){function g(R){const E=R;return E&&t.string(E.method)&&(t.string(E.id)||t.number(E.id))}T.isRequest=g;function S(R){const E=R;return E&&t.string(E.method)&&R.id===void 0}T.isNotification=S;function y(R){const E=R;return E&&(E.result!==void 0||!!E.error)&&(t.string(E.id)||t.number(E.id)||E.id===null)}T.isResponse=y})(w||(U.Message=w={})),U}var Gt={},mu;function th(){if(mu)return Gt;mu=1;var t;Object.defineProperty(Gt,"__esModule",{value:!0}),Gt.LRUCache=Gt.LinkedMap=Gt.Touch=void 0;var e;(function(i){i.None=0,i.First=1,i.AsOld=i.First,i.Last=2,i.AsNew=i.Last})(e||(Gt.Touch=e={}));class n{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(s){return this._map.has(s)}get(s,a=e.None){const o=this._map.get(s);if(o)return a!==e.None&&this.touch(o,a),o.value}set(s,a,o=e.None){let c=this._map.get(s);if(c)c.value=a,o!==e.None&&this.touch(c,o);else{switch(c={key:s,value:a,next:void 0,previous:void 0},o){case e.None:this.addItemLast(c);break;case e.First:this.addItemFirst(c);break;case e.Last:this.addItemLast(c);break;default:this.addItemLast(c);break}this._map.set(s,c),this._size++}return this}delete(s){return!!this.remove(s)}remove(s){const a=this._map.get(s);if(a)return this._map.delete(s),this.removeItem(a),this._size--,a.value}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw new Error("Invalid list");const s=this._head;return this._map.delete(s.key),this.removeItem(s),this._size--,s.value}forEach(s,a){const o=this._state;let c=this._head;for(;c;){if(a?s.bind(a)(c.value,c.key,this):s(c.value,c.key,this),this._state!==o)throw new Error("LinkedMap got modified during iteration.");c=c.next}}keys(){const s=this._state;let a=this._head;const o={[Symbol.iterator]:()=>o,next:()=>{if(this._state!==s)throw new Error("LinkedMap got modified during iteration.");if(a){const c={value:a.key,done:!1};return a=a.next,c}else return{value:void 0,done:!0}}};return o}values(){const s=this._state;let a=this._head;const o={[Symbol.iterator]:()=>o,next:()=>{if(this._state!==s)throw new Error("LinkedMap got modified during iteration.");if(a){const c={value:a.value,done:!1};return a=a.next,c}else return{value:void 0,done:!0}}};return o}entries(){const s=this._state;let a=this._head;const o={[Symbol.iterator]:()=>o,next:()=>{if(this._state!==s)throw new Error("LinkedMap got modified during iteration.");if(a){const c={value:[a.key,a.value],done:!1};return a=a.next,c}else return{value:void 0,done:!0}}};return o}[(t=Symbol.toStringTag,Symbol.iterator)](){return this.entries()}trimOld(s){if(s>=this.size)return;if(s===0){this.clear();return}let a=this._head,o=this.size;for(;a&&o>s;)this._map.delete(a.key),a=a.next,o--;this._head=a,this._size=o,a&&(a.previous=void 0),this._state++}addItemFirst(s){if(!this._head&&!this._tail)this._tail=s;else if(this._head)s.next=this._head,this._head.previous=s;else throw new Error("Invalid list");this._head=s,this._state++}addItemLast(s){if(!this._head&&!this._tail)this._head=s;else if(this._tail)s.previous=this._tail,this._tail.next=s;else throw new Error("Invalid list");this._tail=s,this._state++}removeItem(s){if(s===this._head&&s===this._tail)this._head=void 0,this._tail=void 0;else if(s===this._head){if(!s.next)throw new Error("Invalid list");s.next.previous=void 0,this._head=s.next}else if(s===this._tail){if(!s.previous)throw new Error("Invalid list");s.previous.next=void 0,this._tail=s.previous}else{const a=s.next,o=s.previous;if(!a||!o)throw new Error("Invalid list");a.previous=o,o.next=a}s.next=void 0,s.previous=void 0,this._state++}touch(s,a){if(!this._head||!this._tail)throw new Error("Invalid list");if(!(a!==e.First&&a!==e.Last)){if(a===e.First){if(s===this._head)return;const o=s.next,c=s.previous;s===this._tail?(c.next=void 0,this._tail=c):(o.previous=c,c.next=o),s.previous=void 0,s.next=this._head,this._head.previous=s,this._head=s,this._state++}else if(a===e.Last){if(s===this._tail)return;const o=s.next,c=s.previous;s===this._head?(o.previous=void 0,this._head=o):(o.previous=c,c.next=o),s.next=void 0,s.previous=this._tail,this._tail.next=s,this._tail=s,this._state++}}}toJSON(){const s=[];return this.forEach((a,o)=>{s.push([o,a])}),s}fromJSON(s){this.clear();for(const[a,o]of s)this.set(a,o)}}Gt.LinkedMap=n;class r extends n{constructor(s,a=1){super(),this._limit=s,this._ratio=Math.min(Math.max(0,a),1)}get limit(){return this._limit}set limit(s){this._limit=s,this.checkTrim()}get ratio(){return this._ratio}set ratio(s){this._ratio=Math.min(Math.max(0,s),1),this.checkTrim()}get(s,a=e.AsNew){return super.get(s,a)}peek(s){return super.get(s,e.None)}set(s,a){return super.set(s,a,e.Last),this.checkTrim(),this}checkTrim(){this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))}}return Gt.LRUCache=r,Gt}var ii={},gu;function iR(){if(gu)return ii;gu=1,Object.defineProperty(ii,"__esModule",{value:!0}),ii.Disposable=void 0;var t;return(function(e){function n(r){return{dispose:r}}e.create=n})(t||(ii.Disposable=t={})),ii}var Nn={},bs={},yu;function er(){if(yu)return bs;yu=1,Object.defineProperty(bs,"__esModule",{value:!0});let t;function e(){if(t===void 0)throw new Error("No runtime abstraction layer installed");return t}return(function(n){function r(i){if(i===void 0)throw new Error("No runtime abstraction layer provided");t=i}n.install=r})(e||(e={})),bs.default=e,bs}var Tu;function Ji(){if(Tu)return Nn;Tu=1,Object.defineProperty(Nn,"__esModule",{value:!0}),Nn.Emitter=Nn.Event=void 0;const t=er();var e;(function(i){const s={dispose(){}};i.None=function(){return s}})(e||(Nn.Event=e={}));class n{add(s,a=null,o){this._callbacks||(this._callbacks=[],this._contexts=[]),this._callbacks.push(s),this._contexts.push(a),Array.isArray(o)&&o.push({dispose:()=>this.remove(s,a)})}remove(s,a=null){if(!this._callbacks)return;let o=!1;for(let c=0,l=this._callbacks.length;c<l;c++)if(this._callbacks[c]===s)if(this._contexts[c]===a){this._callbacks.splice(c,1),this._contexts.splice(c,1);return}else o=!0;if(o)throw new Error("When adding a listener with a context, you should remove it with the same context")}invoke(...s){if(!this._callbacks)return[];const a=[],o=this._callbacks.slice(0),c=this._contexts.slice(0);for(let l=0,u=o.length;l<u;l++)try{a.push(o[l].apply(c[l],s))}catch(f){(0,t.default)().console.error(f)}return a}isEmpty(){return!this._callbacks||this._callbacks.length===0}dispose(){this._callbacks=void 0,this._contexts=void 0}}class r{constructor(s){this._options=s}get event(){return this._event||(this._event=(s,a,o)=>{this._callbacks||(this._callbacks=new n),this._options&&this._options.onFirstListenerAdd&&this._callbacks.isEmpty()&&this._options.onFirstListenerAdd(this),this._callbacks.add(s,a);const c={dispose:()=>{this._callbacks&&(this._callbacks.remove(s,a),c.dispose=r._noop,this._options&&this._options.onLastListenerRemove&&this._callbacks.isEmpty()&&this._options.onLastListenerRemove(this))}};return Array.isArray(o)&&o.push(c),c}),this._event}fire(s){this._callbacks&&this._callbacks.invoke.call(this._callbacks,s)}dispose(){this._callbacks&&(this._callbacks.dispose(),this._callbacks=void 0)}}return Nn.Emitter=r,r._noop=function(){},Nn}var wn={},Ru;function dl(){if(Ru)return wn;Ru=1,Object.defineProperty(wn,"__esModule",{value:!0}),wn.CancellationTokenSource=wn.CancellationToken=void 0;const t=er(),e=Xi(),n=Ji();var r;(function(o){o.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:n.Event.None}),o.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:n.Event.None});function c(l){const u=l;return u&&(u===o.None||u===o.Cancelled||e.boolean(u.isCancellationRequested)&&!!u.onCancellationRequested)}o.is=c})(r||(wn.CancellationToken=r={}));const i=Object.freeze(function(o,c){const l=(0,t.default)().timer.setTimeout(o.bind(c),0);return{dispose(){l.dispose()}}});class s{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?i:(this._emitter||(this._emitter=new n.Emitter),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=void 0)}}class a{get token(){return this._token||(this._token=new s),this._token}cancel(){this._token?this._token.cancel():this._token=r.Cancelled}dispose(){this._token?this._token instanceof s&&this._token.dispose():this._token=r.None}}return wn.CancellationTokenSource=a,wn}var In={},vu;function sR(){if(vu)return In;vu=1,Object.defineProperty(In,"__esModule",{value:!0}),In.SharedArrayReceiverStrategy=In.SharedArraySenderStrategy=void 0;const t=dl();var e;(function(a){a.Continue=0,a.Cancelled=1})(e||(e={}));class n{constructor(){this.buffers=new Map}enableCancellation(o){if(o.id===null)return;const c=new SharedArrayBuffer(4),l=new Int32Array(c,0,1);l[0]=e.Continue,this.buffers.set(o.id,c),o.$cancellationData=c}async sendCancellation(o,c){const l=this.buffers.get(c);if(l===void 0)return;const u=new Int32Array(l,0,1);Atomics.store(u,0,e.Cancelled)}cleanup(o){this.buffers.delete(o)}dispose(){this.buffers.clear()}}In.SharedArraySenderStrategy=n;class r{constructor(o){this.data=new Int32Array(o,0,1)}get isCancellationRequested(){return Atomics.load(this.data,0)===e.Cancelled}get onCancellationRequested(){throw new Error("Cancellation over SharedArrayBuffer doesn't support cancellation events")}}class i{constructor(o){this.token=new r(o)}cancel(){}dispose(){}}class s{constructor(){this.kind="request"}createCancellationTokenSource(o){const c=o.$cancellationData;return c===void 0?new t.CancellationTokenSource:new i(c)}}return In.SharedArrayReceiverStrategy=s,In}var Ut={},si={},Eu;function nh(){if(Eu)return si;Eu=1,Object.defineProperty(si,"__esModule",{value:!0}),si.Semaphore=void 0;const t=er();class e{constructor(r=1){if(r<=0)throw new Error("Capacity must be greater than 0");this._capacity=r,this._active=0,this._waiting=[]}lock(r){return new Promise((i,s)=>{this._waiting.push({thunk:r,resolve:i,reject:s}),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;const r=this._waiting.shift();if(this._active++,this._active>this._capacity)throw new Error("To many thunks active");try{const i=r.thunk();i instanceof Promise?i.then(s=>{this._active--,r.resolve(s),this.runNext()},s=>{this._active--,r.reject(s),this.runNext()}):(this._active--,r.resolve(i),this.runNext())}catch(i){this._active--,r.reject(i),this.runNext()}}}return si.Semaphore=e,si}var Au;function aR(){if(Au)return Ut;Au=1,Object.defineProperty(Ut,"__esModule",{value:!0}),Ut.ReadableStreamMessageReader=Ut.AbstractMessageReader=Ut.MessageReader=void 0;const t=er(),e=Xi(),n=Ji(),r=nh();var i;(function(c){function l(u){let f=u;return f&&e.func(f.listen)&&e.func(f.dispose)&&e.func(f.onError)&&e.func(f.onClose)&&e.func(f.onPartialMessage)}c.is=l})(i||(Ut.MessageReader=i={}));class s{constructor(){this.errorEmitter=new n.Emitter,this.closeEmitter=new n.Emitter,this.partialMessageEmitter=new n.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose()}get onError(){return this.errorEmitter.event}fireError(l){this.errorEmitter.fire(this.asError(l))}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(void 0)}get onPartialMessage(){return this.partialMessageEmitter.event}firePartialMessage(l){this.partialMessageEmitter.fire(l)}asError(l){return l instanceof Error?l:new Error(`Reader received error. Reason: ${e.string(l.message)?l.message:"unknown"}`)}}Ut.AbstractMessageReader=s;var a;(function(c){function l(u){let f,m;const p=new Map;let A;const N=new Map;if(u===void 0||typeof u=="string")f=u??"utf-8";else{if(f=u.charset??"utf-8",u.contentDecoder!==void 0&&(m=u.contentDecoder,p.set(m.name,m)),u.contentDecoders!==void 0)for(const I of u.contentDecoders)p.set(I.name,I);if(u.contentTypeDecoder!==void 0&&(A=u.contentTypeDecoder,N.set(A.name,A)),u.contentTypeDecoders!==void 0)for(const I of u.contentTypeDecoders)N.set(I.name,I)}return A===void 0&&(A=(0,t.default)().applicationJson.decoder,N.set(A.name,A)),{charset:f,contentDecoder:m,contentDecoders:p,contentTypeDecoder:A,contentTypeDecoders:N}}c.fromOptions=l})(a||(a={}));class o extends s{constructor(l,u){super(),this.readable=l,this.options=a.fromOptions(u),this.buffer=(0,t.default)().messageBuffer.create(this.options.charset),this._partialMessageTimeout=1e4,this.nextMessageLength=-1,this.messageToken=0,this.readSemaphore=new r.Semaphore(1)}set partialMessageTimeout(l){this._partialMessageTimeout=l}get partialMessageTimeout(){return this._partialMessageTimeout}listen(l){this.nextMessageLength=-1,this.messageToken=0,this.partialMessageTimer=void 0,this.callback=l;const u=this.readable.onData(f=>{this.onData(f)});return this.readable.onError(f=>this.fireError(f)),this.readable.onClose(()=>this.fireClose()),u}onData(l){try{for(this.buffer.append(l);;){if(this.nextMessageLength===-1){const f=this.buffer.tryReadHeaders(!0);if(!f)return;const m=f.get("content-length");if(!m){this.fireError(new Error(`Header must provide a Content-Length property.
122
+ ${JSON.stringify(Object.fromEntries(f))}`));return}const p=parseInt(m);if(isNaN(p)){this.fireError(new Error(`Content-Length value must be a number. Got ${m}`));return}this.nextMessageLength=p}const u=this.buffer.tryReadBody(this.nextMessageLength);if(u===void 0){this.setPartialMessageTimer();return}this.clearPartialMessageTimer(),this.nextMessageLength=-1,this.readSemaphore.lock(async()=>{const f=this.options.contentDecoder!==void 0?await this.options.contentDecoder.decode(u):u,m=await this.options.contentTypeDecoder.decode(f,this.options);this.callback(m)}).catch(f=>{this.fireError(f)})}}catch(u){this.fireError(u)}}clearPartialMessageTimer(){this.partialMessageTimer&&(this.partialMessageTimer.dispose(),this.partialMessageTimer=void 0)}setPartialMessageTimer(){this.clearPartialMessageTimer(),!(this._partialMessageTimeout<=0)&&(this.partialMessageTimer=(0,t.default)().timer.setTimeout((l,u)=>{this.partialMessageTimer=void 0,l===this.messageToken&&(this.firePartialMessage({messageToken:l,waitingTime:u}),this.setPartialMessageTimer())},this._partialMessageTimeout,this.messageToken,this._partialMessageTimeout))}}return Ut.ReadableStreamMessageReader=o,Ut}var qt={},Su;function oR(){if(Su)return qt;Su=1,Object.defineProperty(qt,"__esModule",{value:!0}),qt.WriteableStreamMessageWriter=qt.AbstractMessageWriter=qt.MessageWriter=void 0;const t=er(),e=Xi(),n=nh(),r=Ji(),i="Content-Length: ",s=`\r
123
+ `;var a;(function(u){function f(m){let p=m;return p&&e.func(p.dispose)&&e.func(p.onClose)&&e.func(p.onError)&&e.func(p.write)}u.is=f})(a||(qt.MessageWriter=a={}));class o{constructor(){this.errorEmitter=new r.Emitter,this.closeEmitter=new r.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose()}get onError(){return this.errorEmitter.event}fireError(f,m,p){this.errorEmitter.fire([this.asError(f),m,p])}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(void 0)}asError(f){return f instanceof Error?f:new Error(`Writer received error. Reason: ${e.string(f.message)?f.message:"unknown"}`)}}qt.AbstractMessageWriter=o;var c;(function(u){function f(m){return m===void 0||typeof m=="string"?{charset:m??"utf-8",contentTypeEncoder:(0,t.default)().applicationJson.encoder}:{charset:m.charset??"utf-8",contentEncoder:m.contentEncoder,contentTypeEncoder:m.contentTypeEncoder??(0,t.default)().applicationJson.encoder}}u.fromOptions=f})(c||(c={}));class l extends o{constructor(f,m){super(),this.writable=f,this.options=c.fromOptions(m),this.errorCount=0,this.writeSemaphore=new n.Semaphore(1),this.writable.onError(p=>this.fireError(p)),this.writable.onClose(()=>this.fireClose())}async write(f){return this.writeSemaphore.lock(async()=>this.options.contentTypeEncoder.encode(f,this.options).then(p=>this.options.contentEncoder!==void 0?this.options.contentEncoder.encode(p):p).then(p=>{const A=[];return A.push(i,p.byteLength.toString(),s),A.push(s),this.doWrite(f,A,p)},p=>{throw this.fireError(p),p}))}async doWrite(f,m,p){try{return await this.writable.write(m.join(""),"ascii"),this.writable.write(p)}catch(A){return this.handleError(A,f),Promise.reject(A)}}handleError(f,m){this.errorCount++,this.fireError(f,m,this.errorCount)}end(){this.writable.end()}}return qt.WriteableStreamMessageWriter=l,qt}var ai={},ku;function cR(){if(ku)return ai;ku=1,Object.defineProperty(ai,"__esModule",{value:!0}),ai.AbstractMessageBuffer=void 0;const t=13,e=10,n=`\r
124
+ `;class r{constructor(s="utf-8"){this._encoding=s,this._chunks=[],this._totalLength=0}get encoding(){return this._encoding}append(s){const a=typeof s=="string"?this.fromString(s,this._encoding):s;this._chunks.push(a),this._totalLength+=a.byteLength}tryReadHeaders(s=!1){if(this._chunks.length===0)return;let a=0,o=0,c=0,l=0;e:for(;o<this._chunks.length;){const p=this._chunks[o];for(c=0;c<p.length;){switch(p[c]){case t:switch(a){case 0:a=1;break;case 2:a=3;break;default:a=0}break;case e:switch(a){case 1:a=2;break;case 3:a=4,c++;break e;default:a=0}break;default:a=0}c++}l+=p.byteLength,o++}if(a!==4)return;const u=this._read(l+c),f=new Map,m=this.toString(u,"ascii").split(n);if(m.length<2)return f;for(let p=0;p<m.length-2;p++){const A=m[p],N=A.indexOf(":");if(N===-1)throw new Error(`Message header must separate key and value using ':'
125
+ ${A}`);const I=A.substr(0,N),C=A.substr(N+1).trim();f.set(s?I.toLowerCase():I,C)}return f}tryReadBody(s){if(!(this._totalLength<s))return this._read(s)}get numberOfBytes(){return this._totalLength}_read(s){if(s===0)return this.emptyBuffer();if(s>this._totalLength)throw new Error("Cannot read so many bytes!");if(this._chunks[0].byteLength===s){const l=this._chunks[0];return this._chunks.shift(),this._totalLength-=s,this.asNative(l)}if(this._chunks[0].byteLength>s){const l=this._chunks[0],u=this.asNative(l,s);return this._chunks[0]=l.slice(s),this._totalLength-=s,u}const a=this.allocNative(s);let o=0,c=0;for(;s>0;){const l=this._chunks[c];if(l.byteLength>s){const u=l.slice(0,s);a.set(u,o),o+=s,this._chunks[c]=l.slice(s),this._totalLength-=s,s-=s}else a.set(l,o),o+=l.byteLength,this._chunks.shift(),this._totalLength-=l.byteLength,s-=l.byteLength}return a}}return ai.AbstractMessageBuffer=r,ai}var Va={},Cu;function lR(){return Cu||(Cu=1,(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.createMessageConnection=t.ConnectionOptions=t.MessageStrategy=t.CancellationStrategy=t.CancellationSenderStrategy=t.CancellationReceiverStrategy=t.RequestCancellationReceiverStrategy=t.IdCancellationReceiverStrategy=t.ConnectionStrategy=t.ConnectionError=t.ConnectionErrors=t.LogTraceNotification=t.SetTraceNotification=t.TraceFormat=t.TraceValues=t.Trace=t.NullLogger=t.ProgressType=t.ProgressToken=void 0;const e=er(),n=Xi(),r=eh(),i=th(),s=Ji(),a=dl();var o;(function(g){g.type=new r.NotificationType("$/cancelRequest")})(o||(o={}));var c;(function(g){function S(y){return typeof y=="string"||typeof y=="number"}g.is=S})(c||(t.ProgressToken=c={}));var l;(function(g){g.type=new r.NotificationType("$/progress")})(l||(l={}));class u{constructor(){}}t.ProgressType=u;var f;(function(g){function S(y){return n.func(y)}g.is=S})(f||(f={})),t.NullLogger=Object.freeze({error:()=>{},warn:()=>{},info:()=>{},log:()=>{}});var m;(function(g){g[g.Off=0]="Off",g[g.Messages=1]="Messages",g[g.Compact=2]="Compact",g[g.Verbose=3]="Verbose"})(m||(t.Trace=m={}));var p;(function(g){g.Off="off",g.Messages="messages",g.Compact="compact",g.Verbose="verbose"})(p||(t.TraceValues=p={})),(function(g){function S(R){if(!n.string(R))return g.Off;switch(R=R.toLowerCase(),R){case"off":return g.Off;case"messages":return g.Messages;case"compact":return g.Compact;case"verbose":return g.Verbose;default:return g.Off}}g.fromString=S;function y(R){switch(R){case g.Off:return"off";case g.Messages:return"messages";case g.Compact:return"compact";case g.Verbose:return"verbose";default:return"off"}}g.toString=y})(m||(t.Trace=m={}));var A;(function(g){g.Text="text",g.JSON="json"})(A||(t.TraceFormat=A={})),(function(g){function S(y){return n.string(y)?(y=y.toLowerCase(),y==="json"?g.JSON:g.Text):g.Text}g.fromString=S})(A||(t.TraceFormat=A={}));var N;(function(g){g.type=new r.NotificationType("$/setTrace")})(N||(t.SetTraceNotification=N={}));var I;(function(g){g.type=new r.NotificationType("$/logTrace")})(I||(t.LogTraceNotification=I={}));var C;(function(g){g[g.Closed=1]="Closed",g[g.Disposed=2]="Disposed",g[g.AlreadyListening=3]="AlreadyListening"})(C||(t.ConnectionErrors=C={}));class b extends Error{constructor(S,y){super(y),this.code=S,Object.setPrototypeOf(this,b.prototype)}}t.ConnectionError=b;var k;(function(g){function S(y){const R=y;return R&&n.func(R.cancelUndispatched)}g.is=S})(k||(t.ConnectionStrategy=k={}));var P;(function(g){function S(y){const R=y;return R&&(R.kind===void 0||R.kind==="id")&&n.func(R.createCancellationTokenSource)&&(R.dispose===void 0||n.func(R.dispose))}g.is=S})(P||(t.IdCancellationReceiverStrategy=P={}));var H;(function(g){function S(y){const R=y;return R&&R.kind==="request"&&n.func(R.createCancellationTokenSource)&&(R.dispose===void 0||n.func(R.dispose))}g.is=S})(H||(t.RequestCancellationReceiverStrategy=H={}));var K;(function(g){g.Message=Object.freeze({createCancellationTokenSource(y){return new a.CancellationTokenSource}});function S(y){return P.is(y)||H.is(y)}g.is=S})(K||(t.CancellationReceiverStrategy=K={}));var J;(function(g){g.Message=Object.freeze({sendCancellation(y,R){return y.sendNotification(o.type,{id:R})},cleanup(y){}});function S(y){const R=y;return R&&n.func(R.sendCancellation)&&n.func(R.cleanup)}g.is=S})(J||(t.CancellationSenderStrategy=J={}));var oe;(function(g){g.Message=Object.freeze({receiver:K.Message,sender:J.Message});function S(y){const R=y;return R&&K.is(R.receiver)&&J.is(R.sender)}g.is=S})(oe||(t.CancellationStrategy=oe={}));var ue;(function(g){function S(y){const R=y;return R&&n.func(R.handleMessage)}g.is=S})(ue||(t.MessageStrategy=ue={}));var de;(function(g){function S(y){const R=y;return R&&(oe.is(R.cancellationStrategy)||k.is(R.connectionStrategy)||ue.is(R.messageStrategy))}g.is=S})(de||(t.ConnectionOptions=de={}));var w;(function(g){g[g.New=1]="New",g[g.Listening=2]="Listening",g[g.Closed=3]="Closed",g[g.Disposed=4]="Disposed"})(w||(w={}));function T(g,S,y,R){const E=y!==void 0?y:t.NullLogger;let O=0,D=0,x=0;const j="2.0";let G;const ie=new Map;let B;const ne=new Map,Oe=new Map;let Re,fe=new i.LinkedMap,Ie=new Map,xe=new Set,Ne=new Map,Z=m.Off,ot=A.Text,ve,Rt=w.New;const rr=new s.Emitter,Ur=new s.Emitter,qr=new s.Emitter,jr=new s.Emitter,zr=new s.Emitter,vt=R&&R.cancellationStrategy?R.cancellationStrategy:oe.Message;function Br(h){if(h===null)throw new Error("Can't send requests with id null since the response can't be correlated.");return"req-"+h.toString()}function Qi(h){return h===null?"res-unknown-"+(++x).toString():"res-"+h.toString()}function Zi(){return"not-"+(++D).toString()}function es(h,_){r.Message.isRequest(_)?h.set(Br(_.id),_):r.Message.isResponse(_)?h.set(Qi(_.id),_):h.set(Zi(),_)}function ts(h){}function Wr(){return Rt===w.Listening}function Vr(){return Rt===w.Closed}function Mt(){return Rt===w.Disposed}function Kr(){(Rt===w.New||Rt===w.Listening)&&(Rt=w.Closed,Ur.fire(void 0))}function ns(h){rr.fire([h,void 0,void 0])}function rs(h){rr.fire(h)}g.onClose(Kr),g.onError(ns),S.onClose(Kr),S.onError(rs);function Hr(){Re||fe.size===0||(Re=(0,e.default)().timer.setImmediate(()=>{Re=void 0,is()}))}function Yr(h){r.Message.isRequest(h)?as(h):r.Message.isNotification(h)?cs(h):r.Message.isResponse(h)?os(h):ls(h)}function is(){if(fe.size===0)return;const h=fe.shift();try{const _=R?.messageStrategy;ue.is(_)?_.handleMessage(h,Yr):Yr(h)}finally{Hr()}}const ss=h=>{try{if(r.Message.isNotification(h)&&h.method===o.type.method){const _=h.params.id,L=Br(_),F=fe.get(L);if(r.Message.isRequest(F)){const se=R?.connectionStrategy,Ee=se&&se.cancelUndispatched?se.cancelUndispatched(F,ts):void 0;if(Ee&&(Ee.error!==void 0||Ee.result!==void 0)){fe.delete(L),Ne.delete(_),Ee.id=F.id,En(Ee,h.method,Date.now()),S.write(Ee).catch(()=>E.error("Sending response for canceled message failed."));return}}const ce=Ne.get(_);if(ce!==void 0){ce.cancel(),ir(h);return}else xe.add(_)}es(fe,h)}finally{Hr()}};function as(h){if(Mt())return;function _(Q,he,re){const Pe={jsonrpc:j,id:h.id};Q instanceof r.ResponseError?Pe.error=Q.toJson():Pe.result=Q===void 0?null:Q,En(Pe,he,re),S.write(Pe).catch(()=>E.error("Sending response failed."))}function L(Q,he,re){const Pe={jsonrpc:j,id:h.id,error:Q.toJson()};En(Pe,he,re),S.write(Pe).catch(()=>E.error("Sending response failed."))}function F(Q,he,re){Q===void 0&&(Q=null);const Pe={jsonrpc:j,id:h.id,result:Q};En(Pe,he,re),S.write(Pe).catch(()=>E.error("Sending response failed."))}fs(h);const ce=ie.get(h.method);let se,Ee;ce&&(se=ce.type,Ee=ce.handler);const be=Date.now();if(Ee||G){const Q=h.id??String(Date.now()),he=P.is(vt.receiver)?vt.receiver.createCancellationTokenSource(Q):vt.receiver.createCancellationTokenSource(h);h.id!==null&&xe.has(h.id)&&he.cancel(),h.id!==null&&Ne.set(Q,he);try{let re;if(Ee)if(h.params===void 0){if(se!==void 0&&se.numberOfParams!==0){L(new r.ResponseError(r.ErrorCodes.InvalidParams,`Request ${h.method} defines ${se.numberOfParams} params but received none.`),h.method,be);return}re=Ee(he.token)}else if(Array.isArray(h.params)){if(se!==void 0&&se.parameterStructures===r.ParameterStructures.byName){L(new r.ResponseError(r.ErrorCodes.InvalidParams,`Request ${h.method} defines parameters by name but received parameters by position`),h.method,be);return}re=Ee(...h.params,he.token)}else{if(se!==void 0&&se.parameterStructures===r.ParameterStructures.byPosition){L(new r.ResponseError(r.ErrorCodes.InvalidParams,`Request ${h.method} defines parameters by position but received parameters by name`),h.method,be);return}re=Ee(h.params,he.token)}else G&&(re=G(h.method,h.params,he.token));const Pe=re;re?Pe.then?Pe.then(He=>{Ne.delete(Q),_(He,h.method,be)},He=>{Ne.delete(Q),He instanceof r.ResponseError?L(He,h.method,be):He&&n.string(He.message)?L(new r.ResponseError(r.ErrorCodes.InternalError,`Request ${h.method} failed with message: ${He.message}`),h.method,be):L(new r.ResponseError(r.ErrorCodes.InternalError,`Request ${h.method} failed unexpectedly without providing any details.`),h.method,be)}):(Ne.delete(Q),_(re,h.method,be)):(Ne.delete(Q),F(re,h.method,be))}catch(re){Ne.delete(Q),re instanceof r.ResponseError?_(re,h.method,be):re&&n.string(re.message)?L(new r.ResponseError(r.ErrorCodes.InternalError,`Request ${h.method} failed with message: ${re.message}`),h.method,be):L(new r.ResponseError(r.ErrorCodes.InternalError,`Request ${h.method} failed unexpectedly without providing any details.`),h.method,be)}}else L(new r.ResponseError(r.ErrorCodes.MethodNotFound,`Unhandled method ${h.method}`),h.method,be)}function os(h){if(!Mt())if(h.id===null)h.error?E.error(`Received response message without id: Error is:
126
+ ${JSON.stringify(h.error,void 0,4)}`):E.error("Received response message without id. No further error information provided.");else{const _=h.id,L=Ie.get(_);if(hs(h,L),L!==void 0){Ie.delete(_);try{if(h.error){const F=h.error;L.reject(new r.ResponseError(F.code,F.message,F.data))}else if(h.result!==void 0)L.resolve(h.result);else throw new Error("Should never happen.")}catch(F){F.message?E.error(`Response handler '${L.method}' failed with message: ${F.message}`):E.error(`Response handler '${L.method}' failed unexpectedly.`)}}}}function cs(h){if(Mt())return;let _,L;if(h.method===o.type.method){const F=h.params.id;xe.delete(F),ir(h);return}else{const F=ne.get(h.method);F&&(L=F.handler,_=F.type)}if(L||B)try{if(ir(h),L)if(h.params===void 0)_!==void 0&&_.numberOfParams!==0&&_.parameterStructures!==r.ParameterStructures.byName&&E.error(`Notification ${h.method} defines ${_.numberOfParams} params but received none.`),L();else if(Array.isArray(h.params)){const F=h.params;h.method===l.type.method&&F.length===2&&c.is(F[0])?L({token:F[0],value:F[1]}):(_!==void 0&&(_.parameterStructures===r.ParameterStructures.byName&&E.error(`Notification ${h.method} defines parameters by name but received parameters by position`),_.numberOfParams!==h.params.length&&E.error(`Notification ${h.method} defines ${_.numberOfParams} params but received ${F.length} arguments`)),L(...F))}else _!==void 0&&_.parameterStructures===r.ParameterStructures.byPosition&&E.error(`Notification ${h.method} defines parameters by position but received parameters by name`),L(h.params);else B&&B(h.method,h.params)}catch(F){F.message?E.error(`Notification handler '${h.method}' failed with message: ${F.message}`):E.error(`Notification handler '${h.method}' failed unexpectedly.`)}else qr.fire(h)}function ls(h){if(!h){E.error("Received empty message.");return}E.error(`Received message which is neither a response nor a notification message:
127
+ ${JSON.stringify(h,null,4)}`);const _=h;if(n.string(_.id)||n.number(_.id)){const L=_.id,F=Ie.get(L);F&&F.reject(new Error("The received response has neither a result nor an error property."))}}function Et(h){if(h!=null)switch(Z){case m.Verbose:return JSON.stringify(h,null,4);case m.Compact:return JSON.stringify(h);default:return}}function us(h){if(!(Z===m.Off||!ve))if(ot===A.Text){let _;(Z===m.Verbose||Z===m.Compact)&&h.params&&(_=`Params: ${Et(h.params)}
128
+
129
+ `),ve.log(`Sending request '${h.method} - (${h.id})'.`,_)}else Ft("send-request",h)}function ds(h){if(!(Z===m.Off||!ve))if(ot===A.Text){let _;(Z===m.Verbose||Z===m.Compact)&&(h.params?_=`Params: ${Et(h.params)}
130
+
131
+ `:_=`No parameters provided.
132
+
133
+ `),ve.log(`Sending notification '${h.method}'.`,_)}else Ft("send-notification",h)}function En(h,_,L){if(!(Z===m.Off||!ve))if(ot===A.Text){let F;(Z===m.Verbose||Z===m.Compact)&&(h.error&&h.error.data?F=`Error data: ${Et(h.error.data)}
134
+
135
+ `:h.result?F=`Result: ${Et(h.result)}
136
+
137
+ `:h.error===void 0&&(F=`No result returned.
138
+
139
+ `)),ve.log(`Sending response '${_} - (${h.id})'. Processing request took ${Date.now()-L}ms`,F)}else Ft("send-response",h)}function fs(h){if(!(Z===m.Off||!ve))if(ot===A.Text){let _;(Z===m.Verbose||Z===m.Compact)&&h.params&&(_=`Params: ${Et(h.params)}
140
+
141
+ `),ve.log(`Received request '${h.method} - (${h.id})'.`,_)}else Ft("receive-request",h)}function ir(h){if(!(Z===m.Off||!ve||h.method===I.type.method))if(ot===A.Text){let _;(Z===m.Verbose||Z===m.Compact)&&(h.params?_=`Params: ${Et(h.params)}
142
+
143
+ `:_=`No parameters provided.
144
+
145
+ `),ve.log(`Received notification '${h.method}'.`,_)}else Ft("receive-notification",h)}function hs(h,_){if(!(Z===m.Off||!ve))if(ot===A.Text){let L;if((Z===m.Verbose||Z===m.Compact)&&(h.error&&h.error.data?L=`Error data: ${Et(h.error.data)}
146
+
147
+ `:h.result?L=`Result: ${Et(h.result)}
148
+
149
+ `:h.error===void 0&&(L=`No result returned.
150
+
151
+ `)),_){const F=h.error?` Request failed: ${h.error.message} (${h.error.code}).`:"";ve.log(`Received response '${_.method} - (${h.id})' in ${Date.now()-_.timerStart}ms.${F}`,L)}else ve.log(`Received response ${h.id} without active response promise.`,L)}else Ft("receive-response",h)}function Ft(h,_){if(!ve||Z===m.Off)return;const L={isLSPMessage:!0,type:h,message:_,timestamp:Date.now()};ve.log(L)}function cn(){if(Vr())throw new b(C.Closed,"Connection is closed.");if(Mt())throw new b(C.Disposed,"Connection is disposed.")}function ps(){if(Wr())throw new b(C.AlreadyListening,"Connection is already listening")}function ms(){if(!Wr())throw new Error("Call listen() first.")}function ln(h){return h===void 0?null:h}function Xr(h){if(h!==null)return h}function d(h){return h!=null&&!Array.isArray(h)&&typeof h=="object"}function ke(h,_){switch(h){case r.ParameterStructures.auto:return d(_)?Xr(_):[ln(_)];case r.ParameterStructures.byName:if(!d(_))throw new Error("Received parameters by name but param is not an object literal.");return Xr(_);case r.ParameterStructures.byPosition:return[ln(_)];default:throw new Error(`Unknown parameter structure ${h.toString()}`)}}function Ce(h,_){let L;const F=h.numberOfParams;switch(F){case 0:L=void 0;break;case 1:L=ke(h.parameterStructures,_[0]);break;default:L=[];for(let ce=0;ce<_.length&&ce<F;ce++)L.push(ln(_[ce]));if(_.length<F)for(let ce=_.length;ce<F;ce++)L.push(null);break}return L}const V={sendNotification:(h,..._)=>{cn();let L,F;if(n.string(h)){L=h;const se=_[0];let Ee=0,be=r.ParameterStructures.auto;r.ParameterStructures.is(se)&&(Ee=1,be=se);let Q=_.length;const he=Q-Ee;switch(he){case 0:F=void 0;break;case 1:F=ke(be,_[Ee]);break;default:if(be===r.ParameterStructures.byName)throw new Error(`Received ${he} parameters for 'by Name' notification parameter structure.`);F=_.slice(Ee,Q).map(re=>ln(re));break}}else{const se=_;L=h.method,F=Ce(h,se)}const ce={jsonrpc:j,method:L,params:F};return ds(ce),S.write(ce).catch(se=>{throw E.error("Sending notification failed."),se})},onNotification:(h,_)=>{cn();let L;return n.func(h)?B=h:_&&(n.string(h)?(L=h,ne.set(h,{type:void 0,handler:_})):(L=h.method,ne.set(h.method,{type:h,handler:_}))),{dispose:()=>{L!==void 0?ne.delete(L):B=void 0}}},onProgress:(h,_,L)=>{if(Oe.has(_))throw new Error(`Progress handler for token ${_} already registered`);return Oe.set(_,L),{dispose:()=>{Oe.delete(_)}}},sendProgress:(h,_,L)=>V.sendNotification(l.type,{token:_,value:L}),onUnhandledProgress:jr.event,sendRequest:(h,..._)=>{cn(),ms();let L,F,ce;if(n.string(h)){L=h;const Q=_[0],he=_[_.length-1];let re=0,Pe=r.ParameterStructures.auto;r.ParameterStructures.is(Q)&&(re=1,Pe=Q);let He=_.length;a.CancellationToken.is(he)&&(He=He-1,ce=he);const It=He-re;switch(It){case 0:F=void 0;break;case 1:F=ke(Pe,_[re]);break;default:if(Pe===r.ParameterStructures.byName)throw new Error(`Received ${It} parameters for 'by Name' request parameter structure.`);F=_.slice(re,He).map(bh=>ln(bh));break}}else{const Q=_;L=h.method,F=Ce(h,Q);const he=h.numberOfParams;ce=a.CancellationToken.is(Q[he])?Q[he]:void 0}const se=O++;let Ee;ce&&(Ee=ce.onCancellationRequested(()=>{const Q=vt.sender.sendCancellation(V,se);return Q===void 0?(E.log(`Received no promise from cancellation strategy when cancelling id ${se}`),Promise.resolve()):Q.catch(()=>{E.log(`Sending cancellation messages for id ${se} failed`)})}));const be={jsonrpc:j,id:se,method:L,params:F};return us(be),typeof vt.sender.enableCancellation=="function"&&vt.sender.enableCancellation(be),new Promise(async(Q,he)=>{const re=It=>{Q(It),vt.sender.cleanup(se),Ee?.dispose()},Pe=It=>{he(It),vt.sender.cleanup(se),Ee?.dispose()},He={method:L,timerStart:Date.now(),resolve:re,reject:Pe};try{await S.write(be),Ie.set(se,He)}catch(It){throw E.error("Sending request failed."),He.reject(new r.ResponseError(r.ErrorCodes.MessageWriteError,It.message?It.message:"Unknown reason")),It}})},onRequest:(h,_)=>{cn();let L=null;return f.is(h)?(L=void 0,G=h):n.string(h)?(L=null,_!==void 0&&(L=h,ie.set(h,{handler:_,type:void 0}))):_!==void 0&&(L=h.method,ie.set(h.method,{type:h,handler:_})),{dispose:()=>{L!==null&&(L!==void 0?ie.delete(L):G=void 0)}}},hasPendingResponse:()=>Ie.size>0,trace:async(h,_,L)=>{let F=!1,ce=A.Text;L!==void 0&&(n.boolean(L)?F=L:(F=L.sendNotification||!1,ce=L.traceFormat||A.Text)),Z=h,ot=ce,Z===m.Off?ve=void 0:ve=_,F&&!Vr()&&!Mt()&&await V.sendNotification(N.type,{value:m.toString(h)})},onError:rr.event,onClose:Ur.event,onUnhandledNotification:qr.event,onDispose:zr.event,end:()=>{S.end()},dispose:()=>{if(Mt())return;Rt=w.Disposed,zr.fire(void 0);const h=new r.ResponseError(r.ErrorCodes.PendingResponseRejected,"Pending response rejected since connection got disposed");for(const _ of Ie.values())_.reject(h);Ie=new Map,Ne=new Map,xe=new Set,fe=new i.LinkedMap,n.func(S.dispose)&&S.dispose(),n.func(g.dispose)&&g.dispose()},listen:()=>{cn(),ps(),Rt=w.Listening,g.listen(ss)},inspect:()=>{(0,e.default)().console.log("inspect")}};return V.onNotification(I.type,h=>{if(Z===m.Off||!ve)return;const _=Z===m.Verbose||Z===m.Compact;ve.log(h.message,_?h.verbose:void 0)}),V.onNotification(l.type,h=>{const _=Oe.get(h.token);_?_(h.value):jr.fire(h)}),V}t.createMessageConnection=T})(Va)),Va}var bu;function Pc(){return bu||(bu=1,(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.ProgressType=t.ProgressToken=t.createMessageConnection=t.NullLogger=t.ConnectionOptions=t.ConnectionStrategy=t.AbstractMessageBuffer=t.WriteableStreamMessageWriter=t.AbstractMessageWriter=t.MessageWriter=t.ReadableStreamMessageReader=t.AbstractMessageReader=t.MessageReader=t.SharedArrayReceiverStrategy=t.SharedArraySenderStrategy=t.CancellationToken=t.CancellationTokenSource=t.Emitter=t.Event=t.Disposable=t.LRUCache=t.Touch=t.LinkedMap=t.ParameterStructures=t.NotificationType9=t.NotificationType8=t.NotificationType7=t.NotificationType6=t.NotificationType5=t.NotificationType4=t.NotificationType3=t.NotificationType2=t.NotificationType1=t.NotificationType0=t.NotificationType=t.ErrorCodes=t.ResponseError=t.RequestType9=t.RequestType8=t.RequestType7=t.RequestType6=t.RequestType5=t.RequestType4=t.RequestType3=t.RequestType2=t.RequestType1=t.RequestType0=t.RequestType=t.Message=t.RAL=void 0,t.MessageStrategy=t.CancellationStrategy=t.CancellationSenderStrategy=t.CancellationReceiverStrategy=t.ConnectionError=t.ConnectionErrors=t.LogTraceNotification=t.SetTraceNotification=t.TraceFormat=t.TraceValues=t.Trace=void 0;const e=eh();Object.defineProperty(t,"Message",{enumerable:!0,get:function(){return e.Message}}),Object.defineProperty(t,"RequestType",{enumerable:!0,get:function(){return e.RequestType}}),Object.defineProperty(t,"RequestType0",{enumerable:!0,get:function(){return e.RequestType0}}),Object.defineProperty(t,"RequestType1",{enumerable:!0,get:function(){return e.RequestType1}}),Object.defineProperty(t,"RequestType2",{enumerable:!0,get:function(){return e.RequestType2}}),Object.defineProperty(t,"RequestType3",{enumerable:!0,get:function(){return e.RequestType3}}),Object.defineProperty(t,"RequestType4",{enumerable:!0,get:function(){return e.RequestType4}}),Object.defineProperty(t,"RequestType5",{enumerable:!0,get:function(){return e.RequestType5}}),Object.defineProperty(t,"RequestType6",{enumerable:!0,get:function(){return e.RequestType6}}),Object.defineProperty(t,"RequestType7",{enumerable:!0,get:function(){return e.RequestType7}}),Object.defineProperty(t,"RequestType8",{enumerable:!0,get:function(){return e.RequestType8}}),Object.defineProperty(t,"RequestType9",{enumerable:!0,get:function(){return e.RequestType9}}),Object.defineProperty(t,"ResponseError",{enumerable:!0,get:function(){return e.ResponseError}}),Object.defineProperty(t,"ErrorCodes",{enumerable:!0,get:function(){return e.ErrorCodes}}),Object.defineProperty(t,"NotificationType",{enumerable:!0,get:function(){return e.NotificationType}}),Object.defineProperty(t,"NotificationType0",{enumerable:!0,get:function(){return e.NotificationType0}}),Object.defineProperty(t,"NotificationType1",{enumerable:!0,get:function(){return e.NotificationType1}}),Object.defineProperty(t,"NotificationType2",{enumerable:!0,get:function(){return e.NotificationType2}}),Object.defineProperty(t,"NotificationType3",{enumerable:!0,get:function(){return e.NotificationType3}}),Object.defineProperty(t,"NotificationType4",{enumerable:!0,get:function(){return e.NotificationType4}}),Object.defineProperty(t,"NotificationType5",{enumerable:!0,get:function(){return e.NotificationType5}}),Object.defineProperty(t,"NotificationType6",{enumerable:!0,get:function(){return e.NotificationType6}}),Object.defineProperty(t,"NotificationType7",{enumerable:!0,get:function(){return e.NotificationType7}}),Object.defineProperty(t,"NotificationType8",{enumerable:!0,get:function(){return e.NotificationType8}}),Object.defineProperty(t,"NotificationType9",{enumerable:!0,get:function(){return e.NotificationType9}}),Object.defineProperty(t,"ParameterStructures",{enumerable:!0,get:function(){return e.ParameterStructures}});const n=th();Object.defineProperty(t,"LinkedMap",{enumerable:!0,get:function(){return n.LinkedMap}}),Object.defineProperty(t,"LRUCache",{enumerable:!0,get:function(){return n.LRUCache}}),Object.defineProperty(t,"Touch",{enumerable:!0,get:function(){return n.Touch}});const r=iR();Object.defineProperty(t,"Disposable",{enumerable:!0,get:function(){return r.Disposable}});const i=Ji();Object.defineProperty(t,"Event",{enumerable:!0,get:function(){return i.Event}}),Object.defineProperty(t,"Emitter",{enumerable:!0,get:function(){return i.Emitter}});const s=dl();Object.defineProperty(t,"CancellationTokenSource",{enumerable:!0,get:function(){return s.CancellationTokenSource}}),Object.defineProperty(t,"CancellationToken",{enumerable:!0,get:function(){return s.CancellationToken}});const a=sR();Object.defineProperty(t,"SharedArraySenderStrategy",{enumerable:!0,get:function(){return a.SharedArraySenderStrategy}}),Object.defineProperty(t,"SharedArrayReceiverStrategy",{enumerable:!0,get:function(){return a.SharedArrayReceiverStrategy}});const o=aR();Object.defineProperty(t,"MessageReader",{enumerable:!0,get:function(){return o.MessageReader}}),Object.defineProperty(t,"AbstractMessageReader",{enumerable:!0,get:function(){return o.AbstractMessageReader}}),Object.defineProperty(t,"ReadableStreamMessageReader",{enumerable:!0,get:function(){return o.ReadableStreamMessageReader}});const c=oR();Object.defineProperty(t,"MessageWriter",{enumerable:!0,get:function(){return c.MessageWriter}}),Object.defineProperty(t,"AbstractMessageWriter",{enumerable:!0,get:function(){return c.AbstractMessageWriter}}),Object.defineProperty(t,"WriteableStreamMessageWriter",{enumerable:!0,get:function(){return c.WriteableStreamMessageWriter}});const l=cR();Object.defineProperty(t,"AbstractMessageBuffer",{enumerable:!0,get:function(){return l.AbstractMessageBuffer}});const u=lR();Object.defineProperty(t,"ConnectionStrategy",{enumerable:!0,get:function(){return u.ConnectionStrategy}}),Object.defineProperty(t,"ConnectionOptions",{enumerable:!0,get:function(){return u.ConnectionOptions}}),Object.defineProperty(t,"NullLogger",{enumerable:!0,get:function(){return u.NullLogger}}),Object.defineProperty(t,"createMessageConnection",{enumerable:!0,get:function(){return u.createMessageConnection}}),Object.defineProperty(t,"ProgressToken",{enumerable:!0,get:function(){return u.ProgressToken}}),Object.defineProperty(t,"ProgressType",{enumerable:!0,get:function(){return u.ProgressType}}),Object.defineProperty(t,"Trace",{enumerable:!0,get:function(){return u.Trace}}),Object.defineProperty(t,"TraceValues",{enumerable:!0,get:function(){return u.TraceValues}}),Object.defineProperty(t,"TraceFormat",{enumerable:!0,get:function(){return u.TraceFormat}}),Object.defineProperty(t,"SetTraceNotification",{enumerable:!0,get:function(){return u.SetTraceNotification}}),Object.defineProperty(t,"LogTraceNotification",{enumerable:!0,get:function(){return u.LogTraceNotification}}),Object.defineProperty(t,"ConnectionErrors",{enumerable:!0,get:function(){return u.ConnectionErrors}}),Object.defineProperty(t,"ConnectionError",{enumerable:!0,get:function(){return u.ConnectionError}}),Object.defineProperty(t,"CancellationReceiverStrategy",{enumerable:!0,get:function(){return u.CancellationReceiverStrategy}}),Object.defineProperty(t,"CancellationSenderStrategy",{enumerable:!0,get:function(){return u.CancellationSenderStrategy}}),Object.defineProperty(t,"CancellationStrategy",{enumerable:!0,get:function(){return u.CancellationStrategy}}),Object.defineProperty(t,"MessageStrategy",{enumerable:!0,get:function(){return u.MessageStrategy}});const f=er();t.RAL=f.default})(Wa)),Wa}var _u;function uR(){if(_u)return Cs;_u=1,Object.defineProperty(Cs,"__esModule",{value:!0});const t=Pc();class e extends t.AbstractMessageBuffer{constructor(c="utf-8"){super(c),this.asciiDecoder=new TextDecoder("ascii")}emptyBuffer(){return e.emptyBuffer}fromString(c,l){return new TextEncoder().encode(c)}toString(c,l){return l==="ascii"?this.asciiDecoder.decode(c):new TextDecoder(l).decode(c)}asNative(c,l){return l===void 0?c:c.slice(0,l)}allocNative(c){return new Uint8Array(c)}}e.emptyBuffer=new Uint8Array(0);class n{constructor(c){this.socket=c,this._onData=new t.Emitter,this._messageListener=l=>{l.data.arrayBuffer().then(f=>{this._onData.fire(new Uint8Array(f))},()=>{(0,t.RAL)().console.error("Converting blob to array buffer failed.")})},this.socket.addEventListener("message",this._messageListener)}onClose(c){return this.socket.addEventListener("close",c),t.Disposable.create(()=>this.socket.removeEventListener("close",c))}onError(c){return this.socket.addEventListener("error",c),t.Disposable.create(()=>this.socket.removeEventListener("error",c))}onEnd(c){return this.socket.addEventListener("end",c),t.Disposable.create(()=>this.socket.removeEventListener("end",c))}onData(c){return this._onData.event(c)}}class r{constructor(c){this.socket=c}onClose(c){return this.socket.addEventListener("close",c),t.Disposable.create(()=>this.socket.removeEventListener("close",c))}onError(c){return this.socket.addEventListener("error",c),t.Disposable.create(()=>this.socket.removeEventListener("error",c))}onEnd(c){return this.socket.addEventListener("end",c),t.Disposable.create(()=>this.socket.removeEventListener("end",c))}write(c,l){if(typeof c=="string"){if(l!==void 0&&l!=="utf-8")throw new Error(`In a Browser environments only utf-8 text encoding is supported. But got encoding: ${l}`);this.socket.send(c)}else this.socket.send(c);return Promise.resolve()}end(){this.socket.close()}}const i=new TextEncoder,s=Object.freeze({messageBuffer:Object.freeze({create:o=>new e(o)}),applicationJson:Object.freeze({encoder:Object.freeze({name:"application/json",encode:(o,c)=>{if(c.charset!=="utf-8")throw new Error(`In a Browser environments only utf-8 text encoding is supported. But got encoding: ${c.charset}`);return Promise.resolve(i.encode(JSON.stringify(o,void 0,0)))}}),decoder:Object.freeze({name:"application/json",decode:(o,c)=>{if(!(o instanceof Uint8Array))throw new Error("In a Browser environments only Uint8Arrays are supported.");return Promise.resolve(JSON.parse(new TextDecoder(c.charset).decode(o)))}})}),stream:Object.freeze({asReadableStream:o=>new n(o),asWritableStream:o=>new r(o)}),console,timer:Object.freeze({setTimeout(o,c,...l){const u=setTimeout(o,c,...l);return{dispose:()=>clearTimeout(u)}},setImmediate(o,...c){const l=setTimeout(o,0,...c);return{dispose:()=>clearTimeout(l)}},setInterval(o,c,...l){const u=setInterval(o,c,...l);return{dispose:()=>clearInterval(u)}}})});function a(){return s}return(function(o){function c(){t.RAL.install(s)}o.install=c})(a||(a={})),Cs.default=a,Cs}var Nu;function Gr(){return Nu||(Nu=1,(function(t){var e=_n&&_n.__createBinding||(Object.create?(function(c,l,u,f){f===void 0&&(f=u);var m=Object.getOwnPropertyDescriptor(l,u);(!m||("get"in m?!l.__esModule:m.writable||m.configurable))&&(m={enumerable:!0,get:function(){return l[u]}}),Object.defineProperty(c,f,m)}):(function(c,l,u,f){f===void 0&&(f=u),c[f]=l[u]})),n=_n&&_n.__exportStar||function(c,l){for(var u in c)u!=="default"&&!Object.prototype.hasOwnProperty.call(l,u)&&e(l,c,u)};Object.defineProperty(t,"__esModule",{value:!0}),t.createMessageConnection=t.BrowserMessageWriter=t.BrowserMessageReader=void 0,uR().default.install();const i=Pc();n(Pc(),t);class s extends i.AbstractMessageReader{constructor(l){super(),this._onData=new i.Emitter,this._messageListener=u=>{this._onData.fire(u.data)},l.addEventListener("error",u=>this.fireError(u)),l.onmessage=this._messageListener}listen(l){return this._onData.event(l)}}t.BrowserMessageReader=s;class a extends i.AbstractMessageWriter{constructor(l){super(),this.port=l,this.errorCount=0,l.addEventListener("error",u=>this.fireError(u))}write(l){try{return this.port.postMessage(l),Promise.resolve()}catch(u){return this.handleError(u,l),Promise.reject(u)}}handleError(l,u){this.errorCount++,this.fireError(l,u,this.errorCount)}end(){}}t.BrowserMessageWriter=a;function o(c,l,u,f){return u===void 0&&(u=i.NullLogger),i.ConnectionStrategy.is(f)&&(f={connectionStrategy:f}),(0,i.createMessageConnection)(c,l,u,f)}t.createMessageConnection=o})(_n)),_n}var Ka,wu;function Iu(){return wu||(wu=1,Ka=Gr()),Ka}var Pn={};const fl=_h(aT);var Ye={},Pu;function Te(){if(Pu)return Ye;Pu=1,Object.defineProperty(Ye,"__esModule",{value:!0}),Ye.ProtocolNotificationType=Ye.ProtocolNotificationType0=Ye.ProtocolRequestType=Ye.ProtocolRequestType0=Ye.RegistrationType=Ye.MessageDirection=void 0;const t=Gr();var e;(function(o){o.clientToServer="clientToServer",o.serverToClient="serverToClient",o.both="both"})(e||(Ye.MessageDirection=e={}));class n{constructor(c){this.method=c}}Ye.RegistrationType=n;class r extends t.RequestType0{constructor(c){super(c)}}Ye.ProtocolRequestType0=r;class i extends t.RequestType{constructor(c){super(c,t.ParameterStructures.byName)}}Ye.ProtocolRequestType=i;class s extends t.NotificationType0{constructor(c){super(c)}}Ye.ProtocolNotificationType0=s;class a extends t.NotificationType{constructor(c){super(c,t.ParameterStructures.byName)}}return Ye.ProtocolNotificationType=a,Ye}var Ha={},_e={},$u;function hl(){if($u)return _e;$u=1,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(l){return l===!0||l===!1}_e.boolean=t;function e(l){return typeof l=="string"||l instanceof String}_e.string=e;function n(l){return typeof l=="number"||l instanceof Number}_e.number=n;function r(l){return l instanceof Error}_e.error=r;function i(l){return typeof l=="function"}_e.func=i;function s(l){return Array.isArray(l)}_e.array=s;function a(l){return s(l)&&l.every(u=>e(u))}_e.stringArray=a;function o(l,u){return Array.isArray(l)&&l.every(u)}_e.typedArray=o;function c(l){return l!==null&&typeof l=="object"}return _e.objectLiteral=c,_e}var oi={},Lu;function dR(){if(Lu)return oi;Lu=1,Object.defineProperty(oi,"__esModule",{value:!0}),oi.ImplementationRequest=void 0;const t=Te();var e;return(function(n){n.method="textDocument/implementation",n.messageDirection=t.MessageDirection.clientToServer,n.type=new t.ProtocolRequestType(n.method)})(e||(oi.ImplementationRequest=e={})),oi}var ci={},Ou;function fR(){if(Ou)return ci;Ou=1,Object.defineProperty(ci,"__esModule",{value:!0}),ci.TypeDefinitionRequest=void 0;const t=Te();var e;return(function(n){n.method="textDocument/typeDefinition",n.messageDirection=t.MessageDirection.clientToServer,n.type=new t.ProtocolRequestType(n.method)})(e||(ci.TypeDefinitionRequest=e={})),ci}var $n={},xu;function hR(){if(xu)return $n;xu=1,Object.defineProperty($n,"__esModule",{value:!0}),$n.DidChangeWorkspaceFoldersNotification=$n.WorkspaceFoldersRequest=void 0;const t=Te();var e;(function(r){r.method="workspace/workspaceFolders",r.messageDirection=t.MessageDirection.serverToClient,r.type=new t.ProtocolRequestType0(r.method)})(e||($n.WorkspaceFoldersRequest=e={}));var n;return(function(r){r.method="workspace/didChangeWorkspaceFolders",r.messageDirection=t.MessageDirection.clientToServer,r.type=new t.ProtocolNotificationType(r.method)})(n||($n.DidChangeWorkspaceFoldersNotification=n={})),$n}var li={},Du;function pR(){if(Du)return li;Du=1,Object.defineProperty(li,"__esModule",{value:!0}),li.ConfigurationRequest=void 0;const t=Te();var e;return(function(n){n.method="workspace/configuration",n.messageDirection=t.MessageDirection.serverToClient,n.type=new t.ProtocolRequestType(n.method)})(e||(li.ConfigurationRequest=e={})),li}var Ln={},Mu;function mR(){if(Mu)return Ln;Mu=1,Object.defineProperty(Ln,"__esModule",{value:!0}),Ln.ColorPresentationRequest=Ln.DocumentColorRequest=void 0;const t=Te();var e;(function(r){r.method="textDocument/documentColor",r.messageDirection=t.MessageDirection.clientToServer,r.type=new t.ProtocolRequestType(r.method)})(e||(Ln.DocumentColorRequest=e={}));var n;return(function(r){r.method="textDocument/colorPresentation",r.messageDirection=t.MessageDirection.clientToServer,r.type=new t.ProtocolRequestType(r.method)})(n||(Ln.ColorPresentationRequest=n={})),Ln}var On={},Fu;function gR(){if(Fu)return On;Fu=1,Object.defineProperty(On,"__esModule",{value:!0}),On.FoldingRangeRefreshRequest=On.FoldingRangeRequest=void 0;const t=Te();var e;(function(r){r.method="textDocument/foldingRange",r.messageDirection=t.MessageDirection.clientToServer,r.type=new t.ProtocolRequestType(r.method)})(e||(On.FoldingRangeRequest=e={}));var n;return(function(r){r.method="workspace/foldingRange/refresh",r.messageDirection=t.MessageDirection.serverToClient,r.type=new t.ProtocolRequestType0(r.method)})(n||(On.FoldingRangeRefreshRequest=n={})),On}var ui={},Gu;function yR(){if(Gu)return ui;Gu=1,Object.defineProperty(ui,"__esModule",{value:!0}),ui.DeclarationRequest=void 0;const t=Te();var e;return(function(n){n.method="textDocument/declaration",n.messageDirection=t.MessageDirection.clientToServer,n.type=new t.ProtocolRequestType(n.method)})(e||(ui.DeclarationRequest=e={})),ui}var di={},Uu;function TR(){if(Uu)return di;Uu=1,Object.defineProperty(di,"__esModule",{value:!0}),di.SelectionRangeRequest=void 0;const t=Te();var e;return(function(n){n.method="textDocument/selectionRange",n.messageDirection=t.MessageDirection.clientToServer,n.type=new t.ProtocolRequestType(n.method)})(e||(di.SelectionRangeRequest=e={})),di}var jt={},qu;function RR(){if(qu)return jt;qu=1,Object.defineProperty(jt,"__esModule",{value:!0}),jt.WorkDoneProgressCancelNotification=jt.WorkDoneProgressCreateRequest=jt.WorkDoneProgress=void 0;const t=Gr(),e=Te();var n;(function(s){s.type=new t.ProgressType;function a(o){return o===s.type}s.is=a})(n||(jt.WorkDoneProgress=n={}));var r;(function(s){s.method="window/workDoneProgress/create",s.messageDirection=e.MessageDirection.serverToClient,s.type=new e.ProtocolRequestType(s.method)})(r||(jt.WorkDoneProgressCreateRequest=r={}));var i;return(function(s){s.method="window/workDoneProgress/cancel",s.messageDirection=e.MessageDirection.clientToServer,s.type=new e.ProtocolNotificationType(s.method)})(i||(jt.WorkDoneProgressCancelNotification=i={})),jt}var zt={},ju;function vR(){if(ju)return zt;ju=1,Object.defineProperty(zt,"__esModule",{value:!0}),zt.CallHierarchyOutgoingCallsRequest=zt.CallHierarchyIncomingCallsRequest=zt.CallHierarchyPrepareRequest=void 0;const t=Te();var e;(function(i){i.method="textDocument/prepareCallHierarchy",i.messageDirection=t.MessageDirection.clientToServer,i.type=new t.ProtocolRequestType(i.method)})(e||(zt.CallHierarchyPrepareRequest=e={}));var n;(function(i){i.method="callHierarchy/incomingCalls",i.messageDirection=t.MessageDirection.clientToServer,i.type=new t.ProtocolRequestType(i.method)})(n||(zt.CallHierarchyIncomingCallsRequest=n={}));var r;return(function(i){i.method="callHierarchy/outgoingCalls",i.messageDirection=t.MessageDirection.clientToServer,i.type=new t.ProtocolRequestType(i.method)})(r||(zt.CallHierarchyOutgoingCallsRequest=r={})),zt}var Xe={},zu;function ER(){if(zu)return Xe;zu=1,Object.defineProperty(Xe,"__esModule",{value:!0}),Xe.SemanticTokensRefreshRequest=Xe.SemanticTokensRangeRequest=Xe.SemanticTokensDeltaRequest=Xe.SemanticTokensRequest=Xe.SemanticTokensRegistrationType=Xe.TokenFormat=void 0;const t=Te();var e;(function(o){o.Relative="relative"})(e||(Xe.TokenFormat=e={}));var n;(function(o){o.method="textDocument/semanticTokens",o.type=new t.RegistrationType(o.method)})(n||(Xe.SemanticTokensRegistrationType=n={}));var r;(function(o){o.method="textDocument/semanticTokens/full",o.messageDirection=t.MessageDirection.clientToServer,o.type=new t.ProtocolRequestType(o.method),o.registrationMethod=n.method})(r||(Xe.SemanticTokensRequest=r={}));var i;(function(o){o.method="textDocument/semanticTokens/full/delta",o.messageDirection=t.MessageDirection.clientToServer,o.type=new t.ProtocolRequestType(o.method),o.registrationMethod=n.method})(i||(Xe.SemanticTokensDeltaRequest=i={}));var s;(function(o){o.method="textDocument/semanticTokens/range",o.messageDirection=t.MessageDirection.clientToServer,o.type=new t.ProtocolRequestType(o.method),o.registrationMethod=n.method})(s||(Xe.SemanticTokensRangeRequest=s={}));var a;return(function(o){o.method="workspace/semanticTokens/refresh",o.messageDirection=t.MessageDirection.serverToClient,o.type=new t.ProtocolRequestType0(o.method)})(a||(Xe.SemanticTokensRefreshRequest=a={})),Xe}var fi={},Bu;function AR(){if(Bu)return fi;Bu=1,Object.defineProperty(fi,"__esModule",{value:!0}),fi.ShowDocumentRequest=void 0;const t=Te();var e;return(function(n){n.method="window/showDocument",n.messageDirection=t.MessageDirection.serverToClient,n.type=new t.ProtocolRequestType(n.method)})(e||(fi.ShowDocumentRequest=e={})),fi}var hi={},Wu;function SR(){if(Wu)return hi;Wu=1,Object.defineProperty(hi,"__esModule",{value:!0}),hi.LinkedEditingRangeRequest=void 0;const t=Te();var e;return(function(n){n.method="textDocument/linkedEditingRange",n.messageDirection=t.MessageDirection.clientToServer,n.type=new t.ProtocolRequestType(n.method)})(e||(hi.LinkedEditingRangeRequest=e={})),hi}var Fe={},Vu;function kR(){if(Vu)return Fe;Vu=1,Object.defineProperty(Fe,"__esModule",{value:!0}),Fe.WillDeleteFilesRequest=Fe.DidDeleteFilesNotification=Fe.DidRenameFilesNotification=Fe.WillRenameFilesRequest=Fe.DidCreateFilesNotification=Fe.WillCreateFilesRequest=Fe.FileOperationPatternKind=void 0;const t=Te();var e;(function(c){c.file="file",c.folder="folder"})(e||(Fe.FileOperationPatternKind=e={}));var n;(function(c){c.method="workspace/willCreateFiles",c.messageDirection=t.MessageDirection.clientToServer,c.type=new t.ProtocolRequestType(c.method)})(n||(Fe.WillCreateFilesRequest=n={}));var r;(function(c){c.method="workspace/didCreateFiles",c.messageDirection=t.MessageDirection.clientToServer,c.type=new t.ProtocolNotificationType(c.method)})(r||(Fe.DidCreateFilesNotification=r={}));var i;(function(c){c.method="workspace/willRenameFiles",c.messageDirection=t.MessageDirection.clientToServer,c.type=new t.ProtocolRequestType(c.method)})(i||(Fe.WillRenameFilesRequest=i={}));var s;(function(c){c.method="workspace/didRenameFiles",c.messageDirection=t.MessageDirection.clientToServer,c.type=new t.ProtocolNotificationType(c.method)})(s||(Fe.DidRenameFilesNotification=s={}));var a;(function(c){c.method="workspace/didDeleteFiles",c.messageDirection=t.MessageDirection.clientToServer,c.type=new t.ProtocolNotificationType(c.method)})(a||(Fe.DidDeleteFilesNotification=a={}));var o;return(function(c){c.method="workspace/willDeleteFiles",c.messageDirection=t.MessageDirection.clientToServer,c.type=new t.ProtocolRequestType(c.method)})(o||(Fe.WillDeleteFilesRequest=o={})),Fe}var Bt={},Ku;function CR(){if(Ku)return Bt;Ku=1,Object.defineProperty(Bt,"__esModule",{value:!0}),Bt.MonikerRequest=Bt.MonikerKind=Bt.UniquenessLevel=void 0;const t=Te();var e;(function(i){i.document="document",i.project="project",i.group="group",i.scheme="scheme",i.global="global"})(e||(Bt.UniquenessLevel=e={}));var n;(function(i){i.$import="import",i.$export="export",i.local="local"})(n||(Bt.MonikerKind=n={}));var r;return(function(i){i.method="textDocument/moniker",i.messageDirection=t.MessageDirection.clientToServer,i.type=new t.ProtocolRequestType(i.method)})(r||(Bt.MonikerRequest=r={})),Bt}var Wt={},Hu;function bR(){if(Hu)return Wt;Hu=1,Object.defineProperty(Wt,"__esModule",{value:!0}),Wt.TypeHierarchySubtypesRequest=Wt.TypeHierarchySupertypesRequest=Wt.TypeHierarchyPrepareRequest=void 0;const t=Te();var e;(function(i){i.method="textDocument/prepareTypeHierarchy",i.messageDirection=t.MessageDirection.clientToServer,i.type=new t.ProtocolRequestType(i.method)})(e||(Wt.TypeHierarchyPrepareRequest=e={}));var n;(function(i){i.method="typeHierarchy/supertypes",i.messageDirection=t.MessageDirection.clientToServer,i.type=new t.ProtocolRequestType(i.method)})(n||(Wt.TypeHierarchySupertypesRequest=n={}));var r;return(function(i){i.method="typeHierarchy/subtypes",i.messageDirection=t.MessageDirection.clientToServer,i.type=new t.ProtocolRequestType(i.method)})(r||(Wt.TypeHierarchySubtypesRequest=r={})),Wt}var xn={},Yu;function _R(){if(Yu)return xn;Yu=1,Object.defineProperty(xn,"__esModule",{value:!0}),xn.InlineValueRefreshRequest=xn.InlineValueRequest=void 0;const t=Te();var e;(function(r){r.method="textDocument/inlineValue",r.messageDirection=t.MessageDirection.clientToServer,r.type=new t.ProtocolRequestType(r.method)})(e||(xn.InlineValueRequest=e={}));var n;return(function(r){r.method="workspace/inlineValue/refresh",r.messageDirection=t.MessageDirection.serverToClient,r.type=new t.ProtocolRequestType0(r.method)})(n||(xn.InlineValueRefreshRequest=n={})),xn}var Vt={},Xu;function NR(){if(Xu)return Vt;Xu=1,Object.defineProperty(Vt,"__esModule",{value:!0}),Vt.InlayHintRefreshRequest=Vt.InlayHintResolveRequest=Vt.InlayHintRequest=void 0;const t=Te();var e;(function(i){i.method="textDocument/inlayHint",i.messageDirection=t.MessageDirection.clientToServer,i.type=new t.ProtocolRequestType(i.method)})(e||(Vt.InlayHintRequest=e={}));var n;(function(i){i.method="inlayHint/resolve",i.messageDirection=t.MessageDirection.clientToServer,i.type=new t.ProtocolRequestType(i.method)})(n||(Vt.InlayHintResolveRequest=n={}));var r;return(function(i){i.method="workspace/inlayHint/refresh",i.messageDirection=t.MessageDirection.serverToClient,i.type=new t.ProtocolRequestType0(i.method)})(r||(Vt.InlayHintRefreshRequest=r={})),Vt}var ct={},Ju;function wR(){if(Ju)return ct;Ju=1,Object.defineProperty(ct,"__esModule",{value:!0}),ct.DiagnosticRefreshRequest=ct.WorkspaceDiagnosticRequest=ct.DocumentDiagnosticRequest=ct.DocumentDiagnosticReportKind=ct.DiagnosticServerCancellationData=void 0;const t=Gr(),e=hl(),n=Te();var r;(function(c){function l(u){const f=u;return f&&e.boolean(f.retriggerRequest)}c.is=l})(r||(ct.DiagnosticServerCancellationData=r={}));var i;(function(c){c.Full="full",c.Unchanged="unchanged"})(i||(ct.DocumentDiagnosticReportKind=i={}));var s;(function(c){c.method="textDocument/diagnostic",c.messageDirection=n.MessageDirection.clientToServer,c.type=new n.ProtocolRequestType(c.method),c.partialResult=new t.ProgressType})(s||(ct.DocumentDiagnosticRequest=s={}));var a;(function(c){c.method="workspace/diagnostic",c.messageDirection=n.MessageDirection.clientToServer,c.type=new n.ProtocolRequestType(c.method),c.partialResult=new t.ProgressType})(a||(ct.WorkspaceDiagnosticRequest=a={}));var o;return(function(c){c.method="workspace/diagnostic/refresh",c.messageDirection=n.MessageDirection.serverToClient,c.type=new n.ProtocolRequestType0(c.method)})(o||(ct.DiagnosticRefreshRequest=o={})),ct}var pe={},Qu;function IR(){if(Qu)return pe;Qu=1,Object.defineProperty(pe,"__esModule",{value:!0}),pe.DidCloseNotebookDocumentNotification=pe.DidSaveNotebookDocumentNotification=pe.DidChangeNotebookDocumentNotification=pe.NotebookCellArrayChange=pe.DidOpenNotebookDocumentNotification=pe.NotebookDocumentSyncRegistrationType=pe.NotebookDocument=pe.NotebookCell=pe.ExecutionSummary=pe.NotebookCellKind=void 0;const t=fl,e=hl(),n=Te();var r;(function(p){p.Markup=1,p.Code=2;function A(N){return N===1||N===2}p.is=A})(r||(pe.NotebookCellKind=r={}));var i;(function(p){function A(C,b){const k={executionOrder:C};return(b===!0||b===!1)&&(k.success=b),k}p.create=A;function N(C){const b=C;return e.objectLiteral(b)&&t.uinteger.is(b.executionOrder)&&(b.success===void 0||e.boolean(b.success))}p.is=N;function I(C,b){return C===b?!0:C==null||b===null||b===void 0?!1:C.executionOrder===b.executionOrder&&C.success===b.success}p.equals=I})(i||(pe.ExecutionSummary=i={}));var s;(function(p){function A(b,k){return{kind:b,document:k}}p.create=A;function N(b){const k=b;return e.objectLiteral(k)&&r.is(k.kind)&&t.DocumentUri.is(k.document)&&(k.metadata===void 0||e.objectLiteral(k.metadata))}p.is=N;function I(b,k){const P=new Set;return b.document!==k.document&&P.add("document"),b.kind!==k.kind&&P.add("kind"),b.executionSummary!==k.executionSummary&&P.add("executionSummary"),(b.metadata!==void 0||k.metadata!==void 0)&&!C(b.metadata,k.metadata)&&P.add("metadata"),(b.executionSummary!==void 0||k.executionSummary!==void 0)&&!i.equals(b.executionSummary,k.executionSummary)&&P.add("executionSummary"),P}p.diff=I;function C(b,k){if(b===k)return!0;if(b==null||k===null||k===void 0||typeof b!=typeof k||typeof b!="object")return!1;const P=Array.isArray(b),H=Array.isArray(k);if(P!==H)return!1;if(P&&H){if(b.length!==k.length)return!1;for(let K=0;K<b.length;K++)if(!C(b[K],k[K]))return!1}if(e.objectLiteral(b)&&e.objectLiteral(k)){const K=Object.keys(b),J=Object.keys(k);if(K.length!==J.length||(K.sort(),J.sort(),!C(K,J)))return!1;for(let oe=0;oe<K.length;oe++){const ue=K[oe];if(!C(b[ue],k[ue]))return!1}}return!0}})(s||(pe.NotebookCell=s={}));var a;(function(p){function A(I,C,b,k){return{uri:I,notebookType:C,version:b,cells:k}}p.create=A;function N(I){const C=I;return e.objectLiteral(C)&&e.string(C.uri)&&t.integer.is(C.version)&&e.typedArray(C.cells,s.is)}p.is=N})(a||(pe.NotebookDocument=a={}));var o;(function(p){p.method="notebookDocument/sync",p.messageDirection=n.MessageDirection.clientToServer,p.type=new n.RegistrationType(p.method)})(o||(pe.NotebookDocumentSyncRegistrationType=o={}));var c;(function(p){p.method="notebookDocument/didOpen",p.messageDirection=n.MessageDirection.clientToServer,p.type=new n.ProtocolNotificationType(p.method),p.registrationMethod=o.method})(c||(pe.DidOpenNotebookDocumentNotification=c={}));var l;(function(p){function A(I){const C=I;return e.objectLiteral(C)&&t.uinteger.is(C.start)&&t.uinteger.is(C.deleteCount)&&(C.cells===void 0||e.typedArray(C.cells,s.is))}p.is=A;function N(I,C,b){const k={start:I,deleteCount:C};return b!==void 0&&(k.cells=b),k}p.create=N})(l||(pe.NotebookCellArrayChange=l={}));var u;(function(p){p.method="notebookDocument/didChange",p.messageDirection=n.MessageDirection.clientToServer,p.type=new n.ProtocolNotificationType(p.method),p.registrationMethod=o.method})(u||(pe.DidChangeNotebookDocumentNotification=u={}));var f;(function(p){p.method="notebookDocument/didSave",p.messageDirection=n.MessageDirection.clientToServer,p.type=new n.ProtocolNotificationType(p.method),p.registrationMethod=o.method})(f||(pe.DidSaveNotebookDocumentNotification=f={}));var m;return(function(p){p.method="notebookDocument/didClose",p.messageDirection=n.MessageDirection.clientToServer,p.type=new n.ProtocolNotificationType(p.method),p.registrationMethod=o.method})(m||(pe.DidCloseNotebookDocumentNotification=m={})),pe}var pi={},Zu;function PR(){if(Zu)return pi;Zu=1,Object.defineProperty(pi,"__esModule",{value:!0}),pi.InlineCompletionRequest=void 0;const t=Te();var e;return(function(n){n.method="textDocument/inlineCompletion",n.messageDirection=t.MessageDirection.clientToServer,n.type=new t.ProtocolRequestType(n.method)})(e||(pi.InlineCompletionRequest=e={})),pi}var ed;function $R(){return ed||(ed=1,(function(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;const e=Te(),n=fl,r=hl(),i=dR();Object.defineProperty(t,"ImplementationRequest",{enumerable:!0,get:function(){return i.ImplementationRequest}});const s=fR();Object.defineProperty(t,"TypeDefinitionRequest",{enumerable:!0,get:function(){return s.TypeDefinitionRequest}});const a=hR();Object.defineProperty(t,"WorkspaceFoldersRequest",{enumerable:!0,get:function(){return a.WorkspaceFoldersRequest}}),Object.defineProperty(t,"DidChangeWorkspaceFoldersNotification",{enumerable:!0,get:function(){return a.DidChangeWorkspaceFoldersNotification}});const o=pR();Object.defineProperty(t,"ConfigurationRequest",{enumerable:!0,get:function(){return o.ConfigurationRequest}});const c=mR();Object.defineProperty(t,"DocumentColorRequest",{enumerable:!0,get:function(){return c.DocumentColorRequest}}),Object.defineProperty(t,"ColorPresentationRequest",{enumerable:!0,get:function(){return c.ColorPresentationRequest}});const l=gR();Object.defineProperty(t,"FoldingRangeRequest",{enumerable:!0,get:function(){return l.FoldingRangeRequest}}),Object.defineProperty(t,"FoldingRangeRefreshRequest",{enumerable:!0,get:function(){return l.FoldingRangeRefreshRequest}});const u=yR();Object.defineProperty(t,"DeclarationRequest",{enumerable:!0,get:function(){return u.DeclarationRequest}});const f=TR();Object.defineProperty(t,"SelectionRangeRequest",{enumerable:!0,get:function(){return f.SelectionRangeRequest}});const m=RR();Object.defineProperty(t,"WorkDoneProgress",{enumerable:!0,get:function(){return m.WorkDoneProgress}}),Object.defineProperty(t,"WorkDoneProgressCreateRequest",{enumerable:!0,get:function(){return m.WorkDoneProgressCreateRequest}}),Object.defineProperty(t,"WorkDoneProgressCancelNotification",{enumerable:!0,get:function(){return m.WorkDoneProgressCancelNotification}});const p=vR();Object.defineProperty(t,"CallHierarchyIncomingCallsRequest",{enumerable:!0,get:function(){return p.CallHierarchyIncomingCallsRequest}}),Object.defineProperty(t,"CallHierarchyOutgoingCallsRequest",{enumerable:!0,get:function(){return p.CallHierarchyOutgoingCallsRequest}}),Object.defineProperty(t,"CallHierarchyPrepareRequest",{enumerable:!0,get:function(){return p.CallHierarchyPrepareRequest}});const A=ER();Object.defineProperty(t,"TokenFormat",{enumerable:!0,get:function(){return A.TokenFormat}}),Object.defineProperty(t,"SemanticTokensRequest",{enumerable:!0,get:function(){return A.SemanticTokensRequest}}),Object.defineProperty(t,"SemanticTokensDeltaRequest",{enumerable:!0,get:function(){return A.SemanticTokensDeltaRequest}}),Object.defineProperty(t,"SemanticTokensRangeRequest",{enumerable:!0,get:function(){return A.SemanticTokensRangeRequest}}),Object.defineProperty(t,"SemanticTokensRefreshRequest",{enumerable:!0,get:function(){return A.SemanticTokensRefreshRequest}}),Object.defineProperty(t,"SemanticTokensRegistrationType",{enumerable:!0,get:function(){return A.SemanticTokensRegistrationType}});const N=AR();Object.defineProperty(t,"ShowDocumentRequest",{enumerable:!0,get:function(){return N.ShowDocumentRequest}});const I=SR();Object.defineProperty(t,"LinkedEditingRangeRequest",{enumerable:!0,get:function(){return I.LinkedEditingRangeRequest}});const C=kR();Object.defineProperty(t,"FileOperationPatternKind",{enumerable:!0,get:function(){return C.FileOperationPatternKind}}),Object.defineProperty(t,"DidCreateFilesNotification",{enumerable:!0,get:function(){return C.DidCreateFilesNotification}}),Object.defineProperty(t,"WillCreateFilesRequest",{enumerable:!0,get:function(){return C.WillCreateFilesRequest}}),Object.defineProperty(t,"DidRenameFilesNotification",{enumerable:!0,get:function(){return C.DidRenameFilesNotification}}),Object.defineProperty(t,"WillRenameFilesRequest",{enumerable:!0,get:function(){return C.WillRenameFilesRequest}}),Object.defineProperty(t,"DidDeleteFilesNotification",{enumerable:!0,get:function(){return C.DidDeleteFilesNotification}}),Object.defineProperty(t,"WillDeleteFilesRequest",{enumerable:!0,get:function(){return C.WillDeleteFilesRequest}});const b=CR();Object.defineProperty(t,"UniquenessLevel",{enumerable:!0,get:function(){return b.UniquenessLevel}}),Object.defineProperty(t,"MonikerKind",{enumerable:!0,get:function(){return b.MonikerKind}}),Object.defineProperty(t,"MonikerRequest",{enumerable:!0,get:function(){return b.MonikerRequest}});const k=bR();Object.defineProperty(t,"TypeHierarchyPrepareRequest",{enumerable:!0,get:function(){return k.TypeHierarchyPrepareRequest}}),Object.defineProperty(t,"TypeHierarchySubtypesRequest",{enumerable:!0,get:function(){return k.TypeHierarchySubtypesRequest}}),Object.defineProperty(t,"TypeHierarchySupertypesRequest",{enumerable:!0,get:function(){return k.TypeHierarchySupertypesRequest}});const P=_R();Object.defineProperty(t,"InlineValueRequest",{enumerable:!0,get:function(){return P.InlineValueRequest}}),Object.defineProperty(t,"InlineValueRefreshRequest",{enumerable:!0,get:function(){return P.InlineValueRefreshRequest}});const H=NR();Object.defineProperty(t,"InlayHintRequest",{enumerable:!0,get:function(){return H.InlayHintRequest}}),Object.defineProperty(t,"InlayHintResolveRequest",{enumerable:!0,get:function(){return H.InlayHintResolveRequest}}),Object.defineProperty(t,"InlayHintRefreshRequest",{enumerable:!0,get:function(){return H.InlayHintRefreshRequest}});const K=wR();Object.defineProperty(t,"DiagnosticServerCancellationData",{enumerable:!0,get:function(){return K.DiagnosticServerCancellationData}}),Object.defineProperty(t,"DocumentDiagnosticReportKind",{enumerable:!0,get:function(){return K.DocumentDiagnosticReportKind}}),Object.defineProperty(t,"DocumentDiagnosticRequest",{enumerable:!0,get:function(){return K.DocumentDiagnosticRequest}}),Object.defineProperty(t,"WorkspaceDiagnosticRequest",{enumerable:!0,get:function(){return K.WorkspaceDiagnosticRequest}}),Object.defineProperty(t,"DiagnosticRefreshRequest",{enumerable:!0,get:function(){return K.DiagnosticRefreshRequest}});const J=IR();Object.defineProperty(t,"NotebookCellKind",{enumerable:!0,get:function(){return J.NotebookCellKind}}),Object.defineProperty(t,"ExecutionSummary",{enumerable:!0,get:function(){return J.ExecutionSummary}}),Object.defineProperty(t,"NotebookCell",{enumerable:!0,get:function(){return J.NotebookCell}}),Object.defineProperty(t,"NotebookDocument",{enumerable:!0,get:function(){return J.NotebookDocument}}),Object.defineProperty(t,"NotebookDocumentSyncRegistrationType",{enumerable:!0,get:function(){return J.NotebookDocumentSyncRegistrationType}}),Object.defineProperty(t,"DidOpenNotebookDocumentNotification",{enumerable:!0,get:function(){return J.DidOpenNotebookDocumentNotification}}),Object.defineProperty(t,"NotebookCellArrayChange",{enumerable:!0,get:function(){return J.NotebookCellArrayChange}}),Object.defineProperty(t,"DidChangeNotebookDocumentNotification",{enumerable:!0,get:function(){return J.DidChangeNotebookDocumentNotification}}),Object.defineProperty(t,"DidSaveNotebookDocumentNotification",{enumerable:!0,get:function(){return J.DidSaveNotebookDocumentNotification}}),Object.defineProperty(t,"DidCloseNotebookDocumentNotification",{enumerable:!0,get:function(){return J.DidCloseNotebookDocumentNotification}});const oe=PR();Object.defineProperty(t,"InlineCompletionRequest",{enumerable:!0,get:function(){return oe.InlineCompletionRequest}});var ue;(function(d){function ke(Ce){const V=Ce;return r.string(V)||r.string(V.language)||r.string(V.scheme)||r.string(V.pattern)}d.is=ke})(ue||(t.TextDocumentFilter=ue={}));var de;(function(d){function ke(Ce){const V=Ce;return r.objectLiteral(V)&&(r.string(V.notebookType)||r.string(V.scheme)||r.string(V.pattern))}d.is=ke})(de||(t.NotebookDocumentFilter=de={}));var w;(function(d){function ke(Ce){const V=Ce;return r.objectLiteral(V)&&(r.string(V.notebook)||de.is(V.notebook))&&(V.language===void 0||r.string(V.language))}d.is=ke})(w||(t.NotebookCellTextDocumentFilter=w={}));var T;(function(d){function ke(Ce){if(!Array.isArray(Ce))return!1;for(let V of Ce)if(!r.string(V)&&!ue.is(V)&&!w.is(V))return!1;return!0}d.is=ke})(T||(t.DocumentSelector=T={}));var g;(function(d){d.method="client/registerCapability",d.messageDirection=e.MessageDirection.serverToClient,d.type=new e.ProtocolRequestType(d.method)})(g||(t.RegistrationRequest=g={}));var S;(function(d){d.method="client/unregisterCapability",d.messageDirection=e.MessageDirection.serverToClient,d.type=new e.ProtocolRequestType(d.method)})(S||(t.UnregistrationRequest=S={}));var y;(function(d){d.Create="create",d.Rename="rename",d.Delete="delete"})(y||(t.ResourceOperationKind=y={}));var R;(function(d){d.Abort="abort",d.Transactional="transactional",d.TextOnlyTransactional="textOnlyTransactional",d.Undo="undo"})(R||(t.FailureHandlingKind=R={}));var E;(function(d){d.UTF8="utf-8",d.UTF16="utf-16",d.UTF32="utf-32"})(E||(t.PositionEncodingKind=E={}));var O;(function(d){function ke(Ce){const V=Ce;return V&&r.string(V.id)&&V.id.length>0}d.hasId=ke})(O||(t.StaticRegistrationOptions=O={}));var D;(function(d){function ke(Ce){const V=Ce;return V&&(V.documentSelector===null||T.is(V.documentSelector))}d.is=ke})(D||(t.TextDocumentRegistrationOptions=D={}));var x;(function(d){function ke(V){const h=V;return r.objectLiteral(h)&&(h.workDoneProgress===void 0||r.boolean(h.workDoneProgress))}d.is=ke;function Ce(V){const h=V;return h&&r.boolean(h.workDoneProgress)}d.hasWorkDoneProgress=Ce})(x||(t.WorkDoneProgressOptions=x={}));var j;(function(d){d.method="initialize",d.messageDirection=e.MessageDirection.clientToServer,d.type=new e.ProtocolRequestType(d.method)})(j||(t.InitializeRequest=j={}));var G;(function(d){d.unknownProtocolVersion=1})(G||(t.InitializeErrorCodes=G={}));var ie;(function(d){d.method="initialized",d.messageDirection=e.MessageDirection.clientToServer,d.type=new e.ProtocolNotificationType(d.method)})(ie||(t.InitializedNotification=ie={}));var B;(function(d){d.method="shutdown",d.messageDirection=e.MessageDirection.clientToServer,d.type=new e.ProtocolRequestType0(d.method)})(B||(t.ShutdownRequest=B={}));var ne;(function(d){d.method="exit",d.messageDirection=e.MessageDirection.clientToServer,d.type=new e.ProtocolNotificationType0(d.method)})(ne||(t.ExitNotification=ne={}));var Oe;(function(d){d.method="workspace/didChangeConfiguration",d.messageDirection=e.MessageDirection.clientToServer,d.type=new e.ProtocolNotificationType(d.method)})(Oe||(t.DidChangeConfigurationNotification=Oe={}));var Re;(function(d){d.Error=1,d.Warning=2,d.Info=3,d.Log=4,d.Debug=5})(Re||(t.MessageType=Re={}));var fe;(function(d){d.method="window/showMessage",d.messageDirection=e.MessageDirection.serverToClient,d.type=new e.ProtocolNotificationType(d.method)})(fe||(t.ShowMessageNotification=fe={}));var Ie;(function(d){d.method="window/showMessageRequest",d.messageDirection=e.MessageDirection.serverToClient,d.type=new e.ProtocolRequestType(d.method)})(Ie||(t.ShowMessageRequest=Ie={}));var xe;(function(d){d.method="window/logMessage",d.messageDirection=e.MessageDirection.serverToClient,d.type=new e.ProtocolNotificationType(d.method)})(xe||(t.LogMessageNotification=xe={}));var Ne;(function(d){d.method="telemetry/event",d.messageDirection=e.MessageDirection.serverToClient,d.type=new e.ProtocolNotificationType(d.method)})(Ne||(t.TelemetryEventNotification=Ne={}));var Z;(function(d){d.None=0,d.Full=1,d.Incremental=2})(Z||(t.TextDocumentSyncKind=Z={}));var ot;(function(d){d.method="textDocument/didOpen",d.messageDirection=e.MessageDirection.clientToServer,d.type=new e.ProtocolNotificationType(d.method)})(ot||(t.DidOpenTextDocumentNotification=ot={}));var ve;(function(d){function ke(V){let h=V;return h!=null&&typeof h.text=="string"&&h.range!==void 0&&(h.rangeLength===void 0||typeof h.rangeLength=="number")}d.isIncremental=ke;function Ce(V){let h=V;return h!=null&&typeof h.text=="string"&&h.range===void 0&&h.rangeLength===void 0}d.isFull=Ce})(ve||(t.TextDocumentContentChangeEvent=ve={}));var Rt;(function(d){d.method="textDocument/didChange",d.messageDirection=e.MessageDirection.clientToServer,d.type=new e.ProtocolNotificationType(d.method)})(Rt||(t.DidChangeTextDocumentNotification=Rt={}));var rr;(function(d){d.method="textDocument/didClose",d.messageDirection=e.MessageDirection.clientToServer,d.type=new e.ProtocolNotificationType(d.method)})(rr||(t.DidCloseTextDocumentNotification=rr={}));var Ur;(function(d){d.method="textDocument/didSave",d.messageDirection=e.MessageDirection.clientToServer,d.type=new e.ProtocolNotificationType(d.method)})(Ur||(t.DidSaveTextDocumentNotification=Ur={}));var qr;(function(d){d.Manual=1,d.AfterDelay=2,d.FocusOut=3})(qr||(t.TextDocumentSaveReason=qr={}));var jr;(function(d){d.method="textDocument/willSave",d.messageDirection=e.MessageDirection.clientToServer,d.type=new e.ProtocolNotificationType(d.method)})(jr||(t.WillSaveTextDocumentNotification=jr={}));var zr;(function(d){d.method="textDocument/willSaveWaitUntil",d.messageDirection=e.MessageDirection.clientToServer,d.type=new e.ProtocolRequestType(d.method)})(zr||(t.WillSaveTextDocumentWaitUntilRequest=zr={}));var vt;(function(d){d.method="workspace/didChangeWatchedFiles",d.messageDirection=e.MessageDirection.clientToServer,d.type=new e.ProtocolNotificationType(d.method)})(vt||(t.DidChangeWatchedFilesNotification=vt={}));var Br;(function(d){d.Created=1,d.Changed=2,d.Deleted=3})(Br||(t.FileChangeType=Br={}));var Qi;(function(d){function ke(Ce){const V=Ce;return r.objectLiteral(V)&&(n.URI.is(V.baseUri)||n.WorkspaceFolder.is(V.baseUri))&&r.string(V.pattern)}d.is=ke})(Qi||(t.RelativePattern=Qi={}));var Zi;(function(d){d.Create=1,d.Change=2,d.Delete=4})(Zi||(t.WatchKind=Zi={}));var es;(function(d){d.method="textDocument/publishDiagnostics",d.messageDirection=e.MessageDirection.serverToClient,d.type=new e.ProtocolNotificationType(d.method)})(es||(t.PublishDiagnosticsNotification=es={}));var ts;(function(d){d.Invoked=1,d.TriggerCharacter=2,d.TriggerForIncompleteCompletions=3})(ts||(t.CompletionTriggerKind=ts={}));var Wr;(function(d){d.method="textDocument/completion",d.messageDirection=e.MessageDirection.clientToServer,d.type=new e.ProtocolRequestType(d.method)})(Wr||(t.CompletionRequest=Wr={}));var Vr;(function(d){d.method="completionItem/resolve",d.messageDirection=e.MessageDirection.clientToServer,d.type=new e.ProtocolRequestType(d.method)})(Vr||(t.CompletionResolveRequest=Vr={}));var Mt;(function(d){d.method="textDocument/hover",d.messageDirection=e.MessageDirection.clientToServer,d.type=new e.ProtocolRequestType(d.method)})(Mt||(t.HoverRequest=Mt={}));var Kr;(function(d){d.Invoked=1,d.TriggerCharacter=2,d.ContentChange=3})(Kr||(t.SignatureHelpTriggerKind=Kr={}));var ns;(function(d){d.method="textDocument/signatureHelp",d.messageDirection=e.MessageDirection.clientToServer,d.type=new e.ProtocolRequestType(d.method)})(ns||(t.SignatureHelpRequest=ns={}));var rs;(function(d){d.method="textDocument/definition",d.messageDirection=e.MessageDirection.clientToServer,d.type=new e.ProtocolRequestType(d.method)})(rs||(t.DefinitionRequest=rs={}));var Hr;(function(d){d.method="textDocument/references",d.messageDirection=e.MessageDirection.clientToServer,d.type=new e.ProtocolRequestType(d.method)})(Hr||(t.ReferencesRequest=Hr={}));var Yr;(function(d){d.method="textDocument/documentHighlight",d.messageDirection=e.MessageDirection.clientToServer,d.type=new e.ProtocolRequestType(d.method)})(Yr||(t.DocumentHighlightRequest=Yr={}));var is;(function(d){d.method="textDocument/documentSymbol",d.messageDirection=e.MessageDirection.clientToServer,d.type=new e.ProtocolRequestType(d.method)})(is||(t.DocumentSymbolRequest=is={}));var ss;(function(d){d.method="textDocument/codeAction",d.messageDirection=e.MessageDirection.clientToServer,d.type=new e.ProtocolRequestType(d.method)})(ss||(t.CodeActionRequest=ss={}));var as;(function(d){d.method="codeAction/resolve",d.messageDirection=e.MessageDirection.clientToServer,d.type=new e.ProtocolRequestType(d.method)})(as||(t.CodeActionResolveRequest=as={}));var os;(function(d){d.method="workspace/symbol",d.messageDirection=e.MessageDirection.clientToServer,d.type=new e.ProtocolRequestType(d.method)})(os||(t.WorkspaceSymbolRequest=os={}));var cs;(function(d){d.method="workspaceSymbol/resolve",d.messageDirection=e.MessageDirection.clientToServer,d.type=new e.ProtocolRequestType(d.method)})(cs||(t.WorkspaceSymbolResolveRequest=cs={}));var ls;(function(d){d.method="textDocument/codeLens",d.messageDirection=e.MessageDirection.clientToServer,d.type=new e.ProtocolRequestType(d.method)})(ls||(t.CodeLensRequest=ls={}));var Et;(function(d){d.method="codeLens/resolve",d.messageDirection=e.MessageDirection.clientToServer,d.type=new e.ProtocolRequestType(d.method)})(Et||(t.CodeLensResolveRequest=Et={}));var us;(function(d){d.method="workspace/codeLens/refresh",d.messageDirection=e.MessageDirection.serverToClient,d.type=new e.ProtocolRequestType0(d.method)})(us||(t.CodeLensRefreshRequest=us={}));var ds;(function(d){d.method="textDocument/documentLink",d.messageDirection=e.MessageDirection.clientToServer,d.type=new e.ProtocolRequestType(d.method)})(ds||(t.DocumentLinkRequest=ds={}));var En;(function(d){d.method="documentLink/resolve",d.messageDirection=e.MessageDirection.clientToServer,d.type=new e.ProtocolRequestType(d.method)})(En||(t.DocumentLinkResolveRequest=En={}));var fs;(function(d){d.method="textDocument/formatting",d.messageDirection=e.MessageDirection.clientToServer,d.type=new e.ProtocolRequestType(d.method)})(fs||(t.DocumentFormattingRequest=fs={}));var ir;(function(d){d.method="textDocument/rangeFormatting",d.messageDirection=e.MessageDirection.clientToServer,d.type=new e.ProtocolRequestType(d.method)})(ir||(t.DocumentRangeFormattingRequest=ir={}));var hs;(function(d){d.method="textDocument/rangesFormatting",d.messageDirection=e.MessageDirection.clientToServer,d.type=new e.ProtocolRequestType(d.method)})(hs||(t.DocumentRangesFormattingRequest=hs={}));var Ft;(function(d){d.method="textDocument/onTypeFormatting",d.messageDirection=e.MessageDirection.clientToServer,d.type=new e.ProtocolRequestType(d.method)})(Ft||(t.DocumentOnTypeFormattingRequest=Ft={}));var cn;(function(d){d.Identifier=1})(cn||(t.PrepareSupportDefaultBehavior=cn={}));var ps;(function(d){d.method="textDocument/rename",d.messageDirection=e.MessageDirection.clientToServer,d.type=new e.ProtocolRequestType(d.method)})(ps||(t.RenameRequest=ps={}));var ms;(function(d){d.method="textDocument/prepareRename",d.messageDirection=e.MessageDirection.clientToServer,d.type=new e.ProtocolRequestType(d.method)})(ms||(t.PrepareRenameRequest=ms={}));var ln;(function(d){d.method="workspace/executeCommand",d.messageDirection=e.MessageDirection.clientToServer,d.type=new e.ProtocolRequestType(d.method)})(ln||(t.ExecuteCommandRequest=ln={}));var Xr;(function(d){d.method="workspace/applyEdit",d.messageDirection=e.MessageDirection.serverToClient,d.type=new e.ProtocolRequestType("workspace/applyEdit")})(Xr||(t.ApplyWorkspaceEditRequest=Xr={}))})(Ha)),Ha}var mi={},td;function LR(){if(td)return mi;td=1,Object.defineProperty(mi,"__esModule",{value:!0}),mi.createProtocolConnection=void 0;const t=Gr();function e(n,r,i,s){return t.ConnectionStrategy.is(s)&&(s={connectionStrategy:s}),(0,t.createMessageConnection)(n,r,i,s)}return mi.createProtocolConnection=e,mi}var nd;function OR(){return nd||(nd=1,(function(t){var e=Pn&&Pn.__createBinding||(Object.create?(function(s,a,o,c){c===void 0&&(c=o);var l=Object.getOwnPropertyDescriptor(a,o);(!l||("get"in l?!a.__esModule:l.writable||l.configurable))&&(l={enumerable:!0,get:function(){return a[o]}}),Object.defineProperty(s,c,l)}):(function(s,a,o,c){c===void 0&&(c=o),s[c]=a[o]})),n=Pn&&Pn.__exportStar||function(s,a){for(var o in s)o!=="default"&&!Object.prototype.hasOwnProperty.call(a,o)&&e(a,s,o)};Object.defineProperty(t,"__esModule",{value:!0}),t.LSPErrorCodes=t.createProtocolConnection=void 0,n(Gr(),t),n(fl,t),n(Te(),t),n($R(),t);var r=LR();Object.defineProperty(t,"createProtocolConnection",{enumerable:!0,get:function(){return r.createProtocolConnection}});var i;(function(s){s.lspReservedErrorRangeStart=-32899,s.RequestFailed=-32803,s.ServerCancelled=-32802,s.ContentModified=-32801,s.RequestCancelled=-32800,s.lspReservedErrorRangeEnd=-32800})(i||(t.LSPErrorCodes=i={}))})(Pn)),Pn}var rd;function xR(){return rd||(rd=1,(function(t){var e=bn&&bn.__createBinding||(Object.create?(function(s,a,o,c){c===void 0&&(c=o);var l=Object.getOwnPropertyDescriptor(a,o);(!l||("get"in l?!a.__esModule:l.writable||l.configurable))&&(l={enumerable:!0,get:function(){return a[o]}}),Object.defineProperty(s,c,l)}):(function(s,a,o,c){c===void 0&&(c=o),s[c]=a[o]})),n=bn&&bn.__exportStar||function(s,a){for(var o in s)o!=="default"&&!Object.prototype.hasOwnProperty.call(a,o)&&e(a,s,o)};Object.defineProperty(t,"__esModule",{value:!0}),t.createProtocolConnection=void 0;const r=Iu();n(Iu(),t),n(OR(),t);function i(s,a,o,c){return(0,r.createMessageConnection)(s,a,o,c)}t.createProtocolConnection=i})(bn)),bn}var _s=xR(),_i;(function(t){function e(n){return{dispose:async()=>await n()}}t.create=e})(_i||(_i={}));class DR{constructor(e){this.updateBuildOptions={validation:{categories:["built-in","fast"]}},this.updateListeners=[],this.buildPhaseListeners=new Gi,this.documentPhaseListeners=new Gi,this.buildState=new Map,this.documentBuildWaiters=new Map,this.currentState=Y.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,n={},r=ye.CancellationToken.None){for(const i of e){const s=i.uri.toString();if(i.state===Y.Validated){if(typeof n.validation=="boolean"&&n.validation)this.resetToState(i,Y.IndexedReferences);else if(typeof n.validation=="object"){const a=this.findMissingValidationCategories(i,n);a.length>0&&(this.buildState.set(s,{completed:!1,options:{validation:{categories:a}},result:this.buildState.get(s)?.result}),i.state=Y.IndexedReferences)}}else this.buildState.delete(s)}this.currentState=Y.Changed,await this.emitUpdate(e.map(i=>i.uri),[]),await this.buildDocuments(e,n,r)}async update(e,n,r=ye.CancellationToken.None){this.currentState=Y.Changed;const i=[];for(const c of n){const l=this.langiumDocuments.deleteDocuments(c);for(const u of l)i.push(u.uri),this.cleanUpDeleted(u)}const s=(await Promise.all(e.map(c=>this.findChangedUris(c)))).flat();for(const c of s){let l=this.langiumDocuments.getDocument(c);l===void 0&&(l=this.langiumDocumentFactory.fromModel({$type:"INVALID"},c),l.state=Y.Changed,this.langiumDocuments.addDocument(l)),this.resetToState(l,Y.Changed)}const a=me(s).concat(i).map(c=>c.toString()).toSet();this.langiumDocuments.all.filter(c=>!a.has(c.uri.toString())&&this.shouldRelink(c,a)).forEach(c=>this.resetToState(c,Y.ComputedScopes)),await this.emitUpdate(s,i),await Je(r);const o=this.sortDocuments(this.langiumDocuments.all.filter(c=>c.state<Y.Validated||!this.buildState.get(c.uri.toString())?.completed||this.resultsAreIncomplete(c,this.updateBuildOptions)).toArray());await this.buildDocuments(o,this.updateBuildOptions,r)}resultsAreIncomplete(e,n){return this.findMissingValidationCategories(e,n).length>=1}findMissingValidationCategories(e,n){const r=this.buildState.get(e.uri.toString()),i=this.serviceRegistry.getServices(e.uri).validation.ValidationRegistry.getAllValidationCategories(e),s=r?.result?.validationChecks?new Set(r?.result?.validationChecks):r?.completed?i:new Set,a=n===void 0||n.validation===!0?i:typeof n.validation=="object"?n.validation.categories??i:[];return me(a).filter(o=>!s.has(o)).toArray()}async findChangedUris(e){if(this.langiumDocuments.getDocument(e)??this.textDocuments?.get(e))return[e];try{const r=await this.fileSystemProvider.stat(e);if(r.isDirectory)return await this.workspaceManager().searchFolder(e);if(this.workspaceManager().shouldIncludeEntry(r))return[e]}catch{}return[]}async emitUpdate(e,n){await Promise.all(this.updateListeners.map(r=>r(e,n)))}sortDocuments(e){let n=0,r=e.length-1;for(;n<r;){for(;n<e.length&&this.hasTextDocument(e[n]);)n++;for(;r>=0&&!this.hasTextDocument(e[r]);)r--;n<r&&([e[n],e[r]]=[e[r],e[n]])}return e}hasTextDocument(e){return!!this.textDocuments?.get(e.uri)}shouldRelink(e,n){return e.references.some(r=>r.error!==void 0)?!0:this.indexManager.isAffected(e,n)}onUpdate(e){return this.updateListeners.push(e),_i.create(()=>{const n=this.updateListeners.indexOf(e);n>=0&&this.updateListeners.splice(n,1)})}resetToState(e,n){switch(n){case Y.Changed:case Y.Parsed:this.indexManager.removeContent(e.uri);case Y.IndexedContent:e.localSymbols=void 0;case Y.ComputedScopes:this.serviceRegistry.getServices(e.uri).references.Linker.unlink(e);case Y.Linked:this.indexManager.removeReferences(e.uri);case Y.IndexedReferences:e.diagnostics=void 0,this.buildState.delete(e.uri.toString());case Y.Validated:}e.state>n&&(e.state=n)}cleanUpDeleted(e){this.buildState.delete(e.uri.toString()),this.indexManager.remove(e.uri),e.state=Y.Changed}async buildDocuments(e,n,r){this.prepareBuild(e,n),await this.runCancelable(e,Y.Parsed,r,a=>this.langiumDocumentFactory.update(a,r)),await this.runCancelable(e,Y.IndexedContent,r,a=>this.indexManager.updateContent(a,r)),await this.runCancelable(e,Y.ComputedScopes,r,async a=>{const o=this.serviceRegistry.getServices(a.uri).references.ScopeComputation;a.localSymbols=await o.collectLocalSymbols(a,r)});const i=e.filter(a=>this.shouldLink(a));await this.runCancelable(i,Y.Linked,r,a=>this.serviceRegistry.getServices(a.uri).references.Linker.link(a,r)),await this.runCancelable(i,Y.IndexedReferences,r,a=>this.indexManager.updateReferences(a,r));const s=e.filter(a=>this.shouldValidate(a)?!0:(this.markAsCompleted(a),!1));await this.runCancelable(s,Y.Validated,r,async a=>{await this.validate(a,r),this.markAsCompleted(a)})}markAsCompleted(e){const n=this.buildState.get(e.uri.toString());n&&(n.completed=!0)}prepareBuild(e,n){for(const r of e){const i=r.uri.toString(),s=this.buildState.get(i);(!s||s.completed)&&this.buildState.set(i,{completed:!1,options:n,result:s?.result})}}async runCancelable(e,n,r,i){for(const a of e)a.state<n&&(await Je(r),await i(a),a.state=n,await this.notifyDocumentPhase(a,n,r));const s=e.filter(a=>a.state===n);await this.notifyBuildPhase(s,n,r),this.currentState=n}onBuildPhase(e,n){return this.buildPhaseListeners.add(e,n),_i.create(()=>{this.buildPhaseListeners.delete(e,n)})}onDocumentPhase(e,n){return this.documentPhaseListeners.add(e,n),_i.create(()=>{this.documentPhaseListeners.delete(e,n)})}waitUntil(e,n,r){let i;return n&&"path"in n?i=n:r=n,r??(r=ye.CancellationToken.None),i?this.awaitDocumentState(e,i,r):this.awaitBuilderState(e,r)}awaitDocumentState(e,n,r){const i=this.langiumDocuments.getDocument(n);if(i){if(i.state>=e)return Promise.resolve(n);if(r.isCancellationRequested)return Promise.reject(Cr);if(this.currentState>=e&&e>i.state)return Promise.reject(new _s.ResponseError(_s.LSPErrorCodes.RequestFailed,`Document state of ${n.toString()} is ${Y[i.state]}, requiring ${Y[e]}, but workspace state is already ${Y[this.currentState]}. Returning undefined.`))}else return Promise.reject(new _s.ResponseError(_s.LSPErrorCodes.ServerCancelled,`No document found for URI: ${n.toString()}`));return new Promise((s,a)=>{const o=this.onDocumentPhase(e,l=>{dt.equals(l.uri,n)&&(o.dispose(),c.dispose(),s(l.uri))}),c=r.onCancellationRequested(()=>{o.dispose(),c.dispose(),a(Cr)})})}awaitBuilderState(e,n){return this.currentState>=e?Promise.resolve():n.isCancellationRequested?Promise.reject(Cr):new Promise((r,i)=>{const s=this.onBuildPhase(e,()=>{s.dispose(),a.dispose(),r()}),a=n.onCancellationRequested(()=>{s.dispose(),a.dispose(),i(Cr)})})}async notifyDocumentPhase(e,n,r){const s=this.documentPhaseListeners.get(n).slice();for(const a of s)try{await Je(r),await a(e,r)}catch(o){if(!Ia(o))throw o}}async notifyBuildPhase(e,n,r){if(e.length===0)return;const s=this.buildPhaseListeners.get(n).slice();for(const a of s)await Je(r),await a(e,r)}shouldLink(e){return this.getBuildOptions(e).eagerLinking??!0}shouldValidate(e){return!!this.getBuildOptions(e).validation}async validate(e,n){const r=this.serviceRegistry.getServices(e.uri).validation.DocumentValidator,i=this.getBuildOptions(e),s=typeof i.validation=="object"?{...i.validation}:{};s.categories=this.findMissingValidationCategories(e,i);const a=await r.validateDocument(e,s,n);e.diagnostics?e.diagnostics.push(...a):e.diagnostics=a;const o=this.buildState.get(e.uri.toString());o&&(o.result??(o.result={}),o.result.validationChecks?o.result.validationChecks=me(o.result.validationChecks).concat(s.categories).distinct().toArray():o.result.validationChecks=[...s.categories])}getBuildOptions(e){return this.buildState.get(e.uri.toString())?.options??{}}}class MR{constructor(e){this.symbolIndex=new Map,this.symbolByTypeIndex=new jT,this.referenceIndex=new Map,this.documents=e.workspace.LangiumDocuments,this.serviceRegistry=e.ServiceRegistry,this.astReflection=e.AstReflection}findAllReferences(e,n){const r=Zt(e).uri,i=[];return this.referenceIndex.forEach(s=>{s.forEach(a=>{dt.equals(a.targetUri,r)&&a.targetPath===n&&i.push(a)})}),me(i)}allElements(e,n){let r=me(this.symbolIndex.keys());return n&&(r=r.filter(i=>!n||n.has(i))),r.map(i=>this.getFileDescriptions(i,e)).flat()}getFileDescriptions(e,n){return n?this.symbolByTypeIndex.get(e,n,()=>(this.symbolIndex.get(e)??[]).filter(s=>this.astReflection.isSubtype(s.type,n))):this.symbolIndex.get(e)??[]}remove(e){this.removeContent(e),this.removeReferences(e)}removeContent(e){const n=e.toString();this.symbolIndex.delete(n),this.symbolByTypeIndex.clear(n)}removeReferences(e){const n=e.toString();this.referenceIndex.delete(n)}async updateContent(e,n=ye.CancellationToken.None){const i=await this.serviceRegistry.getServices(e.uri).references.ScopeComputation.collectExportedSymbols(e,n),s=e.uri.toString();this.symbolIndex.set(s,i),this.symbolByTypeIndex.clear(s)}async updateReferences(e,n=ye.CancellationToken.None){const i=await this.serviceRegistry.getServices(e.uri).workspace.ReferenceDescriptionProvider.createDescriptions(e,n);this.referenceIndex.set(e.uri.toString(),i)}isAffected(e,n){const r=this.referenceIndex.get(e.uri.toString());return r?r.some(i=>!i.local&&n.has(i.targetUri.toString())):!1}}class FR{constructor(e){this.initialBuildOptions={},this._ready=new ul,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(n=>this.initializeWorkspace(this.folders??[],n))}async initializeWorkspace(e,n=ye.CancellationToken.None){const r=await this.performStartup(e);await Je(n),await this.documentBuilder.build(r,this.initialBuildOptions,n)}async performStartup(e){const n=[],r=a=>{n.push(a),this.langiumDocuments.hasDocument(a.uri)||this.langiumDocuments.addDocument(a)};await this.loadAdditionalDocuments(e,r);const i=[];await Promise.all(e.map(a=>this.getRootFolder(a)).map(async a=>this.traverseFolder(a,i)));const s=me(i).distinct(a=>a.toString()).filter(a=>!this.langiumDocuments.hasDocument(a));return await this.loadWorkspaceDocuments(s,r),this._ready.resolve(),n}async loadWorkspaceDocuments(e,n){await Promise.all(e.map(async r=>{const i=await this.langiumDocuments.getOrCreateDocument(r);n(i)}))}loadAdditionalDocuments(e,n){return Promise.resolve()}getRootFolder(e){return bt.parse(e.uri)}async traverseFolder(e,n){try{const r=await this.fileSystemProvider.readDirectory(e);await Promise.all(r.map(async i=>{this.shouldIncludeEntry(i)&&(i.isDirectory?await this.traverseFolder(i.uri,n):i.isFile&&n.push(i.uri))}))}catch(r){console.error("Failure to read directory content of "+e.toString(!0),r)}}async searchFolder(e){const n=[];return await this.traverseFolder(e,n),n}shouldIncludeEntry(e){const n=dt.basename(e.uri);return n.startsWith(".")?!1:e.isDirectory?n!=="node_modules"&&n!=="out":e.isFile?this.serviceRegistry.hasServices(e.uri):!1}}class GR{buildUnexpectedCharactersMessage(e,n,r,i,s){return yo.buildUnexpectedCharactersMessage(e,n,r,i,s)}buildUnableToPopLexerModeMessage(e){return yo.buildUnableToPopLexerModeMessage(e)}}const UR={mode:"full"};class qR{constructor(e){this.errorMessageProvider=e.parser.LexerErrorMessageProvider,this.tokenBuilder=e.parser.TokenBuilder;const n=this.tokenBuilder.buildTokens(e.Grammar,{caseInsensitive:e.LanguageMetaData.caseInsensitive});this.tokenTypes=this.toTokenTypeDictionary(n);const r=id(n)?Object.values(n):n,i=e.LanguageMetaData.mode==="production";this.chevrotainLexer=new nt(r,{positionTracking:"full",skipValidations:i,errorMessageProvider:this.errorMessageProvider})}get definition(){return this.tokenTypes}tokenize(e,n=UR){const r=this.chevrotainLexer.tokenize(e);return{tokens:r.tokens,errors:r.errors,hidden:r.groups.hidden??[],report:this.tokenBuilder.flushLexingReport?.(e)}}toTokenTypeDictionary(e){if(id(e))return e;const n=rh(e)?Object.values(e.modes).flat():e,r={};return n.forEach(i=>r[i.name]=i),r}}function jR(t){return Array.isArray(t)&&(t.length===0||"name"in t[0])}function rh(t){return t&&"modes"in t&&"defaultMode"in t}function id(t){return!jR(t)&&!rh(t)}function zR(t,e,n){let r,i;typeof t=="string"?(i=e,r=n):(i=t.range.start,r=e),i||(i=te.create(0,0));const s=ih(t),a=pl(r),o=VR({lines:s,position:i,options:a});return JR({index:0,tokens:o,position:i})}function BR(t,e){const n=pl(e),r=ih(t);if(r.length===0)return!1;const i=r[0],s=r[r.length-1],a=n.start,o=n.end;return!!a?.exec(i)&&!!o?.exec(s)}function ih(t){let e="";return typeof t=="string"?e=t:e=t.text,e.split(Bp)}const sd=/\s*(@([\p{L}][\p{L}\p{N}]*)?)/uy,WR=/\{(@[\p{L}][\p{L}\p{N}]*)(\s*)([^\r\n}]+)?\}/gu;function VR(t){const e=[];let n=t.position.line,r=t.position.character;for(let i=0;i<t.lines.length;i++){const s=i===0,a=i===t.lines.length-1;let o=t.lines[i],c=0;if(s&&t.options.start){const u=t.options.start?.exec(o);u&&(c=u.index+u[0].length)}else{const u=t.options.line?.exec(o);u&&(c=u.index+u[0].length)}if(a){const u=t.options.end?.exec(o);u&&(o=o.substring(0,u.index))}if(o=o.substring(0,XR(o)),$c(o,c)>=o.length){if(e.length>0){const u=te.create(n,r);e.push({type:"break",content:"",range:X.create(u,u)})}}else{sd.lastIndex=c;const u=sd.exec(o);if(u){const f=u[0],m=u[1],p=te.create(n,r+c),A=te.create(n,r+c+f.length);e.push({type:"tag",content:m,range:X.create(p,A)}),c+=f.length,c=$c(o,c)}if(c<o.length){const f=o.substring(c),m=Array.from(f.matchAll(WR));e.push(...KR(m,f,n,r+c))}}n++,r=0}return e.length>0&&e[e.length-1].type==="break"?e.slice(0,-1):e}function KR(t,e,n,r){const i=[];if(t.length===0){const s=te.create(n,r),a=te.create(n,r+e.length);i.push({type:"text",content:e,range:X.create(s,a)})}else{let s=0;for(const o of t){const c=o.index,l=e.substring(s,c);l.length>0&&i.push({type:"text",content:e.substring(s,c),range:X.create(te.create(n,s+r),te.create(n,c+r))});let u=l.length+1;const f=o[1];if(i.push({type:"inline-tag",content:f,range:X.create(te.create(n,s+u+r),te.create(n,s+u+f.length+r))}),u+=f.length,o.length===4){u+=o[2].length;const m=o[3];i.push({type:"text",content:m,range:X.create(te.create(n,s+u+r),te.create(n,s+u+m.length+r))})}else i.push({type:"text",content:"",range:X.create(te.create(n,s+u+r),te.create(n,s+u+r))});s=c+o[0].length}const a=e.substring(s);a.length>0&&i.push({type:"text",content:a,range:X.create(te.create(n,s+r),te.create(n,s+r+a.length))})}return i}const HR=/\S/,YR=/\s*$/;function $c(t,e){const n=t.substring(e).match(HR);return n?e+n.index:t.length}function XR(t){const e=t.match(YR);if(e&&typeof e.index=="number")return e.index}function JR(t){const e=te.create(t.position.line,t.position.character);if(t.tokens.length===0)return new ad([],X.create(e,e));const n=[];for(;t.index<t.tokens.length;){const s=QR(t,n[n.length-1]);s&&n.push(s)}const r=n[0]?.range.start??e,i=n[n.length-1]?.range.end??e;return new ad(n,X.create(r,i))}function QR(t,e){const n=t.tokens[t.index];if(n.type==="tag")return ah(t,!1);if(n.type==="text"||n.type==="inline-tag")return sh(t);ZR(n,e),t.index++}function ZR(t,e){if(e){const n=new ch("",t.range);"inlines"in e?e.inlines.push(n):e.content.inlines.push(n)}}function sh(t){let e=t.tokens[t.index];const n=e;let r=e;const i=[];for(;e&&e.type!=="break"&&e.type!=="tag";)i.push(ev(t)),r=e,e=t.tokens[t.index];return new Lc(i,X.create(n.range.start,r.range.end))}function ev(t){return t.tokens[t.index].type==="inline-tag"?ah(t,!0):oh(t)}function ah(t,e){const n=t.tokens[t.index++],r=n.content.substring(1);if(t.tokens[t.index]?.type==="text")if(e){const s=oh(t);return new Xa(r,new Lc([s],s.range),e,X.create(n.range.start,s.range.end))}else{const s=sh(t);return new Xa(r,s,e,X.create(n.range.start,s.range.end))}else{const s=n.range;return new Xa(r,new Lc([],s),e,s)}}function oh(t){const e=t.tokens[t.index++];return new ch(e.content,e.range)}function pl(t){if(!t)return pl({start:"/**",end:"*/",line:"*"});const{start:e,end:n,line:r}=t;return{start:Ya(e,!0),end:Ya(n,!1),line:Ya(r,!0)}}function Ya(t,e){if(typeof t=="string"||typeof t=="object"){const n=typeof t=="string"?Aa(t):t.source;return e?new RegExp(`^\\s*${n}`):new RegExp(`\\s*${n}\\s*$`)}else return t}class ad{constructor(e,n){this.elements=e,this.range=n}getTag(e){return this.getAllTags().find(n=>n.name===e)}getTags(e){return this.getAllTags().filter(n=>n.name===e)}getAllTags(){return this.elements.filter(e=>"name"in e)}toString(){let e="";for(const n of this.elements)if(e.length===0)e=n.toString();else{const r=n.toString();e+=od(e)+r}return e.trim()}toMarkdown(e){let n="";for(const r of this.elements)if(n.length===0)n=r.toMarkdown(e);else{const i=r.toMarkdown(e);n+=od(n)+i}return n.trim()}}class Xa{constructor(e,n,r,i){this.name=e,this.content=n,this.inline=r,this.range=i}toString(){let e=`@${this.name}`;const n=this.content.toString();return this.content.inlines.length===1?e=`${e} ${n}`:this.content.inlines.length>1&&(e=`${e}
152
+ ${n}`),this.inline?`{${e}}`:e}toMarkdown(e){return e?.renderTag?.(this)??this.toMarkdownDefault(e)}toMarkdownDefault(e){const n=this.content.toMarkdown(e);if(this.inline){const s=tv(this.name,n,e??{});if(typeof s=="string")return s}let r="";e?.tag==="italic"||e?.tag===void 0?r="*":e?.tag==="bold"?r="**":e?.tag==="bold-italic"&&(r="***");let i=`${r}@${this.name}${r}`;return this.content.inlines.length===1?i=`${i} — ${n}`:this.content.inlines.length>1&&(i=`${i}
153
+ ${n}`),this.inline?`{${i}}`:i}}function tv(t,e,n){if(t==="linkplain"||t==="linkcode"||t==="link"){const r=e.indexOf(" ");let i=e;if(r>0){const a=$c(e,r);i=e.substring(a),e=e.substring(0,r)}return(t==="linkcode"||t==="link"&&n.link==="code")&&(i=`\`${i}\``),n.renderLink?.(e,i)??nv(e,i)}}function nv(t,e){try{return bt.parse(t,!0),`[${e}](${t})`}catch{return t}}class Lc{constructor(e,n){this.inlines=e,this.range=n}toString(){let e="";for(let n=0;n<this.inlines.length;n++){const r=this.inlines[n],i=this.inlines[n+1];e+=r.toString(),i&&i.range.start.line>r.range.start.line&&(e+=`
154
+ `)}return e}toMarkdown(e){let n="";for(let r=0;r<this.inlines.length;r++){const i=this.inlines[r],s=this.inlines[r+1];n+=i.toMarkdown(e),s&&s.range.start.line>i.range.start.line&&(n+=`
155
+ `)}return n}}class ch{constructor(e,n){this.text=e,this.range=n}toString(){return this.text}toMarkdown(){return this.text}}function od(t){return t.endsWith(`
156
+ `)?`
157
+ `:`
158
+
159
+ `}class rv{constructor(e){this.indexManager=e.shared.workspace.IndexManager,this.commentProvider=e.documentation.CommentProvider}getDocumentation(e){const n=this.commentProvider.getComment(e);if(n&&BR(n))return zR(n).toMarkdown({renderLink:(i,s)=>this.documentationLinkRenderer(e,i,s),renderTag:i=>this.documentationTagRenderer(e,i)})}documentationLinkRenderer(e,n,r){const i=this.findNameInLocalSymbols(e,n)??this.findNameInGlobalScope(e,n);if(i&&i.nameSegment){const s=i.nameSegment.range.start.line+1,a=i.nameSegment.range.start.character+1,o=i.documentUri.with({fragment:`L${s},${a}`});return`[${r}](${o.toString()})`}else return}documentationTagRenderer(e,n){}findNameInLocalSymbols(e,n){const i=Zt(e).localSymbols;if(!i)return;let s=e;do{const o=i.getStream(s).find(c=>c.name===n);if(o)return o;s=s.$container}while(s)}findNameInGlobalScope(e,n){return this.indexManager.allElements().find(i=>i.name===n)}}class iv{constructor(e){this.grammarConfig=()=>e.parser.GrammarConfig}getComment(e){return WT(e)?e.$comment:Gp(e.$cstNode,this.grammarConfig().multilineCommentRules)?.text}}class sv{constructor(e){this.syncParser=e.parser.LangiumParser}parse(e,n){return Promise.resolve(this.syncParser.parse(e))}}class av{constructor(){this.previousTokenSource=new ye.CancellationTokenSource,this.writeQueue=[],this.readQueue=[],this.done=!0}write(e){this.cancelWrite();const n=IT();return this.previousTokenSource=n,this.enqueue(this.writeQueue,e,n.token)}read(e){return this.enqueue(this.readQueue,e)}enqueue(e,n,r=ye.CancellationToken.None){const i=new ul,s={action:n,deferred:i,cancellationToken:r};return e.push(s),this.performNextOperation(),i.promise}async performNextOperation(){if(!this.done)return;const 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:n,deferred:r,cancellationToken:i})=>{try{const s=await Promise.resolve().then(()=>n(i));r.resolve(s)}catch(s){Ia(s)?r.resolve(void 0):r.reject(s)}})),this.done=!0,this.performNextOperation()}cancelWrite(){this.previousTokenSource.cancel()}}class ov{constructor(e){this.grammarElementIdMap=new uu,this.tokenTypeIdMap=new uu,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(n=>({...n,message:n.message})),value:this.dehydrateAstNode(e.value,this.createDehyrationContext(e.value))}}dehydrateLexerReport(e){return e}createDehyrationContext(e){const n=new Map,r=new Map;for(const i of en(e))n.set(i,{});if(e.$cstNode)for(const i of fo(e.$cstNode))r.set(i,{});return{astNodes:n,cstNodes:r}}dehydrateAstNode(e,n){const r=n.astNodes.get(e);r.$type=e.$type,r.$containerIndex=e.$containerIndex,r.$containerProperty=e.$containerProperty,e.$cstNode!==void 0&&(r.$cstNode=this.dehydrateCstNode(e.$cstNode,n));for(const[i,s]of Object.entries(e))if(!i.startsWith("$"))if(Array.isArray(s)){const a=[];r[i]=a;for(const o of s)Ve(o)?a.push(this.dehydrateAstNode(o,n)):kt(o)?a.push(this.dehydrateReference(o,n)):a.push(o)}else Ve(s)?r[i]=this.dehydrateAstNode(s,n):kt(s)?r[i]=this.dehydrateReference(s,n):s!==void 0&&(r[i]=s);return r}dehydrateReference(e,n){const r={};return r.$refText=e.$refText,e.$refNode&&(r.$refNode=n.cstNodes.get(e.$refNode)),r}dehydrateCstNode(e,n){const r=n.cstNodes.get(e);return wd(e)?r.fullText=e.fullText:r.grammarSource=this.getGrammarElementId(e.grammarSource),r.hidden=e.hidden,r.astNode=n.astNodes.get(e.astNode),wi(e)?r.content=e.content.map(i=>this.dehydrateCstNode(i,n)):Nd(e)&&(r.tokenType=e.tokenType.name,r.offset=e.offset,r.length=e.length,r.startLine=e.range.start.line,r.startColumn=e.range.start.character,r.endLine=e.range.end.line,r.endColumn=e.range.end.character),r}hydrate(e){const n=e.value,r=this.createHydrationContext(n);return"$cstNode"in n&&this.hydrateCstNode(n.$cstNode,r),{lexerErrors:e.lexerErrors,lexerReport:e.lexerReport,parserErrors:e.parserErrors,value:this.hydrateAstNode(n,r)}}createHydrationContext(e){const n=new Map,r=new Map;for(const s of en(e))n.set(s,{});let i;if(e.$cstNode)for(const s of fo(e.$cstNode)){let a;"fullText"in s?(a=new Ff(s.fullText),i=a):"content"in s?a=new ol:"tokenType"in s&&(a=this.hydrateCstLeafNode(s)),a&&(r.set(s,a),a.root=i)}return{astNodes:n,cstNodes:r}}hydrateAstNode(e,n){const r=n.astNodes.get(e);r.$type=e.$type,r.$containerIndex=e.$containerIndex,r.$containerProperty=e.$containerProperty,e.$cstNode&&(r.$cstNode=n.cstNodes.get(e.$cstNode));for(const[i,s]of Object.entries(e))if(!i.startsWith("$"))if(Array.isArray(s)){const a=[];r[i]=a;for(const o of s)Ve(o)?a.push(this.setParent(this.hydrateAstNode(o,n),r)):kt(o)?a.push(this.hydrateReference(o,r,i,n)):a.push(o)}else Ve(s)?r[i]=this.setParent(this.hydrateAstNode(s,n),r):kt(s)?r[i]=this.hydrateReference(s,r,i,n):s!==void 0&&(r[i]=s);return r}setParent(e,n){return e.$container=n,e}hydrateReference(e,n,r,i){return this.linker.buildReference(n,r,i.cstNodes.get(e.$refNode),e.$refText)}hydrateCstNode(e,n,r=0){const i=n.cstNodes.get(e);if(typeof e.grammarSource=="number"&&(i.grammarSource=this.getGrammarElement(e.grammarSource)),i.astNode=n.astNodes.get(e.astNode),wi(i))for(const s of e.content){const a=this.hydrateCstNode(s,n,r++);i.content.push(a)}return i}hydrateCstLeafNode(e){const n=this.getTokenType(e.tokenType),r=e.offset,i=e.length,s=e.startLine,a=e.startColumn,o=e.endLine,c=e.endColumn,l=e.hidden;return new Cc(r,i,{start:{line:s,character:a},end:{line:o,character:c}},n,l)}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(const n of en(this.grammar))gp(n)&&this.grammarElementIdMap.set(n,e++)}}function yn(t){return{documentation:{CommentProvider:e=>new iv(e),DocumentationProvider:e=>new rv(e)},parser:{AsyncParser:e=>new sv(e),GrammarConfig:e=>fm(e),LangiumParser:e=>kT(e),CompletionParser:e=>ST(e),ValueConverter:()=>new Kf,TokenBuilder:()=>new Vf,Lexer:e=>new qR(e),ParserErrorMessageProvider:()=>new qf,LexerErrorMessageProvider:()=>new GR},workspace:{AstNodeLocator:()=>new tR,AstNodeDescriptionProvider:e=>new ZT(e),ReferenceDescriptionProvider:e=>new eR(e)},references:{Linker:e=>new xT(e),NameProvider:()=>new MT,ScopeProvider:e=>new BT(e),ScopeComputation:e=>new GT(e),References:e=>new FT(e)},serializer:{Hydrator:e=>new ov(e),JsonSerializer:e=>new VT(e)},validation:{DocumentValidator:e=>new XT(e),ValidationRegistry:e=>new HT(e)},shared:()=>t.shared}}function Tn(t){return{ServiceRegistry:e=>new KT(e),workspace:{LangiumDocuments:e=>new OT(e),LangiumDocumentFactory:e=>new LT(e),DocumentBuilder:e=>new DR(e),IndexManager:e=>new MR(e),WorkspaceManager:e=>new FR(e),FileSystemProvider:e=>t.fileSystemProvider(e),WorkspaceLock:()=>new av,ConfigurationProvider:e=>new rR(e)},profilers:{}}}var cd;(function(t){t.merge=(e,n)=>Ui(Ui({},e),n)})(cd||(cd={}));function Ke(t,e,n,r,i,s,a,o,c){const l=[t,e,n,r,i,s,a,o,c].reduce(Ui,{});return lh(l)}const cv=Symbol("isProxy");function lh(t,e){const n=new Proxy({},{deleteProperty:()=>!1,set:()=>{throw new Error("Cannot set property on injected service container")},get:(r,i)=>i===cv?!0:ud(r,i,t,e||n),getOwnPropertyDescriptor:(r,i)=>(ud(r,i,t,e||n),Object.getOwnPropertyDescriptor(r,i)),has:(r,i)=>i in t,ownKeys:()=>[...Object.getOwnPropertyNames(t)]});return n}const ld=Symbol();function ud(t,e,n,r){if(e in t){if(t[e]instanceof Error)throw new Error("Construction failure. Please make sure that your dependencies are constructable. Cause: "+t[e]);if(t[e]===ld)throw new Error('Cycle detected. Please make "'+String(e)+'" lazy. Visit https://langium.org/docs/reference/configuration-services/#resolving-cyclic-dependencies');return t[e]}else if(e in n){const i=n[e];t[e]=ld;try{t[e]=typeof i=="function"?i(r):lh(i,r)}catch(s){throw t[e]=s instanceof Error?s:void 0,s}return t[e]}else return}function Ui(t,e){if(e){for(const[n,r]of Object.entries(e))if(r!=null)if(typeof r=="object"){const i=t[n];typeof i=="object"&&i!==null?t[n]=Ui(i,r):t[n]=Ui({},r)}else t[n]=r}return t}class lv{stat(e){throw new Error("No file system is available.")}statSync(e){throw new Error("No file system is available.")}async exists(){return!1}existsSync(){return!1}readBinary(){throw new Error("No file system is available.")}readBinarySync(){throw new Error("No file system is available.")}readFile(){throw new Error("No file system is available.")}readFileSync(){throw new Error("No file system is available.")}async readDirectory(){return[]}readDirectorySync(){return[]}}const Rn={fileSystemProvider:()=>new lv},uv={Grammar:()=>{},LanguageMetaData:()=>({caseInsensitive:!1,fileExtensions:[".langium"],languageId:"langium"})},dv={AstReflection:()=>new xd};function fv(){const t=Ke(Tn(Rn),dv),e=Ke(yn({shared:t}),uv);return t.ServiceRegistry.register(e),e}function tr(t){const e=fv(),n=e.serializer.JsonSerializer.deserialize(t);return e.shared.workspace.LangiumDocumentFactory.fromModel(n,bt.parse(`memory:/${n.name??"grammar"}.langium`)),n}var hv=Object.defineProperty,$=(t,e)=>hv(t,"name",{value:e,configurable:!0}),Oc;(t=>{t.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 ]+)\]/}})(Oc||(Oc={}));var xc;(t=>{t.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])?/}})(xc||(xc={}));var Dc;(t=>{t.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]*/}})(Dc||(Dc={}));var Mc;(t=>{t.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]*/}})(Mc||(Mc={}));var Fc;(t=>{t.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]*/}})(Fc||(Fc={}));var Gc;(t=>{t.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]*/}})(Gc||(Gc={}));var Uc;(t=>{t.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:/"[^"]*"|'[^']*'/}})(Uc||(Uc={}));({...Oc.Terminals,...xc.Terminals,...Dc.Terminals,...Mc.Terminals,...Fc.Terminals,...Gc.Terminals,...Uc.Terminals});var Ht={$type:"Architecture",accDescr:"accDescr",accTitle:"accTitle",edges:"edges",groups:"groups",junctions:"junctions",services:"services",title:"title"};function pv(t){return wt.isInstance(t,Ht.$type)}$(pv,"isArchitecture");var Ns={$type:"Axis",label:"label",name:"name"},Ws={$type:"Branch",name:"name",order:"order"};function mv(t){return wt.isInstance(t,Ws.$type)}$(mv,"isBranch");var dd={$type:"Checkout",branch:"branch"},ws={$type:"CherryPicking",id:"id",parent:"parent",tags:"tags"},Ja={$type:"ClassDefStatement",className:"className",styleText:"styleText"},Rr={$type:"Commit",id:"id",message:"message",tags:"tags",type:"type"};function gv(t){return wt.isInstance(t,Rr.$type)}$(gv,"isCommit");var Is={$type:"Curve",entries:"entries",label:"label",name:"name"},cr={$type:"Direction",accDescr:"accDescr",accTitle:"accTitle",dir:"dir",statements:"statements",title:"title"},Pt={$type:"Edge",lhsDir:"lhsDir",lhsGroup:"lhsGroup",lhsId:"lhsId",lhsInto:"lhsInto",rhsDir:"rhsDir",rhsGroup:"rhsGroup",rhsId:"rhsId",rhsInto:"rhsInto",title:"title"},Qa={$type:"Entry",axis:"axis",value:"value"},qn={$type:"GitGraph",accDescr:"accDescr",accTitle:"accTitle",statements:"statements",title:"title"};function yv(t){return wt.isInstance(t,qn.$type)}$(yv,"isGitGraph");var gi={$type:"Group",icon:"icon",id:"id",in:"in",title:"title"},bi={$type:"Info",accDescr:"accDescr",accTitle:"accTitle",title:"title"};function Tv(t){return wt.isInstance(t,bi.$type)}$(Tv,"isInfo");var yi={$type:"Item",classSelector:"classSelector",name:"name"},Za={$type:"Junction",id:"id",in:"in"},Ps={$type:"Leaf",classSelector:"classSelector",name:"name",value:"value"},vr={$type:"Merge",branch:"branch",id:"id",tags:"tags",type:"type"};function Rv(t){return wt.isInstance(t,vr.$type)}$(Rv,"isMerge");var eo={$type:"Option",name:"name",value:"value"},Er={$type:"Packet",accDescr:"accDescr",accTitle:"accTitle",blocks:"blocks",title:"title"};function vv(t){return wt.isInstance(t,Er.$type)}$(vv,"isPacket");var Ar={$type:"PacketBlock",bits:"bits",end:"end",label:"label",start:"start"};function Ev(t){return wt.isInstance(t,Ar.$type)}$(Ev,"isPacketBlock");var jn={$type:"Pie",accDescr:"accDescr",accTitle:"accTitle",sections:"sections",showData:"showData",title:"title"};function Av(t){return wt.isInstance(t,jn.$type)}$(Av,"isPie");var Vs={$type:"PieSection",label:"label",value:"value"};function Sv(t){return wt.isInstance(t,Vs.$type)}$(Sv,"isPieSection");var Dn={$type:"Radar",accDescr:"accDescr",accTitle:"accTitle",axes:"axes",curves:"curves",options:"options",title:"title"},to={$type:"Section",classSelector:"classSelector",name:"name"},lr={$type:"Service",icon:"icon",iconText:"iconText",id:"id",in:"in",title:"title"},ur={$type:"Statement"},Sr={$type:"Treemap",accDescr:"accDescr",accTitle:"accTitle",title:"title",TreemapRows:"TreemapRows"};function kv(t){return wt.isInstance(t,Sr.$type)}$(kv,"isTreemap");var no={$type:"TreemapRow",indent:"indent",item:"item"},uh=class extends _d{constructor(){super(...arguments),this.types={Architecture:{name:Ht.$type,properties:{accDescr:{name:Ht.accDescr},accTitle:{name:Ht.accTitle},edges:{name:Ht.edges,defaultValue:[]},groups:{name:Ht.groups,defaultValue:[]},junctions:{name:Ht.junctions,defaultValue:[]},services:{name:Ht.services,defaultValue:[]},title:{name:Ht.title}},superTypes:[]},Axis:{name:Ns.$type,properties:{label:{name:Ns.label},name:{name:Ns.name}},superTypes:[]},Branch:{name:Ws.$type,properties:{name:{name:Ws.name},order:{name:Ws.order}},superTypes:[ur.$type]},Checkout:{name:dd.$type,properties:{branch:{name:dd.branch}},superTypes:[ur.$type]},CherryPicking:{name:ws.$type,properties:{id:{name:ws.id},parent:{name:ws.parent},tags:{name:ws.tags,defaultValue:[]}},superTypes:[ur.$type]},ClassDefStatement:{name:Ja.$type,properties:{className:{name:Ja.className},styleText:{name:Ja.styleText}},superTypes:[]},Commit:{name:Rr.$type,properties:{id:{name:Rr.id},message:{name:Rr.message},tags:{name:Rr.tags,defaultValue:[]},type:{name:Rr.type}},superTypes:[ur.$type]},Curve:{name:Is.$type,properties:{entries:{name:Is.entries,defaultValue:[]},label:{name:Is.label},name:{name:Is.name}},superTypes:[]},Direction:{name:cr.$type,properties:{accDescr:{name:cr.accDescr},accTitle:{name:cr.accTitle},dir:{name:cr.dir},statements:{name:cr.statements,defaultValue:[]},title:{name:cr.title}},superTypes:[qn.$type]},Edge:{name:Pt.$type,properties:{lhsDir:{name:Pt.lhsDir},lhsGroup:{name:Pt.lhsGroup,defaultValue:!1},lhsId:{name:Pt.lhsId},lhsInto:{name:Pt.lhsInto,defaultValue:!1},rhsDir:{name:Pt.rhsDir},rhsGroup:{name:Pt.rhsGroup,defaultValue:!1},rhsId:{name:Pt.rhsId},rhsInto:{name:Pt.rhsInto,defaultValue:!1},title:{name:Pt.title}},superTypes:[]},Entry:{name:Qa.$type,properties:{axis:{name:Qa.axis,referenceType:Ns.$type},value:{name:Qa.value}},superTypes:[]},GitGraph:{name:qn.$type,properties:{accDescr:{name:qn.accDescr},accTitle:{name:qn.accTitle},statements:{name:qn.statements,defaultValue:[]},title:{name:qn.title}},superTypes:[]},Group:{name:gi.$type,properties:{icon:{name:gi.icon},id:{name:gi.id},in:{name:gi.in},title:{name:gi.title}},superTypes:[]},Info:{name:bi.$type,properties:{accDescr:{name:bi.accDescr},accTitle:{name:bi.accTitle},title:{name:bi.title}},superTypes:[]},Item:{name:yi.$type,properties:{classSelector:{name:yi.classSelector},name:{name:yi.name}},superTypes:[]},Junction:{name:Za.$type,properties:{id:{name:Za.id},in:{name:Za.in}},superTypes:[]},Leaf:{name:Ps.$type,properties:{classSelector:{name:Ps.classSelector},name:{name:Ps.name},value:{name:Ps.value}},superTypes:[yi.$type]},Merge:{name:vr.$type,properties:{branch:{name:vr.branch},id:{name:vr.id},tags:{name:vr.tags,defaultValue:[]},type:{name:vr.type}},superTypes:[ur.$type]},Option:{name:eo.$type,properties:{name:{name:eo.name},value:{name:eo.value,defaultValue:!1}},superTypes:[]},Packet:{name:Er.$type,properties:{accDescr:{name:Er.accDescr},accTitle:{name:Er.accTitle},blocks:{name:Er.blocks,defaultValue:[]},title:{name:Er.title}},superTypes:[]},PacketBlock:{name:Ar.$type,properties:{bits:{name:Ar.bits},end:{name:Ar.end},label:{name:Ar.label},start:{name:Ar.start}},superTypes:[]},Pie:{name:jn.$type,properties:{accDescr:{name:jn.accDescr},accTitle:{name:jn.accTitle},sections:{name:jn.sections,defaultValue:[]},showData:{name:jn.showData,defaultValue:!1},title:{name:jn.title}},superTypes:[]},PieSection:{name:Vs.$type,properties:{label:{name:Vs.label},value:{name:Vs.value}},superTypes:[]},Radar:{name:Dn.$type,properties:{accDescr:{name:Dn.accDescr},accTitle:{name:Dn.accTitle},axes:{name:Dn.axes,defaultValue:[]},curves:{name:Dn.curves,defaultValue:[]},options:{name:Dn.options,defaultValue:[]},title:{name:Dn.title}},superTypes:[]},Section:{name:to.$type,properties:{classSelector:{name:to.classSelector},name:{name:to.name}},superTypes:[yi.$type]},Service:{name:lr.$type,properties:{icon:{name:lr.icon},iconText:{name:lr.iconText},id:{name:lr.id},in:{name:lr.in},title:{name:lr.title}},superTypes:[]},Statement:{name:ur.$type,properties:{},superTypes:[]},Treemap:{name:Sr.$type,properties:{accDescr:{name:Sr.accDescr},accTitle:{name:Sr.accTitle},title:{name:Sr.title},TreemapRows:{name:Sr.TreemapRows,defaultValue:[]}},superTypes:[]},TreemapRow:{name:no.$type,properties:{indent:{name:no.indent},item:{name:no.item}},superTypes:[]}}}static{$(this,"MermaidAstReflection")}},wt=new uh,fd,Cv=$(()=>fd??(fd=tr(`{"$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"),hd,bv=$(()=>hd??(hd=tr(`{"$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"),pd,_v=$(()=>pd??(pd=tr(`{"$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"),md,Nv=$(()=>md??(md=tr(`{"$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"),gd,wv=$(()=>gd??(gd=tr(`{"$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"),yd,Iv=$(()=>yd??(yd=tr(`{"$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"),Td,Pv=$(()=>Td??(Td=tr(`{"$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"),$v={languageId:"architecture",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},Lv={languageId:"gitGraph",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},Ov={languageId:"info",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},xv={languageId:"packet",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},Dv={languageId:"pie",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},Mv={languageId:"radar",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},Fv={languageId:"treemap",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},nr={AstReflection:$(()=>new uh,"AstReflection")},Gv={Grammar:$(()=>Cv(),"Grammar"),LanguageMetaData:$(()=>$v,"LanguageMetaData"),parser:{}},Uv={Grammar:$(()=>bv(),"Grammar"),LanguageMetaData:$(()=>Lv,"LanguageMetaData"),parser:{}},qv={Grammar:$(()=>_v(),"Grammar"),LanguageMetaData:$(()=>Ov,"LanguageMetaData"),parser:{}},jv={Grammar:$(()=>Nv(),"Grammar"),LanguageMetaData:$(()=>xv,"LanguageMetaData"),parser:{}},zv={Grammar:$(()=>wv(),"Grammar"),LanguageMetaData:$(()=>Dv,"LanguageMetaData"),parser:{}},Bv={Grammar:$(()=>Iv(),"Grammar"),LanguageMetaData:$(()=>Mv,"LanguageMetaData"),parser:{}},Wv={Grammar:$(()=>Pv(),"Grammar"),LanguageMetaData:$(()=>Fv,"LanguageMetaData"),parser:{}},Vv=/accDescr(?:[\t ]*:([^\n\r]*)|\s*{([^}]*)})/,Kv=/accTitle[\t ]*:([^\n\r]*)/,Hv=/title([\t ][^\n\r]*|)/,Yv={ACC_DESCR:Vv,ACC_TITLE:Kv,TITLE:Hv},Pa=class extends Kf{static{$(this,"AbstractMermaidValueConverter")}runConverter(t,e,n){let r=this.runCommonConverter(t,e,n);return r===void 0&&(r=this.runCustomConverter(t,e,n)),r===void 0?super.runConverter(t,e,n):r}runCommonConverter(t,e,n){const r=Yv[t.name];if(r===void 0)return;const i=r.exec(e);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,`
160
+ `)}}},$a=class extends Pa{static{$(this,"CommonValueConverter")}runCustomConverter(t,e,n){}},vn=class extends Vf{static{$(this,"AbstractMermaidTokenBuilder")}constructor(t){super(),this.keywords=new Set(t)}buildKeywordTokens(t,e,n){const r=super.buildKeywordTokens(t,e,n);return r.forEach(i=>{this.keywords.has(i.name)&&i.PATTERN!==void 0&&(i.PATTERN=new RegExp(i.PATTERN.toString()+"(?:(?=%%)|(?!\\S))"))}),r}};(class extends vn{static{$(this,"CommonTokenBuilder")}});var Xv=class extends vn{static{$(this,"GitGraphTokenBuilder")}constructor(){super(["gitGraph"])}},dh={parser:{TokenBuilder:$(()=>new Xv,"TokenBuilder"),ValueConverter:$(()=>new $a,"ValueConverter")}};function fh(t=Rn){const e=Ke(Tn(t),nr),n=Ke(yn({shared:e}),Uv,dh);return e.ServiceRegistry.register(n),{shared:e,GitGraph:n}}$(fh,"createGitGraphServices");var Jv=class extends vn{static{$(this,"InfoTokenBuilder")}constructor(){super(["info","showInfo"])}},hh={parser:{TokenBuilder:$(()=>new Jv,"TokenBuilder"),ValueConverter:$(()=>new $a,"ValueConverter")}};function ph(t=Rn){const e=Ke(Tn(t),nr),n=Ke(yn({shared:e}),qv,hh);return e.ServiceRegistry.register(n),{shared:e,Info:n}}$(ph,"createInfoServices");var Qv=class extends vn{static{$(this,"PacketTokenBuilder")}constructor(){super(["packet"])}},mh={parser:{TokenBuilder:$(()=>new Qv,"TokenBuilder"),ValueConverter:$(()=>new $a,"ValueConverter")}};function gh(t=Rn){const e=Ke(Tn(t),nr),n=Ke(yn({shared:e}),jv,mh);return e.ServiceRegistry.register(n),{shared:e,Packet:n}}$(gh,"createPacketServices");var Zv=class extends vn{static{$(this,"PieTokenBuilder")}constructor(){super(["pie","showData"])}},eE=class extends Pa{static{$(this,"PieValueConverter")}runCustomConverter(t,e,n){if(t.name==="PIE_SECTION_LABEL")return e.replace(/"/g,"").trim()}},yh={parser:{TokenBuilder:$(()=>new Zv,"TokenBuilder"),ValueConverter:$(()=>new eE,"ValueConverter")}};function Th(t=Rn){const e=Ke(Tn(t),nr),n=Ke(yn({shared:e}),zv,yh);return e.ServiceRegistry.register(n),{shared:e,Pie:n}}$(Th,"createPieServices");var tE=class extends vn{static{$(this,"ArchitectureTokenBuilder")}constructor(){super(["architecture"])}},nE=class extends Pa{static{$(this,"ArchitectureValueConverter")}runCustomConverter(t,e,n){if(t.name==="ARCH_ICON")return e.replace(/[()]/g,"").trim();if(t.name==="ARCH_TEXT_ICON")return e.replace(/["()]/g,"");if(t.name==="ARCH_TITLE"){let r=e.replace(/^\[|]$/g,"").trim();return(r.startsWith('"')&&r.endsWith('"')||r.startsWith("'")&&r.endsWith("'"))&&(r=r.slice(1,-1),r=r.replace(/\\"/g,'"').replace(/\\'/g,"'")),r.trim()}}},Rh={parser:{TokenBuilder:$(()=>new tE,"TokenBuilder"),ValueConverter:$(()=>new nE,"ValueConverter")}};function vh(t=Rn){const e=Ke(Tn(t),nr),n=Ke(yn({shared:e}),Gv,Rh);return e.ServiceRegistry.register(n),{shared:e,Architecture:n}}$(vh,"createArchitectureServices");var rE=class extends vn{static{$(this,"RadarTokenBuilder")}constructor(){super(["radar-beta"])}},Eh={parser:{TokenBuilder:$(()=>new rE,"TokenBuilder"),ValueConverter:$(()=>new $a,"ValueConverter")}};function Ah(t=Rn){const e=Ke(Tn(t),nr),n=Ke(yn({shared:e}),Bv,Eh);return e.ServiceRegistry.register(n),{shared:e,Radar:n}}$(Ah,"createRadarServices");var iE=class extends vn{static{$(this,"TreemapTokenBuilder")}constructor(){super(["treemap"])}},sE=/classDef\s+([A-Z_a-z]\w+)(?:\s+([^\n\r;]*))?;?/,aE=class extends Pa{static{$(this,"TreemapValueConverter")}runCustomConverter(t,e,n){if(t.name==="NUMBER2")return parseFloat(e.replace(/,/g,""));if(t.name==="SEPARATOR")return e.substring(1,e.length-1);if(t.name==="STRING2")return e.substring(1,e.length-1);if(t.name==="INDENTATION")return e.length;if(t.name==="ClassDef"){if(typeof e!="string")return e;const r=sE.exec(e);if(r)return{$type:"ClassDefStatement",className:r[1],styleText:r[2]||void 0}}}};function Sh(t){const e=t.validation.TreemapValidator,n=t.validation.ValidationRegistry;if(n){const r={Treemap:e.checkSingleRoot.bind(e)};n.register(r,e)}}$(Sh,"registerValidationChecks");var oE=class{static{$(this,"TreemapValidator")}checkSingleRoot(t,e){let n;for(const r of t.TreemapRows)r.item&&(n===void 0&&r.indent===void 0?n=0:r.indent===void 0?e("error","Multiple root nodes are not allowed in a treemap.",{node:r,property:"item"}):n!==void 0&&n>=parseInt(r.indent,10)&&e("error","Multiple root nodes are not allowed in a treemap.",{node:r,property:"item"}))}},kh={parser:{TokenBuilder:$(()=>new iE,"TokenBuilder"),ValueConverter:$(()=>new aE,"ValueConverter")},validation:{TreemapValidator:$(()=>new oE,"TreemapValidator")}};function Ch(t=Rn){const e=Ke(Tn(t),nr),n=Ke(yn({shared:e}),Wv,kh);return e.ServiceRegistry.register(n),Sh(n),{shared:e,Treemap:n}}$(Ch,"createTreemapServices");var Xt={},cE={info:$(async()=>{const{createInfoServices:t}=await An(async()=>{const{createInfoServices:n}=await Promise.resolve().then(()=>dE);return{createInfoServices:n}},void 0),e=t().Info.parser.LangiumParser;Xt.info=e},"info"),packet:$(async()=>{const{createPacketServices:t}=await An(async()=>{const{createPacketServices:n}=await Promise.resolve().then(()=>fE);return{createPacketServices:n}},void 0),e=t().Packet.parser.LangiumParser;Xt.packet=e},"packet"),pie:$(async()=>{const{createPieServices:t}=await An(async()=>{const{createPieServices:n}=await Promise.resolve().then(()=>hE);return{createPieServices:n}},void 0),e=t().Pie.parser.LangiumParser;Xt.pie=e},"pie"),architecture:$(async()=>{const{createArchitectureServices:t}=await An(async()=>{const{createArchitectureServices:n}=await Promise.resolve().then(()=>pE);return{createArchitectureServices:n}},void 0),e=t().Architecture.parser.LangiumParser;Xt.architecture=e},"architecture"),gitGraph:$(async()=>{const{createGitGraphServices:t}=await An(async()=>{const{createGitGraphServices:n}=await Promise.resolve().then(()=>mE);return{createGitGraphServices:n}},void 0),e=t().GitGraph.parser.LangiumParser;Xt.gitGraph=e},"gitGraph"),radar:$(async()=>{const{createRadarServices:t}=await An(async()=>{const{createRadarServices:n}=await Promise.resolve().then(()=>gE);return{createRadarServices:n}},void 0),e=t().Radar.parser.LangiumParser;Xt.radar=e},"radar"),treemap:$(async()=>{const{createTreemapServices:t}=await An(async()=>{const{createTreemapServices:n}=await Promise.resolve().then(()=>yE);return{createTreemapServices:n}},void 0),e=t().Treemap.parser.LangiumParser;Xt.treemap=e},"treemap")};async function lE(t,e){const n=cE[t];if(!n)throw new Error(`Unknown diagram type: ${t}`);Xt[t]||await n();const i=Xt[t].parse(e);if(i.lexerErrors.length>0||i.parserErrors.length>0)throw new uE(i);return i.value}$(lE,"parse");var uE=class extends Error{constructor(t){const e=t.lexerErrors.map(r=>{const i=r.line!==void 0&&!isNaN(r.line)?r.line:"?",s=r.column!==void 0&&!isNaN(r.column)?r.column:"?";return`Lexer error on line ${i}, column ${s}: ${r.message}`}).join(`
161
+ `),n=t.parserErrors.map(r=>{const i=r.token.startLine!==void 0&&!isNaN(r.token.startLine)?r.token.startLine:"?",s=r.token.startColumn!==void 0&&!isNaN(r.token.startColumn)?r.token.startColumn:"?";return`Parse error on line ${i}, column ${s}: ${r.message}`}).join(`
162
+ `);super(`Parsing failed: ${e} ${n}`),this.result=t}static{$(this,"MermaidParseError")}};const dE=Object.freeze(Object.defineProperty({__proto__:null,InfoModule:hh,createInfoServices:ph},Symbol.toStringTag,{value:"Module"})),fE=Object.freeze(Object.defineProperty({__proto__:null,PacketModule:mh,createPacketServices:gh},Symbol.toStringTag,{value:"Module"})),hE=Object.freeze(Object.defineProperty({__proto__:null,PieModule:yh,createPieServices:Th},Symbol.toStringTag,{value:"Module"})),pE=Object.freeze(Object.defineProperty({__proto__:null,ArchitectureModule:Rh,createArchitectureServices:vh},Symbol.toStringTag,{value:"Module"})),mE=Object.freeze(Object.defineProperty({__proto__:null,GitGraphModule:dh,createGitGraphServices:fh},Symbol.toStringTag,{value:"Module"})),gE=Object.freeze(Object.defineProperty({__proto__:null,RadarModule:Eh,createRadarServices:Ah},Symbol.toStringTag,{value:"Module"})),yE=Object.freeze(Object.defineProperty({__proto__:null,TreemapModule:kh,createTreemapServices:Ch},Symbol.toStringTag,{value:"Module"}));export{lE as p};